]> git.saurik.com Git - bison.git/blame - ChangeLog
* src/scan-gram.l (braces_level, context_state): Make these globals
[bison.git] / ChangeLog
CommitLineData
2d2c1a2d
JD
12006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 * src/scan-gram.l (braces_level, context_state): Make these globals
4 static.
5
47aee066
JD
62006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7
8 In the grammar scanner, STRING_FINISH unclosed constructs and return
9 them to the parser in order to improve error messages.
10 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
11 SC_BRACED_CODE, SC_PROLOGUE): Implement.
12 * tests/input.at (Unclosed constructs): New test case.
13 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
14 seen.
15
16 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
17 unused global.
18
1f6b3679
JD
192006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
20
21 Handle string aliases for character tokens correctly.
22 * src/symtab.c (symbol_user_token_number_set): If the token has an
23 alias, check and set its alias's user token number instead of its own,
24 which is set to indicate the alias. Previously, every occurrence of
25 the character token in the grammar overwrote that alias indicator with
26 the character code.
27 * tests/input.at (String aliases for character tokens): New test.
28
219741d8
JD
292006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
30
31 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
32
11daa4e7
PE
332006-08-11 Paul Eggert <eggert@cs.ucla.edu>
34
35 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
36 to prevent failures when building on older platforms.
37 Check for autopoint failure.
38 Set XGETTEXT_OPTIONS to values that check for C format strings,
39 so that translators are warned about them (this also helps
40 prevent core dumps).
41
42 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
43 function, since it simplifies our code a bit.
44
45 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
46 rather than -W, so we don't get bogus warnings about sign comparisons.
47 Add -Wpointer-arith, since that warning is useful (it reports code
48 that does not conform to C89 and that some compilers reject).
49 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
50 since it's no longer needed.
51
f9bfc42a
JD
522006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
53
54 Clean up scanners a bit.
55 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
56 definitions so gcc won't warn when obstack_for_string is unused.
57 * src/scan-code.l: config.h and system.h are already #include'd by
58 scan-code-c.c, so get rid of them here.
59 * src/scan-gram.l: Likewise.
60 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
61 definitions rather than duplicating the rest of it.
62 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
63
06e8700a
JD
642006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
65
66 Suppress signed/unsigned comparison warnings for yycheck.
67 * data/c.m4 (b4_safest_int_type): New macro.
68 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
69 a signed int type, cast it to b4_safest_int_type first.
70 * data/yacc.c: Likewise.
71 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
72 also overwritten.
73
9c437126
PE
742006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
75
76 * doc/bison.texinfo: Fix some typos.
77
284d8a13
PE
782006-08-02 Paul Eggert <eggert@cs.ucla.edu>
79
80 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
81 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
82
83 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
84 the latest gnulib does this a different way.
85 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
86 translation was patched, so stop omitting it.
87
ec5479ce
JD
882006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
89
90 Enable declaration of default %printer/%destructor. Make the parser
91 use these for all user-declared grammar symbols for which the user does
92 not declare a specific %printer/%destructor. Thus, the parser uses it
93 for token 0 if the user declares it but not if Bison generates it as
94 $end. Discussed starting at
95 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
96 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
97 and
98 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
99 * NEWS (2.3+): Mention.
100 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
101 declare a %destructor for a mid-rule's semantic value. It's just
102 impossible to declare one specific to it.
103 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
104 code. Describe default %destructor form.
105 * src/parse-gram.y (grammar_declaration): Parse default
106 %printer/%destructor declarations.
107 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
108 and symbol_destructor_location_get rather than accessing the destructor
109 and destructor_location members of struct symbol.
110 (symbol_printers_output): Likewise but for %printer's.
111 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
112 again.
113 * src/symtab.c (default_destructor, default_destructor_location,
114 default_printer, default_printer_location): New static global
115 variables to record the default %destructor and %printer.
116 (symbol_destructor_get, symbol_destructor_location_get,
117 symbol_printer_get, symbol_printer_location_get): New functions to
118 compute the appropriate %destructor and %printer for a symbol.
119 (default_destructor_set, default_printer_set): New functions to set the
120 default %destructor and %printer.
121 * src/symtab.h: Prototype all those new functions.
122 * tests/actions.at (Default %printer and %destructor): New test to
123 check that the right %printer and %destructor are called, that they're
124 not called for $end, and that $$ and @$ work correctly.
125 (Default %printer and %destructor for user-declared end token): New
126 test to check that the default %printer and %destructor are called for
127 a user-declared end token.
128 * tests/input.at (Default %printer and %destructor redeclared, Unused
129 values with default %destructor): New tests to check related grammar
130 warnings and errors.
131
868d2d96
JD
1322006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
133
134 Clean up handling of %destructor for the end token (token 0).
135 Discussed starting at
136 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
137 and
138 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
139
140 Make the skeletons consistent in how they pop the end token and invoke
141 its %destructor.
142 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
143 state, which has token number 0, since this would invoke the
144 %destructor for the end token.
145 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
146 until after shifting the end token, or else it won't be popped.
147 * data/yacc.c (yyparse): Likewise.
148
149 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
150 it's the end token. Upon termination, destroy an unshifted lookahead
151 even when it's the end token.
152 * data/lalr1.cc (yy::parser::parse): Likewise.
153 * data/yacc.c (yyparse): Likewise.
154
155 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
156 value warnings for the end token when the user gives the end token a
157 %destructor.
158
159 * tests/actions.at (Printers and Destructors): Test all the above.
160
62a9592d
PE
1612006-07-24 Paul Eggert <eggert@cs.ucla.edu>
162
163 Update to latest gnulib and gettext versions.
164 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
165 Add fopen-safer.
166 (gnulib_files): Add m4/warning.m4. Don't worry about files
167 overwritten by autopoint.
168 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
169 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
170 rejects them.
171 Don't use autoreconf; instead, invoke autopoint etc. by hand,
172 so that we can remove the intl files at a better time.
173 (intl_files_to_remove): Remove aclocal.m4, since it gets
174 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
175 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
176 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
177 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
178 Remove datarootdir hack; no longer needed.
179 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
180 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
181 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
182 strdup.h.
183 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
184 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
185
10d6970f
PE
1862006-07-20 Paul Eggert <eggert@cs.ucla.edu>
187
188 * bootstrap: Adjust to today's change to gnulib-tool by invoking
189 it with --assume-autoconf='latest-stable'.
190
50a33993
JD
1912006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
192
193 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
194 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
195 YYSTYPE' and `{'.
196 * src/muscle_tab.h (muscle_grow): Replace the header comments with
197 those from muscle_tab.c since the old ones are misleading.
198
2ce4ed68
AD
1992006-07-13 Akim Demaille <akim@epita.fr>
200
201 Support %define "KEY" {VALUE}.
202 * src/scan-code.h, src/scan-code.l (translate_action)
203 (translate_rule_action, translate_symbol_action, translate_code):
204 Return char *, not const char *.
205 * src/parse-gram.y (declaration): Rename as...
206 (prologue_declaration): this.
207 (string_content): Remove this nonterminal, use STRING.
208 (braceless, content, content.opt): New nonterminal.
209 Use them.
210 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
211 as value.
212 * src/scan-gram.l (getargs.h): Don't include it.
213
db7e5eb5
PE
2142006-07-12 Paul Eggert <eggert@cs.ucla.edu>
215
216 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
217 rather than a for-loop that declares a local bool variable. This
218 should work around a compatibility problem with a Cray x1e C++
219 compiler reported by Hung Nguyen in
220 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
221 The for-loop was introduced in the 2004-11-17 change but I don't
222 know why it was needed.
223
a5d80ba5
AD
2242006-07-12 Akim Demaille <akim@epita.fr>
225
226 * data/c.m4: Comment changes.
227
23eb2a69
AD
2282006-07-10 Akim Demaille <akim@lrde.epita.fr>
229
230 * src/complain.c (error_message, ERROR_MESSAGE): New.
231 To factor...
232 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
233 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
234
ddc8ede1
PE
2352006-07-09 Paul Eggert <eggert@cs.ucla.edu>
236
237 * NEWS: Instead of %union, you can define and use your own union type
238 YYSTYPE if your grammar contains at least one <type> tag.
239 Your YYSTYPE need not be a macro; it can be a typedef.
240 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
241 (Union Decl, Decl Summary): Document this.
242 * data/glr.c (YYSTYPE): Implement this.
243 * data/glr.cc (YYSTYPE): Likewise.
244 * data/lalr1.cc (YYSTYPE): Likewise.
245 * data/yacc.c (YYSTYPE): Likewise.
246 * src/output.c (prepare): Output tag_seen_flag.
247 * src/parse-gram.y (declaration, grammar_declaration):
248 Use 'union_seen' rather than 'typed' to determine whether
249 %union has been seen, since grammars can now be typed without
250 %union.
251 (symbol_declaration, type.opt, symbol_def):
252 Keep track of whether a tag has been seen.
253 * src/reader.c (union_seen, tag_seen): New vars.
254 (typed): remove.
255 * src/reader.h (union_seen, tag_seen, typed): Likewise.
256 * src/scan-code.l (untyped_var_seen): New variable.
257 (handle_action_dollar): Adjust to above changes.
258 (handle_action_dollar, handle_action_at):
259 Improve overflow checking for outlandish numbers.
260 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
261 avoid new diagnostics generated by above changes.
262 * tests/regression.at (YYSTYPE typedef): Add test to check
263 for type tags without %union.
264
265 * src/symlist.c (symbol_list_length): Return int, not unsigned
266 int, since callers expect int. This may need to get revisited
267 once we have proper integer overflow checking.
268
269 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
270 object is now static.
271
272 * src/getargs.c (flags_argmatch): Return void, not int,
273 to pacify ./configure --enable-gcc-warnings.
274
275 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
276 since last_string is already defined to FLEX_PREFIX (last_string).
277
7b42569e
AD
2782006-07-09 Akim Demaille <akim@lrde.epita.fr>
279
280 Implement --warnings/-W.
281 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
282 replaced by...
283 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
284 Adjust callers.
285 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
286 (warnings_args, warnings_types): New.
287 (getargs, short_options, long_options): Accept -W/--warnings.
288 Sort the options by alphabetical order, upper case letter right
289 before its lower case.
290
3b452f4e
JD
2912006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
292
293 Change %merge result type clash warnings to errors. Discussed at
294 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
295 * src/reader.c (record_merge_function_type): Use complain_at.
296 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
297 declared later): Update test case results.
298
b8a41559
AD
2992006-07-09 Akim Demaille <akim@lrde.epita.fr>
300
301 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
302 to be in alphabetical order.
303 (trace_args): Spelling fixes.
304
cd9e1ba2
PE
3052006-07-09 Paul Eggert <eggert@cs.ucla.edu>
306
307 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
308 so they don't collide with user-defined macros.
309 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
310 this was never guaranteed, and now that we're using gnulib stdint,
311 which defines int_fast16_t to long int, the problem is exposed.
312
cb48f191
PE
3132006-07-08 Paul Eggert <eggert@cs.ucla.edu>
314
b8445a15
PE
315 * data/c.m4 (b4_basename): Simplify a bit, since we don't
316 need the full POSIX semantics (and weren't implementing them
317 anyway).
318
cb48f191
PE
319 Adjust to Autoconf 2.60 and today's gnulib.
320 * bootstrap (gnulib_modules): Add stdint.
321 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
322 no longer copies it.
323 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
324 since stdint needs the former and wcwidth (which is now required
325 by mbswidth) needs the latter.
326 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
327 work around a compatibility glitch between gettext 0.14.6 and
328 Autoconf 2.60.
329 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
330 Do not check for uintptr_t, since new stdint module does the right
331 thing.
332 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
333 Add stdint.h, stdint_.h, wcwidth.h.
334 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
335 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
336 stdint.m4, wchar_t.m4, wcwidth.m4.
337 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
338 usual order for ../lib/*.h files.
339 (file_name_split): Use last_component, not base_name, to adjust
340 to gnulib changes.
341 * src/parse-gram.h: Include <strverscmp.h> in the usual order
342 for ../lib/*.h files.
343 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
344 Define unconditionally, since we now assume the stdint module.
345 * src/scan-skel.l: Include <dirname.h>.
346 (BASE_QPUTS): Use last_component, not base_name.
347 * src/system.h: Include <unlocked-io.h> in the usual order
348 for ../lib/*.h files. Include <stdint.h> unconditionally,
349 since we now use the stdint module.
350 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
351 HAVE_UINTPTR_T, since we now use the stdint module.
352 (base_name): Remove decl, since files now include <dirname.h>
353 to get the decl.
354
cd48d21d
AD
3552006-07-08 Akim Demaille <akim@lrde.epita.fr>
356
357 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
358 New, default to 1.
359 * data/yacc.c, data/glr.c, data/location.cc: Use them.
360 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
361 default.
362 * tests/calc.at: Adjust.
363
8ec0a172
AD
3642006-07-08 Akim Demaille <akim@lrde.epita.fr>
365
b8445a15 366 * data/c.m4 (b4_basename): New.
8ec0a172
AD
367 (b4_syncline): Also output the location of its invocation (from
368 the skeleton).
369 (b4_user_action, b4_define_user_action, b4_user_actions)
370 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
371 (b4_user_stype): New.
372 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
373
4a678af8
JD
3742006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
375
376 In the grammar file, the first column is 1 not 0 on the first line as
377 on every other line.
378 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
379 * tests/input.at (Torturing the Scanner): Update output.
380
381 * src/scan-gram.l (scanner_cursor): Declare it static.
382
dd60572a
JD
3832006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
384
385 In warnings, say "previous declaration" rather than "first
386 declaration".
387 * src/symtab.c (redeclaration): Do that here.
388 * src/reader.c (record_merge_function_type): In the case of a result
389 type clash, report the previous declaration rather than the very first
390 one in the grammar file.
391 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
392 declared later): Add a third declaration to check this behavior.
393 * tests/input.at (Incompatible Aliases): Update output.
394
2073e1b6
AD
3952006-06-27 Akim Demaille <akim@epita.fr>
396
397 * doc/Doxyfile.in: New.
398 * doc/Makefile.am: Use it.
399 * src/lalr.h, src/symtab.h: Initial doxygenation.
400
8ee5b538
JD
4012006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
402
403 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
404 declared after the %merge. This continues the effort of the previous
405 patch.
8ee5b538
JD
406 * src/reader.c (get_merge_function): Don't set the merger type yet.
407 (record_merge_function_type): New function for setting the merger type
408 and checking for clashes.
409 (grammar_current_rule_merge_set): Set the location of the %merge for
410 the current rule.
411 (packgram): Invoke record_merge_function_type for each rule now that
412 all symbol type declarations have been parsed.
413 * src/reader.h (merger_list.type_declaration_location): New member
414 storing the location of the first %merge from which the type for this
415 merging function was derived.
416 * src/symlist.h (symbol_list.merger_declaration_location): New member
417 storing the location of a rule's %merge, if any.
418 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
419 declared later): New test to catch the error fixed by the above patch.
420
ffa4ba3a
JD
4212006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
422
423 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
424 declarations appear after the rules. Discussed at
425 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
426 and
427 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
428 Don't mistake the type of $$ in a midrule to be that of its parent
429 rule's $$.
ffa4ba3a
JD
430 * src/reader.c (grammar_current_rule_end): Don't invoke
431 grammar_rule_check yet since not all symbol declarations may have been
432 parsed yet.
433 (grammar_midrule_action): Likewise.
434 Don't record whether the midrule's $$ has been used yet since actions
435 haven't been translated yet.
436 Record the midrule's parent rule and its RHS index within the parent
437 rule.
438 (grammar_current_rule_action_append): Don't translate the action yet
439 since not all symbol declarations may have been parsed yet and, thus,
440 warnings about types for $$, $n, @$, and @n can't be reported yet.
441 (packgram): Translate the action and invoke grammar_rule_check now that
442 all symbol declarations have been parsed.
443 * src/scan-code.l (handle_action_dollar): Now that this is invoked
444 after parsing the entire grammar file, the symbol list here in the case
445 of a midrule is actually the midrule's empty RHS, so reference its
446 parent rule's RHS where necessary.
447 On the other hand, now that you can already know it's a midrule, you
448 aren't forced to think $$ has the same type as its parent rule's $$.
449 (handle_action_at): In the case of a midrule, reference the parent rule
450 where necessary.
451 * src/symlist.c (symbol_list_new): Initialize new midrule-related
452 members.
453 (symbol_list_length): Now that this is invoked after all rules have
454 been parsed, a NULL symbol (rather than a NULL symbol list node)
455 terminates a rule. symbol_list_print already does this correctly.
456 * src/symlist.h (symbol_list.midrule_parent_rule,
457 symbol_list.midrule_parent_rhs_index): New members so that midrules can
458 remember their relationships with their parents.
459 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
460 fixed by the above patch.
461 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
462 implementing...
463 (Unused values): ... this old test case and...
464 (Unused values before symbol declarations): ... this new test case.
465 This one is the same as `Unused values' except that all symbol
466 declarations appear after the rules in order to catch the rest of the
467 errors fixed by the above patch.
468
e256e17f
JD
4692006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
470
300a1930
JD
471 More cleanup.
472 * src/reader.c (current_rule): Declare it static since it's no longer
473 used outside this file.
474 (grammar_current_rule_action_append): Remove redundant arguments from
475 translate_rule_action invocation.
476 * src/reader.h (current_rule): Remove this unused extern.
477 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
478 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 479
381ecb06
JD
4802006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
481
482 Clean up yesterday's patch.
483 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
484 to...
485 * src/reader.c (grammar_current_rule_action_append): ... here for
486 consistency with grammar_current_rule_symbol_append.
487 * tests/regression.at (Braced code in declaration in rules section):
488 Make yyerror and yylex static as usual.
489
4210cd0b
JD
4902006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
491
492 Fix bug that mistakes braced code in a declaration in the rules section
493 to be a rule action. Mentioned at
494 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
495 * src/scan-gram.l: Move midrule action detection from the start of the
496 scanning of any braced code to...
497 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
498 action. For readability, use $2 and @2 rather than the equivalent
499 global variables.
500 * tests/regression.at (Braced code in declaration in rules section):
501 New test to catch the error fixed by the above patch.
502
503 Work on code readability some.
504 * src/scan-code.l (current_rule): Get rid of this misleading and
505 redundant declaration: it's actually extern'ed in reader.h.
506 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
507 translate_action): Add a rule argument and use it instead of the global
508 current_rule.
509 (translate_rule_action): This already receives current_rule through an
510 argument, so pass it on to translate_action instead of assigning
511 current_rule to current_rule.
512 (translate_symbol_action, translate_code): Pass rule = NULL to
513 translate_action.
514
34f98f46
JD
5152006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
516
517 Rename %before-definitions to %start-header and %after-definitions to
518 %end-header. Don't use these declarations to separate pre-prologue
519 blocks from post-prologue blocks. Add new order-independent
520 declarations %before-header and %after-header as alternatives to the
521 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
522 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
523 * NEWS (2.3+): Update for these changes.
524 * data/glr.c (b4_before_definitions): Update to...
525 (b4_start_header): ... this.
526 (b4_after_definitions): Update to...
527 (b4_end_header): ... this.
528 * data/glr.cc: Likewise.
529 * data/lalr1.cc: Likewise.
530 * data/yacc.c: Likewise.
531 * doc/bison.texinfo (The prologue): Update names, and replace remaining
532 prologue blocks with %*-header declarations.
533 (Calc++ Parser): Likewise.
534 (Bison Declaration Summary): Update names.
535 (Bison Symbols): Update description.
536 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
537 (PERCENT_END_HEADER): ... this.
538 (PERCENT_BEFORE_DEFINITIONS): Update to...
539 (PERCENT_START_HEADER): ... this.
540 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
541 (declaration): Update token names and m4 macro names.
542 When parsing %end-header and %start-header, invoke translate_code
543 before muscle_code_grow, and no longer set global booleans to remember
544 whether these declarations have been seen.
545 Parse new %after-header and %before-header.
546 * src/reader.c (before_definitions, after_definitions): Remove.
547 (prologue_augment): Accept a new bool argument to specify whether to
548 augment the pre-prologue or post-prologue.
549 * src/reader.h (before_definitions, after_definitions): Remove these
550 extern's.
551 (prologue_augment): Add new bool argument.
552 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
553 (PERCENT_END_HEADER): ... this.
554 (PERCENT_BEFORE_DEFINITIONS): Update to...
555 (PERCENT_START_HEADER): ... this.
556 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
557 * tests/actions.at (Printers and Destructors): Update names.
558
31b2b07e
JD
5592006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
560
561 Add comparison operators for C++ location classes. Discussed at
562 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
563 * data/c++.m4 (b4_define_location_comparison): New boolean %define
564 declaration indicating whether filename_type has an operator==. If
565 filename_type is `std::string', it defaults to `1', `0' otherwise.
566 * data/location.cc: Iff b4_define_location_comparison is `1', add
567 operator== and operator!= for class position and for class location.
568
569 Some minor fixes.
570 * src/scan-action.l: Remove unused file.
571 * src/symtab.c (symbol_printer_set): Use printer_location not
572 destructor_location.
573 * src/symtab.h (struct symbol): Replace incorrect source comment for
574 printer members.
575 * tests/input.at (Incompatible Aliases): Update output with correct
576 printer location.
577
9bc0dd67
JD
5782006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
579
580 Don't put the pre-prologue in the header file. For the yacc.c code
581 file and the glr.c header and code files, move the pre-prologue before
582 the token definitions. Add new %before-definitions and
583 %after-definitions to declare code that will go in both the header file
584 and code file. Discussed at
585 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
586 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
587 and
588 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
589 * NEWS (2.3+): Describe these changes.
590 * data/glr.c (b4_pre_prologue): Move from within to before...
591 (b4_shared_declarations): ... this.
592 Add new b4_before_definitions before b4_token_enums.
593 Add new b4_after_definitions at the end.
594 * data/glr.cc (b4_pre_prologue): Replace with...
595 (b4_before_definitions): ... this in the header file.
596 (b4_after_definitions): New near the end of the header file.
597 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
598 code file right before including the header file.
599 (b4_before_definitions): New in the previous position of
600 b4_pre_prologue in the header file.
601 (b4_after_definitions): New near the end of the header file.
602 * data/yacc.c: Clean up some m4 quoting especially in the header file.
603 (b4_token_enums_defines): In the code file, move to right before
604 YYSTYPE for consistency with the header file.
605 (b4_before_definitions): New right before b4_token_enums_defines in
606 both the header and code file.
607 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
608 header and code file.
609 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
610 of prologues for %union dependencies.
611 (Bison Declaration Summary): In %defines description, mention the
612 effect of %before-definitions and %after-definitions on the header
613 file.
614 (Calc++ Parser): Forward declare driver in a %before-definitions rather
615 than in the pre-prologue so that make check succeeds.
616 (Bison Symbols): Add entries for %before-definitions and
617 %after-definitions.
618 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
619 %before-definitions.
620 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
621 (declaration): Parse those declarations and append to
622 b4_before_definitions and b4_after_definitions, respectively.
623 * src/reader.c (before_definitions, after_definitions): New bools to
624 track whether those declarations have been seen.
625 (prologue_augment): Add to the post-prologue if %union,
626 %before-definitions, or %after-definitions has been seen.
627 * src/reader.h (before_definitions, after_definitions): New extern's.
628 * src/scan-gram.l: Scan the new declarations.
629 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
630 prologue block in a %before-definitions or a %after-definitions based
631 on whether the %union is declared.
632 * tests/regression.at (Early token definitions with --yacc, Early token
633 definitions without --yacc): Move tests for token definitions into the
634 post-prologue since token names are no longer defined in the
635 pre-prologue.
636
203b9274
AD
6372006-06-20 Akim Demaille <akim@epita.fr>
638
639 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
640 (symbol_get): Use it.
641 * src/parse-gram.y: Use it.
642
a7ee59cf
JD
6432006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
644
645 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
646 build succeeds when configured with --enable-gcc-warnings.
647
5a2baae7
PE
6482006-06-19 Paul Eggert <eggert@cs.ucla.edu>
649
33ad1a9c
PE
650 * src/parse-gram.y (char_name): New function.
651 (CHAR, STRING, string_content): For %printer, properly escape.
652 (ID): Prefer fputs to fprintf.
653 (id): Reindent to be consistent with other rules.
654 Properly quote char.
655
5a2baae7
PE
656 The Translation Project changed its way of publishing translations
657 to maintainers. I haven't received any responses to my request
658 for supporting the old way, or for documenting the new way. I
659 have modified 'bootstrap' to use screen scraping
660 (in this case, HTML scraping). This is unreliable and inelegant,
661 but I don't see any better way. Yuck.
662 * bootstrap (TP_URL, WGET_COMMAND): New vars.
663 (get_translations): New function, which uses HTML scraping to
664 deduce locations of latest translations.
665 Use this function to grab both bison and bison-runtime .po files.
666 Don't bother priming the pump for the runtime-po domain any more,
667 as it's now translated better than bison is.
668
58d7a1a1
AD
6692006-06-19 Akim Demaille <akim@epita.fr>
670
671 * src/scan-gram.l: No longer "parse" things after `%union' until
672 `{'. Rather, return a single "%union" token.
673 No longer make symbols: return strings, and leave the conversion
674 to symbols to the parser.
675 (SC_PRE_CODE, token_type): Remove.
676 * src/parse-gram.y (%union): New field `character'.
677 Sort tokens.
678 (CHAR): New token.
679 (ID, ID_COLON): Now that the scanner no longer makes them
680 identifiers, adjust all uses to invoke symbol_get.
681 (id_colon): New, wraps the conversion from string to symbol.
682 (%union): Accept a possible union_name.
683 (symbol): Now can be a char.
684 * data/c.m4 (b4_union_name): Leave a default value.
685 * data/glr.c, data/yacc.c: Use it.
686
b931235e
JD
6872006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
688
689 For associating token numbers with token names for "yacc.c", don't use
690 #define statements unless `--yacc' is specified; always use enum
691 yytokentype. Most important discussions start at:
692 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
693 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
694 and
695 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
696 * NEWS (2.3+): Mention.
697 * data/c.m4 (b4_yacc_if): New.
698 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
699 token #define's.
700 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
701 on token name definitions.
702 * src/getargs.c (usage): Capitalize `Yacc' in English.
703 * src/output.c (prepare): Define b4_yacc_flag.
704 * tests/regression.at (Early token definitions): Test that tokens names
705 are defined before the pre-prologue not just before the post-prologue.
706 Remove this test case and copy to...
707 (Early token definitions with --yacc): ... this to test #define's.
708 (Early token definitions without --yacc): ... and this to test enums.
709
9e6e7ed2
PE
7102006-06-11 Paul Eggert <eggert@cs.ucla.edu>
711
712 * NEWS: Reword the post-2.3 change to not be so optimistic about
713 removing the old "look-ahead" spelling.
714 Update previous look-ahead/lookahead change reports.
715 * REFERENCES: look-ahead -> lookahead (since that's
716 what he actually wrote).
717 * doc/refcard.tex: look ahead -> lookahead,
718 look-ahead -> lookahead
719
742e4900
JD
7202006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
721
722 For consistency, use `lookahead' instead of `look-ahead' or
723 `look_ahead'. Discussed starting at
724 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
725 and then at
726 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
727 * NEWS: For the next release, note the change to `--report'.
728 * TODO, doc/bison.1: Update English.
729 * doc/bison.texinfo: Update English.
730 (Understanding Your Parser, Bison Options): Document as
731 `--report=lookahead' rather than `--report=look-ahead'.
732 * src/conflicts.c: Update English in comments.
733 (lookahead_set): Rename from look_ahead_set.
734 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
735 (resolve_sr_conflict): Rename local look_ahead_tokens to
736 lookahead_tokens, and update other uses.
737 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
738 count_rr_conflicts, conflicts_free): Update uses.
739 * src/getargs.c (report_args): Move "lookahead" before alternate
740 spellings.
741 (report_types): Update uses.
742 (usage): For `--report' usage description, state `lookahead' spelling
743 rather than `look-ahead'.
744 * src/getargs.h (report.report_lookahead_tokens): Rename from
745 report_look_ahead_tokens.
746 * src/lalr.c: Update English in comments.
747 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
748 (state_lookahead_tokens_count): Rename from
749 state_look_ahead_tokens_count.
750 Rename local n_look_ahead_tokens to n_lookahead_tokens.
751 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
752 Rename local n_look_ahead_tokens to n_lookahead_tokens.
753 Update other uses.
754 Update English in output.
755 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
756 * src/print.c: Update English in comments.
757 (lookahead_set): Rename from look_ahead_set.
758 (print_reduction): Rename argument lookahead_token from
759 look_ahead_token.
760 (print_core, state_default_rule, print_reductions, print_results):
761 Update uses.
762 * src/print_graph.c: Update English in comments.
763 (print_core): Update uses.
764 * src/state.c: Update English in comments.
765 (reductions_new): Update uses.
766 (state_rule_lookahead_tokens_print): Rename from
767 state_rule_look_ahead_tokens_print, and update other uses.
768 * src/state.h: Update English in comments.
769 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
770 (state_rule_lookahead_tokens_print): Rename from
771 state_rule_look_ahead_tokens_print.
772 * src/tables.c: Update English in comments.
773 (conflict_row, action_row): Update uses.
774 * tests/glr-regression.at
775 (Incorrect lookahead during deterministic GLR,
776 Incorrect lookahead during nondeterministic GLR): Rename
777 print_look_ahead to print_lookahead.
778 * tests/torture.at: Update English in comments.
779 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
780 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
781 (Many lookahead tokens): Update uses.
782 * data/glr.c: Update English in comments.
783 * lalr1.cc: Likewise.
784 * yacc.c: Likewise.
785 * src/conflicts.h: Likewise.
786 * src/lalr.h: Likewise.
787 * src/main.c: Likewise.
788 * src/output.c: Likewise.
789 * src/parse-gram.c: Likewise.
790 * src/tables.h: Likewise.
791 * tests/calc.at: Likewise.
792
3c40d0b5
JD
7932006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
794
795 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
796
5d278082
PE
7972006-06-07 Paul Eggert <eggert@cs.ucla.edu>
798
799 * TODO: Add request from Nelson H. F. Beebe to be able to install
800 Bison without installing the yacc script.
801
9e668899
JD
8022006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
803
804 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
805 and yytext if they're already #define'd.
806 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
807 * src/scan-code-c.c: ... here.
808 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
809 <config.h>.
810
0c8e079f
JD
8112006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
812
813 Get Bison to build again when configured with --enable-gcc-warnings.
814 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
815 missing #include's.
816 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
817 loc argument as it shadows a global.
818 * src/scan-gram.l: Remove stray comma that prevents boundary_set
819 invocation.
820
821 * src/.cvsignore: Add scan-code.c.
822
2346344a
AD
8232006-06-07 Akim Demaille <akim@epita.fr>
824
825 * src/scan-gram.l: Move the "add a trailing ; to actions" code
826 to...
827 * src/scan-code.l: here.
828 * tests/input.at (Torturing the Scanner): Fix another location
829 error.
830
4862bdfd
AD
8312006-06-07 Akim Demaille <akim@epita.fr>
832
833 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
834
e9071366
AD
8352006-06-06 Akim Demaille <akim@epita.fr>
836
837 Extract the parsing of user actions from the grammar scanner.
838 As a consequence, the relation between the grammar scanner and
839 parser is much simpler. We can also split "composite tokens" back
840 into simple tokens.
841 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
842 * src/scan-gram.l (add_column_width, adjust_location): Move to and
843 rename as...
844 * src/location.h, src/location.c (add_column_width)
845 (location_compute): these.
846 Fix the column count: the initial column is 0.
847 (location_print): Be robust to ending column being 0.
848 * src/location.h (boundary_set): New.
849 * src/main.c: Adjust to scanner_free being renamed as
850 gram_scanner_free.
851 * src/output.c: Include scan-code.h.
852 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
853 Use boundary_set.
854 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
855 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
856 which is now, again, a separate token.
857 Adjust all dependencies.
858 Whereever actions with $ and @ are used, use translate_code.
859 (action): Remove this nonterminal which is now useless.
860 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
861 (grammar_current_rule_action_append): Use translate_code.
862 (packgram): Bound check ruleno, itemno, and rule_length.
863 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
864 (last_string, last_braced_code_loc, max_left_semantic_context)
865 (scanner_initialize, scanner_free, scanner_last_string_free)
866 (gram_out, gram_lineno, YY_DECL_): Move to...
867 * src/scan-gram.h: this new file.
868 (YY_DECL): Rename as...
869 (GRAM_DECL): this.
870 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
871 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
872 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
873 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
874 Move these declarations, and...
875 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
876 these to...
877 * src/flex-scanner.h: this new file.
878 * src/scan-gram.l (rule_length, rule_length_overflow)
879 (increment_rule_length): Remove.
880 (last_braced_code_loc): Rename as...
881 (gram_last_braced_code_loc): this.
882 Adjust to the changes of the parser.
883 Move all the handling of $ and @ into...
884 * src/scan-code.l: here.
885 * src/scan-gram.l (handle_dollar, handle_at): Remove.
886 (handle_action_dollar, handle_action_at): Move to...
887 * src/scan-code.l: here.
888 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
889 scan-code.h, scan-code-c.c, scan-gram.h.
890 (EXTRA_bison_SOURCES): Add scan-code.l.
891 (BUILT_SOURCES): Add scan-code.c.
892 (yacc): Be robust to white spaces.
893
894 * tests/conflicts.at, tests/input.at, tests/reduce.at,
895 * tests/regression.at: Adjust the column numbers.
896 * tests/regression.at: Adjust the error message.
7891a7c4 897
184e42f0
JD
8982006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
899
900 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
901 Use Akim's wording from
902 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
903
7891a7c4
JD
9042006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
905
906 Between Bison releases, manually append `+' to the previous Bison
907 release number, and use that as a signal to automatically print the
908 ChangeLog's CVS Id keyword from --version. Discussed starting at
909 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
910 * ChangeLog: Add Id header.
911 * configure.ac (AC_INIT): Append `+' to `2.3'.
912 * src/.cvsignore: Add revision.c.
913 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
914 (BUILT_SOURCES): Add revision.c.
915 (revision.c): New target rule. This file defines a new global variable
916 named revision. It initializes it with either the Id from ChangeLog
917 or, if VERSION doesn't contain `+', with the empty string.
918 * src/getargs.c (version): Print the value of revision.
919 * src/revision.h: Extern revision.
920
4ad3ed84
PE
9212006-06-05 Paul Eggert <eggert@cs.ucla.edu>
922
923 * NEWS: Version 2.3.
924 * configure.ac (AC_INIT): Likewise.
925
02103984
PE
9262006-05-30 Paul Eggert <eggert@cs.ucla.edu>
927
928 * data/glr.c (YYRECOVERING): Define to be a function-like macro
929 with no arguments, not as an object-like macro. This is for
930 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
931 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
932 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
933 Document this.
934
2c08afa5
JD
9352006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
936
937 * src/getargs.c (usage): Back out yesterday's modification of the
938 --help output so that we don't have to wait for translation before
939 releasing 2.3.
940
6077da58
PE
9412006-05-29 Paul Eggert <eggert@cs.ucla.edu>
942
943 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
944 Problem reported by Akim Demaille.
945
2a26b6c2
JD
9462006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
947
948 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
949
aefef0d6
PE
9502006-05-26 Paul Eggert <eggert@cs.ucla.edu>
951
952 * data/yacc.c (yy_reduce_print): Omit trailing white space in
953 generated source code. Problem reported by Frans Englich in
954 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
955
fcd8e201
PE
9562006-05-22 Paul Eggert <eggert@cs.ucla.edu>
957
958 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
959 shell, not within 'make', so that 'make' by an ordinary builder
960 (using GNU make) does not worry about configuring gzip. This also
961 works around a bug reported independently by Keith Thompson and by
962 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
963 stderr rather than stdout, messing up the build logs.
964
7b5cdcbd
JD
9652006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
966
967 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
968 to make sure that YYID will never be unused. This fixes a 'make
969 maintainer-check' failure caused by the recent changes to the 'Trivial
970 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
971 not used.
972 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
973
5ad0a449
JD
9742006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
975
976 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
977 state before an empty RHS is always resolved here. Only the location
978 of that state is guaranteed to be resolved, and that's enough. This
979 fixes the remaining bug reported by Derek M. Jones in
980 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
981 * tests/glr-regression.at (Uninitialized location when reporting
982 ambiguity): Test the above case.
983 Also, the embedded comments in this test case claim it checks the case
984 of an empty RHS that has inherited the initial location. However, the
985 corresponding LHS was already resolved, so yyresolveLocations didn't
986 actually have reason to modify it. Fix this by forcing
987 nondeterministic operation at the beginning of the parse.
988
50cce58e
PE
9892006-05-20 Paul Eggert <eggert@cs.ucla.edu>
990
991 * data/c.m4 (b4_yy_symbol_print_generate):
992 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
993 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
994 of the bugs reported today by Derek M Jones in
995 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
996 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
997 defined to be a type name without parens or brackets.
998 (Location Type): Similarly for YYLTYPE.
999 * tests/regression.at (Trivial grammars): Put in a test for this
1000 bug that will be caught by 'make maintainer-check' (though not,
1001 alas, by 'make check' unless your compiler is picky).
1002
ab8d9dc5
PE
10032006-05-19 Paul Eggert <eggert@cs.ucla.edu>
1004
0d2c8934 1005 * NEWS: Version 2.2.
ab8d9dc5
PE
1006 * configure.ac (AC_INIT): Likewise.
1007
9138c575
JD
10082006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
1009
1010 * data/glr.c (yyreportTree): Make room in yystates for the state
1011 preceding the RHS. This fixes the segmentation fault reported by Derek
1012 M. Jones in
1013 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
1014 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
1015 to the user. Reported for yyreportTree by Derek M. Jones later in the
1016 same thread.
1017 * THANKS: Add Derek M. Jones.
1018 Update my email address.
1019 Fix typo in Steve Murphy's name.
1020
276f48df
PE
10212006-05-14 Paul Eggert <eggert@cs.ucla.edu>
1022
d6645148
PE
1023 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
1024 checking against YYLAST that caused the parser to miss a potential
1025 alternative in its diagnostic.
1026 Problem reported by Maria Jose Moron Fernandez in
1027 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
1028 * data/lalr1.cc (yysyntax_error_): Likewise.
1029 * data/yacc.c (yysyntax_error): Likewise.
1030 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
1031 tokens, in case we run into an older C compiler.
1032 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
1033 Use them to check for the off-by-one error fixed above.
1034
276f48df
PE
1035 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
1036 YYSIZE_T, not size_t.
1037 * tests/regression.at (Trivial grammars): New test, to catch
1038 the error fixed by the above patch.
1039
cd8b5791
AD
10402006-05-14 Akim Demaille <akim@lrde.epita.fr>
1041
1042 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
1043 scheme.
1044 Reported by Steve Murphy.
1045
34376418
AD
10462006-05-14 Akim Demaille <akim@lrde.epita.fr>
1047
1048 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
1049 * data/glr.cc: b4_location_flag is now b4_locations_flag.
1050
327afc7c
AD
10512006-05-14 Akim Demaille <akim@lrde.epita.fr>
1052
1053 Implement --trace=m4.
1054 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
1055 * src/output.c (output_skeleton): When set, pass -dV to m4.
1056
1057 Factor the handling of flags in m4.
1058 * src/output.c (prepare): Rename the muscle names debug, defines,
1059 error_verbose to debug_flag, defines_flag, error_verbose_flag.
1060 * data/c.m4: Adjust.
1061 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
1062 Use b4_define_flag_if to define other b4_FLAG_if macros.
1063 (b4_location_if): As a consequence, rename as...
1064 (b4_locations_if): this, for consistency.
1065 Adjust all the skeletons.
1066
ba9ecd19
AD
10672006-05-14 Akim Demaille <akim@lrde.epita.fr>
1068
1069 * etc/bench.pm: Shorten bench names.
1070
4e83ea15
AD
10712006-05-14 Akim Demaille <akim@lrde.epita.fr>
1072
1073 * src/output.h, src/output.c (error_verbose): Move to...
1074 * src/getargs.h, src/getargs.c: here.
1075 Sort the flags.
1076 Adjust dependencies.
1077
6e93d810
PE
10782006-05-13 Paul Eggert <eggert@cs.ucla.edu>
1079
1080 * data/c.m4 (b4_copyright): Put the special exception for Bison
1081 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
1082 uses changed. Suggested by Akim Demaille. Also, wrap the
1083 copyright notice, in case it is longer than 80 columns. Replace
1084 comma by newline after title.
6e93d810 1085
eaea13f5
PE
10862006-05-11 Paul Eggert <eggert@cs.ucla.edu>
1087
1088 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
1089 incompatibility, not a bug. Mention that it wasn't fixed as of
1090 flex 2.5.33.
1091
3cf084ec
AD
10922006-05-11 Akim Demaille <akim@lrde.epita.fr>
1093
1094 * examples/extexi: Enforce the precedence of concatenation over
1095 >>.
0a9f1c7d 1096 Reported by Tommy Nordgren.
3cf084ec 1097
32c96bd7
AD
10982006-05-11 Akim Demaille <akim@lrde.epita.fr>
1099
1100 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
1101 with the member "token".
f94705b2 1102 Reported by Martin Nylin.
32c96bd7 1103
eaea13f5
PE
11042006-05-08 Paul Eggert <eggert@cs.ucla.edu>
1105
1106 * data/glr.c: Switch to Bison 2.2 special-exception language in
1107 the copyright notice. Use more-regular format for titles and
1108 copyright notices.
1109 * data/glr.cc: Likewise.
1110 * data/location.cc: Likewise.
1111 * data/yacc.cc: Likewise.
1112 * doc/bison.texinfo (Conditions): Document this.
1113 * NEWS: likewise. Upgrade version to 2.2.
1114
6e2d1146
AD
11152006-04-27 Akim Demaille <akim@lrde.epita.fr>
1116
1117 * data/glr.cc: Remove dead code.
1118
47671055
PE
11192006-04-25 Paul Eggert <eggert@cs.ucla.edu>
1120
1121 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
1122 that variable and the line breaks the bootstrap. Problem reported
1123 by Juan M. Guerrero.
1124
ed2e6384
AD
11252006-04-24 Akim Demaille <akim@lrde.epita.fr>
1126
1127 * doc/bison.texinfo (Multiple start-symbols): New.
1128
3cedc2dc
AD
11292006-04-24 Akim Demaille <akim@lrde.epita.fr>
1130
1131 * etc/README, etc/bench.pl: New.
1132
b2ddc3f3
AD
11332006-04-03 Akim Demaille <akim@lrde.epita.fr>
1134
1135 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
1136 rule.
1137 Reported by Mickael Labau.
1138 * tests/input.at (Torturing the Scanner): Test it.
1139
91e3ac9a
PE
11402006-03-16 Paul Eggert <eggert@cs.ucla.edu>
1141
1142 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
1143 Problem reported by Bob Rossi.
1144
11452006-03-13 Paul Eggert <eggert@cs.ucla.edu>
1146
1147 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
1148 and didn't really work.
1149 For the index, use @ifnotinfo, not @iftex.
1150 Minor cleanups of spacing and terminology.
1151
5cf61e93
AD
11522006-03-12 Akim Demaille <akim@lrde.epita.fr>
1153
1154 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
1155 of AT_NAME_PREFIX when %name-prefix is not used.
1156
aa08666d
AD
11572006-03-12 Akim Demaille <akim@lrde.epita.fr>
1158
1159 Apply --prefix to C++ skeletons too: they change the namespace.
1160 The test suite already exercize these cases.
1161 * data/c++.m4 (b4_namespace): New.
1162 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
1163 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
1164 * data/yacc.c, data/glr.c: Remove a useless `[]'.
1165 * doc/bison.texinfo: Document it.
1166 (Option Cross Key): Use @multitable in all formats. It looks
1167 nicer, even in TeX outputs.
1168 (Rules): Use the same code whatever the output type is.
1169 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
1170 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
1171 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 1172
45567173
AD
11732006-03-10 Akim Demaille <akim@lrde.epita.fr>
1174
1175 * TODO: Remove dead items.
1176
e9d8f881 11772006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
1178
1179 * doc/FAQ: Remove, merged into...
1180 * doc/bison.texinfo (FAQ): this.
1181 * doc/Makefile.am (EXTRA_DIST): Adjust.
1182
c095d689
AD
11832006-03-10 Akim Demaille <akim@lrde.epita.fr>
1184
1185 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
1186 even if empty.
1187 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
1188 * doc/bison.texinfo (Calc++ Scanner): Use it.
1189
6e0f8287
PE
11902006-03-09 Paul Eggert <eggert@cs.ucla.edu>
1191
1192 Fix two nits reported by twlevo, plus one more that I discovered.
1193
1194 * src/assoc.h (assoc_to_string): Give a name to the arg, as
1195 this is the usual Bison style.
1196 * src/location.h (location_print): Likewise.
1197
1198 * src/reader.h (token_name): Likewise.
1199
d6b771c3
PE
12002006-03-08 Paul Eggert <eggert@cs.ucla.edu>
1201
1202 Fix some nits reported by twlevo.
1203 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
1204 and "POSIX". Use more-modern syntax for URLs. Mention C++
1205 and ask for Java. Don't hardwire OS version numbers. Add
1206 copyright notice.
1207 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
1208 * src/conflicts.c (solved_conflicts_obstack): Now static.
1209
1e137b71
JD
12102006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
1211
1212 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
1213 page. Say "you can use it" not "you may use it" as on the web page;
1214 we're describing capabilities not granting permission.
1215
73f2e47e
PE
12162006-03-06 Paul Eggert <eggert@cs.ucla.edu>
1217
6d05403d
PE
1218 * data/glr.c (yyresolveLocations): Rename local variables to avoid
1219 shadowing warnings. Use usual patter for iterating through RHS.
1220 * tests/glr-regression.at
1221 (Uninitialized location when reporting ambiguity):
1222 Modify yylex so that it uses its argument, rather than trying
1223 to rely on ARGSUSED (which doesn't work for gcc with warnings).
1224 const char -> char const.
1225
73f2e47e
PE
1226 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
1227 Don't use tabs inside commands; it messes up 'ps'.
1228 Problem reported by twlevo.
1229
8710fc41
JD
12302006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
1231
1232 * tests/glr-regression.at (Uninitialized location when reporting
1233 ambiguity): New test case.
1234 * data/glr.c (yyresolveLocations): New function, which uses
1235 YYLLOC_DEFAULT.
1236 (yyresolveValue): Invoke yyresolveLocations before reporting an
1237 ambiguity.
1238 * doc/bison.texinfo (Default Action for Locations): Note
1239 YYLLOC_DEFAULT's usage for ambiguity locations.
1240 (GLR Semantic Actions): Cross-reference those notes.
1241
ae952af2
JD
12422006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
1243
1244 * tests/glr-regression.at (Leaked semantic values when reporting
1245 ambiguity): Remove unnecessary union and type declarations.
1246 (Leaked lookahead after nondeterministic parse syntax error): New test
1247 case.
1248 * data/glr.c (yyparse): Check for zero stacks remaining before
1249 attempting to shift the lookahead so that you don't lose it.
1250
35ee866a
JD
12512006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1252
1253 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
1254 * tests/glr-regression.at (Leaked semantic values when reporting
1255 ambiguity): New test case.
1256 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
1257 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
1258 now unnecessary yystackp parameter.
1259 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
1260 destructors can be called.
1261
1262 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
1263 in existing testcases.
1264
520181ab
JD
12652006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1266
1267 Don't leak semantic values for parent RHS when a user action cuts the
1268 parser, and clean up related code a bit.
1269 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
1270 cuts parse): Rename to...
1271 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
1272 for leaked parent RHS values.
1273 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
1274 between an unresolved state (non-empty chain of semantic options) and
1275 an incomplete one (signaled by an empty chain).
ae952af2 1276 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
1277 successfully or unsuccessfully resolved yyGLRState to...
1278 (yyresolveValue): ... here so that yyresolveValue always leaves a
1279 yyGLRState with consistent data and thus is easier to understand.
1280 Remove the yyvalp and yylocp parameters since they are always just
1281 taken from the yys parameter. When reporting a discarded merged value
1282 in debugging output, note that it is incompletely merged. Document the
1283 interface.
1284 (yyresolveAction): If resolving any of the RHS states fails, destroy
1285 them all rather than leaking them. Thus, as long as user actions are
1286 written to clean up the RHS correctly, yyresolveAction always cleans up
1287 the RHS of a semantic option. Document the interface.
1288
18d9185c
PE
12892006-02-27 Paul Eggert <eggert@cs.ucla.edu>
1290
1291 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
1292 led to a segmentation fault in GNU Pascal. Problem reported
1293 by Waldek Hebisch.
1294
841a7737
JD
12952006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
1296
1297 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
1298 mid-rule action inside a nonterminal symbol in order to declare a
1299 destructor for its semantic value.
1300
fc3f467f
PE
13012006-02-16 Paul Eggert <eggert@cs.ucla.edu>
1302
1303 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
1304 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
1305 __cplusplus && ! defined _STDLIB_H && !
1306 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
1307 defined free))]: Include <stdlib.h> rather than rolling our own
1308 declarations of malloc and free, to avoid problems with
1309 incompatible declarations (using 'throw') C++'s stdlib.h. This
1310 should fix Debian bug 340012
1311 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
1312 reported by Guillaume Melquiond.
1313
a3af26dd
PE
13142006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1315
4d7bc38c
PE
1316 * NEWS: Clarify symbols versus types in unused-value warnings.
1317
a3af26dd
PE
1318 * configure.ac (AC_INIT): Bump version number.
1319
4e26c69e
PE
13202006-02-13 Paul Eggert <eggert@cs.ucla.edu>
1321
1322 * NEWS: Version 2.1a.
1323 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
1324 since C99 requires this.
1325
498e897c
PE
13262006-02-11 Paul Eggert <eggert@cs.ucla.edu>
1327
1328 * m4/c-working.m4: New file.
1329 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
1330
57bb17ca
PE
13312006-02-10 Paul Eggert <eggert@cs.ucla.edu>
1332
1333 * Makefile.maint: Merge from coreutils.
1334
0be105dc
PE
13352006-02-09 Paul Eggert <eggert@cs.ucla.edu>
1336
1337 More portability fixes for problems summarized by Nelson H. F. Beebe.
1338
1339 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
1340 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
1341 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
1342 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
1343 messes up because C++ code is compiled in 32-bit mode but linked
1344 in 64-bit mode.
1345
6fc0c024
PE
13462006-02-08 Paul Eggert <eggert@cs.ucla.edu>
1347
1348 More portability fixes for problems summarized by Nelson H. F. Beebe.
1349
7870f699
PE
1350 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
1351 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
1352
6fc0c024
PE
1353 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
1354 nodist_PROGRAMS, since we don't need to actually compile the
1355 example if we're just doing a plain 'make'. This avoids bothering
1356 the installer unnecessarily about problems due to weird C++
1357 compilers.
1358
fe6c2fde
PE
13592006-02-06 Paul Eggert <eggert@cs.ucla.edu>
1360
1361 More portability fixes for problems summarized by Nelson H. F. Beebe.
1362
1363 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
1364 than #include "...", and compile with -I'.'. The old method was
1365 not portable, according to Posix and the C standard, and it does
1366 not work with Sun C 5.7, where previous #line directives affect
1367 the working directory used in later #include "..." directives.
1368
927b425b
JMG
13692006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1370
1371 Various DJGGP specific issues in /djgpp
1372
d9735e9e
PE
13732006-02-02 Paul Eggert <eggert@cs.ucla.edu>
1374
1375 More portability fixes for problems summarized by Nelson H. F. Beebe.
1376
1377 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
1378 '#include <map>' works and that you can apply ++ to iterators.
1379
5a6755af
PE
13802006-02-01 Paul Eggert <eggert@cs.ucla.edu>
1381
67a0dc4f
PE
1382 Work around portability problems summarized by Nelson H. F. Beebe in
1383 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
1384
8c86f0ef
PE
1385 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
1386 that '#include <string>' works.
1387
de35dd59
PE
1388 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
1389 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
1390 "warning: sorry: semantics of inline function static data `const
1391 unsigned char translate_table[262]' are wrong (you'll wind up with
1392 multiple copies)".
1393
67a0dc4f
PE
1394 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
1395 or, xor to not_, and_, or_, and xor_, respectively. This works
1396 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
1397 random system header somewhere that includes the equivalent of
1398 <iso646.h>.
1399
5a6755af
PE
1400 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
1401 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 1402 Suite Version 2.0.
5a6755af 1403
3f001415
JD
14042006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
1405
1406 During deterministic GLR operation, user actions should be able to
1407 influence the parse by changing yychar. To make this easier to fix and
1408 to make glr.c easier to evolve in general, don't maintain yytoken in
1409 parallel with yychar; just compute yytoken when needed.
1410 * tests/glr-regression.at (Incorrect lookahead during deterministic
1411 GLR): Check that setting yychar in a user action has the intended
1412 effect.
1413 * data/glr.c (yyGLRStack): Remove yytokenp member.
1414 (yyclearin): Don't set *yytokenp.
1415 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
1416 yychar rather than *yytokenp to determine the current lookahead.
1417 Compute yytoken locally when needed.
1418 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
1419 point to.
1420
1421 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
1422 after `--report' documentation.
1423
e2a8c0f5
PE
14242006-01-30 Paul Eggert <eggert@cs.ucla.edu>
1425
1426 * src/parse-gram.y (grammar_declaration): Location of printer
1427 symbol is @1, not list->location. Bug reported by twlevo.
1428 * tests/input.at (Incompatible Aliases): Adjust to above change.
1429
6b702268
PE
14302006-01-29 Paul Eggert <eggert@cs.ucla.edu>
1431
27622431
PE
1432 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
1433 all the test at once. This makes the output easier to read in the
1434 normal case.
1435
6b702268
PE
1436 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
1437 got from <http://bro-ids.org/download.html>. The bug is that
1438 when two actions appeared in succession, the second one was
1439 scanned before the first one was added to the grammar rule
1440 as a midrule action. Bison then output the incorrect warning
1441 "parse.y:905.17-906.36: warning: unused value: $3".
1442 * src/parse-gram.y (BRACED_CODE, action): These are no longer
1443 associated with a value.
1444 (rhs): Don't invoke grammar_current_rule_action_append.
1445 (action): Invoke it here instead.
1446 * src/reader.c (grammar_midrule_action): Now extern.
1447 (grammar_current_rule_action_append): Don't invoke
1448 grammar_midrule_action; that is now the scanner's job.
1449 * src/reader.h (last_string, last_braced_code_loc):
1450 (grammar_midrule_action): New decls.
1451 * src/scan-gram.l (last_string): Now extern, sigh.
1452 (last_braced_code_loc): New extern variable.
1453 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
1454 rule already has an action.
1455 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
1456 * tests/input.at (AT_CHECK_UNUSED_VALUES):
1457 Add some tests to check that the above changes fixed the bug.
1458
d40ba6c2
PE
14592006-01-27 Paul Eggert <eggert@cs.ucla.edu>
1460
1461 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
1462 All used changed. Check whether the symbol has a destructor,
1463 not whether it is typed.
1464 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
1465 that the values are still reported as unused. All line numbers
1466 adjusted.
1467
401aace6
PE
14682006-01-23 Paul Eggert <eggert@cs.ucla.edu>
1469
1470 Work around a bug in bro 0.8, which underparenthesizes its
1471 definition of YYLLOC_DEFAULT.
1472 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
1473 their arguments.
1474 * data/lalr1.cc: Likewise.
1475 * data/yacc.cc: Likewise.
1476
06f01bc4
PE
14772006-01-22 Paul Eggert <eggert@cs.ucla.edu>
1478
401aace6
PE
1479 Work around a bug in Pike 7.0, and give the Pike folks a
1480 better way to override the usual int widths.
1481 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
1482 user can override the types.
1483 (short): #undef, to work around a bug in Pike 7.0.
1484 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
1485 (union yyalloc.yyss): Use yytype_int16 rather than short.
1486 All uses changed.
1487 (yysigned_char): Remove.
1488 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
1489 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
1490 * tests/regression.at (Web2c Actions): Adjust to above changes.
1491
1492 * src/reader.c (check_and_convert_grammar): New function.
1493 (reader): Close the input file even if something went wrong during
1494 parsing. Minor file descriptor leak reported by twlevo.
1495
06f01bc4
PE
1496 * src/assoc.c (assoc_to_string): Use a default: abort (); case
1497 to pacify gcc -Wswitch-default.
1498 * src/scan-gram.l (adjust_location): Use a default: break; case
1499 to pacify gcc -Wswitch-default.
1500 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
1501 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
1502 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
1503 Move these decls to scan-skel.l, since they don't need to be
1504 visible elsewhere.
1505 * src/scan-skel.l: Accept the above decls.
1506 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
1507 is used.
1508
02650b7f
PE
15092006-01-21 Paul Eggert <eggert@cs.ucla.edu>
1510
1511 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
1512 since we don't want to insist on a version number at the start
1513 of the changelog every time.
1514 * Makefile.maint: Sync from coreutils a bit better.
1515 (sc_trailing_blank): Renamed from sc_trailing_space.
1516 All uses changed.
1517 (sc_no_if_have_config_h, sc_require_config_h):
1518 (sc_prohibit_assert_without_use): New rules.
1519 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
1520 (sc_dd_max_sym_length): Fix leading spaces in rule.
1521 (sc_system_h_headers): Prefix with @.
1522 (sc_useless_cpp_parens, m4-check): Output line numbers.
1523 (changelog-check): Allow version only in head.
1524 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
1525 satisfy new Makefile.maint rule.
1526 * data/glr.c: Likewise.
1527 * data/glr.cc: Likewise.
1528 * data/lalr1.cc: Likewise.
1529 * data/yacc.c: Likewise.
1530 * lib/ebitsetv.c: Likewise.
1531 * lib/lbitset.c: Likewise.
1532 * lib/subpipe.c: Likewise.
1533 * lib/timevar.c: Likewise.
1534 * src/system.h: Likewise.
1535 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
1536 * djgpp/Makefile.maint: Add copyright notice.
1537 * djgpp/README.in: Likewise.
1538 * djgpp/config.bat: Likewise.
1539 * djgpp/config.site: Likewise.
1540 * djgpp/config_h.sed: Likewise.
1541 * djgpp/djunpack.bat: Likewise.
1542 * djgpp/config.sed: Fix copyright notice to match standard format.
1543 * djgpp/subpipe.h: Likewise.
1544 * lib/bitsetv-print.c: Likewise.
1545 * lib/bitsetv.c: Likewise.
1546 * lib/subpipe.h: Likewise.
1547 * lib/timevar.c: Likewise.
1548 * lib/timevar.h: Likewise.
1549 * djgpp/subpipe.c: Use standard recipe for config.h.
1550 * lib/abitset.c: Likewise.
1551 * lib/bitset.c: Likewise.
1552 * lib/bitset_stats.c: Likewise.
1553 * lib/bitsetv-print.c: Likewise.
1554 * lib/bitsetv.c: Likewise.
1555 * lib/ebitsetv.c: Likewise.
1556 * lib/get-errno.c: Likewise.
1557 * lib/lbitset.c: Likewise.
1558 * lib/subpipe.c: Likewise.
1559 * lib/timevar.c: Likewise.
1560 * lib/vbitset.c: Likewise.
1561 * tests/local.at: Likewise.
1562 * src/scan-gram.l: Don't include verify.h, since system.h does
1563 that for us.
1564 * .x-sc_require_config_h: New file.
1565 * .x-sc_unmarked_diagnostics: New file.
1566
287c78f6
PE
15672006-01-20 Paul Eggert <eggert@cs.ucla.edu>
1568
287c78f6
PE
1569 Be a bit more systematic about using 'abort'.
1570 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
1571 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
1572 Put 'default: abort ();' before some other case, to satisfy older
1573 pedantic compilers.
1574 * lib/bitset_stats.c (bitset_stats_init): Likewise.
1575 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
1576 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
1577 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
1578 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
1579 (get_decision_str, get_orientation_str, get_node_alignment_str):
1580 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
1581 (get_linestyle_str, get_arrowstyle_str): Likewise.
1582 * src/conflicts.c (resolve_sr_conflict):
1583 Use a default case rather than one for the one remaining enum
1584 value, to catch invalid enum values as well.
1585 * src/lalr.c (set_goto_map, map_goto):
1586 Prefer "assert (FOO);" to "if (!FOO) abort ();".
1587 * src/nullable.c (nullable_compute, token_definitions_output):
1588 Likewise.
1589 * src/reader.c (packgram, reader): Likewise.
1590 * src/state.c (transitions_to, state_new, state_reduction_find):
1591 Likewise.
1592 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
1593 (symbol_pack): Likewise.
1594 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
1595 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
1596 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
1597 * src/system.h: Don't include <assert.h>.
1598 (assert): New macro.
1599
1600 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
1601 (Destructor Decl, Parser Function, Pure Calling):
1602 Describe rules for braces inside C code more carefully.
287c78f6 1603
c66dfadd
PE
16042006-01-19 Paul Eggert <eggert@cs.ucla.edu>
1605
c21493b8
PE
1606 Fix some porting glitches found by Nelson H. F. Beebe.
1607 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
1608 compilers that don't understand that abort () does not return.
1609 * src/state.c (transitions_to): Likewise.
1610 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
1611 that '#include <cstdlib>' works.
1612 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
1613 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
1614 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
1615 for the benefit of some pre-C99 compilers.
1616
b6e3facf
PE
1617 * bootstrap: Undo changes to gnulib files that autoreconf made.
1618
c66dfadd
PE
1619 Minor fixups to get 'make maintainer-check' to work.
1620 * configure.ac: Don't use -Wnested-externs, as it's incompatible
1621 with the new verify.h implementation.
1622 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
1623 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
1624 * data/yacc.c (YYUSE): Likewise.
1625 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
1626 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
1627 * src/parse-gram.y (declaration): Don't pass a string constant
1628 to a function that expects char *, since GCC might complain
1629 about the constant value.
1630 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
1631 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
1632 before #defining them.
1633 * tests/glr-regression.at
1634 (Incorrectly initialized location for empty right-hand side in GLR):
1635 In yyerror, use the msg arg.
1636 (Corrupted semantic options if user action cuts parse):
1637 (Incorrect lookahead during deterministic GLR):
1638 (Incorrect lookahead during nondeterministic GLR):
1639 Don't name a local var 'index'; it shadows string.h's 'index'.
1640
ed94ef2a
AD
16412006-01-19 Akim Demaille <akim@epita.fr>
1642
1643 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
1644 location, not just parts of it.
1645
e9ad4aec
PE
16462006-01-18 Paul Eggert <eggert@cs.ucla.edu>
1647
d6ca7905
PE
1648 * NEWS: Document the fact that multiple %unions are now allowed.
1649 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
1650 * TODO: This feature is now implemented, so remove it from
1651 the wishlist.
d6ca7905 1652
ef1b70e0
PE
1653 * Makefile.maint: Merge with coreutils Makefile.maint.
1654 (CVS_LIST): Use build-aux version if available.
1655 (VERSION_REGEXP): New macro.
1656 (syntax-check-rules): Add sc_no_if_have_config_h,
1657 sc_prohibit_assert_without_use, sc_require_config_h,
1658 sc_useless_cpp_parens.
1659 (sc_obsolete_symbols): Check for O_NDELAY.
1660 (sc_dd_max_sym_length): Track coreutils.
1661 (sc_unmarked_diagnostics): Look in all files, not just *.c.
1662 (sc_useless_cpp_parens): New rule.
1663 (news-date-check): Look for version or today's date.
1664 (changelog-check): Don't require version number near head.
1665 (copyright-check): Use current year instead of hardwiring 2005.
1666 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
1667 (announcement): Add --gpg-key-ID.
1668
1669 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
1670 with "file system".
1671
2073ce56 1672 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
1673 array. Problem reported by twlevo.
1674 * src/reader.c (packgram): Prepend a new sentinel before ritem.
1675 * src/lalr.c (build_relations): Rely on new sentinel.
1676 * src/gram.c (gram_free): Adjust to new sentinel.
1677
b7691f15
JD
16782006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
1679
1680 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
1681 yylookaheadNeeds. All uses updated.
1682 (yysplitStack): Rename local yynewLookaheadStatuses to
1683 yynewLookaheadNeeds.
1684 * data/glr-regression.at (Incorrect lookahead during nondeterministic
1685 GLR): In comments, change `lookahead status' to `lookahead need'.
1686
ddee1b06
PH
16872006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1688
1689 * data/glr.c (yysplitStack): A little stylistic rewrite.
1690
12f4614d
PH
16912006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1692
1693 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
1694
32c29292
JD
16952006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
1696
1697 * doc/bison.texinfo: Fix some typos.
1698 (GLR Semantic Actions): New subsection discussing special
1699 considerations because GLR semantic actions might be deferred.
1700 (Actions): Mention look-ahead usage of yylval.
1701 (Actions and Locations): Mention look-ahead usage of yylloc.
1702 (Special Features for Use in Actions): Add YYEOF entry and mention it
1703 in the yychar entry.
1704 In the yychar entry, remove mention of the local yychar case (pure
1705 parser) since this is irrelevant information when writing semantic
1706 actions and since it's already discussed in `Bison Symbols' where
1707 yychar is otherwise described as an external variable.
1708 In the yychar entry, don't call it the `current' look-ahead since it
1709 isn't when semantic actions are deferred.
1710 In the yychar and yyclearin entries, add note about deferred semantic
1711 actions.
1712 Add yylloc and yylval entries discussing look-ahead usage.
1713 (Look-Ahead Tokens): When discussing yychar, don't call it the
1714 `current' look-ahead, and do mention yylval and yylloc.
1715 (Error Recovery): Cross-reference `Action Features' when mentioning
1716 yyclearin.
1717 (Bison Symbols): In the yychar entry, don't call it the `current'
1718 look-ahead.
1719 In the yylloc and yylval entries, mention look-ahead usage.
1720
de366a2f 17212006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
1722
1723 * tests/glr-regression.at: Update copyright year to 2006.
1724
bf70fa87
JD
17252006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1726
1727 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
1728 use during nondeterministic operation to track which stacks have
1729 actually needed the current lookahead.
1730 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
1731 Allocate, deallocate, resize, and otherwise shuffle space for
1732 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
1733 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
1734 appropriately during nondeterministic operation.
1735 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
1736 members to store the current lookahead to be used by the deferred
1737 user action.
1738 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
1739 from which the RHS is taken. Set the lookahead members of the new
1740 yySemanticOption according to the lookahead status for stack yyk.
1741 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
1742 yyaddDeferredAction.
1743 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
1744 members of yySemanticOption before invoking yyuserAction, and then set
1745 them back to their current values afterward.
1746 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
1747 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
1748 * tests/glr-regression.at: Remove `.' from the ends of recent test case
1749 titles for consistency.
1750 (Leaked merged semantic value if user action cuts parse): In order to
1751 suppress lint warnings, use arguments in merge function, and assign
1752 char value < 128 in main.
1753 (Incorrect lookahead during deterministic GLR): New test case.
1754 (Incorrect lookahead during nondeterministic GLR): New test case.
1755
05449a2c
JD
17562006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1757
de366a2f 1758 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
1759 !yyvaluep as signal that no semantic value is available to print.
1760 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
1761 to print a semantic value.
1762
4158e0a1 17632006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 1764
4158e0a1
JD
1765 * tests/glr-regression.at: For consistency with my newer test cases,
1766 don't thank myself.
1767
d659304d
JD
17682006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1769
1770 * data/glr.c (yyresolveValue): When merging semantic options, if at
1771 least one user action succeeds but a later one cuts the parse, then
1772 destroy the semantic value before returning rather than leaking it.
1773 (yyresolveStates): If a user action cuts the parse and thus
1774 yyresolveValue fails, ignore the (unset) semantic value rather than
1775 corrupting the yyGLRState, and empty the semantic options list since
1776 the user actions should have called all necessary destructors.
1777 Simplify code with YYCHK.
1778 * tests/glr-regression.at (Corrupted semantic options if user action
1779 cuts parse): New test case.
1780 (Undesirable destructors if user action cuts parse): New test case.
1781 Before applying any of this patch, this test case never actually failed
1782 for me... but only because the corrupted semantic options usually
1783 masked this bug.
1784 (Leaked merged semantic value if user action cuts parse): New test
1785 case.
1786
6ec2c0f2
AD
17872006-01-05 Akim Demaille <akim@epita.fr>
1788
1789 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
1790
1b9c21fb
PE
17912006-01-04 Paul Eggert <eggert@cs.ucla.edu>
1792
1793 * data/c.m4 (b4_c_modern): New macro, with a new provision for
1794 _MSC_VER. Problem reported by Cenzato Marco.
1795 (b4_c_function_def): Use it.
1796 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
1797 b4_c_modern.
1798 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
1799 than rolling our own.
1800
84866159
AD
18012006-01-04 Akim Demaille <akim@epita.fr>
1802
1803 Also warn about non-used mid-rule values.
1804 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
1805 member.
1806 (symbol_list_new): Adjust.
1807 * src/reader.c (symbol_typed_p): New.
1808 (grammar_rule_check): Use it.
1809 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
1810 Check its rule.
1811 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
1812 Use it.
1813 * tests/actions.at (Exotic Dollars): Adjust.
1814
378f4bd8
AD
18152006-01-04 Akim Demaille <akim@epita.fr>
1816
1817 * src/reader.c (grammar_midrule_action): If $$ is set in a
1818 mid-rule, move the `used' bit to its lhs.
1819 * tests/input.at (Unused values): New.
1820 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
1821
e2a21b6f
PE
18222006-01-03 Paul Eggert <eggert@cs.ucla.edu>
1823
54662697
PE
1824 * doc/bison.texinfo (Bison Options): Say more accurately what
1825 --yacc does.
1826 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
1827 about declarations in the grammar when in Yacc mode, as POSIX does
1828 not require a diagnostic when the grammar uses extensions.
1829
1830 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
1831
073f9288
PE
1832 Warn about dubious constructions like "%token T T".
1833 Reported by twlevo.
1834 * src/symtab.h (struct symbol.declared): New member.
1835 * src/symtab.c (symbol_new): Initialize it to false.
1836 (symbol_class_set): New arg DECLARING, specifying whether
1837 this is a declaration that we want to warn about, if there
1838 is more than one of them. All uses changed.
1839
1221b78a
PE
1840 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
1841 Allow multiple %union directives, whose contents concatenate.
1842 * src/parse-gram.y (grammar_declaration): Likewise.
1843 Use muscle_code_grow, so that we don't need stype_line any more.
1844 All uses changed.
1845
1846 * src/muscle_tab.c (muscle_grow): Fix comment.
1847
e2a21b6f
PE
1848 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
1849 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
1850 Update copyright year to 2006.
1851
8f7e3cf9
AD
18522006-01-03 Akim Demaille <akim@epita.fr>
1853
1854 Have glr.cc pass (some of) the calc.at tests.
1855 * data/glr.cc (b4_parse_param_orig): New.
1856 (b4_parse_param): Improve its definition, and bound it more
1857 clearly in the skeleton.
1858 (b4_epilogue): Append, instead of prepending, in order to keep
1859 #line consistency.
1860 Simplify the generation of auxiliary functions: locations and
1861 purity are mandated.
1862 (b4_global_tokens_and_yystype): Honor it.
1863 * data/location.cc (c++.m4): Don't include it.
1864 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
1865 and AT_SKEL_CC_IF.
1866 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
1867 AT_LALR1_CC_IF.
1868 Be sure to initialize the first position's filename.
1869 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
1870 mandated anyway.
1871 (AT_CHECK_CALC_GLR_CC): New.
1872 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
1873
3953ed88
AD
18742006-01-02 Akim Demaille <akim@epita.fr>
1875
1876 * src/output.c (output_skeleton): Don't hard wire the inclusion of
1877 c.m4.
0a96ba81 1878 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
1879 * data/glr.cc: Do not include stack.hh.
1880
9ecafbbf
AD
18812006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1882
1883 * data/glr.c: Reformat whitespace with tabs.
1884 (b4_lpure_formals): Remove this unused m4 macro.
1885 * tests/cxx-type.at: Reformat whitespace with tabs.
1886 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
1887 since it's a member. Rename type to isNterm for clarity.
1888
c4d497a0
AD
18892005-12-29 Akim <akim@sulaco.local>
1890
1891 Let glr.cc catch up with symbol_value_print.
1892 * data/glr.cc (b4_yysymprint_generate): Replace by...
1893 (b4_yy_symbol_print_generate): this.
1894 (yy_symbol_print, yy_symbol_value_print): Declare them.
1895
4517da37
PE
18962005-12-28 Paul Eggert <eggert@cs.ucla.edu>
1897
1898 * src/location.h (boundary): Note that a line or column equal
1899 to INT_MAX indicates an overflow.
1900 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
1901 (rule_length_overflow, increment_rule_length, add_column_width):
1902 New functions.
1903 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
1904 (<SC_BRACED_CODE>"}"):
1905 Use increment_rule_length rather than incrementing it by hand.
1906 (adjust_location, handle_syncline): Diagnose overflow.
1907 (handle_action_dollar, handle_action_at):
1908 Fix bug with monstrosities like $-2147483648.
1909 Remove now-unnecessary checks.
1910 (scan_integer): Verify assumptions and remove now-unnecessary checks.
1911 (convert_ucn_to_byte): Verify assumptions.
1912 (handle_syncline): New arg LOC. All callers changed.
1913 Don't store through a value derived from char const * pointer.
1914
1915 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
1916 GCC warnings.
1917
e3233bf6
PE
19182005-12-27 Paul Eggert <eggert@cs.ucla.edu>
1919
1920 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
1921 Remove unnecessary forward static decls.
1922
8f3596a6
AD
19232005-12-27 Akim Demaille <akim@epita.fr>
1924
1925 * src/reader.c (grammar_current_rule_check): Also check that $$
1926 is used.
1927 Take the rule to check as argument, hence rename as...
1928 (grammar_rule_check): this.
1929 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
1930 Rename as...
1931 (grammar_rule_begin, grammar_rule_end): these, for consistency.
1932 (grammar_midrule_action, grammar_symbol_append): Now static.
1933 * tests/torture.at (input): Don't rely on the default action
1934 being always performed.
1935 * tests/calc.at: "Set" $$ even when the action is "cut" with
1936 YYERROR or other.
1937 * tests/actions.at (Exotic Dollars): Instead of using unused
1938 values, check that the warning is issued.
1939
721be13c
PE
19402005-12-22 Paul Eggert <eggert@cs.ucla.edu>
1941
1942 * NEWS: Improve wording for unused-value warnings.
1943
a0af42fc
AD
19442005-12-22 Akim Demaille <akim@epita.fr>
1945
1946 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
1947 (b4_yysymprint_generate): Rename as...
1948 (b4_yy_symbol_print_generate): this.
1949 Generate yy_symbol_print instead of yysymprint.
1950 Generate also yy_symbol_value_print, and use it.
1951
affac613
AD
19522005-12-22 Akim Demaille <akim@epita.fr>
1953
721be13c 1954 * NEWS: Warn about unused values.
affac613
AD
1955 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
1956 a `used' member.
1957 (symbol_list_n_get, symbol_list_n_used_set): New.
1958 (symbol_list_n_type_name_get): Use symbol_list_n_get.
1959 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
1960 * src/reader.c (grammar_current_rule_check): Check that values are
1961 used.
1962 * src/symtab.c (symbol_print): Accept 0.
1963 * tests/existing.at: Remove the type information.
1964 Empty the actions.
1965 Remove useless actions (beware of mid-rule actions: perl -000
1966 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
1967 * tests/actions.at (Exotic Dollars): Use unused values.
1968 * tests/calc.at: Likewise.
1969 * tests/glr-regression.at (No users destructors if stack 0 deleted):
1970 Likewise.
1971
1972 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
1973 rule_useful_p.
1974
9d9b8b70
PE
19752005-12-21 Paul Eggert <eggert@cs.ucla.edu>
1976
8bb4c753
PE
1977 Undo 2005-12-01 tentative license wording change. The wording is
1978 still being reviewed by the lawyers, and we don't want to wait for
1979 them before publishing a test release. For now, revert to the
1980 previous wording.
1981 * NEWS: Undo 2005-12-01 change.
1982 * data/glr.c: Revert to previous license wording.
1983 * data/glr.cc: Likewise.
1984 * data/lalr1.cc: Likewise.
1985 * data/location.cc: Likewise.
1986 * data/yacc.c: Likewise.
1987
9d9b8b70
PE
1988 * NEWS: Reword %destructor vs YYABORT etc.
1989 * data/glr.c: Use American spacing, for consistency.
1990 * data/glr.cc: Likewise.
1991 * data/lalr1.cc: Likewise.
1992 * data/yacc.c: Likewise.
1993 * data/yacc.c: Reformat comments slightly.
1994 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
1995 for consistency. Fix some spelling errors and reword recently-included
1996 text slightly.
1997 * tests/cxx-type.at: Cast results of malloc, for C++.
1998
2c3b392a
AD
19992005-12-21 Joel E. Denny <address@hidden>
2000
2001 * tests/cxx-type.at: Construct a tree, count the parents of shared
2002 nodes, and free each node once and only once. Previously, the memory
2003 for semantic values was leaked instead.
2004
d6cff4dc
AD
20052005-12-21 Joel E. Denny <address@hidden>
2006
2007 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
2008 (yylval, yylloc): If pure, #define to yystackp->yyval and
2009 yystackp->yyloc similar to yychar and yynerrs.
2010 (yyparse): If pure, remove local yylval and yylloc. Add local
2011 yystackp to accommodate pure definitions of yylval and yylloc.
2012 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
2013 yylvalp and yyllocp to &yylval and &yylloc.
2014 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
2015 namespace. Previously, nerrs and char were missing, but lval and lloc
2016 weren't necessary.
2017 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
2018 yylvalp and yyllocp parameters since, if pure, these are now always
2019 accessible through yystackp. If not pure, they are still accessible
2020 globally.
2021 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
2022 `if (YYID (N))' to pacify lint.
2023
a85284cf
AD
20242005-12-21 Akim Demaille <akim@epita.fr>
2025
2026 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
2027 destroy the RHS symbols of a rule.
2028 * data/yacc.c (yylen): Initialize to 0.
2029 Keep its value to the number of items to possibly shift.
2030 In particular, a regular successful parse that ends on YYFINAL by
2031 a (internal) YYACCEPT must not have yylen != 0.
2032 (yyerrorlab, yyreturn): Pop the RHS.
2033 Reorder a bit to emphasize the `shifting' bits of code.
2034 (YYPOPSTACK): Now accept a number of items to pop.
2035 * data/lalr1.cc: Likewise.
2036 * data/glr.c: Formatting changes.
2037 Use goto instead of fall through.
2038 * doc/bison.texinfo (Destructor Decl): Complete.
2039
d508c281
JMG
20402005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2041
2042 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2043 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
2044 * djgpp/config.bat: Replace every occurence of the file name
2045 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2046 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2047 * djgpp/config.sed: Replace every occurence of the file name
2048 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
2049 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
2050 * djgpp/djunpack.bat: DJGPP specific file.
2051 * djgpp/fnchange.lst: DJGPP specific file.
2052 * djgpp/README.in: Add new information about how to unpack the bison
2053 source on MSDOS and other systems which have 8.3 file name restrictions
2054 using djunpack.bat and fnchange.lst.
2055
3e7a2cd9
PE
20562005-12-12 Paul Eggert <eggert@cs.ucla.edu>
2057
2058 * bootstrap (build_cvs_prefix): Remove; unused.
2059 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
2060 when getting gnulib.
2061
20622005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
2063
2064 * data/glr.c: Reorder typedef declarations for structs to match order
2065 of struct declarations.
2066 Rename yystack everywhere to yystackp except in yyparse where it's not
2067 a pointer.
2068 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
2069 consistency.
2070 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
2071 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
2072 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
2073 lint.
2074
877519f8
PE
20752005-12-09 Paul Eggert <eggert@cs.ucla.edu>
2076
0eca5a39
PE
2077 * tests/sets.at (Accept): Fix typos in regular expression used to
2078 sed out the final state number.
2079
2cec9080
PE
2080 Work around portability problem on Solaris 10: flex-generated
2081 files include <stdio.h> before <config.h>, which messes up
2082 because the latter defines __EXTENSIONS__. Address the problem
2083 by creating two new little files that include <config.h> first,
2084 then include the flex-generated files. Rewrite everyone else
2085 to include <config.h> first, as well.
2086 * lib/timevar.c: Always include "config.h".
2087 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
2088 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
2089 (EXTRA_bison_SOURCES): New macro.
2090 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
2091 * src/system.h: Don't include config.h.
2092 * src/LR0.c: Include <config.h> first.
2093 * src/assoc.c: Likewise.
2094 * src/closure.c: Likewise.
2095 * src/complain.c: Likewise.
2096 * src/conflicts.c: Likewise.
2097 * src/derives.c: Likewise.
2098 * src/files.c: Likewise.
2099 * src/getargs.c: Likewise.
2100 * src/gram.c: Likewise.
2101 * src/lalr.c: Likewise.
2102 * src/location.c: Likewise.
2103 * src/main.c: Likewise.
2104 * src/muscle_tab.c: Likewise.
2105 * src/nullable.c: Likewise.
2106 * src/output.c: Likewise.
2107 * src/parse-gram.y: Likewise.
2108 * src/print.c: Likewise.
2109 * src/print_graph.c: Likewise.
2110 * src/reader.c: Likewise.
2111 * src/reduce.c: Likewise.
2112 * src/relation.c: Likewise.
2113 * src/state.c: Likewise.
2114 * src/symlist.c: Likewise.
2115 * src/symtab.c: Likewise.
2116 * src/tables.c: Likewise.
2117 * src/uniqstr.c: Likewise.
2118 * src/vcg.c: Likewise.
2119
877519f8
PE
2120 * src/parse-gram.y: Fix minor problems uncovered by lint.
2121 (current_lhs, current_lhs_location): Now static.
2122 (current_assoc): Remove unused variable.
2123
2124 Cleanups so that Bison-generated parsers have less lint.
2125 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
2126 Prepend /*ARGSUSED*/, for lint's sake.
2127 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
2128 definition if 'lint' is defined.
2129 (YYID): New macro (or function, if lint).
2130 All uses of /*CONSTCOND*/0 replaced by YYID(0).
2131 * data/yacc.c: Likewise.
2132 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
2133 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
2134 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
2135 is C++ only.
2136 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
2137 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
2138 Use YYID(0) rather than 0, for lint.
2139 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
2140 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
2141
f5228370
PE
21422005-12-07 Paul Eggert <eggert@cs.ucla.edu>
2143
2144 * tests/glr-regression.at
2145 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
2146 Close memory leak reported by twlevo.
2147
69ce078b
PE
21482005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
2149
6ff99711
PE
2150 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
2151 all stacks.
2152 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
2153 * tests/glr-regression.at (No users destructors if stack 0 deleted):
2154 New test case.
2155 (Duplicated user destructor for lookahead): This test now is expected
2156 to succeed.
2157
af3412cd
PE
21582005-12-01 Paul Eggert <eggert@cs.ucla.edu>
2159
32b5b719 2160 * NEWS: Document the following change.
af3412cd
PE
2161 * data/yacc.c: Say "parser skeleton" rather than "file", since
2162 it's no longer just a file.
2163 * data/glr.c: Grant a special exception for C GLR parsers, that
2164 reads like the already-existing exception for C LALR(1) parsers.
2165 * data/glr.cc: Likewise.
2166 * data/lalr1.cc: Likewise.
2167 * data/location.cc: Likewise.
2168 * data/yacc.c: Reword the "written by" statement to clarify that
2169 it was the parser skeleton, not the entire output file.
2170 * data/glr.c: Written by Paul Hilfinger.
2171 * data/glr.cc: Written by Akim Demaille.
2172 * data/lalr1.cc: Likewise.
2173
035aa4a0
PE
21742005-11-18 Paul Eggert <eggert@cs.ucla.edu>
2175
d9963c85
PE
2176 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
2177 Fix typos in previous change that broke 'make check'.
2178 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
2179 supported in C.
2180 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
2181 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
2182 We can revert this once things settle down.
2183
035aa4a0
PE
2184 * src/conflicts.c (conflicts_print): Don't print file name twice
2185 when %expect fails because there were no conflicts.
2186 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
2187 change.
2188 * tests/conflicts.at (%expect not enough, %expect too much):
2189 (%expect with reduce conflicts): Adjust to new behavior.
2190
21912005-11-18 Akim Demaille <akim@epita.fr>
2192
2193 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
2194 errors.
2195 * NEWS: Document this.
2196 * doc/bison.texinfo (Expect Decl): Likewise.
2197
d1ff7a7c
AD
21982005-11-16 Akim Demaille <akim@epita.fr>
2199
2200 Generalize the display of semantic values and locations in traces.
2201 * data/glr.c (yy_reduce_print): Fix indices (again).
2202 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
2203 literal integers.
2204 * data/lalr1.cc (yyreduce_print): Rename as...
2205 (yy_reduce_print): this.
2206 Display values and locations.
2207 * data/yacc.c (yy_reduce_print): Likewise.
2208 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
2209 (yysymprint): Move higher to be visible from yy_reduce_print).
2210 (yyparse): Adjust.
2211 * tests/calc.at: Adjust the expected length of the traces.
2212
6de5398d
AD
22132005-11-14 Akim Demaille <akim@epita.fr>
2214
2215 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
2216 from 1 to N, while values and location start at 0.
2217 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
2218
a1373f55
AD
22192005-11-14 Akim Demaille <akim@epita.fr>
2220
2221 * data/glr.c (yy_reduce_print): Fix the $ number.
2222
613d8952
AD
22232005-11-14 Akim Demaille <akim@epita.fr>
2224
2225 "Use" parse parameters.
2226 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
2227 * data/glr.c, data/glr.cc: Use them.
2228 * data/glr.c (YYUSE): Have a C++ definition that supports
2229 non-pointer types.
2230
b2741627
AD
22312005-11-14 Akim Demaille <akim@epita.fr>
2232
2233 * data/glr.c (yyexpandGLRStack): Declare only if defined.
2234
5059b5c8
AD
22352005-11-14 Akim Demaille <akim@epita.fr>
2236
42249483
AD
2237 * data/glr.cc: New.
2238 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 2239
4626a15d
AD
22402005-11-12 Akim Demaille <akim@epita.fr>
2241
2242 Let position and location be PODs.
2243 * data/location.cc (position::initialize, location::initialize): New.
2244 (position::position, location::location): Define only if
2245 b4_location_constructors is defined.
2246 * data/lalr1.cc (b4_location_constructors): Define it for backward
2247 compatibility.
2248 * doc/bison.texinfo (Initial Action Decl): Use initialize.
2249
22502005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
2251
2252 * data/lalr1.cc: Move the body of the ctor and dtor into the
2253 parser file (instead of the header).
2254 Wrap the implementations in a "namespace yy".
2255
22562005-11-12 Akim Demaille <akim@epita.fr>
2257
2258 Have glr.c include its header file when created.
2259 * data/glr.c (b4_shared_declarations): New.
2260 Output them verbatim in the parser if !%defines, otherwise
2261 output then in the header file, and include it instead.
2262
1989d947
AD
22632005-11-11 Akim Demaille <akim@epita.fr>
2264
2265 * data/glr.c: Comment changes.
2266
22672005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
2268
2269 When yydebug, report semantic and location values for reductions.
2270 * data/glr.c (yy_reduce_print): Report the semantic values and the
2271 locations.
2272 (YY_REDUCE_PRINT): Adjust.
2273 (yyglrReduce): Use them.
2274 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
2275 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
2276 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
2277 traces.
2278
02998094
AD
22792005-11-10 Akim Demaille <akim@epita.fr>
2280
2281 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
2282 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
2283 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
2284
5210672f
PE
22852005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
2286
2287 * m4/cxx.m4, examples/Makefile.am: Don't build
2288 examples/calc++ if no C++ compiler is available. (trivial change)
2289
a8991a1d
AD
22902005-11-09 Akim Demaille <akim@epita.fr>
2291
2292 * src/scan-skel.l: Use a couple of asserts.
2293
36b5e963
AD
22942005-11-03 Akim Demaille <akim@epita.fr>
2295
2296 In some (weird) cases, the final state number is incorrect.
2297 Reported by Alexandre Duret-Lutz.
2298 * src/LR0.c (state_list_append): Remove the computation of
2299 final_state.
2300 (save_reductions): Do it here.
2301 (get_state): Alpha conversion.
2302 (generate_states): Use a for loop.
2303 * src/gram.h (item_number_is_rule_number)
2304 (item_number_is_symbol_number): New.
2305 * src/state.c: Use assert.
2306 * src/system.h: Include assert.h.
2307 * tests/sets.at (Accept): New.
2308
44e7ead1
PH
23092005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2310
2311 * data/glr.c (yyfill): Adjust comment.
36b5e963 2312 (yyresolveAction): Initialize default location properly
44e7ead1
PH
2313 for empty right-hand sides.
2314 (yydoAction): Ditto.
2315 Add comment explaining apparently dead code.
36b5e963
AD
2316 * tests/glr-regression.at
2317 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 2318 New test.
36b5e963 2319
e10a80ee
PE
23202005-10-30 Paul Eggert <eggert@cs.ucla.edu>
2321
2322 * bootstrap (cleanup_gnulib): New function. Use it to clean up
2323 gnulib when interrupted. This fixes some race conditions and
2324 works around some portability problems (one noted by Paul
2325 Hilfinger).
2326
067b32ee
AD
23272005-10-22 Akim <akim@epita.fr>
2328
2329 * Makefile.cfg: Adjust to config -> build-aux.
2330 Reported by twledo.
2331
4b367315
AD
23322005-10-21 Akim Demaille <akim@epita.fr>
2333
2334 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
2335 the %parse-params.
2336 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
2337 * data/yacc.c (b4_Pure_if): Rename as...
2338 (b4_yacc_pure_if): this.
2339 (YY_SYMBOL_PRINT, yyparse): Adjust.
2340 * doc/bison.texinfo: Formatting changes.
2341
24cc23d9
AD
23422005-10-21 Akim Demaille <akim@epita.fr>
2343
2344 Finish the transition config -> build-aux.
2345 * configure.ac, Makefile.am: Use build-aux.
2346 * config/prev-version, config/announce-gen, config/Makefile.am:
2347 Move to...
2348 * build-aux/prev-version, build-aux/announce-gen,
2349 * build-aux/Makefile.am: here.
2350
d4476375
AD
23512005-10-14 Akim Demaille <akim@epita.fr>
2352
2353 * examples/calc++/test: Use set -x only when VERBOSE.
2354
302c0aee
PE
23552005-10-13 Paul Eggert <eggert@cs.ucla.edu>
2356
2357 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
2358 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
2359
7625ec2c
AD
23602005-10-13 Akim Demaille <akim@epita.fr>
2361
2362 * src/scan-skel.l: Output the base name parts of the parser and
2363 header file names.
302c0aee 2364 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
2365 additional checks.
2366 Use this to exercise C++ outputs in subdirs.
2367 Reported by Oleg Smolsky.
2368
ba0fe3c7
PE
23692005-10-12 Paul Eggert <eggert@cs.ucla.edu>
2370
2371 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
2372 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
2373 Problem reported by John P. Hartmann.
2374 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
2375 already defined it.
2376
9b8a5ce0
AD
23772005-10-12 Akim Demaille <akim@epita.fr>
2378
2379 * src/parse-gram.y (version_check): Exit 63 to please missing
2380 (stands for "version mismatch).
2381 * tests/input.at, doc/bison.texinfo: Adjust.
2382
4f6e011e
PE
23832005-10-10 Paul Eggert <eggert@cs.ucla.edu>
2384
2385 Work around portability problems with Visual Age C compiler
2386 (xlc and xlC_r) reported by John P. Hartmann.
2387 * data/location.cc (initial_column, initial_line): Remove.
2388 All uses replaced by 0 and 1.
2389 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
2390 that xlc complains about.
2391 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 2392 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 2393 as __STDC__.
4d7aa45e
PE
2394 * data/yacc.c (YYMODERN_C): New macro, which also looks at
2395 __STDC_VERSION__. Use it everywhere instead of looking at
2396 __STDC__ and __cplusplus.
4f6e011e 2397
a1b3bf8c
AD
23982005-10-10 Akim Demaille <akim@epita.fr>
2399
2400 * examples/calc++/test: Be quiet unless VERBOSE.
2401
412e44aa
PE
24022005-10-05 Paul Eggert <eggert@cs.ucla.edu>
2403
2a4647a3
PE
2404 * data/c.m4 (yydestruct, yysymprint):
2405 Use YYUSE instead of casting to void.
2406 * data/glr.c (YYUSE): New macro.
2407 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
2408 Use it instead of rolling our own.
2409 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
2410 (YYCHK1):
2411 Use /*CONSTCOND*/ to suppress lint warnings.
2412 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
2413 (YY_STACK_PRINT): Use 'false' not '0'.
2414 (YYUSE): New macro.
2415 (yysymprint_, yydestruct_): Use it instead of rolling our own.
2416 * data/yacc.c (YYUSE): New macro.
2417 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
2418 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
2419 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
2420
2421
412e44aa
PE
2422 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
2423 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
2424
88c6637f
PE
24252005-10-04 Paul Eggert <eggert@cs.ucla.edu>
2426
2f4f028d
PE
2427 Undo the parts of the unlocked-I/O change that substituted
2428 putc or puts for printf. This might hurt performance a bit,
2429 but some people prefer the printf style.
2430 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
2431 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
2432 All uses replaced by YYFPRINTF and YYDPRINTF.
2433 * data/yacc.c: Likewise.
2434 * lib/bitset.c (bitset_print): Likewise.
2435 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
2436 putc and puts.
2437 * lib/lbitset.c (debug_lbitset): Likewise.
2438 * src/closure.c (print_firsts, print_fderives): Likewise.
2439 * src/gram.c (grammar_dump): Likewise.
2440 * src/lalr.c (look_ahead_tokens_print): Likewise.
2441 * src/output.c (escaped_output): Likewise.
2442 (user_actions_output): Break apart two printfs.
2443 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
2444 * src/reduce.c (reduce_print): Likewise.
2445 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2446 * src/system.h: Include unlocked-io.h rathe than stdio.h.
2447
88c6637f
PE
2448 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
2449 Use assignments rather than casts-to-void to suppress
2450 unused-variable warnings. This pacifies 'lint'.
2451 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
2452 unused-variable warnings.
2453
fb32e373
JMG
24542005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2455
2456 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
2457
edb8f44f
PE
24582005-10-02 Paul Eggert <eggert@cs.ucla.edu>
2459
fb9c0b33
PE
2460 Use unlocked I/O for a minor performance improvement on hosts like
2461 GNU/Linux and Solaris that support unlocked I/O. The basic idea
2462 is to use the gnlib unlocked-io module, and to prefer putc and
2463 puts to printf when either will work (since the latter doesn't
2464 come in an unlocked flavor).
2465 * bootstrap (gnulib_modules): Add unlocked-io.
2466 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
2467 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
2468 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
2469 and similarly for puts and putc and printf.
2470 * data/yacc.c: Likewise.
2471 * lib/bitset.c (bitset_print): Likewise.
2472 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
2473 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
2474 to printf.
2475 * lib/lbitset.c (debug_lbitset): Likewise.
2476 * src/closure.c (print_firsts, print_fderives): Likewise.
2477 * src/gram.c (grammar_dump): Likewise.
2478 * src/lalr.c (look_ahead_tokens_print): Likewise.
2479 * src/output.c (escaped_output): Likewise.
2480 (user_actions_output): Coalesce two printfs.
2f4f028d 2481 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
2482 * src/reduce.c (reduce_print): Likewise.
2483 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 2484 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 2485
edb8f44f
PE
2486 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
2487 this confuses xgettext.
2488
b50d2359
AD
24892005-10-02 Akim Demaille <akim@epita.fr>
2490
2491 * bootstrap (gnulib_modules): Add strverscmp.
2492 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
2493 * m4/.cvsignore: Add strverscmp.m4.
2494 * src/parse-gram.y (%require): New token, new rule.
2495 (version_check): New.
2496 * src/scan-gram.l (%require): Adjust.
2497 * tests/input.at (AT_REQUIRE): New.
2498 Use it.
2499 * doc/bison.texinfo (Require Decl): New.
2500 (Calc++ Parser): Use %require.
2501
21667f64
AD
25022005-10-02 Akim Demaille <akim@epita.fr>
2503
2504 * data/location.cc: New.
2505
2b81e969
AD
25062005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
2507 Akim Demaille <akim@epita.fr>
2508
2509 Make sure -odir/foo.cc creates dir/location.hh etc.
2510 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
2511 (spec_file_prefix, spec_verbose_file, spec_graph_file)
2512 (spec_defines_file): Now const.
2513 (dir_prefix): New.
2514 (short_base_name): Remove.
2515 * src/files.c: Adjust.
2516 (dirname.h): Include.
2517 (base_name): Don't prototype it.
2518 (finput): Remove, duplicates gram_in.
2519 (full_base_name, short_base_name): Replace by...
2520 (all_but_ext, all_but_tab_ext): these.
2521 (compute_base_names): Rename as...
2522 (compute_file_name_parts): this.
2523 Update to compute the new variables, including dir_prefix.
2524 Adjust dependencies.
2525 * src/output.c (prepare): Output them.
2526 * src/reader.c: Adjust to use gram_in, not finput.
2527 * src/scan-skel.l (@dir_prefix@): New.
2528
ad6a9b97
JMG
25292005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2530
2531 * lib/subpipe.c: New function end_of_output_subpipe() added
2532 to allow support for non-posix systems. This is a no-op function
2533 for posix systems.
2534
2535 * lib/subpipe.h: New function end_of_output_subpipe() added
2536 to allow support for non-posix systems. This is a no-op function
2537 for posix systems.
2538
2539 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
2540 handle the lack of pipe/fork functionality on non-posix systems.
2541
2542 * djgpp/Makefile.maint: DJGPP specific file.
2543
2544 * djgpp/README.in: DJGPP specific file.
2545
2546 * djgpp/config.bat: DJGPP specific configuration file.
2547
2548 * djgpp/config.sed: DJGPP specific configuration file.
2549
2550 * djgpp/config.site: DJGPP specific configuration file.
2551
2552 * djgpp/config_h.sed: DJGPP specific configuration file.
2553
2554 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
2555
2556 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
2557
fc695704
AD
25582005-10-02 Akim Demaille <akim@epita.fr>
2559
2560 * data/location.cc: New, extract from...
2561 * data/lalr1.cc: here.
2562 (location.hh): Include it after the user prologue, in case the
2563 filename type is defined by the user.
2564 Forward declation location and position before the pre-prologue.
2565 (yyresult_): Rename as...
2566 (yyresult): this, it's a local variable, not an attribute.
2567 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
2568
25692005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
2570
2571 * examples/extexi: Restore the #line generation.
2572
fb9712a9
AD
25732005-09-30 Akim Demaille <akim@epita.fr>,
2574 Alexandre Duret-Lutz <adl@gnu.org>
2575
2576 Move the token type and YYSTYPE in the parser class.
2577 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
2578 (parser::token): New, from the moved free definition of tokens.
2579 (parser::semantic_value): Now a full definition instead of an
2580 indirection to YYSTYPE.
2581 (b4_post_prologue): No longer included in the header file, but
2582 in the implementation file.
2583 * doc/bison.texi (C+ Language Interface): Update.
2584 * src/parse-gram.y: Support unary %define.
2585 * tests/actions.at: Define global_tokens_and_yystype for backward
2586 compatibility until we update the tests.
2587 * tests/calc.at: Idem.
2588 (first_line, first_column, last_line, last_column): Define for lalr1.cc
2589 to simplify the code.
2590
55f0c7b1
PE
25912005-09-29 Paul Eggert <eggert@cs.ucla.edu>
2592
2593 Port to SunOS 4.1.4, which lacks strtoul and strerror.
2594 Ah, the good old days! Problem reported by Peter Klein.
2595 * bootstrap (gnulib_modules): Add strerror, strtoul.
2596 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
2597 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
2598
fb9712a9 25992005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
2600
2601 * data/c.m4 (b4_error_verbose_if): New.
2602 * data/lalr1.cc: Use it.
2603 (YYERROR_VERBOSE_IF): Remove.
2604 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
2605 parser members, replaced by...
2606 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
2607 local variables.
2608 (yysyntax_error_): Takes the state number as argument.
2609 (yyreduce_print_): Use the argument yyrule, not the former
2610 attribute yyn_.
2611
8a6f72f3
PE
26122005-09-26 Paul Eggert <eggert@cs.ucla.edu>
2613
2614 * bootstrap (gnulib_modules): Add verify.
2615 * lib/.cvsignore: Add verify.h.
2616 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
2617 * src/system.h (verify): Remove.
2618 Include verify.h instead.
2619 * src/tables.c (tables_generate): Use new API for 'verify'.
2620
0d50976f
PE
26212005-09-21 Paul Eggert <eggert@cs.ucla.edu>
2622
ebc3737e
PE
2623 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
2624 local variables whose names begin with 'yy'.
2625 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
2626 Trivial changes from Joel E. Denny.
2627
0d50976f
PE
2628 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
2629 it itself.
2630 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
2631 don't use alloca any more.
2632
2633 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
2634 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 2635 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
2636 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
2637 to match yacc.c, to test more hosts.
2638
a05b79df
PE
26392005-09-20 Paul Eggert <eggert@cs.ucla.edu>
2640
55289366
PE
2641 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
2642 doesn't affect behavior.
2643 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
2644 Solaris, AIX, MSC.
2645 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
2646 This works a bit better with glibc, if user code has already included
2647 stdlib.h.
2648 * doc/bison.texinfo (Bison Parser): Document that users can't
2649 arbitrarily use malloc and free for other purposes. Document
2650 that <alloca.h> and <malloc.h> might be included.
2651 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
2652 user must declare alloca.
2653
a05b79df
PE
2654 * HACKING (release): Forwarn the Translation Project about
2655 stable releses.
2656
3ab2ca22
AD
26572005-09-20 Akim Demaille <akim@epita.fr>
2658
2659 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
2660
a9739e7c
PE
26612005-09-19 Paul Eggert <eggert@cs.ucla.edu>
2662
a702593e
PE
2663 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
2664 (YYSTACK_ALLOC_MAXIMUM): Use it.
2665 (yysyntax_error): New function.
2666 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
2667 multiple syntax errors are reported, and alloca is being used.
2668 Instead, reallocate buffers twice as big each time, so that
2669 we waste at most half the allocated memory. Start with a small
2670 (128-byte) buffer that will suffice in most cases anyway.
2671 Use yysyntax_error to do most of the work.
2672
2673 * doc/bison.texinfo (Error Reporting, Table of Symbols):
2674 yynerrs is the number of errors reported, not the number of
2675 errors encountered.
2676
a9739e7c
PE
2677 * tests/glr-regression.at (Duplicated user destructor for lookahead):
2678 Mark it as expected to fail.
2679 Cast result of malloc; problem reported by twlevo@xs4all.nl.
2680 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
2681 Don't start user-code symbols with "yy", to avoid name space problems.
2682
f479c6c6
AD
26832005-09-19 Akim Demaille <akim@epita.fr>
2684
2685 Remove the traits, failed experiment.
2686 It never proved useful, and anyway because of the current
2687 definition, it was not possible to have several specialization of
2688 this traits, making it useless.
2689 * data/lalr1.cc (yy:traits): Remove.
2690 Inline its definitions in the parser class.
2691
e2586f82
AD
26922005-09-19 Akim Demaille <akim@epita.fr>
2693
2694 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
2695 least Mac OSX with a /usr/local install of gettext.
2696
2e8cf949
AD
26972005-09-19 Akim Demaille <akim@epita.fr>
2698
2699 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
2700 and yytoken for similarity with the other skeletons.
2701
c7fb0b90
AD
27022005-09-19 Akim Demaille <akim@epita.fr>
2703
4e26c69e 2704 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 2705
1bd0deda
PE
27062005-09-16 Paul Eggert <eggert@cs.ucla.edu>
2707
2708 * NEWS: Version 2.1.
2709
2710 * NEWS: Remove notice of yytname change, since it was never in an
2711 official release.
2712 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
2713 diagnostic.
2714 * src/output.c (prepare): Likewise.
2715 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
2716 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
2717 is not defined. This is an awful hack, but it's enough for now.
2718 All callers changed.
2719 * tests/glr-regression-at (make_value): Args are const pointers now,
2720 to avoid GCC warning.
2721 (Duplicated user destructor for lookahead): New test. Currently
2722 skipped. It fails on my host but I'm not sure it'll always fail.
2723
27242005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
2725
2726 * src/symtab.h (struct symbol): Declare the printer and destructor
2727 as const, to avoid accidental calls to free.
2728 (symbol_destructor_set, symbol_printer_set): Adjust.
2729 * src/symtab.c: Adjust.
2730
1bd0deda 27312005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
2732
2733 * data/c.m4 (b4_token_enums): New.
2734 (b4_token_defines): Rename as...
2735 (b4_token_enums_defines): this.
2736 (b4_token_defines): New, output only the #defines.
2737 * data/yacc.c, data/glr.c: Adjust.
2738 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
2739 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
2740 as default values.
2741
dbcdae2d
AD
27422005-09-16 Akim Demaille <akim@epita.fr>
2743
2744 * data/lalr1.cc (yylex_): Remove, inline its code.
2745 (yyreport_syntax_error_): Remove, replaced by...
2746 (yysyntax_error_): this which returns a string and leaves to the
2747 caller the call to the users' error function.
2748 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
2749 Move from members of the parser object...
2750 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
2751 to local variables of the parse function.
2752
70d8f291
AD
27532005-09-16 Akim Demaille <akim@epita.fr>
2754
2755 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
2756 since it's in Bison's name space.
2757
b47dbebe
PE
27582005-09-15 Paul Eggert <eggert@cs.ucla.edu>
2759
ae199bf1
PE
2760 * data/glr.c (yyresolveValue): Add default case to pacify
2761 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
2762
b47dbebe
PE
2763 * NEWS: Document when yyparse started to return 2.
2764 * doc/bison.texinfo (Parser Function): Document when yyparse
2765 returns 2.
2766
2767 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
2768 (b4_filename_type): Renamed back from b4_file_name_type. All uses
2769 changed.
2770 (class position): file_name -> filename (reverting). All uses changed.
2771
27722005-09-14 Paul Eggert <eggert@cs.ucla.edu>
2773
2774 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
2775 do anything if $@ exists. This reverts part of the 2005-07-07
2776 patch.
2777
00292f66
PE
27782005-09-11 Paul Eggert <eggert@cs.ucla.edu>
2779
2780 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
2781 contains obsolete information and isn't worth distributing as a
2782 separate file anyway.
2783 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
2784 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
2785 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
2786 (yyparse): Abort if user code uses longjmp to throw an unexpected
2787 value.
2788
a420f962
PE
27892005-09-09 Paul Eggert <eggert@cs.ucla.edu>
2790
00292f66
PE
2791 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
2792 Suggested by twlevo@xs4all.nl.
2793
127287e9
PE
2794 * data/glr.c (YYCHK1): Do not assume YYE is in range.
2795 This avoids a diagnostic from gcc -Wswitch-enum.
2796 Problem reported by twlevo@xs4all.nl.
2797
a420f962
PE
2798 * doc/bison.texinfo: Don't use "filename", as per GNU coding
2799 standards. Use "file name" or "file" or "name", depending on
2800 the context.
2801 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
2802 not to hack/foo.tab.c.
2803 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
2804 * data/glr.c: b4_filename -> b4_file_name.
2805 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
2806 All uses changed.
2807 (class position): filename -> file_name. All uses changed.
2808 * data/yacc.c: b4_filename -> b4_file_name.
2809 * lib/bitset.h: filename -> file_name in local vars.
2810 * lib/bitset_stats.c: Likewise.
2811 * src/files.c: Likewise.
2812 * src/scan-skel.l ("@output ".*\n): Likewise.
2813 * src/files.c (file_name_split): Renamed from filename_split.
2814 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
2815
28162005-09-08 Paul Eggert <eggert@cs.ucla.edu>
2817
2818 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
2819 to accommodate latest gnulib.
2820
2821 * tests/glr-regression.at (Duplicate representation of merged trees):
2822 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
2823
2824 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
2825 needed.
2826
42a6501d
PE
28272005-08-26 Paul Eggert <eggert@cs.ucla.edu>
2828
2829 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
2830 All uses changed. Invoke user destructor after an error during a
2831 split parse (trivial change from Joel E. Denny).
2832
2833 * tests/glr-regression.at
2834 (User destructor after an error during a split parse): New test case.
2835 Problem reported by Joel E. Denny in:
2836 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
2837
ef9a1faf
PE
28382005-08-25 Paul Eggert <eggert@cs.ucla.edu>
2839
5b4aaf78
PE
2840 * README-cvs: Give URLs for recommended tools.
2841 Mention Gzip version problem, and bootstrapping issues.
2842 Remove troubleshooting section, as it's somewhat obsolete.
2843
b5240ba5
PE
2844 * bootstrap (no_cache): New var, to accommodate different wget
2845 variants. Use it instead of '-C off'. Problem reported by
2846 twlevo@xs4all.nl.
2847
ef9a1faf
PE
2848 * data/glr.c (yydestroyStackItem): New function.
2849 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
2850 debugging information. Problem reported by Joel E. Denny.
2851
e6efa9da
AD
28522005-08-25 Akim Demaille <akim@epita.fr>
2853
2854 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
2855
adc90f13
PE
28562005-08-24 Paul Eggert <eggert@cs.ucla.edu>
2857
2858 * data/glr.c (yyrecoverSyntaxError, yyreturn):
2859 Don't invoke destructor on unresolved entries.
2860 * tests/glr-regression.at
2861 (User destructor for unresolved GLR semantic value): New test case.
2862 Problem reported by Joel E. Denny in:
2863 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
2864
f9315de5
PE
28652005-08-21 Paul Eggert <eggert@cs.ucla.edu>
2866
15d29c1f
PE
2867 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
2868 Add strnlen.c.
2869 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
2870 lib-prefix.m4, po.m4.
2871
dd5f2af2
PE
2872 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
2873 in yydestruct diagnostic, since it might not be an error.
2874 Problem reported by Joel Denny near end of
2875 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 2876 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
2877 * data/yacc.c (yyreturn): Likewise.
2878 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
2879
2880 * src/files.c: Remove obsolete FIXME comment.
2881
2882 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
2883 with the other templates, and to fix bogus run-on messages such
2884 as the one reported at the end of
2885 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
2886 All callers changed to avoid the newline.
2887 (yyprocessOneStack): Output two lines rather than one, to accommodate
2888 the above change. This changes the debug output format slightly.
2889
f9315de5
PE
2890 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
2891 reported by Joel E. Denny in
2892 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
2893 (trivial change).
2894 * tests/glr-regression.at (Duplicate representation of merged trees):
2895 New test, from Joel E. Denny in:
2896 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
2897 * THANKS: Add Joel E. Denny.
2898
2899 * configure.ac (AC_INIT): Bump to 2.0c.
2900
04098407
PE
29012005-07-24 Paul Eggert <eggert@cs.ucla.edu>
2902
2903 * NEWS: Version 2.0b.
2904
ca5d2013
PE
2905 * Makefile.am (SUBDIRS): Put examples before tests, so that
2906 "make check" doesn't finish with "All 1 tests passed".
2907
3d54b576
PE
2908 * tests/regression.at (Token definitions): Don't rely on
2909 AT_PARSER_CHECK for data that contains backslashes. It currently
2910 uses 'echo', and 'echo' isn't portable if its argument contains
2911 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
2912 that the byte '\0xff' is not printable in the C locale; it is,
2913 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
2914 not printable, so use '\0x81' to test.
2915
d53ae497
PE
2916 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
2917 version of GCC, since the macro is used with non-GCC compilers.
2918
fc01665e
PE
2919 Fix core dump reported by Pablo De Napoli in
2920 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
2921 * tests/regression.at (Invalid inputs with {}): New test.
2922 * src/parse-gram.y (token_name): Translate type before using
2923 it as an index.
2924
04098407
PE
2925 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
2926 the user's name space. All uses changed to __attribute__
2927 ((__unused__)).
2928 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
2929 Add __attribute__ ((__noreturn__)).
2930
2931 * etc/clcommit: Remove. We weren't using it, and it failed
2932 "make maintainer-distcheck".
2933 * Makefile.maint: Merge from coreutils.
2934 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
2935 (syntax-check-rules): Change list of rules as described below.
2936 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
2937 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
2938 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
2939 (sc_trailing_space): New rules.
2940 (sc_xalloc_h_in_src): Remove.
2941 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
2942 (sc_space_tab, sc_error_exit_success, sc_changelog):
2943 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
2944 (makefile-check, po-check, author_mark_check):
2945 (makefile_path_separator_check, copyright-check):
2946 Use grep -n, to make it easier to find violations.
2947 Use CVS_LIST and CVS_LIST_EXCEPT.
2948 (header_regexp, h_re): Remove.
2949 (dd_c): New macro.
2950 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
2951 (my-distcheck): Use more-modern GCC flags.
2952 (signatures, %.asc): Remove.
2953 (rel-files, announcement): Remove signatures.
2954 Restore old updating code, even though we don't use it, so
2955 that we're the same as coreutils.
2956 (alpha, beta, major): Depend on news-date-check.
2957 Make the upload commands.
2958
2959 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
2960 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
2961 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
2962 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
2963 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
2964 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
2965 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
2966 * tests/sets.at: Likewise.
2967
2968 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
2969 we comment out the Autoconf version number.
2970 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
2971 it's error-prone and "make maintainer-distcheck" rejects it.
2972
2973 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
2974 Indent calls to "error" to pacify "make maintainer-distcheck",
2975 when the calls are not intended to be translated.
2976 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
2977
2978 * src/Makefile.am (DEFS): Use +=, to pacify
2979 "make maintainer-distcheck".
2980 (bison_SOURCES): Add scan-skel.h.
2981 (sc_tight_scope): New rule, from coreutils.
2982
2983 * src/files.c (src_extension, header_extension):
2984 Now static, not extern.
2985 * src/getargs.c (short_options): Likewise.
2986 * src/muscle_tab.c (muscle_table): Likewise.
2987 * src/parse-gram.y (current_class, current_type, current_prec):
2988 Likewise.
2989 * src/reader.c (grammar_end, previous_rule_end): Likewise.
2990 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
2991 * src/main.c (main): Cast bindtextdomain and textdomain calls to
2992 void, to avoid warning when NLS is disabled.
2993 * src/output.c: Include scan-skel.h.
2994 (scan_skel): Remove decl, since scan-skel.h does this.
2995 (output_skeleton):
2996 Indent calls to "error" to pacify "make maintainer-distcheck".
2997 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
2998 * src/reader.h (gram_end, gram_lineno): New decls to pacify
2999 "make maintainer-distcheck".
3000 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
3001 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
3002 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
3003 (skel_lex_destroy, scan_skel): Move these decls to...
3004 * src/scan-skel.h: New file.
3005 * src/uniqstr.c (uniqstr_assert):
3006 Indent calls to "error" to pacify "make maintainer-distcheck".
3007
3008 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
3009 not @VAR@.
3010
3011 * tests/torture.at: Revamp to avoid misuse of atoi that
3012 "make maintainer-distcheck" complained about.
3013
3014 * examples/extexi (message): Don't print a message more than once,
3015 and omit line-number decoration that makes Emacs compile think
3016 that informative messages are worth worrying about.
3017
30182005-07-22 Paul Eggert <eggert@cs.ucla.edu>
3019
3020 * configure.ac: Update version number.
3021
3022 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
3023 accidentally.
3024 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
3025 autogenerated by the maintainer.
3026 * examples/calc++/.cvsignore: Add *.yy.
3027
3028 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
3029 * lib/bitset_stats.c (bitset_stats_init): Likewise.
3030 * lib/bitsetv.c (bitsetv_alloc): Likewise.
3031
3032 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
3033
3034 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
3035 from maintainer-distcheck about casting the argument of 'free'.
3036
3037 * NEWS: Mention recent yytname changes.
3038 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
3039
3040 * bootstrap: For translations that have not yet been upgraded to
3041 the new runtime-po domain, prime the pump by extracting the
3042 relevant strings from the obsolete translations. This code can be
3043 removed once the bison-runtime domain has been translated by each
3044 team.
3045
3046 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
3047 now that token names are already quoted.
3048
3049 Fix problem reported by Anthony Heading.
3050 * data/glr.c (YYTOKEN_TABLE): New macro.
3051 (yytname): Define if YYTOKEN_TABLE.
3052 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
3053 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
3054 (YYERROR_VERBOSE): Define the same way the other skeletons do.
3055 * src/output.c (prepare_symbols): Output token_table_flag.
3056
0ffda363
PE
30572005-07-21 Paul Eggert <eggert@cs.ucla.edu>
3058
3059 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
3060 again if the first call fails.
3061
3062 * data/glr.c (yytnamerr): New function.
3063 (yyreportSyntaxError): Use it to dequote most string literals.
3064 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
3065 with other skeletons. All uses changed.
3066 (yytnameerr_): New function.
3067 (yyreport_syntax_error): Use it to dequote most string literals.
3068 * data/yacc.c (yytnamerr): New function.
3069 (yyerrlab): Use it to decode most string literals.
3070 * doc/bison.texinfo (Decl Summary, Calling Convention):
3071 Clarify quoting convention of yytname.
3072 * src/output.c (prepare_symbols): Quote all names. This undoes
3073 the 2005-04-17 change, which is now accomplished (mostly) via
3074 changes in the parsers as described above.
3075 * tests/regression.at (Token definitions, Web2c Actions):
3076 Undo most 2005-04-17 change here, too.
3077
30782005-07-20 Paul Eggert <eggert@cs.ucla.edu>
3079
3080 Fix more problems reported by twlevo@xs4all.nl.
3081 * tests/cxx-type.at: Don't pipe output of ./types through sed to
3082 remove trailing spaces. This loses the exit status of ./types,
3083 and isn't needed since ./types shouldn't be emitting trailing
3084 spaces.
3085 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
3086 as the stack isn't valid in that case.
3087
3088 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3089 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3090 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3091 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
3092 is used.
3093 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
3094 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3095 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3096 Likewise.
3097
3098 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
3099 overly-picky compilers that reject 'char *foo = "bar";'.
3100
3101 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
3102 to FILE * parameter, not to stderr. This fixes a typo introduced
3103 in the 2005-07-12 change.
3104
3105 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
3106 warnings from GCC 4.
3107
3108 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
3109 (yyglrShiftDefer, yysplitStack):
3110 Remove unused parameters b4_pure_formals. All uses changed.
3111 (yyglrShift): Remove unused parameters b4_user_formals.
3112 All uses changed.
3113 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
3114
6100a9aa
PE
31152005-07-18 Paul Eggert <eggert@cs.ucla.edu>
3116
258b75ca
PE
3117 Destructor cleanups and regularization among the three skeletons.
3118 * NEWS: Document the behavior changes.
3119 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
3120 stack before failing, as the cleanup code will do it for us now.
3121 * data/lalr1.cc (yyerrlab): Likewise.
3122 * data/glr.c (yyparse): Pop everything off the stack before
3123 freeing it, so that destructors get called properly.
3124 * data/lalr1.cc (yyreturn): Likewise.
3125 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
3126 This is more consistent.
3127 * doc/bison.texinfo (Destructor Decl): Mention more reasons
3128 why destructors might be called. 1.875 -> 2.1.
3129 (Destructor Decl, Decl Summary, Table of Symbols):
3130 Some English-language cleanups for %destructor.
3131 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3132 Add output line for destructor of start symbol.
3133 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
3134 because of that same extra output line.
3135
1a059451
PE
3136 * NEWS: Document minor wording changes in diagnostics of
3137 Bison-generated parsers.
3138 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
3139 Remove unused formals. All uses changed.
3140 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
3141 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
3142 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
3143 Rename yyoverflowab to yyexhaustedlab.
3144 When memory exhaustion occurs during syntax-error reporting,
3145 report it separately rather than in a single diagnostic; this
3146 eases translation.
3147 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
3148 (Memory Exhausted): Renamed from Parser Stack Overflow.
3149 Revamp wording slightly to prefer "memory exhaustion".
3150 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
3151
97460c78
PE
3152 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
3153
30757c8c
PE
3154 Add i18n support to the GLR skeleton. Partially fix the C++
3155 skeleton; a C++ expert needs to finish this. Remove debugging
3156 msgids; there's little point to having them translated, since they
3157 can be understood only by someone who can read the
3158 (English-language) source code.
3159
3160 Generate runtime-po/bison-runtime.pot automatically, so that we
3161 don't have to worry about garbage getting in that file. We'll
3162 make sure after the next official release that old msgids don't
3163 get lost. See
3164 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
3165
3166 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
3167 Now auto-generated.
3168 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
3169 Fix typos in explanations of the runtime file.
3170 * bootstrap: Change gettext keyword from YYI18N to YY_.
3171 Use standard Makefile.in.in in runtime-po, since we'll arrange
3172 for backward-compatible bison-runtime.po files in a different way.
3173 * data/glr.c (YY_): New macro, from yacc.c.
3174 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
3175 Translate messages intended for users.
3176 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
3177 the wording in the other skeletons. We don't know that the memory
3178 is virtual.
3179 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
3180 Use same method that yacc.c uses.
3181 Don't translate debugging messages.
3182 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
3183 it doesn't work (yet), and requires C++ expertise to fix.
3184 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
3185 Move defn to a more logical place, to be consistent with other
3186 skeletons.
3187 Don't translate debugging messages.
3188 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
3189 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
3190 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
3191 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
3192
ac8c5689
PE
3193 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
3194 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
3195 void, not int.
3196 * tests/glr-regression.at (Badly Collapsed GLR States):
3197 Likewise.
3198 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3199 yylex should return 0 at EOF rather than aborting.
3200
6100a9aa
PE
3201 Improve tests for stack overflow in GLR parser.
3202 Problem reported by twlevo@xs4all.nl.
3203 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
3204 All uses removed.
3205 (yyStackOverflow): Just longjmp, but with value 2 so that caller
3206 can handle the problem.
3207 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
3208 (yyparse): New local variable yyresult to record the result.
3209 Use result of setjmp to set it, rather than storing itinto
3210 struct.
3211 (yyDone): Remove label.
3212 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
3213 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
3214 if YYABORT is used).
3215 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
3216 yyparse status; put status > 1 into diagnostic.
3217 Check that status==2 works.
3218 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
3219 Use exit status 3 for failure to open (which shouldn't happen).
3220
15f40952
PE
32212005-07-17 Paul Eggert <eggert@cs.ucla.edu>
3222
67fd79c4
PE
3223 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
3224 1 on syntax error; just let yyparse do its thing.
3225 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
3226 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
3227 (Exploding the Stack Size with Alloca):
3228 (Exploding the Stack Size with Malloc):
3229 Expect exit status 2, not 1, since the parser is supposed to blow
3230 its stack. Problem reported by twlevo@xs4all.nl.
3231
15f40952
PE
3232 * data/glr.c (yyparse): Don't assume that the initial calls
3233 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
3234 Print a stack-overflow message and fail instead.
3235 Initialize the line-number information before creating the stack,
3236 so that the stack-overflow message can report line zero safely.
3237
f32c66b5
PE
32382005-07-14 Paul Eggert <eggert@cs.ucla.edu>
3239
a22ff96f 3240 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
3241 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
3242 (yyuserMerge): Provide a default case if b4_mergers is empty.
3243 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
3244 * tests/glr-regression.at
3245 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 3246 Add casts to pacify C++ compilers.
1beb0b24
PE
3247 * tests/glr-regression.at (Improper merging of GLR delayed action
3248 sets): Declare yylex before using it.
f32c66b5 3249 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
3250 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
3251 test for valgrind; valgrind is independent of g++.
3252 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
3253 for compatibility with POSIX 1003.1-2001 (if running coreutils).
3254 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
3255 Use a destructor, so that we can expand the stack. Change
3256 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 3257
d741bd1b
PE
32582005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3259
3260 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
3261 a valgrind failure. Problem reported by twlevo@xs4all.nl.
3262
0410a6e0
PE
32632005-07-13 Paul Eggert <eggert@cs.ucla.edu>
3264
3265 * PACKAGING: New file, suggested by Bruno Haible and taken from
3266 similar wording in gettext's PACKAGING file.
3267 * NEWS: Mention PACKAGING.
3268 * Makefile.am (EXTRA_DIST): Add PACKAGING.
3269
f7ab6a50
PE
32702005-07-12 Paul Eggert <eggert@cs.ucla.edu>
3271
baf785db 3272 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
3273 * bootstrap: Get runtime translations into runtime-po.
3274 Create runtime-po files automatically, if possible.
3275 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
3276 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
3277 does not infringe on the user's name space.
3278 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
3279 * doc/bison.texinfo (Internationalization): Revamp the English
3280 and Texinfo syntax a bit, to try to make it clearer.
3281 (Bison Options, Option Cross Key): Mention --print-localedir.
3282 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
3283 YYENABLE_NLS. Quote a bit more.
3284 * runtime-po/.cvsignore: New file.
3285 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
3286 * runtime-po/Rules-quot: Remove; now created by bootstrap.
3287 * runtime-po/quot.sed: Likewise.
3288 * runtime-po/boldquot.sed: Likewise.
3289 * runtime-po/en@quot.header: Likewise.
3290 * runtime-po/en@boldquot.header: Likewise.
3291 * runtime-po/insert-header.sin: Likewise.
3292 * runtime-po/remove-potcdate.sin: Likewise.
3293 * runtime-po/Makevars: Likewise.
3294 * runtime-po/LINGUAS: Likewise.
3295 * runtime-po/de.po: Likewise; we will rely on the translation project
3296 to maintain this, so "bootstrap" should get it.
0410a6e0 3297 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
3298 its value.
3299 * src/main.c (main): Bind the bison-runtime domain, too.
3300
33012005-07-12 Bruno Haible <bruno@clisp.org>
3302
3303 * data/yacc.c: Include <libintl.h> when NLS is enabled.
3304 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
3305 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
3306 * runtime-po: New directory.
3307 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
3308 $(DOMAIN).pot-update rule, so that old messages are never dropped.
3309 * runtime-po/Rules-quot: New file, copied from po/.
3310 * runtime-po/quot.sed: Likewise.
3311 * runtime-po/boldquot.sed: Likewise.
3312 * runtime-po/en@quot.header: Likewise.
3313 * runtime-po/en@boldquot.header: Likewise.
3314 * runtime-po/insert-header.sin: Likewise.
3315 * runtime-po/remove-potcdate.sin: Likewise.
3316 * runtime-po/Makevars: New file.
3317 * runtime-po/POTFILES.in: New file.
3318 * runtime-po/LINGUAS: New file.
3319 * runtime-po/bison-runtime.pot: New file.
3320 * runtime-po/de.po: New file.
3321 * m4/bison.m4: New file.
3322 * Makefile.am (SUBDIRS): Add runtime-po.
3323 (aclocaldir, aclocal_DATA): New variables.
3324 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
3325 Define aclocaldir.
3326 * src/getargs.c (usage): Document --print-localedir option.
3327 (PRINT_LOCALEDIR_OPTION): New enum item.
3328 (long_options): Add --print-localedir option.
3329 (getargs): Handle --print-localedir option.
3330 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
3331 (Internationalization): New section.
3332
22dda0f0
AD
33332005-07-12 Akim Demaille <akim@epita.fr>
3334
3335 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
3336 for consistency with the rest of the code.
3337 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
3338 Add separators.
3339
82b248ad
AD
33402005-07-12 Akim Demaille <akim@epita.fr>
3341
3342 * src/parse-gram.y: Use %printer instead of YYPRINT.
3343
fa0e9314
AD
33442005-07-12 Akim Demaille <akim@epita.fr>
3345
867a3e00
AD
3346 * src/symtab.h, src/symtab.c (symbol_print): New.
3347 * src/symlist.h, src/symlist.c (symbol_list_print): New.
3348 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
3349
33502005-07-12 Akim Demaille <akim@epita.fr>
3351
3352 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
3353 b4_at_dollar and b4_dollar_dollar.
3354
e054b190
PE
33552005-07-11 Paul Eggert <eggert@cs.ucla.edu>
3356
3357 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
3358 and Pennello's paper.
3359
34160ec4
PE
33602005-07-09 Paul Eggert <eggert@cs.ucla.edu>
3361
407d4a75
PE
3362 * data/yacc.c (yyparse): Undo previous patch. Instead,
3363 set yylsp[0] and yyvsp[0] only if the initial action
3364 sets yylloc and yylval, respectively.
3365
34160ec4
PE
3366 * data/yacc.c (yyparse): In the initial action, set
3367 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
3368 This avoids the use of undefined variables if the initial
3369 action does not set yylloc and/or yylval.
3370
c3d5a4a7
PE
33712005-07-07 Paul Eggert <eggert@cs.ucla.edu>
3372
b34d96c1
PE
3373 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
3374 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
3375 Remove from CVS. These files are automatically generated.
3376 * examples/extexi: Clarify that this file is now part of Bison,
3377 not GNU M4, and that it works with any POSIX-compatible Awk.
3378 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
3379 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
3380 so that we also get calc++-parser.yy. Geneate it.
3381 Use $(AWK), not gawk, since any conforming Awk will do.
3382 Put comment before action, since older 'make' can't handle comment
3383 in action.
3384 $(BUILT_SOURCES): List all built sources, not just some of them.
3385 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
3386 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
3387 $($(calc_sources_generated)): Remove unnecessary test for existence
3388 of target. (This had a shell syntax error anyway; a stray "x".)
3389 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
3390 calc++-parser.yy.
3391 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
3392
c3d5a4a7
PE
3393 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
3394 implied by the other modules.
3395
828c373b
AD
33962005-07-06 Akim Demaille <akim@epita.fr>
3397
3398 Bind examples/calc++ to the package.
3399 * examples/calc++/Makefile: Remove, replaced by...
3400 * examples/calc++/Makefile.am: ... this new file.
3401 * examples/calc++/test: Remove input.
3402 * examples/calc++/compile: Remove.
3403 * examples/Makefile.am: New.
3404 * configure.ac, Makefile.am: Adjust.
3405 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
3406
63cb01d6
PE
34072005-07-05 Paul Eggert <eggert@cs.ucla.edu>
3408
fd2df2ed
PE
3409 * data/glr.c (yyFail): Drastically simplify; since the format argument
3410 never had any % directives, we can simply pass it to yyerror.
3411 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
3412 be modified later, as that is the usual style in glr.c.
3413 Problems reported by Paul Hilfinger.
3414
63cb01d6
PE
3415 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
3416 and size overflow errors.
3417 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
3418 in case the user prolog sets feature-test macros like _GNU_SOURCE.
3419 (YYSIZEMAX): New macro.
3420 (yystpcpy): New function, taken from yacc.c.
3421 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
3422 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
3423 so that we don't have to maintain their signatures.
3424 (yyFail): Check for buffer overflow, by using vsnprintf rather
3425 than vsprintf. Allocate a bigger buffer if possible.
3426 Report an error if buffer allocation fails.
3427 (yyStackOverflow): New function.
3428 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
3429 the initialization was successful. It might fail if storage was
3430 exhausted.
3431 (yyexpandGLRStack): Add more checks for storage allocation failure.
3432 Use yyStackOverflow to report failures.
3433 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
3434 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
3435 Don't assume stack number fits in int.
3436 (yysplitStack): Check for storage allocation failure.
3437 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
3438 can print diagnostics on storage allocation failure. All callers
3439 changed.
3440 (yyresolveValue): Use yybool for boolean.
3441 (yyreportSyntaxError): Check for size-calculation overflow.
3442 This code is taken from yacc.c.
3443 (yyparse): Check for storage allocation errors when allocating
3444 the initial stack.
3445
1c59e0a1
AD
34462005-07-05 Akim Demaille <akim@epita.fr>
3447
3448 Extract calc++ from the documentation.
3449 * doc/bison.texinfo (Calc++): Add the extraction marks.
3450 * examples/extexi: New, from the aborted GNU Programming 2E.
3451 Separate the different paragraph of a file with empty lines.
3452 * examples/Makefile: Use it to extract the whole calc++ example.
3453
8a0adb01
AD
34542005-06-24 Akim Demaille <akim@epita.fr>
3455
3456 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
3457 class typedefs.
3458
12545799
AD
34592005-06-22 Akim Demaille <akim@epita.fr>
3460
3461 * doc/bison.texinfo (C++ Language Interface): First stab.
3462 (C++ Parsers): Remove.
3463
99be0235
AD
34642005-06-22 Akim Demaille <akim@epita.fr>
3465
3466 * data/lalr1.cc (yylex_): Honor %lex-param.
3467
0ffd4fd1
AD
34682005-06-22 Akim Demaille <akim@epita.fr>
3469
3470 Start a set of simple examples.
3471 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
3472 * examples/calc++/calc++-driver.hh,
3473 * examples/calc++/calc++-parser.yy,
3474 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
3475 * examples/calc++/compile, examples/calc++/test: New.
3476
0925ebb4
PE
34772005-06-09 Paul Eggert <eggert@cs.ucla.edu>
3478
3479 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
3480 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
3481 which stems from the 2005-05-27 patch.
3482
43d3b664
PH
34832005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3484
3485 * data/glr.c: Modify treatment of unused parameters to permit use
3486 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
3487
3062864d
PE
34882005-05-30 Paul Eggert <eggert@cs.ucla.edu>
3489
3490 Fix infringement on user name space reported by Janos Zoltan Szabo.
3491 * data/yacc.c (yyparse): strlen -> yystrlen.
3492
989b5b8e
AD
34932005-05-30 Akim Demaille <akim@epita.fr>
3494
3495 * data/lalr1.cc (_): New.
3496 Translate the various messages.
3497
bedf57f5
PE
34982005-05-27 Paul Eggert <eggert@cs.ucla.edu>
3499
3500 Fix infringement on user name space reported by Bruno Haible.
3501 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
3502 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
3503 the user's name space.
3504 (alloca): Include <stdlib.h> to get it, if it's not built in.
3505 (YYMALLOC, YYFREE): Define only if needed.
3506 (malloc, free): Declare, but only if needed, as this infringes on
3507 the user name space.
3508
4d1801f1
PE
35092005-05-25 Paul Eggert <eggert@cs.ucla.edu>
3510
3511 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
3512 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
3513 with %d format.
3514 * lib/ebitset.c (min, max): Undef before defining.
3515 * lib/vbitset.c (min, max): Likewise.
3516 * lib/subpipe.c (create_subpipe): Save local variables in case
3517 vfork clobbers them.
3518
35192005-05-24 Bruno Haible <bruno@clisp.org>
3520
3521 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
3522 error message syntax used by gcc-4.0.
3523
b94a9e1e
PE
35242005-05-23 Paul Eggert <eggert@cs.ucla.edu>
3525
85ac3861
PE
3526 * README: Mention m4 1.4.3. Remove obsolete advice about
3527 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
3528
b94a9e1e
PE
3529 * bootstrap: Remove workaround for problem I encountered with
3530 gettext 0.14.1; it seems to be fixed now.
3531
51c30d21
PE
35322005-05-22 Paul Eggert <eggert@cs.ucla.edu>
3533
009ce67d
PE
3534 * NEWS: Version 2.0a.
3535
f2a97c62
PE
3536 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
3537 the previous change.
3538
c8775f93
PE
3539 Various maintainer cleanups.
3540 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
3541 conftest*, for benefit of CVS commands run at the same time as
3542 "configure". Add build-aux, since "bootstrap" now creates it and
3543 its subfiles.
3544 * Makefile.cfg (move_if_change): Remove.
3545 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
3546 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
3547 (po_repo, do-po-update, po-update, wget_files, get-targets):
3548 (config.guess-url_prefix, config.sub-url_prefix):
3549 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
3550 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
3551 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
3552 Remove.
3553 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
3554 this is now the recommended name.
3555 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
3556 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
3557 ylwrap. These files now go into build-aux.
3558 * config/move-if-change: Remove.
3559 * config/prev-version.txt: Bump from 1.75 to 2.0.
3560
3ea5f0ec
PE
3561 * bootstrap: Add stdio-safer, unistd-safer modules.
3562 Remove m4/glibc2.m4 (introduced by latest gnulib, but
3563 we don't need it).
3564 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
3565 fopen-safer.c, stdio-safer.h, unistd-safer.h.
3566 * lib/subpipe.c: Include "unistd-safer.h".
3567 (create_subpipe): Make sure all the newly-created
3568 file descriptors are > 2, so that diagnostics don't
3569 get sent down them (which might cause Bison to hang, in theory).
3570 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
3571 * src/files.c (xfopen): Use fopen_safer, not fopen.
3572
51c30d21
PE
3573 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
3574 yesterday's yacc.c fix.
3575
cea1469d
PE
35762005-05-21 Paul Eggert <eggert@cs.ucla.edu>
3577
3ea5f0ec
PE
3578 * data/glr.c, data/lalr1.cc: Update copyright date.
3579
cea1469d
PE
3580 Fix a destructor bug reported by Wolfgang Spraul in
3581 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
3582 * data/yacc.c (yyabortlab): Don't call destructor, and
3583 don't set yychar to EMPTY.
3584 (yyoverflowlab): Don't call destructor.
3585 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
3586 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
3587 since we no longer output the message "discarding lookahead token
3588 end of input ()".
3589
5e6f62f2
PH
35902005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
3591
3592 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
3593 fix a small glitch in debugging output.
3594 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
3595 after YY_SYMBOL_PRINT where needed.
3596
3597 (struct yyGLRState): Add some comments.
3598 (struct yySemanticOption): Add some comments.
3599 (union yyGLRStackItem): Add comment.
3600
3601 (yymergeOptionSets): Correct this to properly perform the union,
3602 avoiding infinite reported by Michael Rosien.
3603 Update comment.
3604
3605 * tests/glr-regression.at: Add test for GLR merging error reported
3606 by M. Rosien.
cea1469d 3607
0fb669f9
PE
36082005-05-13 Paul Eggert <eggert@cs.ucla.edu>
3609
3610 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
3611 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
3612 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
3613 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
3614 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
3615 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
3616 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
3617 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
3618 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
3619 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
3620 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
3621 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
3622 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
3623 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
3624 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
3625 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
3626 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
3627 src/derives.h, src/files.c, src/files.h, src/getargs.c,
3628 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
3629 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
3630 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
3631 src/output.h, src/parse-gram.c, src/parse-gram.h,
3632 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
3633 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
3634 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
3635 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
3636 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
3637 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
3638 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
3639 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
3640 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
3641 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
3642 tests/reduce.at, tests/regression.at, tests/sets.at,
3643 tests/synclines.at, tests/testsuite.at, tests/torture.at:
3644 Update FSF postal mail address.
3645
51f4735e
PE
36462005-05-11 Paul Eggert <eggert@cs.ucla.edu>
3647
3648 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
3649 Problem reported by Ralf Menzel.
3650
80ce3401
PE
36512005-05-01 Paul Eggert <eggert@cs.ucla.edu>
3652
3653 * tests/actions.at: Test that stack overflow invokes destructors.
3654 From Marcus Holland-Moritz.
3655 * data/yacc.c (yyerrlab): Move the code that destroys the stack
3656 from here....
3657 (yyreturn): to here. That way, destructors are called properly
3658 even if the stack overflows, or the user calls YYACCEPT or
3659 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
3660 (yyoverflowlab): Destroy the lookahead.
3661
36622005-04-24 Paul Eggert <eggert@cs.ucla.edu>
3663
3664 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
3665
72f000b0
PE
36662005-04-17 Paul Eggert <eggert@cs.ucla.edu>
3667
3668 * NEWS: Bison-generated C parsers no longer quote literal strings
3669 associated with tokens.
3670 * src/output.c (prepare_symbols): Don't escape strings,
3671 since users don't want to see C escapes.
3672 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
3673 in diagnostics.
c19683bb 3674 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
3675 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
3676
1094323f
PE
36772005-04-16 Paul Eggert <eggert@cs.ucla.edu>
3678
3679 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
3680 the data size is known to be too small and we can't increase it.
3681 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
3682
ca407bdf
PE
36832005-04-15 Paul Eggert <eggert@cs.ucla.edu>
3684
3685 * src/parse-gram.y: Include quotearg.h.
3686 (string_as_id): Quote $1 before using it as a key, since the
3687 lexer no longer quotes it for us.
3688 (string_content): Don't strip quotes, since lexer no longer
3689 quotes it for us.
3690 * src/scan-gram.l: Include quotearg.h.
3691 ("\""): Omit quote.
3692 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
3693 a key, since the rest of the lexer doesn't quote it.
3694 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
3695 * tests/regression.at (Token definitions): Check for backslashes
3696 in token strings.
3697
3698 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
3699 (YYSIZE_T): Define to unsigned long int when using an older compiler.
3700 (yyparse): Revamp code to generate long syntax error message, to
3701 make it easier to translate, and to avoid problems with arithmetic
3702 overflow. Change "virtual memory" to "memory" in diagnostic, since
3703 we don't know whether the memory is virtual.
3704
1ce59070
PE
37052005-04-13 Paul Eggert <eggert@cs.ucla.edu>
3706
3707 * NEWS: Bison-generated C parsers now use the _ macro to
3708 translate strings.
3709 * data/yacc.c (_) [!defined _]: New macro.
3710 All English strings wrapped inside this macro.
3711 * doc/bison.texinfo (Bison Parser): Document _.
3712 * po/POTFILES.in: Include src/parse-gram.c, since it now
3713 includes translateable strings that parse-gram.y doesn't.
3714
a749a695
PE
37152005-04-12 Paul Eggert <eggert@cs.ucla.edu>
3716
3717 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
3718 reverting the 2004-10-11 change to this function.
3719 (symbol_check_alias_consistency): Don't call symbol_type_set
3720 if the type name is already correct.
3721 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
3722
8fb1053b
PE
37232005-03-25 Paul Eggert <eggert@cs.ucla.edu>
3724
3725 * tests/regression.at (Token definitions): Don't use a token named
3726 c, as that generates a "#define c ..." that runs afoul of buggy
3727 stdlib.h that uses the identifier c as a member of struct
3728 drand48_data. Problem reported by Horst Wente.
3729
ff498c4a
PE
37302005-03-21 Paul Eggert <eggert@cs.ucla.edu>
3731
3732 * bootstrap: Change translation URL from
3733 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
3734 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
3735 redirection glitches. Problem reported by twlevo@xs4all.nl.
3736
65211d70
PE
37372005-03-20 Paul Eggert <eggert@cs.ucla.edu>
3738
3739 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
3740 after operands; POSIX says this isn't portable for the c99 command.
3741
9577fb1f
PE
37422005-03-18 Paul Eggert <eggert@cs.ucla.edu>
3743
3744 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
3745 immediately if a data overrun has occurred; this may help us track
3746 down what may be a spurious failure on MacOS.
3747
78b178f7
PE
37482005-03-17 Paul Eggert <eggert@cs.ucla.edu>
3749
a2599d0f
PE
3750 Respond to problems reported by twlevo@xs4all.nl.
3751
3752 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
3753
78b178f7
PE
3754 * src/vcg.h: Comment fix.
3755 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
3756 (G_CMAX): Change to -1 instead of INT_MAX.
3757
3758 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 3759
7296e729
PE
37602005-03-15 Paul Eggert <eggert@cs.ucla.edu>
3761
3762 * src/tables.c (state_number_to_vector_number): Put it inside an
3763 "#if 0", since it's not currently used. Problem reported by
3764 Roland McGrath.
3765
05ac60f3
PE
37662005-03-06 Paul Eggert <eggert@cs.ucla.edu>
3767
3768 * src/output.c (escaped_output): Renamed from
3769 escaped_file_name_output, since we now use it for symbol tags as
3770 well. All uses changed.
3771 (symbol_destructors_output, symbol_printers_output):
3772 Escape symbol tags too.
3773 Problem reported by Matyas Forstner in
3774 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
3775
3776 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
3777 not needed.
3778 * src/output.c (user_actions_output, token_definitions_output,
3779 symbol_destructors_output, symbol_printers_output): Likewise.
3780 * src/reader.c (prologue_augment): Likewise.
3781 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
3782
3783 * src/vcg.c (output_edge): Don't quote linestyle arg.
3784 Problem reported by twlevo@xs4all.nl.
3785
7eb453ac
PE
37862005-02-28 Paul Eggert <eggert@cs.ucla.edu>
3787
3788 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
3789 example, reported by Derek M Jones. Also, make the example even
3790 more outrageous, to better illustrate how bad the problem is.
3791
4c04c52a
PE
37922005-02-24 Paul Eggert <eggert@cs.ucla.edu>
3793
3794 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
3795 putsym. Typo reported by Sebastian Piping.
3796
a61e1620
PE
37972005-02-23 Paul Eggert <eggert@cs.ucla.edu>
3798
3799 * doc/bison.texinfo (Language and Grammar): some -> same
3800 (Epilogue): int he -> in the
3801 Typos reported by Sebastian Piping via Justin Pence.
3802
9ec93868
PE
38032005-02-07 Paul Eggert <eggert@cs.ucla.edu>
3804
3805 * tests/glr-regression.at (Improper handling of embedded actions
3806 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
3807 embedded actions and $-N in GLR parsers", work around an Autoconf bug
3808 with dollar signs in test names.
3809 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
3810 for a similar reason.
3811
73ce7e7e
PE
38122005-01-28 Paul Eggert <eggert@cs.ucla.edu>
3813
3814 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
3815 wants to redefine G_VIEW.
3816
2e72b98e
PE
38172005-01-27 Paul Eggert <eggert@cs.ucla.edu>
3818
3819 * src/vcg.c (get_view_str): Remove case for normal_view.
3820 Problem reported by twlevo@xs4all.nl.
3821
e0d634e5
PE
38222005-01-24 Paul Eggert <eggert@cs.ucla.edu>
3823
ccf830a4
PE
3824 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
3825 Problem reported by twlevo@xs4all.nl.
3826
e0d634e5
PE
3827 * doc/bison.texinfo: Change @dircategory from "GNU programming
3828 tools" to "Software development". Requested by Richard Stallman
3829 via Karl Berry.
3830
7bbc8cb0
PE
38312005-01-23 Paul Eggert <eggert@cs.ucla.edu>
3832
3833 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
3834 Problem reported by twlevo@xs4all.nl.
3835
08b770bc
PE
38362005-01-21 Paul Eggert <eggert@cs.ucla.edu>
3837
3838 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
3839 keyword; it's not needed with modern compilers, and it doesn't
3840 affect correctness with older compilers. Suggested by
3841 twlevo@xs4all.nl.
3842
95f22ad2
PE
38432005-01-17 Paul Eggert <eggert@cs.ucla.edu>
3844
3845 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
3846 gcc -Wswitch-default.
3847 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
3848 * data/yacc.c (yyparse): Likewise.
3849
d229d15c
PE
38502005-01-12 Paul Eggert <eggert@cs.ucla.edu>
3851
3852 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
3853 already. Let config.h define any nonstandard values.
3854
ecadd90f
PE
38552005-01-10 Paul Eggert <eggert@cs.ucla.edu>
3856
3857 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
3858 for the benefit of slower hosts. Problem reported by
3859 Nelson H. F. Beebe.
3860
213744b5
PE
38612005-01-07 Paul Eggert <eggert@cs.ucla.edu>
3862
3863 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
3864 being defined and not used.
3865 * data/lalr1.cc (yyparse): Likewise.
3866 Use "if (false)" rather than "if (0)".
3867
249d3236
PE
38682005-01-05 Paul Eggert <eggert@cs.ucla.edu>
3869
3870 * TODO: Mention that we should allow NUL bytes in tokens.
3871
987cc1fb
PE
38722005-01-02 Paul Eggert <eggert@cs.ucla.edu>
3873
3874 * src/scan-skel.l (<<EOF>>): Don't close standard output.
3875 Problem reported by Hans Aberg.
3876
08fe02d9
PE
38772005-01-01 Paul Eggert <eggert@cs.ucla.edu>
3878
3879 * src/getargs.c (version): Happy new year; update overall
3880 program copyright date from 2004 to 2005.
3881
3882 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
3883 Problem reported by Hans Aberg.
3884 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
3885 (Output file names.): Add a test for the case when standard output
3886 is closed.
3887
010c0266
PE
38882004-12-26 Paul Eggert <eggert@cs.ucla.edu>
3889
3890 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
3891 to fix an oversight in the Bison 2.0 manual.
3892
da12206a
PE
38932004-12-25 Paul Eggert <eggert@cs.ucla.edu>
3894
3895 * NEWS: Version 2.0. Reformat the existing news items since
3896 1.875, so that related items are grouped together.
3a4734aa 3897 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
3898 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
3899
c935d934
PE
3900 * tests/torture.at (Exploding the Stack Size with Alloca): Set
3901 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
3902 otherwise, we're not testing alloca. Unfortunately there's no
3903 simple way to consult HAVE_ALLOCA here.
3904
da12206a
PE
3905 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
3906 for yymsg, too.
3907
3908 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
3909 hand. This avoids a warning about comparing int to size_t when
3910 GCC warnings are enabled.
3911
0a2c5137
PE
39122004-12-22 Paul Eggert <eggert@cs.ucla.edu>
3913
d7e14fc0
PE
3914 * NEWS: Bison-generated parsers no longer default to using the
3915 alloca function (when available) to extend the parser stack, due
3916 to widespread problems in unchecked stack-overflow detection.
3917 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
3918 responsibility to set it to a positive value. This lets the user
3919 specify a value that is not a preprocessor constant.
3920 * data/yacc.c (YYMAXDEPTH): Likewise.
3921 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
3922 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
3923 to be a compile-time constant. However, explain the constraints on it.
3924 Also, explain the constraints on YYINITDEPTH.
3925 (Table of Symbols): Explain that alloca is no longer the default.
3926 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
3927 to 1.
3928
0a2c5137
PE
3929 * doc/bison.texinfo (Location Default Action): Mention that n must
3930 be zero when k is zero. Suggested by Frank Heckenbach.
3931
e019c247
AD
39322004-12-22 Akim Demaille <akim@epita.fr>
3933
3934 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
3935 (parser::state_type, parser::semantic_type, parser::location_type):
3936 Private, not public.
3937 (parser::parse): Return ints, not bool.
3938 Returning a bool introduces a problem: 0 corresponds to false, and
3939 it seems weird to return false on success. Returning true changes
3940 the conventions for yyparse.
3941 Alternatively we could return void and send an exception.
3942 There is no clear consensus (yet?).
3943 (state_stack, semantic_stack, location_stack): Rename as...
3944 (state_stack_type, semantic_stack_type, location_stack_type): these.
3945 Private, not public.
3946 * tests/c++.at: New.
3947 * tests/testsuite.at, tests/Makefile.am: Adjust.
3948
72731bb7
AD
39492004-12-21 Akim Demaille <akim@epita.fr>
3950
3951 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
3952
9a0d8bec
AD
39532004-12-21 Akim Demaille <akim@epita.fr>
3954
3955 Don't impose std::string for filenames.
3956
3957 * data/lalr1.cc (b4_filename_type): New.
3958 (position::filename): Use it.
3959 (parser.hh): Move the inclusion of stack.hh and location.hh below
3960 the user code, so that needed headers for the filename type can be
3961 included first.
72731bb7
AD
3962 Forward declare them before the user code.
3963 * tests/Makefile.am (check-local, installcheck-local): Pass
3964 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 3965
99880de5
AD
39662004-12-20 Akim Demaille <akim@epita.fr>
3967
3968 Use more STL like names: my_class instead of MyClass.
3969
3970 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
3971 (SemanticStack, SemanticType, StateStack, StateType)
3972 (TokenNumberType, Stack, Slice, Traits, Parser::location)
3973 (Parser::value): Rename as...
3974 (location_stack, location_type, rhs_number_type, semantic_stack)
3975 (semantic_type, state_stack, state_type, token_number_type, stack)
3976 (slice, traits, parser::yylloc, parser::yylval): these.
3977
3978 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
3979
9bec482e
PE
39802004-12-19 Paul Eggert <eggert@cs.ucla.edu>
3981
3982 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
3983 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
3984
f6fbd3da
PE
39852004-12-17 Paul Eggert <eggert@cs.ucla.edu>
3986
3987 Remove uses of 'short int' and 'unsigned short int'. This raises
3988 some arbitrary limits. It uses more memory but nowadays that's
3989 not much of an issue.
3990
3991 This change does not affect the generated parsers; that's a different
3992 task, as some users will want to conserve memory there.
3993
3994 Ideally we should use size_t to represent all object counts, and
3995 something like ptrdiff_t to represent signed differences of object
3996 counts; but that will require more code-cleanup than I have the
3997 time to do right now.
3998
3999 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
4000 Use size_t, not int or short int, to count objects.
4001 * src/closure.c (nritemset, closure): Likewise.
4002 * src/closure.h (nritemset, closure): Likewise.
4003 * src/nullable.c (nullable_compute): Likewise.
4004 * src/print.c (print_core): Likewise.
4005 * src/print_graph.c (print_core): Likewise.
4006 * src/state.c (state_compare, state_hash): Likewise.
4007 * src/state.h (struct state): Likewise.
4008 * src/tables.c (default_goto, goto_actions): Likewise.
4009
4010 * src/gram.h (rule_number, rule): Use int, not short int.
4011 * src/output.c (prepare_rules): Likewise.
4012 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
4013 errs, reductions): Likewise.
4014 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
4015 Likewise.
4016 * src/tables.c (vector_number, tally, action_number,
4017 ACTION_NUMBER_MINIMUM): Likewise.
4018 * src/output.c (muscle_insert_short_int_table): Remove.
4019
efeed023
AD
40202004-12-17 Akim Demaille <akim@epita.fr>
4021
4022 * data/lalr1.cc: Extensive Doxygenation.
4023 (error_): Rename as...
4024 (error): this, since it is visible to the user.
4025 Adjust callers.
4026 (Parser::message): Now an automatic variable from...
4027 (Parser::yyreport_syntax_error_): here.
4028 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
4029 Parser::error.
4030 * tests/input.at: Escape $.
4031
bc82c5a5
PE
40322004-12-16 Paul Eggert <eggert@cs.ucla.edu>
4033
4034 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
4035 Parenthesize rhs to avoid obscure problems with mistakes like
4036 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
4037 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4038 b4_rhs_location): Likewise.
4039 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
4040 b4_rhs_location): Likewise.
4041
fd19f271
AD
40422004-12-16 Akim Demaille <akim@epita.fr>
4043
4044 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
4045 yacc.c: be sure to stay within yycheck_.
4046 * tests/actions.at: Re-enable C++ tests.
4047
10454ea4
AD
40482004-12-16 Akim Demaille <akim@epita.fr>
4049
4050 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
4051 real.
4052
c5b95ccf
AD
40532004-12-16 Akim Demaille <akim@epita.fr>
4054
4055 Use #define to handle the %name-prefix.
4056
4057 * data/glr.c, data/yacc.c: Comment changes.
4058 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
4059 so that one can refer to yylex in the parser file, and have it
4060 renamed, as is the case with other skeletons.
4061
617a8f12
AD
40622004-12-16 Akim Demaille <akim@epita.fr>
4063
4064 Move lalr1.cc internals into yy*.
4065
4066 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
4067 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
4068 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
4069 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
4070 (empty_, final_, terror_, errcode_, ntokens_)
4071 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
4072 (looka_, ilooka_, error_range_, nerrs_):
4073 Rename as...
4074 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
4075 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
4076 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
4077 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
4078 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
4079 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
4080 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
4081 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
4082 these.
4083
1e547e6e
PE
40842004-12-15 Paul Eggert <eggert@cs.ucla.edu>
4085
4086 Fix some problems reported by twlevo at xs4all.
4087 * src/symtab.c (symbol_new): Report an error if the input grammar
4088 contains too many symbols. This is better than calling abort() later.
4089 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
4090 (struct node, struct graph):
4091 Rename member expand to stretch. All uses changed.
4092 (struct graph): Remove member layoutalgorithm. All uses removed.
4093 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
4094 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
4095 All uses changed.
4096 (N_STRETCH): Rename from N_EXPAND. All uses changed.
4097
735d6bd4
AD
40982004-12-15 Akim Demaille <akim@epita.fr>
4099
4100 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
4101 Add more Doxygen comments.
4102 (symprint_, stack_print_, reduce_print_, destruct_, pop)
4103 (report_syntax_error_, translate_): Rename as...
4104 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
4105 (yypop_, yyreport_syntax_error_, yytranslate_): this.
4106
2e1f5829
AD
41072004-12-15 Akim Demaille <akim@epita.fr>
4108
4109 * data/lalr1.cc (lex_): Rename as...
4110 (yylex_): this.
4111 Move the trace here.
4112 Take the %name-prefix into account.
4113 Reported by Alexandre Duret-Lutz.
4114
a3cb6248
AD
41152004-12-15 Akim Demaille <akim@epita.fr>
4116
4117 Simplify the C++ parser constructor.
4118
4119 * data/lalr1.cc (debug_): Rename as...
4120 (yydebug_): so that the parser's internals are always in the yy*
4121 pseudo namespace.
4122 Adjust uses.
4123 (b4_parse_param_decl): Remove the leading comma as it is now only
4124 called as unique argument list.
4125 (Parser::Parser): Remove the constructor accepting a location and
4126 an initial debugging level.
4127 Remove from the other ctor the argument for the debugging level.
4128 (debug_level_type, debug_level, set_debug_level): New.
4129
4130 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
4131 constructor calls.
4132
07fed891
AD
41332004-12-15 Akim Demaille <akim@epita.fr>
4134
4135 Remove b4_root related material: failure experiment
a3cb6248 4136 (which goal was to allow to derive from a class).
07fed891
AD
4137
4138 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
4139 definitions and uses.
4140
e603eaa5
PE
41412004-12-14 Paul Eggert <eggert@cs.ucla.edu>
4142
4143 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
4144 not 2, since it's not portable to subtract 1 from the start of an
4145 array. The new item 0 is never set or used. All uses changed.
4146
4147 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
4148 the default definition of YYLLOC_DEFAULT. Problem reported
4149 by Frank Heckenbach.
4150
fafb007d
PE
41512004-12-12 Paul Eggert <eggert@cs.ucla.edu>
4152
4153 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
4154 the normal case and one for the error case. Just use the
4155 first one uniformly. Problem reported by Frank Heckenbach.
4156 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
4157 use exactly the same macro in both places.
4158 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
4159 so that the normal-case YYRHSLOC works for the error case too.
4160 All uses changed.
4161 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
4162 (YYLLOC_DEFAULT): Use the same macro as glr.c.
4163 * doc/bison.texinfo (Location Default Action): Don't claim that
4164 we have an array of locations. Use the same macro for both glr
4165 and lalr parsers. Mention YYRHSLOC. Mention what happens when
4166 the index is 0.
4167
48814dcd
PE
41682004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4169
a4e1a53b
PE
4170 * HACKING: Update email addresses to send announcements to.
4171
48814dcd
PE
4172 * configure.ac (AC_INIT): Bump version to 1.875f.
4173
337116ba
PE
41742004-12-10 Paul Eggert <eggert@cs.ucla.edu>
4175
4176 * NEWS: Version 1.875e.
4177 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
4178
4179 * src/scan-skel.l: Include "complain.h", for "fatal".
4180
4181 * src/relation.h (relation_print, relation_digraph):
4182 Relation sizes are of type relation_node, not size_t (this is
4183 merely a doc fix, since the two types are equivalent).
4184 (relation_transpose): Relation sizes are of type relation_node,
4185 not int.
4186 * src/relation.c: Likewise.
4187 (top, infinity): Now of type relation_node, not int.
4188 (traverse, relation_transpose): Use relation_node, not int.
4189
4190 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
4191 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
4192 (yyparse): Remove unused local introduced in 2004-10-25 patch.
4193
4194 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 4195 specifying whether the test should be skipped. Use it tp
337116ba 4196 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 4197 fail on some hosts, and should be skipped.
337116ba 4198
da2a7671
PE
41992004-12-08 Paul Eggert <eggert@cs.ucla.edu>
4200
4201 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
4202 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
4203 unless otherwise specified below.
4204
4205 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
4206 to allocate kernel_base, kernel_items, kernel_size, since
4207 they needn't be initialized to 0.
4208 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
4209 * src/closure.c (new_closure): Likewise, for itemset.
4210 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
4211 * src/lalr.c (set_goto_map): Likewise, for temp_map.
4212 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
4213 (build_relations): Likewise for edge, states1, includes.
4214 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
4215 * src/reader.c (packgram): Likewise, for ritem, rules.
4216 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
4217 * src/relation.c (relation_digraph): Likewise for VERTICES.
4218 (relation_transpose): Likewise for new_R, end_R.
4219 * src/symtab.c (symbols_token_translations_init): Likewise for
4220 token_translations.
4221 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
4222 (token_actions): Likewise for yydefact, actrow, conflrow,
4223 conflict_list.
4224 (save_column): Likewise for froms[symno], tos[symno].
4225 (goto_actions): Likewise for state_count.
4226 (pack_table): Likewise for base, pos, check.
4227 (tables_generate): Likewise for width.
4228
4229 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
4230 for initial core. Just have a separate core, so we needn't worry
4231 about whether kernel_size and kernel_base are initialized.
4232
4233 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
4234 kernel_size, kernel_items): Remove unnecessary initialization.
4235 * src/conflicts.c (conflicts): Likewise.
4236 * src/derives.c (derives): Likewise.
4237 * src/muscle_tablc (muscle_insert): Likewise.
4238 * src/relation.c (relation_digraph): Likewise.
4239 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
4240 conflrow, conflict_table, conflict_list, table, check):
4241 Likewise.
4242
4243 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
4244 This is because all callers pass unsigned int.
4245 * src/closure.h (new_closure): Likewise.
4246
4247 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
4248 (build_relations): Initialize includes[i] in all cases.
4249 * src/reader.c (packgram): Always initialize rules[ruleno].prec
4250 and rules[ruleno].precsym. Initialize members in order.
4251 * src/relation.c (relation_transpose): Always initialize new_R[i]
4252 and end_R[i].
4253 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
4254
4255 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
4256 conflict_list[0] was always 0, but now it isn't initialized.
4257
4258 * src/table.c (table_grow): When conflict_table grew, the grown
4259 area wasn't cleared. Fix this.
4260
4261 * lib/.cvsignore: Add strdup.c, strdup.h.
4262 * m4/.cvsignore: Add strdup.m4.
4263
00baeeac
PE
42642004-12-07 Paul Eggert <eggert@cs.ucla.edu>
4265
4266 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
4267 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
4268 GOTO_NUMBER_MAXIMUM, since we occasionally compute
4269 ngotos + 1 without checking for overflow.
4270 (build_relations): Use END_NODE, not -1, to denote end of edges.
4271 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
4272 build_relations): Use goto_number, not int, for goto numbers.
4273 * src/tables.c (save_column, default_goto): Likewise.
4274
be3d9d42
AD
42752004-11-23 Akim Demaille <akim@epita.fr>
4276
4277 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
4278 of #defining from yystype.
4279 Don't typedef yystype, C++ does not need it.
4280 This lets it possible to forward declare it as union.
4281
78e526d5
PE
42822004-11-23 Paul Eggert <eggert@cs.ucla.edu>
4283
4284 * bootstrap (gnulib_modules): Add extensions.
4285 Problem reported by Jim Meyering.
4286
afbb696d
PE
42872004-11-22 Paul Eggert <eggert@cs.ucla.edu>
4288
4289 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
4290 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
4291 src/system.h, src/tables.c: XFREE -> free, to accommodate
4292 recent change to gnulib xalloc.h.
78e526d5 4293 Problem reported by Jim Meyering.
afbb696d 4294
c1f8f16a
AD
42952004-11-17 Akim Demaille <akim@epita.fr>
4296
4297 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
4298
db7e5eb5 42992004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
4300 Alexandre Duret-Lutz <adl@gnu.org>
4301
4302 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
4303 changes.
4304 (YYCDEBUG): Adjust.
4305 Use it instead of cdebug_.
4306 (Parser::debug_stream, Parser::set_debug_stream): New.
4307 (Parser::symprint_): Define cdebug_ for temporary backward
4308 compatibility.
4309 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
4310 debug_stream ().
4311
68e11668
AD
43122004-11-17 Akim Demaille <akim@epita.fr>
4313
4314 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
4315 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
4316 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
4317 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4318
97cbc73e
PE
43192004-10-27 Paul Eggert <eggert@cs.ucla.edu>
4320
4321 * data/glr.c (yyloc_default): Remove; not used.
4322 Problem reported by Frank Heckenbach.
4323
e342c3be
AD
43242004-10-25 Akim Demaille <akim@epita.fr>
4325
4326 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
4327 Introduce another definition to address simple location arrays.
4328 (yyGLRStack): New member: yyerror_range.
4329 (yyrecoverSyntaxError, yyparse): Update it.
4330 (yyrecoverSyntaxError): Use it when shifting the error token to
4331 have an accurate range, equivalent to the one computed by both
4332 yacc.c and lalr1.cc.
4333 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
4334 that column numbers start at column 0, as per GNU Coding
4335 Standards, the others tests, and the doc.
4336 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
4337 Adjust to the above change (first column is 0).
4338 And adjust the location of the "<error>", now covering the whole
4339 line.
4340
93602feb 43412004-10-22 Akim Demaille <akim@epita.fr>
04098407 4342 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
4343
4344 Remove some arbitrary limits on goto numbers and relations.
4345 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
4346 initial values, since they're never used.
4347 (set_goto_map): ngotos is now unsigned, so test for overflow
4348 by seeing whether it wraps around to zero.
4349 * src/lalr.h (goto_number): Now size_t, not short int.
4350 (GOTO_NUMBER_MAXIMUM): Remove.
4351 * src/relation.c (relation_print, traverse, relation_transpose):
4352 Check for END_NODE rather than looking at sign.
4353 * src/relation.h (END_NODE): New macro.
4354 (relation_node): Now size_t, not short int.
4355
dba08b04
PE
43562004-10-22 Paul Eggert <eggert@cs.ucla.edu>
4357
4358 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
4359 keyword, not an identifier. Problem reported by Baron Schwartz in
4360 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
4361
df09ef2e
AD
43622004-10-11 Akim Demaille <akim@epita.fr>
4363
4364 * src/symtab.c (symbol_check_alias_consistency): Also check
4365 type names, destructors, and printers.
4366 Reported by Alexandre Duret-Lutz.
4367 Recode the handling of associativity and precedence in terms
4368 of symbol_precedence_set.
4369 Accept no redeclaration at all, not even equal to the previous
4370 value.
4371 (redeclaration): New.
4372 Use it to factor redeclaration complaints.
4373 (symbol_make_alias): Don't set the type of the alias, let
4374 symbol_check_alias_consistency do it as for other features.
4375 * src/symtab.h (symbol): Add new member prec_location, and
4376 type_location.
4377 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
4378 * tests/input.at (Incompatible Aliases): New.
4379
146bc99d
PE
43802004-10-09 Paul Eggert <eggert@cs.ucla.edu>
4381
4382 .cvsignore fixes to accommodate gnulib changes,
4383 and the practice of naming build directories "_build".
4384 * .cvsignore: Add "_*". Sort.
4385 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
4386 * m4/.cvsignore: Add "*_gl.m4".
4387
e503aa60
AD
43882004-10-06 Akim Demaille <akim@epita.fr>
4389
4390 * src/parse-gram.y (add_param): Fix the truncation of trailing
4391 spaces.
4392
b4a20338
AD
43932004-10-05 Akim Demaille <akim@epita.fr>
4394
4395 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
4396 whether the reducion was empty or not. This leaves room to
4397 improve the use of YYLLOC_DEFAULT in such a case.
4398 lalr1.cc is still experimental, so changing this is acceptable.
4399 And finally, there are probably not many users who changed the
4400 handling of locations in GLR, so changing is admissible too.
4401
4402 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
4403 empty reduction, set @$ to an empty location ending the previously
4404 stacked symbol.
4405 Adjust uses to make sure the code is triggered on empty
4406 reductions.
4407 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
4408 expected output: empty reductions have empty locations.
4409
f85a5e6f
AD
44102004-09-29 Akim Demaille <akim@epita.fr>
4411
4412 * data/lalr1.cc: Move towards a more standard C++ coding style
4413 for templates: Class < T > -> Class<T>.
4414
b203fc2c
AD
44152004-09-29 Akim Demaille <akim@epita.fr>
4416
4417 * data/lalr1.cc: Reinstall the former ctor, for sake of
4418 compatibility, but warn it will be removed.
4419 Move towards a more standard C++ coding style (i.e., type *var ->
4420 type* var).
4421
5b7e1e73
PE
44222004-09-27 Paul Eggert <eggert@cs.ucla.edu>
4423
3fee967f
PE
4424 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
4425 since it's less likely to work if NULs are involved in the future.
5b7e1e73 4426
0dcca5c2
AD
44272004-09-27 Akim Demaille <akim@epita.fr>
4428
4429 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
4430
6dde1c82
AD
44312004-09-27 Akim Demaille <akim@epita.fr>
4432
4433 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 4434 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
4435 and argument names.
4436 (b4_cc_constructor_call): Likewise.
4437
b233d555
AD
44382004-09-24 Akim Demaille <akim@epita.fr>
4439
4440 * src/parse-gram.y (add_param): Strip the leading and trailing
4441 blanks from a formal argument declaration.
4442 (YY_LOCATION_PRINT): New.
4443
619404e3
AD
44442004-09-24 Akim Demaille <akim@epita.fr>
4445
4446 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
4447 after the location.
4448
dd8d9022
AD
44492004-09-24 Akim Demaille <akim@epita.fr>
4450
4451 * doc/bison.texinfo (Table of Symbols): Sort.
4452
0092f063
AD
44532004-09-21 Akim Demaille <akim@epita.fr>
4454
4455 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
4456 the useless parentheses.
4457 Suggested by Paul Eggert.
4458
451364ed
AD
44592004-09-20 Akim Demaille <akim@epita.fr>
4460
4461 Let the initial-action act on the look-ahead, and use it for the
4462 "initial push" (corresponding to an hypothetical beginning-of-file).
4463 And let lalr1.cc honor %initial-action.
4464
4465 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
4466 example.
4467 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
4468 (Parser::Parser): Remove the ctor that used to initialize it.
4469 (Parser::parse): Like in the other skeletons, issue the "starting
4470 parse" message before any action.
4471 Honor %initial-action.
4472 Initialize the stacks with the lookahead.
4473 * data/yacc.c: Let $$ and @$ in %initial-action designate the
4474 look-ahead.
4475 Push them in the stacks.
4476 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
4477
18d192f0
AD
44782004-09-20 Akim Demaille <akim@epita.fr>
4479
4480 * doc/bison.texinfo (Initial Action Decl): New.
4481
b8458aa5
AD
44822004-09-20 Akim Demaille <akim@epita.fr>
4483
4484 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
4485 clearer criterion to define it.
4486 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
4487 When reducing on an empty RHS, use the latest stacked location as
4488 location.
4489 yylloc is not always available.
4490 * data/glr.c: Likewise.
4491 Also, honor initial-actions.
4492
3fc16193
AD
44932004-09-20 Akim Demaille <akim@epita.fr>
4494
4495 * data/yacc.c (YY_LOCATION_PRINT): New.
4496 Define when we know YYLTYPE's structure, i.e., when the default
4497 YYLLOC_DEFAULT is used.
4498 * data/c.m4 (b4_yysymprint_generate): Use it.
4499 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
4500 value of the result.
4501 (error_start_): Replace with...
4502 (error_range_): this location array.
4503 This allows to replace code relying on the implementation of
4504 locations by portable code.
4505 * data/yacc.c (yylerrsp): Replace with...
4506 (yyerror_range): this.
4507 Every time a token is popped, update yyerror_range[0], to have an
4508 accurate location for the error token.
4509 * data/glr.c (YY_LOCATION_PRINT): New.
4510 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
4511 deference a pointer.
4512 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
4513 report the location in %printers.
4514
4515 * src/scan-skel.l: Instead of abort, report error messages to ease
4516 understanding skeleton scanning failures.
4517
ecfe33e7
AD
45182004-09-16 Akim Demaille <akim@epita.fr>
4519
4520 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
4521 (iterator, const_iterator): these, to be more in the C++ spirit.
4522 Also, return reverse iterators so that when displaying the stack
4523 we display its bottom first.
4524 (Parser::stack_print_, Parser::reduce_print_): Match the messages
4525 from yacc.c.
4526 We should probably use vector here though.
4527
1576d44d
AD
45282004-09-16 Akim Demaille <akim@epita.fr>
4529
4530 Have more complete shift traces.
4531
4532 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
4533 to report Shifts instead of ad hoc YYDPRINTF invocations,
4534 including for the error token.
4535 * data/lalr1.cc (symprint_): Output the location.
4536 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
4537 output the location within the %printer.
4538 Activate GLR tests, at least to make sure they compile properly.
4539 They still don't pass though.
4540 * tests/calc.at: Adjust expect verbose output, since now "Entering
4541 state..." is on a different line than the "Shifting" message.
4542
9c66f418
AD
45432004-09-08 Akim Demaille <akim@epita.fr>
4544
4545 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
4546 Bison directive from the Bison file to the invocation of this
4547 macro, so that these directives are passed to
4548 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
4549 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
4550 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
4551 the extra Bison directives instead of the whole series.
4552 Change the grammar so that there are recoverable errors, and
4553 unrecoverable errors. Now we can have the parser give up before
4554 consuming the whole input. As a result we now can observe that
4555 the lookahead is freed when needed.
4556 Change the parser source to parse argv[1] instead of a hard coded
4557 string.
4558 Simplify yylex, and give a value and location to EOF.
4559 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
4560 passed directives already coded in the file.
4561 Add some tests to check the location of "error".
4562 For some tests, the C++ parser is correct, and not yacc.c.
4563 For other tests, they provide different, but unsatisfying, values,
4564 so keep the C++ value so that at least one parser is "correct"
4565 according to the test suite.
4566 (Actions after errors): Remove, this is subsumed by the
4567 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
4568
52d5733f
AD
45692004-09-06 Akim Demaille <akim@epita.fr>
4570
4571 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 4572 (Parser::pop): New.
52d5733f
AD
4573 Use it.
4574
a0e68930
AD
45752004-09-06 Akim Demaille <akim@epita.fr>
4576
4577 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
4578 argument, an informative message.
4579 Call YY_SYMBOL_PRINT.
4580 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
4581 * data/lalr1.cc (destruct_): Likewise.
4582 In addition, no longer depend on b4_yysymprint_generate and
4583 b4_yydestruct_generate to generate these functions, do it "by
4584 hand".
4585
e757bb10
AD
45862004-09-03 Akim Demaille <akim@epita.fr>
4587
4588 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
4589 invoked, yydestruct the lookahead.
4590 * tests/calc.at (Calculator $1): Update the expected lengths of
4591 traces: there is an added line for the discarded lookahead.
4592 * doc/bison.texinfo (Destructor Decl): Some rewording.
4593 Define "discarded" symbols.
4594
0fe1f06d
AD
45952004-09-02 Akim Demaille <akim@epita.fr>
4596
4597 * data/lalr1.cc (translate_, destruct_): No reason to be static.
4598
284acc8b
AD
45992004-09-02 Akim Demaille <akim@epita.fr>
4600
4601 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
4602 (YYDSYMPRINTF): Rename as...
4603 (YY_SYMBOL_PRINT): this.
4604 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
4605 two.
4606 Use it instead of direct symprint_ calls.
4607 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
4608 one.
4609
a5eb1ed2
AD
46102004-09-02 Akim Demaille <akim@epita.fr>
4611
b7c72fe1
AD
4612 * data/lalr1.cc (b4_yysymprint_generate): New.
4613 (symprint_): New member function, defined when YYDEBUG.
4614 Use it consistently instead of token/nterm debugging output by
4615 hand.
a5eb1ed2
AD
4616 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
4617 %printer calls to use cdebug_ when using lalr1.cc.
4618
417141dd
AD
46192004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
4620
4621 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
4622 with #ifdef YYDEBUG.
4623
2fa09258
AD
46242004-08-26 Akim Demaille <akim@epita.fr>
4625
4626 * doc/bison.texinfo (Implementing Loops): Rename as...
4627 (Implementing Gotos/Loops): this.
4628
9378b508
PE
46292004-08-13 Paul Eggert <eggert@cs.ucla.edu>
4630
4631 Adjust to latest gnulib.
4632 * bootstrap (gnulib_modules): Add xalloc-die.
4633 Set LC_ALL=C so that file names sort consistently.
4634 Prefer the gnulib copies of gettext.m4, glibc21.m4,
4635 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
4636 uintmax_t.m4, ulonglong.m4.
4637 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
4638 po.m4 since we are now using _gl.m4 instead.
4639
87a8ad5c
PE
46402004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
4641
4642 * src/scan-action.l: Remove. Scanning of semantic actions is
4643 handled in scan-gram.l.
4644
dca81a78
PE
46452004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
4646
4647 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
4648
4649 * src/location.h (struct): The file member is a uniqstr.
4650 (equal_boundaries): Use UNIQSTR_EQ for comparison.
4651
c9cbf7c5
PE
46522004-07-22 Paul Eggert <eggert@cs.ucla.edu>
4653
4654 Fix bug with non-%union parsers that have printers or destructors,
4655 which led to a Bison core dump. Reported by Peter Fales in
4656 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 4657
c9cbf7c5
PE
4658 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
4659 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
4660 not to our own type.
4661 * src/output.c (symbol_destructors_output, symbol_printers_output):
4662 Don't assume %union.
4663 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
4664 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
4665 UNION-FLAG. All callers changed.
4666 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
4667 Use type char, not unsigned int, when declaring an array of char;
4668 this lets us remove a cast.
4669 (Printers and Destructors): Add non-%union test cases.
4670
fa7e68c3
PE
46712004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4672
4673 * doc/bison.texinfo: Minor editorial changes, mostly to the new
4674 GLR writeups. E.g., avoid frenchspacing and the future tense,
4675 change "lookahead" to "look-ahead", and change "wrt" to "with
4676 respect to".
2fa09258 4677
fa7e68c3
PE
46782004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
4679
4680 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
4681 New sections, split off from the GLR Parsers section. Put the new
4682 Simple GLR Parser near the start of the GLR section, for clarity.
4683 Rewrite connective text.
4684
99a9344e
PE
46852004-06-21 Frank Heckenbach <frank@g-n-u.de>
4686
4687 * doc/bison.texinfo (Simple GLR Parsers): New section.
4688
8dd162d3
PE
46892004-06-21 Paul Eggert <eggert@cs.ucla.edu>
4690
4691 * NEWS, TODO, doc/bison.texinfo:
4692 Use "look-ahead" instead of "lookahead", to be consistent.
4693 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
4694 while we're fixing "look-ahead".
4695 * src/conflicts.c (shift_set): Renamed from shiftset.
4696 (look_ahead_set): Renamed from lookaheadset.
4697 * src/print.c: Likewise.
4698 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
4699 name for "lookahead".
4700 (report_types, usage): Likewise.
4701 * src/getargs.h (report_look_ahead_tokens): Renamed from
4702 report_lookaheads.
4703 * src/lalr.c (compute_look_ahead_tokens): Renamed from
4704 compute_lookaheads.
4705 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
4706 (look_ahead_tokens_print): Renamed from lookaheads_print.
4707 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
4708 state_rule_lookaheads_print.
4709 * src/state.h: Likewise.
4710 (reductions.look_ahead_tokens): Renamed from lookaheads.
4711 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
4712 AT_DATA_LOOKAHEADS_GRAMMAR.
4713
57a90331
PE
47142004-06-03 Paul Eggert <eggert@cs.ucla.edu>
4715
4716 * README: Update location of patched M4 distribution.
4717
8ed3234a
PE
47182004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
4719
4720 Don't assume the C++ compiler takes the same arguments as the C compiler
4721 (trivial change).
4722 * configure.ac (O0CXXFLAGS): New var.
4723 * tests/atlocal.in (CXXFLAGS): Use it.
4724
07971983
PE
47252004-05-29 Paul Eggert <eggert@cs.ucla.edu>
4726
4727 Fix some "make check" problems with C++ reported by
4728 Albert Chin-A-Young for Tru64 C++ in this thread:
4729 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
4730
4731 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
4732 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4733 Output to a .cc file for C++, not to a .c file.
4734 * tests/calc.at (AT_CHECK_CALC): Likewise.
4735 * tests/regression.at (AT_CHECK_DANCER): Likewise.
4736 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
4737
29058652
PE
47382004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
4739
4740 * tests/calc.at, tests/actions.at: Workaround for SGI
4741 C++ compiler. (trivial change)
4742
62cb8a99
PE
47432004-05-27 Paul Eggert <eggert@cs.ucla.edu>
4744
fd418816
PE
4745 Spent a few hours checking out which prerequisite versions the
4746 current sources actually require. I went all the way back to
4747 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
4748 a seemingly endless set of combinations of versions more recent
4749 than that. The bottom line is that the current sources require
4750 fairly recent versions of the build tools, and it'll be some work
4751 to change this.
4752 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
4753 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
4754 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
4755 Add comments explaining why those particular versions are
4756 currently needed.
2fa09258 4757
62cb8a99
PE
4758 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
4759 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 4760 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
4761
4762 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
4763 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
4764
caa52c10
PE
47652004-05-26 Paul Eggert <eggert@cs.ucla.edu>
4766
4767 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
4768 0.11.5. Suggested by Bruno Haible.
4769 * bootstrap: Remove gettext version checking.
4770
4771 * doc/bison.texinfo (Decl Summary): Also mention that %union
4772 can depend on prerequisite types. Problem reported by Tim
4773 Van Holder.
4774
4bfd5e4e
PE
47752004-05-25 Paul Eggert <eggert@cs.ucla.edu>
4776
2cef3017
PE
4777 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
4778 * README-alpha: Don't tell people not to package this.
4779
b9c85d5c
PE
4780 * bootstrap: Don't assume $(...) works; use `...` instead.
4781 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
4782 gettext better.
4783
4bfd5e4e
PE
4784 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
4785 put into the -d output file, and mention what to do if YYSTYPE is
4786 defined as a macro.
4787
6a36ff94
PE
47882004-05-24 Paul Eggert <eggert@cs.ucla.edu>
4789
6712933e
PE
4790 Undo change made earlier today: it caused autopoint to not bring
4791 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
4792 autopoint's.
4793
4794 * bootstrap: Check that gettext version matches what's in
4795 configure.ac. Warn users to ignore robots.txt ERROR 404.
4796 * bootstrap: Undo today's earlier change (logged below).
4797 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 4798
6a36ff94
PE
4799 The gettext version checking is causing more trouble than it's
4800 curing; remove it. Problem reported by Paul Hilfinger.
4801
4802 * bootstrap: Issue a warning that one can expect a message
4803 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
4804 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
4805
209ea708
PE
48062004-05-23 Paul Eggert <eggert@cs.ucla.edu>
4807
4808 Ensure that the C++ compiler used for testing actually works on a
4809 simple test program; if not, skip the C++-related tests. Problem
4810 reported by Vin Shelton in:
161a71f3 4811 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
4812
4813 * m4/cxx.m4: New file.
4814 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
4815 * tests/atlocal.in (BISON_CXX_WORKS): Add.
4816 * tests/local.at (AT_COMPILE_CXX): Use it.
4817
41ca2549
PE
48182004-05-21 Paul Eggert <eggert@cs.ucla.edu>
4819
383e69dc
PE
4820 * data/glr.c (yylloc): Output this macro even if locations are not
4821 being generated, as the GLR parser needs it even in that case.
4822 Problem reported by Troy A. Johnson
4823 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
4824
41ca2549
PE
4825 * configure.ac (AC_INIT): Update to 1.875e.
4826
e476c87d
PE
48272004-05-21 Paul Eggert <eggert@cs.ucla.edu>
4828
4829 * NEWS: Version 1.875d.
4830 * configure.ac (AC_INIT): Likewise.
4831 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
4832
4833 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
4834 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
4835 lalr1.cc runs afoul of the first, and the last two are no longer
4836 supported by GCC 3.4.0.
4837 * README: Mention GNU m4 1.4 or later; mention m4 patches.
4838 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
4839
233a88ad
PE
48402004-05-06 Paul Eggert <eggert@cs.ucla.edu>
4841
4842 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
4843 unsigned int, for compatibility with latest gnulib hash module.
4844 * src/state.c (state_hash, state_hasher): Likewise.
4845 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
4846 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 4847
12ffdd28
PE
48482004-05-03 Paul Eggert <eggert@cs.ucla.edu>
4849
4850 * NEWS: Unescaped newlines are no longer allowed in char & strings.
4851
4852 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
4853 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
4854 character and string literals.
4855 (unexpected_end): New function.
4856 (unexpected_eof): Use it.
4857 (unexpected_newline): New function.
4858 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
4859 actions.
e476c87d 4860
12ffdd28
PE
4861 * NEWS: Document %expect-rr.
4862
4863 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
4864 Fix typo by replacing $1 with $option.
4865 Remove more 'intl'-related files.
9668e2be 4866 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
4867
4868 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
4869 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
4870 strtoul.c.
4871 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
4872 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
4873 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
4874 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
4875 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
4876 * src/.cvsignore: Add *.output.
4877
4878 * src/parse-gram.y: Put copyright notice inside %{ %} so it
4879 gets copied to the output file.
e476c87d 4880
1f65350a
PE
48812004-04-28 Paul Eggert <eggert@twinsun.com>
4882
4883 Get files from the gnulib and po repositories, instead of relying
4884 on them being in our CVS. Upgrade to latest versions of gnulib
4885 and Automake.
4886
4887 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
4888 * bootstrap: Bootstrap from gnulib and po repositories.
4889 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
4890 * README-cvs: Document these changes. Remove version numbers from
4891 mentions of build tools, since they change so often. Mention Flex.
4892
4893 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
4894 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
4895 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
4896 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 4897 does this for us.
12ffdd28
PE
4898 (AC_ISC_POSIX): Remove; we no longer support this
4899 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
4900 (AC_HEADER_STDC): Remove: we now assume C89 or better.
4901 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
4902 Do not check for C89 headers, except for locale.h which is used
4903 by the Yacc library and must port to K&R hosts.
4904 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
4905 Do not check for C89 functions, except for setlocale which is
4906 used by the Yacc library.
4907 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
4908 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
4909 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
4910 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
4911 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
4912 AM_GNU_GETTEXT): Remove; now done by:
4913 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
4914 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
4915 for us.
4916
4917 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
4918 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
4919 Define to empty, as gnulib.mk will do the rest for us.
4920 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
4921 for us.
4922 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
4923 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
4924
4925 * src/files.c: Include gnulib's xstrndup.h.
4926
4927 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
4928 (REALLOC): Use xnrealloc, for likewise.
4929 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
4930 (strnlen, memrchr): Remove decls; functions no longer used.
4931 Include <stpcpy.h>.
4932
4933 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
4934 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
4935 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
4936 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
4937 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
4938 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
4939 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
4940 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
4941 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
4942 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
4943 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
4944 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
4945 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
4946 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
4947 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
4948 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
4949 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
4950 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
4951 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
4952 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
4953 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
4954 Remove, as these files are now generated automatically
4955 by bootstrap or automake.
4956
4957 * po/ChangeLog: Remove: all but one entry was a duplicate
4958 of this file, and I moved that 2000-11-02 entry here.
4959
4960 * config/.cvsignore: Add Makefile, depcomp, install-sh.
4961 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
4962 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
4963 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
4964 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
4965 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
4966 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
4967 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
4968 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
4969 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
4970 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
4971 xstrndup.h.
4972 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
4973 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
4974 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
4975 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
4976 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
4977 * src/.cvsignore: Remove *_.c.
4978
4979
4980 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
4981 support it. (The latest stable gzip doesn't.)
4982
49832004-04-27 Paul Eggert <eggert@twinsun.com>
4984
4985 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
4986 case, as stos_ is now used by destructors due to the 2004-02-09
4987 change.
4988
4989 Remove more K&R C support.
4990 * lib/libiberty.y (PARAMS): Remove. All uses removed.
4991 * lib/subpipe.c (errno): Remove decl.
4992 Include <stdlib.h> unconditionally.
4993 (EXIT_FAILURE): Remove macro.
4994 * src/complain.c (vfprintf, strerror): Remove.
4995 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
4996 unconditionally.
4997 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
4998 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
4999 (strchr, strspn, memchr): Remove decls.
5000 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
5001 unconditionally. Do not declare perror.
5002 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
5003 unconditionally.
5004
5005 * src/complain.c (_): Remove useless defn, as system.h defines this.
5006
5007 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
5008 with latest obstack.h.
5009 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
5010 to procedure types, as obstack.h now does that for us.
5011 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
5012
5013 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
5014 so that this include file can stand alone.
5015 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
5016 does this now. Include subpipe.h first after config.h, to
5017 test whether it can stand alone.
5018
5019 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
5020 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
5021 unused declaration.
5022
5023 * tests/synclines.at (%union synch line): Put a dummy member in
5024 the union, because empty unions aren't allowed in C. Caught
5025 by GCC 3.4.0.
5026
4f16766c
PE
50272004-04-13 Jim Meyering <jim@meyering.net>
5028
5029 * src/conflicts.c (conflicts_print): Correct format string typo:
5030 use `%%' to produce literal `%'. (trivial change)
5031
779e7ceb
PE
50322004-03-30 Paul Eggert <eggert@twinsun.com>
5033
5034 * src/getargs.c (version): Update copyright year to 2004.
5035
5036 * data/c.m4 (b4_int_type): Use 'short int' rather than
5037 'short', and similarly for 'long', 'unsigned', etc.
5038 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
5039 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
5040 yy_yypstack, yydumpstack): Likewise.
5041 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
5042 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
5043 Likewise.
5044 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
5045 yy_stack_print, yyparse): Likewise.
5046 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
5047 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
5048 * lib/bitset.c (bitset_print): Likewise.
5049 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
5050 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5051 * lib/bitsetv.c (bitsetv_dump): Likewise.
5052 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
5053 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
5054 Likewise.
5055 * src/LR0.c (allocate_itemsets): Likewise.
5056 * src/gram.h (rule_number, rule): Likewise.
5057 * src/lalr.h (goto_number): Likewise.
5058 * src/nullable.c (nullable_compute): Likewise.
5059 * src/output.c (prepare_rules): Likewise.
5060 * src/relation.c (relation_print, relation_digraph): Likewise.
5061 * src/relation.h (relation_node): Likewise.
5062 * src/state.h (state_number, transitions, errs, reductions,
5063 struct state): Likewise.
5064 * src/symtab.h (symbol_number, struct symbol): Likewise.
5065 * src/tables.c (vector_number, tally, action_number,
5066 default_goto, goto_actions): Likewise.
5067 * tests/existing.at (GNU Cim Grammar): Likewise.
5068 * tests/regression.at (Web2c Actions): Likewise.
5069
5070 * src/output.c (muscle_insert_short_int_table): Renamed from
5071 muscle_insert_short_table. All uses changed.
5072
d6328241
PH
50732004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5074
5075 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
5076 (declaration): Replace expected_conflicts with expected_sr_conflicts.
5077 Add %expect-rr rule.
4f16766c 5078
d6328241
PH
5079 * src/scan-gram.l: Recognize %expect-rr.
5080
4f16766c 5081 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 5082 expected_conflicts.
4f16766c 5083 (expected_rr_conflicts): Declare.
d6328241
PH
5084
5085 * src/conflicts.c (expected_sr_conflicts): Rename from
5086 expected_conflicts.
5087 (expected_rr_conflicts): Define.
5088 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
5089 for GLR parsers.
5090 Use expected_sr_conflicts in place of expected_conflicts.
5091 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 5092
d6328241 5093 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 5094
1452af69
PE
50952004-03-08 Paul Eggert <eggert@gnu.org>
5096
5097 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 5098 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
5099
5100 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
5101 in lalr1.cc.
5102 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
5103 * src/scan-gram.l (scan_integer): New function.
5104 ({int}): Use it.
5105 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
5106 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
5107 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
5108 Say "long int", not "long", for uniformity with GNU style.
5109
006d217d
PE
51102004-02-25 Paul Eggert <eggert@twinsun.com>
5111
5112 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
5113 compilers. This fixes a problem with Intel's C++ compiler being
5114 chatty, reported by Guido Trentalancia in
161a71f3 5115 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 5116
c2729758
ADL
51172004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
5118
5119 Support %destructor and merge error locations in lalr1.cc.
5120
5121 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
5122 (Parser::stos_): Define unconditionally.
5123 (Parser::destruct_): New method. Generate its body with
5124 b4_yydestruct_generate.
5125 (Parser::error_start_): New attribute.
5126 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
5127 token which are discarded.
5128 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
5129 error_start_ when erroneous token are discarded.
5130 (Parser::parse) <yyerrlab1>: Compute the location of the error
5131 token so that it covers all the discarded tokens.
5132 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
5133 it can be called with `%skeleton "lalr1.cc"', and do that.
5134
dd0e0635
PE
51352004-02-02 Paul Eggert <eggert@twinsun.com>
5136
5137 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
5138 $(top_srcdir)/lib and ../lib. This fixes a bug reported
5139 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
5140 There's no need to mention top_builddir since Automake does that
5141 for us.
5142 (INCLUDES): Remove, as Automake says it's obsolescent.
5143 Contents migrated into AM_CPPFLAGS as described above.
5144 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
5145
51462004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5147
5148 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
5149 (yyreportSyntaxError): Handle case where lookahead token is
5150 YYEMPTY.
5151
be16239b
PH
51522004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5153
5154 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
5155 resulting parsers are compilable with C++.
5156
5fa90832
PE
51572003-12-23 Paul Eggert <eggert@twinsun.com>
5158
5159 * config/depcomp, config/install-sh: Sync with Automake 1.8.
5160 * src/output.c (output_skeleton): Rename local var.
5161 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
5162 Bison tokens, as this runs afoul of the 2003-10-07 change that
5163 disallowed NUL bytes in character constants or string literals.
5164
5165 * tests/local.at: Require Autoconf 2.59's Autotest.
5166 * tests/testsuite.at: Don't include local.at, since we now assume
5167 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
5168 including it.
5169 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
5170 multiple inclusion warnings.
dd0e0635 5171
b165c324
AD
51722003-12-02 Akim Demaille <akim@epita.fr>
5173
5174 * doc/bison.texinfo (How Can I Reset the Parser): More about start
5175 conditions.
5176 From Bruno Haible.
5177
26e06a21
ADL
51782003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
5179
5180 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
5181
92ac3705
PE
51822003-10-07 Paul Eggert <eggert@twinsun.com>
5183
6a5ecb38
PE
5184 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
5185 if testsuite doesn't exist.
5186
92ac3705
PE
5187 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
5188 literals, unfortunately.
5189 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
5190 Complain about NUL bytes in character constants or string literals.
5191
91d2c560
PE
51922003-10-05 Paul Eggert <eggert@twinsun.com>
5193
5194 * NEWS: Don't document %no-default-prec, as it's still
5195 too experimental.
5196 * doc/bison.texinfo: Document %no-default-prec only if
5197 the defaultprec flag is set. Normally it's not.
5198
0cc3da3a
PE
51992003-10-04 Paul Eggert <eggert@twinsun.com>
5200
5201 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
5202 non-modifiable lvalue, instead of a modifiable one.
5203 * doc/bison.texinfo (Actions): Document that $$ can
5204 be assigned to. Do not claim that $$ and $N are
5205 array element references: user code should not rely on this.
5206
22fccf95
PE
52072003-10-01 Paul Eggert <eggert@twinsun.com>
5208
5209 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
5210 (grammar_declaration): Use it.
5211 * src/scan-gram.l: New token %no-default-prec.
5212 * tests/conflicts.at: Revamp tests to use %no-default-prec.
5213 * NEWS, doc/bison.texinfo: Document the above.
5214
fc8f2965
AD
52152003-10-01 Akim Demaille <akim@epita.fr>
5216
5217 VCG no longer supports long_straight_phase.
5218
5219 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
5220 * src/print_graph.c (print_graph): Adjust.
5221
39a06c25
PE
52222003-09-30 Frank Heckenbach <frank@g-n-u.de>
5223 and Paul Eggert <eggert@twinsun.com>
5224
5225 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
5226 Table of Symbols): Document %default-prec.
5227 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
5228 (grammar_declaration): Set default_prec on %default-prec.
5229 * src/scan-gram.l (%default-prec): New token.
5230 * src/reader.h (default_prec): New flag.
5231 * src/reader.c: Likewise.
5232 (packgram): Handle it.
5233 * tests/conflicts.at (%default-prec without %prec,
5234 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 5235
39a06c25
PE
52362003-09-30 Paul Eggert <eggert@twinsun.com>
5237
5238 * tests/testsuite.at: Include local.at, not input.at, fixing
5239 a typo in the 2003-08-25 patch.
5240
62b6aef9
AD
52412003-08-27 Akim Demaille <akim@epita.fr>
5242
5243 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
5244 GCC warnings.
5245
89e1cc61
AD
52462003-08-26 Akim Demaille <akim@epita.fr>
5247
5248 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
5249 "<\#" to avoid magic from Gnus when posting parts of this script.
5250
a08460b0
AD
52512003-08-26 Akim Demaille <akim@epita.fr>
5252
5253 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
5254 (Parser::parse): here.
5255 Adjust: nerrs and errstatus is now replaced by...
5256 (Parser::nerrs_, Parser::errstatus_): New.
5257
603f1cfd
AD
52582003-08-25 Akim Demaille <akim@epita.fr>
5259
5260 * config/announce-gen, Makefile.cfg: New.
5261 * Makefile.am: Adjust.
5262 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
5263 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
5264
cd3684cf
AD
52652003-08-25 Akim Demaille <akim@epita.fr>
5266
5267 When reducing initial empty rules, Bison parser read an initial
5268 location that is not defined. This results in garbage, and that
5269 affects Bison's own parser. Therefore we need (i) to extend Bison
5270 to support a means to initialize this location, and (ii) to use
5271 this CVS Bison to fix CVS Bison's parser.
5272
5273 * src/reader.h, reader.c (epilogue_augment): Remove, replace
5274 with...
5275 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
5276 * src/parse-gram.y: Adjust.
5277 (%initial-action): New.
5278 (%error-verbose): Since we require CVS Bison, there is no reason
5279 not to use it.
5280 * src/scan-gram.l: Adjust.
5281 * src/Makefile.am (YACC): New, to make sure we use our own parser.
5282 * data/yacc.c (yyparse): Use b4_initial_action.
5283
4e03e201
AD
52842003-08-25 Akim Demaille <akim@epita.fr>
5285
5286 * doc/bison.texinfo: Don't promote stdout for error messages.
5287
8c182d05
AD
52882003-08-25 Akim Demaille <akim@epita.fr>
5289
5290 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
5291 From Alexandre Duret-Lutz.
5292
6a60c4cf
PE
52932003-08-25 Akim Demaille <akim@epita.fr>
5294
5295 Version 1.875c.
5296
25f66e1a
AD
52972003-08-25 Akim Demaille <akim@epita.fr>
5298
5299 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
5300 Use them.
5301
5348bfbe
AD
53022003-08-25 Akim Demaille <akim@epita.fr>
5303
5304 * data/lalr1.cc (Parser::reduce_print_): New.
5305 Use it.
5306
47301314
AD
53072003-08-25 Akim Demaille <akim@epita.fr>
5308
5309 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
5310 error recovery loops. This patch is based on
161a71f3 5311 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
5312 Also, augment the similarity between lalr1.cc and yacc.c.
5313 Note: the locations of error recovery rules are not correct yet.
5314
5315 * data/lalr1.cc: Comment changes to augment the similarity between
5316 lalr1.cc and yacc.c.
5317 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
5318 (yyerrlab1): Remove, but where it used to be (now the bottom part of
5319 yyerrlab), when hitting EOF, pop the whole stack here instead of
5320 merely falling thru the default error handling mechanism.
5321 (yyerrorlab): New label, with the old contents of YYERROR,
5322 plus the following change: pop the stack of rhs corresponding
5323 to the production that invoked YYERROR. That is how Yacc
5324 behaves (required by POSIX).
5325 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
5326 fail.
5327
1f7a61ff
AD
53282003-08-25 Akim Demaille <akim@epita.fr>
5329
5330 Tune local.at so that people can "autom4te -l autotest calc.at -o
5331 calc" for instance, to extract a sub test suite.
5332
5333 * tests/testsuite.at: Move the initialization, Autotest version
5334 requirement, and AT_TESTED invocation into...
5335 * tests/local.at: here.
5336 * tests/testsuite.at: Include it for compatibility with Autoconf
5337 2.57.
5338 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
5339 be ignore.
5340
327b5b56
PE
53412003-08-04 Paul Eggert <eggert@twinsun.com>
5342
5343 Rework code slightly to avoid gcc -Wtraditional warnings.
5344 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
5345 The returned value is now stored in *YY0. All callers changed.
5346 * src/output.c (merge_output): Adjust to the above change.
5347
0051e3ed
PE
53482003-07-26 Paul Eggert <eggert@twinsun.com>
5349
5350 * data/glr.c (YYASSERT): New macro.
5351 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
5352 yyresolveStates, yyprocessOneStack):
5353 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
5354 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 5355
137437c6
PE
53562003-07-25 Paul Eggert <eggert@twinsun.com>
5357
5b620e06
PE
5358 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
5359 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 5360 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
5361 by Frank Heckenbach, though I have omitted the structure-initialization
5362 part of his glr-knr.diff patch since I recall that the Portable
5363 C Compiler didn't require that change.
5364
137437c6
PE
5365 Let the user specify how to allocate and free memory.
5366 Derived from a suggestion by Frank Heckenbach in
161a71f3 5367 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
5368 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
5369 All uses of free, malloc, realloc changed to use these macros,
5370 and unnecessary casts removed.
5371 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
5372
ddb85ca5
PE
53732003-07-06 Matthias Mann <MatthiasMann@gmx.de>
5374
5375 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
5376 use s.empty() rather than s == "" to test for empty string; see
161a71f3 5377 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
5378 (trivial change)
5379
39910e09
AD
53802003-06-25 Akim Demaille <akim@epita.fr>
5381
5382 * config/depcomp, config/install-sh: Update from masters.
5383
0ae99356
PE
53842003-06-20 Paul Eggert <eggert@twinsun.com>
5385
5386 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
5387 and return properly parenthesized result.
5388 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
5389 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
5390 Remove unnecessary parentheses from uses.
5391 * doc/bison.texinfo (Location Default Action): Describe the
5392 conventions for parentheses.
5393
cd05d13c
PE
53942003-06-19 Paul Eggert <eggert@twinsun.com>
5395
81fd08ca
PE
5396 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
5397 yyreportTree): Do not assume that size_t is the same width as int,
5398 when printing sizes. Print sizes using an unsigned format.
5399 Problem reported by Frank Heckenbach in
161a71f3 5400 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 5401
cd05d13c
PE
5402 Port to Forte Developer 7 C compiler.
5403 * data/glr.c (struct YYLTYPE): If locations are not being used,
5404 declare a single dummy member, as empty structs do not conform
5405 to the C standard.
5406 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
5407 the Forte Developer 7 C compiler complains that end-of-loop
5408 code is not reached.
5409
4dcf140b
PE
54102003-06-17 Paul Eggert <eggert@twinsun.com>
5411
5412 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
5413 avoid warnings from picky compilers about redefinition of PARAMS.
5414
8dd76bee
PE
54152003-06-17 Paul Eggert <eggert@twinsun.com>
5416
5417 Version 1.875b.
5418
5419 * NEWS: Document 1.875b.
5420
5421 * lib/bbitset.h: Do not include config.h; that's the includer's job.
5422 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
5423 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
5424 Don't use 'index' in comments, as it's a builtin fn on some hosts.
5425 * lib/bitset_stats.c: Include gettext.h unconditionally, as
5426 per recent gettext manual's suggestion.
5427 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
5428 Use prototypes, not old-style definitions.
5429 * lib/lbitset.c (lbitset_unused_clear): Likewise.
5430 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
5431 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
5432 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
5433 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
5434 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
5435 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
5436 vbitset_or_and_cmp, vbitset_copy): Likewise.
5437
5438 * lib/libiberty.h: Do not include config.h; that's the includer's job.
5439 Do not include <stdlib.h>.
5440 (PARAMS): Define unconditionally for C89.
5441 (ATTRIBUTE_NORETURN): Remove.
5442 (ATTRIBUTE_UNUSED): Define unconditionally.
5443
5444 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 5445 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
5446 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
5447 * lib/vbitset.c, lib/vbitset.h: New files.
5448 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
5449 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
5450 from libbitset.
5451
5452 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
5453 `How Can I Reset @code{yyparse}', since texinfo does not allow
5454 arbitrary @ in node names.
5455
5456 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
5457 shouldn't be needed according to the gettext 0.12.1 documentation
5458 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 5459 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 5460 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 5461 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 5462
8dd76bee
PE
5463 * lib/.cvsignore: Add stdbool.h.
5464 * m4/.cvsignore: Add nls.m4, po.m4.
5465
5466 Upgrade to CVS gnulib.
5467 * stdbool_.h: File renamed from stdbool.h.in.
5468 * configure.ac (AM_STDBOOL_H): Invoke this instead of
5469 AC_HEADER_STDBOOL.
5470 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
5471 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
5472 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
5473 (MOSTLYCLEANFILES): New var.
5474 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
5475 (stdbool.h): New rule.
5476 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
5477 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
5478 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
5479 m4/quote.m4: Upgrade to today's gnulib.
5480
5481 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
5482 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
5483 the tests right now.
5484 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
5485 yyerror are declared before use; C99 requires this.
5486
25005f6a
PH
54872003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5488
5489 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
5490 first.
5491 (yyrecoverSyntaxError): Correct the logic for setting and testing
5492 yyerrState.
5493 Correct comment on handling EOF.
5494 Allow states with only a default reduction, rather than failing
8dd76bee 5495 (I can't quite reconstruct why these were not allowed before).
25005f6a 5496
137437c6 5497 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 5498 buffer overruns, corrupting state.
8dd76bee
PE
5499
5500 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
5501 definition.
5502 * src/reader.h (max_left_semantic_context): New variable declaration.
5503 * src/scan-gram.l (max_left_semantic_context): Define.
5504 (handle_action_dollar): Update max_left_semantic_context.
5505 * data/glr.c (YYMAXLEFT): New definition.
5506 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
5507 (yyresolveAction): Ditto.
5508
5509 Fixes to problems with location handling in GLR parsers reported by
5510 Frank Heckenbach (2003/06/05).
5511
5512 * data/glr.c (YYLTYPE): Make trivial if locations not used.
5513 (YYRHSLOC): Add parentheses, and define only if locations used.
5514 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
5515 locations not used.
5516 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
5517 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 5518
25005f6a
PH
5519 * tests/cxx-type.at: Exercise location information; update tests
5520 to differentiate output with and without locations.
8dd76bee 5521 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
5522 because default YYLTYPE not yet defined.
5523 Change semantic actions to compute strings, rather than printing
5524 them directly (to test proper passing of semantics values). Change
5525 output to prefix notation and update test data and expected results.
5526 (yylex): Track locations.
5527 (stmtMerge): Return value rather than printing, and include arguments
5528 in value.
8dd76bee 5529
711f40b7
PE
55302003-06-03 Paul Eggert <eggert@twinsun.com>
5531
5532 Avoid warnings generated by GCC 2.95.4 when Bison is
5533 configured with --enable-gcc-warnings.
5534 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
5535 yy::]b4_parser_class_name[::translate_,
5536 yy::Stack::operator[] (unsigned),
5537 yy::Stack::operator[] (unsigned) const,
5538 yy::Slice::operator[] (unsigned),
5539 yy::Slice::operator[] (unsigned) const):
5540 Rename local vars to avoid warnings.
5541 * tests/glr-regression.at (Improper handling of embedded actions
5542 and $-N in GLR parsers): Remove unused local variable from yylex.
5543 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
5544 (void) as arg when not pure, since we now assume C89 when building
5545 Bison. Pacify GCC by using parameter.
5546
ac695f7d
PE
55472003-06-02 Paul Eggert <eggert@twinsun.com>
5548
5549 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
5550 yy::Location::lines, yy::Location::columns): Rename arguments
5551 to avoid shadowing; this removes a warning generated by GCC 3.3.
5552
26ec81e0
PE
55532003-06-01 Paul Eggert <eggert@twinsun.com>
5554
5555 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
5556 to g++, as GCC 3.3 complains if you do it.
5557 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
5558 everything that WARNING_CFLAGS has, except omit warnings
5559 not suitable for C++.
5560 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
5561 * tests/atlocal.in (CXXFLAGS): New var.
5562 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
5563
5564 Fix a GLR parser bug I reported in February; see
161a71f3 5565 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
5566 The problem was that GLR parsers did not conform to the C standard,
5567 because actions like { $1 = $2 + $3; } expanded to expressions
5568 that invoked YYFILL in separate subexpressions, and YYFILL assigned
5569 to a local variable. The C standard says that expressions
5570 like (var = f ()) + (var = f ()) have undefined behavior.
5571 Another problem was that GCC sometimes issues warnings that
5572 yyfill and its parameters are unused.
5573
5574 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
5575 as possibly unused.
5576 (yyfill): New function.
5577 (YYFILL): Use it.
5578 (yyuserAction): Change type of yynormal to bool, so that it matches
5579 the new yyfill signature. Mark it as possibly unused.
5580
5581
5582 Follow up on a bug I reported in February, where a Bison-generated
5583 parser can loop. Provide a test case and a fix for yacc.c. I
5584 don't have a fix for lalr1.cc or for glr.c, unfortunately.
5585 The original bug report is in:
161a71f3 5586 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
5587
5588 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
5589 macro's size was becoming unwieldy.
5590 (yyerrlab): Do not discard an empty lookahead symbol, as this
5591 might destroy garbage.
5592 (yyerrorlab): New label, with the old contents of YYERROR,
5593 plus the following change: pop the stack of rhs corresponding
5594 to the production that invoked YYERROR. That is how Yacc
5595 behaves, and POSIX requires this behavior.
5596 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
5597 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
5598 Define 'alarm' to do nothing if unistd.h is not available.
5599 Add a new rule "exp: '-' error;" to test the above change to
5600 data/yacc.c. Use 'alarm' to abort any test taking longer than
5601 10 seconds, as it's probably looping.
5602 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
5603 Also, the new yacc.c generates two fewer diagnostics for an
5604 existing test.
5605
d0829076
PE
56062003-05-24 Paul Eggert <eggert@twinsun.com>
5607
c6ae27df
PE
5608 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
5609 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
5610 This fixes a problem reported by John Bowman when the Compaq/HP
5611 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
5612 -ansi -Wall -gall).
5613 * data/yacc.c (union yyalloc): Likewise.
5614 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 5615
d0829076
PE
5616 Switch from 'int' to 'bool' where that makes sense.
5617
5618 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
5619 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
5620 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
5621 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
5622 Return or accept bool, not int. All callers changed.
5623 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
5624 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
5625 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
5626 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
5627 bitset_or_and_cmp_): Likewise.
5628 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
5629 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
5630 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
5631 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
5632 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
5633 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
5634 bitset_stats_or_and_cmp): Likewise.
5635 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
5636 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
5637 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
5638 ebitset_xor_cmp): Likewise.
5639 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
5640 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
5641 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
5642 lbitset_xor_cmp): Likewise.
5643 * lib/bbitset.h: Include <stdbool.h>.
5644 (struct bitset_vtable): The following members now return bool, not
5645 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
5646 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
5647 or_and_cmp).
5648 * src/conflicts.c (count_rr_conflicts): Likewise.
5649 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
5650 All uses changed.
5651 * lib/ebitset.c (ebitset_obstack_init): Likewise.
5652 * lib/lbitset.c (lbitset_obstack_init): Likewise.
5653 * src/getargs.c (debug_flag, defines_flag, locations_flag,
5654 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5655 graph_flag): Likewise.
5656 * src/getargs.h (debug_flag, defines_flag, locations_flag,
5657 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
5658 graph_flag): Likewise.
5659 * src/output.c (error_verbose): Likewise.
5660 * src/output.h (error_verbose): Likewise.
5661 * src/reader.c (start_flag, typed): Likewise.
5662 * src/reader.h (typed): Likewise.
5663 * src/getargs.c (LOCATIONS_OPTION): New constant.
5664 (long_options, getargs): Use it.
5665 * src/lalr.c (build_relations): Use bool, not int.
5666 * src/nullable.c (nullable_compute): Likewise.
5667 * src/print.c (print_reductions): Likewise.
5668 * src/tables.c (action_row, pack_vector): Likewise.
5669 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
5670 * src/output.c (prepare): Use it.
5671 * src/output.c (token_definitions_output,
5672 symbol_destructors_output, symbol_destructors_output): Use string,
5673 not boolean integer, to keep track of whether to output separator.
5674 * src/print_graph.c (print_core): Likewise.
5675 * src/state.c (state_rule_lookaheads_print): Likewise.
5676
5677 * config/install-sh: Sync from automake 1.7.5.
5678
6b2584b7
PE
56792003-05-14 Paul Eggert <eggert@twinsun.com>
5680
5681 * src/parse-gram.y (rules_or_grammar_declaration): Require a
5682 semicolon after a grammar declaration, in the interest of possible
5683 future changes to the Bison input language.
5684 Do not allow a stray semicolon at the start of the grammar.
5685 (rhses.1): Allow one or more semicolons after any rule, including
5686 just before "|" as required by POSIX.
5687 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
5688 grammar.
5689
caf37a36
ADL
56902003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
5691
5692 %parse-param support for lalr1.cc.
5693
5694 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
5695 b4_cc_constructor_calls, b4_cc_constructor_call,
5696 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
5697 definitions.
5698 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
5699 parse-param arguments.
5700 (yy::b4_parser_class_name): Declare instance variables to
5701 hold parse-param arguments.
5702 * tests/calc.at: s/value/semantic_value/ because value clashes
5703 with a member of yy::b4_parser_class_name. Adjust C++ code
5704 to handle %parse-param. Enable %parse-param test in C++.
5705
3ab37077
PE
57062003-05-12 Paul Eggert <eggert@twinsun.com>
5707
5708 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
5709 English a bit. Fix fclose typo. Change "const char" to "char
5710 const", and use ANSI C rather than K&R for "main". Suggest
5711 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
5712 and suggest yy_switch_to_buffer.
5713
57142003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
5715
5716 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
5717 C89. This avoids a diagnostic on compilers that define __STDC__
5718 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 5719 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 5720
e743727f
PE
57212003-05-03 Paul Eggert <eggert@twinsun.com>
5722
5723 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
5724 Do not overrun array bounds.
5725 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 5726 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 5727
916708d5
AD
57282003-04-29 Akim Demaille <akim@epita.fr>
5729
5730 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
5731 * src/getargs.c, src/getargs.h: here, as bool, not int.
5732 (nondeterministic_parser): New.
5733 * src/parse-gram.y, src/scan-gram.l: Support
5734 %nondeterministic-parser.
5735 * src/output.c (prepare): Use nondeterministic_parser instead
5736 of glr_parser where appropriate.
5737 * src/tables.c (conflict_row, action_row, save_row)
5738 (token_actions, token_actions, pack_vector): Ditto.
5739
a06ea4aa
AD
57402003-04-29 Akim Demaille <akim@epita.fr>
5741
5742 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
5743
211074ca
AD
57442003-04-29 Akim Demaille <akim@epita.fr>
5745
5746 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
5747 with %pure-parser and %locations to exercise the patch from Yakov
5748 Markovitch below.
5749
6175ffe3
PE
57502003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
5751
5752 * data/yacc.c: (b4_lex_param): Corrected for the case where
5753 %lex-param is provided and %pure-parser isn't.
5754
b1e95857
PE
57552003-04-27 Paul Eggert <eggert@twinsun.com>
5756
5757 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 5758 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
5759 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
5760 if it is not defined.
5761 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
5762
acda9df6
PE
57632003-04-26 Paul Eggert <eggert@twinsun.com>
5764
3470c57b
PE
5765 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
5766 Declare to be of type suitable for the ninf value itself, not of
5767 type suitable for the corresponding table, since the latter might
5768 be unsigned but the ninf value might be negative. This fixes a
5769 bug reported by Alexandre Duret-Lutz in
161a71f3 5770 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 5771
acda9df6
PE
5772 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
5773 invokes it. We shouldn't invoke it twice because it will attempt
5774 to put error.o in the archive twice. This fixes a glitch reported
5775 by Martin Mokrejs in
161a71f3 5776 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 5777
b5250f26
PE
57782003-04-21 Paul Eggert <eggert@twinsun.com>
5779
5780 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
5781 to gnulib.
5782
089ac0f1
PE
57832003-04-21 Yakov Markovitch <Markovitch@iso.ru>
5784
5785 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
5786 Fix obvious typo that results in uncompilable GLR parsers
5787 when both %pure-parser and %locations are used. (trivial change)
5788
5ededac6
PE
57892003-04-17 Paul Eggert <eggert@twinsun.com>
5790
1b8f2fff
PE
5791 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
5792 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
5793 Do not insert the expected token via unput, as this runs afoul
5794 of a POSIX-compatibility bug in flex 2.5.31.
5795 All uses changed to BEGIN the parent state,
5796 since we no longer insert the expected token via unput.
5797 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
5798 that is no longer emitted after the above change.
5799
5ededac6
PE
5800 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
5801 the first one. This change is from Paul Hilfinger, and it fixes
5802 regression reported by Werner Lemberg in
161a71f3 5803 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
5804
5805 (resolve_sr_conflict): Don't invoke state_errs_set
5806 unless one or more tokens have been explicitly made errors.
5807 Otherwise, the above change causes Bison to abort.
5808
5809 * tests/existing.at (GNU pic Grammar): New test case, taken from
5810 Lemberg's email.
5811
b8be9132
AD
58122003-03-31 Akim Demaille <akim@epita.fr>
5813
5814 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
5815
d423d460
AD
58162003-03-31 Akim Demaille <akim@epita.fr>
5817
5818 * src/output.c (prepare_symbols): Avoid trailing spaces in the
5819 output.
5820
c7e441b4
AD
58212003-03-31 Akim Demaille <akim@epita.fr>
5822
5823 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
5824 From Paul Hilfinger.
5825
231897ad
AD
58262003-03-29 Akim Demaille <akim@epita.fr>
5827
5828 * m4/error.m4: Do not put under dynamic conditions some code which
5829 expansion is under static control.
5830
5b066063
AD
58312003-03-29 Akim Demaille <akim@epita.fr>
5832
5833 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
5834
22a74fec
AD
58352003-03-29 Akim Demaille <akim@epita.fr>
5836
5837 * doc/bison.texinfo (Strings are Destroyed): New.
5838
0eee27e7
PE
58392003-03-13 Paul Eggert <eggert@twinsun.com>
5840
5841 * .cvsignore: Add configure.lineno.
5842 * src/.cvsignore: Add yacc.
5843 * tests/.cvsignore: Add testsuite.log.
5844 * doc/fdl.texi: Sync with latest FSF version.
5845
f61aad93
PE
58462003-03-12 Paul Eggert <eggert@twinsun.com>
5847
537636c7
PE
5848 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
5849 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
5850 cursor, instead of leaving it undefined. This fixes a bug
5851 reported by Tim Van Holder in
161a71f3 5852 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
5853 * tests/input.at (Torturing the Scanner): Test the scanner on
5854 an empty input file, which was Tim Van Holder's test case.
5855
5856 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
5857 <sys/resource.h> can be included, include sys/time.h and
5858 sys/times.h first, if available. This works around the SunOS
5859 4.1.4 porting bug reported by Bruce Becker in
161a71f3 5860 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
5861
5862 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
5863 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
5864 AC_HEADER_SYS_WAIT.
5865
f61aad93
PE
5866 Merge changes from gnulib. This was prompted because the CVS
5867 snapshot didn't build on Solaris 7 due to strnlen problems.
5868
5869 These changes need to be merged back into gnulib:
5870 * lib/hash.c: Include <stdbool.h> unconditionally.
5871 * m4/onceonly.m4 (m4_quote): New macro.
5872 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
5873 Quote AC_FOREACH variable-expansions properly.
5874 The 2003-01-03 obstack.h change also needs merging.
5875 {end of changes requiring merging}
5b066063 5876
f61aad93
PE
5877 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
5878 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
5879 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
5880 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
5881 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
5882 New files, imported from gnulib.
5883 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
5884 above.
5885
5886 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
5887 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
5888 gnulib sources.
5889
5890 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
5891 Add.
5892 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
5893 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
5894 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
5895 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
5896 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
5897 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
5898 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
5899 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
5900 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
5901 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
5902 (jm_PREREQ_ARGMATCH): Remove.
5903 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
5904 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
5905
5906 * src/system.h: Include <stdbool.h> unconditionally.
5907
5908 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
5909 assuming at least C89 in the bitset code for some time now.
5910
d2ffe116
AD
59112003-03-03 Akim Demaille <akim@epita.fr>
5912
5913 * ro.po: New.
5914
052826fd
AD
59152003-03-02 Akim Demaille <akim@epita.fr>
5916
5917 * doc/bison.texinfo (Table of Symbols): Reactivate the
5918 documentation for %lex-param, and %parse-param.
5919
c4749565
AD
59202003-03-02 Akim Demaille <akim@epita.fr>
5921
5922 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
5923 generate verbose error messages.
5924 Use the number of tokens as an upper bound in yytname, as it
5925 cannot be a non terminal.
5926
d5286af1
AD
59272003-03-02 Akim Demaille <akim@epita.fr>
5928
5929 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
5930 message.
5931
22e304a6
AD
59322003-03-02 Akim Demaille <akim@epita.fr>
5933
22e304a6
AD
5934 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
5935 Use them to exercise yycheck overrun.
5936 Based on Andrew Suffield's grammar.
5937
67a25fed
AD
59382003-03-02 Akim Demaille <akim@epita.fr>
5939
5940 Create tests/local.at for Bison generic testing macros.
5941
5942 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
5943 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
5944 This new file.
5945 * tests/calc.at (AT_CHECK_CALC): Adjust.
5946 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
5947 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
5948 * tests/local.at: here.
5949 (AT_COMPILE_CXX): Tags the tests using it as c++.
5950 Ignore the test if CXX is not functional.
5951
9c2b381f
PE
59522003-03-01 Paul Eggert <eggert@twinsun.com>
5953
5954 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
5955 not loc->end, since loc->end might contain garbage and this leads
5956 to undefined behavior on some platforms.
5957 (id_loc, token_start): Use (IF_LINTed) initial values that do not
5958 depend on *loc, so that the reader doesn't give the the false
5959 impression that *loc is initialized.
5960 (<INITIAL>"%%"): Do not bother setting code_start, since its value
5961 does not survive the return.
5962
0433ba88
AD
59632003-03-01 Akim Demaille <akim@epita.fr>
5964
5965 * src/scan-gram.l (code_start): Always initialize it when entering
5966 into yylex, as SC_EPILOGUE is activated *before* the corresponding
5967 yylex invocation. An alternative would be making it static, but
5968 then it starts with the second %%'s beginning, instead of its end.
5969
b305ea69
PE
59702003-02-28 Paul Eggert <eggert@twinsun.com>
5971
5972 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
5973 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 5974 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 5975
c3d25e01
PE
59762003-02-26 Paul Eggert <eggert@twinsun.com>
5977
5978 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
5979 Remove Sequent/Pyramid discussion (nobody uses them any more).
5980 Merge VMS and MS-DOS discussion; these ports may well be dead
5981 but let's keep mentioning them for now. Put <> around email
5982 addresses. Add copyright notice.
5983
c267ffbc
PE
59842003-02-24 Paul Eggert <eggert@twinsun.com>
5985
5986 * data/glr.c (yy_reduce_print): yylineno -> yylno,
5987 to avoid collision with flex use of yylineno.
5988 Problem reported by Bruce Lilly in
161a71f3 5989 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
5990 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
5991 * data/yacc.c (yy_reduce_print): Likewise.
5992
5993 * config/depcomp: Sync with Automake 1.7.3.
5994
f939fc12
AD
59952003-02-21 Akim Demaille <akim@epita.fr>
5996
5997 * data/lalr1.cc: Use temporary variables instead of casts to
5998 change integer types.
5999 Suggested by Paul Eggert.
6000
95923bd6
AD
60012003-02-21 Akim Demaille <akim@epita.fr>
6002
6003 * doc/bison.texinfo: Use "location" consistently to refer to @n,
6004 to avoid confusions with lalr1.cc's notion of Position.
6005 Suggested by Paul Eggert.
6006
2cdc240e
AD
60072003-02-20 Akim Demaille <akim@epita.fr>
6008
6009 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
6010 before initial_columns.
6011 (location.hh): Use consistent variable names when defining the
6012 operator<<.
6013 Use "last" so that we subtract from Positions, not from unsigned.
6014
5d003116
AD
60152003-02-20 Akim Demaille <akim@epita.fr>
6016
6017 * data/lalr1.cc (position.hh): New subfile, including the extended
6018 and Doxygen'ed documentation of class Position.
6019 (location.hh): Use it.
6020 Document a` la Doxygen.
ba1ecc07 6021 With the help of Benoit Perrot.
5d003116 6022
d02b25f9
AD
60232003-02-20 Akim Demaille <akim@epita.fr>
6024
6025 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
6026 AT_YACC_IF.
6027 Redefine AT_YYERROR_SEES_LOC_IF using it.
6028 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
6029 not defined.
6030 Don't use the location in yy::Parser::error_ and
6031 yy::Parser::print_ when not %locations.
6032 Activate more lalr1.cc tests.
6033
0d1c3a04
AD
60342003-02-19 Akim Demaille <akim@epita.fr>
6035
6036 * data/lalr1.cc: When displaying a line number, be sure to make it
6037 an int.
6038
60a777aa
AD
60392003-02-19 Akim Demaille <akim@epita.fr>
6040
6041 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
6042 Remove, useless.
6043 (YYABORT, YYACCEPT, YYERROR): New.
6044 * tests/calc.at: Renable the lalr1.cc test.
6045
0b86fc41
AD
60462003-02-19 Akim Demaille <akim@epita.fr>
6047
6048 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
6049 error recovery, mixing with/without pops and discarding of the
6050 lookahead.
6051 Exercise YYERROR.
6052 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
6053
da99a5dc
PE
60542003-02-17 Paul Eggert <eggert@twinsun.com>
6055
6056 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
6057 * tests/testsuite.at (AT_COMPILE): Use them.
6058 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 6059 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 6060
93b8c255
PE
60612003-02-12 Paul Eggert <eggert@twinsun.com>
6062
6063 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
6064 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 6065 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
6066 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
6067 Check for malloc failure, for consistency with yacc.c.
6068 (yytname_size): Remove, for consistency with yacc.c.
6069
6070 The bug still remains in data/lalr1.cc, as I didn't have time
6071 to fix it there.
6072
7548fed2
AD
60732003-02-06 Akim Demaille <akim@epita.fr>
6074
6075 * configure.ac (GXX): Rename as...
6076 (CXX): this, to keep the original Autoconf semantics.
6077 Require 2.57.
6078 * data/lalr1.cc: Fix b4_copyright invocations.
6079 If YYDEBUG is not defined, don't depend upon name_ being defined.
6080 (location.hh): Include string and iostream.
6081 (Position::filename): New member.
6082 (Position::Position ()): New.
6083 (operator<< (Position)): New.
6084 (operator- (Position, int)): New.
6085 (Location::first, Location::last): Rename as...
6086 (Location::begin, Location::end): these, to mock the conventional
6087 iterator names.
6088 (operator<< (Location)): New.
6089 * tests/atlocal.in (CXX): New.
6090 * tests/testsuite.at (AT_COMPILE_CXX): New.
6091 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
6092 locations in a more synthetic way.
6093 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
6094 lalr1.cc is used.
6095 Adjust the C locations to match those from Emacs: first column is
6096 column 0.
6097 Change all the expected results.
6098 Conform to the GCS: simplify the locations when applicable.
6099 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
6100 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
6101 these CPP macros with the m4 macros new defined by...
6102 (AT_CHECK_PUSHDEFS): this, i.e.:
6103 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 6104 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
6105 New macros.
6106 (AT_CHECK_POPDEFS): Undefine them.
6107 (AT_CHECK_CALC_LALR1_CC): New.
6108 Use it for the first lalr1.cc test.
6109
43a176ef
AD
61102003-02-04 Akim Demaille <akim@epita.fr>
6111
6112 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
6113 Location as is defined.
6114
fc049e9c
AD
61152003-02-04 Akim Demaille <akim@epita.fr>
6116
6117 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
6118 name_ being defined.
6119
a737b216
PE
61202003-02-03 Paul Eggert <eggert@twinsun.com>
6121
6122 * src/gram.h (start_symbol): Remove unused decl.
6123
6124 Use more-consistent naming conventions for local vars.
6125
6126 * src/derives.c (derives_compute): Change type of local var from
6127 int to rule_number.
6128 * src/gram.c (grammar_rules_partial_print): Likewise.
6129 * src/print.c (print_core): Likewise.
6130 * src/reduce.c (reduce_grammar_tables): Likewise.
6131
6132 * src/gram.c (grammar_dump): Change name of item_number *
6133 local var from r to rp.
6134 * src/nullable.c (nullable_compute): Likewise.
6135
6136 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
6137
6138 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
6139 for symbol or symbol_number var.
6140 * src/reader.c (grammar_start_symbol_set): Likewise.
6141 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
6142 Likewise.
6143 * src/state.c (transitions_to): Likewise.
6144 * src/state.h: Likewise.
6145 * src/tables.c (symbol_number_to_vector_number): Likewise.
6146
6147 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
6148 char * var.
6149
6150 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
6151 var.
6152
6153 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
6154 var.
6155
6156 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
6157 Use str, not s, for char * var. Use ch, not c, for character var.
6158 Use size for size var.
6159
6160 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
6161 char * var.
6162 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
6163 uniqstr var.
6164 * src/uniqstr.h: Likewise.
6165
6166 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
6167 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
6168 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
6169 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
6170 param to have same name as that of enum, so that we don't use
6171 "s" to stand for a non-state.
6172
68e93ad5
AD
61732003-02-02 Akim Demaille <akim@epita.fr>
6174
6175 * src/scan-skel.l: Scan more than one inert character per yylex
6176 invocation.
6177
92898986
PE
61782003-02-01 Paul Eggert <eggert@twinsun.com>
6179
6180 Version 1.875a.
6181
1d9d5d71
PE
6182 * po/LINGUAS: Add ms.
6183
0435d061
AD
61842003-01-30 Akim Demaille <akim@epita.fr>
6185
6186 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
6187
6029a57f
PH
61882003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6189
6190 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
6191 of $1.
0435d061
AD
6192
6193 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 6194 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 6195 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 6196
6029a57f
PH
6197 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
6198 (b4_rhs_location): Ditto.
0435d061 6199 (yyfill): New function to copy from stack tree into array
6029a57f 6200 incrementally.
0435d061
AD
6201 (yyuserAction): Modify to allow incremental move of semantic values
6202 to rhs array when in GLR mode.
6203 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
6204 as needed.
6205 Remove dummy use of yystack, as there is now a guaranteed use.
6206 (yydoAction): Modify to allow incremental move of semantic values
6207 to rhs array when in GLR mode.
6208 (yyresolveAction): Ditto.
6209 (yyglrShiftDefer): Update comment.
0435d061 6210 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
6211 (yyglrReduce): Ditto.
6212 (yydoAction): Ditto
0435d061 6213
6029a57f
PH
6214 * tests/glr-regr1.at: Rename to ...
6215 * tests/glr-regression.at: Add new regression test for the problems
6216 described above (adapted from S. Eken).
6217 Update copyright notice.
6218 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
6219 * tests/Makefile.am: Ditto.
6220
6cee6297
PE
62212003-01-28 Paul Eggert <eggert@twinsun.com>
6222
6223 * data/lalr1.cc: Do not use @output_header_name@ unless
6224 b4_defines_flag is set. This fixes two bugs reported by
6225 Tim Van Holder in
161a71f3
PE
6226 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
6227 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 6228
b2a836b5
PE
62292003-01-21 Paul Eggert <eggert@twinsun.com>
6230
6231 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
6232 we don't need to worry about yyerrlab1 being reported as an
6233 "unused label" by non-GCC C compilers. The downside is that if
6234 locations are used then a couple of statements are duplicated each
6235 time YYERROR is invoked, but the upside is that the warnings
6236 should vanish.
6237 (yyerrlab1): Move code to YERROR.
6238 (yyerrlab2): Remove. Change uses back to yyerrlab1.
6239 This reverts some of the 2002-12-27 change.
6240
4196b931
PE
62412003-01-17 Paul Eggert <eggert@twinsun.com>
6242
6243 * src/output.c (symbol_printers_output): Fix typo that led
6244 to core dump. Problem reported by Antonio Rus in
161a71f3 6245 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 6246
3ae831b4
AD
62472003-01-13 Akim Demaille <akim@epita.fr>,
6248 Quoc Peyrot <chojin@lrde.epita.fr>,
6249 Robert Anisko <anisko_r@lrde.epita.fr>
6250
6251 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
6252 when the stacks contain one element, as the loop would otherwise
6253 free the last state, and then use the top state (the one we just
6254 popped). This means that the initial elements will not be freed
6255 explicitly, as is the case in yacc.c; it is not a problem, as
6256 these elements have fake values.
6257
e3aa65c5
PE
62582003-01-11 Paul Eggert <eggert@twinsun.com>
6259
6260 * NEWS: %expect-violations are now just warnings, reverting
6261 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
6262 bootstrapping problem reported by Matthias Klose; see
161a71f3 6263 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
6264 * src/conflicts.c (conflicts_print): Likewise.
6265 * tests/conflicts.at (%expect not enough, %expect too much,
6266 %expect with reduce conflicts): Likewise.
6267 * doc/bison.texinfo (Expect Decl): Document this. Also mention
6268 that the warning is enabled if the number of conflicts changes
6269 (not necessarily increases).
6270
6271 * src/getargs.c (version): Update copyright year.
6272
f0057011
AD
62732003-01-09 Akim Demaille <akim@epita.fr>
6274
6275 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
6276
1ee6d2a0
PE
62772003-01-08 Paul Eggert <eggert@twinsun.com>
6278
6279 * Makefile.maint (WGETFLAGS):
6280 New macro, containing "-C off" to disable proxy caches.
6281 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
6282 (rel-check): Use $(WGET) instead of wget.
6283
d4fd77c4
PE
62842003-01-06 Paul Eggert <eggert@twinsun.com>
6285
6286 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
6287 the GLR paper of Scott, Johnstone and Hussain.
6288
464c6927
PE
62892003-01-04 Paul Eggert <eggert@twinsun.com>
6290
d600ee67
PE
6291 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
6292 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
6293 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
6294 (EXTRA_LIBRARIES): New var, for liby.a.
6295 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
6296 (EXTRA_SCRIPTS): New var, for yacc.
6297
464c6927
PE
6298 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
6299 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
6300 Problem reported by Nelson H. F. Beebe.
6301
63022003-01-03 Paul Eggert <eggert@twinsun.com>
6303
6304 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
6305 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
6306 when compiling Bison 1.875's `bitset bset = obstack_alloc
6307 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
6308
6309 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
6310 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
6311 grow to a huge size with typical invocation.
d600ee67 6312
464c6927
PE
6313 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
6314 Use the pattern recommended by Autoconf 2.57, except also protect
6315 against double-definition.
6316 * src/system.h: Likewise.
6317 Portability issues reported by Nelson H. F. Beebe.
d600ee67 6318
464c6927
PE
6319 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
6320 All uses changed. Provide a definition in both C and C++.
6321 (yytrue, yyfalse): Define even if defined (__cplusplus).
6322
6323 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
6324 Reported by Nelson H. F. Beebe.
d600ee67 6325
464c6927
PE
6326 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
6327
0f42c7d5
PE
63282003-01-02 Paul Eggert <eggert@twinsun.com>
6329
6330 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
6331 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
6332 Bug reported by Nelson H. F. Beebe.
6333
dc546b0f
PE
63342003-01-01 Paul Eggert <eggert@twinsun.com>
6335
6336 * Version 1.875.
6337
2c09b6a7
PE
63382002-12-30 Paul Eggert <eggert@twinsun.com>
6339
6340 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
6341 Moved here from...
6342 (<INITIAL>","): Here. This causes stray "," to be treated
6343 more uniformly.
6344
dc546b0f 6345 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
6346 last brace in braced code when not in Yacc mode, for compatibility
6347 with Bison 1.35. This resurrects the 2001-12-15 patch to
6348 src/reader.c.
6349
6350 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
6351 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
6352
535c0f63
PE
63532002-12-28 Paul Eggert <eggert@twinsun.com>
6354
6355 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
6356 that of SYM's type. This fixes Debian bug 168069, reported by
6357 Thomas Olsson.
d600ee67 6358
963fcc17
PE
63592002-12-28 Paul Eggert <eggert@twinsun.com>
6360
6361 Version 1.75f.
6362
6363 Switch back to the Yacc style of conflict reports, undoing some
6364 of the 2002-07-30 change.
6365 * doc/bison.texinfo (Understanding): Use Yacc style for
6366 conflict reports. Also, use new way of locating rules.
6367 * src/conflicts.c (conflict_report):
6368 Renamed from conflict_report_yacc, removing the old
6369 'conflict_report'. Translate the entire conflict report at once,
6370 so that we don't assume that "," has the same interpretation in
6371 all languages.
6372 (conflicts_output): Use Yacc-style conflict report for each state,
6373 instead of our more-complicated style.
6374 (conflicts_print): Use Yacc-style conflict report, except print
6375 the input file name when not emulating Yacc.
6376 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
6377 Conflicted Reduction, %expect not enough, %expect too much,
6378 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
6379 * tests/existing.at (GNU Cim Grammar): Likewise.
6380 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
6381
6382 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
6383 fatal): Don't invoke fflush; it's not needed and it might even be
6384 harmful for stdout, as stdout might not be open.
6385 * src/reduce.c (reduce_print): Likewise.
6386
b1efe548
PE
63872002-12-27 Paul Eggert <eggert@twinsun.com>
6388
6389 Fix a bug where error locations were not being recorded correctly.
6390 This problem was originally reported by Paul Hilfinger in
161a71f3 6391 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
6392
6393 * data/yacc.c (yyparse): New local var yylerrsp, to record the
6394 top of the location stack's error locations.
6395 (yyerrlab): Set it. When discarding a token, push its location
6396 onto yylerrsp so that we don't lose track of the error's end.
6397 (yyerrlab1): Now is only the target of YYERROR, so that we can
6398 properly record the location of the action that failed. For GCC
6399 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
6400 GCC warning about yyerrlab1 being unused if YYERROR is unused.
6401 (yyerrlab2): New label, which yyerrlab now falls through to.
6402 Compute the error's location by applying YYLLOC_DEFAULT to
6403 the locations of all the symbols that went into the error.
6404 * doc/bison.texinfo (Location Default Action): Mention that
6405 YYLLOC_DEFAULT is also invoked for syntax errors.
6406 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6407 Error locations include the locations of all the tokens that were
6408 discarded, not just the last token.
d600ee67 6409
983c5c2c
PE
64102002-12-26 Paul Eggert <eggert@twinsun.com>
6411
b1efe548
PE
6412 * src/files.c: Include quote.h.
6413 (compute_output_file_names): Warn if we detect conflicting
6414 outputs to the same file. This should catch the misunderstanding
6415 exemplified by Debian Bug 165349, reported by Bruce Stephens..
6416
6417 * src/conflicts.c (conflicts_print): If the user specifies
6418 "%expect N", report an error if there are any reduce/reduce
6419 conflicts. This is what the manual says should happen.
6420 This fixes Debian bug 130890, reported by Anthony DeRobertis.
6421 * tests/conflicts.at (%expect with reduce conflicts): New test.
6422
983c5c2c
PE
6423 Don't use m4_include on relative file names, as it doesn't work as
6424 desired if there happens to be a file with that name under ".".
d600ee67 6425
983c5c2c
PE
6426 * m4sugar/version.m4: Remove; it was included but it wasn't used.
6427 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
6428 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
6429 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
6430 * src/output.c (output_skeleton): Use full path names when
6431 specifying a file to include; don't rely on include path, as
6432 it's unreliable when the working file contains a file with
6433 that name.
d600ee67 6434
983c5c2c
PE
64352002-12-25 Paul Eggert <eggert@twinsun.com>
6436
6437 Remove obsolete references to bison.simple and bison.hairy.
6438 Problem mentioned by Aubin Mahe in
161a71f3 6439 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
6440 * data/glr.c: Comment fix.
6441 * doc/bison.1: Remove references. Also, mention "yacc".
6442
6443 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
6444 with -g option.
6445
6446 * src/parse-gram.y (declaration): Use enum "report_states" rather
6447 than its numeric value 1.
6448
6449 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
6450 opening a new one. This fixes Debian bug 165349, reported by
6451 Bruce Stephens.
6452
23f2d9dc
PE
64532002-12-24 Paul Eggert <eggert@twinsun.com>
6454
6455 Version 1.75e.
6456
6457 * Makefile.maint (cvs-update): Don't assume that the shell
6458 supports $(...), as Solaris sh doesn't.
6459
6460 * src/parse-gram.y (lloc_default): Remove test for empty
6461 nonterminals at the end, since it didn't change the result.
6462
64632002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
6464
6465 If the user does not define YYSTYPE as a macro, Bison now declares it
6466 using typedef instead of defining it as a macro. POSIX requires this.
6467 For consistency, YYLTYPE is also declared instead of defined.
6468
6469 %union directives can now have a tag before the `{', e.g., the
6470 directive `%union foo {...}' now generates the C code
6471 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
6472 The default union tag is `YYSTYPE', for compatibility with Solaris 9
6473 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
6474 instead of `yyltype'.
6475
6476 `yystype' and `yyltype' are now obsolescent macros instead of being
6477 typedefs or tags; they are no longer documented and will be
6478 withdrawn in a future release.
6479
6480 * data/glr.c (b4_location_type): Remove.
6481 (YYSTYPE): Renamed from yystype.
6482 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
6483 (struct YYLTYPE): Renamed from struct yyltype.
6484 (YYLTYPE): Renamed from yyltype.
6485 (yyltype, yystype): New (and obsolescent) macros,
6486 for backward compatibility.
6487 * data/yacc.c: Likewise.
6488
6489 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
6490 does not specify a union tag. This is for compatibility with
6491 Solaris 9 yacc.
6492
6493 * src/parse-gram.y (add_param): 2nd arg is now char * not char
6494 const *, since it is now modified by stripping surrounding { }.
6495 (current_braced_code): Remove.
6496 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
6497 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
6498 trailing " {...}". Now of type <chars>.
6499 (grammar_declaration): Adjust to bundled tokens.
6500 (code_content): Remove; stripping is now done by add_param.
6501 (print_token_value): Print contents of bundled tokens.
6502 (token_name): New function.
6503
6504 * src/reader.h (braced_code, current_braced_code): Remove.
6505 (token_name): New decl.
6506
6507 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
6508 token_type, not braced_code code_kind. All uses changed.
6509 (SC_PRE_CODE): New state, for scanning after a keyword that
6510 has (or usually has) an immediately-following braced code.
6511 (token_type): New local var, to keep track of which token type
6512 to return when scanning braced code.
6513 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 6514 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
6515 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
6516 instead of returning a token type immediately.
6517 (<INITIAL>"{"): Set token type.
6518 (<SC_BRACED_CODE>"}"): Use it.
6519 (handle_action_dollar, handle_action_at): Now returns bool
6520 indicating success. Fail if ! current_rule; this prevents a core dump.
6521 (handle_symbol_code_dollar, handle_symbol_code_at):
6522 Remove; merge body into caller.
6523 (handle_dollar, handle_at): Complain in invalid contexts.
6524
6525 * NEWS, doc/bison.texinfo: Document the above.
6526 * NEWS: Fix years and program names in copyright notice.
6527
879ca4f8
PE
65282002-12-17 Paul Eggert <eggert@twinsun.com>
6529
6530 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
6531 Reporting, Table of Symbols): Omit mentions of %lex-param and
6532 %parse-param from the documentation for now.
6533
1c5fe69d
PE
65342002-12-15 Paul Eggert <eggert@twinsun.com>
6535
6536 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
6537 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
6538 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
6539 disagreed with the Bison documentation. Bug
6540 reported by Andrew Walrond.
d600ee67 6541
1c5fe69d
PE
6542 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
6543 as the caller now does that.
6544 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
6545 (YYEMPTY): Parenthesize right hand side, since others use it.
6546 (yyparse): Don't assume that our generated code is the only code
6547 that sets yychar.
6548
d1de5372
PE
65492002-12-13 Paul Eggert <eggert@twinsun.com>
6550
6551 Version 1.75d.
6552
6553 POSIX requires a "yacc" command.
6554 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
6555 (MOSTLYCLEANFILES): Add yacc.
6556 (yacc): New rule.
1c5fe69d 6557 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
6558 as an alias for bison y.
6559
6560 * po/LINGUAS: Add da.
d600ee67 6561
d1de5372
PE
6562 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
6563 problem with latest <getopt.h>.
6564 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
6565
6566 * doc/fdl.texi: Upgrade to 1.2.
6567 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
6568 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
6569 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
6570 gnulib.
6571 * config/install-sh: Sync with autotools.
6572
6573 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 6574 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
6575 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
6576 locations are requested.
6577 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
6578 locations are requested.
6579
d0f3fe23
PE
65802002-12-12 Paul Eggert <eggert@twinsun.com>
6581
6582 Remove unportable casts and storage allocation tricks.
6583 While we're at it, remove almost all casts, since they
6584 usually aren't needed and are a sign of trouble.
6585
6586 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
6587
6588 * src/derives.c (derives_compute): Do not subtract NTOKENS from
6589 the pointer DSET returned by malloc; this isn't portable.
6590 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
6591 Similarly for DERIVES.
6592 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
6593 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
6594 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
6595
6596 * src/derives.c (derives_compute): Do not bother invoking
6597 int_of_rule_number, since rule numbers are integers.
6598
6599 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
6600 rather than XMALLOC (char, N).
6601
6602 * src/files.c (filename_split): Rewrite to avoid cast.
6603
6604 * src/gram.h (symbol_number_as_item_number,
6605 item_number_as_symbol_number, rule_number_as_item_number,
6606 item_number_as_rule_number):
6607 Now inline functions rather than macros, to avoid casts.
6608 * src/state.h (state_number_as_int): Likewise.
6609 * src/tables.c (state_number_to_vector_number,
6610 symbol_number_to_vector_number): Likewise.
6611
6612 * src/gram.h (int_of_rule_number): Remove; no longer used.
6613
6614 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
6615 since the resulting storage is always stored into.
6616
6617 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
6618 where it's needed.
6619
6620 * src/muscle_tab.c (muscle_m4_output):
6621 Now inline. Return bool, not int.
6622 * src/state.c (state_compare): Likewise.
6623 * src/symtab.c (symbol_check_defined,
6624 symbol_check_alias_consistency, symbol_pack, symbol_translation,
6625 hash_compare_symbol, hash_symbol):
6626 Likewise.
6627 * src/uniqstr.c (uniqstr_print): Likewise.
6628 * src/muscle_tab.c (muscle_m4_output_processor):
6629 New function, to avoid casts.
6630 * src/state.c (state_comparator, stage_hasher): Likewise.
6631 * src/symtab.c (symbol_check_defined_processor,
6632 symbol_check_alias_consistency_processor, symbol_pack_processor,
6633 symbol_translation_processor, hash_symbol_comparator,
6634 hash_symbol_hasher): Likewise.
6635 * src/uniqstr.c (uniqstr_print_processor): Likewise.
6636 * src/muscle_tab.c (muscles_m4_output):
6637 Use new functions instead of casting old functions unportably.
6638 * src/state.c (state_hash_new): Likewise.
6639 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
6640 symbols_token_translations_init):
6641 Likewise.
6642 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
6643
6644 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
6645 var instead of casting to long, to avoid casts.
6646 (prepare_states): Use MALLOC rather than alloca, so that we don't
6647 have to worry about alloca.
6648 * src/state.c (state_hash_lookup): Likewise.
6649
6650 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
6651 local var instead of casting to unsigned char, to avoid casts.
6652
6653 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
6654 STATE_ALLOC): Remove.
6655 (transitions_new, errs_new, reductions_new, state_new): Use malloc
6656 rather than calloc, and use offsetof to avoid allocating slightly
6657 too much storage.
6658 (state_new): Initialize all members.
6659
6660 * src/state.c (state_hash): Use unsigned accumulator, not signed.
6661
6662 * src/symtab.c (symbol_free): Remove; unused.
6663 (symbol_get): Remove cast in lhs of assignment.
6664 (symbols_do): Now static. Accept generic arguments, not
6665 hashing-related ones.
6666
6667 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
6668 (symbol_processor): Remove.
6669 (symbols_do): Remove decl; now static.
6670
6671 * src/system.h (alloca): Remove; decl no longer needed.
6672 (<stddef.h>): Include, for offsetof.
6673 (<inttypes.>, <stdint.h>): Include if available.
6674 (uintptr_t): New type, if system lacks it.
6675 (CALLOC, MALLOC, REALLOC): New macros.
6676 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
6677 new macros.
6678
6679 * src/tables.c (table_size): Now int, to pacify GCC.
6680 (table_grow, table_ninf_remap): Use signed table size.
6681 (save_row): Don't bother initializing locals when not needed.
6682 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
6683 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
6684
6685 * src/vcg.h: Correct misspellings.
6686
6687 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
6688
6689
6690 * src/getargs.c (getargs): Don't assume EOF == -1.
6691
26b4a969
PE
66922002-12-09 Paul Eggert <eggert@twinsun.com>
6693
6694 Change identifier spellings to avoid collisions with names
6695 that are reserved by POSIX.
6696
6697 Don't use names ending in _t, since POSIX reserves them.
6698 For consistency, remove _e and _s endings -- they're weren't
6699 needed to remove ambiguity. All uses changed.
6700 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
6701 turn was just renamed from struniq_t.
6702 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
6703 which in turn was just renamed from struniq_processor_t.
6704 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
6705 in turn was renamed from hash_compare_struniq_t.
6706 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
6707 (state_list): Renamed from state_list_t.
6708 * src/assoc.h (assoc): Renamed from assoc_t.
6709 * src/conflicts.c (enum conflict_resolution): Renamed from
6710 enum conflict_resolution_e.
6711 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
6712 (rule_list): Renamed from rule_list_t.
6713 * src/getargs.h (enum trace): Renamed from enum trace_e.
6714 (enum report): Renamed from enum report_e.
6715 * src/gram.h (item_number): Renamed from item_number_t.
6716 (rule_number): Renamed from rule_number_t.
6717 (struct rule_s): Remove the "rule_s" part; not used.
6718 (rule): Renamed from rule_t.
6719 (rule_filter): Renamed from rule_filter_t.
6720 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
6721 (goto_list): Renamed from goto_list_t.
6722 * src/lalr.h (goto_number): Renamed from goto_number_t.
6723 * src/location.h (location): Renamed from location_t.
6724 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
6725 and moved here from:
6726 * src/muscle_tab.h (muscle_entry_t): here.
6727 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
6728 (rule_list): Renamed from rule_list_t.
6729 * src/print_graph.c (static_graph): Renamed from graph.
6730 * src/reader.h (braced_code): Renamed from braced_code_t.
6731 Remove brace_code_e tag.
6732 * src/relation.h (relation_node): Renamed from relation_node_t.
6733 (relation_nodes): Renamed from relation_nodes_t.
6734 (relation): Renamed from relation_t.
6735 * src/state.h (state_number): Renamed from state_number_t.
6736 (struct state): Renamed from struct state_s.
6737 (state): Renamed from state_t.
6738 (transitions): Renamed from transitions_t. Unused (and
6739 misspelled) transtion_s tag removed.
6740 (errs): Renamed from errs_t. Unused errs_s tag removed.
6741 (reductions): Renamed from reductions_t. Unused tag
6742 reductions_s removed.
6743 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
6744 (struct symbol_list): Renamed from struct symbol_list_s.
6745 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
6746 (struct symbol): Renamed from struct symbol_s.
6747 (symbol): Renamed from symbol_t.
6748 * src/tables.c (vector_number): Renamed from vector_number_t.
6749 (action_number): Renamed from action_t.
6750 * src/tables.h (base_number): Renamed from base_t.
6751 * src/vcg.h (enum color): Renamed from enum color_e.
6752 (enum textmode): Renamed from enum textmode_e.
6753 (enum shape): Renamed from enum shape_e.
6754 (struct colorentry): Renamed from struct colorentry_s.
6755 (struct classname): Renamed from struct classname_s.
6756 (struct infoname): Renamed from struct infoname_s.
6757 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
6758 (enum decision): Renamed from enum decision_e.
6759 (enum orientation): Renamed from enum orientation_e.
6760 (enum alignment): Renamed from enum alignment_e.
6761 (enum arrow_mode): Renamed from enum arrow_mode_e.
6762 (enum crossing_type): Renamed from enum crossing_type_e.
6763 (enum view): Renamed from enum view_e.
6764 (struct node): Renamed from struct node_s.
6765 (node): Renamed from node_t.
6766 (enum linestyle): Renamed from enum linestyle_e.
6767 (enum arrowstyle): Renamed from enum arrowstyle_e.
6768 (struct edge): Renamed from struct edge.
6769 (edge): Renamed from edge_t.
6770 (struct graph): Renamed from struct graph_s.
6771 (graph): Renamed from graph_t.
6772 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
6773 Rename value_t -> value.
6774 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
6775 value_t_as_yystype -> value_as_yystype.
6776
6777 Don't include <errno.h> in the mainstream code, since it
6778 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
6779 * lib/get-errno.c, lib/get-errno.h: New files.
6780 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
6781 get-errno.c.
6782 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
6783 * src/output.c (output_skeleton): Likewise.
6784 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
6785 instead of errno.
6786 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
6787 Likewise.
6788 (handle_action_dollar, handle_action_at): Likewise.
6789 * src/system.h: Do not include <errno.h>.
6790 (TAB_EXT): Renamed from EXT_TAB.
6791 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
6792
6793 Avoid str[a-z]*, since <string.h> reserves that name space.
6794 Change all instances of "struniq" in names to "uniqstr", and
6795 likewise for "STRUNIQ" and "UNIQSTR".
6796 * src/uniqstr.c: Renamed from src/struniq.c.
6797 * src/uniqstr.h: Renamed from src/struniq.h.
6798 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
6799 * src/files.c (strsuffix): Remove; unused.
6800 (concat2): Renamed from stringappend. Now static.
6801 * src/files.h (strsuffix, stringappend): Remove; unused.
6802 * src/parse-gram.y (<chars>): Renamed from <string>.
6803 (<uniqstr>): Renamed from <struniq>.
6804 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
6805 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
6806 (struct graph_s.expand): Renamed from struct graph_s.stretch.
6807 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
6808 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
6809 (N_EXPAND): Renamed from N_STRETCH.
6810
6811 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
6812 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
6813 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
6814 Remove; unused.
6815 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
6816 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
6817 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
6818 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
6819 (BASE_MAXIMUM): Renamed from BASE_MAX.
6820 (BASE_MINIMUM): Renamed from BASE_MIN.
6821 (ACTION_MAX): Remove; unused.
6822 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
6823 Unnecessary casts removed from above defines.
6824
6825
6826 Fix misspelling in names.
6827 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
6828 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
6829 G_NODE_ALIGNEMENT.
6830
6831
6832 * lib/timevar.c (timevar_report): Renamed from time_report,
6833 for consistency with other names.
6834 * lib/timevar.h (timevar_report): New decl.
6835 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
6836
6837
6838 Sort include-file uses.
6839
6840 Reorder all include files under src to be in the order "system.h".
6841 then the ../lib include files in angle brackets (alphabetized),
6842 then the . include files in double-quotes (alphabetized). Fix
6843 dependency breakages encountered in this process, as follows:
6844 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
6845 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
6846 * src/state.h: Include "symtab.h".
6847
996b1c7e
PE
68482002-12-08 Paul Eggert <eggert@twinsun.com>
6849
6850 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
6851 since this causes problems when __file__ contains character
6852 sequences like "@" that are treated specially by src/scan-skel.l.
6853 Instead, just use the file's basename. This fixes the bug
6854 reported by Martin Mokrejs in
161a71f3 6855 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 6856
e19c4e5d
PE
68572002-12-06 Paul Eggert <eggert@twinsun.com>
6858
6859 Add support for rules that do not have trailing semicolons, as
6860 POSIX requires. Improve the quality of locations in Bison
6861 diagnostics.
26b4a969 6862
e19c4e5d
PE
6863 * src/location.c: Include <quotearg.h>.
6864 (empty_location): Now const.
6865 (location_print): New function. Follow the recommendation of the
6866 GNU Coding Standards for locations that span file boundaries.
6867 * src/location.h: Do not include <quotearg.h>; no longer needed.
6868 (boundary): New type.
6869 (location_t): Use it. This allows locations to span file boundaries.
6870 All member uses changed: file -> start.file or end.file (as needed),
6871 first_line -> start.line, first_column -> start.column,
6872 last_line -> end.line, last_column -> end.column.
6873 (equal_boundaries): New function.
6874 (LOCATION_RESET, LOCATION_STEP): Remove.
6875 (LOCATION_PRINT): Remove. All callers changed to use location_print.
6876 (empty_location): Now const.
6877 (location_print): New decl.
6878 * src/parse-gram.y (lloc_default): New function, which handles
6879 empty locations more accurately.
6880 (YYLLOC_DEFAULT): Use it.
6881 (%token COLON): Remove.
6882 (%token ID_COLON): New token.
26b4a969 6883 (rules): Use it.
e19c4e5d
PE
6884 (declarations, rules): Remove trailing semicolon.
6885 (declaration, rules_or_grammar_declaration):
6886 Allow empty (";") declaration.
6887 (symbol_def): Remove empty actions; no longer needed.
6888 (rules_or_grammar_declaration): Remove trailing semicolon.
6889 (semi_colon.opt): Remove.
6890 * src/reader.h: Include location.h.
6891 (scanner_cursor): New decl.
6892 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
6893 rolling our own.
6894 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
6895 of *loc.
6896 (STEP): Remove. No longer needed, now that adjust_location does
6897 the work. All uses removed.
6898 (scanner_cursor): New var.
6899 (adjust_location): Renamed from extend_location. It now sets
6900 *loc and adjusts the scanner cursor. All uses changed.
6901 Don't bother testing for CR.
6902 (handle_syncline): Remove location arg; now updates scanner cursor.
6903 All callers changed.
6904 (unexpected_end_of_file): Now accepts start boundary of token or
6905 comment, not location. All callers changed. Update scanner cursor,
6906 not the location.
6907 (SC_AFTER_IDENTIFIER): New state.
6908 (context_state): Renamed from c_context. All uses changed.
6909 (id_loc, code_start, token_start): New local vars.
6910 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
6911 processing of Yacc white space and equivalents here.
6912 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
6913 instead of returning ID immediately, since we need to search for
6914 a subsequent colon.
6915 (<INITIAL>"'", "\""): Save token_start.
6916 (<INITIAL>"%{", "{", "%%"): Save code_start.
6917 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
6918 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
6919 BEGIN context_state at end, not INITIAL.
6920 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
6921 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
6922 Return correct token start.
6923 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
6924 the start of a character, string or multiline comment is found.
6925 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
6926 Reduction): Adjust reported locations to match the more-precise
6927 results now expected.
6928 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
6929 * tests/reduce.at (Useless Rules, Reduced Automaton,
6930 Underivable Rules): Likewise.
6931 * tests/regression.at (Invalid inputs): No longer `expecting ";"
6932 or "|"' now that so many other tokens are allowed by the new grammar.
6933
6934 * src/complain.h (current_file): Remove duplicate decl;
6935 current_file is now owned by files.h.
6936 * src/complain.c, src/scan-gram.l: Include files.h.
6937
69382002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 6939
e19c4e5d
PE
6940 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
6941 promotes to int; it might be unsigned int.
6942 * data/yacc.c (yy_reduce_print): Likewise.
6943
6944 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
6945 be #defined in the prologue, not in the Bison declarations.
6946 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 6947
b64755e3
PE
69482002-12-02 Paul Eggert <eggert@twinsun.com>
6949
6950 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
6951 * lib/strtoul.c: New file, from gnulib.
6952 This fixes a porting bug reported by Peter Klein in
161a71f3 6953 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 6954
6e746484
PE
69552002-11-30 Paul Eggert <eggert@twinsun.com>
6956
b64755e3
PE
6957 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
6958 and put only a forward declaration in the prologue. This is for
6959 consistency with the other scanner helper functions.
6960
6ba55592
PE
6961 Type clashes now generate warnings, not errors, since it
6962 appears that POSIX may allow some grammars with type clashes.
6963 * src/reader.c (grammar_current_rule_check): Warn about
6964 type clashes instead of complaining.
6965 * tests/input.at (Type Clashes): Expect warnings, not complaints.
6966
6e746484
PE
6967 Add Yacc library, since POSIX requires it.
6968 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
6969 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
6970 * lib/main.c, lib/yyerror.c: New files.
6971
6972 gram_error can be static; it need not be extern.
6973 * src/reader.h (gram_error): Remove decl.
6974 * src/parse-gram.y (gram_error): Now static. Add static decl.
6975 (print_token_value): Omit parameter names from forward decl,
6976 for consistency.
6977
88510f9c
PE
69782002-11-29 Paul Eggert <eggert@twinsun.com>
6979
6e746484
PE
6980 * doc/bison.texinfo: Emphasize that yylex and yyerror must
6981 be declared before being used. E.g., one should typically
6982 declare them in the prologue. Use GNU coding style in examples.
6983 Put "const" consistently after the type it modifies. Mention
6984 that C99 supports "inline". Mention that yyerror traditionally
6985 returns "int".
6986
88510f9c
PE
6987 %parse-param and %lex-param now take just one argument, the
6988 declaration; the argument name is deduced from the declaration.
6989
6990 * doc/bison.texinfo (Parser Function, Pure Calling, Error
6991 Reporting, Table of Symbols): Document this.
6992 * src/parse-gram.y (add_param): New function.
6993 (COMMA): Remove.
6994 (declaration): Implement new rule for %parse-param and %lex-param.
6995 * src/scan-gram.l: "," now elicits a warning, rather than being
6996 a token; this is more compatible with byacc.
6997 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
6998
bb92250c
PE
69992002-11-27 Paul Eggert <eggert@twinsun.com>
7000
7001 Rename identifiers to avoid real and potential collisions.
7002
7003 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
7004 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 7005 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
7006 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7007 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
7008 * src/parse-gram.y (print_token_value): Renamed from yyprint.
7009 All uses changed.
7010 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
7011 The name "yycontrol" violates the name space rules, and this stuff
7012 wasn't being used anyway.
7013 (input): Remove action; this stuff wasn't being used.
7014 (gram_error): Rename local variable yylloc -> loc.
7015 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
7016 (YY_DECL): Don't use "yy" at start of local variables.
7017 All uses changed, e.g., yylloc -> loc.
7018 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
7019 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
7020 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
7021 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
7022
7023 * src/parse-gram.y (gram_error): loc is now const *.
7024 * src/reader.h (gram_error): Likewise.
7025
3af4feb2
PE
70262002-11-24 Paul Eggert <eggert@twinsun.com>
7027
7028 Version 1.75c.
7029
7030 * tests/actions.at (Actions after errors): Use an output format
7031 more similar to that of the Printers and Destructors test.
7032 Test the position of the ';' token too.
7033 (Printers and Destructors): Likewise.
7034 (Printers and Destructors: %glr-parser): Remove for now, to avoid
7035 unnecessarily alarming people when the test fails.
7036
7037 * data/yacc.c (yyerrlab1): Move this label down, so that the
7038 parser does not discard the lookahead token if the user code
7039 invokes YYERROR. This change is required for POSIX conformance.
7040
7041 * lib/error.c: Sync with gnulib.
7042
70432002-11-22 Paul Eggert <eggert@twinsun.com>
7044
7045 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
7046 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
7047 * lib/xmalloc.c: Likewise.
26b4a969 7048
58004308
PE
70492002-11-20 Paul Eggert <eggert@twinsun.com>
7050
7051 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
7052
70532002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 7054
58004308
PE
7055 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
7056 should use `if (! x) abort ();' rather than `assert (x);', and
7057 anyway it's one less thing to worry about configuring.
7058
7059 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
7060 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
7061 and replace all instances of assert with abort.
7062 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
7063 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
7064
7065 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
7066 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
7067 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
7068 hash_find_entry, hash_rehash, hash_insert): Likewise.
7069 * src/conflicts.c (resolve_sr_conflict): Likewise.
7070 * src/lalr.c (set_goto_map, map_goto): Likewise.
7071 * src/nullable.c (nullable_compute): Likewise.
7072 * src/output.c (prepare_rules, token_definitions_output): Likewise.
7073 * src/reader.c (packgram, reader): Likewise.
7074 * src/state.c (state_new, state_free, state_transitions_set,
7075 state_reduction_find): Likewise.
7076 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
7077 symbol_pack): Likewise.
7078 * src/tables.c (conflict_row, pack_vector): Likewise.
7079 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7080 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7081 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
7082 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
7083
7084 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
7085 (ARGMATCH_CONSTRAINT): New macro.
7086 (ARGMATCH_ASSERT): Use it.
7087
7088 * src/system.h (verify): New macro.
7089 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
7090 rather than assert.
7091 * src/tables.c (tables_generate): Likewise.
7092
7093 * src/struniq.c (struniq_assert): Now returns void, and aborts
7094 if the assertion is false.
7095 (struniq_assert_p): Remove.
7096 * src/struniq.h: Likewise.
7097
76ae8198
PE
70982002-11-18 Paul Eggert <eggert@twinsun.com>
7099
7100 * data/glr.c (yygetLRActions): Replace `yyindex' with
7101 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
7102 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 7103 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 7104
d3c4e709
AD
71052002-11-18 Akim Demaille <akim@epita.fr>
7106
7107 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
7108 space.
7109 From Tim Van Holder.
7110
8d8a7238
PE
71112002-11-17 Paul Eggert <eggert@twinsun.com>
7112
7113 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
7114 to "SyntaxError" for consistency with my 2002-11-15 change.
7115
7116 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
7117 not define to {}, since this breaks the common use of `YYDPRINTF
7118 ((...));' if a single statement is desired (e.g. before `else').
7119 Work around GCC warnings by surrounding corresponding calls with
7120 {} if needed.
7121 (yyhasResolvedValue): Remove unused function.
7122 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
7123 loop body.
7124 (yyreportSyntaxError): Renamed from yyreportParseError.
7125 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
7126 All uses changed.
7127 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
7128 extern when possible. Remove unused initializations.
7129
b0937b22
AD
71302002-11-16 Akim Demaille <akim@epita.fr>
7131
7132 Augment the similarity between GLR and LALR traces.
7133
7134 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
7135 (YY_REDUCE_PRINT): New.
7136 (yyparse): Use them.
7137 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
7138 YYDPRINT here.
7139 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
7140 state reached after the reduction/recovery, since...
7141 (yyparse, yyprocessOneStack): Report the state we are entering in.
7142
c5e3e510
AD
71432002-11-16 Akim Demaille <akim@epita.fr>
7144
7145 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
7146 Add support for --trace=skeleton.
7147 * src/scan-skel.l: %option debug.
7148 Scan strings of non-@ or \n instead of character by character.
7149 (scan_skel): Handle trace_skeleton.
7150 (QPUTS): New.
7151 (@output_parser_name@, @output_header_name@): ``Restore'' their
7152 support (used to be M4 macros).
7153 * data/yacc.c: Quote larger chunks, a la glr.c.
7154 * data/lalr1.cc: Likewise.
7155 The header guards are no longer available, so use some other
7156 string than `YYLSP_NEEDED'.
7157
4c6cc1db
AD
71582002-11-16 Akim Demaille <akim@epita.fr>
7159
7160 Make the ``Printers and Destructors'' test more verbose, taking
7161 `yacc.c''s behavior as (possibly wrong) reference.
7162
7163 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
7164 instead of fprint on stdout.
7165 Set and report the last_line of the symbols.
7166 Consistently display values and locations.
7167
6d9e8019
PE
71682002-11-16 Paul Eggert <eggert@twinsun.com>
7169
7170 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
7171
6e649e65
PE
71722002-11-15 Paul Eggert <eggert@twinsun.com>
7173
b25d88f6
PE
7174 * tests/actions.at (Actions after errors): New test case.
7175
6e649e65
PE
7176 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
7177 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
7178 tests/action.at, tests/calc.at, tests/conflicts.at,
7179 tests/cxx-type.at, tests/regression.at:
7180 "parse error" -> "syntax error" for POSIX compatibility.
7181 "parsing stack overflow..." -> "parser stack overflow" so
7182 that code matches Bison documentation.
7183
0f39aab9
AD
71842002-11-15 Akim Demaille <akim@epita.fr>
7185
7186 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
7187 take two BRACED_CODE, not two string_content.
7188 Free the scanner's obstack when we are done.
7189 (code_content): New.
7190 * tests/calc.at: Adjust.
7191 * doc/bison.texinfo: Adjust.
7192 Also, make sure to include the `,' for these declarations.
7193
761c1926
AD
71942002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
7195
7196 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
7197 definition; avoids potential autoreconf problems.
7198
b0f98b10
AD
71992002-11-15 Akim Demaille <akim@epita.fr>
7200
7201 Always check the value returned by yyparse.
7202
7203 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
7204 returned by yyparse.
7205 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
7206 Adjust calls.
7207 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
7208 returned by yyparse.
7209
970785f1
PH
72102002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7211
7212 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
7213 on input.at test.
7214
8fcc7db1
PE
72152002-11-14 Paul Eggert <eggert@twinsun.com>
7216
7ec1b48e
PE
7217 * src/output.c (output_skeleton): Call xfopen instead of
7218 duplicating xfopen's body.
7219
cfff7583 7220 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 7221 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 7222
8fcc7db1
PE
7223 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
7224 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
7225 Group compiler. Instead, use "$CC -E bar.c". Include the .h
7226 file twice in the grammar, as an extra check.
7227
7228 * tests/input.at (Torturing the Scanner): Surround the
7229 backslash-newline tests with "#if 0", to make it less likely that
7230 we'll run into compiler bugs. Bring back solitary \ inside
7231 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 7232 test backslash-newline in C character constant.
8fcc7db1 7233
4e8d992c
AD
72342002-11-14 Akim Demaille <akim@epita.fr>
7235
7236 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
7237 status of the compiler.
f32b346d 7238 Calling `exit 1' is no longer needed.
4e8d992c
AD
7239 Reported by Nelson H. F. Beebe.
7240
9501dc6e
AD
72412002-11-14 Akim Demaille <akim@epita.fr>
7242
7243 * tests/atlocal.in (CPPFLAGS): We have config.h.
7244 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
7245 New.
7246 * tests/actions.at, tests/calc.at, tests/conflicts.at,
7247 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
7248 * tests/regression.at, tests/torture.at: Use them for all the
7249 grammars that are to be compiled.
7250 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
7251 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
7252 * doc/bison.texinfo (GLR Parsers): Document `inline'.
7253
18b519c0
AD
72542002-11-14 Akim Demaille <akim@epita.fr>
7255
7256 * doc/bison.texinfo: Various formatting changes (alignments in
7257 samples, additional @group/@end group, GCS in samples.
7258 Use @deffn instead of simple @table to define the directives,
7259 macros, variables etc.
7260
9a86cdb9
PE
72612002-11-13 Paul Eggert <eggert@twinsun.com>
7262
daa33def 7263 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 7264 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 7265
daa33def 7266 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 7267 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
7268 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
7269 * tests/headers.at (export YYLTYPE): Likewise.
7270
7271 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 7272 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 7273
9a86cdb9
PE
7274 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
7275 comments, since they're not portable. Use GNU coding style.
7276
9c1e26bd
AD
72772002-11-13 Akim Demaille <akim@epita.fr>
7278
7279 * data/yacc.c: Leave bigger chunks of quoted text.
7280 (YYDSYMPRINTF): New.
7281 Use it to report symbol activities.
7282 * data/glr.c (YYDSYMPRINTF): New.
7283 Use it.
7284
87f721cc
PE
72852002-11-12 Paul Eggert <eggert@twinsun.com>
7286
7287 Version 1.75b.
7288
7289 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
7290 (yyglrReduce): Return yyok, not 0.
7291 This should avoid the enumerated-type warnings reported
464c6927 7292 by Nelson H. F. Beebe in
161a71f3 7293 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
7294
7295 * lib/bbitset.h (BITSET_INLINE): Remove.
7296 * lib/bitset.h [! BITSET_INLINE]: Remove.
7297 (bitset_set, bitset_reset, bitset_test): Rename local vars
7298 to avoid shadowing warnings by GCC.
7299
7300 * data/glr.c (inline): Remove #define. It's the user's
7301 responsibility to #define it away, just like 'const'.
464c6927 7302 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 7303 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 7304
87f721cc
PE
7305 * Makefile.maint (po-check): Scan .l and .y files instead of the
7306 .c and the .h files that they generate. This fixes the bug
7307 reported by Tim Van Holder in:
161a71f3 7308 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
7309 Look for N_ as well as for _. Try to avoid matching #define for
7310 N_ and _.
7311 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
7312 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
7313 * src/scan-gram.l: Revamp regular expressions so that " and '
7314 do not confuse xgettext.
7315
7316 * src/struniq.h (struniq_new): Do not declare the return type
7317 to be 'const'; this violates the C standard.
7318 * src/struniq.c (struniq_new): Likewise.
7319
be14ade5
AD
73202002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
7321
7322 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
7323 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
7324 linker.
7325
05291fbc
AD
73262002-11-12 Akim Demaille <akim@epita.fr>
7327
7328 * Makefile.maint: Sync with Autoconf:
7329 (local_updates): New.
7330
1f5fd52e
AD
73312002-11-12 Akim Demaille <akim@epita.fr>
7332
7333 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
7334
283f1e64
AD
73352002-11-12 Akim Demaille <akim@epita.fr>
7336
7337 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
7338 locations.
7339
886b69d1
AD
73402002-11-12 Akim Demaille <akim@epita.fr>
7341
7342 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
7343 not yyvalue.
7344
3df37415
AD
73452002-11-12 Akim Demaille <akim@epita.fr>
7346
7347 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
7348 Use it to test the GLR parser.
7349
7bd6c77e
AD
73502002-11-12 Akim Demaille <akim@epita.fr>
7351
7352 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
7353 defines it.
7354 * data/glr.c (yystos): New.
7355 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
7356 (YYDSYMPRINT): New.
7357 (yyval): Don't define it, it is handled via M4.
7358 (yyrecoverParseError): Free verbosely the discarded symbols.
7359 * data/yacc.c (yysymprint): Remove, rather...
7360 (b4_yysymprint_generate): invoke.
7361 * data/c.m4 (b4_yysymprint_generate): New.
7362 Accept pointers as arguments, as opposed to the version from
7363 yacc.c.
7364 (b4_yydestruct_generate): Likewise.
7365 * tests/cations.at (Printers and Destructors): Use Bison directives
7366 instead of CPP macros.
7367 Don't rely on internal details.
7368
b0400cc6
AD
73692002-11-12 Akim Demaille <akim@epita.fr>
7370
7371 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
7372 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
7373 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
7374 it against YYEMPTY and so forth), work on yytoken (i.e., set
7375 it to YYEMPTY etc.).
7376 (yydestruct): Replace with a b4_yydestruct_generate invocation.
7377 (b4_symbol_actions): Remove.
7378 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
7379 for 0, end-of-input.
7380
72f889cc
AD
73812002-11-12 Akim Demaille <akim@epita.fr>
7382
7383 * doc/bison.texinfo (Destructor Decl): New.
7384
b1ae9233
AD
73852002-11-12 Akim Demaille <akim@epita.fr>
7386
7387 * src/tables.c (tables_generate): Use free for pointers that
7388 cannot be NULL, not XFREE.
7389 (pack_vector): Use assert, not fatal, for bound violations.
7390 * src/state.c (state_new): Likewise.
7391 * src/reader.c (reader): Likewise.
7392 * src/lalr.c (set_goto_map): Likewise.
72f889cc 7393 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
7394 the file name.
7395
7ec2d4cd
AD
73962002-11-12 Akim Demaille <akim@epita.fr>
7397
7398 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
7399 Restore.
7400 * src/scan-gram.l (last_string): Is global to the file, not to
7401 yylex.
7402 * src/parse-gram.y (input): Don't append the epilogue here,
7403 (epilogue.opt): do it here, and free the scanner's obstack.
7404 * src/reader.c (epilogue_set): Rename as...
7405 (epilogue_augment): this.
7406 * data/c.m4 (b4_epilogue): Defaults to empty.
7407
573a6cd3
AD
74082002-11-12 Akim Demaille <akim@epita.fr>
7409
7410 * src/getargs.c (long_options): Remove duplicates.
7411 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
7412 Remove.
7413 * doc/bison.rnh: Remove.
7414 * doc/bison.texinfo (VMS Invocation): Remove.
7415
95612cfa
AD
74162002-11-12 Akim Demaille <akim@epita.fr>
7417
7418 * src/struniq.h, src/struniq.c (struniq_t): Is const.
7419 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
7420
7421 Use struniq for symbols.
7422
7423 * src/symtab.h (symbol_t): The tag member is a struniq.
7424 (symbol_type_set): Adjust.
7425 * src/symtab.c (symbol_new): Takes a struniq.
7426 (symbol_free): Don't free the tag member.
7427 (hash_compare_symbol_t, hash_symbol_t): Rename as...
7428 (hash_compare_symbol, hash_symbol): these.
7429 Use the fact that tags as struniqs.
7430 (symbol_get): Use struniq_new.
7431 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
7432 Returns a strniq.
7433 * src/reader.h (merger_list, grammar_currentmerge_set): The name
7434 and type members are struniqs.
7435 * src/reader.c (get_merge_function)
7436 (grammar_current_rule_merge_set): Adjust.
7437 (TYPE, current_type): Are struniq.
7438
7439 Use struniq for file names.
7440
7441 * src/files.h, src/files.c (infile): Split into...
7442 (grammar_file, current_file): these.
7443 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
7444 * src/reduce.c (reduce_print): Likewise.
7445 * src/getargs.c (getargs): Likewise.
7446 * src/complain.h, src/complain.c: Likewise.
7447 * src/main.c (main): Call struniqs_new early enough to use it for
7448 file names.
7449 Don't free the input file name.
7450
3e6656f9
AD
74512002-11-12 Akim Demaille <akim@epita.fr>
7452
7453 * src/symtab.c (symbol_free): Remove dead deactivated code:
7454 type_name are properly removed.
7455 Don't use XFREE to free items that cannot be NULL.
7456 * src/struniq.h, src/struniq.c: New.
7457 * src/main.c (main): Initialize/free struniqs.
7458 * src/parse-gram.y (%union): Add astruniq member.
7459 (yyprint): Adjust.
7460 * src/scan-gram.l (<{tag}>): Return a struniq.
7461 Free the obstack bit that used to store it.
7462 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
7463
7672019c
PE
74642002-11-11 Paul Eggert <eggert@twinsun.com>
7465
7466 Revamp to fix many (but not all) of the C- and M4-related quoting
7467 problems. Among other things, this fixes the Bison bug reported
7468 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 7469 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
7470
7471 Use new @ escapes consistently. Represent brackets with @{ and @}
7472 rather than @<:@ and @:>@, since this works a bit better with dumb
7473 editors like vi. Represent @ with @@, since @ is now consistently
7474 an escape. Use @oline@ and @ofile@ rather than __oline__ and
7475 __ofile__, to avoid unexpected expansions. Similarly, use @output
7476 rather than #output.
7477
7478 * data/c.m4 (b4_copyright): Omit file name from comment, since
7479 the file name could contain "*/".
7480 (b4_synclines_flag): Don't quote the 2nd argument; it should already
7481 be quoted. All uses changed.
7482
7483 * data/glr.c: Use new @ escapes consistently.
7484 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
7485 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
7486 Remove, since they couldn't handle arbitrary characters in file
7487 names.
7488 * data/lalr1.cc: Likewise.
7489 * data/yacc.c: Likewise.
7490
7491 * src/files.c (output_infix): Remove; all uses removed.
7492 * src/files.h: Likewise.
7493
7494 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
7495 mishandled funny characters in file names, and anyway it isn't
7496 needed any more.
7497 * data/yacc.c: Likewise.
7498 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
7499
7500 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
7501 * data/yacc.c: Likewise.
7502
7503 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
7504 strings now.
7505 (muscle_init): Quote filename as a C string.
7506 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
7507 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
7508 * src/output.c (escaped_file_name_output): New function.
7509 (prepare_symbols): Quote tokens for M4.
7510 (prepare): Don't insert output_infix, output_prefix,
7511 output_parser_name, output_header_name; this is now down by scan-skel.
7512 Insert skeleton as a C string.
7513
7514 * src/output.c (user_actions_output, symbol_destructors_output,
7515 symbol_printers_output): Quote filenames for C and M4.
7516 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7517
7518 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
7519 escapes other than \\ and \'; this simplifies the code.
7520 (<SC_STRING>): Likewise, for \\ and \".
7521 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
7522 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
7523 Use new escapes @{ and @} for [ and ].
7524
7525 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
7526 them with auto vars.
7527 Switch to new escape scheme, where @ is the escape character uniformly.
7528 Abort if a stray escape character is found. Avoid unbounded input
7529 buffer when parsing non-escaped text.
7530
7531 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
7532 __oline__, #output, $@, and @{ do not have unintended meanings.
7533
acea4f3b
PE
75342002-11-09 Paul Eggert <eggert@twinsun.com>
7535
7536 Fix the test failure due to GCC warnings described in
161a71f3 7537 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
7538 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
7539 evaluate to 0 if it's impossible for NINF to be in the respective
7540 table.
7541 (yygetLRActions, yyrecoverParseError): Use them.
7542
7543 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
7544 counted in the token inserted at end of file. Now takes
7545 location_t *, not location_t, so that the location can be
7546 adjusted. All uses changed.
7547
7548 * tests/regression.at (Invalid inputs): Adjust wording in
7549 diagnostic to match the new behavior.
7550
7551 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
7552 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
7553 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
7554 abort ();'. This reduces the runtime of the "Many lookaheads"
7555 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
7556 GCC 3.2.
7557
20ef1ad5
PE
75582002-11-07 Paul Eggert <eggert@twinsun.com>
7559
7560 * src/parse-gram.y (CHARACTER): Remove unused token.
7561 All uses removed.
7562
7563 * src/scan-gram.l: Remove stack option. We no longer use the
7564 stack, since the stack was never deeper than 1; instead, use the
7565 new auto var c_context to record the stacked value.
7566
7567 Remove nounput option. At an unexpected end of file, we now unput
7568 the minimal input necessary to end cleanly; this simplifies the
7569 code.
7570
7571 Avoid unbounded token sizes where this is easy.
7572
7573 (unexpected_end_of_file): New function.
7574 Use it to systematize the error message on unexpected EOF.
7575 (last-string): Now auto, not static.
7576 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
7577 (scanner_last_string_free): Remove; not used.
7578 (percent_percent_count): Move decl to just before use.
7579 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
7580 not the (never otherwised-used) CHARACTER.
7581
93724f13
AD
75822002-11-07 Akim Demaille <akim@epita.fr>
7583
7584 Let yyerror always receive the msg as last argument, so that
7585 yyerror can be variadic.
7586
7587 * data/yacc.c (b4_yyerror_args): New.
7588 Use it when calling yyerror.
7589 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
7590 Use it when calling yyerror.
7591 * doc/bison.texinfo (Error Reporting): Adjust.
7592 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
7593 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
7594
6e40b4eb
AD
75952002-11-06 Akim Demaille <akim@epita.fr>
7596
7597 #line should have quoted strings.
7598 Ideally, this should be done by m4_quotearg.
7599
7600 * src/scan-skel.l: Include quotearg.h.
7601 Quote __ofile__.
7602 * src/output.c (symbol_printers_output)
7603 (symbol_destructors_output): Quote the file name.
7604
2dfbfc12
AD
76052002-11-06 Akim Demaille <akim@epita.fr>
7606
7607 * tests/regression.at (Invalid inputs): Adjust to the recent
7608 messages.
7609
437c2d80
AD
76102002-11-06 Akim Demaille <akim@epita.fr>
7611
7612 Restore --no-lines.
7613 Reported by Jim Kent.
7614
7615 * data/c.m4 (b4_syncline): New.
7616 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
7617 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
7618 * src/output.c (user_actions_output): Likewise.
7619 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 7620 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 7621
900c5db5
AD
76222002-11-06 Akim Demaille <akim@epita.fr>
7623
7624 * src/main.c (main): Free `infile'.
7625 * src/scan-gram.l (handle_syncline): New.
7626 Recognize `#line'.
7627 * src/output.c (user_actions_output, symbol_destructors_output)
7628 (symbol_printers_output): Use the location's file name, not
7629 infile.
7630 * src/reader.c (prologue_augment, epilogue_set): Likewise.
7631
e183b123 76322002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 7633
e183b123 7634 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 7635 either has GLR conflict entries.
e183b123 7636
193eb6b7
PE
76372002-11-05 Paul Eggert <eggert@twinsun.com>
7638
e183b123
PE
7639 * src/scan-gram.l: Use more accurate diagnostics, e.g.
7640 "integer out of range" rather than "invalid value".
7641 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
7642 accordingly.
7643
193eb6b7
PE
7644 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
7645 Also, remove one static variable in the scanner.
7646
7647 * src/scan-gram.l (braces_level): Now auto, not static.
7648 Initialize to zero if the compiler is being picky.
7649 (INITIAL): Clear braces_level instead of incrementing it.
7650 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
7651 as POSIX 1003.1-2001 requires.
7652 * src/system.h (IF_LINT): New macro, taken from coreutils.
7653 * configure.ac: Define "lint" if --enable-gcc-warnings.
7654
29c01725
AD
76552002-11-05 Akim Demaille <akim@epita.fr>
7656
7657 * src/scan-gram.l: When it starts with `%', complain about the
7658 whole directive, not just that `invalid character: %'.
7659
8aeac3ca
AD
76602002-11-04 Akim Demaille <akim@epita.fr>
7661
7662 * Makefile.maint: Update from Autoconf.
7663 (update, cvs-update, po-update, do-po-update): New.
7664
793a58bb
AD
76652002-11-04 Akim Demaille <akim@epita.fr>
7666
7667 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
7668 and yyerror.
7669 Have yyerror `use' its arguments.
7670 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
7671 returns true when location & yacc & pure & parse-param.
7672 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
7673
c4d720cd
AD
76742002-11-04 Akim Demaille <akim@epita.fr>
7675
7676 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
7677 clashes.
7678 * src/scan-gram.l: Use [\'] instead of ['] to pacify
7679 font-lock-mode.
7680 Use complain_at.
7681 Use quote, not quote_n since LOCATION_PRINT no longer uses the
7682 slot 0.
7683
613a0dc5
PE
76842002-11-03 Paul Eggert <eggert@twinsun.com>
7685
7686 * src/reader.c (get_merge_function, grammar_current_rule_check):
7687 Use consistent diagnostics for reporting type name clashes.
7688 Quote the types with <>, for consistency with Yacc.
7689 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
7690
2a8d363a
AD
76912002-11-03 Akim Demaille <akim@epita.fr>
7692
7693 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
7694 New.
7695 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
7696 (b4_parse_param): Remove.
7697 Use b4_identification.
7698 Propagate b4_pure_args where needed to pass them to yyerror.
7699 * data/glr.m4 (b4_parse_param): Remove.
7700 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
7701 (b4_lpure_formals): New.
7702 Use b4_identification.
7703 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
7704 b4_user_formals and b4_user_args.
7705 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
7706 (yyreportAmbiguity): When using a pure parser, also need
7707 the location, and the parse-params.
7708 Adjust callers.
7709 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
7710 When using a pure parser, also need the parse-params.
7711 Adjust callers.
7712 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
7713 (%pure-parser + %parse-param) LALR and GLR parsers.
7714 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
7715 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
7716 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
7717 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
7718 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
7719 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
7720 * doc/bison.texinfo: Untabify the whole file.
7721 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
7722 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
7723 (Error Reporting): Adjust to these new directives.
7724 Document %error-verbose, deprecate YYERROR_VERBOSE.
7725
9e32add8
AD
77262002-11-03 Akim Demaille <akim@epita.fr>
7727
7728 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
7729 AT_CHECK_CALC_GLR invocations to use % directives, instead of
7730 command line options.
7731 * tests/cxx-type.at: Formatting changes.
7732
b02d90a5
PE
77332002-11-03 Paul Eggert <eggert@twinsun.com>
7734
7735 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
7736 to count columns correctly, and to check for invalid inputs.
9e32add8 7737
b02d90a5
PE
7738 Use mbsnwidth to count columns correctly. Account for tabs, too.
7739 Include mbswidth.h.
7740 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
7741 (extend_location): New function.
7742 (YY_LINES): Remove.
7743
7744 Handle CRLF in C code rather than in Lex code.
7745 (YY_INPUT): New macro.
7746 (no_cr_read): New function.
7747
7748 Scan UCNs, even though we don't fully handle them yet.
7749 (convert_ucn_to_byte): New function.
7750
7751 Handle backslash-newline correctly in C code.
7752 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
7753 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
7754 all uses changed.
7755 (tag, splice): New EREs. Do not allow NUL or newline in tags.
7756 Use {splice} wherever C allows backslash-newline.
7757 YY_STEP after space, newline, vertical-tab.
7758 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 7759
b02d90a5
PE
7760 (letter, id): Don't assume ASCII; e.g., spell out a-z.
7761
7762 ({int}, handle_action_dollar, handle_action_at): Check for integer
7763 overflow.
9e32add8 7764
b02d90a5
PE
7765 (YY_STEP): Omit trailing semicolon, so that it's more like C.
7766
7767 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
7768 as well as \000. Check for UCHAR_MAX, not 255.
7769 Allow \x with an arbitrary positive number of digits, as in C.
7770 Check for overflow here.
7771 Allow \? and UCNs, for compatibility with C.
7772
7773 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
7774 with quote slot used by complain_at.
7775
7776 * tests/input.at: Add tests for backslash-newline, m4 quotes
7777 in symbols, long literals, and funny escapes in strings.
7778
7779 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
7780 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
7781 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
7782 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
7783 * m4/mbswidth.m4: New file, from GNU coreutils.
7784
7785 * doc/bison.texinfo (Grammar Outline): Document // comments.
7786 (Symbols): Document that trigraphs have no special meaning in Bison,
7787 nor is backslash-newline allowed.
7788 (Actions): Document that trigraphs have no special meaning.
7789
7790 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
7791 no longer used.
7792
77932002-11-02 Paul Eggert <eggert@twinsun.com>
7794
7795 * src/reader.c: Don't include quote.h; not needed.
7796 (get_merge_function): Reword warning to be consistent with
7797 type clash diagnostic in grammar_current_rule_check.
7798
7799 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
7800 bug in trigraph handling.
7801
7802 * src/output.c (prepare_symbols): When printing token names,
7803 escape "[" as "@<:@" and likewise for "]".
7804
7805 * src/system.h (errno): Remove declaration, as we are now
7806 assuming C89 or better, and C89 guarantees errno.
7807
762b212b
PE
78082002-10-30 Paul Eggert <eggert@twinsun.com>
7809
7810 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
7811 Check for close failures.
7812 * src/files.h (xfclose): Return void, not int, since it always
7813 returned zero.
7814 * src/files.c (xfclose): Likewise. Report I/O error if ferror
7815 indicates one.
7816 * src/output.c (output_skeleton): Use xfclose rather than fclose
7817 and ferror. xfclose now checks ferror.
7818
7819 * data/glr.c (YYLEFTMOST_STATE): Remove.
7820 (yyreportTree): Use a stack-based leftmost state. This avoids
7821 our continuing battles with bogus warnings about initializers.
7822
56100c60
AD
78232002-10-30 Akim Demaille <akim@epita.fr>
7824
7825 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
7826 #if.
7827
51b4a04c
PH
78282002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7829
7830 * tests/glr-regr1.at: New test for reported regressions.
7831 * tests/testsuite.at: Add glr-regr1.at test.
7832 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 7833
bf1ebda2
PE
78342002-10-24 Paul Eggert <eggert@twinsun.com>
7835
5c16c6b1
PE
7836 Version 1.75a.
7837
bf1ebda2
PE
7838 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
7839 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
7840 we use malloc. Don't assume 'A' through 'Z' are contiguous.
7841 Don't assume strdup exists; POSIX says its an XSI extension.
7842 Check for buffer overflow on input.
7843
b526ee61
AD
78442002-10-24 Akim Demaille <akim@epita.fr>
7845
7846 * src/output.c (output_skeleton): Don't disable M4sugar comments
7847 too soon: it results in comments being expanded.
7848 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
7849 first output.
7850
f1886bb2
AD
78512002-10-24 Akim Demaille <akim@epita.fr>
7852
7853 * data/yacc.c (m4_int_type): New.
7854 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
7855 char' as only yacc.c wants K&R portability.
7856 * data/glr.c (yysigned_char): Remove.
7857 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
7858 Reported by Quoc Peyrot.
7859
c5576256
PE
78602002-10-23 Paul Eggert <eggert@twinsun.com>
7861
7862 * src/main.c (main): With --trace=time, report times even if a
7863 non-fatal error occurs. Formerly, the times were reported in some
7864 such cases but not in others.
7865 * src/reader.c (reader): Just return if a complaint has been issued,
7866 instead of exiting, so that 'main' can report times.
7867
27b0ffea
AD
78682002-10-22 Akim Demaille <akim@epita.fr>
7869
7870 * src/system.h: Include sys/types.
7871 Reported by Bert Deknuydt.
7872
223a7883
PE
78732002-10-23 Paul Eggert <eggert@twinsun.com>
7874
7875 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
7876 Suggested by Art Haas.
7877
78782002-10-22 Paul Eggert <eggert@twinsun.com>
7879
7880 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
7881 decl; not needed any more.
7882 * src/main.c (main): Use return to exit, undoing yesterday's change.
7883 The last OS that we could find where this wouldn't work is
7884 SunOS 3.5, and that's too old to worry about now.
7885
7886 * data/glr.c (struct yyltype): Define members even when not
7887 doing locations. This is more consistent with yacc.c, and it
7888 works around the following bug reports:
161a71f3
PE
7889 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
7890 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 7891
223a7883
PE
7892 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
7893 @acronym consistently. Standardize on "Yacc" instead of "YACC",
7894 "Algol" instead of "ALGOL". Give a bit more history about BNF.
7895
8b76775a
AD
78962002-10-22 Akim Demaille <akim@epita.fr>
7897
7898 * data/README: New.
7899
6db10d14
PE
79002002-10-21 Paul Eggert <eggert@twinsun.com>
7901
7902 Be consistent about 'bool'; the old code used an enum in one
7903 module and an int in another, and this violates the C standard.
7904 * m4/stdbool.m4: New file, from coreutils 4.5.3.
7905 * configure.ac (AC_HEADER_STDBOOL): Add.
7906 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
7907 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
7908 * src/symtab.c (hash_compare_symbol_t): Likewise.
7909 * src/system.h (bool, false, true): Use a definition consistent
7910 with ../lib/hash.c. All uses changed.
7911
7912 * src/complain.c (warning_issued): Renamed from warn_message_count,
7913 so that we needn't worry about integer overflow (!).
7914 Now of type bool. All uses changed.
7915 (complaint_issued): Renamed from complain_message_count; likewise.
7916
7917 * src/main.c (main): Use exit to exit with failure.
27b0ffea 7918
6db10d14
PE
7919 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
7920 rather than 1 and 0.
7921 * src/main.c (main): Likewise.
7922 * src/getargs.c (getargs): Likewise.
7923 * src/reader.c (reader): Likewise.
7924
7925 * src/getarg.c (getargs): Remove duplicate code for
7926 "Try `bison --help'".
7927
7928 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
7929 What was that "2" for?
7930
7931 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
7932 * src/getargs.c (usage): Likewise.
7933
7934 * src/getargs.c (getargs): When there are too few operands, report
7935 the last one. When there are too many, report the first extra
7936 one. This is how diffutils does it.
7937
92a060fd
PE
79382002-10-20 Paul Eggert <eggert@twinsun.com>
7939
7940 Remove K&R vestiges.
7941 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
7942 * src/complain.c (VA_START): Remove. Assume prototypes.
7943 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
7944 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
7945 fatal): Assume prototypes.
7946 * src/complain.h: Assume prototypes.
7947 * src/system.h (PARAMS): Remove.
7948 Include <limits.h> unconditionally, since it's guaranteeed even
7949 for a freestanding C89 compiler.
7950 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
7951 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 7952
e7cb57c0
AD
79532002-10-20 Akim Demaille <akim@epita.fr>
7954
7955 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
7956 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
7957 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
7958 (yyresolveStates, yyresolveAction, yyresolveStack)
7959 (yyprocessOneStack): Use them.
7960 (yy_reduce_print): New.
7961 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
7962
0245f82d
AD
79632002-10-20 Akim Demaille <akim@epita.fr>
7964
7965 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
7966 arguments and output `void'.
7967 (b4_c_function): Rename as...
7968 (b4_c_function_def): this.
7969 (b4_c_function_decl, b4_c_ansi_function_def)
7970 (b4_c_ansi_function_decl): New.
7971 Change the interpretation of the arguments: before `int, foo', now
7972 `int foo, foo'.
7973 * data/yacc.c (yyparse): Prototype and define thanks to these.
7974 Adjust b4_c_function_def uses.
7975 * data/glr.c (yyparse): Likewise, but ANSI only.
7976
39912f52
AD
79772002-10-20 Akim Demaille <akim@epita.fr>
7978
7979 * src/output.c (prepare): Move the definition of `tokens_number',
7980 `nterms_number', `undef_token_number', `user_token_number_max'
7981 to...
7982 (prepare_tokens): Here.
7983 (prepare_tokens): Rename as...
7984 (prepare_symbols): this.
7985 (prepare): Move the definition of `rules_number' to...
7986 (prepare_rules): here.
7987 (prepare): Move the definition of `last', `final_state_number',
7988 `states_number' to...
7989 (prepare_states): here.
7990 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
7991
20c1e2ad
AD
79922002-10-20 Akim Demaille <akim@epita.fr>
7993
7994 * src/tables.h, src/tables.c, src/output.c: Comment changes.
7995
21964f43
AD
79962002-10-20 Akim Demaille <akim@epita.fr>
7997
7998 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
7999 * data/c.m4: here.
8000
66d30cd4
AD
80012002-10-20 Akim Demaille <akim@epita.fr>
8002
8003 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
8004 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
8005 `pair'.
8006 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
8007 `name' to...
8008 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
8009 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
8010 These.
8011
95f2c9fe
PE
80122002-10-19 Paul Eggert <eggert@twinsun.com>
8013
8014 Do not create a temporary file, as that involves security and
8015 cleanup headaches. Instead, use a pair of pipes.
8016 Derived from a suggestion by Florian Krohm.
8017 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
8018 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
8019 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
8020 (BISON_PREREQ_SUBPIPE): Add.
8021 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
8022 Add subpipe.h, subpipe.c.
8023 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
8024 * po/POTFILES.in: Add lib/subpipe.c.
8025 * src/output.c: Include "subpipe.h".
8026 (m4_invoke): Remove decl.
8027 (scan_skel): New decl.
8028 (output_skeleton): Use pipe rather than temporary file for m4 input.
8029 Check that m4sugar.m4 is readable, to avoid deadlock.
8030 Check for pipe I/O error.
8031 * src/scan-skel.l (readpipe): Remove decl.
8032 (scan_skel): New function, to be used in place of m4_invoke.
8033 Read from stream rather than file.
66d30cd4 8034
95f2c9fe
PE
8035 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
8036 float, as this generates a warning on Solaris 8 + GCC 3.2 with
8037 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
8038 this generates a more-accurate value anyway.
8039
8040 * lib/timevar.c (timervar_accumulate): Rename locals to
8041 avoid confusion with similarly-named more-global.
8042 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
8043
8044 * src/output.c (prepare): Use xstrdup to convert char const *
8045 to char *, to avoid GCC warning.
8046
c19988b7
AD
80472002-10-19 Akim Demaille <akim@epita.fr>
8048
8049 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
8050 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
8051 Use them to have `calc.y' ready for %pure-parser.
8052 * data/yacc.c (YYLEX): Pass a yylex return type to
8053 b4_c_function_call.
8054
ae7453f2
AD
80552002-10-19 Akim Demaille <akim@epita.fr>
8056
8057 Prototype support of %lex-param and %parse-param.
8058
8059 * src/parse-gram.y: Add the definition of the %lex-param and
8060 %parse-param tokens, plus their rules.
8061 Drop the `_' version of %glr-parser.
8062 Add the "," token.
8063 * src/scan-gram.l (INITIAL): Scan them.
8064 * src/muscle_tab.c: Comment changes.
8065 (muscle_insert, muscle_find): Rename `pair' as `probe'.
8066 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
8067 (muscle_entry_s): The `value' member is no longer const.
8068 Adjust all dependencies.
8069 * src/muscle_tab.c (muscle_init): Adjust: use
8070 MUSCLE_INSERT_STRING.
8071 Initialize the obstack earlier.
8072 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
8073 (muscle_pair_list_grow): New.
8074 * data/c.m4 (b4_c_function_call, b4_c_args): New.
8075 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
8076 * tests/calc.at: Use %locations, not --locations.
8077 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
8078
0e575721
AD
80792002-10-19 Akim Demaille <akim@epita.fr>
8080
8081 * src/getargs.c (usage): Take status as argument and exit
8082 accordingly.
8083 Report the traditional `Try ... --help' message when status != 0.
8084 (usage, version): Don't take a FILE * as arg, it is pointless.
8085 (getargs): When there is an incorrect number of arguments, make it
8086 an error, and report it GNUlically thanks to `usage ()'.
8087
724ce7f5
PE
80882002-10-18 Paul Eggert <eggert@twinsun.com>
8089
3a781eb2
PE
8090 * data/glr.c (yyreportParseError): Don't assume that sprintf
8091 yields the length of the printed string, as this is not true
8092 on SunOS 4.1.4. Reported by Peter Klein.
8093
724ce7f5
PE
8094 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
8095 * tests/conflicts.at (%nonassoc and eof): Likewise.
8096 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
8097
473d0a75
AD
80982002-10-17 Akim Demaille <akim@epita.fr>
8099
8100 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
8101 * src/getargs.c (trace_types, trace_args): Adjust.
8102 * src/reader.c (grammar_current_rule_prec_set)
8103 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
8104 Standardize error messages.
8105 And s/@prec/%prec/!
8106 (reader): Use trace_flag to enable scanner/parser debugging,
8107 instead of an adhoc scheme.
8108 * src/scan-gram.l: Remove trailing debugging code.
8109
e76d2469
PE
81102002-10-16 Paul Eggert <eggert@twinsun.com>
8111
93e2236a
PE
8112 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
8113 MUSCLE_TAB_H.
8114
e76d2469
PE
8115 * NEWS: Officially drop support for building Bison with K&R C,
8116 since it didn't work anyway and it's not worth worrying about.
8117 * Makefile.maint (wget_files): Remove ansi2knr.c.
8118 (ansi2knr.c-url_prefix): Remove.
8119 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
8120 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8121 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8122
5bd1c419
PE
81232002-10-15 Paul Eggert <eggert@twinsun.com>
8124
8125 Stop using the "enum_" trick for K&R-style function definitions;
8126 it confused me, and I was the author! Instead, assume that people
8127 who want to use K&R C compilers (when using these modules in GCC,
8128 perhaps?) will run ansi2knr.
8129
8130 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
8131 All uses of "enum_" changed to "enum ".
8132 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8133 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 8134
5bd1c419
PE
8135 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
8136 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
8137 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
8138 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
8139 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
8140 abitset_not, abitset_ones, abitset_or, abitset_or_and,
8141 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
8142 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
8143 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
8144 Use function prototypes; this removes the need for declaring
8145 static functions simply to provide their prototypes.
8146 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
8147 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
8148 bitset_count_, bitset_create, bitset_dump, bitset_first,
8149 bitset_free, bitset_init, bitset_last, bitset_next,
8150 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
8151 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
8152 bitset_print, bitset_release_memory, bitset_toggle_,
8153 bitset_type_choose, bitset_type_get, bitset_type_name_get,
8154 debug_bitset): Likewise.
8155 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
8156 * lib/bitset_stats.c (bitset_log_histogram_print,
8157 bitset_percent_histogram_print, bitset_stats_and,
8158 bitset_stats_and_cmp, bitset_stats_and_or,
8159 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
8160 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
8161 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
8162 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
8163 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
8164 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
8165 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
8166 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
8167 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
8168 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
8169 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
8170 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
8171 bitset_stats_zero): Likewise.
8172 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8173 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8174 bitsetv_dump, debug_bitsetv): Likewise.
8175 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
8176 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
8177 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
8178 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
8179 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
8180 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
8181 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
8182 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
8183 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
8184 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
8185 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
8186 Likewise.
8187 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
8188 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
8189 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
8190 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
8191 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
8192 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
8193 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
8194 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
8195 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
8196 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
8197 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 8198
ae26e1f0
AD
81992002-10-14 Akim Demaille <akim@epita.fr>
8200
8201 Version 1.75.
8202
d43baf71
AD
82032002-10-14 Akim Demaille <akim@epita.fr>
8204
8205 * tests/Makefile.am (maintainer-check-posix): New.
8206
7ebc83e3
AD
82072002-10-14 Akim Demaille <akim@epita.fr>
8208
8209 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
8210 member.
8211
05846dae
AD
82122002-10-14 Akim Demaille <akim@epita.fr>
8213
8214 * src/tables.c (table_ninf_remap): base -> tab.
8215 Reported by Matt Rosing.
8216
1318e37d
PE
82172002-10-14 Paul Eggert <eggert@twinsun.com>
8218
447fbb17
PE
8219 * tests/action.at, tests/calc.at, tests/conflicts.at,
8220 tests/cxx-type.at, tests/headers.at, tests/input.at,
8221 tests/regression.at, tests/synclines.at, tests/torture.at:
8222 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
8223 so that the tests still work even if POSIXLY_CORRECT is set.
8224 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 8225
1318e37d
PE
8226 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
8227 for portability to K&R hosts. Fix typo: signed char is guaranteed
8228 only to 127, not to 128.
8229 * data/glr.c (yysigned_char): New type.
8230 * data/yacc.c (yysigned_char): Likewise.
8231 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
8232
cc0f0794
PE
82332002-10-13 Paul Eggert <eggert@twinsun.com>
8234
5038f418
PE
8235 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
8236 true due to limited range of data type" warning from GCC.
8237
cc0f0794
PE
8238 * data/c.m4 (b4_token_defines): Protect against double-inclusion
8239 by wrapping enum yytokentype's definition inside #ifndef
8240 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
8241
6fed0802
AD
82422002-10-13 Akim Demaille <akim@epita.fr>
8243
8244 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
8245 Un yy- yyrhs to avoid the name clash with the global YYRHS.
8246
32f0598d
AD
82472002-10-13 Akim Demaille <akim@epita.fr>
8248
8249 * Makefile.maint: Update from Autoconf 2.54.
8250 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
8251
7ea9a33f
AD
82522002-10-13 Akim Demaille <akim@epita.fr>
8253
8254 * src/print.c (print_state): Separate the list of solved conflicts
8255 from the other items.
8256 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
8257
ea99527d
AD
82582002-10-13 Akim Demaille <akim@epita.fr>
8259
8260 Let nondeterministic skeletons be usable with deterministic
8261 tables.
8262
8263 With the patch, GAWK compiled by GCC without -O2 passes its test
8264 suite using a GLR parser driven by LALR tables. It fails with -O2
8265 because `struct stat' gives two different answers on my machine:
8266 88 (definition of an auto var) and later 96 (memset on this var).
8267 Hence the stack is badly corrumpted. The headers inclusion is to
8268 blame: if I move the awk.h inclusion before GLR's system header
8269 inclusion, the two struct stat have the same size.
8270
8271 * src/tables.c (pack_table): Always create conflict_table.
8272 (token_actions): Always create conflict_list.
8273 * data/glr.c (YYFLAG): Remove, unused.
8274
f377f69f
AD
82752002-10-13 Akim Demaille <akim@epita.fr>
8276
8277 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
8278 (O0FLAGS): New.
8279 (VALGRIND, GXX): New.
8280 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
8281 * tests/bison.in: Run $PREBISON a pre-command.
8282 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
8283 (maintainer-check-g++): New.
8284 * Makefile.am (maintainer-check): New.
8285
2a1fe6ed
AD
82862002-10-13 Akim Demaille <akim@epita.fr>
8287
8288 * data/glr.c: Formatting changes.
8289 Tweak some trace messages to match yacc.c's.
8290
f50adbbd
AD
82912002-10-13 Akim Demaille <akim@epita.fr>
8292
8293 GLR parsers sometimes raise parse errors instead of performing the
8294 default reduction.
8295 Reported by Charles-Henry de Boysson.
8296
8297 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 8298 check the length of the traces when %glr.
f50adbbd
AD
8299 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
8300 GLR's traces.
8301 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
8302 Test GLR parsers.
8303 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
8304 (yyltype): Remove the yy prefix from the member names.
8305 (yytable): Complete its comment.
8306 (yygetLRActions): Map error action number from YYTABLE from
8307 YYTABLE_NINF to 0.
8308 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
8309 (which was a bug: it should have been YYTABEL_NINF, and yet it was
8310 not satisfying as we could compare an YYACTION computed from
8311 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
8312 only value for error actions.
8313 (yyreportParseError): In verbose parse error messages, don't issue
8314 `error' in the list of expected tokens.
8315 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
8316 next action to perform to match glr.c's decoding.
8317 (yytable): Complete its comment.
8318
bcbad5b9
PE
83192002-10-13 Paul Eggert <eggert@twinsun.com>
8320
8321 Fix problem reported by Henrik Grubbstroem in
161a71f3 8322 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
8323 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
8324 because the Bison parser reads the second action before reducing
8325 the first one.
8326 * src/scan-gram.l (rule_length): New static var.
8327 Use it to keep track of the rule length in the scanner, since
8328 we can't expect the parser to be in lock-step sync with the scanner.
8329 (handle_action_dollar, handle_action_at): Use this var.
8330 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 8331
14904b89
PE
83322002-10-12 Paul Eggert <eggert@twinsun.com>
8333
1fe611e5
PE
8334 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
8335 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
8336 Include <sys/time.h> when checking for clock_t and struct tms.
8337 Use same include order as source.
8338 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 8339 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 8340
1fe611e5
PE
8341 * lib/timevar.c: Update copyright date and clarify comments.
8342 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 8343
1fe611e5
PE
8344 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
8345 GCC version as of today, then merge Bison's changes.
8346 Change "GCC" to "Bison" in copyright notice. timevar.def's
8347 author is Akim, so change that too.
8348
98194095
PE
8349 * src/reader.c (grammar_current_rule_check):
8350 Don't worry about the default action if $$ is untyped.
8351 Prevents bogus warnings reported by Jim Gifford in
161a71f3 8352 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 8353
14904b89
PE
8354 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
8355 * data/glr.c, data/lalr1.cc, data/yacc.c:
8356 Output token definitions before the first part of user declarations.
8357 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 8358 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 8359
ff6dca18
PE
83602002-10-11 Paul Eggert <eggert@twinsun.com>
8361
8362 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
8363 (yyparse): here. This undoes some of the 2002-07-25 change.
8364 Compatibility problem reported by Ralf S. Engelschall with
8365 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
8366
eb714592
AD
83672002-10-11 Akim Demaille <akim@epita.fr>
8368
8369 * tests/regression.at Characters Escapes): New.
8370 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
8371 characters.
8372 Reported by Jan Nieuwenhuizen.
8373
b7195100
AD
83742002-10-11 Akim Demaille <akim@epita.fr>
8375
8376 * po/id.po: New.
8377
f28a0f2d
PE
83782002-10-10 Paul Eggert <eggert@twinsun.com>
8379
8380 Portability fixes for bitsets; this also avoids several GCC
8381 warnings.
8382
8383 * lib/abitset.c: Include <stddef.h>, for offsetof.
8384 * lib/lbitset.c: Likewise.
8385
8386 * lib/abitset.c (abitset_bytes): Return a size that is aligned
8387 properly for vectors of objects. Do not assume that adding a
8388 header size to a multiple of a word size yields a value that is
8389 properly aligned for the whole union.
8390 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8391
8392 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
8393 unique names for structures.
8394 * lib/ebitset.c (ebitset_bytes): Likewise.
8395 * lib/lbitset.c (lbitset_bytes): Likewise.
8396
8397 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
8398 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
8399 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
8400 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
8401 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
8402 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
8403 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
8404 to improve the type-checking that GCC can do.
8405 * lib/bitset.c (bitset_op4_cmp): Likewise.
8406 * lib/bitset_stats.c (bitset_stats_count,
8407 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
8408 bitset_stats_copy, bitset_stats_disjoint_p,
8409 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
8410 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
8411 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
8412 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
8413 bitset_stats_and_or_cmp, bitset_stats_andn_or,
8414 bitset_stats_andn_or_cmp, bitset_stats_or_and,
8415 bitset_stats_or_and_cmp): Likewise.
8416 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
8417 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
8418 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
8419 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
8420
8421 * lib/abitset.h: Include bitset.h, not bbitset.h.
8422 * lib/ebitset.h: Likewise.
8423 * lib/lbitset.h: Likewise.
8424
8425 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
8426 All instances of parameters of type enum bitset_opts are now of
8427 type enum_bitset_opts, to conform to the C Standard, and similarly
8428 for enum_bitset_type.
8429 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
8430 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
8431
8432 Do not use "struct bitset_struct" to mean different things in
8433 different modules. Not only is this confusing, it violates
8434 the C Standard, which requires that structure types in different
8435 modules must be compatible if one is to be passed to the other.
8436 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
8437 All instances of "struct bitset_struct *" replaced with "bitset".
8438 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
8439 (union bitset_union, struct abitset_struct, struct ebitset_struct,
8440 struct lbitset_struct, struct bitset_stats_struct): New types.
8441 All uses of struct bitset_struct changed to union bitset_union,
8442 etc.
ba0fe3c7 8443 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
8444 struct bitset_struct): Remove.
8445 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
8446 struct bitset_struct): Remove.
8447 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
8448 bitset_struct): Remove.
8449 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
8450 Likewise.
8451
8452 Do not call a function of type T using a call that assumes the
8453 function is of a different type U. Standard C requires that a
8454 function must be called with a type that is compatible with its
8455 definition.
8456 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8457 New decls.
8458 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
8459 New functions.
8460 * lib/ebitset.c (PFV): Remove.
8461 * lib/lbitset.c (PFV): Likewise.
8462 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
8463 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
8464 decls.
8465 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
8466 (ebitset_vtable): Use them.
8467 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
8468 lbitset_xor): New functions.
8469 (lbitset_vtable): Use them.
8470
8471 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
8472 Declare.
8473
8474 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
8475 GCC warning.
8476 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
8477 Use offsetof, for simplicity.
8478
6fbe4984
PE
84792002-10-06 Paul Eggert <eggert@twinsun.com>
8480
8481 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
8482 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 8483 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
8484 which was inadvertently undone by the 2002-09-30 patch.
8485 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
8486 the same width as int.
8487
420f93c8
PE
84882002-10-04 Paul Eggert <eggert@twinsun.com>
8489
8490 Version 1.50.
8491
8492 * configure.ac (AC_INIT), NEWS: Increment version number.
8493
8494 * doc/bison.texinfo: Minor spelling, grammar, and white space
8495 fixes.
8496 (Symbols): Mention that any negative value returned from yylex
8497 signifies end-of-input. Warn about negative chars. Mention
8498 the portable Standard C character set.
8499
8500 The GNU coding standard says CFLAGS and YFLAGS are reserved
8501 for the installer to set.
8502 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
8503 * src/Makefile.am (AM_CFLAGS): Likewise.
8504 (AM_YFLAGS): Renamed from YFLAGS.
8505
8506 Fix some MAX and MIN problems.
8507 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
8508 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
8509 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
8510 * src/reader.c (reader): Use it.
8511
8512 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
8513 POSIX 1003.1-2001 has removed fgrep.
8514
85152002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
8516
8517 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
8518 interpreted as signed.
8519 * lib/ebitset.c (ebitset_list): Fix bug.
8520
ff68026d
PE
85212002-10-01 Paul Eggert <eggert@twinsun.com>
8522
8523 More fixes for 64-bit hosts and large bitsets.
8524
8525 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
8526 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
8527 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
8528 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
8529 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
8530 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
8531 bitset_count_): Likewise.
8532 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
8533 bitset_first, bitset_last): Likewise.
8534 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
8535 bitset_stats_list_reverse, bitset_stats_size,
8536 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
8537 Likewise.
8538 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8539 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
8540 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
8541 bitsetv_reflexive_transitive_closure): Likewise.
8542 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
8543 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
8544 Likewise.
8545 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
8546 Likewise.
420f93c8 8547
ff68026d
PE
8548 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
8549 Use size_t, not unsigned int, to count bytes.
8550 * lib/abitset.h (abitset_bytes): Likewise.
8551 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
8552 Likewise.
8553 * lib/bitset.h (bitset_bytes): Likewise.
8554 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
8555 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
8556 * lib/bitsetv.c (bitsetv_alloc): Likewise.
8557 * lib/ebitset.c (ebitset_bytes): Likewise.
8558 * lib/ebitset.h (ebitset_bytes): Likewise.
8559 * lib/lbitset.c (lbitset_bytes): Likewise.
8560 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 8561
ff68026d
PE
8562 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
8563 abitset_subset_p, abitset_disjoint_p, abitset_and,
8564 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
8565 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
8566 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
8567 abitset_or_and, abitset_or_and_cmp):
8568 Use bitset_windex instead of unsigned int.
8569 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8570 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
8571 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
8572 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
8573 Likewise.
8574 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 8575
ff68026d
PE
8576 * lib/bitset.c (bitset_print):
8577 Use proper printf formats for widths of integer types.
8578 * lib/bitset_stats.c (bitset_percent_histogram_print,
8579 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
8580 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8581 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
8582 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 8583
ff68026d
PE
8584 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
8585 BITSET_SIZE_MAX): New macros.
8586 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
8587 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
8588 to BITSET_WINDEX_MAX.
8589
8590 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
8591 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
8592 since we now return the bitset_bindex type (not int).
8593
8594 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
8595 when computing sizes.
8596 * lib/ebitset.c (ebitset_elts_grow): Likewise.
8597
8598 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
8599 and avoid cast to unsigned.
8600
6aa452a6
AD
86012002-09-30 Akim Demaille <akim@epita.fr>
8602
8603 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8604 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
8605 Updates from Michael Hayes.
8606
927f7817
AD
86072002-09-30 Art Haas <ahaas@neosoft.com>
8608
8609 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
8610 invocations.
8611 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
8612 defined.
8613
9738f41e
AD
86142002-09-27 Akim Demaille <akim@epita.fr>
8615
8616 Version 1.49c.
8617
a5c75d7f
AD
86182002-09-27 Akim Demaille <akim@epita.fr>
8619
8620 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
8621 (Because of AC_LIBSOURCE).
8622
8280e179
AD
86232002-09-27 Akim Demaille <akim@epita.fr>
8624
8625 Playing with Autoscan.
8626
8627 * configure.ac: Remove the old LIBOBJ tweaks.
8628 (AC_REPLACE_FUNCS): Add strrchr and strtol.
8629 * lib/strrchr.c: New.
8630 * lib/strtol.c: New, from the Coreutils 4.5.1.
8631
ae64af35
AD
86322002-09-27 Akim Demaille <akim@epita.fr>
8633
8634 Playing with Autoscan.
8635
8636 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
8637 * lib/Makefile.am (libbison_a_SOURCES): No longer include
8638 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
8639 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
8640 Coreutils 4.5.1.
8641
d1a1114f
AD
86422002-09-24 Akim Demaille <akim@epita.fr>
8643
8644 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
8645 (Frequently Asked Questions, Parser Stack Overflow): New.
8646
b906441c
AD
86472002-09-13 Akim Demaille <akim@epita.fr>
8648
8649 Playing with autoscan.
8650
8651 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
8652 * src/files.c (skeleton_find): Remove, unused.
8653 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
8654 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
8655
bd701811
AD
86562002-09-13 Akim Demaille <akim@epita.fr>
8657
8658 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
8659 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
8660
e0a13e7b
AD
86612002-09-13 Akim Demaille <akim@epita.fr>
8662
8663 * configure.ac: Require 2.54.
8664 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
8665 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
8666 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
8667 Remove, provided by Autoconf macros.
8668
c97011bf
AD
86692002-09-12 Akim Demaille <akim@epita.fr>
8670
8671 * m4/prereq.m4: Update, from Coreutils 4.5.1.
8672
d862b1be
AD
86732002-09-12 Akim Demaille <akim@epita.fr>
8674
8675 * m4/prereq.m4: Update, from Fileutils 4.1.5.
8676 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
8677 Reported by Martin Mokrejs.
8678
3d38c03a
AD
86792002-09-10 Akim Demaille <akim@epita.fr>
8680
8681 * src/parse-gram.y: Associate a human readable string to each
8682 token type.
8683 * tests/regression.at (Invalid inputs): Adjust.
8684
b6347355
AD
86852002-09-10 Gary V. Vaughan <gary@gnu.org>
8686
8687 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
8688 with an Autoconf-2.5x style configure.ac.
8689
09ba4ab2
PE
86902002-09-06 Paul Eggert <eggert@twinsun.com>
8691
8692 * doc/bison.texinfo (Conditions): Make explicit that the GPL
8693 exception applies only to yacc.c. This is a modification of a
8694 patch originally suggested by Akim Demaille.
8695
21846f69
AD
86962002-09-06 Akim Demaille <akim@epita.fr>
8697
09ba4ab2
PE
8698 * data/c.m4 (b4_copyright): Move the GPL exception comment from
8699 here to...
8700 * data/yacc.c: here.
8701
21846f69
AD
8702 * data/lalr1.cc (struct yyltype): Don't define it, since we use
8703 LocationType.
8704 (b4_ltype): Default to yy::Location from location.hh.
8705
c0ad8bf3
AD
87062002-09-04 Jim Meyering <jim@meyering.net>
8707
8708 * data/yacc.c: Guard the declaration of yytoknum also with
8709 `#ifdef YYPRINT', so it is declared only when used.
8710
3a93251e
AD
87112002-09-04 Akim Demaille <akim@epita.fr>
8712
8713 * configure.in: Rename as...
8714 * configure.ac: this.
8715 Bump to 1.49c.
8716
427c0dda
AD
87172002-09-04 Akim Demaille <akim@epita.fr>
8718
8719 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
8720 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
8721 translate maintainer only messages.
8722
6a254321
PE
87232002-08-12 Paul Eggert <eggert@twinsun.com>
8724
645e30d1
PE
8725 Version 1.49b.
8726
6a254321
PE
8727 * Makefile.am (SUBDIRS): Remove intl.
8728 (DISTCLEANFILES): Remove.
8729 * NEWS: Mention that GNU M4 is now required. Clarify what is
8730 meant by "larger grammars". Mention the pt_BR translation.
8731 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
8732 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
8733 Bump version from 0.11.2 to 0.11.5.
8734 (BISON_PREREQ_STAGE): Remove.
8735 (AM_GNU_GETTEXT): Use external gettext.
8736 (AC_OUTPUT): Remove intl/Makefile.
8737
8738 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
8739
8740 * data/glr.c: Include string.h, for strlen.
8741 (yyreportParseError): Use size_t for yysize.
8742 (yy_yypstack): No longer nested inside yypstates, as nested
8743 functions are not portable. Do not assume size_t is the
8744 same width as int.
8745 (yypstates): Do not assume that ptrdiff_t is the same width
8746 as int, and similarly for yyposn and YYINDEX.
8747
8748 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
8749
8750 * lib/Makefile.am (INCLUDES): Do not include from the intl
8751 directory, which has been removed.
8752 * src/Makefile.am (INCLUDES): Likewise.
8753
8754 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
8755 (bitsets_sources, additional_bitsets_sources, timevars_sources):
8756 New vars.
8757
8758 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
8759 * tests/Makefile.am (EXTRA_DIST): Likewise.
8760
8761 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
8762 Do not assume that bitset_windex is the same width as unsigned.
8763
8764 * lib/abitset.c (abitset_unused_clear): Do not assume that
8765 bitset_word is the same width as int.
8766 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
8767 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
8768 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
8769 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
8770 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
8771
8772 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
8773 portability to one's complement hosts!).
8774 * lib/ebitset.c (ebitset_op1): Likewise.
8775 * lib/lbitset.c (lbitset_op1): Likewise.
8776
8777 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
8778 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8779 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
8780 Sync with fileutils.
8781 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
8782 lib/gettext.h: Sync with diffutils.
8783
8784 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
8785 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
8786
8787 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
8788 PROTOTYPES to check for prototypes, and "defined __STDC__" to
8789 check for void *.
8790
8791 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
8792 size_t; the old version tried to do this but casted improperly.
8793 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
8794 (bitset_test): Now returns int, not unsigned long.
8795
8796 * lib/bitset_stats.c: Include "gettext.h".
8797 (_): New macro.
8798 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
8799 name locals "index", as it generates unnecessary warnings on some
8800 hosts that have an "index" function.
8801
8802 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
8803 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
8804 they need translation.
8805 * src/LR0.c (state_list_append, new_itemsets, get_state,
8806 append_states, generate_states): Likewise.
8807 * src/assoc.c (assoc_to_string): Likewise.
8808 * src/closure.c (print_closure, set_firsts, closure): Likewise.
8809 * src/gram.c (grammar_dump): Likewise.
8810 * src/injections.c (injections_compute): Likewise.
8811 * src/lalr.c (lookaheads_print): Likewise.
8812 * src/relation.c (relation_transpose): Likewise.
8813 * src/scan-gram.l: Likewise.
8814 * src/tables.c (table_grow, pack_vector): Likewise.
8815
8816 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
8817 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
8818 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
8819 * m4/mbstate_t.m4: Sync with fileutils.
8820 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
8821
8822 * po/LINGUAS: Add pt_BR.
8823 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
8824 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
8825 lib/timevar.c.
8826 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
8827 manual recommends.
8828 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
8829
8830 * src/complain.c (strerror_r): Remove decl; not needed.
8831 (strerror): Use same pattern as ../lib/error.c.
8832
8833 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
8834
8835 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
8836
8837 * src/main.c (main): Cast result of bindtextdomain and textdomain
8838 to void, to avoid a GCC warning when --disable-nls is in effect.
8839
8840 * src/scan-gram.l: Use strings rather than escapes when possible,
8841 to minimize the number of warnings from xgettext.
8842 (handle_action_dollar, handle_action_at): Don't use isdigit,
8843 as it mishandles negative chars and it may not work as expected
8844 outside the C locale.
8845
8846 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
8847 this is a GCC extension and is not portable to other compilers.
8848
8849 * src/system.h (alloca): Use same pattern as ../lib/error.c.
8850 Do not include <ctype.h>; no longer needed.
8851 Do not include <malloc.h>; no longer needed (and generates
8852 warnings on OpenBSD 3.0).
8853
8854 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
8855 it's not portable.
8856
8857 * tests/regression.at: Do not use 'cc -c input.c -o input';
8858 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
8859
8860 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
8861 exit status as failure, not just exit status 1. Sun C exits
8862 with status 2 sometimes.
8863
8864 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
8865 Use it for the two large tests.
8866
c8f002c7
AD
88672002-08-02 Akim Demaille <akim@epita.fr>
8868
8869 * src/conflicts.c (conflicts_output): Don't output rules never
8870 reduced here, since anyway that computation doesn't work.
8871 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
8872 (rule_useless_p, rule_never_reduced_p): New.
8873 (grammar_rules_partial_print): Use a filter instead of a range.
8874 Display the title only if needed.
8875 (grammar_rules_print): Adjust.
8876 (grammar_rules_never_reduced_report): New.
8877 * src/tables.c (action_row): Move the computation of rules never
8878 reduced to...
8879 (token_actions): here.
8880 * src/main.c (main): Make the parser before making the report, so
8881 that rules never reduced are computed.
8882 Call grammar_rules_never_reduced_report.
8883 * src/print.c (print_results): Report rules never reduced.
8884 * tests/conflicts.at, tests/reduce.at: Adjust.
8885
cd08e51e
AD
88862002-08-01 Akim Demaille <akim@epita.fr>
8887
8888 Instead of attaching lookaheads and duplicating the rules being
8889 reduced by a state, attach the lookaheads to the reductions.
8890
8891 * src/state.h (state_t): Remove the `lookaheads',
8892 `lookaheads_rule' member.
8893 (reductions_t): Add a `lookaheads' member.
8894 Use a regular array for the `rules'.
8895 * src/state.c (reductions_new): Initialize the lookaheads member
8896 to 0.
8897 (state_rule_lookaheads_print): Adjust.
8898 * src/state.h, src/state.c (state_reductions_find): New.
8899 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
8900 (count_rr_conflicts): Adjust.
8901 * src/lalr.c (LArule): Remove.
8902 (add_lookback_edge): Adjust.
8903 (state_lookaheads_count): New.
8904 (states_lookaheads_initialize): Merge into...
8905 (initialize_LA): this.
8906 (lalr_free): Adjust.
8907 * src/main.c (main): Don't free nullable and derives too early: it
8908 is used by --verbose.
8909 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
8910
bb0027a9
AD
89112002-08-01 Akim Demaille <akim@epita.fr>
8912
8913 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
8914 `rule_number_t**'.
8915 (set_derives, free_derives): Rename as...
8916 (derives_compute, derives_free): this.
8917 Adjust all dependencies.
8918 * src/nullable.c (set_nullable, free_nullable): Rename as...
8919 (nullable_compute, nullable_free): these.
8920 (rule_list_t): Store rule_t *, not rule_number_t.
8921 * src/state.c (state_rule_lookaheads_print): Directly compare rule
8922 pointers, instead of their numbers.
8923 * src/main.c (main): Call nullable_free, and derives_free earlier,
8924 as they were lo longer used.
8925
3325ddc4
AD
89262002-08-01 Akim Demaille <akim@epita.fr>
8927
8928 * lib/timevar.c (get_time): Include children time.
8929 * src/lalr.h (LA, LArule): Don't export them: used with the
8930 state_t.
8931 * src/lalr.c (LA, LArule): Static.
8932 * src/lalr.h, src/lalr.c (lalr_free): New.
8933 * src/main.c (main): Call it.
8934 * src/tables.c (pack_vector): Check whether loc is >= to the
8935 table_size, not >.
8936 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
8937 (tables_generate): do it, since that's also it which allocates
8938 them.
8939 Don't free LA and LArule, main does.
8940
c6f1a33c
AD
89412002-07-31 Akim Demaille <akim@epita.fr>
8942
8943 Separate parser tables computation and output.
8944
8945 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
8946 (conflict_list, conflict_list_cnt, table, check, table_ninf)
8947 (yydefgoto, yydefact, high): Move to...
8948 * src/tables.h, src/tables.c: here.
8949 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
8950 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
8951 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
8952 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
8953 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
8954 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
8955 (action_row, save_row, token_actions, save_column, default_goto)
8956 (goto_actions, sort_actions, matching_state, pack_vector)
8957 (table_ninf_remap, pack_table, prepare_actions): Move to...
8958 * src/tables.c: here.
8959 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
8960 * src/output.c (token_actions, output_base, output_conflicts)
8961 (output_check): Merge into...
8962 (prepare_actions): this.
8963 (actions_output): Rename as...
8964 (user_actions_output): this.
8965 * src/main.c (main): Call tables_generate and tables_free.
8966
1509d42f
AD
89672002-07-31 Akim Demaille <akim@epita.fr>
8968
8969 Steal GCC's --time-report support.
8970
8971 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
8972 stolen/adjusted from GCC.
8973 * m4/stage.m4: Remove time related checks.
8974 * m4/timevar.m4: New.
8975 * configure.in: Adjust.
8976 * src/system.h: Adjust to using timevar.h.
8977 * src/getargs.h, src/getargs.c: Support trace_time for
8978 --trace=time.
8979 * src/main.c (stage): Remove.
8980 (main): Replace `stage' invocations with timevar calls.
8981 * src/output.c: Insert pertinent timevar calls.
8982
273a74fa
AD
89832002-07-31 Akim Demaille <akim@epita.fr>
8984
8985 Let --trace have arguments.
8986
8987 * src/getargs.h (enum trace_e): New.
8988 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
8989 (long_options, short_options): --trace/-T takes an optional
8990 argument.
8991 Change all the uses of trace_flag to reflect the new flags.
8992 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
8993
8994 Strengthen `stage' portability.
8995
8996 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
8997 * configure.in: Use it.
8998 Don't check for malloc.h and sys/times.h.
8999 * src/system.h: Include them when appropriate.
9000 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
9001 times and struct tms are available.
9002
217598da
AD
90032002-07-30 Akim Demaille <akim@epita.fr>
9004
9005 In verbose parse error message, don't report `error' as an
9006 expected token.
9007 * tests/actions.at (Printers and Destructors): Adjust.
9008 * tests/calc.at (Calculator $1): Adjust.
9009 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
9010 error message, do not report the parser accepts the error token in
9011 that state.
9012
52489d44
AD
90132002-07-30 Akim Demaille <akim@epita.fr>
9014
9015 Normalize conflict related messages.
9016
9017 * src/complain.h, src/complain.c (warn, complain): New.
9018 * src/conflicts.c (conflicts_print): Use them.
9019 (conflict_report_yacc): New, extracted from...
9020 (conflicts_print): here.
9021 * tests/conflicts.at, tests/existing.at: Adjust.
9022
e8832397
AD
90232002-07-30 Akim Demaille <akim@epita.fr>
9024
9025 Report rules which are never reduced by the parser: those hidden
9026 by conflicts.
9027
9028 * src/LR0.c (save_reductions): Don't make the final state too
9029 different: save its reduction (accept) instead of having a state
9030 without any action (no shift or goto, no reduce).
9031 Note: the final state is now a ``regular'' state, i.e., the
9032 parsers now contain `reduce 0' as default reduction.
9033 Nevertheless, since they decide to `accept' when yystate =
9034 final_state, they still will not reduce rule 0.
9035 * src/print.c (print_actions, print_reduction): Adjust.
9036 * src/output.c (action_row): Track reduced rules.
9037 (token_actions): Report rules never reduced.
9038 * tests/conflicts.at, tests/regression.at: Adjust.
9039
caf23d24
AD
90402002-07-30 Akim Demaille <akim@epita.fr>
9041
9042 `stage' was accidently included in a previous patch.
9043 Initiate its autoconfiscation.
9044
9045 * configure.in: Look for malloc.h and sys/times.h.
9046 * src/main.c (stage): Adjust.
9047 Report only when trace_flag.
9048
640748ee
AD
90492002-07-29 Akim Demaille <akim@epita.fr>
9050
9051 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
9052 state_number_t.
9053 (errs_t): symbol_t*, not symbol_number_t.
9054 (reductions_t): rule_t*, not rule_number_t.
9055 (FOR_EACH_SHIFT): New.
9056 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
9057 * src/print.c, src/print_graph.c: Adjust.
9058
88bce5a2
AD
90592002-07-29 Akim Demaille <akim@epita.fr>
9060
9061 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
9062
9063 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
9064 (endtoken, accept): these.
9065 * src/reader.c (reader): Set endtoken's default tag to "$end".
9066 Set undeftoken's tag to "$undefined" instead of "$undefined.".
9067 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
9068 Adjust.
9069
1bfb97db
AD
90702002-07-29 Akim Demaille <akim@epita.fr>
9071
9072 * src/reduce.c (reduce_grammar): When the language is empty,
9073 complain about the start symbol, not the axiom.
9074 Use its location.
9075 * tests/reduce.at (Empty Language): New.
9076
fc5734fe
AD
90772002-07-26 Akim Demaille <akim@epita.fr>
9078
9079 * src/reader.h, src/reader.c (gram_error): ... can't get
9080 yycontrol without making too strong assumptions on the parser
9081 itself.
9082 * src/output.c (prepare_tokens): Use the real 0th value of
9083 token_translations instead of `0'.
9084 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
9085 visible here.
9086 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
9087 for the time being: %locations ought to provide it to yyerror.
9088
3650b4b8
AD
90892002-07-25 Akim Demaille <akim@epita.fr>
9090
9091 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
9092 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
9093 * tests/regression.at (Web2c Actions): Adjust.
9094
4b3d3a8e
AD
90952002-07-25 Akim Demaille <akim@epita.fr>
9096
9097 Stop storing rules from 1 to nrules + 1.
9098
9099 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
9100 * src/nullable.c, src/output.c, src/print.c, src/reader.c
9101 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
9102 Iterate from 0 to nrules.
9103 Use rule_number_as_item_number and item_number_as_rule_number.
9104 Adjust to `derive' now containing possibly 0.
9105 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
9106 Handle the `- 1' part in rule numbers from/to item numbers.
9107 * src/conflicts.c (log_resolution): Fix the message which reversed
9108 shift and reduce.
9109 * src/output.c (action_row): Initialize default_rule to -1.
9110 (token_actions): Adjust.
9111 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
9112 expected output.
9113 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
9114
4a2a22f4
AD
91152002-07-25 Akim Demaille <akim@epita.fr>
9116
9117 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
9118 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
9119 (b4_c_knr_arg_decl): New.
9120 * data/yacc.c: Use it to define yysymprint, yydestruct, and
9121 yyreport_parse_error.
9122
b8df3223
AD
91232002-07-25 Akim Demaille <akim@epita.fr>
9124
9125 * data/yacc.c (yyreport_parse_error): New, extracted from...
9126 (yyparse): here.
9127 (yydestruct, yysymprint): Move above yyparse.
9128 Be K&R compliant.
9129
a762e609
AD
91302002-07-25 Akim Demaille <akim@epita.fr>
9131
9132 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
9133 replace...
9134 (b4_sint_type, b4_uint_type): these.
9135 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
9136 * tests/regression.at (Web2c Actions): Adjust.
9137
12b0043a
AD
91382002-07-25 Akim Demaille <akim@epita.fr>
9139
9140 * src/gram.h (TIEM_NUMBER_MAX): New.
9141 (item_number_of_rule_number, rule_number_of_item_number): Rename
9142 as...
9143 (rule_number_as_item_number, item_number_as_rule_number): these.
9144 Adjust dependencies.
9145 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
9146 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
9147 (symbol_number_to_vector_number): New.
9148 (order): Of vector_number_t* type.
9149 (base_t, BASE_MAX, BASE_MIN): New.
9150 (froms, tos, width, pos, check): Of base_t type.
9151 (action_number_t, ACTION_MIN, ACTION_MAX): New.
9152 (actrow): Of action_number_t type.
9153 (conflrow): Of unsigned int type.
9154 (table_ninf, base_ninf): New.
9155 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
9156 (muscle_insert_int_table, muscle_insert_base_table)
9157 (muscle_insert_rule_number_table): New.
9158 (prepare_tokens): Output `toknum' as int_table.
9159 (action_row): Returns a rule_number_t.
9160 Use ACTION_MIN, not SHRT_MIN.
9161 (token_actions): yydefact is rule_number_t*.
9162 (table_ninf_remap): New.
9163 (pack_table): Use it for `base' and `table'.
9164 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
9165 replaced with...
9166 (YYPACT_NINF, YYTABLE_NINF): these.
9167 (yypact, yytable): Compute their types instead of hard-coded
9168 `short'.
9169 * tests/regression.at (Web2c Actions): Adjust.
9170
5dde258a
AD
91712002-07-19 Akim Demaille <akim@epita.fr>
9172
9173 * src/scan-gram.l (id): Can start with an underscore.
9174
a945ec39
AD
91752002-07-16 Akim Demaille <akim@epita.fr>
9176
9177 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
9178 Adjust all former `associativity' dependencies.
9179 * src/symtab.c (symbol_new): Default associativity is `undef', not
9180 `right'.
9181 (symbol_check_alias_consistence): Adjust.
9182
fae437e8
AD
91832002-07-09 Akim Demaille <akim@epita.fr>
9184
9185 * doc/bison.texinfo: Properly set the ``header'' part.
9186 Use @dircategory ``GNU programming tools'' as per Texinfo's
9187 documentation.
9188 Use @copying.
9189
1a715ef2
AD
91902002-07-09 Akim Demaille <akim@epita.fr>
9191
9192 * lib/quotearg.h: Protect against multiple inclusions.
9193 * src/location.h (location_t): Add a `file' member.
9194 (LOCATION_RESET, LOCATION_PRINT): Adjust.
9195 * src/complain.c (warn_at, complain_at, fatal_at): Drop
9196 `error_one_per_line' support.
9197
a5d50994
AD
91982002-07-09 Akim Demaille <akim@epita.fr>
9199
9200 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
9201 * src/reader.c (lineno): Remove.
9202 Adjust all dependencies.
9203 (get_merge_function): Take a location and use complain_at.
9204 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
9205 * tests/regression.at (Invalid inputs, Mixing %token styles):
9206 Adjust.
9207
b275314e
AD
92082002-07-09 Akim Demaille <akim@epita.fr>
9209
9210 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
9211 recovery rule, and forbid extensions when --yacc.
9212 (gram_error): Use complain_at.
9213 * src/reader.c (reader): Exit if there were parse errors.
9214
865b9df1
AD
92152002-07-09 Akim Demaille <akim@epita.fr>
9216
9217 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
9218 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
9219 Reported by R Blake <blakers@mac.com>.
9220
c76e14da
AD
92212002-07-09 Akim Demaille <akim@epita.fr>
9222
9223 * data/yacc.c: Output the copyright notive in the header.
9224
7db2ed2d
AD
92252002-07-03 Akim Demaille <akim@epita.fr>
9226
9227 * src/output.c (froms, tos): Are state_number_t.
9228 (save_column): sp, sp1, and sp2 are state_number_t.
9229 (prepare): Rename `final' as `final_state_number', `nnts' as
9230 `nterms_number', `nrules' as `rules_number', `nstates' as
9231 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
9232 unused.
9233 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
9234 * data/lalr1.cc (nsym_): Remove, unused.
9235
e68e0410
AD
92362002-07-03 Akim Demaille <akim@epita.fr>
9237
9238 * src/lalr.h, src/lalr.c (goto_number_t): New.
9239 * src/lalr.c (goto_list_t): New.
9240 Propagate them.
9241 * src/nullable.c (rule_list_t): New.
9242 Propagate.
9243 * src/types.h: Remove.
9244
e1a4f3a4
AD
92452002-07-03 Akim Demaille <akim@epita.fr>
9246
9247 * src/closure.c (print_fderives): Use rule_rhs_print.
9248 * src/derives.c (print_derives): Use rule_rhs_print.
9249 (rule_list_t): New, replaces `shorts'.
9250 (set_derives): Add comments.
9251 * tests/sets.at (Nullable, Firsts): Adjust.
9252
536545f3
AD
92532002-07-03 Akim Demaille <akim@epita.fr>
9254
9255 * src/output.c (prepare_actions): Free `tally' and `width'.
9256 (prepare_actions): Allocate and free `order'.
9257 * src/symtab.c (symbols_free): Free `symbols'.
9258 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
9259 * src/output.c (m4_invoke): Move to...
9260 * src/scan-skel.l: here.
9261 (<<EOF>>): Close yyout, and free its name.
9262
8b752b00
AD
92632002-07-03 Akim Demaille <akim@epita.fr>
9264
9265 Fix some memory leaks, and fix a bug: state 0 was examined twice.
9266
9267 * src/LR0.c (new_state): Merge into...
9268 (state_list_append): this.
9269 (new_states): Merge into...
9270 (generate_states): here.
9271 (set_states): Don't ensure a proper `errs' state member here, do it...
9272 * src/conflicts.c (conflicts_solve): here.
9273 * src/state.h, src/state.c: Comment changes.
9274 (state_t): Rename member `shifts' as `transitions'.
9275 Adjust all dependencies.
9276 (errs_new): For consistency, also take the values as argument.
9277 (errs_dup): Remove.
9278 (state_errs_set): New.
9279 (state_reductions_set, state_transitions_set): Assert that no
9280 previous value was assigned.
9281 (state_free): New.
9282 (states_free): Use it.
9283 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
9284 temporary storage: use `errs' and `nerrs' as elsewhere.
9285 (set_conflicts): Allocate and free this `errs'.
9286
613f5e1a
AD
92872002-07-02 Akim Demaille <akim@epita.fr>
9288
9289 * lib/libiberty.h: New.
9290 * lib: Update the bitset implementation from upstream.
9291 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
9292 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
9293 * src/main.c: Adjust bitset stats calls.
9294
26e0cadc
PE
92952002-07-01 Paul Eggert <eggert@twinsun.com>
9296
9297 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
9298 char, so that negative chars don't collide with $.
9299
1154cced
AD
93002002-06-30 Akim Demaille <akim@epita.fr>
9301
9302 Have the GLR tests be `warning' checked, and fix the warnings.
9303
9304 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
9305 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
9306 (yyremoveDeletes): `yyi' and `yyj' are size_t.
9307 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
9308 (yyaddDeferredAction): static.
9309 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
9310 (yyreportParseError): yyprefix is const.
9311 yytokenp is used only when verbose.
9312 (yy__GNUC__): Replace with __GNUC__.
9313 (yypdumpstack): yyi is size_t.
9314 (yypreference): Un-yy local variables and arguments, to avoid
9315 clashes with `yyr1'. Anyway, we are not in the user name space.
9316 (yytname_size): be an int, as is compared with ints.
9317 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
9318 Use them.
9319 * tests/cxx-gram.at: Use quotation to protect $1.
9320 Use AT_COMPILE to enable warnings hunts.
9321 Prototype yylex and yyerror.
9322 `Use' argc.
9323 Include `string.h', not `strings.h'.
9324 Produce and prototype stmtMerge only when used.
9325 yylex takes a location.
9326
97650f4e
AD
93272002-06-30 Akim Demaille <akim@epita.fr>
9328
9329 We spend a lot of time in quotearg, in particular when --verbose.
9330
9331 * src/symtab.c (symbol_get): Store a quoted version of the key.
9332 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
9333 Adjust all callers.
9334
d2576365
AD
93352002-06-30 Akim Demaille <akim@epita.fr>
9336
9337 * src/state.h (reductions_t): Rename member `nreds' as num.
9338 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
9339 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
9340
ccaf65bc
AD
93412002-06-30 Akim Demaille <akim@epita.fr>
9342
9343 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
9344 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
9345 (shifts_to): Rename as...
9346 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
9347 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
9348 (TRANSITION_IS_DISABLED, transitions_to): these.
9349
87675353
AD
93502002-06-30 Akim Demaille <akim@epita.fr>
9351
9352 * src/print.c (print_shifts, print_gotos): Merge into...
9353 (print_transitions): this.
9354 (print_transitions, print_errs, print_reductions): Align the
9355 lookaheads columns.
9356 (print_core, print_transitions, print_errs, print_state,
9357 print_grammar): Output empty lines separator before, not after.
9358 (state_default_rule_compute): Rename as...
9359 (state_default_rule): this.
9360 * tests/conflicts.at (Defaulted Conflicted Reduction),
9361 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
9362 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
9363
ce4ccb4b
AD
93642002-06-30 Akim Demaille <akim@epita.fr>
9365
9366 Display items as we display rules.
9367
9368 * src/gram.h, src/gram.c (rule_lhs_print): New.
9369 * src/gram.c (grammar_rules_partial_print): Use it.
9370 * src/print.c (print_core): Likewise.
9371 * tests/conflicts.at (Defaulted Conflicted Reduction),
9372 (Unresolved SR Conflicts): Adjust.
9373 (Unresolved SR Conflicts): Adjust and rename as...
9374 (Resolved SR Conflicts): this, as was meant.
9375 * tests/regression.at (Web2c Report): Adjust.
9376
bc933ef1
AD
93772002-06-30 Akim Demaille <akim@epita.fr>
9378
9379 * src/print.c (state_default_rule_compute): New, extracted from...
9380 (print_reductions): here.
9381 Pessimize, but clarify the code.
9382 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
9383
53d4308d
AD
93842002-06-30 Akim Demaille <akim@epita.fr>
9385
9386 * src/output.c (action_row): Let default_rule be always a rule
9387 number.
9388
574fb2d5
AD
93892002-06-30 Akim Demaille <akim@epita.fr>
9390
9391 * src/closure.c (print_firsts, print_fderives, closure):
9392 Use BITSET_EXECUTE.
9393 * src/lalr.c (lookaheads_print): Likewise.
9394 * src/state.c (state_rule_lookaheads_print): Likewise.
9395 * src/print_graph.c (print_core): Likewise.
9396 * src/print.c (print_reductions): Likewise.
9397 * src/output.c (action_row): Likewise.
9398 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
9399
05811fd7
AD
94002002-06-30 Akim Demaille <akim@epita.fr>
9401
9402 * src/print_graph.c: Use report_flag.
9403
0e4d5753
AD
94042002-06-30 Akim Demaille <akim@epita.fr>
9405
9406 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
9407 to...
9408 * src/relation.h, src/relation.c (traverse, relation_digraph)
9409 (relation_print, relation_transpose): New.
9410
24c7d800
AD
94112002-06-30 Akim Demaille <akim@epita.fr>
9412
9413 * src/state.h, src/state.c (shifts_to): New.
9414 * src/lalr.c (build_relations): Use it.
9415
9222837b
AD
94162002-06-30 Akim Demaille <akim@epita.fr>
9417
9418 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
9419 (item_number_of_rule_number, rule_number_of_item_number): New.
9420 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
9421 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
9422 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
9423 Propagate their use.
9424 Much remains to be done, in particular wrt `shorts' from types.h.
9425
260008e5
AD
94262002-06-30 Akim Demaille <akim@epita.fr>
9427
9428 * src/symtab.c (symbol_new): Initialize the `printer' member.
9429
8a731ca8
AD
94302002-06-30 Akim Demaille <akim@epita.fr>
9431
9432 * src/LR0.c (save_reductions): Remove, replaced by...
9433 * src/state.h, src/state.c (state_reductions_set): New.
9434 (reductions, errs): Rename as...
9435 (reductions_t, errs_t): these.
9436 Adjust all dependencies.
9437
32e1e0a4
AD
94382002-06-30 Akim Demaille <akim@epita.fr>
9439
9440 * src/LR0.c (state_list_t, state_list_append): New.
9441 (first_state, last_state): Now symbol_list_t.
9442 (this_state): Remove.
9443 (new_itemsets, append_states, save_reductions): Take a state_t as
9444 argument.
9445 (set_states, generate_states): Adjust.
9446 (save_shifts): Remove, replaced by...
9447 * src/state.h, src/state.c (state_shifts_set): New.
9448 (shifts): Rename as...
9449 (shifts_t): this.
9450 Adjust all dependencies.
9451 * src/state.h (state_t): Remove the `next' member.
9452
e5fb6710
AD
94532002-06-30 Akim Demaille <akim@epita.fr>
9454
9455 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
9456 escaped in slot 0.
9457
c7ca99d4
AD
94582002-06-30 Akim Demaille <akim@epita.fr>
9459
9460 Use hash.h for the state hash table.
9461
9462 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
9463 (allocate_storage): Use state_hash_new.
9464 (free_storage): Use state_hash_free.
9465 (new_state, get_state): Adjust.
9466 * src/lalr.h, src/lalr.c (states): Move to...
9467 * src/states.h (state_t): Remove the `link' member, no longer
9468 used.
9469 * src/states.h, src/states.c: here.
9470 (state_hash_new, state_hash_free, state_hash_lookup)
9471 (state_hash_insert, states_free): New.
9472 * src/states.c (state_table, state_compare, state_hash): New.
9473 * src/output.c (output_actions): Do not free states now, since we
9474 still need to know the final_state number in `prepare', called
9475 afterwards. Do it...
9476 * src/main.c (main): here: call states_free after `output'.
9477
df0e7316
AD
94782002-06-30 Akim Demaille <akim@epita.fr>
9479
9480 * src/state.h, src/state.c (state_new): New, extracted from...
9481 * src/LR0.c (new_state): here.
9482 * src/state.h (STATE_ALLOC): Move to...
9483 * src/state.c: here.
9484 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
9485 * src/state.h, src/state.c: here.
9486
39f41916
AD
94872002-06-30 Akim Demaille <akim@epita.fr>
9488
9489 * src/reader.c (gensym): Rename as...
9490 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
9491 (getsym): Rename as...
9492 (symbol_get): this.
9493
d57650a5
AD
94942002-06-30 Akim Demaille <akim@epita.fr>
9495
9496 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
9497 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
9498 * src/output.c, src/print.c, src/print_graph.c: Propagate.
9499 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
9500
5a08f1ce
AD
95012002-06-30 Akim Demaille <akim@epita.fr>
9502
9503 Make the test suite pass with warnings checked.
9504
9505 * tests/actions.at (Printers and Destructors): Improve.
9506 Avoid unsigned vs. signed issues.
9507 * tests/calc.at: Don't exercise the scanner here, do it...
9508 * tests/input.at (Torturing the Scanner): here.
9509
720623af
PH
95102002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9511
88e7e941 9512 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
9513 reorganize first lines parallel to yacc.c.
9514
fb8135fa
AD
95152002-06-28 Akim Demaille <akim@epita.fr>
9516
9517 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
9518 (b4_token_enum, b4_token_defines): New, factored from...
9519 * data/lalr1.cc, data/yacc.c, glr.c: here.
9520
41442480
AD
95212002-06-28 Akim Demaille <akim@epita.fr>
9522
9523 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
9524 unused variables.
9525 * src/output.c (merger_output): static.
9526
e0e5bf84
AD
95272002-06-28 Akim Demaille <akim@epita.fr>
9528
ba0fe3c7 9529 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
9530 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
9531 pacify GCC.
9532 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 9533
676385e2
PH
95342002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9535
9536 Accumulated changelog for new GLR parsing features.
9537
6a254321 9538 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
9539 conflicts_total_count.
9540 * src/conflicts.h: Ditto.
9541 * src/output.c (token_actions): Use the new name.
9542 (output_conflicts): Change conflp => conflict_list_heads, and
9543 confl => conflict_list for better readability.
9544 * data/glr.c: Use the new names.
9545 * NEWS: Add self to GLR announcement.
e0e5bf84 9546
676385e2
PH
9547 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
9548
9549 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
9550 Akim Demaille.
9551
9552 * data/bison.glr: Change name to glr.c
9553 * data/glr.c: Renamed from bison.glr.
9554 * data/Makefile.am: Add glr.c
e0e5bf84
AD
9555
9556 * src/getargs.c:
9557
676385e2 9558 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 9559 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 9560
676385e2
PH
9561 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9562
9563 * data/bison.glr: Be sure to restore the
9564 current #line when returning to the skeleton contents after having
9565 exposed the input file's #line.
9566
9567 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9568
9569 * data/bison.glr: Bring up to date with changes to bison.simple.
9570
9571 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9572
9573 * data/bison.glr: Correct definitions that use b4_prefix.
9574 Various reformatting.
9575 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
9576 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
9577 yytokenp argument; now part of stack.
9578 (yychar): Define to behave as documented.
9579 (yyclearin): Ditto.
e0e5bf84 9580
676385e2
PH
9581 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9582
9583 * src/reader.h: Add declaration for free_merger_functions.
9584
9585 * src/reader.c (merge_functions): New variable.
9586 (get_merge_function): New function.
9587 (free_merger_functions): New function.
9588 (readgram): Check for %prec that is not followed by a symbol.
9589 Handle %dprec and %merge declarations.
9590 (packgram): Initialize dprec and merger fields in rules array.
9591
9592 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
9593 conflict_list_cnt, conflict_list_free): New variables.
9594 (table_grow): Also grow conflict_table.
e0e5bf84 9595 (prepare_rules): Output dprec and merger tables.
676385e2 9596 (conflict_row): New function.
e0e5bf84 9597 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
9598 default reduction in conflicted states for GLR parser so that there
9599 are spaces for the conflict lists.
9600 (save_row): Also save conflict information.
9601 (token_actions): Allocate conflict list.
9602 (merger_output): New function.
9603 (pack_vector): Pack conflict table, too.
9604 (output_conflicts): New function to output yyconflp and yyconfl.
9605 (output_check): Allocate conflict_tos.
9606 (output_actions): Output conflict tables, also.
9607 (output_skeleton): Output b4_mergers definition.
9608 (prepare): Output b4_max_rhs_length definition.
9609 Use 'bison.glr' as default skeleton for GLR parsers.
9610
9611 * src/gram.c (glr_parser): New flag.
9612 (grammar_free): Call free_merger_functions.
9613
9614 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
9615 all pairs of conflicting reductions, rather than just all tokens
9616 causing conflicts. Needed to size conflict tables.
e0e5bf84 9617 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
9618 interface.
9619 (conflicts_print): Ditto.
9620 (count_total_conflicts): New function.
9621
9622 * src/reader.h (merger_list): New type.
9623 (merge_functions): New variable.
9624
9625 * src/lex.h (tok_dprec, tok_merge): New token types.
9626
9627 * src/gram.h (rule_s): Add dprec and merger fields.
9628 (glr_parser): New flag.
9629
9630 * src/conflicts.h (count_total_conflicts): New function.
9631
9632 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
9633
9634 * doc/bison.texinfo (Generalized LR Parsing): New section.
9635 (GLR Parsers): New section.
9636 (Language and Grammar): Mention GLR parsing.
9637 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
9638 Correct typo ("tge" -> "the").
9639
9640 * data/bison.glr: New skeleton for GLR parsing.
9641
9642 * tests/cxx-gram.at: New tests for GLR parsing.
9643
9644 * tests/testsuite.at: Include cxx-gram.at.
9645
9646 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 9647
676385e2
PH
9648 * src/parse-gram.y:
9649
9650 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
9651
9652 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 9653
b5480d74 96542002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
9655
9656 * src/options.h, src/options.c: Remove.
9657 * src/getargs.c (short_options, long_options): New.
9658
60491a94
AD
96592002-06-27 Akim Demaille <akim@epita.fr>
9660
9661 * data/bison.simple, data/bison.c++: Rename as...
9662 * data/yacc.c, data/lalr1.cc: these.
9663 * doc/bison.texinfo (Environment Variables): Remove.
9664
9be0c25b
AD
96652002-06-25 Raja R Harinath <harinath@cs.umn.edu>
9666
9667 * src/getargs.c (report_argmatch): Initialize strtok().
9668
1ae72863
AD
96692002-06-20 Akim Demaille <akim@epita.fr>
9670
9671 * data/bison.simple (b4_symbol_actions): New, replaces...
9672 (b4_symbol_destructor, b4_symbol_printer): these.
9673 (yysymprint): Be sure to call YYPRINT only for tokens, and using
9674 user token numbers.
9675
87542d29
AD
96762002-06-20 Akim Demaille <akim@epita.fr>
9677
9678 * data/bison.simple (yydestructor): Rename as...
9679 (yydestruct): this.
9680
1a31ed21
AD
96812002-06-20 Akim Demaille <akim@epita.fr>
9682
9683 * src/symtab.h, src/symtab.c (symbol_type_set)
9684 (symbol_destructor_set, symbol_precedence_set): The location is
9685 the last argument.
9686 Adjust all callers.
9687
e776192e
AD
96882002-06-20 Akim Demaille <akim@epita.fr>
9689
9690 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
9691 internals.
9692 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
9693 Takes a location.
9694 * src/symtab.h, src/symtab.c (symbol_class_set)
9695 (symbol_user_token_number_set): Likewise.
9696 Adjust all callers.
9697 Promote complain_at.
9698 * tests/input.at (Type Clashes): Adjust.
9699
5c1180b3
AD
97002002-06-20 Akim Demaille <akim@epita.fr>
9701
9702 * data/bison.simple (YYLEX): Fix the declaration when
9703 %pure-parser.
9704
e3170060
AD
97052002-06-20 Akim Demaille <akim@epita.fr>
9706
9707 * data/bison.simple (yysymprint): Don't print the token number,
9708 just its name.
9709 * tests/actions.at (Destructors): Rename as...
9710 (Printers and Destructors): this.
9711 Also exercise %printer.
9712
253862fd
AD
97132002-06-20 Akim Demaille <akim@epita.fr>
9714
9715 * data/bison.simple (YYDSYMPRINT): New.
9716 Use it to remove many of the #if YYDEBUG/if (yydebug).
9717
366eea36
AD
97182002-06-20 Akim Demaille <akim@epita.fr>
9719
9720 * src/symtab.h, src/symtab.c (symbol_t): printer and
9721 printer_location are new members.
9722 (symbol_printer_set): New.
9723 * src/parse-gram.y (PERCENT_PRINTER): New token.
9724 Handle its associated rule.
9725 * src/scan-gram.l: Adjust.
9726 (handle_destructor_at, handle_destructor_dollar): Rename as...
9727 (handle_symbol_code_at, handle_symbol_code_dollar): these.
9728 * src/output.c (symbol_printers_output): New.
9729 (output_skeleton): Call it.
9730 * data/bison.simple (yysymprint): New. Cannot be named yyprint
9731 since there are already many grammar files with a user `yyprint'.
9732 Replace the calls to YYPRINT to calls to yysymprint.
9733 * tests/calc.at: Adjust.
9734 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
9735 taking advantage of parser very internal details (stack size!).
9736
4f25ebb0
AD
97372002-06-20 Akim Demaille <akim@epita.fr>
9738
9739 * src/scan-gram.l: Complete the scanner with the missing patterns
9740 to pacify Flex.
9741 Use `quote' and `symbol_tag_get' where appropriate.
9742
93b68a0e
AD
97432002-06-19 Akim Demaille <akim@epita.fr>
9744
9745 * tests/actions.at (Destructors): Augment to test locations.
9746 * data/bison.simple (yydestructor): Pass it the current location
9747 if locations are enabled.
9748 Prototype only when __STDC__ or C++.
9749 Change the argument names to move into the yy name space: there is
9750 user code here.
9751
58612f1d
AD
97522002-06-19 Akim Demaille <akim@epita.fr>
9753
74310291
AD
9754 * data/bison.simple (b4_pure_if): New.
9755 Use it instead of #ifdef YYPURE.
9756
97572002-06-19 Akim Demaille <akim@epita.fr>
9758
9759 * data/bison.simple (b4_location_if): New.
58612f1d
AD
9760 Use it instead of #ifdef YYLSP_NEEDED.
9761
f25bfb75
AD
97622002-06-19 Akim Demaille <akim@epita.fr>
9763
9764 Prepare @$ in %destructor, but currently don't bind it in the
9765 skeleton, as %location use is not cleaned up yet.
9766
9767 * src/scan-gram.l (handle_dollar, handle_destructor_at)
9768 (handle_action_at): New.
9769 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
9770 a braced_code_t and a location as additional arguments.
9771 (handle_destructor_dollar): Instead of requiring `b4_eval', just
9772 unquote one when outputting `b4_dollar_dollar'.
9773 Adjust callers.
9774 * data/bison.simple (b4_eval): Remove.
9775 (b4_symbol_destructor): Adjust.
9776 * tests/input.at (Invalid @n): Adjust.
9777
c732d2c6
AD
97782002-06-19 Zack Weinberg <zack@codesourcery.com>
9779
9780 * doc/bison.texinfo: Document ability to have multiple
9781 prologue sections.
9782
8c165d89
AD
97832002-06-18 Akim Demaille <akim@epita.fr>
9784
9785 * src/files.c (compute_base_names): When computing the output file
9786 names from the input file name, strip the directory part.
9787
ca98bf57
AD
97882002-06-18 Akim Demaille <akim@epita.fr>
9789
9790 * data/bison.simple.new: Comment changes.
9791 Reported by Andreas Schwab.
9792
0bfb02ff
AD
97932002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
9794
9795 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
9796 there are no `label `yyoverflowlab' defined but not used' warnings
9797 when yyoverflow is defined.
9798
24c0aad7
AD
97992002-06-18 Akim Demaille <akim@epita.fr>
9800
9801 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
9802 new member.
9803 (symbol_destructor_set): Adjust.
9804 * src/output.c (symbol_destructors_output): Output the destructor
9805 locations.
9806 Output the symbol name.
9807 * data/bison.simple (b4_symbol_destructor): Adjust.
9808
5719c109
AD
98092002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
9810 and Akim Demaille <akim@epita.fr>
9811
9812 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
9813 what's left on the stack when the error recovery hits EOF.
9814 * tests/actions.at (Destructors): Complete to exercise this case.
9815
9280d3ef
AD
98162002-06-17 Akim Demaille <akim@epita.fr>
9817
9818 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
9819 arguments is really empty, not only equal to `[]'.
9820 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
9821 member.
9822 (symbol_destructor_set): New.
9823 * src/output.c (symbol_destructors_output): New.
9824 * src/reader.h (brace_code_t, current_braced_code): New.
9825 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
9826 (handle_dollar): Rename as...
9827 (handle_action_dollar): this.
9828 (handle_destructor_dollar): New.
9829 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
9830 (grammar_declaration): Use it.
9831 * data/bison.simple (yystos): Is always defined.
9832 (yydestructor): New.
9833 * tests/actions.at (Destructors): New.
9834 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
9835
dafdc66f
AD
98362002-06-17 Akim Demaille <akim@epita.fr>
9837
9838 * src/symlist.h, src/symlist.c (symbol_list_length): New.
9839 * src/scan-gram.l (handle_dollar, handle_at): Compute the
9840 rule_length only when needed.
9841 * src/output.c (actions_output, token_definitions_output): Output
9842 the full M4 block.
9843 * src/symtab.c: Don't access directly to the symbol tag, use
9844 symbol_tag_get.
9845 * src/parse-gram.y: Use symbol_list_free.
9846
56c47203
AD
98472002-06-17 Akim Demaille <akim@epita.fr>
9848
9849 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
9850 (symbol_list_prepend, get_type_name): Move to...
9851 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
9852 (symbol_list_prepend, symbol_list_n_type_name_get): here.
9853 Adjust all callers.
9854 (symbol_list_free): New.
9855 * src/scan-gram.l (handle_dollar): Takes a location.
9856 * tests/input.at (Invalid $n): Adjust.
9857
1e0bab92
AD
98582002-06-17 Akim Demaille <akim@epita.fr>
9859
9860 * src/reader.h, src/reader.c (symbol_list_new): Export it.
9861 (symbol_list_prepend): New.
9862 * src/parse-gram.y (%union): `list' is a new member.
9863 (symbols.1): New, replaces...
9864 (terms_to_prec.1, nterms_to_type.1): these.
9865 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
9866 Take a location as additional argument.
9867 Adjust all callers.
9868
04e60654
AD
98692002-06-15 Akim Demaille <akim@epita.fr>
9870
9871 * src/parse-gram.y: Move %token in the declaration section so that
9872 we don't depend upon CVS Bison.
9873
10e5b8bd
AD
98742002-06-15 Akim Demaille <akim@epita.fr>
9875
9876 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
9877 * src/print.c (print_core): Use it.
9878
9801d40c
AD
98792002-06-15 Akim Demaille <akim@epita.fr>
9880
9881 * src/conflicts.c (log_resolution): Accept the rule involved in
9882 the sr conflicts instead of the lookahead number that points to
9883 that rule.
9884 (flush_reduce): Accept the current lookahead vector as argument,
9885 instead of the index in LA.
9886 (resolve_sr_conflict): Accept the current number of lookahead
9887 bitset to consider for the STATE, instead of the index in LA.
9888 (set_conflicts): Adjust.
9889 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
9890
c0263492
AD
98912002-06-15 Akim Demaille <akim@epita.fr>
9892
9893 * src/state.h (state_t): Replace the `lookaheadsp' member, a
9894 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
9895 Adjust all dependencies.
9896 * src/lalr.c (initialize_lookaheads): Split into...
9897 (states_lookaheads_count, states_lookaheads_initialize): these.
9898 (lalr): Adjust.
9899
9757c359
AD
99002002-06-15 Akim Demaille <akim@epita.fr>
9901
9902 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
9903 out of...
9904 (grammar_rules_print): here.
9905 * src/reduce.c (reduce_output): Use it.
9906 * tests/reduce.at (Useless Rules, Reduced Automaton)
9907 (Underivable Rules): Adjust.
9908
6b98e4b5
AD
99092002-06-15 Akim Demaille <akim@epita.fr>
9910
9911 Copy BYacc's nice way to report the grammar.
9912
9913 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
9914 New.
9915 Don't print the rules' location, it is confusing and useless.
9916 (rule_print): Use grammar_rhs_print.
9917 * src/print.c (print_grammar): Use grammar_rules_print.
9918
6b98e4b5
AD
99192002-06-15 Akim Demaille <akim@epita.fr>
9920
9921 Complete and rationalize `useless thing' warnings.
9922
9923 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
9924 (symbol_tag_print): New.
9925 Use them everywhere in place of accessing directly the tag member.
9926 * src/gram.h, src/gram.c (rule_print): New.
9927 Use it where a rule used to be printed `by hand'.
9928 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
9929 (reduce_grammar_tables): Report the useless rules.
9930 (reduce_print): Useless things are a warning, not an error.
9931 Report it as such.
9932 * tests/reduce.at (Useless Nonterminals, Useless Rules):
9933 (Reduced Automaton, Underivable Rules): Adjust.
9934 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
9935 * tests/conflicts.at (Unresolved SR Conflicts)
9936 (Solved SR Conflicts): Adjust.
9937
ee000ba4
AD
99382002-06-15 Akim Demaille <akim@epita.fr>
9939
9940 Let symbols have a location.
9941
9942 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
9943 (getsym): Adjust.
9944 Adjust all callers.
9945 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
9946 Use location_t, not int.
9947 * src/symtab.c (symbol_check_defined): Take advantage of the
9948 location.
9949 * tests/regression.at (Invalid inputs): Adjust.
9950
8efe435c
AD
99512002-06-15 Akim Demaille <akim@epita.fr>
9952
9953 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
9954 (input): Don't try to initialize yylloc here, do it in the
9955 scanner.
9956 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
9957 * src/gram.h (rule_t): Change line and action_line into location
9958 and action_location, of location_t type.
9959 Adjust all dependencies.
9960 * src/location.h, src/location.c (empty_location): New.
9961 * src/reader.h, src/reader.c (grammar_start_symbol_set)
9962 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
9963 (grammar_current_rule_symbol_append)
9964 (grammar_current_rule_action_append): Expect a location as argument.
9965 * src/reader.c (grammar_midrule_action): Adjust to attach an
9966 action's location as dummy symbol location.
9967 * src/symtab.h, src/symtab.c (startsymbol_location): New.
9968 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
9969 the line numbers.
9970
1921f1d7
AD
99712002-06-14 Akim Demaille <akim@epita.fr>
9972
9973 Grammar declarations may be found in the grammar section.
9974
9975 * src/parse-gram.y (rules_or_grammar_declaration): New.
9976 (declarations): Each declaration may end with a semicolon, not
9977 just...
9978 (grammar_declaration): `"%union"'.
9979 (grammar): Branch to rules_or_grammar_declaration.
9980
4515534c
AD
99812002-06-14 Akim Demaille <akim@epita.fr>
9982
9983 * src/main.c (main): Invoke scanner_free.
9984
f958596b
AD
99852002-06-14 Akim Demaille <akim@epita.fr>
9986
9987 * src/output.c (m4_invoke): Extracted from...
9988 (output_skeleton): here.
9989 Free tempfile.
9990
2c569025
AD
99912002-06-14 Akim Demaille <akim@epita.fr>
9992
9993 * src/parse-gram.y (directives, directive, gram)
9994 (grammar_directives, precedence_directives, precedence_directive):
9995 Rename as...
9996 (declarations, declaration, grammar, grammar_declaration)
9997 (precedence_declaration, precedence_declarator): these.
9998 (symbol_declaration): New.
9999
592e8d4d
AD
100002002-06-14 Akim Demaille <akim@epita.fr>
10001
10002 * src/files.c (action_obstack): Remove, unused.
10003 (output_obstack): Remove it, and all its dependencies, as it is no
10004 longer needed.
10005 * src/reader.c (epilogue_set): Build the epilogue in the
10006 muscle_obstack.
10007 * src/output.h, src/output.c (muscle_obstack): Move to...
10008 * src/muscle_tab.h, src/muscle_tab.h: here.
10009 (muscle_init): Initialize muscle_obstack.
10010 (muscle_free): New.
10011 * src/main.c (main): Call it.
10012
0c15323d
AD
100132002-06-14 Akim Demaille <akim@epita.fr>
10014
10015 * src/location.h: New, extracted from...
10016 * src/reader.h: here.
10017 * src/Makefile.am (noinst_HEADERS): Merge into
10018 (bison_SOURCES): this.
10019 Add location.h.
10020 * src/parse-gram.y: Use location_t instead of Bison's.
10021 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
10022 Use location_t instead of ints.
10023
e96c9728
AD
100242002-06-14 Akim Demaille <akim@epita.fr>
10025
10026 * data/bison.simple, data/bison.c++: Be sure to restore the
10027 current #line when returning to the skeleton contents after having
10028 exposed the input file's #line.
10029
75d1fe16
AD
100302002-06-12 Akim Demaille <akim@epita.fr>
10031
10032 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
10033 eager.
10034 * tests/actions.at (Exotic Dollars): New.
10035
6c35d22c
AD
100362002-06-12 Akim Demaille <akim@epita.fr>
10037
10038 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
10039 ['"/] too eagerly.
10040 * tests/input.at (Torturing the Scanner): New.
10041
1d6412ad
AD
100422002-06-11 Akim Demaille <akim@epita.fr>
10043
10044 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
10045 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
10046 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
10047 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
10048 * src/reader.c (reader): Use it.
10049
4cdb01db
AD
100502002-06-11 Akim Demaille <akim@epita.fr>
10051
10052 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
10053 Adjust all callers.
10054 (scanner_last_string_free): New.
10055
44995b2e
AD
100562002-06-11 Akim Demaille <akim@epita.fr>
10057
10058 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
10059 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
10060 (last_string, YY_OBS_FREE): New.
10061 Use them when returning an ID.
10062
e9955c83
AD
100632002-06-11 Akim Demaille <akim@epita.fr>
10064
10065 Have Bison grammars parsed by a Bison grammar.
10066
10067 * src/reader.c, src/reader.h (prologue_augment): New.
10068 * src/reader.c (copy_definition): Remove.
10069
10070 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
10071 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
10072 (grammar_current_rule_prec_set, grammar_current_rule_check)
10073 (grammar_current_rule_symbol_append)
10074 (grammar_current_rule_action_append): Export.
10075 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
10076 (symbol_list_action_append): Remove.
10077 Hook the routines from reader.
10078 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
10079 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
10080
10081 * src/reader.c (read_declarations): Remove, unused.
10082
10083 * src/parse-gram.y: Handle the epilogue.
10084 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
10085 (grammar_start_symbol_set): this.
10086 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
10087 * src/reader.c (readgram): Remove, unused.
10088 (reader): Adjust to insert eoftoken and axiom where appropriate.
10089
10090 * src/reader.c (copy_dollar): Replace with...
10091 * src/scan-gram.h (handle_dollar): this.
10092 * src/parse-gram.y: Remove `%thong'.
10093
10094 * src/reader.c (copy_at): Replace with...
10095 * src/scan-gram.h (handle_at): this.
10096
10097 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
10098 New.
10099
10100 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
10101 time being.
10102
10103 * src/reader.h, src/reader.c (grammar_rule_end): New.
10104
10105 * src/parse.y (current_type, current_class): New.
10106 Implement `%nterm', `%token' support.
10107 Merge `%term' into `%token'.
10108 (string_as_id): New.
10109 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
10110 type name.
10111
10112 * src/parse-gram.y: Be sure to handle properly the beginning of
10113 rules.
10114
10115 * src/parse-gram.y: Handle %type.
10116 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
10117
10118 * src/parse-gram.y: More directives support.
10119 * src/options.c: No longer handle source directives.
10120
10121 * src/parse-gram.y: Fix %output.
10122
10123 * src/parse-gram.y: Handle %union.
10124 Use the prologue locations.
10125 * src/reader.c (parse_union_decl): Remove.
10126
10127 * src/reader.h, src/reader.c (epilogue_set): New.
10128 * src/parse-gram.y: Use it.
10129
10130 * data/bison.simple, data/bison.c++: b4_stype is now either not
10131 defined, then default to int, or to the contents of %union,
10132 without `union' itself.
10133 Adjust.
10134 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
10135
10136 * src/output.c (actions_output): Don't output braces, as they are
10137 already handled by the scanner.
10138
10139 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
10140 characters to themselves.
10141
10142 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
10143 that the epilogue has a proper #line.
10144
10145 * src/parse-gram.y: Handle precedence/associativity.
10146
10147 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
10148 a terminal.
10149 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
10150 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
10151 at all to define terminals that cannot be emitted.
10152
10153 * src/scan-gram.l: Escape M4 characters.
10154
10155 * src/scan-gram.l: Working properly with escapes in user
10156 strings/characters.
10157
10158 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
10159 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
10160 grammar.
10161 Use more modest sizes, as for the time being the parser does not
10162 release memory, and therefore the process swallows a huge amount
10163 of memory.
10164
10165 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
10166 stricter %token grammar.
10167
10168 * src/symtab.h (associativity): Add `undef_assoc'.
10169 (symbol_precedence_set): Do nothing when passed an undef_assoc.
10170 * src/symtab.c (symbol_check_alias_consistence): Adjust.
10171
10172 * tests/regression.at (Invalid %directive): Remove, as it is now
10173 meaningless.
10174 (Invalid inputs): Adjust to the new error messages.
10175 (Token definitions): The new grammar doesn't allow too many
10176 eccentricities.
10177
10178 * src/lex.h, src/lex.c: Remove.
10179 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
10180 (copy_character, copy_string2, copy_string, copy_identifier)
10181 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
10182 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
10183 (parse_action): Remove.
10184 * po/POTFILES.in: Adjust.
10185
2e047461
AD
101862002-06-11 Akim Demaille <akim@epita.fr>
10187
cd05d13c 10188 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
10189 rule's action member: return the action as a string.
10190 Don't require `rule_length' as an argument: compute it.
10191 (grammar_current_rule_symbol_append)
10192 (grammar_current_rule_action_append): New, eved out from
10193 (readgram): here.
10194 Remove `action_flag', `rulelength', unused now.
10195
9af3fbce
AD
101962002-06-11 Akim Demaille <akim@epita.fr>
10197
10198 * src/reader.c (grammar_current_rule_prec_set).
10199 (grammar_current_rule_check): New, eved out from...
10200 (readgram): here.
10201 Remove `xaction', `first_rhs': useless.
10202 * tests/input.at (Type clashes): New.
10203 * tests/existing.at (GNU Cim Grammar): Adjust.
10204
1485e106
AD
102052002-06-11 Akim Demaille <akim@epita.fr>
10206
10207 * src/reader.c (grammar_midrule_action): New, Eved out from
10208 (readgram): here.
10209
da4160c3
AD
102102002-06-11 Akim Demaille <akim@epita.fr>
10211
10212 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
10213 New.
10214 (readgram): Use them as replacement of inlined code, crule and
10215 crule1.
10216
f6d0f937
AD
102172002-06-11 Akim Demaille <akim@epita.fr>
10218
10219 * src/reader.c (grammar_end, grammar_symbol_append): New.
10220 (readgram): Use them.
10221 Make the use of `p' as local as possible.
10222
69078d4b
AD
102232002-06-10 Akim Demaille <akim@epita.fr>
10224
10225 GCJ's parser requires the tokens to be defined before the prologue.
10226
10227 * data/bison.simple: Output the token definition before the user's
10228 prologue.
10229 * tests/regression.at (Braces parsing, Duplicate string)
10230 (Mixing %token styles): Check the output from bison.
10231 (Early token definitions): New.
10232
5e424082
AD
102332002-06-10 Akim Demaille <akim@epita.fr>
10234
10235 * src/symtab.c (symbol_user_token_number_set): Don't complain when
10236 assigning twice the same user number to a token, so that we can
10237 use it in...
10238 * src/lex.c (lex): here.
10239 Also use `symbol_class_set' instead of hand written code.
10240 * src/reader.c (parse_assoc_decl): Likewise.
10241
44536b35
AD
102422002-06-10 Akim Demaille <akim@epita.fr>
10243
10244 * src/symtab.c, src/symtab.c (symbol_class_set)
10245 (symbol_user_token_number_set): New.
10246 * src/reader.c (parse_token_decl): Use them.
10247 Use a switch instead of ifs.
10248 Use a single argument.
10249
8b9f2372
AD
102502002-06-10 Akim Demaille <akim@epita.fr>
10251
10252 Remove `%thong' support as it is undocumented, unused, duplicates
10253 `%token's job, and creates useless e-mail traffic with people who
10254 want to know what it is, why it is undocumented, unused, and
10255 duplicates `%token's job.
10256
10257 * src/reader.c (parse_thong_decl): Remove.
10258 * src/options.c (option_table): Remove "thong".
10259 * src/lex.h (tok_thong): Remove.
10260
3ae2b51f
AD
102612002-06-10 Akim Demaille <akim@epita.fr>
10262
10263 * src/symtab.c, src/symtab.c (symbol_type_set)
10264 (symbol_precedence_set): New.
10265 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
10266 (value_components_used): Remove, unused.
10267
2f1afb73
AD
102682002-06-09 Akim Demaille <akim@epita.fr>
10269
10270 Move symbols handling code out of the reader.
10271
10272 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
10273 (axiom): Move to...
10274 * src/symtab.h, src/symtab.c: here.
10275
10276 * src/gram.c (start_symbol): Remove: use startsymbol->number.
10277 * src/reader.c (startval): Rename as...
10278 * src/symtab.h, src/symtab.c (startsymbol): this.
10279 * src/reader.c: Adjust.
10280
10281 * src/reader.c (symbol_check_defined, symbol_make_alias)
10282 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
10283 (token_translations_init)
10284 Move to...
10285 * src/symtab.c: here.
10286 * src/reader.c (packsymbols): Move to...
10287 * src/symtab.h, src/symtab.c (symbols_pack): here.
10288 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
10289 argument.
10290
e9bca3ad
AD
102912002-06-03 Akim Demaille <akim@epita.fr>
10292
10293 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
10294 then statements.
10295
86eff183
AD
102962002-06-03 Akim Demaille <akim@epita.fr>
10297
10298 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
10299 structs with non literals.
10300 * src/scan-skel.l: never-interactive.
10301 * src/conflicts.c (enum conflict_resolution_e): No trailing
10302 comma.
10303 * src/getargs.c (usage): Split long literal strings.
10304 Reported by Hans Aberg.
10305
717be197
AD
103062002-05-28 Akim Demaille <akim@epita.fr>
10307
10308 * data/bison.c++: Use C++ ostreams.
10309 (cdebug_): New member.
10310
670ddffd
AD
103112002-05-28 Akim Demaille <akim@epita.fr>
10312
10313 * src/output.c (output_skeleton): Be sure to allocate enough room
10314 for `/' _and_ for `\0' in full_skeleton.
10315
769b430f
AD
103162002-05-28 Akim Demaille <akim@epita.fr>
10317
10318 * data/bison.c++: Catch up with bison.simple:
10319 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10320 and Paul Eggert <eggert@twinsun.com>: `error' handing.
10321 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
10322 and popping traces.
10323
7067cb36
PH
103242002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10325
10326 * src/output.c (output_skeleton): Put an explicit path in front of
10327 the skeleton file name, rather than relying on the -I directory,
10328 to partially alleviate effects of having a skeleton file lying around
10329 in the current directory.
769b430f 10330
4a713ec2
PH
103312002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10332
769b430f 10333 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
10334 obstack_printf should be obstack_fgrow1.
10335
b408954b
AD
103362002-05-26 Akim Demaille <akim@epita.fr>
10337
10338 * src/state.h (state_t): `solved_conflicts' is a new member.
10339 * src/LR0.c (new_state): Set it to 0.
10340 * src/conflicts.h, src/conflicts.c (print_conflicts)
10341 (free_conflicts, solve_conflicts): Rename as...
10342 (conflicts_print, conflicts_free, conflicts_solve): these.
10343 Adjust callers.
10344 * src/conflicts.c (enum conflict_resolution_e)
10345 (solved_conflicts_obstack): New, used by...
10346 (log_resolution): this.
10347 Adjust to attach the conflict resolution to each state.
10348 Complete the description with the precedence/associativity
10349 information.
10350 (resolve_sr_conflict): Adjust.
10351 * src/print.c (print_state): Output its solved_conflicts.
10352 * tests/conflicts.at (Unresolved SR Conflicts)
10353 (Solved SR Conflicts): Exercise --report=all.
10354
a49aecd5
AD
103552002-05-26 Akim Demaille <akim@epita.fr>
10356
10357 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10358 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
10359 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
10360 (token_number_t, item_number_as_token_number)
10361 (token_number_as_item_number, muscle_insert_token_number_table):
10362 Rename as...
10363 (symbol_number_t, item_number_as_symbol_number)
10364 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
10365 these, since it is more appropriate.
10366
5504898e
AD
103672002-05-26 Akim Demaille <akim@epita.fr>
10368
10369 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
10370 `Error:' lines.
10371 * data/bison.simple (yystos) [YYDEBUG]: New.
10372 (yyparse) [YYDEBUG]: Display the symbols which are popped during
10373 error recovery.
10374 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
10375
ec3bc396
AD
103762002-05-25 Akim Demaille <akim@epita.fr>
10377
10378 * doc/bison.texinfo (Debugging): Split into...
10379 (Tracing): this new section, its former contents, and...
10380 (Understanding): this new section.
10381 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
10382 by...
10383 (report_flag): this.
10384 Adjust all dependencies.
10385 (report_args, report_types, report_argmatch): New.
10386 (usage, getargs): Report/support -r, --report.
10387 * src/options.h
10388 (struct option_table_struct): Rename as..,
10389 (struct option_table_s): this.
10390 Rename the `set_flag' member to `flag' to match with getopt_long's
10391 struct.
10392 * src/options.c (option_table): Split verbose into an entry for
10393 %verbose, and another for --verbose.
10394 Support --report/-r, so remove -r from the obsolete --raw.
10395 * src/print.c: Attach full item sets and lookaheads reports to
10396 report_flag instead of trace_flag.
10397 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
10398
78df8250
PE
103992002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10400 and Paul Eggert <eggert@twinsun.com>
769b430f 10401
78df8250
PE
10402 * data/bison.simple (yyparse): Correct error handling to conform to
10403 POSIX and yacc. Specifically, after syntax error is discovered,
10404 do not reduce further before shifting the error token.
10405 Clean up the code a bit by removing the labels yyerrdefault,
10406 yyerrhandle, yyerrpop.
10407 * NEWS: Document the above.
10408
c0c9ea05
PH
104092002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10410
10411 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
10412 type; it isn't always big enough, since it doesn't necessarily
10413 include non-terminals.
769b430f 10414 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
10415 the latter can be removed.
10416 (yy_token_number_type): Remove, only one use.
10417 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
10418 don't use TokenNumberType as element type.
769b430f 10419
c0c9ea05
PH
10420 * tests/regression.at: Modify expected output to agree with change
10421 to yyr1 and yytranslate.
769b430f 10422
6390a83f
FK
104232002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
10424
10425 * src/reader.c (parse_action): Use copy_character instead of
10426 obstack_1grow.
10427
db7c8e9a
AD
104282002-05-13 Akim Demaille <akim@epita.fr>
10429
10430 * tests/regression.at (Token definitions): Prototype yylex and
10431 yyerror.
10432
fcc61800
PH
104332002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10434
158c687b 10435 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
10436 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
10437 32-bit arithmetic.
10438 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
10439
5683e9b2
AD
104402002-05-07 Akim Demaille <akim@epita.fr>
10441
10442 * tests/synclines.at: Be sure to prototype yylex and yyerror to
10443 avoid GCC warnings.
10444
0c2d3f4c
AD
104452002-05-07 Akim Demaille <akim@epita.fr>
10446
10447 Kill GCC warnings.
10448
10449 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
10450 over the RHS of each rule.
10451 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
10452 * src/state.h (state_t): Member `nitems' is unsigned short.
10453 * src/LR0.c (get_state): Adjust.
10454 * src/reader.c (packgram): Likewise.
10455 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
10456 `Type'.
10457 (muscle_insert_int_table): Remove, unused.
10458 (prepare_rules): Remove `max'.
10459
1565b720
AD
104602002-05-06 Akim Demaille <akim@epita.fr>
10461
10462 * src/closure.c (print_firsts): Display of the symbol tags.
10463 (bitmatrix_print): Move to...
10464 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
10465 here.
10466 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
10467
cfaee611
AD
104682002-05-06 Akim Demaille <akim@epita.fr>
10469
10470 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
10471 hash_do_for_each.
10472
458be8e0
AD
104732002-05-06 Akim Demaille <akim@epita.fr>
10474
10475 * src/LR0.c (new_state, get_state): Instead of using the global
10476 `kernel_size' and `kernel_base', have two new arguments:
10477 `core_size' and `core'.
10478 Adjust callers.
10479
a900a624
AD
104802002-05-06 Akim Demaille <akim@epita.fr>
10481
10482 * src/reader.c (packgram): No longer end `ritem' with a 0
10483 sentinel: it is not used.
10484
d4e7d3a1
AD
104852002-05-05 Akim Demaille <akim@epita.fr>
10486
10487 New experimental feature: display the lookaheads in the report and
10488 graph.
10489
10490 * src/print (print_core): When --trace-flag, display the rules
10491 lookaheads.
10492 * src/print_graph.c (print_core): Likewise.
10493 Swap the arguments.
10494 Adjust caller.
10495
39ceb25b
AD
104962002-05-05 Akim Demaille <akim@epita.fr>
10497
10498 * tests/torture.at (Many lookaheads): New test.
10499
5372019f
AD
105002002-05-05 Akim Demaille <akim@epita.fr>
10501
10502 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
10503 (GENERATE_MUSCLE_INSERT_TABLE): this.
10504 (output_int_table, output_unsigned_int_table, output_short_table)
10505 (output_token_number_table, output_item_number_table): Replace with...
10506 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
10507 (muscle_insert_short_table, muscle_insert_token_number_table)
10508 (muscle_insert_item_number_table): these.
10509 Adjust all callers.
10510 (prepare_tokens): Don't free `translations', since...
10511 * src/reader.h, src/reader.c (grammar_free): do it.
10512 Move to...
10513 * src/gram.h, src/gram.c (grammar_free): here.
10514 * data/bison.simple, data/bison.c++: b4_token_number_max is now
10515 b4_translate_max.
10516
5df5f6d5
AD
105172002-05-05 Akim Demaille <akim@epita.fr>
10518
10519 * src/output.c (output_unsigned_int_table): New.
10520 (prepare_rules): `i' is unsigned.
10521 `prhs', `rline', `r2' are unsigned int.
10522 Rename muscle `rhs_number_max' as `rhs_max'.
10523 Output muscles `prhs_max', `rline_max', and `r2_max'.
10524 Free rline and r1.
10525 * data/bison.simple, data/bison.c++: Adjust to use these muscles
10526 to compute types instead of constant types.
10527 * tests/regression.at (Web2c Actions): Adjust.
10528
b87f8b21
AD
105292002-05-04 Akim Demaille <akim@epita.fr>
10530
10531 * src/symtab.h (SALIAS, SUNDEF): Rename as...
10532 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
10533 Adjust dependencies.
10534 * src/output.c (token_definitions_output): Be sure not to output a
10535 `#define 'a'' when fed with `%token 'a' "a"'.
10536 * tests/regression.at (Token definitions): New.
10537
8bb936e4
PE
105382002-05-03 Paul Eggert <eggert@twinsun.com>
10539
10540 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
10541 for K&R C.
10542
105432002-05-03 gettextize <bug-gnu-gettext@gnu.org>
10544
10545 * Makefile.am (SUBDIRS): Remove intl.
10546 (EXTRA_DIST): Add config/config.rpath.
10547
53c71a12
AD
105482002-05-03 Akim Demaille <akim@epita.fr>
10549
10550 * data/bison.simple (m4_if): Don't output empty enums.
10551 And actually, output valid enum definitions :(.
10552
289dd0cf
AD
105532002-05-03 Akim Demaille <akim@epita.fr>
10554
10555 * configure.bat: Remove, completely obsolete.
10556 * Makefile.am (EXTRA_DIST): Adjust.
10557 Don't distribute config.rpath...
10558 * config/Makefile.am (EXTRA_DIST): Do it.
10559
db85e524
AD
105602002-05-03 Akim Demaille <akim@epita.fr>
10561
10562 * configure.in (GETTEXT_VERSION): New.
10563 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
10564
83ccf991
AD
105652002-05-03 Akim Demaille <akim@epita.fr>
10566
10567 * data/bison.simple (b4_token_enum): New.
10568 (b4_token_defines): Use it to output tokens both as #define and
10569 enums.
10570 Suggested by Paul Eggert.
10571 * src/output.c (token_definitions_output): Don't output spurious
10572 white spaces.
10573
1f418995
AD
105742002-05-03 Akim Demaille <akim@epita.fr>
10575
10576 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
10577
45119f04
RA
105782002-05-02 Robert Anisko <robert@lrde.epita.fr>
10579
10580 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
10581 Update the stack class, give a try to deque as the default container.
10582
b2d52318
AD
105832002-05-02 Akim Demaille <akim@epita.fr>
10584
10585 * data/bison.simple (yyparse): Do not implement @$ = @1.
10586 (YYLLOC_DEFAULT): Adjust to do it.
10587 * doc/bison.texinfo (Location Default Action): Fix.
10588
3a8b4109
AD
105892002-05-02 Akim Demaille <akim@epita.fr>
10590
10591 * src/reader.c (parse_braces): Merge into...
10592 (parse_action): this.
10593
84614e13
AD
105942002-05-02 Akim Demaille <akim@epita.fr>
10595
10596 * configure.in (ALL_LINGUAS): Remove.
10597 * po/LINGUAS, hr.po: New.
10598
fdbcd8e2
AD
105992002-05-02 Akim Demaille <akim@epita.fr>
10600
10601 Remove the so called hairy (semantic) parsers.
10602
10603 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
10604 * src/gram.h, src/gram.c (semantic_parser): Remove.
10605 (rule_t): Remove the guard and guard_line members.
10606 * src/lex.h (token_t): remove tok_guard.
10607 * src/options.c (option_table): Remove %guard and %semantic_parser
10608 support.
10609 * src/output.c, src/output.h (guards_output): Remove.
10610 (prepare): Adjust.
10611 (token_definitions_output): Don't output the `T'
10612 tokens (???).
10613 (output_skeleton): Don't output the guards.
10614 * src/files.c, src/files.c (attrsfile): Remove.
10615 * src/reader.c (symbol_list): Remove the guard and guard_line
10616 members.
10617 Adjust dependencies.
10618 (parse_guard): Remove.
10619 * data/bison.hairy: Remove.
10620 * doc/bison.texinfo (Environment Variables): Remove occurrences of
10621 BISON_HAIRY.
10622
82b6cb3f
AD
106232002-05-02 Akim Demaille <akim@epita.fr>
10624
10625 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
10626 (parse_guard): Rename the formal argument `stack_offset' as
10627 `rule_length', which is more readable.
10628 Adjust callers.
10629 (copy_at, copy_dollar): Instead of outputting the hard coded
10630 values of $$, $n and so forth, output invocation to b4_lhs_value,
10631 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
10632 Note: this patch partially drops `semantic-parser' support: it
10633 always does `rule_length - n', where semantic parsers ought to
10634 always use `-n'.
82b6cb3f
AD
10635 * data/bison.simple, data/bison.c++ (b4_lhs_value)
10636 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
10637
6cbfbcc5
AD
106382002-05-02 Akim Demaille <akim@epita.fr>
10639
10640 * configure.in (AC_INIT): Bump to 1.49b.
10641 (AM_INIT_AUTOMAKE): Short invocation.
10642
b8548114
AD
106432002-05-02 Akim Demaille <akim@epita.fr>
10644
10645 Version 1.49a.
10646
c20cd1fa
AD
106472002-05-01 Akim Demaille <akim@epita.fr>
10648
10649 * src/skeleton.h: Remove.
10650
8a9566d4
AD
106512002-05-01 Akim Demaille <akim@epita.fr>
10652
10653 * src/skeleton.h: Fix the #endif.
10654 Reported by Magnus Fromreide.
10655
8c6d399a
PE
106562002-04-26 Paul Eggert <eggert@twinsun.com>
10657
10658 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
10659 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 10660 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 10661
2b7ed18a
RA
106622002-04-25 Robert Anisko <robert@lrde.epita.fr>
10663
10664 * src/scan-skel.l: Postprocess quadrigraphs.
10665
10666 * src/reader.c (copy_character): New function, used to output
10667 single characters while replacing `[' and `]' with quadrigraphs, to
10668 avoid troubles with M4 quotes.
10669 (copy_comment): Output characters with copy_character.
10670 (read_additionnal_code): Likewise.
10671 (copy_string2): Likewise.
10672 (copy_definition): Likewise.
10673
10674 * tests/calc.at: Exercise M4 quoting.
10675
34a89c50
AD
106762002-04-25 Akim Demaille <akim@epita.fr>
10677
10678 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
10679 between `!' and the command.
10680 Reported by Paul Eggert.
10681
0dd1580a
RA
106822002-04-24 Robert Anisko <robert@lrde.epita.fr>
10683
10684 * tests/calc.at: Exercise prologue splitting.
10685
10686 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
10687 `b4_post_prologue' instead of `b4_prologue'.
10688
10689 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
10690 muscles.
10691 (output): Free pre_prologue_obstack and post_prologue_obstack.
10692 * src/files.h, src/files.c (attrs_obstack): Remove.
10693 (pre_prologue_obstack, post_prologue_obstack): New.
10694 * src/reader.c (copy_definition): Add a parameter to specify the
10695 obstack to fill, instead of using attrs_obstack unconditionally.
10696 (read_declarations): Pass pre_prologue_obstack to copy_definition if
10697 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
10698
83c1796f
PE
106992002-04-23 Paul Eggert <eggert@twinsun.com>
10700
10701 * data/bison.simple: Remove unnecessary commentary and white
10702 space differences from 1_29-branch.
10703 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
10704
10705 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
10706 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
10707 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
10708 constructors or destructors.
10709
10710 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
10711
1207eeac
AD
107122002-04-23 Akim Demaille <akim@epita.fr>
10713
10714 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
10715 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
10716 location with columns.
10717 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
10718 All reported by Paul Eggert.
10719
78ab8f67
AD
107202002-04-22 Akim Demaille <akim@epita.fr>
10721
10722 * src/reduce.c (dump_grammar): Move to...
10723 * src/gram.h, src/gram.c (grammar_dump): here.
10724 Be sure to separate long item numbers.
10725 Don't read the members of a rule's prec if its nil.
10726
133c20e2
AD
107272002-04-22 Akim Demaille <akim@epita.fr>
10728
10729 * src/output.c (table_size, table_grow): New.
10730 (MAXTABLE): Remove, replace uses with table_size.
10731 (pack_vector): Instead of dying when the table is too big, grow it.
10732
9515e8a7
AD
107332002-04-22 Akim Demaille <akim@epita.fr>
10734
10735 * data/bison.simple (yyr1): Its type is that of a token number.
10736 * data/bison.c++ (r1_): Likewise.
10737 * tests/regression.at (Web2c Actions): Adjust.
10738
23c5a174
AD
107392002-04-22 Akim Demaille <akim@epita.fr>
10740
10741 * src/reader.c (token_translations_init): 256 is now the default
10742 value for the error token, i.e., it will be assigned another
10743 number if the user assigned 256 to one of her tokens.
10744 (reader): Don't force 256 to error.
10745 * doc/bison.texinfo (Symbols): Adjust.
10746 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
10747 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
10748 etc. instead of 10, 20, 30 (which was used to `jump' over error
10749 (256) and undefined (2)).
10750
5fbb0954
AD
107512002-04-22 Akim Demaille <akim@epita.fr>
10752
10753 Propagate more token_number_t.
10754
10755 * src/gram.h (token_number_as_item_number)
10756 (item_number_as_token_number): New.
10757 * src/output.c (GENERATE_OUTPUT_TABLE): New.
10758 Use it to create output_item_number_table and
10759 output_token_number_table.
10760 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
10761 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
10762 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
10763 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
10764
4f940944
AD
107652002-04-22 Akim Demaille <akim@epita.fr>
10766
10767 * src/output.h, src/output.c (get_lines_number): Remove.
10768
3ded9a63
AD
107692002-04-19 Akim Demaille <akim@epita.fr>
10770
10771 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
10772 as Lex/Flex'.
10773 (Debugging): More details about enabling the debugging features.
10774 (Table of Symbols): Describe $$, $n, @$, and @n.
10775 Suggested by Tim Josling.
10776
e0c471a9
AD
107772002-04-19 Akim Demaille <akim@epita.fr>
10778
10779 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
10780
fecc10cd
AD
107812002-04-10 Akim Demaille <akim@epita.fr>
10782
10783 * src/system.h: Rely on HAVE_LIMITS_H.
10784 Suggested by Paul Eggert.
10785
51dec47b
AD
107862002-04-09 Akim Demaille <akim@epita.fr>
10787
10788 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
10789 full stderr, and strip it according to the bison options, instead
10790 of composing the error message from different bits.
10791 This makes it easier to check for several error messages.
10792 Adjust all the invocations.
10793 Add an invocation exercising the error token.
10794 Add an invocation demonstrating a stupid error message.
10795 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
10796 Adjust the tests.
10797 Error message are for stderr, not stdout.
10798
007a50a4
AD
107992002-04-09 Akim Demaille <akim@epita.fr>
10800
10801 * src/gram.h, src/gram.c (error_token_number): Remove, use
10802 errtoken->number.
10803 * src/reader.c (reader): Don't specify the user token number (2)
10804 for $undefined, as it uselessly prevents using it.
10805 * src/gram.h (token_number_t): Move to...
10806 * src/symtab.h: here.
10807 (state_t.number): Is a token_number_t.
10808 * src/print.c, src/reader.c: Use undeftoken->number instead of
10809 hard coded 2.
10810 (Even though this 2 is not the same as above: the number of the
10811 undeftoken remains being 2, it is its user token number which
10812 might not be 2).
10813 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
10814 `user_token_number_max'.
10815 Output `undef_token_number'.
10816 * data/bison.simple, data/bison.c++: Use them.
10817 Be sure to map invalid yylex return values to
10818 `undef_token_number'. This saves us from gratuitous SEGV.
10819
10820 * tests/conflicts.at (Solved SR Conflicts)
10821 (Unresolved SR Conflicts): Adjust.
10822 * tests/regression.at (Web2c Actions): Adjust.
10823
06446ccf
AD
108242002-04-08 Akim Demaille <akim@epita.fr>
10825
10826 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
10827 Adding #line.
10828 Remove the duplicate `typedefs'.
10829 (RhsNumberType): Fix the declaration and various other typos.
10830 Use __ofile__.
10831 * data/bison.simple: Use __ofile__.
10832 * src/scan-skel.l: Handle __ofile__.
10833
62a3e4f0
AD
108342002-04-08 Akim Demaille <akim@epita.fr>
10835
10836 * src/gram.h (item_number_t): New, the type of item numbers in
10837 RITEM. Note that it must be able to code symbol numbers as
10838 positive number, and the negation of rule numbers as negative
10839 numbers.
10840 Adjust all dependencies (pretty many).
10841 * src/reduce.c (rule): Remove this `short *' pointer: use
10842 item_number_t.
10843 * src/system.h (MINSHORT, MAXSHORT): Remove.
10844 Include `limits.h'.
10845 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
10846 (shortcpy): Remove.
10847 (MAXTABLE): Move to...
10848 * src/output.c (MAXTABLE): here.
10849 (prepare_rules): Use output_int_table to output rhs.
10850 * data/bison.simple, data/bison.c++: Adjust.
10851 * tests/torture.at (Big triangle): Move the limit from 254 to
10852 500.
10853 * tests/regression.at (Web2c Actions): Ajust.
10854
10855 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
10856 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
10857 passes, but produces negative #line number, once fixed, GCC is
10858 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
10859 C), it passes.
10860 * src/state.h (state_h): Code input lines on ints, not shorts.
10861
bb88b0fc
AD
108622002-04-08 Akim Demaille <akim@epita.fr>
10863
10864 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
10865 and then the grammar.
10866
9a636f47
AD
108672002-04-08 Akim Demaille <akim@epita.fr>
10868
10869 * src/system.h: No longer using strndup.
10870
680e8701
AD
108712002-04-07 Akim Demaille <akim@epita.fr>
10872
10873 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
10874 * src/output.c (output_table_data): Return the longest number.
10875 (prepare_tokens): Output `token_number_max').
10876 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
10877 New.
10878 Use them to define yy_token_number_type/TokenNumberType.
10879 Use this type for yytranslate.
10880 * tests/torture.at (Big triangle): Push the limit from 124 to
10881 253.
10882 * tests/regression.at (Web2c Actions): Adjust.
10883
817e9f41
AD
108842002-04-07 Akim Demaille <akim@epita.fr>
10885
10886 * tests/torture.at (Big triangle): New.
10887 (GNU AWK Grammar, GNU Cim Grammar): Move to...
10888 * tests/existing.at: here.
10889
5123689b
AD
108902002-04-07 Akim Demaille <akim@epita.fr>
10891
10892 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
10893 nritems.
10894 Adjust dependencies.
10895
f3849179
AD
108962002-04-07 Akim Demaille <akim@epita.fr>
10897
10898 * src/reader.c: Normalize increments to prefix form.
10899
bd02036a
AD
109002002-04-07 Akim Demaille <akim@epita.fr>
10901
10902 * src/reader.c, symtab.c: Remove debugging code.
10903
db8837cb
AD
109042002-04-07 Akim Demaille <akim@epita.fr>
10905
10906 Rename all the `bucket's as `symbol_t'.
10907
10908 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
10909 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
10910 * src/symtab.c, src/symtab.h (bucket): Rename as...
10911 (symbol_t): this.
10912 (symbol_list_new, bucket_check_defined, bucket_make_alias)
10913 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
10914 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
10915 (buckets_new, buckets_free, buckets_do): Rename as...
10916 (symbol_list_new, symbol_check_defined, symbol_make_alias)
10917 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
10918 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
10919 (symbols_new, symbols_free, symbols_do): these.
10920
72a23c97
AD
109212002-04-07 Akim Demaille <akim@epita.fr>
10922
10923 Use lib/hash for the symbol table.
10924
10925 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
10926 EOF.
10927 * src/lex.c (lex): Set the `number' member of new terminals.
10928 * src/reader.c (bucket_check_defined, bucket_make_alias)
10929 (bucket_check_alias_consistence, bucket_translation): New.
10930 (reader, grammar_free, readgram, token_translations_init)
10931 (packsymbols): Adjust.
10932 (reader): Number the predefined tokens.
10933 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
10934 for predefined tokens.
10935 * src/symtab.h (bucket): Remove all the hash table related
10936 members.
10937 * src/symtab.c (symtab): Replace by...
10938 (bucket_table): this.
10939 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
10940 (buckets_new, buckets_do): New.
10941
280a38c3
AD
109422002-04-07 Akim Demaille <akim@epita.fr>
10943
10944 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
10945 (start_symbol, max_user_token_number, semantic_parser)
10946 (error_token_number): Initialize.
10947 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
10948 Initialize.
10949 (reader): Don't.
10950 (errtoken, eoftoken, undeftoken, axiom): Extern.
10951
03b31c0c
AD
109522002-04-07 Akim Demaille <akim@epita.fr>
10953
10954 * src/gram.h (rule_s): prec and precsym are now pointers
10955 to the bucket giving the priority/associativity.
10956 Member `associativity' removed: useless.
10957 * src/reduce.c, src/conflicts.c: Adjust.
10958
8b3df748
AD
109592002-04-07 Akim Demaille <akim@epita.fr>
10960
10961 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
10962 Properly escape the symbols' TAG when outputting them.
10963
e601aa1d
AD
109642002-04-07 Akim Demaille <akim@epita.fr>
10965
10966 * src/lalr.h (LA): Is a bitsetv, not bitset*.
10967
b0299a2e
AD
109682002-04-07 Akim Demaille <akim@epita.fr>
10969
10970 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
10971 (LArule): this, which is an array to rule_t*.
10972 * src/print.c, src/conflicts.c: Adjust.
10973
d7e1f00c
AD
109742002-04-07 Akim Demaille <akim@epita.fr>
10975
10976 * src/gram.h (rule_t): Rename `number' as `user_number'.
10977 `number' is a new member.
10978 Adjust dependencies.
10979 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
10980
cc9305dd
AD
109812002-04-07 Akim Demaille <akim@epita.fr>
10982
10983 As a result of the previous patch, it is no longer needed
10984 to reorder ritem itself.
10985
10986 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
10987
b0940840
AD
109882002-04-07 Akim Demaille <akim@epita.fr>
10989
10990 Be sure never to walk through RITEMS, but use only data related to
10991 the rules themselves. RITEMS should be banished.
10992
10993 * src/output.c (output_token_translations): Rename as...
10994 (prepare_tokens): this.
10995 In addition to `translate', prepare the muscles `tname' and
10996 `toknum', which were handled by...
10997 (output_rule_data): this.
10998 Remove, and move the remainder of its outputs into...
10999 (prepare_rules): this new routines, which also merges content from
11000 (output_gram): this.
11001 (prepare_rules): Be sure never to walk through RITEMS.
11002 (output_stos): Rename as...
11003 (prepare_stos): this.
11004 (output): Always invoke prepare_states, after all, just don't use it
11005 in the output if you don't need it.
11006
643a5994
AD
110072002-04-07 Akim Demaille <akim@epita.fr>
11008
11009 * src/LR0.c (new_state): Display `nstates' as the name of the
11010 newly created state.
11011 Adjust to initialize first_state and last_state if needed.
11012 Be sure to distinguish the initial from the final state.
11013 (new_states): Create the itemset of the initial state, and use
11014 new_state.
11015 * src/closure.c (closure): Now that the initial state has its
11016 items properly set, there is no need for a special case when
11017 creating `ruleset'.
11018
11019 As a result, now the rule 0, reducing to $axiom, is visible in the
11020 outputs. Adjust the test suite.
11021
11022 * tests/conflicts.at (Solved SR Conflicts)
11023 (Unresolved SR Conflicts): Adjust.
11024 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
11025 * tests/conflicts.at (S/R in initial): New.
11026
b4c4ccc2
AD
110272002-04-07 Akim Demaille <akim@epita.fr>
11028
11029 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
11030 the RHS of the rules.
11031 * src/output.c (output_gram): Likewise.
11032
bba97eb2
AD
110332002-04-07 Akim Demaille <akim@epita.fr>
11034
11035 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
11036 bucket.
11037 Adjust all dependencies.
11038 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
11039 `number' of the buckets too.
11040 * src/gram.h: Include `symtab.h'.
11041 (associativity): Move to...
11042 * src/symtab.h: here.
11043 No longer include `gram.h'.
11044
c3b407f4
AD
110452002-04-07 Akim Demaille <akim@epita.fr>
11046
11047 * src/gram.h, src/gram.c (rules_rhs_length): New.
11048 (ritem_longest_rhs): Use it.
11049 * src/gram.h (rule_t): `number' is a new member.
11050 * src/reader.c (packgram): Set it.
11051 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
11052 the end of `rules', and count them out of `nrules'.
11053 (reduce_output, dump_grammar): Adjust.
11054 * src/print.c (print_grammar): It is no longer needed to check for
11055 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
11056 * tests/reduce.at (Reduced Automaton): New test.
11057
11652ab3
AD
110582002-04-07 Akim Demaille <akim@epita.fr>
11059
11060 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
11061 lacking `+ 1' to nrules, Bison reported as useless a token if it
11062 was used solely to set the precedence of the last rule...
11063
26b23c1a
AD
110642002-04-07 Akim Demaille <akim@epita.fr>
11065
11066 * data/bison.c++, data/bison.simple: Don't output the current file
11067 name in #line, to avoid useless diffs between two identical
11068 outputs under different names.
11069
18bcecb0
AD
110702002-04-07 Akim Demaille <akim@epita.fr>
11071
11072 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
11073 Normalize loops to using `< nrules + 1', not `<= nrules'.
11074
fa770c86
AD
110752002-04-07 Akim Demaille <akim@epita.fr>
11076
11077 * TODO: Update.
11078
d9b739c3
AD
110792002-04-07 Akim Demaille <akim@epita.fr>
11080
11081 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
11082 bucket.value as bucket.number.
11083
99013900
AD
110842002-04-07 Akim Demaille <akim@epita.fr>
11085
11086 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
11087 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
11088 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
11089 RHS, instead of being an index in RITEMS.
11090
e966383b
PE
110912002-04-04 Paul Eggert <eggert@twinsun.com>
11092
11093 * doc/bison.texinfo: Update copyright date.
11094 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
11095 (Symbols): Warn about running Bison in one character set,
11096 but compiling and/or running in an incompatible one.
11097 Warn about character code 256, too.
11098
110992002-04-03 Paul Eggert <eggert@twinsun.com>
11100
11101 * src/bison.data (YYSTACK_ALLOC): Depend on whether
11102 YYERROR_VERBOSE is nonzero, not whether it is defined.
11103
11104 Merge changes from bison-1_29-branch.
c307773e 11105
8d6c48b9
PE
111062002-03-20 Paul Eggert <eggert@twinsun.com>
11107
11108 Merge fixes from Debian bison_1.34-1.diff.
11109
11110 * configure.in (AC_PREREQ): 2.53.
11111
e53c6322
AD
111122002-03-20 Akim Demaille <akim@epita.fr>
11113
11114 * src/conflicts.c (log_resolution): Argument `resolution' is const.
11115
9ffbeca7
PE
111162002-03-19 Paul Eggert <eggert@twinsun.com>
11117
21db0b2a
PE
11118 * src/bison.simple (YYCOPY): New macro.
11119 (YYSTACK_RELOCATE): Use it.
11120 Remove Type arg; no longer needed. All callers changed.
11121 (yymemcpy): Remove; no longer needed.
11122
9ffbeca7
PE
11123 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
11124 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11125
642cb8f8
AD
111262002-03-19 Akim Demaille <akim@epita.fr>
11127
11128 Test and fix the #line outputs.
11129
11130 * tests/atlocal.at (GCC): New.
11131 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 11132 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
11133 (Action synch line, Epilogue synch line): New tests.
11134 * src/reader.c (parse_union_decl): Define the muscle stype_line.
11135 * data/bison.simple, data/bison.c++: Use it.
11136
3c31a486
AD
111372002-03-19 Akim Demaille <akim@epita.fr>
11138
11139 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
11140 (Solved SR Conflicts, %expect not enough, %expect right)
11141 (%expect too much): Move to...
11142 * tests/conflicts.at: this new file.
11143
0d8bed56
AD
111442002-03-19 Akim Demaille <akim@epita.fr>
11145
11146 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11147 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
11148 that we can move to enums for instance.
11149 * src/output.c (token_definitions_output): Output a list of
11150 `token-name, token-number' instead of the #define.
11151 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
11152
9208d17f
AD
111532002-03-14 Akim Demaille <akim@epita.fr>
11154
11155 Use Gettext 0.11.1.
11156
af27eacb
RA
111572002-03-09 Robert Anisko <robert@lrde.epita.fr>
11158
11159 * data/bison.c++: Make the user able to add members to the generated
11160 parser by subclassing.
11161
9101a310
RA
111622002-03-05 Robert Anisko <robert@lrde.epita.fr>
11163
11164 * src/reader.c (read_additionnal_code): `c' should be an integer, not
11165 a character.
11166 Reported by Nicolas Tisserand and Nicolas Burrus.
11167
fff9bf0b
RA
111682002-03-04 Robert Anisko <robert@lrde.epita.fr>
11169
11170 * src/reader.c: Warn about lacking semi-colons, do not complain.
11171
64dba31e
RA
111722002-03-04 Robert Anisko <robert@lrde.epita.fr>
11173
11174 * data/bison.c++: Remove a debug line.
11175
374f5a14
RA
111762002-03-04 Robert Anisko <robert@lrde.epita.fr>
11177
11178 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
11179 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
11180 provide a default implementation.
11181
bfcf1f3a
AD
111822002-03-04 Akim Demaille <akim@epita.fr>
11183
11184 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
11185 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
11186 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
11187 * tests/semantic.at (Parsing Guards): Similarly.
11188 * src/reader.at (readgram): Complain if the last rule is not ended
11189 with a semi-colon.
11190
65ccf9fc
AD
111912002-03-04 Akim Demaille <akim@epita.fr>
11192
11193 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
11194 * src/closure.c: here.
11195 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
11196 RTC.
11197 * src/warshall.h, src/warshall.c: Remove.
11198 * tests/sets.at (Broken Closure): Adjust.
11199
d0039cbc
AD
112002002-03-04 Akim Demaille <akim@epita.fr>
11201
11202 * src/output.c (output_skeleton): tempdir is const.
11203 bytes_read is unused.
11204
345cea78
AD
112052002-03-04 Akim Demaille <akim@epita.fr>
11206
11207 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11208 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
11209 Update.
11210 From Michael Hayes.
11211
564801f7
AD
112122002-03-04 Akim Demaille <akim@epita.fr>
11213
11214 * src/closure.c (closure): `r' is unused.
11215
e5352bc7
AD
112162002-03-04 Akim Demaille <akim@epita.fr>
11217
11218 * tests/sets.at (Broken Closure): Add the ending `;'.
11219 * src/reader.at (readgram): Complain if a rule is not ended with a
11220 semi-colon.
11221
914feea9
AD
112222002-03-04 Akim Demaille <akim@epita.fr>
11223
11224 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
11225 (count_sr_conflicts): Use bitset_count.
11226 * src/reduce.c (inaccessable_symbols): Ditto.
11227 (bits_size): Remove.
11228 * src/warshall.h, src/warshall.c: Convert to bitsetv.
11229
f0250de6
AD
112302002-03-04 Akim Demaille <akim@epita.fr>
11231
11232 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
11233 * src/reduce.c: Remove the `bitset_zero's following the
11234 `bitset_create's, as now it is performed by the latter.
11235
ef017502
AD
112362002-03-04 Akim Demaille <akim@epita.fr>
11237
11238 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
11239 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
11240 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
11241 latest sources from Michael.
11242
76514394
AD
112432002-03-04 Akim Demaille <akim@epita.fr>
11244
11245 * src/output.c (output): Don't free the grammar.
11246 * src/reader.c (grammar_free): New.
11247 * src/main.c (main): Call it and don't free symtab here.
11248
55024580
AD
112492002-03-04 Akim Demaille <akim@epita.fr>
11250
11251 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
11252 before returning.
11253 Reported by Benoit Perrot.
11254
f9abaa2c
AD
112552002-03-04 Akim Demaille <akim@epita.fr>
11256
11257 Use bitset operations when possible, not loops over bits.
11258
11259 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
11260 bitset_or.
11261 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
11262 * src/reduce.c (useless_nonterminals): Formatting changes.
11263 * src/warshall.c (TC): Use bitset_or.
11264
0e721e75
AD
112652002-03-04 Akim Demaille <akim@epita.fr>
11266
11267 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
11268 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
11269 Ditto.
11270
0fb1ffb1
AD
112712002-03-04 Akim Demaille <akim@epita.fr>
11272
11273 * src/lalr.c (F): Now a bitset*.
11274 Adjust all dependencies.
11275
b86796bf
AD
112762002-03-04 Akim Demaille <akim@epita.fr>
11277
11278 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
11279 Adjust all dependencies.
11280
602bbf31
AD
112812002-03-04 Akim Demaille <akim@epita.fr>
11282
11283 * src/L0.c, src/LR0.h (nstates): Be size_t.
11284 Adjust comparisons (signed vs unsigned).
11285 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
11286 bitset*.
11287 Adjust all dependencies.
11288
d8a0245c
AD
112892002-03-04 Akim Demaille <akim@epita.fr>
11290
11291 * src/closure.c (firsts): Now, also a bitset.
11292 Adjust all dependencies.
11293 (varsetsize): Remove, now unused.
11294 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
11295
34ba9743
AD
112962002-03-04 Akim Demaille <akim@epita.fr>
11297
11298 * src/print.c: Convert to use bitset.h, not hand coded iterations
11299 over ints.
11300
ed86e78c
AD
113012002-03-04 Akim Demaille <akim@epita.fr>
11302
11303 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
11304
dfdb1797
AD
113052002-03-04 Akim Demaille <akim@epita.fr>
11306
11307 * src/closure.c (ruleset): Be a bitset.
11308 (rulesetsize): Remove.
11309
7086e707
AD
113102002-03-04 Akim Demaille <akim@epita.fr>
11311
11312 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
11313 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
11314 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
11315 * src/closure.c (fderives): Be an array of bitsets.
11316
98254360
RA
113172002-02-28 Robert Anisko <robert@lrde.epita.fr>
11318
11319 * data/bison.c++: Merge the two generated headers. Insert a copyright
11320 notice in each output file.
11321
a75c057f
AD
113222002-02-28 Akim Demaille <akim@epita.fr>
11323
11324 * data/bison.c++: Copy the prologue of bison.simple to fetch
11325 useful M4 definitions, such as b4_header_guard.
11326
06b00abc
AD
113272002-02-25 Akim Demaille <akim@epita.fr>
11328
11329 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
11330 translator friendly scheme for the bgr
11331 copyright notice.
06b00abc 11332
70e7d534
AD
113332002-02-25 Akim Demaille <akim@epita.fr>
11334
11335 * src/output.c (header_output): Remove, now handled completely via
11336 M4.
11337
abe017f6
AD
113382002-02-25 Akim Demaille <akim@epita.fr>
11339
11340 * m4/m4.m4: New, from CVS Autoconf.
11341 * configure.in: Invoke it.
11342 * src/output.c (output_skeleton): Use its result instead of the
11343 hard coded name.
11344
381fb12e
AD
113452002-02-25 Akim Demaille <akim@epita.fr>
11346
11347 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
11348 Fileutils 4.1.5.
11349 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
11350 * src/output.c (output_skeleton): Use mkstemp to create a real
11351 temporary file.
11352 Move the filling of `skeleton' and its muscle to...
11353 (prepare): here.
11354 (output): Move the definition of the prologue muscle to...
11355 (prepare): here.
11356 * src/system.h (DEFAULT_TMPDIR): New.
11357
6f38107f
PE
113582002-02-14 Paul Eggert <eggert@twinsun.com>
11359
11360 Remove the support for C++ namespace cleanliness; it was
11361 causing more problems than it was curing, since it didn't work
11362 properly on some nonstandard C++ compilers. This can wait
11363 for a proper C++ parser.
11364
11365 * NEWS: Document this.
11366 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
11367 of C++, as it's treated like C now.
11368 * src/bison.simple (YYSTD): Remove.
11369 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
11370 Treat C++ just like Standard C instead of trying to support
11371 namespace cleanliness.
11372
80cce3da
AD
113732002-02-14 Akim Demaille <akim@epita.fr>
11374
11375 * tests/regression.at (else): Adjust to Andreas' change.
11376
842e8679
AD
113772002-02-14 Akim Demaille <akim@epita.fr>
11378
11379 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
11380
4bda3f10
AD
113812002-02-13 Andreas Schwab <schwab@suse.de>
11382
11383 * src/output.c (output_rule_data): Don't output NULL, it might
11384 not be defined yet.
11385
4162fa07 113862002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 11387
4162fa07
RA
11388 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
11389 (Copyright notice): Update.
b418ecd8 11390
bd16a5dc
AD
113912002-02-11 Akim Demaille <akim@epita.fr>
11392
11393 * tests/regression.at (%nonassoc and eof): Don't include
11394 nonportable headers.
11395
8d69a1a3
RA
113962002-02-08 Robert Anisko <robert@lrde.epita.fr>
11397
11398 * data/bison.c++: Correct error recovery. Make the user able to
11399 initialize the starting location.
11400
9b2d0677
AD
114012002-02-07 Akim Demaille <akim@epita.fr>
11402
11403 * tests/input.at: New.
11404
69e2658b
RA
114052002-02-07 Robert Anisko <robert@lrde.epita.fr>
11406
11407 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 11408 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
11409 directives around tables only needed for debugging.
11410
4aacc3a7
RA
114112002-02-07 Robert Anisko <robert@lrde.epita.fr>
11412
11413 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
11414 C++ parsers.
11415 (yy::b4_name::parse): Use print_.
11416
762a801e
RA
114172002-02-07 Robert Anisko <robert@lrde.epita.fr>
11418
11419 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
11420
4bb2bc3f
RA
114212002-02-07 Robert Anisko <robert@lrde.epita.fr>
11422
11423 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
11424 C++ parsers.
11425 (yy::b4_name::parse): Build verbose error messages, and use error_.
11426
6b45a3ca
RA
114272002-02-06 Robert Anisko <robert@lrde.epita.fr>
11428
11429 * data/bison.c++: Fix m4 quoting in comments.
11430
50997c6e
RA
114312002-02-06 Robert Anisko <robert@lrde.epita.fr>
11432
11433 * data/bison.c++: Adjust the parser code. Fix some muscles that were
11434 not expanded by m4.
11435
3f3eed27
AD
114362002-02-05 Akim Demaille <akim@epita.fr>
11437
11438 * data/bison.c++: Adjust to the M4 back end.
11439 More is certainly needed.
11440
be2a1a68
AD
114412002-02-05 Akim Demaille <akim@epita.fr>
11442
11443 Give a try to M4 as a back end.
11444
11445 * lib/readpipe.c: New, from wdiff.
11446 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
11447 BISON_HAIRY.
11448 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
11449 specific values. Now it is m4 that performs the lookup.
11450 * src/parse-skel.y: Remove.
11451 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
11452 * src/output.c (actions_output, guards_output)
11453 (token_definitions_output): No longer keeps track of the output
11454 line number, hence remove the second argument.
11455 (guards_output): Check against the guard member of a rule, not the
11456 action member.
11457 Adjust callers.
11458 (output_skeleton): Don't look for the skeleton location, let m4 do
11459 that.
11460 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
11461 file will be used.
11462 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
11463 (prepare): Given that for the time being changesyntax is not
11464 usable in M4, rename the muscles using `-' to `_'.
11465 Define `defines_flag', `output_parser_name' and `output_header_name'.
11466 * src/output.h (actions_output, guards_output)
11467 (token_definitions_output): Adjust prototypes.
11468 * src/scan-skel.l: Instead of scanning the skeletons, it now
11469 processes the output of m4: `__oline__' and `#output'.
11470 * data/bison.simple: Adjust to be used by M4(sugar).
11471 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
11472 to date.
11473 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
11474 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
11475 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
11476 shamelessly stolen from CVS Autoconf.
11477
beda758b
AD
114782002-02-05 Akim Demaille <akim@epita.fr>
11479
11480 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
11481 * configure.in: Check for the declarations of free and malloc.
11482 * src/muscle_tab.c: Adjust.
11483
5ece6d43
AD
114842002-02-05 Akim Demaille <akim@epita.fr>
11485
11486 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
11487 which have no values.
11488
5bb18f9a
AD
114892002-02-05 Akim Demaille <akim@epita.fr>
11490
11491 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
11492 * data/: here.
11493
894dd62e
PE
114942002-01-29 Paul Eggert <eggert@twinsun.com>
11495
11496 * src/bison.simple (YYSIZE_T): Do not define merely because
11497 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
11498 On some platforms, <alloca.h> does not declare YYSTD (size_t).
11499
82841af7
AD
115002002-01-27 Akim Demaille <akim@epita.fr>
11501
11502 Fix `%nonassoc and eof'.
11503
11504 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
11505 which were not properly copied! Replace
11506 memcpy (res->errs, src->errs, src->nerrs);
11507 with
11508 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
11509 !!!
11510 * tests/regression.at (%nonassoc and eof): Adjust to newest
11511 Autotest: `.' is not in the PATH.
11512
318b76e9
AD
115132002-01-27 Akim Demaille <akim@epita.fr>
11514
11515 * tests/sets.at (AT_EXTRACT_SETS): New.
11516 (Nullable): Use it.
11517 (Firsts): New.
11518
30d2f3d5
AD
115192002-01-26 Akim Demaille <akim@epita.fr>
11520
11521 * tests/actions.at, tests/calc.at, tests/headers.at,
11522 * tests/torture.at: Adjust to the newest Autotest which no longer
11523 forces `.' in the PATH.
11524
30f8c395
AD
115252002-01-25 Akim Demaille <akim@epita.fr>
11526
11527 * tests/regression.at (%nonassoc and eof): New.
11528 Suggested by Robert Anisko.
11529
29ae55f1
AD
115302002-01-24 Akim Demaille <akim@epita.fr>
11531
11532 Bison dumps core when trying to complain about broken input files.
11533 Reported by Cris van Pelt.
11534
11535 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
11536 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
11537 into...
11538 (Invalid inputs): Strengthen: exercise parse_percent_token.
11539
2b548aa6
RA
115402002-01-24 Robert Anisko <robert.anisko@epita.fr>
11541
11542 * src/Makefile.am: Add bison.c++.
11543 * src/bison.c++: New skeleton.
11544
bb0146c2
AD
115452002-01-21 Paolo Bonzini <bonzini@gnu.org>
11546
11547 * po/it.po: New.
11548
bec30531
AD
115492002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
11550
11551 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
11552
fc6edc45
MA
115532002-01-20 Marc Autret <marc@gnu.org>
11554
11555 * src/files.c (compute_output_file_names): Fix
11556
5e5d5415
MA
115572002-01-20 Marc Autret <marc@gnu.org>
11558
11559 * tests/output.at: New test.
11560 * src/files.c (compute_base_names): Don't map extensions when
11561 the YACC flag is set, use defaults.
11562 Reported by Evgeny Stambulchik.
11563
44ea3fbd
MA
115642002-01-20 Marc Autret <marc@gnu.org>
11565
ba0fe3c7
PE
11566 * src/system.h: Need to define __attribute__ away for non-GCC
11567 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
11568 Suggested by Albert Chin-A-Young.
11569
338963d1
TVH
115702002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
11571
11572 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
11573 canonical definition.
11574 * src/system.h: Use the canonical definition for PARAMS (avoids
11575 a conflict with the macro from lib/hash.h).
11576
c57b2479
AD
115772002-01-11 Akim Demaille <akim@epita.fr>
11578
11579 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 11580 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 11581
b85810ae
AD
115822002-01-09 Akim Demaille <akim@epita.fr>
11583
11584 * src/files.c, src/files.h (output_infix): New.
11585 (tab_extension): Remove.
11586 (compute_base_names): Compute the former, drop the latter.
11587 * src/output.c (prepare): Insert the muscles `output-infix', and
11588 `output-suffix'.
11589 * src/parse-skel.y (string, string.1): New.
11590 (section.header): Use it.
11591 (section.yacc): Remove.
11592 (prefix): Remove too.
11593 * src/scan-skel.l: Adjust.
11594 * src/bison.simple, src/bison.hairy: Adjust.
11595
cae60122
AD
115962002-01-09 Akim Demaille <akim@epita.fr>
11597
11598 * configure.in (WERROR_CFLAGS): Compute it.
11599 * src/Makefile.am (CFLAGS): Pass it.
11600 * tests/atlocal.in (CFLAGS): Idem.
11601 * src/files.c: Fix a few warnings.
11602 (get_extension_index): Remove, unused.
11603
ae404801
AD
116042002-01-08 Akim Demaille <akim@epita.fr>
11605
11606 * src/getargs.c (AS_FILE_NAME): New.
11607 (getargs): Use it to convert DOSish file names.
11608 * src/files.c (base_name): Rename as full_base_name to avoid
11609 clashes with `base_name ()'.
11610 (filename_split): New.
11611 (compute_base_names): N-th rewrite, using filename_split.
11612
22312b71
AD
116132002-01-08 Akim Demaille <akim@epita.fr>
11614
11615 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
11616 New, stolen from the Fileutils 4.1.
11617 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
11618 * configure.in: Check for the presence of memrchr, and of its
11619 prototype.
11620
a67cef01
TVH
116212002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
11622
11623 * lib/hash.h (__P): Added definition for this macro.
11624 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
11625 BUILT_SOURCES, to ensure they are generated first.
11626 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
11627 %error-verbose to allow bootstrapping with bison 1.30x.
11628
2b25d624
AD
116292002-01-06 Akim Demaille <akim@epita.fr>
11630
11631 * src/reader.c (parse_braces): Don't fetch the next char, the
11632 convention is to fetch on entry.
11633 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
11634 'switch' without a following semicolon.
11635 * tests/regression.at (braces parsing): New.
11636
3460813b
AD
116372002-01-06 Akim Demaille <akim@epita.fr>
11638
11639 Bison is dead wrong in its RR conflict reports.
11640
11641 * tests/torture.at (GNU Cim Grammar): New.
11642 * src/conflicts.c (count_rr_conflicts): Fix.
11643
73784c64
AD
116442002-01-06 Akim Demaille <akim@epita.fr>
11645
11646 Creating package.m4 from configure.ac causes too many problems.
11647
11648 * tests/Makefile.am (package.m4): Create it by hand,
11649 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
11650
25d81090
AD
116512002-01-06 Akim Demaille <akim@epita.fr>
11652
11653 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
11654 skeleton.h.
11655
a9b8959e
PE
116562002-01-04 Paul Eggert <eggert@twinsun.com>
11657
11658 * doc/bison.texinfo (Debugging):
11659 Remove YYSTDERR; it's no longer defined or used.
11660 Also, s/cstdio.h/cstdio/.
11661
25d81090
AD
116622002-01-03 Akim Demaille <akim@epita.fr>
11663
11664 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
11665
1109455c
AD
116662002-01-03 Akim Demaille <akim@epita.fr>
11667
11668 * src/parse-skel.y (process_skeleton): Don't bind the parser's
11669 tracing code to --trace, wait for a better --trace option, with
11670 args.
11671
7ea5e977
AD
116722002-01-03 Akim Demaille <akim@epita.fr>
11673
11674 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
11675 The ISO C++ standard is extremely clear about it: stderr is
11676 considered a macro, not a regular symbol (see table 94 `Header
11677 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
11678 Therefore std:: does not apply to it. It still does with fprintf.
11679 Also, s/cstdio.h/cstdio/.
11680
fab5b110
AD
116812002-01-03 Akim Demaille <akim@epita.fr>
11682
11683 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
11684 for non system headers.
11685
aed7fd9b
AD
116862002-01-02 Akim Demaille <akim@epita.fr>
11687
11688 Equip the skeleton chain with location tracking, runtime trace,
11689 pure parser and scanner.
11690
11691 * src/parse-skel.y: Request a pure parser, locations, and prefix
11692 renaming.
11693 (%union): Having several members with the same type does not help
11694 type mismatches, simplify.
11695 (YYPRINT, yyprint): New.
11696 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
11697 (skel_error): this.
11698 Handle locations.
11699 * src/scan-skel.l: Adjust to these changes.
11700 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
11701 (LOCATION_PRINT, skel_control_t): New.
11702
24fad99e
AD
117032001-12-30 Akim Demaille <akim@epita.fr>
11704
11705 * src/parse-skel.y: Get rid of the shift/reduce conflict:
11706 replace `gb' with BLANKS.
11707 * src/scan-skel.l: Adjust.
11708
a4b36db4
AD
117092001-12-30 Akim Demaille <akim@epita.fr>
11710
11711 * src/system.h: We don't need nor want bcopy.
11712 Throw away MS-DOS crap: we don't need getpid.
11713 * configure.in: We don't need strndup. It was even causing
11714 problems: because Flex includes the headers *before* us,
11715 _GNU_SOURCE is not defined by config.h, and therefore strndup was
11716 not visible.
11717 * lib/xstrndup.c: New.
11718 * src/scan-skel.l: Use it.
11719 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
11720 * src/parse-skel.y: Use %directives instead of #defines.
11721
1239777d
AD
117222001-12-30 Akim Demaille <akim@epita.fr>
11723
11724 * src/skeleton.h: New.
11725 * src/output.c (output_parser, output_master_parser): Remove, dead
11726 code.
11727 * src/output.h (get_lines_number, actions_output, guards_output)
11728 (token_definitions_output): Prototype them.
11729 * src/parse-skel.y: Add the license notice.
11730 Include output.h and skeleton.h.
11731 (process_skeleton): Returns void, and takes a single parameter.
11732 * src/scan-skel.l: Add the license notice.
11733 Include skeleton.h.
11734 Don't use %option yylineno: it seems that then Flex imagines
11735 REJECT has been used, and therefore it won't reallocate its
11736 buffers (which makes no other sense to me than a bug). It results
11737 in warnings for `unused: yy_flex_realloc'.
11738
9b3add5b
RA
117392001-12-30 Robert Anisko <robert.anisko@epita.fr>
11740
11741 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11742 (MUSCLE_INSERT_PREFIX): ...to there.
11743 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
11744 (MUSCLE_INSERT_PREFIX): Move from here...
11745
11746 * src/bison.hairy: Add a section directive. Put braces around muscle
11747 names. This parser skeleton is still broken, but Bison should not
11748 choke on a bad muscle 'syntax'.
11749 * src/bison.simple: Add a section directive. Put braces around muscle
11750 names.
11751
11752 * src/files.h (strsuffix, stringappend): Add declarations.
11753 (tab_extension): Add declaration.
11754 (short_base_name): Add declaration.
11755
11756 * src/files.c (strsuffix, stringappend): No longer static. These
11757 functions are used in the skeleton parser.
11758 (tab_extension): New.
11759 (compute_base_names): Use the computations done in this function
fab5b110 11760 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
11761 names.
11762 (short_base_name): No longer static.
11763
11764 * src/output.c (output_skeleton): New.
11765 (output): Disable call to output_master_parser, and give a try to
11766 a new skeleton handling system.
11767 (guards_output, actions_output): No longer static.
11768 (token_definitions_output, get_lines_number): No longer static.
11769
11770 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
11771
fab5b110 11772 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
11773 parse-skel.y.
11774
11775 * src/parse-skel.y: New file.
11776 * src/scan-skel.l: New file.
11777
b5b61c61
AD
117782001-12-29 Akim Demaille <akim@epita.fr>
11779
11780 %name-prefix is broken.
11781
11782 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
11783 Adjust all dependencies.
11784 * tests/headers.at (export YYLTYPE): Strengthen this test: use
11785 %name-prefix.
11786
11787 Renaming yylval but not yylloc is not consistent. Now we do.
11788
11789 * src/bison.simple: Prefix yylloc if used.
11790 * doc/bison.texinfo (Decl Summary): Document that.
11791
8c9a50be
AD
117922001-12-29 Akim Demaille <akim@epita.fr>
11793
11794 * doc/bison.texinfo: Promote `%long-directive' over
11795 `%long_directive'.
11796 Remove all references to fixed-output-files, yacc is enough.
11797
d99361e6
AD
117982001-12-29 Akim Demaille <akim@epita.fr>
11799
11800 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
11801 user prologue. These are defaults.
11802 * tests/actions.at (Mid-rule actions): Make sure the user can
11803 define YYDEBUG and YYERROR_VERBOSE.
11804
b9cecb91
AD
118052001-12-29 Akim Demaille <akim@epita.fr>
11806
11807 * src/output.c (header_output): Don't forget to export YYLTYPE and
11808 yylloc.
11809 * tests/headers.at (export YYLTYPE): New, make sure it does.
11810 * tests/regression.at (%union and --defines, Invalid CPP headers):
11811 Move to...
11812 * tests/headers.at: here.
11813
aea13e97
AD
118142001-12-29 Akim Demaille <akim@epita.fr>
11815
11816 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
11817
931394cb
AD
118182001-12-29 Akim Demaille <akim@epita.fr>
11819
11820 * tests/actions.at (Mid-rule actions): Output on a single line
11821 instead of several.
11822
704a47c4
AD
118232001-12-29 Akim Demaille <akim@epita.fr>
11824
11825 * doc/bison.texinfo: Formatting changes.
11826
091e20bb
AD
118272001-12-29 Akim Demaille <akim@epita.fr>
11828
11829 Don't store the token defs in a muscle, just be ready to output it
11830 on command. Now possible via `symbols'. Fixes a memory leak.
11831
11832 * src/output.c (token_definitions_output): New.
11833 (output_parser, header_output): Use it.
11834 * src/reader.c (symbols_save): Remove.
11835
cce71710
AD
118362001-12-29 Akim Demaille <akim@epita.fr>
11837
11838 * src/bison.simple: Do not provide a default for YYSTYPE and
11839 YYLTYPE before the user's prologue. Otherwise it's hardly... a
11840 default.
11841
82c035a8
AD
118422001-12-29 Akim Demaille <akim@epita.fr>
11843
11844 Mid-rule actions are simply... ignored!
11845
11846 * src/reader.c (readgram): Be sure to attach mid-rule actions to
11847 the empty-rule associated to the dummy symbol, not to the host
11848 rule.
11849 * tests/actions.at (Mid-rule actions): New.
11850
8419d367
AD
118512001-12-29 Akim Demaille <akim@epita.fr>
11852
11853 Memory leak.
11854
11855 * src/reader.c (reader): Free grammar.
11856
375d5806
AD
118572001-12-29 Akim Demaille <akim@epita.fr>
11858
11859 Memory leak.
11860
11861 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
11862 since it allocates it for each state, although only one is needed.
11863 (allocate_storage): Do it here.
11864
f51cb8ff
AD
118652001-12-29 Akim Demaille <akim@epita.fr>
11866
11867 * src/options.h, src/options.c (create_long_option_table): Rename
11868 as...
11869 (long_option_table_new): this, with a clearer prototype.
11870 (percent_table): Remove, unused,
11871 * src/getargs.c (getargs): Adjust.
11872
29e88316
AD
118732001-12-29 Akim Demaille <akim@epita.fr>
11874
11875 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
11876 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
11877 as states.
11878
b9f71f19
AD
118792001-12-29 Akim Demaille <akim@epita.fr>
11880
11881 * src/lalr.c (build_relations): Rename `states' as `states1'.
11882 Sorry, I don't understand exactly what it is, no better name...
11883
1a2b5d37
AD
118842001-12-29 Akim Demaille <akim@epita.fr>
11885
11886 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
11887 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
11888 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
11889 as rules.
11890
1cca533e
AD
118912001-12-29 Akim Demaille <akim@epita.fr>
11892
11893 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
11894 ago.
11895
c03ae966
AD
118962001-12-29 Akim Demaille <akim@epita.fr>
11897
11898 * src/reader.c, src/reader.h (user_toknums): Remove.
11899 Adjust all users to use symbols[i]->user_token_number.
11900
5a670b1e
AD
119012001-12-29 Akim Demaille <akim@epita.fr>
11902
11903 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
11904 Adjust all users to use symbols[i]->prec or ->assoc.
11905
ad949da9
AD
119062001-12-29 Akim Demaille <akim@epita.fr>
11907
11908 * src/reader.c, src/reader.h (tags): Remove.
11909 Adjust all users to use symbols[i]->tag.
11910
0e78e603
AD
119112001-12-29 Akim Demaille <akim@epita.fr>
11912
11913 * src/gram.h, src/gram.c (symbols): New, similar to state_table
11914 and rule_table.
11915 * src/reader.c (packsymbols): Fill this table.
11916 Drop sprec.
11917 * src/conflicts.c (resolve_sr_conflict): Adjust.
11918 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
11919 single table.
11920 Use symbols[i]->tag instead of tags[i].
11921
213e640e
AD
119222001-12-29 Akim Demaille <akim@epita.fr>
11923
11924 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
11925 In addition, put a comment in there, to replace...
11926 * tests/regression.at (%union and C comments): Remove.
11927
e7b8bef1
AD
119282001-12-29 Akim Demaille <akim@epita.fr>
11929
11930 * tests/regression.at (Web2c Actions): Blindly move the actual
11931 output as expected output. The contents *seem* right to me, but I
11932 can't pretend reading perfectly parser tables... Nonetheless, all
11933 the other tests pass correctly, the table look OK, even though the
11934 presence of `$axiom' is to be noted: AFAICS it is useless (but
11935 harmless).
11936
b68e7744
AD
119372001-12-29 Akim Demaille <akim@epita.fr>
11938
11939 * src/reader.c (readgram): Don't add the rule 0 if there were no
11940 rules read. In other words, add it _after_ having performed
11941 grammar sanity checks.
11942 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
11943
78d5bae9
AD
119442001-12-29 Akim Demaille <akim@epita.fr>
11945
11946 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
11947 visible, and some states have now a different number.
11948
ff442794
AD
119492001-12-29 Akim Demaille <akim@epita.fr>
11950
11951 * src/reader.c (readgram): Bind the initial rule's lineno to that
11952 of the first rule.
11953 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
11954 (Solved SR Conflicts): Adjust rule 0's line number.
11955
610ab194
AD
119562001-12-29 Akim Demaille <akim@epita.fr>
11957
11958 Fix the `GAWK Grammar' failure.
11959
11960 * src/LR0.c (final_state): Initialize to -1 so that we do compute
11961 the reductions of the first state which was mistakenly confused
11962 with the final state because precisely final_state was initialized
11963 to 0.
11964 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
11965 now noticed by Bison.
11966 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
11967 have a reduction on $default.
11968
29d29c8f
AD
119692001-12-29 Akim Demaille <akim@epita.fr>
11970
11971 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
11972 rule line numbers.
11973 * src/closure.c (print_closure): Likewise.
11974 * src/derives.c (print_derives): Likewise.
11975 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
11976 now.
11977
7c6b64d0
AD
119782001-12-29 Akim Demaille <akim@epita.fr>
11979
11980 * src/lalr.c (lookaheads_print): New.
11981 (lalr): Call it when --trace-flag.
11982 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
11983 are dumped.
11984
3d4daee3
AD
119852001-12-29 Akim Demaille <akim@epita.fr>
11986
11987 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
11988 when walking through ritem, even via rule->rhs.
11989 * src/reduce.c (dump_grammar, useful_production, reduce_output)
11990 (useful_production, useless_nonterminals): Likewise.
11991 (reduce_grammar_tables): Likewise, plus update nritems.
11992 * src/nullable.c (set_nullable): Likewise.
11993 * src/lalr.c (build_relations): Likewise.
11994 * tests/sets.at (Nullable): Adjust.
11995 Fortunately, now, the $axiom is no longer nullable.
11996
9e7f6bbd
AD
119972001-12-29 Akim Demaille <akim@epita.fr>
11998
11999 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
12000 the 0-sentinel.
12001 * src/gram.c (ritem_longest_rhs): Likewise.
12002 * src/reduce.c (nonterminals_reduce): Likewise.
12003 * src/print_graph.c (print_graph): Likewise.
12004 * src/output.c (output_rule_data): Likewise.
12005 * src/nullable.c (set_nullable): Likewise.
12006
255ef638
AD
120072001-12-29 Akim Demaille <akim@epita.fr>
12008
12009 * src/output.c: Comment changes.
12010
0d8a7363
AD
120112001-12-27 Paul Eggert <eggert@twinsun.com>
12012
12013 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
12014 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
12015 Sparc, as they were causing more porting problems than the
12016 (minor) performance improvement was worth.
12017
12018 Also, catch up with 1.31's YYSTD.
12019
3db472b9
AD
120202001-12-27 Akim Demaille <akim@epita.fr>
12021
12022 * src/output.c (output_gram): Rely on nritems, not the
12023 0-sentinel. See below.
12024 Use -1 as separator, not 0.
12025 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
12026 Rely on -1 as separator in yyrhs, instead of 0.
12027 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
12028 twice `Now at end of input', therefore there are two lines less to
12029 expect.
12030
b365aa05
AD
120312001-12-27 Akim Demaille <akim@epita.fr>
12032
12033 * tests/regression.at (Unresolved SR Conflicts):
12034 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
12035 below.
12036
30171f79
AD
120372001-12-27 Akim Demaille <akim@epita.fr>
12038
12039 * src/LR0.c (new_state): Recognize the final state by the fact it
12040 is reached by eoftoken.
12041 (insert_start_shifting_state, insert_eof_shifting_state)
12042 (insert_accepting_state, augment_automaton): Remove, since now
12043 these states are automatically computed from the initial state.
12044 (generate_states): Adjust.
12045 * src/print.c: When reporting a rule number to the user, substract
12046 1, so that the axiom rule is rule 0, and the first user rule is 1.
12047 * src/reduce.c: Likewise.
12048 * src/print_graph.c (print_core): For the time being, just as for
12049 the report, depend upon --trace-flags to dump the full set of
12050 items.
12051 * src/reader.c (readgram): Once the grammar read, insert the rule
12052 0: `$axiom: START-SYMBOL $'.
12053 * tests/set.at: Adjust: rule 0 is now displayed, and since the
12054 number of the states has changed (the final state is no longer
12055 necessarily the last), catch up.
12056
75142d45
AD
120572001-12-27 Akim Demaille <akim@epita.fr>
12058
12059 Try to make the use of the eoftoken valid. Given that its value
12060 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
12061 is used instead of > 0 where appropriate, (ii), depend upon nritems
12062 instead of the 0-sentinel.
12063
12064 * src/gram.h, src/gram.c (nritems): New.
12065 Expected to be duplication of nitems, but for the time being...
12066 * src/reader.c (packgram): Assert nritems and nitems are equal.
12067 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
12068 * src/closure.c (print_closure, print_fderives): Likewise.
12069 * src/gram.c (ritem_print): Likewise.
12070 * src/print.c (print_core, print_grammar): Likewise.
12071 * src/print_graph.c: Likewise.
12072
b7c49edf
AD
120732001-12-27 Akim Demaille <akim@epita.fr>
12074
12075 * src/main.c (main): If there are complains after grammar
12076 reductions, then output the report anyway if requested, then die.
12077 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
12078 * src/reader.c (eoftoken): New.
12079 (parse_token_decl): If the token being defined has value `0', it
12080 is the eoftoken.
12081 (packsymbols): No longer hack `tags' to insert `$' by hand.
12082 Be sure to preserve the value of the eoftoken.
12083 (reader): Make sure eoftoken is defined.
12084 Initialize nsyms to 0: now eoftoken is created just like the others.
12085 * src/print.c (print_grammar): Don't special case the eof token.
12086 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
12087 lie anyway, albeit pleasant.
12088 * tests/calc.at: Exercise error messages with eoftoken.
12089 Change the grammar so that empty input is invalid.
12090 Adjust expectations.
12091 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
12092
ec2da99f
AD
120932001-12-27 Akim Demaille <akim@epita.fr>
12094
12095 * configure.in: Check the protos of strchr ans strspn.
12096 Replace strchr if needed.
12097 * src/system.h: Provide the protos of strchr, strspn and memchr if
12098 missing.
12099 * lib/strchr.c: New.
12100 * src/reader.c (symbols_save): Use strchr.
12101
8adfa272
AD
121022001-12-27 Akim Demaille <akim@epita.fr>
12103
12104 * src/print.c, src/print_graph.c (escape): New.
12105 Use it to quote the TAGS outputs.
12106 * src/print_graph.c (print_state): Now errors are in red, and
12107 reductions in green.
12108 Prefer high to wide: output the state number on a line of its own.
12109
80dac38c
AD
121102001-12-27 Akim Demaille <akim@epita.fr>
12111
12112 * src/state.h, src/state.c (reductions_new): New.
12113 * src/LR0.c (set_state_table): Let all the states have a
12114 `reductions', even if reduced to 0.
12115 (save_reductions): Adjust.
12116 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
12117 * src/print.c (print_reductions, print_actions): Adjust.
12118 * src/output.c (action_row): Adjust.
12119
2cec70b9
AD
121202001-12-27 Akim Demaille <akim@epita.fr>
12121
12122 * src/state.h, src/state.c (errs_new, errs_dup): New.
12123 * src/LR0.c (set_state_table): Let all the states have an errs,
12124 even if reduced to 0.
12125 * src/print.c (print_errs, print_reductions): Adjust.
12126 * src/output.c (output_actions, action_row): Adjust.
12127 * src/conflicts.c (resolve_sr_conflict): Adjust.
12128
13ca549a
AD
121292001-12-27 Akim Demaille <akim@epita.fr>
12130
12131 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
12132
5092aba5
AD
121332001-12-27 Akim Demaille <akim@epita.fr>
12134
12135 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
12136 * src/print.c: here.
12137 (lookaheadset, shiftset): New, used as additional storage by
12138 print_reductions.
12139 (print_results): Adjust.
12140 (print_shifts, print_gotos, print_errs): New, extracted from...
12141 (print_actions): here.
12142 * src/print_graph.c (print_actions): Remove dead code.
12143
11e2beca
AD
121442001-12-27 Akim Demaille <akim@epita.fr>
12145
12146 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
12147 `$n' and `@n'.
12148
dac3c910
AD
121492001-12-27 Akim Demaille <akim@epita.fr>
12150
12151 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
12152 (build_relations): Adjust.
12153
d0b0fefa
AD
121542001-12-27 Akim Demaille <akim@epita.fr>
12155
12156 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
12157 duplication.
12158
adc8c848
AD
121592001-12-27 Akim Demaille <akim@epita.fr>
12160
12161 * src/reader.c (packgram): Catch nitems overflows.
12162
14d293ac
AD
121632001-12-27 Akim Demaille <akim@epita.fr>
12164
12165 * src/files.c, src/files.h (guard_obstack): Remove.
12166 * src/output.c (output): Adjust.
12167 * src/reader.c (parse_braces): New, factoring...
12168 (copy_action, copy_guard): these two which are renamed as...
12169 (parse_action, parse_guard): these.
12170 As a voluntary consequence, using braces around guards is now
12171 mandatory.
12172
f499b062
AD
121732001-12-27 Akim Demaille <akim@epita.fr>
12174
12175 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
12176 * src/reader.c (symbol_list): `guard' and `guard_line' are new
12177 members.
12178 (symbol_list_new): Adjust.
12179 (copy_action): action_line is the first line, not the last.
12180 (copy_guard): Just as for actions, store the `action' only, not
12181 the switch/case/break flesh.
12182 Don't parse the user action that might follow the guard, let...
12183 (readgram): do it, i.e., now, there can be an action after a
12184 guard.
12185 In other words the guard is just explicitly optional.
12186 (packgram): Adjust.
12187 * src/output.c (guards_output): New.
12188 (output_parser): Call it when needed.
12189 (output): Also free the guard and attrs obstacks.
12190 * src/files.c, src/files.h (obstack_save): Remove.
12191 (output_files): Remove.
12192 As a result, if one needs the former `.act' file, using an
12193 appropriate skeleton which requires actions and guards is now
12194 required.
12195 * src/main.c (main): Adjust.
12196 * tests/semantic.at: New.
12197 * tests/regression.at: Use `input.y' as input file name.
12198 Avoid 8+3 problems by requiring input.c when the test needs the
12199 parser.
12200
d945f5cd
AD
122012001-12-27 Akim Demaille <akim@epita.fr>
12202
12203 * src/reader.c (symbol_list_new): Be sure to initialize all the
12204 fields.
12205
d200e455
AD
122062001-12-27 Akim Demaille <akim@epita.fr>
12207
12208 All the hacks using a final pseudo state are now useless.
12209
12210 * src/LR0.c (set_state_table): state_table holds exactly nstates.
12211 * src/lalr.c (nLA): New.
12212 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
12213 instead of lookaheadsp from the pseudo state (nstate + 1).
12214
f9507c28
AD
122152001-12-27 Akim Demaille <akim@epita.fr>
12216
12217 * src/output.c (action_row, token_actions): Use a state_t instead
12218 of a integer, and nlookaheads instead of the following state's
12219 lookaheadsp.
12220
065fbd27
AD
122212001-12-27 Akim Demaille <akim@epita.fr>
12222
12223 * src/conflicts.c (log_resolution, flush_shift)
12224 (resolve_sr_conflict, set_conflicts, solve_conflicts)
12225 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
12226 (conflicts_print, print_reductions): Use a state_t instead of an
12227 integer when referring to a state.
12228 As much as possible, depend upon nlookaheads, instead of the
12229 `lookaheadsp' member of the following state (since lookaheads of
12230 successive states are successive, the difference between state n + 1
12231 and n served as the number of lookaheads for state n).
12232 * src/lalr.c (add_lookback_edge): Likewise.
12233 * src/print.c (print_core, print_actions, print_state)
12234 (print_results): Likewise.
12235 * src/print_graph.c (print_core, print_actions, print_state)
12236 (print_graph): Likewise.
12237 * src/conflicts.h: Adjust.
12238
1b177bd7
AD
122392001-12-27 Akim Demaille <akim@epita.fr>
12240
12241 * src/bison.hairy: Formatting/comment changes.
12242 ANSIfy.
12243 Remove `register' indications.
12244 Add plenty of `static'.
12245
7742ddeb
AD
122462001-12-27 Akim Demaille <akim@epita.fr>
12247
12248 * src/output.c (prepare): Drop the muscle `ntbase' which
12249 duplicates ntokens.
12250 * src/bison.simple: Formatting/comment changes.
12251 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
12252 is an undocumented synonym.
12253
1fa14068
AD
122542001-12-22 Akim Demaille <akim@epita.fr>
12255
12256 * src/output.c (output_table_data): Change the prototype to use
12257 `int' for array ranges: some invocations do pass an int, not a
12258 short.
12259 Reported by Wayne Green.
12260
b9752825
AD
122612001-12-22 Akim Demaille <akim@epita.fr>
12262
12263 Some actions of web2c.y are improperly triggered.
12264 Reported by Mike Castle.
12265
12266 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
12267 * tests/regression.at (Web2c): Rename as...
12268 (Web2c Report): this.
12269 (Web2c Actions): New.
12270
776209d6
AD
122712001-12-22 Akim Demaille <akim@epita.fr>
12272
12273 Reductions in web2c.y are improperly reported.
12274 Reported by Mike Castle.
12275
12276 * src/conflicts.c (print_reductions): Fix.
12277 * tests/regression.at (Web2c): New.
12278
275fc3ad
AD
122792001-12-18 Akim Demaille <akim@epita.fr>
12280
12281 Some host fail on `assert (!"foo")', which expands to
12282 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
12283 Reported by Nelson Beebee.
12284
12285 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
12286 `#define it_succeeded 0' and `assert (it_succeeded)'.
12287
897668ee
MA
122882001-12-17 Marc Autret <autret_m@epita.fr>
12289
12290 * src/bison.simple: Don't hard code the skeleton line and filename.
12291 * src/output.c (output_parser): Rename 'line' as 'output_line'.
12292 New line counter 'skeleton_line' (skeleton-line muscle).
12293
ab3399e0
PE
122942001-12-17 Paul Eggert <eggert@twinsun.com>
12295
12296 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
12297 YYDEBUG must be defined to a nonzero value.
12298
12299 * src/bison.simple (yytname): Do not assume that the user defines
12300 YYDEBUG to a properly parenthesized expression.
12301
3877f72b
AD
123022001-12-17 Akim Demaille <akim@epita.fr>
12303
12304 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
12305 nlookaheads is a new member.
12306 Adjust all users.
12307 * src/lalr.h (nlookaheads): Remove this orphan declaration.
12308 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
12309 state.
776209d6 12310
331dbc1b
AD
123112001-12-17 Akim Demaille <akim@epita.fr>
12312
12313 * src/files.h, src/files.c (open_files, close_files): Remove.
12314 * src/main.c (main): Don't open/close files, nor invoke lex_free,
12315 let...
12316 * src/reader.c (reader): Do it.
776209d6 12317
be750e4c
AD
123182001-12-17 Akim Demaille <akim@epita.fr>
12319
12320 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 12321
709ae8c6
AD
123222001-12-17 Akim Demaille <akim@epita.fr>
12323
12324 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
12325 (flush_reduce): New.
12326 (resolve_sr_conflict): Adjust.
776209d6 12327
f87685c3
AD
123282001-12-17 Akim Demaille <akim@epita.fr>
12329
12330 * src/output.c (output_obstack): Be static and rename as...
12331 (format_obstack): this, to avoid any confusion with files.c's
12332 output_obstack.
12333 * src/reader.h (muscle_obstack): Move to...
12334 * src/output.h: here, since it's defined in output.c.
12335
837491d8
AD
123362001-12-17 Akim Demaille <akim@epita.fr>
12337
12338 * src/output.c (action_row, save_column, default_goto)
12339 (sort_actions, matching_state, pack_vector): Better variable
12340 locality.
12341
796d61fb
AD
123422001-12-17 Akim Demaille <akim@epita.fr>
12343
12344 * src/output.c: Various formatting changes.
776209d6 12345
64d15509
AD
123462001-12-17 Akim Demaille <akim@epita.fr>
12347
12348 * src/files.c (output_files): Free the output_obstack.
12349 * src/main.c (main): Call print and print_graph conditionally.
12350 * src/print.c (print): Work unconditionally.
12351 * src/print_graph.c (print_graph): Work unconditionally.
12352 * src/conflicts.c (log_resolution): Output only if verbose_flag.
12353
fbc8ecb7
MA
123542001-12-16 Marc Autret <autret_m@epita.fr>
12355
12356 * src/output.c (actions_output): Fix. When we use %no-lines,
12357 there is one less line per action.
12358
f0440388
MA
123592001-12-16 Marc Autret <autret_m@epita.fr>
12360
12361 * src/bison.simple: Remove a useless #line directive.
12362 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
12363 * src/output.c (get_lines_number): New.
776209d6 12364 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
12365 output muscles.
12366 Fix line numbering.
12367 (actions_output): Computes the number of lines taken by actions.
12368 (output_master_parser): Insert new skeleton which is the name of
12369 the output parser file name.
12370
a79986b8
MA
123712001-12-15 Marc Autret <autret_m@epita.fr>
12372
12373 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
12374
4ec8e00f
MA
123752001-12-15 Marc Autret <autret_m@epita.fr>
12376
12377 * src/output.c (output_gram): Keep track of the hairy one.
12378
1a4648ff
AD
123792001-12-15 Akim Demaille <akim@epita.fr>
12380
12381 Make `make distcheck' work.
12382
12383 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
12384 system.h which uses libgettext.h.
12385
9c2c67e6
AD
123862001-12-15 Akim Demaille <akim@epita.fr>
12387
12388 * src/nullable.c (set_nullable): Useless rules must be skipped,
12389 otherwise, since we range over their symbols, we might look at a
12390 nonterminal which no longer ``exists'', i.e., it is not counted in
12391 `nvars', hence we overflow our arrays.
12392
93ede233
AD
123932001-12-15 Akim Demaille <akim@epita.fr>
12394
12395 The header can also be produced directly, without any obstack!
12396 Yahoo!
12397
12398 * src/files.c, src/files.h (defines_obstack): Remove.
12399 (compute_header_macro): Global.
12400 (defines_obstack_save): Remove.
12401 * src/reader.c (parse_union_decl): No longer output to
12402 defines_obstack: its content can be found in the `stype' muscle
12403 anyway.
12404 (output_token_translations): Merge into...
12405 (symbols_output): this.
12406 Rename as...
12407 (symbols_save): this.
12408 (reader): Adjust.
12409 * src/output.c (header_output): New.
12410 (output): Call it.
12411
2666f928
AD
124122001-12-15 Akim Demaille <akim@epita.fr>
12413
12414 * src/reader.c (parse_union_decl): Instead of handling two obstack
12415 simultaneously, use one to define the `stype' muscle, and use the
12416 value of the latter to fill defines_obstack.
12417 (copy_comment): Remove.
12418 (copy_comment2): Work for a single obstack.
12419 Rename as...
12420 (copy_comment): this.
12421
428046f8
AD
124222001-12-15 Akim Demaille <akim@epita.fr>
12423
12424 * src/lex.c, src/lex.h (xgetc): No longer static.
12425 * src/reader.c (parse_union_decl): Revamp.
12426
ea52d706
AD
124272001-12-15 Akim Demaille <akim@epita.fr>
12428
12429 Still making progress in separating Bison into (i) input, (ii)
12430 process, (iii) output: now we can directly output the parser file
12431 without using table_obstack at all.
12432
12433 * src/files.c, src/files.h (table_obstack): Bye bye.
12434 (parser_file_name): New.
12435 * src/files.c (compute_output_file_names): Compute it.
12436 * src/output.c (actions_output, output_parser)
12437 (output_master_parser): To a file instead of an obstack.
12438
3f96f4dc
AD
124392001-12-15 Akim Demaille <akim@epita.fr>
12440
12441 Attach actions to rules, instead of pre-outputting them to
12442 actions_obstack.
12443
12444 * src/gram.h (rule_t): action and action_line are new members.
12445 * src/reader.c (symbol_list): Likewise.
12446 (copy_action): Save the actions within the rule.
12447 (packgram): Save them in rule_table.
12448 * src/output.c (actions_output): New.
12449 (output_parser): Use it on `%%actions'.
12450 (output_rule_data): Don't free rule_table.
12451 (output): Do it.
12452 (prepare): Don't save the `action' muscle.
12453 * src/bison.simple: s/%%action/%%actions/.
12454
51576fb3
AD
124552001-12-15 Akim Demaille <akim@epita.fr>
12456
12457 * src/reader.c (copy_action): When --yacc, don't append a `;'
12458 to the user action: let it fail if lacking.
dee049eb 12459 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 12460
2648a72d
AD
124612001-12-14 Akim Demaille <akim@epita.fr>
12462
12463 * src/lex.c (literalchar): Simply return the char you decoded, non
12464 longer mess around with obstacks and int pointers.
12465 Adjust all callers.
12466
92790e5b
AD
124672001-12-14 Akim Demaille <akim@epita.fr>
12468
12469 * src/lex.c (literalchar): Don't escape the special characters,
12470 just decode them, and keep them as char (before, eol was output as
12471 the 2 char string `\n' etc.).
12472 * src/output.c (output_rule_data): Use quotearg to output the
12473 token strings.
12474
927c1557
PE
124752001-12-13 Paul Eggert <eggert@twinsun.com>
12476
12477 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
12478 Do not infringe on the global user namespace when using C++.
12479 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
12480 All uses of `fprintf' and `stderr' changed.
12481
12482 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
12483
ed8e1f68
AD
124842001-12-13 Akim Demaille <akim@epita.fr>
12485
12486 The computation of nullable is broken: it doesn't handle empty
12487 RHS's properly.
12488
12489 * tests/torture.at (GNU AWK Grammar): New.
12490 * tests/sets.at (Nullable): New.
12491 * src/nullable.c (set_nullable): Instead of blindly looping over
12492 `ritems', loop over the rules, and then over their rhs's.
12493
12494 Work around Autotest bugs.
12495
12496 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
12497 frame, because Autotest understand lines starting with a `+' as
12498 traces from the shell. Then, they are not processed properly.
12499 Admittedly an Autotest bug, but we don't have time to wait for
12500 Autotest to catch up.
12501 * tests/regression.at (Broken Closure): Adjust to the new table
12502 frames.
12503 Move to...
12504 * tests/sets.at: here.
12505
cb581495
AD
125062001-12-13 Akim Demaille <akim@epita.fr>
12507
12508 * src/closure.c (closure): Use nrules instead of playing tricks
12509 with BITS_PER_WORD.
12510
2e729273
AD
125112001-12-13 Akim Demaille <akim@epita.fr>
12512
12513 * src/print.c (print_actions): Output the handling of `$' as the
12514 traces do: shifting the token EOF. Before EOF was treated as a
12515 nonterminal.
12516 * tests/regression.at: Adjust some tests.
12517 * src/print_graph.c (print_core): Complete the set of items via
12518 closure. The next-to-final and final states are still unsatisfying,
12519 but that's to be addressed elsewhere.
12520 No longer output the rule numbers, but do output the state number.
12521 A single loop for the shifts + gotos is enough, but picked a
12522 distinct color for each.
12523 (print_graph): Initialize and finalize closure.
12524
107f7dfb
AD
125252001-12-13 Akim Demaille <akim@epita.fr>
12526
12527 * src/reader.c (readgram): Remove dead code, an strip useless
12528 braces.
12529 (get_type): Remove, unused.
12530
9b53a24f
AD
125312001-12-12 Akim Demaille <akim@epita.fr>
12532
12533 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
12534 on that of lib/error.c.
12535
dbfb6dcd
AD
125362001-12-12 Akim Demaille <akim@epita.fr>
12537
12538 Some hosts don't like `/' in includes.
12539
12540 * src/system.h: Include libgettext.h without qualifying the path.
12541 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
12542 $(top_srcdir).
12543
c25fb648
MA
125442001-12-11 Marc Autret <autret_m@epita.fr>
12545
12546 * src/output.c (output_parser): Remove useless muscle.
12547
710ddc4f
MA
125482001-12-11 Marc Autret <autret_m@epita.fr>
12549
12550 * src/bison.simple: Remove #line just before %%epilogue. It
12551 is now handled in ...
12552 * src/reader.c (read_additionnal_code): Add the output of a
12553 #line for the epilogue.
12554
e83d80b8
MA
125552001-12-10 Marc Autret <autret_m@epita.fr>
12556
927c1557 12557 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
12558 replace precedent remove.
12559 * src/bison.simple: Remove #line before %%prologue because
12560 %%input-line is wrong at this time.
12561
971d5158
MA
125622001-12-10 Marc Autret <autret_m@epita.fr>
12563
12564 * src/reader.c (symbols_output): Clean up.
927c1557 12565 * src/output.c (output_gram, output): Clean up.
971d5158 12566
5edafffd
AD
125672001-12-10 Akim Demaille <akim@epita.fr>
12568
12569 * src/lalr.c (initialize_lookaheads): New. Extracted from...
12570 * src/LR0.c (set_state_table): here.
12571 * src/lalr.c (lalr): Call it.
12572
0279f8e9
AD
125732001-12-10 Akim Demaille <akim@epita.fr>
12574
12575 * src/state.h (shifts): Remove the `number' member: shifts are
12576 attached to state, hence no longer need to be labelled with a
12577 state number.
12578
190c4f5f
AD
125792001-12-10 Akim Demaille <akim@epita.fr>
12580
12581 Now that states have a complete set of members, the linked list of
12582 shifts is useless: just fill directly the state's shifts member.
12583
12584 * src/state.h (shifts): Remove the `next' member.
12585 * src/LR0.c (first_state, last_state): Remove.
12586 Adjust the callers.
12587 (augment_automaton): Don't look for the shifts that must be added
12588 a shift on EOF: it is those of the state we looked for! But now,
12589 since shifts are attached, it is no longer needed to looking
12590 merely by its id: its number.
12591
2a73b93d
AD
125922001-12-10 Akim Demaille <akim@epita.fr>
12593
12594 * src/LR0.c (augment_automaton): Better variable locality.
12595 Remove an impossible branch: if there is a state corresponding to
12596 the start symbol being shifted, then there is shift for the start
12597 symbol from the initial state.
12598
74392f6a
AD
125992001-12-10 Akim Demaille <akim@epita.fr>
12600
12601 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
12602 only when appropriate: when insert_start_shifting_state' is not
12603 invoked.
12604 * tests/regression.at (Rule Line Numbers): Adjust.
12605
37c82725
AD
126062001-12-10 Akim Demaille <akim@epita.fr>
12607
12608 * src/LR0.c (augment_automaton): Now that all states have shifts,
12609 merge the two cases addition shifts to the initial state.
12610
6a164e0c
AD
126112001-12-10 Akim Demaille <akim@epita.fr>
12612
12613 * src/lalr.c (set_state_table): Move to...
12614 * src/LR0.c: here.
12615 * src/lalr.c (lalr): Don't call it...
12616 * src/LR0.c (generate_states): do it.
12617 * src/LR0.h (first_state): Remove, only the table is used.
12618
7215de24
AD
126192001-12-10 Akim Demaille <akim@epita.fr>
12620
12621 * src/LR0.h (first_shift, first_reduction): Remove.
12622 * src/lalr.c: Don't use first_shift: find shifts through the
12623 states.
12624
80e25d4d
AD
126252001-12-10 Akim Demaille <akim@epita.fr>
12626
12627 * src/LR0.c: Attach shifts to states as soon as they are
12628 computed.
12629 * src/lalr.c (set_state_table): Instead of assigning shifts to
12630 state, just assert that the mapping was properly done.
12631
0ab3728b
AD
126322001-12-10 Akim Demaille <akim@epita.fr>
12633
12634 * src/LR0.c (insert_start_shift): Rename as...
12635 (insert_start_shifting_state): this.
12636 (insert_eof_shifting_state, insert_accepting_state): New.
12637 (augment_automaton): Adjust.
12638 Better locality of the variables.
12639 When looking if the start_symbol is shifted from the initial
12640 state, using `while (... symbol != start_symbol ...)' sounds
12641 better than `while (... symbol < start_symbol ...)': If fail
12642 to see how the order between symbols could be relevant!
12643
78af9bbc
AD
126442001-12-10 Akim Demaille <akim@epita.fr>
12645
12646 * src/getargs.h: Don't declare `spec_name_prefix' and
12647 `spec_file_prefix', declared by src/files.h.
12648 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
12649 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
12650 * src/output.c (prepare): Adjust.
12651 * src/reader.c (symbols_output): Likewise.
12652 * src/vmsgetargs.c: Vaguely adjust, but who cares?
12653
bdef2a41
AD
126542001-12-10 Akim Demaille <akim@epita.fr>
12655
12656 * src/muscle_tab.c (muscle_init): NULL is a better default than
12657 `"0"'.
12658
3735969c
AD
126592001-12-10 Akim Demaille <akim@epita.fr>
12660
12661 * src/reader.c (reader): Calling symbols_output once is enough.
12662
49701457
AD
126632001-12-10 Akim Demaille <akim@epita.fr>
12664
12665 Now that states have a complete set of members, the linked list of
12666 reductions is useless: just fill directly the state's reductions
12667 member.
12668
12669 * src/state.h (struct reductions): Remove member `number' and
12670 `next'.
12671 * src/LR0.c (first_reduction, last_reduction): Remove.
12672 (save_reductions): Don't link the new reductions, store them in
12673 this_state.
12674 * src/lalr.c (set_state_table): No need to attach reductions to
12675 states, it's already done.
12676 * src/output.c (output_actions): No longer free the shifts, then
12677 the reductions, then the states: free all the states and their
12678 members.
12679
0edad749
AD
126802001-12-10 Akim Demaille <akim@epita.fr>
12681
12682 * src/options.c (OPTN, DRTV, BOTH): New.
12683 (option_table): Use them.
12684
0edad749
AD
12685 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
12686 the job of system.h.
12687 * src/options.c: Don't include stdio.h and xalloc.h for the same
12688 reasons.
12689
5449dd0f
AD
126902001-12-10 Akim Demaille <akim@epita.fr>
12691
12692 * src/output.c (output, prepare): Make sure the values of the
12693 muscles `action' and `prologue' are 0-terminated.
12694
a870c567
AD
126952001-12-10 Akim Demaille <akim@epita.fr>
12696
12697 Clean up GCC warnings.
12698
12699 * src/reader.c (copy_action): `buf' is not used.
12700 (parse_skel_decl): Be static.
12701 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
12702 * src/options.h (create_long_option_table): Have a real prototype.
12703 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
12704 (hash_delete_at): Return const void *.
12705 Adjust casts to preserve the const.
12706
80df8768
AD
127072001-12-10 Akim Demaille <akim@epita.fr>
12708
12709 * configure.in: Require 2.52g.
12710 M4 is not needed, but AUTOM4TE is.
12711 * m4/m4.m4: Remove.
12712 * tests/Makefile.am: Adjust.
12713
f693ad14
AD
127142001-12-10 Akim Demaille <akim@epita.fr>
12715
12716 One structure for states is enough, even though theoretically
12717 there are LR(0) states and LALR(1) states.
12718
12719 * src/lalr.h (state_t): Remove.
12720 (state_table): Be state_t **, not state_t *.
12721 * src/state.h (core, CORE_ALLOC): Rename as...
12722 (state_t, STATE_ALLOC): this.
12723 Add the LALR(1) members: shifts, reductions, errs.
12724 * src/LR0.c (state_table): Rename as...
12725 (state_hash): this, to avoid name clashes with the global
12726 `state_table'.
12727 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
12728 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
12729
74ffbcb6
AD
127302001-12-10 Akim Demaille <akim@epita.fr>
12731
12732 Bison dumps core on bash.y.
12733 Reported by Pascal Bart.
12734
12735 * src/warshall.c (bitmatrix_print): New.
12736 (TC): Use it.
ba0fe3c7 12737 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
12738 j must be the outer loop.
12739 * tests/regression.at (Broken Closure): New.
12740
07708e19
AD
127412001-12-05 Akim Demaille <akim@epita.fr>
12742
12743 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
12744 its argument.
ba1ecc07 12745 Reported by Peter Hamorsky.
07708e19 12746
92b16366
AD
127472001-12-05 Akim Demaille <akim@epita.fr>
12748
12749 * src/conflicts.c (err_table): Remove.
12750 (resolve_sr_conflict): Adjust.
12751 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
12752 Rename as...
12753 (state_t.reductions, state_t.shifts): this.
12754
076ab033
AD
127552001-12-05 Akim Demaille <akim@epita.fr>
12756
12757 * src/reduce.c (reduce_grammar_tables): No longer disable the
12758 removal of useless rules via CPP but via `if (0)', so that the
12759 compiler still check the code is valid.
12760 For instance, it should have noticed `rline' no longer exists: use
12761 the `line' member of rule_t.
12762 * src/gram.c (dummy, rline): Remove, unused.
12763
3843c413
AD
127642001-12-05 Akim Demaille <akim@epita.fr>
12765
12766 * src/output.c (pack_vector): Use assert, not berror.
12767 * src/main.c (berror): Remove, unused.
12768
43168960
AD
127692001-12-05 Akim Demaille <akim@epita.fr>
12770
12771 New experimental feature: if --verbose --trace output all the
12772 items of a state, not only its kernel.
12773
12774 * src/print.c (print_core): If `trace_flag', then invoke closure
12775 before outputting the items of the state (print_core is no longer
12776 a correct name them).
12777 (print_results): Invoke new_closure/free_closure if needed.
12778
b2872512
AD
127792001-12-05 Akim Demaille <akim@epita.fr>
12780
12781 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
12782 * src/closure.c, src/closure.h (itemsetsize): Rename as...
12783 (nitemset): for consistency with the rest of the project.
12784
23cbcc6c
AD
127852001-12-05 Akim Demaille <akim@epita.fr>
12786
12787 * src/closure.c (print_closure): Improve.
12788 (closure): Use it for printing input and output.
12789
03ec521c
AD
127902001-12-05 Akim Demaille <akim@epita.fr>
12791
12792 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
12793 indexed by nonterminals.
12794
3a7456dd
AD
127952001-12-05 Akim Demaille <akim@epita.fr>
12796
12797 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
12798 what it was!).
12799 * src/warshall.h: Remove accidental duplication of the content.
12800
1cbcf2e7
AD
128012001-12-05 Akim Demaille <akim@epita.fr>
12802
12803 * src/closure.c (set_fderives): De-obfuscate.
12804
84182270
AD
128052001-12-05 Akim Demaille <akim@epita.fr>
12806
12807 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
12808
3f6f053c
AD
128092001-12-05 Akim Demaille <akim@epita.fr>
12810
12811 * src/closure.c (set_firsts): De-obfuscate.
12812
7a5350ba
AD
128132001-12-05 Akim Demaille <akim@epita.fr>
12814
12815 * src/output.c (action_row): De-obfuscate
12816 using the good o' techniques: arrays not pointers, variable
12817 locality, BITISSET, RESETBIT etc.
12818
d954473d
AD
128192001-12-05 Akim Demaille <akim@epita.fr>
12820
12821 Pessimize the code to simplify it: from now on, all the states
12822 have a valid SHIFTS, which NSHIFTS is possibly 0.
12823
12824 * src/LR0.c (shifts_new): Be global and move to..
12825 * src/state.c, src/state.h: here.
12826 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
12827 * src/print_graph: Adjust.
12828
9839bbe5
AD
128292001-12-05 Akim Demaille <akim@epita.fr>
12830
12831 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
12832 * src/conflicts.c: Use it.
12833 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
12834 incorrectly ``simplified''.
12835
9f136c07
AD
128362001-12-05 Akim Demaille <akim@epita.fr>
12837
12838 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
12839 using the good o' techniques: arrays not pointers, variable
12840 locality, BITISSET, RESETBIT etc.
12841
b608206e
AD
128422001-12-05 Akim Demaille <akim@epita.fr>
12843
12844 * src/state.h (SHIFT_SYMBOL): New.
12845 * src/conflicts.c: Use it to deobfuscate.
12846
52afa962
AD
128472001-12-05 Akim Demaille <akim@epita.fr>
12848
12849 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
12850 (print_reductions): De-obfuscate using the good o' techniques:
12851 arrays not pointers, variable locality, BITISSET.
12852
e74dc321
AD
128532001-12-05 Akim Demaille <akim@epita.fr>
12854
12855 * src/conflicts.c (print_reductions): Arrays, not pointers.
12856 Use BITISSET.
12857
768fca83
AD
128582001-12-05 Akim Demaille <akim@epita.fr>
12859
12860 * src/conflicts.c (print_reductions): Pessimize, but clarify.
12861
a17e599f
AD
128622001-12-05 Akim Demaille <akim@epita.fr>
12863
12864 * src/conflicts.c (print_reductions): Improve variable locality.
12865
a04bc341
AD
128662001-12-05 Akim Demaille <akim@epita.fr>
12867
12868 * src/conflicts.c (print_reductions): Pessimize, but clarify.
12869
c8ea038e
AD
128702001-12-05 Akim Demaille <akim@epita.fr>
12871
12872 * src/conflicts.c (print_reductions): Improve variable locality.
12873
aa2aab3c
AD
128742001-12-05 Akim Demaille <akim@epita.fr>
12875
12876 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
12877 * src/lalr.c: Use them.
12878
b178c8cc
AD
128792001-12-05 Akim Demaille <akim@epita.fr>
12880
12881 * src/LR0.c (augment_automaton): Formatting changes.
12882 Better variable locality.
12883
f67d13aa
AD
128842001-12-05 Akim Demaille <akim@epita.fr>
12885
12886 * src/lalr.c (matrix_print): New.
12887 (transpose): Use it.
12888 Use arrays instead of pointers.
12889
c2713865
AD
128902001-12-05 Akim Demaille <akim@epita.fr>
12891
12892 * src/lalr.c (maxrhs): Move to...
12893 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
12894 * src/lalr.c (build_relations): Adjust.
12895
9887c18a
AD
128962001-12-05 Akim Demaille <akim@epita.fr>
12897
12898 * src/lalr.c (transpose): Free the memory allocated to the
12899 argument, as it is replaced by the results by the unique caller.
12900 (build_relations): Merely invoke transpose: it handles the memory
12901 deallocation.
12902 Improve variable locality.
12903 Avoid variables used as mere abbreviations.
12904 (compute_lookaheads): Use arrays instead of pointers.
12905
4d4f699c
AD
129062001-12-05 Akim Demaille <akim@epita.fr>
12907
12908 * src/lalr.c (initialize_F): Improve variable locality.
12909 Avoid variables used as mere abbreviations.
12910
80a69750
AD
129112001-12-05 Akim Demaille <akim@epita.fr>
12912
12913 * src/derives.c (print_derives): Display the ruleno.
12914 * src/lalr.c (initialize_F, transpose): Better variable locality
12915 to improve readability.
12916 Avoid variables used as mere abbreviations.
12917
fe961097
AD
129182001-12-05 Akim Demaille <akim@epita.fr>
12919
12920 * src/lalr.c (traverse): Use arrays instead of pointers.
12921
e3e4e814
AD
129222001-12-05 Akim Demaille <akim@epita.fr>
12923
12924 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
12925 the handling of squeue.
12926 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12927
630e182b
AD
129282001-12-05 Akim Demaille <akim@epita.fr>
12929
12930 Because useless nonterminals are now kept alive (instead of being
12931 `destroyed'), we now sometimes examine them, and store information
12932 related to them. Hence we need to know their number, and adjust
12933 memory allocations.
12934
12935 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
12936 static.
12937 * src/LR0.c (allocate_itemsets): The memory allocated to
12938 `symbol_count' was used for two different purpose: once to count
12939 the number of occurrences of each symbol, and later reassigned to
12940 `shift_symbol', containing the symbol that can be shifted from a
12941 given state.
12942 Deobfuscate, i.e., allocate, use and free `symbol_count' here
12943 only, and...
12944 (new_itemsets): Allocate `shift_symbol' here.
12945 (allocate_itemsets): symbol_count includes useless nonterminals.
12946 Make room for them.
12947 (free_storage): Use `free', not `XFREE', for pointers that cannot
12948 be null.
12949
81b51460
AD
129502001-12-05 Akim Demaille <akim@epita.fr>
12951
12952 * src/nullable.c (set_nullable): Deobfuscate the handling of
12953 ritem.
12954 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
12955
3067fbef
AD
129562001-12-05 Akim Demaille <akim@epita.fr>
12957
12958 * src/gram.c, src/gram.h (ritem_print): New.
12959 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
12960 (This useless function was defined only to work around VMS linkers
12961 that can't handle compilation units with variables only).
12962 * src/reduce.c (dump_grammar): Use it to trace the construction of
12963 ritem.
12964
c2bea5f9
PE
129652001-12-04 Paul Eggert <eggert@twinsun.com>
12966
7d27c823
PE
12967 * src/bison.simple (union yyalloc): Change member names
12968 to be the same as the stack names.
12969 (yyparse): yyptr is now union yyalloc *, not char *.
12970 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
12971 and may generate better code on some machines.
c2bea5f9
PE
12972 (yystpcpy): Use prototype if __STDC__ is defined, not just
12973 if __cplusplus is defined.
35687a9d 12974
2c8a9dfa
AD
129752001-11-30 Akim Demaille <akim@epita.fr>
12976
12977 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
12978 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
12979 Gettext doesn't compile cleanly, and dies with -Werror.
12980 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
12981 Include WARNING_CFLAGS here.
12982 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
12983 before being defined.
12984
f4e421e6
AD
129852001-11-27 Paul Eggert <eggert@twinsun.com>
12986
12987 * lib/quotearg.h (quotearg_n, quotearg_n_style):
12988 First arg is int, not unsigned.
12989 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
12990 (SIZE_MAX, UINT_MAX): New macros.
12991 (quotearg_n_options): Abort if N is negative.
12992 Avoid overflow check on hosts where size_t is 64 bits and int
12993 is 32 bits, as overflow is impossible there.
12994 Fix off-by-one typo that caused unnecessary reallocation.
12995
7093d0f5
AD
129962001-11-29 Paul Eggert <eggert@twinsun.com>
12997
12998 Name space cleanup in generated parser.
12999
13000 * doc/bison.texinfo (Bison Parser): Discuss system headers
13001 and their effect on the user name space.
13002
13003 * src/bison.simple:
13004 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
13005 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
13006 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
13007
13008 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
13009 on user names when possible.
13010
13011 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
13012 Simplify test for whather <alloca.h> exists.
13013
13014 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
13015
13016 (<stdio.h>): Include if YYDEBUG.
13017
13018 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
13019 ! defined (yyoverflow) && ! defined (yymemcpy).
13020
13021 (yymemcpy, yyparse): Rename local variables as needed so that
13022 they all begin with 'yy'.
13023
13024 (yystrlen, yystpcpy): New functions.
13025
13026 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
13027 All uses changed.
13028
13029 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
13030 instead of relying on string.h functions. Use YYSTACK_ALLOC
13031 and YYSTACK_FREE instead of malloc and free.
13032
fd51e5ff
AD
130332001-11-30 Akim Demaille <akim@epita.fr>
13034
13035 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
13036 before their first uses.
13037 (YYBISON, YYPURE): Move to the top of the output.
13038
7d13ff5f
AD
130392001-11-30 Akim Demaille <akim@epita.fr>
13040
13041 * tests/reduce.at (Useless Nonterminals): Fix.
13042
892a3995
AD
130432001-11-30 Akim Demaille <akim@epita.fr>
13044
13045 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
13046 if body instead of `;' to pacify GCC's warnings.
13047
68f1e3ed
AD
130482001-11-30 Akim Demaille <akim@epita.fr>
13049
13050 Instead of mapping the LHS of unused rules to -1, keep the LHS
13051 valid, but flag the rules as invalid.
13052
13053 * src/gram.h (rule_t): `useful' is a new member.
13054 * src/print.c (print_grammar): Adjust.
13055 * src/derives.c (set_derives): Likewise.
13056 * src/reader.c (packgram, reduce_output): Likewise.
13057 * src/reduce.c (reduce_grammar_tables): Likewise.
13058 * tests/reduce.at (Underivable Rules, Useless Rules): New.
13059
d2d1b42b
AD
130602001-11-30 Akim Demaille <akim@epita.fr>
13061
13062 * src/reduce.c (reduce_output): Formatting changes.
13063 * src/print.c (print_results, print_grammar): Likewise.
13064 * tests/regression.at (Rule Line Numbers)
13065 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
13066
760b53a8
AD
130672001-11-30 Akim Demaille <akim@epita.fr>
13068
13069 * src/reduce.c (nonterminals_reduce): Instead of throwing away
13070 useless nonterminals, move them at the end of the symbol arrays.
13071 (reduce_output): Adjust.
13072 * tests/reduce.at (Useless Nonterminals): Adjust.
13073
00238958
AD
130742001-11-30 Akim Demaille <akim@epita.fr>
13075
13076 * src/reduce.c: Various comment/formatting changes.
13077 (nonterminals_reduce): New, extracted from...
13078 (reduce_grammar_tables): here.
13079 (reduce_grammar): Call nonterminals_reduce.
13080
396452de
PE
130812001-11-29 Paul Eggert <eggert@twinsun.com>
13082
13083 * src/bison.simple (YYSTACK_REALLOC): Remove.
13084 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
13085 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
13086 New macros.
13087 (union yyalloc): New type.
13088 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
13089 an arbitrary restriction on hosts where size_t is wider than int.
13090
13091 (yyparse): Don't dump core if alloca or malloc fails; instead, report
13092 a parser stack overflow. Allocate just one block of memory for all
13093 three stacks, instead of allocating three blocks; this typically is
13094 faster and reduces fragmentation.
13095
13096 Do not limit the number of items in the stack to a value that fits
13097 in 'int', as this is an arbitrary limit on hosts with 64-bit
13098 size_t and 32-bit int.
13099
147e184c
MA
131002001-11-29 Marc Autret <autret_m@epita.fr>
13101
13102 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
13103 of defining YYERROR_VERBOSE.
13104 [AT_DATA]: $4 is now out of C declarations in the prologue.
13105
426cf563
MA
131062001-11-28 Marc Autret <autret_m@epita.fr>
13107
13108 * src/reader.c (parse_dquoted_param): New.
13109 (parse_skel_decl): Use it.
13110 * src/lex.h: Add its prototype.
13111 * src/lex.c (literalchar): Become not static.
13112
c7925b99
MA
131132001-11-28 Marc Autret <autret_m@epita.fr>
13114
13115 * src/output.h: And put its extern declaration here.
13116 * src/output.c (error_verbose): Define here.
13117 (prepare): Echo name modification.
13118 * src/getargs.h: Clean its extern declaration.
13119 * src/getargs.c (error_verbose_flag): Remove.
13120 (getargs): Remove case 'e'.
13121 * src/options.c (option_table): 'error-verbose' is now seen as simple
13122 percent option.
13123 Include output.h.
13124
13125 * src/reader.c (read_declarations): Remove case tok_include.
13126 (parse_include_decl): Remove.
13127 * src/lex.h (token_t): Remove tok_include.
13128 * src/options.c (option_table): 'include' is now a simple command line
13129 option.
13130
5b5d1929
MA
131312001-11-28 Marc Autret <autret_m@epita.fr>
13132
13133 * src/bison.simple: Adjust muscle names.
13134 * src/muscle_tab.c (muscle_init): Also rename the muscles.
13135 * src/output.c (prepare): s/_/-/ for the muscles names.
13136 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
13137
8850be4b
MA
131382001-11-28 Marc Autret <autret_m@epita.fr>
13139
13140 * src/bison.simple: Fix debug.
13141 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
13142
4a38e613
AD
131432001-11-28 Akim Demaille <akim@epita.fr>
13144
13145 * src/LR0.c (shifts_new): New.
13146 (save_shifts, insert_start_shift, augment_automaton): Use it.
13147
4b35e1c1
AD
131482001-11-28 Akim Demaille <akim@epita.fr>
13149
13150 * src/closure.c (closure): `b' and `ruleno' denote the same value:
13151 keep ruleno only.
13152
d2b04478
AD
131532001-11-28 Akim Demaille <akim@epita.fr>
13154
13155 * src/closure.c (closure): Instead of looping over word in array
13156 then bits in words, loop over bits in array.
13157
2c4c30aa
AD
131582001-11-28 Akim Demaille <akim@epita.fr>
13159
13160 * src/closure.c (closure): No longer optimize the special case
13161 where all the bits of `ruleset[r]' are set to 0, to make the code
13162 clearer.
13163
576890b7
AD
131642001-11-28 Akim Demaille <akim@epita.fr>
13165
13166 * src/closure.c (closure): `r' and `c' are new variables, used to
13167 de-obfuscate accesses to RULESET and CORE.
13168
cb487d7d
AD
131692001-11-28 Akim Demaille <akim@epita.fr>
13170
13171 * src/reduce.c (reduce_print): Use ngettext.
13172 (dump_grammar): Improve the trace accuracy.
13173
6013d43f
AD
131742001-11-28 Akim Demaille <akim@epita.fr>
13175
13176 * src/reduce.c (dump_grammar): Don't translate trace messages.
13177
cb4956ee
AD
131782001-11-28 Akim Demaille <akim@epita.fr>
13179
13180 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
13181 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
13182 as all tags are free'ed afterwards.
13183 From Enrico Scholz.
13184
648185ab
PE
131852001-11-27 Paul Eggert <eggert@twinsun.com>
13186
13187 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
13188 use alloca when we didn't want to, and vice versa.
13189
68254a03
MA
131902001-11-27 Marc Autret <autret_m@epita.fr>
13191
9113b58f
AD
13192 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
13193 initialization.
68254a03
MA
13194 * src/output.c (prepare): Remove its update.
13195
04d843a2
MA
131962001-11-27 Marc Autret <autret_m@epita.fr>
13197
13198 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
13199 Use %error-verbose.
13200
d2079671 132012001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
13202
13203 * src/bison.simple: Remove YYERROR_VERBOSE using.
13204 Use %%error_verbose.
13205 (yyparse): Likewise.
13206 * src/output.c (prepare): Give its final value.
13207 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
13208 * src/getargs.h: Add its extern declaration.
13209 * src/getargs.c (error_verbose_flag): New int.
13210 (getargs): Update to catch new case.
13211 * src/options.c (option_table): 'error-verbose' is a new option.
13212 (shortopts): Update.
13213
e0327bc8
AD
132142001-11-27 Akim Demaille <akim@epita.fr>
13215
13216 * src/system.h: Use intl/libgettext.h.
13217 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
13218
000f1a3c
AD
132192001-11-27 Akim Demaille <akim@epita.fr>
13220
13221 * tests/torture.at (Exploding the Stack Size with Malloc):
13222 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
13223
26cfe0be
AD
132242001-11-27 Akim Demaille <akim@epita.fr>
13225
13226 * src/files.c: Include error.h.
13227 Reported by Hans Aberg.
13228
f6bd5427
MA
132292001-11-26 Marc Autret <autret_m@epita.fr>
13230
d2079671 13231 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
13232 (read_declarations): Add case tok_include.
13233 * src/getargs.h (include): Add its extern definition.
13234 * src/getargs.c (include): New const char *.
13235 (getargs): Add case '-I'.
13236 * src/options.c (option_table): Add include as command line and
13237 percent option.
13238 * src/lex.h (token_t): Add tok_include.
13239
2ca209c1
AD
132402001-11-26 Akim Demaille <akim@epita.fr>
13241
13242 * src/reader.c (readgram): Make sure rules for mid-rule actions
13243 have a lineno equal to that of their host rule.
13244 Reported by Hans Aberg.
13245 * tests/regression.at (Rule Line Numbers): New.
13246
0e41b407
AD
132472001-11-26 Akim Demaille <akim@epita.fr>
13248
13249 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
13250 size_ts.
13251
132522001-11-26 Akim Demaille <akim@epita.fr>
13253
13254 * src/complain.c, src/complain.h (error): Remove, provided by
13255 lib/error.[ch].
13256
e0c40012
AD
132572001-11-26 Akim Demaille <akim@epita.fr>
13258
13259 * src/reader.c (read_declarations): Don't abort on tok_illegal,
13260 issue an error message.
13261 * tests/regression.at (Invalid %directive): New.
13262 Reported by Hans Aberg.
13263
5e147124
AD
132642001-11-26 Akim Demaille <akim@epita.fr>
13265
13266 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
13267 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
13268
a034c8b8
AD
132692001-11-26 Akim Demaille <akim@epita.fr>
13270
13271 * src/conflicts.c (conflicts_print): Don't complain at all when
13272 there are no reduce/reduce conflicts, and as many shift/reduce
13273 conflicts as expected.
13274 * tests/regression.at (%expect right): Adjust.
13275
c64a20f3
AD
132762001-11-23 Akim Demaille <akim@epita.fr>
13277
13278 * lib/alloca.c: Update, from fileutils.
13279
5b0d29bb
AD
132802001-11-23 Akim Demaille <akim@epita.fr>
13281
13282 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
13283
722c4bfe
AD
132842001-11-23 Akim Demaille <akim@epita.fr>
13285
13286 * src/system.h: Include alloca.h.
13287 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
13288
6255b435
AD
132892001-11-23 Akim Demaille <akim@epita.fr>
13290
13291 * src/print_graph.c (print_actions): Remove `rule', unused.
13292 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
13293 pacify GCC's signed < unsigned warnings.
13294 * src/closure.c (itemsetsize): Likewise.
13295 * src/reader.c (symbol_list_new): Static.
13296
b29b2ed5
AD
132972001-11-23 Akim Demaille <akim@epita.fr>
13298
13299 Attaching lineno to buckets is stupid, since only one copy of each
13300 symbol is kept, only the line of the first occurrence is kept too.
13301
13302 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
13303 * src/reader.c (rline_allocated): Remove, unused.
13304 (symbol_list): Have a `line' member.
13305 (symbol_list_new): New.
13306 (readgram): Use it.
13307 * src/print.c (print_grammar): Output the rule line numbers.
13308 * tests/regression.at (Solved SR Conflicts)
13309 (Unresolved SR Conflicts): Adjust.
13310 Reported by Hans Aberg.
13311
a81b1d4a
MA
133122001-11-22 Marc Autret <autret_m@epita.fr>
13313
13314 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
13315
c1ecb3c1
MA
133162001-11-22 Marc Autret <autret_m@epita.fr>
13317
13318 * src/muscle_tab.c (muscle_init): Remove initialization of
13319 skeleton muscle.
13320 * src/output.c (output_master_parser): Do it here.
13321
fbe01355
AD
133222001-11-20 Akim Demaille <akim@epita.fr>
13323
13324 * po/sv.po: New.
13325 * configure.in (ALL_LINGUAS): Adjust.
13326 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
13327 longer contains strings to translate.
13328
81e895c0
AD
133292001-11-19 Akim Demaille <akim@epita.fr>
13330
13331 * src/conflicts.c (conflicts_print): Add a missing \n.
13332
6bb1878b
AD
133332001-11-19 Akim Demaille <akim@epita.fr>
13334
13335 * src/nullable.c (nullable_print): New.
13336 (set_nullable): Call it when tracing.
13337 Better locality of variables.
13338
d9ec2d07
AD
133392001-11-19 Akim Demaille <akim@epita.fr>
13340
13341 * src/print.c (print_actions): Better locality of variables.
13342
720e5c1b
AD
133432001-11-19 Akim Demaille <akim@epita.fr>
13344
13345 * src/derives.c (print_derives): Fix and enrich.
13346 * src/closure.c (print_fderives): Likewise.
13347
fb908786
AD
133482001-11-19 Akim Demaille <akim@epita.fr>
13349
13350 * src/closure.c (itemsetend): Remove, replaced with...
13351 (itemsetsize): new.
13352
125ecb56
AD
133532001-11-19 Akim Demaille <akim@epita.fr>
13354
13355 * src/LR0.c (kernel_end): Remove, replaced with...
13356 (kernel_size): new.
13357
d8cf039f
AD
133582001-11-19 Akim Demaille <akim@epita.fr>
13359
13360 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
13361 to clarify.
13362
7bec0760
AD
133632001-11-19 Akim Demaille <akim@epita.fr>
13364
13365 * src/closure.c (closure): Use arrays instead of pointers to clarify.
13366
c87d4863
AD
133672001-11-19 Akim Demaille <akim@epita.fr>
13368
13369 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
13370 trace messages.
13371 * src/LR0.c: Likewise.
13372 (allocate_itemsets): Use arrays instead of pointers to clarify.
13373
9bfe901c
AD
133742001-11-19 Akim Demaille <akim@epita.fr>
13375
13376 * src/getargs.c (statistics_flag): Replace with...
13377 (trace_flag): New.
13378 (longopts): Accept --trace instead of --statistics.
13379 * src/getargs.h, src/options.c: Adjust.
13380 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
13381 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
13382
97db7bd4
AD
133832001-11-19 Akim Demaille <akim@epita.fr>
13384
cc72668c 13385 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
13386 pointers to clarify the code.
13387 (save_reductions, save_shifts): Factor common parts of alternatives.
13388
2c5f66ed
AD
133892001-11-19 Akim Demaille <akim@epita.fr>
13390
13391 * src/LR0.c (new_state, get_state): Complete TRACE code.
13392 * src/closure.c: Include `reader.h' to get `tags', needed by the
13393 trace code.
13394 Rename the conditional DEBUG as TRACE.
13395 Output consistently TRACEs to stderr, not stdout.
13396 * src/derives.c: Likewise.
13397 * src/reduce.c: (inaccessable_symbols): Using if is better style
13398 than goto.
13399 Use `#if TRACE' instead of `#if 0' for tracing code.
13400
300f275f
AD
134012001-11-19 Akim Demaille <akim@epita.fr>
13402
13403 * src/system.h (LIST_FREE, shortcpy): New.
13404 * src/LR0.c: Use them.
13405 * src/output.c (free_itemsets, free_reductions, free_shifts):
13406 Remove, replaced by LIST_FREE.
13407
f59c437a
AD
134082001-11-19 Akim Demaille <akim@epita.fr>
13409
13410 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
13411 (REDUCTIONS_ALLOC): New.
13412 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
13413 allocation.
13414
6986fd9e
AD
134152001-11-19 Akim Demaille <akim@epita.fr>
13416
13417 * src/LR0.c (new_state): Complete trace code.
13418 * src/nullable.c (set_nullable): Don't translate traces.
13419
4bc30f78
AD
134202001-11-19 Akim Demaille <akim@epita.fr>
13421
13422 * src/print_graph.c (print_core): Better locality of variables.
13423 * src/print.c (print_core): Likewise.
13424
08a946e0
AD
134252001-11-19 Akim Demaille <akim@epita.fr>
13426
13427 * src/vcg.c: You do the output, so you are responsible of the
13428 handling of VCG syntax, in particular: use quotearg.
13429 * src/print_graph.c: Don't.
13430 (print_actions): Don't output the actions as part of the nodes,
13431 since that's the job of the edges.
13432 (print_state): Don't output by hand: fill the node description,
9bfe901c 13433 and ask for its output.
08a946e0 13434
f0473484
AD
134352001-11-19 Akim Demaille <akim@epita.fr>
13436
cc72668c
AD
13437 * src/bison.simple (yyparse): When verbosely reporting an error,
13438 no longer put additional quotes around token names.
f0473484
AD
13439 * tests/calc.at: Adjust.
13440
e41dc700
AD
134412001-11-19 Akim Demaille <akim@epita.fr>
13442
13443 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
13444 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
13445 * src/output.c: Adjust.
13446
652a871c
AD
134472001-11-19 Akim Demaille <akim@epita.fr>
13448
13449 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
13450 (rule_t): this.
13451 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
13452
b2ed6e58
AD
134532001-11-19 Akim Demaille <akim@epita.fr>
13454
13455 * src/gram.h (rule_t): New.
13456 (rule_table): New.
13457 (rrhs, rlhs): Remove, part of state_t.
13458 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
13459 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13460 * src/reader.c, src/reduce.c: Adjust.
13461
edad7067
AD
134622001-11-19 Akim Demaille <akim@epita.fr>
13463
13464 * src/reader.c (symbols_output): New, extracted from...
13465 (packsymbols): Here.
13466 (reader): Call it.
13467
3feec034
AD
134682001-11-19 Akim Demaille <akim@epita.fr>
13469
13470 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
13471 (maxrhs): this new function.
13472
ddcd5fdf
AD
134732001-11-19 Akim Demaille <akim@epita.fr>
13474
cc72668c 13475 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
13476 Adjust.
13477
bb527fc2
AD
134782001-11-19 Akim Demaille <akim@epita.fr>
13479
cc72668c 13480 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
13481 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13482 * src/lalr.c: Adjust.
13483
a845a697
AD
134842001-11-19 Akim Demaille <akim@epita.fr>
13485
13486 * src/lalr.c (initialize_LA): Only initialize LA. Let...
13487 (set_state_table): handle the `lookaheads' members.
13488
f004bf6a
AD
134892001-11-19 Akim Demaille <akim@epita.fr>
13490
cc72668c
AD
13491 * src/lalr.h (lookaheads): Removed array, whose contents is now
13492 a member of...
f004bf6a
AD
13493 (state_t): this structure.
13494 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13495 Adjust.
13496
de326cc0
AD
134972001-11-19 Akim Demaille <akim@epita.fr>
13498
cc72668c
AD
13499 * src/lalr.h (consistent): Removed array, whose contents is now
13500 a member of...
de326cc0
AD
13501 (state_t): this structure.
13502 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13503 Adjust.
13504
90b4416b
AD
135052001-11-19 Akim Demaille <akim@epita.fr>
13506
cc72668c
AD
13507 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
13508 contents are now members of...
90b4416b
AD
13509 (state_t): this structure.
13510 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
13511 Adjust.
13512
9703cc49
AD
135132001-11-19 Akim Demaille <akim@epita.fr>
13514
13515 * src/lalr.h (state_t): New.
13516 (state_table): Be a state_t * instead of a core **.
13517 (accessing_symbol): Remove, part of state_t.
13518 * src/lalr.c: Adjust.
13519 (set_accessing_symbol): Merge into...
13520 (set_state_table): this.
13521 * src/print_graph.c, src/conflicts.c: Adjust.
13522
d803322e
AD
135232001-11-14 Akim Demaille <akim@epita.fr>
13524
13525 * tests/calc.at, tests/output.at, tests/regression.at,
13526 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
13527 now the tests are run in private dirs, therefore AC_CLEANUP and
13528 family can be simplified to 0-ary.
13529 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
13530 use abs. path to find config.h.
13531 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
13532 stderr, there can be way too much random noise.
13533 Instead pass -Werror to GCC and rely on the exit status.
13534 Reported by Wolfram Wagner.
13535
3d76b07d
AD
135362001-11-14 Akim Demaille <akim@epita.fr>
13537
13538 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
13539 defined only if yyoverflow is defined, to avoid `warning: unused
13540 variable `yyvs1''.
13541 Reported by The Test Suite.
13542
09b503c8
AD
135432001-11-14 Akim Demaille <akim@epita.fr>
13544
13545 * src/print.c: Include reduce.h.
13546 Reported by Hans Aberg.
13547
135482001-11-14 Akim Demaille <akim@epita.fr>
13549
13550 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
13551 Revert a previous patch: these are really const.
13552 * src/conflicts.c (conflict_report): Additional useless pair of
13553 braces to pacify GCC's warnings for `if () if () {} else {}'.
13554 * src/lex.c (parse_percent_token): Replace equal_offset with
13555 arg_offset.
13556 arg is const.
13557 Be sure to strdup `arg' when used, since there is no reason for
13558 token_buffer not to change.
13559
0f37a994
AD
135602001-11-14 Akim Demaille <akim@epita.fr>
13561
13562 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
13563 definition.
13564 * src/main.c (main): Use them.
13565 Suggested by Hans Aberg.
13566
d39d93b8
AD
135672001-11-12 Akim Demaille <akim@epita.fr>
13568
13569 * src/system.h (ngettext): Now that we use ngettext, be sure to
13570 provide a default definition when NLS are not used.
13571
9edcd895
AD
135722001-11-12 Akim Demaille <akim@epita.fr>
13573
13574 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
13575 Use @kbd to denote user input.
13576 (Language and Grammar): ANSIfy the example.
13577 Adjust its layout for info/notinfo.
13578 (Location Tracking Calc): Output error messages to stderr.
13579 Output locations in a more GNUtically correct way.
13580 Fix a couple of Englishos.
13581 Adjust @group/@end group pairs.
13582
7da99ede
AD
135832001-11-12 Akim Demaille <akim@epita.fr>
13584
e3aa65c5 13585 %expect was not functioning at all.
7da99ede
AD
13586
13587 * src/conflicts.c (expected_conflicts): Set to -1.
13588 (conflict_report): Use ngettext.
13589 (conflicts_print): Check %expect and make its violation an error.
13590 * doc/bison.texinfo (Expect Decl): Adjust.
13591 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
13592 * tests/regression.at (%expect not enough, %expect right)
13593 (%expect too much): New.
13594
ba9dda1a
AD
135952001-11-12 Akim Demaille <akim@epita.fr>
13596
13597 * tests/regression.at (Conflicts): Rename as...
13598 (Unresolved SR Conflicts): this.
13599 (Solved SR Conflicts): New.
13600
337c5bd1
AD
136012001-11-12 Akim Demaille <akim@epita.fr>
13602
13603 * src/reduce.c (print_results): Rename as...
13604 (reduce_output): This.
13605 Output to OUT, passed as argument, instead of output_obstack.
13606 (dump_grammar): Likewise.
13607 (reduce_free): New.
13608 Also free V1.
13609 (reduce_grammar): No longer call reduce_output, since...
13610 * src/print.c (print_results): do it.
13611 * src/main.c (main): Call reduce_free;
13612
c73a41af
AD
136132001-11-12 Akim Demaille <akim@epita.fr>
13614
13615 * src/conflicts.c (print_reductions): Accept OUT as argument.
13616 Output to it, not to output_obstack.
13617 * src/print.c (print_actions): Adjust.
13618
0df87bb6
AD
136192001-11-12 Akim Demaille <akim@epita.fr>
13620
13621 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
13622 the result instead of using...
13623 (src_total, rrc_total, src_count, rrc_count): Remove.
13624 (any_conflicts): Remove.
13625 (print_conflicts): Split into...
13626 (conflicts_print, conflicts_output): New.
13627 * src/conflicts.h: Adjust.
13628 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 13629 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
13630 * tests/regression.at (Conflicts): New.
13631 Reported by Tom Lane.
13632
e4d3d4de
AD
136332001-11-12 Akim Demaille <akim@epita.fr>
13634
13635 * tests/regression.at (Invalid input): Remove, duplicate with
13636 ``Invalid input: 1''.
13637
6d7d248e
AD
136382001-11-12 Akim Demaille <akim@epita.fr>
13639
13640 * tests/torture.at (AT_DATA_STACK_TORTURE)
13641 (Exploding the Stack Size with Alloca)
13642 (Exploding the Stack Size with Malloc): New.
13643
e9e4c321
AD
136442001-11-12 Akim Demaille <akim@epita.fr>
13645
13646 * src/bison.simple (YYSTACK_REALLOC): New.
13647 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 13648 Reported by Per Allansson.
e9e4c321 13649
5f7e0832
AD
136502001-11-12 Pascal Bart <pascal.bart@epita.fr>
13651
13652 * src/bison.simple: Define type yystype instead of YYSTYPE, and
13653 define CPP macro, which substitute YYSTYPE by yystype.
13654 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
13655 with yyltype/YYLTYPE. This allows inclusion of the generated
13656 header within the parser if the compiler, such as GGC, accepts
13657 multiple equivalent #defines.
13658 From Akim.
13659
e3f1699f
AD
136602001-11-05 Akim Demaille <akim@epita.fr>
13661
13662 * src/reader.c (symbols_output): New, extracted from...
13663 (packsymbols): here.
13664 (reader): Adjust.
13665
65be0866
AD
136662001-11-05 Akim Demaille <akim@epita.fr>
13667
13668 * src/lex.c (parse_percent_token): s/quotearg/quote/.
13669
e4d910bf
AD
136702001-11-05 Akim Demaille <akim@epita.fr>
13671
13672 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
13673 pattern.
13674
951366c1
AD
136752001-11-05 Akim Demaille <akim@epita.fr>
13676
13677 * src/options.h (struct option_table_struct): set_flags is void*.
13678 * src/options.c (longopts): Support `--output' and `%output'.
13679 (usage): Adjust.
13680 * src/lex.h (tok_setopt): Remove, replaced with...
13681 (tok_intopt, tok_stropt): these new guys.
13682 * src/lex.c (getopt.h): Not needed.
13683 (token_buffer, unlexed_token_buffer): Not const.
13684 (percent_table): Promote `-' over `_' in directive names.
13685 Active `%name-prefix', `file-prefix', and `output'.
13686 (parse_percent_token): Accept possible arguments to directives.
13687 Promote `-' over `_' in directive names.
13688
d8988b2f
AD
136892001-11-04 Akim Demaille <akim@epita.fr>
13690
13691 * doc/bison.texinfo (Decl Summary): Split the list into
13692 `directives for grammars' and `directives for bison'.
13693 Sort'em.
13694 Add description of `%name-prefix', `file-prefix', and `output'.
13695 Promote `-' over `_' in directive names.
13696 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
13697 Simplify the description of `--name-prefix'.
13698 Promote `-' over `_' in directive names.
13699 Promote `--output' over `--output-file'.
13700 Fix the description of `--defines'.
13701 * tests/output.at: Exercise %file-prefix and %output.
13702
6468d18e
AD
137032001-11-02 Akim Demaille <akim@epita.fr>
13704
13705 * doc/refcard.tex: Update.
13706
6b7e85b9
AD
137072001-11-02 Akim Demaille <akim@epita.fr>
13708
13709 * src/symtab.h (SUNDEF): New.
13710 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
13711 stand for `uninitialized', instead of 0.
13712 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
13713 * src/lex.c (lex): Adjust.
13714
13715 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
13716 Number it 0.
13717 Let yylex return it instead of a plain 0.
13718 Reported by Dick Streefland.
13719
cd5aafcf
AD
137202001-11-02 Akim Demaille <akim@epita.fr>
13721
13722 * tests/regression.at (Mixing %token styles): New test.
13723
037ca2f1
AD
137242001-11-02 Akim Demaille <akim@epita.fr>
13725
13726 * src/reader.c (parse_thong_decl): Formatting changes.
13727 (token_translations_init): New, extracted from...
13728 (packsymbols): Here.
13729 Adjust.
13730
270a173c
AD
137312001-11-01 Akim Demaille <akim@epita.fr>
13732
13733 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
13734 Check that `9foo.y' produces correct cpp guards.
13735 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
13736 guards.
13737 Reported by Wwp.
13738
561f9a30
AD
137392001-11-01 Akim Demaille <akim@epita.fr>
13740
13741 * tests/regression.at (Invalid input: 2): New.
13742 * src/lex.c (unlexed_token_buffer): New.
13743 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
13744 too.
13745 Reported by Wwp.
13746
f987e9d2
AD
137472001-11-01 Akim Demaille <akim@epita.fr>
13748
13749 * tests/calc.at: Catch up with 1.30.
13750 * configure.in: Bump to 1.49a.
13751 Adjust to newer Autotest.
13752
0846f581
PB
137532001-10-19 Pascal Bart <pascal.bart@epita.fr>
13754
13755 * src/conflicts.c: Move global variables rrc_total and src_total ...
13756 (print_conflicts): here.
13757 * src/output.c (output): Free global variable user_toknums.
13758 * src/lex.c (token_obstack): Become static.
13759
3c1a79b3
AD
137602001-10-18 Akim Demaille <akim@epita.fr>
13761
13762 * tests/atlocal.in (GCC): Add.
13763 * tests/calc.at: s/m4_match/m4_bmatch/.
13764 s/m4_patsubst/m4_bpatsubst/.
13765 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
13766 * configure.in: AC_SUBST(GCC).
13767
5d52e7d0
MA
137682001-10-14 Marc Autret <autret_m@epita.fr>
13769
13770 * src/options.c (create_long_option_table): Fix.
13771
631aa1d3
AD
137722001-10-10 Akim Demaille <akim@epita.fr>
13773
13774 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
13775
f6ec6d13
AD
137762001-10-04 Akim Demaille <akim@epita.fr>
13777
13778 * src/reader.c (parse_union_decl): Push the caracters in
13779 union_obstack, not attrs_obstack.
13780
342b8b6e
AD
137812001-10-04 Akim Demaille <akim@epita.fr>
13782
13783 Merge in the branch 1.29.
13784
13785 * src/reader.c (packsymbols): Use a temporary obstack for
13786 `%%tokendef', since output_stack is already used elsewhere.
13787
13788 2001-10-02 Akim Demaille <akim@epita.fr>
13789
13790 Bump 1.29d.
13791
13792 2001-10-02 Akim Demaille <akim@epita.fr>
13793
13794 Version 1.29c.
13795
13796 2001-10-02 Akim Demaille <akim@epita.fr>
13797
13798 * tests/regression.at (Invalid CPP headers): New.
13799 From Alexander Belopolsky.
13800 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
13801
13802 2001-10-02 Akim Demaille <akim@epita.fr>
13803
13804 * tests/regression.at (Invalid input): New.
13805 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
13806 Reported by Shura.
13807
13808 2001-10-02 Akim Demaille <akim@epita.fr>
13809
13810 * tests/calc.at: Now that --debug works, the tests must be adjusted.
13811
13812 2001-10-02 Akim Demaille <akim@epita.fr>
13813
13814 * src/output.c (output_parser): Assert `skeleton'.
13815 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
13816 systems.
13817 From Shura.
13818
13819 2001-10-01 Marc Autret <autret_m@epita.fr>
13820
13821 * src/lex.h: Echo modifications.
13822 * src/lex.c (unlex): Parameter is now token_t.
13823 From Hans Aberg.
13824
13825 2001-10-01 Marc Autret <autret_m@epita.fr>
13826
13827 * src/main.c: Include lex.h.
13828 From Hans Aberg.
13829
13830 2001-09-29 Akim Demaille <akim@epita.fr>
13831
13832 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
13833
13834 2001-09-28 Akim Demaille <akim@epita.fr>
13835
13836 * tests/testsuite.at: Update to newer Autotest.
13837 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
13838
13839 2001-09-27 Akim Demaille <akim@epita.fr>
13840
13841 Position independent wrapper.
13842
13843 * tests/bison: Remove.
13844 * tests/bison.in: New.
13845 * configure.in: Adjust.
13846
13847 2001-09-27 Paul Eggert <eggert@twinsun.com>
13848
13849 Port quotearg fixes from tar 1.13.24.
13850
13851 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
13852 tm to be declared.
13853 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
13854 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
13855
13856 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
13857 * m4/mbrtowc.m4: New file.
13858 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
13859 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
13860
13861 2001-09-27 Akim Demaille <akim@epita.fr>
13862
13863 Bump to 1.29c.
13864
13865 2001-09-27 Akim Demaille <akim@epita.fr>
13866
13867 Version 1.29b.
13868
13869 2001-09-25 Akim Demaille <akim@epita.fr>
13870
13871 * src/system.h: Include `xalloc.h'.
13872 Remove it from the C files.
13873 * src/files.c (output_files): Free the obstacks.
13874 * src/lex.c (init_lex): Rename as...
13875 (lex_init): this.
13876 (lex_free): New.
13877 * src/main.c (main): Use it.
13878
13879 2001-09-24 Marc Autret <autret_m@epita.fr>
13880
13881 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
13882 to output informations in fout (FILE*).
13883 (open_graph, close_graph): Likewise.
13884 (output_graph, output_edge, output_node): Likewise.
13885 * src/vcg.h: Update function prototypes.
13886 * src/print_graph.c (print_graph): Open output graph file.
13887 (print_actions): Adjust.
13888 * src/files.h: Remove extern declaration.
13889 * src/files.c: Remove graph_obstack declaration.
13890 (open_files): Remove graph_obstack initialization.
13891 (output_files): Remove graph_obstack saving.
13892
13893 2001-09-24 Marc Autret <autret_m@epita.fr>
13894
13895 * src/files.c (compute_output_file_names): Fix.
13896
13897 2001-09-24 Marc Autret <autret_m@epita.fr>,
13898 Akim Demaille <akim@epita.fr>
13899
13900 * src/reader.c (reader): Remove call to free_symtab ().
13901 * src/main.c (main): Call it here.
13902 Include symtab.h.
13903 * src/conflicts.c (initialize_conflicts): Rename as...
13904 (solve_conflicts): this.
13905 * src/print.c (print_core, print_actions, print_state)
13906 (print_grammar): Dump to a file instead a `output_obstack'.
13907 (print_results): Dump `output_obstack', and then proceed with the
13908 FILE *.
13909 * src/files.c (compute_output_file_names, close_files): New.
13910 (output_files): Adjust.
13911 * src/main.c (main): Adjust.
13912
13913 2001-09-23 Marc Autret <autret_m@epita.fr>
13914
13915 * src/files.c (compute_header_macro): Computes header macro name
13916 from spec_defines_file when given.
13917
13918 2001-09-23 Marc Autret <autret_m@epita.fr>
13919
13920 * src/files.c (output_files): Add default extensions.
13921
13922 2001-09-22 Akim Demaille <akim@epita.fr>
13923
13924 * src/conflicts.c (finalize_conflicts): Rename as...
13925 (free_conflicts): this.
13926
13927 2001-09-22 Akim Demaille <akim@epita.fr>
13928
13929 * src/gram.c (gram_free): Rename back as...
13930 (dummy): this.
13931 (output_token_translations): Free `token_translations'.
13932 * src/symtab.c (free_symtab): Free the tag field.
13933
13934 2001-09-22 Akim Demaille <akim@epita.fr>
13935
13936 Remove `translations' as it is always set to true.
13937
13938 * src/gram.h: Adjust.
13939 * src/reader.c (packsymbols, parse_token_decl): Adjust
13940 * src/print.c (print_grammar): Adjust.
13941 * src/output.c (output_token_translations): Adjust.
13942 * src/lex.c (lex): Adjust.
13943 * src/gram.c: Be sure the set pointers to NULL.
13944 (dummy): Rename as...
13945 (gram_free): this.
13946
13947 2001-09-22 Akim Demaille <akim@epita.fr>
13948
13949 * configure.in: Invoke AM_LIB_DMALLOC.
13950 * src/system.h: Use dmalloc.
13951 * src/LR0.c: Be sure to have pointers initialized to NULL.
13952 (allocate_itemsets): Allocate kernel_items only if needed.
13953
13954 2001-09-22 Akim Demaille <akim@epita.fr>
13955
13956 * configure.in: Bump to 1.29b.
13957 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
13958 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
13959 need xmalloc.c in calc.y.
13960 From Pascal Bart.
13961
13962 2001-09-21 Akim Demaille <akim@epita.fr>
13963
13964 Version 1.29a.
13965 * Makefile.maint, config/config.guess, config/config.sub,
13966 * config/missing: Update from masters.
13967 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
13968 upon package.m4.
13969 * configure.in (ALL_LINGUAS): Add `tr'.
13970
13971 2001-09-21 Akim Demaille <akim@epita.fr>
13972
13973 * tests/Makefile.am (package.m4): Move to...
13974 ($(srcdir)/$(TESTSUITE)): here.
13975
13976 2001-09-20 Akim Demaille <akim@epita.fr>
13977
13978 * src/complain.c: No longer try to be standalone: use system.h.
13979 Don't assume __STDC__ is defined to 1. Just test if it is defined.
13980 * src/complain.h: Likewise.
13981 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
13982 Remove the unused variable `n'.
13983 From Albert Chin-A-Young.
13984
13985 2001-09-18 Marc Autret <autret_m@epita.fr>
13986
13987 * doc/bison.1: Update.
13988 * doc/bison.texinfo (Bison Options): Update --defines and --graph
13989 descriptions.
13990 (Option Cross Key): Update.
13991 Add --graph.
13992
13993 2001-09-18 Marc Autret <autret_m@epita.fr>
13994
13995 * tests/regression.at: New test (comment in %union).
13996
13997 2001-09-18 Marc Autret <autret_m@epita.fr>
13998
13999 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
14000 do that.
14001 Reported by Keith Browne.
14002
14003 2001-09-18 Marc Autret <autret_m@epita.fr>
14004
14005 * tests/output.at: Add tests for --defines and --graph.
14006
14007 2001-09-18 Marc Autret <autret_m@epita.fr>
14008
14009 * tests/output.at: Removes tests of %{header,src}_extension features.
14010
14011 2001-09-18 Akim Demaille <akim@epita.fr>
14012
14013 * tests/Makefile.am (package.m4): New.
14014 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
14015 (_AT_CHECK_CALC_ERROR): Likewise.
14016 Factor the `, ' part of verbose error messages.
14017
14018 2001-09-18 Marc Autret <autret_m@epita.fr>
14019
14020 * src/getargs.c (longopts): Declare --defines and --graph as options
14021 with optional arguments.
14022 * src/files.h: Add extern declarations.
14023 * src/files.c (spec_graph_file, spec_defines_file): New.
14024 (output_files): Update.
14025 Remove CPP-outed code.
14026
14027 2001-09-18 Marc Autret <autret_m@epita.fr>
14028
14029 Turn off %{source,header}_extension feature.
14030
14031 * src/files.c (compute_exts_from_gf): Update.
14032 (compute_exts_from_src): Update.
14033 (output_files): CPP-out useless code.
14034 * src/files.h: Remove {header,source}_extension extern declarations.
14035 * src/reader.c (parse_dquoted_param): CPP-out.
14036 (parse_header_extension_decl): Remove.
14037 (parse_source_extension_decl): Remove.
14038 (read_declarations): Remove cases tok_{hdrext,srcext}.
14039 * src/lex.c (percent_table): Remove {header,source}_extension entries.
14040 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
14041
14042 2001-09-10 Akim Demaille <akim@epita.fr>
14043
14044 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
14045 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
14046 (AT_CHECK_OUTPUT): this.
14047 Merely check ls' exit status, its output is useless.
14048
14049 2001-09-10 Akim Demaille <akim@epita.fr>
14050
14051 * tests/calc.at: Use m4_match.
14052 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
14053
14054 2001-09-10 Marc Autret <autret_m@epita.fr>,
14055 Akim Demaille <akim@epita.fr>
14056
14057 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
14058 enum color_e.
14059 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
14060 to `normal'.
14061 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
14062 * src/lex.h: Adjust prototype.
14063 (token_t): Add `tok_undef'.
14064 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
14065 (parse_percent_token): Now returns token_t.
14066 Add default statement in switch.
14067 (lex): Separate `c' as an input variable, from the token_t result
14068 part.
14069 (unlexed): Is a token_t.
14070
14071 2001-09-10 Akim Demaille <akim@epita.fr>
14072
14073 * configure.in: Bump to 1.29a.
14074
14075 2001-09-07 Akim Demaille <akim@epita.fr>
14076
14077 Version 1.29.
14078
14079 2001-08-30 Akim Demaille <akim@epita.fr>
14080
14081 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
14082 * m4/atconfig.m4: Remove.
14083 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
14084 * tests/bison: New.
14085 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
14086 m4_if, m4_patsubst, and m4_regexp.
14087 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
14088 `input' file instead of echo.
14089
14090 2001-08-29 Akim Demaille <akim@epita.fr>
14091
14092 Bump to 1.28e.
14093
14094 2001-08-29 Akim Demaille <akim@epita.fr>
14095
14096 Version 1.28d.
14097
14098 2001-08-29 Paul Eggert <eggert@twinsun.com>
14099
14100 * src/bison.simple (yyparse): Don't take the address of an
14101 item before the start of an array, as that doesn't conform to
14102 the C Standard.
14103
14104 2001-08-29 Robert Anisko <anisko_r@epita.fr>
14105
14106 * doc/bison.texinfo (Location Tracking Calc): New node.
14107
14108 2001-08-29 Paul Eggert <eggert@twinsun.com>
14109
14110 * src/output.c (output): Do not define const, as this now
14111 causes more problems than it cures.
14112
14113 2001-08-29 Akim Demaille <akim@epita.fr>
14114
14115 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
14116 the nodes.
14117 Be sure to tag the `detailmenu'.
14118
14119 2001-08-29 Akim Demaille <akim@epita.fr>
14120
14121 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
14122 download in a tmp dir.
14123
14124 2001-08-28 Marc Autret <autret_m@epita.fr>
14125
14126 * config/depcomp: New file.
14127
14128 2001-08-28 Marc Autret <autret_m@epita.fr>
14129
14130 * doc/bison.1 (mandoc): Adjust.
14131 From Juan Manuel Guerrero.
14132
14133 2001-08-28 Marc Autret <autret_m@epita.fr>
14134
14135 * src/print_graph.c (print_state): Fix.
14136
14137 2001-08-27 Marc Autret <autret_m@epita.fr>
14138
14139 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
14140 char * members.
14141 Echo modifications to the functions prototypes.
14142 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
14143
14144 2001-08-27 Marc Autret <autret_m@epita.fr>
14145
14146 * src/vcg.c: Include `xalloc.h'.
14147 (add_colorentry): New.
14148 (add_classname): New.
14149 (add_infoname): New.
14150 * src/vcg.h: Add new prototypes.
14151
14152 2001-08-27 Akim Demaille <akim@epita.fr>
14153
14154 * Makefile.maint: Sync. again with CVS Autoconf.
14155
14156 2001-08-27 Akim Demaille <akim@epita.fr>
14157
14158 * Makefile.maint: Formatting changes.
14159 (po-update, cvs-update, update): New targets.
14160 (AMTAR): Remove.
14161
14162 2001-08-27 Akim Demaille <akim@epita.fr>
14163
14164 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14165 * Makefile.maint: Sync. with CVS Autoconf.
14166
14167 2001-08-27 Marc Autret <autret_m@epita.fr>
14168
14169 * src/vcg.h (struct infoname_s): New.
14170 (struct colorentry_s): New.
14171 (graph_s): New fields {vertical,horizontal}_order in structure.
14172 Add `infoname' field.
14173 Add `colorentry' field;
14174 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
14175 (G_HORIZONTAL_ORDER): New.
14176 (G_INFONAME): New.
14177 (G_COLORENTRY): New.
14178 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
14179 Add output of `infoname'.
14180 Add output of `colorentry'.
14181
14182 2001-08-27 Marc Autret <autret_m@epita.fr>
14183
14184 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
14185 This one shadowed a global parameter.
14186
14187 2001-08-24 Marc Autret <autret_m@epita.fr>
14188
14189 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
14190 instead of `unsigned'.
14191 (print_state): Do not call obstack_object_size () in obstack_grow ()
14192 to avoid macro variables shadowing.
14193
14194 2001-08-23 Marc Autret <autret_m@epita.fr>
14195
14196 * src/lex.c (percent_table): Typo: s/naem/name/.
14197 Add graph option.
14198 Normalize new options declarations.
14199
14200 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
14201
14202 * tests/suite.at: Exercise %header_extension and %source_extension.
14203
14204 2001-08-16 Marc Autret <autret_m@epita.fr>
14205
14206 * src/reader.c (parse_dquoted_param): New.
14207 (parse_header_extension_decl): Use it.
14208 (parse_source_extension_decl): Likewise.
14209
14210 2001-08-16 Marc Autret <autret_m@epita.fr>
14211
14212 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
14213 (get_xxxx_str): Use assert () instead of complain ().
14214 Remove return invokations in default cases.
14215 (get_decision_str): Modify default behaviour. Remove second argument.
14216 Echo modifications on calls.
14217 (output_graph): Fix.
14218
14219 2001-08-16 Marc Autret <autret_m@epita.fr>
14220
14221 * src/getargs.c (usage): Update with ``-g, --graph''.
14222
14223 2001-08-16 Marc Autret <autret_m@epita.fr>
14224
14225 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
14226 (Option Cross Key): Likewise.
14227 * doc/bison.1: Update.
14228
1c8c2190
PB
142292001-09-25 Pascal Bart <pascal.bart@epita.fr>
14230
14231 * src/output.c (output_master_parser): Don't finish action_obstack.
14232 (output_parser): Don't care about the muscle action, here.
14233 (prepare): Copy the action_obstack in the action muscle.
14234 (output): Free action_obstack.
14235
180d45ba
PB
142362001-09-23 Pascal Bart <pascal.bart@epita.fr>
14237
14238 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
14239 will contain `%union' declaration.
14240 (parse_union_decl): Delete #line directive output.
14241 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
14242 informations about %union.
14243 (parse_union_decl): Copy the union_obstack in the muscle stype.
14244 * src/bison.simple: Add new #line directive.
14245 Add typdef %%stype YYSTYPE.
14246
c51d1a19
PB
142472001-09-23 Pascal Bart <pascal.bart@epita.fr>
14248
14249 * src/bison.simple: Add new `#line' directive.
14250
6f9344da
PB
142512001-09-22 Pascal Bart <pascal.bart@epita.fr>
14252
14253 * src/bison.simple: New `#line' directive.
14254 * src/output.c (output_parser): Support new dynamic muscle input_line.
14255
652def80
MA
142562001-09-22 Marc Autret <autret_m@epita.fr>
14257
14258 * src/output.c (output_master_parser): New.
14259 (output_parser): Be more re-entrant.
14260
25b222fa
MA
142612001-09-21 Marc Autret <autret_m@epita.fr>
14262
14263 * src/reader.c (copy_definition, parse_union_decl): Update and use
14264 `linef' muscle.
14265 (copy_action): Likewise.
14266 Use obstack_1grow ().
14267 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
14268
6bc35ae5
MA
142692001-09-21 Marc Autret <autret_m@epita.fr>
14270
14271 * src/options.c (option_table): Adjust.
14272 * src/lex.c (parse_percent_token): Fix.
14273
c0629aa1
PB
142742001-09-20 Pascal Bart <pascal.bart@epita.fr>
14275
14276 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 14277
82b6d266
PB
142782001-09-20 Pascal Bart <pascal.bart@epita.fr>
14279
14280 * src/lex.c (parse_percent_token): Change type of variable `tx', which
14281 is now an option_table_struct*.
14282 (option_strcmp): New function option_strcmp.
14283 (parse_percent_token): Call option_strcmp.
14284 * src/getargs.c (xalloc.h, options.h): Include it.
14285 (getargs): Call create_long_option_table.
14286 (getargs): Free longopts at the end of the function.
14287 (shortopts): Move in options.c.
14288 * src/options.c (create_long_option_table): New function. Convert
14289 information from option_table to option structure.
14290 * src/reader.c (options.h): Include it.
14291
14292 * src/Makefile.am: Adjust.
14293 * src/options.c (option_table): Create from longopts and percent_table.
14294 * src/getargs.c (longopts): Delete.
14295 * src/lex.c (struct percent_table_struct): Delete.
14296 (percent_table): Delete.
14297 (options.h): Include it.
14298 * src/options.c: Create.
14299 * src/options.h: Create.
14300 Declare enum opt_access_e.
14301 Define struct option_table_struct.
14302
75f5aaea
MA
143032001-09-20 Marc Autret <autret_m@epita.fr>
14304
14305 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
14306 sections of Bison.
14307
f508cb0a
PB
143082001-09-19 Pascal Bart <pascal.bart@epita.fr>
14309
14310 * src/bison.simple: s/%%filename/%%skeleton.
14311 * src/muscle_tab.c (getargs.h): Include it.
14312 (muscle_init): Insert new muscle skeleton.
14313
13105fc1
PB
143142001-09-18 Pascal Bart <pascal.bart@epita.fr>
14315
14316 * src/output.c (output_parser): Delete unused variable actions_dumped.
14317
b0c4483e
PB
143182001-09-07 Pascal Bart <pascal.bart@epita.fr>
14319
14320 * src/output.c (output): Delete call to reader_output_yylsp.
14321 * src/reader.c (reader): Likewise.
ba0fe3c7 14322 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 14323
11d82f03
MA
143242001-09-02 Marc Autret <autret_m@epita.fr>
14325
14326 * src/reader.c: Include muscle_tab.h.
14327 (parse_union_decl): Update.
14328 (parse_macro_decl): Rename parse_muscle_decl.
14329 Update to use renamed functions and variable.
14330 (read_declarations, copy_action, read_additionnal_code, : Updated
14331 with correct variables and functions names.
14332 (packsymbols, reader): Likewise.
342b8b6e 14333
11d82f03 14334 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 14335
11d82f03
MA
14336 * src/output.c: Include muscle_tab.h
14337 In all functions using macro_insert, change by using muscle_insert ().
14338 (macro_obstack): Rename muscle_obstack.
14339 Echo modifications in the whole file.
14340 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
14341 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
14342 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
14343
14344 * src/muscle_tab.h: Update double inclusion macros.
14345 (macro_entry_s): Rename muscle_entry_s.
14346 Update prototypes.
342b8b6e 14347
11d82f03
MA
14348 * src/muscle_tab.c: Include muscle_tab.h.
14349 Rename macro_tabble to muscle_table.
14350 (mhash1, mhash2, mcmp): Use muscle_entry.
14351 (macro_init): Rename muscle_init. Update.
14352 (macro_insert): Rename muscle_insert. Update.
14353 (macro_find): Rename muscle_find. Update.
14354
14355 * src/main.c: Include muscle_tab.h.
14356 (main): Call muscle_init ().
14357 * src/Makefile.am (bison_SOURCES): Echo modifications.
14358
93a37297
MA
143592001-09-02 Marc Autret <autret_m@epita.fr>
14360
f753cd62 14361 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 14362
f753cd62
MA
14363 * src/muscle_tab.c, src/muscle_tab.h: Add files.
14364
143652001-09-02 Marc Autret <autret_m@epita.fr>
14366
14367 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 14368
682d48cd
PB
143692001-09-01 Pascal Bart <pascal.bart@epita.fr>
14370
342b8b6e 14371 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
14372 filename.
14373
087c8fda
MA
143742001-09-01 Marc Autret <autret_m@epita.fr>
14375
14376 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
14377 to an explicit value to activate the feature. We do it here.
14378
dda680cb
PB
143792001-08-31 Pascal Bart <pascal.bart@epita.fr>
14380
14381 * src/output.c (prepare): Delete the `filename' muscule insertion.
14382 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
14383 (parse_union_decl): Likewise.
14384 * src/macrotab.c (macro_init): Initialize filename by infile.
14385
9e644e64
MA
143862001-08-31 Marc Autret <autret_m@epita.fr>
14387
14388 * src/bison.simple (YYLSP_NEEDED): New definition.
14389 * src/output.c (prepare): Add macro insertion of `locations_flag'
14390
17da6427
PB
143912001-08-31 Pascal Bart <pascal.bart@epita.fr>
14392
14393 * src/output.c (prepare): Delete insertion of previous muscles,
14394 and insert the `prefix' muscles.
14395 * src/macrotab.c (macro_init): Likewise.
14396 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 14397 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
14398 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
14399 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 14400 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
14401 name_prefix.
14402
e8cb70b9
PB
144032001-08-31 Pascal Bart <pascal.bart@epita.fr>
14404
14405 * src/main.c (main): Standardize.
14406 * src/output.c (output_table_data, output_parser): Likewise.
14407 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
14408
63c2d5de
MA
144092001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
14410
342b8b6e 14411 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
14412 %%epilogue.
14413 * src/output.c (output): Rename %%declarations to %%prologue.
14414 * src/bison.simple: Echo modifications.
342b8b6e 14415
d8cb5183
MA
144162001-08-31 Marc Autret <autret_m@epita.fr>
14417
14418 * src/reader.c (readgram): CleanUp.
14419 (output_token_defines): Likewise.
14420 (packsymbols): Likewise.
14421 (reader): Likewise.
14422 * src/output.c (output): CPP-out useless code.
14423
6c686258
PB
144242001-08-31 Pascal Bart <pascal.bart@epita.fr>
14425
342b8b6e 14426 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
14427 output_trailers and output_headers.
14428 * src/output.h: Remove obsolete functions prototypes of output_headers
14429 and output_trailers.
14430
8f451ef7
PB
144312001-08-30 Pascal Bart <pascal.bart@epita.fr>
14432
14433 * src/main.c: Include macrotab.h.
342b8b6e 14434 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
14435 Adjust functions prototypes.
14436 * src/macrotab.c (macro_insert): Constify key and value.
14437 (macro_find): Constify key.
14438 (macro_insert): Include 'xalloc.h'
14439 (macro_insert): Use XMALLOC.
14440 (macro_find): Constify return value.
14441 * src/output.c (output_table_data): Rename table to table_data.
14442 (output_parser): Constify macro_key, macro_value.
14443
997b6fd0 144442001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
14445
14446 * src/reader.c (parse_skel_decl): New.
342b8b6e 14447 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
14448 * src/lex.h (token_t): New token `tok_skel'.
14449 * src/lex.c (percent_table): Add skeleton option entry.
14450 Standardize.
14451
ff48177d
MA
144522001-08-29 Marc Autret <autret_m@epita.fr>
14453
14454 * src/bison.simple: Add %%user_code directive at the end.
14455 * src/reader.c (read_additionnal_code): New.
14456 (reader): Use it.
14457 * src/output.c (output_program): Remove.
14458 (output): Update.
14459
b33160bf
MA
144602001-08-28 Marc Autret <autret_m@epita.fr>
14461
14462 * src/output.c (output_actions): Clean up.
4e5caae2 14463 (output_gram): CPP-out useless code.
b33160bf
MA
14464 * src/reader.c (reader): Clean up, CPP-out useless code.
14465
d1a2daf7
PB
144662001-08-28 Pascal Bart <pascal.bart@epita.fr>
14467
342b8b6e 14468 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 14469 directive.
d1a2daf7
PB
14470 * src/bison.simple: Add `%%definitions'.
14471
2b763dfe
MA
144722001-08-28 Marc Autret <autret_m@epita.fr>
14473
14474 * config/depcomp: New file.
14475
f1a87ef6
PE
144762001-08-27 Paul Eggert <eggert@twinsun.com>
14477
14478 * src/bison.simple (yyparse): Don't take the address of an
14479 item before the start of an array, as that doesn't conform to
14480 the C Standard.
14481
82e236e2
RA
144822001-08-27 Robert Anisko <robert.anisko@epita.fr>
14483
f1a87ef6 14484 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
14485 obstack. It was done too late here.
14486
14487 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
14488 completely wrong.
14489 (reader): Initialize the macro obstack here, since we need it to grow
14490 '%define' directives.
14491
14492 * src/reader.h: Declare the macro obstack as extern.
14493
b0cfa28a
RA
144942001-08-27 Robert Anisko <robert.anisko@epita.fr>
14495
14496 * src/output.c (output_parser): Fix. Store single '%' characters in
14497 the output obstack instead of throwing them away.
14498
6fc74234
AD
144992001-08-27 Akim Demaille <akim@epita.fr>
14500
14501 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
14502
9c76d118
RA
145032001-08-25 Robert Anisko <robert.anisko@epita.fr>
14504
14505 * lib/Makefile.am: Adjust.
14506
a8289c62
RA
145072001-08-25 Robert Anisko <robert.anisko@epita.fr>
14508
14509 * src/bison.simple: Update and add '%%' directives.
14510
b6610515
RA
145112001-08-25 Robert Anisko <robert.anisko@epita.fr>
14512
14513 * src/reader.c (reader): Remove calls to 'output_headers' and
14514 'output_trailers'. Remove some C output.
14515 (readgram): Disable a piece of code that was writing a default
14516 definition for 'YYSTYPE'.
14517 (reader_output_yylsp): Remove.
14518 (packsymbols): Output token defintions to a macro.
14519 (copy_definition): Disable C output.
6fc74234 14520
b6610515
RA
14521 * src/reader.c (parse_macro_decl): New function used to parse macro
14522 declarations.
14523 (copy_string2): Put the body of copy_string into this new function.
14524 Add a parameter to let the caller choose whether he wants to copy the
14525 string delimiters or not.
14526 (copy_string): Be a simple call to copy_string2 with the last argument
14527 bound to true.
14528 (read_declarations): Add case for macro definition.
14529 (copy_identifier): New.
6fc74234 14530 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
14531 rather than lex.
14532
26f609ff
RA
145332001-08-25 Robert Anisko <robert.anisko@epita.fr>
14534
14535 * src/output.c (prepare): Add prefixed names.
14536 (output_parser): Output semantic actions.
14537 (output_parser): Fix bug on '%%line' directives.
6fc74234 14538
26f609ff
RA
14539 * src/output.c (output_headers): Remove. The C code printed by this
14540 function should now be in the skeletons.
14541 (output_trailers): Remove.
14542 (output): Disable call to 'reader_output_yylsp'.
14543 (output_rule_data): Do not output tables to the table obstack.
14544
14545 * src/output.c: Remove some C dedicated output.
14546 Improve the use of macro and output obstacks.
14547 (output_defines): Remove.
6fc74234 14548
26f609ff
RA
14549 * src/output.c (output_token_translations): Associate 'translate'
14550 table with a macro. No output to the table obstack.
14551 (output_gram): Same for 'rhs' and 'prhs'.
14552 (output_stos): Same for 'stos'.
14553 (output_rule_data): Same for 'r1' and 'r2'.
14554 (token_actions): Same for 'defact'.
14555 (goto_actions): Same for 'defgoto'.
14556 (output_base): Same for 'pact' and 'pgoto'.
14557 (output_table): Same for 'table'.
14558 (output_check): Same for 'check'.
6fc74234 14559
26f609ff
RA
14560 * src/output.c (output_table_data): New function.
14561 (output_short_table): Remove.
14562 (output_short_or_char_table): Remove.
6fc74234 14563
26f609ff
RA
14564 * src/output.c (output_parser): Replace most of the skeleton copy code
14565 with something new. Skeletons are now processed character by character
14566 rather than line by line, and Bison looks for '%%' macros. This is the
14567 first step in making Bison's output process (a lot) more flexible.
14568 (output_parser): Use the macro table.
14569
6f43b113
RA
145702001-08-25 Robert Anisko <robert.anisko@epita.fr>
14571
14572 * src/main.c (main): Initialize the macro table.
14573
dd3127cf
RA
145742001-08-25 Robert Anisko <robert.anisko@epita.fr>
14575
14576 * src/lex.c (percent_table): Add tok_define.
14577 * src/lex.h: Add tok_define.
14578
aa321494
RA
145792001-08-25 Robert Anisko <robert.anisko@epita.fr>
14580
14581 * src/macrotab.c: New file.
14582 * src/macrotab.h: New file.
14583 * src/Makefile.am: Update.
14584
68bd3b6b
RA
145852001-08-25 Robert Anisko <robert.anisko@epita.fr>
14586
14587 * lib/hash.c: New file.
14588 * lib/hash.h: New file.
14589 * lib/Makefile.am: Update.
14590
45f8dd1e
AD
145912001-08-15 Akim Demaille <akim@epita.fr>
14592
14593 Version 1.28c.
14594
40a64a7a 145952001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
14596
14597 * src/reader.c (readgram): Indent output macro YYSTYPE.
14598 (packsymbols): Likewise.
14599 (output_token_defines): Likewise.
14600 * src/files.c: Standardize.
14601 (compute_header_macro): New.
14602 (defines_obstack_save): New. Use compute_header_macro.
14603 (output_files): Update. Use defines_obstack_save.
14604
f9a8293a
AD
146052001-08-15 Akim Demaille <akim@epita.fr>
14606
14607 * doc/bison.texinfo (Table of Symbols): Document
14608 YYSTACK_USE_ALLOCA.
14609
150ca7a7
AD
146102001-08-15 Akim Demaille <akim@epita.fr>
14611
14612 * missing: Update from CVS Automake.
14613 * config/config.guess, config/config.sub, config/texinfo.tex:
14614 Update from gnu.org.
14615
69b5cec4
AD
146162001-08-15 Akim Demaille <akim@epita.fr>
14617
14618 * Makefile.maint: Sync with CVS Autoconf.
14619
f2b5126e
PB
146202001-08-14 Pascal Bart <pascal.bart@epita.fr>
14621
69b5cec4 14622 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
14623 `fdl.texi'.
14624 * doc/fdl.texi: Add to package.
14625
4ecbf796
MA
146262001-08-14 Marc Autret <autret_m@epita.fr>
14627
14628 Turn on %{source,header}_extension features.
14629
69b5cec4 14630 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
14631 source_extension.
14632 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 14633 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
14634 between options.
14635
95fb5662
MA
146362001-08-14 Marc Autret <autret_m@epita.fr>
14637
14638 * src/files.c (compute_base_names): Add extensions computing when
14639 `--file-prefix' used.
14640 Standardize function calls.
14641
78d09da9
MA
146422001-08-13 Marc Autret <autret_m@epita.fr>
14643
69b5cec4 14644 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
14645 defining it (defined but null disables alloca).
14646
5a009f2c
MA
146472001-08-13 Marc Autret <autret_m@epita.fr>
14648
14649 * src/bison.simple (_yy_memcpy): CPP reformat.
14650
1e41465a
PB
146512001-08-13 Pascal Bart <pascal.bart@epita.fr>
14652
14653 * tests/atconfig.in (CPPFLAGS): Fix.
14654
c67a198d
PB
146552001-08-10 Pascal Bart <pascal.bart@epita.fr>
14656
79282c6c 14657 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
14658 `gpl.texi'.
14659 * doc/gpl.texi: Add to package.
14660
09a6de7e
MA
146612001-08-10 Marc Autret <autret_m@epita.fr>
14662
14663 * src/print_graph.h: Fix.
14664 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
14665
b77b9ee0
AD
146662001-08-10 Akim Demaille <akim@epita.fr>
14667
14668 * src/system.h: Provide default declarations for stpcpy, strndup,
14669 and strnlen.
14670
3e259915
MA
146712001-08-10 Robert Anisko <anisko_r@epita.fr>
14672
14673 * doc/bison.texinfo (Locations): Update @$ stuff.
14674
ca96bc2d
MA
146752001-08-09 Robert Anisko <anisko_r@epita.fr>
14676
14677 * src/bison.simple (YYLLOC_DEFAULT): Update.
14678 (yyparse): Adjust.
14679
fdc6758b
MA
146802001-08-08 Marc Autret <autret_m@epita.fr>
14681
b77b9ee0 14682 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
14683 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
14684 Reported by Fabrice Bauzac.
957d4dbf 14685
600cad3b
MA
146862001-08-08 Marc Autret <autret_m@epita.fr>
14687
14688 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
14689 * src/vcg.c (output_node): Fix.
14690 * src/vcg.h: Cleanup.
14691 * src/print_graph.c: Add comments.
b77b9ee0 14692 (node_output_size): New global variable. Simplify the formatting of
600cad3b 14693 the VCG graph output.
b77b9ee0 14694 (print_actions): Unused code is now used. It notifies the final state
600cad3b 14695 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 14696 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
14697 blue.
14698 Get the current node name and node_obstack by argument.
14699 (node_obstack): New variable.
14700 (print_state): Manage node_obstack.
14701 (print_core): Use node_obstack given by argument.
14702 A node is not only computed here but in print_actions also.
14703 (print_graph): CPP out useless code instead of commenting it.
14704
976e528f
AD
147052001-08-07 Pascal Bart <pascal.bart@epita.fr>
14706
14707 * tests/atconfig.in (CPPFLAGS): Fix.
14708
20e8e5ca
AD
147092001-08-07 Akim Demaille <akim@epita.fr>
14710
14711 * src/print_graph.c (quote): New.
14712 (print_core): Use it.
14713
957d4dbf 147142001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 14715
3e3da797
AD
14716 * src/vcg.c (complain.h): Include it.
14717 Unepitaize `return' invocations.
c4b66126 14718 [NDEBUG] (main): Remove.
79282c6c 14719 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
14720 * src/files.c (open_files): Initialize graph_obstack.
14721 * src/print_graph.c (print_actions): CPP out useless code.
14722 (print_core): Don't output the last `\n' in labels.
14723 Use `quote'.
14724 * src/files.c (output_files): Output the VCG file.
14725 * src/main.c (main): Invoke print_graph ();
3e3da797 14726
957d4dbf 147272001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
14728
14729 Automaton VCG graph output.
14730 Using option ``-g'' or long option ``--graph'', you can generate
14731 a gram_filename.vcg file containing a VCG description of the LALR (1)
14732 automaton of your grammar.
14733
14734 * src/main.c: Call to print_graph() function.
14735 * src/getargs.h: Update.
14736 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
14737 (graph_flag): New flag.
14738 (longopts): Update.
14739 (getargs): Add case `g'.
14740 * src/files.c (graph_obstack): New obstack struct.
14741 (open_files): Initialize new obstack.
14742 (output_files): Saves graph_obstack if required.
14743 * src/files.h (graph_obstack): New extern declaration.
14744 * src/Makefile.am: Add new source files.
14745
927c1557 147462001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
14747
14748 * src/print_graph.c, src/print_graph.h (graph): New.
14749 * src/vcg.h: New file.
14750 * src/vcg.c: New file, VCG graph handling.
14751
7333d403
AD
147522001-08-06 Marc Autret <autret_m@epita.fr>
14753
14754 Add of %source_extension and %header_extension which specify
14755 the source or/and the header output file extension.
14756
14757 * src/files.c (compute_base_names): Remove initialisation of
14758 src_extension and header_extension.
14759 (compute_exts_from_gf): Update.
14760 (compute_exts_from_src): Update.
14761 (output_files): Update.
14762 * src/reader.c (parse_header_extension_decl): New.
14763 (parse_source_extension_decl): New.
14764 (read_declarations): New case statements for the new tokens.
14765 * src/lex.c (percent_table): Add entries for %source_extension
14766 and %header_extension.
14767 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
14768
84163231
AD
147692001-08-06 Marc Autret <autret_m@epita.fr>
14770
14771 * configure.in: Bump to 1.28c.
14772 * doc/bison.texinfo: Texinfo thingies.
14773
8303fc42
AD
147742001-08-04 Pascal Bart <pascal.bart@epita.fr>
14775
14776 * tests/atconfig.in (CPPFLAGS): Add.
14777 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
14778
70a84437
AD
147792001-08-03 Akim Demaille <akim@epita.fr>
14780
14781 Version 1.28b.
14782
2ce10144
AD
147832001-08-03 Akim Demaille <akim@epita.fr>
14784
14785 * tests/Makefile.am (check-local): Ship testsuite.
14786 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
14787 Include `string.h'.
14788
1e3e4bc1
AD
147892001-08-03 Akim Demaille <akim@epita.fr>
14790
14791 * configure.in: Try using -Wformat when compiling.
14792
42b45b7f
AD
147932001-08-03 Akim Demaille <akim@epita.fr>
14794
14795 * configure.in: Bump to 1.28b.
14796
8f13fe33
AD
147972001-08-03 Akim Demaille <akim@epita.fr>
14798
14799 * src/complain.c: Adjust strerror_r portability issues.
14800
b37ba92c
AD
148012001-08-03 Akim Demaille <akim@epita.fr>
14802
14803 Version 1.28a.
14804
b0ce6046
AD
148052001-08-03 Akim Demaille <akim@epita.fr>
14806
14807 * src/getargs.c, src/getarg.h (skeleton)): Constify.
14808 * src/lex.c (literalchar): Avoid name clashes on `buf'.
14809 * src/getargs.c: Include complain.h.
14810 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
14811 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
14812
d01c415b
AD
148132001-08-03 Akim Demaille <akim@epita.fr>
14814
14815 * src/reader.c (readgram): Display hidden chars in error messages.
14816
459dd1a6
AD
148172001-08-03 Akim Demaille <akim@epita.fr>
14818
14819 Update to gettext 0.10.39.
14820
53b74c0c
AD
148212001-08-03 Akim Demaille <akim@epita.fr>
14822
14823 * lib/strspn.c: New.
14824
234a3be3
AD
148252001-08-01 Marc Autret <autret_m@epita.fr>
14826
14827 * doc/bison.texinfo: Update.
14828 * doc/bison.1 (mandoc): Update.
14829 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
14830 * src/files.c: Support output files extensions computing.
14831 (src_extension): New static variable.
14832 (header_extension): New static variable.
14833 (tr): New function.
14834 (get_extension_index): New function, gets the index of an extension
14835 filename in a string.
14836 (compute_exts_from_gf): New function, computes extensions from the
14837 grammar file extension.
14838 (compute_exts_from_src): New functions, computes extensions from the
14839 C source file extension, file given by ``-o'' option.
14840 (compute_base_names): Update.
14841 (output_files): Update.
14842
847bf1f5
AD
148432001-08-01 Robert Anisko <anisko_r@epita.fr>
14844
d995fee7 14845 * doc/bison.texi: Document @$.
847bf1f5
AD
14846 (Locations): New section.
14847
d074a105
AD
148482001-07-18 Akim Demaille <akim@epita.fr>
14849
14850 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
14851 * config/prev-version.txt, config/move-if-change: New.
14852 * Makefile.am: Adjust.
14853
3419715d
AD
148542001-07-08 Pascal Bart <pascal.bart@epita.fr>
14855
14856 * src/bison.simple (yyparse): Suppress warning `comparaison
14857 between signed and unsigned'.
14858
62ab6972
AD
148592001-07-05 Pascal Bart <pascal.bart@epita.fr>
14860
14861 * src/getargs.h (raw_flag): Remove.
14862 * src/getargs.c: Die on `-r'/`--raw'.
14863 * src/lex.c (parse_percent_token): Die on `%raw'.
14864 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
14865 * tests/calc.at: Suppress test with option `--raw'.
14866
1e24cc5b
AD
148672001-07-14 Akim Demaille <akim@epita.fr>
14868
14869 * config/: New.
14870 * configure.in: Require Autoconf 2.50.
14871 Update to gettext 0.10.38.
14872
32dfccf8
AD
148732001-03-16 Akim Demaille <akim@epita.fr>
14874
14875 * doc/bison.texinfo: ANSIfy the examples.
14876
cd5bd6ac
AD
148772001-03-16 Akim Demaille <akim@epita.fr>
14878
14879 * getargs.c (skeleton): New variable.
14880 (longopts): --skeleton is a new option.
14881 (shortopts, getargs): -S is a new option.
14882 * getargs.h: Declare skeleton.
14883 * output.c (output_parser): Use it.
14884
5141b016
AD
148852001-03-16 Akim Demaille <akim@epita.fr>
14886
14887 * m4/strerror_r.m4: New.
14888 * m4/error.m4: Run AC_FUNC_STRERROR_R.
14889 * lib/error.h, lib/error.c: Update.
14890
447992b9
AD
148912001-03-16 Akim Demaille <akim@epita.fr>
14892
14893 * src/getargs.c (longopts): Clean up.
14894
274d42ce
AD
148952001-02-21 Akim Demaille <akim@epita.fr>
14896
14897 * src/reader.c (gensym): `gensym_count' is your own.
14898 Use a static buf to create the symbol name, as token_buffer is no
14899 longer a buffer.
14900
22c821f3
AD
149012001-02-08 Akim Demaille <akim@epita.fr>
14902
14903 * src/conflicts.c (conflict_report): Be sure not to append to res
14904 between two calls, which could happen if both first sprintf were
14905 skipped, but not the first cp += strlen.
14906
18569462
AD
149072001-02-08 Akim Demaille <akim@epita.fr>
14908
14909 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
14910 New, from fileutils 4.0.37.
14911 * configure.in: Require Autoconf 2.49c. I took some time before
14912 making this decision. This is the only way out for portability
14913 issues in Bison, it would mean way too much duplicate effort to
14914 import in Bison features implemented in 2.49c since 2.13.
14915 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
14916
0d8f3c8a
AD
149172001-02-02 Akim Demaille <akim@epita.fr>
14918
14919 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 14920 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 14921
f17bcd1f
AD
149222001-01-19 Akim Demaille <akim@epita.fr>
14923
14924 Get rid of the ad hoc handling of token_buffer in the scanner: use
14925 the obstacks.
14926
14927 * src/lex.c (token_obstack): New.
14928 (init_lex): Initialize it. No longer call...
14929 (grow_token_buffer): this. Remove it.
14930 Adjust all the places which used it to use the obstack.
14931
511e79b3
AD
149322001-01-19 Akim Demaille <akim@epita.fr>
14933
14934 * src/lex.h: Rename all the tokens:
14935 s/\bENDFILE\b/tok_eof/g;
14936 s/\bIDENTIFIER\b/tok_identifier/g;
14937 etc.
14938 Let them be enums, not #define, to ease debugging.
14939 Adjust all the code.
14940
0d6508ef
AD
149412001-01-18 Akim Demaille <akim@epita.fr>
14942
14943 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
14944 * src/lex.c (maxtoken, grow_token_buffer): Static.
14945
6deb4447
AD
149462001-01-18 Akim Demaille <akim@epita.fr>
14947
14948 Since we now use obstacks, more % directives can be enabled.
14949
14950 * src/lex.c (percent_table): Also accept `%yacc',
14951 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
14952 `%debug'.
14953 Handle the actions for `%semantic_parser' and `%pure_parser' here,
14954 instead of returning a token.
14955 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
14956 * src/reader.c (read_declarations): Adjust.
14957 * src/files.c (open_files): Don't call `compute_base_names', don't
14958 compute `attrsfile' since they depend upon data which might be
14959 *in* the input file now.
14960 (output_files): Do it here.
14961 * src/output.c (output_headers): Document the fact that this patch
14962 introduces a guaranteed SEGV for semantic parsers.
14963 * doc/bison.texinfo: Document them.
14964 * tests/suite.at: Exercise these %options.
14965
ff4423cc
AD
149662000-12-20 Akim Demaille <akim@epita.fr>
14967
14968 Also handle the output file (--verbose) with obstacks.
14969
14970 * files.c (foutput): Remove.
14971 (output_obstack): New.
14972 Adjust all dependencies.
14973 * src/conflicts.c: Return a string.
14974 * src/system.h (obstack_grow_string): Rename as...
14975 (obstack_sgrow): this. Be ready to work with non literals.
14976 (obstack_fgrow4): New.
14977
956dba3a
AD
149782000-12-20 Akim Demaille <akim@epita.fr>
14979
14980 * src/files.c (open_files): Fix the computation of short_base_name
14981 in the case of `-o foo.tab.c'.
14982
337bab46
AD
149832000-12-20 Akim Demaille <akim@epita.fr>
14984
14985 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
14986 (copy_dollar): Now that everything uses obstacks, get rid of the
14987 FILE * parameters.
14988
5d3214b8
AD
149892000-12-20 Akim Demaille <akim@epita.fr>
14990
14991 * src/files.c (open_files): Actually the `.output' file is based
14992 on the short_base_name, not base_name.
14993 * tests/suite.at (Checking output file names): Adjust.
14994
29092a57
AD
149952000-12-20 Akim Demaille <akim@epita.fr>
14996
14997 * src/bison.s1: Remove, we now use directly...
14998 * src/bison.simple: this.
14999 * src/Makefile.am: Use pkgdata instead of data.
15000
ea5607fd
AD
150012000-12-20 Akim Demaille <akim@epita.fr>
15002
15003 * src/files.c (guard_obstack): New.
15004 (open_files): Initialize it.
15005 (output_files): Dump it...
15006 * src/files.h: Export it.
15007 * src/reader.c (copy_guard): Use it.
15008
27110317
AD
150092000-12-19 Akim Demaille <akim@epita.fr>
15010
15011 * src/files.c (outfile, defsfile, actfile): Removed as global
15012 vars.
15013 (open_files): Don't compute them.
15014 (output_files): Adjust.
15015 (base_name, short_base_name): Be global.
15016 Adjust dependencies.
15017
19c50364
AD
150182000-12-19 Akim Demaille <akim@epita.fr>
15019
15020 * src/files.c (strsuffix): New.
15021 (stringappend): Be just like strcat but allocate.
15022 (base_names): Eve out from open_files.
15023 Try to simplify the rather hairy computation of base_name and
15024 short_base_name.
15025 (open_files): Use it.
15026 * tests/suite.at (Checking output file names): New test.
15027
573c1d9f
AD
150282000-12-19 Akim Demaille <akim@epita.fr>
15029
15030 * src/system.h (obstack_grow_literal_string): Rename as...
15031 (obstack_grow_string): this.
15032 * src/output.c (output_parser): Recognize `%% actions' instead of
15033 `$'.
15034 * src/bison.s1: s/$/%% actions/.
15035 * src/bison.hairy: Likewise.
15036
ef7ddedd
AD
150372000-12-19 Akim Demaille <akim@epita.fr>
15038
15039 * src/output.c (output_parser): Compute the `#line' lines when
15040 there are.
15041 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
15042 Suggested by Hans Aberg.
15043
ff61dabd
AD
150442000-12-19 Akim Demaille <akim@epita.fr>
15045
15046 Let the handling of the skeleton files be local to the procedures
15047 that use it.
15048
15049 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
15050 longer static.
15051 (fparser, open_extra_files): Remove.
15052 (open_files, output_files): Don't take care of fparser.
15053 * src/files.h: Adjust.
15054 * src/output.c (output_parser): Open and close the file to the
15055 skeleton.
15056 * src/reader.c (read_declarations): When %semantic_parser, open
15057 fguard.
15058
55b96341
AD
150592000-12-19 Akim Demaille <akim@epita.fr>
15060
15061 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
15062 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
15063
358c15b7
AD
150642000-12-19 Akim Demaille <akim@epita.fr>
15065
15066 * src/files.c (open_files): Yipee! We no longer need all the code
15067 looking for `/tmp' since we have no tmp file.
15068
7de3329e
AD
150692000-12-19 Akim Demaille <akim@epita.fr>
15070
15071 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
15072 New macros.
15073 * src/files.c (open_files): Less dependency on MSDOS etc.
15074
3abcd459
AD
150752000-12-14 Akim Demaille <akim@epita.fr>
15076
15077 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
15078 Provide a default definition.
15079 Use it when executing the default @ action.
15080 * src/reader.c (reader_output_yylsp): No longer include
15081 `timestamp' and `text' in the default YYLTYPE.
15082
2a91a95e
AD
150832000-12-12 Akim Demaille <akim@epita.fr>
15084
15085 * src/reader.c (copy_definition, parse_union_decl, copy_action)
15086 (copy_guard): Quote the file names.
15087 Reported by Laurent Mascherpa.
15088
14d3eb9b
AD
150892000-12-12 Akim Demaille <akim@epita.fr>
15090
15091 * src/output.c (output_headers, output_program, output): Be sure
15092 to escape special characters when outputting filenames.
15093 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
15094 (output_headers): Don't depend on them, Use ACTSTR.
15095
d7045ec6
AD
150962000-11-17 Akim Demaille <akim@epita.fr>
15097
15098 * lib/obstack.h: Formatting changes.
15099 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
15100 prevents type checking.
15101 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
15102 cast the value to (void *): assigning a `foo *' to a `void *'
15103 variable is valid.
15104 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
15105 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
15106 append characters.
15107
6fd54b73
AD
151082000-11-17 Akim Demaille <akim@epita.fr>
15109
15110 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
15111 as...
15112 (suite.m4, regression.m4, calc.m4): these.
15113 * tests/atgeneral.m4: Update from CVS Autoconf.
15114
4c50eae6
AD
151152000-11-17 Akim Demaille <akim@epita.fr>
15116
15117 * tests/regression.m4 (%union and --defines): New test,
15118 demonstrating a current bug in the obstack implementation.
15119
a35f64ea
AD
151202000-11-17 Akim Demaille <akim@epita.fr>
15121
15122 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
15123 macros.
15124 Use them to declare the variables which are global or local to
15125 `yyparse'.
15126
7de23534
AD
151272000-11-17 Akim Demaille <akim@epita.fr>
15128
15129 * acconfig.h: Remove, no longer used.
15130
aa7815f5
AD
151312000-11-07 Akim Demaille <akim@epita.fr>
15132
15133 * src: s/Copyright (C)/Copyright/g.
15134
5af1f549
AD
151352000-11-07 Akim Demaille <akim@epita.fr>
15136
15137 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
15138 defining.
15139 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
15140
553e2b22
AD
151412000-11-07 Akim Demaille <akim@epita.fr>
15142
15143 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
15144 Merge in a single CPP if/else.
15145
8a4f41d6
AD
151462000-11-07 Akim Demaille <akim@epita.fr>
15147
15148 * src/output.c (output): Remove useless variables.
15149 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
15150 argument `data' for consistency with the prototypes.
15151 Qualify it `const'.
15152 (obstack_copy, obstack_copy0): Rename the second argument as
15153 `address' for consistency. Qualify it `const'.
15154 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
15155 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
15156 `const' their input argument (`data' or `address').
15157 Adjust the corresponding macros to include `const' in casts.
15158
095a3fb5
AD
151592000-11-03 Akim Demaille <akim@epita.fr>
15160
15161 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
15162 s/PFILE1/BISON_HAIRY/.
15163 Adjust dependencies.
15164
d1cdce7c
AD
151652000-11-03 Akim Demaille <akim@epita.fr>
15166
090c5ebf 15167 For some reason, this was not applied.
d1cdce7c
AD
15168
15169 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15170 `unlink': it's no longer used.
15171
9311529b
AD
151722000-11-03 Akim Demaille <akim@epita.fr>
15173
15174 * src/files.c (skeleton_find): New function, eved out of...
15175 (open_files, open_extra_files): here.
15176
d8880f69
AD
151772000-11-03 Akim Demaille <akim@epita.fr>
15178
15179 Don't use `atexit'.
15180
15181 * src/files.c (obstack_save): New function.
15182 (done): Rename as...
15183 (output_files): this.
15184 Use `obstack_save'.
15185 * src/main.c (main): Don't use `atexit' to register `done', since
15186 it no longer has to remove tmp files, just call `output_files'
15187 when there are no errors.
15188
0dbb648e
AD
151892000-11-02 Akim Demaille <akim@epita.fr>
15190
15191 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
15192 `unlink': it's no longer used.
15193 * src/files.h: Formatting changes.
15194
896fe5c1
AD
151952000-11-02 Akim Demaille <akim@epita.fr>
15196
15197 Remove the last uses of mktemp and unlink/delete.
15198
15199 * src/files.c (fdefines, ftable): Removed.
15200 (defines_ostack, table_obstack): New.
15201 Adjust dependencies of the former into uses of the latter.
15202 * src/output.c (output_short_or_char_table, output_short_table):
15203 Convert to using obstacks.
15204 * src/reader.c (copy_comment2): Accept one FILE * and two
15205 obstacks.
15206 (output_token_defines, reader_output_yylsp): Use obstacks.
15207 * src/system.h (obstack_fgrow3): New.
1f65350a 15208 * po/POTFILES.in: Adjust.
896fe5c1 15209
dd60faec
AD
152102000-11-01 Akim Demaille <akim@epita.fr>
15211
15212 Change each use of `fattrs' into a use of `attrs_obstack'.
15213
15214 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
15215 * src/files.c (fattrs): Remove.
15216 (attrs_obstack): New.
15217 Adjust all dependencies.
15218 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
15219
8c7ebe49
AD
152202000-11-01 Akim Demaille <akim@epita.fr>
15221
15222 Introduce obstacks.
15223 Change each use of `faction' into a use of `action_obstack'.
15224
15225 * lib/obstack.h, lib/obstack.c: New files.
15226 * src/files.c (faction): Remove.
15227 (action_obstack): New.
15228 Adjust all dependencies.
15229
77aee789
AD
152302000-10-20 Akim Demaille <akim@epita.fr>
15231
15232 * lib/quote.h (PARAMS): New macro. Use it.
15233
43591cec
AD
152342000-10-16 Akim Demaille <akim@epita.fr>
15235
15236 * src/output.c (output_short_or_char_table): New function.
15237 (output_short_table, output_token_translations): Use it.
15238 (goto_actions): Use output_short_table.
15239
1e9798d5
AD
152402000-10-16 Akim Demaille <akim@epita.fr>
15241
15242 * src/symtab.c (bucket_new): New function.
15243 (getsym): Use it.
15244
15245 * src/output.c (output_short_table): New argument to display the
15246 comment associated with the table.
15247 Adjust dependencies.
15248 (output_gram): Use it.
15249 (output_rule_data): Nicer output layout for YYTNAME.
15250
f282676b
AD
152512000-10-16 Akim Demaille <akim@epita.fr>
15252
15253 * src/lex.c (read_typename): New function.
15254 (lex): Use it.
15255 * src/reader.c (copy_dollar): Likewise.
15256
550a72a3
AD
152572000-10-16 Akim Demaille <akim@epita.fr>
15258
15259 * src/reader.c (copy_comment2): Expect the input stream to be on
15260 the `/' which is suspected to open a comment, instead of being
15261 called after `//' or `/*' was read.
15262 (copy_comment, copy_definition, parse_union_decl, copy_action)
15263 (copy_guard): Adjust.
15264
131e2fef
AD
152652000-10-16 Akim Demaille <akim@epita.fr>
15266
15267 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
15268 `read_signed_integer'.
15269
79282c5a
AD
152702000-10-16 Akim Demaille <akim@epita.fr>
15271
15272 * src/reader.c (copy_dollar): New function.
15273 (copy_guard, copy_action): Use it.
15274
ff4a34be
AD
152752000-10-16 Akim Demaille <akim@epita.fr>
15276
15277 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
15278 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
15279 New files, from Fileutils 4.0.27.
15280 * src/main.c (printable_version): Remove.
15281 * src/lex.c, src/reader.c: Use `quote'.
15282
152832000-10-04 Akim Demaille <akim@epita.fr>
15284
15285 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
15286
14ded682
AD
152872000-10-04 Akim Demaille <akim@epita.fr>
15288
15289 * doc/bison.texinfo: Various typos spotted by Neil Booth.
15290
8e03724b
AD
152912000-10-04 Akim Demaille <akim@epita.fr>
15292
15293 When a literal string is used to define two different tokens,
15294 `bison -v' segfaults.
15295 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
15296
15297 * tests/regression.m4: New file.
15298 Include the core of the sample provided by Piotr Gackiewicz.
15299 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
15300 properly.
15301
a9e64249
AD
153022000-10-04 Akim Demaille <akim@epita.fr>
15303
15304 * src/reader.c (parse_expect_decl): Keep `count' within the size
15305 of `buffer'.
15306 From Neil Booth.
15307
da9abf43
AD
153082000-10-02 Paul Eggert <eggert@twinsun.com>
15309
15310 * bison.s1 (yyparse): Assign the default value
15311 unconditionally, to avoid a GCC warning and make the parser a
15312 tad smaller.
15313
c33638bb
AD
153142000-10-02 Akim Demaille <akim@epita.fr>
15315
15316 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
15317 options.
15318
444c570a
AD
153192000-10-02 Akim Demaille <akim@epita.fr>
15320
15321 * src/derives.c, src/print.c, src/reduce.c: To ease the
15322 translation, move some `\n' out of the translated strings.
15323
89cab50d
AD
153242000-10-02 Akim Demaille <akim@epita.fr>
15325
15326 The location tracking mechanism is precious for parse error
15327 messages. Nevertheless, it is enabled only when `@n' is used in
15328 the grammar, which is a different issue (you can use it in error
15329 message, but not in the grammar per se). Therefore, there should
15330 be another means to enable it.
15331
15332 * src/getargs.c (getargs): Support `--locations'.
15333 (usage): Report it.
15334 * src/getargs.h (locationsflag): Export it.
15335 * src/lex.c (percent_table): Support `%locations'.
15336 * src/reader.c (yylsp_needed): Remove this variable, now replaced
15337 with `locationsflag'.
15338 * doc/bison.texinfo: Document `--locations' and `%locations'.
15339 Sort the options.
15340 * tests/calc.m4: Test it.
15341
15342 For regularity of the names, replace each
15343 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
15344 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
15345 In addition replace each `flag' with `_flag'.
15346
d6c2cba0
AD
153472000-10-02 Akim Demaille <akim@epita.fr>
15348
15349 Also test parse error messages, including with YYERROR_VERBOSE.
15350
15351 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
15352 associative).
15353 Use it to check the computations.
15354 Use it to check `nonassoc' is honored.
15355 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
15356 `--yyerror-verbose'.
15357 (_AT_CHECK_CALC): Adjust to this option.
15358 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
15359
5a35a6cb
AD
153602000-10-02 Akim Demaille <akim@epita.fr>
15361
15362 Test also `--verbose', `--defines' and `--name-prefix'. Testing
15363 the latter demonstrates a flaw in the handling of non debugging
15364 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
15365 was used in order to simplify:
15366
15367 #if YYDEBUG
15368 if (yydebug)
15369 {
15370 ...
15371 }
15372 #endif
15373
15374 into
15375
15376 if (yydebug)
15377 {
15378 ...
15379 }
15380
15381 unfortunately this leads to a CPP conflict when
15382 `--name-prefix=foo' is used since it produces `#define yydebug
15383 foodebug'.
15384
15385 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
15386 (YYDPRINTF): New macro.
15387 Spread its use.
15388 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
15389 the bison options.
15390 Also test `--verbose', `--defines' and `--name-prefix'.
15391
71da9eea
AD
153922000-10-02 Akim Demaille <akim@epita.fr>
15393
15394 Improve the readability of the produced parsers.
15395
15396 * src/bison.s1: Formatting changes.
15397 Improve the comment related to the `$' mark.
15398 (yydefault): Don't fall through to `yyresume': `goto' there.
15399 * src/output.c (output_parser): When the `$' is met, skip the end
15400 of its line.
15401 New variable, `number_of_dollar_signs', to check there's exactly
15402 one `$' in the parser skeleton.
15403
95e36146
AD
154042000-10-02 Akim Demaille <akim@epita.fr>
15405
15406 * lib/xstrdup.c: New file, from the fileutils.
15407 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
15408 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
15409 instead of strlen + xmalloc + strcpy.
15410 * src/symtab.c (copys): Remove, use xstrdup instead.
15411
d7020c20
AD
154122000-10-02 Akim Demaille <akim@epita.fr>
15413
15414 * src/gram.h (associativity): New enum type which replaces the
15415 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
15416 `right_assoc', `left_assoc' and `non_assoc'.
15417 Adjust all dependencies.
15418 * src/reader.c: Formatting changes.
15419 (LTYPESTR): Don't define it, use it as a literal in
15420 `reader_output_yylsp'.
15421 * src/symtab.h (symbol_class): New enum type which replaces the
15422 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
15423 `sunknown', `stoken and `snterm'.
15424
1916f98e
AD
154252000-10-02 Akim Demaille <akim@epita.fr>
15426
15427 * src/getargs.c (fixed_outfiles): Rename as...
15428 (yaccflag): for consistency and accuracy.
15429 Adjust dependencies.
15430
d7913476
AD
154312000-10-02 Akim Demaille <akim@epita.fr>
15432
15433 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
15434 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
15435 difficult and introduced a lot of core dump. It turns out that
15436 Bison used an implementation of `xmalloc' based on `calloc', and
15437 at various places it does depend upon the initialization to 0. I
15438 have not tried to isolate the pertinent places, and all the former
15439 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
15440 someone should address this issue.
15441
15442 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
15443 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
15444 files.
15445 Adjust dependencies.
15446 * src/warshall.h: New file.
15447 Propagate.
15448
340ef489
AD
154492000-10-02 Akim Demaille <akim@epita.fr>
15450
15451 Various anti-`extern in *.c' changes.
15452
15453 * src/system.h: Include `assert.h'.
15454
b2ca4022
AD
154552000-10-02 Akim Demaille <akim@epita.fr>
15456
15457 * src/state.h (nstates, final_state, first_state, first_shift)
15458 (first_reduction): Move their exportation from here...
15459 * src/LR0.h: to here.
15460 Adjust dependencies.
15461 * src/getargs.c (statisticsflag): New variable.
15462 Add support for `--statistics'.
15463 Adjust dependencies.
15464
15465 Remove a lot of now useless `extern' statements in most files.
15466
403b315b
AD
154672000-10-02 Akim Demaille <akim@epita.fr>
15468
15469 * src/LR0.h: New file.
15470 Propagate its use.
15471
07a58c13
AD
154722000-10-02 Akim Demaille <akim@epita.fr>
15473
15474 * src/print.h: New file.
15475 Propagate its use.
15476 * src/print.c: Formatting and ordering changes.
15477 (verbose, terse): Replace with...
15478 (print_results): this new function.
15479 Adjust dependencies.
15480
0619caf0
AD
154812000-10-02 Akim Demaille <akim@epita.fr>
15482
15483 * src/conflicts.c (conflict_report): New function.
15484 (conflict_log, verbose_conflict_log): Replace with...
15485 (print_conflicts): this function.
15486 Adjust dependencies.
15487 * src/conflicts.h: New file.
15488 Propagate its inclusion.
15489
3519ec76
AD
154902000-10-02 Akim Demaille <akim@epita.fr>
15491
15492 * src/nullable.h: New file.
15493 Propagate its inclusion.
15494 * src/nullable.c: Formatting changes.
15495
015acc48
AD
154962000-10-02 Akim Demaille <akim@epita.fr>
15497
15498 * src/reduce.h: New file.
15499 Propagate its inclusion.
15500 * src/reduce.c: Topological sort and other formatting changes.
15501 (bool, TRUE, FALSE): Move their definition to...
15502 * src/system.h: here.
15503
8963a27b
AD
155042000-10-02 Akim Demaille <akim@epita.fr>
15505
15506 * src/files.c: Formatting changes.
15507 (tryopen, tryclose, openfiles): Rename as...
15508 (xfopen, xfclose, open_files): this.
15509 (stringappend): static.
15510 * src/files.h: Complete the list of exported symbols.
15511 Propagate its use.
15512
a70083a3
AD
155132000-10-02 Akim Demaille <akim@epita.fr>
15514
15515 * src/reader.h: New file.
15516 Propagate its use instead of tedious list of `extern' and
15517 prototypes.
15518 * src/reader.c: Formatting changes, topological sort,
15519 s/register//.
15520
abadc117
AD
155212000-10-02 Akim Demaille <akim@epita.fr>
15522
15523 * src/lex.h: Prototype `lex.c' exported functions.
15524 * src/reader.c: Adjust.
15525 * src/lex.c: Formatting changes.
15526 (safegetc): Rename as...
15527 (xgetc): this.
15528
720d742f
AD
155292000-10-02 Akim Demaille <akim@epita.fr>
15530
15531 * src/lalr.h: New file.
15532 Propagate its inclusion instead of prototypes and `extern'.
15533 * src/lalr.c: Formatting changes, topological sorting etc.
15534
f2acea59
AD
155352000-10-02 Akim Demaille <akim@epita.fr>
15536
15537 * src/output.c (token_actions): Introduce a temporary array,
15538 YYDEFACT, that makes it possible for this function to use
15539 output_short_table.
15540
d019d655
AD
155412000-10-02 Akim Demaille <akim@epita.fr>
15542
15543 `user_toknums' is output as a `short[]' in `output.c', while it is
15544 defined as a `int[]' in `reader.c'. For consistency with the
15545 other output tables, `user_toknums' is now defined as a table of
15546 shorts.
15547
15548 * src/reader.c (user_toknums): Be a short table instead of an int
15549 table.
15550 Adjust dependencies.
15551
15552 Factor the short table outputs.
15553
15554 * src/output.c (output_short_table): New function.
15555 * src/output.c (output_gram, output_stos, output_rule_data)
15556 (output_base, output_table, output_check): Use it.
15557
6c89f1c1
AD
155582000-10-02 Akim Demaille <akim@epita.fr>
15559
15560 * src/output.c (output): Topological sort of the functions, in
15561 order to get rid of the `static' prototypes.
15562 No longer use `register'.
15563 * src/output.h: New file.
15564 Propagate its inclusion in files explicitly prototyping functions
15565 from output.c.
15566
d9efd181
AD
155672000-09-21 Akim Demaille <akim@epita.fr>
15568
15569 * src/atgeneral.m4: Update from Autoconf.
15570
c29240e7 155712000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
15572
15573 * src/closure.h: New file.
15574 * src/closure.c: Formatting changes, topological sort over the
15575 functions, use of closure.h.
15576 (initialize_closure, finalize_closure): Rename as...
15577 (new_closure, free_closure): these. Adjust dependencies.
15578 * src/LR0.c: Formatting changes, topological sort, use of
15579 cloture.h.
15580 (initialize_states): Rename as...
15581 (new_states): this.
15582 * src/Makefile.am (noinst_HEADERS): Adjust.
15583
499daa50
AD
155842000-09-20 Akim Demaille <akim@epita.fr>
15585
15586 * src/acconfig.h: Don't protect config.h against multiple
15587 inclusion.
15588 Don't define PARAMS.
15589 * src/system.h: Define PARAMS.
15590 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
15591 purpose of config.h. system.h must not try to fix wrong
15592 definitions in config.h.
15593
cc84fd5d
AD
155942000-09-20 Akim Demaille <akim@epita.fr>
15595
15596 * src/derives.h: New file.
15597 * src/main.c, src/derives.h: Use it.
15598 Formatting changes.
15599 * src/Makefile.am (noinst_HEADERS): Adjust.
15600
db5b3a89
AD
156012000-09-20 Akim Demaille <akim@epita.fr>
15602
15603 * tests/atgeneral.m4: Update from Autoconf.
15604 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
15605 (AT_CHECK_CALC): New macros.
15606 Use these macros to test bison with options `', `--raw',
15607 `--debug', `--yacc', `--yacc --debug'.
15608
ceed8467
AD
156092000-09-19 Akim Demaille <akim@epita.fr>
15610
15611 * src/output.c: Formatting changes.
15612 * src/machine.h: Remove, leaving its contents in...
15613 * src/system.h: here.
15614 Include stdio.h.
15615 Adjust all dependencies on stdio.h and machine.h.
15616 * src/getargs.h: New file.
15617 Let all `extern' declarations about getargs.c be replaced with
15618 inclusion of `getargs.h'.
15619 * src/Makefile.am (noinst_HEADERS): Adjust.
15620
15621 * tests/calc.m4 (yyin): Be initialized in main, not on the global
15622 scope.
15623 (yyerror): Returns void, not int.
15624 * doc/bison.texinfo: Formatting changes.
15625
05a1d24b
AD
156262000-09-19 Akim Demaille <akim@epita.fr>
15627
15628 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
15629 portable.
15630
cbd25751
AD
156312000-09-18 Akim Demaille <akim@epita.fr>
15632
15633 * configure.in: Append WARNING_CFLAGS to CFLAGS.
15634 * src/Makefile.am (INCLUDES): Don't.
15635 Be ready to fetch headers in lib/.
15636
13863333
AD
156372000-09-18 Akim Demaille <akim@epita.fr>
15638
15639 * doc/bison.texinfo: Update the copyright.
15640 ANSIfy and GNUify the examples.
15641 Remove the old menu.
15642
0d533154
AD
156432000-09-18 Akim Demaille <akim@epita.fr>
15644
15645 First set of tests: use the `calc' example from the documentation.
15646
15647 * src/bison.s1 (yyparse): Condition the code using `yytname' which
15648 is defined only when YYDEBUG is.
15649 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
15650 * src/files.c (tryopen, tryclose): Formatting changes.
15651 Move to the top and be static.
15652 * src/reader.c (read_signed_integer): Likewise.
15653 * tests/calc.m4: New file.
15654 * Makefile.am, suite.m4: Adjust.
15655 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
15656
e79137ac
AD
156572000-09-18 Akim Demaille <akim@epita.fr>
15658
15659 Add support for an Autotest test suite for Bison.
15660
15661 * m4/m4.m4, m4/atconfig.m4: New files.
15662 * m4/Makefile.am (EXTRA_DIST): Adjust.
15663 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
15664 files.
15665 * src/getargs.c: Display a more standard --version message.
15666 * src/reader.c (reader): Formatting changes.
15667 No longer depend upon VERSION_STRING.
15668 * configure.in: No longer use `dnl'.
15669 Set up the test suite and the new directory `tests/.
15670 (VERSION_STRING): Remove.
15671
27821bff
AD
156722000-04-14 Akim Demaille <akim@epita.fr>
15673
15674 * src/reader.c (copy_comment2): New function, same as former
15675 `copy_comment', but outputs into two FILE *.
15676 (copy_comment): Use it.
15677 (parse_union_decl): Use it.
15678 (get_type, parse_start_decl): Use the same `invalid' message.
15679 (parse_start_decl, parse_union_decl): Use the same `multiple'
15680 message.
15681 (parse_union_decl, copy_guard, copy_action): Use the same
15682 `unmatched' message.
15683 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
15684
cfe5fbc0
AD
156852000-03-31 Akim Demaille <akim@epita.fr>
15686
15687 * src/files.c (tryopen, tryclose): Move to the top.
15688 Be static.
15689
cb7db13e
AD
156902000-03-31 Akim Demaille <akim@epita.fr>
15691
15692 * src/main.c (main): Don't call `done', exit does it.
15693
a0f6b076
AD
156942000-03-31 Akim Demaille <akim@epita.fr>
15695
36281465
AD
15696 * allocate.c: s/return (foo)/return foo/.
15697 * lalr.c: Likewise.
15698 * LR0.c: Likewise.
15699 * output.c: Likewise.
15700 * reader.c: Likewise.
15701 * symtab.c: Likewise.
15702 * vmsgetargs.c: Likewise.
15703
157042000-03-31 Akim Demaille <akim@epita.fr>
15705
15706 Clean up the error reporting functions.
a0f6b076
AD
15707
15708 * src/report.c: New file.
15709 * src/report.h: Likewise.
15710 * src/Makefile.am: Adjust.
15711 * m4/error.m4: New file.
15712 * m4/Makefile.am: Adjust.
15713 * configure.in (jm_PREREQ_ERROR): Call it.
15714 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
15715 Remove.
15716 (fatal, fatals): Remove. All callers use complain.c::fatal.
15717 (warn, warni, warns, warnss, warnss): Remove. All callers use
15718 complain.c::complain.
15719 (toomany): Remove, use fatal instead.
15720 * src/files.c (done): No argument, use complain_message_count.
15721 * src/main.c (main): Register `done' to `atexit'.
15722
15723 * src/getargs.c (usage): More `fputs', less `fprintf'.
15724
18539825
AD
157252000-03-28 Akim Demaille <akim@epita.fr>
15726
15727 * lib/: New directory.
15728 * Makefile.am (SUBDIRS): Adjust.
15729 * configure.in: Adjust.
15730 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
15731 useless.
15732 * src/alloca.c: Moved to lib/.
15733 * src/getopt.c: Likewise.
15734 * src/getopt1.c: Likewise.
15735 * src/getopt.h: Likewise.
15736 * src/ansi2knr.c: Likewise.
15737 * src/ansi2knr.1: Likewise.
15738 * src/Makefile.am: Adjust.
15739 * lib/Makefile.am: New file.
15740
9f306f2a
AD
157412000-03-28 Akim Demaille <akim@epita.fr>
15742
15743 * src/getargs.c (usage): Refresh the help message.
15744
0ba347b6
AD
157452000-03-17 Akim Demaille <akim@epita.fr>
15746
15747 * src/getopt1.c: Updated from textutils 2.0e
15748 * src/getopt.c: Likewise.
15749 * src/getopt.h: Likewise.
15750
dbe7f271
AD
157512000-03-17 Akim Demaille <akim@epita.fr>
15752
15753 * src/Makefile.am (bison.simple): Fix the awk program: quote only
15754 the file name, not the whole `#line LINE FILE'.
15755
75bbe78d
AD
157562000-03-17 Akim Demaille <akim@epita.fr>
15757
15758 On syntax errors, report the token on which we choked.
15759
aa5fd0ee
AD
15760 * src/bison.s1 (yyparse): In the label yyerrlab, when
15761 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 15762
7b306f52
AD
157632000-03-17 Akim Demaille <akim@epita.fr>
15764
aa5fd0ee 15765 * src/reader.c (copy_at): New function.
7b306f52
AD
15766 (copy_guard): Use it.
15767 (copy_action): Use it.
15768
e87b5700
AD
157692000-03-17 Akim Demaille <akim@epita.fr>
15770
15771 Be kind to translators, save some useless translations.
15772
aa5fd0ee 15773 * src/main.c (banner): New function.
e87b5700
AD
15774 (fatal_banner): Use it.
15775 (warn_banner): Use it.
15776
ae3c3164
AD
157772000-03-17 Akim Demaille <akim@epita.fr>
15778
aa5fd0ee
AD
15779 * src/reader.c (copy_definition): Use copy_string and
15780 copy_comment. Removed now unused `match', `ended',
15781 `cplus_comment'.
ae3c3164
AD
15782 (copy_comment, copy_string): Moved, to be visible from
15783 copy_definition.
15784
4dc58e7c
AD
157852000-03-17 Akim Demaille <akim@epita.fr>
15786
aa5fd0ee
AD
15787 * src/reader.c (copy_string): Declare `static inline'. No
15788 problems with inline, since it is checked by configure.
4dc58e7c
AD
15789 (copy_comment): Likewise.
15790
0a6384c4
AD
157912000-03-17 Akim Demaille <akim@epita.fr>
15792
aa5fd0ee 15793 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 15794
3cef001a
AD
157952000-03-17 Akim Demaille <akim@epita.fr>
15796
aa5fd0ee 15797 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
15798 (copy_action): Use it. Removed now unused `match', `ended',
15799 `cplus_comment'.
15800 (copy_guard): Likewise.
15801
ca36d2ef
AD
158022000-03-17 Akim Demaille <akim@epita.fr>
15803
aa5fd0ee 15804 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
15805 (copy_action): Use it.
15806 (copy_guard): Likewise.
15807
6666f98f
AD
158082000-03-17 Akim Demaille <akim@epita.fr>
15809
15810 Change the handling of @s so that they behave exactly like $s.
15811 There is now a pseudo variable @$ (readble and writable), location
15812 of the lhs of the rule (by default ranging from the location of
15813 the first symbol of the rhs, to the location of the last symbol,
15814 or, if the rhs is empty, YYLLOC).
15815
15816 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
15817 yyval.
15818 (yyparse): When providing a default semantic action, provide a
15819 default location action.
15820 (after the $): No longer change `*YYLSP', just stack YYLOC the
15821 same way you stack YYVAL.
15822 * src/reader.c (read_declarations): Use warns.
15823 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
15824 (copy_action, case '@'): Likewise.
15825 Use a standard error message, to save useless work from
15826 translators.
15827
41aca2e0
AD
158282000-03-17 Akim Demaille <akim@epita.fr>
15829
aa5fd0ee
AD
15830 * src/bison.s1: Formatting and cosmetics changes.
15831 * src/reader.c: Likewise.
41aca2e0
AD
15832 Update the Copyright notice.
15833
dc08c1d5
AD
158342000-03-17 Akim Demaille <akim@epita.fr>
15835
aa5fd0ee
AD
15836 * src/bison.s1 (#line): All set to `#line' only, since the
15837 Makefile now handles them.
dc08c1d5 15838
9ee3c97b
AD
158392000-03-16 Akim Demaille <akim@epita.fr>
15840
15841 * src/output.c (output_rule_data): Output the documentation of
15842 some of the tables.
15843 (Copyright notice): Update.
15844 Formatting changes.
15845
0de741ca
AD
158462000-03-16 Akim Demaille <akim@epita.fr>
15847
15848 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
15849 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
15850 One `#if YYDEBUG' remains, since it uses variables which are
15851 defined only if `YYDEBUG != 0'.
15852
bb10be54
AD
158532000-03-16 Akim Demaille <akim@epita.fr>
15854
15855 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
15856 and related variables so that the similarities are highlighted.
15857
b07b484a
AD
158582000-03-16 Akim Demaille <akim@epita.fr>
15859
15860 * src/bison.s1: Properly indent CPP directives.
15861
361f60b3
AD
158622000-03-16 Akim Demaille <akim@epita.fr>
15863
15864 * src/bison.s1: Properly indent the `alloca' CPP section.
15865
8c44d3ec
AD
158662000-03-16 Akim Demaille <akim@epita.fr>
15867
15868 Do not hard code values of directories in `configure.in'.
15869 Update the `configure' tool chain.
15870
15871 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
15872 src/makefile.am.
15873 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
15874 (AC_OUTPUT): Add m4/Makefile.
15875 Bump to bison 1.28a, 1.29 has never been released.
15876 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
15877 handled via src/Makefile.am.
15878 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
15879 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
15880 autoheader.
15881 * Makefile.am (SUBDIRS): Add m4.
15882 (ACLOCAL_AM_FLAGS): New variable.
15883 (AUTOMAKE_OPTIONS): Add check-news.
15884 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
15885 the proper line number and file name.
15886 (DEFS): Propagate the location of bison library files and of the
15887 locale files.
15888 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
15889 builddir.
15890 * acinclude.m4: Remove, replaced by the directory m4.
15891 * m4/Makefile.am (EXTRA_DIST): New variable.
15892 * m4/gettext.m4: New file, from the fileutils.
15893 * m4/lcmessage.m4: Likewise
15894 * m4/progtest.m4: Likewise.
15895 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
15896
f95997e7
AD
158972000-03-10 Akim Demaille <akim@epita.fr>
15898
15899 * src/closure.c:
15900 Formatting changes of various comments.
15901 Respect the GNU coding standards at various places.
15902 Don't use `_()' when no translation is needed.
15903
159041999-12-13 Jesse Thilo <jthilo@gnu.org>
15905
15906 * src/files.c:
15907 OS/2 honors TMPDIR environment variable.
15908
159091999-12-13 Jesse Thilo <jthilo@gnu.org>
15910
15911 * doc/bison.texinfo: Tweaked spelling and grammar.
15912 Updated ISBN.
15913 Removed reference to price of printed copy.
15914 Mention BISON_SIMPLE and BISON_HAIRY.
15915
159161999-12-13 Jesse Thilo <jthilo@gnu.org>
15917
15918 * configure.in, NEWS:
15919 Bison 1.29 released.
15920
159211999-10-27 Jesse Thilo <jthilo@gnu.org>
15922
15923 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
15924 Added reference card.
15925
159261999-07-26 Jesse Thilo <jthilo@gnu.org>
15927
15928 * po/ru.po: Added Russian translation.
15929
159301999-07-26 Jesse Thilo <jthilo@gnu.org>
15931
15932 * configure.in: Added Russian translation.
15933
159341999-07-06 Jesse Thilo <jthilo@gnu.org>
15935
15936 * configure.in, NEWS, README:
15937 Released version 1.28.
15938
159391999-06-14 Jesse Thilo <jthilo@gnu.org>
15940
15941 * src/system.h:
15942 Squashed redefinition warning on some systems.
15943
15944 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
15945 Have configure build version string instead of relying on ANSI string
15946 concatentation.
15947
159481999-06-14 Jesse Thilo <jthilo@gnu.org>
15949
15950 * po/POTFILES.in: Got rid of version.c.
15951
159521999-06-14 Jesse Thilo <jthilo@gnu.org>
15953
15954 * acconfig.h, configure.in:
15955 Have configure build version string instead of relying on ANSI string
15956 concatentation.
15957
159581999-06-08 Jesse Thilo <jthilo@gnu.org>
15959
15960 * doc/bison.1:
15961 Dropped mention of `+' for long-named options.
15962
159631999-05-30 Jesse Thilo <jthilo@gnu.org>
15964
15965 * src/files.c: Added <unistd.h> for unlink().
15966
15967 * src/Makefile.am, src/system.h:
15968 I18n fixes.
15969
159701999-05-30 Jesse Thilo <jthilo@gnu.org>
15971
15972 * README: Added a FAQ list.
15973
15974 * configure.in, acconfig.h:
15975 I18n fixes.
15976
159771999-05-30 Jesse Thilo <jthilo@gnu.org>
15978
15979 * doc/FAQ, doc/Makefile.am:
15980 Added a FAQ list.
15981
159821999-05-19 Jesse Thilo <jthilo@gnu.org>
15983
15984 * src/alloc.h, src/symtab.h, src/version.c:
15985 Protected inclusion of "config.h" with HAVE_CONFIG_H.
15986
159871999-04-18 Jesse Thilo <jthilo@gnu.org>
15988
15989 * src/.cvsignore, src/Makefile.am:
15990 Reorganized: sources in `src', documentation in `doc'.
15991
15992 * src/lex.c (literalchar):
15993 fixed the code for escaping double quotes (thanks
15994 Jonathan Czisny.)
15995
159961999-04-18 Jesse Thilo <jthilo@gnu.org>
15997
15998 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
15999 Adjusted paths to reflect directory reorganization.
16000
160011999-04-18 Jesse Thilo <jthilo@gnu.org>
16002
16003 * doc/.cvsignore, doc/Makefile.am:
16004 Reorganized: sources in `src', documentation in `doc'.
16005
160061999-04-18 Jesse Thilo <jthilo@gnu.org>
16007
16008 * configure.in:
16009 Updated AC_INIT file to reflect directory reorganization.
16010
16011 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
16012 Reorganized: sources in `src', documentation in `doc'.
16013
160141999-04-13 Jesse Thilo <jthilo@gnu.org>
16015
16016 * src/allocate.c:
16017 Don't declare calloc() and realloc() if not necessary.
16018
160191999-04-13 Jesse Thilo <jthilo@gnu.org>
16020
16021 * configure.in, acconfig.h, acinclude.m4:
16022 Don't declare calloc() and realloc() if not necessary.
16023
160241999-03-23 Jesse Thilo <jthilo@gnu.org>
16025
16026 * po/.cvsignore: Added i18n support.
16027
160281999-03-23 Jesse Thilo <jthilo@gnu.org>
16029
16030 * acconfig.h, configure.in, Makefile.am:
16031 Added i18n support.
16032
160331999-03-22 Jesse Thilo <jthilo@gnu.org>
16034
16035 * src/bison.s1: Fixed #line numbers.
16036
160371999-03-15 Jesse Thilo <jthilo@gnu.org>
16038
16039 * po/es.po, po/fr.po, po/nl.po, po/de.po:
16040 Added PO files from Translation Project.
16041
160421999-03-03 Jesse Thilo <jthilo@gnu.org>
16043
16044 * Makefile.am:
16045 Added support for non-ANSI compilers (ansi2knr).
16046
160471999-02-16 Jesse Thilo <jthilo@gnu.org>
16048
16049 * configure.in: Bumped version number to 1.27.
16050
16051 * Makefile.am:
16052 Added `bison.simple' to list of files removed by `make distclean'.
16053
160541999-02-12 Jesse Thilo <jthilo@gnu.org>
16055
16056 * src/files.c, src/files.h:
16057 Defined locations of parser files in config.h instead of Makefile.
16058
160591999-02-12 Jesse Thilo <jthilo@gnu.org>
16060
16061 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
16062 Defined locations of parser files in config.h instead of Makefile.
16063
160641999-02-09 Jesse Thilo <jthilo@gnu.org>
16065
16066 * Makefile.am:
16067 Removed inappropriate use of $< macro.
16068
160691999-02-05 Jesse Thilo <jthilo@gnu.org>
16070
16071 * po/Makefile.in.in, po/POTFILES.in:
16072 Add `po' directory skeleton.
16073
160741999-01-27 Jesse Thilo <jthilo@gnu.org>
16075
16076 * README: Document help-bison list.
16077
16078 * configure.in: Add check for mkstemp().
16079
160801999-01-20 Jesse Thilo <jthilo@gnu.org>
16081
16082 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
16083 Hush a few compiler warnings.
16084
16085 * src/files.c:
16086 Add tryclose(), which verifies that fclose was successful.
16087 Hush a couple of compiler warnings.
16088
160891999-01-20 Jesse Thilo <jthilo@gnu.org>
16090
16091 * Makefile.am, OChangeLog:
16092 ChangeLog is now automatically generated. Include the old version as
16093 OChangeLog.
16094
160951999-01-14 Jesse Thilo <jthilo@gnu.org>
16096
16097 * 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:
16098 Update FSF address.
16099
161001999-01-14 Jesse Thilo <jthilo@gnu.org>
16101
16102 * doc/bison.texinfo: Fix formatting glitch.
16103
16104 * doc/bison.texinfo: Update FSF address.
16105
161061999-01-14 Jesse Thilo <jthilo@gnu.org>
16107
16108 * acconfig.h: Update FSF address.
16109
161101999-01-08 Jesse Thilo <jthilo@gnu.org>
16111
16112 * src/system.h:
16113 Don't define PACKAGE here, since config.h defines it.
16114
161151998-12-30 Jesse Thilo <jthilo@gnu.org>
16116
16117 * src/reader.c: Update copyright date.
16118
16119 * src/main.c:
16120 Ditch sprintf to statically-sized buffers in fatal/warn functions in
16121 favor of output directly to stderr (avoids buffer overruns).
16122
16123 * src/reader.c: Some checks for premature EOF.
16124
16125 * 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:
16126 Use prototypes if the compiler understands them.
16127
16128 * src/files.c: Honor TMPDIR on Unix hosts.
16129 Use prototypes if the compiler understands them.
16130
16131 * src/reader.c:
16132 Fix a couple of buffer overrun bugs.
16133 Use prototypes if the compiler understands them.
16134
16135 * src/system.h: Include unistd.h and ctype.h.
16136 Use #ifdef instead of #if for NLS symbols.
16137
161381998-12-30 Jesse Thilo <jthilo@gnu.org>
16139
16140 * doc/bison.texinfo:
16141 Delete comment "consider using @set for edition number, etc..." since
16142 we now are doing so.
16143
161441998-12-30 Jesse Thilo <jthilo@gnu.org>
16145
16146 * configure.in:
16147 Use prototypes if the compiler understands them.
16148
16149 * NEWS: Document 1.26 highlights.
16150
16151 * Makefile.am: Require Automake 1.3 or later.
16152
16153 * acconfig.h:
16154 Use prototypes if the compiler understands them.
16155
161561998-12-29 Jesse Thilo <jthilo@gnu.org>
16157
16158 * src/version.c:
16159 Use VERSION symbol from automake for version number.
16160
161611998-12-29 Jesse Thilo <jthilo@gnu.org>
16162
16163 * acconfig.h, configure.in, version.cin:
16164 Use VERSION symbol from automake for version number.
16165
161661998-11-28 Jesse Thilo <jthilo@gnu.org>
16167
16168 * Makefile.am:
16169 Distribute original version of simple parser (bison.s1), not built
16170 version (bison.simple).
16171
161721998-11-28 Jesse Thilo <jthilo@gnu.org>
16173
16174 * doc/bison.texinfo: Add info dir entry.
16175
16176 * doc/bison.texinfo:
16177 Let automake put version number into documentation.
16178
161791998-11-26 Jesse Thilo <jthilo@gnu.org>
16180
16181 * src/bison.cld, src/build.com, src/vmshlp.mar:
16182 Add non-RCS files from /gd/gnu/bison.
16183
161841998-11-26 Jesse Thilo <jthilo@gnu.org>
16185
16186 * doc/bison.1:
16187 Document the BISON_HAIRY and BISON_SIMPLE variables.
16188
161891998-11-25 Jesse Thilo <jthilo@gnu.org>
16190
16191 * src/version.c: Build version.c automatically.
16192
16193 * src/reader.c:
16194 Fix token numbering (used to start at 258, not 257).
16195
16196 * src/system.h: Include config.h.
16197
16198 * src/getargs.c: Update bug report address.
16199
16200 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
16201 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
16202
162031998-11-25 Jesse Thilo <jthilo@gnu.org>
16204
16205 * Makefile.am:
16206 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16207
16208 * configure.in, version.cin:
16209 Build version.c automatically.
16210
16211 * AUTHORS: Add AUTHORS file.
16212
16213 * README: Update bug report address.
16214
16215 * bison.simple:
16216 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
16217
16218 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
16219 Add automake stuff.
16220
162211998-11-25 Jesse Thilo <jthilo@gnu.org>
16222
16223 * doc/bison.texinfo: Clean up some formatting.
16224
162251998-05-05 Richard Stallman <rms@gnu.org>
16226
16227 * doc/bison.texinfo:
16228 Explain better why to make a pure parser.
16229
162301998-01-05 Richard Stallman <rms@gnu.org>
16231
16232 * src/files.c (openfiles):
16233 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
16234 find a temporary directory, if possible. Do not unlink files while
16235 they are open.
16236
162371997-08-25 Richard Stallman <rms@gnu.org>
16238
16239 * src/reader.c (stack_offset;):
16240 Change some warni to warns.
16241
16242 * src/lex.c (literalchar): Use warns, not warni.
16243
162441997-06-28 Richard Stallman <rms@gnu.org>
16245
16246 * src/bison.s1: Add a Bison version comment.
16247
16248 * src/main.c (fatal, warn, berror):
16249 Use program_name.
16250
162511997-06-28 Richard Stallman <rms@gnu.org>
16252
16253 * Makefile.in (bison_version): New variable.
16254 (dist): Use that variable.
16255 (bison.s1): Substitute the Bison version into bison.simple.
16256
16257 * bison.simple: Add a Bison version comment.
16258
162591997-06-18 Richard Stallman <rms@gnu.org>
16260
16261 * src/main.c (fatal, warn, berror):
16262 Make error messages standard.
16263 (toomany): Improve error message text.
16264
16265 * 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:
16266 new.h renamed to alloc.h.
16267
162681997-06-18 Richard Stallman <rms@gnu.org>
16269
16270 * Makefile.in: new.h renamed to alloc.h.
16271
162721997-05-24 Richard Stallman <rms@gnu.org>
16273
16274 * src/lex.c (literalchar):
16275 Fix the code for escaping \, " and '.
16276
16277 (lex): Avoid trouble when there are many chars
16278 to discard in a char literal with just several chars in it.
16279
162801997-05-17 Richard Stallman <rms@gnu.org>
16281
16282 * src/bison.s1:
16283 Use malloc, if using alloca is troublesome.
16284 (YYSTACK_USE_ALLOCA): New flag macro.
16285 Define it for some systems and compilers.
16286 (YYSTACK_ALLOC): New macro.
16287 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16288 If it was malloc'd, free it.
16289
162901997-05-17 Richard Stallman <rms@gnu.org>
16291
16292 * bison.simple:
16293 Use malloc, if using alloca is troublesome.
16294 (YYSTACK_USE_ALLOCA): New flag macro.
16295 Define it for some systems and compilers.
16296 (YYSTACK_ALLOC): New macro.
16297 (yyparse): Use YYSTACK_ALLOC to allocate stack.
16298 If it was malloc'd, free it.
16299
163001997-04-23 Richard Stallman <rms@gnu.org>
16301
16302 * src/bison.s1:
16303 (alloca) [__hpux]: Always define as __builtin_alloca.
16304
163051997-04-23 Richard Stallman <rms@gnu.org>
16306
16307 * bison.simple:
16308 (alloca) [__hpux]: Always define as __builtin_alloca.
16309
163101997-04-22 Richard Stallman <rms@gnu.org>
16311
16312 * src/bison.s1:
16313 [__hpux]: Include alloca.h (right for HPUX 10)
16314 instead of declaring alloca (right for HPUX 9).
16315
16316 * src/bison.s1 (__yy_memcpy):
16317 Declare arg `count' as unsigned int.
16318 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16319
163201997-04-22 Richard Stallman <rms@gnu.org>
16321
16322 * bison.simple:
16323 [__hpux]: Include alloca.h (right for HPUX 10)
16324 instead of declaring alloca (right for HPUX 9).
16325
16326 * bison.simple (__yy_memcpy):
16327 Declare arg `count' as unsigned int.
16328 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
16329
163301997-01-03 Richard Stallman <rms@gnu.org>
16331
16332 * src/allocate.c: [__STDC__ or _MSC_VER]:
16333 Declare calloc and realloc to return void *.
16334
163351997-01-02 Richard Stallman <rms@gnu.org>
16336
16337 * src/system.h:
16338 [_MSC_VER]: Include stdlib.h and process.h.
16339 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
16340
16341 * src/main.c (main): Return FAILURE as a value.
16342 (printable_version): Declare arg as int, not char.
16343
163441997-01-02 Richard Stallman <rms@gnu.org>
16345
16346 * Makefile.in (dist):
16347 Explicitly check for symlinks, and copy them.
16348
163491996-12-19 Richard Stallman <rms@gnu.org>
16350
16351 * src/files.c:
16352 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
16353
163541996-12-18 Paul Eggert <eggert@gnu.org>
16355
16356 * src/bison.s1 (yyparse):
16357 If __GNUC__ and YYPARSE_PARAM are both defined,
16358 declare yyparse to have a void * argument.
16359
163601996-12-18 Paul Eggert <eggert@gnu.org>
16361
16362 * bison.simple (yyparse):
16363 If __GNUC__ and YYPARSE_PARAM are both defined,
16364 declare yyparse to have a void * argument.
16365
163661996-12-17 Richard Stallman <rms@gnu.org>
16367
16368 * src/reduce.c (nbits): Add some casts.
16369
163701996-08-12 Richard Stallman <rms@gnu.org>
16371
16372 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
16373
163741996-08-12 Richard Stallman <rms@gnu.org>
16375
16376 * bison.simple: Test _MSDOS as well as _MSDOS_.
16377
163781996-07-31 Richard Stallman <rms@gnu.org>
16379
16380 * src/bison.s1:
16381 [__sun && __i386]: Include alloca.h.
16382
163831996-07-31 Richard Stallman <rms@gnu.org>
16384
16385 * bison.simple:
16386 [__sun && __i386]: Include alloca.h.
16387
163881996-07-30 Richard Stallman <rms@gnu.org>
16389
16390 * src/bison.s1: Comment change.
16391
16392 * src/bison.s1: Test _MSDOS_, not MSDOS.
16393
163941996-07-30 Richard Stallman <rms@gnu.org>
16395
16396 * bison.simple: Comment change.
16397
16398 * bison.simple: Test _MSDOS_, not MSDOS.
16399
164001996-06-01 Richard Stallman <rms@gnu.org>
16401
16402 * 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:
16403 Insert `_' macro around many string constants.
16404
16405 * src/main.c:
16406 Insert `_' macro around many string constants.
16407
16408 (main): Call setlocale, bindtextdomain and textdomain.
16409
16410 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
16411 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
16412 [ENABLE_NLS]: Include libintl.h.
16413 [ENABLE_NLS] (gettext): Define.
16414 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
16415 (N_, PACKAGE, LOCALEDIR): New macros.
16416
164171996-06-01 Richard Stallman <rms@gnu.org>
16418
16419 * POTFILES.in: New file.
16420
16421 * Makefile.in (allocate.o):
16422 Define target explicitly.
16423
16424 * Makefile.in (CFLAGS): Set to @CFLAGS@.
16425 (LDFLAGS): Set to @LDFLAGS@.
16426 (configure): Run autoconf only if preceding `cd' succeeds.
16427 (bison.s1): Redirect output to temporary file then move the
16428 temporary to the target, rather than redirecting directly to bison.s1.
16429 (clean): Remove config.status and config.log.
16430 (distclean): Don't remove config.status here.
16431
164321996-05-12 Richard Stallman <rms@gnu.org>
16433
16434 * src/bison.s1:
16435 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16436
164371996-05-12 Richard Stallman <rms@gnu.org>
16438
16439 * bison.simple:
16440 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
16441
164421996-05-11 Richard Stallman <rms@gnu.org>
16443
16444 * src/bison.s1 (__yy_memcpy):
16445 Really reorder the args, as was supposedly done on Feb 14 1995.
16446 (yyparse): Calls changed accordingly.
16447
164481996-05-11 Richard Stallman <rms@gnu.org>
16449
16450 * Makefile.in (dist): Don't use $(srcdir).
16451
16452 * bison.simple (__yy_memcpy):
16453 Really reorder the args, as was supposedly done on Feb 14 1995.
16454 (yyparse): Calls changed accordingly.
16455
164561996-01-27 Richard Stallman <rms@gnu.org>
16457
16458 * src/output.c (output_rule_data):
16459 Test YYERROR_VERBOSE in the conditional
16460 around the definition of ttyname.
16461
164621995-12-29 Richard Stallman <rms@gnu.org>
16463
16464 * src/bison.s1:
16465 Fix line numbers in #line commands.
16466
164671995-12-29 Richard Stallman <rms@gnu.org>
16468
16469 * bison.simple:
16470 Fix line numbers in #line commands.
16471
164721995-12-27 Richard Stallman <rms@gnu.org>
16473
16474 * src/bison.s1 (YYPARSE_PARAM_DECL):
16475 In C++, make it always null.
16476 (YYPARSE_PARAM_ARG): New macro.
16477 (yyparse): Use YYPARSE_PARAM_ARG.
16478
164791995-12-27 Richard Stallman <rms@gnu.org>
16480
16481 * bison.simple (YYPARSE_PARAM_DECL):
16482 In C++, make it always null.
16483 (YYPARSE_PARAM_ARG): New macro.
16484 (yyparse): Use YYPARSE_PARAM_ARG.
16485
164861995-11-29 Richard Stallman <rms@gnu.org>
16487
16488 * doc/bison.texinfo:
16489 Describe literal string tokens, %raw, %no_lines, %token_table.
16490
164911995-11-29 Daniel Hagerty <hag@gnu.org>
16492
16493 * doc/bison.texinfo: Fixed update date
16494
164951995-10-16 Richard Stallman <rms@gnu.org>
16496
16497 * src/version.c: Version 1.25.
16498
164991995-10-16 Richard Stallman <rms@gnu.org>
16500
16501 * NEWS: *** empty log message ***
16502
165031995-10-16 Richard Stallman <rms@gnu.org>
16504
16505 * doc/bison.1, doc/bison.rnh:
16506 Add new options.
16507
165081995-10-15 Richard Stallman <rms@gnu.org>
16509
16510 * src/vmsgetargs.c, src/getargs.c:
16511 Added -n, -k, and -raw switches.
16512 (noparserflag, toknumflag, rawtoknumflag): New variables.
16513
16514 * src/symtab.h (SALIAS):
16515 New #define for adding aliases to %token.
16516 (struct bucket): Added `alias' field.
16517
16518 * src/reduce.c (reduce_grammar):
16519 Revise error message.
16520 (print_notices): Remove final `.' from error message.
16521
16522 * src/reader.c (reader_output_yylsp):
16523 New function.
16524 (readgram): Use `#if 0' around code that accepted %command
16525 inside grammar rules: The documentation doesn't allow it,
16526 and it will fail since the %command processors scan for the next %.
16527 (parse_token_decl): Extended the %token
16528 declaration to allow a multi-character symbol as an alias.
16529 (parse_thong_decl): New function.
16530 (read_declarations): Added %thong declarations.
16531 (read_declarations): Handle NOOP to deal with allowing
16532 % declarations as another means to specify the flags.
16533 (readgram): Allow %prec prior to semantics embedded in a rule.
16534 (skip_to_char, read_declarations, copy_definition)
16535 (parse_token_decl, parse_start_decl, parse_type_decl)
16536 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
16537 (get_type_name, copy_guard, copy_action, readgram)
16538 (get_type, packsymbols): Revised most error messages.
16539 Changed `fatal' to `warnxxx' to avoid aborting for error.
16540 Revised and use multiple warnxxx functions to avoid using VARARGS1.
16541 (read_declarations): Improve the error message for
16542 an invalid character. Do not abort.
16543 (read_declarations, copy_guard, copy_action): Use
16544 printable_version to avoid unprintable characters in printed output.
16545 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
16546 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
16547 Allow the type of a non-terminal can be given
16548 more than once, as long as all specifications give the same type.
16549
16550 * src/output.c:
16551 (output_headers, output_trailers, output, output_gram)
16552 (output_rule_data): Implement noparserflag variable.
16553 Implement toknumflag variable.
16554 (output): Call reader_output_yylsp to output LTYPESTR.
16555
16556 * src/main.c (main):
16557 If reader sees an error, don't process the grammar.
16558 (fatals): Updated to not use VARARGS1.
16559 (printable_version, int_to_string, warn, warni, warns, warnss)
16560 (warnsss): New error reporting functions. Avoid abort for error.
16561
16562 * src/lex.h:
16563 Added THONG and NOOP for alias processing.
16564 Added SETOPT for the new code that allows setting options with %flags.
16565
16566 * src/lex.c:
16567 Include getopt.h. Add some extern decls.
16568 (safegetc): New function to deal with EOF gracefully.
16569 (literalchar); new function to deal with reading \ escapes.
16570 (lex): Use literalchar.
16571 (lex): Implemented "..." tokens.
16572 (literalchar, lex, parse_percent_token): Made tokenbuffer
16573 always contain the token. This includes growing the token
16574 buffer while reading an integer.
16575 (parse_percent_token): Replaced if-else statement with percent_table.
16576 (parse_percent_token): Added % declarations as another
16577 way to specify the flags -n, -l, and -r. Also added hooks for
16578 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
16579 major changes to files.c.
16580 (lex) Retain in the incoming stream a character following
16581 an incorrect '/'.
16582 (skip_white_space, lex): Revised most error messages
16583 and changed fatal to warn to avoid aborting.
16584 (percent_table): Added %thong declarations.
16585
16586 * src/gram.h: Comment changes.
16587
16588 * src/files.c (openfiles, open_extra_files, done):
16589 Add faction flag
16590 and actfile file. Handle noparserflag. Both for -n switch.
16591
16592 * src/conflicts.c (resolve_sr_conflict):
16593 Remove use of alloca.
16594
165951995-06-01 Jim Meyering <meyering@gnu.org>
16596
16597 * doc/bison.texinfo: *** empty log message ***
16598
165991995-05-06 Richard Stallman <rms@gnu.org>
16600
16601 * src/bison.s1: Comment change.
16602
166031995-05-06 Richard Stallman <rms@gnu.org>
16604
16605 * bison.simple: Comment change.
16606
166071995-05-03 Richard Stallman <rms@gnu.org>
16608
16609 * src/version.c: Version now 1.24.
16610
16611 * src/bison.s1: Change distribution terms.
16612
16613 * src/version.c: Version now 1.23.
16614
166151995-05-03 Richard Stallman <rms@gnu.org>
16616
16617 * doc/bison.texinfo:
16618 Rewrite "Conditions for Using Bison".
16619 Update version to 1.24.
16620
166211995-05-03 Richard Stallman <rms@gnu.org>
16622
16623 * bison.simple: Change distribution terms.
16624
166251995-02-23 Richard Stallman <rms@gnu.org>
16626
16627 * src/files.c: Test __VMS_POSIX as well as VMS.
16628
166291995-02-14 Jim Meyering <meyering@gnu.org>
16630
16631 * src/bison.s1 (__yy_memcpy):
16632 Renamed from __yy_bcopy to avoid
16633 confusion. Reverse FROM and TO arguments to be consistent with
16634 those of memcpy.
16635
166361995-02-14 Jim Meyering <meyering@gnu.org>
16637
16638 * bison.simple (__yy_memcpy):
16639 Renamed from __yy_bcopy to avoid
16640 confusion. Reverse FROM and TO arguments to be consistent with
16641 those of memcpy.
16642
166431994-11-10 David J. MacKenzie <djm@gnu.org>
16644
16645 * NEWS: reformat
16646
16647 * NEWS: New file.
16648
16649 * Makefile.in (DISTFILES): Include NEWS.
16650
16651 * Makefile.in (DISTFILES):
16652 Include install-sh, not install.sh.
16653
16654 * configure.in: Update to Autoconf v2 macro names.
16655
166561994-10-05 David J. MacKenzie <djm@gnu.org>
16657
16658 * Makefile.in: fix typo
16659
16660 * Makefile.in (prefix, exec_prefix):
16661 Let configure set them.
16662
166631994-09-28 David J. MacKenzie <djm@gnu.org>
16664
16665 * Makefile.in: Set datadir to $(prefix)/share.
16666
166671994-09-15 Richard Stallman <rms@gnu.org>
16668
16669 * src/bison.s1:
16670 Update copyright notice and GPL version.
16671
166721994-09-15 Richard Stallman <rms@gnu.org>
16673
16674 * bison.simple:
16675 Update copyright notice and GPL version.
16676
166771994-07-12 Richard Stallman <rms@gnu.org>
16678
16679 * src/reduce.c, src/reader.c:
16680 entered into RCS
16681
166821994-05-05 David J. MacKenzie <djm@gnu.org>
16683
16684 * Makefile.in: entered into RCS
16685
166861994-03-26 Richard Stallman <rms@gnu.org>
16687
16688 * src/bison.s1: entered into RCS
16689
166901994-03-26 Richard Stallman <rms@gnu.org>
16691
16692 * bison.simple: entered into RCS
16693
166941994-03-25 Richard Stallman <rms@gnu.org>
16695
16696 * src/main.c: entered into RCS
16697
166981994-03-24 Richard Stallman <rms@gnu.org>
16699
16700 * src/conflicts.c: entered into RCS
16701
167021994-01-02 Richard Stallman <rms@gnu.org>
16703
16704 * Makefile.in: *** empty log message ***
16705
167061993-11-21 Richard Stallman <rms@gnu.org>
16707
16708 * src/bison.s1: *** empty log message ***
16709
167101993-11-21 Richard Stallman <rms@gnu.org>
16711
16712 * doc/bison.texinfo: entered into RCS
16713
16714 * doc/bison.texinfo: *** empty log message ***
16715
167161993-11-21 Richard Stallman <rms@gnu.org>
16717
16718 * bison.simple: *** empty log message ***
16719
167201993-10-25 David J. MacKenzie <djm@gnu.org>
16721
16722 * doc/bison.texinfo: *** empty log message ***
16723
167241993-10-19 Richard Stallman <rms@gnu.org>
16725
16726 * src/bison.s1: *** empty log message ***
16727
167281993-10-19 Richard Stallman <rms@gnu.org>
16729
16730 * bison.simple: *** empty log message ***
16731
167321993-10-14 Richard Stallman <rms@gnu.org>
16733
16734 * src/bison.s1: *** empty log message ***
16735
167361993-10-14 Richard Stallman <rms@gnu.org>
16737
16738 * bison.simple: *** empty log message ***
16739
167401993-09-14 David J. MacKenzie <djm@gnu.org>
16741
16742 * doc/bison.texinfo: *** empty log message ***
16743
167441993-09-13 Noah Friedman <friedman@gnu.org>
16745
16746 * Makefile.in: *** empty log message ***
16747
167481993-09-10 Richard Stallman <rms@gnu.org>
16749
16750 * src/conflicts.c: *** empty log message ***
16751
16752 * src/system.h: entered into RCS
16753
167541993-09-10 Richard Stallman <rms@gnu.org>
16755
16756 * doc/bison.1: entered into RCS
16757
167581993-09-06 Noah Friedman <friedman@gnu.org>
16759
16760 * src/version.c: entered into RCS
16761
167621993-09-06 Noah Friedman <friedman@gnu.org>
16763
16764 * Makefile.in: *** empty log message ***
16765
167661993-07-30 David J. MacKenzie <djm@gnu.org>
16767
16768 * Makefile.in: *** empty log message ***
16769
167701993-07-24 Richard Stallman <rms@gnu.org>
16771
16772 * src/bison.s1: *** empty log message ***
16773
167741993-07-24 Richard Stallman <rms@gnu.org>
16775
16776 * bison.simple: *** empty log message ***
16777
167781993-07-08 David J. MacKenzie <djm@gnu.org>
16779
16780 * Makefile.in: *** empty log message ***
16781
167821993-07-04 Richard Stallman <rms@gnu.org>
16783
16784 * src/bison.s1: *** empty log message ***
16785
167861993-07-04 Richard Stallman <rms@gnu.org>
16787
16788 * bison.simple: *** empty log message ***
16789
167901993-06-26 David J. MacKenzie <djm@gnu.org>
16791
16792 * src/getargs.c: entered into RCS
16793
167941993-06-26 David J. MacKenzie <djm@gnu.org>
16795
16796 * doc/bison.texinfo: *** empty log message ***
16797
16798 * doc/bison.1: New file.
16799
168001993-06-25 Richard Stallman <rms@gnu.org>
16801
16802 * src/getargs.c: New file.
16803
168041993-06-16 Richard Stallman <rms@gnu.org>
16805
16806 * src/bison.s1: *** empty log message ***
16807
168081993-06-16 Richard Stallman <rms@gnu.org>
16809
16810 * bison.simple: *** empty log message ***
16811
168121993-06-03 Richard Stallman <rms@gnu.org>
16813
16814 * src/bison.s1: New file.
16815
168161993-06-03 Richard Stallman <rms@gnu.org>
16817
16818 * doc/bison.texinfo: *** empty log message ***
16819
168201993-06-03 Richard Stallman <rms@gnu.org>
16821
16822 * bison.simple: New file.
16823
168241993-05-19 Richard Stallman <rms@gnu.org>
16825
16826 * doc/bison.texinfo: New file.
16827
168281993-05-07 Noah Friedman <friedman@gnu.org>
16829
16830 * Makefile.in: *** empty log message ***
16831
168321993-04-28 Noah Friedman <friedman@gnu.org>
16833
16834 * src/reader.c: *** empty log message ***
16835
168361993-04-23 Noah Friedman <friedman@gnu.org>
16837
16838 * src/alloc.h: entered into RCS
16839
168401993-04-20 David J. MacKenzie <djm@gnu.org>
16841
16842 * src/version.c: *** empty log message ***
16843
16844 * src/files.c, src/allocate.c:
16845 entered into RCS
16846
16847 * src/reader.c: *** empty log message ***
16848
16849 * src/lex.c: entered into RCS
16850
16851 * src/conflicts.c: New file.
16852
16853 * src/symtab.c: entered into RCS
16854
16855 * src/alloc.h: New file.
16856
16857 * src/LR0.c: entered into RCS
16858
168591993-04-18 Noah Friedman <friedman@gnu.org>
16860
16861 * src/reader.c: New file.
16862
16863 * src/version.c: *** empty log message ***
16864
168651993-04-18 Noah Friedman <friedman@gnu.org>
16866
16867 * Makefile.in: *** empty log message ***
16868
168691993-04-17 Noah Friedman <friedman@gnu.org>
16870
16871 * Makefile.in: *** empty log message ***
16872
168731993-04-15 Richard Stallman <rms@gnu.org>
16874
16875 * src/main.c, src/files.c:
16876 New file.
16877
168781993-04-15 Noah Friedman <friedman@gnu.org>
16879
16880 * configure.in: entered into RCS
16881
16882 * configure.in: *** empty log message ***
16883
16884 * configure.in: New file.
16885
168861993-04-14 Richard Stallman <rms@gnu.org>
16887
16888 * Makefile.in: New file.
16889
168901993-04-13 Richard Stallman <rms@gnu.org>
16891
16892 * src/version.c: New file.
16893
168941993-03-25 Richard Stallman <rms@gnu.org>
16895
16896 * src/output.c: entered into RCS
16897
168981992-09-25 Richard Stallman <rms@gnu.org>
16899
16900 * configure.bat: entered into RCS
16901
169021992-06-22 Richard Stallman <rms@gnu.org>
16903
16904 * src/vmsgetargs.c: entered into RCS
16905
169061992-06-22 Richard Stallman <rms@gnu.org>
16907
16908 * doc/bison.rnh: entered into RCS
16909
169101992-04-20 David J. MacKenzie <djm@gnu.org>
16911
16912 * README: entered into RCS
16913
169141992-01-22 Richard Stallman <rms@gnu.org>
16915
16916 * src/machine.h: entered into RCS
16917
169181991-12-21 Richard Stallman <rms@gnu.org>
16919
16920 * src/lalr.c, src/closure.c:
16921 entered into RCS
16922
169231991-12-20 Richard Stallman <rms@gnu.org>
16924
16925 * src/state.h: entered into RCS
16926
169271991-12-18 Richard Stallman <rms@gnu.org>
16928
16929 * src/print.c, src/nullable.c, src/derives.c:
16930 entered into RCS
16931
169321991-11-03 David J. MacKenzie <djm@gnu.org>
16933
16934 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
16935 entered into RCS
16936
169371988-09-09 Richard Stallman <rms@gnu.org>
16938
16939 * src/bison.hairy: entered into RCS
16940
169411987-12-16 Richard Stallman <rms@gnu.org>
16942
16943 * REFERENCES: entered into RCS
dc546b0f 16944
f294a2c2 16945
04098407 16946 -----
f294a2c2 16947
04098407 16948 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
e2a21b6f
PE
16949 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
16950 Software Foundation, Inc.
f294a2c2 16951
04098407
PE
16952 Copying and distribution of this file, with or without
16953 modification, are permitted provided the copyright notice and this
16954 notice are preserved.
e9071366
AD
16955
16956$Id$