]> git.saurik.com Git - bison.git/blame - ChangeLog
Clean up scanners a bit.
[bison.git] / ChangeLog
CommitLineData
f9bfc42a
JD
12006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Clean up scanners a bit.
4 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
5 definitions so gcc won't warn when obstack_for_string is unused.
6 * src/scan-code.l: config.h and system.h are already #include'd by
7 scan-code-c.c, so get rid of them here.
8 * src/scan-gram.l: Likewise.
9 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
10 definitions rather than duplicating the rest of it.
11 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
12
06e8700a
JD
132006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
14
15 Suppress signed/unsigned comparison warnings for yycheck.
16 * data/c.m4 (b4_safest_int_type): New macro.
17 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
18 a signed int type, cast it to b4_safest_int_type first.
19 * data/yacc.c: Likewise.
20 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
21 also overwritten.
22
9c437126
PE
232006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
24
25 * doc/bison.texinfo: Fix some typos.
26
284d8a13
PE
272006-08-02 Paul Eggert <eggert@cs.ucla.edu>
28
29 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
30 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
31
32 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
33 the latest gnulib does this a different way.
34 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
35 translation was patched, so stop omitting it.
36
ec5479ce
JD
372006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
38
39 Enable declaration of default %printer/%destructor. Make the parser
40 use these for all user-declared grammar symbols for which the user does
41 not declare a specific %printer/%destructor. Thus, the parser uses it
42 for token 0 if the user declares it but not if Bison generates it as
43 $end. Discussed starting at
44 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
45 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
46 and
47 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
48 * NEWS (2.3+): Mention.
49 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
50 declare a %destructor for a mid-rule's semantic value. It's just
51 impossible to declare one specific to it.
52 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
53 code. Describe default %destructor form.
54 * src/parse-gram.y (grammar_declaration): Parse default
55 %printer/%destructor declarations.
56 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
57 and symbol_destructor_location_get rather than accessing the destructor
58 and destructor_location members of struct symbol.
59 (symbol_printers_output): Likewise but for %printer's.
60 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
61 again.
62 * src/symtab.c (default_destructor, default_destructor_location,
63 default_printer, default_printer_location): New static global
64 variables to record the default %destructor and %printer.
65 (symbol_destructor_get, symbol_destructor_location_get,
66 symbol_printer_get, symbol_printer_location_get): New functions to
67 compute the appropriate %destructor and %printer for a symbol.
68 (default_destructor_set, default_printer_set): New functions to set the
69 default %destructor and %printer.
70 * src/symtab.h: Prototype all those new functions.
71 * tests/actions.at (Default %printer and %destructor): New test to
72 check that the right %printer and %destructor are called, that they're
73 not called for $end, and that $$ and @$ work correctly.
74 (Default %printer and %destructor for user-declared end token): New
75 test to check that the default %printer and %destructor are called for
76 a user-declared end token.
77 * tests/input.at (Default %printer and %destructor redeclared, Unused
78 values with default %destructor): New tests to check related grammar
79 warnings and errors.
80
868d2d96
JD
812006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
82
83 Clean up handling of %destructor for the end token (token 0).
84 Discussed starting at
85 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
86 and
87 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
88
89 Make the skeletons consistent in how they pop the end token and invoke
90 its %destructor.
91 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
92 state, which has token number 0, since this would invoke the
93 %destructor for the end token.
94 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
95 until after shifting the end token, or else it won't be popped.
96 * data/yacc.c (yyparse): Likewise.
97
98 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
99 it's the end token. Upon termination, destroy an unshifted lookahead
100 even when it's the end token.
101 * data/lalr1.cc (yy::parser::parse): Likewise.
102 * data/yacc.c (yyparse): Likewise.
103
104 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
105 value warnings for the end token when the user gives the end token a
106 %destructor.
107
108 * tests/actions.at (Printers and Destructors): Test all the above.
109
62a9592d
PE
1102006-07-24 Paul Eggert <eggert@cs.ucla.edu>
111
112 Update to latest gnulib and gettext versions.
113 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
114 Add fopen-safer.
115 (gnulib_files): Add m4/warning.m4. Don't worry about files
116 overwritten by autopoint.
117 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
118 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
119 rejects them.
120 Don't use autoreconf; instead, invoke autopoint etc. by hand,
121 so that we can remove the intl files at a better time.
122 (intl_files_to_remove): Remove aclocal.m4, since it gets
123 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
124 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
125 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
126 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
127 Remove datarootdir hack; no longer needed.
128 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
129 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
130 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
131 strdup.h.
132 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
133 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
134
10d6970f
PE
1352006-07-20 Paul Eggert <eggert@cs.ucla.edu>
136
137 * bootstrap: Adjust to today's change to gnulib-tool by invoking
138 it with --assume-autoconf='latest-stable'.
139
50a33993
JD
1402006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
141
142 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
143 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
144 YYSTYPE' and `{'.
145 * src/muscle_tab.h (muscle_grow): Replace the header comments with
146 those from muscle_tab.c since the old ones are misleading.
147
2ce4ed68
AD
1482006-07-13 Akim Demaille <akim@epita.fr>
149
150 Support %define "KEY" {VALUE}.
151 * src/scan-code.h, src/scan-code.l (translate_action)
152 (translate_rule_action, translate_symbol_action, translate_code):
153 Return char *, not const char *.
154 * src/parse-gram.y (declaration): Rename as...
155 (prologue_declaration): this.
156 (string_content): Remove this nonterminal, use STRING.
157 (braceless, content, content.opt): New nonterminal.
158 Use them.
159 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
160 as value.
161 * src/scan-gram.l (getargs.h): Don't include it.
162
db7e5eb5
PE
1632006-07-12 Paul Eggert <eggert@cs.ucla.edu>
164
165 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
166 rather than a for-loop that declares a local bool variable. This
167 should work around a compatibility problem with a Cray x1e C++
168 compiler reported by Hung Nguyen in
169 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
170 The for-loop was introduced in the 2004-11-17 change but I don't
171 know why it was needed.
172
a5d80ba5
AD
1732006-07-12 Akim Demaille <akim@epita.fr>
174
175 * data/c.m4: Comment changes.
176
23eb2a69
AD
1772006-07-10 Akim Demaille <akim@lrde.epita.fr>
178
179 * src/complain.c (error_message, ERROR_MESSAGE): New.
180 To factor...
181 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
182 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
183
ddc8ede1
PE
1842006-07-09 Paul Eggert <eggert@cs.ucla.edu>
185
186 * NEWS: Instead of %union, you can define and use your own union type
187 YYSTYPE if your grammar contains at least one <type> tag.
188 Your YYSTYPE need not be a macro; it can be a typedef.
189 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
190 (Union Decl, Decl Summary): Document this.
191 * data/glr.c (YYSTYPE): Implement this.
192 * data/glr.cc (YYSTYPE): Likewise.
193 * data/lalr1.cc (YYSTYPE): Likewise.
194 * data/yacc.c (YYSTYPE): Likewise.
195 * src/output.c (prepare): Output tag_seen_flag.
196 * src/parse-gram.y (declaration, grammar_declaration):
197 Use 'union_seen' rather than 'typed' to determine whether
198 %union has been seen, since grammars can now be typed without
199 %union.
200 (symbol_declaration, type.opt, symbol_def):
201 Keep track of whether a tag has been seen.
202 * src/reader.c (union_seen, tag_seen): New vars.
203 (typed): remove.
204 * src/reader.h (union_seen, tag_seen, typed): Likewise.
205 * src/scan-code.l (untyped_var_seen): New variable.
206 (handle_action_dollar): Adjust to above changes.
207 (handle_action_dollar, handle_action_at):
208 Improve overflow checking for outlandish numbers.
209 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
210 avoid new diagnostics generated by above changes.
211 * tests/regression.at (YYSTYPE typedef): Add test to check
212 for type tags without %union.
213
214 * src/symlist.c (symbol_list_length): Return int, not unsigned
215 int, since callers expect int. This may need to get revisited
216 once we have proper integer overflow checking.
217
218 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
219 object is now static.
220
221 * src/getargs.c (flags_argmatch): Return void, not int,
222 to pacify ./configure --enable-gcc-warnings.
223
224 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
225 since last_string is already defined to FLEX_PREFIX (last_string).
226
7b42569e
AD
2272006-07-09 Akim Demaille <akim@lrde.epita.fr>
228
229 Implement --warnings/-W.
230 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
231 replaced by...
232 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
233 Adjust callers.
234 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
235 (warnings_args, warnings_types): New.
236 (getargs, short_options, long_options): Accept -W/--warnings.
237 Sort the options by alphabetical order, upper case letter right
238 before its lower case.
239
3b452f4e
JD
2402006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
241
242 Change %merge result type clash warnings to errors. Discussed at
243 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
244 * src/reader.c (record_merge_function_type): Use complain_at.
245 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
246 declared later): Update test case results.
247
b8a41559
AD
2482006-07-09 Akim Demaille <akim@lrde.epita.fr>
249
250 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
251 to be in alphabetical order.
252 (trace_args): Spelling fixes.
253
cd9e1ba2
PE
2542006-07-09 Paul Eggert <eggert@cs.ucla.edu>
255
256 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
257 so they don't collide with user-defined macros.
258 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
259 this was never guaranteed, and now that we're using gnulib stdint,
260 which defines int_fast16_t to long int, the problem is exposed.
261
cb48f191
PE
2622006-07-08 Paul Eggert <eggert@cs.ucla.edu>
263
b8445a15
PE
264 * data/c.m4 (b4_basename): Simplify a bit, since we don't
265 need the full POSIX semantics (and weren't implementing them
266 anyway).
267
cb48f191
PE
268 Adjust to Autoconf 2.60 and today's gnulib.
269 * bootstrap (gnulib_modules): Add stdint.
270 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
271 no longer copies it.
272 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
273 since stdint needs the former and wcwidth (which is now required
274 by mbswidth) needs the latter.
275 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
276 work around a compatibility glitch between gettext 0.14.6 and
277 Autoconf 2.60.
278 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
279 Do not check for uintptr_t, since new stdint module does the right
280 thing.
281 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
282 Add stdint.h, stdint_.h, wcwidth.h.
283 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
284 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
285 stdint.m4, wchar_t.m4, wcwidth.m4.
286 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
287 usual order for ../lib/*.h files.
288 (file_name_split): Use last_component, not base_name, to adjust
289 to gnulib changes.
290 * src/parse-gram.h: Include <strverscmp.h> in the usual order
291 for ../lib/*.h files.
292 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
293 Define unconditionally, since we now assume the stdint module.
294 * src/scan-skel.l: Include <dirname.h>.
295 (BASE_QPUTS): Use last_component, not base_name.
296 * src/system.h: Include <unlocked-io.h> in the usual order
297 for ../lib/*.h files. Include <stdint.h> unconditionally,
298 since we now use the stdint module.
299 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
300 HAVE_UINTPTR_T, since we now use the stdint module.
301 (base_name): Remove decl, since files now include <dirname.h>
302 to get the decl.
303
cd48d21d
AD
3042006-07-08 Akim Demaille <akim@lrde.epita.fr>
305
306 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
307 New, default to 1.
308 * data/yacc.c, data/glr.c, data/location.cc: Use them.
309 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
310 default.
311 * tests/calc.at: Adjust.
312
8ec0a172
AD
3132006-07-08 Akim Demaille <akim@lrde.epita.fr>
314
b8445a15 315 * data/c.m4 (b4_basename): New.
8ec0a172
AD
316 (b4_syncline): Also output the location of its invocation (from
317 the skeleton).
318 (b4_user_action, b4_define_user_action, b4_user_actions)
319 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
320 (b4_user_stype): New.
321 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
322
4a678af8
JD
3232006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
324
325 In the grammar file, the first column is 1 not 0 on the first line as
326 on every other line.
327 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
328 * tests/input.at (Torturing the Scanner): Update output.
329
330 * src/scan-gram.l (scanner_cursor): Declare it static.
331
dd60572a
JD
3322006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
333
334 In warnings, say "previous declaration" rather than "first
335 declaration".
336 * src/symtab.c (redeclaration): Do that here.
337 * src/reader.c (record_merge_function_type): In the case of a result
338 type clash, report the previous declaration rather than the very first
339 one in the grammar file.
340 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
341 declared later): Add a third declaration to check this behavior.
342 * tests/input.at (Incompatible Aliases): Update output.
343
2073e1b6
AD
3442006-06-27 Akim Demaille <akim@epita.fr>
345
346 * doc/Doxyfile.in: New.
347 * doc/Makefile.am: Use it.
348 * src/lalr.h, src/symtab.h: Initial doxygenation.
349
8ee5b538
JD
3502006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
351
352 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
353 declared after the %merge. This continues the effort of the previous
354 patch.
8ee5b538
JD
355 * src/reader.c (get_merge_function): Don't set the merger type yet.
356 (record_merge_function_type): New function for setting the merger type
357 and checking for clashes.
358 (grammar_current_rule_merge_set): Set the location of the %merge for
359 the current rule.
360 (packgram): Invoke record_merge_function_type for each rule now that
361 all symbol type declarations have been parsed.
362 * src/reader.h (merger_list.type_declaration_location): New member
363 storing the location of the first %merge from which the type for this
364 merging function was derived.
365 * src/symlist.h (symbol_list.merger_declaration_location): New member
366 storing the location of a rule's %merge, if any.
367 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
368 declared later): New test to catch the error fixed by the above patch.
369
ffa4ba3a
JD
3702006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
371
372 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
373 declarations appear after the rules. Discussed at
374 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
375 and
376 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
377 Don't mistake the type of $$ in a midrule to be that of its parent
378 rule's $$.
ffa4ba3a
JD
379 * src/reader.c (grammar_current_rule_end): Don't invoke
380 grammar_rule_check yet since not all symbol declarations may have been
381 parsed yet.
382 (grammar_midrule_action): Likewise.
383 Don't record whether the midrule's $$ has been used yet since actions
384 haven't been translated yet.
385 Record the midrule's parent rule and its RHS index within the parent
386 rule.
387 (grammar_current_rule_action_append): Don't translate the action yet
388 since not all symbol declarations may have been parsed yet and, thus,
389 warnings about types for $$, $n, @$, and @n can't be reported yet.
390 (packgram): Translate the action and invoke grammar_rule_check now that
391 all symbol declarations have been parsed.
392 * src/scan-code.l (handle_action_dollar): Now that this is invoked
393 after parsing the entire grammar file, the symbol list here in the case
394 of a midrule is actually the midrule's empty RHS, so reference its
395 parent rule's RHS where necessary.
396 On the other hand, now that you can already know it's a midrule, you
397 aren't forced to think $$ has the same type as its parent rule's $$.
398 (handle_action_at): In the case of a midrule, reference the parent rule
399 where necessary.
400 * src/symlist.c (symbol_list_new): Initialize new midrule-related
401 members.
402 (symbol_list_length): Now that this is invoked after all rules have
403 been parsed, a NULL symbol (rather than a NULL symbol list node)
404 terminates a rule. symbol_list_print already does this correctly.
405 * src/symlist.h (symbol_list.midrule_parent_rule,
406 symbol_list.midrule_parent_rhs_index): New members so that midrules can
407 remember their relationships with their parents.
408 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
409 fixed by the above patch.
410 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
411 implementing...
412 (Unused values): ... this old test case and...
413 (Unused values before symbol declarations): ... this new test case.
414 This one is the same as `Unused values' except that all symbol
415 declarations appear after the rules in order to catch the rest of the
416 errors fixed by the above patch.
417
e256e17f
JD
4182006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
419
300a1930
JD
420 More cleanup.
421 * src/reader.c (current_rule): Declare it static since it's no longer
422 used outside this file.
423 (grammar_current_rule_action_append): Remove redundant arguments from
424 translate_rule_action invocation.
425 * src/reader.h (current_rule): Remove this unused extern.
426 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
427 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 428
381ecb06
JD
4292006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
430
431 Clean up yesterday's patch.
432 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
433 to...
434 * src/reader.c (grammar_current_rule_action_append): ... here for
435 consistency with grammar_current_rule_symbol_append.
436 * tests/regression.at (Braced code in declaration in rules section):
437 Make yyerror and yylex static as usual.
438
4210cd0b
JD
4392006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
440
441 Fix bug that mistakes braced code in a declaration in the rules section
442 to be a rule action. Mentioned at
443 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
444 * src/scan-gram.l: Move midrule action detection from the start of the
445 scanning of any braced code to...
446 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
447 action. For readability, use $2 and @2 rather than the equivalent
448 global variables.
449 * tests/regression.at (Braced code in declaration in rules section):
450 New test to catch the error fixed by the above patch.
451
452 Work on code readability some.
453 * src/scan-code.l (current_rule): Get rid of this misleading and
454 redundant declaration: it's actually extern'ed in reader.h.
455 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
456 translate_action): Add a rule argument and use it instead of the global
457 current_rule.
458 (translate_rule_action): This already receives current_rule through an
459 argument, so pass it on to translate_action instead of assigning
460 current_rule to current_rule.
461 (translate_symbol_action, translate_code): Pass rule = NULL to
462 translate_action.
463
34f98f46
JD
4642006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
465
466 Rename %before-definitions to %start-header and %after-definitions to
467 %end-header. Don't use these declarations to separate pre-prologue
468 blocks from post-prologue blocks. Add new order-independent
469 declarations %before-header and %after-header as alternatives to the
470 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
471 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
472 * NEWS (2.3+): Update for these changes.
473 * data/glr.c (b4_before_definitions): Update to...
474 (b4_start_header): ... this.
475 (b4_after_definitions): Update to...
476 (b4_end_header): ... this.
477 * data/glr.cc: Likewise.
478 * data/lalr1.cc: Likewise.
479 * data/yacc.c: Likewise.
480 * doc/bison.texinfo (The prologue): Update names, and replace remaining
481 prologue blocks with %*-header declarations.
482 (Calc++ Parser): Likewise.
483 (Bison Declaration Summary): Update names.
484 (Bison Symbols): Update description.
485 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
486 (PERCENT_END_HEADER): ... this.
487 (PERCENT_BEFORE_DEFINITIONS): Update to...
488 (PERCENT_START_HEADER): ... this.
489 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
490 (declaration): Update token names and m4 macro names.
491 When parsing %end-header and %start-header, invoke translate_code
492 before muscle_code_grow, and no longer set global booleans to remember
493 whether these declarations have been seen.
494 Parse new %after-header and %before-header.
495 * src/reader.c (before_definitions, after_definitions): Remove.
496 (prologue_augment): Accept a new bool argument to specify whether to
497 augment the pre-prologue or post-prologue.
498 * src/reader.h (before_definitions, after_definitions): Remove these
499 extern's.
500 (prologue_augment): Add new bool argument.
501 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
502 (PERCENT_END_HEADER): ... this.
503 (PERCENT_BEFORE_DEFINITIONS): Update to...
504 (PERCENT_START_HEADER): ... this.
505 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
506 * tests/actions.at (Printers and Destructors): Update names.
507
31b2b07e
JD
5082006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
509
510 Add comparison operators for C++ location classes. Discussed at
511 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
512 * data/c++.m4 (b4_define_location_comparison): New boolean %define
513 declaration indicating whether filename_type has an operator==. If
514 filename_type is `std::string', it defaults to `1', `0' otherwise.
515 * data/location.cc: Iff b4_define_location_comparison is `1', add
516 operator== and operator!= for class position and for class location.
517
518 Some minor fixes.
519 * src/scan-action.l: Remove unused file.
520 * src/symtab.c (symbol_printer_set): Use printer_location not
521 destructor_location.
522 * src/symtab.h (struct symbol): Replace incorrect source comment for
523 printer members.
524 * tests/input.at (Incompatible Aliases): Update output with correct
525 printer location.
526
9bc0dd67
JD
5272006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
528
529 Don't put the pre-prologue in the header file. For the yacc.c code
530 file and the glr.c header and code files, move the pre-prologue before
531 the token definitions. Add new %before-definitions and
532 %after-definitions to declare code that will go in both the header file
533 and code file. Discussed at
534 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
535 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
536 and
537 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
538 * NEWS (2.3+): Describe these changes.
539 * data/glr.c (b4_pre_prologue): Move from within to before...
540 (b4_shared_declarations): ... this.
541 Add new b4_before_definitions before b4_token_enums.
542 Add new b4_after_definitions at the end.
543 * data/glr.cc (b4_pre_prologue): Replace with...
544 (b4_before_definitions): ... this in the header file.
545 (b4_after_definitions): New near the end of the header file.
546 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
547 code file right before including the header file.
548 (b4_before_definitions): New in the previous position of
549 b4_pre_prologue in the header file.
550 (b4_after_definitions): New near the end of the header file.
551 * data/yacc.c: Clean up some m4 quoting especially in the header file.
552 (b4_token_enums_defines): In the code file, move to right before
553 YYSTYPE for consistency with the header file.
554 (b4_before_definitions): New right before b4_token_enums_defines in
555 both the header and code file.
556 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
557 header and code file.
558 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
559 of prologues for %union dependencies.
560 (Bison Declaration Summary): In %defines description, mention the
561 effect of %before-definitions and %after-definitions on the header
562 file.
563 (Calc++ Parser): Forward declare driver in a %before-definitions rather
564 than in the pre-prologue so that make check succeeds.
565 (Bison Symbols): Add entries for %before-definitions and
566 %after-definitions.
567 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
568 %before-definitions.
569 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
570 (declaration): Parse those declarations and append to
571 b4_before_definitions and b4_after_definitions, respectively.
572 * src/reader.c (before_definitions, after_definitions): New bools to
573 track whether those declarations have been seen.
574 (prologue_augment): Add to the post-prologue if %union,
575 %before-definitions, or %after-definitions has been seen.
576 * src/reader.h (before_definitions, after_definitions): New extern's.
577 * src/scan-gram.l: Scan the new declarations.
578 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
579 prologue block in a %before-definitions or a %after-definitions based
580 on whether the %union is declared.
581 * tests/regression.at (Early token definitions with --yacc, Early token
582 definitions without --yacc): Move tests for token definitions into the
583 post-prologue since token names are no longer defined in the
584 pre-prologue.
585
203b9274
AD
5862006-06-20 Akim Demaille <akim@epita.fr>
587
588 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
589 (symbol_get): Use it.
590 * src/parse-gram.y: Use it.
591
a7ee59cf
JD
5922006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
593
594 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
595 build succeeds when configured with --enable-gcc-warnings.
596
5a2baae7
PE
5972006-06-19 Paul Eggert <eggert@cs.ucla.edu>
598
33ad1a9c
PE
599 * src/parse-gram.y (char_name): New function.
600 (CHAR, STRING, string_content): For %printer, properly escape.
601 (ID): Prefer fputs to fprintf.
602 (id): Reindent to be consistent with other rules.
603 Properly quote char.
604
5a2baae7
PE
605 The Translation Project changed its way of publishing translations
606 to maintainers. I haven't received any responses to my request
607 for supporting the old way, or for documenting the new way. I
608 have modified 'bootstrap' to use screen scraping
609 (in this case, HTML scraping). This is unreliable and inelegant,
610 but I don't see any better way. Yuck.
611 * bootstrap (TP_URL, WGET_COMMAND): New vars.
612 (get_translations): New function, which uses HTML scraping to
613 deduce locations of latest translations.
614 Use this function to grab both bison and bison-runtime .po files.
615 Don't bother priming the pump for the runtime-po domain any more,
616 as it's now translated better than bison is.
617
58d7a1a1
AD
6182006-06-19 Akim Demaille <akim@epita.fr>
619
620 * src/scan-gram.l: No longer "parse" things after `%union' until
621 `{'. Rather, return a single "%union" token.
622 No longer make symbols: return strings, and leave the conversion
623 to symbols to the parser.
624 (SC_PRE_CODE, token_type): Remove.
625 * src/parse-gram.y (%union): New field `character'.
626 Sort tokens.
627 (CHAR): New token.
628 (ID, ID_COLON): Now that the scanner no longer makes them
629 identifiers, adjust all uses to invoke symbol_get.
630 (id_colon): New, wraps the conversion from string to symbol.
631 (%union): Accept a possible union_name.
632 (symbol): Now can be a char.
633 * data/c.m4 (b4_union_name): Leave a default value.
634 * data/glr.c, data/yacc.c: Use it.
635
b931235e
JD
6362006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
637
638 For associating token numbers with token names for "yacc.c", don't use
639 #define statements unless `--yacc' is specified; always use enum
640 yytokentype. Most important discussions start at:
641 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
642 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
643 and
644 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
645 * NEWS (2.3+): Mention.
646 * data/c.m4 (b4_yacc_if): New.
647 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
648 token #define's.
649 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
650 on token name definitions.
651 * src/getargs.c (usage): Capitalize `Yacc' in English.
652 * src/output.c (prepare): Define b4_yacc_flag.
653 * tests/regression.at (Early token definitions): Test that tokens names
654 are defined before the pre-prologue not just before the post-prologue.
655 Remove this test case and copy to...
656 (Early token definitions with --yacc): ... this to test #define's.
657 (Early token definitions without --yacc): ... and this to test enums.
658
9e6e7ed2
PE
6592006-06-11 Paul Eggert <eggert@cs.ucla.edu>
660
661 * NEWS: Reword the post-2.3 change to not be so optimistic about
662 removing the old "look-ahead" spelling.
663 Update previous look-ahead/lookahead change reports.
664 * REFERENCES: look-ahead -> lookahead (since that's
665 what he actually wrote).
666 * doc/refcard.tex: look ahead -> lookahead,
667 look-ahead -> lookahead
668
742e4900
JD
6692006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
670
671 For consistency, use `lookahead' instead of `look-ahead' or
672 `look_ahead'. Discussed starting at
673 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
674 and then at
675 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
676 * NEWS: For the next release, note the change to `--report'.
677 * TODO, doc/bison.1: Update English.
678 * doc/bison.texinfo: Update English.
679 (Understanding Your Parser, Bison Options): Document as
680 `--report=lookahead' rather than `--report=look-ahead'.
681 * src/conflicts.c: Update English in comments.
682 (lookahead_set): Rename from look_ahead_set.
683 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
684 (resolve_sr_conflict): Rename local look_ahead_tokens to
685 lookahead_tokens, and update other uses.
686 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
687 count_rr_conflicts, conflicts_free): Update uses.
688 * src/getargs.c (report_args): Move "lookahead" before alternate
689 spellings.
690 (report_types): Update uses.
691 (usage): For `--report' usage description, state `lookahead' spelling
692 rather than `look-ahead'.
693 * src/getargs.h (report.report_lookahead_tokens): Rename from
694 report_look_ahead_tokens.
695 * src/lalr.c: Update English in comments.
696 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
697 (state_lookahead_tokens_count): Rename from
698 state_look_ahead_tokens_count.
699 Rename local n_look_ahead_tokens to n_lookahead_tokens.
700 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
701 Rename local n_look_ahead_tokens to n_lookahead_tokens.
702 Update other uses.
703 Update English in output.
704 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
705 * src/print.c: Update English in comments.
706 (lookahead_set): Rename from look_ahead_set.
707 (print_reduction): Rename argument lookahead_token from
708 look_ahead_token.
709 (print_core, state_default_rule, print_reductions, print_results):
710 Update uses.
711 * src/print_graph.c: Update English in comments.
712 (print_core): Update uses.
713 * src/state.c: Update English in comments.
714 (reductions_new): Update uses.
715 (state_rule_lookahead_tokens_print): Rename from
716 state_rule_look_ahead_tokens_print, and update other uses.
717 * src/state.h: Update English in comments.
718 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
719 (state_rule_lookahead_tokens_print): Rename from
720 state_rule_look_ahead_tokens_print.
721 * src/tables.c: Update English in comments.
722 (conflict_row, action_row): Update uses.
723 * tests/glr-regression.at
724 (Incorrect lookahead during deterministic GLR,
725 Incorrect lookahead during nondeterministic GLR): Rename
726 print_look_ahead to print_lookahead.
727 * tests/torture.at: Update English in comments.
728 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
729 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
730 (Many lookahead tokens): Update uses.
731 * data/glr.c: Update English in comments.
732 * lalr1.cc: Likewise.
733 * yacc.c: Likewise.
734 * src/conflicts.h: Likewise.
735 * src/lalr.h: Likewise.
736 * src/main.c: Likewise.
737 * src/output.c: Likewise.
738 * src/parse-gram.c: Likewise.
739 * src/tables.h: Likewise.
740 * tests/calc.at: Likewise.
741
3c40d0b5
JD
7422006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
743
744 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
745
5d278082
PE
7462006-06-07 Paul Eggert <eggert@cs.ucla.edu>
747
748 * TODO: Add request from Nelson H. F. Beebe to be able to install
749 Bison without installing the yacc script.
750
9e668899
JD
7512006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
752
753 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
754 and yytext if they're already #define'd.
755 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
756 * src/scan-code-c.c: ... here.
757 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
758 <config.h>.
759
0c8e079f
JD
7602006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
761
762 Get Bison to build again when configured with --enable-gcc-warnings.
763 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
764 missing #include's.
765 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
766 loc argument as it shadows a global.
767 * src/scan-gram.l: Remove stray comma that prevents boundary_set
768 invocation.
769
770 * src/.cvsignore: Add scan-code.c.
771
2346344a
AD
7722006-06-07 Akim Demaille <akim@epita.fr>
773
774 * src/scan-gram.l: Move the "add a trailing ; to actions" code
775 to...
776 * src/scan-code.l: here.
777 * tests/input.at (Torturing the Scanner): Fix another location
778 error.
779
4862bdfd
AD
7802006-06-07 Akim Demaille <akim@epita.fr>
781
782 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
783
e9071366
AD
7842006-06-06 Akim Demaille <akim@epita.fr>
785
786 Extract the parsing of user actions from the grammar scanner.
787 As a consequence, the relation between the grammar scanner and
788 parser is much simpler. We can also split "composite tokens" back
789 into simple tokens.
790 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
791 * src/scan-gram.l (add_column_width, adjust_location): Move to and
792 rename as...
793 * src/location.h, src/location.c (add_column_width)
794 (location_compute): these.
795 Fix the column count: the initial column is 0.
796 (location_print): Be robust to ending column being 0.
797 * src/location.h (boundary_set): New.
798 * src/main.c: Adjust to scanner_free being renamed as
799 gram_scanner_free.
800 * src/output.c: Include scan-code.h.
801 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
802 Use boundary_set.
803 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
804 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
805 which is now, again, a separate token.
806 Adjust all dependencies.
807 Whereever actions with $ and @ are used, use translate_code.
808 (action): Remove this nonterminal which is now useless.
809 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
810 (grammar_current_rule_action_append): Use translate_code.
811 (packgram): Bound check ruleno, itemno, and rule_length.
812 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
813 (last_string, last_braced_code_loc, max_left_semantic_context)
814 (scanner_initialize, scanner_free, scanner_last_string_free)
815 (gram_out, gram_lineno, YY_DECL_): Move to...
816 * src/scan-gram.h: this new file.
817 (YY_DECL): Rename as...
818 (GRAM_DECL): this.
819 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
820 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
821 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
822 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
823 Move these declarations, and...
824 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
825 these to...
826 * src/flex-scanner.h: this new file.
827 * src/scan-gram.l (rule_length, rule_length_overflow)
828 (increment_rule_length): Remove.
829 (last_braced_code_loc): Rename as...
830 (gram_last_braced_code_loc): this.
831 Adjust to the changes of the parser.
832 Move all the handling of $ and @ into...
833 * src/scan-code.l: here.
834 * src/scan-gram.l (handle_dollar, handle_at): Remove.
835 (handle_action_dollar, handle_action_at): Move to...
836 * src/scan-code.l: here.
837 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
838 scan-code.h, scan-code-c.c, scan-gram.h.
839 (EXTRA_bison_SOURCES): Add scan-code.l.
840 (BUILT_SOURCES): Add scan-code.c.
841 (yacc): Be robust to white spaces.
842
843 * tests/conflicts.at, tests/input.at, tests/reduce.at,
844 * tests/regression.at: Adjust the column numbers.
845 * tests/regression.at: Adjust the error message.
7891a7c4 846
184e42f0
JD
8472006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
848
849 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
850 Use Akim's wording from
851 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
852
7891a7c4
JD
8532006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
854
855 Between Bison releases, manually append `+' to the previous Bison
856 release number, and use that as a signal to automatically print the
857 ChangeLog's CVS Id keyword from --version. Discussed starting at
858 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
859 * ChangeLog: Add Id header.
860 * configure.ac (AC_INIT): Append `+' to `2.3'.
861 * src/.cvsignore: Add revision.c.
862 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
863 (BUILT_SOURCES): Add revision.c.
864 (revision.c): New target rule. This file defines a new global variable
865 named revision. It initializes it with either the Id from ChangeLog
866 or, if VERSION doesn't contain `+', with the empty string.
867 * src/getargs.c (version): Print the value of revision.
868 * src/revision.h: Extern revision.
869
4ad3ed84
PE
8702006-06-05 Paul Eggert <eggert@cs.ucla.edu>
871
872 * NEWS: Version 2.3.
873 * configure.ac (AC_INIT): Likewise.
874
02103984
PE
8752006-05-30 Paul Eggert <eggert@cs.ucla.edu>
876
877 * data/glr.c (YYRECOVERING): Define to be a function-like macro
878 with no arguments, not as an object-like macro. This is for
879 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
880 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
881 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
882 Document this.
883
2c08afa5
JD
8842006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
885
886 * src/getargs.c (usage): Back out yesterday's modification of the
887 --help output so that we don't have to wait for translation before
888 releasing 2.3.
889
6077da58
PE
8902006-05-29 Paul Eggert <eggert@cs.ucla.edu>
891
892 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
893 Problem reported by Akim Demaille.
894
2a26b6c2
JD
8952006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
896
897 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
898
aefef0d6
PE
8992006-05-26 Paul Eggert <eggert@cs.ucla.edu>
900
901 * data/yacc.c (yy_reduce_print): Omit trailing white space in
902 generated source code. Problem reported by Frans Englich in
903 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
904
fcd8e201
PE
9052006-05-22 Paul Eggert <eggert@cs.ucla.edu>
906
907 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
908 shell, not within 'make', so that 'make' by an ordinary builder
909 (using GNU make) does not worry about configuring gzip. This also
910 works around a bug reported independently by Keith Thompson and by
911 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
912 stderr rather than stdout, messing up the build logs.
913
7b5cdcbd
JD
9142006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
915
916 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
917 to make sure that YYID will never be unused. This fixes a 'make
918 maintainer-check' failure caused by the recent changes to the 'Trivial
919 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
920 not used.
921 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
922
5ad0a449
JD
9232006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
924
925 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
926 state before an empty RHS is always resolved here. Only the location
927 of that state is guaranteed to be resolved, and that's enough. This
928 fixes the remaining bug reported by Derek M. Jones in
929 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
930 * tests/glr-regression.at (Uninitialized location when reporting
931 ambiguity): Test the above case.
932 Also, the embedded comments in this test case claim it checks the case
933 of an empty RHS that has inherited the initial location. However, the
934 corresponding LHS was already resolved, so yyresolveLocations didn't
935 actually have reason to modify it. Fix this by forcing
936 nondeterministic operation at the beginning of the parse.
937
50cce58e
PE
9382006-05-20 Paul Eggert <eggert@cs.ucla.edu>
939
940 * data/c.m4 (b4_yy_symbol_print_generate):
941 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
942 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
943 of the bugs reported today by Derek M Jones in
944 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
945 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
946 defined to be a type name without parens or brackets.
947 (Location Type): Similarly for YYLTYPE.
948 * tests/regression.at (Trivial grammars): Put in a test for this
949 bug that will be caught by 'make maintainer-check' (though not,
950 alas, by 'make check' unless your compiler is picky).
951
ab8d9dc5
PE
9522006-05-19 Paul Eggert <eggert@cs.ucla.edu>
953
0d2c8934 954 * NEWS: Version 2.2.
ab8d9dc5
PE
955 * configure.ac (AC_INIT): Likewise.
956
9138c575
JD
9572006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
958
959 * data/glr.c (yyreportTree): Make room in yystates for the state
960 preceding the RHS. This fixes the segmentation fault reported by Derek
961 M. Jones in
962 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
963 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
964 to the user. Reported for yyreportTree by Derek M. Jones later in the
965 same thread.
966 * THANKS: Add Derek M. Jones.
967 Update my email address.
968 Fix typo in Steve Murphy's name.
969
276f48df
PE
9702006-05-14 Paul Eggert <eggert@cs.ucla.edu>
971
d6645148
PE
972 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
973 checking against YYLAST that caused the parser to miss a potential
974 alternative in its diagnostic.
975 Problem reported by Maria Jose Moron Fernandez in
976 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
977 * data/lalr1.cc (yysyntax_error_): Likewise.
978 * data/yacc.c (yysyntax_error): Likewise.
979 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
980 tokens, in case we run into an older C compiler.
981 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
982 Use them to check for the off-by-one error fixed above.
983
276f48df
PE
984 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
985 YYSIZE_T, not size_t.
986 * tests/regression.at (Trivial grammars): New test, to catch
987 the error fixed by the above patch.
988
cd8b5791
AD
9892006-05-14 Akim Demaille <akim@lrde.epita.fr>
990
991 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
992 scheme.
993 Reported by Steve Murphy.
994
34376418
AD
9952006-05-14 Akim Demaille <akim@lrde.epita.fr>
996
997 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
998 * data/glr.cc: b4_location_flag is now b4_locations_flag.
999
327afc7c
AD
10002006-05-14 Akim Demaille <akim@lrde.epita.fr>
1001
1002 Implement --trace=m4.
1003 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
1004 * src/output.c (output_skeleton): When set, pass -dV to m4.
1005
1006 Factor the handling of flags in m4.
1007 * src/output.c (prepare): Rename the muscle names debug, defines,
1008 error_verbose to debug_flag, defines_flag, error_verbose_flag.
1009 * data/c.m4: Adjust.
1010 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
1011 Use b4_define_flag_if to define other b4_FLAG_if macros.
1012 (b4_location_if): As a consequence, rename as...
1013 (b4_locations_if): this, for consistency.
1014 Adjust all the skeletons.
1015
ba9ecd19
AD
10162006-05-14 Akim Demaille <akim@lrde.epita.fr>
1017
1018 * etc/bench.pm: Shorten bench names.
1019
4e83ea15
AD
10202006-05-14 Akim Demaille <akim@lrde.epita.fr>
1021
1022 * src/output.h, src/output.c (error_verbose): Move to...
1023 * src/getargs.h, src/getargs.c: here.
1024 Sort the flags.
1025 Adjust dependencies.
1026
6e93d810
PE
10272006-05-13 Paul Eggert <eggert@cs.ucla.edu>
1028
1029 * data/c.m4 (b4_copyright): Put the special exception for Bison
1030 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
1031 uses changed. Suggested by Akim Demaille. Also, wrap the
1032 copyright notice, in case it is longer than 80 columns. Replace
1033 comma by newline after title.
6e93d810 1034
eaea13f5
PE
10352006-05-11 Paul Eggert <eggert@cs.ucla.edu>
1036
1037 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
1038 incompatibility, not a bug. Mention that it wasn't fixed as of
1039 flex 2.5.33.
1040
3cf084ec
AD
10412006-05-11 Akim Demaille <akim@lrde.epita.fr>
1042
1043 * examples/extexi: Enforce the precedence of concatenation over
1044 >>.
0a9f1c7d 1045 Reported by Tommy Nordgren.
3cf084ec 1046
32c96bd7
AD
10472006-05-11 Akim Demaille <akim@lrde.epita.fr>
1048
1049 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
1050 with the member "token".
f94705b2 1051 Reported by Martin Nylin.
32c96bd7 1052
eaea13f5
PE
10532006-05-08 Paul Eggert <eggert@cs.ucla.edu>
1054
1055 * data/glr.c: Switch to Bison 2.2 special-exception language in
1056 the copyright notice. Use more-regular format for titles and
1057 copyright notices.
1058 * data/glr.cc: Likewise.
1059 * data/location.cc: Likewise.
1060 * data/yacc.cc: Likewise.
1061 * doc/bison.texinfo (Conditions): Document this.
1062 * NEWS: likewise. Upgrade version to 2.2.
1063
6e2d1146
AD
10642006-04-27 Akim Demaille <akim@lrde.epita.fr>
1065
1066 * data/glr.cc: Remove dead code.
1067
47671055
PE
10682006-04-25 Paul Eggert <eggert@cs.ucla.edu>
1069
1070 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
1071 that variable and the line breaks the bootstrap. Problem reported
1072 by Juan M. Guerrero.
1073
ed2e6384
AD
10742006-04-24 Akim Demaille <akim@lrde.epita.fr>
1075
1076 * doc/bison.texinfo (Multiple start-symbols): New.
1077
3cedc2dc
AD
10782006-04-24 Akim Demaille <akim@lrde.epita.fr>
1079
1080 * etc/README, etc/bench.pl: New.
1081
b2ddc3f3
AD
10822006-04-03 Akim Demaille <akim@lrde.epita.fr>
1083
1084 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
1085 rule.
1086 Reported by Mickael Labau.
1087 * tests/input.at (Torturing the Scanner): Test it.
1088
91e3ac9a
PE
10892006-03-16 Paul Eggert <eggert@cs.ucla.edu>
1090
1091 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
1092 Problem reported by Bob Rossi.
1093
10942006-03-13 Paul Eggert <eggert@cs.ucla.edu>
1095
1096 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
1097 and didn't really work.
1098 For the index, use @ifnotinfo, not @iftex.
1099 Minor cleanups of spacing and terminology.
1100
5cf61e93
AD
11012006-03-12 Akim Demaille <akim@lrde.epita.fr>
1102
1103 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
1104 of AT_NAME_PREFIX when %name-prefix is not used.
1105
aa08666d
AD
11062006-03-12 Akim Demaille <akim@lrde.epita.fr>
1107
1108 Apply --prefix to C++ skeletons too: they change the namespace.
1109 The test suite already exercize these cases.
1110 * data/c++.m4 (b4_namespace): New.
1111 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
1112 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
1113 * data/yacc.c, data/glr.c: Remove a useless `[]'.
1114 * doc/bison.texinfo: Document it.
1115 (Option Cross Key): Use @multitable in all formats. It looks
1116 nicer, even in TeX outputs.
1117 (Rules): Use the same code whatever the output type is.
1118 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
1119 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
1120 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 1121
45567173
AD
11222006-03-10 Akim Demaille <akim@lrde.epita.fr>
1123
1124 * TODO: Remove dead items.
1125
e9d8f881 11262006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
1127
1128 * doc/FAQ: Remove, merged into...
1129 * doc/bison.texinfo (FAQ): this.
1130 * doc/Makefile.am (EXTRA_DIST): Adjust.
1131
c095d689
AD
11322006-03-10 Akim Demaille <akim@lrde.epita.fr>
1133
1134 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
1135 even if empty.
1136 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
1137 * doc/bison.texinfo (Calc++ Scanner): Use it.
1138
6e0f8287
PE
11392006-03-09 Paul Eggert <eggert@cs.ucla.edu>
1140
1141 Fix two nits reported by twlevo, plus one more that I discovered.
1142
1143 * src/assoc.h (assoc_to_string): Give a name to the arg, as
1144 this is the usual Bison style.
1145 * src/location.h (location_print): Likewise.
1146
1147 * src/reader.h (token_name): Likewise.
1148
d6b771c3
PE
11492006-03-08 Paul Eggert <eggert@cs.ucla.edu>
1150
1151 Fix some nits reported by twlevo.
1152 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
1153 and "POSIX". Use more-modern syntax for URLs. Mention C++
1154 and ask for Java. Don't hardwire OS version numbers. Add
1155 copyright notice.
1156 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
1157 * src/conflicts.c (solved_conflicts_obstack): Now static.
1158
1e137b71
JD
11592006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
1160
1161 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
1162 page. Say "you can use it" not "you may use it" as on the web page;
1163 we're describing capabilities not granting permission.
1164
73f2e47e
PE
11652006-03-06 Paul Eggert <eggert@cs.ucla.edu>
1166
6d05403d
PE
1167 * data/glr.c (yyresolveLocations): Rename local variables to avoid
1168 shadowing warnings. Use usual patter for iterating through RHS.
1169 * tests/glr-regression.at
1170 (Uninitialized location when reporting ambiguity):
1171 Modify yylex so that it uses its argument, rather than trying
1172 to rely on ARGSUSED (which doesn't work for gcc with warnings).
1173 const char -> char const.
1174
73f2e47e
PE
1175 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
1176 Don't use tabs inside commands; it messes up 'ps'.
1177 Problem reported by twlevo.
1178
8710fc41
JD
11792006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
1180
1181 * tests/glr-regression.at (Uninitialized location when reporting
1182 ambiguity): New test case.
1183 * data/glr.c (yyresolveLocations): New function, which uses
1184 YYLLOC_DEFAULT.
1185 (yyresolveValue): Invoke yyresolveLocations before reporting an
1186 ambiguity.
1187 * doc/bison.texinfo (Default Action for Locations): Note
1188 YYLLOC_DEFAULT's usage for ambiguity locations.
1189 (GLR Semantic Actions): Cross-reference those notes.
1190
ae952af2
JD
11912006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
1192
1193 * tests/glr-regression.at (Leaked semantic values when reporting
1194 ambiguity): Remove unnecessary union and type declarations.
1195 (Leaked lookahead after nondeterministic parse syntax error): New test
1196 case.
1197 * data/glr.c (yyparse): Check for zero stacks remaining before
1198 attempting to shift the lookahead so that you don't lose it.
1199
35ee866a
JD
12002006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1201
1202 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
1203 * tests/glr-regression.at (Leaked semantic values when reporting
1204 ambiguity): New test case.
1205 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
1206 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
1207 now unnecessary yystackp parameter.
1208 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
1209 destructors can be called.
1210
1211 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
1212 in existing testcases.
1213
520181ab
JD
12142006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1215
1216 Don't leak semantic values for parent RHS when a user action cuts the
1217 parser, and clean up related code a bit.
1218 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
1219 cuts parse): Rename to...
1220 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
1221 for leaked parent RHS values.
1222 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
1223 between an unresolved state (non-empty chain of semantic options) and
1224 an incomplete one (signaled by an empty chain).
ae952af2 1225 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
1226 successfully or unsuccessfully resolved yyGLRState to...
1227 (yyresolveValue): ... here so that yyresolveValue always leaves a
1228 yyGLRState with consistent data and thus is easier to understand.
1229 Remove the yyvalp and yylocp parameters since they are always just
1230 taken from the yys parameter. When reporting a discarded merged value
1231 in debugging output, note that it is incompletely merged. Document the
1232 interface.
1233 (yyresolveAction): If resolving any of the RHS states fails, destroy
1234 them all rather than leaking them. Thus, as long as user actions are
1235 written to clean up the RHS correctly, yyresolveAction always cleans up
1236 the RHS of a semantic option. Document the interface.
1237
18d9185c
PE
12382006-02-27 Paul Eggert <eggert@cs.ucla.edu>
1239
1240 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
1241 led to a segmentation fault in GNU Pascal. Problem reported
1242 by Waldek Hebisch.
1243
841a7737
JD
12442006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
1245
1246 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
1247 mid-rule action inside a nonterminal symbol in order to declare a
1248 destructor for its semantic value.
1249
fc3f467f
PE
12502006-02-16 Paul Eggert <eggert@cs.ucla.edu>
1251
1252 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
1253 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
1254 __cplusplus && ! defined _STDLIB_H && !
1255 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
1256 defined free))]: Include <stdlib.h> rather than rolling our own
1257 declarations of malloc and free, to avoid problems with
1258 incompatible declarations (using 'throw') C++'s stdlib.h. This
1259 should fix Debian bug 340012
1260 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
1261 reported by Guillaume Melquiond.
1262
a3af26dd
PE
12632006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1264
4d7bc38c
PE
1265 * NEWS: Clarify symbols versus types in unused-value warnings.
1266
a3af26dd
PE
1267 * configure.ac (AC_INIT): Bump version number.
1268
4e26c69e
PE
12692006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1270
1271 * NEWS: Version 2.1a.
1272 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
1273 since C99 requires this.
1274
498e897c
PE
12752006-02-11 Paul Eggert <eggert@cs.ucla.edu>
1276
1277 * m4/c-working.m4: New file.
1278 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
1279
57bb17ca
PE
12802006-02-10 Paul Eggert <eggert@cs.ucla.edu>
1281
1282 * Makefile.maint: Merge from coreutils.
1283
0be105dc
PE
12842006-02-09 Paul Eggert <eggert@cs.ucla.edu>
1285
1286 More portability fixes for problems summarized by Nelson H. F. Beebe.
1287
1288 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
1289 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
1290 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
1291 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
1292 messes up because C++ code is compiled in 32-bit mode but linked
1293 in 64-bit mode.
1294
6fc0c024
PE
12952006-02-08 Paul Eggert <eggert@cs.ucla.edu>
1296
1297 More portability fixes for problems summarized by Nelson H. F. Beebe.
1298
7870f699
PE
1299 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
1300 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
1301
6fc0c024
PE
1302 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
1303 nodist_PROGRAMS, since we don't need to actually compile the
1304 example if we're just doing a plain 'make'. This avoids bothering
1305 the installer unnecessarily about problems due to weird C++
1306 compilers.
1307
fe6c2fde
PE
13082006-02-06 Paul Eggert <eggert@cs.ucla.edu>
1309
1310 More portability fixes for problems summarized by Nelson H. F. Beebe.
1311
1312 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
1313 than #include "...", and compile with -I'.'. The old method was
1314 not portable, according to Posix and the C standard, and it does
1315 not work with Sun C 5.7, where previous #line directives affect
1316 the working directory used in later #include "..." directives.
1317
927b425b
JMG
13182006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1319
1320 Various DJGGP specific issues in /djgpp
1321
d9735e9e
PE
13222006-02-02 Paul Eggert <eggert@cs.ucla.edu>
1323
1324 More portability fixes for problems summarized by Nelson H. F. Beebe.
1325
1326 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
1327 '#include <map>' works and that you can apply ++ to iterators.
1328
5a6755af
PE
13292006-02-01 Paul Eggert <eggert@cs.ucla.edu>
1330
67a0dc4f
PE
1331 Work around portability problems summarized by Nelson H. F. Beebe in
1332 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
1333
8c86f0ef
PE
1334 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
1335 that '#include <string>' works.
1336
de35dd59
PE
1337 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
1338 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
1339 "warning: sorry: semantics of inline function static data `const
1340 unsigned char translate_table[262]' are wrong (you'll wind up with
1341 multiple copies)".
1342
67a0dc4f
PE
1343 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
1344 or, xor to not_, and_, or_, and xor_, respectively. This works
1345 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
1346 random system header somewhere that includes the equivalent of
1347 <iso646.h>.
1348
5a6755af
PE
1349 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
1350 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 1351 Suite Version 2.0.
5a6755af 1352
3f001415
JD
13532006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
1354
1355 During deterministic GLR operation, user actions should be able to
1356 influence the parse by changing yychar. To make this easier to fix and
1357 to make glr.c easier to evolve in general, don't maintain yytoken in
1358 parallel with yychar; just compute yytoken when needed.
1359 * tests/glr-regression.at (Incorrect lookahead during deterministic
1360 GLR): Check that setting yychar in a user action has the intended
1361 effect.
1362 * data/glr.c (yyGLRStack): Remove yytokenp member.
1363 (yyclearin): Don't set *yytokenp.
1364 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
1365 yychar rather than *yytokenp to determine the current lookahead.
1366 Compute yytoken locally when needed.
1367 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
1368 point to.
1369
1370 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
1371 after `--report' documentation.
1372
e2a8c0f5
PE
13732006-01-30 Paul Eggert <eggert@cs.ucla.edu>
1374
1375 * src/parse-gram.y (grammar_declaration): Location of printer
1376 symbol is @1, not list->location. Bug reported by twlevo.
1377 * tests/input.at (Incompatible Aliases): Adjust to above change.
1378
6b702268
PE
13792006-01-29 Paul Eggert <eggert@cs.ucla.edu>
1380
27622431
PE
1381 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
1382 all the test at once. This makes the output easier to read in the
1383 normal case.
1384
6b702268
PE
1385 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
1386 got from <http://bro-ids.org/download.html>. The bug is that
1387 when two actions appeared in succession, the second one was
1388 scanned before the first one was added to the grammar rule
1389 as a midrule action. Bison then output the incorrect warning
1390 "parse.y:905.17-906.36: warning: unused value: $3".
1391 * src/parse-gram.y (BRACED_CODE, action): These are no longer
1392 associated with a value.
1393 (rhs): Don't invoke grammar_current_rule_action_append.
1394 (action): Invoke it here instead.
1395 * src/reader.c (grammar_midrule_action): Now extern.
1396 (grammar_current_rule_action_append): Don't invoke
1397 grammar_midrule_action; that is now the scanner's job.
1398 * src/reader.h (last_string, last_braced_code_loc):
1399 (grammar_midrule_action): New decls.
1400 * src/scan-gram.l (last_string): Now extern, sigh.
1401 (last_braced_code_loc): New extern variable.
1402 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
1403 rule already has an action.
1404 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
1405 * tests/input.at (AT_CHECK_UNUSED_VALUES):
1406 Add some tests to check that the above changes fixed the bug.
1407
d40ba6c2
PE
14082006-01-27 Paul Eggert <eggert@cs.ucla.edu>
1409
1410 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
1411 All used changed. Check whether the symbol has a destructor,
1412 not whether it is typed.
1413 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
1414 that the values are still reported as unused. All line numbers
1415 adjusted.
1416
401aace6
PE
14172006-01-23 Paul Eggert <eggert@cs.ucla.edu>
1418
1419 Work around a bug in bro 0.8, which underparenthesizes its
1420 definition of YYLLOC_DEFAULT.
1421 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
1422 their arguments.
1423 * data/lalr1.cc: Likewise.
1424 * data/yacc.cc: Likewise.
1425
06f01bc4
PE
14262006-01-22 Paul Eggert <eggert@cs.ucla.edu>
1427
401aace6
PE
1428 Work around a bug in Pike 7.0, and give the Pike folks a
1429 better way to override the usual int widths.
1430 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
1431 user can override the types.
1432 (short): #undef, to work around a bug in Pike 7.0.
1433 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
1434 (union yyalloc.yyss): Use yytype_int16 rather than short.
1435 All uses changed.
1436 (yysigned_char): Remove.
1437 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
1438 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
1439 * tests/regression.at (Web2c Actions): Adjust to above changes.
1440
1441 * src/reader.c (check_and_convert_grammar): New function.
1442 (reader): Close the input file even if something went wrong during
1443 parsing. Minor file descriptor leak reported by twlevo.
1444
06f01bc4
PE
1445 * src/assoc.c (assoc_to_string): Use a default: abort (); case
1446 to pacify gcc -Wswitch-default.
1447 * src/scan-gram.l (adjust_location): Use a default: break; case
1448 to pacify gcc -Wswitch-default.
1449 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
1450 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
1451 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
1452 Move these decls to scan-skel.l, since they don't need to be
1453 visible elsewhere.
1454 * src/scan-skel.l: Accept the above decls.
1455 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
1456 is used.
1457
02650b7f
PE
14582006-01-21 Paul Eggert <eggert@cs.ucla.edu>
1459
1460 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
1461 since we don't want to insist on a version number at the start
1462 of the changelog every time.
1463 * Makefile.maint: Sync from coreutils a bit better.
1464 (sc_trailing_blank): Renamed from sc_trailing_space.
1465 All uses changed.
1466 (sc_no_if_have_config_h, sc_require_config_h):
1467 (sc_prohibit_assert_without_use): New rules.
1468 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
1469 (sc_dd_max_sym_length): Fix leading spaces in rule.
1470 (sc_system_h_headers): Prefix with @.
1471 (sc_useless_cpp_parens, m4-check): Output line numbers.
1472 (changelog-check): Allow version only in head.
1473 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
1474 satisfy new Makefile.maint rule.
1475 * data/glr.c: Likewise.
1476 * data/glr.cc: Likewise.
1477 * data/lalr1.cc: Likewise.
1478 * data/yacc.c: Likewise.
1479 * lib/ebitsetv.c: Likewise.
1480 * lib/lbitset.c: Likewise.
1481 * lib/subpipe.c: Likewise.
1482 * lib/timevar.c: Likewise.
1483 * src/system.h: Likewise.
1484 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
1485 * djgpp/Makefile.maint: Add copyright notice.
1486 * djgpp/README.in: Likewise.
1487 * djgpp/config.bat: Likewise.
1488 * djgpp/config.site: Likewise.
1489 * djgpp/config_h.sed: Likewise.
1490 * djgpp/djunpack.bat: Likewise.
1491 * djgpp/config.sed: Fix copyright notice to match standard format.
1492 * djgpp/subpipe.h: Likewise.
1493 * lib/bitsetv-print.c: Likewise.
1494 * lib/bitsetv.c: Likewise.
1495 * lib/subpipe.h: Likewise.
1496 * lib/timevar.c: Likewise.
1497 * lib/timevar.h: Likewise.
1498 * djgpp/subpipe.c: Use standard recipe for config.h.
1499 * lib/abitset.c: Likewise.
1500 * lib/bitset.c: Likewise.
1501 * lib/bitset_stats.c: Likewise.
1502 * lib/bitsetv-print.c: Likewise.
1503 * lib/bitsetv.c: Likewise.
1504 * lib/ebitsetv.c: Likewise.
1505 * lib/get-errno.c: Likewise.
1506 * lib/lbitset.c: Likewise.
1507 * lib/subpipe.c: Likewise.
1508 * lib/timevar.c: Likewise.
1509 * lib/vbitset.c: Likewise.
1510 * tests/local.at: Likewise.
1511 * src/scan-gram.l: Don't include verify.h, since system.h does
1512 that for us.
1513 * .x-sc_require_config_h: New file.
1514 * .x-sc_unmarked_diagnostics: New file.
1515
287c78f6
PE
15162006-01-20 Paul Eggert <eggert@cs.ucla.edu>
1517
287c78f6
PE
1518 Be a bit more systematic about using 'abort'.
1519 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
1520 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
1521 Put 'default: abort ();' before some other case, to satisfy older
1522 pedantic compilers.
1523 * lib/bitset_stats.c (bitset_stats_init): Likewise.
1524 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
1525 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
1526 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
1527 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
1528 (get_decision_str, get_orientation_str, get_node_alignment_str):
1529 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
1530 (get_linestyle_str, get_arrowstyle_str): Likewise.
1531 * src/conflicts.c (resolve_sr_conflict):
1532 Use a default case rather than one for the one remaining enum
1533 value, to catch invalid enum values as well.
1534 * src/lalr.c (set_goto_map, map_goto):
1535 Prefer "assert (FOO);" to "if (!FOO) abort ();".
1536 * src/nullable.c (nullable_compute, token_definitions_output):
1537 Likewise.
1538 * src/reader.c (packgram, reader): Likewise.
1539 * src/state.c (transitions_to, state_new, state_reduction_find):
1540 Likewise.
1541 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
1542 (symbol_pack): Likewise.
1543 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
1544 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
1545 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
1546 * src/system.h: Don't include <assert.h>.
1547 (assert): New macro.
1548
1549 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
1550 (Destructor Decl, Parser Function, Pure Calling):
1551 Describe rules for braces inside C code more carefully.
287c78f6 1552
c66dfadd
PE
15532006-01-19 Paul Eggert <eggert@cs.ucla.edu>
1554
c21493b8
PE
1555 Fix some porting glitches found by Nelson H. F. Beebe.
1556 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
1557 compilers that don't understand that abort () does not return.
1558 * src/state.c (transitions_to): Likewise.
1559 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
1560 that '#include <cstdlib>' works.
1561 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
1562 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
1563 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
1564 for the benefit of some pre-C99 compilers.
1565
b6e3facf
PE
1566 * bootstrap: Undo changes to gnulib files that autoreconf made.
1567
c66dfadd
PE
1568 Minor fixups to get 'make maintainer-check' to work.
1569 * configure.ac: Don't use -Wnested-externs, as it's incompatible
1570 with the new verify.h implementation.
1571 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
1572 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
1573 * data/yacc.c (YYUSE): Likewise.
1574 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
1575 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
1576 * src/parse-gram.y (declaration): Don't pass a string constant
1577 to a function that expects char *, since GCC might complain
1578 about the constant value.
1579 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
1580 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
1581 before #defining them.
1582 * tests/glr-regression.at
1583 (Incorrectly initialized location for empty right-hand side in GLR):
1584 In yyerror, use the msg arg.
1585 (Corrupted semantic options if user action cuts parse):
1586 (Incorrect lookahead during deterministic GLR):
1587 (Incorrect lookahead during nondeterministic GLR):
1588 Don't name a local var 'index'; it shadows string.h's 'index'.
1589
ed94ef2a
AD
15902006-01-19 Akim Demaille <akim@epita.fr>
1591
1592 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
1593 location, not just parts of it.
1594
e9ad4aec
PE
15952006-01-18 Paul Eggert <eggert@cs.ucla.edu>
1596
d6ca7905
PE
1597 * NEWS: Document the fact that multiple %unions are now allowed.
1598 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
1599 * TODO: This feature is now implemented, so remove it from
1600 the wishlist.
d6ca7905 1601
ef1b70e0
PE
1602 * Makefile.maint: Merge with coreutils Makefile.maint.
1603 (CVS_LIST): Use build-aux version if available.
1604 (VERSION_REGEXP): New macro.
1605 (syntax-check-rules): Add sc_no_if_have_config_h,
1606 sc_prohibit_assert_without_use, sc_require_config_h,
1607 sc_useless_cpp_parens.
1608 (sc_obsolete_symbols): Check for O_NDELAY.
1609 (sc_dd_max_sym_length): Track coreutils.
1610 (sc_unmarked_diagnostics): Look in all files, not just *.c.
1611 (sc_useless_cpp_parens): New rule.
1612 (news-date-check): Look for version or today's date.
1613 (changelog-check): Don't require version number near head.
1614 (copyright-check): Use current year instead of hardwiring 2005.
1615 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
1616 (announcement): Add --gpg-key-ID.
1617
1618 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
1619 with "file system".
1620
2073ce56 1621 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
1622 array. Problem reported by twlevo.
1623 * src/reader.c (packgram): Prepend a new sentinel before ritem.
1624 * src/lalr.c (build_relations): Rely on new sentinel.
1625 * src/gram.c (gram_free): Adjust to new sentinel.
1626
b7691f15
JD
16272006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
1628
1629 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
1630 yylookaheadNeeds. All uses updated.
1631 (yysplitStack): Rename local yynewLookaheadStatuses to
1632 yynewLookaheadNeeds.
1633 * data/glr-regression.at (Incorrect lookahead during nondeterministic
1634 GLR): In comments, change `lookahead status' to `lookahead need'.
1635
ddee1b06
PH
16362006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1637
1638 * data/glr.c (yysplitStack): A little stylistic rewrite.
1639
12f4614d
PH
16402006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1641
1642 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
1643
32c29292
JD
16442006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
1645
1646 * doc/bison.texinfo: Fix some typos.
1647 (GLR Semantic Actions): New subsection discussing special
1648 considerations because GLR semantic actions might be deferred.
1649 (Actions): Mention look-ahead usage of yylval.
1650 (Actions and Locations): Mention look-ahead usage of yylloc.
1651 (Special Features for Use in Actions): Add YYEOF entry and mention it
1652 in the yychar entry.
1653 In the yychar entry, remove mention of the local yychar case (pure
1654 parser) since this is irrelevant information when writing semantic
1655 actions and since it's already discussed in `Bison Symbols' where
1656 yychar is otherwise described as an external variable.
1657 In the yychar entry, don't call it the `current' look-ahead since it
1658 isn't when semantic actions are deferred.
1659 In the yychar and yyclearin entries, add note about deferred semantic
1660 actions.
1661 Add yylloc and yylval entries discussing look-ahead usage.
1662 (Look-Ahead Tokens): When discussing yychar, don't call it the
1663 `current' look-ahead, and do mention yylval and yylloc.
1664 (Error Recovery): Cross-reference `Action Features' when mentioning
1665 yyclearin.
1666 (Bison Symbols): In the yychar entry, don't call it the `current'
1667 look-ahead.
1668 In the yylloc and yylval entries, mention look-ahead usage.
1669
de366a2f 16702006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
1671
1672 * tests/glr-regression.at: Update copyright year to 2006.
1673
bf70fa87
JD
16742006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1675
1676 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
1677 use during nondeterministic operation to track which stacks have
1678 actually needed the current lookahead.
1679 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
1680 Allocate, deallocate, resize, and otherwise shuffle space for
1681 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
1682 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
1683 appropriately during nondeterministic operation.
1684 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
1685 members to store the current lookahead to be used by the deferred
1686 user action.
1687 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
1688 from which the RHS is taken. Set the lookahead members of the new
1689 yySemanticOption according to the lookahead status for stack yyk.
1690 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
1691 yyaddDeferredAction.
1692 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
1693 members of yySemanticOption before invoking yyuserAction, and then set
1694 them back to their current values afterward.
1695 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
1696 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
1697 * tests/glr-regression.at: Remove `.' from the ends of recent test case
1698 titles for consistency.
1699 (Leaked merged semantic value if user action cuts parse): In order to
1700 suppress lint warnings, use arguments in merge function, and assign
1701 char value < 128 in main.
1702 (Incorrect lookahead during deterministic GLR): New test case.
1703 (Incorrect lookahead during nondeterministic GLR): New test case.
1704
05449a2c
JD
17052006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1706
de366a2f 1707 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
1708 !yyvaluep as signal that no semantic value is available to print.
1709 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
1710 to print a semantic value.
1711
4158e0a1 17122006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 1713
4158e0a1
JD
1714 * tests/glr-regression.at: For consistency with my newer test cases,
1715 don't thank myself.
1716
d659304d
JD
17172006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1718
1719 * data/glr.c (yyresolveValue): When merging semantic options, if at
1720 least one user action succeeds but a later one cuts the parse, then
1721 destroy the semantic value before returning rather than leaking it.
1722 (yyresolveStates): If a user action cuts the parse and thus
1723 yyresolveValue fails, ignore the (unset) semantic value rather than
1724 corrupting the yyGLRState, and empty the semantic options list since
1725 the user actions should have called all necessary destructors.
1726 Simplify code with YYCHK.
1727 * tests/glr-regression.at (Corrupted semantic options if user action
1728 cuts parse): New test case.
1729 (Undesirable destructors if user action cuts parse): New test case.
1730 Before applying any of this patch, this test case never actually failed
1731 for me... but only because the corrupted semantic options usually
1732 masked this bug.
1733 (Leaked merged semantic value if user action cuts parse): New test
1734 case.
1735
6ec2c0f2
AD
17362006-01-05 Akim Demaille <akim@epita.fr>
1737
1738 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
1739
1b9c21fb
PE
17402006-01-04 Paul Eggert <eggert@cs.ucla.edu>
1741
1742 * data/c.m4 (b4_c_modern): New macro, with a new provision for
1743 _MSC_VER. Problem reported by Cenzato Marco.
1744 (b4_c_function_def): Use it.
1745 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
1746 b4_c_modern.
1747 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
1748 than rolling our own.
1749
84866159
AD
17502006-01-04 Akim Demaille <akim@epita.fr>
1751
1752 Also warn about non-used mid-rule values.
1753 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
1754 member.
1755 (symbol_list_new): Adjust.
1756 * src/reader.c (symbol_typed_p): New.
1757 (grammar_rule_check): Use it.
1758 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
1759 Check its rule.
1760 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
1761 Use it.
1762 * tests/actions.at (Exotic Dollars): Adjust.
1763
378f4bd8
AD
17642006-01-04 Akim Demaille <akim@epita.fr>
1765
1766 * src/reader.c (grammar_midrule_action): If $$ is set in a
1767 mid-rule, move the `used' bit to its lhs.
1768 * tests/input.at (Unused values): New.
1769 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
1770
e2a21b6f
PE
17712006-01-03 Paul Eggert <eggert@cs.ucla.edu>
1772
54662697
PE
1773 * doc/bison.texinfo (Bison Options): Say more accurately what
1774 --yacc does.
1775 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
1776 about declarations in the grammar when in Yacc mode, as POSIX does
1777 not require a diagnostic when the grammar uses extensions.
1778
1779 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
1780
073f9288
PE
1781 Warn about dubious constructions like "%token T T".
1782 Reported by twlevo.
1783 * src/symtab.h (struct symbol.declared): New member.
1784 * src/symtab.c (symbol_new): Initialize it to false.
1785 (symbol_class_set): New arg DECLARING, specifying whether
1786 this is a declaration that we want to warn about, if there
1787 is more than one of them. All uses changed.
1788
1221b78a
PE
1789 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
1790 Allow multiple %union directives, whose contents concatenate.
1791 * src/parse-gram.y (grammar_declaration): Likewise.
1792 Use muscle_code_grow, so that we don't need stype_line any more.
1793 All uses changed.
1794
1795 * src/muscle_tab.c (muscle_grow): Fix comment.
1796
e2a21b6f
PE
1797 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
1798 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
1799 Update copyright year to 2006.
1800
8f7e3cf9
AD
18012006-01-03 Akim Demaille <akim@epita.fr>
1802
1803 Have glr.cc pass (some of) the calc.at tests.
1804 * data/glr.cc (b4_parse_param_orig): New.
1805 (b4_parse_param): Improve its definition, and bound it more
1806 clearly in the skeleton.
1807 (b4_epilogue): Append, instead of prepending, in order to keep
1808 #line consistency.
1809 Simplify the generation of auxiliary functions: locations and
1810 purity are mandated.
1811 (b4_global_tokens_and_yystype): Honor it.
1812 * data/location.cc (c++.m4): Don't include it.
1813 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
1814 and AT_SKEL_CC_IF.
1815 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
1816 AT_LALR1_CC_IF.
1817 Be sure to initialize the first position's filename.
1818 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
1819 mandated anyway.
1820 (AT_CHECK_CALC_GLR_CC): New.
1821 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
1822
3953ed88
AD
18232006-01-02 Akim Demaille <akim@epita.fr>
1824
1825 * src/output.c (output_skeleton): Don't hard wire the inclusion of
1826 c.m4.
0a96ba81 1827 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
1828 * data/glr.cc: Do not include stack.hh.
1829
9ecafbbf
AD
18302006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1831
1832 * data/glr.c: Reformat whitespace with tabs.
1833 (b4_lpure_formals): Remove this unused m4 macro.
1834 * tests/cxx-type.at: Reformat whitespace with tabs.
1835 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
1836 since it's a member. Rename type to isNterm for clarity.
1837
c4d497a0
AD
18382005-12-29 Akim <akim@sulaco.local>
1839
1840 Let glr.cc catch up with symbol_value_print.
1841 * data/glr.cc (b4_yysymprint_generate): Replace by...
1842 (b4_yy_symbol_print_generate): this.
1843 (yy_symbol_print, yy_symbol_value_print): Declare them.
1844
4517da37
PE
18452005-12-28 Paul Eggert <eggert@cs.ucla.edu>
1846
1847 * src/location.h (boundary): Note that a line or column equal
1848 to INT_MAX indicates an overflow.
1849 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
1850 (rule_length_overflow, increment_rule_length, add_column_width):
1851 New functions.
1852 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
1853 (<SC_BRACED_CODE>"}"):
1854 Use increment_rule_length rather than incrementing it by hand.
1855 (adjust_location, handle_syncline): Diagnose overflow.
1856 (handle_action_dollar, handle_action_at):
1857 Fix bug with monstrosities like $-2147483648.
1858 Remove now-unnecessary checks.
1859 (scan_integer): Verify assumptions and remove now-unnecessary checks.
1860 (convert_ucn_to_byte): Verify assumptions.
1861 (handle_syncline): New arg LOC. All callers changed.
1862 Don't store through a value derived from char const * pointer.
1863
1864 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
1865 GCC warnings.
1866
e3233bf6
PE
18672005-12-27 Paul Eggert <eggert@cs.ucla.edu>
1868
1869 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
1870 Remove unnecessary forward static decls.
1871
8f3596a6
AD
18722005-12-27 Akim Demaille <akim@epita.fr>
1873
1874 * src/reader.c (grammar_current_rule_check): Also check that $$
1875 is used.
1876 Take the rule to check as argument, hence rename as...
1877 (grammar_rule_check): this.
1878 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
1879 Rename as...
1880 (grammar_rule_begin, grammar_rule_end): these, for consistency.
1881 (grammar_midrule_action, grammar_symbol_append): Now static.
1882 * tests/torture.at (input): Don't rely on the default action
1883 being always performed.
1884 * tests/calc.at: "Set" $$ even when the action is "cut" with
1885 YYERROR or other.
1886 * tests/actions.at (Exotic Dollars): Instead of using unused
1887 values, check that the warning is issued.
1888
721be13c
PE
18892005-12-22 Paul Eggert <eggert@cs.ucla.edu>
1890
1891 * NEWS: Improve wording for unused-value warnings.
1892
a0af42fc
AD
18932005-12-22 Akim Demaille <akim@epita.fr>
1894
1895 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
1896 (b4_yysymprint_generate): Rename as...
1897 (b4_yy_symbol_print_generate): this.
1898 Generate yy_symbol_print instead of yysymprint.
1899 Generate also yy_symbol_value_print, and use it.
1900
affac613
AD
19012005-12-22 Akim Demaille <akim@epita.fr>
1902
721be13c 1903 * NEWS: Warn about unused values.
affac613
AD
1904 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
1905 a `used' member.
1906 (symbol_list_n_get, symbol_list_n_used_set): New.
1907 (symbol_list_n_type_name_get): Use symbol_list_n_get.
1908 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
1909 * src/reader.c (grammar_current_rule_check): Check that values are
1910 used.
1911 * src/symtab.c (symbol_print): Accept 0.
1912 * tests/existing.at: Remove the type information.
1913 Empty the actions.
1914 Remove useless actions (beware of mid-rule actions: perl -000
1915 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
1916 * tests/actions.at (Exotic Dollars): Use unused values.
1917 * tests/calc.at: Likewise.
1918 * tests/glr-regression.at (No users destructors if stack 0 deleted):
1919 Likewise.
1920
1921 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
1922 rule_useful_p.
1923
9d9b8b70
PE
19242005-12-21 Paul Eggert <eggert@cs.ucla.edu>
1925
8bb4c753
PE
1926 Undo 2005-12-01 tentative license wording change. The wording is
1927 still being reviewed by the lawyers, and we don't want to wait for
1928 them before publishing a test release. For now, revert to the
1929 previous wording.
1930 * NEWS: Undo 2005-12-01 change.
1931 * data/glr.c: Revert to previous license wording.
1932 * data/glr.cc: Likewise.
1933 * data/lalr1.cc: Likewise.
1934 * data/location.cc: Likewise.
1935 * data/yacc.c: Likewise.
1936
9d9b8b70
PE
1937 * NEWS: Reword %destructor vs YYABORT etc.
1938 * data/glr.c: Use American spacing, for consistency.
1939 * data/glr.cc: Likewise.
1940 * data/lalr1.cc: Likewise.
1941 * data/yacc.c: Likewise.
1942 * data/yacc.c: Reformat comments slightly.
1943 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
1944 for consistency. Fix some spelling errors and reword recently-included
1945 text slightly.
1946 * tests/cxx-type.at: Cast results of malloc, for C++.
1947
2c3b392a
AD
19482005-12-21 Joel E. Denny <address@hidden>
1949
1950 * tests/cxx-type.at: Construct a tree, count the parents of shared
1951 nodes, and free each node once and only once. Previously, the memory
1952 for semantic values was leaked instead.
1953
d6cff4dc
AD
19542005-12-21 Joel E. Denny <address@hidden>
1955
1956 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
1957 (yylval, yylloc): If pure, #define to yystackp->yyval and
1958 yystackp->yyloc similar to yychar and yynerrs.
1959 (yyparse): If pure, remove local yylval and yylloc. Add local
1960 yystackp to accommodate pure definitions of yylval and yylloc.
1961 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
1962 yylvalp and yyllocp to &yylval and &yylloc.
1963 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
1964 namespace. Previously, nerrs and char were missing, but lval and lloc
1965 weren't necessary.
1966 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
1967 yylvalp and yyllocp parameters since, if pure, these are now always
1968 accessible through yystackp. If not pure, they are still accessible
1969 globally.
1970 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
1971 `if (YYID (N))' to pacify lint.
1972
a85284cf
AD
19732005-12-21 Akim Demaille <akim@epita.fr>
1974
1975 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
1976 destroy the RHS symbols of a rule.
1977 * data/yacc.c (yylen): Initialize to 0.
1978 Keep its value to the number of items to possibly shift.
1979 In particular, a regular successful parse that ends on YYFINAL by
1980 a (internal) YYACCEPT must not have yylen != 0.
1981 (yyerrorlab, yyreturn): Pop the RHS.
1982 Reorder a bit to emphasize the `shifting' bits of code.
1983 (YYPOPSTACK): Now accept a number of items to pop.
1984 * data/lalr1.cc: Likewise.
1985 * data/glr.c: Formatting changes.
1986 Use goto instead of fall through.
1987 * doc/bison.texinfo (Destructor Decl): Complete.
1988
d508c281
JMG
19892005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1990
1991 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
1992 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
1993 * djgpp/config.bat: Replace every occurence of the file name
1994 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1995 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1996 * djgpp/config.sed: Replace every occurence of the file name
1997 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
1998 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
1999 * djgpp/djunpack.bat: DJGPP specific file.
2000 * djgpp/fnchange.lst: DJGPP specific file.
2001 * djgpp/README.in: Add new information about how to unpack the bison
2002 source on MSDOS and other systems which have 8.3 file name restrictions
2003 using djunpack.bat and fnchange.lst.
2004
3e7a2cd9
PE
20052005-12-12 Paul Eggert <eggert@cs.ucla.edu>
2006
2007 * bootstrap (build_cvs_prefix): Remove; unused.
2008 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
2009 when getting gnulib.
2010
20112005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
2012
2013 * data/glr.c: Reorder typedef declarations for structs to match order
2014 of struct declarations.
2015 Rename yystack everywhere to yystackp except in yyparse where it's not
2016 a pointer.
2017 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
2018 consistency.
2019 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
2020 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
2021 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
2022 lint.
2023
877519f8
PE
20242005-12-09 Paul Eggert <eggert@cs.ucla.edu>
2025
0eca5a39
PE
2026 * tests/sets.at (Accept): Fix typos in regular expression used to
2027 sed out the final state number.
2028
2cec9080
PE
2029 Work around portability problem on Solaris 10: flex-generated
2030 files include <stdio.h> before <config.h>, which messes up
2031 because the latter defines __EXTENSIONS__. Address the problem
2032 by creating two new little files that include <config.h> first,
2033 then include the flex-generated files. Rewrite everyone else
2034 to include <config.h> first, as well.
2035 * lib/timevar.c: Always include "config.h".
2036 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
2037 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
2038 (EXTRA_bison_SOURCES): New macro.
2039 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
2040 * src/system.h: Don't include config.h.
2041 * src/LR0.c: Include <config.h> first.
2042 * src/assoc.c: Likewise.
2043 * src/closure.c: Likewise.
2044 * src/complain.c: Likewise.
2045 * src/conflicts.c: Likewise.
2046 * src/derives.c: Likewise.
2047 * src/files.c: Likewise.
2048 * src/getargs.c: Likewise.
2049 * src/gram.c: Likewise.
2050 * src/lalr.c: Likewise.
2051 * src/location.c: Likewise.
2052 * src/main.c: Likewise.
2053 * src/muscle_tab.c: Likewise.
2054 * src/nullable.c: Likewise.
2055 * src/output.c: Likewise.
2056 * src/parse-gram.y: Likewise.
2057 * src/print.c: Likewise.
2058 * src/print_graph.c: Likewise.
2059 * src/reader.c: Likewise.
2060 * src/reduce.c: Likewise.
2061 * src/relation.c: Likewise.
2062 * src/state.c: Likewise.
2063 * src/symlist.c: Likewise.
2064 * src/symtab.c: Likewise.
2065 * src/tables.c: Likewise.
2066 * src/uniqstr.c: Likewise.
2067 * src/vcg.c: Likewise.
2068
877519f8
PE
2069 * src/parse-gram.y: Fix minor problems uncovered by lint.
2070 (current_lhs, current_lhs_location): Now static.
2071 (current_assoc): Remove unused variable.
2072
2073 Cleanups so that Bison-generated parsers have less lint.
2074 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
2075 Prepend /*ARGSUSED*/, for lint's sake.
2076 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
2077 definition if 'lint' is defined.
2078 (YYID): New macro (or function, if lint).
2079 All uses of /*CONSTCOND*/0 replaced by YYID(0).
2080 * data/yacc.c: Likewise.
2081 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
2082 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
2083 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
2084 is C++ only.
2085 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
2086 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
2087 Use YYID(0) rather than 0, for lint.
2088 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
2089 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
2090
f5228370
PE
20912005-12-07 Paul Eggert <eggert@cs.ucla.edu>
2092
2093 * tests/glr-regression.at
2094 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2095 Close memory leak reported by twlevo.
2096
69ce078b
PE
20972005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
2098
6ff99711
PE
2099 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
2100 all stacks.
2101 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
2102 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2103 New test case.
2104 (Duplicated user destructor for lookahead): This test now is expected
2105 to succeed.
2106
af3412cd
PE
21072005-12-01 Paul Eggert <eggert@cs.ucla.edu>
2108
32b5b719 2109 * NEWS: Document the following change.
af3412cd
PE
2110 * data/yacc.c: Say "parser skeleton" rather than "file", since
2111 it's no longer just a file.
2112 * data/glr.c: Grant a special exception for C GLR parsers, that
2113 reads like the already-existing exception for C LALR(1) parsers.
2114 * data/glr.cc: Likewise.
2115 * data/lalr1.cc: Likewise.
2116 * data/location.cc: Likewise.
2117 * data/yacc.c: Reword the "written by" statement to clarify that
2118 it was the parser skeleton, not the entire output file.
2119 * data/glr.c: Written by Paul Hilfinger.
2120 * data/glr.cc: Written by Akim Demaille.
2121 * data/lalr1.cc: Likewise.
2122
035aa4a0
PE
21232005-11-18 Paul Eggert <eggert@cs.ucla.edu>
2124
d9963c85
PE
2125 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
2126 Fix typos in previous change that broke 'make check'.
2127 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
2128 supported in C.
2129 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
2130 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
2131 We can revert this once things settle down.
2132
035aa4a0
PE
2133 * src/conflicts.c (conflicts_print): Don't print file name twice
2134 when %expect fails because there were no conflicts.
2135 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
2136 change.
2137 * tests/conflicts.at (%expect not enough, %expect too much):
2138 (%expect with reduce conflicts): Adjust to new behavior.
2139
21402005-11-18 Akim Demaille <akim@epita.fr>
2141
2142 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
2143 errors.
2144 * NEWS: Document this.
2145 * doc/bison.texinfo (Expect Decl): Likewise.
2146
d1ff7a7c
AD
21472005-11-16 Akim Demaille <akim@epita.fr>
2148
2149 Generalize the display of semantic values and locations in traces.
2150 * data/glr.c (yy_reduce_print): Fix indices (again).
2151 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
2152 literal integers.
2153 * data/lalr1.cc (yyreduce_print): Rename as...
2154 (yy_reduce_print): this.
2155 Display values and locations.
2156 * data/yacc.c (yy_reduce_print): Likewise.
2157 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
2158 (yysymprint): Move higher to be visible from yy_reduce_print).
2159 (yyparse): Adjust.
2160 * tests/calc.at: Adjust the expected length of the traces.
2161
6de5398d
AD
21622005-11-14 Akim Demaille <akim@epita.fr>
2163
2164 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
2165 from 1 to N, while values and location start at 0.
2166 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
2167
a1373f55
AD
21682005-11-14 Akim Demaille <akim@epita.fr>
2169
2170 * data/glr.c (yy_reduce_print): Fix the $ number.
2171
613d8952
AD
21722005-11-14 Akim Demaille <akim@epita.fr>
2173
2174 "Use" parse parameters.
2175 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
2176 * data/glr.c, data/glr.cc: Use them.
2177 * data/glr.c (YYUSE): Have a C++ definition that supports
2178 non-pointer types.
2179
b2741627
AD
21802005-11-14 Akim Demaille <akim@epita.fr>
2181
2182 * data/glr.c (yyexpandGLRStack): Declare only if defined.
2183
5059b5c8
AD
21842005-11-14 Akim Demaille <akim@epita.fr>
2185
42249483
AD
2186 * data/glr.cc: New.
2187 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 2188
4626a15d
AD
21892005-11-12 Akim Demaille <akim@epita.fr>
2190
2191 Let position and location be PODs.
2192 * data/location.cc (position::initialize, location::initialize): New.
2193 (position::position, location::location): Define only if
2194 b4_location_constructors is defined.
2195 * data/lalr1.cc (b4_location_constructors): Define it for backward
2196 compatibility.
2197 * doc/bison.texinfo (Initial Action Decl): Use initialize.
2198
21992005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
2200
2201 * data/lalr1.cc: Move the body of the ctor and dtor into the
2202 parser file (instead of the header).
2203 Wrap the implementations in a "namespace yy".
2204
22052005-11-12 Akim Demaille <akim@epita.fr>
2206
2207 Have glr.c include its header file when created.
2208 * data/glr.c (b4_shared_declarations): New.
2209 Output them verbatim in the parser if !%defines, otherwise
2210 output then in the header file, and include it instead.
2211
1989d947
AD
22122005-11-11 Akim Demaille <akim@epita.fr>
2213
2214 * data/glr.c: Comment changes.
2215
22162005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
2217
2218 When yydebug, report semantic and location values for reductions.
2219 * data/glr.c (yy_reduce_print): Report the semantic values and the
2220 locations.
2221 (YY_REDUCE_PRINT): Adjust.
2222 (yyglrReduce): Use them.
2223 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
2224 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
2225 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
2226 traces.
2227
02998094
AD
22282005-11-10 Akim Demaille <akim@epita.fr>
2229
2230 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
2231 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
2232 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
2233
5210672f
PE
22342005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
2235
2236 * m4/cxx.m4, examples/Makefile.am: Don't build
2237 examples/calc++ if no C++ compiler is available. (trivial change)
2238
a8991a1d
AD
22392005-11-09 Akim Demaille <akim@epita.fr>
2240
2241 * src/scan-skel.l: Use a couple of asserts.
2242
36b5e963
AD
22432005-11-03 Akim Demaille <akim@epita.fr>
2244
2245 In some (weird) cases, the final state number is incorrect.
2246 Reported by Alexandre Duret-Lutz.
2247 * src/LR0.c (state_list_append): Remove the computation of
2248 final_state.
2249 (save_reductions): Do it here.
2250 (get_state): Alpha conversion.
2251 (generate_states): Use a for loop.
2252 * src/gram.h (item_number_is_rule_number)
2253 (item_number_is_symbol_number): New.
2254 * src/state.c: Use assert.
2255 * src/system.h: Include assert.h.
2256 * tests/sets.at (Accept): New.
2257
44e7ead1
PH
22582005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2259
2260 * data/glr.c (yyfill): Adjust comment.
36b5e963 2261 (yyresolveAction): Initialize default location properly
44e7ead1
PH
2262 for empty right-hand sides.
2263 (yydoAction): Ditto.
2264 Add comment explaining apparently dead code.
36b5e963
AD
2265 * tests/glr-regression.at
2266 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 2267 New test.
36b5e963 2268
e10a80ee
PE
22692005-10-30 Paul Eggert <eggert@cs.ucla.edu>
2270
2271 * bootstrap (cleanup_gnulib): New function. Use it to clean up
2272 gnulib when interrupted. This fixes some race conditions and
2273 works around some portability problems (one noted by Paul
2274 Hilfinger).
2275
067b32ee
AD
22762005-10-22 Akim <akim@epita.fr>
2277
2278 * Makefile.cfg: Adjust to config -> build-aux.
2279 Reported by twledo.
2280
4b367315
AD
22812005-10-21 Akim Demaille <akim@epita.fr>
2282
2283 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
2284 the %parse-params.
2285 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
2286 * data/yacc.c (b4_Pure_if): Rename as...
2287 (b4_yacc_pure_if): this.
2288 (YY_SYMBOL_PRINT, yyparse): Adjust.
2289 * doc/bison.texinfo: Formatting changes.
2290
24cc23d9
AD
22912005-10-21 Akim Demaille <akim@epita.fr>
2292
2293 Finish the transition config -> build-aux.
2294 * configure.ac, Makefile.am: Use build-aux.
2295 * config/prev-version, config/announce-gen, config/Makefile.am:
2296 Move to...
2297 * build-aux/prev-version, build-aux/announce-gen,
2298 * build-aux/Makefile.am: here.
2299
d4476375
AD
23002005-10-14 Akim Demaille <akim@epita.fr>
2301
2302 * examples/calc++/test: Use set -x only when VERBOSE.
2303
302c0aee
PE
23042005-10-13 Paul Eggert <eggert@cs.ucla.edu>
2305
2306 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
2307 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
2308
7625ec2c
AD
23092005-10-13 Akim Demaille <akim@epita.fr>
2310
2311 * src/scan-skel.l: Output the base name parts of the parser and
2312 header file names.
302c0aee 2313 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
2314 additional checks.
2315 Use this to exercise C++ outputs in subdirs.
2316 Reported by Oleg Smolsky.
2317
ba0fe3c7
PE
23182005-10-12 Paul Eggert <eggert@cs.ucla.edu>
2319
2320 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
2321 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
2322 Problem reported by John P. Hartmann.
2323 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
2324 already defined it.
2325
9b8a5ce0
AD
23262005-10-12 Akim Demaille <akim@epita.fr>
2327
2328 * src/parse-gram.y (version_check): Exit 63 to please missing
2329 (stands for "version mismatch).
2330 * tests/input.at, doc/bison.texinfo: Adjust.
2331
4f6e011e
PE
23322005-10-10 Paul Eggert <eggert@cs.ucla.edu>
2333
2334 Work around portability problems with Visual Age C compiler
2335 (xlc and xlC_r) reported by John P. Hartmann.
2336 * data/location.cc (initial_column, initial_line): Remove.
2337 All uses replaced by 0 and 1.
2338 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
2339 that xlc complains about.
2340 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 2341 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 2342 as __STDC__.
4d7aa45e
PE
2343 * data/yacc.c (YYMODERN_C): New macro, which also looks at
2344 __STDC_VERSION__. Use it everywhere instead of looking at
2345 __STDC__ and __cplusplus.
4f6e011e 2346
a1b3bf8c
AD
23472005-10-10 Akim Demaille <akim@epita.fr>
2348
2349 * examples/calc++/test: Be quiet unless VERBOSE.
2350
412e44aa
PE
23512005-10-05 Paul Eggert <eggert@cs.ucla.edu>
2352
2a4647a3
PE
2353 * data/c.m4 (yydestruct, yysymprint):
2354 Use YYUSE instead of casting to void.
2355 * data/glr.c (YYUSE): New macro.
2356 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
2357 Use it instead of rolling our own.
2358 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
2359 (YYCHK1):
2360 Use /*CONSTCOND*/ to suppress lint warnings.
2361 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
2362 (YY_STACK_PRINT): Use 'false' not '0'.
2363 (YYUSE): New macro.
2364 (yysymprint_, yydestruct_): Use it instead of rolling our own.
2365 * data/yacc.c (YYUSE): New macro.
2366 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
2367 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
2368 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
2369
2370
412e44aa
PE
2371 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
2372 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
2373
88c6637f
PE
23742005-10-04 Paul Eggert <eggert@cs.ucla.edu>
2375
2f4f028d
PE
2376 Undo the parts of the unlocked-I/O change that substituted
2377 putc or puts for printf. This might hurt performance a bit,
2378 but some people prefer the printf style.
2379 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
2380 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
2381 All uses replaced by YYFPRINTF and YYDPRINTF.
2382 * data/yacc.c: Likewise.
2383 * lib/bitset.c (bitset_print): Likewise.
2384 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
2385 putc and puts.
2386 * lib/lbitset.c (debug_lbitset): Likewise.
2387 * src/closure.c (print_firsts, print_fderives): Likewise.
2388 * src/gram.c (grammar_dump): Likewise.
2389 * src/lalr.c (look_ahead_tokens_print): Likewise.
2390 * src/output.c (escaped_output): Likewise.
2391 (user_actions_output): Break apart two printfs.
2392 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
2393 * src/reduce.c (reduce_print): Likewise.
2394 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2395 * src/system.h: Include unlocked-io.h rathe than stdio.h.
2396
88c6637f
PE
2397 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
2398 Use assignments rather than casts-to-void to suppress
2399 unused-variable warnings. This pacifies 'lint'.
2400 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
2401 unused-variable warnings.
2402
fb32e373
JMG
24032005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2404
2405 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2406
edb8f44f
PE
24072005-10-02 Paul Eggert <eggert@cs.ucla.edu>
2408
fb9c0b33
PE
2409 Use unlocked I/O for a minor performance improvement on hosts like
2410 GNU/Linux and Solaris that support unlocked I/O. The basic idea
2411 is to use the gnlib unlocked-io module, and to prefer putc and
2412 puts to printf when either will work (since the latter doesn't
2413 come in an unlocked flavor).
2414 * bootstrap (gnulib_modules): Add unlocked-io.
2415 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
2416 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
2417 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
2418 and similarly for puts and putc and printf.
2419 * data/yacc.c: Likewise.
2420 * lib/bitset.c (bitset_print): Likewise.
2421 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
2422 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
2423 to printf.
2424 * lib/lbitset.c (debug_lbitset): Likewise.
2425 * src/closure.c (print_firsts, print_fderives): Likewise.
2426 * src/gram.c (grammar_dump): Likewise.
2427 * src/lalr.c (look_ahead_tokens_print): Likewise.
2428 * src/output.c (escaped_output): Likewise.
2429 (user_actions_output): Coalesce two printfs.
2f4f028d 2430 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
2431 * src/reduce.c (reduce_print): Likewise.
2432 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 2433 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 2434
edb8f44f
PE
2435 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
2436 this confuses xgettext.
2437
b50d2359
AD
24382005-10-02 Akim Demaille <akim@epita.fr>
2439
2440 * bootstrap (gnulib_modules): Add strverscmp.
2441 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
2442 * m4/.cvsignore: Add strverscmp.m4.
2443 * src/parse-gram.y (%require): New token, new rule.
2444 (version_check): New.
2445 * src/scan-gram.l (%require): Adjust.
2446 * tests/input.at (AT_REQUIRE): New.
2447 Use it.
2448 * doc/bison.texinfo (Require Decl): New.
2449 (Calc++ Parser): Use %require.
2450
21667f64
AD
24512005-10-02 Akim Demaille <akim@epita.fr>
2452
2453 * data/location.cc: New.
2454
2b81e969
AD
24552005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
2456 Akim Demaille <akim@epita.fr>
2457
2458 Make sure -odir/foo.cc creates dir/location.hh etc.
2459 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
2460 (spec_file_prefix, spec_verbose_file, spec_graph_file)
2461 (spec_defines_file): Now const.
2462 (dir_prefix): New.
2463 (short_base_name): Remove.
2464 * src/files.c: Adjust.
2465 (dirname.h): Include.
2466 (base_name): Don't prototype it.
2467 (finput): Remove, duplicates gram_in.
2468 (full_base_name, short_base_name): Replace by...
2469 (all_but_ext, all_but_tab_ext): these.
2470 (compute_base_names): Rename as...
2471 (compute_file_name_parts): this.
2472 Update to compute the new variables, including dir_prefix.
2473 Adjust dependencies.
2474 * src/output.c (prepare): Output them.
2475 * src/reader.c: Adjust to use gram_in, not finput.
2476 * src/scan-skel.l (@dir_prefix@): New.
2477
ad6a9b97
JMG
24782005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2479
2480 * lib/subpipe.c: New function end_of_output_subpipe() added
2481 to allow support for non-posix systems. This is a no-op function
2482 for posix systems.
2483
2484 * lib/subpipe.h: New function end_of_output_subpipe() added
2485 to allow support for non-posix systems. This is a no-op function
2486 for posix systems.
2487
2488 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
2489 handle the lack of pipe/fork functionality on non-posix systems.
2490
2491 * djgpp/Makefile.maint: DJGPP specific file.
2492
2493 * djgpp/README.in: DJGPP specific file.
2494
2495 * djgpp/config.bat: DJGPP specific configuration file.
2496
2497 * djgpp/config.sed: DJGPP specific configuration file.
2498
2499 * djgpp/config.site: DJGPP specific configuration file.
2500
2501 * djgpp/config_h.sed: DJGPP specific configuration file.
2502
2503 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
2504
2505 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
2506
fc695704
AD
25072005-10-02 Akim Demaille <akim@epita.fr>
2508
2509 * data/location.cc: New, extract from...
2510 * data/lalr1.cc: here.
2511 (location.hh): Include it after the user prologue, in case the
2512 filename type is defined by the user.
2513 Forward declation location and position before the pre-prologue.
2514 (yyresult_): Rename as...
2515 (yyresult): this, it's a local variable, not an attribute.
2516 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
2517
25182005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
2519
2520 * examples/extexi: Restore the #line generation.
2521
fb9712a9
AD
25222005-09-30 Akim Demaille <akim@epita.fr>,
2523 Alexandre Duret-Lutz <adl@gnu.org>
2524
2525 Move the token type and YYSTYPE in the parser class.
2526 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
2527 (parser::token): New, from the moved free definition of tokens.
2528 (parser::semantic_value): Now a full definition instead of an
2529 indirection to YYSTYPE.
2530 (b4_post_prologue): No longer included in the header file, but
2531 in the implementation file.
2532 * doc/bison.texi (C+ Language Interface): Update.
2533 * src/parse-gram.y: Support unary %define.
2534 * tests/actions.at: Define global_tokens_and_yystype for backward
2535 compatibility until we update the tests.
2536 * tests/calc.at: Idem.
2537 (first_line, first_column, last_line, last_column): Define for lalr1.cc
2538 to simplify the code.
2539
55f0c7b1
PE
25402005-09-29 Paul Eggert <eggert@cs.ucla.edu>
2541
2542 Port to SunOS 4.1.4, which lacks strtoul and strerror.
2543 Ah, the good old days! Problem reported by Peter Klein.
2544 * bootstrap (gnulib_modules): Add strerror, strtoul.
2545 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
2546 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
2547
fb9712a9 25482005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
2549
2550 * data/c.m4 (b4_error_verbose_if): New.
2551 * data/lalr1.cc: Use it.
2552 (YYERROR_VERBOSE_IF): Remove.
2553 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
2554 parser members, replaced by...
2555 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
2556 local variables.
2557 (yysyntax_error_): Takes the state number as argument.
2558 (yyreduce_print_): Use the argument yyrule, not the former
2559 attribute yyn_.
2560
8a6f72f3
PE
25612005-09-26 Paul Eggert <eggert@cs.ucla.edu>
2562
2563 * bootstrap (gnulib_modules): Add verify.
2564 * lib/.cvsignore: Add verify.h.
2565 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
2566 * src/system.h (verify): Remove.
2567 Include verify.h instead.
2568 * src/tables.c (tables_generate): Use new API for 'verify'.
2569
0d50976f
PE
25702005-09-21 Paul Eggert <eggert@cs.ucla.edu>
2571
ebc3737e
PE
2572 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
2573 local variables whose names begin with 'yy'.
2574 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2575 Trivial changes from Joel E. Denny.
2576
0d50976f
PE
2577 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
2578 it itself.
2579 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
2580 don't use alloca any more.
2581
2582 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
2583 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 2584 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
2585 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
2586 to match yacc.c, to test more hosts.
2587
a05b79df
PE
25882005-09-20 Paul Eggert <eggert@cs.ucla.edu>
2589
55289366
PE
2590 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
2591 doesn't affect behavior.
2592 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
2593 Solaris, AIX, MSC.
2594 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
2595 This works a bit better with glibc, if user code has already included
2596 stdlib.h.
2597 * doc/bison.texinfo (Bison Parser): Document that users can't
2598 arbitrarily use malloc and free for other purposes. Document
2599 that <alloca.h> and <malloc.h> might be included.
2600 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
2601 user must declare alloca.
2602
a05b79df
PE
2603 * HACKING (release): Forwarn the Translation Project about
2604 stable releses.
2605
3ab2ca22
AD
26062005-09-20 Akim Demaille <akim@epita.fr>
2607
2608 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
2609
a9739e7c
PE
26102005-09-19 Paul Eggert <eggert@cs.ucla.edu>
2611
a702593e
PE
2612 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
2613 (YYSTACK_ALLOC_MAXIMUM): Use it.
2614 (yysyntax_error): New function.
2615 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
2616 multiple syntax errors are reported, and alloca is being used.
2617 Instead, reallocate buffers twice as big each time, so that
2618 we waste at most half the allocated memory. Start with a small
2619 (128-byte) buffer that will suffice in most cases anyway.
2620 Use yysyntax_error to do most of the work.
2621
2622 * doc/bison.texinfo (Error Reporting, Table of Symbols):
2623 yynerrs is the number of errors reported, not the number of
2624 errors encountered.
2625
a9739e7c
PE
2626 * tests/glr-regression.at (Duplicated user destructor for lookahead):
2627 Mark it as expected to fail.
2628 Cast result of malloc; problem reported by twlevo@xs4all.nl.
2629 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
2630 Don't start user-code symbols with "yy", to avoid name space problems.
2631
f479c6c6
AD
26322005-09-19 Akim Demaille <akim@epita.fr>
2633
2634 Remove the traits, failed experiment.
2635 It never proved useful, and anyway because of the current
2636 definition, it was not possible to have several specialization of
2637 this traits, making it useless.
2638 * data/lalr1.cc (yy:traits): Remove.
2639 Inline its definitions in the parser class.
2640
e2586f82
AD
26412005-09-19 Akim Demaille <akim@epita.fr>
2642
2643 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
2644 least Mac OSX with a /usr/local install of gettext.
2645
2e8cf949
AD
26462005-09-19 Akim Demaille <akim@epita.fr>
2647
2648 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
2649 and yytoken for similarity with the other skeletons.
2650
c7fb0b90
AD
26512005-09-19 Akim Demaille <akim@epita.fr>
2652
4e26c69e 2653 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 2654
1bd0deda
PE
26552005-09-16 Paul Eggert <eggert@cs.ucla.edu>
2656
2657 * NEWS: Version 2.1.
2658
2659 * NEWS: Remove notice of yytname change, since it was never in an
2660 official release.
2661 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
2662 diagnostic.
2663 * src/output.c (prepare): Likewise.
2664 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
2665 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
2666 is not defined. This is an awful hack, but it's enough for now.
2667 All callers changed.
2668 * tests/glr-regression-at (make_value): Args are const pointers now,
2669 to avoid GCC warning.
2670 (Duplicated user destructor for lookahead): New test. Currently
2671 skipped. It fails on my host but I'm not sure it'll always fail.
2672
26732005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
2674
2675 * src/symtab.h (struct symbol): Declare the printer and destructor
2676 as const, to avoid accidental calls to free.
2677 (symbol_destructor_set, symbol_printer_set): Adjust.
2678 * src/symtab.c: Adjust.
2679
1bd0deda 26802005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
2681
2682 * data/c.m4 (b4_token_enums): New.
2683 (b4_token_defines): Rename as...
2684 (b4_token_enums_defines): this.
2685 (b4_token_defines): New, output only the #defines.
2686 * data/yacc.c, data/glr.c: Adjust.
2687 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
2688 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
2689 as default values.
2690
dbcdae2d
AD
26912005-09-16 Akim Demaille <akim@epita.fr>
2692
2693 * data/lalr1.cc (yylex_): Remove, inline its code.
2694 (yyreport_syntax_error_): Remove, replaced by...
2695 (yysyntax_error_): this which returns a string and leaves to the
2696 caller the call to the users' error function.
2697 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
2698 Move from members of the parser object...
2699 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
2700 to local variables of the parse function.
2701
70d8f291
AD
27022005-09-16 Akim Demaille <akim@epita.fr>
2703
2704 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
2705 since it's in Bison's name space.
2706
b47dbebe
PE
27072005-09-15 Paul Eggert <eggert@cs.ucla.edu>
2708
ae199bf1
PE
2709 * data/glr.c (yyresolveValue): Add default case to pacify
2710 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
2711
b47dbebe
PE
2712 * NEWS: Document when yyparse started to return 2.
2713 * doc/bison.texinfo (Parser Function): Document when yyparse
2714 returns 2.
2715
2716 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
2717 (b4_filename_type): Renamed back from b4_file_name_type. All uses
2718 changed.
2719 (class position): file_name -> filename (reverting). All uses changed.
2720
27212005-09-14 Paul Eggert <eggert@cs.ucla.edu>
2722
2723 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
2724 do anything if $@ exists. This reverts part of the 2005-07-07
2725 patch.
2726
00292f66
PE
27272005-09-11 Paul Eggert <eggert@cs.ucla.edu>
2728
2729 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
2730 contains obsolete information and isn't worth distributing as a
2731 separate file anyway.
2732 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
2733 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
2734 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
2735 (yyparse): Abort if user code uses longjmp to throw an unexpected
2736 value.
2737
a420f962
PE
27382005-09-09 Paul Eggert <eggert@cs.ucla.edu>
2739
00292f66
PE
2740 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
2741 Suggested by twlevo@xs4all.nl.
2742
127287e9
PE
2743 * data/glr.c (YYCHK1): Do not assume YYE is in range.
2744 This avoids a diagnostic from gcc -Wswitch-enum.
2745 Problem reported by twlevo@xs4all.nl.
2746
a420f962
PE
2747 * doc/bison.texinfo: Don't use "filename", as per GNU coding
2748 standards. Use "file name" or "file" or "name", depending on
2749 the context.
2750 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
2751 not to hack/foo.tab.c.
2752 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
2753 * data/glr.c: b4_filename -> b4_file_name.
2754 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
2755 All uses changed.
2756 (class position): filename -> file_name. All uses changed.
2757 * data/yacc.c: b4_filename -> b4_file_name.
2758 * lib/bitset.h: filename -> file_name in local vars.
2759 * lib/bitset_stats.c: Likewise.
2760 * src/files.c: Likewise.
2761 * src/scan-skel.l ("@output ".*\n): Likewise.
2762 * src/files.c (file_name_split): Renamed from filename_split.
2763 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
2764
27652005-09-08 Paul Eggert <eggert@cs.ucla.edu>
2766
2767 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
2768 to accommodate latest gnulib.
2769
2770 * tests/glr-regression.at (Duplicate representation of merged trees):
2771 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
2772
2773 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
2774 needed.
2775
42a6501d
PE
27762005-08-26 Paul Eggert <eggert@cs.ucla.edu>
2777
2778 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
2779 All uses changed. Invoke user destructor after an error during a
2780 split parse (trivial change from Joel E. Denny).
2781
2782 * tests/glr-regression.at
2783 (User destructor after an error during a split parse): New test case.
2784 Problem reported by Joel E. Denny in:
2785 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
2786
ef9a1faf
PE
27872005-08-25 Paul Eggert <eggert@cs.ucla.edu>
2788
5b4aaf78
PE
2789 * README-cvs: Give URLs for recommended tools.
2790 Mention Gzip version problem, and bootstrapping issues.
2791 Remove troubleshooting section, as it's somewhat obsolete.
2792
b5240ba5
PE
2793 * bootstrap (no_cache): New var, to accommodate different wget
2794 variants. Use it instead of '-C off'. Problem reported by
2795 twlevo@xs4all.nl.
2796
ef9a1faf
PE
2797 * data/glr.c (yydestroyStackItem): New function.
2798 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
2799 debugging information. Problem reported by Joel E. Denny.
2800
e6efa9da
AD
28012005-08-25 Akim Demaille <akim@epita.fr>
2802
2803 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
2804
adc90f13
PE
28052005-08-24 Paul Eggert <eggert@cs.ucla.edu>
2806
2807 * data/glr.c (yyrecoverSyntaxError, yyreturn):
2808 Don't invoke destructor on unresolved entries.
2809 * tests/glr-regression.at
2810 (User destructor for unresolved GLR semantic value): New test case.
2811 Problem reported by Joel E. Denny in:
2812 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
2813
f9315de5
PE
28142005-08-21 Paul Eggert <eggert@cs.ucla.edu>
2815
15d29c1f
PE
2816 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
2817 Add strnlen.c.
2818 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
2819 lib-prefix.m4, po.m4.
2820
dd5f2af2
PE
2821 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
2822 in yydestruct diagnostic, since it might not be an error.
2823 Problem reported by Joel Denny near end of
2824 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 2825 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
2826 * data/yacc.c (yyreturn): Likewise.
2827 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
2828
2829 * src/files.c: Remove obsolete FIXME comment.
2830
2831 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
2832 with the other templates, and to fix bogus run-on messages such
2833 as the one reported at the end of
2834 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
2835 All callers changed to avoid the newline.
2836 (yyprocessOneStack): Output two lines rather than one, to accommodate
2837 the above change. This changes the debug output format slightly.
2838
f9315de5
PE
2839 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
2840 reported by Joel E. Denny in
2841 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
2842 (trivial change).
2843 * tests/glr-regression.at (Duplicate representation of merged trees):
2844 New test, from Joel E. Denny in:
2845 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
2846 * THANKS: Add Joel E. Denny.
2847
2848 * configure.ac (AC_INIT): Bump to 2.0c.
2849
04098407
PE
28502005-07-24 Paul Eggert <eggert@cs.ucla.edu>
2851
2852 * NEWS: Version 2.0b.
2853
ca5d2013
PE
2854 * Makefile.am (SUBDIRS): Put examples before tests, so that
2855 "make check" doesn't finish with "All 1 tests passed".
2856
3d54b576
PE
2857 * tests/regression.at (Token definitions): Don't rely on
2858 AT_PARSER_CHECK for data that contains backslashes. It currently
2859 uses 'echo', and 'echo' isn't portable if its argument contains
2860 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
2861 that the byte '\0xff' is not printable in the C locale; it is,
2862 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
2863 not printable, so use '\0x81' to test.
2864
d53ae497
PE
2865 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
2866 version of GCC, since the macro is used with non-GCC compilers.
2867
fc01665e
PE
2868 Fix core dump reported by Pablo De Napoli in
2869 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
2870 * tests/regression.at (Invalid inputs with {}): New test.
2871 * src/parse-gram.y (token_name): Translate type before using
2872 it as an index.
2873
04098407
PE
2874 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
2875 the user's name space. All uses changed to __attribute__
2876 ((__unused__)).
2877 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
2878 Add __attribute__ ((__noreturn__)).
2879
2880 * etc/clcommit: Remove. We weren't using it, and it failed
2881 "make maintainer-distcheck".
2882 * Makefile.maint: Merge from coreutils.
2883 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
2884 (syntax-check-rules): Change list of rules as described below.
2885 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
2886 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
2887 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
2888 (sc_trailing_space): New rules.
2889 (sc_xalloc_h_in_src): Remove.
2890 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
2891 (sc_space_tab, sc_error_exit_success, sc_changelog):
2892 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
2893 (makefile-check, po-check, author_mark_check):
2894 (makefile_path_separator_check, copyright-check):
2895 Use grep -n, to make it easier to find violations.
2896 Use CVS_LIST and CVS_LIST_EXCEPT.
2897 (header_regexp, h_re): Remove.
2898 (dd_c): New macro.
2899 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
2900 (my-distcheck): Use more-modern GCC flags.
2901 (signatures, %.asc): Remove.
2902 (rel-files, announcement): Remove signatures.
2903 Restore old updating code, even though we don't use it, so
2904 that we're the same as coreutils.
2905 (alpha, beta, major): Depend on news-date-check.
2906 Make the upload commands.
2907
2908 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
2909 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
2910 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
2911 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
2912 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
2913 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
2914 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
2915 * tests/sets.at: Likewise.
2916
2917 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
2918 we comment out the Autoconf version number.
2919 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
2920 it's error-prone and "make maintainer-distcheck" rejects it.
2921
2922 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
2923 Indent calls to "error" to pacify "make maintainer-distcheck",
2924 when the calls are not intended to be translated.
2925 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
2926
2927 * src/Makefile.am (DEFS): Use +=, to pacify
2928 "make maintainer-distcheck".
2929 (bison_SOURCES): Add scan-skel.h.
2930 (sc_tight_scope): New rule, from coreutils.
2931
2932 * src/files.c (src_extension, header_extension):
2933 Now static, not extern.
2934 * src/getargs.c (short_options): Likewise.
2935 * src/muscle_tab.c (muscle_table): Likewise.
2936 * src/parse-gram.y (current_class, current_type, current_prec):
2937 Likewise.
2938 * src/reader.c (grammar_end, previous_rule_end): Likewise.
2939 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
2940 * src/main.c (main): Cast bindtextdomain and textdomain calls to
2941 void, to avoid warning when NLS is disabled.
2942 * src/output.c: Include scan-skel.h.
2943 (scan_skel): Remove decl, since scan-skel.h does this.
2944 (output_skeleton):
2945 Indent calls to "error" to pacify "make maintainer-distcheck".
2946 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
2947 * src/reader.h (gram_end, gram_lineno): New decls to pacify
2948 "make maintainer-distcheck".
2949 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
2950 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
2951 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
2952 (skel_lex_destroy, scan_skel): Move these decls to...
2953 * src/scan-skel.h: New file.
2954 * src/uniqstr.c (uniqstr_assert):
2955 Indent calls to "error" to pacify "make maintainer-distcheck".
2956
2957 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
2958 not @VAR@.
2959
2960 * tests/torture.at: Revamp to avoid misuse of atoi that
2961 "make maintainer-distcheck" complained about.
2962
2963 * examples/extexi (message): Don't print a message more than once,
2964 and omit line-number decoration that makes Emacs compile think
2965 that informative messages are worth worrying about.
2966
29672005-07-22 Paul Eggert <eggert@cs.ucla.edu>
2968
2969 * configure.ac: Update version number.
2970
2971 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
2972 accidentally.
2973 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
2974 autogenerated by the maintainer.
2975 * examples/calc++/.cvsignore: Add *.yy.
2976
2977 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
2978 * lib/bitset_stats.c (bitset_stats_init): Likewise.
2979 * lib/bitsetv.c (bitsetv_alloc): Likewise.
2980
2981 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
2982
2983 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
2984 from maintainer-distcheck about casting the argument of 'free'.
2985
2986 * NEWS: Mention recent yytname changes.
2987 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
2988
2989 * bootstrap: For translations that have not yet been upgraded to
2990 the new runtime-po domain, prime the pump by extracting the
2991 relevant strings from the obsolete translations. This code can be
2992 removed once the bison-runtime domain has been translated by each
2993 team.
2994
2995 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
2996 now that token names are already quoted.
2997
2998 Fix problem reported by Anthony Heading.
2999 * data/glr.c (YYTOKEN_TABLE): New macro.
3000 (yytname): Define if YYTOKEN_TABLE.
3001 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
3002 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
3003 (YYERROR_VERBOSE): Define the same way the other skeletons do.
3004 * src/output.c (prepare_symbols): Output token_table_flag.
3005
0ffda363
PE
30062005-07-21 Paul Eggert <eggert@cs.ucla.edu>
3007
3008 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
3009 again if the first call fails.
3010
3011 * data/glr.c (yytnamerr): New function.
3012 (yyreportSyntaxError): Use it to dequote most string literals.
3013 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
3014 with other skeletons. All uses changed.
3015 (yytnameerr_): New function.
3016 (yyreport_syntax_error): Use it to dequote most string literals.
3017 * data/yacc.c (yytnamerr): New function.
3018 (yyerrlab): Use it to decode most string literals.
3019 * doc/bison.texinfo (Decl Summary, Calling Convention):
3020 Clarify quoting convention of yytname.
3021 * src/output.c (prepare_symbols): Quote all names. This undoes
3022 the 2005-04-17 change, which is now accomplished (mostly) via
3023 changes in the parsers as described above.
3024 * tests/regression.at (Token definitions, Web2c Actions):
3025 Undo most 2005-04-17 change here, too.
3026
30272005-07-20 Paul Eggert <eggert@cs.ucla.edu>
3028
3029 Fix more problems reported by twlevo@xs4all.nl.
3030 * tests/cxx-type.at: Don't pipe output of ./types through sed to
3031 remove trailing spaces. This loses the exit status of ./types,
3032 and isn't needed since ./types shouldn't be emitting trailing
3033 spaces.
3034 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
3035 as the stack isn't valid in that case.
3036
3037 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3038 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3039 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3040 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
3041 is used.
3042 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
3043 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3044 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3045 Likewise.
3046
3047 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
3048 overly-picky compilers that reject 'char *foo = "bar";'.
3049
3050 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
3051 to FILE * parameter, not to stderr. This fixes a typo introduced
3052 in the 2005-07-12 change.
3053
3054 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
3055 warnings from GCC 4.
3056
3057 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
3058 (yyglrShiftDefer, yysplitStack):
3059 Remove unused parameters b4_pure_formals. All uses changed.
3060 (yyglrShift): Remove unused parameters b4_user_formals.
3061 All uses changed.
3062 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
3063
6100a9aa
PE
30642005-07-18 Paul Eggert <eggert@cs.ucla.edu>
3065
258b75ca
PE
3066 Destructor cleanups and regularization among the three skeletons.
3067 * NEWS: Document the behavior changes.
3068 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
3069 stack before failing, as the cleanup code will do it for us now.
3070 * data/lalr1.cc (yyerrlab): Likewise.
3071 * data/glr.c (yyparse): Pop everything off the stack before
3072 freeing it, so that destructors get called properly.
3073 * data/lalr1.cc (yyreturn): Likewise.
3074 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
3075 This is more consistent.
3076 * doc/bison.texinfo (Destructor Decl): Mention more reasons
3077 why destructors might be called. 1.875 -> 2.1.
3078 (Destructor Decl, Decl Summary, Table of Symbols):
3079 Some English-language cleanups for %destructor.
3080 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3081 Add output line for destructor of start symbol.
3082 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
3083 because of that same extra output line.
3084
1a059451
PE
3085 * NEWS: Document minor wording changes in diagnostics of
3086 Bison-generated parsers.
3087 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
3088 Remove unused formals. All uses changed.
3089 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
3090 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
3091 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
3092 Rename yyoverflowab to yyexhaustedlab.
3093 When memory exhaustion occurs during syntax-error reporting,
3094 report it separately rather than in a single diagnostic; this
3095 eases translation.
3096 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
3097 (Memory Exhausted): Renamed from Parser Stack Overflow.
3098 Revamp wording slightly to prefer "memory exhaustion".
3099 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
3100
97460c78
PE
3101 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
3102
30757c8c
PE
3103 Add i18n support to the GLR skeleton. Partially fix the C++
3104 skeleton; a C++ expert needs to finish this. Remove debugging
3105 msgids; there's little point to having them translated, since they
3106 can be understood only by someone who can read the
3107 (English-language) source code.
3108
3109 Generate runtime-po/bison-runtime.pot automatically, so that we
3110 don't have to worry about garbage getting in that file. We'll
3111 make sure after the next official release that old msgids don't
3112 get lost. See
3113 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
3114
3115 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
3116 Now auto-generated.
3117 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
3118 Fix typos in explanations of the runtime file.
3119 * bootstrap: Change gettext keyword from YYI18N to YY_.
3120 Use standard Makefile.in.in in runtime-po, since we'll arrange
3121 for backward-compatible bison-runtime.po files in a different way.
3122 * data/glr.c (YY_): New macro, from yacc.c.
3123 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
3124 Translate messages intended for users.
3125 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
3126 the wording in the other skeletons. We don't know that the memory
3127 is virtual.
3128 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
3129 Use same method that yacc.c uses.
3130 Don't translate debugging messages.
3131 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
3132 it doesn't work (yet), and requires C++ expertise to fix.
3133 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
3134 Move defn to a more logical place, to be consistent with other
3135 skeletons.
3136 Don't translate debugging messages.
3137 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
3138 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
3139 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
3140 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
3141
ac8c5689
PE
3142 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
3143 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
3144 void, not int.
3145 * tests/glr-regression.at (Badly Collapsed GLR States):
3146 Likewise.
3147 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3148 yylex should return 0 at EOF rather than aborting.
3149
6100a9aa
PE
3150 Improve tests for stack overflow in GLR parser.
3151 Problem reported by twlevo@xs4all.nl.
3152 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
3153 All uses removed.
3154 (yyStackOverflow): Just longjmp, but with value 2 so that caller
3155 can handle the problem.
3156 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
3157 (yyparse): New local variable yyresult to record the result.
3158 Use result of setjmp to set it, rather than storing itinto
3159 struct.
3160 (yyDone): Remove label.
3161 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
3162 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
3163 if YYABORT is used).
3164 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
3165 yyparse status; put status > 1 into diagnostic.
3166 Check that status==2 works.
3167 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
3168 Use exit status 3 for failure to open (which shouldn't happen).
3169
15f40952
PE
31702005-07-17 Paul Eggert <eggert@cs.ucla.edu>
3171
67fd79c4
PE
3172 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
3173 1 on syntax error; just let yyparse do its thing.
3174 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
3175 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
3176 (Exploding the Stack Size with Alloca):
3177 (Exploding the Stack Size with Malloc):
3178 Expect exit status 2, not 1, since the parser is supposed to blow
3179 its stack. Problem reported by twlevo@xs4all.nl.
3180
15f40952
PE
3181 * data/glr.c (yyparse): Don't assume that the initial calls
3182 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
3183 Print a stack-overflow message and fail instead.
3184 Initialize the line-number information before creating the stack,
3185 so that the stack-overflow message can report line zero safely.
3186
f32c66b5
PE
31872005-07-14 Paul Eggert <eggert@cs.ucla.edu>
3188
a22ff96f 3189 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
3190 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
3191 (yyuserMerge): Provide a default case if b4_mergers is empty.
3192 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
3193 * tests/glr-regression.at
3194 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 3195 Add casts to pacify C++ compilers.
1beb0b24
PE
3196 * tests/glr-regression.at (Improper merging of GLR delayed action
3197 sets): Declare yylex before using it.
f32c66b5 3198 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
3199 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
3200 test for valgrind; valgrind is independent of g++.
3201 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
3202 for compatibility with POSIX 1003.1-2001 (if running coreutils).
3203 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
3204 Use a destructor, so that we can expand the stack. Change
3205 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 3206
d741bd1b
PE
32072005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3208
3209 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
3210 a valgrind failure. Problem reported by twlevo@xs4all.nl.
3211
0410a6e0
PE
32122005-07-13 Paul Eggert <eggert@cs.ucla.edu>
3213
3214 * PACKAGING: New file, suggested by Bruno Haible and taken from
3215 similar wording in gettext's PACKAGING file.
3216 * NEWS: Mention PACKAGING.
3217 * Makefile.am (EXTRA_DIST): Add PACKAGING.
3218
f7ab6a50
PE
32192005-07-12 Paul Eggert <eggert@cs.ucla.edu>
3220
baf785db 3221 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
3222 * bootstrap: Get runtime translations into runtime-po.
3223 Create runtime-po files automatically, if possible.
3224 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
3225 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
3226 does not infringe on the user's name space.
3227 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
3228 * doc/bison.texinfo (Internationalization): Revamp the English
3229 and Texinfo syntax a bit, to try to make it clearer.
3230 (Bison Options, Option Cross Key): Mention --print-localedir.
3231 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
3232 YYENABLE_NLS. Quote a bit more.
3233 * runtime-po/.cvsignore: New file.
3234 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
3235 * runtime-po/Rules-quot: Remove; now created by bootstrap.
3236 * runtime-po/quot.sed: Likewise.
3237 * runtime-po/boldquot.sed: Likewise.
3238 * runtime-po/en@quot.header: Likewise.
3239 * runtime-po/en@boldquot.header: Likewise.
3240 * runtime-po/insert-header.sin: Likewise.
3241 * runtime-po/remove-potcdate.sin: Likewise.
3242 * runtime-po/Makevars: Likewise.
3243 * runtime-po/LINGUAS: Likewise.
3244 * runtime-po/de.po: Likewise; we will rely on the translation project
3245 to maintain this, so "bootstrap" should get it.
0410a6e0 3246 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
3247 its value.
3248 * src/main.c (main): Bind the bison-runtime domain, too.
3249
32502005-07-12 Bruno Haible <bruno@clisp.org>
3251
3252 * data/yacc.c: Include <libintl.h> when NLS is enabled.
3253 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
3254 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
3255 * runtime-po: New directory.
3256 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
3257 $(DOMAIN).pot-update rule, so that old messages are never dropped.
3258 * runtime-po/Rules-quot: New file, copied from po/.
3259 * runtime-po/quot.sed: Likewise.
3260 * runtime-po/boldquot.sed: Likewise.
3261 * runtime-po/en@quot.header: Likewise.
3262 * runtime-po/en@boldquot.header: Likewise.
3263 * runtime-po/insert-header.sin: Likewise.
3264 * runtime-po/remove-potcdate.sin: Likewise.
3265 * runtime-po/Makevars: New file.
3266 * runtime-po/POTFILES.in: New file.
3267 * runtime-po/LINGUAS: New file.
3268 * runtime-po/bison-runtime.pot: New file.
3269 * runtime-po/de.po: New file.
3270 * m4/bison.m4: New file.
3271 * Makefile.am (SUBDIRS): Add runtime-po.
3272 (aclocaldir, aclocal_DATA): New variables.
3273 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
3274 Define aclocaldir.
3275 * src/getargs.c (usage): Document --print-localedir option.
3276 (PRINT_LOCALEDIR_OPTION): New enum item.
3277 (long_options): Add --print-localedir option.
3278 (getargs): Handle --print-localedir option.
3279 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
3280 (Internationalization): New section.
3281
22dda0f0
AD
32822005-07-12 Akim Demaille <akim@epita.fr>
3283
3284 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
3285 for consistency with the rest of the code.
3286 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
3287 Add separators.
3288
82b248ad
AD
32892005-07-12 Akim Demaille <akim@epita.fr>
3290
3291 * src/parse-gram.y: Use %printer instead of YYPRINT.
3292
fa0e9314
AD
32932005-07-12 Akim Demaille <akim@epita.fr>
3294
867a3e00
AD
3295 * src/symtab.h, src/symtab.c (symbol_print): New.
3296 * src/symlist.h, src/symlist.c (symbol_list_print): New.
3297 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
3298
32992005-07-12 Akim Demaille <akim@epita.fr>
3300
3301 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
3302 b4_at_dollar and b4_dollar_dollar.
3303
e054b190
PE
33042005-07-11 Paul Eggert <eggert@cs.ucla.edu>
3305
3306 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
3307 and Pennello's paper.
3308
34160ec4
PE
33092005-07-09 Paul Eggert <eggert@cs.ucla.edu>
3310
407d4a75
PE
3311 * data/yacc.c (yyparse): Undo previous patch. Instead,
3312 set yylsp[0] and yyvsp[0] only if the initial action
3313 sets yylloc and yylval, respectively.
3314
34160ec4
PE
3315 * data/yacc.c (yyparse): In the initial action, set
3316 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
3317 This avoids the use of undefined variables if the initial
3318 action does not set yylloc and/or yylval.
3319
c3d5a4a7
PE
33202005-07-07 Paul Eggert <eggert@cs.ucla.edu>
3321
b34d96c1
PE
3322 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
3323 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
3324 Remove from CVS. These files are automatically generated.
3325 * examples/extexi: Clarify that this file is now part of Bison,
3326 not GNU M4, and that it works with any POSIX-compatible Awk.
3327 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
3328 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
3329 so that we also get calc++-parser.yy. Geneate it.
3330 Use $(AWK), not gawk, since any conforming Awk will do.
3331 Put comment before action, since older 'make' can't handle comment
3332 in action.
3333 $(BUILT_SOURCES): List all built sources, not just some of them.
3334 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
3335 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
3336 $($(calc_sources_generated)): Remove unnecessary test for existence
3337 of target. (This had a shell syntax error anyway; a stray "x".)
3338 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
3339 calc++-parser.yy.
3340 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
3341
c3d5a4a7
PE
3342 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
3343 implied by the other modules.
3344
828c373b
AD
33452005-07-06 Akim Demaille <akim@epita.fr>
3346
3347 Bind examples/calc++ to the package.
3348 * examples/calc++/Makefile: Remove, replaced by...
3349 * examples/calc++/Makefile.am: ... this new file.
3350 * examples/calc++/test: Remove input.
3351 * examples/calc++/compile: Remove.
3352 * examples/Makefile.am: New.
3353 * configure.ac, Makefile.am: Adjust.
3354 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
3355
63cb01d6
PE
33562005-07-05 Paul Eggert <eggert@cs.ucla.edu>
3357
fd2df2ed
PE
3358 * data/glr.c (yyFail): Drastically simplify; since the format argument
3359 never had any % directives, we can simply pass it to yyerror.
3360 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
3361 be modified later, as that is the usual style in glr.c.
3362 Problems reported by Paul Hilfinger.
3363
63cb01d6
PE
3364 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
3365 and size overflow errors.
3366 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
3367 in case the user prolog sets feature-test macros like _GNU_SOURCE.
3368 (YYSIZEMAX): New macro.
3369 (yystpcpy): New function, taken from yacc.c.
3370 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
3371 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
3372 so that we don't have to maintain their signatures.
3373 (yyFail): Check for buffer overflow, by using vsnprintf rather
3374 than vsprintf. Allocate a bigger buffer if possible.
3375 Report an error if buffer allocation fails.
3376 (yyStackOverflow): New function.
3377 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
3378 the initialization was successful. It might fail if storage was
3379 exhausted.
3380 (yyexpandGLRStack): Add more checks for storage allocation failure.
3381 Use yyStackOverflow to report failures.
3382 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
3383 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
3384 Don't assume stack number fits in int.
3385 (yysplitStack): Check for storage allocation failure.
3386 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
3387 can print diagnostics on storage allocation failure. All callers
3388 changed.
3389 (yyresolveValue): Use yybool for boolean.
3390 (yyreportSyntaxError): Check for size-calculation overflow.
3391 This code is taken from yacc.c.
3392 (yyparse): Check for storage allocation errors when allocating
3393 the initial stack.
3394
1c59e0a1
AD
33952005-07-05 Akim Demaille <akim@epita.fr>
3396
3397 Extract calc++ from the documentation.
3398 * doc/bison.texinfo (Calc++): Add the extraction marks.
3399 * examples/extexi: New, from the aborted GNU Programming 2E.
3400 Separate the different paragraph of a file with empty lines.
3401 * examples/Makefile: Use it to extract the whole calc++ example.
3402
8a0adb01
AD
34032005-06-24 Akim Demaille <akim@epita.fr>
3404
3405 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
3406 class typedefs.
3407
12545799
AD
34082005-06-22 Akim Demaille <akim@epita.fr>
3409
3410 * doc/bison.texinfo (C++ Language Interface): First stab.
3411 (C++ Parsers): Remove.
3412
99be0235
AD
34132005-06-22 Akim Demaille <akim@epita.fr>
3414
3415 * data/lalr1.cc (yylex_): Honor %lex-param.
3416
0ffd4fd1
AD
34172005-06-22 Akim Demaille <akim@epita.fr>
3418
3419 Start a set of simple examples.
3420 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
3421 * examples/calc++/calc++-driver.hh,
3422 * examples/calc++/calc++-parser.yy,
3423 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
3424 * examples/calc++/compile, examples/calc++/test: New.
3425
0925ebb4
PE
34262005-06-09 Paul Eggert <eggert@cs.ucla.edu>
3427
3428 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
3429 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
3430 which stems from the 2005-05-27 patch.
3431
43d3b664
PH
34322005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3433
3434 * data/glr.c: Modify treatment of unused parameters to permit use
3435 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
3436
3062864d
PE
34372005-05-30 Paul Eggert <eggert@cs.ucla.edu>
3438
3439 Fix infringement on user name space reported by Janos Zoltan Szabo.
3440 * data/yacc.c (yyparse): strlen -> yystrlen.
3441
989b5b8e
AD
34422005-05-30 Akim Demaille <akim@epita.fr>
3443
3444 * data/lalr1.cc (_): New.
3445 Translate the various messages.
3446
bedf57f5
PE
34472005-05-27 Paul Eggert <eggert@cs.ucla.edu>
3448
3449 Fix infringement on user name space reported by Bruno Haible.
3450 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
3451 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
3452 the user's name space.
3453 (alloca): Include <stdlib.h> to get it, if it's not built in.
3454 (YYMALLOC, YYFREE): Define only if needed.
3455 (malloc, free): Declare, but only if needed, as this infringes on
3456 the user name space.
3457
4d1801f1
PE
34582005-05-25 Paul Eggert <eggert@cs.ucla.edu>
3459
3460 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
3461 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
3462 with %d format.
3463 * lib/ebitset.c (min, max): Undef before defining.
3464 * lib/vbitset.c (min, max): Likewise.
3465 * lib/subpipe.c (create_subpipe): Save local variables in case
3466 vfork clobbers them.
3467
34682005-05-24 Bruno Haible <bruno@clisp.org>
3469
3470 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
3471 error message syntax used by gcc-4.0.
3472
b94a9e1e
PE
34732005-05-23 Paul Eggert <eggert@cs.ucla.edu>
3474
85ac3861
PE
3475 * README: Mention m4 1.4.3. Remove obsolete advice about
3476 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
3477
b94a9e1e
PE
3478 * bootstrap: Remove workaround for problem I encountered with
3479 gettext 0.14.1; it seems to be fixed now.
3480
51c30d21
PE
34812005-05-22 Paul Eggert <eggert@cs.ucla.edu>
3482
009ce67d
PE
3483 * NEWS: Version 2.0a.
3484
f2a97c62
PE
3485 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
3486 the previous change.
3487
c8775f93
PE
3488 Various maintainer cleanups.
3489 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
3490 conftest*, for benefit of CVS commands run at the same time as
3491 "configure". Add build-aux, since "bootstrap" now creates it and
3492 its subfiles.
3493 * Makefile.cfg (move_if_change): Remove.
3494 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
3495 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
3496 (po_repo, do-po-update, po-update, wget_files, get-targets):
3497 (config.guess-url_prefix, config.sub-url_prefix):
3498 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
3499 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
3500 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
3501 Remove.
3502 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
3503 this is now the recommended name.
3504 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
3505 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
3506 ylwrap. These files now go into build-aux.
3507 * config/move-if-change: Remove.
3508 * config/prev-version.txt: Bump from 1.75 to 2.0.
3509
3ea5f0ec
PE
3510 * bootstrap: Add stdio-safer, unistd-safer modules.
3511 Remove m4/glibc2.m4 (introduced by latest gnulib, but
3512 we don't need it).
3513 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
3514 fopen-safer.c, stdio-safer.h, unistd-safer.h.
3515 * lib/subpipe.c: Include "unistd-safer.h".
3516 (create_subpipe): Make sure all the newly-created
3517 file descriptors are > 2, so that diagnostics don't
3518 get sent down them (which might cause Bison to hang, in theory).
3519 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
3520 * src/files.c (xfopen): Use fopen_safer, not fopen.
3521
51c30d21
PE
3522 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
3523 yesterday's yacc.c fix.
3524
cea1469d
PE
35252005-05-21 Paul Eggert <eggert@cs.ucla.edu>
3526
3ea5f0ec
PE
3527 * data/glr.c, data/lalr1.cc: Update copyright date.
3528
cea1469d
PE
3529 Fix a destructor bug reported by Wolfgang Spraul in
3530 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
3531 * data/yacc.c (yyabortlab): Don't call destructor, and
3532 don't set yychar to EMPTY.
3533 (yyoverflowlab): Don't call destructor.
3534 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
3535 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
3536 since we no longer output the message "discarding lookahead token
3537 end of input ()".
3538
5e6f62f2
PH
35392005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3540
3541 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
3542 fix a small glitch in debugging output.
3543 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
3544 after YY_SYMBOL_PRINT where needed.
3545
3546 (struct yyGLRState): Add some comments.
3547 (struct yySemanticOption): Add some comments.
3548 (union yyGLRStackItem): Add comment.
3549
3550 (yymergeOptionSets): Correct this to properly perform the union,
3551 avoiding infinite reported by Michael Rosien.
3552 Update comment.
3553
3554 * tests/glr-regression.at: Add test for GLR merging error reported
3555 by M. Rosien.
cea1469d 3556
0fb669f9
PE
35572005-05-13 Paul Eggert <eggert@cs.ucla.edu>
3558
3559 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
3560 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
3561 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
3562 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
3563 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
3564 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
3565 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
3566 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
3567 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
3568 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
3569 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
3570 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
3571 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
3572 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
3573 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
3574 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
3575 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
3576 src/derives.h, src/files.c, src/files.h, src/getargs.c,
3577 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
3578 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
3579 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
3580 src/output.h, src/parse-gram.c, src/parse-gram.h,
3581 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
3582 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
3583 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
3584 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
3585 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
3586 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
3587 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
3588 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
3589 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
3590 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
3591 tests/reduce.at, tests/regression.at, tests/sets.at,
3592 tests/synclines.at, tests/testsuite.at, tests/torture.at:
3593 Update FSF postal mail address.
3594
51f4735e
PE
35952005-05-11 Paul Eggert <eggert@cs.ucla.edu>
3596
3597 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
3598 Problem reported by Ralf Menzel.
3599
80ce3401
PE
36002005-05-01 Paul Eggert <eggert@cs.ucla.edu>
3601
3602 * tests/actions.at: Test that stack overflow invokes destructors.
3603 From Marcus Holland-Moritz.
3604 * data/yacc.c (yyerrlab): Move the code that destroys the stack
3605 from here....
3606 (yyreturn): to here. That way, destructors are called properly
3607 even if the stack overflows, or the user calls YYACCEPT or
3608 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
3609 (yyoverflowlab): Destroy the lookahead.
3610
36112005-04-24 Paul Eggert <eggert@cs.ucla.edu>
3612
3613 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
3614
72f000b0
PE
36152005-04-17 Paul Eggert <eggert@cs.ucla.edu>
3616
3617 * NEWS: Bison-generated C parsers no longer quote literal strings
3618 associated with tokens.
3619 * src/output.c (prepare_symbols): Don't escape strings,
3620 since users don't want to see C escapes.
3621 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
3622 in diagnostics.
c19683bb 3623 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
3624 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
3625
1094323f
PE
36262005-04-16 Paul Eggert <eggert@cs.ucla.edu>
3627
3628 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
3629 the data size is known to be too small and we can't increase it.
3630 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
3631
ca407bdf
PE
36322005-04-15 Paul Eggert <eggert@cs.ucla.edu>
3633
3634 * src/parse-gram.y: Include quotearg.h.
3635 (string_as_id): Quote $1 before using it as a key, since the
3636 lexer no longer quotes it for us.
3637 (string_content): Don't strip quotes, since lexer no longer
3638 quotes it for us.
3639 * src/scan-gram.l: Include quotearg.h.
3640 ("\""): Omit quote.
3641 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
3642 a key, since the rest of the lexer doesn't quote it.
3643 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
3644 * tests/regression.at (Token definitions): Check for backslashes
3645 in token strings.
3646
3647 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
3648 (YYSIZE_T): Define to unsigned long int when using an older compiler.
3649 (yyparse): Revamp code to generate long syntax error message, to
3650 make it easier to translate, and to avoid problems with arithmetic
3651 overflow. Change "virtual memory" to "memory" in diagnostic, since
3652 we don't know whether the memory is virtual.
3653
1ce59070
PE
36542005-04-13 Paul Eggert <eggert@cs.ucla.edu>
3655
3656 * NEWS: Bison-generated C parsers now use the _ macro to
3657 translate strings.
3658 * data/yacc.c (_) [!defined _]: New macro.
3659 All English strings wrapped inside this macro.
3660 * doc/bison.texinfo (Bison Parser): Document _.
3661 * po/POTFILES.in: Include src/parse-gram.c, since it now
3662 includes translateable strings that parse-gram.y doesn't.
3663
a749a695
PE
36642005-04-12 Paul Eggert <eggert@cs.ucla.edu>
3665
3666 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
3667 reverting the 2004-10-11 change to this function.
3668 (symbol_check_alias_consistency): Don't call symbol_type_set
3669 if the type name is already correct.
3670 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
3671
8fb1053b
PE
36722005-03-25 Paul Eggert <eggert@cs.ucla.edu>
3673
3674 * tests/regression.at (Token definitions): Don't use a token named
3675 c, as that generates a "#define c ..." that runs afoul of buggy
3676 stdlib.h that uses the identifier c as a member of struct
3677 drand48_data. Problem reported by Horst Wente.
3678
ff498c4a
PE
36792005-03-21 Paul Eggert <eggert@cs.ucla.edu>
3680
3681 * bootstrap: Change translation URL from
3682 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
3683 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
3684 redirection glitches. Problem reported by twlevo@xs4all.nl.
3685
65211d70
PE
36862005-03-20 Paul Eggert <eggert@cs.ucla.edu>
3687
3688 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
3689 after operands; POSIX says this isn't portable for the c99 command.
3690
9577fb1f
PE
36912005-03-18 Paul Eggert <eggert@cs.ucla.edu>
3692
3693 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
3694 immediately if a data overrun has occurred; this may help us track
3695 down what may be a spurious failure on MacOS.
3696
78b178f7
PE
36972005-03-17 Paul Eggert <eggert@cs.ucla.edu>
3698
a2599d0f
PE
3699 Respond to problems reported by twlevo@xs4all.nl.
3700
3701 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
3702
78b178f7
PE
3703 * src/vcg.h: Comment fix.
3704 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
3705 (G_CMAX): Change to -1 instead of INT_MAX.
3706
3707 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 3708
7296e729
PE
37092005-03-15 Paul Eggert <eggert@cs.ucla.edu>
3710
3711 * src/tables.c (state_number_to_vector_number): Put it inside an
3712 "#if 0", since it's not currently used. Problem reported by
3713 Roland McGrath.
3714
05ac60f3
PE
37152005-03-06 Paul Eggert <eggert@cs.ucla.edu>
3716
3717 * src/output.c (escaped_output): Renamed from
3718 escaped_file_name_output, since we now use it for symbol tags as
3719 well. All uses changed.
3720 (symbol_destructors_output, symbol_printers_output):
3721 Escape symbol tags too.
3722 Problem reported by Matyas Forstner in
3723 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
3724
3725 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
3726 not needed.
3727 * src/output.c (user_actions_output, token_definitions_output,
3728 symbol_destructors_output, symbol_printers_output): Likewise.
3729 * src/reader.c (prologue_augment): Likewise.
3730 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
3731
3732 * src/vcg.c (output_edge): Don't quote linestyle arg.
3733 Problem reported by twlevo@xs4all.nl.
3734
7eb453ac
PE
37352005-02-28 Paul Eggert <eggert@cs.ucla.edu>
3736
3737 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
3738 example, reported by Derek M Jones. Also, make the example even
3739 more outrageous, to better illustrate how bad the problem is.
3740
4c04c52a
PE
37412005-02-24 Paul Eggert <eggert@cs.ucla.edu>
3742
3743 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
3744 putsym. Typo reported by Sebastian Piping.
3745
a61e1620
PE
37462005-02-23 Paul Eggert <eggert@cs.ucla.edu>
3747
3748 * doc/bison.texinfo (Language and Grammar): some -> same
3749 (Epilogue): int he -> in the
3750 Typos reported by Sebastian Piping via Justin Pence.
3751
9ec93868
PE
37522005-02-07 Paul Eggert <eggert@cs.ucla.edu>
3753
3754 * tests/glr-regression.at (Improper handling of embedded actions
3755 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
3756 embedded actions and $-N in GLR parsers", work around an Autoconf bug
3757 with dollar signs in test names.
3758 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
3759 for a similar reason.
3760
73ce7e7e
PE
37612005-01-28 Paul Eggert <eggert@cs.ucla.edu>
3762
3763 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
3764 wants to redefine G_VIEW.
3765
2e72b98e
PE
37662005-01-27 Paul Eggert <eggert@cs.ucla.edu>
3767
3768 * src/vcg.c (get_view_str): Remove case for normal_view.
3769 Problem reported by twlevo@xs4all.nl.
3770
e0d634e5
PE
37712005-01-24 Paul Eggert <eggert@cs.ucla.edu>
3772
ccf830a4
PE
3773 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
3774 Problem reported by twlevo@xs4all.nl.
3775
e0d634e5
PE
3776 * doc/bison.texinfo: Change @dircategory from "GNU programming
3777 tools" to "Software development". Requested by Richard Stallman
3778 via Karl Berry.
3779
7bbc8cb0
PE
37802005-01-23 Paul Eggert <eggert@cs.ucla.edu>
3781
3782 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
3783 Problem reported by twlevo@xs4all.nl.
3784
08b770bc
PE
37852005-01-21 Paul Eggert <eggert@cs.ucla.edu>
3786
3787 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
3788 keyword; it's not needed with modern compilers, and it doesn't
3789 affect correctness with older compilers. Suggested by
3790 twlevo@xs4all.nl.
3791
95f22ad2
PE
37922005-01-17 Paul Eggert <eggert@cs.ucla.edu>
3793
3794 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
3795 gcc -Wswitch-default.
3796 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
3797 * data/yacc.c (yyparse): Likewise.
3798
d229d15c
PE
37992005-01-12 Paul Eggert <eggert@cs.ucla.edu>
3800
3801 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
3802 already. Let config.h define any nonstandard values.
3803
ecadd90f
PE
38042005-01-10 Paul Eggert <eggert@cs.ucla.edu>
3805
3806 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
3807 for the benefit of slower hosts. Problem reported by
3808 Nelson H. F. Beebe.
3809
213744b5
PE
38102005-01-07 Paul Eggert <eggert@cs.ucla.edu>
3811
3812 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
3813 being defined and not used.
3814 * data/lalr1.cc (yyparse): Likewise.
3815 Use "if (false)" rather than "if (0)".
3816
249d3236
PE
38172005-01-05 Paul Eggert <eggert@cs.ucla.edu>
3818
3819 * TODO: Mention that we should allow NUL bytes in tokens.
3820
987cc1fb
PE
38212005-01-02 Paul Eggert <eggert@cs.ucla.edu>
3822
3823 * src/scan-skel.l (<<EOF>>): Don't close standard output.
3824 Problem reported by Hans Aberg.
3825
08fe02d9
PE
38262005-01-01 Paul Eggert <eggert@cs.ucla.edu>
3827
3828 * src/getargs.c (version): Happy new year; update overall
3829 program copyright date from 2004 to 2005.
3830
3831 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
3832 Problem reported by Hans Aberg.
3833 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
3834 (Output file names.): Add a test for the case when standard output
3835 is closed.
3836
010c0266
PE
38372004-12-26 Paul Eggert <eggert@cs.ucla.edu>
3838
3839 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
3840 to fix an oversight in the Bison 2.0 manual.
3841
da12206a
PE
38422004-12-25 Paul Eggert <eggert@cs.ucla.edu>
3843
3844 * NEWS: Version 2.0. Reformat the existing news items since
3845 1.875, so that related items are grouped together.
3a4734aa 3846 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
3847 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
3848
c935d934
PE
3849 * tests/torture.at (Exploding the Stack Size with Alloca): Set
3850 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
3851 otherwise, we're not testing alloca. Unfortunately there's no
3852 simple way to consult HAVE_ALLOCA here.
3853
da12206a
PE
3854 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
3855 for yymsg, too.
3856
3857 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
3858 hand. This avoids a warning about comparing int to size_t when
3859 GCC warnings are enabled.
3860
0a2c5137
PE
38612004-12-22 Paul Eggert <eggert@cs.ucla.edu>
3862
d7e14fc0
PE
3863 * NEWS: Bison-generated parsers no longer default to using the
3864 alloca function (when available) to extend the parser stack, due
3865 to widespread problems in unchecked stack-overflow detection.
3866 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
3867 responsibility to set it to a positive value. This lets the user
3868 specify a value that is not a preprocessor constant.
3869 * data/yacc.c (YYMAXDEPTH): Likewise.
3870 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
3871 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
3872 to be a compile-time constant. However, explain the constraints on it.
3873 Also, explain the constraints on YYINITDEPTH.
3874 (Table of Symbols): Explain that alloca is no longer the default.
3875 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
3876 to 1.
3877
0a2c5137
PE
3878 * doc/bison.texinfo (Location Default Action): Mention that n must
3879 be zero when k is zero. Suggested by Frank Heckenbach.
3880
e019c247
AD
38812004-12-22 Akim Demaille <akim@epita.fr>
3882
3883 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
3884 (parser::state_type, parser::semantic_type, parser::location_type):
3885 Private, not public.
3886 (parser::parse): Return ints, not bool.
3887 Returning a bool introduces a problem: 0 corresponds to false, and
3888 it seems weird to return false on success. Returning true changes
3889 the conventions for yyparse.
3890 Alternatively we could return void and send an exception.
3891 There is no clear consensus (yet?).
3892 (state_stack, semantic_stack, location_stack): Rename as...
3893 (state_stack_type, semantic_stack_type, location_stack_type): these.
3894 Private, not public.
3895 * tests/c++.at: New.
3896 * tests/testsuite.at, tests/Makefile.am: Adjust.
3897
72731bb7
AD
38982004-12-21 Akim Demaille <akim@epita.fr>
3899
3900 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
3901
9a0d8bec
AD
39022004-12-21 Akim Demaille <akim@epita.fr>
3903
3904 Don't impose std::string for filenames.
3905
3906 * data/lalr1.cc (b4_filename_type): New.
3907 (position::filename): Use it.
3908 (parser.hh): Move the inclusion of stack.hh and location.hh below
3909 the user code, so that needed headers for the filename type can be
3910 included first.
72731bb7
AD
3911 Forward declare them before the user code.
3912 * tests/Makefile.am (check-local, installcheck-local): Pass
3913 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 3914
99880de5
AD
39152004-12-20 Akim Demaille <akim@epita.fr>
3916
3917 Use more STL like names: my_class instead of MyClass.
3918
3919 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
3920 (SemanticStack, SemanticType, StateStack, StateType)
3921 (TokenNumberType, Stack, Slice, Traits, Parser::location)
3922 (Parser::value): Rename as...
3923 (location_stack, location_type, rhs_number_type, semantic_stack)
3924 (semantic_type, state_stack, state_type, token_number_type, stack)
3925 (slice, traits, parser::yylloc, parser::yylval): these.
3926
3927 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
3928
9bec482e
PE
39292004-12-19 Paul Eggert <eggert@cs.ucla.edu>
3930
3931 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
3932 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
3933
f6fbd3da
PE
39342004-12-17 Paul Eggert <eggert@cs.ucla.edu>
3935
3936 Remove uses of 'short int' and 'unsigned short int'. This raises
3937 some arbitrary limits. It uses more memory but nowadays that's
3938 not much of an issue.
3939
3940 This change does not affect the generated parsers; that's a different
3941 task, as some users will want to conserve memory there.
3942
3943 Ideally we should use size_t to represent all object counts, and
3944 something like ptrdiff_t to represent signed differences of object
3945 counts; but that will require more code-cleanup than I have the
3946 time to do right now.
3947
3948 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
3949 Use size_t, not int or short int, to count objects.
3950 * src/closure.c (nritemset, closure): Likewise.
3951 * src/closure.h (nritemset, closure): Likewise.
3952 * src/nullable.c (nullable_compute): Likewise.
3953 * src/print.c (print_core): Likewise.
3954 * src/print_graph.c (print_core): Likewise.
3955 * src/state.c (state_compare, state_hash): Likewise.
3956 * src/state.h (struct state): Likewise.
3957 * src/tables.c (default_goto, goto_actions): Likewise.
3958
3959 * src/gram.h (rule_number, rule): Use int, not short int.
3960 * src/output.c (prepare_rules): Likewise.
3961 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
3962 errs, reductions): Likewise.
3963 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
3964 Likewise.
3965 * src/tables.c (vector_number, tally, action_number,
3966 ACTION_NUMBER_MINIMUM): Likewise.
3967 * src/output.c (muscle_insert_short_int_table): Remove.
3968
efeed023
AD
39692004-12-17 Akim Demaille <akim@epita.fr>
3970
3971 * data/lalr1.cc: Extensive Doxygenation.
3972 (error_): Rename as...
3973 (error): this, since it is visible to the user.
3974 Adjust callers.
3975 (Parser::message): Now an automatic variable from...
3976 (Parser::yyreport_syntax_error_): here.
3977 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
3978 Parser::error.
3979 * tests/input.at: Escape $.
3980
bc82c5a5
PE
39812004-12-16 Paul Eggert <eggert@cs.ucla.edu>
3982
3983 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
3984 Parenthesize rhs to avoid obscure problems with mistakes like
3985 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
3986 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3987 b4_rhs_location): Likewise.
3988 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
3989 b4_rhs_location): Likewise.
3990
fd19f271
AD
39912004-12-16 Akim Demaille <akim@epita.fr>
3992
3993 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
3994 yacc.c: be sure to stay within yycheck_.
3995 * tests/actions.at: Re-enable C++ tests.
3996
10454ea4
AD
39972004-12-16 Akim Demaille <akim@epita.fr>
3998
3999 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
4000 real.
4001
c5b95ccf
AD
40022004-12-16 Akim Demaille <akim@epita.fr>
4003
4004 Use #define to handle the %name-prefix.
4005
4006 * data/glr.c, data/yacc.c: Comment changes.
4007 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
4008 so that one can refer to yylex in the parser file, and have it
4009 renamed, as is the case with other skeletons.
4010
617a8f12
AD
40112004-12-16 Akim Demaille <akim@epita.fr>
4012
4013 Move lalr1.cc internals into yy*.
4014
4015 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
4016 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
4017 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
4018 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
4019 (empty_, final_, terror_, errcode_, ntokens_)
4020 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
4021 (looka_, ilooka_, error_range_, nerrs_):
4022 Rename as...
4023 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
4024 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
4025 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
4026 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
4027 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
4028 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
4029 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
4030 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
4031 these.
4032
1e547e6e
PE
40332004-12-15 Paul Eggert <eggert@cs.ucla.edu>
4034
4035 Fix some problems reported by twlevo at xs4all.
4036 * src/symtab.c (symbol_new): Report an error if the input grammar
4037 contains too many symbols. This is better than calling abort() later.
4038 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
4039 (struct node, struct graph):
4040 Rename member expand to stretch. All uses changed.
4041 (struct graph): Remove member layoutalgorithm. All uses removed.
4042 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
4043 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
4044 All uses changed.
4045 (N_STRETCH): Rename from N_EXPAND. All uses changed.
4046
735d6bd4
AD
40472004-12-15 Akim Demaille <akim@epita.fr>
4048
4049 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
4050 Add more Doxygen comments.
4051 (symprint_, stack_print_, reduce_print_, destruct_, pop)
4052 (report_syntax_error_, translate_): Rename as...
4053 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
4054 (yypop_, yyreport_syntax_error_, yytranslate_): this.
4055
2e1f5829
AD
40562004-12-15 Akim Demaille <akim@epita.fr>
4057
4058 * data/lalr1.cc (lex_): Rename as...
4059 (yylex_): this.
4060 Move the trace here.
4061 Take the %name-prefix into account.
4062 Reported by Alexandre Duret-Lutz.
4063
a3cb6248
AD
40642004-12-15 Akim Demaille <akim@epita.fr>
4065
4066 Simplify the C++ parser constructor.
4067
4068 * data/lalr1.cc (debug_): Rename as...
4069 (yydebug_): so that the parser's internals are always in the yy*
4070 pseudo namespace.
4071 Adjust uses.
4072 (b4_parse_param_decl): Remove the leading comma as it is now only
4073 called as unique argument list.
4074 (Parser::Parser): Remove the constructor accepting a location and
4075 an initial debugging level.
4076 Remove from the other ctor the argument for the debugging level.
4077 (debug_level_type, debug_level, set_debug_level): New.
4078
4079 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
4080 constructor calls.
4081
07fed891
AD
40822004-12-15 Akim Demaille <akim@epita.fr>
4083
4084 Remove b4_root related material: failure experiment
a3cb6248 4085 (which goal was to allow to derive from a class).
07fed891
AD
4086
4087 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
4088 definitions and uses.
4089
e603eaa5
PE
40902004-12-14 Paul Eggert <eggert@cs.ucla.edu>
4091
4092 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
4093 not 2, since it's not portable to subtract 1 from the start of an
4094 array. The new item 0 is never set or used. All uses changed.
4095
4096 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
4097 the default definition of YYLLOC_DEFAULT. Problem reported
4098 by Frank Heckenbach.
4099
fafb007d
PE
41002004-12-12 Paul Eggert <eggert@cs.ucla.edu>
4101
4102 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
4103 the normal case and one for the error case. Just use the
4104 first one uniformly. Problem reported by Frank Heckenbach.
4105 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
4106 use exactly the same macro in both places.
4107 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
4108 so that the normal-case YYRHSLOC works for the error case too.
4109 All uses changed.
4110 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
4111 (YYLLOC_DEFAULT): Use the same macro as glr.c.
4112 * doc/bison.texinfo (Location Default Action): Don't claim that
4113 we have an array of locations. Use the same macro for both glr
4114 and lalr parsers. Mention YYRHSLOC. Mention what happens when
4115 the index is 0.
4116
48814dcd
PE
41172004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4118
a4e1a53b
PE
4119 * HACKING: Update email addresses to send announcements to.
4120
48814dcd
PE
4121 * configure.ac (AC_INIT): Bump version to 1.875f.
4122
337116ba
PE
41232004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4124
4125 * NEWS: Version 1.875e.
4126 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
4127
4128 * src/scan-skel.l: Include "complain.h", for "fatal".
4129
4130 * src/relation.h (relation_print, relation_digraph):
4131 Relation sizes are of type relation_node, not size_t (this is
4132 merely a doc fix, since the two types are equivalent).
4133 (relation_transpose): Relation sizes are of type relation_node,
4134 not int.
4135 * src/relation.c: Likewise.
4136 (top, infinity): Now of type relation_node, not int.
4137 (traverse, relation_transpose): Use relation_node, not int.
4138
4139 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
4140 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
4141 (yyparse): Remove unused local introduced in 2004-10-25 patch.
4142
4143 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 4144 specifying whether the test should be skipped. Use it tp
337116ba 4145 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 4146 fail on some hosts, and should be skipped.
337116ba 4147
da2a7671
PE
41482004-12-08 Paul Eggert <eggert@cs.ucla.edu>
4149
4150 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
4151 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
4152 unless otherwise specified below.
4153
4154 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
4155 to allocate kernel_base, kernel_items, kernel_size, since
4156 they needn't be initialized to 0.
4157 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
4158 * src/closure.c (new_closure): Likewise, for itemset.
4159 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
4160 * src/lalr.c (set_goto_map): Likewise, for temp_map.
4161 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
4162 (build_relations): Likewise for edge, states1, includes.
4163 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
4164 * src/reader.c (packgram): Likewise, for ritem, rules.
4165 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
4166 * src/relation.c (relation_digraph): Likewise for VERTICES.
4167 (relation_transpose): Likewise for new_R, end_R.
4168 * src/symtab.c (symbols_token_translations_init): Likewise for
4169 token_translations.
4170 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
4171 (token_actions): Likewise for yydefact, actrow, conflrow,
4172 conflict_list.
4173 (save_column): Likewise for froms[symno], tos[symno].
4174 (goto_actions): Likewise for state_count.
4175 (pack_table): Likewise for base, pos, check.
4176 (tables_generate): Likewise for width.
4177
4178 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
4179 for initial core. Just have a separate core, so we needn't worry
4180 about whether kernel_size and kernel_base are initialized.
4181
4182 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
4183 kernel_size, kernel_items): Remove unnecessary initialization.
4184 * src/conflicts.c (conflicts): Likewise.
4185 * src/derives.c (derives): Likewise.
4186 * src/muscle_tablc (muscle_insert): Likewise.
4187 * src/relation.c (relation_digraph): Likewise.
4188 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
4189 conflrow, conflict_table, conflict_list, table, check):
4190 Likewise.
4191
4192 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
4193 This is because all callers pass unsigned int.
4194 * src/closure.h (new_closure): Likewise.
4195
4196 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
4197 (build_relations): Initialize includes[i] in all cases.
4198 * src/reader.c (packgram): Always initialize rules[ruleno].prec
4199 and rules[ruleno].precsym. Initialize members in order.
4200 * src/relation.c (relation_transpose): Always initialize new_R[i]
4201 and end_R[i].
4202 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
4203
4204 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
4205 conflict_list[0] was always 0, but now it isn't initialized.
4206
4207 * src/table.c (table_grow): When conflict_table grew, the grown
4208 area wasn't cleared. Fix this.
4209
4210 * lib/.cvsignore: Add strdup.c, strdup.h.
4211 * m4/.cvsignore: Add strdup.m4.
4212
00baeeac
PE
42132004-12-07 Paul Eggert <eggert@cs.ucla.edu>
4214
4215 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
4216 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
4217 GOTO_NUMBER_MAXIMUM, since we occasionally compute
4218 ngotos + 1 without checking for overflow.
4219 (build_relations): Use END_NODE, not -1, to denote end of edges.
4220 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
4221 build_relations): Use goto_number, not int, for goto numbers.
4222 * src/tables.c (save_column, default_goto): Likewise.
4223
be3d9d42
AD
42242004-11-23 Akim Demaille <akim@epita.fr>
4225
4226 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
4227 of #defining from yystype.
4228 Don't typedef yystype, C++ does not need it.
4229 This lets it possible to forward declare it as union.
4230
78e526d5
PE
42312004-11-23 Paul Eggert <eggert@cs.ucla.edu>
4232
4233 * bootstrap (gnulib_modules): Add extensions.
4234 Problem reported by Jim Meyering.
4235
afbb696d
PE
42362004-11-22 Paul Eggert <eggert@cs.ucla.edu>
4237
4238 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
4239 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
4240 src/system.h, src/tables.c: XFREE -> free, to accommodate
4241 recent change to gnulib xalloc.h.
78e526d5 4242 Problem reported by Jim Meyering.
afbb696d 4243
c1f8f16a
AD
42442004-11-17 Akim Demaille <akim@epita.fr>
4245
4246 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
4247
db7e5eb5 42482004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
4249 Alexandre Duret-Lutz <adl@gnu.org>
4250
4251 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
4252 changes.
4253 (YYCDEBUG): Adjust.
4254 Use it instead of cdebug_.
4255 (Parser::debug_stream, Parser::set_debug_stream): New.
4256 (Parser::symprint_): Define cdebug_ for temporary backward
4257 compatibility.
4258 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
4259 debug_stream ().
4260
68e11668
AD
42612004-11-17 Akim Demaille <akim@epita.fr>
4262
4263 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
4264 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
4265 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
4266 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4267
97cbc73e
PE
42682004-10-27 Paul Eggert <eggert@cs.ucla.edu>
4269
4270 * data/glr.c (yyloc_default): Remove; not used.
4271 Problem reported by Frank Heckenbach.
4272
e342c3be
AD
42732004-10-25 Akim Demaille <akim@epita.fr>
4274
4275 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
4276 Introduce another definition to address simple location arrays.
4277 (yyGLRStack): New member: yyerror_range.
4278 (yyrecoverSyntaxError, yyparse): Update it.
4279 (yyrecoverSyntaxError): Use it when shifting the error token to
4280 have an accurate range, equivalent to the one computed by both
4281 yacc.c and lalr1.cc.
4282 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
4283 that column numbers start at column 0, as per GNU Coding
4284 Standards, the others tests, and the doc.
4285 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
4286 Adjust to the above change (first column is 0).
4287 And adjust the location of the "<error>", now covering the whole
4288 line.
4289
93602feb 42902004-10-22 Akim Demaille <akim@epita.fr>
04098407 4291 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
4292
4293 Remove some arbitrary limits on goto numbers and relations.
4294 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
4295 initial values, since they're never used.
4296 (set_goto_map): ngotos is now unsigned, so test for overflow
4297 by seeing whether it wraps around to zero.
4298 * src/lalr.h (goto_number): Now size_t, not short int.
4299 (GOTO_NUMBER_MAXIMUM): Remove.
4300 * src/relation.c (relation_print, traverse, relation_transpose):
4301 Check for END_NODE rather than looking at sign.
4302 * src/relation.h (END_NODE): New macro.
4303 (relation_node): Now size_t, not short int.
4304
dba08b04
PE
43052004-10-22 Paul Eggert <eggert@cs.ucla.edu>
4306
4307 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
4308 keyword, not an identifier. Problem reported by Baron Schwartz in
4309 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
4310
df09ef2e
AD
43112004-10-11 Akim Demaille <akim@epita.fr>
4312
4313 * src/symtab.c (symbol_check_alias_consistency): Also check
4314 type names, destructors, and printers.
4315 Reported by Alexandre Duret-Lutz.
4316 Recode the handling of associativity and precedence in terms
4317 of symbol_precedence_set.
4318 Accept no redeclaration at all, not even equal to the previous
4319 value.
4320 (redeclaration): New.
4321 Use it to factor redeclaration complaints.
4322 (symbol_make_alias): Don't set the type of the alias, let
4323 symbol_check_alias_consistency do it as for other features.
4324 * src/symtab.h (symbol): Add new member prec_location, and
4325 type_location.
4326 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
4327 * tests/input.at (Incompatible Aliases): New.
4328
146bc99d
PE
43292004-10-09 Paul Eggert <eggert@cs.ucla.edu>
4330
4331 .cvsignore fixes to accommodate gnulib changes,
4332 and the practice of naming build directories "_build".
4333 * .cvsignore: Add "_*". Sort.
4334 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
4335 * m4/.cvsignore: Add "*_gl.m4".
4336
e503aa60
AD
43372004-10-06 Akim Demaille <akim@epita.fr>
4338
4339 * src/parse-gram.y (add_param): Fix the truncation of trailing
4340 spaces.
4341
b4a20338
AD
43422004-10-05 Akim Demaille <akim@epita.fr>
4343
4344 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
4345 whether the reducion was empty or not. This leaves room to
4346 improve the use of YYLLOC_DEFAULT in such a case.
4347 lalr1.cc is still experimental, so changing this is acceptable.
4348 And finally, there are probably not many users who changed the
4349 handling of locations in GLR, so changing is admissible too.
4350
4351 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
4352 empty reduction, set @$ to an empty location ending the previously
4353 stacked symbol.
4354 Adjust uses to make sure the code is triggered on empty
4355 reductions.
4356 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
4357 expected output: empty reductions have empty locations.
4358
f85a5e6f
AD
43592004-09-29 Akim Demaille <akim@epita.fr>
4360
4361 * data/lalr1.cc: Move towards a more standard C++ coding style
4362 for templates: Class < T > -> Class<T>.
4363
b203fc2c
AD
43642004-09-29 Akim Demaille <akim@epita.fr>
4365
4366 * data/lalr1.cc: Reinstall the former ctor, for sake of
4367 compatibility, but warn it will be removed.
4368 Move towards a more standard C++ coding style (i.e., type *var ->
4369 type* var).
4370
5b7e1e73
PE
43712004-09-27 Paul Eggert <eggert@cs.ucla.edu>
4372
3fee967f
PE
4373 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
4374 since it's less likely to work if NULs are involved in the future.
5b7e1e73 4375
0dcca5c2
AD
43762004-09-27 Akim Demaille <akim@epita.fr>
4377
4378 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
4379
6dde1c82
AD
43802004-09-27 Akim Demaille <akim@epita.fr>
4381
4382 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 4383 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
4384 and argument names.
4385 (b4_cc_constructor_call): Likewise.
4386
b233d555
AD
43872004-09-24 Akim Demaille <akim@epita.fr>
4388
4389 * src/parse-gram.y (add_param): Strip the leading and trailing
4390 blanks from a formal argument declaration.
4391 (YY_LOCATION_PRINT): New.
4392
619404e3
AD
43932004-09-24 Akim Demaille <akim@epita.fr>
4394
4395 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
4396 after the location.
4397
dd8d9022
AD
43982004-09-24 Akim Demaille <akim@epita.fr>
4399
4400 * doc/bison.texinfo (Table of Symbols): Sort.
4401
0092f063
AD
44022004-09-21 Akim Demaille <akim@epita.fr>
4403
4404 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
4405 the useless parentheses.
4406 Suggested by Paul Eggert.
4407
451364ed
AD
44082004-09-20 Akim Demaille <akim@epita.fr>
4409
4410 Let the initial-action act on the look-ahead, and use it for the
4411 "initial push" (corresponding to an hypothetical beginning-of-file).
4412 And let lalr1.cc honor %initial-action.
4413
4414 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
4415 example.
4416 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
4417 (Parser::Parser): Remove the ctor that used to initialize it.
4418 (Parser::parse): Like in the other skeletons, issue the "starting
4419 parse" message before any action.
4420 Honor %initial-action.
4421 Initialize the stacks with the lookahead.
4422 * data/yacc.c: Let $$ and @$ in %initial-action designate the
4423 look-ahead.
4424 Push them in the stacks.
4425 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
4426
18d192f0
AD
44272004-09-20 Akim Demaille <akim@epita.fr>
4428
4429 * doc/bison.texinfo (Initial Action Decl): New.
4430
b8458aa5
AD
44312004-09-20 Akim Demaille <akim@epita.fr>
4432
4433 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
4434 clearer criterion to define it.
4435 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
4436 When reducing on an empty RHS, use the latest stacked location as
4437 location.
4438 yylloc is not always available.
4439 * data/glr.c: Likewise.
4440 Also, honor initial-actions.
4441
3fc16193
AD
44422004-09-20 Akim Demaille <akim@epita.fr>
4443
4444 * data/yacc.c (YY_LOCATION_PRINT): New.
4445 Define when we know YYLTYPE's structure, i.e., when the default
4446 YYLLOC_DEFAULT is used.
4447 * data/c.m4 (b4_yysymprint_generate): Use it.
4448 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
4449 value of the result.
4450 (error_start_): Replace with...
4451 (error_range_): this location array.
4452 This allows to replace code relying on the implementation of
4453 locations by portable code.
4454 * data/yacc.c (yylerrsp): Replace with...
4455 (yyerror_range): this.
4456 Every time a token is popped, update yyerror_range[0], to have an
4457 accurate location for the error token.
4458 * data/glr.c (YY_LOCATION_PRINT): New.
4459 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
4460 deference a pointer.
4461 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
4462 report the location in %printers.
4463
4464 * src/scan-skel.l: Instead of abort, report error messages to ease
4465 understanding skeleton scanning failures.
4466
ecfe33e7
AD
44672004-09-16 Akim Demaille <akim@epita.fr>
4468
4469 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
4470 (iterator, const_iterator): these, to be more in the C++ spirit.
4471 Also, return reverse iterators so that when displaying the stack
4472 we display its bottom first.
4473 (Parser::stack_print_, Parser::reduce_print_): Match the messages
4474 from yacc.c.
4475 We should probably use vector here though.
4476
1576d44d
AD
44772004-09-16 Akim Demaille <akim@epita.fr>
4478
4479 Have more complete shift traces.
4480
4481 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
4482 to report Shifts instead of ad hoc YYDPRINTF invocations,
4483 including for the error token.
4484 * data/lalr1.cc (symprint_): Output the location.
4485 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
4486 output the location within the %printer.
4487 Activate GLR tests, at least to make sure they compile properly.
4488 They still don't pass though.
4489 * tests/calc.at: Adjust expect verbose output, since now "Entering
4490 state..." is on a different line than the "Shifting" message.
4491
9c66f418
AD
44922004-09-08 Akim Demaille <akim@epita.fr>
4493
4494 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
4495 Bison directive from the Bison file to the invocation of this
4496 macro, so that these directives are passed to
4497 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
4498 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
4499 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
4500 the extra Bison directives instead of the whole series.
4501 Change the grammar so that there are recoverable errors, and
4502 unrecoverable errors. Now we can have the parser give up before
4503 consuming the whole input. As a result we now can observe that
4504 the lookahead is freed when needed.
4505 Change the parser source to parse argv[1] instead of a hard coded
4506 string.
4507 Simplify yylex, and give a value and location to EOF.
4508 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
4509 passed directives already coded in the file.
4510 Add some tests to check the location of "error".
4511 For some tests, the C++ parser is correct, and not yacc.c.
4512 For other tests, they provide different, but unsatisfying, values,
4513 so keep the C++ value so that at least one parser is "correct"
4514 according to the test suite.
4515 (Actions after errors): Remove, this is subsumed by the
4516 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
4517
52d5733f
AD
45182004-09-06 Akim Demaille <akim@epita.fr>
4519
4520 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 4521 (Parser::pop): New.
52d5733f
AD
4522 Use it.
4523
a0e68930
AD
45242004-09-06 Akim Demaille <akim@epita.fr>
4525
4526 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
4527 argument, an informative message.
4528 Call YY_SYMBOL_PRINT.
4529 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
4530 * data/lalr1.cc (destruct_): Likewise.
4531 In addition, no longer depend on b4_yysymprint_generate and
4532 b4_yydestruct_generate to generate these functions, do it "by
4533 hand".
4534
e757bb10
AD
45352004-09-03 Akim Demaille <akim@epita.fr>
4536
4537 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
4538 invoked, yydestruct the lookahead.
4539 * tests/calc.at (Calculator $1): Update the expected lengths of
4540 traces: there is an added line for the discarded lookahead.
4541 * doc/bison.texinfo (Destructor Decl): Some rewording.
4542 Define "discarded" symbols.
4543
0fe1f06d
AD
45442004-09-02 Akim Demaille <akim@epita.fr>
4545
4546 * data/lalr1.cc (translate_, destruct_): No reason to be static.
4547
284acc8b
AD
45482004-09-02 Akim Demaille <akim@epita.fr>
4549
4550 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
4551 (YYDSYMPRINTF): Rename as...
4552 (YY_SYMBOL_PRINT): this.
4553 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
4554 two.
4555 Use it instead of direct symprint_ calls.
4556 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
4557 one.
4558
a5eb1ed2
AD
45592004-09-02 Akim Demaille <akim@epita.fr>
4560
b7c72fe1
AD
4561 * data/lalr1.cc (b4_yysymprint_generate): New.
4562 (symprint_): New member function, defined when YYDEBUG.
4563 Use it consistently instead of token/nterm debugging output by
4564 hand.
a5eb1ed2
AD
4565 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
4566 %printer calls to use cdebug_ when using lalr1.cc.
4567
417141dd
AD
45682004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
4569
4570 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
4571 with #ifdef YYDEBUG.
4572
2fa09258
AD
45732004-08-26 Akim Demaille <akim@epita.fr>
4574
4575 * doc/bison.texinfo (Implementing Loops): Rename as...
4576 (Implementing Gotos/Loops): this.
4577
9378b508
PE
45782004-08-13 Paul Eggert <eggert@cs.ucla.edu>
4579
4580 Adjust to latest gnulib.
4581 * bootstrap (gnulib_modules): Add xalloc-die.
4582 Set LC_ALL=C so that file names sort consistently.
4583 Prefer the gnulib copies of gettext.m4, glibc21.m4,
4584 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
4585 uintmax_t.m4, ulonglong.m4.
4586 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
4587 po.m4 since we are now using _gl.m4 instead.
4588
87a8ad5c
PE
45892004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
4590
4591 * src/scan-action.l: Remove. Scanning of semantic actions is
4592 handled in scan-gram.l.
4593
dca81a78
PE
45942004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
4595
4596 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
4597
4598 * src/location.h (struct): The file member is a uniqstr.
4599 (equal_boundaries): Use UNIQSTR_EQ for comparison.
4600
c9cbf7c5
PE
46012004-07-22 Paul Eggert <eggert@cs.ucla.edu>
4602
4603 Fix bug with non-%union parsers that have printers or destructors,
4604 which led to a Bison core dump. Reported by Peter Fales in
4605 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 4606
c9cbf7c5
PE
4607 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
4608 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
4609 not to our own type.
4610 * src/output.c (symbol_destructors_output, symbol_printers_output):
4611 Don't assume %union.
4612 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
4613 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
4614 UNION-FLAG. All callers changed.
4615 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
4616 Use type char, not unsigned int, when declaring an array of char;
4617 this lets us remove a cast.
4618 (Printers and Destructors): Add non-%union test cases.
4619
fa7e68c3
PE
46202004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4621
4622 * doc/bison.texinfo: Minor editorial changes, mostly to the new
4623 GLR writeups. E.g., avoid frenchspacing and the future tense,
4624 change "lookahead" to "look-ahead", and change "wrt" to "with
4625 respect to".
2fa09258 4626
fa7e68c3
PE
46272004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4628
4629 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
4630 New sections, split off from the GLR Parsers section. Put the new
4631 Simple GLR Parser near the start of the GLR section, for clarity.
4632 Rewrite connective text.
4633
99a9344e
PE
46342004-06-21 Frank Heckenbach <frank@g-n-u.de>
4635
4636 * doc/bison.texinfo (Simple GLR Parsers): New section.
4637
8dd162d3
PE
46382004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4639
4640 * NEWS, TODO, doc/bison.texinfo:
4641 Use "look-ahead" instead of "lookahead", to be consistent.
4642 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
4643 while we're fixing "look-ahead".
4644 * src/conflicts.c (shift_set): Renamed from shiftset.
4645 (look_ahead_set): Renamed from lookaheadset.
4646 * src/print.c: Likewise.
4647 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
4648 name for "lookahead".
4649 (report_types, usage): Likewise.
4650 * src/getargs.h (report_look_ahead_tokens): Renamed from
4651 report_lookaheads.
4652 * src/lalr.c (compute_look_ahead_tokens): Renamed from
4653 compute_lookaheads.
4654 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
4655 (look_ahead_tokens_print): Renamed from lookaheads_print.
4656 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
4657 state_rule_lookaheads_print.
4658 * src/state.h: Likewise.
4659 (reductions.look_ahead_tokens): Renamed from lookaheads.
4660 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
4661 AT_DATA_LOOKAHEADS_GRAMMAR.
4662
57a90331
PE
46632004-06-03 Paul Eggert <eggert@cs.ucla.edu>
4664
4665 * README: Update location of patched M4 distribution.
4666
8ed3234a
PE
46672004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
4668
4669 Don't assume the C++ compiler takes the same arguments as the C compiler
4670 (trivial change).
4671 * configure.ac (O0CXXFLAGS): New var.
4672 * tests/atlocal.in (CXXFLAGS): Use it.
4673
07971983
PE
46742004-05-29 Paul Eggert <eggert@cs.ucla.edu>
4675
4676 Fix some "make check" problems with C++ reported by
4677 Albert Chin-A-Young for Tru64 C++ in this thread:
4678 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
4679
4680 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
4681 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4682 Output to a .cc file for C++, not to a .c file.
4683 * tests/calc.at (AT_CHECK_CALC): Likewise.
4684 * tests/regression.at (AT_CHECK_DANCER): Likewise.
4685 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
4686
29058652
PE
46872004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
4688
4689 * tests/calc.at, tests/actions.at: Workaround for SGI
4690 C++ compiler. (trivial change)
4691
62cb8a99
PE
46922004-05-27 Paul Eggert <eggert@cs.ucla.edu>
4693
fd418816
PE
4694 Spent a few hours checking out which prerequisite versions the
4695 current sources actually require. I went all the way back to
4696 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
4697 a seemingly endless set of combinations of versions more recent
4698 than that. The bottom line is that the current sources require
4699 fairly recent versions of the build tools, and it'll be some work
4700 to change this.
4701 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
4702 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
4703 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
4704 Add comments explaining why those particular versions are
4705 currently needed.
2fa09258 4706
62cb8a99
PE
4707 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
4708 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 4709 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
4710
4711 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
4712 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
4713
caa52c10
PE
47142004-05-26 Paul Eggert <eggert@cs.ucla.edu>
4715
4716 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
4717 0.11.5. Suggested by Bruno Haible.
4718 * bootstrap: Remove gettext version checking.
4719
4720 * doc/bison.texinfo (Decl Summary): Also mention that %union
4721 can depend on prerequisite types. Problem reported by Tim
4722 Van Holder.
4723
4bfd5e4e
PE
47242004-05-25 Paul Eggert <eggert@cs.ucla.edu>
4725
2cef3017
PE
4726 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
4727 * README-alpha: Don't tell people not to package this.
4728
b9c85d5c
PE
4729 * bootstrap: Don't assume $(...) works; use `...` instead.
4730 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
4731 gettext better.
4732
4bfd5e4e
PE
4733 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
4734 put into the -d output file, and mention what to do if YYSTYPE is
4735 defined as a macro.
4736
6a36ff94
PE
47372004-05-24 Paul Eggert <eggert@cs.ucla.edu>
4738
6712933e
PE
4739 Undo change made earlier today: it caused autopoint to not bring
4740 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
4741 autopoint's.
4742
4743 * bootstrap: Check that gettext version matches what's in
4744 configure.ac. Warn users to ignore robots.txt ERROR 404.
4745 * bootstrap: Undo today's earlier change (logged below).
4746 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 4747
6a36ff94
PE
4748 The gettext version checking is causing more trouble than it's
4749 curing; remove it. Problem reported by Paul Hilfinger.
4750
4751 * bootstrap: Issue a warning that one can expect a message
4752 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
4753 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
4754
209ea708
PE
47552004-05-23 Paul Eggert <eggert@cs.ucla.edu>
4756
4757 Ensure that the C++ compiler used for testing actually works on a
4758 simple test program; if not, skip the C++-related tests. Problem
4759 reported by Vin Shelton in:
161a71f3 4760 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
4761
4762 * m4/cxx.m4: New file.
4763 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
4764 * tests/atlocal.in (BISON_CXX_WORKS): Add.
4765 * tests/local.at (AT_COMPILE_CXX): Use it.
4766
41ca2549
PE
47672004-05-21 Paul Eggert <eggert@cs.ucla.edu>
4768
383e69dc
PE
4769 * data/glr.c (yylloc): Output this macro even if locations are not
4770 being generated, as the GLR parser needs it even in that case.
4771 Problem reported by Troy A. Johnson
4772 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
4773
41ca2549
PE
4774 * configure.ac (AC_INIT): Update to 1.875e.
4775
e476c87d
PE
47762004-05-21 Paul Eggert <eggert@cs.ucla.edu>
4777
4778 * NEWS: Version 1.875d.
4779 * configure.ac (AC_INIT): Likewise.
4780 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
4781
4782 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
4783 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
4784 lalr1.cc runs afoul of the first, and the last two are no longer
4785 supported by GCC 3.4.0.
4786 * README: Mention GNU m4 1.4 or later; mention m4 patches.
4787 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
4788
233a88ad
PE
47892004-05-06 Paul Eggert <eggert@cs.ucla.edu>
4790
4791 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
4792 unsigned int, for compatibility with latest gnulib hash module.
4793 * src/state.c (state_hash, state_hasher): Likewise.
4794 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
4795 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 4796
12ffdd28
PE
47972004-05-03 Paul Eggert <eggert@cs.ucla.edu>
4798
4799 * NEWS: Unescaped newlines are no longer allowed in char & strings.
4800
4801 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
4802 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
4803 character and string literals.
4804 (unexpected_end): New function.
4805 (unexpected_eof): Use it.
4806 (unexpected_newline): New function.
4807 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
4808 actions.
e476c87d 4809
12ffdd28
PE
4810 * NEWS: Document %expect-rr.
4811
4812 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
4813 Fix typo by replacing $1 with $option.
4814 Remove more 'intl'-related files.
9668e2be 4815 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
4816
4817 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
4818 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
4819 strtoul.c.
4820 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
4821 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
4822 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
4823 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
4824 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
4825 * src/.cvsignore: Add *.output.
4826
4827 * src/parse-gram.y: Put copyright notice inside %{ %} so it
4828 gets copied to the output file.
e476c87d 4829
1f65350a
PE
48302004-04-28 Paul Eggert <eggert@twinsun.com>
4831
4832 Get files from the gnulib and po repositories, instead of relying
4833 on them being in our CVS. Upgrade to latest versions of gnulib
4834 and Automake.
4835
4836 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
4837 * bootstrap: Bootstrap from gnulib and po repositories.
4838 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
4839 * README-cvs: Document these changes. Remove version numbers from
4840 mentions of build tools, since they change so often. Mention Flex.
4841
4842 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
4843 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
4844 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
4845 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 4846 does this for us.
12ffdd28
PE
4847 (AC_ISC_POSIX): Remove; we no longer support this
4848 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
4849 (AC_HEADER_STDC): Remove: we now assume C89 or better.
4850 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
4851 Do not check for C89 headers, except for locale.h which is used
4852 by the Yacc library and must port to K&R hosts.
4853 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
4854 Do not check for C89 functions, except for setlocale which is
4855 used by the Yacc library.
4856 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
4857 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
4858 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
4859 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
4860 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
4861 AM_GNU_GETTEXT): Remove; now done by:
4862 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
4863 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
4864 for us.
4865
4866 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
4867 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
4868 Define to empty, as gnulib.mk will do the rest for us.
4869 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
4870 for us.
4871 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
4872 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
4873
4874 * src/files.c: Include gnulib's xstrndup.h.
4875
4876 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
4877 (REALLOC): Use xnrealloc, for likewise.
4878 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
4879 (strnlen, memrchr): Remove decls; functions no longer used.
4880 Include <stpcpy.h>.
4881
4882 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
4883 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
4884 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
4885 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
4886 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
4887 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
4888 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
4889 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
4890 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
4891 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
4892 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
4893 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
4894 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
4895 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
4896 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
4897 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
4898 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
4899 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
4900 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
4901 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
4902 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
4903 Remove, as these files are now generated automatically
4904 by bootstrap or automake.
4905
4906 * po/ChangeLog: Remove: all but one entry was a duplicate
4907 of this file, and I moved that 2000-11-02 entry here.
4908
4909 * config/.cvsignore: Add Makefile, depcomp, install-sh.
4910 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
4911 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
4912 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
4913 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
4914 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
4915 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
4916 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
4917 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
4918 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
4919 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
4920 xstrndup.h.
4921 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
4922 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
4923 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
4924 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
4925 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
4926 * src/.cvsignore: Remove *_.c.
4927
4928
4929 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
4930 support it. (The latest stable gzip doesn't.)
4931
49322004-04-27 Paul Eggert <eggert@twinsun.com>
4933
4934 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
4935 case, as stos_ is now used by destructors due to the 2004-02-09
4936 change.
4937
4938 Remove more K&R C support.
4939 * lib/libiberty.y (PARAMS): Remove. All uses removed.
4940 * lib/subpipe.c (errno): Remove decl.
4941 Include <stdlib.h> unconditionally.
4942 (EXIT_FAILURE): Remove macro.
4943 * src/complain.c (vfprintf, strerror): Remove.
4944 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
4945 unconditionally.
4946 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
4947 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
4948 (strchr, strspn, memchr): Remove decls.
4949 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
4950 unconditionally. Do not declare perror.
4951 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
4952 unconditionally.
4953
4954 * src/complain.c (_): Remove useless defn, as system.h defines this.
4955
4956 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
4957 with latest obstack.h.
4958 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
4959 to procedure types, as obstack.h now does that for us.
4960 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
4961
4962 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
4963 so that this include file can stand alone.
4964 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
4965 does this now. Include subpipe.h first after config.h, to
4966 test whether it can stand alone.
4967
4968 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
4969 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
4970 unused declaration.
4971
4972 * tests/synclines.at (%union synch line): Put a dummy member in
4973 the union, because empty unions aren't allowed in C. Caught
4974 by GCC 3.4.0.
4975
4f16766c
PE
49762004-04-13 Jim Meyering <jim@meyering.net>
4977
4978 * src/conflicts.c (conflicts_print): Correct format string typo:
4979 use `%%' to produce literal `%'. (trivial change)
4980
779e7ceb
PE
49812004-03-30 Paul Eggert <eggert@twinsun.com>
4982
4983 * src/getargs.c (version): Update copyright year to 2004.
4984
4985 * data/c.m4 (b4_int_type): Use 'short int' rather than
4986 'short', and similarly for 'long', 'unsigned', etc.
4987 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
4988 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
4989 yy_yypstack, yydumpstack): Likewise.
4990 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
4991 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
4992 Likewise.
4993 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
4994 yy_stack_print, yyparse): Likewise.
4995 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
4996 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
4997 * lib/bitset.c (bitset_print): Likewise.
4998 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
4999 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5000 * lib/bitsetv.c (bitsetv_dump): Likewise.
5001 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
5002 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
5003 Likewise.
5004 * src/LR0.c (allocate_itemsets): Likewise.
5005 * src/gram.h (rule_number, rule): Likewise.
5006 * src/lalr.h (goto_number): Likewise.
5007 * src/nullable.c (nullable_compute): Likewise.
5008 * src/output.c (prepare_rules): Likewise.
5009 * src/relation.c (relation_print, relation_digraph): Likewise.
5010 * src/relation.h (relation_node): Likewise.
5011 * src/state.h (state_number, transitions, errs, reductions,
5012 struct state): Likewise.
5013 * src/symtab.h (symbol_number, struct symbol): Likewise.
5014 * src/tables.c (vector_number, tally, action_number,
5015 default_goto, goto_actions): Likewise.
5016 * tests/existing.at (GNU Cim Grammar): Likewise.
5017 * tests/regression.at (Web2c Actions): Likewise.
5018
5019 * src/output.c (muscle_insert_short_int_table): Renamed from
5020 muscle_insert_short_table. All uses changed.
5021
d6328241
PH
50222004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5023
5024 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
5025 (declaration): Replace expected_conflicts with expected_sr_conflicts.
5026 Add %expect-rr rule.
4f16766c 5027
d6328241
PH
5028 * src/scan-gram.l: Recognize %expect-rr.
5029
4f16766c 5030 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 5031 expected_conflicts.
4f16766c 5032 (expected_rr_conflicts): Declare.
d6328241
PH
5033
5034 * src/conflicts.c (expected_sr_conflicts): Rename from
5035 expected_conflicts.
5036 (expected_rr_conflicts): Define.
5037 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
5038 for GLR parsers.
5039 Use expected_sr_conflicts in place of expected_conflicts.
5040 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 5041
d6328241 5042 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 5043
1452af69
PE
50442004-03-08 Paul Eggert <eggert@gnu.org>
5045
5046 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 5047 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
5048
5049 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
5050 in lalr1.cc.
5051 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
5052 * src/scan-gram.l (scan_integer): New function.
5053 ({int}): Use it.
5054 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
5055 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
5056 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
5057 Say "long int", not "long", for uniformity with GNU style.
5058
006d217d
PE
50592004-02-25 Paul Eggert <eggert@twinsun.com>
5060
5061 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
5062 compilers. This fixes a problem with Intel's C++ compiler being
5063 chatty, reported by Guido Trentalancia in
161a71f3 5064 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 5065
c2729758
ADL
50662004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
5067
5068 Support %destructor and merge error locations in lalr1.cc.
5069
5070 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
5071 (Parser::stos_): Define unconditionally.
5072 (Parser::destruct_): New method. Generate its body with
5073 b4_yydestruct_generate.
5074 (Parser::error_start_): New attribute.
5075 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
5076 token which are discarded.
5077 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
5078 error_start_ when erroneous token are discarded.
5079 (Parser::parse) <yyerrlab1>: Compute the location of the error
5080 token so that it covers all the discarded tokens.
5081 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
5082 it can be called with `%skeleton "lalr1.cc"', and do that.
5083
dd0e0635
PE
50842004-02-02 Paul Eggert <eggert@twinsun.com>
5085
5086 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
5087 $(top_srcdir)/lib and ../lib. This fixes a bug reported
5088 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
5089 There's no need to mention top_builddir since Automake does that
5090 for us.
5091 (INCLUDES): Remove, as Automake says it's obsolescent.
5092 Contents migrated into AM_CPPFLAGS as described above.
5093 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
5094
50952004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5096
5097 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
5098 (yyreportSyntaxError): Handle case where lookahead token is
5099 YYEMPTY.
5100
be16239b
PH
51012004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5102
5103 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
5104 resulting parsers are compilable with C++.
5105
5fa90832
PE
51062003-12-23 Paul Eggert <eggert@twinsun.com>
5107
5108 * config/depcomp, config/install-sh: Sync with Automake 1.8.
5109 * src/output.c (output_skeleton): Rename local var.
5110 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
5111 Bison tokens, as this runs afoul of the 2003-10-07 change that
5112 disallowed NUL bytes in character constants or string literals.
5113
5114 * tests/local.at: Require Autoconf 2.59's Autotest.
5115 * tests/testsuite.at: Don't include local.at, since we now assume
5116 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
5117 including it.
5118 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
5119 multiple inclusion warnings.
dd0e0635 5120
b165c324
AD
51212003-12-02 Akim Demaille <akim@epita.fr>
5122
5123 * doc/bison.texinfo (How Can I Reset the Parser): More about start
5124 conditions.
5125 From Bruno Haible.
5126
26e06a21
ADL
51272003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
5128
5129 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
5130
92ac3705
PE
51312003-10-07 Paul Eggert <eggert@twinsun.com>
5132
6a5ecb38
PE
5133 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
5134 if testsuite doesn't exist.
5135
92ac3705
PE
5136 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
5137 literals, unfortunately.
5138 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
5139 Complain about NUL bytes in character constants or string literals.
5140
91d2c560
PE
51412003-10-05 Paul Eggert <eggert@twinsun.com>
5142
5143 * NEWS: Don't document %no-default-prec, as it's still
5144 too experimental.
5145 * doc/bison.texinfo: Document %no-default-prec only if
5146 the defaultprec flag is set. Normally it's not.
5147
0cc3da3a
PE
51482003-10-04 Paul Eggert <eggert@twinsun.com>
5149
5150 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
5151 non-modifiable lvalue, instead of a modifiable one.
5152 * doc/bison.texinfo (Actions): Document that $$ can
5153 be assigned to. Do not claim that $$ and $N are
5154 array element references: user code should not rely on this.
5155
22fccf95
PE
51562003-10-01 Paul Eggert <eggert@twinsun.com>
5157
5158 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
5159 (grammar_declaration): Use it.
5160 * src/scan-gram.l: New token %no-default-prec.
5161 * tests/conflicts.at: Revamp tests to use %no-default-prec.
5162 * NEWS, doc/bison.texinfo: Document the above.
5163
fc8f2965
AD
51642003-10-01 Akim Demaille <akim@epita.fr>
5165
5166 VCG no longer supports long_straight_phase.
5167
5168 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
5169 * src/print_graph.c (print_graph): Adjust.
5170
39a06c25
PE
51712003-09-30 Frank Heckenbach <frank@g-n-u.de>
5172 and Paul Eggert <eggert@twinsun.com>
5173
5174 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
5175 Table of Symbols): Document %default-prec.
5176 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
5177 (grammar_declaration): Set default_prec on %default-prec.
5178 * src/scan-gram.l (%default-prec): New token.
5179 * src/reader.h (default_prec): New flag.
5180 * src/reader.c: Likewise.
5181 (packgram): Handle it.
5182 * tests/conflicts.at (%default-prec without %prec,
5183 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 5184
39a06c25
PE
51852003-09-30 Paul Eggert <eggert@twinsun.com>
5186
5187 * tests/testsuite.at: Include local.at, not input.at, fixing
5188 a typo in the 2003-08-25 patch.
5189
62b6aef9
AD
51902003-08-27 Akim Demaille <akim@epita.fr>
5191
5192 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
5193 GCC warnings.
5194
89e1cc61
AD
51952003-08-26 Akim Demaille <akim@epita.fr>
5196
5197 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
5198 "<\#" to avoid magic from Gnus when posting parts of this script.
5199
a08460b0
AD
52002003-08-26 Akim Demaille <akim@epita.fr>
5201
5202 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
5203 (Parser::parse): here.
5204 Adjust: nerrs and errstatus is now replaced by...
5205 (Parser::nerrs_, Parser::errstatus_): New.
5206
603f1cfd
AD
52072003-08-25 Akim Demaille <akim@epita.fr>
5208
5209 * config/announce-gen, Makefile.cfg: New.
5210 * Makefile.am: Adjust.
5211 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
5212 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
5213
cd3684cf
AD
52142003-08-25 Akim Demaille <akim@epita.fr>
5215
5216 When reducing initial empty rules, Bison parser read an initial
5217 location that is not defined. This results in garbage, and that
5218 affects Bison's own parser. Therefore we need (i) to extend Bison
5219 to support a means to initialize this location, and (ii) to use
5220 this CVS Bison to fix CVS Bison's parser.
5221
5222 * src/reader.h, reader.c (epilogue_augment): Remove, replace
5223 with...
5224 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
5225 * src/parse-gram.y: Adjust.
5226 (%initial-action): New.
5227 (%error-verbose): Since we require CVS Bison, there is no reason
5228 not to use it.
5229 * src/scan-gram.l: Adjust.
5230 * src/Makefile.am (YACC): New, to make sure we use our own parser.
5231 * data/yacc.c (yyparse): Use b4_initial_action.
5232
4e03e201
AD
52332003-08-25 Akim Demaille <akim@epita.fr>
5234
5235 * doc/bison.texinfo: Don't promote stdout for error messages.
5236
8c182d05
AD
52372003-08-25 Akim Demaille <akim@epita.fr>
5238
5239 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
5240 From Alexandre Duret-Lutz.
5241
6a60c4cf
PE
52422003-08-25 Akim Demaille <akim@epita.fr>
5243
5244 Version 1.875c.
5245
25f66e1a
AD
52462003-08-25 Akim Demaille <akim@epita.fr>
5247
5248 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
5249 Use them.
5250
5348bfbe
AD
52512003-08-25 Akim Demaille <akim@epita.fr>
5252
5253 * data/lalr1.cc (Parser::reduce_print_): New.
5254 Use it.
5255
47301314
AD
52562003-08-25 Akim Demaille <akim@epita.fr>
5257
5258 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
5259 error recovery loops. This patch is based on
161a71f3 5260 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
5261 Also, augment the similarity between lalr1.cc and yacc.c.
5262 Note: the locations of error recovery rules are not correct yet.
5263
5264 * data/lalr1.cc: Comment changes to augment the similarity between
5265 lalr1.cc and yacc.c.
5266 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
5267 (yyerrlab1): Remove, but where it used to be (now the bottom part of
5268 yyerrlab), when hitting EOF, pop the whole stack here instead of
5269 merely falling thru the default error handling mechanism.
5270 (yyerrorlab): New label, with the old contents of YYERROR,
5271 plus the following change: pop the stack of rhs corresponding
5272 to the production that invoked YYERROR. That is how Yacc
5273 behaves (required by POSIX).
5274 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
5275 fail.
5276
1f7a61ff
AD
52772003-08-25 Akim Demaille <akim@epita.fr>
5278
5279 Tune local.at so that people can "autom4te -l autotest calc.at -o
5280 calc" for instance, to extract a sub test suite.
5281
5282 * tests/testsuite.at: Move the initialization, Autotest version
5283 requirement, and AT_TESTED invocation into...
5284 * tests/local.at: here.
5285 * tests/testsuite.at: Include it for compatibility with Autoconf
5286 2.57.
5287 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
5288 be ignore.
5289
327b5b56
PE
52902003-08-04 Paul Eggert <eggert@twinsun.com>
5291
5292 Rework code slightly to avoid gcc -Wtraditional warnings.
5293 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
5294 The returned value is now stored in *YY0. All callers changed.
5295 * src/output.c (merge_output): Adjust to the above change.
5296
0051e3ed
PE
52972003-07-26 Paul Eggert <eggert@twinsun.com>
5298
5299 * data/glr.c (YYASSERT): New macro.
5300 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
5301 yyresolveStates, yyprocessOneStack):
5302 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
5303 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 5304
137437c6
PE
53052003-07-25 Paul Eggert <eggert@twinsun.com>
5306
5b620e06
PE
5307 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
5308 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 5309 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
5310 by Frank Heckenbach, though I have omitted the structure-initialization
5311 part of his glr-knr.diff patch since I recall that the Portable
5312 C Compiler didn't require that change.
5313
137437c6
PE
5314 Let the user specify how to allocate and free memory.
5315 Derived from a suggestion by Frank Heckenbach in
161a71f3 5316 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
5317 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
5318 All uses of free, malloc, realloc changed to use these macros,
5319 and unnecessary casts removed.
5320 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
5321
ddb85ca5
PE
53222003-07-06 Matthias Mann <MatthiasMann@gmx.de>
5323
5324 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
5325 use s.empty() rather than s == "" to test for empty string; see
161a71f3 5326 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
5327 (trivial change)
5328
39910e09
AD
53292003-06-25 Akim Demaille <akim@epita.fr>
5330
5331 * config/depcomp, config/install-sh: Update from masters.
5332
0ae99356
PE
53332003-06-20 Paul Eggert <eggert@twinsun.com>
5334
5335 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
5336 and return properly parenthesized result.
5337 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
5338 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
5339 Remove unnecessary parentheses from uses.
5340 * doc/bison.texinfo (Location Default Action): Describe the
5341 conventions for parentheses.
5342
cd05d13c
PE
53432003-06-19 Paul Eggert <eggert@twinsun.com>
5344
81fd08ca
PE
5345 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
5346 yyreportTree): Do not assume that size_t is the same width as int,
5347 when printing sizes. Print sizes using an unsigned format.
5348 Problem reported by Frank Heckenbach in
161a71f3 5349 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 5350
cd05d13c
PE
5351 Port to Forte Developer 7 C compiler.
5352 * data/glr.c (struct YYLTYPE): If locations are not being used,
5353 declare a single dummy member, as empty structs do not conform
5354 to the C standard.
5355 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
5356 the Forte Developer 7 C compiler complains that end-of-loop
5357 code is not reached.
5358
4dcf140b
PE
53592003-06-17 Paul Eggert <eggert@twinsun.com>
5360
5361 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
5362 avoid warnings from picky compilers about redefinition of PARAMS.
5363
8dd76bee
PE
53642003-06-17 Paul Eggert <eggert@twinsun.com>
5365
5366 Version 1.875b.
5367
5368 * NEWS: Document 1.875b.
5369
5370 * lib/bbitset.h: Do not include config.h; that's the includer's job.
5371 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
5372 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
5373 Don't use 'index' in comments, as it's a builtin fn on some hosts.
5374 * lib/bitset_stats.c: Include gettext.h unconditionally, as
5375 per recent gettext manual's suggestion.
5376 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
5377 Use prototypes, not old-style definitions.
5378 * lib/lbitset.c (lbitset_unused_clear): Likewise.
5379 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
5380 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
5381 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
5382 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
5383 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
5384 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
5385 vbitset_or_and_cmp, vbitset_copy): Likewise.
5386
5387 * lib/libiberty.h: Do not include config.h; that's the includer's job.
5388 Do not include <stdlib.h>.
5389 (PARAMS): Define unconditionally for C89.
5390 (ATTRIBUTE_NORETURN): Remove.
5391 (ATTRIBUTE_UNUSED): Define unconditionally.
5392
5393 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 5394 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
5395 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
5396 * lib/vbitset.c, lib/vbitset.h: New files.
5397 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
5398 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
5399 from libbitset.
5400
5401 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
5402 `How Can I Reset @code{yyparse}', since texinfo does not allow
5403 arbitrary @ in node names.
5404
5405 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
5406 shouldn't be needed according to the gettext 0.12.1 documentation
5407 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 5408 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 5409 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 5410 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 5411
8dd76bee
PE
5412 * lib/.cvsignore: Add stdbool.h.
5413 * m4/.cvsignore: Add nls.m4, po.m4.
5414
5415 Upgrade to CVS gnulib.
5416 * stdbool_.h: File renamed from stdbool.h.in.
5417 * configure.ac (AM_STDBOOL_H): Invoke this instead of
5418 AC_HEADER_STDBOOL.
5419 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
5420 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
5421 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
5422 (MOSTLYCLEANFILES): New var.
5423 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
5424 (stdbool.h): New rule.
5425 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
5426 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
5427 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
5428 m4/quote.m4: Upgrade to today's gnulib.
5429
5430 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
5431 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
5432 the tests right now.
5433 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
5434 yyerror are declared before use; C99 requires this.
5435
25005f6a
PH
54362003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5437
5438 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
5439 first.
5440 (yyrecoverSyntaxError): Correct the logic for setting and testing
5441 yyerrState.
5442 Correct comment on handling EOF.
5443 Allow states with only a default reduction, rather than failing
8dd76bee 5444 (I can't quite reconstruct why these were not allowed before).
25005f6a 5445
137437c6 5446 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 5447 buffer overruns, corrupting state.
8dd76bee
PE
5448
5449 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
5450 definition.
5451 * src/reader.h (max_left_semantic_context): New variable declaration.
5452 * src/scan-gram.l (max_left_semantic_context): Define.
5453 (handle_action_dollar): Update max_left_semantic_context.
5454 * data/glr.c (YYMAXLEFT): New definition.
5455 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
5456 (yyresolveAction): Ditto.
5457
5458 Fixes to problems with location handling in GLR parsers reported by
5459 Frank Heckenbach (2003/06/05).
5460
5461 * data/glr.c (YYLTYPE): Make trivial if locations not used.
5462 (YYRHSLOC): Add parentheses, and define only if locations used.
5463 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
5464 locations not used.
5465 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
5466 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 5467
25005f6a
PH
5468 * tests/cxx-type.at: Exercise location information; update tests
5469 to differentiate output with and without locations.
8dd76bee 5470 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
5471 because default YYLTYPE not yet defined.
5472 Change semantic actions to compute strings, rather than printing
5473 them directly (to test proper passing of semantics values). Change
5474 output to prefix notation and update test data and expected results.
5475 (yylex): Track locations.
5476 (stmtMerge): Return value rather than printing, and include arguments
5477 in value.
8dd76bee 5478
711f40b7
PE
54792003-06-03 Paul Eggert <eggert@twinsun.com>
5480
5481 Avoid warnings generated by GCC 2.95.4 when Bison is
5482 configured with --enable-gcc-warnings.
5483 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
5484 yy::]b4_parser_class_name[::translate_,
5485 yy::Stack::operator[] (unsigned),
5486 yy::Stack::operator[] (unsigned) const,
5487 yy::Slice::operator[] (unsigned),
5488 yy::Slice::operator[] (unsigned) const):
5489 Rename local vars to avoid warnings.
5490 * tests/glr-regression.at (Improper handling of embedded actions
5491 and $-N in GLR parsers): Remove unused local variable from yylex.
5492 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
5493 (void) as arg when not pure, since we now assume C89 when building
5494 Bison. Pacify GCC by using parameter.
5495
ac695f7d
PE
54962003-06-02 Paul Eggert <eggert@twinsun.com>
5497
5498 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
5499 yy::Location::lines, yy::Location::columns): Rename arguments
5500 to avoid shadowing; this removes a warning generated by GCC 3.3.
5501
26ec81e0
PE
55022003-06-01 Paul Eggert <eggert@twinsun.com>
5503
5504 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
5505 to g++, as GCC 3.3 complains if you do it.
5506 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
5507 everything that WARNING_CFLAGS has, except omit warnings
5508 not suitable for C++.
5509 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
5510 * tests/atlocal.in (CXXFLAGS): New var.
5511 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
5512
5513 Fix a GLR parser bug I reported in February; see
161a71f3 5514 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
5515 The problem was that GLR parsers did not conform to the C standard,
5516 because actions like { $1 = $2 + $3; } expanded to expressions
5517 that invoked YYFILL in separate subexpressions, and YYFILL assigned
5518 to a local variable. The C standard says that expressions
5519 like (var = f ()) + (var = f ()) have undefined behavior.
5520 Another problem was that GCC sometimes issues warnings that
5521 yyfill and its parameters are unused.
5522
5523 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
5524 as possibly unused.
5525 (yyfill): New function.
5526 (YYFILL): Use it.
5527 (yyuserAction): Change type of yynormal to bool, so that it matches
5528 the new yyfill signature. Mark it as possibly unused.
5529
5530
5531 Follow up on a bug I reported in February, where a Bison-generated
5532 parser can loop. Provide a test case and a fix for yacc.c. I
5533 don't have a fix for lalr1.cc or for glr.c, unfortunately.
5534 The original bug report is in:
161a71f3 5535 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
5536
5537 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
5538 macro's size was becoming unwieldy.
5539 (yyerrlab): Do not discard an empty lookahead symbol, as this
5540 might destroy garbage.
5541 (yyerrorlab): New label, with the old contents of YYERROR,
5542 plus the following change: pop the stack of rhs corresponding
5543 to the production that invoked YYERROR. That is how Yacc
5544 behaves, and POSIX requires this behavior.
5545 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
5546 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
5547 Define 'alarm' to do nothing if unistd.h is not available.
5548 Add a new rule "exp: '-' error;" to test the above change to
5549 data/yacc.c. Use 'alarm' to abort any test taking longer than
5550 10 seconds, as it's probably looping.
5551 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
5552 Also, the new yacc.c generates two fewer diagnostics for an
5553 existing test.
5554
d0829076
PE
55552003-05-24 Paul Eggert <eggert@twinsun.com>
5556
c6ae27df
PE
5557 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
5558 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
5559 This fixes a problem reported by John Bowman when the Compaq/HP
5560 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
5561 -ansi -Wall -gall).
5562 * data/yacc.c (union yyalloc): Likewise.
5563 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 5564
d0829076
PE
5565 Switch from 'int' to 'bool' where that makes sense.
5566
5567 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
5568 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
5569 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
5570 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
5571 Return or accept bool, not int. All callers changed.
5572 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
5573 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
5574 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
5575 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
5576 bitset_or_and_cmp_): Likewise.
5577 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
5578 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
5579 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
5580 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
5581 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
5582 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
5583 bitset_stats_or_and_cmp): Likewise.
5584 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
5585 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
5586 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
5587 ebitset_xor_cmp): Likewise.
5588 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
5589 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
5590 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
5591 lbitset_xor_cmp): Likewise.
5592 * lib/bbitset.h: Include <stdbool.h>.
5593 (struct bitset_vtable): The following members now return bool, not
5594 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
5595 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
5596 or_and_cmp).
5597 * src/conflicts.c (count_rr_conflicts): Likewise.
5598 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
5599 All uses changed.
5600 * lib/ebitset.c (ebitset_obstack_init): Likewise.
5601 * lib/lbitset.c (lbitset_obstack_init): Likewise.
5602 * src/getargs.c (debug_flag, defines_flag, locations_flag,
5603 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5604 graph_flag): Likewise.
5605 * src/getargs.h (debug_flag, defines_flag, locations_flag,
5606 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5607 graph_flag): Likewise.
5608 * src/output.c (error_verbose): Likewise.
5609 * src/output.h (error_verbose): Likewise.
5610 * src/reader.c (start_flag, typed): Likewise.
5611 * src/reader.h (typed): Likewise.
5612 * src/getargs.c (LOCATIONS_OPTION): New constant.
5613 (long_options, getargs): Use it.
5614 * src/lalr.c (build_relations): Use bool, not int.
5615 * src/nullable.c (nullable_compute): Likewise.
5616 * src/print.c (print_reductions): Likewise.
5617 * src/tables.c (action_row, pack_vector): Likewise.
5618 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
5619 * src/output.c (prepare): Use it.
5620 * src/output.c (token_definitions_output,
5621 symbol_destructors_output, symbol_destructors_output): Use string,
5622 not boolean integer, to keep track of whether to output separator.
5623 * src/print_graph.c (print_core): Likewise.
5624 * src/state.c (state_rule_lookaheads_print): Likewise.
5625
5626 * config/install-sh: Sync from automake 1.7.5.
5627
6b2584b7
PE
56282003-05-14 Paul Eggert <eggert@twinsun.com>
5629
5630 * src/parse-gram.y (rules_or_grammar_declaration): Require a
5631 semicolon after a grammar declaration, in the interest of possible
5632 future changes to the Bison input language.
5633 Do not allow a stray semicolon at the start of the grammar.
5634 (rhses.1): Allow one or more semicolons after any rule, including
5635 just before "|" as required by POSIX.
5636 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
5637 grammar.
5638
caf37a36
ADL
56392003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
5640
5641 %parse-param support for lalr1.cc.
5642
5643 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
5644 b4_cc_constructor_calls, b4_cc_constructor_call,
5645 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
5646 definitions.
5647 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
5648 parse-param arguments.
5649 (yy::b4_parser_class_name): Declare instance variables to
5650 hold parse-param arguments.
5651 * tests/calc.at: s/value/semantic_value/ because value clashes
5652 with a member of yy::b4_parser_class_name. Adjust C++ code
5653 to handle %parse-param. Enable %parse-param test in C++.
5654
3ab37077
PE
56552003-05-12 Paul Eggert <eggert@twinsun.com>
5656
5657 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
5658 English a bit. Fix fclose typo. Change "const char" to "char
5659 const", and use ANSI C rather than K&R for "main". Suggest
5660 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
5661 and suggest yy_switch_to_buffer.
5662
56632003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
5664
5665 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
5666 C89. This avoids a diagnostic on compilers that define __STDC__
5667 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 5668 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 5669
e743727f
PE
56702003-05-03 Paul Eggert <eggert@twinsun.com>
5671
5672 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
5673 Do not overrun array bounds.
5674 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 5675 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 5676
916708d5
AD
56772003-04-29 Akim Demaille <akim@epita.fr>
5678
5679 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
5680 * src/getargs.c, src/getargs.h: here, as bool, not int.
5681 (nondeterministic_parser): New.
5682 * src/parse-gram.y, src/scan-gram.l: Support
5683 %nondeterministic-parser.
5684 * src/output.c (prepare): Use nondeterministic_parser instead
5685 of glr_parser where appropriate.
5686 * src/tables.c (conflict_row, action_row, save_row)
5687 (token_actions, token_actions, pack_vector): Ditto.
5688
a06ea4aa
AD
56892003-04-29 Akim Demaille <akim@epita.fr>
5690
5691 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
5692
211074ca
AD
56932003-04-29 Akim Demaille <akim@epita.fr>
5694
5695 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
5696 with %pure-parser and %locations to exercise the patch from Yakov
5697 Markovitch below.
5698
6175ffe3
PE
56992003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
5700
5701 * data/yacc.c: (b4_lex_param): Corrected for the case where
5702 %lex-param is provided and %pure-parser isn't.
5703
b1e95857
PE
57042003-04-27 Paul Eggert <eggert@twinsun.com>
5705
5706 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 5707 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
5708 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
5709 if it is not defined.
5710 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
5711
acda9df6
PE
57122003-04-26 Paul Eggert <eggert@twinsun.com>
5713
3470c57b
PE
5714 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
5715 Declare to be of type suitable for the ninf value itself, not of
5716 type suitable for the corresponding table, since the latter might
5717 be unsigned but the ninf value might be negative. This fixes a
5718 bug reported by Alexandre Duret-Lutz in
161a71f3 5719 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 5720
acda9df6
PE
5721 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
5722 invokes it. We shouldn't invoke it twice because it will attempt
5723 to put error.o in the archive twice. This fixes a glitch reported
5724 by Martin Mokrejs in
161a71f3 5725 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 5726
b5250f26
PE
57272003-04-21 Paul Eggert <eggert@twinsun.com>
5728
5729 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
5730 to gnulib.
5731
089ac0f1
PE
57322003-04-21 Yakov Markovitch <Markovitch@iso.ru>
5733
5734 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
5735 Fix obvious typo that results in uncompilable GLR parsers
5736 when both %pure-parser and %locations are used. (trivial change)
5737
5ededac6
PE
57382003-04-17 Paul Eggert <eggert@twinsun.com>
5739
1b8f2fff
PE
5740 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
5741 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
5742 Do not insert the expected token via unput, as this runs afoul
5743 of a POSIX-compatibility bug in flex 2.5.31.
5744 All uses changed to BEGIN the parent state,
5745 since we no longer insert the expected token via unput.
5746 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
5747 that is no longer emitted after the above change.
5748
5ededac6
PE
5749 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
5750 the first one. This change is from Paul Hilfinger, and it fixes
5751 regression reported by Werner Lemberg in
161a71f3 5752 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
5753
5754 (resolve_sr_conflict): Don't invoke state_errs_set
5755 unless one or more tokens have been explicitly made errors.
5756 Otherwise, the above change causes Bison to abort.
5757
5758 * tests/existing.at (GNU pic Grammar): New test case, taken from
5759 Lemberg's email.
5760
b8be9132
AD
57612003-03-31 Akim Demaille <akim@epita.fr>
5762
5763 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
5764
d423d460
AD
57652003-03-31 Akim Demaille <akim@epita.fr>
5766
5767 * src/output.c (prepare_symbols): Avoid trailing spaces in the
5768 output.
5769
c7e441b4
AD
57702003-03-31 Akim Demaille <akim@epita.fr>
5771
5772 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
5773 From Paul Hilfinger.
5774
231897ad
AD
57752003-03-29 Akim Demaille <akim@epita.fr>
5776
5777 * m4/error.m4: Do not put under dynamic conditions some code which
5778 expansion is under static control.
5779
5b066063
AD
57802003-03-29 Akim Demaille <akim@epita.fr>
5781
5782 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
5783
22a74fec
AD
57842003-03-29 Akim Demaille <akim@epita.fr>
5785
5786 * doc/bison.texinfo (Strings are Destroyed): New.
5787
0eee27e7
PE
57882003-03-13 Paul Eggert <eggert@twinsun.com>
5789
5790 * .cvsignore: Add configure.lineno.
5791 * src/.cvsignore: Add yacc.
5792 * tests/.cvsignore: Add testsuite.log.
5793 * doc/fdl.texi: Sync with latest FSF version.
5794
f61aad93
PE
57952003-03-12 Paul Eggert <eggert@twinsun.com>
5796
537636c7
PE
5797 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
5798 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
5799 cursor, instead of leaving it undefined. This fixes a bug
5800 reported by Tim Van Holder in
161a71f3 5801 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
5802 * tests/input.at (Torturing the Scanner): Test the scanner on
5803 an empty input file, which was Tim Van Holder's test case.
5804
5805 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
5806 <sys/resource.h> can be included, include sys/time.h and
5807 sys/times.h first, if available. This works around the SunOS
5808 4.1.4 porting bug reported by Bruce Becker in
161a71f3 5809 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
5810
5811 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
5812 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
5813 AC_HEADER_SYS_WAIT.
5814
f61aad93
PE
5815 Merge changes from gnulib. This was prompted because the CVS
5816 snapshot didn't build on Solaris 7 due to strnlen problems.
5817
5818 These changes need to be merged back into gnulib:
5819 * lib/hash.c: Include <stdbool.h> unconditionally.
5820 * m4/onceonly.m4 (m4_quote): New macro.
5821 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
5822 Quote AC_FOREACH variable-expansions properly.
5823 The 2003-01-03 obstack.h change also needs merging.
5824 {end of changes requiring merging}
5b066063 5825
f61aad93
PE
5826 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5827 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
5828 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
5829 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
5830 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
5831 New files, imported from gnulib.
5832 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
5833 above.
5834
5835 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
5836 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
5837 gnulib sources.
5838
5839 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
5840 Add.
5841 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
5842 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
5843 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
5844 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
5845 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
5846 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
5847 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
5848 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
5849 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
5850 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
5851 (jm_PREREQ_ARGMATCH): Remove.
5852 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
5853 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
5854
5855 * src/system.h: Include <stdbool.h> unconditionally.
5856
5857 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
5858 assuming at least C89 in the bitset code for some time now.
5859
d2ffe116
AD
58602003-03-03 Akim Demaille <akim@epita.fr>
5861
5862 * ro.po: New.
5863
052826fd
AD
58642003-03-02 Akim Demaille <akim@epita.fr>
5865
5866 * doc/bison.texinfo (Table of Symbols): Reactivate the
5867 documentation for %lex-param, and %parse-param.
5868
c4749565
AD
58692003-03-02 Akim Demaille <akim@epita.fr>
5870
5871 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
5872 generate verbose error messages.
5873 Use the number of tokens as an upper bound in yytname, as it
5874 cannot be a non terminal.
5875
d5286af1
AD
58762003-03-02 Akim Demaille <akim@epita.fr>
5877
5878 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
5879 message.
5880
22e304a6
AD
58812003-03-02 Akim Demaille <akim@epita.fr>
5882
22e304a6
AD
5883 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
5884 Use them to exercise yycheck overrun.
5885 Based on Andrew Suffield's grammar.
5886
67a25fed
AD
58872003-03-02 Akim Demaille <akim@epita.fr>
5888
5889 Create tests/local.at for Bison generic testing macros.
5890
5891 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
5892 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
5893 This new file.
5894 * tests/calc.at (AT_CHECK_CALC): Adjust.
5895 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
5896 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
5897 * tests/local.at: here.
5898 (AT_COMPILE_CXX): Tags the tests using it as c++.
5899 Ignore the test if CXX is not functional.
5900
9c2b381f
PE
59012003-03-01 Paul Eggert <eggert@twinsun.com>
5902
5903 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
5904 not loc->end, since loc->end might contain garbage and this leads
5905 to undefined behavior on some platforms.
5906 (id_loc, token_start): Use (IF_LINTed) initial values that do not
5907 depend on *loc, so that the reader doesn't give the the false
5908 impression that *loc is initialized.
5909 (<INITIAL>"%%"): Do not bother setting code_start, since its value
5910 does not survive the return.
5911
0433ba88
AD
59122003-03-01 Akim Demaille <akim@epita.fr>
5913
5914 * src/scan-gram.l (code_start): Always initialize it when entering
5915 into yylex, as SC_EPILOGUE is activated *before* the corresponding
5916 yylex invocation. An alternative would be making it static, but
5917 then it starts with the second %%'s beginning, instead of its end.
5918
b305ea69
PE
59192003-02-28 Paul Eggert <eggert@twinsun.com>
5920
5921 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
5922 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 5923 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 5924
c3d25e01
PE
59252003-02-26 Paul Eggert <eggert@twinsun.com>
5926
5927 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
5928 Remove Sequent/Pyramid discussion (nobody uses them any more).
5929 Merge VMS and MS-DOS discussion; these ports may well be dead
5930 but let's keep mentioning them for now. Put <> around email
5931 addresses. Add copyright notice.
5932
c267ffbc
PE
59332003-02-24 Paul Eggert <eggert@twinsun.com>
5934
5935 * data/glr.c (yy_reduce_print): yylineno -> yylno,
5936 to avoid collision with flex use of yylineno.
5937 Problem reported by Bruce Lilly in
161a71f3 5938 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
5939 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
5940 * data/yacc.c (yy_reduce_print): Likewise.
5941
5942 * config/depcomp: Sync with Automake 1.7.3.
5943
f939fc12
AD
59442003-02-21 Akim Demaille <akim@epita.fr>
5945
5946 * data/lalr1.cc: Use temporary variables instead of casts to
5947 change integer types.
5948 Suggested by Paul Eggert.
5949
95923bd6
AD
59502003-02-21 Akim Demaille <akim@epita.fr>
5951
5952 * doc/bison.texinfo: Use "location" consistently to refer to @n,
5953 to avoid confusions with lalr1.cc's notion of Position.
5954 Suggested by Paul Eggert.
5955
2cdc240e
AD
59562003-02-20 Akim Demaille <akim@epita.fr>
5957
5958 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
5959 before initial_columns.
5960 (location.hh): Use consistent variable names when defining the
5961 operator<<.
5962 Use "last" so that we subtract from Positions, not from unsigned.
5963
5d003116
AD
59642003-02-20 Akim Demaille <akim@epita.fr>
5965
5966 * data/lalr1.cc (position.hh): New subfile, including the extended
5967 and Doxygen'ed documentation of class Position.
5968 (location.hh): Use it.
5969 Document a` la Doxygen.
ba1ecc07 5970 With the help of Benoit Perrot.
5d003116 5971
d02b25f9
AD
59722003-02-20 Akim Demaille <akim@epita.fr>
5973
5974 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
5975 AT_YACC_IF.
5976 Redefine AT_YYERROR_SEES_LOC_IF using it.
5977 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
5978 not defined.
5979 Don't use the location in yy::Parser::error_ and
5980 yy::Parser::print_ when not %locations.
5981 Activate more lalr1.cc tests.
5982
0d1c3a04
AD
59832003-02-19 Akim Demaille <akim@epita.fr>
5984
5985 * data/lalr1.cc: When displaying a line number, be sure to make it
5986 an int.
5987
60a777aa
AD
59882003-02-19 Akim Demaille <akim@epita.fr>
5989
5990 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
5991 Remove, useless.
5992 (YYABORT, YYACCEPT, YYERROR): New.
5993 * tests/calc.at: Renable the lalr1.cc test.
5994
0b86fc41
AD
59952003-02-19 Akim Demaille <akim@epita.fr>
5996
5997 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
5998 error recovery, mixing with/without pops and discarding of the
5999 lookahead.
6000 Exercise YYERROR.
6001 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
6002
da99a5dc
PE
60032003-02-17 Paul Eggert <eggert@twinsun.com>
6004
6005 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
6006 * tests/testsuite.at (AT_COMPILE): Use them.
6007 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 6008 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 6009
93b8c255
PE
60102003-02-12 Paul Eggert <eggert@twinsun.com>
6011
6012 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
6013 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 6014 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
6015 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
6016 Check for malloc failure, for consistency with yacc.c.
6017 (yytname_size): Remove, for consistency with yacc.c.
6018
6019 The bug still remains in data/lalr1.cc, as I didn't have time
6020 to fix it there.
6021
7548fed2
AD
60222003-02-06 Akim Demaille <akim@epita.fr>
6023
6024 * configure.ac (GXX): Rename as...
6025 (CXX): this, to keep the original Autoconf semantics.
6026 Require 2.57.
6027 * data/lalr1.cc: Fix b4_copyright invocations.
6028 If YYDEBUG is not defined, don't depend upon name_ being defined.
6029 (location.hh): Include string and iostream.
6030 (Position::filename): New member.
6031 (Position::Position ()): New.
6032 (operator<< (Position)): New.
6033 (operator- (Position, int)): New.
6034 (Location::first, Location::last): Rename as...
6035 (Location::begin, Location::end): these, to mock the conventional
6036 iterator names.
6037 (operator<< (Location)): New.
6038 * tests/atlocal.in (CXX): New.
6039 * tests/testsuite.at (AT_COMPILE_CXX): New.
6040 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
6041 locations in a more synthetic way.
6042 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
6043 lalr1.cc is used.
6044 Adjust the C locations to match those from Emacs: first column is
6045 column 0.
6046 Change all the expected results.
6047 Conform to the GCS: simplify the locations when applicable.
6048 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
6049 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
6050 these CPP macros with the m4 macros new defined by...
6051 (AT_CHECK_PUSHDEFS): this, i.e.:
6052 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 6053 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
6054 New macros.
6055 (AT_CHECK_POPDEFS): Undefine them.
6056 (AT_CHECK_CALC_LALR1_CC): New.
6057 Use it for the first lalr1.cc test.
6058
43a176ef
AD
60592003-02-04 Akim Demaille <akim@epita.fr>
6060
6061 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
6062 Location as is defined.
6063
fc049e9c
AD
60642003-02-04 Akim Demaille <akim@epita.fr>
6065
6066 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
6067 name_ being defined.
6068
a737b216
PE
60692003-02-03 Paul Eggert <eggert@twinsun.com>
6070
6071 * src/gram.h (start_symbol): Remove unused decl.
6072
6073 Use more-consistent naming conventions for local vars.
6074
6075 * src/derives.c (derives_compute): Change type of local var from
6076 int to rule_number.
6077 * src/gram.c (grammar_rules_partial_print): Likewise.
6078 * src/print.c (print_core): Likewise.
6079 * src/reduce.c (reduce_grammar_tables): Likewise.
6080
6081 * src/gram.c (grammar_dump): Change name of item_number *
6082 local var from r to rp.
6083 * src/nullable.c (nullable_compute): Likewise.
6084
6085 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
6086
6087 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
6088 for symbol or symbol_number var.
6089 * src/reader.c (grammar_start_symbol_set): Likewise.
6090 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
6091 Likewise.
6092 * src/state.c (transitions_to): Likewise.
6093 * src/state.h: Likewise.
6094 * src/tables.c (symbol_number_to_vector_number): Likewise.
6095
6096 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
6097 char * var.
6098
6099 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
6100 var.
6101
6102 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
6103 var.
6104
6105 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
6106 Use str, not s, for char * var. Use ch, not c, for character var.
6107 Use size for size var.
6108
6109 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
6110 char * var.
6111 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
6112 uniqstr var.
6113 * src/uniqstr.h: Likewise.
6114
6115 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6116 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6117 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
6118 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
6119 param to have same name as that of enum, so that we don't use
6120 "s" to stand for a non-state.
6121
68e93ad5
AD
61222003-02-02 Akim Demaille <akim@epita.fr>
6123
6124 * src/scan-skel.l: Scan more than one inert character per yylex
6125 invocation.
6126
92898986
PE
61272003-02-01 Paul Eggert <eggert@twinsun.com>
6128
6129 Version 1.875a.
6130
1d9d5d71
PE
6131 * po/LINGUAS: Add ms.
6132
0435d061
AD
61332003-01-30 Akim Demaille <akim@epita.fr>
6134
6135 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
6136
6029a57f
PH
61372003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6138
6139 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
6140 of $1.
0435d061
AD
6141
6142 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 6143 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 6144 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 6145
6029a57f
PH
6146 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
6147 (b4_rhs_location): Ditto.
0435d061 6148 (yyfill): New function to copy from stack tree into array
6029a57f 6149 incrementally.
0435d061
AD
6150 (yyuserAction): Modify to allow incremental move of semantic values
6151 to rhs array when in GLR mode.
6152 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
6153 as needed.
6154 Remove dummy use of yystack, as there is now a guaranteed use.
6155 (yydoAction): Modify to allow incremental move of semantic values
6156 to rhs array when in GLR mode.
6157 (yyresolveAction): Ditto.
6158 (yyglrShiftDefer): Update comment.
0435d061 6159 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
6160 (yyglrReduce): Ditto.
6161 (yydoAction): Ditto
0435d061 6162
6029a57f
PH
6163 * tests/glr-regr1.at: Rename to ...
6164 * tests/glr-regression.at: Add new regression test for the problems
6165 described above (adapted from S. Eken).
6166 Update copyright notice.
6167 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
6168 * tests/Makefile.am: Ditto.
6169
6cee6297
PE
61702003-01-28 Paul Eggert <eggert@twinsun.com>
6171
6172 * data/lalr1.cc: Do not use @output_header_name@ unless
6173 b4_defines_flag is set. This fixes two bugs reported by
6174 Tim Van Holder in
161a71f3
PE
6175 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
6176 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 6177
b2a836b5
PE
61782003-01-21 Paul Eggert <eggert@twinsun.com>
6179
6180 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
6181 we don't need to worry about yyerrlab1 being reported as an
6182 "unused label" by non-GCC C compilers. The downside is that if
6183 locations are used then a couple of statements are duplicated each
6184 time YYERROR is invoked, but the upside is that the warnings
6185 should vanish.
6186 (yyerrlab1): Move code to YERROR.
6187 (yyerrlab2): Remove. Change uses back to yyerrlab1.
6188 This reverts some of the 2002-12-27 change.
6189
4196b931
PE
61902003-01-17 Paul Eggert <eggert@twinsun.com>
6191
6192 * src/output.c (symbol_printers_output): Fix typo that led
6193 to core dump. Problem reported by Antonio Rus in
161a71f3 6194 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 6195
3ae831b4
AD
61962003-01-13 Akim Demaille <akim@epita.fr>,
6197 Quoc Peyrot <chojin@lrde.epita.fr>,
6198 Robert Anisko <anisko_r@lrde.epita.fr>
6199
6200 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
6201 when the stacks contain one element, as the loop would otherwise
6202 free the last state, and then use the top state (the one we just
6203 popped). This means that the initial elements will not be freed
6204 explicitly, as is the case in yacc.c; it is not a problem, as
6205 these elements have fake values.
6206
e3aa65c5
PE
62072003-01-11 Paul Eggert <eggert@twinsun.com>
6208
6209 * NEWS: %expect-violations are now just warnings, reverting
6210 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
6211 bootstrapping problem reported by Matthias Klose; see
161a71f3 6212 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
6213 * src/conflicts.c (conflicts_print): Likewise.
6214 * tests/conflicts.at (%expect not enough, %expect too much,
6215 %expect with reduce conflicts): Likewise.
6216 * doc/bison.texinfo (Expect Decl): Document this. Also mention
6217 that the warning is enabled if the number of conflicts changes
6218 (not necessarily increases).
6219
6220 * src/getargs.c (version): Update copyright year.
6221
f0057011
AD
62222003-01-09 Akim Demaille <akim@epita.fr>
6223
6224 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
6225
1ee6d2a0
PE
62262003-01-08 Paul Eggert <eggert@twinsun.com>
6227
6228 * Makefile.maint (WGETFLAGS):
6229 New macro, containing "-C off" to disable proxy caches.
6230 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
6231 (rel-check): Use $(WGET) instead of wget.
6232
d4fd77c4
PE
62332003-01-06 Paul Eggert <eggert@twinsun.com>
6234
6235 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
6236 the GLR paper of Scott, Johnstone and Hussain.
6237
464c6927
PE
62382003-01-04 Paul Eggert <eggert@twinsun.com>
6239
d600ee67
PE
6240 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
6241 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
6242 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
6243 (EXTRA_LIBRARIES): New var, for liby.a.
6244 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
6245 (EXTRA_SCRIPTS): New var, for yacc.
6246
464c6927
PE
6247 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
6248 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
6249 Problem reported by Nelson H. F. Beebe.
6250
62512003-01-03 Paul Eggert <eggert@twinsun.com>
6252
6253 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
6254 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
6255 when compiling Bison 1.875's `bitset bset = obstack_alloc
6256 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
6257
6258 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
6259 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
6260 grow to a huge size with typical invocation.
d600ee67 6261
464c6927
PE
6262 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
6263 Use the pattern recommended by Autoconf 2.57, except also protect
6264 against double-definition.
6265 * src/system.h: Likewise.
6266 Portability issues reported by Nelson H. F. Beebe.
d600ee67 6267
464c6927
PE
6268 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
6269 All uses changed. Provide a definition in both C and C++.
6270 (yytrue, yyfalse): Define even if defined (__cplusplus).
6271
6272 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
6273 Reported by Nelson H. F. Beebe.
d600ee67 6274
464c6927
PE
6275 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
6276
0f42c7d5
PE
62772003-01-02 Paul Eggert <eggert@twinsun.com>
6278
6279 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
6280 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
6281 Bug reported by Nelson H. F. Beebe.
6282
dc546b0f
PE
62832003-01-01 Paul Eggert <eggert@twinsun.com>
6284
6285 * Version 1.875.
6286
2c09b6a7
PE
62872002-12-30 Paul Eggert <eggert@twinsun.com>
6288
6289 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
6290 Moved here from...
6291 (<INITIAL>","): Here. This causes stray "," to be treated
6292 more uniformly.
6293
dc546b0f 6294 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
6295 last brace in braced code when not in Yacc mode, for compatibility
6296 with Bison 1.35. This resurrects the 2001-12-15 patch to
6297 src/reader.c.
6298
6299 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
6300 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
6301
535c0f63
PE
63022002-12-28 Paul Eggert <eggert@twinsun.com>
6303
6304 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
6305 that of SYM's type. This fixes Debian bug 168069, reported by
6306 Thomas Olsson.
d600ee67 6307
963fcc17
PE
63082002-12-28 Paul Eggert <eggert@twinsun.com>
6309
6310 Version 1.75f.
6311
6312 Switch back to the Yacc style of conflict reports, undoing some
6313 of the 2002-07-30 change.
6314 * doc/bison.texinfo (Understanding): Use Yacc style for
6315 conflict reports. Also, use new way of locating rules.
6316 * src/conflicts.c (conflict_report):
6317 Renamed from conflict_report_yacc, removing the old
6318 'conflict_report'. Translate the entire conflict report at once,
6319 so that we don't assume that "," has the same interpretation in
6320 all languages.
6321 (conflicts_output): Use Yacc-style conflict report for each state,
6322 instead of our more-complicated style.
6323 (conflicts_print): Use Yacc-style conflict report, except print
6324 the input file name when not emulating Yacc.
6325 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
6326 Conflicted Reduction, %expect not enough, %expect too much,
6327 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
6328 * tests/existing.at (GNU Cim Grammar): Likewise.
6329 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
6330
6331 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
6332 fatal): Don't invoke fflush; it's not needed and it might even be
6333 harmful for stdout, as stdout might not be open.
6334 * src/reduce.c (reduce_print): Likewise.
6335
b1efe548
PE
63362002-12-27 Paul Eggert <eggert@twinsun.com>
6337
6338 Fix a bug where error locations were not being recorded correctly.
6339 This problem was originally reported by Paul Hilfinger in
161a71f3 6340 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
6341
6342 * data/yacc.c (yyparse): New local var yylerrsp, to record the
6343 top of the location stack's error locations.
6344 (yyerrlab): Set it. When discarding a token, push its location
6345 onto yylerrsp so that we don't lose track of the error's end.
6346 (yyerrlab1): Now is only the target of YYERROR, so that we can
6347 properly record the location of the action that failed. For GCC
6348 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
6349 GCC warning about yyerrlab1 being unused if YYERROR is unused.
6350 (yyerrlab2): New label, which yyerrlab now falls through to.
6351 Compute the error's location by applying YYLLOC_DEFAULT to
6352 the locations of all the symbols that went into the error.
6353 * doc/bison.texinfo (Location Default Action): Mention that
6354 YYLLOC_DEFAULT is also invoked for syntax errors.
6355 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6356 Error locations include the locations of all the tokens that were
6357 discarded, not just the last token.
d600ee67 6358
983c5c2c
PE
63592002-12-26 Paul Eggert <eggert@twinsun.com>
6360
b1efe548
PE
6361 * src/files.c: Include quote.h.
6362 (compute_output_file_names): Warn if we detect conflicting
6363 outputs to the same file. This should catch the misunderstanding
6364 exemplified by Debian Bug 165349, reported by Bruce Stephens..
6365
6366 * src/conflicts.c (conflicts_print): If the user specifies
6367 "%expect N", report an error if there are any reduce/reduce
6368 conflicts. This is what the manual says should happen.
6369 This fixes Debian bug 130890, reported by Anthony DeRobertis.
6370 * tests/conflicts.at (%expect with reduce conflicts): New test.
6371
983c5c2c
PE
6372 Don't use m4_include on relative file names, as it doesn't work as
6373 desired if there happens to be a file with that name under ".".
d600ee67 6374
983c5c2c
PE
6375 * m4sugar/version.m4: Remove; it was included but it wasn't used.
6376 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
6377 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
6378 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
6379 * src/output.c (output_skeleton): Use full path names when
6380 specifying a file to include; don't rely on include path, as
6381 it's unreliable when the working file contains a file with
6382 that name.
d600ee67 6383
983c5c2c
PE
63842002-12-25 Paul Eggert <eggert@twinsun.com>
6385
6386 Remove obsolete references to bison.simple and bison.hairy.
6387 Problem mentioned by Aubin Mahe in
161a71f3 6388 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
6389 * data/glr.c: Comment fix.
6390 * doc/bison.1: Remove references. Also, mention "yacc".
6391
6392 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
6393 with -g option.
6394
6395 * src/parse-gram.y (declaration): Use enum "report_states" rather
6396 than its numeric value 1.
6397
6398 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
6399 opening a new one. This fixes Debian bug 165349, reported by
6400 Bruce Stephens.
6401
23f2d9dc
PE
64022002-12-24 Paul Eggert <eggert@twinsun.com>
6403
6404 Version 1.75e.
6405
6406 * Makefile.maint (cvs-update): Don't assume that the shell
6407 supports $(...), as Solaris sh doesn't.
6408
6409 * src/parse-gram.y (lloc_default): Remove test for empty
6410 nonterminals at the end, since it didn't change the result.
6411
64122002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
6413
6414 If the user does not define YYSTYPE as a macro, Bison now declares it
6415 using typedef instead of defining it as a macro. POSIX requires this.
6416 For consistency, YYLTYPE is also declared instead of defined.
6417
6418 %union directives can now have a tag before the `{', e.g., the
6419 directive `%union foo {...}' now generates the C code
6420 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
6421 The default union tag is `YYSTYPE', for compatibility with Solaris 9
6422 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
6423 instead of `yyltype'.
6424
6425 `yystype' and `yyltype' are now obsolescent macros instead of being
6426 typedefs or tags; they are no longer documented and will be
6427 withdrawn in a future release.
6428
6429 * data/glr.c (b4_location_type): Remove.
6430 (YYSTYPE): Renamed from yystype.
6431 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
6432 (struct YYLTYPE): Renamed from struct yyltype.
6433 (YYLTYPE): Renamed from yyltype.
6434 (yyltype, yystype): New (and obsolescent) macros,
6435 for backward compatibility.
6436 * data/yacc.c: Likewise.
6437
6438 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
6439 does not specify a union tag. This is for compatibility with
6440 Solaris 9 yacc.
6441
6442 * src/parse-gram.y (add_param): 2nd arg is now char * not char
6443 const *, since it is now modified by stripping surrounding { }.
6444 (current_braced_code): Remove.
6445 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
6446 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
6447 trailing " {...}". Now of type <chars>.
6448 (grammar_declaration): Adjust to bundled tokens.
6449 (code_content): Remove; stripping is now done by add_param.
6450 (print_token_value): Print contents of bundled tokens.
6451 (token_name): New function.
6452
6453 * src/reader.h (braced_code, current_braced_code): Remove.
6454 (token_name): New decl.
6455
6456 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
6457 token_type, not braced_code code_kind. All uses changed.
6458 (SC_PRE_CODE): New state, for scanning after a keyword that
6459 has (or usually has) an immediately-following braced code.
6460 (token_type): New local var, to keep track of which token type
6461 to return when scanning braced code.
6462 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 6463 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
6464 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
6465 instead of returning a token type immediately.
6466 (<INITIAL>"{"): Set token type.
6467 (<SC_BRACED_CODE>"}"): Use it.
6468 (handle_action_dollar, handle_action_at): Now returns bool
6469 indicating success. Fail if ! current_rule; this prevents a core dump.
6470 (handle_symbol_code_dollar, handle_symbol_code_at):
6471 Remove; merge body into caller.
6472 (handle_dollar, handle_at): Complain in invalid contexts.
6473
6474 * NEWS, doc/bison.texinfo: Document the above.
6475 * NEWS: Fix years and program names in copyright notice.
6476
879ca4f8
PE
64772002-12-17 Paul Eggert <eggert@twinsun.com>
6478
6479 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
6480 Reporting, Table of Symbols): Omit mentions of %lex-param and
6481 %parse-param from the documentation for now.
6482
1c5fe69d
PE
64832002-12-15 Paul Eggert <eggert@twinsun.com>
6484
6485 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
6486 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
6487 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
6488 disagreed with the Bison documentation. Bug
6489 reported by Andrew Walrond.
d600ee67 6490
1c5fe69d
PE
6491 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
6492 as the caller now does that.
6493 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
6494 (YYEMPTY): Parenthesize right hand side, since others use it.
6495 (yyparse): Don't assume that our generated code is the only code
6496 that sets yychar.
6497
d1de5372
PE
64982002-12-13 Paul Eggert <eggert@twinsun.com>
6499
6500 Version 1.75d.
6501
6502 POSIX requires a "yacc" command.
6503 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
6504 (MOSTLYCLEANFILES): Add yacc.
6505 (yacc): New rule.
1c5fe69d 6506 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
6507 as an alias for bison y.
6508
6509 * po/LINGUAS: Add da.
d600ee67 6510
d1de5372
PE
6511 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
6512 problem with latest <getopt.h>.
6513 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
6514
6515 * doc/fdl.texi: Upgrade to 1.2.
6516 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
6517 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
6518 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
6519 gnulib.
6520 * config/install-sh: Sync with autotools.
6521
6522 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 6523 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
6524 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
6525 locations are requested.
6526 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
6527 locations are requested.
6528
d0f3fe23
PE
65292002-12-12 Paul Eggert <eggert@twinsun.com>
6530
6531 Remove unportable casts and storage allocation tricks.
6532 While we're at it, remove almost all casts, since they
6533 usually aren't needed and are a sign of trouble.
6534
6535 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
6536
6537 * src/derives.c (derives_compute): Do not subtract NTOKENS from
6538 the pointer DSET returned by malloc; this isn't portable.
6539 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
6540 Similarly for DERIVES.
6541 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
6542 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
6543 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
6544
6545 * src/derives.c (derives_compute): Do not bother invoking
6546 int_of_rule_number, since rule numbers are integers.
6547
6548 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
6549 rather than XMALLOC (char, N).
6550
6551 * src/files.c (filename_split): Rewrite to avoid cast.
6552
6553 * src/gram.h (symbol_number_as_item_number,
6554 item_number_as_symbol_number, rule_number_as_item_number,
6555 item_number_as_rule_number):
6556 Now inline functions rather than macros, to avoid casts.
6557 * src/state.h (state_number_as_int): Likewise.
6558 * src/tables.c (state_number_to_vector_number,
6559 symbol_number_to_vector_number): Likewise.
6560
6561 * src/gram.h (int_of_rule_number): Remove; no longer used.
6562
6563 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
6564 since the resulting storage is always stored into.
6565
6566 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
6567 where it's needed.
6568
6569 * src/muscle_tab.c (muscle_m4_output):
6570 Now inline. Return bool, not int.
6571 * src/state.c (state_compare): Likewise.
6572 * src/symtab.c (symbol_check_defined,
6573 symbol_check_alias_consistency, symbol_pack, symbol_translation,
6574 hash_compare_symbol, hash_symbol):
6575 Likewise.
6576 * src/uniqstr.c (uniqstr_print): Likewise.
6577 * src/muscle_tab.c (muscle_m4_output_processor):
6578 New function, to avoid casts.
6579 * src/state.c (state_comparator, stage_hasher): Likewise.
6580 * src/symtab.c (symbol_check_defined_processor,
6581 symbol_check_alias_consistency_processor, symbol_pack_processor,
6582 symbol_translation_processor, hash_symbol_comparator,
6583 hash_symbol_hasher): Likewise.
6584 * src/uniqstr.c (uniqstr_print_processor): Likewise.
6585 * src/muscle_tab.c (muscles_m4_output):
6586 Use new functions instead of casting old functions unportably.
6587 * src/state.c (state_hash_new): Likewise.
6588 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
6589 symbols_token_translations_init):
6590 Likewise.
6591 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
6592
6593 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
6594 var instead of casting to long, to avoid casts.
6595 (prepare_states): Use MALLOC rather than alloca, so that we don't
6596 have to worry about alloca.
6597 * src/state.c (state_hash_lookup): Likewise.
6598
6599 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
6600 local var instead of casting to unsigned char, to avoid casts.
6601
6602 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
6603 STATE_ALLOC): Remove.
6604 (transitions_new, errs_new, reductions_new, state_new): Use malloc
6605 rather than calloc, and use offsetof to avoid allocating slightly
6606 too much storage.
6607 (state_new): Initialize all members.
6608
6609 * src/state.c (state_hash): Use unsigned accumulator, not signed.
6610
6611 * src/symtab.c (symbol_free): Remove; unused.
6612 (symbol_get): Remove cast in lhs of assignment.
6613 (symbols_do): Now static. Accept generic arguments, not
6614 hashing-related ones.
6615
6616 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
6617 (symbol_processor): Remove.
6618 (symbols_do): Remove decl; now static.
6619
6620 * src/system.h (alloca): Remove; decl no longer needed.
6621 (<stddef.h>): Include, for offsetof.
6622 (<inttypes.>, <stdint.h>): Include if available.
6623 (uintptr_t): New type, if system lacks it.
6624 (CALLOC, MALLOC, REALLOC): New macros.
6625 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
6626 new macros.
6627
6628 * src/tables.c (table_size): Now int, to pacify GCC.
6629 (table_grow, table_ninf_remap): Use signed table size.
6630 (save_row): Don't bother initializing locals when not needed.
6631 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
6632 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
6633
6634 * src/vcg.h: Correct misspellings.
6635
6636 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
6637
6638
6639 * src/getargs.c (getargs): Don't assume EOF == -1.
6640
26b4a969
PE
66412002-12-09 Paul Eggert <eggert@twinsun.com>
6642
6643 Change identifier spellings to avoid collisions with names
6644 that are reserved by POSIX.
6645
6646 Don't use names ending in _t, since POSIX reserves them.
6647 For consistency, remove _e and _s endings -- they're weren't
6648 needed to remove ambiguity. All uses changed.
6649 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
6650 turn was just renamed from struniq_t.
6651 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
6652 which in turn was just renamed from struniq_processor_t.
6653 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
6654 in turn was renamed from hash_compare_struniq_t.
6655 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
6656 (state_list): Renamed from state_list_t.
6657 * src/assoc.h (assoc): Renamed from assoc_t.
6658 * src/conflicts.c (enum conflict_resolution): Renamed from
6659 enum conflict_resolution_e.
6660 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
6661 (rule_list): Renamed from rule_list_t.
6662 * src/getargs.h (enum trace): Renamed from enum trace_e.
6663 (enum report): Renamed from enum report_e.
6664 * src/gram.h (item_number): Renamed from item_number_t.
6665 (rule_number): Renamed from rule_number_t.
6666 (struct rule_s): Remove the "rule_s" part; not used.
6667 (rule): Renamed from rule_t.
6668 (rule_filter): Renamed from rule_filter_t.
6669 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
6670 (goto_list): Renamed from goto_list_t.
6671 * src/lalr.h (goto_number): Renamed from goto_number_t.
6672 * src/location.h (location): Renamed from location_t.
6673 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
6674 and moved here from:
6675 * src/muscle_tab.h (muscle_entry_t): here.
6676 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
6677 (rule_list): Renamed from rule_list_t.
6678 * src/print_graph.c (static_graph): Renamed from graph.
6679 * src/reader.h (braced_code): Renamed from braced_code_t.
6680 Remove brace_code_e tag.
6681 * src/relation.h (relation_node): Renamed from relation_node_t.
6682 (relation_nodes): Renamed from relation_nodes_t.
6683 (relation): Renamed from relation_t.
6684 * src/state.h (state_number): Renamed from state_number_t.
6685 (struct state): Renamed from struct state_s.
6686 (state): Renamed from state_t.
6687 (transitions): Renamed from transitions_t. Unused (and
6688 misspelled) transtion_s tag removed.
6689 (errs): Renamed from errs_t. Unused errs_s tag removed.
6690 (reductions): Renamed from reductions_t. Unused tag
6691 reductions_s removed.
6692 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
6693 (struct symbol_list): Renamed from struct symbol_list_s.
6694 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
6695 (struct symbol): Renamed from struct symbol_s.
6696 (symbol): Renamed from symbol_t.
6697 * src/tables.c (vector_number): Renamed from vector_number_t.
6698 (action_number): Renamed from action_t.
6699 * src/tables.h (base_number): Renamed from base_t.
6700 * src/vcg.h (enum color): Renamed from enum color_e.
6701 (enum textmode): Renamed from enum textmode_e.
6702 (enum shape): Renamed from enum shape_e.
6703 (struct colorentry): Renamed from struct colorentry_s.
6704 (struct classname): Renamed from struct classname_s.
6705 (struct infoname): Renamed from struct infoname_s.
6706 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
6707 (enum decision): Renamed from enum decision_e.
6708 (enum orientation): Renamed from enum orientation_e.
6709 (enum alignment): Renamed from enum alignment_e.
6710 (enum arrow_mode): Renamed from enum arrow_mode_e.
6711 (enum crossing_type): Renamed from enum crossing_type_e.
6712 (enum view): Renamed from enum view_e.
6713 (struct node): Renamed from struct node_s.
6714 (node): Renamed from node_t.
6715 (enum linestyle): Renamed from enum linestyle_e.
6716 (enum arrowstyle): Renamed from enum arrowstyle_e.
6717 (struct edge): Renamed from struct edge.
6718 (edge): Renamed from edge_t.
6719 (struct graph): Renamed from struct graph_s.
6720 (graph): Renamed from graph_t.
6721 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
6722 Rename value_t -> value.
6723 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
6724 value_t_as_yystype -> value_as_yystype.
6725
6726 Don't include <errno.h> in the mainstream code, since it
6727 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
6728 * lib/get-errno.c, lib/get-errno.h: New files.
6729 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
6730 get-errno.c.
6731 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
6732 * src/output.c (output_skeleton): Likewise.
6733 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
6734 instead of errno.
6735 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
6736 Likewise.
6737 (handle_action_dollar, handle_action_at): Likewise.
6738 * src/system.h: Do not include <errno.h>.
6739 (TAB_EXT): Renamed from EXT_TAB.
6740 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
6741
6742 Avoid str[a-z]*, since <string.h> reserves that name space.
6743 Change all instances of "struniq" in names to "uniqstr", and
6744 likewise for "STRUNIQ" and "UNIQSTR".
6745 * src/uniqstr.c: Renamed from src/struniq.c.
6746 * src/uniqstr.h: Renamed from src/struniq.h.
6747 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
6748 * src/files.c (strsuffix): Remove; unused.
6749 (concat2): Renamed from stringappend. Now static.
6750 * src/files.h (strsuffix, stringappend): Remove; unused.
6751 * src/parse-gram.y (<chars>): Renamed from <string>.
6752 (<uniqstr>): Renamed from <struniq>.
6753 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
6754 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
6755 (struct graph_s.expand): Renamed from struct graph_s.stretch.
6756 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
6757 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
6758 (N_EXPAND): Renamed from N_STRETCH.
6759
6760 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
6761 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
6762 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
6763 Remove; unused.
6764 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
6765 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
6766 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
6767 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
6768 (BASE_MAXIMUM): Renamed from BASE_MAX.
6769 (BASE_MINIMUM): Renamed from BASE_MIN.
6770 (ACTION_MAX): Remove; unused.
6771 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
6772 Unnecessary casts removed from above defines.
6773
6774
6775 Fix misspelling in names.
6776 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
6777 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
6778 G_NODE_ALIGNEMENT.
6779
6780
6781 * lib/timevar.c (timevar_report): Renamed from time_report,
6782 for consistency with other names.
6783 * lib/timevar.h (timevar_report): New decl.
6784 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
6785
6786
6787 Sort include-file uses.
6788
6789 Reorder all include files under src to be in the order "system.h".
6790 then the ../lib include files in angle brackets (alphabetized),
6791 then the . include files in double-quotes (alphabetized). Fix
6792 dependency breakages encountered in this process, as follows:
6793 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
6794 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
6795 * src/state.h: Include "symtab.h".
6796
996b1c7e
PE
67972002-12-08 Paul Eggert <eggert@twinsun.com>
6798
6799 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
6800 since this causes problems when __file__ contains character
6801 sequences like "@" that are treated specially by src/scan-skel.l.
6802 Instead, just use the file's basename. This fixes the bug
6803 reported by Martin Mokrejs in
161a71f3 6804 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 6805
e19c4e5d
PE
68062002-12-06 Paul Eggert <eggert@twinsun.com>
6807
6808 Add support for rules that do not have trailing semicolons, as
6809 POSIX requires. Improve the quality of locations in Bison
6810 diagnostics.
26b4a969 6811
e19c4e5d
PE
6812 * src/location.c: Include <quotearg.h>.
6813 (empty_location): Now const.
6814 (location_print): New function. Follow the recommendation of the
6815 GNU Coding Standards for locations that span file boundaries.
6816 * src/location.h: Do not include <quotearg.h>; no longer needed.
6817 (boundary): New type.
6818 (location_t): Use it. This allows locations to span file boundaries.
6819 All member uses changed: file -> start.file or end.file (as needed),
6820 first_line -> start.line, first_column -> start.column,
6821 last_line -> end.line, last_column -> end.column.
6822 (equal_boundaries): New function.
6823 (LOCATION_RESET, LOCATION_STEP): Remove.
6824 (LOCATION_PRINT): Remove. All callers changed to use location_print.
6825 (empty_location): Now const.
6826 (location_print): New decl.
6827 * src/parse-gram.y (lloc_default): New function, which handles
6828 empty locations more accurately.
6829 (YYLLOC_DEFAULT): Use it.
6830 (%token COLON): Remove.
6831 (%token ID_COLON): New token.
26b4a969 6832 (rules): Use it.
e19c4e5d
PE
6833 (declarations, rules): Remove trailing semicolon.
6834 (declaration, rules_or_grammar_declaration):
6835 Allow empty (";") declaration.
6836 (symbol_def): Remove empty actions; no longer needed.
6837 (rules_or_grammar_declaration): Remove trailing semicolon.
6838 (semi_colon.opt): Remove.
6839 * src/reader.h: Include location.h.
6840 (scanner_cursor): New decl.
6841 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
6842 rolling our own.
6843 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
6844 of *loc.
6845 (STEP): Remove. No longer needed, now that adjust_location does
6846 the work. All uses removed.
6847 (scanner_cursor): New var.
6848 (adjust_location): Renamed from extend_location. It now sets
6849 *loc and adjusts the scanner cursor. All uses changed.
6850 Don't bother testing for CR.
6851 (handle_syncline): Remove location arg; now updates scanner cursor.
6852 All callers changed.
6853 (unexpected_end_of_file): Now accepts start boundary of token or
6854 comment, not location. All callers changed. Update scanner cursor,
6855 not the location.
6856 (SC_AFTER_IDENTIFIER): New state.
6857 (context_state): Renamed from c_context. All uses changed.
6858 (id_loc, code_start, token_start): New local vars.
6859 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
6860 processing of Yacc white space and equivalents here.
6861 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
6862 instead of returning ID immediately, since we need to search for
6863 a subsequent colon.
6864 (<INITIAL>"'", "\""): Save token_start.
6865 (<INITIAL>"%{", "{", "%%"): Save code_start.
6866 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
6867 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
6868 BEGIN context_state at end, not INITIAL.
6869 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
6870 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
6871 Return correct token start.
6872 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
6873 the start of a character, string or multiline comment is found.
6874 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
6875 Reduction): Adjust reported locations to match the more-precise
6876 results now expected.
6877 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
6878 * tests/reduce.at (Useless Rules, Reduced Automaton,
6879 Underivable Rules): Likewise.
6880 * tests/regression.at (Invalid inputs): No longer `expecting ";"
6881 or "|"' now that so many other tokens are allowed by the new grammar.
6882
6883 * src/complain.h (current_file): Remove duplicate decl;
6884 current_file is now owned by files.h.
6885 * src/complain.c, src/scan-gram.l: Include files.h.
6886
68872002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 6888
e19c4e5d
PE
6889 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
6890 promotes to int; it might be unsigned int.
6891 * data/yacc.c (yy_reduce_print): Likewise.
6892
6893 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
6894 be #defined in the prologue, not in the Bison declarations.
6895 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 6896
b64755e3
PE
68972002-12-02 Paul Eggert <eggert@twinsun.com>
6898
6899 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
6900 * lib/strtoul.c: New file, from gnulib.
6901 This fixes a porting bug reported by Peter Klein in
161a71f3 6902 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 6903
6e746484
PE
69042002-11-30 Paul Eggert <eggert@twinsun.com>
6905
b64755e3
PE
6906 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
6907 and put only a forward declaration in the prologue. This is for
6908 consistency with the other scanner helper functions.
6909
6ba55592
PE
6910 Type clashes now generate warnings, not errors, since it
6911 appears that POSIX may allow some grammars with type clashes.
6912 * src/reader.c (grammar_current_rule_check): Warn about
6913 type clashes instead of complaining.
6914 * tests/input.at (Type Clashes): Expect warnings, not complaints.
6915
6e746484
PE
6916 Add Yacc library, since POSIX requires it.
6917 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
6918 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
6919 * lib/main.c, lib/yyerror.c: New files.
6920
6921 gram_error can be static; it need not be extern.
6922 * src/reader.h (gram_error): Remove decl.
6923 * src/parse-gram.y (gram_error): Now static. Add static decl.
6924 (print_token_value): Omit parameter names from forward decl,
6925 for consistency.
6926
88510f9c
PE
69272002-11-29 Paul Eggert <eggert@twinsun.com>
6928
6e746484
PE
6929 * doc/bison.texinfo: Emphasize that yylex and yyerror must
6930 be declared before being used. E.g., one should typically
6931 declare them in the prologue. Use GNU coding style in examples.
6932 Put "const" consistently after the type it modifies. Mention
6933 that C99 supports "inline". Mention that yyerror traditionally
6934 returns "int".
6935
88510f9c
PE
6936 %parse-param and %lex-param now take just one argument, the
6937 declaration; the argument name is deduced from the declaration.
6938
6939 * doc/bison.texinfo (Parser Function, Pure Calling, Error
6940 Reporting, Table of Symbols): Document this.
6941 * src/parse-gram.y (add_param): New function.
6942 (COMMA): Remove.
6943 (declaration): Implement new rule for %parse-param and %lex-param.
6944 * src/scan-gram.l: "," now elicits a warning, rather than being
6945 a token; this is more compatible with byacc.
6946 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
6947
bb92250c
PE
69482002-11-27 Paul Eggert <eggert@twinsun.com>
6949
6950 Rename identifiers to avoid real and potential collisions.
6951
6952 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
6953 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 6954 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
6955 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
6956 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
6957 * src/parse-gram.y (print_token_value): Renamed from yyprint.
6958 All uses changed.
6959 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
6960 The name "yycontrol" violates the name space rules, and this stuff
6961 wasn't being used anyway.
6962 (input): Remove action; this stuff wasn't being used.
6963 (gram_error): Rename local variable yylloc -> loc.
6964 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
6965 (YY_DECL): Don't use "yy" at start of local variables.
6966 All uses changed, e.g., yylloc -> loc.
6967 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
6968 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
6969 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
6970 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
6971
6972 * src/parse-gram.y (gram_error): loc is now const *.
6973 * src/reader.h (gram_error): Likewise.
6974
3af4feb2
PE
69752002-11-24 Paul Eggert <eggert@twinsun.com>
6976
6977 Version 1.75c.
6978
6979 * tests/actions.at (Actions after errors): Use an output format
6980 more similar to that of the Printers and Destructors test.
6981 Test the position of the ';' token too.
6982 (Printers and Destructors): Likewise.
6983 (Printers and Destructors: %glr-parser): Remove for now, to avoid
6984 unnecessarily alarming people when the test fails.
6985
6986 * data/yacc.c (yyerrlab1): Move this label down, so that the
6987 parser does not discard the lookahead token if the user code
6988 invokes YYERROR. This change is required for POSIX conformance.
6989
6990 * lib/error.c: Sync with gnulib.
6991
69922002-11-22 Paul Eggert <eggert@twinsun.com>
6993
6994 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
6995 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
6996 * lib/xmalloc.c: Likewise.
26b4a969 6997
58004308
PE
69982002-11-20 Paul Eggert <eggert@twinsun.com>
6999
7000 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
7001
70022002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 7003
58004308
PE
7004 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
7005 should use `if (! x) abort ();' rather than `assert (x);', and
7006 anyway it's one less thing to worry about configuring.
7007
7008 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
7009 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
7010 and replace all instances of assert with abort.
7011 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7012 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
7013
7014 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
7015 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
7016 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
7017 hash_find_entry, hash_rehash, hash_insert): Likewise.
7018 * src/conflicts.c (resolve_sr_conflict): Likewise.
7019 * src/lalr.c (set_goto_map, map_goto): Likewise.
7020 * src/nullable.c (nullable_compute): Likewise.
7021 * src/output.c (prepare_rules, token_definitions_output): Likewise.
7022 * src/reader.c (packgram, reader): Likewise.
7023 * src/state.c (state_new, state_free, state_transitions_set,
7024 state_reduction_find): Likewise.
7025 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
7026 symbol_pack): Likewise.
7027 * src/tables.c (conflict_row, pack_vector): Likewise.
7028 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7029 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7030 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
7031 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
7032
7033 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
7034 (ARGMATCH_CONSTRAINT): New macro.
7035 (ARGMATCH_ASSERT): Use it.
7036
7037 * src/system.h (verify): New macro.
7038 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
7039 rather than assert.
7040 * src/tables.c (tables_generate): Likewise.
7041
7042 * src/struniq.c (struniq_assert): Now returns void, and aborts
7043 if the assertion is false.
7044 (struniq_assert_p): Remove.
7045 * src/struniq.h: Likewise.
7046
76ae8198
PE
70472002-11-18 Paul Eggert <eggert@twinsun.com>
7048
7049 * data/glr.c (yygetLRActions): Replace `yyindex' with
7050 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
7051 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 7052 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 7053
d3c4e709
AD
70542002-11-18 Akim Demaille <akim@epita.fr>
7055
7056 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
7057 space.
7058 From Tim Van Holder.
7059
8d8a7238
PE
70602002-11-17 Paul Eggert <eggert@twinsun.com>
7061
7062 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
7063 to "SyntaxError" for consistency with my 2002-11-15 change.
7064
7065 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
7066 not define to {}, since this breaks the common use of `YYDPRINTF
7067 ((...));' if a single statement is desired (e.g. before `else').
7068 Work around GCC warnings by surrounding corresponding calls with
7069 {} if needed.
7070 (yyhasResolvedValue): Remove unused function.
7071 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
7072 loop body.
7073 (yyreportSyntaxError): Renamed from yyreportParseError.
7074 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
7075 All uses changed.
7076 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
7077 extern when possible. Remove unused initializations.
7078
b0937b22
AD
70792002-11-16 Akim Demaille <akim@epita.fr>
7080
7081 Augment the similarity between GLR and LALR traces.
7082
7083 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
7084 (YY_REDUCE_PRINT): New.
7085 (yyparse): Use them.
7086 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
7087 YYDPRINT here.
7088 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
7089 state reached after the reduction/recovery, since...
7090 (yyparse, yyprocessOneStack): Report the state we are entering in.
7091
c5e3e510
AD
70922002-11-16 Akim Demaille <akim@epita.fr>
7093
7094 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
7095 Add support for --trace=skeleton.
7096 * src/scan-skel.l: %option debug.
7097 Scan strings of non-@ or \n instead of character by character.
7098 (scan_skel): Handle trace_skeleton.
7099 (QPUTS): New.
7100 (@output_parser_name@, @output_header_name@): ``Restore'' their
7101 support (used to be M4 macros).
7102 * data/yacc.c: Quote larger chunks, a la glr.c.
7103 * data/lalr1.cc: Likewise.
7104 The header guards are no longer available, so use some other
7105 string than `YYLSP_NEEDED'.
7106
4c6cc1db
AD
71072002-11-16 Akim Demaille <akim@epita.fr>
7108
7109 Make the ``Printers and Destructors'' test more verbose, taking
7110 `yacc.c''s behavior as (possibly wrong) reference.
7111
7112 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
7113 instead of fprint on stdout.
7114 Set and report the last_line of the symbols.
7115 Consistently display values and locations.
7116
6d9e8019
PE
71172002-11-16 Paul Eggert <eggert@twinsun.com>
7118
7119 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
7120
6e649e65
PE
71212002-11-15 Paul Eggert <eggert@twinsun.com>
7122
b25d88f6
PE
7123 * tests/actions.at (Actions after errors): New test case.
7124
6e649e65
PE
7125 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
7126 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
7127 tests/action.at, tests/calc.at, tests/conflicts.at,
7128 tests/cxx-type.at, tests/regression.at:
7129 "parse error" -> "syntax error" for POSIX compatibility.
7130 "parsing stack overflow..." -> "parser stack overflow" so
7131 that code matches Bison documentation.
7132
0f39aab9
AD
71332002-11-15 Akim Demaille <akim@epita.fr>
7134
7135 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
7136 take two BRACED_CODE, not two string_content.
7137 Free the scanner's obstack when we are done.
7138 (code_content): New.
7139 * tests/calc.at: Adjust.
7140 * doc/bison.texinfo: Adjust.
7141 Also, make sure to include the `,' for these declarations.
7142
761c1926
AD
71432002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
7144
7145 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
7146 definition; avoids potential autoreconf problems.
7147
b0f98b10
AD
71482002-11-15 Akim Demaille <akim@epita.fr>
7149
7150 Always check the value returned by yyparse.
7151
7152 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
7153 returned by yyparse.
7154 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
7155 Adjust calls.
7156 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
7157 returned by yyparse.
7158
970785f1
PH
71592002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7160
7161 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
7162 on input.at test.
7163
8fcc7db1
PE
71642002-11-14 Paul Eggert <eggert@twinsun.com>
7165
7ec1b48e
PE
7166 * src/output.c (output_skeleton): Call xfopen instead of
7167 duplicating xfopen's body.
7168
cfff7583 7169 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 7170 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 7171
8fcc7db1
PE
7172 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
7173 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
7174 Group compiler. Instead, use "$CC -E bar.c". Include the .h
7175 file twice in the grammar, as an extra check.
7176
7177 * tests/input.at (Torturing the Scanner): Surround the
7178 backslash-newline tests with "#if 0", to make it less likely that
7179 we'll run into compiler bugs. Bring back solitary \ inside
7180 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 7181 test backslash-newline in C character constant.
8fcc7db1 7182
4e8d992c
AD
71832002-11-14 Akim Demaille <akim@epita.fr>
7184
7185 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
7186 status of the compiler.
f32b346d 7187 Calling `exit 1' is no longer needed.
4e8d992c
AD
7188 Reported by Nelson H. F. Beebe.
7189
9501dc6e
AD
71902002-11-14 Akim Demaille <akim@epita.fr>
7191
7192 * tests/atlocal.in (CPPFLAGS): We have config.h.
7193 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
7194 New.
7195 * tests/actions.at, tests/calc.at, tests/conflicts.at,
7196 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
7197 * tests/regression.at, tests/torture.at: Use them for all the
7198 grammars that are to be compiled.
7199 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
7200 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
7201 * doc/bison.texinfo (GLR Parsers): Document `inline'.
7202
18b519c0
AD
72032002-11-14 Akim Demaille <akim@epita.fr>
7204
7205 * doc/bison.texinfo: Various formatting changes (alignments in
7206 samples, additional @group/@end group, GCS in samples.
7207 Use @deffn instead of simple @table to define the directives,
7208 macros, variables etc.
7209
9a86cdb9
PE
72102002-11-13 Paul Eggert <eggert@twinsun.com>
7211
daa33def 7212 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 7213 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 7214
daa33def 7215 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 7216 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
7217 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
7218 * tests/headers.at (export YYLTYPE): Likewise.
7219
7220 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 7221 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 7222
9a86cdb9
PE
7223 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
7224 comments, since they're not portable. Use GNU coding style.
7225
9c1e26bd
AD
72262002-11-13 Akim Demaille <akim@epita.fr>
7227
7228 * data/yacc.c: Leave bigger chunks of quoted text.
7229 (YYDSYMPRINTF): New.
7230 Use it to report symbol activities.
7231 * data/glr.c (YYDSYMPRINTF): New.
7232 Use it.
7233
87f721cc
PE
72342002-11-12 Paul Eggert <eggert@twinsun.com>
7235
7236 Version 1.75b.
7237
7238 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
7239 (yyglrReduce): Return yyok, not 0.
7240 This should avoid the enumerated-type warnings reported
464c6927 7241 by Nelson H. F. Beebe in
161a71f3 7242 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
7243
7244 * lib/bbitset.h (BITSET_INLINE): Remove.
7245 * lib/bitset.h [! BITSET_INLINE]: Remove.
7246 (bitset_set, bitset_reset, bitset_test): Rename local vars
7247 to avoid shadowing warnings by GCC.
7248
7249 * data/glr.c (inline): Remove #define. It's the user's
7250 responsibility to #define it away, just like 'const'.
464c6927 7251 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 7252 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 7253
87f721cc
PE
7254 * Makefile.maint (po-check): Scan .l and .y files instead of the
7255 .c and the .h files that they generate. This fixes the bug
7256 reported by Tim Van Holder in:
161a71f3 7257 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
7258 Look for N_ as well as for _. Try to avoid matching #define for
7259 N_ and _.
7260 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
7261 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
7262 * src/scan-gram.l: Revamp regular expressions so that " and '
7263 do not confuse xgettext.
7264
7265 * src/struniq.h (struniq_new): Do not declare the return type
7266 to be 'const'; this violates the C standard.
7267 * src/struniq.c (struniq_new): Likewise.
7268
be14ade5
AD
72692002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
7270
7271 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
7272 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
7273 linker.
7274
05291fbc
AD
72752002-11-12 Akim Demaille <akim@epita.fr>
7276
7277 * Makefile.maint: Sync with Autoconf:
7278 (local_updates): New.
7279
1f5fd52e
AD
72802002-11-12 Akim Demaille <akim@epita.fr>
7281
7282 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
7283
283f1e64
AD
72842002-11-12 Akim Demaille <akim@epita.fr>
7285
7286 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
7287 locations.
7288
886b69d1
AD
72892002-11-12 Akim Demaille <akim@epita.fr>
7290
7291 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
7292 not yyvalue.
7293
3df37415
AD
72942002-11-12 Akim Demaille <akim@epita.fr>
7295
7296 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
7297 Use it to test the GLR parser.
7298
7bd6c77e
AD
72992002-11-12 Akim Demaille <akim@epita.fr>
7300
7301 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
7302 defines it.
7303 * data/glr.c (yystos): New.
7304 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
7305 (YYDSYMPRINT): New.
7306 (yyval): Don't define it, it is handled via M4.
7307 (yyrecoverParseError): Free verbosely the discarded symbols.
7308 * data/yacc.c (yysymprint): Remove, rather...
7309 (b4_yysymprint_generate): invoke.
7310 * data/c.m4 (b4_yysymprint_generate): New.
7311 Accept pointers as arguments, as opposed to the version from
7312 yacc.c.
7313 (b4_yydestruct_generate): Likewise.
7314 * tests/cations.at (Printers and Destructors): Use Bison directives
7315 instead of CPP macros.
7316 Don't rely on internal details.
7317
b0400cc6
AD
73182002-11-12 Akim Demaille <akim@epita.fr>
7319
7320 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
7321 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
7322 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
7323 it against YYEMPTY and so forth), work on yytoken (i.e., set
7324 it to YYEMPTY etc.).
7325 (yydestruct): Replace with a b4_yydestruct_generate invocation.
7326 (b4_symbol_actions): Remove.
7327 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
7328 for 0, end-of-input.
7329
72f889cc
AD
73302002-11-12 Akim Demaille <akim@epita.fr>
7331
7332 * doc/bison.texinfo (Destructor Decl): New.
7333
b1ae9233
AD
73342002-11-12 Akim Demaille <akim@epita.fr>
7335
7336 * src/tables.c (tables_generate): Use free for pointers that
7337 cannot be NULL, not XFREE.
7338 (pack_vector): Use assert, not fatal, for bound violations.
7339 * src/state.c (state_new): Likewise.
7340 * src/reader.c (reader): Likewise.
7341 * src/lalr.c (set_goto_map): Likewise.
72f889cc 7342 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
7343 the file name.
7344
7ec2d4cd
AD
73452002-11-12 Akim Demaille <akim@epita.fr>
7346
7347 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
7348 Restore.
7349 * src/scan-gram.l (last_string): Is global to the file, not to
7350 yylex.
7351 * src/parse-gram.y (input): Don't append the epilogue here,
7352 (epilogue.opt): do it here, and free the scanner's obstack.
7353 * src/reader.c (epilogue_set): Rename as...
7354 (epilogue_augment): this.
7355 * data/c.m4 (b4_epilogue): Defaults to empty.
7356
573a6cd3
AD
73572002-11-12 Akim Demaille <akim@epita.fr>
7358
7359 * src/getargs.c (long_options): Remove duplicates.
7360 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
7361 Remove.
7362 * doc/bison.rnh: Remove.
7363 * doc/bison.texinfo (VMS Invocation): Remove.
7364
95612cfa
AD
73652002-11-12 Akim Demaille <akim@epita.fr>
7366
7367 * src/struniq.h, src/struniq.c (struniq_t): Is const.
7368 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
7369
7370 Use struniq for symbols.
7371
7372 * src/symtab.h (symbol_t): The tag member is a struniq.
7373 (symbol_type_set): Adjust.
7374 * src/symtab.c (symbol_new): Takes a struniq.
7375 (symbol_free): Don't free the tag member.
7376 (hash_compare_symbol_t, hash_symbol_t): Rename as...
7377 (hash_compare_symbol, hash_symbol): these.
7378 Use the fact that tags as struniqs.
7379 (symbol_get): Use struniq_new.
7380 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
7381 Returns a strniq.
7382 * src/reader.h (merger_list, grammar_currentmerge_set): The name
7383 and type members are struniqs.
7384 * src/reader.c (get_merge_function)
7385 (grammar_current_rule_merge_set): Adjust.
7386 (TYPE, current_type): Are struniq.
7387
7388 Use struniq for file names.
7389
7390 * src/files.h, src/files.c (infile): Split into...
7391 (grammar_file, current_file): these.
7392 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
7393 * src/reduce.c (reduce_print): Likewise.
7394 * src/getargs.c (getargs): Likewise.
7395 * src/complain.h, src/complain.c: Likewise.
7396 * src/main.c (main): Call struniqs_new early enough to use it for
7397 file names.
7398 Don't free the input file name.
7399
3e6656f9
AD
74002002-11-12 Akim Demaille <akim@epita.fr>
7401
7402 * src/symtab.c (symbol_free): Remove dead deactivated code:
7403 type_name are properly removed.
7404 Don't use XFREE to free items that cannot be NULL.
7405 * src/struniq.h, src/struniq.c: New.
7406 * src/main.c (main): Initialize/free struniqs.
7407 * src/parse-gram.y (%union): Add astruniq member.
7408 (yyprint): Adjust.
7409 * src/scan-gram.l (<{tag}>): Return a struniq.
7410 Free the obstack bit that used to store it.
7411 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
7412
7672019c
PE
74132002-11-11 Paul Eggert <eggert@twinsun.com>
7414
7415 Revamp to fix many (but not all) of the C- and M4-related quoting
7416 problems. Among other things, this fixes the Bison bug reported
7417 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 7418 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
7419
7420 Use new @ escapes consistently. Represent brackets with @{ and @}
7421 rather than @<:@ and @:>@, since this works a bit better with dumb
7422 editors like vi. Represent @ with @@, since @ is now consistently
7423 an escape. Use @oline@ and @ofile@ rather than __oline__ and
7424 __ofile__, to avoid unexpected expansions. Similarly, use @output
7425 rather than #output.
7426
7427 * data/c.m4 (b4_copyright): Omit file name from comment, since
7428 the file name could contain "*/".
7429 (b4_synclines_flag): Don't quote the 2nd argument; it should already
7430 be quoted. All uses changed.
7431
7432 * data/glr.c: Use new @ escapes consistently.
7433 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
7434 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
7435 Remove, since they couldn't handle arbitrary characters in file
7436 names.
7437 * data/lalr1.cc: Likewise.
7438 * data/yacc.c: Likewise.
7439
7440 * src/files.c (output_infix): Remove; all uses removed.
7441 * src/files.h: Likewise.
7442
7443 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
7444 mishandled funny characters in file names, and anyway it isn't
7445 needed any more.
7446 * data/yacc.c: Likewise.
7447 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
7448
7449 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
7450 * data/yacc.c: Likewise.
7451
7452 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
7453 strings now.
7454 (muscle_init): Quote filename as a C string.
7455 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
7456 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
7457 * src/output.c (escaped_file_name_output): New function.
7458 (prepare_symbols): Quote tokens for M4.
7459 (prepare): Don't insert output_infix, output_prefix,
7460 output_parser_name, output_header_name; this is now down by scan-skel.
7461 Insert skeleton as a C string.
7462
7463 * src/output.c (user_actions_output, symbol_destructors_output,
7464 symbol_printers_output): Quote filenames for C and M4.
7465 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7466
7467 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
7468 escapes other than \\ and \'; this simplifies the code.
7469 (<SC_STRING>): Likewise, for \\ and \".
7470 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
7471 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
7472 Use new escapes @{ and @} for [ and ].
7473
7474 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
7475 them with auto vars.
7476 Switch to new escape scheme, where @ is the escape character uniformly.
7477 Abort if a stray escape character is found. Avoid unbounded input
7478 buffer when parsing non-escaped text.
7479
7480 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
7481 __oline__, #output, $@, and @{ do not have unintended meanings.
7482
acea4f3b
PE
74832002-11-09 Paul Eggert <eggert@twinsun.com>
7484
7485 Fix the test failure due to GCC warnings described in
161a71f3 7486 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
7487 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
7488 evaluate to 0 if it's impossible for NINF to be in the respective
7489 table.
7490 (yygetLRActions, yyrecoverParseError): Use them.
7491
7492 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
7493 counted in the token inserted at end of file. Now takes
7494 location_t *, not location_t, so that the location can be
7495 adjusted. All uses changed.
7496
7497 * tests/regression.at (Invalid inputs): Adjust wording in
7498 diagnostic to match the new behavior.
7499
7500 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
7501 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
7502 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
7503 abort ();'. This reduces the runtime of the "Many lookaheads"
7504 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
7505 GCC 3.2.
7506
20ef1ad5
PE
75072002-11-07 Paul Eggert <eggert@twinsun.com>
7508
7509 * src/parse-gram.y (CHARACTER): Remove unused token.
7510 All uses removed.
7511
7512 * src/scan-gram.l: Remove stack option. We no longer use the
7513 stack, since the stack was never deeper than 1; instead, use the
7514 new auto var c_context to record the stacked value.
7515
7516 Remove nounput option. At an unexpected end of file, we now unput
7517 the minimal input necessary to end cleanly; this simplifies the
7518 code.
7519
7520 Avoid unbounded token sizes where this is easy.
7521
7522 (unexpected_end_of_file): New function.
7523 Use it to systematize the error message on unexpected EOF.
7524 (last-string): Now auto, not static.
7525 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
7526 (scanner_last_string_free): Remove; not used.
7527 (percent_percent_count): Move decl to just before use.
7528 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
7529 not the (never otherwised-used) CHARACTER.
7530
93724f13
AD
75312002-11-07 Akim Demaille <akim@epita.fr>
7532
7533 Let yyerror always receive the msg as last argument, so that
7534 yyerror can be variadic.
7535
7536 * data/yacc.c (b4_yyerror_args): New.
7537 Use it when calling yyerror.
7538 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
7539 Use it when calling yyerror.
7540 * doc/bison.texinfo (Error Reporting): Adjust.
7541 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
7542 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
7543
6e40b4eb
AD
75442002-11-06 Akim Demaille <akim@epita.fr>
7545
7546 #line should have quoted strings.
7547 Ideally, this should be done by m4_quotearg.
7548
7549 * src/scan-skel.l: Include quotearg.h.
7550 Quote __ofile__.
7551 * src/output.c (symbol_printers_output)
7552 (symbol_destructors_output): Quote the file name.
7553
2dfbfc12
AD
75542002-11-06 Akim Demaille <akim@epita.fr>
7555
7556 * tests/regression.at (Invalid inputs): Adjust to the recent
7557 messages.
7558
437c2d80
AD
75592002-11-06 Akim Demaille <akim@epita.fr>
7560
7561 Restore --no-lines.
7562 Reported by Jim Kent.
7563
7564 * data/c.m4 (b4_syncline): New.
7565 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
7566 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
7567 * src/output.c (user_actions_output): Likewise.
7568 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 7569 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 7570
900c5db5
AD
75712002-11-06 Akim Demaille <akim@epita.fr>
7572
7573 * src/main.c (main): Free `infile'.
7574 * src/scan-gram.l (handle_syncline): New.
7575 Recognize `#line'.
7576 * src/output.c (user_actions_output, symbol_destructors_output)
7577 (symbol_printers_output): Use the location's file name, not
7578 infile.
7579 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7580
e183b123 75812002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 7582
e183b123 7583 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 7584 either has GLR conflict entries.
e183b123 7585
193eb6b7
PE
75862002-11-05 Paul Eggert <eggert@twinsun.com>
7587
e183b123
PE
7588 * src/scan-gram.l: Use more accurate diagnostics, e.g.
7589 "integer out of range" rather than "invalid value".
7590 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
7591 accordingly.
7592
193eb6b7
PE
7593 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
7594 Also, remove one static variable in the scanner.
7595
7596 * src/scan-gram.l (braces_level): Now auto, not static.
7597 Initialize to zero if the compiler is being picky.
7598 (INITIAL): Clear braces_level instead of incrementing it.
7599 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
7600 as POSIX 1003.1-2001 requires.
7601 * src/system.h (IF_LINT): New macro, taken from coreutils.
7602 * configure.ac: Define "lint" if --enable-gcc-warnings.
7603
29c01725
AD
76042002-11-05 Akim Demaille <akim@epita.fr>
7605
7606 * src/scan-gram.l: When it starts with `%', complain about the
7607 whole directive, not just that `invalid character: %'.
7608
8aeac3ca
AD
76092002-11-04 Akim Demaille <akim@epita.fr>
7610
7611 * Makefile.maint: Update from Autoconf.
7612 (update, cvs-update, po-update, do-po-update): New.
7613
793a58bb
AD
76142002-11-04 Akim Demaille <akim@epita.fr>
7615
7616 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
7617 and yyerror.
7618 Have yyerror `use' its arguments.
7619 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
7620 returns true when location & yacc & pure & parse-param.
7621 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
7622
c4d720cd
AD
76232002-11-04 Akim Demaille <akim@epita.fr>
7624
7625 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
7626 clashes.
7627 * src/scan-gram.l: Use [\'] instead of ['] to pacify
7628 font-lock-mode.
7629 Use complain_at.
7630 Use quote, not quote_n since LOCATION_PRINT no longer uses the
7631 slot 0.
7632
613a0dc5
PE
76332002-11-03 Paul Eggert <eggert@twinsun.com>
7634
7635 * src/reader.c (get_merge_function, grammar_current_rule_check):
7636 Use consistent diagnostics for reporting type name clashes.
7637 Quote the types with <>, for consistency with Yacc.
7638 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
7639
2a8d363a
AD
76402002-11-03 Akim Demaille <akim@epita.fr>
7641
7642 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
7643 New.
7644 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
7645 (b4_parse_param): Remove.
7646 Use b4_identification.
7647 Propagate b4_pure_args where needed to pass them to yyerror.
7648 * data/glr.m4 (b4_parse_param): Remove.
7649 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
7650 (b4_lpure_formals): New.
7651 Use b4_identification.
7652 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
7653 b4_user_formals and b4_user_args.
7654 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
7655 (yyreportAmbiguity): When using a pure parser, also need
7656 the location, and the parse-params.
7657 Adjust callers.
7658 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
7659 When using a pure parser, also need the parse-params.
7660 Adjust callers.
7661 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
7662 (%pure-parser + %parse-param) LALR and GLR parsers.
7663 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
7664 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
7665 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
7666 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
7667 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
7668 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
7669 * doc/bison.texinfo: Untabify the whole file.
7670 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
7671 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
7672 (Error Reporting): Adjust to these new directives.
7673 Document %error-verbose, deprecate YYERROR_VERBOSE.
7674
9e32add8
AD
76752002-11-03 Akim Demaille <akim@epita.fr>
7676
7677 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
7678 AT_CHECK_CALC_GLR invocations to use % directives, instead of
7679 command line options.
7680 * tests/cxx-type.at: Formatting changes.
7681
b02d90a5
PE
76822002-11-03 Paul Eggert <eggert@twinsun.com>
7683
7684 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
7685 to count columns correctly, and to check for invalid inputs.
9e32add8 7686
b02d90a5
PE
7687 Use mbsnwidth to count columns correctly. Account for tabs, too.
7688 Include mbswidth.h.
7689 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
7690 (extend_location): New function.
7691 (YY_LINES): Remove.
7692
7693 Handle CRLF in C code rather than in Lex code.
7694 (YY_INPUT): New macro.
7695 (no_cr_read): New function.
7696
7697 Scan UCNs, even though we don't fully handle them yet.
7698 (convert_ucn_to_byte): New function.
7699
7700 Handle backslash-newline correctly in C code.
7701 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
7702 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
7703 all uses changed.
7704 (tag, splice): New EREs. Do not allow NUL or newline in tags.
7705 Use {splice} wherever C allows backslash-newline.
7706 YY_STEP after space, newline, vertical-tab.
7707 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 7708
b02d90a5
PE
7709 (letter, id): Don't assume ASCII; e.g., spell out a-z.
7710
7711 ({int}, handle_action_dollar, handle_action_at): Check for integer
7712 overflow.
9e32add8 7713
b02d90a5
PE
7714 (YY_STEP): Omit trailing semicolon, so that it's more like C.
7715
7716 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
7717 as well as \000. Check for UCHAR_MAX, not 255.
7718 Allow \x with an arbitrary positive number of digits, as in C.
7719 Check for overflow here.
7720 Allow \? and UCNs, for compatibility with C.
7721
7722 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
7723 with quote slot used by complain_at.
7724
7725 * tests/input.at: Add tests for backslash-newline, m4 quotes
7726 in symbols, long literals, and funny escapes in strings.
7727
7728 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
7729 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
7730 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
7731 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
7732 * m4/mbswidth.m4: New file, from GNU coreutils.
7733
7734 * doc/bison.texinfo (Grammar Outline): Document // comments.
7735 (Symbols): Document that trigraphs have no special meaning in Bison,
7736 nor is backslash-newline allowed.
7737 (Actions): Document that trigraphs have no special meaning.
7738
7739 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
7740 no longer used.
7741
77422002-11-02 Paul Eggert <eggert@twinsun.com>
7743
7744 * src/reader.c: Don't include quote.h; not needed.
7745 (get_merge_function): Reword warning to be consistent with
7746 type clash diagnostic in grammar_current_rule_check.
7747
7748 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
7749 bug in trigraph handling.
7750
7751 * src/output.c (prepare_symbols): When printing token names,
7752 escape "[" as "@<:@" and likewise for "]".
7753
7754 * src/system.h (errno): Remove declaration, as we are now
7755 assuming C89 or better, and C89 guarantees errno.
7756
762b212b
PE
77572002-10-30 Paul Eggert <eggert@twinsun.com>
7758
7759 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
7760 Check for close failures.
7761 * src/files.h (xfclose): Return void, not int, since it always
7762 returned zero.
7763 * src/files.c (xfclose): Likewise. Report I/O error if ferror
7764 indicates one.
7765 * src/output.c (output_skeleton): Use xfclose rather than fclose
7766 and ferror. xfclose now checks ferror.
7767
7768 * data/glr.c (YYLEFTMOST_STATE): Remove.
7769 (yyreportTree): Use a stack-based leftmost state. This avoids
7770 our continuing battles with bogus warnings about initializers.
7771
56100c60
AD
77722002-10-30 Akim Demaille <akim@epita.fr>
7773
7774 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
7775 #if.
7776
51b4a04c
PH
77772002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7778
7779 * tests/glr-regr1.at: New test for reported regressions.
7780 * tests/testsuite.at: Add glr-regr1.at test.
7781 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 7782
bf1ebda2
PE
77832002-10-24 Paul Eggert <eggert@twinsun.com>
7784
5c16c6b1
PE
7785 Version 1.75a.
7786
bf1ebda2
PE
7787 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
7788 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
7789 we use malloc. Don't assume 'A' through 'Z' are contiguous.
7790 Don't assume strdup exists; POSIX says its an XSI extension.
7791 Check for buffer overflow on input.
7792
b526ee61
AD
77932002-10-24 Akim Demaille <akim@epita.fr>
7794
7795 * src/output.c (output_skeleton): Don't disable M4sugar comments
7796 too soon: it results in comments being expanded.
7797 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
7798 first output.
7799
f1886bb2
AD
78002002-10-24 Akim Demaille <akim@epita.fr>
7801
7802 * data/yacc.c (m4_int_type): New.
7803 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
7804 char' as only yacc.c wants K&R portability.
7805 * data/glr.c (yysigned_char): Remove.
7806 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
7807 Reported by Quoc Peyrot.
7808
c5576256
PE
78092002-10-23 Paul Eggert <eggert@twinsun.com>
7810
7811 * src/main.c (main): With --trace=time, report times even if a
7812 non-fatal error occurs. Formerly, the times were reported in some
7813 such cases but not in others.
7814 * src/reader.c (reader): Just return if a complaint has been issued,
7815 instead of exiting, so that 'main' can report times.
7816
27b0ffea
AD
78172002-10-22 Akim Demaille <akim@epita.fr>
7818
7819 * src/system.h: Include sys/types.
7820 Reported by Bert Deknuydt.
7821
223a7883
PE
78222002-10-23 Paul Eggert <eggert@twinsun.com>
7823
7824 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
7825 Suggested by Art Haas.
7826
78272002-10-22 Paul Eggert <eggert@twinsun.com>
7828
7829 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
7830 decl; not needed any more.
7831 * src/main.c (main): Use return to exit, undoing yesterday's change.
7832 The last OS that we could find where this wouldn't work is
7833 SunOS 3.5, and that's too old to worry about now.
7834
7835 * data/glr.c (struct yyltype): Define members even when not
7836 doing locations. This is more consistent with yacc.c, and it
7837 works around the following bug reports:
161a71f3
PE
7838 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
7839 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 7840
223a7883
PE
7841 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
7842 @acronym consistently. Standardize on "Yacc" instead of "YACC",
7843 "Algol" instead of "ALGOL". Give a bit more history about BNF.
7844
8b76775a
AD
78452002-10-22 Akim Demaille <akim@epita.fr>
7846
7847 * data/README: New.
7848
6db10d14
PE
78492002-10-21 Paul Eggert <eggert@twinsun.com>
7850
7851 Be consistent about 'bool'; the old code used an enum in one
7852 module and an int in another, and this violates the C standard.
7853 * m4/stdbool.m4: New file, from coreutils 4.5.3.
7854 * configure.ac (AC_HEADER_STDBOOL): Add.
7855 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
7856 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
7857 * src/symtab.c (hash_compare_symbol_t): Likewise.
7858 * src/system.h (bool, false, true): Use a definition consistent
7859 with ../lib/hash.c. All uses changed.
7860
7861 * src/complain.c (warning_issued): Renamed from warn_message_count,
7862 so that we needn't worry about integer overflow (!).
7863 Now of type bool. All uses changed.
7864 (complaint_issued): Renamed from complain_message_count; likewise.
7865
7866 * src/main.c (main): Use exit to exit with failure.
27b0ffea 7867
6db10d14
PE
7868 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
7869 rather than 1 and 0.
7870 * src/main.c (main): Likewise.
7871 * src/getargs.c (getargs): Likewise.
7872 * src/reader.c (reader): Likewise.
7873
7874 * src/getarg.c (getargs): Remove duplicate code for
7875 "Try `bison --help'".
7876
7877 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
7878 What was that "2" for?
7879
7880 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
7881 * src/getargs.c (usage): Likewise.
7882
7883 * src/getargs.c (getargs): When there are too few operands, report
7884 the last one. When there are too many, report the first extra
7885 one. This is how diffutils does it.
7886
92a060fd
PE
78872002-10-20 Paul Eggert <eggert@twinsun.com>
7888
7889 Remove K&R vestiges.
7890 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
7891 * src/complain.c (VA_START): Remove. Assume prototypes.
7892 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
7893 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
7894 fatal): Assume prototypes.
7895 * src/complain.h: Assume prototypes.
7896 * src/system.h (PARAMS): Remove.
7897 Include <limits.h> unconditionally, since it's guaranteeed even
7898 for a freestanding C89 compiler.
7899 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
7900 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 7901
e7cb57c0
AD
79022002-10-20 Akim Demaille <akim@epita.fr>
7903
7904 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
7905 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
7906 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
7907 (yyresolveStates, yyresolveAction, yyresolveStack)
7908 (yyprocessOneStack): Use them.
7909 (yy_reduce_print): New.
7910 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
7911
0245f82d
AD
79122002-10-20 Akim Demaille <akim@epita.fr>
7913
7914 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
7915 arguments and output `void'.
7916 (b4_c_function): Rename as...
7917 (b4_c_function_def): this.
7918 (b4_c_function_decl, b4_c_ansi_function_def)
7919 (b4_c_ansi_function_decl): New.
7920 Change the interpretation of the arguments: before `int, foo', now
7921 `int foo, foo'.
7922 * data/yacc.c (yyparse): Prototype and define thanks to these.
7923 Adjust b4_c_function_def uses.
7924 * data/glr.c (yyparse): Likewise, but ANSI only.
7925
39912f52
AD
79262002-10-20 Akim Demaille <akim@epita.fr>
7927
7928 * src/output.c (prepare): Move the definition of `tokens_number',
7929 `nterms_number', `undef_token_number', `user_token_number_max'
7930 to...
7931 (prepare_tokens): Here.
7932 (prepare_tokens): Rename as...
7933 (prepare_symbols): this.
7934 (prepare): Move the definition of `rules_number' to...
7935 (prepare_rules): here.
7936 (prepare): Move the definition of `last', `final_state_number',
7937 `states_number' to...
7938 (prepare_states): here.
7939 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
7940
20c1e2ad
AD
79412002-10-20 Akim Demaille <akim@epita.fr>
7942
7943 * src/tables.h, src/tables.c, src/output.c: Comment changes.
7944
21964f43
AD
79452002-10-20 Akim Demaille <akim@epita.fr>
7946
7947 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
7948 * data/c.m4: here.
7949
66d30cd4
AD
79502002-10-20 Akim Demaille <akim@epita.fr>
7951
7952 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
7953 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
7954 `pair'.
7955 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
7956 `name' to...
7957 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
7958 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
7959 These.
7960
95f2c9fe
PE
79612002-10-19 Paul Eggert <eggert@twinsun.com>
7962
7963 Do not create a temporary file, as that involves security and
7964 cleanup headaches. Instead, use a pair of pipes.
7965 Derived from a suggestion by Florian Krohm.
7966 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
7967 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
7968 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
7969 (BISON_PREREQ_SUBPIPE): Add.
7970 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
7971 Add subpipe.h, subpipe.c.
7972 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
7973 * po/POTFILES.in: Add lib/subpipe.c.
7974 * src/output.c: Include "subpipe.h".
7975 (m4_invoke): Remove decl.
7976 (scan_skel): New decl.
7977 (output_skeleton): Use pipe rather than temporary file for m4 input.
7978 Check that m4sugar.m4 is readable, to avoid deadlock.
7979 Check for pipe I/O error.
7980 * src/scan-skel.l (readpipe): Remove decl.
7981 (scan_skel): New function, to be used in place of m4_invoke.
7982 Read from stream rather than file.
66d30cd4 7983
95f2c9fe
PE
7984 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
7985 float, as this generates a warning on Solaris 8 + GCC 3.2 with
7986 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
7987 this generates a more-accurate value anyway.
7988
7989 * lib/timevar.c (timervar_accumulate): Rename locals to
7990 avoid confusion with similarly-named more-global.
7991 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
7992
7993 * src/output.c (prepare): Use xstrdup to convert char const *
7994 to char *, to avoid GCC warning.
7995
c19988b7
AD
79962002-10-19 Akim Demaille <akim@epita.fr>
7997
7998 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
7999 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
8000 Use them to have `calc.y' ready for %pure-parser.
8001 * data/yacc.c (YYLEX): Pass a yylex return type to
8002 b4_c_function_call.
8003
ae7453f2
AD
80042002-10-19 Akim Demaille <akim@epita.fr>
8005
8006 Prototype support of %lex-param and %parse-param.
8007
8008 * src/parse-gram.y: Add the definition of the %lex-param and
8009 %parse-param tokens, plus their rules.
8010 Drop the `_' version of %glr-parser.
8011 Add the "," token.
8012 * src/scan-gram.l (INITIAL): Scan them.
8013 * src/muscle_tab.c: Comment changes.
8014 (muscle_insert, muscle_find): Rename `pair' as `probe'.
8015 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
8016 (muscle_entry_s): The `value' member is no longer const.
8017 Adjust all dependencies.
8018 * src/muscle_tab.c (muscle_init): Adjust: use
8019 MUSCLE_INSERT_STRING.
8020 Initialize the obstack earlier.
8021 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
8022 (muscle_pair_list_grow): New.
8023 * data/c.m4 (b4_c_function_call, b4_c_args): New.
8024 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
8025 * tests/calc.at: Use %locations, not --locations.
8026 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
8027
0e575721
AD
80282002-10-19 Akim Demaille <akim@epita.fr>
8029
8030 * src/getargs.c (usage): Take status as argument and exit
8031 accordingly.
8032 Report the traditional `Try ... --help' message when status != 0.
8033 (usage, version): Don't take a FILE * as arg, it is pointless.
8034 (getargs): When there is an incorrect number of arguments, make it
8035 an error, and report it GNUlically thanks to `usage ()'.
8036
724ce7f5
PE
80372002-10-18 Paul Eggert <eggert@twinsun.com>
8038
3a781eb2
PE
8039 * data/glr.c (yyreportParseError): Don't assume that sprintf
8040 yields the length of the printed string, as this is not true
8041 on SunOS 4.1.4. Reported by Peter Klein.
8042
724ce7f5
PE
8043 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
8044 * tests/conflicts.at (%nonassoc and eof): Likewise.
8045 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
8046
473d0a75
AD
80472002-10-17 Akim Demaille <akim@epita.fr>
8048
8049 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
8050 * src/getargs.c (trace_types, trace_args): Adjust.
8051 * src/reader.c (grammar_current_rule_prec_set)
8052 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
8053 Standardize error messages.
8054 And s/@prec/%prec/!
8055 (reader): Use trace_flag to enable scanner/parser debugging,
8056 instead of an adhoc scheme.
8057 * src/scan-gram.l: Remove trailing debugging code.
8058
e76d2469
PE
80592002-10-16 Paul Eggert <eggert@twinsun.com>
8060
93e2236a
PE
8061 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
8062 MUSCLE_TAB_H.
8063
e76d2469
PE
8064 * NEWS: Officially drop support for building Bison with K&R C,
8065 since it didn't work anyway and it's not worth worrying about.
8066 * Makefile.maint (wget_files): Remove ansi2knr.c.
8067 (ansi2knr.c-url_prefix): Remove.
8068 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
8069 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8070 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8071
5bd1c419
PE
80722002-10-15 Paul Eggert <eggert@twinsun.com>
8073
8074 Stop using the "enum_" trick for K&R-style function definitions;
8075 it confused me, and I was the author! Instead, assume that people
8076 who want to use K&R C compilers (when using these modules in GCC,
8077 perhaps?) will run ansi2knr.
8078
8079 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
8080 All uses of "enum_" changed to "enum ".
8081 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8082 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 8083
5bd1c419
PE
8084 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
8085 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
8086 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
8087 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
8088 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
8089 abitset_not, abitset_ones, abitset_or, abitset_or_and,
8090 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
8091 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
8092 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
8093 Use function prototypes; this removes the need for declaring
8094 static functions simply to provide their prototypes.
8095 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
8096 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
8097 bitset_count_, bitset_create, bitset_dump, bitset_first,
8098 bitset_free, bitset_init, bitset_last, bitset_next,
8099 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
8100 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
8101 bitset_print, bitset_release_memory, bitset_toggle_,
8102 bitset_type_choose, bitset_type_get, bitset_type_name_get,
8103 debug_bitset): Likewise.
8104 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
8105 * lib/bitset_stats.c (bitset_log_histogram_print,
8106 bitset_percent_histogram_print, bitset_stats_and,
8107 bitset_stats_and_cmp, bitset_stats_and_or,
8108 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
8109 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
8110 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
8111 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
8112 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
8113 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
8114 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
8115 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
8116 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
8117 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
8118 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
8119 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
8120 bitset_stats_zero): Likewise.
8121 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8122 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8123 bitsetv_dump, debug_bitsetv): Likewise.
8124 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
8125 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
8126 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
8127 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
8128 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
8129 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
8130 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
8131 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
8132 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
8133 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
8134 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
8135 Likewise.
8136 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
8137 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
8138 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
8139 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
8140 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
8141 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
8142 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
8143 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
8144 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
8145 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
8146 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 8147
ae26e1f0
AD
81482002-10-14 Akim Demaille <akim@epita.fr>
8149
8150 Version 1.75.
8151
d43baf71
AD
81522002-10-14 Akim Demaille <akim@epita.fr>
8153
8154 * tests/Makefile.am (maintainer-check-posix): New.
8155
7ebc83e3
AD
81562002-10-14 Akim Demaille <akim@epita.fr>
8157
8158 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
8159 member.
8160
05846dae
AD
81612002-10-14 Akim Demaille <akim@epita.fr>
8162
8163 * src/tables.c (table_ninf_remap): base -> tab.
8164 Reported by Matt Rosing.
8165
1318e37d
PE
81662002-10-14 Paul Eggert <eggert@twinsun.com>
8167
447fbb17
PE
8168 * tests/action.at, tests/calc.at, tests/conflicts.at,
8169 tests/cxx-type.at, tests/headers.at, tests/input.at,
8170 tests/regression.at, tests/synclines.at, tests/torture.at:
8171 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
8172 so that the tests still work even if POSIXLY_CORRECT is set.
8173 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 8174
1318e37d
PE
8175 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
8176 for portability to K&R hosts. Fix typo: signed char is guaranteed
8177 only to 127, not to 128.
8178 * data/glr.c (yysigned_char): New type.
8179 * data/yacc.c (yysigned_char): Likewise.
8180 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
8181
cc0f0794
PE
81822002-10-13 Paul Eggert <eggert@twinsun.com>
8183
5038f418
PE
8184 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
8185 true due to limited range of data type" warning from GCC.
8186
cc0f0794
PE
8187 * data/c.m4 (b4_token_defines): Protect against double-inclusion
8188 by wrapping enum yytokentype's definition inside #ifndef
8189 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
8190
6fed0802
AD
81912002-10-13 Akim Demaille <akim@epita.fr>
8192
8193 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
8194 Un yy- yyrhs to avoid the name clash with the global YYRHS.
8195
32f0598d
AD
81962002-10-13 Akim Demaille <akim@epita.fr>
8197
8198 * Makefile.maint: Update from Autoconf 2.54.
8199 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
8200
7ea9a33f
AD
82012002-10-13 Akim Demaille <akim@epita.fr>
8202
8203 * src/print.c (print_state): Separate the list of solved conflicts
8204 from the other items.
8205 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
8206
ea99527d
AD
82072002-10-13 Akim Demaille <akim@epita.fr>
8208
8209 Let nondeterministic skeletons be usable with deterministic
8210 tables.
8211
8212 With the patch, GAWK compiled by GCC without -O2 passes its test
8213 suite using a GLR parser driven by LALR tables. It fails with -O2
8214 because `struct stat' gives two different answers on my machine:
8215 88 (definition of an auto var) and later 96 (memset on this var).
8216 Hence the stack is badly corrumpted. The headers inclusion is to
8217 blame: if I move the awk.h inclusion before GLR's system header
8218 inclusion, the two struct stat have the same size.
8219
8220 * src/tables.c (pack_table): Always create conflict_table.
8221 (token_actions): Always create conflict_list.
8222 * data/glr.c (YYFLAG): Remove, unused.
8223
f377f69f
AD
82242002-10-13 Akim Demaille <akim@epita.fr>
8225
8226 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
8227 (O0FLAGS): New.
8228 (VALGRIND, GXX): New.
8229 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
8230 * tests/bison.in: Run $PREBISON a pre-command.
8231 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
8232 (maintainer-check-g++): New.
8233 * Makefile.am (maintainer-check): New.
8234
2a1fe6ed
AD
82352002-10-13 Akim Demaille <akim@epita.fr>
8236
8237 * data/glr.c: Formatting changes.
8238 Tweak some trace messages to match yacc.c's.
8239
f50adbbd
AD
82402002-10-13 Akim Demaille <akim@epita.fr>
8241
8242 GLR parsers sometimes raise parse errors instead of performing the
8243 default reduction.
8244 Reported by Charles-Henry de Boysson.
8245
8246 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 8247 check the length of the traces when %glr.
f50adbbd
AD
8248 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
8249 GLR's traces.
8250 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
8251 Test GLR parsers.
8252 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
8253 (yyltype): Remove the yy prefix from the member names.
8254 (yytable): Complete its comment.
8255 (yygetLRActions): Map error action number from YYTABLE from
8256 YYTABLE_NINF to 0.
8257 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
8258 (which was a bug: it should have been YYTABEL_NINF, and yet it was
8259 not satisfying as we could compare an YYACTION computed from
8260 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
8261 only value for error actions.
8262 (yyreportParseError): In verbose parse error messages, don't issue
8263 `error' in the list of expected tokens.
8264 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
8265 next action to perform to match glr.c's decoding.
8266 (yytable): Complete its comment.
8267
bcbad5b9
PE
82682002-10-13 Paul Eggert <eggert@twinsun.com>
8269
8270 Fix problem reported by Henrik Grubbstroem in
161a71f3 8271 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
8272 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
8273 because the Bison parser reads the second action before reducing
8274 the first one.
8275 * src/scan-gram.l (rule_length): New static var.
8276 Use it to keep track of the rule length in the scanner, since
8277 we can't expect the parser to be in lock-step sync with the scanner.
8278 (handle_action_dollar, handle_action_at): Use this var.
8279 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 8280
14904b89
PE
82812002-10-12 Paul Eggert <eggert@twinsun.com>
8282
1fe611e5
PE
8283 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
8284 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
8285 Include <sys/time.h> when checking for clock_t and struct tms.
8286 Use same include order as source.
8287 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 8288 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 8289
1fe611e5
PE
8290 * lib/timevar.c: Update copyright date and clarify comments.
8291 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 8292
1fe611e5
PE
8293 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
8294 GCC version as of today, then merge Bison's changes.
8295 Change "GCC" to "Bison" in copyright notice. timevar.def's
8296 author is Akim, so change that too.
8297
98194095
PE
8298 * src/reader.c (grammar_current_rule_check):
8299 Don't worry about the default action if $$ is untyped.
8300 Prevents bogus warnings reported by Jim Gifford in
161a71f3 8301 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 8302
14904b89
PE
8303 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
8304 * data/glr.c, data/lalr1.cc, data/yacc.c:
8305 Output token definitions before the first part of user declarations.
8306 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 8307 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 8308
ff6dca18
PE
83092002-10-11 Paul Eggert <eggert@twinsun.com>
8310
8311 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
8312 (yyparse): here. This undoes some of the 2002-07-25 change.
8313 Compatibility problem reported by Ralf S. Engelschall with
8314 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
8315
eb714592
AD
83162002-10-11 Akim Demaille <akim@epita.fr>
8317
8318 * tests/regression.at Characters Escapes): New.
8319 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
8320 characters.
8321 Reported by Jan Nieuwenhuizen.
8322
b7195100
AD
83232002-10-11 Akim Demaille <akim@epita.fr>
8324
8325 * po/id.po: New.
8326
f28a0f2d
PE
83272002-10-10 Paul Eggert <eggert@twinsun.com>
8328
8329 Portability fixes for bitsets; this also avoids several GCC
8330 warnings.
8331
8332 * lib/abitset.c: Include <stddef.h>, for offsetof.
8333 * lib/lbitset.c: Likewise.
8334
8335 * lib/abitset.c (abitset_bytes): Return a size that is aligned
8336 properly for vectors of objects. Do not assume that adding a
8337 header size to a multiple of a word size yields a value that is
8338 properly aligned for the whole union.
8339 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8340
8341 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
8342 unique names for structures.
8343 * lib/ebitset.c (ebitset_bytes): Likewise.
8344 * lib/lbitset.c (lbitset_bytes): Likewise.
8345
8346 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
8347 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
8348 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
8349 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
8350 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
8351 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
8352 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
8353 to improve the type-checking that GCC can do.
8354 * lib/bitset.c (bitset_op4_cmp): Likewise.
8355 * lib/bitset_stats.c (bitset_stats_count,
8356 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
8357 bitset_stats_copy, bitset_stats_disjoint_p,
8358 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
8359 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
8360 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
8361 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
8362 bitset_stats_and_or_cmp, bitset_stats_andn_or,
8363 bitset_stats_andn_or_cmp, bitset_stats_or_and,
8364 bitset_stats_or_and_cmp): Likewise.
8365 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
8366 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
8367 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
8368 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
8369
8370 * lib/abitset.h: Include bitset.h, not bbitset.h.
8371 * lib/ebitset.h: Likewise.
8372 * lib/lbitset.h: Likewise.
8373
8374 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
8375 All instances of parameters of type enum bitset_opts are now of
8376 type enum_bitset_opts, to conform to the C Standard, and similarly
8377 for enum_bitset_type.
8378 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8379 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8380
8381 Do not use "struct bitset_struct" to mean different things in
8382 different modules. Not only is this confusing, it violates
8383 the C Standard, which requires that structure types in different
8384 modules must be compatible if one is to be passed to the other.
8385 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
8386 All instances of "struct bitset_struct *" replaced with "bitset".
8387 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
8388 (union bitset_union, struct abitset_struct, struct ebitset_struct,
8389 struct lbitset_struct, struct bitset_stats_struct): New types.
8390 All uses of struct bitset_struct changed to union bitset_union,
8391 etc.
ba0fe3c7 8392 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
8393 struct bitset_struct): Remove.
8394 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
8395 struct bitset_struct): Remove.
8396 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
8397 bitset_struct): Remove.
8398 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
8399 Likewise.
8400
8401 Do not call a function of type T using a call that assumes the
8402 function is of a different type U. Standard C requires that a
8403 function must be called with a type that is compatible with its
8404 definition.
8405 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8406 New decls.
8407 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8408 New functions.
8409 * lib/ebitset.c (PFV): Remove.
8410 * lib/lbitset.c (PFV): Likewise.
8411 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
8412 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
8413 decls.
8414 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
8415 (ebitset_vtable): Use them.
8416 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
8417 lbitset_xor): New functions.
8418 (lbitset_vtable): Use them.
8419
8420 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
8421 Declare.
8422
8423 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
8424 GCC warning.
8425 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
8426 Use offsetof, for simplicity.
8427
6fbe4984
PE
84282002-10-06 Paul Eggert <eggert@twinsun.com>
8429
8430 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
8431 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 8432 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
8433 which was inadvertently undone by the 2002-09-30 patch.
8434 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
8435 the same width as int.
8436
420f93c8
PE
84372002-10-04 Paul Eggert <eggert@twinsun.com>
8438
8439 Version 1.50.
8440
8441 * configure.ac (AC_INIT), NEWS: Increment version number.
8442
8443 * doc/bison.texinfo: Minor spelling, grammar, and white space
8444 fixes.
8445 (Symbols): Mention that any negative value returned from yylex
8446 signifies end-of-input. Warn about negative chars. Mention
8447 the portable Standard C character set.
8448
8449 The GNU coding standard says CFLAGS and YFLAGS are reserved
8450 for the installer to set.
8451 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
8452 * src/Makefile.am (AM_CFLAGS): Likewise.
8453 (AM_YFLAGS): Renamed from YFLAGS.
8454
8455 Fix some MAX and MIN problems.
8456 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
8457 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
8458 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
8459 * src/reader.c (reader): Use it.
8460
8461 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
8462 POSIX 1003.1-2001 has removed fgrep.
8463
84642002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
8465
8466 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
8467 interpreted as signed.
8468 * lib/ebitset.c (ebitset_list): Fix bug.
8469
ff68026d
PE
84702002-10-01 Paul Eggert <eggert@twinsun.com>
8471
8472 More fixes for 64-bit hosts and large bitsets.
8473
8474 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
8475 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
8476 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
8477 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
8478 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
8479 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
8480 bitset_count_): Likewise.
8481 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
8482 bitset_first, bitset_last): Likewise.
8483 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
8484 bitset_stats_list_reverse, bitset_stats_size,
8485 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
8486 Likewise.
8487 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8488 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8489 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8490 bitsetv_reflexive_transitive_closure): Likewise.
8491 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
8492 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
8493 Likewise.
8494 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
8495 Likewise.
420f93c8 8496
ff68026d
PE
8497 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
8498 Use size_t, not unsigned int, to count bytes.
8499 * lib/abitset.h (abitset_bytes): Likewise.
8500 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
8501 Likewise.
8502 * lib/bitset.h (bitset_bytes): Likewise.
8503 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
8504 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
8505 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8506 * lib/ebitset.c (ebitset_bytes): Likewise.
8507 * lib/ebitset.h (ebitset_bytes): Likewise.
8508 * lib/lbitset.c (lbitset_bytes): Likewise.
8509 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 8510
ff68026d
PE
8511 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
8512 abitset_subset_p, abitset_disjoint_p, abitset_and,
8513 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
8514 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
8515 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
8516 abitset_or_and, abitset_or_and_cmp):
8517 Use bitset_windex instead of unsigned int.
8518 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8519 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
8520 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
8521 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
8522 Likewise.
8523 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 8524
ff68026d
PE
8525 * lib/bitset.c (bitset_print):
8526 Use proper printf formats for widths of integer types.
8527 * lib/bitset_stats.c (bitset_percent_histogram_print,
8528 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
8529 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8530 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8531 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 8532
ff68026d
PE
8533 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
8534 BITSET_SIZE_MAX): New macros.
8535 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
8536 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
8537 to BITSET_WINDEX_MAX.
8538
8539 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
8540 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
8541 since we now return the bitset_bindex type (not int).
8542
8543 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
8544 when computing sizes.
8545 * lib/ebitset.c (ebitset_elts_grow): Likewise.
8546
8547 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
8548 and avoid cast to unsigned.
8549
6aa452a6
AD
85502002-09-30 Akim Demaille <akim@epita.fr>
8551
8552 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8553 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
8554 Updates from Michael Hayes.
8555
927f7817
AD
85562002-09-30 Art Haas <ahaas@neosoft.com>
8557
8558 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
8559 invocations.
8560 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
8561 defined.
8562
9738f41e
AD
85632002-09-27 Akim Demaille <akim@epita.fr>
8564
8565 Version 1.49c.
8566
a5c75d7f
AD
85672002-09-27 Akim Demaille <akim@epita.fr>
8568
8569 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
8570 (Because of AC_LIBSOURCE).
8571
8280e179
AD
85722002-09-27 Akim Demaille <akim@epita.fr>
8573
8574 Playing with Autoscan.
8575
8576 * configure.ac: Remove the old LIBOBJ tweaks.
8577 (AC_REPLACE_FUNCS): Add strrchr and strtol.
8578 * lib/strrchr.c: New.
8579 * lib/strtol.c: New, from the Coreutils 4.5.1.
8580
ae64af35
AD
85812002-09-27 Akim Demaille <akim@epita.fr>
8582
8583 Playing with Autoscan.
8584
8585 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
8586 * lib/Makefile.am (libbison_a_SOURCES): No longer include
8587 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
8588 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
8589 Coreutils 4.5.1.
8590
d1a1114f
AD
85912002-09-24 Akim Demaille <akim@epita.fr>
8592
8593 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
8594 (Frequently Asked Questions, Parser Stack Overflow): New.
8595
b906441c
AD
85962002-09-13 Akim Demaille <akim@epita.fr>
8597
8598 Playing with autoscan.
8599
8600 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
8601 * src/files.c (skeleton_find): Remove, unused.
8602 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
8603 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
8604
bd701811
AD
86052002-09-13 Akim Demaille <akim@epita.fr>
8606
8607 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
8608 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
8609
e0a13e7b
AD
86102002-09-13 Akim Demaille <akim@epita.fr>
8611
8612 * configure.ac: Require 2.54.
8613 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
8614 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
8615 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
8616 Remove, provided by Autoconf macros.
8617
c97011bf
AD
86182002-09-12 Akim Demaille <akim@epita.fr>
8619
8620 * m4/prereq.m4: Update, from Coreutils 4.5.1.
8621
d862b1be
AD
86222002-09-12 Akim Demaille <akim@epita.fr>
8623
8624 * m4/prereq.m4: Update, from Fileutils 4.1.5.
8625 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
8626 Reported by Martin Mokrejs.
8627
3d38c03a
AD
86282002-09-10 Akim Demaille <akim@epita.fr>
8629
8630 * src/parse-gram.y: Associate a human readable string to each
8631 token type.
8632 * tests/regression.at (Invalid inputs): Adjust.
8633
b6347355
AD
86342002-09-10 Gary V. Vaughan <gary@gnu.org>
8635
8636 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
8637 with an Autoconf-2.5x style configure.ac.
8638
09ba4ab2
PE
86392002-09-06 Paul Eggert <eggert@twinsun.com>
8640
8641 * doc/bison.texinfo (Conditions): Make explicit that the GPL
8642 exception applies only to yacc.c. This is a modification of a
8643 patch originally suggested by Akim Demaille.
8644
21846f69
AD
86452002-09-06 Akim Demaille <akim@epita.fr>
8646
09ba4ab2
PE
8647 * data/c.m4 (b4_copyright): Move the GPL exception comment from
8648 here to...
8649 * data/yacc.c: here.
8650
21846f69
AD
8651 * data/lalr1.cc (struct yyltype): Don't define it, since we use
8652 LocationType.
8653 (b4_ltype): Default to yy::Location from location.hh.
8654
c0ad8bf3
AD
86552002-09-04 Jim Meyering <jim@meyering.net>
8656
8657 * data/yacc.c: Guard the declaration of yytoknum also with
8658 `#ifdef YYPRINT', so it is declared only when used.
8659
3a93251e
AD
86602002-09-04 Akim Demaille <akim@epita.fr>
8661
8662 * configure.in: Rename as...
8663 * configure.ac: this.
8664 Bump to 1.49c.
8665
427c0dda
AD
86662002-09-04 Akim Demaille <akim@epita.fr>
8667
8668 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
8669 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
8670 translate maintainer only messages.
8671
6a254321
PE
86722002-08-12 Paul Eggert <eggert@twinsun.com>
8673
645e30d1
PE
8674 Version 1.49b.
8675
6a254321
PE
8676 * Makefile.am (SUBDIRS): Remove intl.
8677 (DISTCLEANFILES): Remove.
8678 * NEWS: Mention that GNU M4 is now required. Clarify what is
8679 meant by "larger grammars". Mention the pt_BR translation.
8680 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
8681 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
8682 Bump version from 0.11.2 to 0.11.5.
8683 (BISON_PREREQ_STAGE): Remove.
8684 (AM_GNU_GETTEXT): Use external gettext.
8685 (AC_OUTPUT): Remove intl/Makefile.
8686
8687 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
8688
8689 * data/glr.c: Include string.h, for strlen.
8690 (yyreportParseError): Use size_t for yysize.
8691 (yy_yypstack): No longer nested inside yypstates, as nested
8692 functions are not portable. Do not assume size_t is the
8693 same width as int.
8694 (yypstates): Do not assume that ptrdiff_t is the same width
8695 as int, and similarly for yyposn and YYINDEX.
8696
8697 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
8698
8699 * lib/Makefile.am (INCLUDES): Do not include from the intl
8700 directory, which has been removed.
8701 * src/Makefile.am (INCLUDES): Likewise.
8702
8703 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
8704 (bitsets_sources, additional_bitsets_sources, timevars_sources):
8705 New vars.
8706
8707 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
8708 * tests/Makefile.am (EXTRA_DIST): Likewise.
8709
8710 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
8711 Do not assume that bitset_windex is the same width as unsigned.
8712
8713 * lib/abitset.c (abitset_unused_clear): Do not assume that
8714 bitset_word is the same width as int.
8715 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
8716 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
8717 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
8718 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
8719 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
8720
8721 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
8722 portability to one's complement hosts!).
8723 * lib/ebitset.c (ebitset_op1): Likewise.
8724 * lib/lbitset.c (lbitset_op1): Likewise.
8725
8726 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
8727 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8728 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
8729 Sync with fileutils.
8730 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
8731 lib/gettext.h: Sync with diffutils.
8732
8733 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
8734 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
8735
8736 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
8737 PROTOTYPES to check for prototypes, and "defined __STDC__" to
8738 check for void *.
8739
8740 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
8741 size_t; the old version tried to do this but casted improperly.
8742 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
8743 (bitset_test): Now returns int, not unsigned long.
8744
8745 * lib/bitset_stats.c: Include "gettext.h".
8746 (_): New macro.
8747 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
8748 name locals "index", as it generates unnecessary warnings on some
8749 hosts that have an "index" function.
8750
8751 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
8752 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
8753 they need translation.
8754 * src/LR0.c (state_list_append, new_itemsets, get_state,
8755 append_states, generate_states): Likewise.
8756 * src/assoc.c (assoc_to_string): Likewise.
8757 * src/closure.c (print_closure, set_firsts, closure): Likewise.
8758 * src/gram.c (grammar_dump): Likewise.
8759 * src/injections.c (injections_compute): Likewise.
8760 * src/lalr.c (lookaheads_print): Likewise.
8761 * src/relation.c (relation_transpose): Likewise.
8762 * src/scan-gram.l: Likewise.
8763 * src/tables.c (table_grow, pack_vector): Likewise.
8764
8765 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
8766 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
8767 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
8768 * m4/mbstate_t.m4: Sync with fileutils.
8769 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
8770
8771 * po/LINGUAS: Add pt_BR.
8772 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
8773 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
8774 lib/timevar.c.
8775 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
8776 manual recommends.
8777 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
8778
8779 * src/complain.c (strerror_r): Remove decl; not needed.
8780 (strerror): Use same pattern as ../lib/error.c.
8781
8782 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
8783
8784 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
8785
8786 * src/main.c (main): Cast result of bindtextdomain and textdomain
8787 to void, to avoid a GCC warning when --disable-nls is in effect.
8788
8789 * src/scan-gram.l: Use strings rather than escapes when possible,
8790 to minimize the number of warnings from xgettext.
8791 (handle_action_dollar, handle_action_at): Don't use isdigit,
8792 as it mishandles negative chars and it may not work as expected
8793 outside the C locale.
8794
8795 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
8796 this is a GCC extension and is not portable to other compilers.
8797
8798 * src/system.h (alloca): Use same pattern as ../lib/error.c.
8799 Do not include <ctype.h>; no longer needed.
8800 Do not include <malloc.h>; no longer needed (and generates
8801 warnings on OpenBSD 3.0).
8802
8803 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
8804 it's not portable.
8805
8806 * tests/regression.at: Do not use 'cc -c input.c -o input';
8807 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
8808
8809 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
8810 exit status as failure, not just exit status 1. Sun C exits
8811 with status 2 sometimes.
8812
8813 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
8814 Use it for the two large tests.
8815
c8f002c7
AD
88162002-08-02 Akim Demaille <akim@epita.fr>
8817
8818 * src/conflicts.c (conflicts_output): Don't output rules never
8819 reduced here, since anyway that computation doesn't work.
8820 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
8821 (rule_useless_p, rule_never_reduced_p): New.
8822 (grammar_rules_partial_print): Use a filter instead of a range.
8823 Display the title only if needed.
8824 (grammar_rules_print): Adjust.
8825 (grammar_rules_never_reduced_report): New.
8826 * src/tables.c (action_row): Move the computation of rules never
8827 reduced to...
8828 (token_actions): here.
8829 * src/main.c (main): Make the parser before making the report, so
8830 that rules never reduced are computed.
8831 Call grammar_rules_never_reduced_report.
8832 * src/print.c (print_results): Report rules never reduced.
8833 * tests/conflicts.at, tests/reduce.at: Adjust.
8834
cd08e51e
AD
88352002-08-01 Akim Demaille <akim@epita.fr>
8836
8837 Instead of attaching lookaheads and duplicating the rules being
8838 reduced by a state, attach the lookaheads to the reductions.
8839
8840 * src/state.h (state_t): Remove the `lookaheads',
8841 `lookaheads_rule' member.
8842 (reductions_t): Add a `lookaheads' member.
8843 Use a regular array for the `rules'.
8844 * src/state.c (reductions_new): Initialize the lookaheads member
8845 to 0.
8846 (state_rule_lookaheads_print): Adjust.
8847 * src/state.h, src/state.c (state_reductions_find): New.
8848 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
8849 (count_rr_conflicts): Adjust.
8850 * src/lalr.c (LArule): Remove.
8851 (add_lookback_edge): Adjust.
8852 (state_lookaheads_count): New.
8853 (states_lookaheads_initialize): Merge into...
8854 (initialize_LA): this.
8855 (lalr_free): Adjust.
8856 * src/main.c (main): Don't free nullable and derives too early: it
8857 is used by --verbose.
8858 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
8859
bb0027a9
AD
88602002-08-01 Akim Demaille <akim@epita.fr>
8861
8862 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
8863 `rule_number_t**'.
8864 (set_derives, free_derives): Rename as...
8865 (derives_compute, derives_free): this.
8866 Adjust all dependencies.
8867 * src/nullable.c (set_nullable, free_nullable): Rename as...
8868 (nullable_compute, nullable_free): these.
8869 (rule_list_t): Store rule_t *, not rule_number_t.
8870 * src/state.c (state_rule_lookaheads_print): Directly compare rule
8871 pointers, instead of their numbers.
8872 * src/main.c (main): Call nullable_free, and derives_free earlier,
8873 as they were lo longer used.
8874
3325ddc4
AD
88752002-08-01 Akim Demaille <akim@epita.fr>
8876
8877 * lib/timevar.c (get_time): Include children time.
8878 * src/lalr.h (LA, LArule): Don't export them: used with the
8879 state_t.
8880 * src/lalr.c (LA, LArule): Static.
8881 * src/lalr.h, src/lalr.c (lalr_free): New.
8882 * src/main.c (main): Call it.
8883 * src/tables.c (pack_vector): Check whether loc is >= to the
8884 table_size, not >.
8885 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
8886 (tables_generate): do it, since that's also it which allocates
8887 them.
8888 Don't free LA and LArule, main does.
8889
c6f1a33c
AD
88902002-07-31 Akim Demaille <akim@epita.fr>
8891
8892 Separate parser tables computation and output.
8893
8894 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
8895 (conflict_list, conflict_list_cnt, table, check, table_ninf)
8896 (yydefgoto, yydefact, high): Move to...
8897 * src/tables.h, src/tables.c: here.
8898 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
8899 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
8900 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
8901 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
8902 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
8903 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
8904 (action_row, save_row, token_actions, save_column, default_goto)
8905 (goto_actions, sort_actions, matching_state, pack_vector)
8906 (table_ninf_remap, pack_table, prepare_actions): Move to...
8907 * src/tables.c: here.
8908 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
8909 * src/output.c (token_actions, output_base, output_conflicts)
8910 (output_check): Merge into...
8911 (prepare_actions): this.
8912 (actions_output): Rename as...
8913 (user_actions_output): this.
8914 * src/main.c (main): Call tables_generate and tables_free.
8915
1509d42f
AD
89162002-07-31 Akim Demaille <akim@epita.fr>
8917
8918 Steal GCC's --time-report support.
8919
8920 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
8921 stolen/adjusted from GCC.
8922 * m4/stage.m4: Remove time related checks.
8923 * m4/timevar.m4: New.
8924 * configure.in: Adjust.
8925 * src/system.h: Adjust to using timevar.h.
8926 * src/getargs.h, src/getargs.c: Support trace_time for
8927 --trace=time.
8928 * src/main.c (stage): Remove.
8929 (main): Replace `stage' invocations with timevar calls.
8930 * src/output.c: Insert pertinent timevar calls.
8931
273a74fa
AD
89322002-07-31 Akim Demaille <akim@epita.fr>
8933
8934 Let --trace have arguments.
8935
8936 * src/getargs.h (enum trace_e): New.
8937 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
8938 (long_options, short_options): --trace/-T takes an optional
8939 argument.
8940 Change all the uses of trace_flag to reflect the new flags.
8941 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
8942
8943 Strengthen `stage' portability.
8944
8945 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
8946 * configure.in: Use it.
8947 Don't check for malloc.h and sys/times.h.
8948 * src/system.h: Include them when appropriate.
8949 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
8950 times and struct tms are available.
8951
217598da
AD
89522002-07-30 Akim Demaille <akim@epita.fr>
8953
8954 In verbose parse error message, don't report `error' as an
8955 expected token.
8956 * tests/actions.at (Printers and Destructors): Adjust.
8957 * tests/calc.at (Calculator $1): Adjust.
8958 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
8959 error message, do not report the parser accepts the error token in
8960 that state.
8961
52489d44
AD
89622002-07-30 Akim Demaille <akim@epita.fr>
8963
8964 Normalize conflict related messages.
8965
8966 * src/complain.h, src/complain.c (warn, complain): New.
8967 * src/conflicts.c (conflicts_print): Use them.
8968 (conflict_report_yacc): New, extracted from...
8969 (conflicts_print): here.
8970 * tests/conflicts.at, tests/existing.at: Adjust.
8971
e8832397
AD
89722002-07-30 Akim Demaille <akim@epita.fr>
8973
8974 Report rules which are never reduced by the parser: those hidden
8975 by conflicts.
8976
8977 * src/LR0.c (save_reductions): Don't make the final state too
8978 different: save its reduction (accept) instead of having a state
8979 without any action (no shift or goto, no reduce).
8980 Note: the final state is now a ``regular'' state, i.e., the
8981 parsers now contain `reduce 0' as default reduction.
8982 Nevertheless, since they decide to `accept' when yystate =
8983 final_state, they still will not reduce rule 0.
8984 * src/print.c (print_actions, print_reduction): Adjust.
8985 * src/output.c (action_row): Track reduced rules.
8986 (token_actions): Report rules never reduced.
8987 * tests/conflicts.at, tests/regression.at: Adjust.
8988
caf23d24
AD
89892002-07-30 Akim Demaille <akim@epita.fr>
8990
8991 `stage' was accidently included in a previous patch.
8992 Initiate its autoconfiscation.
8993
8994 * configure.in: Look for malloc.h and sys/times.h.
8995 * src/main.c (stage): Adjust.
8996 Report only when trace_flag.
8997
640748ee
AD
89982002-07-29 Akim Demaille <akim@epita.fr>
8999
9000 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
9001 state_number_t.
9002 (errs_t): symbol_t*, not symbol_number_t.
9003 (reductions_t): rule_t*, not rule_number_t.
9004 (FOR_EACH_SHIFT): New.
9005 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
9006 * src/print.c, src/print_graph.c: Adjust.
9007
88bce5a2
AD
90082002-07-29 Akim Demaille <akim@epita.fr>
9009
9010 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
9011
9012 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
9013 (endtoken, accept): these.
9014 * src/reader.c (reader): Set endtoken's default tag to "$end".
9015 Set undeftoken's tag to "$undefined" instead of "$undefined.".
9016 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
9017 Adjust.
9018
1bfb97db
AD
90192002-07-29 Akim Demaille <akim@epita.fr>
9020
9021 * src/reduce.c (reduce_grammar): When the language is empty,
9022 complain about the start symbol, not the axiom.
9023 Use its location.
9024 * tests/reduce.at (Empty Language): New.
9025
fc5734fe
AD
90262002-07-26 Akim Demaille <akim@epita.fr>
9027
9028 * src/reader.h, src/reader.c (gram_error): ... can't get
9029 yycontrol without making too strong assumptions on the parser
9030 itself.
9031 * src/output.c (prepare_tokens): Use the real 0th value of
9032 token_translations instead of `0'.
9033 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
9034 visible here.
9035 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
9036 for the time being: %locations ought to provide it to yyerror.
9037
3650b4b8
AD
90382002-07-25 Akim Demaille <akim@epita.fr>
9039
9040 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
9041 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
9042 * tests/regression.at (Web2c Actions): Adjust.
9043
4b3d3a8e
AD
90442002-07-25 Akim Demaille <akim@epita.fr>
9045
9046 Stop storing rules from 1 to nrules + 1.
9047
9048 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
9049 * src/nullable.c, src/output.c, src/print.c, src/reader.c
9050 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
9051 Iterate from 0 to nrules.
9052 Use rule_number_as_item_number and item_number_as_rule_number.
9053 Adjust to `derive' now containing possibly 0.
9054 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
9055 Handle the `- 1' part in rule numbers from/to item numbers.
9056 * src/conflicts.c (log_resolution): Fix the message which reversed
9057 shift and reduce.
9058 * src/output.c (action_row): Initialize default_rule to -1.
9059 (token_actions): Adjust.
9060 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
9061 expected output.
9062 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
9063
4a2a22f4
AD
90642002-07-25 Akim Demaille <akim@epita.fr>
9065
9066 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
9067 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
9068 (b4_c_knr_arg_decl): New.
9069 * data/yacc.c: Use it to define yysymprint, yydestruct, and
9070 yyreport_parse_error.
9071
b8df3223
AD
90722002-07-25 Akim Demaille <akim@epita.fr>
9073
9074 * data/yacc.c (yyreport_parse_error): New, extracted from...
9075 (yyparse): here.
9076 (yydestruct, yysymprint): Move above yyparse.
9077 Be K&R compliant.
9078
a762e609
AD
90792002-07-25 Akim Demaille <akim@epita.fr>
9080
9081 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
9082 replace...
9083 (b4_sint_type, b4_uint_type): these.
9084 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
9085 * tests/regression.at (Web2c Actions): Adjust.
9086
12b0043a
AD
90872002-07-25 Akim Demaille <akim@epita.fr>
9088
9089 * src/gram.h (TIEM_NUMBER_MAX): New.
9090 (item_number_of_rule_number, rule_number_of_item_number): Rename
9091 as...
9092 (rule_number_as_item_number, item_number_as_rule_number): these.
9093 Adjust dependencies.
9094 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9095 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9096 (symbol_number_to_vector_number): New.
9097 (order): Of vector_number_t* type.
9098 (base_t, BASE_MAX, BASE_MIN): New.
9099 (froms, tos, width, pos, check): Of base_t type.
9100 (action_number_t, ACTION_MIN, ACTION_MAX): New.
9101 (actrow): Of action_number_t type.
9102 (conflrow): Of unsigned int type.
9103 (table_ninf, base_ninf): New.
9104 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
9105 (muscle_insert_int_table, muscle_insert_base_table)
9106 (muscle_insert_rule_number_table): New.
9107 (prepare_tokens): Output `toknum' as int_table.
9108 (action_row): Returns a rule_number_t.
9109 Use ACTION_MIN, not SHRT_MIN.
9110 (token_actions): yydefact is rule_number_t*.
9111 (table_ninf_remap): New.
9112 (pack_table): Use it for `base' and `table'.
9113 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
9114 replaced with...
9115 (YYPACT_NINF, YYTABLE_NINF): these.
9116 (yypact, yytable): Compute their types instead of hard-coded
9117 `short'.
9118 * tests/regression.at (Web2c Actions): Adjust.
9119
5dde258a
AD
91202002-07-19 Akim Demaille <akim@epita.fr>
9121
9122 * src/scan-gram.l (id): Can start with an underscore.
9123
a945ec39
AD
91242002-07-16 Akim Demaille <akim@epita.fr>
9125
9126 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
9127 Adjust all former `associativity' dependencies.
9128 * src/symtab.c (symbol_new): Default associativity is `undef', not
9129 `right'.
9130 (symbol_check_alias_consistence): Adjust.
9131
fae437e8
AD
91322002-07-09 Akim Demaille <akim@epita.fr>
9133
9134 * doc/bison.texinfo: Properly set the ``header'' part.
9135 Use @dircategory ``GNU programming tools'' as per Texinfo's
9136 documentation.
9137 Use @copying.
9138
1a715ef2
AD
91392002-07-09 Akim Demaille <akim@epita.fr>
9140
9141 * lib/quotearg.h: Protect against multiple inclusions.
9142 * src/location.h (location_t): Add a `file' member.
9143 (LOCATION_RESET, LOCATION_PRINT): Adjust.
9144 * src/complain.c (warn_at, complain_at, fatal_at): Drop
9145 `error_one_per_line' support.
9146
a5d50994
AD
91472002-07-09 Akim Demaille <akim@epita.fr>
9148
9149 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
9150 * src/reader.c (lineno): Remove.
9151 Adjust all dependencies.
9152 (get_merge_function): Take a location and use complain_at.
9153 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
9154 * tests/regression.at (Invalid inputs, Mixing %token styles):
9155 Adjust.
9156
b275314e
AD
91572002-07-09 Akim Demaille <akim@epita.fr>
9158
9159 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
9160 recovery rule, and forbid extensions when --yacc.
9161 (gram_error): Use complain_at.
9162 * src/reader.c (reader): Exit if there were parse errors.
9163
865b9df1
AD
91642002-07-09 Akim Demaille <akim@epita.fr>
9165
9166 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
9167 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
9168 Reported by R Blake <blakers@mac.com>.
9169
c76e14da
AD
91702002-07-09 Akim Demaille <akim@epita.fr>
9171
9172 * data/yacc.c: Output the copyright notive in the header.
9173
7db2ed2d
AD
91742002-07-03 Akim Demaille <akim@epita.fr>
9175
9176 * src/output.c (froms, tos): Are state_number_t.
9177 (save_column): sp, sp1, and sp2 are state_number_t.
9178 (prepare): Rename `final' as `final_state_number', `nnts' as
9179 `nterms_number', `nrules' as `rules_number', `nstates' as
9180 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
9181 unused.
9182 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
9183 * data/lalr1.cc (nsym_): Remove, unused.
9184
e68e0410
AD
91852002-07-03 Akim Demaille <akim@epita.fr>
9186
9187 * src/lalr.h, src/lalr.c (goto_number_t): New.
9188 * src/lalr.c (goto_list_t): New.
9189 Propagate them.
9190 * src/nullable.c (rule_list_t): New.
9191 Propagate.
9192 * src/types.h: Remove.
9193
e1a4f3a4
AD
91942002-07-03 Akim Demaille <akim@epita.fr>
9195
9196 * src/closure.c (print_fderives): Use rule_rhs_print.
9197 * src/derives.c (print_derives): Use rule_rhs_print.
9198 (rule_list_t): New, replaces `shorts'.
9199 (set_derives): Add comments.
9200 * tests/sets.at (Nullable, Firsts): Adjust.
9201
536545f3
AD
92022002-07-03 Akim Demaille <akim@epita.fr>
9203
9204 * src/output.c (prepare_actions): Free `tally' and `width'.
9205 (prepare_actions): Allocate and free `order'.
9206 * src/symtab.c (symbols_free): Free `symbols'.
9207 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
9208 * src/output.c (m4_invoke): Move to...
9209 * src/scan-skel.l: here.
9210 (<<EOF>>): Close yyout, and free its name.
9211
8b752b00
AD
92122002-07-03 Akim Demaille <akim@epita.fr>
9213
9214 Fix some memory leaks, and fix a bug: state 0 was examined twice.
9215
9216 * src/LR0.c (new_state): Merge into...
9217 (state_list_append): this.
9218 (new_states): Merge into...
9219 (generate_states): here.
9220 (set_states): Don't ensure a proper `errs' state member here, do it...
9221 * src/conflicts.c (conflicts_solve): here.
9222 * src/state.h, src/state.c: Comment changes.
9223 (state_t): Rename member `shifts' as `transitions'.
9224 Adjust all dependencies.
9225 (errs_new): For consistency, also take the values as argument.
9226 (errs_dup): Remove.
9227 (state_errs_set): New.
9228 (state_reductions_set, state_transitions_set): Assert that no
9229 previous value was assigned.
9230 (state_free): New.
9231 (states_free): Use it.
9232 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
9233 temporary storage: use `errs' and `nerrs' as elsewhere.
9234 (set_conflicts): Allocate and free this `errs'.
9235
613f5e1a
AD
92362002-07-02 Akim Demaille <akim@epita.fr>
9237
9238 * lib/libiberty.h: New.
9239 * lib: Update the bitset implementation from upstream.
9240 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
9241 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
9242 * src/main.c: Adjust bitset stats calls.
9243
26e0cadc
PE
92442002-07-01 Paul Eggert <eggert@twinsun.com>
9245
9246 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
9247 char, so that negative chars don't collide with $.
9248
1154cced
AD
92492002-06-30 Akim Demaille <akim@epita.fr>
9250
9251 Have the GLR tests be `warning' checked, and fix the warnings.
9252
9253 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
9254 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
9255 (yyremoveDeletes): `yyi' and `yyj' are size_t.
9256 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
9257 (yyaddDeferredAction): static.
9258 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
9259 (yyreportParseError): yyprefix is const.
9260 yytokenp is used only when verbose.
9261 (yy__GNUC__): Replace with __GNUC__.
9262 (yypdumpstack): yyi is size_t.
9263 (yypreference): Un-yy local variables and arguments, to avoid
9264 clashes with `yyr1'. Anyway, we are not in the user name space.
9265 (yytname_size): be an int, as is compared with ints.
9266 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
9267 Use them.
9268 * tests/cxx-gram.at: Use quotation to protect $1.
9269 Use AT_COMPILE to enable warnings hunts.
9270 Prototype yylex and yyerror.
9271 `Use' argc.
9272 Include `string.h', not `strings.h'.
9273 Produce and prototype stmtMerge only when used.
9274 yylex takes a location.
9275
97650f4e
AD
92762002-06-30 Akim Demaille <akim@epita.fr>
9277
9278 We spend a lot of time in quotearg, in particular when --verbose.
9279
9280 * src/symtab.c (symbol_get): Store a quoted version of the key.
9281 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
9282 Adjust all callers.
9283
d2576365
AD
92842002-06-30 Akim Demaille <akim@epita.fr>
9285
9286 * src/state.h (reductions_t): Rename member `nreds' as num.
9287 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
9288 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
9289
ccaf65bc
AD
92902002-06-30 Akim Demaille <akim@epita.fr>
9291
9292 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
9293 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
9294 (shifts_to): Rename as...
9295 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
9296 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
9297 (TRANSITION_IS_DISABLED, transitions_to): these.
9298
87675353
AD
92992002-06-30 Akim Demaille <akim@epita.fr>
9300
9301 * src/print.c (print_shifts, print_gotos): Merge into...
9302 (print_transitions): this.
9303 (print_transitions, print_errs, print_reductions): Align the
9304 lookaheads columns.
9305 (print_core, print_transitions, print_errs, print_state,
9306 print_grammar): Output empty lines separator before, not after.
9307 (state_default_rule_compute): Rename as...
9308 (state_default_rule): this.
9309 * tests/conflicts.at (Defaulted Conflicted Reduction),
9310 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
9311 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
9312
ce4ccb4b
AD
93132002-06-30 Akim Demaille <akim@epita.fr>
9314
9315 Display items as we display rules.
9316
9317 * src/gram.h, src/gram.c (rule_lhs_print): New.
9318 * src/gram.c (grammar_rules_partial_print): Use it.
9319 * src/print.c (print_core): Likewise.
9320 * tests/conflicts.at (Defaulted Conflicted Reduction),
9321 (Unresolved SR Conflicts): Adjust.
9322 (Unresolved SR Conflicts): Adjust and rename as...
9323 (Resolved SR Conflicts): this, as was meant.
9324 * tests/regression.at (Web2c Report): Adjust.
9325
bc933ef1
AD
93262002-06-30 Akim Demaille <akim@epita.fr>
9327
9328 * src/print.c (state_default_rule_compute): New, extracted from...
9329 (print_reductions): here.
9330 Pessimize, but clarify the code.
9331 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
9332
53d4308d
AD
93332002-06-30 Akim Demaille <akim@epita.fr>
9334
9335 * src/output.c (action_row): Let default_rule be always a rule
9336 number.
9337
574fb2d5
AD
93382002-06-30 Akim Demaille <akim@epita.fr>
9339
9340 * src/closure.c (print_firsts, print_fderives, closure):
9341 Use BITSET_EXECUTE.
9342 * src/lalr.c (lookaheads_print): Likewise.
9343 * src/state.c (state_rule_lookaheads_print): Likewise.
9344 * src/print_graph.c (print_core): Likewise.
9345 * src/print.c (print_reductions): Likewise.
9346 * src/output.c (action_row): Likewise.
9347 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
9348
05811fd7
AD
93492002-06-30 Akim Demaille <akim@epita.fr>
9350
9351 * src/print_graph.c: Use report_flag.
9352
0e4d5753
AD
93532002-06-30 Akim Demaille <akim@epita.fr>
9354
9355 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
9356 to...
9357 * src/relation.h, src/relation.c (traverse, relation_digraph)
9358 (relation_print, relation_transpose): New.
9359
24c7d800
AD
93602002-06-30 Akim Demaille <akim@epita.fr>
9361
9362 * src/state.h, src/state.c (shifts_to): New.
9363 * src/lalr.c (build_relations): Use it.
9364
9222837b
AD
93652002-06-30 Akim Demaille <akim@epita.fr>
9366
9367 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
9368 (item_number_of_rule_number, rule_number_of_item_number): New.
9369 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
9370 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
9371 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
9372 Propagate their use.
9373 Much remains to be done, in particular wrt `shorts' from types.h.
9374
260008e5
AD
93752002-06-30 Akim Demaille <akim@epita.fr>
9376
9377 * src/symtab.c (symbol_new): Initialize the `printer' member.
9378
8a731ca8
AD
93792002-06-30 Akim Demaille <akim@epita.fr>
9380
9381 * src/LR0.c (save_reductions): Remove, replaced by...
9382 * src/state.h, src/state.c (state_reductions_set): New.
9383 (reductions, errs): Rename as...
9384 (reductions_t, errs_t): these.
9385 Adjust all dependencies.
9386
32e1e0a4
AD
93872002-06-30 Akim Demaille <akim@epita.fr>
9388
9389 * src/LR0.c (state_list_t, state_list_append): New.
9390 (first_state, last_state): Now symbol_list_t.
9391 (this_state): Remove.
9392 (new_itemsets, append_states, save_reductions): Take a state_t as
9393 argument.
9394 (set_states, generate_states): Adjust.
9395 (save_shifts): Remove, replaced by...
9396 * src/state.h, src/state.c (state_shifts_set): New.
9397 (shifts): Rename as...
9398 (shifts_t): this.
9399 Adjust all dependencies.
9400 * src/state.h (state_t): Remove the `next' member.
9401
e5fb6710
AD
94022002-06-30 Akim Demaille <akim@epita.fr>
9403
9404 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
9405 escaped in slot 0.
9406
c7ca99d4
AD
94072002-06-30 Akim Demaille <akim@epita.fr>
9408
9409 Use hash.h for the state hash table.
9410
9411 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
9412 (allocate_storage): Use state_hash_new.
9413 (free_storage): Use state_hash_free.
9414 (new_state, get_state): Adjust.
9415 * src/lalr.h, src/lalr.c (states): Move to...
9416 * src/states.h (state_t): Remove the `link' member, no longer
9417 used.
9418 * src/states.h, src/states.c: here.
9419 (state_hash_new, state_hash_free, state_hash_lookup)
9420 (state_hash_insert, states_free): New.
9421 * src/states.c (state_table, state_compare, state_hash): New.
9422 * src/output.c (output_actions): Do not free states now, since we
9423 still need to know the final_state number in `prepare', called
9424 afterwards. Do it...
9425 * src/main.c (main): here: call states_free after `output'.
9426
df0e7316
AD
94272002-06-30 Akim Demaille <akim@epita.fr>
9428
9429 * src/state.h, src/state.c (state_new): New, extracted from...
9430 * src/LR0.c (new_state): here.
9431 * src/state.h (STATE_ALLOC): Move to...
9432 * src/state.c: here.
9433 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
9434 * src/state.h, src/state.c: here.
9435
39f41916
AD
94362002-06-30 Akim Demaille <akim@epita.fr>
9437
9438 * src/reader.c (gensym): Rename as...
9439 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
9440 (getsym): Rename as...
9441 (symbol_get): this.
9442
d57650a5
AD
94432002-06-30 Akim Demaille <akim@epita.fr>
9444
9445 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
9446 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
9447 * src/output.c, src/print.c, src/print_graph.c: Propagate.
9448 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
9449
5a08f1ce
AD
94502002-06-30 Akim Demaille <akim@epita.fr>
9451
9452 Make the test suite pass with warnings checked.
9453
9454 * tests/actions.at (Printers and Destructors): Improve.
9455 Avoid unsigned vs. signed issues.
9456 * tests/calc.at: Don't exercise the scanner here, do it...
9457 * tests/input.at (Torturing the Scanner): here.
9458
720623af
PH
94592002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9460
88e7e941 9461 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
9462 reorganize first lines parallel to yacc.c.
9463
fb8135fa
AD
94642002-06-28 Akim Demaille <akim@epita.fr>
9465
9466 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
9467 (b4_token_enum, b4_token_defines): New, factored from...
9468 * data/lalr1.cc, data/yacc.c, glr.c: here.
9469
41442480
AD
94702002-06-28 Akim Demaille <akim@epita.fr>
9471
9472 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
9473 unused variables.
9474 * src/output.c (merger_output): static.
9475
e0e5bf84
AD
94762002-06-28 Akim Demaille <akim@epita.fr>
9477
ba0fe3c7 9478 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
9479 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
9480 pacify GCC.
9481 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 9482
676385e2
PH
94832002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9484
9485 Accumulated changelog for new GLR parsing features.
9486
6a254321 9487 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
9488 conflicts_total_count.
9489 * src/conflicts.h: Ditto.
9490 * src/output.c (token_actions): Use the new name.
9491 (output_conflicts): Change conflp => conflict_list_heads, and
9492 confl => conflict_list for better readability.
9493 * data/glr.c: Use the new names.
9494 * NEWS: Add self to GLR announcement.
e0e5bf84 9495
676385e2
PH
9496 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
9497
9498 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
9499 Akim Demaille.
9500
9501 * data/bison.glr: Change name to glr.c
9502 * data/glr.c: Renamed from bison.glr.
9503 * data/Makefile.am: Add glr.c
e0e5bf84
AD
9504
9505 * src/getargs.c:
9506
676385e2 9507 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 9508 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 9509
676385e2
PH
9510 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9511
9512 * data/bison.glr: Be sure to restore the
9513 current #line when returning to the skeleton contents after having
9514 exposed the input file's #line.
9515
9516 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9517
9518 * data/bison.glr: Bring up to date with changes to bison.simple.
9519
9520 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9521
9522 * data/bison.glr: Correct definitions that use b4_prefix.
9523 Various reformatting.
9524 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
9525 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
9526 yytokenp argument; now part of stack.
9527 (yychar): Define to behave as documented.
9528 (yyclearin): Ditto.
e0e5bf84 9529
676385e2
PH
9530 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9531
9532 * src/reader.h: Add declaration for free_merger_functions.
9533
9534 * src/reader.c (merge_functions): New variable.
9535 (get_merge_function): New function.
9536 (free_merger_functions): New function.
9537 (readgram): Check for %prec that is not followed by a symbol.
9538 Handle %dprec and %merge declarations.
9539 (packgram): Initialize dprec and merger fields in rules array.
9540
9541 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
9542 conflict_list_cnt, conflict_list_free): New variables.
9543 (table_grow): Also grow conflict_table.
e0e5bf84 9544 (prepare_rules): Output dprec and merger tables.
676385e2 9545 (conflict_row): New function.
e0e5bf84 9546 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
9547 default reduction in conflicted states for GLR parser so that there
9548 are spaces for the conflict lists.
9549 (save_row): Also save conflict information.
9550 (token_actions): Allocate conflict list.
9551 (merger_output): New function.
9552 (pack_vector): Pack conflict table, too.
9553 (output_conflicts): New function to output yyconflp and yyconfl.
9554 (output_check): Allocate conflict_tos.
9555 (output_actions): Output conflict tables, also.
9556 (output_skeleton): Output b4_mergers definition.
9557 (prepare): Output b4_max_rhs_length definition.
9558 Use 'bison.glr' as default skeleton for GLR parsers.
9559
9560 * src/gram.c (glr_parser): New flag.
9561 (grammar_free): Call free_merger_functions.
9562
9563 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
9564 all pairs of conflicting reductions, rather than just all tokens
9565 causing conflicts. Needed to size conflict tables.
e0e5bf84 9566 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
9567 interface.
9568 (conflicts_print): Ditto.
9569 (count_total_conflicts): New function.
9570
9571 * src/reader.h (merger_list): New type.
9572 (merge_functions): New variable.
9573
9574 * src/lex.h (tok_dprec, tok_merge): New token types.
9575
9576 * src/gram.h (rule_s): Add dprec and merger fields.
9577 (glr_parser): New flag.
9578
9579 * src/conflicts.h (count_total_conflicts): New function.
9580
9581 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
9582
9583 * doc/bison.texinfo (Generalized LR Parsing): New section.
9584 (GLR Parsers): New section.
9585 (Language and Grammar): Mention GLR parsing.
9586 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
9587 Correct typo ("tge" -> "the").
9588
9589 * data/bison.glr: New skeleton for GLR parsing.
9590
9591 * tests/cxx-gram.at: New tests for GLR parsing.
9592
9593 * tests/testsuite.at: Include cxx-gram.at.
9594
9595 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 9596
676385e2
PH
9597 * src/parse-gram.y:
9598
9599 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
9600
9601 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 9602
b5480d74 96032002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
9604
9605 * src/options.h, src/options.c: Remove.
9606 * src/getargs.c (short_options, long_options): New.
9607
60491a94
AD
96082002-06-27 Akim Demaille <akim@epita.fr>
9609
9610 * data/bison.simple, data/bison.c++: Rename as...
9611 * data/yacc.c, data/lalr1.cc: these.
9612 * doc/bison.texinfo (Environment Variables): Remove.
9613
9be0c25b
AD
96142002-06-25 Raja R Harinath <harinath@cs.umn.edu>
9615
9616 * src/getargs.c (report_argmatch): Initialize strtok().
9617
1ae72863
AD
96182002-06-20 Akim Demaille <akim@epita.fr>
9619
9620 * data/bison.simple (b4_symbol_actions): New, replaces...
9621 (b4_symbol_destructor, b4_symbol_printer): these.
9622 (yysymprint): Be sure to call YYPRINT only for tokens, and using
9623 user token numbers.
9624
87542d29
AD
96252002-06-20 Akim Demaille <akim@epita.fr>
9626
9627 * data/bison.simple (yydestructor): Rename as...
9628 (yydestruct): this.
9629
1a31ed21
AD
96302002-06-20 Akim Demaille <akim@epita.fr>
9631
9632 * src/symtab.h, src/symtab.c (symbol_type_set)
9633 (symbol_destructor_set, symbol_precedence_set): The location is
9634 the last argument.
9635 Adjust all callers.
9636
e776192e
AD
96372002-06-20 Akim Demaille <akim@epita.fr>
9638
9639 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
9640 internals.
9641 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
9642 Takes a location.
9643 * src/symtab.h, src/symtab.c (symbol_class_set)
9644 (symbol_user_token_number_set): Likewise.
9645 Adjust all callers.
9646 Promote complain_at.
9647 * tests/input.at (Type Clashes): Adjust.
9648
5c1180b3
AD
96492002-06-20 Akim Demaille <akim@epita.fr>
9650
9651 * data/bison.simple (YYLEX): Fix the declaration when
9652 %pure-parser.
9653
e3170060
AD
96542002-06-20 Akim Demaille <akim@epita.fr>
9655
9656 * data/bison.simple (yysymprint): Don't print the token number,
9657 just its name.
9658 * tests/actions.at (Destructors): Rename as...
9659 (Printers and Destructors): this.
9660 Also exercise %printer.
9661
253862fd
AD
96622002-06-20 Akim Demaille <akim@epita.fr>
9663
9664 * data/bison.simple (YYDSYMPRINT): New.
9665 Use it to remove many of the #if YYDEBUG/if (yydebug).
9666
366eea36
AD
96672002-06-20 Akim Demaille <akim@epita.fr>
9668
9669 * src/symtab.h, src/symtab.c (symbol_t): printer and
9670 printer_location are new members.
9671 (symbol_printer_set): New.
9672 * src/parse-gram.y (PERCENT_PRINTER): New token.
9673 Handle its associated rule.
9674 * src/scan-gram.l: Adjust.
9675 (handle_destructor_at, handle_destructor_dollar): Rename as...
9676 (handle_symbol_code_at, handle_symbol_code_dollar): these.
9677 * src/output.c (symbol_printers_output): New.
9678 (output_skeleton): Call it.
9679 * data/bison.simple (yysymprint): New. Cannot be named yyprint
9680 since there are already many grammar files with a user `yyprint'.
9681 Replace the calls to YYPRINT to calls to yysymprint.
9682 * tests/calc.at: Adjust.
9683 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
9684 taking advantage of parser very internal details (stack size!).
9685
4f25ebb0
AD
96862002-06-20 Akim Demaille <akim@epita.fr>
9687
9688 * src/scan-gram.l: Complete the scanner with the missing patterns
9689 to pacify Flex.
9690 Use `quote' and `symbol_tag_get' where appropriate.
9691
93b68a0e
AD
96922002-06-19 Akim Demaille <akim@epita.fr>
9693
9694 * tests/actions.at (Destructors): Augment to test locations.
9695 * data/bison.simple (yydestructor): Pass it the current location
9696 if locations are enabled.
9697 Prototype only when __STDC__ or C++.
9698 Change the argument names to move into the yy name space: there is
9699 user code here.
9700
58612f1d
AD
97012002-06-19 Akim Demaille <akim@epita.fr>
9702
74310291
AD
9703 * data/bison.simple (b4_pure_if): New.
9704 Use it instead of #ifdef YYPURE.
9705
97062002-06-19 Akim Demaille <akim@epita.fr>
9707
9708 * data/bison.simple (b4_location_if): New.
58612f1d
AD
9709 Use it instead of #ifdef YYLSP_NEEDED.
9710
f25bfb75
AD
97112002-06-19 Akim Demaille <akim@epita.fr>
9712
9713 Prepare @$ in %destructor, but currently don't bind it in the
9714 skeleton, as %location use is not cleaned up yet.
9715
9716 * src/scan-gram.l (handle_dollar, handle_destructor_at)
9717 (handle_action_at): New.
9718 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
9719 a braced_code_t and a location as additional arguments.
9720 (handle_destructor_dollar): Instead of requiring `b4_eval', just
9721 unquote one when outputting `b4_dollar_dollar'.
9722 Adjust callers.
9723 * data/bison.simple (b4_eval): Remove.
9724 (b4_symbol_destructor): Adjust.
9725 * tests/input.at (Invalid @n): Adjust.
9726
c732d2c6
AD
97272002-06-19 Zack Weinberg <zack@codesourcery.com>
9728
9729 * doc/bison.texinfo: Document ability to have multiple
9730 prologue sections.
9731
8c165d89
AD
97322002-06-18 Akim Demaille <akim@epita.fr>
9733
9734 * src/files.c (compute_base_names): When computing the output file
9735 names from the input file name, strip the directory part.
9736
ca98bf57
AD
97372002-06-18 Akim Demaille <akim@epita.fr>
9738
9739 * data/bison.simple.new: Comment changes.
9740 Reported by Andreas Schwab.
9741
0bfb02ff
AD
97422002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
9743
9744 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
9745 there are no `label `yyoverflowlab' defined but not used' warnings
9746 when yyoverflow is defined.
9747
24c0aad7
AD
97482002-06-18 Akim Demaille <akim@epita.fr>
9749
9750 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
9751 new member.
9752 (symbol_destructor_set): Adjust.
9753 * src/output.c (symbol_destructors_output): Output the destructor
9754 locations.
9755 Output the symbol name.
9756 * data/bison.simple (b4_symbol_destructor): Adjust.
9757
5719c109
AD
97582002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
9759 and Akim Demaille <akim@epita.fr>
9760
9761 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
9762 what's left on the stack when the error recovery hits EOF.
9763 * tests/actions.at (Destructors): Complete to exercise this case.
9764
9280d3ef
AD
97652002-06-17 Akim Demaille <akim@epita.fr>
9766
9767 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
9768 arguments is really empty, not only equal to `[]'.
9769 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
9770 member.
9771 (symbol_destructor_set): New.
9772 * src/output.c (symbol_destructors_output): New.
9773 * src/reader.h (brace_code_t, current_braced_code): New.
9774 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
9775 (handle_dollar): Rename as...
9776 (handle_action_dollar): this.
9777 (handle_destructor_dollar): New.
9778 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
9779 (grammar_declaration): Use it.
9780 * data/bison.simple (yystos): Is always defined.
9781 (yydestructor): New.
9782 * tests/actions.at (Destructors): New.
9783 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
9784
dafdc66f
AD
97852002-06-17 Akim Demaille <akim@epita.fr>
9786
9787 * src/symlist.h, src/symlist.c (symbol_list_length): New.
9788 * src/scan-gram.l (handle_dollar, handle_at): Compute the
9789 rule_length only when needed.
9790 * src/output.c (actions_output, token_definitions_output): Output
9791 the full M4 block.
9792 * src/symtab.c: Don't access directly to the symbol tag, use
9793 symbol_tag_get.
9794 * src/parse-gram.y: Use symbol_list_free.
9795
56c47203
AD
97962002-06-17 Akim Demaille <akim@epita.fr>
9797
9798 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
9799 (symbol_list_prepend, get_type_name): Move to...
9800 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
9801 (symbol_list_prepend, symbol_list_n_type_name_get): here.
9802 Adjust all callers.
9803 (symbol_list_free): New.
9804 * src/scan-gram.l (handle_dollar): Takes a location.
9805 * tests/input.at (Invalid $n): Adjust.
9806
1e0bab92
AD
98072002-06-17 Akim Demaille <akim@epita.fr>
9808
9809 * src/reader.h, src/reader.c (symbol_list_new): Export it.
9810 (symbol_list_prepend): New.
9811 * src/parse-gram.y (%union): `list' is a new member.
9812 (symbols.1): New, replaces...
9813 (terms_to_prec.1, nterms_to_type.1): these.
9814 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
9815 Take a location as additional argument.
9816 Adjust all callers.
9817
04e60654
AD
98182002-06-15 Akim Demaille <akim@epita.fr>
9819
9820 * src/parse-gram.y: Move %token in the declaration section so that
9821 we don't depend upon CVS Bison.
9822
10e5b8bd
AD
98232002-06-15 Akim Demaille <akim@epita.fr>
9824
9825 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
9826 * src/print.c (print_core): Use it.
9827
9801d40c
AD
98282002-06-15 Akim Demaille <akim@epita.fr>
9829
9830 * src/conflicts.c (log_resolution): Accept the rule involved in
9831 the sr conflicts instead of the lookahead number that points to
9832 that rule.
9833 (flush_reduce): Accept the current lookahead vector as argument,
9834 instead of the index in LA.
9835 (resolve_sr_conflict): Accept the current number of lookahead
9836 bitset to consider for the STATE, instead of the index in LA.
9837 (set_conflicts): Adjust.
9838 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
9839
c0263492
AD
98402002-06-15 Akim Demaille <akim@epita.fr>
9841
9842 * src/state.h (state_t): Replace the `lookaheadsp' member, a
9843 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
9844 Adjust all dependencies.
9845 * src/lalr.c (initialize_lookaheads): Split into...
9846 (states_lookaheads_count, states_lookaheads_initialize): these.
9847 (lalr): Adjust.
9848
9757c359
AD
98492002-06-15 Akim Demaille <akim@epita.fr>
9850
9851 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
9852 out of...
9853 (grammar_rules_print): here.
9854 * src/reduce.c (reduce_output): Use it.
9855 * tests/reduce.at (Useless Rules, Reduced Automaton)
9856 (Underivable Rules): Adjust.
9857
6b98e4b5
AD
98582002-06-15 Akim Demaille <akim@epita.fr>
9859
9860 Copy BYacc's nice way to report the grammar.
9861
9862 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
9863 New.
9864 Don't print the rules' location, it is confusing and useless.
9865 (rule_print): Use grammar_rhs_print.
9866 * src/print.c (print_grammar): Use grammar_rules_print.
9867
6b98e4b5
AD
98682002-06-15 Akim Demaille <akim@epita.fr>
9869
9870 Complete and rationalize `useless thing' warnings.
9871
9872 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
9873 (symbol_tag_print): New.
9874 Use them everywhere in place of accessing directly the tag member.
9875 * src/gram.h, src/gram.c (rule_print): New.
9876 Use it where a rule used to be printed `by hand'.
9877 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
9878 (reduce_grammar_tables): Report the useless rules.
9879 (reduce_print): Useless things are a warning, not an error.
9880 Report it as such.
9881 * tests/reduce.at (Useless Nonterminals, Useless Rules):
9882 (Reduced Automaton, Underivable Rules): Adjust.
9883 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
9884 * tests/conflicts.at (Unresolved SR Conflicts)
9885 (Solved SR Conflicts): Adjust.
9886
ee000ba4
AD
98872002-06-15 Akim Demaille <akim@epita.fr>
9888
9889 Let symbols have a location.
9890
9891 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
9892 (getsym): Adjust.
9893 Adjust all callers.
9894 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
9895 Use location_t, not int.
9896 * src/symtab.c (symbol_check_defined): Take advantage of the
9897 location.
9898 * tests/regression.at (Invalid inputs): Adjust.
9899
8efe435c
AD
99002002-06-15 Akim Demaille <akim@epita.fr>
9901
9902 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
9903 (input): Don't try to initialize yylloc here, do it in the
9904 scanner.
9905 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
9906 * src/gram.h (rule_t): Change line and action_line into location
9907 and action_location, of location_t type.
9908 Adjust all dependencies.
9909 * src/location.h, src/location.c (empty_location): New.
9910 * src/reader.h, src/reader.c (grammar_start_symbol_set)
9911 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
9912 (grammar_current_rule_symbol_append)
9913 (grammar_current_rule_action_append): Expect a location as argument.
9914 * src/reader.c (grammar_midrule_action): Adjust to attach an
9915 action's location as dummy symbol location.
9916 * src/symtab.h, src/symtab.c (startsymbol_location): New.
9917 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
9918 the line numbers.
9919
1921f1d7
AD
99202002-06-14 Akim Demaille <akim@epita.fr>
9921
9922 Grammar declarations may be found in the grammar section.
9923
9924 * src/parse-gram.y (rules_or_grammar_declaration): New.
9925 (declarations): Each declaration may end with a semicolon, not
9926 just...
9927 (grammar_declaration): `"%union"'.
9928 (grammar): Branch to rules_or_grammar_declaration.
9929
4515534c
AD
99302002-06-14 Akim Demaille <akim@epita.fr>
9931
9932 * src/main.c (main): Invoke scanner_free.
9933
f958596b
AD
99342002-06-14 Akim Demaille <akim@epita.fr>
9935
9936 * src/output.c (m4_invoke): Extracted from...
9937 (output_skeleton): here.
9938 Free tempfile.
9939
2c569025
AD
99402002-06-14 Akim Demaille <akim@epita.fr>
9941
9942 * src/parse-gram.y (directives, directive, gram)
9943 (grammar_directives, precedence_directives, precedence_directive):
9944 Rename as...
9945 (declarations, declaration, grammar, grammar_declaration)
9946 (precedence_declaration, precedence_declarator): these.
9947 (symbol_declaration): New.
9948
592e8d4d
AD
99492002-06-14 Akim Demaille <akim@epita.fr>
9950
9951 * src/files.c (action_obstack): Remove, unused.
9952 (output_obstack): Remove it, and all its dependencies, as it is no
9953 longer needed.
9954 * src/reader.c (epilogue_set): Build the epilogue in the
9955 muscle_obstack.
9956 * src/output.h, src/output.c (muscle_obstack): Move to...
9957 * src/muscle_tab.h, src/muscle_tab.h: here.
9958 (muscle_init): Initialize muscle_obstack.
9959 (muscle_free): New.
9960 * src/main.c (main): Call it.
9961
0c15323d
AD
99622002-06-14 Akim Demaille <akim@epita.fr>
9963
9964 * src/location.h: New, extracted from...
9965 * src/reader.h: here.
9966 * src/Makefile.am (noinst_HEADERS): Merge into
9967 (bison_SOURCES): this.
9968 Add location.h.
9969 * src/parse-gram.y: Use location_t instead of Bison's.
9970 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
9971 Use location_t instead of ints.
9972
e96c9728
AD
99732002-06-14 Akim Demaille <akim@epita.fr>
9974
9975 * data/bison.simple, data/bison.c++: Be sure to restore the
9976 current #line when returning to the skeleton contents after having
9977 exposed the input file's #line.
9978
75d1fe16
AD
99792002-06-12 Akim Demaille <akim@epita.fr>
9980
9981 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
9982 eager.
9983 * tests/actions.at (Exotic Dollars): New.
9984
6c35d22c
AD
99852002-06-12 Akim Demaille <akim@epita.fr>
9986
9987 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
9988 ['"/] too eagerly.
9989 * tests/input.at (Torturing the Scanner): New.
9990
1d6412ad
AD
99912002-06-11 Akim Demaille <akim@epita.fr>
9992
9993 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
9994 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
9995 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
9996 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
9997 * src/reader.c (reader): Use it.
9998
4cdb01db
AD
99992002-06-11 Akim Demaille <akim@epita.fr>
10000
10001 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
10002 Adjust all callers.
10003 (scanner_last_string_free): New.
10004
44995b2e
AD
100052002-06-11 Akim Demaille <akim@epita.fr>
10006
10007 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
10008 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
10009 (last_string, YY_OBS_FREE): New.
10010 Use them when returning an ID.
10011
e9955c83
AD
100122002-06-11 Akim Demaille <akim@epita.fr>
10013
10014 Have Bison grammars parsed by a Bison grammar.
10015
10016 * src/reader.c, src/reader.h (prologue_augment): New.
10017 * src/reader.c (copy_definition): Remove.
10018
10019 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
10020 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
10021 (grammar_current_rule_prec_set, grammar_current_rule_check)
10022 (grammar_current_rule_symbol_append)
10023 (grammar_current_rule_action_append): Export.
10024 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
10025 (symbol_list_action_append): Remove.
10026 Hook the routines from reader.
10027 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
10028 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
10029
10030 * src/reader.c (read_declarations): Remove, unused.
10031
10032 * src/parse-gram.y: Handle the epilogue.
10033 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
10034 (grammar_start_symbol_set): this.
10035 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
10036 * src/reader.c (readgram): Remove, unused.
10037 (reader): Adjust to insert eoftoken and axiom where appropriate.
10038
10039 * src/reader.c (copy_dollar): Replace with...
10040 * src/scan-gram.h (handle_dollar): this.
10041 * src/parse-gram.y: Remove `%thong'.
10042
10043 * src/reader.c (copy_at): Replace with...
10044 * src/scan-gram.h (handle_at): this.
10045
10046 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
10047 New.
10048
10049 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
10050 time being.
10051
10052 * src/reader.h, src/reader.c (grammar_rule_end): New.
10053
10054 * src/parse.y (current_type, current_class): New.
10055 Implement `%nterm', `%token' support.
10056 Merge `%term' into `%token'.
10057 (string_as_id): New.
10058 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
10059 type name.
10060
10061 * src/parse-gram.y: Be sure to handle properly the beginning of
10062 rules.
10063
10064 * src/parse-gram.y: Handle %type.
10065 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
10066
10067 * src/parse-gram.y: More directives support.
10068 * src/options.c: No longer handle source directives.
10069
10070 * src/parse-gram.y: Fix %output.
10071
10072 * src/parse-gram.y: Handle %union.
10073 Use the prologue locations.
10074 * src/reader.c (parse_union_decl): Remove.
10075
10076 * src/reader.h, src/reader.c (epilogue_set): New.
10077 * src/parse-gram.y: Use it.
10078
10079 * data/bison.simple, data/bison.c++: b4_stype is now either not
10080 defined, then default to int, or to the contents of %union,
10081 without `union' itself.
10082 Adjust.
10083 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
10084
10085 * src/output.c (actions_output): Don't output braces, as they are
10086 already handled by the scanner.
10087
10088 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
10089 characters to themselves.
10090
10091 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
10092 that the epilogue has a proper #line.
10093
10094 * src/parse-gram.y: Handle precedence/associativity.
10095
10096 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
10097 a terminal.
10098 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
10099 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
10100 at all to define terminals that cannot be emitted.
10101
10102 * src/scan-gram.l: Escape M4 characters.
10103
10104 * src/scan-gram.l: Working properly with escapes in user
10105 strings/characters.
10106
10107 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
10108 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
10109 grammar.
10110 Use more modest sizes, as for the time being the parser does not
10111 release memory, and therefore the process swallows a huge amount
10112 of memory.
10113
10114 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
10115 stricter %token grammar.
10116
10117 * src/symtab.h (associativity): Add `undef_assoc'.
10118 (symbol_precedence_set): Do nothing when passed an undef_assoc.
10119 * src/symtab.c (symbol_check_alias_consistence): Adjust.
10120
10121 * tests/regression.at (Invalid %directive): Remove, as it is now
10122 meaningless.
10123 (Invalid inputs): Adjust to the new error messages.
10124 (Token definitions): The new grammar doesn't allow too many
10125 eccentricities.
10126
10127 * src/lex.h, src/lex.c: Remove.
10128 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
10129 (copy_character, copy_string2, copy_string, copy_identifier)
10130 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
10131 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
10132 (parse_action): Remove.
10133 * po/POTFILES.in: Adjust.
10134
2e047461
AD
101352002-06-11 Akim Demaille <akim@epita.fr>
10136
cd05d13c 10137 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
10138 rule's action member: return the action as a string.
10139 Don't require `rule_length' as an argument: compute it.
10140 (grammar_current_rule_symbol_append)
10141 (grammar_current_rule_action_append): New, eved out from
10142 (readgram): here.
10143 Remove `action_flag', `rulelength', unused now.
10144
9af3fbce
AD
101452002-06-11 Akim Demaille <akim@epita.fr>
10146
10147 * src/reader.c (grammar_current_rule_prec_set).
10148 (grammar_current_rule_check): New, eved out from...
10149 (readgram): here.
10150 Remove `xaction', `first_rhs': useless.
10151 * tests/input.at (Type clashes): New.
10152 * tests/existing.at (GNU Cim Grammar): Adjust.
10153
1485e106
AD
101542002-06-11 Akim Demaille <akim@epita.fr>
10155
10156 * src/reader.c (grammar_midrule_action): New, Eved out from
10157 (readgram): here.
10158
da4160c3
AD
101592002-06-11 Akim Demaille <akim@epita.fr>
10160
10161 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
10162 New.
10163 (readgram): Use them as replacement of inlined code, crule and
10164 crule1.
10165
f6d0f937
AD
101662002-06-11 Akim Demaille <akim@epita.fr>
10167
10168 * src/reader.c (grammar_end, grammar_symbol_append): New.
10169 (readgram): Use them.
10170 Make the use of `p' as local as possible.
10171
69078d4b
AD
101722002-06-10 Akim Demaille <akim@epita.fr>
10173
10174 GCJ's parser requires the tokens to be defined before the prologue.
10175
10176 * data/bison.simple: Output the token definition before the user's
10177 prologue.
10178 * tests/regression.at (Braces parsing, Duplicate string)
10179 (Mixing %token styles): Check the output from bison.
10180 (Early token definitions): New.
10181
5e424082
AD
101822002-06-10 Akim Demaille <akim@epita.fr>
10183
10184 * src/symtab.c (symbol_user_token_number_set): Don't complain when
10185 assigning twice the same user number to a token, so that we can
10186 use it in...
10187 * src/lex.c (lex): here.
10188 Also use `symbol_class_set' instead of hand written code.
10189 * src/reader.c (parse_assoc_decl): Likewise.
10190
44536b35
AD
101912002-06-10 Akim Demaille <akim@epita.fr>
10192
10193 * src/symtab.c, src/symtab.c (symbol_class_set)
10194 (symbol_user_token_number_set): New.
10195 * src/reader.c (parse_token_decl): Use them.
10196 Use a switch instead of ifs.
10197 Use a single argument.
10198
8b9f2372
AD
101992002-06-10 Akim Demaille <akim@epita.fr>
10200
10201 Remove `%thong' support as it is undocumented, unused, duplicates
10202 `%token's job, and creates useless e-mail traffic with people who
10203 want to know what it is, why it is undocumented, unused, and
10204 duplicates `%token's job.
10205
10206 * src/reader.c (parse_thong_decl): Remove.
10207 * src/options.c (option_table): Remove "thong".
10208 * src/lex.h (tok_thong): Remove.
10209
3ae2b51f
AD
102102002-06-10 Akim Demaille <akim@epita.fr>
10211
10212 * src/symtab.c, src/symtab.c (symbol_type_set)
10213 (symbol_precedence_set): New.
10214 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
10215 (value_components_used): Remove, unused.
10216
2f1afb73
AD
102172002-06-09 Akim Demaille <akim@epita.fr>
10218
10219 Move symbols handling code out of the reader.
10220
10221 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
10222 (axiom): Move to...
10223 * src/symtab.h, src/symtab.c: here.
10224
10225 * src/gram.c (start_symbol): Remove: use startsymbol->number.
10226 * src/reader.c (startval): Rename as...
10227 * src/symtab.h, src/symtab.c (startsymbol): this.
10228 * src/reader.c: Adjust.
10229
10230 * src/reader.c (symbol_check_defined, symbol_make_alias)
10231 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
10232 (token_translations_init)
10233 Move to...
10234 * src/symtab.c: here.
10235 * src/reader.c (packsymbols): Move to...
10236 * src/symtab.h, src/symtab.c (symbols_pack): here.
10237 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
10238 argument.
10239
e9bca3ad
AD
102402002-06-03 Akim Demaille <akim@epita.fr>
10241
10242 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
10243 then statements.
10244
86eff183
AD
102452002-06-03 Akim Demaille <akim@epita.fr>
10246
10247 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
10248 structs with non literals.
10249 * src/scan-skel.l: never-interactive.
10250 * src/conflicts.c (enum conflict_resolution_e): No trailing
10251 comma.
10252 * src/getargs.c (usage): Split long literal strings.
10253 Reported by Hans Aberg.
10254
717be197
AD
102552002-05-28 Akim Demaille <akim@epita.fr>
10256
10257 * data/bison.c++: Use C++ ostreams.
10258 (cdebug_): New member.
10259
670ddffd
AD
102602002-05-28 Akim Demaille <akim@epita.fr>
10261
10262 * src/output.c (output_skeleton): Be sure to allocate enough room
10263 for `/' _and_ for `\0' in full_skeleton.
10264
769b430f
AD
102652002-05-28 Akim Demaille <akim@epita.fr>
10266
10267 * data/bison.c++: Catch up with bison.simple:
10268 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10269 and Paul Eggert <eggert@twinsun.com>: `error' handing.
10270 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
10271 and popping traces.
10272
7067cb36
PH
102732002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10274
10275 * src/output.c (output_skeleton): Put an explicit path in front of
10276 the skeleton file name, rather than relying on the -I directory,
10277 to partially alleviate effects of having a skeleton file lying around
10278 in the current directory.
769b430f 10279
4a713ec2
PH
102802002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10281
769b430f 10282 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
10283 obstack_printf should be obstack_fgrow1.
10284
b408954b
AD
102852002-05-26 Akim Demaille <akim@epita.fr>
10286
10287 * src/state.h (state_t): `solved_conflicts' is a new member.
10288 * src/LR0.c (new_state): Set it to 0.
10289 * src/conflicts.h, src/conflicts.c (print_conflicts)
10290 (free_conflicts, solve_conflicts): Rename as...
10291 (conflicts_print, conflicts_free, conflicts_solve): these.
10292 Adjust callers.
10293 * src/conflicts.c (enum conflict_resolution_e)
10294 (solved_conflicts_obstack): New, used by...
10295 (log_resolution): this.
10296 Adjust to attach the conflict resolution to each state.
10297 Complete the description with the precedence/associativity
10298 information.
10299 (resolve_sr_conflict): Adjust.
10300 * src/print.c (print_state): Output its solved_conflicts.
10301 * tests/conflicts.at (Unresolved SR Conflicts)
10302 (Solved SR Conflicts): Exercise --report=all.
10303
a49aecd5
AD
103042002-05-26 Akim Demaille <akim@epita.fr>
10305
10306 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10307 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
10308 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
10309 (token_number_t, item_number_as_token_number)
10310 (token_number_as_item_number, muscle_insert_token_number_table):
10311 Rename as...
10312 (symbol_number_t, item_number_as_symbol_number)
10313 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
10314 these, since it is more appropriate.
10315
5504898e
AD
103162002-05-26 Akim Demaille <akim@epita.fr>
10317
10318 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
10319 `Error:' lines.
10320 * data/bison.simple (yystos) [YYDEBUG]: New.
10321 (yyparse) [YYDEBUG]: Display the symbols which are popped during
10322 error recovery.
10323 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
10324
ec3bc396
AD
103252002-05-25 Akim Demaille <akim@epita.fr>
10326
10327 * doc/bison.texinfo (Debugging): Split into...
10328 (Tracing): this new section, its former contents, and...
10329 (Understanding): this new section.
10330 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
10331 by...
10332 (report_flag): this.
10333 Adjust all dependencies.
10334 (report_args, report_types, report_argmatch): New.
10335 (usage, getargs): Report/support -r, --report.
10336 * src/options.h
10337 (struct option_table_struct): Rename as..,
10338 (struct option_table_s): this.
10339 Rename the `set_flag' member to `flag' to match with getopt_long's
10340 struct.
10341 * src/options.c (option_table): Split verbose into an entry for
10342 %verbose, and another for --verbose.
10343 Support --report/-r, so remove -r from the obsolete --raw.
10344 * src/print.c: Attach full item sets and lookaheads reports to
10345 report_flag instead of trace_flag.
10346 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
10347
78df8250
PE
103482002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10349 and Paul Eggert <eggert@twinsun.com>
769b430f 10350
78df8250
PE
10351 * data/bison.simple (yyparse): Correct error handling to conform to
10352 POSIX and yacc. Specifically, after syntax error is discovered,
10353 do not reduce further before shifting the error token.
10354 Clean up the code a bit by removing the labels yyerrdefault,
10355 yyerrhandle, yyerrpop.
10356 * NEWS: Document the above.
10357
c0c9ea05
PH
103582002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10359
10360 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
10361 type; it isn't always big enough, since it doesn't necessarily
10362 include non-terminals.
769b430f 10363 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
10364 the latter can be removed.
10365 (yy_token_number_type): Remove, only one use.
10366 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
10367 don't use TokenNumberType as element type.
769b430f 10368
c0c9ea05
PH
10369 * tests/regression.at: Modify expected output to agree with change
10370 to yyr1 and yytranslate.
769b430f 10371
6390a83f
FK
103722002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
10373
10374 * src/reader.c (parse_action): Use copy_character instead of
10375 obstack_1grow.
10376
db7c8e9a
AD
103772002-05-13 Akim Demaille <akim@epita.fr>
10378
10379 * tests/regression.at (Token definitions): Prototype yylex and
10380 yyerror.
10381
fcc61800
PH
103822002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10383
158c687b 10384 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
10385 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
10386 32-bit arithmetic.
10387 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
10388
5683e9b2
AD
103892002-05-07 Akim Demaille <akim@epita.fr>
10390
10391 * tests/synclines.at: Be sure to prototype yylex and yyerror to
10392 avoid GCC warnings.
10393
0c2d3f4c
AD
103942002-05-07 Akim Demaille <akim@epita.fr>
10395
10396 Kill GCC warnings.
10397
10398 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
10399 over the RHS of each rule.
10400 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
10401 * src/state.h (state_t): Member `nitems' is unsigned short.
10402 * src/LR0.c (get_state): Adjust.
10403 * src/reader.c (packgram): Likewise.
10404 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
10405 `Type'.
10406 (muscle_insert_int_table): Remove, unused.
10407 (prepare_rules): Remove `max'.
10408
1565b720
AD
104092002-05-06 Akim Demaille <akim@epita.fr>
10410
10411 * src/closure.c (print_firsts): Display of the symbol tags.
10412 (bitmatrix_print): Move to...
10413 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
10414 here.
10415 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
10416
cfaee611
AD
104172002-05-06 Akim Demaille <akim@epita.fr>
10418
10419 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
10420 hash_do_for_each.
10421
458be8e0
AD
104222002-05-06 Akim Demaille <akim@epita.fr>
10423
10424 * src/LR0.c (new_state, get_state): Instead of using the global
10425 `kernel_size' and `kernel_base', have two new arguments:
10426 `core_size' and `core'.
10427 Adjust callers.
10428
a900a624
AD
104292002-05-06 Akim Demaille <akim@epita.fr>
10430
10431 * src/reader.c (packgram): No longer end `ritem' with a 0
10432 sentinel: it is not used.
10433
d4e7d3a1
AD
104342002-05-05 Akim Demaille <akim@epita.fr>
10435
10436 New experimental feature: display the lookaheads in the report and
10437 graph.
10438
10439 * src/print (print_core): When --trace-flag, display the rules
10440 lookaheads.
10441 * src/print_graph.c (print_core): Likewise.
10442 Swap the arguments.
10443 Adjust caller.
10444
39ceb25b
AD
104452002-05-05 Akim Demaille <akim@epita.fr>
10446
10447 * tests/torture.at (Many lookaheads): New test.
10448
5372019f
AD
104492002-05-05 Akim Demaille <akim@epita.fr>
10450
10451 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
10452 (GENERATE_MUSCLE_INSERT_TABLE): this.
10453 (output_int_table, output_unsigned_int_table, output_short_table)
10454 (output_token_number_table, output_item_number_table): Replace with...
10455 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
10456 (muscle_insert_short_table, muscle_insert_token_number_table)
10457 (muscle_insert_item_number_table): these.
10458 Adjust all callers.
10459 (prepare_tokens): Don't free `translations', since...
10460 * src/reader.h, src/reader.c (grammar_free): do it.
10461 Move to...
10462 * src/gram.h, src/gram.c (grammar_free): here.
10463 * data/bison.simple, data/bison.c++: b4_token_number_max is now
10464 b4_translate_max.
10465
5df5f6d5
AD
104662002-05-05 Akim Demaille <akim@epita.fr>
10467
10468 * src/output.c (output_unsigned_int_table): New.
10469 (prepare_rules): `i' is unsigned.
10470 `prhs', `rline', `r2' are unsigned int.
10471 Rename muscle `rhs_number_max' as `rhs_max'.
10472 Output muscles `prhs_max', `rline_max', and `r2_max'.
10473 Free rline and r1.
10474 * data/bison.simple, data/bison.c++: Adjust to use these muscles
10475 to compute types instead of constant types.
10476 * tests/regression.at (Web2c Actions): Adjust.
10477
b87f8b21
AD
104782002-05-04 Akim Demaille <akim@epita.fr>
10479
10480 * src/symtab.h (SALIAS, SUNDEF): Rename as...
10481 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
10482 Adjust dependencies.
10483 * src/output.c (token_definitions_output): Be sure not to output a
10484 `#define 'a'' when fed with `%token 'a' "a"'.
10485 * tests/regression.at (Token definitions): New.
10486
8bb936e4
PE
104872002-05-03 Paul Eggert <eggert@twinsun.com>
10488
10489 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
10490 for K&R C.
10491
104922002-05-03 gettextize <bug-gnu-gettext@gnu.org>
10493
10494 * Makefile.am (SUBDIRS): Remove intl.
10495 (EXTRA_DIST): Add config/config.rpath.
10496
53c71a12
AD
104972002-05-03 Akim Demaille <akim@epita.fr>
10498
10499 * data/bison.simple (m4_if): Don't output empty enums.
10500 And actually, output valid enum definitions :(.
10501
289dd0cf
AD
105022002-05-03 Akim Demaille <akim@epita.fr>
10503
10504 * configure.bat: Remove, completely obsolete.
10505 * Makefile.am (EXTRA_DIST): Adjust.
10506 Don't distribute config.rpath...
10507 * config/Makefile.am (EXTRA_DIST): Do it.
10508
db85e524
AD
105092002-05-03 Akim Demaille <akim@epita.fr>
10510
10511 * configure.in (GETTEXT_VERSION): New.
10512 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
10513
83ccf991
AD
105142002-05-03 Akim Demaille <akim@epita.fr>
10515
10516 * data/bison.simple (b4_token_enum): New.
10517 (b4_token_defines): Use it to output tokens both as #define and
10518 enums.
10519 Suggested by Paul Eggert.
10520 * src/output.c (token_definitions_output): Don't output spurious
10521 white spaces.
10522
1f418995
AD
105232002-05-03 Akim Demaille <akim@epita.fr>
10524
10525 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
10526
45119f04
RA
105272002-05-02 Robert Anisko <robert@lrde.epita.fr>
10528
10529 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
10530 Update the stack class, give a try to deque as the default container.
10531
b2d52318
AD
105322002-05-02 Akim Demaille <akim@epita.fr>
10533
10534 * data/bison.simple (yyparse): Do not implement @$ = @1.
10535 (YYLLOC_DEFAULT): Adjust to do it.
10536 * doc/bison.texinfo (Location Default Action): Fix.
10537
3a8b4109
AD
105382002-05-02 Akim Demaille <akim@epita.fr>
10539
10540 * src/reader.c (parse_braces): Merge into...
10541 (parse_action): this.
10542
84614e13
AD
105432002-05-02 Akim Demaille <akim@epita.fr>
10544
10545 * configure.in (ALL_LINGUAS): Remove.
10546 * po/LINGUAS, hr.po: New.
10547
fdbcd8e2
AD
105482002-05-02 Akim Demaille <akim@epita.fr>
10549
10550 Remove the so called hairy (semantic) parsers.
10551
10552 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
10553 * src/gram.h, src/gram.c (semantic_parser): Remove.
10554 (rule_t): Remove the guard and guard_line members.
10555 * src/lex.h (token_t): remove tok_guard.
10556 * src/options.c (option_table): Remove %guard and %semantic_parser
10557 support.
10558 * src/output.c, src/output.h (guards_output): Remove.
10559 (prepare): Adjust.
10560 (token_definitions_output): Don't output the `T'
10561 tokens (???).
10562 (output_skeleton): Don't output the guards.
10563 * src/files.c, src/files.c (attrsfile): Remove.
10564 * src/reader.c (symbol_list): Remove the guard and guard_line
10565 members.
10566 Adjust dependencies.
10567 (parse_guard): Remove.
10568 * data/bison.hairy: Remove.
10569 * doc/bison.texinfo (Environment Variables): Remove occurrences of
10570 BISON_HAIRY.
10571
82b6cb3f
AD
105722002-05-02 Akim Demaille <akim@epita.fr>
10573
10574 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
10575 (parse_guard): Rename the formal argument `stack_offset' as
10576 `rule_length', which is more readable.
10577 Adjust callers.
10578 (copy_at, copy_dollar): Instead of outputting the hard coded
10579 values of $$, $n and so forth, output invocation to b4_lhs_value,
10580 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
10581 Note: this patch partially drops `semantic-parser' support: it
10582 always does `rule_length - n', where semantic parsers ought to
10583 always use `-n'.
82b6cb3f
AD
10584 * data/bison.simple, data/bison.c++ (b4_lhs_value)
10585 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
10586
6cbfbcc5
AD
105872002-05-02 Akim Demaille <akim@epita.fr>
10588
10589 * configure.in (AC_INIT): Bump to 1.49b.
10590 (AM_INIT_AUTOMAKE): Short invocation.
10591
b8548114
AD
105922002-05-02 Akim Demaille <akim@epita.fr>
10593
10594 Version 1.49a.
10595
c20cd1fa
AD
105962002-05-01 Akim Demaille <akim@epita.fr>
10597
10598 * src/skeleton.h: Remove.
10599
8a9566d4
AD
106002002-05-01 Akim Demaille <akim@epita.fr>
10601
10602 * src/skeleton.h: Fix the #endif.
10603 Reported by Magnus Fromreide.
10604
8c6d399a
PE
106052002-04-26 Paul Eggert <eggert@twinsun.com>
10606
10607 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
10608 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 10609 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 10610
2b7ed18a
RA
106112002-04-25 Robert Anisko <robert@lrde.epita.fr>
10612
10613 * src/scan-skel.l: Postprocess quadrigraphs.
10614
10615 * src/reader.c (copy_character): New function, used to output
10616 single characters while replacing `[' and `]' with quadrigraphs, to
10617 avoid troubles with M4 quotes.
10618 (copy_comment): Output characters with copy_character.
10619 (read_additionnal_code): Likewise.
10620 (copy_string2): Likewise.
10621 (copy_definition): Likewise.
10622
10623 * tests/calc.at: Exercise M4 quoting.
10624
34a89c50
AD
106252002-04-25 Akim Demaille <akim@epita.fr>
10626
10627 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
10628 between `!' and the command.
10629 Reported by Paul Eggert.
10630
0dd1580a
RA
106312002-04-24 Robert Anisko <robert@lrde.epita.fr>
10632
10633 * tests/calc.at: Exercise prologue splitting.
10634
10635 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
10636 `b4_post_prologue' instead of `b4_prologue'.
10637
10638 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
10639 muscles.
10640 (output): Free pre_prologue_obstack and post_prologue_obstack.
10641 * src/files.h, src/files.c (attrs_obstack): Remove.
10642 (pre_prologue_obstack, post_prologue_obstack): New.
10643 * src/reader.c (copy_definition): Add a parameter to specify the
10644 obstack to fill, instead of using attrs_obstack unconditionally.
10645 (read_declarations): Pass pre_prologue_obstack to copy_definition if
10646 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
10647
83c1796f
PE
106482002-04-23 Paul Eggert <eggert@twinsun.com>
10649
10650 * data/bison.simple: Remove unnecessary commentary and white
10651 space differences from 1_29-branch.
10652 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
10653
10654 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
10655 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
10656 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
10657 constructors or destructors.
10658
10659 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
10660
1207eeac
AD
106612002-04-23 Akim Demaille <akim@epita.fr>
10662
10663 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
10664 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
10665 location with columns.
10666 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
10667 All reported by Paul Eggert.
10668
78ab8f67
AD
106692002-04-22 Akim Demaille <akim@epita.fr>
10670
10671 * src/reduce.c (dump_grammar): Move to...
10672 * src/gram.h, src/gram.c (grammar_dump): here.
10673 Be sure to separate long item numbers.
10674 Don't read the members of a rule's prec if its nil.
10675
133c20e2
AD
106762002-04-22 Akim Demaille <akim@epita.fr>
10677
10678 * src/output.c (table_size, table_grow): New.
10679 (MAXTABLE): Remove, replace uses with table_size.
10680 (pack_vector): Instead of dying when the table is too big, grow it.
10681
9515e8a7
AD
106822002-04-22 Akim Demaille <akim@epita.fr>
10683
10684 * data/bison.simple (yyr1): Its type is that of a token number.
10685 * data/bison.c++ (r1_): Likewise.
10686 * tests/regression.at (Web2c Actions): Adjust.
10687
23c5a174
AD
106882002-04-22 Akim Demaille <akim@epita.fr>
10689
10690 * src/reader.c (token_translations_init): 256 is now the default
10691 value for the error token, i.e., it will be assigned another
10692 number if the user assigned 256 to one of her tokens.
10693 (reader): Don't force 256 to error.
10694 * doc/bison.texinfo (Symbols): Adjust.
10695 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
10696 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
10697 etc. instead of 10, 20, 30 (which was used to `jump' over error
10698 (256) and undefined (2)).
10699
5fbb0954
AD
107002002-04-22 Akim Demaille <akim@epita.fr>
10701
10702 Propagate more token_number_t.
10703
10704 * src/gram.h (token_number_as_item_number)
10705 (item_number_as_token_number): New.
10706 * src/output.c (GENERATE_OUTPUT_TABLE): New.
10707 Use it to create output_item_number_table and
10708 output_token_number_table.
10709 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10710 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
10711 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
10712 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
10713
4f940944
AD
107142002-04-22 Akim Demaille <akim@epita.fr>
10715
10716 * src/output.h, src/output.c (get_lines_number): Remove.
10717
3ded9a63
AD
107182002-04-19 Akim Demaille <akim@epita.fr>
10719
10720 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
10721 as Lex/Flex'.
10722 (Debugging): More details about enabling the debugging features.
10723 (Table of Symbols): Describe $$, $n, @$, and @n.
10724 Suggested by Tim Josling.
10725
e0c471a9
AD
107262002-04-19 Akim Demaille <akim@epita.fr>
10727
10728 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
10729
fecc10cd
AD
107302002-04-10 Akim Demaille <akim@epita.fr>
10731
10732 * src/system.h: Rely on HAVE_LIMITS_H.
10733 Suggested by Paul Eggert.
10734
51dec47b
AD
107352002-04-09 Akim Demaille <akim@epita.fr>
10736
10737 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
10738 full stderr, and strip it according to the bison options, instead
10739 of composing the error message from different bits.
10740 This makes it easier to check for several error messages.
10741 Adjust all the invocations.
10742 Add an invocation exercising the error token.
10743 Add an invocation demonstrating a stupid error message.
10744 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
10745 Adjust the tests.
10746 Error message are for stderr, not stdout.
10747
007a50a4
AD
107482002-04-09 Akim Demaille <akim@epita.fr>
10749
10750 * src/gram.h, src/gram.c (error_token_number): Remove, use
10751 errtoken->number.
10752 * src/reader.c (reader): Don't specify the user token number (2)
10753 for $undefined, as it uselessly prevents using it.
10754 * src/gram.h (token_number_t): Move to...
10755 * src/symtab.h: here.
10756 (state_t.number): Is a token_number_t.
10757 * src/print.c, src/reader.c: Use undeftoken->number instead of
10758 hard coded 2.
10759 (Even though this 2 is not the same as above: the number of the
10760 undeftoken remains being 2, it is its user token number which
10761 might not be 2).
10762 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
10763 `user_token_number_max'.
10764 Output `undef_token_number'.
10765 * data/bison.simple, data/bison.c++: Use them.
10766 Be sure to map invalid yylex return values to
10767 `undef_token_number'. This saves us from gratuitous SEGV.
10768
10769 * tests/conflicts.at (Solved SR Conflicts)
10770 (Unresolved SR Conflicts): Adjust.
10771 * tests/regression.at (Web2c Actions): Adjust.
10772
06446ccf
AD
107732002-04-08 Akim Demaille <akim@epita.fr>
10774
10775 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
10776 Adding #line.
10777 Remove the duplicate `typedefs'.
10778 (RhsNumberType): Fix the declaration and various other typos.
10779 Use __ofile__.
10780 * data/bison.simple: Use __ofile__.
10781 * src/scan-skel.l: Handle __ofile__.
10782
62a3e4f0
AD
107832002-04-08 Akim Demaille <akim@epita.fr>
10784
10785 * src/gram.h (item_number_t): New, the type of item numbers in
10786 RITEM. Note that it must be able to code symbol numbers as
10787 positive number, and the negation of rule numbers as negative
10788 numbers.
10789 Adjust all dependencies (pretty many).
10790 * src/reduce.c (rule): Remove this `short *' pointer: use
10791 item_number_t.
10792 * src/system.h (MINSHORT, MAXSHORT): Remove.
10793 Include `limits.h'.
10794 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
10795 (shortcpy): Remove.
10796 (MAXTABLE): Move to...
10797 * src/output.c (MAXTABLE): here.
10798 (prepare_rules): Use output_int_table to output rhs.
10799 * data/bison.simple, data/bison.c++: Adjust.
10800 * tests/torture.at (Big triangle): Move the limit from 254 to
10801 500.
10802 * tests/regression.at (Web2c Actions): Ajust.
10803
10804 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
10805 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
10806 passes, but produces negative #line number, once fixed, GCC is
10807 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
10808 C), it passes.
10809 * src/state.h (state_h): Code input lines on ints, not shorts.
10810
bb88b0fc
AD
108112002-04-08 Akim Demaille <akim@epita.fr>
10812
10813 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
10814 and then the grammar.
10815
9a636f47
AD
108162002-04-08 Akim Demaille <akim@epita.fr>
10817
10818 * src/system.h: No longer using strndup.
10819
680e8701
AD
108202002-04-07 Akim Demaille <akim@epita.fr>
10821
10822 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
10823 * src/output.c (output_table_data): Return the longest number.
10824 (prepare_tokens): Output `token_number_max').
10825 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
10826 New.
10827 Use them to define yy_token_number_type/TokenNumberType.
10828 Use this type for yytranslate.
10829 * tests/torture.at (Big triangle): Push the limit from 124 to
10830 253.
10831 * tests/regression.at (Web2c Actions): Adjust.
10832
817e9f41
AD
108332002-04-07 Akim Demaille <akim@epita.fr>
10834
10835 * tests/torture.at (Big triangle): New.
10836 (GNU AWK Grammar, GNU Cim Grammar): Move to...
10837 * tests/existing.at: here.
10838
5123689b
AD
108392002-04-07 Akim Demaille <akim@epita.fr>
10840
10841 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
10842 nritems.
10843 Adjust dependencies.
10844
f3849179
AD
108452002-04-07 Akim Demaille <akim@epita.fr>
10846
10847 * src/reader.c: Normalize increments to prefix form.
10848
bd02036a
AD
108492002-04-07 Akim Demaille <akim@epita.fr>
10850
10851 * src/reader.c, symtab.c: Remove debugging code.
10852
db8837cb
AD
108532002-04-07 Akim Demaille <akim@epita.fr>
10854
10855 Rename all the `bucket's as `symbol_t'.
10856
10857 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
10858 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
10859 * src/symtab.c, src/symtab.h (bucket): Rename as...
10860 (symbol_t): this.
10861 (symbol_list_new, bucket_check_defined, bucket_make_alias)
10862 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
10863 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
10864 (buckets_new, buckets_free, buckets_do): Rename as...
10865 (symbol_list_new, symbol_check_defined, symbol_make_alias)
10866 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
10867 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
10868 (symbols_new, symbols_free, symbols_do): these.
10869
72a23c97
AD
108702002-04-07 Akim Demaille <akim@epita.fr>
10871
10872 Use lib/hash for the symbol table.
10873
10874 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
10875 EOF.
10876 * src/lex.c (lex): Set the `number' member of new terminals.
10877 * src/reader.c (bucket_check_defined, bucket_make_alias)
10878 (bucket_check_alias_consistence, bucket_translation): New.
10879 (reader, grammar_free, readgram, token_translations_init)
10880 (packsymbols): Adjust.
10881 (reader): Number the predefined tokens.
10882 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
10883 for predefined tokens.
10884 * src/symtab.h (bucket): Remove all the hash table related
10885 members.
10886 * src/symtab.c (symtab): Replace by...
10887 (bucket_table): this.
10888 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
10889 (buckets_new, buckets_do): New.
10890
280a38c3
AD
108912002-04-07 Akim Demaille <akim@epita.fr>
10892
10893 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
10894 (start_symbol, max_user_token_number, semantic_parser)
10895 (error_token_number): Initialize.
10896 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
10897 Initialize.
10898 (reader): Don't.
10899 (errtoken, eoftoken, undeftoken, axiom): Extern.
10900
03b31c0c
AD
109012002-04-07 Akim Demaille <akim@epita.fr>
10902
10903 * src/gram.h (rule_s): prec and precsym are now pointers
10904 to the bucket giving the priority/associativity.
10905 Member `associativity' removed: useless.
10906 * src/reduce.c, src/conflicts.c: Adjust.
10907
8b3df748
AD
109082002-04-07 Akim Demaille <akim@epita.fr>
10909
10910 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
10911 Properly escape the symbols' TAG when outputting them.
10912
e601aa1d
AD
109132002-04-07 Akim Demaille <akim@epita.fr>
10914
10915 * src/lalr.h (LA): Is a bitsetv, not bitset*.
10916
b0299a2e
AD
109172002-04-07 Akim Demaille <akim@epita.fr>
10918
10919 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
10920 (LArule): this, which is an array to rule_t*.
10921 * src/print.c, src/conflicts.c: Adjust.
10922
d7e1f00c
AD
109232002-04-07 Akim Demaille <akim@epita.fr>
10924
10925 * src/gram.h (rule_t): Rename `number' as `user_number'.
10926 `number' is a new member.
10927 Adjust dependencies.
10928 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
10929
cc9305dd
AD
109302002-04-07 Akim Demaille <akim@epita.fr>
10931
10932 As a result of the previous patch, it is no longer needed
10933 to reorder ritem itself.
10934
10935 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
10936
b0940840
AD
109372002-04-07 Akim Demaille <akim@epita.fr>
10938
10939 Be sure never to walk through RITEMS, but use only data related to
10940 the rules themselves. RITEMS should be banished.
10941
10942 * src/output.c (output_token_translations): Rename as...
10943 (prepare_tokens): this.
10944 In addition to `translate', prepare the muscles `tname' and
10945 `toknum', which were handled by...
10946 (output_rule_data): this.
10947 Remove, and move the remainder of its outputs into...
10948 (prepare_rules): this new routines, which also merges content from
10949 (output_gram): this.
10950 (prepare_rules): Be sure never to walk through RITEMS.
10951 (output_stos): Rename as...
10952 (prepare_stos): this.
10953 (output): Always invoke prepare_states, after all, just don't use it
10954 in the output if you don't need it.
10955
643a5994
AD
109562002-04-07 Akim Demaille <akim@epita.fr>
10957
10958 * src/LR0.c (new_state): Display `nstates' as the name of the
10959 newly created state.
10960 Adjust to initialize first_state and last_state if needed.
10961 Be sure to distinguish the initial from the final state.
10962 (new_states): Create the itemset of the initial state, and use
10963 new_state.
10964 * src/closure.c (closure): Now that the initial state has its
10965 items properly set, there is no need for a special case when
10966 creating `ruleset'.
10967
10968 As a result, now the rule 0, reducing to $axiom, is visible in the
10969 outputs. Adjust the test suite.
10970
10971 * tests/conflicts.at (Solved SR Conflicts)
10972 (Unresolved SR Conflicts): Adjust.
10973 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
10974 * tests/conflicts.at (S/R in initial): New.
10975
b4c4ccc2
AD
109762002-04-07 Akim Demaille <akim@epita.fr>
10977
10978 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
10979 the RHS of the rules.
10980 * src/output.c (output_gram): Likewise.
10981
bba97eb2
AD
109822002-04-07 Akim Demaille <akim@epita.fr>
10983
10984 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
10985 bucket.
10986 Adjust all dependencies.
10987 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
10988 `number' of the buckets too.
10989 * src/gram.h: Include `symtab.h'.
10990 (associativity): Move to...
10991 * src/symtab.h: here.
10992 No longer include `gram.h'.
10993
c3b407f4
AD
109942002-04-07 Akim Demaille <akim@epita.fr>
10995
10996 * src/gram.h, src/gram.c (rules_rhs_length): New.
10997 (ritem_longest_rhs): Use it.
10998 * src/gram.h (rule_t): `number' is a new member.
10999 * src/reader.c (packgram): Set it.
11000 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
11001 the end of `rules', and count them out of `nrules'.
11002 (reduce_output, dump_grammar): Adjust.
11003 * src/print.c (print_grammar): It is no longer needed to check for
11004 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
11005 * tests/reduce.at (Reduced Automaton): New test.
11006
11652ab3
AD
110072002-04-07 Akim Demaille <akim@epita.fr>
11008
11009 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
11010 lacking `+ 1' to nrules, Bison reported as useless a token if it
11011 was used solely to set the precedence of the last rule...
11012
26b23c1a
AD
110132002-04-07 Akim Demaille <akim@epita.fr>
11014
11015 * data/bison.c++, data/bison.simple: Don't output the current file
11016 name in #line, to avoid useless diffs between two identical
11017 outputs under different names.
11018
18bcecb0
AD
110192002-04-07 Akim Demaille <akim@epita.fr>
11020
11021 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
11022 Normalize loops to using `< nrules + 1', not `<= nrules'.
11023
fa770c86
AD
110242002-04-07 Akim Demaille <akim@epita.fr>
11025
11026 * TODO: Update.
11027
d9b739c3
AD
110282002-04-07 Akim Demaille <akim@epita.fr>
11029
11030 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
11031 bucket.value as bucket.number.
11032
99013900
AD
110332002-04-07 Akim Demaille <akim@epita.fr>
11034
11035 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
11036 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11037 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
11038 RHS, instead of being an index in RITEMS.
11039
e966383b
PE
110402002-04-04 Paul Eggert <eggert@twinsun.com>
11041
11042 * doc/bison.texinfo: Update copyright date.
11043 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
11044 (Symbols): Warn about running Bison in one character set,
11045 but compiling and/or running in an incompatible one.
11046 Warn about character code 256, too.
11047
110482002-04-03 Paul Eggert <eggert@twinsun.com>
11049
11050 * src/bison.data (YYSTACK_ALLOC): Depend on whether
11051 YYERROR_VERBOSE is nonzero, not whether it is defined.
11052
11053 Merge changes from bison-1_29-branch.
c307773e 11054
8d6c48b9
PE
110552002-03-20 Paul Eggert <eggert@twinsun.com>
11056
11057 Merge fixes from Debian bison_1.34-1.diff.
11058
11059 * configure.in (AC_PREREQ): 2.53.
11060
e53c6322
AD
110612002-03-20 Akim Demaille <akim@epita.fr>
11062
11063 * src/conflicts.c (log_resolution): Argument `resolution' is const.
11064
9ffbeca7
PE
110652002-03-19 Paul Eggert <eggert@twinsun.com>
11066
21db0b2a
PE
11067 * src/bison.simple (YYCOPY): New macro.
11068 (YYSTACK_RELOCATE): Use it.
11069 Remove Type arg; no longer needed. All callers changed.
11070 (yymemcpy): Remove; no longer needed.
11071
9ffbeca7
PE
11072 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
11073 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11074
642cb8f8
AD
110752002-03-19 Akim Demaille <akim@epita.fr>
11076
11077 Test and fix the #line outputs.
11078
11079 * tests/atlocal.at (GCC): New.
11080 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 11081 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
11082 (Action synch line, Epilogue synch line): New tests.
11083 * src/reader.c (parse_union_decl): Define the muscle stype_line.
11084 * data/bison.simple, data/bison.c++: Use it.
11085
3c31a486
AD
110862002-03-19 Akim Demaille <akim@epita.fr>
11087
11088 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
11089 (Solved SR Conflicts, %expect not enough, %expect right)
11090 (%expect too much): Move to...
11091 * tests/conflicts.at: this new file.
11092
0d8bed56
AD
110932002-03-19 Akim Demaille <akim@epita.fr>
11094
11095 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11096 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
11097 that we can move to enums for instance.
11098 * src/output.c (token_definitions_output): Output a list of
11099 `token-name, token-number' instead of the #define.
11100 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
11101
9208d17f
AD
111022002-03-14 Akim Demaille <akim@epita.fr>
11103
11104 Use Gettext 0.11.1.
11105
af27eacb
RA
111062002-03-09 Robert Anisko <robert@lrde.epita.fr>
11107
11108 * data/bison.c++: Make the user able to add members to the generated
11109 parser by subclassing.
11110
9101a310
RA
111112002-03-05 Robert Anisko <robert@lrde.epita.fr>
11112
11113 * src/reader.c (read_additionnal_code): `c' should be an integer, not
11114 a character.
11115 Reported by Nicolas Tisserand and Nicolas Burrus.
11116
fff9bf0b
RA
111172002-03-04 Robert Anisko <robert@lrde.epita.fr>
11118
11119 * src/reader.c: Warn about lacking semi-colons, do not complain.
11120
64dba31e
RA
111212002-03-04 Robert Anisko <robert@lrde.epita.fr>
11122
11123 * data/bison.c++: Remove a debug line.
11124
374f5a14
RA
111252002-03-04 Robert Anisko <robert@lrde.epita.fr>
11126
11127 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
11128 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
11129 provide a default implementation.
11130
bfcf1f3a
AD
111312002-03-04 Akim Demaille <akim@epita.fr>
11132
11133 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
11134 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
11135 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
11136 * tests/semantic.at (Parsing Guards): Similarly.
11137 * src/reader.at (readgram): Complain if the last rule is not ended
11138 with a semi-colon.
11139
65ccf9fc
AD
111402002-03-04 Akim Demaille <akim@epita.fr>
11141
11142 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
11143 * src/closure.c: here.
11144 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
11145 RTC.
11146 * src/warshall.h, src/warshall.c: Remove.
11147 * tests/sets.at (Broken Closure): Adjust.
11148
d0039cbc
AD
111492002-03-04 Akim Demaille <akim@epita.fr>
11150
11151 * src/output.c (output_skeleton): tempdir is const.
11152 bytes_read is unused.
11153
345cea78
AD
111542002-03-04 Akim Demaille <akim@epita.fr>
11155
11156 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11157 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
11158 Update.
11159 From Michael Hayes.
11160
564801f7
AD
111612002-03-04 Akim Demaille <akim@epita.fr>
11162
11163 * src/closure.c (closure): `r' is unused.
11164
e5352bc7
AD
111652002-03-04 Akim Demaille <akim@epita.fr>
11166
11167 * tests/sets.at (Broken Closure): Add the ending `;'.
11168 * src/reader.at (readgram): Complain if a rule is not ended with a
11169 semi-colon.
11170
914feea9
AD
111712002-03-04 Akim Demaille <akim@epita.fr>
11172
11173 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
11174 (count_sr_conflicts): Use bitset_count.
11175 * src/reduce.c (inaccessable_symbols): Ditto.
11176 (bits_size): Remove.
11177 * src/warshall.h, src/warshall.c: Convert to bitsetv.
11178
f0250de6
AD
111792002-03-04 Akim Demaille <akim@epita.fr>
11180
11181 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
11182 * src/reduce.c: Remove the `bitset_zero's following the
11183 `bitset_create's, as now it is performed by the latter.
11184
ef017502
AD
111852002-03-04 Akim Demaille <akim@epita.fr>
11186
11187 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
11188 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
11189 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
11190 latest sources from Michael.
11191
76514394
AD
111922002-03-04 Akim Demaille <akim@epita.fr>
11193
11194 * src/output.c (output): Don't free the grammar.
11195 * src/reader.c (grammar_free): New.
11196 * src/main.c (main): Call it and don't free symtab here.
11197
55024580
AD
111982002-03-04 Akim Demaille <akim@epita.fr>
11199
11200 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
11201 before returning.
11202 Reported by Benoit Perrot.
11203
f9abaa2c
AD
112042002-03-04 Akim Demaille <akim@epita.fr>
11205
11206 Use bitset operations when possible, not loops over bits.
11207
11208 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
11209 bitset_or.
11210 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
11211 * src/reduce.c (useless_nonterminals): Formatting changes.
11212 * src/warshall.c (TC): Use bitset_or.
11213
0e721e75
AD
112142002-03-04 Akim Demaille <akim@epita.fr>
11215
11216 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
11217 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
11218 Ditto.
11219
0fb1ffb1
AD
112202002-03-04 Akim Demaille <akim@epita.fr>
11221
11222 * src/lalr.c (F): Now a bitset*.
11223 Adjust all dependencies.
11224
b86796bf
AD
112252002-03-04 Akim Demaille <akim@epita.fr>
11226
11227 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
11228 Adjust all dependencies.
11229
602bbf31
AD
112302002-03-04 Akim Demaille <akim@epita.fr>
11231
11232 * src/L0.c, src/LR0.h (nstates): Be size_t.
11233 Adjust comparisons (signed vs unsigned).
11234 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
11235 bitset*.
11236 Adjust all dependencies.
11237
d8a0245c
AD
112382002-03-04 Akim Demaille <akim@epita.fr>
11239
11240 * src/closure.c (firsts): Now, also a bitset.
11241 Adjust all dependencies.
11242 (varsetsize): Remove, now unused.
11243 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
11244
34ba9743
AD
112452002-03-04 Akim Demaille <akim@epita.fr>
11246
11247 * src/print.c: Convert to use bitset.h, not hand coded iterations
11248 over ints.
11249
ed86e78c
AD
112502002-03-04 Akim Demaille <akim@epita.fr>
11251
11252 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
11253
dfdb1797
AD
112542002-03-04 Akim Demaille <akim@epita.fr>
11255
11256 * src/closure.c (ruleset): Be a bitset.
11257 (rulesetsize): Remove.
11258
7086e707
AD
112592002-03-04 Akim Demaille <akim@epita.fr>
11260
11261 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11262 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
11263 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
11264 * src/closure.c (fderives): Be an array of bitsets.
11265
98254360
RA
112662002-02-28 Robert Anisko <robert@lrde.epita.fr>
11267
11268 * data/bison.c++: Merge the two generated headers. Insert a copyright
11269 notice in each output file.
11270
a75c057f
AD
112712002-02-28 Akim Demaille <akim@epita.fr>
11272
11273 * data/bison.c++: Copy the prologue of bison.simple to fetch
11274 useful M4 definitions, such as b4_header_guard.
11275
06b00abc
AD
112762002-02-25 Akim Demaille <akim@epita.fr>
11277
11278 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
11279 translator friendly scheme for the bgr
11280 copyright notice.
06b00abc 11281
70e7d534
AD
112822002-02-25 Akim Demaille <akim@epita.fr>
11283
11284 * src/output.c (header_output): Remove, now handled completely via
11285 M4.
11286
abe017f6
AD
112872002-02-25 Akim Demaille <akim@epita.fr>
11288
11289 * m4/m4.m4: New, from CVS Autoconf.
11290 * configure.in: Invoke it.
11291 * src/output.c (output_skeleton): Use its result instead of the
11292 hard coded name.
11293
381fb12e
AD
112942002-02-25 Akim Demaille <akim@epita.fr>
11295
11296 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
11297 Fileutils 4.1.5.
11298 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
11299 * src/output.c (output_skeleton): Use mkstemp to create a real
11300 temporary file.
11301 Move the filling of `skeleton' and its muscle to...
11302 (prepare): here.
11303 (output): Move the definition of the prologue muscle to...
11304 (prepare): here.
11305 * src/system.h (DEFAULT_TMPDIR): New.
11306
6f38107f
PE
113072002-02-14 Paul Eggert <eggert@twinsun.com>
11308
11309 Remove the support for C++ namespace cleanliness; it was
11310 causing more problems than it was curing, since it didn't work
11311 properly on some nonstandard C++ compilers. This can wait
11312 for a proper C++ parser.
11313
11314 * NEWS: Document this.
11315 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
11316 of C++, as it's treated like C now.
11317 * src/bison.simple (YYSTD): Remove.
11318 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
11319 Treat C++ just like Standard C instead of trying to support
11320 namespace cleanliness.
11321
80cce3da
AD
113222002-02-14 Akim Demaille <akim@epita.fr>
11323
11324 * tests/regression.at (else): Adjust to Andreas' change.
11325
842e8679
AD
113262002-02-14 Akim Demaille <akim@epita.fr>
11327
11328 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
11329
4bda3f10
AD
113302002-02-13 Andreas Schwab <schwab@suse.de>
11331
11332 * src/output.c (output_rule_data): Don't output NULL, it might
11333 not be defined yet.
11334
4162fa07 113352002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 11336
4162fa07
RA
11337 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
11338 (Copyright notice): Update.
b418ecd8 11339
bd16a5dc
AD
113402002-02-11 Akim Demaille <akim@epita.fr>
11341
11342 * tests/regression.at (%nonassoc and eof): Don't include
11343 nonportable headers.
11344
8d69a1a3
RA
113452002-02-08 Robert Anisko <robert@lrde.epita.fr>
11346
11347 * data/bison.c++: Correct error recovery. Make the user able to
11348 initialize the starting location.
11349
9b2d0677
AD
113502002-02-07 Akim Demaille <akim@epita.fr>
11351
11352 * tests/input.at: New.
11353
69e2658b
RA
113542002-02-07 Robert Anisko <robert@lrde.epita.fr>
11355
11356 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 11357 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
11358 directives around tables only needed for debugging.
11359
4aacc3a7
RA
113602002-02-07 Robert Anisko <robert@lrde.epita.fr>
11361
11362 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
11363 C++ parsers.
11364 (yy::b4_name::parse): Use print_.
11365
762a801e
RA
113662002-02-07 Robert Anisko <robert@lrde.epita.fr>
11367
11368 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
11369
4bb2bc3f
RA
113702002-02-07 Robert Anisko <robert@lrde.epita.fr>
11371
11372 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
11373 C++ parsers.
11374 (yy::b4_name::parse): Build verbose error messages, and use error_.
11375
6b45a3ca
RA
113762002-02-06 Robert Anisko <robert@lrde.epita.fr>
11377
11378 * data/bison.c++: Fix m4 quoting in comments.
11379
50997c6e
RA
113802002-02-06 Robert Anisko <robert@lrde.epita.fr>
11381
11382 * data/bison.c++: Adjust the parser code. Fix some muscles that were
11383 not expanded by m4.
11384
3f3eed27
AD
113852002-02-05 Akim Demaille <akim@epita.fr>
11386
11387 * data/bison.c++: Adjust to the M4 back end.
11388 More is certainly needed.
11389
be2a1a68
AD
113902002-02-05 Akim Demaille <akim@epita.fr>
11391
11392 Give a try to M4 as a back end.
11393
11394 * lib/readpipe.c: New, from wdiff.
11395 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
11396 BISON_HAIRY.
11397 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
11398 specific values. Now it is m4 that performs the lookup.
11399 * src/parse-skel.y: Remove.
11400 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
11401 * src/output.c (actions_output, guards_output)
11402 (token_definitions_output): No longer keeps track of the output
11403 line number, hence remove the second argument.
11404 (guards_output): Check against the guard member of a rule, not the
11405 action member.
11406 Adjust callers.
11407 (output_skeleton): Don't look for the skeleton location, let m4 do
11408 that.
11409 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
11410 file will be used.
11411 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
11412 (prepare): Given that for the time being changesyntax is not
11413 usable in M4, rename the muscles using `-' to `_'.
11414 Define `defines_flag', `output_parser_name' and `output_header_name'.
11415 * src/output.h (actions_output, guards_output)
11416 (token_definitions_output): Adjust prototypes.
11417 * src/scan-skel.l: Instead of scanning the skeletons, it now
11418 processes the output of m4: `__oline__' and `#output'.
11419 * data/bison.simple: Adjust to be used by M4(sugar).
11420 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
11421 to date.
11422 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
11423 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
11424 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
11425 shamelessly stolen from CVS Autoconf.
11426
beda758b
AD
114272002-02-05 Akim Demaille <akim@epita.fr>
11428
11429 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
11430 * configure.in: Check for the declarations of free and malloc.
11431 * src/muscle_tab.c: Adjust.
11432
5ece6d43
AD
114332002-02-05 Akim Demaille <akim@epita.fr>
11434
11435 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
11436 which have no values.
11437
5bb18f9a
AD
114382002-02-05 Akim Demaille <akim@epita.fr>
11439
11440 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
11441 * data/: here.
11442
894dd62e
PE
114432002-01-29 Paul Eggert <eggert@twinsun.com>
11444
11445 * src/bison.simple (YYSIZE_T): Do not define merely because
11446 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
11447 On some platforms, <alloca.h> does not declare YYSTD (size_t).
11448
82841af7
AD
114492002-01-27 Akim Demaille <akim@epita.fr>
11450
11451 Fix `%nonassoc and eof'.
11452
11453 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
11454 which were not properly copied! Replace
11455 memcpy (res->errs, src->errs, src->nerrs);
11456 with
11457 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
11458 !!!
11459 * tests/regression.at (%nonassoc and eof): Adjust to newest
11460 Autotest: `.' is not in the PATH.
11461
318b76e9
AD
114622002-01-27 Akim Demaille <akim@epita.fr>
11463
11464 * tests/sets.at (AT_EXTRACT_SETS): New.
11465 (Nullable): Use it.
11466 (Firsts): New.
11467
30d2f3d5
AD
114682002-01-26 Akim Demaille <akim@epita.fr>
11469
11470 * tests/actions.at, tests/calc.at, tests/headers.at,
11471 * tests/torture.at: Adjust to the newest Autotest which no longer
11472 forces `.' in the PATH.
11473
30f8c395
AD
114742002-01-25 Akim Demaille <akim@epita.fr>
11475
11476 * tests/regression.at (%nonassoc and eof): New.
11477 Suggested by Robert Anisko.
11478
29ae55f1
AD
114792002-01-24 Akim Demaille <akim@epita.fr>
11480
11481 Bison dumps core when trying to complain about broken input files.
11482 Reported by Cris van Pelt.
11483
11484 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
11485 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
11486 into...
11487 (Invalid inputs): Strengthen: exercise parse_percent_token.
11488
2b548aa6
RA
114892002-01-24 Robert Anisko <robert.anisko@epita.fr>
11490
11491 * src/Makefile.am: Add bison.c++.
11492 * src/bison.c++: New skeleton.
11493
bb0146c2
AD
114942002-01-21 Paolo Bonzini <bonzini@gnu.org>
11495
11496 * po/it.po: New.
11497
bec30531
AD
114982002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
11499
11500 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
11501
fc6edc45
MA
115022002-01-20 Marc Autret <marc@gnu.org>
11503
11504 * src/files.c (compute_output_file_names): Fix
11505
5e5d5415
MA
115062002-01-20 Marc Autret <marc@gnu.org>
11507
11508 * tests/output.at: New test.
11509 * src/files.c (compute_base_names): Don't map extensions when
11510 the YACC flag is set, use defaults.
11511 Reported by Evgeny Stambulchik.
11512
44ea3fbd
MA
115132002-01-20 Marc Autret <marc@gnu.org>
11514
ba0fe3c7
PE
11515 * src/system.h: Need to define __attribute__ away for non-GCC
11516 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
11517 Suggested by Albert Chin-A-Young.
11518
338963d1
TVH
115192002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
11520
11521 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
11522 canonical definition.
11523 * src/system.h: Use the canonical definition for PARAMS (avoids
11524 a conflict with the macro from lib/hash.h).
11525
c57b2479
AD
115262002-01-11 Akim Demaille <akim@epita.fr>
11527
11528 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 11529 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 11530
b85810ae
AD
115312002-01-09 Akim Demaille <akim@epita.fr>
11532
11533 * src/files.c, src/files.h (output_infix): New.
11534 (tab_extension): Remove.
11535 (compute_base_names): Compute the former, drop the latter.
11536 * src/output.c (prepare): Insert the muscles `output-infix', and
11537 `output-suffix'.
11538 * src/parse-skel.y (string, string.1): New.
11539 (section.header): Use it.
11540 (section.yacc): Remove.
11541 (prefix): Remove too.
11542 * src/scan-skel.l: Adjust.
11543 * src/bison.simple, src/bison.hairy: Adjust.
11544
cae60122
AD
115452002-01-09 Akim Demaille <akim@epita.fr>
11546
11547 * configure.in (WERROR_CFLAGS): Compute it.
11548 * src/Makefile.am (CFLAGS): Pass it.
11549 * tests/atlocal.in (CFLAGS): Idem.
11550 * src/files.c: Fix a few warnings.
11551 (get_extension_index): Remove, unused.
11552
ae404801
AD
115532002-01-08 Akim Demaille <akim@epita.fr>
11554
11555 * src/getargs.c (AS_FILE_NAME): New.
11556 (getargs): Use it to convert DOSish file names.
11557 * src/files.c (base_name): Rename as full_base_name to avoid
11558 clashes with `base_name ()'.
11559 (filename_split): New.
11560 (compute_base_names): N-th rewrite, using filename_split.
11561
22312b71
AD
115622002-01-08 Akim Demaille <akim@epita.fr>
11563
11564 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
11565 New, stolen from the Fileutils 4.1.
11566 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
11567 * configure.in: Check for the presence of memrchr, and of its
11568 prototype.
11569
a67cef01
TVH
115702002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
11571
11572 * lib/hash.h (__P): Added definition for this macro.
11573 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
11574 BUILT_SOURCES, to ensure they are generated first.
11575 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
11576 %error-verbose to allow bootstrapping with bison 1.30x.
11577
2b25d624
AD
115782002-01-06 Akim Demaille <akim@epita.fr>
11579
11580 * src/reader.c (parse_braces): Don't fetch the next char, the
11581 convention is to fetch on entry.
11582 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
11583 'switch' without a following semicolon.
11584 * tests/regression.at (braces parsing): New.
11585
3460813b
AD
115862002-01-06 Akim Demaille <akim@epita.fr>
11587
11588 Bison is dead wrong in its RR conflict reports.
11589
11590 * tests/torture.at (GNU Cim Grammar): New.
11591 * src/conflicts.c (count_rr_conflicts): Fix.
11592
73784c64
AD
115932002-01-06 Akim Demaille <akim@epita.fr>
11594
11595 Creating package.m4 from configure.ac causes too many problems.
11596
11597 * tests/Makefile.am (package.m4): Create it by hand,
11598 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
11599
25d81090
AD
116002002-01-06 Akim Demaille <akim@epita.fr>
11601
11602 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
11603 skeleton.h.
11604
a9b8959e
PE
116052002-01-04 Paul Eggert <eggert@twinsun.com>
11606
11607 * doc/bison.texinfo (Debugging):
11608 Remove YYSTDERR; it's no longer defined or used.
11609 Also, s/cstdio.h/cstdio/.
11610
25d81090
AD
116112002-01-03 Akim Demaille <akim@epita.fr>
11612
11613 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
11614
1109455c
AD
116152002-01-03 Akim Demaille <akim@epita.fr>
11616
11617 * src/parse-skel.y (process_skeleton): Don't bind the parser's
11618 tracing code to --trace, wait for a better --trace option, with
11619 args.
11620
7ea5e977
AD
116212002-01-03 Akim Demaille <akim@epita.fr>
11622
11623 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
11624 The ISO C++ standard is extremely clear about it: stderr is
11625 considered a macro, not a regular symbol (see table 94 `Header
11626 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
11627 Therefore std:: does not apply to it. It still does with fprintf.
11628 Also, s/cstdio.h/cstdio/.
11629
fab5b110
AD
116302002-01-03 Akim Demaille <akim@epita.fr>
11631
11632 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
11633 for non system headers.
11634
aed7fd9b
AD
116352002-01-02 Akim Demaille <akim@epita.fr>
11636
11637 Equip the skeleton chain with location tracking, runtime trace,
11638 pure parser and scanner.
11639
11640 * src/parse-skel.y: Request a pure parser, locations, and prefix
11641 renaming.
11642 (%union): Having several members with the same type does not help
11643 type mismatches, simplify.
11644 (YYPRINT, yyprint): New.
11645 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
11646 (skel_error): this.
11647 Handle locations.
11648 * src/scan-skel.l: Adjust to these changes.
11649 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
11650 (LOCATION_PRINT, skel_control_t): New.
11651
24fad99e
AD
116522001-12-30 Akim Demaille <akim@epita.fr>
11653
11654 * src/parse-skel.y: Get rid of the shift/reduce conflict:
11655 replace `gb' with BLANKS.
11656 * src/scan-skel.l: Adjust.
11657
a4b36db4
AD
116582001-12-30 Akim Demaille <akim@epita.fr>
11659
11660 * src/system.h: We don't need nor want bcopy.
11661 Throw away MS-DOS crap: we don't need getpid.
11662 * configure.in: We don't need strndup. It was even causing
11663 problems: because Flex includes the headers *before* us,
11664 _GNU_SOURCE is not defined by config.h, and therefore strndup was
11665 not visible.
11666 * lib/xstrndup.c: New.
11667 * src/scan-skel.l: Use it.
11668 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
11669 * src/parse-skel.y: Use %directives instead of #defines.
11670
1239777d
AD
116712001-12-30 Akim Demaille <akim@epita.fr>
11672
11673 * src/skeleton.h: New.
11674 * src/output.c (output_parser, output_master_parser): Remove, dead
11675 code.
11676 * src/output.h (get_lines_number, actions_output, guards_output)
11677 (token_definitions_output): Prototype them.
11678 * src/parse-skel.y: Add the license notice.
11679 Include output.h and skeleton.h.
11680 (process_skeleton): Returns void, and takes a single parameter.
11681 * src/scan-skel.l: Add the license notice.
11682 Include skeleton.h.
11683 Don't use %option yylineno: it seems that then Flex imagines
11684 REJECT has been used, and therefore it won't reallocate its
11685 buffers (which makes no other sense to me than a bug). It results
11686 in warnings for `unused: yy_flex_realloc'.
11687
9b3add5b
RA
116882001-12-30 Robert Anisko <robert.anisko@epita.fr>
11689
11690 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11691 (MUSCLE_INSERT_PREFIX): ...to there.
11692 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11693 (MUSCLE_INSERT_PREFIX): Move from here...
11694
11695 * src/bison.hairy: Add a section directive. Put braces around muscle
11696 names. This parser skeleton is still broken, but Bison should not
11697 choke on a bad muscle 'syntax'.
11698 * src/bison.simple: Add a section directive. Put braces around muscle
11699 names.
11700
11701 * src/files.h (strsuffix, stringappend): Add declarations.
11702 (tab_extension): Add declaration.
11703 (short_base_name): Add declaration.
11704
11705 * src/files.c (strsuffix, stringappend): No longer static. These
11706 functions are used in the skeleton parser.
11707 (tab_extension): New.
11708 (compute_base_names): Use the computations done in this function
fab5b110 11709 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
11710 names.
11711 (short_base_name): No longer static.
11712
11713 * src/output.c (output_skeleton): New.
11714 (output): Disable call to output_master_parser, and give a try to
11715 a new skeleton handling system.
11716 (guards_output, actions_output): No longer static.
11717 (token_definitions_output, get_lines_number): No longer static.
11718
11719 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
11720
fab5b110 11721 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
11722 parse-skel.y.
11723
11724 * src/parse-skel.y: New file.
11725 * src/scan-skel.l: New file.
11726
b5b61c61
AD
117272001-12-29 Akim Demaille <akim@epita.fr>
11728
11729 %name-prefix is broken.
11730
11731 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
11732 Adjust all dependencies.
11733 * tests/headers.at (export YYLTYPE): Strengthen this test: use
11734 %name-prefix.
11735
11736 Renaming yylval but not yylloc is not consistent. Now we do.
11737
11738 * src/bison.simple: Prefix yylloc if used.
11739 * doc/bison.texinfo (Decl Summary): Document that.
11740
8c9a50be
AD
117412001-12-29 Akim Demaille <akim@epita.fr>
11742
11743 * doc/bison.texinfo: Promote `%long-directive' over
11744 `%long_directive'.
11745 Remove all references to fixed-output-files, yacc is enough.
11746
d99361e6
AD
117472001-12-29 Akim Demaille <akim@epita.fr>
11748
11749 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
11750 user prologue. These are defaults.
11751 * tests/actions.at (Mid-rule actions): Make sure the user can
11752 define YYDEBUG and YYERROR_VERBOSE.
11753
b9cecb91
AD
117542001-12-29 Akim Demaille <akim@epita.fr>
11755
11756 * src/output.c (header_output): Don't forget to export YYLTYPE and
11757 yylloc.
11758 * tests/headers.at (export YYLTYPE): New, make sure it does.
11759 * tests/regression.at (%union and --defines, Invalid CPP headers):
11760 Move to...
11761 * tests/headers.at: here.
11762
aea13e97
AD
117632001-12-29 Akim Demaille <akim@epita.fr>
11764
11765 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
11766
931394cb
AD
117672001-12-29 Akim Demaille <akim@epita.fr>
11768
11769 * tests/actions.at (Mid-rule actions): Output on a single line
11770 instead of several.
11771
704a47c4
AD
117722001-12-29 Akim Demaille <akim@epita.fr>
11773
11774 * doc/bison.texinfo: Formatting changes.
11775
091e20bb
AD
117762001-12-29 Akim Demaille <akim@epita.fr>
11777
11778 Don't store the token defs in a muscle, just be ready to output it
11779 on command. Now possible via `symbols'. Fixes a memory leak.
11780
11781 * src/output.c (token_definitions_output): New.
11782 (output_parser, header_output): Use it.
11783 * src/reader.c (symbols_save): Remove.
11784
cce71710
AD
117852001-12-29 Akim Demaille <akim@epita.fr>
11786
11787 * src/bison.simple: Do not provide a default for YYSTYPE and
11788 YYLTYPE before the user's prologue. Otherwise it's hardly... a
11789 default.
11790
82c035a8
AD
117912001-12-29 Akim Demaille <akim@epita.fr>
11792
11793 Mid-rule actions are simply... ignored!
11794
11795 * src/reader.c (readgram): Be sure to attach mid-rule actions to
11796 the empty-rule associated to the dummy symbol, not to the host
11797 rule.
11798 * tests/actions.at (Mid-rule actions): New.
11799
8419d367
AD
118002001-12-29 Akim Demaille <akim@epita.fr>
11801
11802 Memory leak.
11803
11804 * src/reader.c (reader): Free grammar.
11805
375d5806
AD
118062001-12-29 Akim Demaille <akim@epita.fr>
11807
11808 Memory leak.
11809
11810 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
11811 since it allocates it for each state, although only one is needed.
11812 (allocate_storage): Do it here.
11813
f51cb8ff
AD
118142001-12-29 Akim Demaille <akim@epita.fr>
11815
11816 * src/options.h, src/options.c (create_long_option_table): Rename
11817 as...
11818 (long_option_table_new): this, with a clearer prototype.
11819 (percent_table): Remove, unused,
11820 * src/getargs.c (getargs): Adjust.
11821
29e88316
AD
118222001-12-29 Akim Demaille <akim@epita.fr>
11823
11824 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
11825 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
11826 as states.
11827
b9f71f19
AD
118282001-12-29 Akim Demaille <akim@epita.fr>
11829
11830 * src/lalr.c (build_relations): Rename `states' as `states1'.
11831 Sorry, I don't understand exactly what it is, no better name...
11832
1a2b5d37
AD
118332001-12-29 Akim Demaille <akim@epita.fr>
11834
11835 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
11836 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
11837 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
11838 as rules.
11839
1cca533e
AD
118402001-12-29 Akim Demaille <akim@epita.fr>
11841
11842 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
11843 ago.
11844
c03ae966
AD
118452001-12-29 Akim Demaille <akim@epita.fr>
11846
11847 * src/reader.c, src/reader.h (user_toknums): Remove.
11848 Adjust all users to use symbols[i]->user_token_number.
11849
5a670b1e
AD
118502001-12-29 Akim Demaille <akim@epita.fr>
11851
11852 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
11853 Adjust all users to use symbols[i]->prec or ->assoc.
11854
ad949da9
AD
118552001-12-29 Akim Demaille <akim@epita.fr>
11856
11857 * src/reader.c, src/reader.h (tags): Remove.
11858 Adjust all users to use symbols[i]->tag.
11859
0e78e603
AD
118602001-12-29 Akim Demaille <akim@epita.fr>
11861
11862 * src/gram.h, src/gram.c (symbols): New, similar to state_table
11863 and rule_table.
11864 * src/reader.c (packsymbols): Fill this table.
11865 Drop sprec.
11866 * src/conflicts.c (resolve_sr_conflict): Adjust.
11867 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
11868 single table.
11869 Use symbols[i]->tag instead of tags[i].
11870
213e640e
AD
118712001-12-29 Akim Demaille <akim@epita.fr>
11872
11873 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
11874 In addition, put a comment in there, to replace...
11875 * tests/regression.at (%union and C comments): Remove.
11876
e7b8bef1
AD
118772001-12-29 Akim Demaille <akim@epita.fr>
11878
11879 * tests/regression.at (Web2c Actions): Blindly move the actual
11880 output as expected output. The contents *seem* right to me, but I
11881 can't pretend reading perfectly parser tables... Nonetheless, all
11882 the other tests pass correctly, the table look OK, even though the
11883 presence of `$axiom' is to be noted: AFAICS it is useless (but
11884 harmless).
11885
b68e7744
AD
118862001-12-29 Akim Demaille <akim@epita.fr>
11887
11888 * src/reader.c (readgram): Don't add the rule 0 if there were no
11889 rules read. In other words, add it _after_ having performed
11890 grammar sanity checks.
11891 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
11892
78d5bae9
AD
118932001-12-29 Akim Demaille <akim@epita.fr>
11894
11895 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
11896 visible, and some states have now a different number.
11897
ff442794
AD
118982001-12-29 Akim Demaille <akim@epita.fr>
11899
11900 * src/reader.c (readgram): Bind the initial rule's lineno to that
11901 of the first rule.
11902 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
11903 (Solved SR Conflicts): Adjust rule 0's line number.
11904
610ab194
AD
119052001-12-29 Akim Demaille <akim@epita.fr>
11906
11907 Fix the `GAWK Grammar' failure.
11908
11909 * src/LR0.c (final_state): Initialize to -1 so that we do compute
11910 the reductions of the first state which was mistakenly confused
11911 with the final state because precisely final_state was initialized
11912 to 0.
11913 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
11914 now noticed by Bison.
11915 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
11916 have a reduction on $default.
11917
29d29c8f
AD
119182001-12-29 Akim Demaille <akim@epita.fr>
11919
11920 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
11921 rule line numbers.
11922 * src/closure.c (print_closure): Likewise.
11923 * src/derives.c (print_derives): Likewise.
11924 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
11925 now.
11926
7c6b64d0
AD
119272001-12-29 Akim Demaille <akim@epita.fr>
11928
11929 * src/lalr.c (lookaheads_print): New.
11930 (lalr): Call it when --trace-flag.
11931 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
11932 are dumped.
11933
3d4daee3
AD
119342001-12-29 Akim Demaille <akim@epita.fr>
11935
11936 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
11937 when walking through ritem, even via rule->rhs.
11938 * src/reduce.c (dump_grammar, useful_production, reduce_output)
11939 (useful_production, useless_nonterminals): Likewise.
11940 (reduce_grammar_tables): Likewise, plus update nritems.
11941 * src/nullable.c (set_nullable): Likewise.
11942 * src/lalr.c (build_relations): Likewise.
11943 * tests/sets.at (Nullable): Adjust.
11944 Fortunately, now, the $axiom is no longer nullable.
11945
9e7f6bbd
AD
119462001-12-29 Akim Demaille <akim@epita.fr>
11947
11948 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
11949 the 0-sentinel.
11950 * src/gram.c (ritem_longest_rhs): Likewise.
11951 * src/reduce.c (nonterminals_reduce): Likewise.
11952 * src/print_graph.c (print_graph): Likewise.
11953 * src/output.c (output_rule_data): Likewise.
11954 * src/nullable.c (set_nullable): Likewise.
11955
255ef638
AD
119562001-12-29 Akim Demaille <akim@epita.fr>
11957
11958 * src/output.c: Comment changes.
11959
0d8a7363
AD
119602001-12-27 Paul Eggert <eggert@twinsun.com>
11961
11962 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
11963 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
11964 Sparc, as they were causing more porting problems than the
11965 (minor) performance improvement was worth.
11966
11967 Also, catch up with 1.31's YYSTD.
11968
3db472b9
AD
119692001-12-27 Akim Demaille <akim@epita.fr>
11970
11971 * src/output.c (output_gram): Rely on nritems, not the
11972 0-sentinel. See below.
11973 Use -1 as separator, not 0.
11974 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
11975 Rely on -1 as separator in yyrhs, instead of 0.
11976 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
11977 twice `Now at end of input', therefore there are two lines less to
11978 expect.
11979
b365aa05
AD
119802001-12-27 Akim Demaille <akim@epita.fr>
11981
11982 * tests/regression.at (Unresolved SR Conflicts):
11983 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
11984 below.
11985
30171f79
AD
119862001-12-27 Akim Demaille <akim@epita.fr>
11987
11988 * src/LR0.c (new_state): Recognize the final state by the fact it
11989 is reached by eoftoken.
11990 (insert_start_shifting_state, insert_eof_shifting_state)
11991 (insert_accepting_state, augment_automaton): Remove, since now
11992 these states are automatically computed from the initial state.
11993 (generate_states): Adjust.
11994 * src/print.c: When reporting a rule number to the user, substract
11995 1, so that the axiom rule is rule 0, and the first user rule is 1.
11996 * src/reduce.c: Likewise.
11997 * src/print_graph.c (print_core): For the time being, just as for
11998 the report, depend upon --trace-flags to dump the full set of
11999 items.
12000 * src/reader.c (readgram): Once the grammar read, insert the rule
12001 0: `$axiom: START-SYMBOL $'.
12002 * tests/set.at: Adjust: rule 0 is now displayed, and since the
12003 number of the states has changed (the final state is no longer
12004 necessarily the last), catch up.
12005
75142d45
AD
120062001-12-27 Akim Demaille <akim@epita.fr>
12007
12008 Try to make the use of the eoftoken valid. Given that its value
12009 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
12010 is used instead of > 0 where appropriate, (ii), depend upon nritems
12011 instead of the 0-sentinel.
12012
12013 * src/gram.h, src/gram.c (nritems): New.
12014 Expected to be duplication of nitems, but for the time being...
12015 * src/reader.c (packgram): Assert nritems and nitems are equal.
12016 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
12017 * src/closure.c (print_closure, print_fderives): Likewise.
12018 * src/gram.c (ritem_print): Likewise.
12019 * src/print.c (print_core, print_grammar): Likewise.
12020 * src/print_graph.c: Likewise.
12021
b7c49edf
AD
120222001-12-27 Akim Demaille <akim@epita.fr>
12023
12024 * src/main.c (main): If there are complains after grammar
12025 reductions, then output the report anyway if requested, then die.
12026 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
12027 * src/reader.c (eoftoken): New.
12028 (parse_token_decl): If the token being defined has value `0', it
12029 is the eoftoken.
12030 (packsymbols): No longer hack `tags' to insert `$' by hand.
12031 Be sure to preserve the value of the eoftoken.
12032 (reader): Make sure eoftoken is defined.
12033 Initialize nsyms to 0: now eoftoken is created just like the others.
12034 * src/print.c (print_grammar): Don't special case the eof token.
12035 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
12036 lie anyway, albeit pleasant.
12037 * tests/calc.at: Exercise error messages with eoftoken.
12038 Change the grammar so that empty input is invalid.
12039 Adjust expectations.
12040 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
12041
ec2da99f
AD
120422001-12-27 Akim Demaille <akim@epita.fr>
12043
12044 * configure.in: Check the protos of strchr ans strspn.
12045 Replace strchr if needed.
12046 * src/system.h: Provide the protos of strchr, strspn and memchr if
12047 missing.
12048 * lib/strchr.c: New.
12049 * src/reader.c (symbols_save): Use strchr.
12050
8adfa272
AD
120512001-12-27 Akim Demaille <akim@epita.fr>
12052
12053 * src/print.c, src/print_graph.c (escape): New.
12054 Use it to quote the TAGS outputs.
12055 * src/print_graph.c (print_state): Now errors are in red, and
12056 reductions in green.
12057 Prefer high to wide: output the state number on a line of its own.
12058
80dac38c
AD
120592001-12-27 Akim Demaille <akim@epita.fr>
12060
12061 * src/state.h, src/state.c (reductions_new): New.
12062 * src/LR0.c (set_state_table): Let all the states have a
12063 `reductions', even if reduced to 0.
12064 (save_reductions): Adjust.
12065 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
12066 * src/print.c (print_reductions, print_actions): Adjust.
12067 * src/output.c (action_row): Adjust.
12068
2cec70b9
AD
120692001-12-27 Akim Demaille <akim@epita.fr>
12070
12071 * src/state.h, src/state.c (errs_new, errs_dup): New.
12072 * src/LR0.c (set_state_table): Let all the states have an errs,
12073 even if reduced to 0.
12074 * src/print.c (print_errs, print_reductions): Adjust.
12075 * src/output.c (output_actions, action_row): Adjust.
12076 * src/conflicts.c (resolve_sr_conflict): Adjust.
12077
13ca549a
AD
120782001-12-27 Akim Demaille <akim@epita.fr>
12079
12080 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
12081
5092aba5
AD
120822001-12-27 Akim Demaille <akim@epita.fr>
12083
12084 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
12085 * src/print.c: here.
12086 (lookaheadset, shiftset): New, used as additional storage by
12087 print_reductions.
12088 (print_results): Adjust.
12089 (print_shifts, print_gotos, print_errs): New, extracted from...
12090 (print_actions): here.
12091 * src/print_graph.c (print_actions): Remove dead code.
12092
11e2beca
AD
120932001-12-27 Akim Demaille <akim@epita.fr>
12094
12095 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
12096 `$n' and `@n'.
12097
dac3c910
AD
120982001-12-27 Akim Demaille <akim@epita.fr>
12099
12100 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
12101 (build_relations): Adjust.
12102
d0b0fefa
AD
121032001-12-27 Akim Demaille <akim@epita.fr>
12104
12105 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
12106 duplication.
12107
adc8c848
AD
121082001-12-27 Akim Demaille <akim@epita.fr>
12109
12110 * src/reader.c (packgram): Catch nitems overflows.
12111
14d293ac
AD
121122001-12-27 Akim Demaille <akim@epita.fr>
12113
12114 * src/files.c, src/files.h (guard_obstack): Remove.
12115 * src/output.c (output): Adjust.
12116 * src/reader.c (parse_braces): New, factoring...
12117 (copy_action, copy_guard): these two which are renamed as...
12118 (parse_action, parse_guard): these.
12119 As a voluntary consequence, using braces around guards is now
12120 mandatory.
12121
f499b062
AD
121222001-12-27 Akim Demaille <akim@epita.fr>
12123
12124 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
12125 * src/reader.c (symbol_list): `guard' and `guard_line' are new
12126 members.
12127 (symbol_list_new): Adjust.
12128 (copy_action): action_line is the first line, not the last.
12129 (copy_guard): Just as for actions, store the `action' only, not
12130 the switch/case/break flesh.
12131 Don't parse the user action that might follow the guard, let...
12132 (readgram): do it, i.e., now, there can be an action after a
12133 guard.
12134 In other words the guard is just explicitly optional.
12135 (packgram): Adjust.
12136 * src/output.c (guards_output): New.
12137 (output_parser): Call it when needed.
12138 (output): Also free the guard and attrs obstacks.
12139 * src/files.c, src/files.h (obstack_save): Remove.
12140 (output_files): Remove.
12141 As a result, if one needs the former `.act' file, using an
12142 appropriate skeleton which requires actions and guards is now
12143 required.
12144 * src/main.c (main): Adjust.
12145 * tests/semantic.at: New.
12146 * tests/regression.at: Use `input.y' as input file name.
12147 Avoid 8+3 problems by requiring input.c when the test needs the
12148 parser.
12149
d945f5cd
AD
121502001-12-27 Akim Demaille <akim@epita.fr>
12151
12152 * src/reader.c (symbol_list_new): Be sure to initialize all the
12153 fields.
12154
d200e455
AD
121552001-12-27 Akim Demaille <akim@epita.fr>
12156
12157 All the hacks using a final pseudo state are now useless.
12158
12159 * src/LR0.c (set_state_table): state_table holds exactly nstates.
12160 * src/lalr.c (nLA): New.
12161 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
12162 instead of lookaheadsp from the pseudo state (nstate + 1).
12163
f9507c28
AD
121642001-12-27 Akim Demaille <akim@epita.fr>
12165
12166 * src/output.c (action_row, token_actions): Use a state_t instead
12167 of a integer, and nlookaheads instead of the following state's
12168 lookaheadsp.
12169
065fbd27
AD
121702001-12-27 Akim Demaille <akim@epita.fr>
12171
12172 * src/conflicts.c (log_resolution, flush_shift)
12173 (resolve_sr_conflict, set_conflicts, solve_conflicts)
12174 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
12175 (conflicts_print, print_reductions): Use a state_t instead of an
12176 integer when referring to a state.
12177 As much as possible, depend upon nlookaheads, instead of the
12178 `lookaheadsp' member of the following state (since lookaheads of
12179 successive states are successive, the difference between state n + 1
12180 and n served as the number of lookaheads for state n).
12181 * src/lalr.c (add_lookback_edge): Likewise.
12182 * src/print.c (print_core, print_actions, print_state)
12183 (print_results): Likewise.
12184 * src/print_graph.c (print_core, print_actions, print_state)
12185 (print_graph): Likewise.
12186 * src/conflicts.h: Adjust.
12187
1b177bd7
AD
121882001-12-27 Akim Demaille <akim@epita.fr>
12189
12190 * src/bison.hairy: Formatting/comment changes.
12191 ANSIfy.
12192 Remove `register' indications.
12193 Add plenty of `static'.
12194
7742ddeb
AD
121952001-12-27 Akim Demaille <akim@epita.fr>
12196
12197 * src/output.c (prepare): Drop the muscle `ntbase' which
12198 duplicates ntokens.
12199 * src/bison.simple: Formatting/comment changes.
12200 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
12201 is an undocumented synonym.
12202
1fa14068
AD
122032001-12-22 Akim Demaille <akim@epita.fr>
12204
12205 * src/output.c (output_table_data): Change the prototype to use
12206 `int' for array ranges: some invocations do pass an int, not a
12207 short.
12208 Reported by Wayne Green.
12209
b9752825
AD
122102001-12-22 Akim Demaille <akim@epita.fr>
12211
12212 Some actions of web2c.y are improperly triggered.
12213 Reported by Mike Castle.
12214
12215 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
12216 * tests/regression.at (Web2c): Rename as...
12217 (Web2c Report): this.
12218 (Web2c Actions): New.
12219
776209d6
AD
122202001-12-22 Akim Demaille <akim@epita.fr>
12221
12222 Reductions in web2c.y are improperly reported.
12223 Reported by Mike Castle.
12224
12225 * src/conflicts.c (print_reductions): Fix.
12226 * tests/regression.at (Web2c): New.
12227
275fc3ad
AD
122282001-12-18 Akim Demaille <akim@epita.fr>
12229
12230 Some host fail on `assert (!"foo")', which expands to
12231 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
12232 Reported by Nelson Beebee.
12233
12234 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
12235 `#define it_succeeded 0' and `assert (it_succeeded)'.
12236
897668ee
MA
122372001-12-17 Marc Autret <autret_m@epita.fr>
12238
12239 * src/bison.simple: Don't hard code the skeleton line and filename.
12240 * src/output.c (output_parser): Rename 'line' as 'output_line'.
12241 New line counter 'skeleton_line' (skeleton-line muscle).
12242
ab3399e0
PE
122432001-12-17 Paul Eggert <eggert@twinsun.com>
12244
12245 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
12246 YYDEBUG must be defined to a nonzero value.
12247
12248 * src/bison.simple (yytname): Do not assume that the user defines
12249 YYDEBUG to a properly parenthesized expression.
12250
3877f72b
AD
122512001-12-17 Akim Demaille <akim@epita.fr>
12252
12253 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
12254 nlookaheads is a new member.
12255 Adjust all users.
12256 * src/lalr.h (nlookaheads): Remove this orphan declaration.
12257 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
12258 state.
776209d6 12259
331dbc1b
AD
122602001-12-17 Akim Demaille <akim@epita.fr>
12261
12262 * src/files.h, src/files.c (open_files, close_files): Remove.
12263 * src/main.c (main): Don't open/close files, nor invoke lex_free,
12264 let...
12265 * src/reader.c (reader): Do it.
776209d6 12266
be750e4c
AD
122672001-12-17 Akim Demaille <akim@epita.fr>
12268
12269 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 12270
709ae8c6
AD
122712001-12-17 Akim Demaille <akim@epita.fr>
12272
12273 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
12274 (flush_reduce): New.
12275 (resolve_sr_conflict): Adjust.
776209d6 12276
f87685c3
AD
122772001-12-17 Akim Demaille <akim@epita.fr>
12278
12279 * src/output.c (output_obstack): Be static and rename as...
12280 (format_obstack): this, to avoid any confusion with files.c's
12281 output_obstack.
12282 * src/reader.h (muscle_obstack): Move to...
12283 * src/output.h: here, since it's defined in output.c.
12284
837491d8
AD
122852001-12-17 Akim Demaille <akim@epita.fr>
12286
12287 * src/output.c (action_row, save_column, default_goto)
12288 (sort_actions, matching_state, pack_vector): Better variable
12289 locality.
12290
796d61fb
AD
122912001-12-17 Akim Demaille <akim@epita.fr>
12292
12293 * src/output.c: Various formatting changes.
776209d6 12294
64d15509
AD
122952001-12-17 Akim Demaille <akim@epita.fr>
12296
12297 * src/files.c (output_files): Free the output_obstack.
12298 * src/main.c (main): Call print and print_graph conditionally.
12299 * src/print.c (print): Work unconditionally.
12300 * src/print_graph.c (print_graph): Work unconditionally.
12301 * src/conflicts.c (log_resolution): Output only if verbose_flag.
12302
fbc8ecb7
MA
123032001-12-16 Marc Autret <autret_m@epita.fr>
12304
12305 * src/output.c (actions_output): Fix. When we use %no-lines,
12306 there is one less line per action.
12307
f0440388
MA
123082001-12-16 Marc Autret <autret_m@epita.fr>
12309
12310 * src/bison.simple: Remove a useless #line directive.
12311 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
12312 * src/output.c (get_lines_number): New.
776209d6 12313 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
12314 output muscles.
12315 Fix line numbering.
12316 (actions_output): Computes the number of lines taken by actions.
12317 (output_master_parser): Insert new skeleton which is the name of
12318 the output parser file name.
12319
a79986b8
MA
123202001-12-15 Marc Autret <autret_m@epita.fr>
12321
12322 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
12323
4ec8e00f
MA
123242001-12-15 Marc Autret <autret_m@epita.fr>
12325
12326 * src/output.c (output_gram): Keep track of the hairy one.
12327
1a4648ff
AD
123282001-12-15 Akim Demaille <akim@epita.fr>
12329
12330 Make `make distcheck' work.
12331
12332 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
12333 system.h which uses libgettext.h.
12334
9c2c67e6
AD
123352001-12-15 Akim Demaille <akim@epita.fr>
12336
12337 * src/nullable.c (set_nullable): Useless rules must be skipped,
12338 otherwise, since we range over their symbols, we might look at a
12339 nonterminal which no longer ``exists'', i.e., it is not counted in
12340 `nvars', hence we overflow our arrays.
12341
93ede233
AD
123422001-12-15 Akim Demaille <akim@epita.fr>
12343
12344 The header can also be produced directly, without any obstack!
12345 Yahoo!
12346
12347 * src/files.c, src/files.h (defines_obstack): Remove.
12348 (compute_header_macro): Global.
12349 (defines_obstack_save): Remove.
12350 * src/reader.c (parse_union_decl): No longer output to
12351 defines_obstack: its content can be found in the `stype' muscle
12352 anyway.
12353 (output_token_translations): Merge into...
12354 (symbols_output): this.
12355 Rename as...
12356 (symbols_save): this.
12357 (reader): Adjust.
12358 * src/output.c (header_output): New.
12359 (output): Call it.
12360
2666f928
AD
123612001-12-15 Akim Demaille <akim@epita.fr>
12362
12363 * src/reader.c (parse_union_decl): Instead of handling two obstack
12364 simultaneously, use one to define the `stype' muscle, and use the
12365 value of the latter to fill defines_obstack.
12366 (copy_comment): Remove.
12367 (copy_comment2): Work for a single obstack.
12368 Rename as...
12369 (copy_comment): this.
12370
428046f8
AD
123712001-12-15 Akim Demaille <akim@epita.fr>
12372
12373 * src/lex.c, src/lex.h (xgetc): No longer static.
12374 * src/reader.c (parse_union_decl): Revamp.
12375
ea52d706
AD
123762001-12-15 Akim Demaille <akim@epita.fr>
12377
12378 Still making progress in separating Bison into (i) input, (ii)
12379 process, (iii) output: now we can directly output the parser file
12380 without using table_obstack at all.
12381
12382 * src/files.c, src/files.h (table_obstack): Bye bye.
12383 (parser_file_name): New.
12384 * src/files.c (compute_output_file_names): Compute it.
12385 * src/output.c (actions_output, output_parser)
12386 (output_master_parser): To a file instead of an obstack.
12387
3f96f4dc
AD
123882001-12-15 Akim Demaille <akim@epita.fr>
12389
12390 Attach actions to rules, instead of pre-outputting them to
12391 actions_obstack.
12392
12393 * src/gram.h (rule_t): action and action_line are new members.
12394 * src/reader.c (symbol_list): Likewise.
12395 (copy_action): Save the actions within the rule.
12396 (packgram): Save them in rule_table.
12397 * src/output.c (actions_output): New.
12398 (output_parser): Use it on `%%actions'.
12399 (output_rule_data): Don't free rule_table.
12400 (output): Do it.
12401 (prepare): Don't save the `action' muscle.
12402 * src/bison.simple: s/%%action/%%actions/.
12403
51576fb3
AD
124042001-12-15 Akim Demaille <akim@epita.fr>
12405
12406 * src/reader.c (copy_action): When --yacc, don't append a `;'
12407 to the user action: let it fail if lacking.
dee049eb 12408 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 12409
2648a72d
AD
124102001-12-14 Akim Demaille <akim@epita.fr>
12411
12412 * src/lex.c (literalchar): Simply return the char you decoded, non
12413 longer mess around with obstacks and int pointers.
12414 Adjust all callers.
12415
92790e5b
AD
124162001-12-14 Akim Demaille <akim@epita.fr>
12417
12418 * src/lex.c (literalchar): Don't escape the special characters,
12419 just decode them, and keep them as char (before, eol was output as
12420 the 2 char string `\n' etc.).
12421 * src/output.c (output_rule_data): Use quotearg to output the
12422 token strings.
12423
927c1557
PE
124242001-12-13 Paul Eggert <eggert@twinsun.com>
12425
12426 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
12427 Do not infringe on the global user namespace when using C++.
12428 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
12429 All uses of `fprintf' and `stderr' changed.
12430
12431 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
12432
ed8e1f68
AD
124332001-12-13 Akim Demaille <akim@epita.fr>
12434
12435 The computation of nullable is broken: it doesn't handle empty
12436 RHS's properly.
12437
12438 * tests/torture.at (GNU AWK Grammar): New.
12439 * tests/sets.at (Nullable): New.
12440 * src/nullable.c (set_nullable): Instead of blindly looping over
12441 `ritems', loop over the rules, and then over their rhs's.
12442
12443 Work around Autotest bugs.
12444
12445 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
12446 frame, because Autotest understand lines starting with a `+' as
12447 traces from the shell. Then, they are not processed properly.
12448 Admittedly an Autotest bug, but we don't have time to wait for
12449 Autotest to catch up.
12450 * tests/regression.at (Broken Closure): Adjust to the new table
12451 frames.
12452 Move to...
12453 * tests/sets.at: here.
12454
cb581495
AD
124552001-12-13 Akim Demaille <akim@epita.fr>
12456
12457 * src/closure.c (closure): Use nrules instead of playing tricks
12458 with BITS_PER_WORD.
12459
2e729273
AD
124602001-12-13 Akim Demaille <akim@epita.fr>
12461
12462 * src/print.c (print_actions): Output the handling of `$' as the
12463 traces do: shifting the token EOF. Before EOF was treated as a
12464 nonterminal.
12465 * tests/regression.at: Adjust some tests.
12466 * src/print_graph.c (print_core): Complete the set of items via
12467 closure. The next-to-final and final states are still unsatisfying,
12468 but that's to be addressed elsewhere.
12469 No longer output the rule numbers, but do output the state number.
12470 A single loop for the shifts + gotos is enough, but picked a
12471 distinct color for each.
12472 (print_graph): Initialize and finalize closure.
12473
107f7dfb
AD
124742001-12-13 Akim Demaille <akim@epita.fr>
12475
12476 * src/reader.c (readgram): Remove dead code, an strip useless
12477 braces.
12478 (get_type): Remove, unused.
12479
9b53a24f
AD
124802001-12-12 Akim Demaille <akim@epita.fr>
12481
12482 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
12483 on that of lib/error.c.
12484
dbfb6dcd
AD
124852001-12-12 Akim Demaille <akim@epita.fr>
12486
12487 Some hosts don't like `/' in includes.
12488
12489 * src/system.h: Include libgettext.h without qualifying the path.
12490 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
12491 $(top_srcdir).
12492
c25fb648
MA
124932001-12-11 Marc Autret <autret_m@epita.fr>
12494
12495 * src/output.c (output_parser): Remove useless muscle.
12496
710ddc4f
MA
124972001-12-11 Marc Autret <autret_m@epita.fr>
12498
12499 * src/bison.simple: Remove #line just before %%epilogue. It
12500 is now handled in ...
12501 * src/reader.c (read_additionnal_code): Add the output of a
12502 #line for the epilogue.
12503
e83d80b8
MA
125042001-12-10 Marc Autret <autret_m@epita.fr>
12505
927c1557 12506 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
12507 replace precedent remove.
12508 * src/bison.simple: Remove #line before %%prologue because
12509 %%input-line is wrong at this time.
12510
971d5158
MA
125112001-12-10 Marc Autret <autret_m@epita.fr>
12512
12513 * src/reader.c (symbols_output): Clean up.
927c1557 12514 * src/output.c (output_gram, output): Clean up.
971d5158 12515
5edafffd
AD
125162001-12-10 Akim Demaille <akim@epita.fr>
12517
12518 * src/lalr.c (initialize_lookaheads): New. Extracted from...
12519 * src/LR0.c (set_state_table): here.
12520 * src/lalr.c (lalr): Call it.
12521
0279f8e9
AD
125222001-12-10 Akim Demaille <akim@epita.fr>
12523
12524 * src/state.h (shifts): Remove the `number' member: shifts are
12525 attached to state, hence no longer need to be labelled with a
12526 state number.
12527
190c4f5f
AD
125282001-12-10 Akim Demaille <akim@epita.fr>
12529
12530 Now that states have a complete set of members, the linked list of
12531 shifts is useless: just fill directly the state's shifts member.
12532
12533 * src/state.h (shifts): Remove the `next' member.
12534 * src/LR0.c (first_state, last_state): Remove.
12535 Adjust the callers.
12536 (augment_automaton): Don't look for the shifts that must be added
12537 a shift on EOF: it is those of the state we looked for! But now,
12538 since shifts are attached, it is no longer needed to looking
12539 merely by its id: its number.
12540
2a73b93d
AD
125412001-12-10 Akim Demaille <akim@epita.fr>
12542
12543 * src/LR0.c (augment_automaton): Better variable locality.
12544 Remove an impossible branch: if there is a state corresponding to
12545 the start symbol being shifted, then there is shift for the start
12546 symbol from the initial state.
12547
74392f6a
AD
125482001-12-10 Akim Demaille <akim@epita.fr>
12549
12550 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
12551 only when appropriate: when insert_start_shifting_state' is not
12552 invoked.
12553 * tests/regression.at (Rule Line Numbers): Adjust.
12554
37c82725
AD
125552001-12-10 Akim Demaille <akim@epita.fr>
12556
12557 * src/LR0.c (augment_automaton): Now that all states have shifts,
12558 merge the two cases addition shifts to the initial state.
12559
6a164e0c
AD
125602001-12-10 Akim Demaille <akim@epita.fr>
12561
12562 * src/lalr.c (set_state_table): Move to...
12563 * src/LR0.c: here.
12564 * src/lalr.c (lalr): Don't call it...
12565 * src/LR0.c (generate_states): do it.
12566 * src/LR0.h (first_state): Remove, only the table is used.
12567
7215de24
AD
125682001-12-10 Akim Demaille <akim@epita.fr>
12569
12570 * src/LR0.h (first_shift, first_reduction): Remove.
12571 * src/lalr.c: Don't use first_shift: find shifts through the
12572 states.
12573
80e25d4d
AD
125742001-12-10 Akim Demaille <akim@epita.fr>
12575
12576 * src/LR0.c: Attach shifts to states as soon as they are
12577 computed.
12578 * src/lalr.c (set_state_table): Instead of assigning shifts to
12579 state, just assert that the mapping was properly done.
12580
0ab3728b
AD
125812001-12-10 Akim Demaille <akim@epita.fr>
12582
12583 * src/LR0.c (insert_start_shift): Rename as...
12584 (insert_start_shifting_state): this.
12585 (insert_eof_shifting_state, insert_accepting_state): New.
12586 (augment_automaton): Adjust.
12587 Better locality of the variables.
12588 When looking if the start_symbol is shifted from the initial
12589 state, using `while (... symbol != start_symbol ...)' sounds
12590 better than `while (... symbol < start_symbol ...)': If fail
12591 to see how the order between symbols could be relevant!
12592
78af9bbc
AD
125932001-12-10 Akim Demaille <akim@epita.fr>
12594
12595 * src/getargs.h: Don't declare `spec_name_prefix' and
12596 `spec_file_prefix', declared by src/files.h.
12597 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
12598 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
12599 * src/output.c (prepare): Adjust.
12600 * src/reader.c (symbols_output): Likewise.
12601 * src/vmsgetargs.c: Vaguely adjust, but who cares?
12602
bdef2a41
AD
126032001-12-10 Akim Demaille <akim@epita.fr>
12604
12605 * src/muscle_tab.c (muscle_init): NULL is a better default than
12606 `"0"'.
12607
3735969c
AD
126082001-12-10 Akim Demaille <akim@epita.fr>
12609
12610 * src/reader.c (reader): Calling symbols_output once is enough.
12611
49701457
AD
126122001-12-10 Akim Demaille <akim@epita.fr>
12613
12614 Now that states have a complete set of members, the linked list of
12615 reductions is useless: just fill directly the state's reductions
12616 member.
12617
12618 * src/state.h (struct reductions): Remove member `number' and
12619 `next'.
12620 * src/LR0.c (first_reduction, last_reduction): Remove.
12621 (save_reductions): Don't link the new reductions, store them in
12622 this_state.
12623 * src/lalr.c (set_state_table): No need to attach reductions to
12624 states, it's already done.
12625 * src/output.c (output_actions): No longer free the shifts, then
12626 the reductions, then the states: free all the states and their
12627 members.
12628
0edad749
AD
126292001-12-10 Akim Demaille <akim@epita.fr>
12630
12631 * src/options.c (OPTN, DRTV, BOTH): New.
12632 (option_table): Use them.
12633
0edad749
AD
12634 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
12635 the job of system.h.
12636 * src/options.c: Don't include stdio.h and xalloc.h for the same
12637 reasons.
12638
5449dd0f
AD
126392001-12-10 Akim Demaille <akim@epita.fr>
12640
12641 * src/output.c (output, prepare): Make sure the values of the
12642 muscles `action' and `prologue' are 0-terminated.
12643
a870c567
AD
126442001-12-10 Akim Demaille <akim@epita.fr>
12645
12646 Clean up GCC warnings.
12647
12648 * src/reader.c (copy_action): `buf' is not used.
12649 (parse_skel_decl): Be static.
12650 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
12651 * src/options.h (create_long_option_table): Have a real prototype.
12652 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
12653 (hash_delete_at): Return const void *.
12654 Adjust casts to preserve the const.
12655
80df8768
AD
126562001-12-10 Akim Demaille <akim@epita.fr>
12657
12658 * configure.in: Require 2.52g.
12659 M4 is not needed, but AUTOM4TE is.
12660 * m4/m4.m4: Remove.
12661 * tests/Makefile.am: Adjust.
12662
f693ad14
AD
126632001-12-10 Akim Demaille <akim@epita.fr>
12664
12665 One structure for states is enough, even though theoretically
12666 there are LR(0) states and LALR(1) states.
12667
12668 * src/lalr.h (state_t): Remove.
12669 (state_table): Be state_t **, not state_t *.
12670 * src/state.h (core, CORE_ALLOC): Rename as...
12671 (state_t, STATE_ALLOC): this.
12672 Add the LALR(1) members: shifts, reductions, errs.
12673 * src/LR0.c (state_table): Rename as...
12674 (state_hash): this, to avoid name clashes with the global
12675 `state_table'.
12676 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
12677 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
12678
74ffbcb6
AD
126792001-12-10 Akim Demaille <akim@epita.fr>
12680
12681 Bison dumps core on bash.y.
12682 Reported by Pascal Bart.
12683
12684 * src/warshall.c (bitmatrix_print): New.
12685 (TC): Use it.
ba0fe3c7 12686 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
12687 j must be the outer loop.
12688 * tests/regression.at (Broken Closure): New.
12689
07708e19
AD
126902001-12-05 Akim Demaille <akim@epita.fr>
12691
12692 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
12693 its argument.
ba1ecc07 12694 Reported by Peter Hamorsky.
07708e19 12695
92b16366
AD
126962001-12-05 Akim Demaille <akim@epita.fr>
12697
12698 * src/conflicts.c (err_table): Remove.
12699 (resolve_sr_conflict): Adjust.
12700 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
12701 Rename as...
12702 (state_t.reductions, state_t.shifts): this.
12703
076ab033
AD
127042001-12-05 Akim Demaille <akim@epita.fr>
12705
12706 * src/reduce.c (reduce_grammar_tables): No longer disable the
12707 removal of useless rules via CPP but via `if (0)', so that the
12708 compiler still check the code is valid.
12709 For instance, it should have noticed `rline' no longer exists: use
12710 the `line' member of rule_t.
12711 * src/gram.c (dummy, rline): Remove, unused.
12712
3843c413
AD
127132001-12-05 Akim Demaille <akim@epita.fr>
12714
12715 * src/output.c (pack_vector): Use assert, not berror.
12716 * src/main.c (berror): Remove, unused.
12717
43168960
AD
127182001-12-05 Akim Demaille <akim@epita.fr>
12719
12720 New experimental feature: if --verbose --trace output all the
12721 items of a state, not only its kernel.
12722
12723 * src/print.c (print_core): If `trace_flag', then invoke closure
12724 before outputting the items of the state (print_core is no longer
12725 a correct name them).
12726 (print_results): Invoke new_closure/free_closure if needed.
12727
b2872512
AD
127282001-12-05 Akim Demaille <akim@epita.fr>
12729
12730 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
12731 * src/closure.c, src/closure.h (itemsetsize): Rename as...
12732 (nitemset): for consistency with the rest of the project.
12733
23cbcc6c
AD
127342001-12-05 Akim Demaille <akim@epita.fr>
12735
12736 * src/closure.c (print_closure): Improve.
12737 (closure): Use it for printing input and output.
12738
03ec521c
AD
127392001-12-05 Akim Demaille <akim@epita.fr>
12740
12741 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
12742 indexed by nonterminals.
12743
3a7456dd
AD
127442001-12-05 Akim Demaille <akim@epita.fr>
12745
12746 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
12747 what it was!).
12748 * src/warshall.h: Remove accidental duplication of the content.
12749
1cbcf2e7
AD
127502001-12-05 Akim Demaille <akim@epita.fr>
12751
12752 * src/closure.c (set_fderives): De-obfuscate.
12753
84182270
AD
127542001-12-05 Akim Demaille <akim@epita.fr>
12755
12756 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
12757
3f6f053c
AD
127582001-12-05 Akim Demaille <akim@epita.fr>
12759
12760 * src/closure.c (set_firsts): De-obfuscate.
12761
7a5350ba
AD
127622001-12-05 Akim Demaille <akim@epita.fr>
12763
12764 * src/output.c (action_row): De-obfuscate
12765 using the good o' techniques: arrays not pointers, variable
12766 locality, BITISSET, RESETBIT etc.
12767
d954473d
AD
127682001-12-05 Akim Demaille <akim@epita.fr>
12769
12770 Pessimize the code to simplify it: from now on, all the states
12771 have a valid SHIFTS, which NSHIFTS is possibly 0.
12772
12773 * src/LR0.c (shifts_new): Be global and move to..
12774 * src/state.c, src/state.h: here.
12775 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
12776 * src/print_graph: Adjust.
12777
9839bbe5
AD
127782001-12-05 Akim Demaille <akim@epita.fr>
12779
12780 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
12781 * src/conflicts.c: Use it.
12782 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
12783 incorrectly ``simplified''.
12784
9f136c07
AD
127852001-12-05 Akim Demaille <akim@epita.fr>
12786
12787 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
12788 using the good o' techniques: arrays not pointers, variable
12789 locality, BITISSET, RESETBIT etc.
12790
b608206e
AD
127912001-12-05 Akim Demaille <akim@epita.fr>
12792
12793 * src/state.h (SHIFT_SYMBOL): New.
12794 * src/conflicts.c: Use it to deobfuscate.
12795
52afa962
AD
127962001-12-05 Akim Demaille <akim@epita.fr>
12797
12798 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
12799 (print_reductions): De-obfuscate using the good o' techniques:
12800 arrays not pointers, variable locality, BITISSET.
12801
e74dc321
AD
128022001-12-05 Akim Demaille <akim@epita.fr>
12803
12804 * src/conflicts.c (print_reductions): Arrays, not pointers.
12805 Use BITISSET.
12806
768fca83
AD
128072001-12-05 Akim Demaille <akim@epita.fr>
12808
12809 * src/conflicts.c (print_reductions): Pessimize, but clarify.
12810
a17e599f
AD
128112001-12-05 Akim Demaille <akim@epita.fr>
12812
12813 * src/conflicts.c (print_reductions): Improve variable locality.
12814
a04bc341
AD
128152001-12-05 Akim Demaille <akim@epita.fr>
12816
12817 * src/conflicts.c (print_reductions): Pessimize, but clarify.
12818
c8ea038e
AD
128192001-12-05 Akim Demaille <akim@epita.fr>
12820
12821 * src/conflicts.c (print_reductions): Improve variable locality.
12822
aa2aab3c
AD
128232001-12-05 Akim Demaille <akim@epita.fr>
12824
12825 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
12826 * src/lalr.c: Use them.
12827
b178c8cc
AD
128282001-12-05 Akim Demaille <akim@epita.fr>
12829
12830 * src/LR0.c (augment_automaton): Formatting changes.
12831 Better variable locality.
12832
f67d13aa
AD
128332001-12-05 Akim Demaille <akim@epita.fr>
12834
12835 * src/lalr.c (matrix_print): New.
12836 (transpose): Use it.
12837 Use arrays instead of pointers.
12838
c2713865
AD
128392001-12-05 Akim Demaille <akim@epita.fr>
12840
12841 * src/lalr.c (maxrhs): Move to...
12842 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
12843 * src/lalr.c (build_relations): Adjust.
12844
9887c18a
AD
128452001-12-05 Akim Demaille <akim@epita.fr>
12846
12847 * src/lalr.c (transpose): Free the memory allocated to the
12848 argument, as it is replaced by the results by the unique caller.
12849 (build_relations): Merely invoke transpose: it handles the memory
12850 deallocation.
12851 Improve variable locality.
12852 Avoid variables used as mere abbreviations.
12853 (compute_lookaheads): Use arrays instead of pointers.
12854
4d4f699c
AD
128552001-12-05 Akim Demaille <akim@epita.fr>
12856
12857 * src/lalr.c (initialize_F): Improve variable locality.
12858 Avoid variables used as mere abbreviations.
12859
80a69750
AD
128602001-12-05 Akim Demaille <akim@epita.fr>
12861
12862 * src/derives.c (print_derives): Display the ruleno.
12863 * src/lalr.c (initialize_F, transpose): Better variable locality
12864 to improve readability.
12865 Avoid variables used as mere abbreviations.
12866
fe961097
AD
128672001-12-05 Akim Demaille <akim@epita.fr>
12868
12869 * src/lalr.c (traverse): Use arrays instead of pointers.
12870
e3e4e814
AD
128712001-12-05 Akim Demaille <akim@epita.fr>
12872
12873 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
12874 the handling of squeue.
12875 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12876
630e182b
AD
128772001-12-05 Akim Demaille <akim@epita.fr>
12878
12879 Because useless nonterminals are now kept alive (instead of being
12880 `destroyed'), we now sometimes examine them, and store information
12881 related to them. Hence we need to know their number, and adjust
12882 memory allocations.
12883
12884 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
12885 static.
12886 * src/LR0.c (allocate_itemsets): The memory allocated to
12887 `symbol_count' was used for two different purpose: once to count
12888 the number of occurrences of each symbol, and later reassigned to
12889 `shift_symbol', containing the symbol that can be shifted from a
12890 given state.
12891 Deobfuscate, i.e., allocate, use and free `symbol_count' here
12892 only, and...
12893 (new_itemsets): Allocate `shift_symbol' here.
12894 (allocate_itemsets): symbol_count includes useless nonterminals.
12895 Make room for them.
12896 (free_storage): Use `free', not `XFREE', for pointers that cannot
12897 be null.
12898
81b51460
AD
128992001-12-05 Akim Demaille <akim@epita.fr>
12900
12901 * src/nullable.c (set_nullable): Deobfuscate the handling of
12902 ritem.
12903 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12904
3067fbef
AD
129052001-12-05 Akim Demaille <akim@epita.fr>
12906
12907 * src/gram.c, src/gram.h (ritem_print): New.
12908 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
12909 (This useless function was defined only to work around VMS linkers
12910 that can't handle compilation units with variables only).
12911 * src/reduce.c (dump_grammar): Use it to trace the construction of
12912 ritem.
12913
c2bea5f9
PE
129142001-12-04 Paul Eggert <eggert@twinsun.com>
12915
7d27c823
PE
12916 * src/bison.simple (union yyalloc): Change member names
12917 to be the same as the stack names.
12918 (yyparse): yyptr is now union yyalloc *, not char *.
12919 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
12920 and may generate better code on some machines.
c2bea5f9
PE
12921 (yystpcpy): Use prototype if __STDC__ is defined, not just
12922 if __cplusplus is defined.
35687a9d 12923
2c8a9dfa
AD
129242001-11-30 Akim Demaille <akim@epita.fr>
12925
12926 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
12927 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
12928 Gettext doesn't compile cleanly, and dies with -Werror.
12929 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
12930 Include WARNING_CFLAGS here.
12931 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
12932 before being defined.
12933
f4e421e6
AD
129342001-11-27 Paul Eggert <eggert@twinsun.com>
12935
12936 * lib/quotearg.h (quotearg_n, quotearg_n_style):
12937 First arg is int, not unsigned.
12938 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
12939 (SIZE_MAX, UINT_MAX): New macros.
12940 (quotearg_n_options): Abort if N is negative.
12941 Avoid overflow check on hosts where size_t is 64 bits and int
12942 is 32 bits, as overflow is impossible there.
12943 Fix off-by-one typo that caused unnecessary reallocation.
12944
7093d0f5
AD
129452001-11-29 Paul Eggert <eggert@twinsun.com>
12946
12947 Name space cleanup in generated parser.
12948
12949 * doc/bison.texinfo (Bison Parser): Discuss system headers
12950 and their effect on the user name space.
12951
12952 * src/bison.simple:
12953 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
12954 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
12955 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
12956
12957 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
12958 on user names when possible.
12959
12960 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
12961 Simplify test for whather <alloca.h> exists.
12962
12963 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
12964
12965 (<stdio.h>): Include if YYDEBUG.
12966
12967 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
12968 ! defined (yyoverflow) && ! defined (yymemcpy).
12969
12970 (yymemcpy, yyparse): Rename local variables as needed so that
12971 they all begin with 'yy'.
12972
12973 (yystrlen, yystpcpy): New functions.
12974
12975 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
12976 All uses changed.
12977
12978 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
12979 instead of relying on string.h functions. Use YYSTACK_ALLOC
12980 and YYSTACK_FREE instead of malloc and free.
12981
fd51e5ff
AD
129822001-11-30 Akim Demaille <akim@epita.fr>
12983
12984 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
12985 before their first uses.
12986 (YYBISON, YYPURE): Move to the top of the output.
12987
7d13ff5f
AD
129882001-11-30 Akim Demaille <akim@epita.fr>
12989
12990 * tests/reduce.at (Useless Nonterminals): Fix.
12991
892a3995
AD
129922001-11-30 Akim Demaille <akim@epita.fr>
12993
12994 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
12995 if body instead of `;' to pacify GCC's warnings.
12996
68f1e3ed
AD
129972001-11-30 Akim Demaille <akim@epita.fr>
12998
12999 Instead of mapping the LHS of unused rules to -1, keep the LHS
13000 valid, but flag the rules as invalid.
13001
13002 * src/gram.h (rule_t): `useful' is a new member.
13003 * src/print.c (print_grammar): Adjust.
13004 * src/derives.c (set_derives): Likewise.
13005 * src/reader.c (packgram, reduce_output): Likewise.
13006 * src/reduce.c (reduce_grammar_tables): Likewise.
13007 * tests/reduce.at (Underivable Rules, Useless Rules): New.
13008
d2d1b42b
AD
130092001-11-30 Akim Demaille <akim@epita.fr>
13010
13011 * src/reduce.c (reduce_output): Formatting changes.
13012 * src/print.c (print_results, print_grammar): Likewise.
13013 * tests/regression.at (Rule Line Numbers)
13014 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
13015
760b53a8
AD
130162001-11-30 Akim Demaille <akim@epita.fr>
13017
13018 * src/reduce.c (nonterminals_reduce): Instead of throwing away
13019 useless nonterminals, move them at the end of the symbol arrays.
13020 (reduce_output): Adjust.
13021 * tests/reduce.at (Useless Nonterminals): Adjust.
13022
00238958
AD
130232001-11-30 Akim Demaille <akim@epita.fr>
13024
13025 * src/reduce.c: Various comment/formatting changes.
13026 (nonterminals_reduce): New, extracted from...
13027 (reduce_grammar_tables): here.
13028 (reduce_grammar): Call nonterminals_reduce.
13029
396452de
PE
130302001-11-29 Paul Eggert <eggert@twinsun.com>
13031
13032 * src/bison.simple (YYSTACK_REALLOC): Remove.
13033 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
13034 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
13035 New macros.
13036 (union yyalloc): New type.
13037 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
13038 an arbitrary restriction on hosts where size_t is wider than int.
13039
13040 (yyparse): Don't dump core if alloca or malloc fails; instead, report
13041 a parser stack overflow. Allocate just one block of memory for all
13042 three stacks, instead of allocating three blocks; this typically is
13043 faster and reduces fragmentation.
13044
13045 Do not limit the number of items in the stack to a value that fits
13046 in 'int', as this is an arbitrary limit on hosts with 64-bit
13047 size_t and 32-bit int.
13048
147e184c
MA
130492001-11-29 Marc Autret <autret_m@epita.fr>
13050
13051 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
13052 of defining YYERROR_VERBOSE.
13053 [AT_DATA]: $4 is now out of C declarations in the prologue.
13054
426cf563
MA
130552001-11-28 Marc Autret <autret_m@epita.fr>
13056
13057 * src/reader.c (parse_dquoted_param): New.
13058 (parse_skel_decl): Use it.
13059 * src/lex.h: Add its prototype.
13060 * src/lex.c (literalchar): Become not static.
13061
c7925b99
MA
130622001-11-28 Marc Autret <autret_m@epita.fr>
13063
13064 * src/output.h: And put its extern declaration here.
13065 * src/output.c (error_verbose): Define here.
13066 (prepare): Echo name modification.
13067 * src/getargs.h: Clean its extern declaration.
13068 * src/getargs.c (error_verbose_flag): Remove.
13069 (getargs): Remove case 'e'.
13070 * src/options.c (option_table): 'error-verbose' is now seen as simple
13071 percent option.
13072 Include output.h.
13073
13074 * src/reader.c (read_declarations): Remove case tok_include.
13075 (parse_include_decl): Remove.
13076 * src/lex.h (token_t): Remove tok_include.
13077 * src/options.c (option_table): 'include' is now a simple command line
13078 option.
13079
5b5d1929
MA
130802001-11-28 Marc Autret <autret_m@epita.fr>
13081
13082 * src/bison.simple: Adjust muscle names.
13083 * src/muscle_tab.c (muscle_init): Also rename the muscles.
13084 * src/output.c (prepare): s/_/-/ for the muscles names.
13085 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
13086
8850be4b
MA
130872001-11-28 Marc Autret <autret_m@epita.fr>
13088
13089 * src/bison.simple: Fix debug.
13090 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
13091
4a38e613
AD
130922001-11-28 Akim Demaille <akim@epita.fr>
13093
13094 * src/LR0.c (shifts_new): New.
13095 (save_shifts, insert_start_shift, augment_automaton): Use it.
13096
4b35e1c1
AD
130972001-11-28 Akim Demaille <akim@epita.fr>
13098
13099 * src/closure.c (closure): `b' and `ruleno' denote the same value:
13100 keep ruleno only.
13101
d2b04478
AD
131022001-11-28 Akim Demaille <akim@epita.fr>
13103
13104 * src/closure.c (closure): Instead of looping over word in array
13105 then bits in words, loop over bits in array.
13106
2c4c30aa
AD
131072001-11-28 Akim Demaille <akim@epita.fr>
13108
13109 * src/closure.c (closure): No longer optimize the special case
13110 where all the bits of `ruleset[r]' are set to 0, to make the code
13111 clearer.
13112
576890b7
AD
131132001-11-28 Akim Demaille <akim@epita.fr>
13114
13115 * src/closure.c (closure): `r' and `c' are new variables, used to
13116 de-obfuscate accesses to RULESET and CORE.
13117
cb487d7d
AD
131182001-11-28 Akim Demaille <akim@epita.fr>
13119
13120 * src/reduce.c (reduce_print): Use ngettext.
13121 (dump_grammar): Improve the trace accuracy.
13122
6013d43f
AD
131232001-11-28 Akim Demaille <akim@epita.fr>
13124
13125 * src/reduce.c (dump_grammar): Don't translate trace messages.
13126
cb4956ee
AD
131272001-11-28 Akim Demaille <akim@epita.fr>
13128
13129 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
13130 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
13131 as all tags are free'ed afterwards.
13132 From Enrico Scholz.
13133
648185ab
PE
131342001-11-27 Paul Eggert <eggert@twinsun.com>
13135
13136 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
13137 use alloca when we didn't want to, and vice versa.
13138
68254a03
MA
131392001-11-27 Marc Autret <autret_m@epita.fr>
13140
9113b58f
AD
13141 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
13142 initialization.
68254a03
MA
13143 * src/output.c (prepare): Remove its update.
13144
04d843a2
MA
131452001-11-27 Marc Autret <autret_m@epita.fr>
13146
13147 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
13148 Use %error-verbose.
13149
d2079671 131502001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
13151
13152 * src/bison.simple: Remove YYERROR_VERBOSE using.
13153 Use %%error_verbose.
13154 (yyparse): Likewise.
13155 * src/output.c (prepare): Give its final value.
13156 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
13157 * src/getargs.h: Add its extern declaration.
13158 * src/getargs.c (error_verbose_flag): New int.
13159 (getargs): Update to catch new case.
13160 * src/options.c (option_table): 'error-verbose' is a new option.
13161 (shortopts): Update.
13162
e0327bc8
AD
131632001-11-27 Akim Demaille <akim@epita.fr>
13164
13165 * src/system.h: Use intl/libgettext.h.
13166 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
13167
000f1a3c
AD
131682001-11-27 Akim Demaille <akim@epita.fr>
13169
13170 * tests/torture.at (Exploding the Stack Size with Malloc):
13171 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
13172
26cfe0be
AD
131732001-11-27 Akim Demaille <akim@epita.fr>
13174
13175 * src/files.c: Include error.h.
13176 Reported by Hans Aberg.
13177
f6bd5427
MA
131782001-11-26 Marc Autret <autret_m@epita.fr>
13179
d2079671 13180 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
13181 (read_declarations): Add case tok_include.
13182 * src/getargs.h (include): Add its extern definition.
13183 * src/getargs.c (include): New const char *.
13184 (getargs): Add case '-I'.
13185 * src/options.c (option_table): Add include as command line and
13186 percent option.
13187 * src/lex.h (token_t): Add tok_include.
13188
2ca209c1
AD
131892001-11-26 Akim Demaille <akim@epita.fr>
13190
13191 * src/reader.c (readgram): Make sure rules for mid-rule actions
13192 have a lineno equal to that of their host rule.
13193 Reported by Hans Aberg.
13194 * tests/regression.at (Rule Line Numbers): New.
13195
0e41b407
AD
131962001-11-26 Akim Demaille <akim@epita.fr>
13197
13198 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
13199 size_ts.
13200
132012001-11-26 Akim Demaille <akim@epita.fr>
13202
13203 * src/complain.c, src/complain.h (error): Remove, provided by
13204 lib/error.[ch].
13205
e0c40012
AD
132062001-11-26 Akim Demaille <akim@epita.fr>
13207
13208 * src/reader.c (read_declarations): Don't abort on tok_illegal,
13209 issue an error message.
13210 * tests/regression.at (Invalid %directive): New.
13211 Reported by Hans Aberg.
13212
5e147124
AD
132132001-11-26 Akim Demaille <akim@epita.fr>
13214
13215 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
13216 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
13217
a034c8b8
AD
132182001-11-26 Akim Demaille <akim@epita.fr>
13219
13220 * src/conflicts.c (conflicts_print): Don't complain at all when
13221 there are no reduce/reduce conflicts, and as many shift/reduce
13222 conflicts as expected.
13223 * tests/regression.at (%expect right): Adjust.
13224
c64a20f3
AD
132252001-11-23 Akim Demaille <akim@epita.fr>
13226
13227 * lib/alloca.c: Update, from fileutils.
13228
5b0d29bb
AD
132292001-11-23 Akim Demaille <akim@epita.fr>
13230
13231 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
13232
722c4bfe
AD
132332001-11-23 Akim Demaille <akim@epita.fr>
13234
13235 * src/system.h: Include alloca.h.
13236 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
13237
6255b435
AD
132382001-11-23 Akim Demaille <akim@epita.fr>
13239
13240 * src/print_graph.c (print_actions): Remove `rule', unused.
13241 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
13242 pacify GCC's signed < unsigned warnings.
13243 * src/closure.c (itemsetsize): Likewise.
13244 * src/reader.c (symbol_list_new): Static.
13245
b29b2ed5
AD
132462001-11-23 Akim Demaille <akim@epita.fr>
13247
13248 Attaching lineno to buckets is stupid, since only one copy of each
13249 symbol is kept, only the line of the first occurrence is kept too.
13250
13251 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
13252 * src/reader.c (rline_allocated): Remove, unused.
13253 (symbol_list): Have a `line' member.
13254 (symbol_list_new): New.
13255 (readgram): Use it.
13256 * src/print.c (print_grammar): Output the rule line numbers.
13257 * tests/regression.at (Solved SR Conflicts)
13258 (Unresolved SR Conflicts): Adjust.
13259 Reported by Hans Aberg.
13260
a81b1d4a
MA
132612001-11-22 Marc Autret <autret_m@epita.fr>
13262
13263 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
13264
c1ecb3c1
MA
132652001-11-22 Marc Autret <autret_m@epita.fr>
13266
13267 * src/muscle_tab.c (muscle_init): Remove initialization of
13268 skeleton muscle.
13269 * src/output.c (output_master_parser): Do it here.
13270
fbe01355
AD
132712001-11-20 Akim Demaille <akim@epita.fr>
13272
13273 * po/sv.po: New.
13274 * configure.in (ALL_LINGUAS): Adjust.
13275 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
13276 longer contains strings to translate.
13277
81e895c0
AD
132782001-11-19 Akim Demaille <akim@epita.fr>
13279
13280 * src/conflicts.c (conflicts_print): Add a missing \n.
13281
6bb1878b
AD
132822001-11-19 Akim Demaille <akim@epita.fr>
13283
13284 * src/nullable.c (nullable_print): New.
13285 (set_nullable): Call it when tracing.
13286 Better locality of variables.
13287
d9ec2d07
AD
132882001-11-19 Akim Demaille <akim@epita.fr>
13289
13290 * src/print.c (print_actions): Better locality of variables.
13291
720e5c1b
AD
132922001-11-19 Akim Demaille <akim@epita.fr>
13293
13294 * src/derives.c (print_derives): Fix and enrich.
13295 * src/closure.c (print_fderives): Likewise.
13296
fb908786
AD
132972001-11-19 Akim Demaille <akim@epita.fr>
13298
13299 * src/closure.c (itemsetend): Remove, replaced with...
13300 (itemsetsize): new.
13301
125ecb56
AD
133022001-11-19 Akim Demaille <akim@epita.fr>
13303
13304 * src/LR0.c (kernel_end): Remove, replaced with...
13305 (kernel_size): new.
13306
d8cf039f
AD
133072001-11-19 Akim Demaille <akim@epita.fr>
13308
13309 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
13310 to clarify.
13311
7bec0760
AD
133122001-11-19 Akim Demaille <akim@epita.fr>
13313
13314 * src/closure.c (closure): Use arrays instead of pointers to clarify.
13315
c87d4863
AD
133162001-11-19 Akim Demaille <akim@epita.fr>
13317
13318 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
13319 trace messages.
13320 * src/LR0.c: Likewise.
13321 (allocate_itemsets): Use arrays instead of pointers to clarify.
13322
9bfe901c
AD
133232001-11-19 Akim Demaille <akim@epita.fr>
13324
13325 * src/getargs.c (statistics_flag): Replace with...
13326 (trace_flag): New.
13327 (longopts): Accept --trace instead of --statistics.
13328 * src/getargs.h, src/options.c: Adjust.
13329 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
13330 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
13331
97db7bd4
AD
133322001-11-19 Akim Demaille <akim@epita.fr>
13333
cc72668c 13334 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
13335 pointers to clarify the code.
13336 (save_reductions, save_shifts): Factor common parts of alternatives.
13337
2c5f66ed
AD
133382001-11-19 Akim Demaille <akim@epita.fr>
13339
13340 * src/LR0.c (new_state, get_state): Complete TRACE code.
13341 * src/closure.c: Include `reader.h' to get `tags', needed by the
13342 trace code.
13343 Rename the conditional DEBUG as TRACE.
13344 Output consistently TRACEs to stderr, not stdout.
13345 * src/derives.c: Likewise.
13346 * src/reduce.c: (inaccessable_symbols): Using if is better style
13347 than goto.
13348 Use `#if TRACE' instead of `#if 0' for tracing code.
13349
300f275f
AD
133502001-11-19 Akim Demaille <akim@epita.fr>
13351
13352 * src/system.h (LIST_FREE, shortcpy): New.
13353 * src/LR0.c: Use them.
13354 * src/output.c (free_itemsets, free_reductions, free_shifts):
13355 Remove, replaced by LIST_FREE.
13356
f59c437a
AD
133572001-11-19 Akim Demaille <akim@epita.fr>
13358
13359 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
13360 (REDUCTIONS_ALLOC): New.
13361 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
13362 allocation.
13363
6986fd9e
AD
133642001-11-19 Akim Demaille <akim@epita.fr>
13365
13366 * src/LR0.c (new_state): Complete trace code.
13367 * src/nullable.c (set_nullable): Don't translate traces.
13368
4bc30f78
AD
133692001-11-19 Akim Demaille <akim@epita.fr>
13370
13371 * src/print_graph.c (print_core): Better locality of variables.
13372 * src/print.c (print_core): Likewise.
13373
08a946e0
AD
133742001-11-19 Akim Demaille <akim@epita.fr>
13375
13376 * src/vcg.c: You do the output, so you are responsible of the
13377 handling of VCG syntax, in particular: use quotearg.
13378 * src/print_graph.c: Don't.
13379 (print_actions): Don't output the actions as part of the nodes,
13380 since that's the job of the edges.
13381 (print_state): Don't output by hand: fill the node description,
9bfe901c 13382 and ask for its output.
08a946e0 13383
f0473484
AD
133842001-11-19 Akim Demaille <akim@epita.fr>
13385
cc72668c
AD
13386 * src/bison.simple (yyparse): When verbosely reporting an error,
13387 no longer put additional quotes around token names.
f0473484
AD
13388 * tests/calc.at: Adjust.
13389
e41dc700
AD
133902001-11-19 Akim Demaille <akim@epita.fr>
13391
13392 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
13393 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
13394 * src/output.c: Adjust.
13395
652a871c
AD
133962001-11-19 Akim Demaille <akim@epita.fr>
13397
13398 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
13399 (rule_t): this.
13400 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
13401
b2ed6e58
AD
134022001-11-19 Akim Demaille <akim@epita.fr>
13403
13404 * src/gram.h (rule_t): New.
13405 (rule_table): New.
13406 (rrhs, rlhs): Remove, part of state_t.
13407 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
13408 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13409 * src/reader.c, src/reduce.c: Adjust.
13410
edad7067
AD
134112001-11-19 Akim Demaille <akim@epita.fr>
13412
13413 * src/reader.c (symbols_output): New, extracted from...
13414 (packsymbols): Here.
13415 (reader): Call it.
13416
3feec034
AD
134172001-11-19 Akim Demaille <akim@epita.fr>
13418
13419 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
13420 (maxrhs): this new function.
13421
ddcd5fdf
AD
134222001-11-19 Akim Demaille <akim@epita.fr>
13423
cc72668c 13424 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
13425 Adjust.
13426
bb527fc2
AD
134272001-11-19 Akim Demaille <akim@epita.fr>
13428
cc72668c 13429 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
13430 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13431 * src/lalr.c: Adjust.
13432
a845a697
AD
134332001-11-19 Akim Demaille <akim@epita.fr>
13434
13435 * src/lalr.c (initialize_LA): Only initialize LA. Let...
13436 (set_state_table): handle the `lookaheads' members.
13437
f004bf6a
AD
134382001-11-19 Akim Demaille <akim@epita.fr>
13439
cc72668c
AD
13440 * src/lalr.h (lookaheads): Removed array, whose contents is now
13441 a member of...
f004bf6a
AD
13442 (state_t): this structure.
13443 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13444 Adjust.
13445
de326cc0
AD
134462001-11-19 Akim Demaille <akim@epita.fr>
13447
cc72668c
AD
13448 * src/lalr.h (consistent): Removed array, whose contents is now
13449 a member of...
de326cc0
AD
13450 (state_t): this structure.
13451 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13452 Adjust.
13453
90b4416b
AD
134542001-11-19 Akim Demaille <akim@epita.fr>
13455
cc72668c
AD
13456 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
13457 contents are now members of...
90b4416b
AD
13458 (state_t): this structure.
13459 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13460 Adjust.
13461
9703cc49
AD
134622001-11-19 Akim Demaille <akim@epita.fr>
13463
13464 * src/lalr.h (state_t): New.
13465 (state_table): Be a state_t * instead of a core **.
13466 (accessing_symbol): Remove, part of state_t.
13467 * src/lalr.c: Adjust.
13468 (set_accessing_symbol): Merge into...
13469 (set_state_table): this.
13470 * src/print_graph.c, src/conflicts.c: Adjust.
13471
d803322e
AD
134722001-11-14 Akim Demaille <akim@epita.fr>
13473
13474 * tests/calc.at, tests/output.at, tests/regression.at,
13475 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
13476 now the tests are run in private dirs, therefore AC_CLEANUP and
13477 family can be simplified to 0-ary.
13478 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
13479 use abs. path to find config.h.
13480 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
13481 stderr, there can be way too much random noise.
13482 Instead pass -Werror to GCC and rely on the exit status.
13483 Reported by Wolfram Wagner.
13484
3d76b07d
AD
134852001-11-14 Akim Demaille <akim@epita.fr>
13486
13487 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
13488 defined only if yyoverflow is defined, to avoid `warning: unused
13489 variable `yyvs1''.
13490 Reported by The Test Suite.
13491
09b503c8
AD
134922001-11-14 Akim Demaille <akim@epita.fr>
13493
13494 * src/print.c: Include reduce.h.
13495 Reported by Hans Aberg.
13496
134972001-11-14 Akim Demaille <akim@epita.fr>
13498
13499 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
13500 Revert a previous patch: these are really const.
13501 * src/conflicts.c (conflict_report): Additional useless pair of
13502 braces to pacify GCC's warnings for `if () if () {} else {}'.
13503 * src/lex.c (parse_percent_token): Replace equal_offset with
13504 arg_offset.
13505 arg is const.
13506 Be sure to strdup `arg' when used, since there is no reason for
13507 token_buffer not to change.
13508
0f37a994
AD
135092001-11-14 Akim Demaille <akim@epita.fr>
13510
13511 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
13512 definition.
13513 * src/main.c (main): Use them.
13514 Suggested by Hans Aberg.
13515
d39d93b8
AD
135162001-11-12 Akim Demaille <akim@epita.fr>
13517
13518 * src/system.h (ngettext): Now that we use ngettext, be sure to
13519 provide a default definition when NLS are not used.
13520
9edcd895
AD
135212001-11-12 Akim Demaille <akim@epita.fr>
13522
13523 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
13524 Use @kbd to denote user input.
13525 (Language and Grammar): ANSIfy the example.
13526 Adjust its layout for info/notinfo.
13527 (Location Tracking Calc): Output error messages to stderr.
13528 Output locations in a more GNUtically correct way.
13529 Fix a couple of Englishos.
13530 Adjust @group/@end group pairs.
13531
7da99ede
AD
135322001-11-12 Akim Demaille <akim@epita.fr>
13533
e3aa65c5 13534 %expect was not functioning at all.
7da99ede
AD
13535
13536 * src/conflicts.c (expected_conflicts): Set to -1.
13537 (conflict_report): Use ngettext.
13538 (conflicts_print): Check %expect and make its violation an error.
13539 * doc/bison.texinfo (Expect Decl): Adjust.
13540 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
13541 * tests/regression.at (%expect not enough, %expect right)
13542 (%expect too much): New.
13543
ba9dda1a
AD
135442001-11-12 Akim Demaille <akim@epita.fr>
13545
13546 * tests/regression.at (Conflicts): Rename as...
13547 (Unresolved SR Conflicts): this.
13548 (Solved SR Conflicts): New.
13549
337c5bd1
AD
135502001-11-12 Akim Demaille <akim@epita.fr>
13551
13552 * src/reduce.c (print_results): Rename as...
13553 (reduce_output): This.
13554 Output to OUT, passed as argument, instead of output_obstack.
13555 (dump_grammar): Likewise.
13556 (reduce_free): New.
13557 Also free V1.
13558 (reduce_grammar): No longer call reduce_output, since...
13559 * src/print.c (print_results): do it.
13560 * src/main.c (main): Call reduce_free;
13561
c73a41af
AD
135622001-11-12 Akim Demaille <akim@epita.fr>
13563
13564 * src/conflicts.c (print_reductions): Accept OUT as argument.
13565 Output to it, not to output_obstack.
13566 * src/print.c (print_actions): Adjust.
13567
0df87bb6
AD
135682001-11-12 Akim Demaille <akim@epita.fr>
13569
13570 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
13571 the result instead of using...
13572 (src_total, rrc_total, src_count, rrc_count): Remove.
13573 (any_conflicts): Remove.
13574 (print_conflicts): Split into...
13575 (conflicts_print, conflicts_output): New.
13576 * src/conflicts.h: Adjust.
13577 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 13578 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
13579 * tests/regression.at (Conflicts): New.
13580 Reported by Tom Lane.
13581
e4d3d4de
AD
135822001-11-12 Akim Demaille <akim@epita.fr>
13583
13584 * tests/regression.at (Invalid input): Remove, duplicate with
13585 ``Invalid input: 1''.
13586
6d7d248e
AD
135872001-11-12 Akim Demaille <akim@epita.fr>
13588
13589 * tests/torture.at (AT_DATA_STACK_TORTURE)
13590 (Exploding the Stack Size with Alloca)
13591 (Exploding the Stack Size with Malloc): New.
13592
e9e4c321
AD
135932001-11-12 Akim Demaille <akim@epita.fr>
13594
13595 * src/bison.simple (YYSTACK_REALLOC): New.
13596 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 13597 Reported by Per Allansson.
e9e4c321 13598
5f7e0832
AD
135992001-11-12 Pascal Bart <pascal.bart@epita.fr>
13600
13601 * src/bison.simple: Define type yystype instead of YYSTYPE, and
13602 define CPP macro, which substitute YYSTYPE by yystype.
13603 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
13604 with yyltype/YYLTYPE. This allows inclusion of the generated
13605 header within the parser if the compiler, such as GGC, accepts
13606 multiple equivalent #defines.
13607 From Akim.
13608
e3f1699f
AD
136092001-11-05 Akim Demaille <akim@epita.fr>
13610
13611 * src/reader.c (symbols_output): New, extracted from...
13612 (packsymbols): here.
13613 (reader): Adjust.
13614
65be0866
AD
136152001-11-05 Akim Demaille <akim@epita.fr>
13616
13617 * src/lex.c (parse_percent_token): s/quotearg/quote/.
13618
e4d910bf
AD
136192001-11-05 Akim Demaille <akim@epita.fr>
13620
13621 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
13622 pattern.
13623
951366c1
AD
136242001-11-05 Akim Demaille <akim@epita.fr>
13625
13626 * src/options.h (struct option_table_struct): set_flags is void*.
13627 * src/options.c (longopts): Support `--output' and `%output'.
13628 (usage): Adjust.
13629 * src/lex.h (tok_setopt): Remove, replaced with...
13630 (tok_intopt, tok_stropt): these new guys.
13631 * src/lex.c (getopt.h): Not needed.
13632 (token_buffer, unlexed_token_buffer): Not const.
13633 (percent_table): Promote `-' over `_' in directive names.
13634 Active `%name-prefix', `file-prefix', and `output'.
13635 (parse_percent_token): Accept possible arguments to directives.
13636 Promote `-' over `_' in directive names.
13637
d8988b2f
AD
136382001-11-04 Akim Demaille <akim@epita.fr>
13639
13640 * doc/bison.texinfo (Decl Summary): Split the list into
13641 `directives for grammars' and `directives for bison'.
13642 Sort'em.
13643 Add description of `%name-prefix', `file-prefix', and `output'.
13644 Promote `-' over `_' in directive names.
13645 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
13646 Simplify the description of `--name-prefix'.
13647 Promote `-' over `_' in directive names.
13648 Promote `--output' over `--output-file'.
13649 Fix the description of `--defines'.
13650 * tests/output.at: Exercise %file-prefix and %output.
13651
6468d18e
AD
136522001-11-02 Akim Demaille <akim@epita.fr>
13653
13654 * doc/refcard.tex: Update.
13655
6b7e85b9
AD
136562001-11-02 Akim Demaille <akim@epita.fr>
13657
13658 * src/symtab.h (SUNDEF): New.
13659 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
13660 stand for `uninitialized', instead of 0.
13661 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
13662 * src/lex.c (lex): Adjust.
13663
13664 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
13665 Number it 0.
13666 Let yylex return it instead of a plain 0.
13667 Reported by Dick Streefland.
13668
cd5aafcf
AD
136692001-11-02 Akim Demaille <akim@epita.fr>
13670
13671 * tests/regression.at (Mixing %token styles): New test.
13672
037ca2f1
AD
136732001-11-02 Akim Demaille <akim@epita.fr>
13674
13675 * src/reader.c (parse_thong_decl): Formatting changes.
13676 (token_translations_init): New, extracted from...
13677 (packsymbols): Here.
13678 Adjust.
13679
270a173c
AD
136802001-11-01 Akim Demaille <akim@epita.fr>
13681
13682 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
13683 Check that `9foo.y' produces correct cpp guards.
13684 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
13685 guards.
13686 Reported by Wwp.
13687
561f9a30
AD
136882001-11-01 Akim Demaille <akim@epita.fr>
13689
13690 * tests/regression.at (Invalid input: 2): New.
13691 * src/lex.c (unlexed_token_buffer): New.
13692 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
13693 too.
13694 Reported by Wwp.
13695
f987e9d2
AD
136962001-11-01 Akim Demaille <akim@epita.fr>
13697
13698 * tests/calc.at: Catch up with 1.30.
13699 * configure.in: Bump to 1.49a.
13700 Adjust to newer Autotest.
13701
0846f581
PB
137022001-10-19 Pascal Bart <pascal.bart@epita.fr>
13703
13704 * src/conflicts.c: Move global variables rrc_total and src_total ...
13705 (print_conflicts): here.
13706 * src/output.c (output): Free global variable user_toknums.
13707 * src/lex.c (token_obstack): Become static.
13708
3c1a79b3
AD
137092001-10-18 Akim Demaille <akim@epita.fr>
13710
13711 * tests/atlocal.in (GCC): Add.
13712 * tests/calc.at: s/m4_match/m4_bmatch/.
13713 s/m4_patsubst/m4_bpatsubst/.
13714 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
13715 * configure.in: AC_SUBST(GCC).
13716
5d52e7d0
MA
137172001-10-14 Marc Autret <autret_m@epita.fr>
13718
13719 * src/options.c (create_long_option_table): Fix.
13720
631aa1d3
AD
137212001-10-10 Akim Demaille <akim@epita.fr>
13722
13723 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
13724
f6ec6d13
AD
137252001-10-04 Akim Demaille <akim@epita.fr>
13726
13727 * src/reader.c (parse_union_decl): Push the caracters in
13728 union_obstack, not attrs_obstack.
13729
342b8b6e
AD
137302001-10-04 Akim Demaille <akim@epita.fr>
13731
13732 Merge in the branch 1.29.
13733
13734 * src/reader.c (packsymbols): Use a temporary obstack for
13735 `%%tokendef', since output_stack is already used elsewhere.
13736
13737 2001-10-02 Akim Demaille <akim@epita.fr>
13738
13739 Bump 1.29d.
13740
13741 2001-10-02 Akim Demaille <akim@epita.fr>
13742
13743 Version 1.29c.
13744
13745 2001-10-02 Akim Demaille <akim@epita.fr>
13746
13747 * tests/regression.at (Invalid CPP headers): New.
13748 From Alexander Belopolsky.
13749 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
13750
13751 2001-10-02 Akim Demaille <akim@epita.fr>
13752
13753 * tests/regression.at (Invalid input): New.
13754 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
13755 Reported by Shura.
13756
13757 2001-10-02 Akim Demaille <akim@epita.fr>
13758
13759 * tests/calc.at: Now that --debug works, the tests must be adjusted.
13760
13761 2001-10-02 Akim Demaille <akim@epita.fr>
13762
13763 * src/output.c (output_parser): Assert `skeleton'.
13764 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
13765 systems.
13766 From Shura.
13767
13768 2001-10-01 Marc Autret <autret_m@epita.fr>
13769
13770 * src/lex.h: Echo modifications.
13771 * src/lex.c (unlex): Parameter is now token_t.
13772 From Hans Aberg.
13773
13774 2001-10-01 Marc Autret <autret_m@epita.fr>
13775
13776 * src/main.c: Include lex.h.
13777 From Hans Aberg.
13778
13779 2001-09-29 Akim Demaille <akim@epita.fr>
13780
13781 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
13782
13783 2001-09-28 Akim Demaille <akim@epita.fr>
13784
13785 * tests/testsuite.at: Update to newer Autotest.
13786 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
13787
13788 2001-09-27 Akim Demaille <akim@epita.fr>
13789
13790 Position independent wrapper.
13791
13792 * tests/bison: Remove.
13793 * tests/bison.in: New.
13794 * configure.in: Adjust.
13795
13796 2001-09-27 Paul Eggert <eggert@twinsun.com>
13797
13798 Port quotearg fixes from tar 1.13.24.
13799
13800 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
13801 tm to be declared.
13802 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
13803 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
13804
13805 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
13806 * m4/mbrtowc.m4: New file.
13807 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
13808 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
13809
13810 2001-09-27 Akim Demaille <akim@epita.fr>
13811
13812 Bump to 1.29c.
13813
13814 2001-09-27 Akim Demaille <akim@epita.fr>
13815
13816 Version 1.29b.
13817
13818 2001-09-25 Akim Demaille <akim@epita.fr>
13819
13820 * src/system.h: Include `xalloc.h'.
13821 Remove it from the C files.
13822 * src/files.c (output_files): Free the obstacks.
13823 * src/lex.c (init_lex): Rename as...
13824 (lex_init): this.
13825 (lex_free): New.
13826 * src/main.c (main): Use it.
13827
13828 2001-09-24 Marc Autret <autret_m@epita.fr>
13829
13830 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
13831 to output informations in fout (FILE*).
13832 (open_graph, close_graph): Likewise.
13833 (output_graph, output_edge, output_node): Likewise.
13834 * src/vcg.h: Update function prototypes.
13835 * src/print_graph.c (print_graph): Open output graph file.
13836 (print_actions): Adjust.
13837 * src/files.h: Remove extern declaration.
13838 * src/files.c: Remove graph_obstack declaration.
13839 (open_files): Remove graph_obstack initialization.
13840 (output_files): Remove graph_obstack saving.
13841
13842 2001-09-24 Marc Autret <autret_m@epita.fr>
13843
13844 * src/files.c (compute_output_file_names): Fix.
13845
13846 2001-09-24 Marc Autret <autret_m@epita.fr>,
13847 Akim Demaille <akim@epita.fr>
13848
13849 * src/reader.c (reader): Remove call to free_symtab ().
13850 * src/main.c (main): Call it here.
13851 Include symtab.h.
13852 * src/conflicts.c (initialize_conflicts): Rename as...
13853 (solve_conflicts): this.
13854 * src/print.c (print_core, print_actions, print_state)
13855 (print_grammar): Dump to a file instead a `output_obstack'.
13856 (print_results): Dump `output_obstack', and then proceed with the
13857 FILE *.
13858 * src/files.c (compute_output_file_names, close_files): New.
13859 (output_files): Adjust.
13860 * src/main.c (main): Adjust.
13861
13862 2001-09-23 Marc Autret <autret_m@epita.fr>
13863
13864 * src/files.c (compute_header_macro): Computes header macro name
13865 from spec_defines_file when given.
13866
13867 2001-09-23 Marc Autret <autret_m@epita.fr>
13868
13869 * src/files.c (output_files): Add default extensions.
13870
13871 2001-09-22 Akim Demaille <akim@epita.fr>
13872
13873 * src/conflicts.c (finalize_conflicts): Rename as...
13874 (free_conflicts): this.
13875
13876 2001-09-22 Akim Demaille <akim@epita.fr>
13877
13878 * src/gram.c (gram_free): Rename back as...
13879 (dummy): this.
13880 (output_token_translations): Free `token_translations'.
13881 * src/symtab.c (free_symtab): Free the tag field.
13882
13883 2001-09-22 Akim Demaille <akim@epita.fr>
13884
13885 Remove `translations' as it is always set to true.
13886
13887 * src/gram.h: Adjust.
13888 * src/reader.c (packsymbols, parse_token_decl): Adjust
13889 * src/print.c (print_grammar): Adjust.
13890 * src/output.c (output_token_translations): Adjust.
13891 * src/lex.c (lex): Adjust.
13892 * src/gram.c: Be sure the set pointers to NULL.
13893 (dummy): Rename as...
13894 (gram_free): this.
13895
13896 2001-09-22 Akim Demaille <akim@epita.fr>
13897
13898 * configure.in: Invoke AM_LIB_DMALLOC.
13899 * src/system.h: Use dmalloc.
13900 * src/LR0.c: Be sure to have pointers initialized to NULL.
13901 (allocate_itemsets): Allocate kernel_items only if needed.
13902
13903 2001-09-22 Akim Demaille <akim@epita.fr>
13904
13905 * configure.in: Bump to 1.29b.
13906 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
13907 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
13908 need xmalloc.c in calc.y.
13909 From Pascal Bart.
13910
13911 2001-09-21 Akim Demaille <akim@epita.fr>
13912
13913 Version 1.29a.
13914 * Makefile.maint, config/config.guess, config/config.sub,
13915 * config/missing: Update from masters.
13916 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
13917 upon package.m4.
13918 * configure.in (ALL_LINGUAS): Add `tr'.
13919
13920 2001-09-21 Akim Demaille <akim@epita.fr>
13921
13922 * tests/Makefile.am (package.m4): Move to...
13923 ($(srcdir)/$(TESTSUITE)): here.
13924
13925 2001-09-20 Akim Demaille <akim@epita.fr>
13926
13927 * src/complain.c: No longer try to be standalone: use system.h.
13928 Don't assume __STDC__ is defined to 1. Just test if it is defined.
13929 * src/complain.h: Likewise.
13930 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
13931 Remove the unused variable `n'.
13932 From Albert Chin-A-Young.
13933
13934 2001-09-18 Marc Autret <autret_m@epita.fr>
13935
13936 * doc/bison.1: Update.
13937 * doc/bison.texinfo (Bison Options): Update --defines and --graph
13938 descriptions.
13939 (Option Cross Key): Update.
13940 Add --graph.
13941
13942 2001-09-18 Marc Autret <autret_m@epita.fr>
13943
13944 * tests/regression.at: New test (comment in %union).
13945
13946 2001-09-18 Marc Autret <autret_m@epita.fr>
13947
13948 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
13949 do that.
13950 Reported by Keith Browne.
13951
13952 2001-09-18 Marc Autret <autret_m@epita.fr>
13953
13954 * tests/output.at: Add tests for --defines and --graph.
13955
13956 2001-09-18 Marc Autret <autret_m@epita.fr>
13957
13958 * tests/output.at: Removes tests of %{header,src}_extension features.
13959
13960 2001-09-18 Akim Demaille <akim@epita.fr>
13961
13962 * tests/Makefile.am (package.m4): New.
13963 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
13964 (_AT_CHECK_CALC_ERROR): Likewise.
13965 Factor the `, ' part of verbose error messages.
13966
13967 2001-09-18 Marc Autret <autret_m@epita.fr>
13968
13969 * src/getargs.c (longopts): Declare --defines and --graph as options
13970 with optional arguments.
13971 * src/files.h: Add extern declarations.
13972 * src/files.c (spec_graph_file, spec_defines_file): New.
13973 (output_files): Update.
13974 Remove CPP-outed code.
13975
13976 2001-09-18 Marc Autret <autret_m@epita.fr>
13977
13978 Turn off %{source,header}_extension feature.
13979
13980 * src/files.c (compute_exts_from_gf): Update.
13981 (compute_exts_from_src): Update.
13982 (output_files): CPP-out useless code.
13983 * src/files.h: Remove {header,source}_extension extern declarations.
13984 * src/reader.c (parse_dquoted_param): CPP-out.
13985 (parse_header_extension_decl): Remove.
13986 (parse_source_extension_decl): Remove.
13987 (read_declarations): Remove cases tok_{hdrext,srcext}.
13988 * src/lex.c (percent_table): Remove {header,source}_extension entries.
13989 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
13990
13991 2001-09-10 Akim Demaille <akim@epita.fr>
13992
13993 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
13994 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
13995 (AT_CHECK_OUTPUT): this.
13996 Merely check ls' exit status, its output is useless.
13997
13998 2001-09-10 Akim Demaille <akim@epita.fr>
13999
14000 * tests/calc.at: Use m4_match.
14001 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
14002
14003 2001-09-10 Marc Autret <autret_m@epita.fr>,
14004 Akim Demaille <akim@epita.fr>
14005
14006 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
14007 enum color_e.
14008 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
14009 to `normal'.
14010 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
14011 * src/lex.h: Adjust prototype.
14012 (token_t): Add `tok_undef'.
14013 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
14014 (parse_percent_token): Now returns token_t.
14015 Add default statement in switch.
14016 (lex): Separate `c' as an input variable, from the token_t result
14017 part.
14018 (unlexed): Is a token_t.
14019
14020 2001-09-10 Akim Demaille <akim@epita.fr>
14021
14022 * configure.in: Bump to 1.29a.
14023
14024 2001-09-07 Akim Demaille <akim@epita.fr>
14025
14026 Version 1.29.
14027
14028 2001-08-30 Akim Demaille <akim@epita.fr>
14029
14030 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
14031 * m4/atconfig.m4: Remove.
14032 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
14033 * tests/bison: New.
14034 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
14035 m4_if, m4_patsubst, and m4_regexp.
14036 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
14037 `input' file instead of echo.
14038
14039 2001-08-29 Akim Demaille <akim@epita.fr>
14040
14041 Bump to 1.28e.
14042
14043 2001-08-29 Akim Demaille <akim@epita.fr>
14044
14045 Version 1.28d.
14046
14047 2001-08-29 Paul Eggert <eggert@twinsun.com>
14048
14049 * src/bison.simple (yyparse): Don't take the address of an
14050 item before the start of an array, as that doesn't conform to
14051 the C Standard.
14052
14053 2001-08-29 Robert Anisko <anisko_r@epita.fr>
14054
14055 * doc/bison.texinfo (Location Tracking Calc): New node.
14056
14057 2001-08-29 Paul Eggert <eggert@twinsun.com>
14058
14059 * src/output.c (output): Do not define const, as this now
14060 causes more problems than it cures.
14061
14062 2001-08-29 Akim Demaille <akim@epita.fr>
14063
14064 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
14065 the nodes.
14066 Be sure to tag the `detailmenu'.
14067
14068 2001-08-29 Akim Demaille <akim@epita.fr>
14069
14070 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
14071 download in a tmp dir.
14072
14073 2001-08-28 Marc Autret <autret_m@epita.fr>
14074
14075 * config/depcomp: New file.
14076
14077 2001-08-28 Marc Autret <autret_m@epita.fr>
14078
14079 * doc/bison.1 (mandoc): Adjust.
14080 From Juan Manuel Guerrero.
14081
14082 2001-08-28 Marc Autret <autret_m@epita.fr>
14083
14084 * src/print_graph.c (print_state): Fix.
14085
14086 2001-08-27 Marc Autret <autret_m@epita.fr>
14087
14088 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
14089 char * members.
14090 Echo modifications to the functions prototypes.
14091 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
14092
14093 2001-08-27 Marc Autret <autret_m@epita.fr>
14094
14095 * src/vcg.c: Include `xalloc.h'.
14096 (add_colorentry): New.
14097 (add_classname): New.
14098 (add_infoname): New.
14099 * src/vcg.h: Add new prototypes.
14100
14101 2001-08-27 Akim Demaille <akim@epita.fr>
14102
14103 * Makefile.maint: Sync. again with CVS Autoconf.
14104
14105 2001-08-27 Akim Demaille <akim@epita.fr>
14106
14107 * Makefile.maint: Formatting changes.
14108 (po-update, cvs-update, update): New targets.
14109 (AMTAR): Remove.
14110
14111 2001-08-27 Akim Demaille <akim@epita.fr>
14112
14113 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14114 * Makefile.maint: Sync. with CVS Autoconf.
14115
14116 2001-08-27 Marc Autret <autret_m@epita.fr>
14117
14118 * src/vcg.h (struct infoname_s): New.
14119 (struct colorentry_s): New.
14120 (graph_s): New fields {vertical,horizontal}_order in structure.
14121 Add `infoname' field.
14122 Add `colorentry' field;
14123 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
14124 (G_HORIZONTAL_ORDER): New.
14125 (G_INFONAME): New.
14126 (G_COLORENTRY): New.
14127 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
14128 Add output of `infoname'.
14129 Add output of `colorentry'.
14130
14131 2001-08-27 Marc Autret <autret_m@epita.fr>
14132
14133 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
14134 This one shadowed a global parameter.
14135
14136 2001-08-24 Marc Autret <autret_m@epita.fr>
14137
14138 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
14139 instead of `unsigned'.
14140 (print_state): Do not call obstack_object_size () in obstack_grow ()
14141 to avoid macro variables shadowing.
14142
14143 2001-08-23 Marc Autret <autret_m@epita.fr>
14144
14145 * src/lex.c (percent_table): Typo: s/naem/name/.
14146 Add graph option.
14147 Normalize new options declarations.
14148
14149 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
14150
14151 * tests/suite.at: Exercise %header_extension and %source_extension.
14152
14153 2001-08-16 Marc Autret <autret_m@epita.fr>
14154
14155 * src/reader.c (parse_dquoted_param): New.
14156 (parse_header_extension_decl): Use it.
14157 (parse_source_extension_decl): Likewise.
14158
14159 2001-08-16 Marc Autret <autret_m@epita.fr>
14160
14161 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
14162 (get_xxxx_str): Use assert () instead of complain ().
14163 Remove return invokations in default cases.
14164 (get_decision_str): Modify default behaviour. Remove second argument.
14165 Echo modifications on calls.
14166 (output_graph): Fix.
14167
14168 2001-08-16 Marc Autret <autret_m@epita.fr>
14169
14170 * src/getargs.c (usage): Update with ``-g, --graph''.
14171
14172 2001-08-16 Marc Autret <autret_m@epita.fr>
14173
14174 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
14175 (Option Cross Key): Likewise.
14176 * doc/bison.1: Update.
14177
1c8c2190
PB
141782001-09-25 Pascal Bart <pascal.bart@epita.fr>
14179
14180 * src/output.c (output_master_parser): Don't finish action_obstack.
14181 (output_parser): Don't care about the muscle action, here.
14182 (prepare): Copy the action_obstack in the action muscle.
14183 (output): Free action_obstack.
14184
180d45ba
PB
141852001-09-23 Pascal Bart <pascal.bart@epita.fr>
14186
14187 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
14188 will contain `%union' declaration.
14189 (parse_union_decl): Delete #line directive output.
14190 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
14191 informations about %union.
14192 (parse_union_decl): Copy the union_obstack in the muscle stype.
14193 * src/bison.simple: Add new #line directive.
14194 Add typdef %%stype YYSTYPE.
14195
c51d1a19
PB
141962001-09-23 Pascal Bart <pascal.bart@epita.fr>
14197
14198 * src/bison.simple: Add new `#line' directive.
14199
6f9344da
PB
142002001-09-22 Pascal Bart <pascal.bart@epita.fr>
14201
14202 * src/bison.simple: New `#line' directive.
14203 * src/output.c (output_parser): Support new dynamic muscle input_line.
14204
652def80
MA
142052001-09-22 Marc Autret <autret_m@epita.fr>
14206
14207 * src/output.c (output_master_parser): New.
14208 (output_parser): Be more re-entrant.
14209
25b222fa
MA
142102001-09-21 Marc Autret <autret_m@epita.fr>
14211
14212 * src/reader.c (copy_definition, parse_union_decl): Update and use
14213 `linef' muscle.
14214 (copy_action): Likewise.
14215 Use obstack_1grow ().
14216 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
14217
6bc35ae5
MA
142182001-09-21 Marc Autret <autret_m@epita.fr>
14219
14220 * src/options.c (option_table): Adjust.
14221 * src/lex.c (parse_percent_token): Fix.
14222
c0629aa1
PB
142232001-09-20 Pascal Bart <pascal.bart@epita.fr>
14224
14225 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 14226
82b6d266
PB
142272001-09-20 Pascal Bart <pascal.bart@epita.fr>
14228
14229 * src/lex.c (parse_percent_token): Change type of variable `tx', which
14230 is now an option_table_struct*.
14231 (option_strcmp): New function option_strcmp.
14232 (parse_percent_token): Call option_strcmp.
14233 * src/getargs.c (xalloc.h, options.h): Include it.
14234 (getargs): Call create_long_option_table.
14235 (getargs): Free longopts at the end of the function.
14236 (shortopts): Move in options.c.
14237 * src/options.c (create_long_option_table): New function. Convert
14238 information from option_table to option structure.
14239 * src/reader.c (options.h): Include it.
14240
14241 * src/Makefile.am: Adjust.
14242 * src/options.c (option_table): Create from longopts and percent_table.
14243 * src/getargs.c (longopts): Delete.
14244 * src/lex.c (struct percent_table_struct): Delete.
14245 (percent_table): Delete.
14246 (options.h): Include it.
14247 * src/options.c: Create.
14248 * src/options.h: Create.
14249 Declare enum opt_access_e.
14250 Define struct option_table_struct.
14251
75f5aaea
MA
142522001-09-20 Marc Autret <autret_m@epita.fr>
14253
14254 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
14255 sections of Bison.
14256
f508cb0a
PB
142572001-09-19 Pascal Bart <pascal.bart@epita.fr>
14258
14259 * src/bison.simple: s/%%filename/%%skeleton.
14260 * src/muscle_tab.c (getargs.h): Include it.
14261 (muscle_init): Insert new muscle skeleton.
14262
13105fc1
PB
142632001-09-18 Pascal Bart <pascal.bart@epita.fr>
14264
14265 * src/output.c (output_parser): Delete unused variable actions_dumped.
14266
b0c4483e
PB
142672001-09-07 Pascal Bart <pascal.bart@epita.fr>
14268
14269 * src/output.c (output): Delete call to reader_output_yylsp.
14270 * src/reader.c (reader): Likewise.
ba0fe3c7 14271 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 14272
11d82f03
MA
142732001-09-02 Marc Autret <autret_m@epita.fr>
14274
14275 * src/reader.c: Include muscle_tab.h.
14276 (parse_union_decl): Update.
14277 (parse_macro_decl): Rename parse_muscle_decl.
14278 Update to use renamed functions and variable.
14279 (read_declarations, copy_action, read_additionnal_code, : Updated
14280 with correct variables and functions names.
14281 (packsymbols, reader): Likewise.
342b8b6e 14282
11d82f03 14283 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 14284
11d82f03
MA
14285 * src/output.c: Include muscle_tab.h
14286 In all functions using macro_insert, change by using muscle_insert ().
14287 (macro_obstack): Rename muscle_obstack.
14288 Echo modifications in the whole file.
14289 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
14290 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
14291 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
14292
14293 * src/muscle_tab.h: Update double inclusion macros.
14294 (macro_entry_s): Rename muscle_entry_s.
14295 Update prototypes.
342b8b6e 14296
11d82f03
MA
14297 * src/muscle_tab.c: Include muscle_tab.h.
14298 Rename macro_tabble to muscle_table.
14299 (mhash1, mhash2, mcmp): Use muscle_entry.
14300 (macro_init): Rename muscle_init. Update.
14301 (macro_insert): Rename muscle_insert. Update.
14302 (macro_find): Rename muscle_find. Update.
14303
14304 * src/main.c: Include muscle_tab.h.
14305 (main): Call muscle_init ().
14306 * src/Makefile.am (bison_SOURCES): Echo modifications.
14307
93a37297
MA
143082001-09-02 Marc Autret <autret_m@epita.fr>
14309
f753cd62 14310 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 14311
f753cd62
MA
14312 * src/muscle_tab.c, src/muscle_tab.h: Add files.
14313
143142001-09-02 Marc Autret <autret_m@epita.fr>
14315
14316 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 14317
682d48cd
PB
143182001-09-01 Pascal Bart <pascal.bart@epita.fr>
14319
342b8b6e 14320 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
14321 filename.
14322
087c8fda
MA
143232001-09-01 Marc Autret <autret_m@epita.fr>
14324
14325 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
14326 to an explicit value to activate the feature. We do it here.
14327
dda680cb
PB
143282001-08-31 Pascal Bart <pascal.bart@epita.fr>
14329
14330 * src/output.c (prepare): Delete the `filename' muscule insertion.
14331 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
14332 (parse_union_decl): Likewise.
14333 * src/macrotab.c (macro_init): Initialize filename by infile.
14334
9e644e64
MA
143352001-08-31 Marc Autret <autret_m@epita.fr>
14336
14337 * src/bison.simple (YYLSP_NEEDED): New definition.
14338 * src/output.c (prepare): Add macro insertion of `locations_flag'
14339
17da6427
PB
143402001-08-31 Pascal Bart <pascal.bart@epita.fr>
14341
14342 * src/output.c (prepare): Delete insertion of previous muscles,
14343 and insert the `prefix' muscles.
14344 * src/macrotab.c (macro_init): Likewise.
14345 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 14346 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
14347 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
14348 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 14349 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
14350 name_prefix.
14351
e8cb70b9
PB
143522001-08-31 Pascal Bart <pascal.bart@epita.fr>
14353
14354 * src/main.c (main): Standardize.
14355 * src/output.c (output_table_data, output_parser): Likewise.
14356 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
14357
63c2d5de
MA
143582001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
14359
342b8b6e 14360 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
14361 %%epilogue.
14362 * src/output.c (output): Rename %%declarations to %%prologue.
14363 * src/bison.simple: Echo modifications.
342b8b6e 14364
d8cb5183
MA
143652001-08-31 Marc Autret <autret_m@epita.fr>
14366
14367 * src/reader.c (readgram): CleanUp.
14368 (output_token_defines): Likewise.
14369 (packsymbols): Likewise.
14370 (reader): Likewise.
14371 * src/output.c (output): CPP-out useless code.
14372
6c686258
PB
143732001-08-31 Pascal Bart <pascal.bart@epita.fr>
14374
342b8b6e 14375 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
14376 output_trailers and output_headers.
14377 * src/output.h: Remove obsolete functions prototypes of output_headers
14378 and output_trailers.
14379
8f451ef7
PB
143802001-08-30 Pascal Bart <pascal.bart@epita.fr>
14381
14382 * src/main.c: Include macrotab.h.
342b8b6e 14383 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
14384 Adjust functions prototypes.
14385 * src/macrotab.c (macro_insert): Constify key and value.
14386 (macro_find): Constify key.
14387 (macro_insert): Include 'xalloc.h'
14388 (macro_insert): Use XMALLOC.
14389 (macro_find): Constify return value.
14390 * src/output.c (output_table_data): Rename table to table_data.
14391 (output_parser): Constify macro_key, macro_value.
14392
997b6fd0 143932001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
14394
14395 * src/reader.c (parse_skel_decl): New.
342b8b6e 14396 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
14397 * src/lex.h (token_t): New token `tok_skel'.
14398 * src/lex.c (percent_table): Add skeleton option entry.
14399 Standardize.
14400
ff48177d
MA
144012001-08-29 Marc Autret <autret_m@epita.fr>
14402
14403 * src/bison.simple: Add %%user_code directive at the end.
14404 * src/reader.c (read_additionnal_code): New.
14405 (reader): Use it.
14406 * src/output.c (output_program): Remove.
14407 (output): Update.
14408
b33160bf
MA
144092001-08-28 Marc Autret <autret_m@epita.fr>
14410
14411 * src/output.c (output_actions): Clean up.
4e5caae2 14412 (output_gram): CPP-out useless code.
b33160bf
MA
14413 * src/reader.c (reader): Clean up, CPP-out useless code.
14414
d1a2daf7
PB
144152001-08-28 Pascal Bart <pascal.bart@epita.fr>
14416
342b8b6e 14417 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 14418 directive.
d1a2daf7
PB
14419 * src/bison.simple: Add `%%definitions'.
14420
2b763dfe
MA
144212001-08-28 Marc Autret <autret_m@epita.fr>
14422
14423 * config/depcomp: New file.
14424
f1a87ef6
PE
144252001-08-27 Paul Eggert <eggert@twinsun.com>
14426
14427 * src/bison.simple (yyparse): Don't take the address of an
14428 item before the start of an array, as that doesn't conform to
14429 the C Standard.
14430
82e236e2
RA
144312001-08-27 Robert Anisko <robert.anisko@epita.fr>
14432
f1a87ef6 14433 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
14434 obstack. It was done too late here.
14435
14436 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
14437 completely wrong.
14438 (reader): Initialize the macro obstack here, since we need it to grow
14439 '%define' directives.
14440
14441 * src/reader.h: Declare the macro obstack as extern.
14442
b0cfa28a
RA
144432001-08-27 Robert Anisko <robert.anisko@epita.fr>
14444
14445 * src/output.c (output_parser): Fix. Store single '%' characters in
14446 the output obstack instead of throwing them away.
14447
6fc74234
AD
144482001-08-27 Akim Demaille <akim@epita.fr>
14449
14450 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14451
9c76d118
RA
144522001-08-25 Robert Anisko <robert.anisko@epita.fr>
14453
14454 * lib/Makefile.am: Adjust.
14455
a8289c62
RA
144562001-08-25 Robert Anisko <robert.anisko@epita.fr>
14457
14458 * src/bison.simple: Update and add '%%' directives.
14459
b6610515
RA
144602001-08-25 Robert Anisko <robert.anisko@epita.fr>
14461
14462 * src/reader.c (reader): Remove calls to 'output_headers' and
14463 'output_trailers'. Remove some C output.
14464 (readgram): Disable a piece of code that was writing a default
14465 definition for 'YYSTYPE'.
14466 (reader_output_yylsp): Remove.
14467 (packsymbols): Output token defintions to a macro.
14468 (copy_definition): Disable C output.
6fc74234 14469
b6610515
RA
14470 * src/reader.c (parse_macro_decl): New function used to parse macro
14471 declarations.
14472 (copy_string2): Put the body of copy_string into this new function.
14473 Add a parameter to let the caller choose whether he wants to copy the
14474 string delimiters or not.
14475 (copy_string): Be a simple call to copy_string2 with the last argument
14476 bound to true.
14477 (read_declarations): Add case for macro definition.
14478 (copy_identifier): New.
6fc74234 14479 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
14480 rather than lex.
14481
26f609ff
RA
144822001-08-25 Robert Anisko <robert.anisko@epita.fr>
14483
14484 * src/output.c (prepare): Add prefixed names.
14485 (output_parser): Output semantic actions.
14486 (output_parser): Fix bug on '%%line' directives.
6fc74234 14487
26f609ff
RA
14488 * src/output.c (output_headers): Remove. The C code printed by this
14489 function should now be in the skeletons.
14490 (output_trailers): Remove.
14491 (output): Disable call to 'reader_output_yylsp'.
14492 (output_rule_data): Do not output tables to the table obstack.
14493
14494 * src/output.c: Remove some C dedicated output.
14495 Improve the use of macro and output obstacks.
14496 (output_defines): Remove.
6fc74234 14497
26f609ff
RA
14498 * src/output.c (output_token_translations): Associate 'translate'
14499 table with a macro. No output to the table obstack.
14500 (output_gram): Same for 'rhs' and 'prhs'.
14501 (output_stos): Same for 'stos'.
14502 (output_rule_data): Same for 'r1' and 'r2'.
14503 (token_actions): Same for 'defact'.
14504 (goto_actions): Same for 'defgoto'.
14505 (output_base): Same for 'pact' and 'pgoto'.
14506 (output_table): Same for 'table'.
14507 (output_check): Same for 'check'.
6fc74234 14508
26f609ff
RA
14509 * src/output.c (output_table_data): New function.
14510 (output_short_table): Remove.
14511 (output_short_or_char_table): Remove.
6fc74234 14512
26f609ff
RA
14513 * src/output.c (output_parser): Replace most of the skeleton copy code
14514 with something new. Skeletons are now processed character by character
14515 rather than line by line, and Bison looks for '%%' macros. This is the
14516 first step in making Bison's output process (a lot) more flexible.
14517 (output_parser): Use the macro table.
14518
6f43b113
RA
145192001-08-25 Robert Anisko <robert.anisko@epita.fr>
14520
14521 * src/main.c (main): Initialize the macro table.
14522
dd3127cf
RA
145232001-08-25 Robert Anisko <robert.anisko@epita.fr>
14524
14525 * src/lex.c (percent_table): Add tok_define.
14526 * src/lex.h: Add tok_define.
14527
aa321494
RA
145282001-08-25 Robert Anisko <robert.anisko@epita.fr>
14529
14530 * src/macrotab.c: New file.
14531 * src/macrotab.h: New file.
14532 * src/Makefile.am: Update.
14533
68bd3b6b
RA
145342001-08-25 Robert Anisko <robert.anisko@epita.fr>
14535
14536 * lib/hash.c: New file.
14537 * lib/hash.h: New file.
14538 * lib/Makefile.am: Update.
14539
45f8dd1e
AD
145402001-08-15 Akim Demaille <akim@epita.fr>
14541
14542 Version 1.28c.
14543
40a64a7a 145442001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
14545
14546 * src/reader.c (readgram): Indent output macro YYSTYPE.
14547 (packsymbols): Likewise.
14548 (output_token_defines): Likewise.
14549 * src/files.c: Standardize.
14550 (compute_header_macro): New.
14551 (defines_obstack_save): New. Use compute_header_macro.
14552 (output_files): Update. Use defines_obstack_save.
14553
f9a8293a
AD
145542001-08-15 Akim Demaille <akim@epita.fr>
14555
14556 * doc/bison.texinfo (Table of Symbols): Document
14557 YYSTACK_USE_ALLOCA.
14558
150ca7a7
AD
145592001-08-15 Akim Demaille <akim@epita.fr>
14560
14561 * missing: Update from CVS Automake.
14562 * config/config.guess, config/config.sub, config/texinfo.tex:
14563 Update from gnu.org.
14564
69b5cec4
AD
145652001-08-15 Akim Demaille <akim@epita.fr>
14566
14567 * Makefile.maint: Sync with CVS Autoconf.
14568
f2b5126e
PB
145692001-08-14 Pascal Bart <pascal.bart@epita.fr>
14570
69b5cec4 14571 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
14572 `fdl.texi'.
14573 * doc/fdl.texi: Add to package.
14574
4ecbf796
MA
145752001-08-14 Marc Autret <autret_m@epita.fr>
14576
14577 Turn on %{source,header}_extension features.
14578
69b5cec4 14579 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
14580 source_extension.
14581 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 14582 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
14583 between options.
14584
95fb5662
MA
145852001-08-14 Marc Autret <autret_m@epita.fr>
14586
14587 * src/files.c (compute_base_names): Add extensions computing when
14588 `--file-prefix' used.
14589 Standardize function calls.
14590
78d09da9
MA
145912001-08-13 Marc Autret <autret_m@epita.fr>
14592
69b5cec4 14593 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
14594 defining it (defined but null disables alloca).
14595
5a009f2c
MA
145962001-08-13 Marc Autret <autret_m@epita.fr>
14597
14598 * src/bison.simple (_yy_memcpy): CPP reformat.
14599
1e41465a
PB
146002001-08-13 Pascal Bart <pascal.bart@epita.fr>
14601
14602 * tests/atconfig.in (CPPFLAGS): Fix.
14603
c67a198d
PB
146042001-08-10 Pascal Bart <pascal.bart@epita.fr>
14605
79282c6c 14606 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
14607 `gpl.texi'.
14608 * doc/gpl.texi: Add to package.
14609
09a6de7e
MA
146102001-08-10 Marc Autret <autret_m@epita.fr>
14611
14612 * src/print_graph.h: Fix.
14613 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
14614
b77b9ee0
AD
146152001-08-10 Akim Demaille <akim@epita.fr>
14616
14617 * src/system.h: Provide default declarations for stpcpy, strndup,
14618 and strnlen.
14619
3e259915
MA
146202001-08-10 Robert Anisko <anisko_r@epita.fr>
14621
14622 * doc/bison.texinfo (Locations): Update @$ stuff.
14623
ca96bc2d
MA
146242001-08-09 Robert Anisko <anisko_r@epita.fr>
14625
14626 * src/bison.simple (YYLLOC_DEFAULT): Update.
14627 (yyparse): Adjust.
14628
fdc6758b
MA
146292001-08-08 Marc Autret <autret_m@epita.fr>
14630
b77b9ee0 14631 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
14632 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
14633 Reported by Fabrice Bauzac.
957d4dbf 14634
600cad3b
MA
146352001-08-08 Marc Autret <autret_m@epita.fr>
14636
14637 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
14638 * src/vcg.c (output_node): Fix.
14639 * src/vcg.h: Cleanup.
14640 * src/print_graph.c: Add comments.
b77b9ee0 14641 (node_output_size): New global variable. Simplify the formatting of
600cad3b 14642 the VCG graph output.
b77b9ee0 14643 (print_actions): Unused code is now used. It notifies the final state
600cad3b 14644 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 14645 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
14646 blue.
14647 Get the current node name and node_obstack by argument.
14648 (node_obstack): New variable.
14649 (print_state): Manage node_obstack.
14650 (print_core): Use node_obstack given by argument.
14651 A node is not only computed here but in print_actions also.
14652 (print_graph): CPP out useless code instead of commenting it.
14653
976e528f
AD
146542001-08-07 Pascal Bart <pascal.bart@epita.fr>
14655
14656 * tests/atconfig.in (CPPFLAGS): Fix.
14657
20e8e5ca
AD
146582001-08-07 Akim Demaille <akim@epita.fr>
14659
14660 * src/print_graph.c (quote): New.
14661 (print_core): Use it.
14662
957d4dbf 146632001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 14664
3e3da797
AD
14665 * src/vcg.c (complain.h): Include it.
14666 Unepitaize `return' invocations.
c4b66126 14667 [NDEBUG] (main): Remove.
79282c6c 14668 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
14669 * src/files.c (open_files): Initialize graph_obstack.
14670 * src/print_graph.c (print_actions): CPP out useless code.
14671 (print_core): Don't output the last `\n' in labels.
14672 Use `quote'.
14673 * src/files.c (output_files): Output the VCG file.
14674 * src/main.c (main): Invoke print_graph ();
3e3da797 14675
957d4dbf 146762001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
14677
14678 Automaton VCG graph output.
14679 Using option ``-g'' or long option ``--graph'', you can generate
14680 a gram_filename.vcg file containing a VCG description of the LALR (1)
14681 automaton of your grammar.
14682
14683 * src/main.c: Call to print_graph() function.
14684 * src/getargs.h: Update.
14685 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
14686 (graph_flag): New flag.
14687 (longopts): Update.
14688 (getargs): Add case `g'.
14689 * src/files.c (graph_obstack): New obstack struct.
14690 (open_files): Initialize new obstack.
14691 (output_files): Saves graph_obstack if required.
14692 * src/files.h (graph_obstack): New extern declaration.
14693 * src/Makefile.am: Add new source files.
14694
927c1557 146952001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
14696
14697 * src/print_graph.c, src/print_graph.h (graph): New.
14698 * src/vcg.h: New file.
14699 * src/vcg.c: New file, VCG graph handling.
14700
7333d403
AD
147012001-08-06 Marc Autret <autret_m@epita.fr>
14702
14703 Add of %source_extension and %header_extension which specify
14704 the source or/and the header output file extension.
14705
14706 * src/files.c (compute_base_names): Remove initialisation of
14707 src_extension and header_extension.
14708 (compute_exts_from_gf): Update.
14709 (compute_exts_from_src): Update.
14710 (output_files): Update.
14711 * src/reader.c (parse_header_extension_decl): New.
14712 (parse_source_extension_decl): New.
14713 (read_declarations): New case statements for the new tokens.
14714 * src/lex.c (percent_table): Add entries for %source_extension
14715 and %header_extension.
14716 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
14717
84163231
AD
147182001-08-06 Marc Autret <autret_m@epita.fr>
14719
14720 * configure.in: Bump to 1.28c.
14721 * doc/bison.texinfo: Texinfo thingies.
14722
8303fc42
AD
147232001-08-04 Pascal Bart <pascal.bart@epita.fr>
14724
14725 * tests/atconfig.in (CPPFLAGS): Add.
14726 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
14727
70a84437
AD
147282001-08-03 Akim Demaille <akim@epita.fr>
14729
14730 Version 1.28b.
14731
2ce10144
AD
147322001-08-03 Akim Demaille <akim@epita.fr>
14733
14734 * tests/Makefile.am (check-local): Ship testsuite.
14735 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
14736 Include `string.h'.
14737
1e3e4bc1
AD
147382001-08-03 Akim Demaille <akim@epita.fr>
14739
14740 * configure.in: Try using -Wformat when compiling.
14741
42b45b7f
AD
147422001-08-03 Akim Demaille <akim@epita.fr>
14743
14744 * configure.in: Bump to 1.28b.
14745
8f13fe33
AD
147462001-08-03 Akim Demaille <akim@epita.fr>
14747
14748 * src/complain.c: Adjust strerror_r portability issues.
14749
b37ba92c
AD
147502001-08-03 Akim Demaille <akim@epita.fr>
14751
14752 Version 1.28a.
14753
b0ce6046
AD
147542001-08-03 Akim Demaille <akim@epita.fr>
14755
14756 * src/getargs.c, src/getarg.h (skeleton)): Constify.
14757 * src/lex.c (literalchar): Avoid name clashes on `buf'.
14758 * src/getargs.c: Include complain.h.
14759 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
14760 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
14761
d01c415b
AD
147622001-08-03 Akim Demaille <akim@epita.fr>
14763
14764 * src/reader.c (readgram): Display hidden chars in error messages.
14765
459dd1a6
AD
147662001-08-03 Akim Demaille <akim@epita.fr>
14767
14768 Update to gettext 0.10.39.
14769
53b74c0c
AD
147702001-08-03 Akim Demaille <akim@epita.fr>
14771
14772 * lib/strspn.c: New.
14773
234a3be3
AD
147742001-08-01 Marc Autret <autret_m@epita.fr>
14775
14776 * doc/bison.texinfo: Update.
14777 * doc/bison.1 (mandoc): Update.
14778 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
14779 * src/files.c: Support output files extensions computing.
14780 (src_extension): New static variable.
14781 (header_extension): New static variable.
14782 (tr): New function.
14783 (get_extension_index): New function, gets the index of an extension
14784 filename in a string.
14785 (compute_exts_from_gf): New function, computes extensions from the
14786 grammar file extension.
14787 (compute_exts_from_src): New functions, computes extensions from the
14788 C source file extension, file given by ``-o'' option.
14789 (compute_base_names): Update.
14790 (output_files): Update.
14791
847bf1f5
AD
147922001-08-01 Robert Anisko <anisko_r@epita.fr>
14793
d995fee7 14794 * doc/bison.texi: Document @$.
847bf1f5
AD
14795 (Locations): New section.
14796
d074a105
AD
147972001-07-18 Akim Demaille <akim@epita.fr>
14798
14799 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
14800 * config/prev-version.txt, config/move-if-change: New.
14801 * Makefile.am: Adjust.
14802
3419715d
AD
148032001-07-08 Pascal Bart <pascal.bart@epita.fr>
14804
14805 * src/bison.simple (yyparse): Suppress warning `comparaison
14806 between signed and unsigned'.
14807
62ab6972
AD
148082001-07-05 Pascal Bart <pascal.bart@epita.fr>
14809
14810 * src/getargs.h (raw_flag): Remove.
14811 * src/getargs.c: Die on `-r'/`--raw'.
14812 * src/lex.c (parse_percent_token): Die on `%raw'.
14813 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
14814 * tests/calc.at: Suppress test with option `--raw'.
14815
1e24cc5b
AD
148162001-07-14 Akim Demaille <akim@epita.fr>
14817
14818 * config/: New.
14819 * configure.in: Require Autoconf 2.50.
14820 Update to gettext 0.10.38.
14821
32dfccf8
AD
148222001-03-16 Akim Demaille <akim@epita.fr>
14823
14824 * doc/bison.texinfo: ANSIfy the examples.
14825
cd5bd6ac
AD
148262001-03-16 Akim Demaille <akim@epita.fr>
14827
14828 * getargs.c (skeleton): New variable.
14829 (longopts): --skeleton is a new option.
14830 (shortopts, getargs): -S is a new option.
14831 * getargs.h: Declare skeleton.
14832 * output.c (output_parser): Use it.
14833
5141b016
AD
148342001-03-16 Akim Demaille <akim@epita.fr>
14835
14836 * m4/strerror_r.m4: New.
14837 * m4/error.m4: Run AC_FUNC_STRERROR_R.
14838 * lib/error.h, lib/error.c: Update.
14839
447992b9
AD
148402001-03-16 Akim Demaille <akim@epita.fr>
14841
14842 * src/getargs.c (longopts): Clean up.
14843
274d42ce
AD
148442001-02-21 Akim Demaille <akim@epita.fr>
14845
14846 * src/reader.c (gensym): `gensym_count' is your own.
14847 Use a static buf to create the symbol name, as token_buffer is no
14848 longer a buffer.
14849
22c821f3
AD
148502001-02-08 Akim Demaille <akim@epita.fr>
14851
14852 * src/conflicts.c (conflict_report): Be sure not to append to res
14853 between two calls, which could happen if both first sprintf were
14854 skipped, but not the first cp += strlen.
14855
18569462
AD
148562001-02-08 Akim Demaille <akim@epita.fr>
14857
14858 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
14859 New, from fileutils 4.0.37.
14860 * configure.in: Require Autoconf 2.49c. I took some time before
14861 making this decision. This is the only way out for portability
14862 issues in Bison, it would mean way too much duplicate effort to
14863 import in Bison features implemented in 2.49c since 2.13.
14864 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
14865
0d8f3c8a
AD
148662001-02-02 Akim Demaille <akim@epita.fr>
14867
14868 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 14869 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 14870
f17bcd1f
AD
148712001-01-19 Akim Demaille <akim@epita.fr>
14872
14873 Get rid of the ad hoc handling of token_buffer in the scanner: use
14874 the obstacks.
14875
14876 * src/lex.c (token_obstack): New.
14877 (init_lex): Initialize it. No longer call...
14878 (grow_token_buffer): this. Remove it.
14879 Adjust all the places which used it to use the obstack.
14880
511e79b3
AD
148812001-01-19 Akim Demaille <akim@epita.fr>
14882
14883 * src/lex.h: Rename all the tokens:
14884 s/\bENDFILE\b/tok_eof/g;
14885 s/\bIDENTIFIER\b/tok_identifier/g;
14886 etc.
14887 Let them be enums, not #define, to ease debugging.
14888 Adjust all the code.
14889
0d6508ef
AD
148902001-01-18 Akim Demaille <akim@epita.fr>
14891
14892 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
14893 * src/lex.c (maxtoken, grow_token_buffer): Static.
14894
6deb4447
AD
148952001-01-18 Akim Demaille <akim@epita.fr>
14896
14897 Since we now use obstacks, more % directives can be enabled.
14898
14899 * src/lex.c (percent_table): Also accept `%yacc',
14900 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
14901 `%debug'.
14902 Handle the actions for `%semantic_parser' and `%pure_parser' here,
14903 instead of returning a token.
14904 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
14905 * src/reader.c (read_declarations): Adjust.
14906 * src/files.c (open_files): Don't call `compute_base_names', don't
14907 compute `attrsfile' since they depend upon data which might be
14908 *in* the input file now.
14909 (output_files): Do it here.
14910 * src/output.c (output_headers): Document the fact that this patch
14911 introduces a guaranteed SEGV for semantic parsers.
14912 * doc/bison.texinfo: Document them.
14913 * tests/suite.at: Exercise these %options.
14914
ff4423cc
AD
149152000-12-20 Akim Demaille <akim@epita.fr>
14916
14917 Also handle the output file (--verbose) with obstacks.
14918
14919 * files.c (foutput): Remove.
14920 (output_obstack): New.
14921 Adjust all dependencies.
14922 * src/conflicts.c: Return a string.
14923 * src/system.h (obstack_grow_string): Rename as...
14924 (obstack_sgrow): this. Be ready to work with non literals.
14925 (obstack_fgrow4): New.
14926
956dba3a
AD
149272000-12-20 Akim Demaille <akim@epita.fr>
14928
14929 * src/files.c (open_files): Fix the computation of short_base_name
14930 in the case of `-o foo.tab.c'.
14931
337bab46
AD
149322000-12-20 Akim Demaille <akim@epita.fr>
14933
14934 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
14935 (copy_dollar): Now that everything uses obstacks, get rid of the
14936 FILE * parameters.
14937
5d3214b8
AD
149382000-12-20 Akim Demaille <akim@epita.fr>
14939
14940 * src/files.c (open_files): Actually the `.output' file is based
14941 on the short_base_name, not base_name.
14942 * tests/suite.at (Checking output file names): Adjust.
14943
29092a57
AD
149442000-12-20 Akim Demaille <akim@epita.fr>
14945
14946 * src/bison.s1: Remove, we now use directly...
14947 * src/bison.simple: this.
14948 * src/Makefile.am: Use pkgdata instead of data.
14949
ea5607fd
AD
149502000-12-20 Akim Demaille <akim@epita.fr>
14951
14952 * src/files.c (guard_obstack): New.
14953 (open_files): Initialize it.
14954 (output_files): Dump it...
14955 * src/files.h: Export it.
14956 * src/reader.c (copy_guard): Use it.
14957
27110317
AD
149582000-12-19 Akim Demaille <akim@epita.fr>
14959
14960 * src/files.c (outfile, defsfile, actfile): Removed as global
14961 vars.
14962 (open_files): Don't compute them.
14963 (output_files): Adjust.
14964 (base_name, short_base_name): Be global.
14965 Adjust dependencies.
14966
19c50364
AD
149672000-12-19 Akim Demaille <akim@epita.fr>
14968
14969 * src/files.c (strsuffix): New.
14970 (stringappend): Be just like strcat but allocate.
14971 (base_names): Eve out from open_files.
14972 Try to simplify the rather hairy computation of base_name and
14973 short_base_name.
14974 (open_files): Use it.
14975 * tests/suite.at (Checking output file names): New test.
14976
573c1d9f
AD
149772000-12-19 Akim Demaille <akim@epita.fr>
14978
14979 * src/system.h (obstack_grow_literal_string): Rename as...
14980 (obstack_grow_string): this.
14981 * src/output.c (output_parser): Recognize `%% actions' instead of
14982 `$'.
14983 * src/bison.s1: s/$/%% actions/.
14984 * src/bison.hairy: Likewise.
14985
ef7ddedd
AD
149862000-12-19 Akim Demaille <akim@epita.fr>
14987
14988 * src/output.c (output_parser): Compute the `#line' lines when
14989 there are.
14990 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
14991 Suggested by Hans Aberg.
14992
ff61dabd
AD
149932000-12-19 Akim Demaille <akim@epita.fr>
14994
14995 Let the handling of the skeleton files be local to the procedures
14996 that use it.
14997
14998 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
14999 longer static.
15000 (fparser, open_extra_files): Remove.
15001 (open_files, output_files): Don't take care of fparser.
15002 * src/files.h: Adjust.
15003 * src/output.c (output_parser): Open and close the file to the
15004 skeleton.
15005 * src/reader.c (read_declarations): When %semantic_parser, open
15006 fguard.
15007
55b96341
AD
150082000-12-19 Akim Demaille <akim@epita.fr>
15009
15010 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
15011 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
15012
358c15b7
AD
150132000-12-19 Akim Demaille <akim@epita.fr>
15014
15015 * src/files.c (open_files): Yipee! We no longer need all the code
15016 looking for `/tmp' since we have no tmp file.
15017
7de3329e
AD
150182000-12-19 Akim Demaille <akim@epita.fr>
15019
15020 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
15021 New macros.
15022 * src/files.c (open_files): Less dependency on MSDOS etc.
15023
3abcd459
AD
150242000-12-14 Akim Demaille <akim@epita.fr>
15025
15026 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
15027 Provide a default definition.
15028 Use it when executing the default @ action.
15029 * src/reader.c (reader_output_yylsp): No longer include
15030 `timestamp' and `text' in the default YYLTYPE.
15031
2a91a95e
AD
150322000-12-12 Akim Demaille <akim@epita.fr>
15033
15034 * src/reader.c (copy_definition, parse_union_decl, copy_action)
15035 (copy_guard): Quote the file names.
15036 Reported by Laurent Mascherpa.
15037
14d3eb9b
AD
150382000-12-12 Akim Demaille <akim@epita.fr>
15039
15040 * src/output.c (output_headers, output_program, output): Be sure
15041 to escape special characters when outputting filenames.
15042 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
15043 (output_headers): Don't depend on them, Use ACTSTR.
15044
d7045ec6
AD
150452000-11-17 Akim Demaille <akim@epita.fr>
15046
15047 * lib/obstack.h: Formatting changes.
15048 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
15049 prevents type checking.
15050 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
15051 cast the value to (void *): assigning a `foo *' to a `void *'
15052 variable is valid.
15053 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
15054 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
15055 append characters.
15056
6fd54b73
AD
150572000-11-17 Akim Demaille <akim@epita.fr>
15058
15059 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
15060 as...
15061 (suite.m4, regression.m4, calc.m4): these.
15062 * tests/atgeneral.m4: Update from CVS Autoconf.
15063
4c50eae6
AD
150642000-11-17 Akim Demaille <akim@epita.fr>
15065
15066 * tests/regression.m4 (%union and --defines): New test,
15067 demonstrating a current bug in the obstack implementation.
15068
a35f64ea
AD
150692000-11-17 Akim Demaille <akim@epita.fr>
15070
15071 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
15072 macros.
15073 Use them to declare the variables which are global or local to
15074 `yyparse'.
15075
7de23534
AD
150762000-11-17 Akim Demaille <akim@epita.fr>
15077
15078 * acconfig.h: Remove, no longer used.
15079
aa7815f5
AD
150802000-11-07 Akim Demaille <akim@epita.fr>
15081
15082 * src: s/Copyright (C)/Copyright/g.
15083
5af1f549
AD
150842000-11-07 Akim Demaille <akim@epita.fr>
15085
15086 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
15087 defining.
15088 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
15089
553e2b22
AD
150902000-11-07 Akim Demaille <akim@epita.fr>
15091
15092 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
15093 Merge in a single CPP if/else.
15094
8a4f41d6
AD
150952000-11-07 Akim Demaille <akim@epita.fr>
15096
15097 * src/output.c (output): Remove useless variables.
15098 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
15099 argument `data' for consistency with the prototypes.
15100 Qualify it `const'.
15101 (obstack_copy, obstack_copy0): Rename the second argument as
15102 `address' for consistency. Qualify it `const'.
15103 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
15104 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
15105 `const' their input argument (`data' or `address').
15106 Adjust the corresponding macros to include `const' in casts.
15107
095a3fb5
AD
151082000-11-03 Akim Demaille <akim@epita.fr>
15109
15110 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
15111 s/PFILE1/BISON_HAIRY/.
15112 Adjust dependencies.
15113
d1cdce7c
AD
151142000-11-03 Akim Demaille <akim@epita.fr>
15115
090c5ebf 15116 For some reason, this was not applied.
d1cdce7c
AD
15117
15118 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15119 `unlink': it's no longer used.
15120
9311529b
AD
151212000-11-03 Akim Demaille <akim@epita.fr>
15122
15123 * src/files.c (skeleton_find): New function, eved out of...
15124 (open_files, open_extra_files): here.
15125
d8880f69
AD
151262000-11-03 Akim Demaille <akim@epita.fr>
15127
15128 Don't use `atexit'.
15129
15130 * src/files.c (obstack_save): New function.
15131 (done): Rename as...
15132 (output_files): this.
15133 Use `obstack_save'.
15134 * src/main.c (main): Don't use `atexit' to register `done', since
15135 it no longer has to remove tmp files, just call `output_files'
15136 when there are no errors.
15137
0dbb648e
AD
151382000-11-02 Akim Demaille <akim@epita.fr>
15139
15140 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15141 `unlink': it's no longer used.
15142 * src/files.h: Formatting changes.
15143
896fe5c1
AD
151442000-11-02 Akim Demaille <akim@epita.fr>
15145
15146 Remove the last uses of mktemp and unlink/delete.
15147
15148 * src/files.c (fdefines, ftable): Removed.
15149 (defines_ostack, table_obstack): New.
15150 Adjust dependencies of the former into uses of the latter.
15151 * src/output.c (output_short_or_char_table, output_short_table):
15152 Convert to using obstacks.
15153 * src/reader.c (copy_comment2): Accept one FILE * and two
15154 obstacks.
15155 (output_token_defines, reader_output_yylsp): Use obstacks.
15156 * src/system.h (obstack_fgrow3): New.
1f65350a 15157 * po/POTFILES.in: Adjust.
896fe5c1 15158
dd60faec
AD
151592000-11-01 Akim Demaille <akim@epita.fr>
15160
15161 Change each use of `fattrs' into a use of `attrs_obstack'.
15162
15163 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
15164 * src/files.c (fattrs): Remove.
15165 (attrs_obstack): New.
15166 Adjust all dependencies.
15167 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
15168
8c7ebe49
AD
151692000-11-01 Akim Demaille <akim@epita.fr>
15170
15171 Introduce obstacks.
15172 Change each use of `faction' into a use of `action_obstack'.
15173
15174 * lib/obstack.h, lib/obstack.c: New files.
15175 * src/files.c (faction): Remove.
15176 (action_obstack): New.
15177 Adjust all dependencies.
15178
77aee789
AD
151792000-10-20 Akim Demaille <akim@epita.fr>
15180
15181 * lib/quote.h (PARAMS): New macro. Use it.
15182
43591cec
AD
151832000-10-16 Akim Demaille <akim@epita.fr>
15184
15185 * src/output.c (output_short_or_char_table): New function.
15186 (output_short_table, output_token_translations): Use it.
15187 (goto_actions): Use output_short_table.
15188
1e9798d5
AD
151892000-10-16 Akim Demaille <akim@epita.fr>
15190
15191 * src/symtab.c (bucket_new): New function.
15192 (getsym): Use it.
15193
15194 * src/output.c (output_short_table): New argument to display the
15195 comment associated with the table.
15196 Adjust dependencies.
15197 (output_gram): Use it.
15198 (output_rule_data): Nicer output layout for YYTNAME.
15199
f282676b
AD
152002000-10-16 Akim Demaille <akim@epita.fr>
15201
15202 * src/lex.c (read_typename): New function.
15203 (lex): Use it.
15204 * src/reader.c (copy_dollar): Likewise.
15205
550a72a3
AD
152062000-10-16 Akim Demaille <akim@epita.fr>
15207
15208 * src/reader.c (copy_comment2): Expect the input stream to be on
15209 the `/' which is suspected to open a comment, instead of being
15210 called after `//' or `/*' was read.
15211 (copy_comment, copy_definition, parse_union_decl, copy_action)
15212 (copy_guard): Adjust.
15213
131e2fef
AD
152142000-10-16 Akim Demaille <akim@epita.fr>
15215
15216 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
15217 `read_signed_integer'.
15218
79282c5a
AD
152192000-10-16 Akim Demaille <akim@epita.fr>
15220
15221 * src/reader.c (copy_dollar): New function.
15222 (copy_guard, copy_action): Use it.
15223
ff4a34be
AD
152242000-10-16 Akim Demaille <akim@epita.fr>
15225
15226 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
15227 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
15228 New files, from Fileutils 4.0.27.
15229 * src/main.c (printable_version): Remove.
15230 * src/lex.c, src/reader.c: Use `quote'.
15231
152322000-10-04 Akim Demaille <akim@epita.fr>
15233
15234 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
15235
14ded682
AD
152362000-10-04 Akim Demaille <akim@epita.fr>
15237
15238 * doc/bison.texinfo: Various typos spotted by Neil Booth.
15239
8e03724b
AD
152402000-10-04 Akim Demaille <akim@epita.fr>
15241
15242 When a literal string is used to define two different tokens,
15243 `bison -v' segfaults.
15244 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
15245
15246 * tests/regression.m4: New file.
15247 Include the core of the sample provided by Piotr Gackiewicz.
15248 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
15249 properly.
15250
a9e64249
AD
152512000-10-04 Akim Demaille <akim@epita.fr>
15252
15253 * src/reader.c (parse_expect_decl): Keep `count' within the size
15254 of `buffer'.
15255 From Neil Booth.
15256
da9abf43
AD
152572000-10-02 Paul Eggert <eggert@twinsun.com>
15258
15259 * bison.s1 (yyparse): Assign the default value
15260 unconditionally, to avoid a GCC warning and make the parser a
15261 tad smaller.
15262
c33638bb
AD
152632000-10-02 Akim Demaille <akim@epita.fr>
15264
15265 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
15266 options.
15267
444c570a
AD
152682000-10-02 Akim Demaille <akim@epita.fr>
15269
15270 * src/derives.c, src/print.c, src/reduce.c: To ease the
15271 translation, move some `\n' out of the translated strings.
15272
89cab50d
AD
152732000-10-02 Akim Demaille <akim@epita.fr>
15274
15275 The location tracking mechanism is precious for parse error
15276 messages. Nevertheless, it is enabled only when `@n' is used in
15277 the grammar, which is a different issue (you can use it in error
15278 message, but not in the grammar per se). Therefore, there should
15279 be another means to enable it.
15280
15281 * src/getargs.c (getargs): Support `--locations'.
15282 (usage): Report it.
15283 * src/getargs.h (locationsflag): Export it.
15284 * src/lex.c (percent_table): Support `%locations'.
15285 * src/reader.c (yylsp_needed): Remove this variable, now replaced
15286 with `locationsflag'.
15287 * doc/bison.texinfo: Document `--locations' and `%locations'.
15288 Sort the options.
15289 * tests/calc.m4: Test it.
15290
15291 For regularity of the names, replace each
15292 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
15293 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
15294 In addition replace each `flag' with `_flag'.
15295
d6c2cba0
AD
152962000-10-02 Akim Demaille <akim@epita.fr>
15297
15298 Also test parse error messages, including with YYERROR_VERBOSE.
15299
15300 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
15301 associative).
15302 Use it to check the computations.
15303 Use it to check `nonassoc' is honored.
15304 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
15305 `--yyerror-verbose'.
15306 (_AT_CHECK_CALC): Adjust to this option.
15307 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
15308
5a35a6cb
AD
153092000-10-02 Akim Demaille <akim@epita.fr>
15310
15311 Test also `--verbose', `--defines' and `--name-prefix'. Testing
15312 the latter demonstrates a flaw in the handling of non debugging
15313 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
15314 was used in order to simplify:
15315
15316 #if YYDEBUG
15317 if (yydebug)
15318 {
15319 ...
15320 }
15321 #endif
15322
15323 into
15324
15325 if (yydebug)
15326 {
15327 ...
15328 }
15329
15330 unfortunately this leads to a CPP conflict when
15331 `--name-prefix=foo' is used since it produces `#define yydebug
15332 foodebug'.
15333
15334 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
15335 (YYDPRINTF): New macro.
15336 Spread its use.
15337 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
15338 the bison options.
15339 Also test `--verbose', `--defines' and `--name-prefix'.
15340
71da9eea
AD
153412000-10-02 Akim Demaille <akim@epita.fr>
15342
15343 Improve the readability of the produced parsers.
15344
15345 * src/bison.s1: Formatting changes.
15346 Improve the comment related to the `$' mark.
15347 (yydefault): Don't fall through to `yyresume': `goto' there.
15348 * src/output.c (output_parser): When the `$' is met, skip the end
15349 of its line.
15350 New variable, `number_of_dollar_signs', to check there's exactly
15351 one `$' in the parser skeleton.
15352
95e36146
AD
153532000-10-02 Akim Demaille <akim@epita.fr>
15354
15355 * lib/xstrdup.c: New file, from the fileutils.
15356 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
15357 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
15358 instead of strlen + xmalloc + strcpy.
15359 * src/symtab.c (copys): Remove, use xstrdup instead.
15360
d7020c20
AD
153612000-10-02 Akim Demaille <akim@epita.fr>
15362
15363 * src/gram.h (associativity): New enum type which replaces the
15364 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
15365 `right_assoc', `left_assoc' and `non_assoc'.
15366 Adjust all dependencies.
15367 * src/reader.c: Formatting changes.
15368 (LTYPESTR): Don't define it, use it as a literal in
15369 `reader_output_yylsp'.
15370 * src/symtab.h (symbol_class): New enum type which replaces the
15371 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
15372 `sunknown', `stoken and `snterm'.
15373
1916f98e
AD
153742000-10-02 Akim Demaille <akim@epita.fr>
15375
15376 * src/getargs.c (fixed_outfiles): Rename as...
15377 (yaccflag): for consistency and accuracy.
15378 Adjust dependencies.
15379
d7913476
AD
153802000-10-02 Akim Demaille <akim@epita.fr>
15381
15382 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
15383 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
15384 difficult and introduced a lot of core dump. It turns out that
15385 Bison used an implementation of `xmalloc' based on `calloc', and
15386 at various places it does depend upon the initialization to 0. I
15387 have not tried to isolate the pertinent places, and all the former
15388 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
15389 someone should address this issue.
15390
15391 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
15392 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
15393 files.
15394 Adjust dependencies.
15395 * src/warshall.h: New file.
15396 Propagate.
15397
340ef489
AD
153982000-10-02 Akim Demaille <akim@epita.fr>
15399
15400 Various anti-`extern in *.c' changes.
15401
15402 * src/system.h: Include `assert.h'.
15403
b2ca4022
AD
154042000-10-02 Akim Demaille <akim@epita.fr>
15405
15406 * src/state.h (nstates, final_state, first_state, first_shift)
15407 (first_reduction): Move their exportation from here...
15408 * src/LR0.h: to here.
15409 Adjust dependencies.
15410 * src/getargs.c (statisticsflag): New variable.
15411 Add support for `--statistics'.
15412 Adjust dependencies.
15413
15414 Remove a lot of now useless `extern' statements in most files.
15415
403b315b
AD
154162000-10-02 Akim Demaille <akim@epita.fr>
15417
15418 * src/LR0.h: New file.
15419 Propagate its use.
15420
07a58c13
AD
154212000-10-02 Akim Demaille <akim@epita.fr>
15422
15423 * src/print.h: New file.
15424 Propagate its use.
15425 * src/print.c: Formatting and ordering changes.
15426 (verbose, terse): Replace with...
15427 (print_results): this new function.
15428 Adjust dependencies.
15429
0619caf0
AD
154302000-10-02 Akim Demaille <akim@epita.fr>
15431
15432 * src/conflicts.c (conflict_report): New function.
15433 (conflict_log, verbose_conflict_log): Replace with...
15434 (print_conflicts): this function.
15435 Adjust dependencies.
15436 * src/conflicts.h: New file.
15437 Propagate its inclusion.
15438
3519ec76
AD
154392000-10-02 Akim Demaille <akim@epita.fr>
15440
15441 * src/nullable.h: New file.
15442 Propagate its inclusion.
15443 * src/nullable.c: Formatting changes.
15444
015acc48
AD
154452000-10-02 Akim Demaille <akim@epita.fr>
15446
15447 * src/reduce.h: New file.
15448 Propagate its inclusion.
15449 * src/reduce.c: Topological sort and other formatting changes.
15450 (bool, TRUE, FALSE): Move their definition to...
15451 * src/system.h: here.
15452
8963a27b
AD
154532000-10-02 Akim Demaille <akim@epita.fr>
15454
15455 * src/files.c: Formatting changes.
15456 (tryopen, tryclose, openfiles): Rename as...
15457 (xfopen, xfclose, open_files): this.
15458 (stringappend): static.
15459 * src/files.h: Complete the list of exported symbols.
15460 Propagate its use.
15461
a70083a3
AD
154622000-10-02 Akim Demaille <akim@epita.fr>
15463
15464 * src/reader.h: New file.
15465 Propagate its use instead of tedious list of `extern' and
15466 prototypes.
15467 * src/reader.c: Formatting changes, topological sort,
15468 s/register//.
15469
abadc117
AD
154702000-10-02 Akim Demaille <akim@epita.fr>
15471
15472 * src/lex.h: Prototype `lex.c' exported functions.
15473 * src/reader.c: Adjust.
15474 * src/lex.c: Formatting changes.
15475 (safegetc): Rename as...
15476 (xgetc): this.
15477
720d742f
AD
154782000-10-02 Akim Demaille <akim@epita.fr>
15479
15480 * src/lalr.h: New file.
15481 Propagate its inclusion instead of prototypes and `extern'.
15482 * src/lalr.c: Formatting changes, topological sorting etc.
15483
f2acea59
AD
154842000-10-02 Akim Demaille <akim@epita.fr>
15485
15486 * src/output.c (token_actions): Introduce a temporary array,
15487 YYDEFACT, that makes it possible for this function to use
15488 output_short_table.
15489
d019d655
AD
154902000-10-02 Akim Demaille <akim@epita.fr>
15491
15492 `user_toknums' is output as a `short[]' in `output.c', while it is
15493 defined as a `int[]' in `reader.c'. For consistency with the
15494 other output tables, `user_toknums' is now defined as a table of
15495 shorts.
15496
15497 * src/reader.c (user_toknums): Be a short table instead of an int
15498 table.
15499 Adjust dependencies.
15500
15501 Factor the short table outputs.
15502
15503 * src/output.c (output_short_table): New function.
15504 * src/output.c (output_gram, output_stos, output_rule_data)
15505 (output_base, output_table, output_check): Use it.
15506
6c89f1c1
AD
155072000-10-02 Akim Demaille <akim@epita.fr>
15508
15509 * src/output.c (output): Topological sort of the functions, in
15510 order to get rid of the `static' prototypes.
15511 No longer use `register'.
15512 * src/output.h: New file.
15513 Propagate its inclusion in files explicitly prototyping functions
15514 from output.c.
15515
d9efd181
AD
155162000-09-21 Akim Demaille <akim@epita.fr>
15517
15518 * src/atgeneral.m4: Update from Autoconf.
15519
c29240e7 155202000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
15521
15522 * src/closure.h: New file.
15523 * src/closure.c: Formatting changes, topological sort over the
15524 functions, use of closure.h.
15525 (initialize_closure, finalize_closure): Rename as...
15526 (new_closure, free_closure): these. Adjust dependencies.
15527 * src/LR0.c: Formatting changes, topological sort, use of
15528 cloture.h.
15529 (initialize_states): Rename as...
15530 (new_states): this.
15531 * src/Makefile.am (noinst_HEADERS): Adjust.
15532
499daa50
AD
155332000-09-20 Akim Demaille <akim@epita.fr>
15534
15535 * src/acconfig.h: Don't protect config.h against multiple
15536 inclusion.
15537 Don't define PARAMS.
15538 * src/system.h: Define PARAMS.
15539 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
15540 purpose of config.h. system.h must not try to fix wrong
15541 definitions in config.h.
15542
cc84fd5d
AD
155432000-09-20 Akim Demaille <akim@epita.fr>
15544
15545 * src/derives.h: New file.
15546 * src/main.c, src/derives.h: Use it.
15547 Formatting changes.
15548 * src/Makefile.am (noinst_HEADERS): Adjust.
15549
db5b3a89
AD
155502000-09-20 Akim Demaille <akim@epita.fr>
15551
15552 * tests/atgeneral.m4: Update from Autoconf.
15553 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
15554 (AT_CHECK_CALC): New macros.
15555 Use these macros to test bison with options `', `--raw',
15556 `--debug', `--yacc', `--yacc --debug'.
15557
ceed8467
AD
155582000-09-19 Akim Demaille <akim@epita.fr>
15559
15560 * src/output.c: Formatting changes.
15561 * src/machine.h: Remove, leaving its contents in...
15562 * src/system.h: here.
15563 Include stdio.h.
15564 Adjust all dependencies on stdio.h and machine.h.
15565 * src/getargs.h: New file.
15566 Let all `extern' declarations about getargs.c be replaced with
15567 inclusion of `getargs.h'.
15568 * src/Makefile.am (noinst_HEADERS): Adjust.
15569
15570 * tests/calc.m4 (yyin): Be initialized in main, not on the global
15571 scope.
15572 (yyerror): Returns void, not int.
15573 * doc/bison.texinfo: Formatting changes.
15574
05a1d24b
AD
155752000-09-19 Akim Demaille <akim@epita.fr>
15576
15577 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
15578 portable.
15579
cbd25751
AD
155802000-09-18 Akim Demaille <akim@epita.fr>
15581
15582 * configure.in: Append WARNING_CFLAGS to CFLAGS.
15583 * src/Makefile.am (INCLUDES): Don't.
15584 Be ready to fetch headers in lib/.
15585
13863333
AD
155862000-09-18 Akim Demaille <akim@epita.fr>
15587
15588 * doc/bison.texinfo: Update the copyright.
15589 ANSIfy and GNUify the examples.
15590 Remove the old menu.
15591
0d533154
AD
155922000-09-18 Akim Demaille <akim@epita.fr>
15593
15594 First set of tests: use the `calc' example from the documentation.
15595
15596 * src/bison.s1 (yyparse): Condition the code using `yytname' which
15597 is defined only when YYDEBUG is.
15598 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
15599 * src/files.c (tryopen, tryclose): Formatting changes.
15600 Move to the top and be static.
15601 * src/reader.c (read_signed_integer): Likewise.
15602 * tests/calc.m4: New file.
15603 * Makefile.am, suite.m4: Adjust.
15604 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
15605
e79137ac
AD
156062000-09-18 Akim Demaille <akim@epita.fr>
15607
15608 Add support for an Autotest test suite for Bison.
15609
15610 * m4/m4.m4, m4/atconfig.m4: New files.
15611 * m4/Makefile.am (EXTRA_DIST): Adjust.
15612 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
15613 files.
15614 * src/getargs.c: Display a more standard --version message.
15615 * src/reader.c (reader): Formatting changes.
15616 No longer depend upon VERSION_STRING.
15617 * configure.in: No longer use `dnl'.
15618 Set up the test suite and the new directory `tests/.
15619 (VERSION_STRING): Remove.
15620
27821bff
AD
156212000-04-14 Akim Demaille <akim@epita.fr>
15622
15623 * src/reader.c (copy_comment2): New function, same as former
15624 `copy_comment', but outputs into two FILE *.
15625 (copy_comment): Use it.
15626 (parse_union_decl): Use it.
15627 (get_type, parse_start_decl): Use the same `invalid' message.
15628 (parse_start_decl, parse_union_decl): Use the same `multiple'
15629 message.
15630 (parse_union_decl, copy_guard, copy_action): Use the same
15631 `unmatched' message.
15632 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
15633
cfe5fbc0
AD
156342000-03-31 Akim Demaille <akim@epita.fr>
15635
15636 * src/files.c (tryopen, tryclose): Move to the top.
15637 Be static.
15638
cb7db13e
AD
156392000-03-31 Akim Demaille <akim@epita.fr>
15640
15641 * src/main.c (main): Don't call `done', exit does it.
15642
a0f6b076
AD
156432000-03-31 Akim Demaille <akim@epita.fr>
15644
36281465
AD
15645 * allocate.c: s/return (foo)/return foo/.
15646 * lalr.c: Likewise.
15647 * LR0.c: Likewise.
15648 * output.c: Likewise.
15649 * reader.c: Likewise.
15650 * symtab.c: Likewise.
15651 * vmsgetargs.c: Likewise.
15652
156532000-03-31 Akim Demaille <akim@epita.fr>
15654
15655 Clean up the error reporting functions.
a0f6b076
AD
15656
15657 * src/report.c: New file.
15658 * src/report.h: Likewise.
15659 * src/Makefile.am: Adjust.
15660 * m4/error.m4: New file.
15661 * m4/Makefile.am: Adjust.
15662 * configure.in (jm_PREREQ_ERROR): Call it.
15663 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
15664 Remove.
15665 (fatal, fatals): Remove. All callers use complain.c::fatal.
15666 (warn, warni, warns, warnss, warnss): Remove. All callers use
15667 complain.c::complain.
15668 (toomany): Remove, use fatal instead.
15669 * src/files.c (done): No argument, use complain_message_count.
15670 * src/main.c (main): Register `done' to `atexit'.
15671
15672 * src/getargs.c (usage): More `fputs', less `fprintf'.
15673
18539825
AD
156742000-03-28 Akim Demaille <akim@epita.fr>
15675
15676 * lib/: New directory.
15677 * Makefile.am (SUBDIRS): Adjust.
15678 * configure.in: Adjust.
15679 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
15680 useless.
15681 * src/alloca.c: Moved to lib/.
15682 * src/getopt.c: Likewise.
15683 * src/getopt1.c: Likewise.
15684 * src/getopt.h: Likewise.
15685 * src/ansi2knr.c: Likewise.
15686 * src/ansi2knr.1: Likewise.
15687 * src/Makefile.am: Adjust.
15688 * lib/Makefile.am: New file.
15689
9f306f2a
AD
156902000-03-28 Akim Demaille <akim@epita.fr>
15691
15692 * src/getargs.c (usage): Refresh the help message.
15693
0ba347b6
AD
156942000-03-17 Akim Demaille <akim@epita.fr>
15695
15696 * src/getopt1.c: Updated from textutils 2.0e
15697 * src/getopt.c: Likewise.
15698 * src/getopt.h: Likewise.
15699
dbe7f271
AD
157002000-03-17 Akim Demaille <akim@epita.fr>
15701
15702 * src/Makefile.am (bison.simple): Fix the awk program: quote only
15703 the file name, not the whole `#line LINE FILE'.
15704
75bbe78d
AD
157052000-03-17 Akim Demaille <akim@epita.fr>
15706
15707 On syntax errors, report the token on which we choked.
15708
aa5fd0ee
AD
15709 * src/bison.s1 (yyparse): In the label yyerrlab, when
15710 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 15711
7b306f52
AD
157122000-03-17 Akim Demaille <akim@epita.fr>
15713
aa5fd0ee 15714 * src/reader.c (copy_at): New function.
7b306f52
AD
15715 (copy_guard): Use it.
15716 (copy_action): Use it.
15717
e87b5700
AD
157182000-03-17 Akim Demaille <akim@epita.fr>
15719
15720 Be kind to translators, save some useless translations.
15721
aa5fd0ee 15722 * src/main.c (banner): New function.
e87b5700
AD
15723 (fatal_banner): Use it.
15724 (warn_banner): Use it.
15725
ae3c3164
AD
157262000-03-17 Akim Demaille <akim@epita.fr>
15727
aa5fd0ee
AD
15728 * src/reader.c (copy_definition): Use copy_string and
15729 copy_comment. Removed now unused `match', `ended',
15730 `cplus_comment'.
ae3c3164
AD
15731 (copy_comment, copy_string): Moved, to be visible from
15732 copy_definition.
15733
4dc58e7c
AD
157342000-03-17 Akim Demaille <akim@epita.fr>
15735
aa5fd0ee
AD
15736 * src/reader.c (copy_string): Declare `static inline'. No
15737 problems with inline, since it is checked by configure.
4dc58e7c
AD
15738 (copy_comment): Likewise.
15739
0a6384c4
AD
157402000-03-17 Akim Demaille <akim@epita.fr>
15741
aa5fd0ee 15742 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 15743
3cef001a
AD
157442000-03-17 Akim Demaille <akim@epita.fr>
15745
aa5fd0ee 15746 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
15747 (copy_action): Use it. Removed now unused `match', `ended',
15748 `cplus_comment'.
15749 (copy_guard): Likewise.
15750
ca36d2ef
AD
157512000-03-17 Akim Demaille <akim@epita.fr>
15752
aa5fd0ee 15753 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
15754 (copy_action): Use it.
15755 (copy_guard): Likewise.
15756
6666f98f
AD
157572000-03-17 Akim Demaille <akim@epita.fr>
15758
15759 Change the handling of @s so that they behave exactly like $s.
15760 There is now a pseudo variable @$ (readble and writable), location
15761 of the lhs of the rule (by default ranging from the location of
15762 the first symbol of the rhs, to the location of the last symbol,
15763 or, if the rhs is empty, YYLLOC).
15764
15765 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
15766 yyval.
15767 (yyparse): When providing a default semantic action, provide a
15768 default location action.
15769 (after the $): No longer change `*YYLSP', just stack YYLOC the
15770 same way you stack YYVAL.
15771 * src/reader.c (read_declarations): Use warns.
15772 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
15773 (copy_action, case '@'): Likewise.
15774 Use a standard error message, to save useless work from
15775 translators.
15776
41aca2e0
AD
157772000-03-17 Akim Demaille <akim@epita.fr>
15778
aa5fd0ee
AD
15779 * src/bison.s1: Formatting and cosmetics changes.
15780 * src/reader.c: Likewise.
41aca2e0
AD
15781 Update the Copyright notice.
15782
dc08c1d5
AD
157832000-03-17 Akim Demaille <akim@epita.fr>
15784
aa5fd0ee
AD
15785 * src/bison.s1 (#line): All set to `#line' only, since the
15786 Makefile now handles them.
dc08c1d5 15787
9ee3c97b
AD
157882000-03-16 Akim Demaille <akim@epita.fr>
15789
15790 * src/output.c (output_rule_data): Output the documentation of
15791 some of the tables.
15792 (Copyright notice): Update.
15793 Formatting changes.
15794
0de741ca
AD
157952000-03-16 Akim Demaille <akim@epita.fr>
15796
15797 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
15798 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
15799 One `#if YYDEBUG' remains, since it uses variables which are
15800 defined only if `YYDEBUG != 0'.
15801
bb10be54
AD
158022000-03-16 Akim Demaille <akim@epita.fr>
15803
15804 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
15805 and related variables so that the similarities are highlighted.
15806
b07b484a
AD
158072000-03-16 Akim Demaille <akim@epita.fr>
15808
15809 * src/bison.s1: Properly indent CPP directives.
15810
361f60b3
AD
158112000-03-16 Akim Demaille <akim@epita.fr>
15812
15813 * src/bison.s1: Properly indent the `alloca' CPP section.
15814
8c44d3ec
AD
158152000-03-16 Akim Demaille <akim@epita.fr>
15816
15817 Do not hard code values of directories in `configure.in'.
15818 Update the `configure' tool chain.
15819
15820 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
15821 src/makefile.am.
15822 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
15823 (AC_OUTPUT): Add m4/Makefile.
15824 Bump to bison 1.28a, 1.29 has never been released.
15825 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
15826 handled via src/Makefile.am.
15827 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
15828 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
15829 autoheader.
15830 * Makefile.am (SUBDIRS): Add m4.
15831 (ACLOCAL_AM_FLAGS): New variable.
15832 (AUTOMAKE_OPTIONS): Add check-news.
15833 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
15834 the proper line number and file name.
15835 (DEFS): Propagate the location of bison library files and of the
15836 locale files.
15837 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
15838 builddir.
15839 * acinclude.m4: Remove, replaced by the directory m4.
15840 * m4/Makefile.am (EXTRA_DIST): New variable.
15841 * m4/gettext.m4: New file, from the fileutils.
15842 * m4/lcmessage.m4: Likewise
15843 * m4/progtest.m4: Likewise.
15844 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
15845
f95997e7
AD
158462000-03-10 Akim Demaille <akim@epita.fr>
15847
15848 * src/closure.c:
15849 Formatting changes of various comments.
15850 Respect the GNU coding standards at various places.
15851 Don't use `_()' when no translation is needed.
15852
158531999-12-13 Jesse Thilo <jthilo@gnu.org>
15854
15855 * src/files.c:
15856 OS/2 honors TMPDIR environment variable.
15857
158581999-12-13 Jesse Thilo <jthilo@gnu.org>
15859
15860 * doc/bison.texinfo: Tweaked spelling and grammar.
15861 Updated ISBN.
15862 Removed reference to price of printed copy.
15863 Mention BISON_SIMPLE and BISON_HAIRY.
15864
158651999-12-13 Jesse Thilo <jthilo@gnu.org>
15866
15867 * configure.in, NEWS:
15868 Bison 1.29 released.
15869
158701999-10-27 Jesse Thilo <jthilo@gnu.org>
15871
15872 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
15873 Added reference card.
15874
158751999-07-26 Jesse Thilo <jthilo@gnu.org>
15876
15877 * po/ru.po: Added Russian translation.
15878
158791999-07-26 Jesse Thilo <jthilo@gnu.org>
15880
15881 * configure.in: Added Russian translation.
15882
158831999-07-06 Jesse Thilo <jthilo@gnu.org>
15884
15885 * configure.in, NEWS, README:
15886 Released version 1.28.
15887
158881999-06-14 Jesse Thilo <jthilo@gnu.org>
15889
15890 * src/system.h:
15891 Squashed redefinition warning on some systems.
15892
15893 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
15894 Have configure build version string instead of relying on ANSI string
15895 concatentation.
15896
158971999-06-14 Jesse Thilo <jthilo@gnu.org>
15898
15899 * po/POTFILES.in: Got rid of version.c.
15900
159011999-06-14 Jesse Thilo <jthilo@gnu.org>
15902
15903 * acconfig.h, configure.in:
15904 Have configure build version string instead of relying on ANSI string
15905 concatentation.
15906
159071999-06-08 Jesse Thilo <jthilo@gnu.org>
15908
15909 * doc/bison.1:
15910 Dropped mention of `+' for long-named options.
15911
159121999-05-30 Jesse Thilo <jthilo@gnu.org>
15913
15914 * src/files.c: Added <unistd.h> for unlink().
15915
15916 * src/Makefile.am, src/system.h:
15917 I18n fixes.
15918
159191999-05-30 Jesse Thilo <jthilo@gnu.org>
15920
15921 * README: Added a FAQ list.
15922
15923 * configure.in, acconfig.h:
15924 I18n fixes.
15925
159261999-05-30 Jesse Thilo <jthilo@gnu.org>
15927
15928 * doc/FAQ, doc/Makefile.am:
15929 Added a FAQ list.
15930
159311999-05-19 Jesse Thilo <jthilo@gnu.org>
15932
15933 * src/alloc.h, src/symtab.h, src/version.c:
15934 Protected inclusion of "config.h" with HAVE_CONFIG_H.
15935
159361999-04-18 Jesse Thilo <jthilo@gnu.org>
15937
15938 * src/.cvsignore, src/Makefile.am:
15939 Reorganized: sources in `src', documentation in `doc'.
15940
15941 * src/lex.c (literalchar):
15942 fixed the code for escaping double quotes (thanks
15943 Jonathan Czisny.)
15944
159451999-04-18 Jesse Thilo <jthilo@gnu.org>
15946
15947 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
15948 Adjusted paths to reflect directory reorganization.
15949
159501999-04-18 Jesse Thilo <jthilo@gnu.org>
15951
15952 * doc/.cvsignore, doc/Makefile.am:
15953 Reorganized: sources in `src', documentation in `doc'.
15954
159551999-04-18 Jesse Thilo <jthilo@gnu.org>
15956
15957 * configure.in:
15958 Updated AC_INIT file to reflect directory reorganization.
15959
15960 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
15961 Reorganized: sources in `src', documentation in `doc'.
15962
159631999-04-13 Jesse Thilo <jthilo@gnu.org>
15964
15965 * src/allocate.c:
15966 Don't declare calloc() and realloc() if not necessary.
15967
159681999-04-13 Jesse Thilo <jthilo@gnu.org>
15969
15970 * configure.in, acconfig.h, acinclude.m4:
15971 Don't declare calloc() and realloc() if not necessary.
15972
159731999-03-23 Jesse Thilo <jthilo@gnu.org>
15974
15975 * po/.cvsignore: Added i18n support.
15976
159771999-03-23 Jesse Thilo <jthilo@gnu.org>
15978
15979 * acconfig.h, configure.in, Makefile.am:
15980 Added i18n support.
15981
159821999-03-22 Jesse Thilo <jthilo@gnu.org>
15983
15984 * src/bison.s1: Fixed #line numbers.
15985
159861999-03-15 Jesse Thilo <jthilo@gnu.org>
15987
15988 * po/es.po, po/fr.po, po/nl.po, po/de.po:
15989 Added PO files from Translation Project.
15990
159911999-03-03 Jesse Thilo <jthilo@gnu.org>
15992
15993 * Makefile.am:
15994 Added support for non-ANSI compilers (ansi2knr).
15995
159961999-02-16 Jesse Thilo <jthilo@gnu.org>
15997
15998 * configure.in: Bumped version number to 1.27.
15999
16000 * Makefile.am:
16001 Added `bison.simple' to list of files removed by `make distclean'.
16002
160031999-02-12 Jesse Thilo <jthilo@gnu.org>
16004
16005 * src/files.c, src/files.h:
16006 Defined locations of parser files in config.h instead of Makefile.
16007
160081999-02-12 Jesse Thilo <jthilo@gnu.org>
16009
16010 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
16011 Defined locations of parser files in config.h instead of Makefile.
16012
160131999-02-09 Jesse Thilo <jthilo@gnu.org>
16014
16015 * Makefile.am:
16016 Removed inappropriate use of $< macro.
16017
160181999-02-05 Jesse Thilo <jthilo@gnu.org>
16019
16020 * po/Makefile.in.in, po/POTFILES.in:
16021 Add `po' directory skeleton.
16022
160231999-01-27 Jesse Thilo <jthilo@gnu.org>
16024
16025 * README: Document help-bison list.
16026
16027 * configure.in: Add check for mkstemp().
16028
160291999-01-20 Jesse Thilo <jthilo@gnu.org>
16030
16031 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
16032 Hush a few compiler warnings.
16033
16034 * src/files.c:
16035 Add tryclose(), which verifies that fclose was successful.
16036 Hush a couple of compiler warnings.
16037
160381999-01-20 Jesse Thilo <jthilo@gnu.org>
16039
16040 * Makefile.am, OChangeLog:
16041 ChangeLog is now automatically generated. Include the old version as
16042 OChangeLog.
16043
160441999-01-14 Jesse Thilo <jthilo@gnu.org>
16045
16046 * src/gram.h, src/lalr.c, src/lex.c, src/lex.h, src/machine.h, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/state.h, src/symtab.c, src/symtab.h, src/types.h, src/vmsgetargs.c, src/warshall.c, src/allocate.c, src/alloc.h, src/bison.s1, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/files.h, src/getargs.c, src/gram.c, src/LR0.c:
16047 Update FSF address.
16048
160491999-01-14 Jesse Thilo <jthilo@gnu.org>
16050
16051 * doc/bison.texinfo: Fix formatting glitch.
16052
16053 * doc/bison.texinfo: Update FSF address.
16054
160551999-01-14 Jesse Thilo <jthilo@gnu.org>
16056
16057 * acconfig.h: Update FSF address.
16058
160591999-01-08 Jesse Thilo <jthilo@gnu.org>
16060
16061 * src/system.h:
16062 Don't define PACKAGE here, since config.h defines it.
16063
160641998-12-30 Jesse Thilo <jthilo@gnu.org>
16065
16066 * src/reader.c: Update copyright date.
16067
16068 * src/main.c:
16069 Ditch sprintf to statically-sized buffers in fatal/warn functions in
16070 favor of output directly to stderr (avoids buffer overruns).
16071
16072 * src/reader.c: Some checks for premature EOF.
16073
16074 * src/allocate.c, src/alloc.h, src/closure.c, src/conflicts.c, src/derives.c, src/getargs.c, src/gram.c, src/lalr.c, src/lex.c, src/LR0.c, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reduce.c, src/symtab.c, src/symtab.h, src/warshall.c:
16075 Use prototypes if the compiler understands them.
16076
16077 * src/files.c: Honor TMPDIR on Unix hosts.
16078 Use prototypes if the compiler understands them.
16079
16080 * src/reader.c:
16081 Fix a couple of buffer overrun bugs.
16082 Use prototypes if the compiler understands them.
16083
16084 * src/system.h: Include unistd.h and ctype.h.
16085 Use #ifdef instead of #if for NLS symbols.
16086
160871998-12-30 Jesse Thilo <jthilo@gnu.org>
16088
16089 * doc/bison.texinfo:
16090 Delete comment "consider using @set for edition number, etc..." since
16091 we now are doing so.
16092
160931998-12-30 Jesse Thilo <jthilo@gnu.org>
16094
16095 * configure.in:
16096 Use prototypes if the compiler understands them.
16097
16098 * NEWS: Document 1.26 highlights.
16099
16100 * Makefile.am: Require Automake 1.3 or later.
16101
16102 * acconfig.h:
16103 Use prototypes if the compiler understands them.
16104
161051998-12-29 Jesse Thilo <jthilo@gnu.org>
16106
16107 * src/version.c:
16108 Use VERSION symbol from automake for version number.
16109
161101998-12-29 Jesse Thilo <jthilo@gnu.org>
16111
16112 * acconfig.h, configure.in, version.cin:
16113 Use VERSION symbol from automake for version number.
16114
161151998-11-28 Jesse Thilo <jthilo@gnu.org>
16116
16117 * Makefile.am:
16118 Distribute original version of simple parser (bison.s1), not built
16119 version (bison.simple).
16120
161211998-11-28 Jesse Thilo <jthilo@gnu.org>
16122
16123 * doc/bison.texinfo: Add info dir entry.
16124
16125 * doc/bison.texinfo:
16126 Let automake put version number into documentation.
16127
161281998-11-26 Jesse Thilo <jthilo@gnu.org>
16129
16130 * src/bison.cld, src/build.com, src/vmshlp.mar:
16131 Add non-RCS files from /gd/gnu/bison.
16132
161331998-11-26 Jesse Thilo <jthilo@gnu.org>
16134
16135 * doc/bison.1:
16136 Document the BISON_HAIRY and BISON_SIMPLE variables.
16137
161381998-11-25 Jesse Thilo <jthilo@gnu.org>
16139
16140 * src/version.c: Build version.c automatically.
16141
16142 * src/reader.c:
16143 Fix token numbering (used to start at 258, not 257).
16144
16145 * src/system.h: Include config.h.
16146
16147 * src/getargs.c: Update bug report address.
16148
16149 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
16150 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
16151
161521998-11-25 Jesse Thilo <jthilo@gnu.org>
16153
16154 * Makefile.am:
16155 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16156
16157 * configure.in, version.cin:
16158 Build version.c automatically.
16159
16160 * AUTHORS: Add AUTHORS file.
16161
16162 * README: Update bug report address.
16163
16164 * bison.simple:
16165 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16166
16167 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
16168 Add automake stuff.
16169
161701998-11-25 Jesse Thilo <jthilo@gnu.org>
16171
16172 * doc/bison.texinfo: Clean up some formatting.
16173
161741998-05-05 Richard Stallman <rms@gnu.org>
16175
16176 * doc/bison.texinfo:
16177 Explain better why to make a pure parser.
16178
161791998-01-05 Richard Stallman <rms@gnu.org>
16180
16181 * src/files.c (openfiles):
16182 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
16183 find a temporary directory, if possible. Do not unlink files while
16184 they are open.
16185
161861997-08-25 Richard Stallman <rms@gnu.org>
16187
16188 * src/reader.c (stack_offset;):
16189 Change some warni to warns.
16190
16191 * src/lex.c (literalchar): Use warns, not warni.
16192
161931997-06-28 Richard Stallman <rms@gnu.org>
16194
16195 * src/bison.s1: Add a Bison version comment.
16196
16197 * src/main.c (fatal, warn, berror):
16198 Use program_name.
16199
162001997-06-28 Richard Stallman <rms@gnu.org>
16201
16202 * Makefile.in (bison_version): New variable.
16203 (dist): Use that variable.
16204 (bison.s1): Substitute the Bison version into bison.simple.
16205
16206 * bison.simple: Add a Bison version comment.
16207
162081997-06-18 Richard Stallman <rms@gnu.org>
16209
16210 * src/main.c (fatal, warn, berror):
16211 Make error messages standard.
16212 (toomany): Improve error message text.
16213
16214 * src/LR0.c, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/lalr.c, src/lex.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/symtab.c:
16215 new.h renamed to alloc.h.
16216
162171997-06-18 Richard Stallman <rms@gnu.org>
16218
16219 * Makefile.in: new.h renamed to alloc.h.
16220
162211997-05-24 Richard Stallman <rms@gnu.org>
16222
16223 * src/lex.c (literalchar):
16224 Fix the code for escaping \, " and '.
16225
16226 (lex): Avoid trouble when there are many chars
16227 to discard in a char literal with just several chars in it.
16228
162291997-05-17 Richard Stallman <rms@gnu.org>
16230
16231 * src/bison.s1:
16232 Use malloc, if using alloca is troublesome.
16233 (YYSTACK_USE_ALLOCA): New flag macro.
16234 Define it for some systems and compilers.
16235 (YYSTACK_ALLOC): New macro.
16236 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16237 If it was malloc'd, free it.
16238
162391997-05-17 Richard Stallman <rms@gnu.org>
16240
16241 * bison.simple:
16242 Use malloc, if using alloca is troublesome.
16243 (YYSTACK_USE_ALLOCA): New flag macro.
16244 Define it for some systems and compilers.
16245 (YYSTACK_ALLOC): New macro.
16246 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16247 If it was malloc'd, free it.
16248
162491997-04-23 Richard Stallman <rms@gnu.org>
16250
16251 * src/bison.s1:
16252 (alloca) [__hpux]: Always define as __builtin_alloca.
16253
162541997-04-23 Richard Stallman <rms@gnu.org>
16255
16256 * bison.simple:
16257 (alloca) [__hpux]: Always define as __builtin_alloca.
16258
162591997-04-22 Richard Stallman <rms@gnu.org>
16260
16261 * src/bison.s1:
16262 [__hpux]: Include alloca.h (right for HPUX 10)
16263 instead of declaring alloca (right for HPUX 9).
16264
16265 * src/bison.s1 (__yy_memcpy):
16266 Declare arg `count' as unsigned int.
16267 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16268
162691997-04-22 Richard Stallman <rms@gnu.org>
16270
16271 * bison.simple:
16272 [__hpux]: Include alloca.h (right for HPUX 10)
16273 instead of declaring alloca (right for HPUX 9).
16274
16275 * bison.simple (__yy_memcpy):
16276 Declare arg `count' as unsigned int.
16277 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16278
162791997-01-03 Richard Stallman <rms@gnu.org>
16280
16281 * src/allocate.c: [__STDC__ or _MSC_VER]:
16282 Declare calloc and realloc to return void *.
16283
162841997-01-02 Richard Stallman <rms@gnu.org>
16285
16286 * src/system.h:
16287 [_MSC_VER]: Include stdlib.h and process.h.
16288 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
16289
16290 * src/main.c (main): Return FAILURE as a value.
16291 (printable_version): Declare arg as int, not char.
16292
162931997-01-02 Richard Stallman <rms@gnu.org>
16294
16295 * Makefile.in (dist):
16296 Explicitly check for symlinks, and copy them.
16297
162981996-12-19 Richard Stallman <rms@gnu.org>
16299
16300 * src/files.c:
16301 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
16302
163031996-12-18 Paul Eggert <eggert@gnu.org>
16304
16305 * src/bison.s1 (yyparse):
16306 If __GNUC__ and YYPARSE_PARAM are both defined,
16307 declare yyparse to have a void * argument.
16308
163091996-12-18 Paul Eggert <eggert@gnu.org>
16310
16311 * bison.simple (yyparse):
16312 If __GNUC__ and YYPARSE_PARAM are both defined,
16313 declare yyparse to have a void * argument.
16314
163151996-12-17 Richard Stallman <rms@gnu.org>
16316
16317 * src/reduce.c (nbits): Add some casts.
16318
163191996-08-12 Richard Stallman <rms@gnu.org>
16320
16321 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
16322
163231996-08-12 Richard Stallman <rms@gnu.org>
16324
16325 * bison.simple: Test _MSDOS as well as _MSDOS_.
16326
163271996-07-31 Richard Stallman <rms@gnu.org>
16328
16329 * src/bison.s1:
16330 [__sun && __i386]: Include alloca.h.
16331
163321996-07-31 Richard Stallman <rms@gnu.org>
16333
16334 * bison.simple:
16335 [__sun && __i386]: Include alloca.h.
16336
163371996-07-30 Richard Stallman <rms@gnu.org>
16338
16339 * src/bison.s1: Comment change.
16340
16341 * src/bison.s1: Test _MSDOS_, not MSDOS.
16342
163431996-07-30 Richard Stallman <rms@gnu.org>
16344
16345 * bison.simple: Comment change.
16346
16347 * bison.simple: Test _MSDOS_, not MSDOS.
16348
163491996-06-01 Richard Stallman <rms@gnu.org>
16350
16351 * src/reduce.c, src/reader.c, src/print.c, src/output.c, src/nullable.c, src/lex.c, src/lalr.c, src/getargs.c, src/derives.c, src/conflicts.c, src/closure.c, src/allocate.c:
16352 Insert `_' macro around many string constants.
16353
16354 * src/main.c:
16355 Insert `_' macro around many string constants.
16356
16357 (main): Call setlocale, bindtextdomain and textdomain.
16358
16359 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
16360 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
16361 [ENABLE_NLS]: Include libintl.h.
16362 [ENABLE_NLS] (gettext): Define.
16363 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
16364 (N_, PACKAGE, LOCALEDIR): New macros.
16365
163661996-06-01 Richard Stallman <rms@gnu.org>
16367
16368 * POTFILES.in: New file.
16369
16370 * Makefile.in (allocate.o):
16371 Define target explicitly.
16372
16373 * Makefile.in (CFLAGS): Set to @CFLAGS@.
16374 (LDFLAGS): Set to @LDFLAGS@.
16375 (configure): Run autoconf only if preceding `cd' succeeds.
16376 (bison.s1): Redirect output to temporary file then move the
16377 temporary to the target, rather than redirecting directly to bison.s1.
16378 (clean): Remove config.status and config.log.
16379 (distclean): Don't remove config.status here.
16380
163811996-05-12 Richard Stallman <rms@gnu.org>
16382
16383 * src/bison.s1:
16384 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16385
163861996-05-12 Richard Stallman <rms@gnu.org>
16387
16388 * bison.simple:
16389 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16390
163911996-05-11 Richard Stallman <rms@gnu.org>
16392
16393 * src/bison.s1 (__yy_memcpy):
16394 Really reorder the args, as was supposedly done on Feb 14 1995.
16395 (yyparse): Calls changed accordingly.
16396
163971996-05-11 Richard Stallman <rms@gnu.org>
16398
16399 * Makefile.in (dist): Don't use $(srcdir).
16400
16401 * bison.simple (__yy_memcpy):
16402 Really reorder the args, as was supposedly done on Feb 14 1995.
16403 (yyparse): Calls changed accordingly.
16404
164051996-01-27 Richard Stallman <rms@gnu.org>
16406
16407 * src/output.c (output_rule_data):
16408 Test YYERROR_VERBOSE in the conditional
16409 around the definition of ttyname.
16410
164111995-12-29 Richard Stallman <rms@gnu.org>
16412
16413 * src/bison.s1:
16414 Fix line numbers in #line commands.
16415
164161995-12-29 Richard Stallman <rms@gnu.org>
16417
16418 * bison.simple:
16419 Fix line numbers in #line commands.
16420
164211995-12-27 Richard Stallman <rms@gnu.org>
16422
16423 * src/bison.s1 (YYPARSE_PARAM_DECL):
16424 In C++, make it always null.
16425 (YYPARSE_PARAM_ARG): New macro.
16426 (yyparse): Use YYPARSE_PARAM_ARG.
16427
164281995-12-27 Richard Stallman <rms@gnu.org>
16429
16430 * bison.simple (YYPARSE_PARAM_DECL):
16431 In C++, make it always null.
16432 (YYPARSE_PARAM_ARG): New macro.
16433 (yyparse): Use YYPARSE_PARAM_ARG.
16434
164351995-11-29 Richard Stallman <rms@gnu.org>
16436
16437 * doc/bison.texinfo:
16438 Describe literal string tokens, %raw, %no_lines, %token_table.
16439
164401995-11-29 Daniel Hagerty <hag@gnu.org>
16441
16442 * doc/bison.texinfo: Fixed update date
16443
164441995-10-16 Richard Stallman <rms@gnu.org>
16445
16446 * src/version.c: Version 1.25.
16447
164481995-10-16 Richard Stallman <rms@gnu.org>
16449
16450 * NEWS: *** empty log message ***
16451
164521995-10-16 Richard Stallman <rms@gnu.org>
16453
16454 * doc/bison.1, doc/bison.rnh:
16455 Add new options.
16456
164571995-10-15 Richard Stallman <rms@gnu.org>
16458
16459 * src/vmsgetargs.c, src/getargs.c:
16460 Added -n, -k, and -raw switches.
16461 (noparserflag, toknumflag, rawtoknumflag): New variables.
16462
16463 * src/symtab.h (SALIAS):
16464 New #define for adding aliases to %token.
16465 (struct bucket): Added `alias' field.
16466
16467 * src/reduce.c (reduce_grammar):
16468 Revise error message.
16469 (print_notices): Remove final `.' from error message.
16470
16471 * src/reader.c (reader_output_yylsp):
16472 New function.
16473 (readgram): Use `#if 0' around code that accepted %command
16474 inside grammar rules: The documentation doesn't allow it,
16475 and it will fail since the %command processors scan for the next %.
16476 (parse_token_decl): Extended the %token
16477 declaration to allow a multi-character symbol as an alias.
16478 (parse_thong_decl): New function.
16479 (read_declarations): Added %thong declarations.
16480 (read_declarations): Handle NOOP to deal with allowing
16481 % declarations as another means to specify the flags.
16482 (readgram): Allow %prec prior to semantics embedded in a rule.
16483 (skip_to_char, read_declarations, copy_definition)
16484 (parse_token_decl, parse_start_decl, parse_type_decl)
16485 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
16486 (get_type_name, copy_guard, copy_action, readgram)
16487 (get_type, packsymbols): Revised most error messages.
16488 Changed `fatal' to `warnxxx' to avoid aborting for error.
16489 Revised and use multiple warnxxx functions to avoid using VARARGS1.
16490 (read_declarations): Improve the error message for
16491 an invalid character. Do not abort.
16492 (read_declarations, copy_guard, copy_action): Use
16493 printable_version to avoid unprintable characters in printed output.
16494 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
16495 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
16496 Allow the type of a non-terminal can be given
16497 more than once, as long as all specifications give the same type.
16498
16499 * src/output.c:
16500 (output_headers, output_trailers, output, output_gram)
16501 (output_rule_data): Implement noparserflag variable.
16502 Implement toknumflag variable.
16503 (output): Call reader_output_yylsp to output LTYPESTR.
16504
16505 * src/main.c (main):
16506 If reader sees an error, don't process the grammar.
16507 (fatals): Updated to not use VARARGS1.
16508 (printable_version, int_to_string, warn, warni, warns, warnss)
16509 (warnsss): New error reporting functions. Avoid abort for error.
16510
16511 * src/lex.h:
16512 Added THONG and NOOP for alias processing.
16513 Added SETOPT for the new code that allows setting options with %flags.
16514
16515 * src/lex.c:
16516 Include getopt.h. Add some extern decls.
16517 (safegetc): New function to deal with EOF gracefully.
16518 (literalchar); new function to deal with reading \ escapes.
16519 (lex): Use literalchar.
16520 (lex): Implemented "..." tokens.
16521 (literalchar, lex, parse_percent_token): Made tokenbuffer
16522 always contain the token. This includes growing the token
16523 buffer while reading an integer.
16524 (parse_percent_token): Replaced if-else statement with percent_table.
16525 (parse_percent_token): Added % declarations as another
16526 way to specify the flags -n, -l, and -r. Also added hooks for
16527 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
16528 major changes to files.c.
16529 (lex) Retain in the incoming stream a character following
16530 an incorrect '/'.
16531 (skip_white_space, lex): Revised most error messages
16532 and changed fatal to warn to avoid aborting.
16533 (percent_table): Added %thong declarations.
16534
16535 * src/gram.h: Comment changes.
16536
16537 * src/files.c (openfiles, open_extra_files, done):
16538 Add faction flag
16539 and actfile file. Handle noparserflag. Both for -n switch.
16540
16541 * src/conflicts.c (resolve_sr_conflict):
16542 Remove use of alloca.
16543
165441995-06-01 Jim Meyering <meyering@gnu.org>
16545
16546 * doc/bison.texinfo: *** empty log message ***
16547
165481995-05-06 Richard Stallman <rms@gnu.org>
16549
16550 * src/bison.s1: Comment change.
16551
165521995-05-06 Richard Stallman <rms@gnu.org>
16553
16554 * bison.simple: Comment change.
16555
165561995-05-03 Richard Stallman <rms@gnu.org>
16557
16558 * src/version.c: Version now 1.24.
16559
16560 * src/bison.s1: Change distribution terms.
16561
16562 * src/version.c: Version now 1.23.
16563
165641995-05-03 Richard Stallman <rms@gnu.org>
16565
16566 * doc/bison.texinfo:
16567 Rewrite "Conditions for Using Bison".
16568 Update version to 1.24.
16569
165701995-05-03 Richard Stallman <rms@gnu.org>
16571
16572 * bison.simple: Change distribution terms.
16573
165741995-02-23 Richard Stallman <rms@gnu.org>
16575
16576 * src/files.c: Test __VMS_POSIX as well as VMS.
16577
165781995-02-14 Jim Meyering <meyering@gnu.org>
16579
16580 * src/bison.s1 (__yy_memcpy):
16581 Renamed from __yy_bcopy to avoid
16582 confusion. Reverse FROM and TO arguments to be consistent with
16583 those of memcpy.
16584
165851995-02-14 Jim Meyering <meyering@gnu.org>
16586
16587 * bison.simple (__yy_memcpy):
16588 Renamed from __yy_bcopy to avoid
16589 confusion. Reverse FROM and TO arguments to be consistent with
16590 those of memcpy.
16591
165921994-11-10 David J. MacKenzie <djm@gnu.org>
16593
16594 * NEWS: reformat
16595
16596 * NEWS: New file.
16597
16598 * Makefile.in (DISTFILES): Include NEWS.
16599
16600 * Makefile.in (DISTFILES):
16601 Include install-sh, not install.sh.
16602
16603 * configure.in: Update to Autoconf v2 macro names.
16604
166051994-10-05 David J. MacKenzie <djm@gnu.org>
16606
16607 * Makefile.in: fix typo
16608
16609 * Makefile.in (prefix, exec_prefix):
16610 Let configure set them.
16611
166121994-09-28 David J. MacKenzie <djm@gnu.org>
16613
16614 * Makefile.in: Set datadir to $(prefix)/share.
16615
166161994-09-15 Richard Stallman <rms@gnu.org>
16617
16618 * src/bison.s1:
16619 Update copyright notice and GPL version.
16620
166211994-09-15 Richard Stallman <rms@gnu.org>
16622
16623 * bison.simple:
16624 Update copyright notice and GPL version.
16625
166261994-07-12 Richard Stallman <rms@gnu.org>
16627
16628 * src/reduce.c, src/reader.c:
16629 entered into RCS
16630
166311994-05-05 David J. MacKenzie <djm@gnu.org>
16632
16633 * Makefile.in: entered into RCS
16634
166351994-03-26 Richard Stallman <rms@gnu.org>
16636
16637 * src/bison.s1: entered into RCS
16638
166391994-03-26 Richard Stallman <rms@gnu.org>
16640
16641 * bison.simple: entered into RCS
16642
166431994-03-25 Richard Stallman <rms@gnu.org>
16644
16645 * src/main.c: entered into RCS
16646
166471994-03-24 Richard Stallman <rms@gnu.org>
16648
16649 * src/conflicts.c: entered into RCS
16650
166511994-01-02 Richard Stallman <rms@gnu.org>
16652
16653 * Makefile.in: *** empty log message ***
16654
166551993-11-21 Richard Stallman <rms@gnu.org>
16656
16657 * src/bison.s1: *** empty log message ***
16658
166591993-11-21 Richard Stallman <rms@gnu.org>
16660
16661 * doc/bison.texinfo: entered into RCS
16662
16663 * doc/bison.texinfo: *** empty log message ***
16664
166651993-11-21 Richard Stallman <rms@gnu.org>
16666
16667 * bison.simple: *** empty log message ***
16668
166691993-10-25 David J. MacKenzie <djm@gnu.org>
16670
16671 * doc/bison.texinfo: *** empty log message ***
16672
166731993-10-19 Richard Stallman <rms@gnu.org>
16674
16675 * src/bison.s1: *** empty log message ***
16676
166771993-10-19 Richard Stallman <rms@gnu.org>
16678
16679 * bison.simple: *** empty log message ***
16680
166811993-10-14 Richard Stallman <rms@gnu.org>
16682
16683 * src/bison.s1: *** empty log message ***
16684
166851993-10-14 Richard Stallman <rms@gnu.org>
16686
16687 * bison.simple: *** empty log message ***
16688
166891993-09-14 David J. MacKenzie <djm@gnu.org>
16690
16691 * doc/bison.texinfo: *** empty log message ***
16692
166931993-09-13 Noah Friedman <friedman@gnu.org>
16694
16695 * Makefile.in: *** empty log message ***
16696
166971993-09-10 Richard Stallman <rms@gnu.org>
16698
16699 * src/conflicts.c: *** empty log message ***
16700
16701 * src/system.h: entered into RCS
16702
167031993-09-10 Richard Stallman <rms@gnu.org>
16704
16705 * doc/bison.1: entered into RCS
16706
167071993-09-06 Noah Friedman <friedman@gnu.org>
16708
16709 * src/version.c: entered into RCS
16710
167111993-09-06 Noah Friedman <friedman@gnu.org>
16712
16713 * Makefile.in: *** empty log message ***
16714
167151993-07-30 David J. MacKenzie <djm@gnu.org>
16716
16717 * Makefile.in: *** empty log message ***
16718
167191993-07-24 Richard Stallman <rms@gnu.org>
16720
16721 * src/bison.s1: *** empty log message ***
16722
167231993-07-24 Richard Stallman <rms@gnu.org>
16724
16725 * bison.simple: *** empty log message ***
16726
167271993-07-08 David J. MacKenzie <djm@gnu.org>
16728
16729 * Makefile.in: *** empty log message ***
16730
167311993-07-04 Richard Stallman <rms@gnu.org>
16732
16733 * src/bison.s1: *** empty log message ***
16734
167351993-07-04 Richard Stallman <rms@gnu.org>
16736
16737 * bison.simple: *** empty log message ***
16738
167391993-06-26 David J. MacKenzie <djm@gnu.org>
16740
16741 * src/getargs.c: entered into RCS
16742
167431993-06-26 David J. MacKenzie <djm@gnu.org>
16744
16745 * doc/bison.texinfo: *** empty log message ***
16746
16747 * doc/bison.1: New file.
16748
167491993-06-25 Richard Stallman <rms@gnu.org>
16750
16751 * src/getargs.c: New file.
16752
167531993-06-16 Richard Stallman <rms@gnu.org>
16754
16755 * src/bison.s1: *** empty log message ***
16756
167571993-06-16 Richard Stallman <rms@gnu.org>
16758
16759 * bison.simple: *** empty log message ***
16760
167611993-06-03 Richard Stallman <rms@gnu.org>
16762
16763 * src/bison.s1: New file.
16764
167651993-06-03 Richard Stallman <rms@gnu.org>
16766
16767 * doc/bison.texinfo: *** empty log message ***
16768
167691993-06-03 Richard Stallman <rms@gnu.org>
16770
16771 * bison.simple: New file.
16772
167731993-05-19 Richard Stallman <rms@gnu.org>
16774
16775 * doc/bison.texinfo: New file.
16776
167771993-05-07 Noah Friedman <friedman@gnu.org>
16778
16779 * Makefile.in: *** empty log message ***
16780
167811993-04-28 Noah Friedman <friedman@gnu.org>
16782
16783 * src/reader.c: *** empty log message ***
16784
167851993-04-23 Noah Friedman <friedman@gnu.org>
16786
16787 * src/alloc.h: entered into RCS
16788
167891993-04-20 David J. MacKenzie <djm@gnu.org>
16790
16791 * src/version.c: *** empty log message ***
16792
16793 * src/files.c, src/allocate.c:
16794 entered into RCS
16795
16796 * src/reader.c: *** empty log message ***
16797
16798 * src/lex.c: entered into RCS
16799
16800 * src/conflicts.c: New file.
16801
16802 * src/symtab.c: entered into RCS
16803
16804 * src/alloc.h: New file.
16805
16806 * src/LR0.c: entered into RCS
16807
168081993-04-18 Noah Friedman <friedman@gnu.org>
16809
16810 * src/reader.c: New file.
16811
16812 * src/version.c: *** empty log message ***
16813
168141993-04-18 Noah Friedman <friedman@gnu.org>
16815
16816 * Makefile.in: *** empty log message ***
16817
168181993-04-17 Noah Friedman <friedman@gnu.org>
16819
16820 * Makefile.in: *** empty log message ***
16821
168221993-04-15 Richard Stallman <rms@gnu.org>
16823
16824 * src/main.c, src/files.c:
16825 New file.
16826
168271993-04-15 Noah Friedman <friedman@gnu.org>
16828
16829 * configure.in: entered into RCS
16830
16831 * configure.in: *** empty log message ***
16832
16833 * configure.in: New file.
16834
168351993-04-14 Richard Stallman <rms@gnu.org>
16836
16837 * Makefile.in: New file.
16838
168391993-04-13 Richard Stallman <rms@gnu.org>
16840
16841 * src/version.c: New file.
16842
168431993-03-25 Richard Stallman <rms@gnu.org>
16844
16845 * src/output.c: entered into RCS
16846
168471992-09-25 Richard Stallman <rms@gnu.org>
16848
16849 * configure.bat: entered into RCS
16850
168511992-06-22 Richard Stallman <rms@gnu.org>
16852
16853 * src/vmsgetargs.c: entered into RCS
16854
168551992-06-22 Richard Stallman <rms@gnu.org>
16856
16857 * doc/bison.rnh: entered into RCS
16858
168591992-04-20 David J. MacKenzie <djm@gnu.org>
16860
16861 * README: entered into RCS
16862
168631992-01-22 Richard Stallman <rms@gnu.org>
16864
16865 * src/machine.h: entered into RCS
16866
168671991-12-21 Richard Stallman <rms@gnu.org>
16868
16869 * src/lalr.c, src/closure.c:
16870 entered into RCS
16871
168721991-12-20 Richard Stallman <rms@gnu.org>
16873
16874 * src/state.h: entered into RCS
16875
168761991-12-18 Richard Stallman <rms@gnu.org>
16877
16878 * src/print.c, src/nullable.c, src/derives.c:
16879 entered into RCS
16880
168811991-11-03 David J. MacKenzie <djm@gnu.org>
16882
16883 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
16884 entered into RCS
16885
168861988-09-09 Richard Stallman <rms@gnu.org>
16887
16888 * src/bison.hairy: entered into RCS
16889
168901987-12-16 Richard Stallman <rms@gnu.org>
16891
16892 * REFERENCES: entered into RCS
dc546b0f 16893
f294a2c2 16894
04098407 16895 -----
f294a2c2 16896
04098407 16897 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
e2a21b6f
PE
16898 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
16899 Software Foundation, Inc.
f294a2c2 16900
04098407
PE
16901 Copying and distribution of this file, with or without
16902 modification, are permitted provided the copyright notice and this
16903 notice are preserved.
e9071366
AD
16904
16905$Id$