]> git.saurik.com Git - bison.git/blame - ChangeLog
* djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
[bison.git] / ChangeLog
CommitLineData
e37c665c
JMG
12007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2
3 DJGPP specific issues.
4
5 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
6 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
7
7d2d521f
JD
82007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
9
10 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
11 run parsers in all tests so that Valgrind is invoked during
12 maintainer-check-valgrind.
13 (Duplicate representation of merged trees): Free all semantic values.
14 (Duplicated user destructor for lookahead): Likewise.
15
e0ac9b4b
JD
162007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
17
18 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
19 command-line prefix.
20 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
21 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
22 miss Valgrind messages.
23 (Exploding the Stack Size with Malloc): Likewise.
24
78143faa
JD
252007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
26
27 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
28 locals. Reported by Juan Manuel Guerrero at
29 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
30 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
31 Fix some indentation also.
32 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
33 explaining this issue.
34
7ecec4dd
JD
352007-01-09 Paolo Bonzini <bonzini@gnu.org>
36 and Joel E. Denny <jdenny@ces.clemson.edu>
37
38 Simplify union and prologue handling, and escape union and lex/parse
39 params with digraphs.
40 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
41 values to the empty string since these are no longer guaranteed
42 initialized by the front-end.
43 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
44 braces around b4_user_stype since this is no longer done by the
45 front-end.
46 * src/files.c, src/files.h (pre_prologue_obstack,
47 post_prologue_obstack): Remove.
48 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
49 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
50 with digraphs. This fixes lex params and parse params.
51 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
52 * src/output.c (prepare): Remove muscle insertion of the prologues.
53 (output): Remove freeing of pre_prologue_obstack and
54 post_prologue_obstack.
55 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
56 than prologue_augment for prologue parsing so you don't need prologue
57 obstacks.
5c80250c
JD
58 (grammar_declaration): For %union RHS, use `braceless' instead of
59 "{...}" so that braces are already stripped and code is escaped with
60 digraphs.
7ecec4dd
JD
61 * src/reader.c (prologue_augment): Remove.
62 (reader): Remove initialization of pre_prologue_obstack and
63 post_prologue_obstack.
64 * src/reader.h (prologue_augment): Remove.
65
66 * data/c.m4: Remove stray parenthesis.
67
16dc6a9e
JD
682007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
69
70 Remove quotes from variables names in %define directives and from
71 qualifiers in %code directives, and restrict the characters that are
72 allowed in them to M4-friendly ones. For %define, continue to support
73 the quoted form as a deprecated feature. Discussed starting at
74 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
75 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
76 %code.
77 * doc/bison.texinfo (Prologue Alternatives): Update.
78 (Bison Declaration Summary): In %defines entry, update mention of
79 `%code requires' and `%code provides'.
80 (C++ Location Values): Update %define uses.
81 (Calc++ Parser Interface): Likewise.
82 (Calc++ Parser): Likewise, and update `%code requires' uses.
83 (Bison Symbols): Update %code documentation.
84 * src/parse-gram.y (prologue_declaration): For %define variables, use
85 `variable' instead of `STRING'.
86 (grammar_declaration): For %code qualifiers, use `ID' instead of
87 `STRING'.
88 (variable): New nonterminal that takes an `ID' or a `STRING'.
89 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
90 and %define uses.
91 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
92 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
93 (%define errors): Update %define uses.
94
e9813cd4
JD
952007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
96
97 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
98 instead of muscle_insert for %define values so that M4-special
99 characters are replaced with digraphs.
100 * tests/input.at (%define errors): Extend to check weird values.
101
6afc30cc
JD
1022007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
103
104 Instead of having skeletons declare all valid %define variables and
105 %code qualifiers, provide macros that retrieve the associated values
106 and build these lists automatically. Thus Bison will now warn when a
107 variable or qualifier is not used by the skeleton in the current
108 invocation regardless of whether it might sometimes be used by that
109 skeleton in other invocations. Also, move all %define value macros to
110 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
111 form, which is replaced by %code.
112 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
113 (b4_check_user_names): ... this, and change the series of valid name
114 arguments to a single list argument for names used in the skeleton
115 similar to the existing list argument for names used in the grammar.
116 Warn instead of complaining.
117 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
118 values and %code code, to format %code code properly, and to build
119 lists of all %define variables and %code qualifiers used in the
120 skeleton: b4_skeleton_percent_define_variables and
121 b4_skeleton_percent_code_qualifiers.
122 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
123 Remove, and...
124 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
125 the skeleton names lists can finish building first. In place of
126 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
127 expect the lists b4_user_percent_define_variables and
128 b4_user_percent_code_qualifiers.
129 * data/c++.m4: Where setting default values for b4_parser_class_name,
130 b4_location_type, b4_filename_type, b4_namespace, and
131 b4_define_location_comparison, update their names to the
132 b4_percent_define_ namespace.
133 * data/glr.c: Don't use b4_check_percent_define_variables and
134 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
135 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
136 (b4_parser_class_name, b4_namespace): Define these using
137 b4_get_percent_define for parser_class_name and namespace. Normally
138 this would be a bad idea since there might be cases when the variables
139 aren't used, but these variables are too pervasive in these skeletons
140 for that to be a problem.
141 * data/location.cc: Use b4_get_percent_define.
142 * data/push.c: Don't use b4_check_percent_define_variables and
143 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
144 * data/yacc.c: Likewise, and don't call m4_exit in
145 b4_use_push_for_pull_if or m4_wrap code will never execute.
146 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
147 Rename to...
148 (muscle_grow_user_name_list): ... this for consistency with the
149 terminology used in bison.m4.
150 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
151 %define variable names, and rename muscle used_percent_define_variables
152 to user_percent_define_variables.
153 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
154 user_percent_code_qualifiers.
155 (content): Remove.
156 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
157 {CODE} form is no longer accepted.
158 * tests/input.at (Reject bad %code qualifiers): Rename to...
159 (Reject unused %code qualifiers): ... this, and update test output.
160 (%define error): Update test output.
161
7eb8a0bc
JD
1622007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
163
164 Check for unrecognized %define variables similar to checking for
165 unrecognized %code qualifiers. Check for redefined %define variables.
166 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
167 generalizes...
168 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
169 (b4_check_percent_define_variables): New, also wraps it.
170 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
171 variables using b4_check_percent_define_variables.
172 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
173 all those exercised in the test suite and all those listed in the
174 `Default values' section of c++.m4. Are there others?
175 * data/push.c, data/yacc.c: Declare no valid %define variables.
176 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
177 similar to muscle_find, but it works even when the muscle stores a
178 const value.
179 (muscle_grow_used_name_list): New function for constructing the used
180 name list muscles that b4_check_for_unrecognized_names requires.
181 * src/parse-gram.y (prologue_declaration): Warn if a variable is
182 %define'd more than once. Define the b4_used_percent_define_variables
183 muscle with muscle_grow_used_name_list.
184 (grammar_declaration): Abbreviate %code code with
185 muscle_grow_used_name_list.
186 * tests/input.at (%define errors): New.
187
3fc65ead
JD
1882007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
189
190 Provide warn_at, complain_at, and fatal_at function callbacks to the
191 skeletons, and use this for %code qualifier complaints.
192 * data/bison.m4 (b4_error_at): New, invoked by...
193 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
194 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
195 @fatal_at(...@) directives.
196 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
197 qualifiers in b4_used_percent_code_qualifiers and to use
198 b4_complain_at.
199 * src/location.c, src/location.h (boundary_set_from_string): New global
200 function.
201 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
202 function.
203 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
204 to b4_used_percent_code_qualifiers.
205 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
206 function.
207 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
208 (lineno): Rename to...
209 (out_lineno): ... this so I don't misunderstand it again.
210 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
211 here; these newlines are in the input but not the output file.
212 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
213 (at_directive_perform): ... this new static function, and add handling
214 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
215 directives.
216 * tests/input.at (Reject bad %code qualifiers): Update test output with
217 locations and extend.
218
219 * tests/output.at (Output file name: [, Output file name: ]): Remove
220 bogus comment about these tests failing.
221
1c7b7e1d
JD
2222007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
223
224 Clean up b4_check_percent_code_qualifiers a little.
225 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
226 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
227 documentation and add examples.
228 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
229 qualifiers here.
230
08af01c2
JD
2312007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
232
233 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
234 unreliable -- especially when they're hidden inside another macro.
235 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
236 data/c.m4: Remove m4_divert(-1).
237 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
238 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
239 m4_divert_push(0) and m4_divert_pop(0).
240 * data/output.c (output_skeleton): Don't add an m4_divert_push(0) and
241 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
242 pushed and popped by m4sugar, should be first on the stack.
243
244 Provide warn, complain, and fatal function callbacks to the skeletons.
245 This provides more flexibility than m4_fatal, improves the error
246 message format, and captures messages for translation. Discussed
247 starting at
248 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
249 * data/bison.m4 (b4_error): New, invoked by...
250 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
251 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
252 directives. Because these M4 macros might be called when the current
253 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
254 the previous removal of uses of m4_divert, which caused trouble.
255 (b4_check_percent_code_qualifiers): Use b4_complain instead of
256 m4_fatal to report unrecognized %code qualifiers.
257 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
258 push parser requests.
259 * data/glr.c: Use b4_complain instead of m4_fatal to report
260 non-deterministic push parser requests.
261 Update @output usage to @output(...@) form.
262 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
263 report missing %defines. Update @output usage to @output(...@) form.
264 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
265 @output(...@) form.
266 * src/main.c (main): Invoke skel_scanner_free.
267 * src/scan-skel.h (skel_scanner_free): Prototype new function.
268 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
269 obstack_for_string from flex-scanner.h.
270 (YY_DECL): Use to declare skel_lex static.
271 (decode_at_digraphs): Remove; now handled in the new
272 SC_AT_DIRECTIVE_ARG start condition.
273 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
274 functions.
275 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
276 at_directive_argv): New static globals.
277 (INITIAL): Use fail_for_invalid_at.
278 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
279 recognize the start of a generalized `@directive(...@)' form and
280 start...
281 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
282 directive args (using the new obstack_for_string), to decode the
283 contained @ diagraphs, and to perform the directive. It recognizes
284 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
285 @output(...@).
286 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
287 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
288 `@,'.
289 (scan_skel): Initialize obstack_for_string on the first call.
290 (skel_scanner_free): New function to free obstack_for_string.
291 * tests/input.at (Reject bad %code qualifiers): Update test output.
292
8e0a5e9e
JD
2932007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
294
295 Consolidate the 4 prologue alternative directives (%code, %requires,
296 %provides, and %code-top) into a single %code directive with an
297 optional qualifier field. Discussed at
298 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
299 * NEWS (2.3a+): Rewrite the existing entry for the prologue
300 alternatives.
301 * doc/bison.texinfo (Prologue Alternatives): Update.
302 (Decl Summary): Update to %code "requires" and %code "provides".
303 (Calc++ Parser): Update to %code "requires".
304 (Bison Symbols): Remove entries for %requires, %provides, and
305 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
306 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
307 are replaced by b4_percent_code_provides and b4_percent_code_requires,
308 which are skeleton-specific.
309 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
310 declare what %code qualifiers it supports and to complain if any other
311 qualifiers were used in the grammar.
312 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
313 and b4_user_code([b4_percent_code_provides]) in place of
314 b4_user_requires and b4_user_provides.
315 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
316 Add b4_user_code([b4_percent_code_top]) and
317 b4_user_code([b4_percent_code]).
318 Invoke b4_check_percent_code_qualifiers.
319 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
320 PERCENT_REQUIRES): Remove.
321 (grammar_declaration): Remove RHS's for %code-top, %provides, and
322 %requires. Rewrite the %code RHS as the unqualified form defining the
323 muscle b4_percent_code. Add another RHS for the qualified %code form,
324 which defines muscles of the form b4_percent_code_QUALIFIER and the
325 b4_used_percent_code_qualifiers muscle.
326 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
327 PERCENT_REQUIRES): Remove.
328 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
329 %code "requires" and %code "provides".
330 * tests/input.at (Reject bad %code qualifiers): New.
331
95021767
JD
3322007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
333
334 Use the new code_props interface for destructors and printers.
335 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
336 printer_location members, and change the type of the destructor and
337 printer members to code_props.
338 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
339 symbol_printer_get, semantic_type_destructor_set,
340 semantic_type_printer_set, default_tagged_destructor_set,
341 default_tagless_destructor_set, default_tagged_printer_set,
342 default_tagless_printer_set): Use code_props in arguments and return
343 types in place of char const * and location.
344 (symbol_destructor_location_get, symbol_printer_location_get): Remove
345 since the locations are now contained in the return of
346 symbol_destructor_get and symbol_printer_get.
347 * src/output.c (symbol_destructors_output, symbol_printers_output):
348 Replace with...
349 (symbol_code_props_output): ... this to eliminate duplicate code.
350 (output_skeleton): Update to use symbol_code_props_output.
351 * src/reader.c (symbol_should_be_used): Update use of
352 symbol_destructor_get.
353 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
354 Update uses of the various _destructor_set and _printer_set functions.
355 * src/symtab.c: (default_tagged_destructor_location,
356 default_tagless_destructor_location, default_tagged_printer_location,
357 default_tagless_printer_location): Remove since we...
358 (default_tagged_destructor, default_tagless_destructor,
359 default_tagged_printer, default_tagless_printer): ... change the type
360 of these to code_props.
361 (symbol_new, semantic_type_new, symbol_destructor_set,
362 semantic_type_destructor_set, symbol_destructor_get,
363 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
364 symbol_check_alias_consistency, default_tagged_destructor_set,
365 default_tagless_destructor_set, default_tagged_printer_set,
366 default_tagless_printer_set): Update.
367 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
368 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
369 code_props members.
370 (symbol_print): Use SYMBOL_CODE_PRINT.
371
f6857bbf
JD
3722007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
373
374 Use the new code_props interface for rule actions.
375 * src/symlist.h (symbol_list): Replace action, action_location, and
376 used members with a code_props action_props member.
377 * src/reader.c (symbol_should_be_used, grammar_rule_check,
378 grammar_midrule_action, grammar_current_rule_merge_set,
379 grammar_current_rule_symbol_append, packgram): Update.
380 * src/scan-code.h (translate_rule_action): Remove, no longer used.
381 * src/scan-code.l (handle_action_dollar): Update.
382 (translate_rule_action): Remove, no longer used.
383 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
384
7c0c6181
JD
3852007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
386
387 Use the new code_props interface in parse-gram.y.
388 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
389 Update all uses of translate_* functions to use the new code_props
390 interface and to use gram_scanner_last_string_free and
391 code_scanner_last_string_free where possible.
392 (grammar_declaration): symbol_list_destructor_set and
393 symbol_list_printer_set now perform the translation, so don't do it
394 here. Use gram_scanner_last_string_free where possible.
395 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
396 translate_code): Remove, no longer used.
397 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
398 symbol_list_printer_set): Perform code translation here rather than
399 depending on the caller to do so.
400
401 * src/symlist.h (struct symbol_list): Correct some documentation typos.
402 * src/scan-gram.h (gram_last_string): Remove declaration.
403 * src/scan-gram.l (last_string): Declare it static.
404
28e52c0d
JD
4052007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
406
407 Encapsulate code properties and related functionality for the various
408 destructors, printers, and actions into a code_props structure and
409 interface. This patch merely implements code_props in scan-code.h and
410 scan-code.l. Future patches will rewrite other modules to use it.
411 Discussed starting at
412 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
413 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
414 consistently initialize const structs that have an empty location
415 field.
416 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
417 to ensure consistency.
418 * src/scan-code.h (code_props): New structure.
419 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
420 function, macro, and const global variable for initializing a
421 code_props with no code.
422 (code_props_plain_init, code_props_symbol_action_init,
423 code_props_rule_action_init, code_props_translate_code): The rest of
424 the new code_props functional interface. Among other things, the init
425 functions set the code_props kind field so that
426 code_props_translate_code will know whether to behave like
427 translate_symbol_action, translate_rule_action, or translate_code.
428 These old translate functions must remain until all other modules are
429 updated to use the new code_props interface.
430 (code_scanner_last_string_free): New function similar to
431 gram_scanner_last_string_free.
432 (code_scanner_free): Add documentation.
433 * src/scan-code.l: Implement the new interface.
434 (code_lex): Make it static, add a code_props* argument, and remove the
435 rule argument.
436 (last_string): New static global similar to the one in scan-gram.l.
437 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
438 instead of rule.
439 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
440 code_props since Bison may one day use this information for destructors
441 and printers.
442 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
443 (handle_action_dollar): Use symbol_list_n_get and set used flag
444 directly since symbol_list_n_used_set is removed.
445 (translate_action): Add a code_props* argument and remove the rule,
446 action, and location arguments. Pass the code_props* on to code_lex.
447 (translate_rule_action, translate_symbol_action, translate_code):
448 Rewrite as wrappers around the new code_props interface.
449 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
450 it would eventually need to break the encapsulation of code_props.
451
96034983
JD
4522007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
453
454 * etc/.cvsignore: New.
455
945e396c
JD
4562007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
457
458 Add maintainer-push-check to run maintainer-check using push parsing in
459 place of pull parsing where available.
460 * Makefile.am (maintainer-push-check): New.
461 * data/bison.m4 (b4_use_push_for_pull_if): New.
462 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
463 appropriately based on their existing values.
464 (yypush_parse): Don't print push-parser-specific diagnostics if push
465 parsing is being used in place of pull parsing.
466 * data/yacc.c: If push parsing should replace pull parsing, redirect to
467 push.c.
468 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
469 variable, and insert b4_use_push_for_pull_flag into muscles.
470 * tests/Makefile.am (maintainer-push-check): New.
471
7d596384
JD
4722006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
473
474 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
475 (whether successful or failed) so that yypush_parse can be invoked
476 again to start a new parse using the same yypstate.
477 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
478 check multiple yypull_parse invocations on the same yypstate. For pull
479 mode, extend to check multiple yyparse invocations.
480 (Exploding the Stack Size with Alloca): Extend to try with
481 %push-pull-parser.
482 (Exploding the Stack Size with Malloc): Likewise.
483
484 * tests/calc.at (Simple LALR Calculator): Don't specify
485 %skeleton "push.c" since %push-pull-parser implies that now.
486 * tests/headers.at (export YYLTYPE): Don't check for the push
487 declarations. Otherwise, this test case can't be used to see if push
488 mode can truly emulate pull mode.
489 * tests/input.at (Torturing the Scanner): Likewise.
490 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
491 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
492 AT_YACC_IF, which now includes the case of push mode since %skeleton
493 need not be used for push mode. This will be more intuitive once
494 push.c is renamed to yacc.c.
495
7172e23e
JD
4962006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
497
498 For push mode, convert yyparse from a macro to a function, invoke yylex
499 instead of passing a yylexp argument to yypull_parse, and don't
500 generate yypull_parse or yyparse unless %push-pull-parser is declared.
501 Discussed starting at
502 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
503 * data/bison.m4 (b4_pull_if): New.
504 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
505 * data/push.c: Improve M4 quoting a little.
506 (b4_generate_macro_args, b4_parenthesize): Remove.
507 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
508 any time a pull parser is requested.
509 Don't #define this as a wrapper around yypull_parse. Instead, when
510 both push and pull are requested, make it a function that does that
511 same thing.
512 (yypull_parse): If there's a b4_prefix, #define this to
513 b4_prefix[pull_parse] when both push and pull are requested.
514 Don't define this as a function unless both push and pull are
515 requested.
516 Remove the yylexp argument and hard-code yylex invocation instead.
517 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
518 %push-parser.
519 * src/getargs.c (pull_parser): New global initialized to true.
520 * getargs.h (pull_parser): extern it.
521 * src/output.c (prepare): Insert pull_flag muscle.
522 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
523 (prologue_declaration): Set both push_parser and pull_parser = true for
524 %push-pull-parser. Set push_parser = true and pull_parser = false for
525 %push-parser.
526 * src/scan-gram.l: Don't accept %push_parser as an alternative to
527 %push-parser since there's no backward-compatibility concern here.
528 Scan %push-pull-parser.
529 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
530 instead of %push-parser.
531 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
532 prototype it in the module that calls yyparse.
533 * tests/input.at (Torturing the Scanner): Likewise.
534 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
535
2e7944cb
JD
5362006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
537
538 Update etc/bench.pl. Optimize push mode a little (the yyn change
539 deserves most of the credit).
540 * Makefile.am (SUBDIRS): Add etc subdirectory.
541 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
542 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
543 yytoken, yyval, and yyloc declarations to...
544 (yyparse or yypush_parse): ... here to improve performance. For
545 yypush_parse invocations after the first, be sure to assign yyn its old
546 value again.
547 (yypstate_new): Don't bother initializing the yyresult field since the
548 initial value isn't used.
549 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
550 remove the #define that, in push mode, set it to yyps->NAME.
551 * etc/Makefile.am: New.
552 * etc/bench.pl: Remove and build it instead from...
553 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
554 "tests/bison" from the build directory by default rather than just
555 invoking "bison" from $PATH.
556 (calc_grammar): Update push parser code: don't declare yylval globally,
557 don't define yyparse_wrapper, and don't #define yyparse.
558 (bench_grammar): Update to check all working combinations of yacc.c,
559 push.c, impure, pure, pull, and push.
560
c3d50342
JD
5612006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
562
563 For push mode, add pull wrappers around yypush_parse.
564 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
565 (yypull_parse): New function wrapping yypush_parse.
566 (yyparse): New #define wrapping yypull_parse.
567 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
568 is declared.
569 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
570 prototype yylex in the module that calls yyparse, and don't prototype
571 yyparse there. Otherwise, the yyparse expansion won't compile.
572 * tests/input.at (Torturing the Scanner): Likewise.
573
94ebeba5
JD
5742006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
575
576 Enable push parsers to operate in impure mode. Thus, %push-parser no
577 longer implies %pure-parser. The point of this change is to move
578 towards being able to test the push parser code by running the entire
579 test suite as if %push-parser had been declared.
580 * data/push.c (yypush_parse): For impure mode, remove the
581 yypushed_char, yypushed_val, and yypushed_loc arguments.
582 Instead, declare these as local variables initialized to the global
583 yychar, yylval, and yylloc.
584 For the first yypush_parse invocation only, restore the initial values
585 of these global variables when it's time to read a token since they
586 have been overwritten.
587 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
588 %push-parser.
589 * tests/calc.at (Simple LALR(1) Calculator): Always declare
590 %pure-parser along with %push-parser since this test case was designed
591 for pure push parsers.
592 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
593 (AT_YACC_OR_PUSH_IF): New.
594 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
595 add a note that it's still wrong for some cases (as it has been for a
596 while).
597 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
598 %push-parser no longer implies %pure-parser.
599
a0633178
JD
6002006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
601
602 Remove some unnecessary differences between the pull parser code and
603 the push parser code. This patch enables yynerrs in push mode.
604 * data/push.c: Reformat M4 a little.
605 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
606 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
607 because push mode is on. Instead, if pure mode is on, move yynerrs
608 to...
609 (b4_declare_parser_state_variables): ... here.
610 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
611 to yyps->NAME so it can be used in yypush_parse.
612 (yypush_parse): Don't omit uses of yynerrs in push mode.
613
8646b6a3
JD
6142006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
615
616 Fix bug such that the first pushed token's value and location are
617 sometimes overwritten (sometimes by %initial-action) before being used.
618 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
619 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
620 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
621 more closely mimic the pull parser logic.
622 Don't copy the pushed token to yychar, yylval, and yylloc until it's
623 time to read a token, which is after any initialization of yylval and
624 yylloc.
625 (gottoken): Rename label to...
626 (yyread_pushed_token): ... for clarity and to avoid infringing on the
627 user namespace.
628
9baf4d74
JD
6292006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
630
631 Rearrange initialization of the parser state variables so that the
632 skeleton doesn't have to have a copy for pull mode and another for push
633 mode. This patch also fixes at least a bug such that yylloc was not
634 initialized (with b4_location_initial_line and
635 b4_location_initial_column) upon calling yypush_parse. However, that
636 initialization now overwrites the first token's location;
637 %initial-action assigning @$ already did the same thing, and both bugs
638 will be fixed in a later patch.
639 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
640 (b4_declare_parser_state_variables): Remove initialization of yytoken,
641 yyss, yyvs, yyls, and yystacksize.
642 (yypstate_new): Remove initialization of some yypstate fields: yystate,
643 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
644 yylsp.
645 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
646 yyps->NAME so it can be used in yypush_parse.
647 (yyparse or yypush_parse): For yypush_parse, don't print the
648 "Starting parse" diagnostic for invocations after the first.
649 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
650 yypush_parse, only do it for the first invocation.
651 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
652 initialization to occur in yypush_parse but only on the first
653 invocation.
654
23522164
JD
6552006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
656
657 * data/push.c: Add CPP guards around push parser declarations in both
658 the header and the code file.
659 In the code file, move the push parser declarations to the same place
660 they appear in the header file.
661 Clean up the M4 some, especially the inconsistent underquoting in
662 some b4_c_function_def and b4_c_function_decl uses.
663
bb010fe5
JD
6642006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
665
666 Encapsulate the push parser state variables into an M4 macro so the
667 push skeleton doesn't have to list them again for pull mode's yyparse.
668 For push mode, remove yypush_parse's local equivalents of these
669 variables to eliminate unnecessary copying between the two sets at
670 run-time. This patch also fixes at least a bug related to multiple
671 %initial-action invocations in push mode.
672 * data/push.c (b4_declare_parser_variables): Rename to...
673 (b4_declare_scanner_communication_variables): ... this for clarity and
674 update both uses.
675 (b4_declare_yyparse_variables): Remove and move its contents to the one
676 spot where it was invoked.
677 (b4_declare_parser_state_variables): New macro containing the parser
678 state variables required by push mode.
679 (struct yypstate): Replace all fields but yynew with
680 b4_declare_parser_state_variables.
681 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
682 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
683 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
684 (yyparse or yypush_parse): For yyparse in pull mode, replace local
685 parser state variable declarations with
686 b4_declare_parser_state_variables.
687 Don't initialize parser state variables when calling yypush_parse since
688 yypstate_new already does that.
689 Invoke the user's initial action only upon the first yypush_parse
690 invocation.
691 Remove all code that copies between the local parser state variables
692 and the yypstate.
693
2d212f8c
JD
6942006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
695
696 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
697 prevent a name collision in a future patch where these names will
698 sometimes be #define'd.
699 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
700 since it no longer has the same name as the existing argument.
701 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
702
e6e704dc
JD
7032006-12-19 Paolo Bonzini <bonzini@gnu.org>
704 and Joel E. Denny <jdenny@ces.clemson.edu>
705
706 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
707 that the argument is case-insensitive, and there's no `=' here.
708 For the %skeleton entry, mention that %language is better.
709 (Bison Options): Likewise for --language and --skeleton. Move the
710 --skeleton entry so that the `Tuning the parser' section is sorted
711 alphabetically on long options.
712 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
713 %language directive in detail here; cross-reference the %language
714 documentation instead.
715 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
716 `%require "2.3b"' so that the example is always up-to-date.
717 (Bison Symbols): Add entries for %language and %skeleton.
718 * examples/extexi (normalize): Instead of replacing every %require
719 argument with the current Bison version, just substitute for
720 `@value{VERSION}'. This guarantees that we're testing what actually
721 appears in the documentation.
722 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
723 rather than `@VERSION@'.
724
0e021770
PE
7252006-12-18 Paul Eggert <eggert@cs.ucla.edu>
726
fd575f05
PE
727 * NEWS: Reword the %language news a bit, and put it earlier.
728
0e021770
PE
729 * src/getargs.c (skeleton_arg): Last arg is now location const *.
730 Rewrite to simplify the logic.
731 (language_argmatch): Likewise.
fd575f05
PE
732 (program_name): We now own this var.
733 * src/getargs.h (struct bison_language): Use char[] rather than
734 const char *.
0e021770
PE
735
736 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
737 Java is supported.
738 * src/complain.c (program_name): Remove decl; no longer needed.
739 * src/main.c (program_name): Remove; now belongs to getargs.
740
7412006-12-18 Paolo Bonzini <bonzini@gnu.org>
742
743 * NEWS: Document %language.
744
745 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
746
747 * data/c-skel.m4, data/c++-skel.m4: New files.
748 * data/glr.c: Complain on push parsers.
749
750 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
751 over %skeleton.
752 (Directives): Document %language and %skeleton.
753 (Command line): Document -L.
754
755 * examples/extexi: Rewrite %require directive.
756 * examples/calc++/Makefile.am: Pass VERSION to extexi.
757
758 * src/files.c (compute_exts_from_gc): Look in language structure
759 for .y extension.
760 (compute_file_name_parts): Check whether .tab should be added.
761 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
762 (language, skeleton_arg, language_argmatch): New.
763 (long_options): Add --language.
764 (getargs): Use skeleton_arg, add -L/--language.
765 * src/getargs.h: Include location.h.
766 (struct bison_language, language, skeleton_arg, language_argmatch): New.
767 * src/output.c (prepare): Pick default skeleton from struct language.
768 Don't dispatch C skeletons here.
769 * src/parse-gram.y (PERCENT_LANGUAGE): New.
770 (prologue_declaration): Add "%language" rule, use skeleton_arg.
771 * src/scan-gram.l ("%language"): New rule.
772
773 * tests/calc.at: Test %skeleton and %language.
774 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
775 (AT_GLR_IF): Look for %skeleton "glr.cc".
776 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
777 (AT_YACC_IF): Reject %language.
778
5691bf57
PE
7792006-12-18 Paul Eggert <eggert@cs.ucla.edu>
780
db06f0ce
PE
781 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
782 since it wasn't used; only the typedef name 'semantic_type' is needed.
783 Also, omit trailing white space.
784
5691bf57
PE
785 * bootstrap: Sync from coreutils.
786 (gnulib_extra_files): Add build-aux/announce.gen.
787 (slurp): Adjust .gitignore files like .cvsignore files.
788 * build-aux/announce-gen: Remove from CVS, since bootstrap
789 now creates this.
790
791934e4
JD
7912006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
792
793 Make %push-parser imply %pure-parser. This fixes several bugs; see
794 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
795 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
796 pure_parser = true.
797 * data/push.c: Don't bother testing b4_push_if when deciding whether
798 to expand b4_declare_parser_variables globally.
799 (yypush_parse): Likewise in here.
800
801 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
802 (yy_reduce_print): Reformat M4 for readability.
803
ee5abb37
JD
8042006-12-15 Bob Rossi <bob@brasko.net>
805 and Joel Denny <jdenny@ces.clemson.edu>
806
807 * data/push.c (yypstate): Add typedef, and update all uses of
808 struct yypstate to just yypstate.
809 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
810
16ca01f9
JD
8112006-12-14 Bob Rossi <bob@brasko.net>
812
813 * data/push.c (yypush_parse): Declare prototype regardless of
814 %locations option.
815
ab8e7e1a
JD
8162006-12-14 Bob Rossi <bob@brasko.net>
817
818 * data/push.c (yyparse): Remove the prototype and the #define when in
819 push-parser mode.
820
9bf32be3
JD
8212006-12-13 Bob Rossi <bob@brasko.net>
822
823 * data/push.c (yypstate_init): Rename to...
824 (yypstate_new): ... this and use b4_c_function_def.
825 (yypstate_delete): New.
826 (yypush_parse): Change parameters yynval and yynlloc to be const.
827 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
828 yypstate_delete functions.
829
f02e2948
JD
8302006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
831
832 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
833 strange test case titles. Reported by Bob Rossi.
834
38eb7751
PE
8352006-12-13 Paul Eggert <eggert@cs.ucla.edu>
836
837 * TODO: Add pointer to Sylvain Schmitz's work on static detection
838 of potential ambiguities in GLR grammers.
839
bd9d212b
JD
8402006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
841
842 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
843 `bison ', use m4_index instead of m4_substr since chopping up a string
844 containing M4-special characters causes problems here.
845
846 Fix a couple of bugs related to special characters in user-specified
847 file names, and make it easier for skeletons to compute output file
848 names with the same file name prefix as Bison-computed output file
849 names.
850 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
851 b4_parser_file_name and b4_spec_defines_file instead of
852 @output_parser_name@ and @output_header_name@, which are now redundant.
853 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
854 b4_parser_file_name, b4_spec_defines_file, and the new
855 @basename(FILENAME@) instead of @output_parser_name@ and
856 @output_header_name@, which inappropriately escaped the file names as
857 C string literals.
858 * src/files.c (all_but_ext): Remove static qualifier.
859 (compute_output_file_names): Move `free (all_but_ext)' to...
860 (output_file_names_free): ... here since all_but_ext is needed later.
861 * src/files.h (all_but_ext): Extern.
862 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
863 exactly what MUSCLE_INSERT_STRING used to do.
864 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
865 characters are escaped properly.
866 * src/output.c (prepare): Define muscle file_name_all_but_ext as
867 all_but_ext.
868 For pkgdatadir muscle, maintain previous functionality by using
869 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
870 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
871 digraphs would never be expanded. Hopefully no one has M4-special
872 characters in his Bison installation path.
873 * src/scan-skel.l: Don't parse @output_header_name@ and
874 @output_parser_name@ anymore since they're now redundant.
875 In @output, use decode_at_digraphs.
876 Parse a new @basename command that invokes last_component.
877 (decode_at_digraphs): New.
878 (BASE_QPUTS): Remove unused.
879 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
880 (Output file name): New tests.
881
3f7ca628
JD
8822006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
883
884 Warn about output files that are generated by the skeletons and that
885 conflict with other output files.
886 * data/glr.c: Don't generate the header file here when glr.cc does.
887 * src/files.c (file_names, file_names_count): New static globals.
888 (compute_output_file_names): Invoke output_file_name_check for files
889 not generated by the skeletons and remove existing checks.
890 (output_file_name_check): New function that warns about conflicting
891 output file names.
892 (output_file_names_free): Free file_names.
893 * src/files.h (output_file_name_check): Declare.
894 * src/scan-skel.l: Invoke output_file_name_check for files generated by
895 the skeletons.
896 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
897 (Conflicting output files): New tests.
898
178e123e
PE
8992006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
900
901 * doc/bison.texinfo: Fix a couple of typos.
902
9032006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
904
905 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
906 Rename to...
907 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
908 update all uses.
909 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
910 (yypush_parse): Rename yypvars argument to yyps and remove redundant
911 local pv.
912 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
913 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
914
ea17f233
JD
9152006-12-07 Bob Rossi <bob@brasko.net>
916 and Joel Denny <jdenny@ces.clemson.edu>
917
918 * data/push.c (yypvarsinit): Change return type from void* to struct
919 yypvars*. No longer cast to void* on return.
920 (struct yypvars): Remove yylen since it need not be remembered between
921 yypushparse invocations.
922 (yypushparse): Don't copy between yylen and pv->yylen.
923
55a30bda
JD
9242006-12-05 Bob Rossi <bob@brasko.net>
925
926 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
927 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
928 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
929 (struct yypvars): Remove b4_declare_parser_variables.
930 (yypvarsinit): Remove init code for removed variables.
931 (global scope): Do not declare b4_declare_parser_variables if
932 push or pure mode.
933 (yypushparse): Add b4_declare_parser_variables.
934 Init new local variables, and remove init code for removed
935 yypvars variables.
936 (yyparse): Delete.
937 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
938 and yyparse for other modes.
939 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
940 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
941 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
942 (AT_PURE_LEX_IF): True if pure or push parser.
943
85894313
JD
9442006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
945
946 Document Yacc prologue alternatives and default %destructor's and
947 %printer's as experimental. Don't mention Java yet. Discussed at
948 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
949 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
950 (2.3a): Annotate this entry to say the old forms of these features were
951 also experimental.
952 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
953 Bison Symbols): Say they're experimental. Comment out any mention
954 of Java (we'll want this back eventually).
955
02975b9a
JD
9562006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
957
958 Support a file name argument to %defines. Deprecate `=' in
959 %file-prefix, %name-prefix, and %output. Discussed at
960 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
961 * NEWS (2.3a+): Mention.
962 * doc/bison.texinfo (Decl Summary, Bison Symbols): Add entry for new
963 form of %defines, and remove `=' from entries for %file-prefix,
964 %name-prefix, and %output.
965 * src/parse-gram.y (prologue_declaration): Implement.
966 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
967 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
968 all but one occurrence of %name-prefix.
969 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
970 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
971 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
972 occurrence of each of %file-prefix and %output. Add check for %defines
973 with argument.
974 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
975 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
976 Remove the `=' from %output.
977
287b314e
JD
9782006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
979
980 Don't escape $ in test case titles since Autoconf 2.61 now does that
981 correctly.
982 * tests/actions.at (Default %printer and %destructor are not for error
983 or $undefined): Here.
984 (Default %printer and %destructor are not for $accept): Here.
985 * tests/input.at (Invalid $n and @n): Here.
986
3ebecc24
JD
9872006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
988
989 Rename <!> to <>. Discussed starting at
990 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
991 * NEWS (2.3a+): Update.
992 * doc/bison.texinfo (Freeing Discarded Symbols, Bison Symbols):
993 Update.
994 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
995 * src/scan-gram.l (INITIAL): Implement.
996 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
997 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
998 comment.
999 * tests/actions.at (Default tagless %printer and %destructor,
1000 Default tagged and per-type %printer and %destructor,
1001 Default %printer and %destructor are not for error or $undefined,
1002 Default %printer and %destructor are not for $accept,
1003 Default %printer and %destructor for mid-rule values): Update.
1004 * tests/input.at (Default %printer and %destructor redeclared,
1005 Unused values with default %destructor): Update.
1006
26b8a438
JD
10072006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1008
1009 Don't let %prec take a nonterminal.
1010 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
1011 token.
1012 * tests/input.at (%prec takes a token): New test checking that %prec
1013 won't take a nonterminal.
1014
07c39ae9
JD
10152006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
1016
405d53b7
JD
1017 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
1018 it was double-quoted.
07c39ae9
JD
1019 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
1020 grammar is maintained with Bison's highest standards.
1021 * src/getargs.c: Fix some typos in Doxygen comments.
1022
580b8926
JD
10232006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
1024
1025 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
1026 later. Reported by Paul Eggert in
1027 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
1028 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
1029 * src/scan-code.l (translate_action): Don't bother invoking
1030 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
1031 (code_scanner_free): Instead of invoking
1032 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
1033 which frees more.
1034 * src/scan-gram.l (gram_scanner_free): Likewise.
1035 * src/scan-skel.l (scan_skel): Likewise.
1036
4502eadc
JD
10372006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
1038
1039 * src/files.c (tr): Change return type to void.
1040 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
1041 has been called previously for the same key.
1042 (muscle_find): Return storage instead of value so that
1043 --enable-gcc-warnings doesn't produce warnings that the return discards
1044 const. aver that the value and storage are the same since storage
1045 could potentially be NULL when value is not.
1046 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
1047 same as 0.
1048
7746c8f6
PE
10492006-11-08 Paul Eggert <eggert@cs.ucla.edu>
1050
1051 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
1052 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
1053 us a slightly cleaner distribution, and also works.
1054 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
1055 gnulib changes.
1056
eb095650
PE
10572006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
1058 and Paul Eggert <eggert@cs.ucla.edu>
1059
1060 Don't let Bison leak memory except when it complains.
1061 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
1062 (spec_defines_file, dir_prefix): Now char *, not const char *,
1063 since they are freed.
1064 * src/files.c: Likewise.
1065 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
1066 Likewise.
1067 (tr): Now operates in-place. All uses changed.
1068 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
1069 values.
1070 (compute_file_name_parts, compute_output_file_names): Don't store
1071 read-only data in variables that will be freed.
1072 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
1073 src_extension, and header_extension.
1074 (output_file_names_free): New public function to free
1075 spec_verbose_file, spec_graph_file, spec_defines_file,
1076 parser_file_name, and dir_prefix.
1077 * src/getargs.c (getargs): Don't store read-only data in variables that
1078 will be freed.
1079 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
1080 (which previously existed but was unused), and quotearg_free.
1081 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
1082 * src/muscle_tab.c: Likewise.
1083 (muscle_entry): Make the value char const *,
1084 and add a new storage member that is char * and can be freed.
1085 (muscle_entry_free): New private function.
1086 (muscle_init): Use it instead of free.
1087 (muscle_insert, muscle_grow): Update and use new storage member.
1088 (muscle_code_grow): Free the string passed to muscle_grow
1089 since it's not needed anymore.
1090 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
1091 add a new `char *code' member.
1092 ("{...}"): Declare semantic type as code.
1093 * src/scan-code.h (translate_rule_action):
1094 (translate_symbol_action, translate_code, translate_action): Return
1095 `char const *' rather than `char *' since external code should not free
1096 these strings.
1097 * src/scan-code.l: Likewise.
1098 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
1099 which is "{...}" in the parser.
1100 * tests/Makefile.am (maintainer-check-valgrind): Set
1101 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
1102 Valgrind.
1103 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
1104 complain.
1105 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
1106 expecting a non-zero exit status sets --leak-check=summary and
1107 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
1108 this case, and we don't want to hear about it.
1109
ac564be4
PE
11102006-11-08 Paul Eggert <eggert@cs.ucla.edu>
1111
1112 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
1113 instead of from the template, to simplify configuration a bit.
1114 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
1115 and m4/wint_t.m4, as they are needed with the latest gnulib.
1116
17bd8a73
JD
11172006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
1118
1119 Disable unset/unused mid-rule value warnings by default, and recognize
1120 --warnings=midrule-values to enable them. Discussed starting at
1121 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
1122 * NEWS (2.3a+): Mention.
1123 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
1124 warnings): Add entry for midrule-values subargument.
1125 * src/reader.c (symbol_should_be_used): Don't return true just because
1126 the value is a set/used mid-rule value unless
1127 --warnings=midrule-values was specified.
1128 * tests/input.at (Unused values, Unused values before symbol
1129 declarations): Run tests with and without --warnings=midrule-values.
1130
1131 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
1132 than LIST_FREE directly.
1133
89eb3c76
JD
11342006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
1135
1136 Finish implementing --warnings=error, which should not be implied by
1137 --warnings=all (or by its synonyms -W and --warnings without
1138 subarguments).
1139 * src/complain.c (set_warning_issued): New function to report that
1140 warnings are being treated as errors and to record an error if so.
1141 Invoke...
1142 (warn_at, warn): ... here.
1143 * src/getargs.c (warnings_args, warnings_types): Reorder so that
1144 "error - warnings are errors" does not appear above "all - all of the
1145 above".
1146 (getargs): For -W and --warnings without subarguments, don't let
1147 FLAGS_ARGMATCH set warnings_error in warnings_flag.
1148 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
1149
ba7560e2
JD
11502006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
1151
1152 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
1153 empty subargument list. For example: `bison --warnings= parser.y'.
1154
31283fc3
JD
11552006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
1156
1157 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
1158 the parser header file so that gcc doesn't warn.
1159
12e35840
JD
11602006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
1161
1162 Split the default %destructor/%printer into two kinds: <*> and <!>.
1163 Discussed starting at
1164 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
1165 * NEWS (2.3a+): Mention.
1166 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
1167 previous change today related to mid-rules.
1168 (Bison Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 1169 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
1170 (TYPE_TAG_ANY): Add as <*>.
1171 (TYPE_TAG_NONE): Add as <!>.
1172 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
1173 for <*> and <!>.
1174 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
1175 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
1176 * src/symlist.c (symbol_list_default_new): Split into tagged and
1177 tagless versions.
1178 (symbol_list_destructor_set, symbol_list_printer_set): Split
1179 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
1180 SYMLIST_DEFAULT_TAGLESS.
1181 * src/symlist.h: Update symbol_list_default*_new prototypes.
1182 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
1183 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
1184 * src/symtab.c (default_destructor, default_destructor_location,
1185 default_printer, default_printer_location): Split each into tagged and
1186 tagless versions.
1187 (symbol_destructor_get, symbol_destructor_location_get,
1188 symbol_printer_get, symbol_printer_location_get): Implement tagged
1189 default and tagless default cases.
1190 (default_destructor_set, default_printer_set): Split each into tagged
1191 and tagless versions.
1192 * src/symtab.h: Update prototypes.
1193 * tests/actions.at (Default %printer and %destructor): Rename to...
1194 (Default tagless %printer and %destructor): ... this, and extend.
1195 (Per-type %printer and %destructor): Rename to...
1196 (Default tagged and per-type %printer and %destructor): ... this, and
1197 extend.
1198 (Default %printer and %destructor for user-defined end token): Extend.
1199 (Default %printer and %destructor are not for error or $undefined):
1200 Update.
1201 (Default %printer and %destructor are not for $accept): Update.
1202 (Default %printer and %destructor for mid-rule values): Extend.
1203 * tests/input.at (Default %printer and %destructor redeclared): Extend.
1204 (Unused values with default %destructor): Extend.
1205
f91b1629
JD
12062006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
1207
1208 Don't apply the default %destructor/%printer to an unreferenced midrule
1209 value. Mentioned at
1210 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
1211 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
1212 like $@n instead of just @n so that the default %destructor/%printer
1213 logic doesn't see them as user-defined symbols.
1214 (symbol_is_dummy): Check for both forms of the name.
1215 * src/reader.c (packgram): Remove the `$' from each midrule symbol
1216 name for which the midrule value is referenced in any action.
1217 * tests/actions.at (Default %printer and %destructor for mid-rule
1218 values): New test.
1219 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
1220 for change to dummy symbol names.
1221
519d0004
JD
12222006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
1223
1224 Warn about unset midrule $$ if the corresponding $n is used.
1225 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
1226 $n usage.
1227 (packgram): Before invoking grammar_rule_check on any rule, make sure
1228 all actions have already been scanned in order to set `used' flags.
1229 Otherwise, checking that a midrule's $$ is set will not always work
1230 properly because the midrule check must forward-reference the midrule's
1231 parent rule.
1232 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
1233 warning.
1234
a501eca9
JD
12352006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
1236
1237 More improvements to the documentation of the prologue alternatives:
1238 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
1239 Bison manual.
1240 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
1241 some text to clarify the relative importance of the new directives and
1242 to show how these directives may be viewed as code labels.
1243
2cbe6b7f
JD
12442006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
1245
1246 Similar to the recently removed %before-header, add %code-top as the
1247 alternative to the pre-prologue. Mentioned at
1248 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
1249 Also, let the prologue alternatives appear in the grammar section.
1250 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
1251 (prologue_declaration): Move the existing prologue alternatives to...
1252 (grammar_declaration): ... here and add %code-top.
1253 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
1254
1255 Clean up and extend documentation for the prologue alternatives.
1256 * NEWS (2.3a+): Describe prologue alternatives.
1257 * doc/bison.texinfo (Prologue): Move discussion of prologue
1258 alternatives to...
1259 (Prologue Alternatives): ... this new section, and extend it to discuss
1260 all 4 directives in detail.
1261 (Bison Symbols): Clean up discussion of prologue alternatives and add
1262 %code-top.
1263
e557d3ea
JMG
12642006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1265
1266 DJGPP specific issues.
1267
1268 * djgpp/config.bat: config.hin has been moved to lib. Adjust
1269 config.bat accordingly.
1270 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
1271 * djgpp/config.site: Likewise.
1272
136a0f76
PB
12732006-10-16 Paolo Bonzini <bonzini@gnu.org>
1274
27bd5d67
PB
1275 Replace %*-header with %provides, %requires, %code. See discussion at
1276 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
1277
136a0f76
PB
1278 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
1279 (b4_user_start_header): Remove.
1280 * data/glr.c: Use new macros instead of b4_*start_header
1281 and b4_*end_header.
1282 * data/glr.cc: Likewise.
1283 * data/lalr1.cc: Likewise.
1284 * data/push.c: Likewise.
1285 * data/yacc.c: Likewise.
1286
1287 * doc/bison.texinfo: Remove %before-header, rename
1288 %{start,end,after}-header to %requires, %provides, %code.
1289
1290 * src/parse-gram.y: Likewise (also rename token names accordingly).
1291 * src/scan-gram.l: Likewise.
1292 * tests/actions.at: Likewise.
1293
10f429ef
PE
12942006-10-14 Paul Eggert <eggert@cs.ucla.edu>
1295
1296 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
1297 Problem reported by Joel E. Denny.
1298
12992006-10-14 Jim Meyering <jim@meyering.net>
1300
1301 (Sync from coreutils.)
1302 Work also when the working directory (with e.g. coreutils sources)
1303 is version controlled with git, rather than CVS.
1304 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
1305 rather than CVS.
1306 In messages and comments, say e.g., "checked-out sources",
1307 rather than "CVS sources".
1308 (version_controlled_file): New function. Work for git as well as
1309 for CVS. Don't use grep's -q option.
1310 (slurp): Call it here, in place of CVS-specific code.
1311
c4bd5bf7
JD
13122006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
1313
1314 Fix testsuite for ./configure --enable-gcc-warnings:
1315 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
1316 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
1317 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
1318 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
1319 * test/regression.at (Diagnostic that expects two alternatives):
1320 Likewise.
1321
46356ea4
PE
13222006-10-12 Paul Eggert <eggert@cs.ucla.edu>
1323
231ed89a
PE
1324 * bootstrap.conf (gnulib_modules): Add config-h.
1325 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
1326 worry about HAVE_CONFIG_H.
1327 * lib/abitset.c: Likewise.
1328 * lib/bitset.c: Likewise.
1329 * lib/bitset_stats.c: Likewise.
1330 * lib/bitsetv-print.c: Likewise.
1331 * lib/bitsetv.c: Likewise.
1332 * lib/ebitset.c: Likewise.
1333 * lib/get-errno.c: Likewise.
1334 * lib/lbitset.c: Likewise.
1335 * lib/subpipe.c: Likewise.
1336 * lib/timevar.c: Likewise.
1337 * lib/vbitset.c: Likewise.
1338 * lib/bitset.c: Include "bitset.h" first, to test interface.
1339 * lib/bitset_stats.c: Include "bitset_stats.h" first.
1340 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
1341 * lib/bitsetv.c: Include "bitsetv.h" first.
1342 * lib/get-errno.c: Include "get-errno.h" first.
1343 * m4/.cvsignore: Add config-h.m4.
1344 * tests/actions.at (Default %printer and %destructor for ...):
1345 Adjust expected line numbers in output to reflect removal of #if
1346 HAVE_CONFIG_H lines.
1347 * tests/glr-regression.at (Missed %merge type warnings when ...):
1348 Likewise.
1349 * tests/regression.at (Braced code in declaration in rules section):
1350 Likewise.
1351 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
1352 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
1353 Include <config.h> unconditionally.
1354
46356ea4
PE
1355 * bootstrap: Sync from coreutils, as follows:
1356
1357 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
1358
1359 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
1360 variable was sometimes used without being initialized. This
1361 messed up the installation of the INSTALL file in some cases.
1362
1363 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
1364
1365 * bootstrap (usage, main program, symlink_to_gnulib): Add option
1366 --copy. Inspired by a suggestion from Bruno Haible.
1367
1368 2006-10-03 Jim Meyering <jim@meyering.net>
1369
1370 * bootstrap: Undo last change to this file, since now gnulib-tool
1371 sticks with the automake default in generating dependencies.
1372
dd4bf078
PE
13732006-10-12 Paul Eggert <eggert@cs.ucla.edu>
1374
cf2a5f7c
PE
1375 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
1376 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
1377
1378 * doc/bison.1: Add copyright notice.
1379
1380 * data/glr.c: Don't include <stdarg.h>; not used.
1381
35fe0834
PE
1382 * NEWS: The -g and --graph options now output graphs in Graphviz
1383 DOT format, not VCG format.
1384 * doc/bison.1: Likewise.
1385 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
1386 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
1387 of this change in
1388 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
1389 * TODO: Remove Graphviz entry.
1390 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
1391 remove vcg.c, vcg.h, vcg_defaults.h.
1392 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
1393 * src/graphviz.c, src/graphviz.h: New files.
1394 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
1395 * src/files.h: Make comment more generic.
1396 * src/main.c (main): Likewise.
1397 * src/print_graph.h: Likewise.
1398 * src/getargs.c (usage): Make usage description more generic.
1399 * src/print_graph.c: Include graphviz.h rather than vcg.h.
1400 (static_graph, fgraph): Remove. All uses changed to pass
1401 arguments instead of sharing a static var.
1402 (print_core, print_actions, print_state, print_graph):
1403 Output graphviz format rather than VCG format.
1404 * tests/.cvsignore: Remove *.vcg; add *.dot.
1405 * tests/output.at: Expect *.dot files, not *.vcg files.
1406
dd4bf078
PE
1407 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
1408 accommodates the 2006-10-08 change.
1409
efdd7421
PE
14102006-10-11 Bob Rossi <bob@brasko.net>
1411
1412 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
1413 (b4_yyssa, b4_yyerror_range): New macros.
1414 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
1415 (yypvarsinit): Remove init of removed fields.
1416 (yypushparse): Remove use of removed fields; use new macros instead.
1417
96a1981a
PE
14182006-10-11 Paul Eggert <eggert@cs.ucla.edu>
1419
1420 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
1421 in a push parser. Reindent slightly to match yacc.c better.
1422
14232006-10-11 Bob Rossi <bob@brasko.net>
1424
46356ea4
PE
1425 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
1426 yymsg_alloc fields.
1427 (yypvarsinit, yypushparse): Remove init of removed fields.
1428 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 1429
c1630a8b
PE
14302006-10-09 Paul Eggert <eggert@cs.ucla.edu>
1431
1432 * THANKS: Add Paolo Bonzini and Bob Rossi.
1433
90b9908d
PB
14342006-10-08 Paolo Bonzini <bonzini@gnu.org>
1435
1436 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
1437 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
1438 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
1439 b4_define_user_cde and uses): Remove.
1440 (b4_comment, b4_prefix, b4_sync_start): New.
1441 * data/bison.m4: New file, with most of the content removed from c.m4.
1442 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
1443 * src/output.c (output_skeleton): Pass bison.m4.
1444 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
1445 only if specified.
1446
cf806753
PE
14472006-10-05 Paul Eggert <eggert@cs.ucla.edu>
1448
1449 Fix test failure reported by Tom Lane in
1450 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
1451 and try to make such failures easier to catch in the future.
1452 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
1453 that's now the caller's responsibility.
1454 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
1455 Set yychar = YYEOF if it's negative.
1456 * tests/actions.at (yylex): Abort if asked to read past EOF.
1457 * tests/conflicts.at (yylex): Likewise.
1458 * tests/cxx-type.at (yylex): Likewise.
1459 * tests/glr-regression.at (yylex): Likewise.
1460 * tests/input.at (yylex): Likewise.
1461 * tests/regression.at (yylex): Likewise.
1462 * tests/torture.at (yylex): Likewise.
1463
0e2f006a
PE
14642006-10-01 Paul Eggert <eggert@cs.ucla.edu>
1465
1466 Fix problems with translating English-language diagnostics.
1467 * bootstrap: Fix bug introduced in recent bootstrap changes, with
1468 respect to bison-runtime pot generation. The YY_ stuff
1469 wasn't being captured.
1470 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
1471 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
1472 * runtime-po/POTFILES.in: Add data/push.c.
1473
e3ddc1e3
PE
14742006-09-29 Paul Eggert <eggert@cs.ucla.edu>
1475
1476 Merge bootstrap changes from coreutils.
1477
1478 2006-09-28 Jim Meyering <jim@meyering.net>
1479
1480 Automatically generated dependencies are important even
1481 when all of the sources in a directory come from gnulib.
1482 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
1483 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
1484
1485 2006-09-23 Jim Meyering <jim@meyering.net>
1486
1487 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
1488
1489 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
1490
1491 * bootstrap: Add support for --force.
1492 (usage): New function. Describe usage less tersely.
1493 (CVS_only_file): New var.
1494
01e972b3
PE
14952006-09-21 Paul Eggert <eggert@cs.ucla.edu>
1496
1497 * data/push.c (YYPUSH_MORE): Make it an enum instead.
1498 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
1499 Adjust white space and comments to match GNU style better.
1500
c63d3e90
PE
15012006-09-20 Bob Rossi <bob@brasko.net>
1502
1503 * data/push.c (yyresult_get): Remove function.
1504 (YYPUSH_MORE): Add #define.
1505 (yypushparse): Modify return value.
1506
e70f46d1
PE
15072006-09-20 Paul Eggert <eggert@cs.ucla.edu>
1508
1509 * stamp-h.in: Remove; no longer needed.
1510 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
1511 Remove config.h, config.hin, intl (no longer created).
1512 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
1513 stamp-h1.
1514
1515 Sync bootstrap from coreutils, as follows:
1516
1517 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
1518
1519 * bootstrap (symlink_to_gnulib): New function.
1520 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
1521 to copies-of-gnulib.
1522 (cp_mark_as_generated, slurp, gnulib_files):
1523 Avoid making a copy if it's the same as the old version.
1524 (gnulib_files): Add support for this variable (used by Bison).
1525
a92be413
PE
15262006-09-20 Paul Eggert <eggert@cs.ucla.edu>
1527
1528 * src/getargs.c (usage): Rework to use conventions similar to
1529 coreutils, to make translation a bit easier and the code a bit
1530 smaller. Problem reported by Tim Van Holder.
1531
4f82b42a
PE
15322006-09-15 Paul Eggert <eggert@cs.ucla.edu>
1533
3b2942e6
PE
1534 Use some of gnulib's new modules, taken from coreutils.
1535
1536 * bootstrap: Sync from coreutils, except add support for gnulib_files.
1537 * bootstrap.conf: New file.
1538 (gnulib_modules): Add configmake, inttypes, unistd.
1539 (XGETTEXT_OPTIONS): Add complain, complain_at,
1540 fatal, fatal_at, warn, warn_at, unexpected_end.
1541 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
1542 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
1543 (gl_EARLY): Add.
1544 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
1545 (gl_INIT): Add
1546 (GNULIB_AUTOCONF_SNIPPET): Remove.
1547 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
1548 the pickiest.
1549 * lib/.cvsignore: Add inttypes_.h.
1550 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
1551 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
1552 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
1553 no-longer-necessary initializations.
1554 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
1555 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
1556 use the unistd module.
1557 * src/system.h: Likewise.
1558 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
1559 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
1560 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
1561 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
1562 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
1563 * src/system.h: Include inttypes.h unconditionally, now that we
1564 use the inttypes module. Don't bother to include stdint.h, since
1565 inttypes.h now does that for us.
1566 (LOCALEDIR): Remove, now that we use the configmake module.
1567 * src/getargs.c: Include configmake.h.
1568 * src/main.c: Likewise.
1569 * src/output.c: Likewise.
1570 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
1571 not from $abs_top_builddir, since config.h moved.
1572
1573
4f82b42a
PE
1574 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
1575 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
1576
1577 * src/parse-gram.y (symbol_declaration): Don't put statements
1578 before declarations; it's not portable to C89.
1579 * src/scan-code.l (handle_action_at): Likewise.
1580
1581 * src/scan-code.l: Always initialize braces_level; the old code
1582 left it uninitialized and therefore had undefined behavior.
1583
1584 Don't attempt to redefine 'assert', since it runs afoul of
1585 systems where standard headers (mistakenly) include <assert.h>.
1586 Instead, define and use our own alternative, called 'aver'.
1587 * src/reader.c: Don't include assert.h, since we no longer
1588 use assert.
1589 * src/scan-code.l: Likewise.
1590 * src/system.h (assert): Remove, replacing with....
1591 (aver): New function, taking a bool arg. All uses changed.
1592 * src/tables.c (pack_vector): Ensure that aver arg is bool,
1593 not merely an integer.
1594
31c10e38
PE
15952006-09-15 Bob Rossi <bob@brasko.net>
1596
1597 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
1598 * data/c.m4 (YYPUSH): New.
1599 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
1600 * src/getargs.c (push_parser): New var.
1601 * src/getargs.h (push_parser): New declaration.
1602 * src/output.c (prepare): Add macro insertion of `push_flag'.
1603 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
1604 (prologue_declaration): Parse %push-parser.
1605 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
1606 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
1607 list of removed lines from the traces observed.
1608 (AT_CHECK_CALC_LALR): Added push parser tests.
1609
fa7b79c0
PE
16102006-09-13 Paul Eggert <eggert@cs.ucla.edu>
1611
21fe08ca
PE
1612 * NEWS: Version 2.3a.
1613 * configure.ac (AC_INIT): Likewise.
1614
e8ec4d9b
PE
1615 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
1616 "#define YYSTYPE int" that caused "make maintainer-check" to fail
1617 due to header ordering dependencies. I don't know why the #define
1618 was there.
1619
fa7b79c0
PE
1620 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
1621 runtime cost when YYDEBUG is not defined, and so that some tests
1622 that used to fail now work. Problem and initial suggestion by
1623 Paolo Bonzini.
1624 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
1625 * data/glr.cc (b4_parser_class_name):
1626 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
1627 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
1628 (yydebug_) [YYDEBUG]: New member.
1629 (yycdebug_): Now defined only if YYDEBUG.
1630 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
1631 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
1632 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
1633 if YYYDEBUG.
1634 (debug_stream, set_debug_stream, debug_level, set_debug_level):
1635 Define only if YYDEBUG.
1636 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
1637 set_debug_level.
1638 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
1639 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
1640 AT_CHECK_CALC_GLR_CC that are working now.
1641
4ec13d60
PE
16422006-09-12 Paul Eggert <eggert@cs.ucla.edu>
1643
1644 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
1645 We don't need them in glr.cc, and glr.c defines them.
1646 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
1647 assumes that defining it to anything is the same as defining
1648 it to 1. Problem reported by Paolo Bonzini.
1649
8e1687ae
PE
16502006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
1651
1652 * data/c.m4 (b4_null, b4_case): Define.
1653 * src/output.c (prepare_symbols): Use b4_null.
1654 (user_actions_output): Use b4_case.
1655
3dc5e96b
PE
16562006-09-11 Paul Eggert <eggert@cs.ucla.edu>
1657
aef3da86
PE
1658 * data/glr.c (b4_shared_declarations): Put start-header first,
1659 before any #includes that we generate, so that feature-test
1660 macros work. Problem reported by Michael Deutschmann in
1661 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
1662 * data/lalr1.cc: Likewise.
1663 * doc/bison.texinfo (Prologue): Document that feature-test macros
1664 should be defined before any Bison declarations.
1665 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
1666 that depend on location.hh after, not before, Bison decls, since
1667 we now include location.hh after the first user prologue.
1668
3dc5e96b
PE
1669 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
1670 Sander Brandenburg in
1671 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
1672 Also, fix minor white space and comment issues.
aef3da86
PE
1673 (Prologue): Mention that it's better to define feature-test macros
1674 before Bison declarations. Problem reported by Michael Deutschmann.
1675
1676 * README-cvs: Fix typo: "&" should be "&&". Problem reported
1677 by Jim Meyering.
1678 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
1679 This adjusts to recent gnulib changes.
3dc5e96b 1680
b2a0b7ca
JD
16812006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
1682
1683 Finish implementation of per-type %destructor/%printer. Discussed
1684 starting at
1685 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
1686 and
1687 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
1688 * NEWS (2.3+): Add a description of this feature to the default
1689 %destructor/%printer description.
1690 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
1691 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
1692 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
1693 list node contains a semantic type.
1694 * src/symtab.c, src/symtab.h: Extend with a table that associates
1695 semantic types with their %destructor's and %printer's.
1696 (semantic_type_from_uniqstr, semantic_type_get,
1697 semantic_type_destructor_set, semantic_type_printer_set): New functions
1698 composing the public interface of that table.
1699 (symbol_destructor_get, symbol_destructor_location_get,
1700 symbol_printer_get, symbol_printer_location_get): If there's no
1701 per-symbol %destructor/%printer, look up the per-type before trying
1702 the default.
1703 * tests/actions.at (Per-type %printer and %destructor): New test case.
1704 * tests/input.at (Default %printer and %destructor redeclared):
1705 Extend to check that multiple occurrences of %symbol-default in a
1706 single %destructor/%printer declaration is an error.
1707 (Per-type %printer and %destructor redeclared, Unused values with
1708 per-type %destructor): New test cases.
1709
3be03b13
JD
17102006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
1711
1712 Require default %destructor/%printer to be declared using
1713 %symbol-default instead of an empty symbol list, and start working on
1714 new per-type %destructor/%printer. Discussed at
1715 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
1716 * NEWS (2.3+): Add %symbol-default to example.
1717 * bison.texinfo (Freeing Discarded Symbols): Likewise.
1718 (Bison Symbols): Add entry for %symbol-default.
1719 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
1720 (generic_symlist, generic_symlist_item): New nonterminals for creating
1721 a list in which each item is a symbol, semantic type, or
1722 %symbol-default.
1723 (grammar_declaration): Use generic_symlist in %destructor and %printer
1724 declarations instead of symbols.1 or an empty list.
1725 (symbol_declaration, precedence_declaration, symbols.1): Update actions
1726 for changes to symbol_list.
1727 * src/reader.c: Update for changes to symbol_list.
1728 * src/scan-code.l: Likewise.
1729 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
1730 * src/symlist.c, src/symlist.h: Extend such that a list node may
1731 represent a semantic type or a %symbol-default in addition to just an
1732 ordinary symbol. Add switched functions for setting %destructor's and
1733 %printer's.
1734 * tests/actions.at, tests/input.at: Add %symbol-default to all default
1735 %destructor/%printer declarations.
1736
3508ce36
JD
17372006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
1738
1739 Whether the default %destructor/%printer applies to a particular symbol
1740 isn't a question of whether the user *declares* that symbol (in %token,
1741 for example). It's a question of whether the user by any means
1742 *defines* the symbol at all (by simply using a char token, for
1743 example). $end is defined by Bison whereas any other token with token
1744 number 0 is defined by the user. The error token is always defined by
1745 Bison regardless of whether the user declares it with %token, but we
1746 may one day let the user define error as a nonterminal instead.
1747 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
1748 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
1749 the meaning of "user-defined".
1750 * tests/actions.at (Default %printer and %destructor for user-declared
1751 end token): Rename to...
1752 (Default %printer and %destructor for user-defined end token): ...
1753 this.
1754
1755 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
1756 computation of whether to apply the default, don't maintain a list of
1757 every Bison-defined symbol. Instead, just check for a first character
1758 of '$', which a user symbol cannot have, and check for the error token.
1759
9350499c
JD
17602006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
1761
1762 Don't apply the default %destructor or %printer to the error token,
1763 $undefined, or $accept. This change fits the general rule that the
1764 default %destructor and %printer are only for user-declared symbols,
1765 and it solves several difficulties that are described in the new test
1766 cases listed below.
1767 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
1768 * tests/actions.at (Default %printer and %destructor are not for error
1769 or $undefined, Default %printer and %destructor are not for $accept):
1770 New test cases.
1771
4d7370cb
JD
17722006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
1773
1774 Allow %start after the first rule.
1775 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
1776 when parsing the first rule.
1777 (check_and_convert_grammar): Search for it here after all grammar
1778 declarations have been parsed. Skip midrules, which have dummy LHS
1779 nonterminals.
1780 * src/symtab.c (symbol_is_dummy): New function.
1781 * src/symtab.h (symbol_is_dummy): Declare it.
1782 * tests/input.at (%start after first rule): New test.
1783
6d0ef4ec
JD
17842006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
1785
1786 Redo some of the previous commit: add back the ability to use
1787 non-aliased/undeclared string literals since it might be useful to
1788 those declaring %token-table.
1789 * src/reader.c (check_and_convert_grammar): Undo changes in previous
1790 commit: don't worry about complaints from symbols_pack.
1791 * src/symtab.c (symbol_new, symbol_class_set,
1792 symbol_check_alias_consistency): Undo changes in previous commit: count
1793 each string literal as a new symbol and token, assign it a symbol
1794 number, and don't complain about non-aliased string literals.
1795 (symbols_pack): Since symbol_make_alias still does not decrement symbol
1796 and token counts but does still set aliased tokens to the same number,
1797 symbol_pack_processor now leaves empty slots in the symbols array.
1798 Remove those slots.
1799 * tests/regression.at (Undeclared string literal): Remove test case
1800 added in previous commit since non-aliased string literals are allowed
1801 again.
1802 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
1803 remove unnecessary string literal declarations.
1804 * tests/sets.at (Firsts): Likewise.
1805
965537bc
JD
18062006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
1807
1808 Don't allow an undeclared string literal, but allow a string literal to
1809 be used before its declaration.
1810 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
1811 symbols_pack complained.
1812 * src/symtab.c (symbol_new): Don't count a string literal as a new
1813 symbol.
1814 (symbol_class_set): Don't count a string literal as a new token, and
1815 don't assign it a symbol number since symbol_make_alias does that.
1816 (symbol_make_alias): It's not necessary to decrement the symbol and
1817 token counts anymore. Don't assume that an alias declaration occurs
1818 before any uses of the identifier or string, and thus don't assert that
1819 one of them has the highest symbol number so far.
1820 (symbol_check_alias_consistency): Complain if there's a string literal
1821 that wasn't declared as an alias.
1822 (symbols_pack): Bail if symbol_check_alias_consistency failed since
1823 symbol_pack asserts that every token has been assigned a symbol number
1824 although undeclared string literals have not.
1825 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 1826 string literal): New test cases.
965537bc
JD
1827 (Characters Escapes, Web2c Actions): Declare string literals as
1828 aliases.
1829 * tests/sets.at (Firsts): Likewise.
1830
47aee066
JD
18312006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
1832
1833 In the grammar scanner, STRING_FINISH unclosed constructs and return
1834 them to the parser in order to improve error messages.
1835 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
1836 SC_BRACED_CODE, SC_PROLOGUE): Implement.
1837 * tests/input.at (Unclosed constructs): New test case.
1838 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
1839 seen.
1840
1841 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
1842 unused global.
1843
1f6b3679
JD
18442006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
1845
1846 Handle string aliases for character tokens correctly.
1847 * src/symtab.c (symbol_user_token_number_set): If the token has an
1848 alias, check and set its alias's user token number instead of its own,
1849 which is set to indicate the alias. Previously, every occurrence of
1850 the character token in the grammar overwrote that alias indicator with
1851 the character code.
1852 * tests/input.at (String aliases for character tokens): New test.
1853
219741d8
JD
18542006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
1855
1856 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
1857
11daa4e7
PE
18582006-08-11 Paul Eggert <eggert@cs.ucla.edu>
1859
1860 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
1861 to prevent failures when building on older platforms.
1862 Check for autopoint failure.
1863 Set XGETTEXT_OPTIONS to values that check for C format strings,
1864 so that translators are warned about them (this also helps
1865 prevent core dumps).
1866
1867 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
1868 function, since it simplifies our code a bit.
1869
1870 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
1871 rather than -W, so we don't get bogus warnings about sign comparisons.
1872 Add -Wpointer-arith, since that warning is useful (it reports code
1873 that does not conform to C89 and that some compilers reject).
1874 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
1875 since it's no longer needed.
1876
f9bfc42a
JD
18772006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
1878
1879 Clean up scanners a bit.
1880 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
1881 definitions so gcc won't warn when obstack_for_string is unused.
1882 * src/scan-code.l: config.h and system.h are already #include'd by
1883 scan-code-c.c, so get rid of them here.
1884 * src/scan-gram.l: Likewise.
1885 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
1886 definitions rather than duplicating the rest of it.
1887 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
1888
06e8700a
JD
18892006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
1890
1891 Suppress signed/unsigned comparison warnings for yycheck.
1892 * data/c.m4 (b4_safest_int_type): New macro.
1893 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
1894 a signed int type, cast it to b4_safest_int_type first.
1895 * data/yacc.c: Likewise.
1896 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
1897 also overwritten.
1898
9c437126
PE
18992006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
1900
1901 * doc/bison.texinfo: Fix some typos.
1902
284d8a13
PE
19032006-08-02 Paul Eggert <eggert@cs.ucla.edu>
1904
1905 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
1906 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
1907
1908 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
1909 the latest gnulib does this a different way.
1910 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
1911 translation was patched, so stop omitting it.
1912
ec5479ce
JD
19132006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1914
1915 Enable declaration of default %printer/%destructor. Make the parser
1916 use these for all user-declared grammar symbols for which the user does
1917 not declare a specific %printer/%destructor. Thus, the parser uses it
1918 for token 0 if the user declares it but not if Bison generates it as
1919 $end. Discussed starting at
1920 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
1921 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
1922 and
1923 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
1924 * NEWS (2.3+): Mention.
1925 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
1926 declare a %destructor for a mid-rule's semantic value. It's just
1927 impossible to declare one specific to it.
1928 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
1929 code. Describe default %destructor form.
1930 * src/parse-gram.y (grammar_declaration): Parse default
1931 %printer/%destructor declarations.
1932 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
1933 and symbol_destructor_location_get rather than accessing the destructor
1934 and destructor_location members of struct symbol.
1935 (symbol_printers_output): Likewise but for %printer's.
1936 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
1937 again.
1938 * src/symtab.c (default_destructor, default_destructor_location,
1939 default_printer, default_printer_location): New static global
1940 variables to record the default %destructor and %printer.
1941 (symbol_destructor_get, symbol_destructor_location_get,
1942 symbol_printer_get, symbol_printer_location_get): New functions to
1943 compute the appropriate %destructor and %printer for a symbol.
1944 (default_destructor_set, default_printer_set): New functions to set the
1945 default %destructor and %printer.
1946 * src/symtab.h: Prototype all those new functions.
1947 * tests/actions.at (Default %printer and %destructor): New test to
1948 check that the right %printer and %destructor are called, that they're
1949 not called for $end, and that $$ and @$ work correctly.
1950 (Default %printer and %destructor for user-declared end token): New
1951 test to check that the default %printer and %destructor are called for
1952 a user-declared end token.
1953 * tests/input.at (Default %printer and %destructor redeclared, Unused
1954 values with default %destructor): New tests to check related grammar
1955 warnings and errors.
1956
868d2d96
JD
19572006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1958
1959 Clean up handling of %destructor for the end token (token 0).
1960 Discussed starting at
1961 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
1962 and
1963 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
1964
1965 Make the skeletons consistent in how they pop the end token and invoke
1966 its %destructor.
1967 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
1968 state, which has token number 0, since this would invoke the
1969 %destructor for the end token.
1970 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
1971 until after shifting the end token, or else it won't be popped.
1972 * data/yacc.c (yyparse): Likewise.
1973
1974 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
1975 it's the end token. Upon termination, destroy an unshifted lookahead
1976 even when it's the end token.
1977 * data/lalr1.cc (yy::parser::parse): Likewise.
1978 * data/yacc.c (yyparse): Likewise.
1979
1980 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
1981 value warnings for the end token when the user gives the end token a
1982 %destructor.
1983
1984 * tests/actions.at (Printers and Destructors): Test all the above.
1985
62a9592d
PE
19862006-07-24 Paul Eggert <eggert@cs.ucla.edu>
1987
1988 Update to latest gnulib and gettext versions.
1989 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
1990 Add fopen-safer.
1991 (gnulib_files): Add m4/warning.m4. Don't worry about files
1992 overwritten by autopoint.
1993 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
1994 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
1995 rejects them.
1996 Don't use autoreconf; instead, invoke autopoint etc. by hand,
1997 so that we can remove the intl files at a better time.
1998 (intl_files_to_remove): Remove aclocal.m4, since it gets
1999 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
2000 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
2001 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
2002 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
2003 Remove datarootdir hack; no longer needed.
2004 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
2005 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
2006 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
2007 strdup.h.
2008 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
2009 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
2010
10d6970f
PE
20112006-07-20 Paul Eggert <eggert@cs.ucla.edu>
2012
2013 * bootstrap: Adjust to today's change to gnulib-tool by invoking
2014 it with --assume-autoconf='latest-stable'.
2015
50a33993
JD
20162006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
2017
2018 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
2019 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
2020 YYSTYPE' and `{'.
2021 * src/muscle_tab.h (muscle_grow): Replace the header comments with
2022 those from muscle_tab.c since the old ones are misleading.
2023
2ce4ed68
AD
20242006-07-13 Akim Demaille <akim@epita.fr>
2025
2026 Support %define "KEY" {VALUE}.
2027 * src/scan-code.h, src/scan-code.l (translate_action)
2028 (translate_rule_action, translate_symbol_action, translate_code):
2029 Return char *, not const char *.
2030 * src/parse-gram.y (declaration): Rename as...
2031 (prologue_declaration): this.
2032 (string_content): Remove this nonterminal, use STRING.
2033 (braceless, content, content.opt): New nonterminal.
2034 Use them.
2035 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
2036 as value.
2037 * src/scan-gram.l (getargs.h): Don't include it.
2038
db7e5eb5
PE
20392006-07-12 Paul Eggert <eggert@cs.ucla.edu>
2040
2041 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
2042 rather than a for-loop that declares a local bool variable. This
2043 should work around a compatibility problem with a Cray x1e C++
2044 compiler reported by Hung Nguyen in
2045 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
2046 The for-loop was introduced in the 2004-11-17 change but I don't
2047 know why it was needed.
2048
a5d80ba5
AD
20492006-07-12 Akim Demaille <akim@epita.fr>
2050
2051 * data/c.m4: Comment changes.
2052
23eb2a69
AD
20532006-07-10 Akim Demaille <akim@lrde.epita.fr>
2054
2055 * src/complain.c (error_message, ERROR_MESSAGE): New.
2056 To factor...
2057 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
2058 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
2059
ddc8ede1
PE
20602006-07-09 Paul Eggert <eggert@cs.ucla.edu>
2061
2062 * NEWS: Instead of %union, you can define and use your own union type
2063 YYSTYPE if your grammar contains at least one <type> tag.
2064 Your YYSTYPE need not be a macro; it can be a typedef.
2065 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
2066 (Union Decl, Decl Summary): Document this.
2067 * data/glr.c (YYSTYPE): Implement this.
2068 * data/glr.cc (YYSTYPE): Likewise.
2069 * data/lalr1.cc (YYSTYPE): Likewise.
2070 * data/yacc.c (YYSTYPE): Likewise.
2071 * src/output.c (prepare): Output tag_seen_flag.
2072 * src/parse-gram.y (declaration, grammar_declaration):
2073 Use 'union_seen' rather than 'typed' to determine whether
2074 %union has been seen, since grammars can now be typed without
2075 %union.
2076 (symbol_declaration, type.opt, symbol_def):
2077 Keep track of whether a tag has been seen.
2078 * src/reader.c (union_seen, tag_seen): New vars.
2079 (typed): remove.
2080 * src/reader.h (union_seen, tag_seen, typed): Likewise.
2081 * src/scan-code.l (untyped_var_seen): New variable.
2082 (handle_action_dollar): Adjust to above changes.
2083 (handle_action_dollar, handle_action_at):
2084 Improve overflow checking for outlandish numbers.
2085 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
2086 avoid new diagnostics generated by above changes.
2087 * tests/regression.at (YYSTYPE typedef): Add test to check
2088 for type tags without %union.
2089
2090 * src/symlist.c (symbol_list_length): Return int, not unsigned
2091 int, since callers expect int. This may need to get revisited
2092 once we have proper integer overflow checking.
2093
2094 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
2095 object is now static.
2096
2097 * src/getargs.c (flags_argmatch): Return void, not int,
2098 to pacify ./configure --enable-gcc-warnings.
2099
2100 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
2101 since last_string is already defined to FLEX_PREFIX (last_string).
2102
7b42569e
AD
21032006-07-09 Akim Demaille <akim@lrde.epita.fr>
2104
2105 Implement --warnings/-W.
2106 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
2107 replaced by...
2108 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
2109 Adjust callers.
2110 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
2111 (warnings_args, warnings_types): New.
2112 (getargs, short_options, long_options): Accept -W/--warnings.
2113 Sort the options by alphabetical order, upper case letter right
2114 before its lower case.
2115
3b452f4e
JD
21162006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
2117
2118 Change %merge result type clash warnings to errors. Discussed at
2119 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
2120 * src/reader.c (record_merge_function_type): Use complain_at.
2121 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
2122 declared later): Update test case results.
2123
b8a41559
AD
21242006-07-09 Akim Demaille <akim@lrde.epita.fr>
2125
2126 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
2127 to be in alphabetical order.
2128 (trace_args): Spelling fixes.
2129
cd9e1ba2
PE
21302006-07-09 Paul Eggert <eggert@cs.ucla.edu>
2131
2132 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
2133 so they don't collide with user-defined macros.
2134 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
2135 this was never guaranteed, and now that we're using gnulib stdint,
2136 which defines int_fast16_t to long int, the problem is exposed.
2137
cb48f191
PE
21382006-07-08 Paul Eggert <eggert@cs.ucla.edu>
2139
b8445a15
PE
2140 * data/c.m4 (b4_basename): Simplify a bit, since we don't
2141 need the full POSIX semantics (and weren't implementing them
2142 anyway).
2143
cb48f191
PE
2144 Adjust to Autoconf 2.60 and today's gnulib.
2145 * bootstrap (gnulib_modules): Add stdint.
2146 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
2147 no longer copies it.
2148 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
2149 since stdint needs the former and wcwidth (which is now required
2150 by mbswidth) needs the latter.
2151 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
2152 work around a compatibility glitch between gettext 0.14.6 and
2153 Autoconf 2.60.
2154 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
2155 Do not check for uintptr_t, since new stdint module does the right
2156 thing.
2157 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
2158 Add stdint.h, stdint_.h, wcwidth.h.
2159 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
2160 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
2161 stdint.m4, wchar_t.m4, wcwidth.m4.
2162 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
2163 usual order for ../lib/*.h files.
2164 (file_name_split): Use last_component, not base_name, to adjust
2165 to gnulib changes.
2166 * src/parse-gram.h: Include <strverscmp.h> in the usual order
2167 for ../lib/*.h files.
2168 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
2169 Define unconditionally, since we now assume the stdint module.
2170 * src/scan-skel.l: Include <dirname.h>.
2171 (BASE_QPUTS): Use last_component, not base_name.
2172 * src/system.h: Include <unlocked-io.h> in the usual order
2173 for ../lib/*.h files. Include <stdint.h> unconditionally,
2174 since we now use the stdint module.
2175 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
2176 HAVE_UINTPTR_T, since we now use the stdint module.
2177 (base_name): Remove decl, since files now include <dirname.h>
2178 to get the decl.
2179
cd48d21d
AD
21802006-07-08 Akim Demaille <akim@lrde.epita.fr>
2181
2182 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
2183 New, default to 1.
2184 * data/yacc.c, data/glr.c, data/location.cc: Use them.
2185 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
2186 default.
2187 * tests/calc.at: Adjust.
2188
8ec0a172
AD
21892006-07-08 Akim Demaille <akim@lrde.epita.fr>
2190
b8445a15 2191 * data/c.m4 (b4_basename): New.
8ec0a172
AD
2192 (b4_syncline): Also output the location of its invocation (from
2193 the skeleton).
2194 (b4_user_action, b4_define_user_action, b4_user_actions)
2195 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
2196 (b4_user_stype): New.
2197 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
2198
4a678af8
JD
21992006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
2200
2201 In the grammar file, the first column is 1 not 0 on the first line as
2202 on every other line.
2203 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
2204 * tests/input.at (Torturing the Scanner): Update output.
2205
2206 * src/scan-gram.l (scanner_cursor): Declare it static.
2207
dd60572a
JD
22082006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
2209
2210 In warnings, say "previous declaration" rather than "first
2211 declaration".
2212 * src/symtab.c (redeclaration): Do that here.
2213 * src/reader.c (record_merge_function_type): In the case of a result
2214 type clash, report the previous declaration rather than the very first
2215 one in the grammar file.
2216 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
2217 declared later): Add a third declaration to check this behavior.
2218 * tests/input.at (Incompatible Aliases): Update output.
2219
2073e1b6
AD
22202006-06-27 Akim Demaille <akim@epita.fr>
2221
2222 * doc/Doxyfile.in: New.
2223 * doc/Makefile.am: Use it.
2224 * src/lalr.h, src/symtab.h: Initial doxygenation.
2225
8ee5b538
JD
22262006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
2227
2228 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
2229 declared after the %merge. This continues the effort of the previous
2230 patch.
8ee5b538
JD
2231 * src/reader.c (get_merge_function): Don't set the merger type yet.
2232 (record_merge_function_type): New function for setting the merger type
2233 and checking for clashes.
2234 (grammar_current_rule_merge_set): Set the location of the %merge for
2235 the current rule.
2236 (packgram): Invoke record_merge_function_type for each rule now that
2237 all symbol type declarations have been parsed.
2238 * src/reader.h (merger_list.type_declaration_location): New member
2239 storing the location of the first %merge from which the type for this
2240 merging function was derived.
2241 * src/symlist.h (symbol_list.merger_declaration_location): New member
2242 storing the location of a rule's %merge, if any.
2243 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
2244 declared later): New test to catch the error fixed by the above patch.
2245
ffa4ba3a
JD
22462006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
2247
2248 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
2249 declarations appear after the rules. Discussed at
2250 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
2251 and
2252 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
2253 Don't mistake the type of $$ in a midrule to be that of its parent
2254 rule's $$.
ffa4ba3a
JD
2255 * src/reader.c (grammar_current_rule_end): Don't invoke
2256 grammar_rule_check yet since not all symbol declarations may have been
2257 parsed yet.
2258 (grammar_midrule_action): Likewise.
2259 Don't record whether the midrule's $$ has been used yet since actions
2260 haven't been translated yet.
2261 Record the midrule's parent rule and its RHS index within the parent
2262 rule.
2263 (grammar_current_rule_action_append): Don't translate the action yet
2264 since not all symbol declarations may have been parsed yet and, thus,
2265 warnings about types for $$, $n, @$, and @n can't be reported yet.
2266 (packgram): Translate the action and invoke grammar_rule_check now that
2267 all symbol declarations have been parsed.
2268 * src/scan-code.l (handle_action_dollar): Now that this is invoked
2269 after parsing the entire grammar file, the symbol list here in the case
2270 of a midrule is actually the midrule's empty RHS, so reference its
2271 parent rule's RHS where necessary.
2272 On the other hand, now that you can already know it's a midrule, you
2273 aren't forced to think $$ has the same type as its parent rule's $$.
2274 (handle_action_at): In the case of a midrule, reference the parent rule
2275 where necessary.
2276 * src/symlist.c (symbol_list_new): Initialize new midrule-related
2277 members.
2278 (symbol_list_length): Now that this is invoked after all rules have
2279 been parsed, a NULL symbol (rather than a NULL symbol list node)
2280 terminates a rule. symbol_list_print already does this correctly.
2281 * src/symlist.h (symbol_list.midrule_parent_rule,
2282 symbol_list.midrule_parent_rhs_index): New members so that midrules can
2283 remember their relationships with their parents.
2284 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
2285 fixed by the above patch.
2286 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
2287 implementing...
2288 (Unused values): ... this old test case and...
2289 (Unused values before symbol declarations): ... this new test case.
2290 This one is the same as `Unused values' except that all symbol
2291 declarations appear after the rules in order to catch the rest of the
2292 errors fixed by the above patch.
2293
e256e17f
JD
22942006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
2295
300a1930
JD
2296 More cleanup.
2297 * src/reader.c (current_rule): Declare it static since it's no longer
2298 used outside this file.
2299 (grammar_current_rule_action_append): Remove redundant arguments from
2300 translate_rule_action invocation.
2301 * src/reader.h (current_rule): Remove this unused extern.
2302 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
2303 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 2304
381ecb06
JD
23052006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
2306
2307 Clean up yesterday's patch.
2308 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
2309 to...
2310 * src/reader.c (grammar_current_rule_action_append): ... here for
2311 consistency with grammar_current_rule_symbol_append.
2312 * tests/regression.at (Braced code in declaration in rules section):
2313 Make yyerror and yylex static as usual.
2314
4210cd0b
JD
23152006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
2316
2317 Fix bug that mistakes braced code in a declaration in the rules section
2318 to be a rule action. Mentioned at
2319 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
2320 * src/scan-gram.l: Move midrule action detection from the start of the
2321 scanning of any braced code to...
2322 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
2323 action. For readability, use $2 and @2 rather than the equivalent
2324 global variables.
2325 * tests/regression.at (Braced code in declaration in rules section):
2326 New test to catch the error fixed by the above patch.
2327
2328 Work on code readability some.
2329 * src/scan-code.l (current_rule): Get rid of this misleading and
2330 redundant declaration: it's actually extern'ed in reader.h.
2331 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
2332 translate_action): Add a rule argument and use it instead of the global
2333 current_rule.
2334 (translate_rule_action): This already receives current_rule through an
2335 argument, so pass it on to translate_action instead of assigning
2336 current_rule to current_rule.
2337 (translate_symbol_action, translate_code): Pass rule = NULL to
2338 translate_action.
2339
34f98f46
JD
23402006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
2341
2342 Rename %before-definitions to %start-header and %after-definitions to
2343 %end-header. Don't use these declarations to separate pre-prologue
2344 blocks from post-prologue blocks. Add new order-independent
2345 declarations %before-header and %after-header as alternatives to the
2346 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
2347 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
2348 * NEWS (2.3+): Update for these changes.
2349 * data/glr.c (b4_before_definitions): Update to...
2350 (b4_start_header): ... this.
2351 (b4_after_definitions): Update to...
2352 (b4_end_header): ... this.
2353 * data/glr.cc: Likewise.
2354 * data/lalr1.cc: Likewise.
2355 * data/yacc.c: Likewise.
2356 * doc/bison.texinfo (The prologue): Update names, and replace remaining
2357 prologue blocks with %*-header declarations.
2358 (Calc++ Parser): Likewise.
2359 (Bison Declaration Summary): Update names.
2360 (Bison Symbols): Update description.
2361 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
2362 (PERCENT_END_HEADER): ... this.
2363 (PERCENT_BEFORE_DEFINITIONS): Update to...
2364 (PERCENT_START_HEADER): ... this.
2365 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
2366 (declaration): Update token names and m4 macro names.
2367 When parsing %end-header and %start-header, invoke translate_code
2368 before muscle_code_grow, and no longer set global booleans to remember
2369 whether these declarations have been seen.
2370 Parse new %after-header and %before-header.
2371 * src/reader.c (before_definitions, after_definitions): Remove.
2372 (prologue_augment): Accept a new bool argument to specify whether to
2373 augment the pre-prologue or post-prologue.
2374 * src/reader.h (before_definitions, after_definitions): Remove these
2375 extern's.
2376 (prologue_augment): Add new bool argument.
2377 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
2378 (PERCENT_END_HEADER): ... this.
2379 (PERCENT_BEFORE_DEFINITIONS): Update to...
2380 (PERCENT_START_HEADER): ... this.
2381 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
2382 * tests/actions.at (Printers and Destructors): Update names.
2383
31b2b07e
JD
23842006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
2385
2386 Add comparison operators for C++ location classes. Discussed at
2387 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
2388 * data/c++.m4 (b4_define_location_comparison): New boolean %define
2389 declaration indicating whether filename_type has an operator==. If
2390 filename_type is `std::string', it defaults to `1', `0' otherwise.
2391 * data/location.cc: Iff b4_define_location_comparison is `1', add
2392 operator== and operator!= for class position and for class location.
2393
2394 Some minor fixes.
2395 * src/scan-action.l: Remove unused file.
2396 * src/symtab.c (symbol_printer_set): Use printer_location not
2397 destructor_location.
2398 * src/symtab.h (struct symbol): Replace incorrect source comment for
2399 printer members.
2400 * tests/input.at (Incompatible Aliases): Update output with correct
2401 printer location.
2402
9bc0dd67
JD
24032006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
2404
2405 Don't put the pre-prologue in the header file. For the yacc.c code
2406 file and the glr.c header and code files, move the pre-prologue before
2407 the token definitions. Add new %before-definitions and
2408 %after-definitions to declare code that will go in both the header file
2409 and code file. Discussed at
2410 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
2411 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
2412 and
2413 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
2414 * NEWS (2.3+): Describe these changes.
2415 * data/glr.c (b4_pre_prologue): Move from within to before...
2416 (b4_shared_declarations): ... this.
2417 Add new b4_before_definitions before b4_token_enums.
2418 Add new b4_after_definitions at the end.
2419 * data/glr.cc (b4_pre_prologue): Replace with...
2420 (b4_before_definitions): ... this in the header file.
2421 (b4_after_definitions): New near the end of the header file.
2422 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
2423 code file right before including the header file.
2424 (b4_before_definitions): New in the previous position of
2425 b4_pre_prologue in the header file.
2426 (b4_after_definitions): New near the end of the header file.
2427 * data/yacc.c: Clean up some m4 quoting especially in the header file.
2428 (b4_token_enums_defines): In the code file, move to right before
2429 YYSTYPE for consistency with the header file.
2430 (b4_before_definitions): New right before b4_token_enums_defines in
2431 both the header and code file.
2432 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
2433 header and code file.
2434 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
2435 of prologues for %union dependencies.
2436 (Bison Declaration Summary): In %defines description, mention the
2437 effect of %before-definitions and %after-definitions on the header
2438 file.
2439 (Calc++ Parser): Forward declare driver in a %before-definitions rather
2440 than in the pre-prologue so that make check succeeds.
2441 (Bison Symbols): Add entries for %before-definitions and
2442 %after-definitions.
2443 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
2444 %before-definitions.
2445 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
2446 (declaration): Parse those declarations and append to
2447 b4_before_definitions and b4_after_definitions, respectively.
2448 * src/reader.c (before_definitions, after_definitions): New bools to
2449 track whether those declarations have been seen.
2450 (prologue_augment): Add to the post-prologue if %union,
2451 %before-definitions, or %after-definitions has been seen.
2452 * src/reader.h (before_definitions, after_definitions): New extern's.
2453 * src/scan-gram.l: Scan the new declarations.
2454 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
2455 prologue block in a %before-definitions or a %after-definitions based
2456 on whether the %union is declared.
2457 * tests/regression.at (Early token definitions with --yacc, Early token
2458 definitions without --yacc): Move tests for token definitions into the
2459 post-prologue since token names are no longer defined in the
2460 pre-prologue.
2461
203b9274
AD
24622006-06-20 Akim Demaille <akim@epita.fr>
2463
2464 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
2465 (symbol_get): Use it.
2466 * src/parse-gram.y: Use it.
2467
a7ee59cf
JD
24682006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
2469
2470 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
2471 build succeeds when configured with --enable-gcc-warnings.
2472
5a2baae7
PE
24732006-06-19 Paul Eggert <eggert@cs.ucla.edu>
2474
33ad1a9c
PE
2475 * src/parse-gram.y (char_name): New function.
2476 (CHAR, STRING, string_content): For %printer, properly escape.
2477 (ID): Prefer fputs to fprintf.
2478 (id): Reindent to be consistent with other rules.
2479 Properly quote char.
2480
5a2baae7
PE
2481 The Translation Project changed its way of publishing translations
2482 to maintainers. I haven't received any responses to my request
2483 for supporting the old way, or for documenting the new way. I
2484 have modified 'bootstrap' to use screen scraping
2485 (in this case, HTML scraping). This is unreliable and inelegant,
2486 but I don't see any better way. Yuck.
2487 * bootstrap (TP_URL, WGET_COMMAND): New vars.
2488 (get_translations): New function, which uses HTML scraping to
2489 deduce locations of latest translations.
2490 Use this function to grab both bison and bison-runtime .po files.
2491 Don't bother priming the pump for the runtime-po domain any more,
2492 as it's now translated better than bison is.
2493
58d7a1a1
AD
24942006-06-19 Akim Demaille <akim@epita.fr>
2495
2496 * src/scan-gram.l: No longer "parse" things after `%union' until
2497 `{'. Rather, return a single "%union" token.
2498 No longer make symbols: return strings, and leave the conversion
2499 to symbols to the parser.
2500 (SC_PRE_CODE, token_type): Remove.
2501 * src/parse-gram.y (%union): New field `character'.
2502 Sort tokens.
2503 (CHAR): New token.
2504 (ID, ID_COLON): Now that the scanner no longer makes them
2505 identifiers, adjust all uses to invoke symbol_get.
2506 (id_colon): New, wraps the conversion from string to symbol.
2507 (%union): Accept a possible union_name.
2508 (symbol): Now can be a char.
2509 * data/c.m4 (b4_union_name): Leave a default value.
2510 * data/glr.c, data/yacc.c: Use it.
2511
b931235e
JD
25122006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
2513
2514 For associating token numbers with token names for "yacc.c", don't use
2515 #define statements unless `--yacc' is specified; always use enum
2516 yytokentype. Most important discussions start at:
2517 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
2518 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
2519 and
2520 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
2521 * NEWS (2.3+): Mention.
2522 * data/c.m4 (b4_yacc_if): New.
2523 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
2524 token #define's.
2525 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
2526 on token name definitions.
2527 * src/getargs.c (usage): Capitalize `Yacc' in English.
2528 * src/output.c (prepare): Define b4_yacc_flag.
2529 * tests/regression.at (Early token definitions): Test that tokens names
2530 are defined before the pre-prologue not just before the post-prologue.
2531 Remove this test case and copy to...
2532 (Early token definitions with --yacc): ... this to test #define's.
2533 (Early token definitions without --yacc): ... and this to test enums.
2534
9e6e7ed2
PE
25352006-06-11 Paul Eggert <eggert@cs.ucla.edu>
2536
2537 * NEWS: Reword the post-2.3 change to not be so optimistic about
2538 removing the old "look-ahead" spelling.
2539 Update previous look-ahead/lookahead change reports.
2540 * REFERENCES: look-ahead -> lookahead (since that's
2541 what he actually wrote).
2542 * doc/refcard.tex: look ahead -> lookahead,
2543 look-ahead -> lookahead
2544
742e4900
JD
25452006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
2546
2547 For consistency, use `lookahead' instead of `look-ahead' or
2548 `look_ahead'. Discussed starting at
2549 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
2550 and then at
2551 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
2552 * NEWS: For the next release, note the change to `--report'.
2553 * TODO, doc/bison.1: Update English.
2554 * doc/bison.texinfo: Update English.
2555 (Understanding Your Parser, Bison Options): Document as
2556 `--report=lookahead' rather than `--report=look-ahead'.
2557 * src/conflicts.c: Update English in comments.
2558 (lookahead_set): Rename from look_ahead_set.
2559 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
2560 (resolve_sr_conflict): Rename local look_ahead_tokens to
2561 lookahead_tokens, and update other uses.
2562 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
2563 count_rr_conflicts, conflicts_free): Update uses.
2564 * src/getargs.c (report_args): Move "lookahead" before alternate
2565 spellings.
2566 (report_types): Update uses.
2567 (usage): For `--report' usage description, state `lookahead' spelling
2568 rather than `look-ahead'.
2569 * src/getargs.h (report.report_lookahead_tokens): Rename from
2570 report_look_ahead_tokens.
2571 * src/lalr.c: Update English in comments.
2572 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
2573 (state_lookahead_tokens_count): Rename from
2574 state_look_ahead_tokens_count.
2575 Rename local n_look_ahead_tokens to n_lookahead_tokens.
2576 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
2577 Rename local n_look_ahead_tokens to n_lookahead_tokens.
2578 Update other uses.
2579 Update English in output.
2580 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
2581 * src/print.c: Update English in comments.
2582 (lookahead_set): Rename from look_ahead_set.
2583 (print_reduction): Rename argument lookahead_token from
2584 look_ahead_token.
2585 (print_core, state_default_rule, print_reductions, print_results):
2586 Update uses.
2587 * src/print_graph.c: Update English in comments.
2588 (print_core): Update uses.
2589 * src/state.c: Update English in comments.
2590 (reductions_new): Update uses.
2591 (state_rule_lookahead_tokens_print): Rename from
2592 state_rule_look_ahead_tokens_print, and update other uses.
2593 * src/state.h: Update English in comments.
2594 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
2595 (state_rule_lookahead_tokens_print): Rename from
2596 state_rule_look_ahead_tokens_print.
2597 * src/tables.c: Update English in comments.
2598 (conflict_row, action_row): Update uses.
2599 * tests/glr-regression.at
2600 (Incorrect lookahead during deterministic GLR,
2601 Incorrect lookahead during nondeterministic GLR): Rename
2602 print_look_ahead to print_lookahead.
2603 * tests/torture.at: Update English in comments.
2604 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
2605 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
2606 (Many lookahead tokens): Update uses.
2607 * data/glr.c: Update English in comments.
2608 * lalr1.cc: Likewise.
2609 * yacc.c: Likewise.
2610 * src/conflicts.h: Likewise.
2611 * src/lalr.h: Likewise.
2612 * src/main.c: Likewise.
2613 * src/output.c: Likewise.
2614 * src/parse-gram.c: Likewise.
2615 * src/tables.h: Likewise.
2616 * tests/calc.at: Likewise.
2617
3c40d0b5
JD
26182006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
2619
2620 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
2621
5d278082
PE
26222006-06-07 Paul Eggert <eggert@cs.ucla.edu>
2623
2624 * TODO: Add request from Nelson H. F. Beebe to be able to install
2625 Bison without installing the yacc script.
2626
9e668899
JD
26272006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
2628
2629 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
2630 and yytext if they're already #define'd.
2631 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
2632 * src/scan-code-c.c: ... here.
2633 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
2634 <config.h>.
2635
0c8e079f
JD
26362006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
2637
2638 Get Bison to build again when configured with --enable-gcc-warnings.
2639 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
2640 missing #include's.
2641 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
2642 loc argument as it shadows a global.
2643 * src/scan-gram.l: Remove stray comma that prevents boundary_set
2644 invocation.
2645
2646 * src/.cvsignore: Add scan-code.c.
2647
2346344a
AD
26482006-06-07 Akim Demaille <akim@epita.fr>
2649
2650 * src/scan-gram.l: Move the "add a trailing ; to actions" code
2651 to...
2652 * src/scan-code.l: here.
2653 * tests/input.at (Torturing the Scanner): Fix another location
2654 error.
2655
4862bdfd
AD
26562006-06-07 Akim Demaille <akim@epita.fr>
2657
2658 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
2659
e9071366
AD
26602006-06-06 Akim Demaille <akim@epita.fr>
2661
2662 Extract the parsing of user actions from the grammar scanner.
2663 As a consequence, the relation between the grammar scanner and
2664 parser is much simpler. We can also split "composite tokens" back
2665 into simple tokens.
2666 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
2667 * src/scan-gram.l (add_column_width, adjust_location): Move to and
2668 rename as...
2669 * src/location.h, src/location.c (add_column_width)
2670 (location_compute): these.
2671 Fix the column count: the initial column is 0.
2672 (location_print): Be robust to ending column being 0.
2673 * src/location.h (boundary_set): New.
2674 * src/main.c: Adjust to scanner_free being renamed as
2675 gram_scanner_free.
2676 * src/output.c: Include scan-code.h.
2677 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
2678 Use boundary_set.
2679 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
2680 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
2681 which is now, again, a separate token.
2682 Adjust all dependencies.
2683 Whereever actions with $ and @ are used, use translate_code.
2684 (action): Remove this nonterminal which is now useless.
2685 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
2686 (grammar_current_rule_action_append): Use translate_code.
2687 (packgram): Bound check ruleno, itemno, and rule_length.
2688 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
2689 (last_string, last_braced_code_loc, max_left_semantic_context)
2690 (scanner_initialize, scanner_free, scanner_last_string_free)
2691 (gram_out, gram_lineno, YY_DECL_): Move to...
2692 * src/scan-gram.h: this new file.
2693 (YY_DECL): Rename as...
2694 (GRAM_DECL): this.
2695 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
2696 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
2697 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
2698 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
2699 Move these declarations, and...
2700 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
2701 these to...
2702 * src/flex-scanner.h: this new file.
2703 * src/scan-gram.l (rule_length, rule_length_overflow)
2704 (increment_rule_length): Remove.
2705 (last_braced_code_loc): Rename as...
2706 (gram_last_braced_code_loc): this.
2707 Adjust to the changes of the parser.
2708 Move all the handling of $ and @ into...
2709 * src/scan-code.l: here.
2710 * src/scan-gram.l (handle_dollar, handle_at): Remove.
2711 (handle_action_dollar, handle_action_at): Move to...
2712 * src/scan-code.l: here.
2713 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
2714 scan-code.h, scan-code-c.c, scan-gram.h.
2715 (EXTRA_bison_SOURCES): Add scan-code.l.
2716 (BUILT_SOURCES): Add scan-code.c.
2717 (yacc): Be robust to white spaces.
2718
2719 * tests/conflicts.at, tests/input.at, tests/reduce.at,
2720 * tests/regression.at: Adjust the column numbers.
2721 * tests/regression.at: Adjust the error message.
7891a7c4 2722
184e42f0
JD
27232006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
2724
2725 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
2726 Use Akim's wording from
2727 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
2728
7891a7c4
JD
27292006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
2730
2731 Between Bison releases, manually append `+' to the previous Bison
2732 release number, and use that as a signal to automatically print the
2733 ChangeLog's CVS Id keyword from --version. Discussed starting at
2734 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
2735 * ChangeLog: Add Id header.
2736 * configure.ac (AC_INIT): Append `+' to `2.3'.
2737 * src/.cvsignore: Add revision.c.
2738 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
2739 (BUILT_SOURCES): Add revision.c.
2740 (revision.c): New target rule. This file defines a new global variable
2741 named revision. It initializes it with either the Id from ChangeLog
2742 or, if VERSION doesn't contain `+', with the empty string.
2743 * src/getargs.c (version): Print the value of revision.
2744 * src/revision.h: Extern revision.
2745
4ad3ed84
PE
27462006-06-05 Paul Eggert <eggert@cs.ucla.edu>
2747
2748 * NEWS: Version 2.3.
2749 * configure.ac (AC_INIT): Likewise.
2750
02103984
PE
27512006-05-30 Paul Eggert <eggert@cs.ucla.edu>
2752
2753 * data/glr.c (YYRECOVERING): Define to be a function-like macro
2754 with no arguments, not as an object-like macro. This is for
2755 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
2756 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
2757 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
2758 Document this.
2759
2c08afa5
JD
27602006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
2761
2762 * src/getargs.c (usage): Back out yesterday's modification of the
2763 --help output so that we don't have to wait for translation before
2764 releasing 2.3.
2765
6077da58
PE
27662006-05-29 Paul Eggert <eggert@cs.ucla.edu>
2767
2768 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
2769 Problem reported by Akim Demaille.
2770
2a26b6c2
JD
27712006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
2772
2773 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
2774
aefef0d6
PE
27752006-05-26 Paul Eggert <eggert@cs.ucla.edu>
2776
2777 * data/yacc.c (yy_reduce_print): Omit trailing white space in
2778 generated source code. Problem reported by Frans Englich in
2779 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
2780
fcd8e201
PE
27812006-05-22 Paul Eggert <eggert@cs.ucla.edu>
2782
2783 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
2784 shell, not within 'make', so that 'make' by an ordinary builder
2785 (using GNU make) does not worry about configuring gzip. This also
2786 works around a bug reported independently by Keith Thompson and by
2787 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
2788 stderr rather than stdout, messing up the build logs.
2789
7b5cdcbd
JD
27902006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
2791
2792 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
2793 to make sure that YYID will never be unused. This fixes a 'make
2794 maintainer-check' failure caused by the recent changes to the 'Trivial
2795 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
2796 not used.
2797 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
2798
5ad0a449
JD
27992006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
2800
2801 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
2802 state before an empty RHS is always resolved here. Only the location
2803 of that state is guaranteed to be resolved, and that's enough. This
2804 fixes the remaining bug reported by Derek M. Jones in
2805 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
2806 * tests/glr-regression.at (Uninitialized location when reporting
2807 ambiguity): Test the above case.
2808 Also, the embedded comments in this test case claim it checks the case
2809 of an empty RHS that has inherited the initial location. However, the
2810 corresponding LHS was already resolved, so yyresolveLocations didn't
2811 actually have reason to modify it. Fix this by forcing
2812 nondeterministic operation at the beginning of the parse.
2813
50cce58e
PE
28142006-05-20 Paul Eggert <eggert@cs.ucla.edu>
2815
2816 * data/c.m4 (b4_yy_symbol_print_generate):
2817 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
2818 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
2819 of the bugs reported today by Derek M Jones in
2820 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
2821 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
2822 defined to be a type name without parens or brackets.
2823 (Location Type): Similarly for YYLTYPE.
2824 * tests/regression.at (Trivial grammars): Put in a test for this
2825 bug that will be caught by 'make maintainer-check' (though not,
2826 alas, by 'make check' unless your compiler is picky).
2827
ab8d9dc5
PE
28282006-05-19 Paul Eggert <eggert@cs.ucla.edu>
2829
0d2c8934 2830 * NEWS: Version 2.2.
ab8d9dc5
PE
2831 * configure.ac (AC_INIT): Likewise.
2832
9138c575
JD
28332006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
2834
2835 * data/glr.c (yyreportTree): Make room in yystates for the state
2836 preceding the RHS. This fixes the segmentation fault reported by Derek
2837 M. Jones in
2838 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
2839 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
2840 to the user. Reported for yyreportTree by Derek M. Jones later in the
2841 same thread.
2842 * THANKS: Add Derek M. Jones.
2843 Update my email address.
2844 Fix typo in Steve Murphy's name.
2845
276f48df
PE
28462006-05-14 Paul Eggert <eggert@cs.ucla.edu>
2847
d6645148
PE
2848 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
2849 checking against YYLAST that caused the parser to miss a potential
2850 alternative in its diagnostic.
2851 Problem reported by Maria Jose Moron Fernandez in
2852 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
2853 * data/lalr1.cc (yysyntax_error_): Likewise.
2854 * data/yacc.c (yysyntax_error): Likewise.
2855 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
2856 tokens, in case we run into an older C compiler.
2857 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
2858 Use them to check for the off-by-one error fixed above.
2859
276f48df
PE
2860 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
2861 YYSIZE_T, not size_t.
2862 * tests/regression.at (Trivial grammars): New test, to catch
2863 the error fixed by the above patch.
2864
cd8b5791
AD
28652006-05-14 Akim Demaille <akim@lrde.epita.fr>
2866
2867 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
2868 scheme.
2869 Reported by Steve Murphy.
2870
34376418
AD
28712006-05-14 Akim Demaille <akim@lrde.epita.fr>
2872
2873 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
2874 * data/glr.cc: b4_location_flag is now b4_locations_flag.
2875
327afc7c
AD
28762006-05-14 Akim Demaille <akim@lrde.epita.fr>
2877
2878 Implement --trace=m4.
2879 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
2880 * src/output.c (output_skeleton): When set, pass -dV to m4.
2881
2882 Factor the handling of flags in m4.
2883 * src/output.c (prepare): Rename the muscle names debug, defines,
2884 error_verbose to debug_flag, defines_flag, error_verbose_flag.
2885 * data/c.m4: Adjust.
2886 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
2887 Use b4_define_flag_if to define other b4_FLAG_if macros.
2888 (b4_location_if): As a consequence, rename as...
2889 (b4_locations_if): this, for consistency.
2890 Adjust all the skeletons.
2891
ba9ecd19
AD
28922006-05-14 Akim Demaille <akim@lrde.epita.fr>
2893
2894 * etc/bench.pm: Shorten bench names.
2895
4e83ea15
AD
28962006-05-14 Akim Demaille <akim@lrde.epita.fr>
2897
2898 * src/output.h, src/output.c (error_verbose): Move to...
2899 * src/getargs.h, src/getargs.c: here.
2900 Sort the flags.
2901 Adjust dependencies.
2902
6e93d810
PE
29032006-05-13 Paul Eggert <eggert@cs.ucla.edu>
2904
2905 * data/c.m4 (b4_copyright): Put the special exception for Bison
2906 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
2907 uses changed. Suggested by Akim Demaille. Also, wrap the
2908 copyright notice, in case it is longer than 80 columns. Replace
2909 comma by newline after title.
6e93d810 2910
eaea13f5
PE
29112006-05-11 Paul Eggert <eggert@cs.ucla.edu>
2912
2913 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
2914 incompatibility, not a bug. Mention that it wasn't fixed as of
2915 flex 2.5.33.
2916
3cf084ec
AD
29172006-05-11 Akim Demaille <akim@lrde.epita.fr>
2918
2919 * examples/extexi: Enforce the precedence of concatenation over
2920 >>.
0a9f1c7d 2921 Reported by Tommy Nordgren.
3cf084ec 2922
32c96bd7
AD
29232006-05-11 Akim Demaille <akim@lrde.epita.fr>
2924
2925 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
2926 with the member "token".
f94705b2 2927 Reported by Martin Nylin.
32c96bd7 2928
eaea13f5
PE
29292006-05-08 Paul Eggert <eggert@cs.ucla.edu>
2930
2931 * data/glr.c: Switch to Bison 2.2 special-exception language in
2932 the copyright notice. Use more-regular format for titles and
2933 copyright notices.
2934 * data/glr.cc: Likewise.
2935 * data/location.cc: Likewise.
2936 * data/yacc.cc: Likewise.
2937 * doc/bison.texinfo (Conditions): Document this.
2938 * NEWS: likewise. Upgrade version to 2.2.
2939
6e2d1146
AD
29402006-04-27 Akim Demaille <akim@lrde.epita.fr>
2941
2942 * data/glr.cc: Remove dead code.
2943
47671055
PE
29442006-04-25 Paul Eggert <eggert@cs.ucla.edu>
2945
2946 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
2947 that variable and the line breaks the bootstrap. Problem reported
2948 by Juan M. Guerrero.
2949
ed2e6384
AD
29502006-04-24 Akim Demaille <akim@lrde.epita.fr>
2951
2952 * doc/bison.texinfo (Multiple start-symbols): New.
2953
3cedc2dc
AD
29542006-04-24 Akim Demaille <akim@lrde.epita.fr>
2955
2956 * etc/README, etc/bench.pl: New.
2957
b2ddc3f3
AD
29582006-04-03 Akim Demaille <akim@lrde.epita.fr>
2959
2960 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
2961 rule.
2962 Reported by Mickael Labau.
2963 * tests/input.at (Torturing the Scanner): Test it.
2964
91e3ac9a
PE
29652006-03-16 Paul Eggert <eggert@cs.ucla.edu>
2966
2967 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
2968 Problem reported by Bob Rossi.
2969
29702006-03-13 Paul Eggert <eggert@cs.ucla.edu>
2971
2972 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
2973 and didn't really work.
2974 For the index, use @ifnotinfo, not @iftex.
2975 Minor cleanups of spacing and terminology.
2976
5cf61e93
AD
29772006-03-12 Akim Demaille <akim@lrde.epita.fr>
2978
2979 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
2980 of AT_NAME_PREFIX when %name-prefix is not used.
2981
aa08666d
AD
29822006-03-12 Akim Demaille <akim@lrde.epita.fr>
2983
2984 Apply --prefix to C++ skeletons too: they change the namespace.
2985 The test suite already exercize these cases.
2986 * data/c++.m4 (b4_namespace): New.
2987 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
2988 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
2989 * data/yacc.c, data/glr.c: Remove a useless `[]'.
2990 * doc/bison.texinfo: Document it.
2991 (Option Cross Key): Use @multitable in all formats. It looks
2992 nicer, even in TeX outputs.
2993 (Rules): Use the same code whatever the output type is.
2994 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
2995 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
2996 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 2997
45567173
AD
29982006-03-10 Akim Demaille <akim@lrde.epita.fr>
2999
3000 * TODO: Remove dead items.
3001
e9d8f881 30022006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
3003
3004 * doc/FAQ: Remove, merged into...
3005 * doc/bison.texinfo (FAQ): this.
3006 * doc/Makefile.am (EXTRA_DIST): Adjust.
3007
c095d689
AD
30082006-03-10 Akim Demaille <akim@lrde.epita.fr>
3009
3010 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
3011 even if empty.
3012 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
3013 * doc/bison.texinfo (Calc++ Scanner): Use it.
3014
6e0f8287
PE
30152006-03-09 Paul Eggert <eggert@cs.ucla.edu>
3016
3017 Fix two nits reported by twlevo, plus one more that I discovered.
3018
3019 * src/assoc.h (assoc_to_string): Give a name to the arg, as
3020 this is the usual Bison style.
3021 * src/location.h (location_print): Likewise.
3022
3023 * src/reader.h (token_name): Likewise.
3024
d6b771c3
PE
30252006-03-08 Paul Eggert <eggert@cs.ucla.edu>
3026
3027 Fix some nits reported by twlevo.
3028 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
3029 and "POSIX". Use more-modern syntax for URLs. Mention C++
3030 and ask for Java. Don't hardwire OS version numbers. Add
3031 copyright notice.
3032 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
3033 * src/conflicts.c (solved_conflicts_obstack): Now static.
3034
1e137b71
JD
30352006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3036
3037 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
3038 page. Say "you can use it" not "you may use it" as on the web page;
3039 we're describing capabilities not granting permission.
3040
73f2e47e
PE
30412006-03-06 Paul Eggert <eggert@cs.ucla.edu>
3042
6d05403d
PE
3043 * data/glr.c (yyresolveLocations): Rename local variables to avoid
3044 shadowing warnings. Use usual patter for iterating through RHS.
3045 * tests/glr-regression.at
3046 (Uninitialized location when reporting ambiguity):
3047 Modify yylex so that it uses its argument, rather than trying
3048 to rely on ARGSUSED (which doesn't work for gcc with warnings).
3049 const char -> char const.
3050
73f2e47e
PE
3051 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
3052 Don't use tabs inside commands; it messes up 'ps'.
3053 Problem reported by twlevo.
3054
8710fc41
JD
30552006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
3056
3057 * tests/glr-regression.at (Uninitialized location when reporting
3058 ambiguity): New test case.
3059 * data/glr.c (yyresolveLocations): New function, which uses
3060 YYLLOC_DEFAULT.
3061 (yyresolveValue): Invoke yyresolveLocations before reporting an
3062 ambiguity.
3063 * doc/bison.texinfo (Default Action for Locations): Note
3064 YYLLOC_DEFAULT's usage for ambiguity locations.
3065 (GLR Semantic Actions): Cross-reference those notes.
3066
ae952af2
JD
30672006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
3068
3069 * tests/glr-regression.at (Leaked semantic values when reporting
3070 ambiguity): Remove unnecessary union and type declarations.
3071 (Leaked lookahead after nondeterministic parse syntax error): New test
3072 case.
3073 * data/glr.c (yyparse): Check for zero stacks remaining before
3074 attempting to shift the lookahead so that you don't lose it.
3075
35ee866a
JD
30762006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3077
3078 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
3079 * tests/glr-regression.at (Leaked semantic values when reporting
3080 ambiguity): New test case.
3081 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
3082 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
3083 now unnecessary yystackp parameter.
3084 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
3085 destructors can be called.
3086
3087 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
3088 in existing testcases.
3089
520181ab
JD
30902006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3091
3092 Don't leak semantic values for parent RHS when a user action cuts the
3093 parser, and clean up related code a bit.
3094 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
3095 cuts parse): Rename to...
3096 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
3097 for leaked parent RHS values.
3098 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
3099 between an unresolved state (non-empty chain of semantic options) and
3100 an incomplete one (signaled by an empty chain).
ae952af2 3101 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
3102 successfully or unsuccessfully resolved yyGLRState to...
3103 (yyresolveValue): ... here so that yyresolveValue always leaves a
3104 yyGLRState with consistent data and thus is easier to understand.
3105 Remove the yyvalp and yylocp parameters since they are always just
3106 taken from the yys parameter. When reporting a discarded merged value
3107 in debugging output, note that it is incompletely merged. Document the
3108 interface.
3109 (yyresolveAction): If resolving any of the RHS states fails, destroy
3110 them all rather than leaking them. Thus, as long as user actions are
3111 written to clean up the RHS correctly, yyresolveAction always cleans up
3112 the RHS of a semantic option. Document the interface.
3113
18d9185c
PE
31142006-02-27 Paul Eggert <eggert@cs.ucla.edu>
3115
3116 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
3117 led to a segmentation fault in GNU Pascal. Problem reported
3118 by Waldek Hebisch.
3119
841a7737
JD
31202006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
3121
3122 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
3123 mid-rule action inside a nonterminal symbol in order to declare a
3124 destructor for its semantic value.
3125
fc3f467f
PE
31262006-02-16 Paul Eggert <eggert@cs.ucla.edu>
3127
3128 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
3129 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
3130 __cplusplus && ! defined _STDLIB_H && !
3131 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
3132 defined free))]: Include <stdlib.h> rather than rolling our own
3133 declarations of malloc and free, to avoid problems with
3134 incompatible declarations (using 'throw') C++'s stdlib.h. This
3135 should fix Debian bug 340012
3136 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
3137 reported by Guillaume Melquiond.
3138
a3af26dd
PE
31392006-02-13 Paul Eggert <eggert@cs.ucla.edu>
3140
4d7bc38c
PE
3141 * NEWS: Clarify symbols versus types in unused-value warnings.
3142
a3af26dd
PE
3143 * configure.ac (AC_INIT): Bump version number.
3144
4e26c69e
PE
31452006-02-13 Paul Eggert <eggert@cs.ucla.edu>
3146
3147 * NEWS: Version 2.1a.
3148 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
3149 since C99 requires this.
3150
498e897c
PE
31512006-02-11 Paul Eggert <eggert@cs.ucla.edu>
3152
3153 * m4/c-working.m4: New file.
3154 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
3155
57bb17ca
PE
31562006-02-10 Paul Eggert <eggert@cs.ucla.edu>
3157
3158 * Makefile.maint: Merge from coreutils.
3159
0be105dc
PE
31602006-02-09 Paul Eggert <eggert@cs.ucla.edu>
3161
3162 More portability fixes for problems summarized by Nelson H. F. Beebe.
3163
3164 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
3165 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
3166 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
3167 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
3168 messes up because C++ code is compiled in 32-bit mode but linked
3169 in 64-bit mode.
3170
6fc0c024
PE
31712006-02-08 Paul Eggert <eggert@cs.ucla.edu>
3172
3173 More portability fixes for problems summarized by Nelson H. F. Beebe.
3174
7870f699
PE
3175 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
3176 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
3177
6fc0c024
PE
3178 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
3179 nodist_PROGRAMS, since we don't need to actually compile the
3180 example if we're just doing a plain 'make'. This avoids bothering
3181 the installer unnecessarily about problems due to weird C++
3182 compilers.
3183
fe6c2fde
PE
31842006-02-06 Paul Eggert <eggert@cs.ucla.edu>
3185
3186 More portability fixes for problems summarized by Nelson H. F. Beebe.
3187
3188 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
3189 than #include "...", and compile with -I'.'. The old method was
3190 not portable, according to Posix and the C standard, and it does
3191 not work with Sun C 5.7, where previous #line directives affect
3192 the working directory used in later #include "..." directives.
3193
927b425b
JMG
31942006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3195
3196 Various DJGGP specific issues in /djgpp
3197
d9735e9e
PE
31982006-02-02 Paul Eggert <eggert@cs.ucla.edu>
3199
3200 More portability fixes for problems summarized by Nelson H. F. Beebe.
3201
3202 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
3203 '#include <map>' works and that you can apply ++ to iterators.
3204
5a6755af
PE
32052006-02-01 Paul Eggert <eggert@cs.ucla.edu>
3206
67a0dc4f
PE
3207 Work around portability problems summarized by Nelson H. F. Beebe in
3208 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
3209
8c86f0ef
PE
3210 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
3211 that '#include <string>' works.
3212
de35dd59
PE
3213 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
3214 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
3215 "warning: sorry: semantics of inline function static data `const
3216 unsigned char translate_table[262]' are wrong (you'll wind up with
3217 multiple copies)".
3218
67a0dc4f
PE
3219 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
3220 or, xor to not_, and_, or_, and xor_, respectively. This works
3221 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
3222 random system header somewhere that includes the equivalent of
3223 <iso646.h>.
3224
5a6755af
PE
3225 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
3226 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 3227 Suite Version 2.0.
5a6755af 3228
3f001415
JD
32292006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
3230
3231 During deterministic GLR operation, user actions should be able to
3232 influence the parse by changing yychar. To make this easier to fix and
3233 to make glr.c easier to evolve in general, don't maintain yytoken in
3234 parallel with yychar; just compute yytoken when needed.
3235 * tests/glr-regression.at (Incorrect lookahead during deterministic
3236 GLR): Check that setting yychar in a user action has the intended
3237 effect.
3238 * data/glr.c (yyGLRStack): Remove yytokenp member.
3239 (yyclearin): Don't set *yytokenp.
3240 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
3241 yychar rather than *yytokenp to determine the current lookahead.
3242 Compute yytoken locally when needed.
3243 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
3244 point to.
3245
3246 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
3247 after `--report' documentation.
3248
e2a8c0f5
PE
32492006-01-30 Paul Eggert <eggert@cs.ucla.edu>
3250
3251 * src/parse-gram.y (grammar_declaration): Location of printer
3252 symbol is @1, not list->location. Bug reported by twlevo.
3253 * tests/input.at (Incompatible Aliases): Adjust to above change.
3254
6b702268
PE
32552006-01-29 Paul Eggert <eggert@cs.ucla.edu>
3256
27622431
PE
3257 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
3258 all the test at once. This makes the output easier to read in the
3259 normal case.
3260
6b702268
PE
3261 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
3262 got from <http://bro-ids.org/download.html>. The bug is that
3263 when two actions appeared in succession, the second one was
3264 scanned before the first one was added to the grammar rule
3265 as a midrule action. Bison then output the incorrect warning
3266 "parse.y:905.17-906.36: warning: unused value: $3".
3267 * src/parse-gram.y (BRACED_CODE, action): These are no longer
3268 associated with a value.
3269 (rhs): Don't invoke grammar_current_rule_action_append.
3270 (action): Invoke it here instead.
3271 * src/reader.c (grammar_midrule_action): Now extern.
3272 (grammar_current_rule_action_append): Don't invoke
3273 grammar_midrule_action; that is now the scanner's job.
3274 * src/reader.h (last_string, last_braced_code_loc):
3275 (grammar_midrule_action): New decls.
3276 * src/scan-gram.l (last_string): Now extern, sigh.
3277 (last_braced_code_loc): New extern variable.
3278 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
3279 rule already has an action.
3280 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
3281 * tests/input.at (AT_CHECK_UNUSED_VALUES):
3282 Add some tests to check that the above changes fixed the bug.
3283
d40ba6c2
PE
32842006-01-27 Paul Eggert <eggert@cs.ucla.edu>
3285
3286 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
3287 All used changed. Check whether the symbol has a destructor,
3288 not whether it is typed.
3289 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
3290 that the values are still reported as unused. All line numbers
3291 adjusted.
3292
401aace6
PE
32932006-01-23 Paul Eggert <eggert@cs.ucla.edu>
3294
3295 Work around a bug in bro 0.8, which underparenthesizes its
3296 definition of YYLLOC_DEFAULT.
3297 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
3298 their arguments.
3299 * data/lalr1.cc: Likewise.
3300 * data/yacc.cc: Likewise.
3301
06f01bc4
PE
33022006-01-22 Paul Eggert <eggert@cs.ucla.edu>
3303
401aace6
PE
3304 Work around a bug in Pike 7.0, and give the Pike folks a
3305 better way to override the usual int widths.
3306 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
3307 user can override the types.
3308 (short): #undef, to work around a bug in Pike 7.0.
3309 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
3310 (union yyalloc.yyss): Use yytype_int16 rather than short.
3311 All uses changed.
3312 (yysigned_char): Remove.
3313 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
3314 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
3315 * tests/regression.at (Web2c Actions): Adjust to above changes.
3316
3317 * src/reader.c (check_and_convert_grammar): New function.
3318 (reader): Close the input file even if something went wrong during
3319 parsing. Minor file descriptor leak reported by twlevo.
3320
06f01bc4
PE
3321 * src/assoc.c (assoc_to_string): Use a default: abort (); case
3322 to pacify gcc -Wswitch-default.
3323 * src/scan-gram.l (adjust_location): Use a default: break; case
3324 to pacify gcc -Wswitch-default.
3325 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
3326 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3327 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3328 Move these decls to scan-skel.l, since they don't need to be
3329 visible elsewhere.
3330 * src/scan-skel.l: Accept the above decls.
3331 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
3332 is used.
3333
02650b7f
PE
33342006-01-21 Paul Eggert <eggert@cs.ucla.edu>
3335
3336 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
3337 since we don't want to insist on a version number at the start
3338 of the changelog every time.
3339 * Makefile.maint: Sync from coreutils a bit better.
3340 (sc_trailing_blank): Renamed from sc_trailing_space.
3341 All uses changed.
3342 (sc_no_if_have_config_h, sc_require_config_h):
3343 (sc_prohibit_assert_without_use): New rules.
3344 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
3345 (sc_dd_max_sym_length): Fix leading spaces in rule.
3346 (sc_system_h_headers): Prefix with @.
3347 (sc_useless_cpp_parens, m4-check): Output line numbers.
3348 (changelog-check): Allow version only in head.
3349 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
3350 satisfy new Makefile.maint rule.
3351 * data/glr.c: Likewise.
3352 * data/glr.cc: Likewise.
3353 * data/lalr1.cc: Likewise.
3354 * data/yacc.c: Likewise.
3355 * lib/ebitsetv.c: Likewise.
3356 * lib/lbitset.c: Likewise.
3357 * lib/subpipe.c: Likewise.
3358 * lib/timevar.c: Likewise.
3359 * src/system.h: Likewise.
3360 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
3361 * djgpp/Makefile.maint: Add copyright notice.
3362 * djgpp/README.in: Likewise.
3363 * djgpp/config.bat: Likewise.
3364 * djgpp/config.site: Likewise.
3365 * djgpp/config_h.sed: Likewise.
3366 * djgpp/djunpack.bat: Likewise.
3367 * djgpp/config.sed: Fix copyright notice to match standard format.
3368 * djgpp/subpipe.h: Likewise.
3369 * lib/bitsetv-print.c: Likewise.
3370 * lib/bitsetv.c: Likewise.
3371 * lib/subpipe.h: Likewise.
3372 * lib/timevar.c: Likewise.
3373 * lib/timevar.h: Likewise.
3374 * djgpp/subpipe.c: Use standard recipe for config.h.
3375 * lib/abitset.c: Likewise.
3376 * lib/bitset.c: Likewise.
3377 * lib/bitset_stats.c: Likewise.
3378 * lib/bitsetv-print.c: Likewise.
3379 * lib/bitsetv.c: Likewise.
3380 * lib/ebitsetv.c: Likewise.
3381 * lib/get-errno.c: Likewise.
3382 * lib/lbitset.c: Likewise.
3383 * lib/subpipe.c: Likewise.
3384 * lib/timevar.c: Likewise.
3385 * lib/vbitset.c: Likewise.
3386 * tests/local.at: Likewise.
3387 * src/scan-gram.l: Don't include verify.h, since system.h does
3388 that for us.
3389 * .x-sc_require_config_h: New file.
3390 * .x-sc_unmarked_diagnostics: New file.
3391
287c78f6
PE
33922006-01-20 Paul Eggert <eggert@cs.ucla.edu>
3393
287c78f6
PE
3394 Be a bit more systematic about using 'abort'.
3395 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
3396 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
3397 Put 'default: abort ();' before some other case, to satisfy older
3398 pedantic compilers.
3399 * lib/bitset_stats.c (bitset_stats_init): Likewise.
3400 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
3401 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
3402 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
3403 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
3404 (get_decision_str, get_orientation_str, get_node_alignment_str):
3405 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
3406 (get_linestyle_str, get_arrowstyle_str): Likewise.
3407 * src/conflicts.c (resolve_sr_conflict):
3408 Use a default case rather than one for the one remaining enum
3409 value, to catch invalid enum values as well.
3410 * src/lalr.c (set_goto_map, map_goto):
3411 Prefer "assert (FOO);" to "if (!FOO) abort ();".
3412 * src/nullable.c (nullable_compute, token_definitions_output):
3413 Likewise.
3414 * src/reader.c (packgram, reader): Likewise.
3415 * src/state.c (transitions_to, state_new, state_reduction_find):
3416 Likewise.
3417 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
3418 (symbol_pack): Likewise.
3419 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
3420 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
3421 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
3422 * src/system.h: Don't include <assert.h>.
3423 (assert): New macro.
3424
3425 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
3426 (Destructor Decl, Parser Function, Pure Calling):
3427 Describe rules for braces inside C code more carefully.
287c78f6 3428
c66dfadd
PE
34292006-01-19 Paul Eggert <eggert@cs.ucla.edu>
3430
c21493b8
PE
3431 Fix some porting glitches found by Nelson H. F. Beebe.
3432 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
3433 compilers that don't understand that abort () does not return.
3434 * src/state.c (transitions_to): Likewise.
3435 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
3436 that '#include <cstdlib>' works.
3437 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
3438 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
3439 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
3440 for the benefit of some pre-C99 compilers.
3441
b6e3facf
PE
3442 * bootstrap: Undo changes to gnulib files that autoreconf made.
3443
c66dfadd
PE
3444 Minor fixups to get 'make maintainer-check' to work.
3445 * configure.ac: Don't use -Wnested-externs, as it's incompatible
3446 with the new verify.h implementation.
3447 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
3448 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
3449 * data/yacc.c (YYUSE): Likewise.
3450 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
3451 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
3452 * src/parse-gram.y (declaration): Don't pass a string constant
3453 to a function that expects char *, since GCC might complain
3454 about the constant value.
3455 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
3456 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
3457 before #defining them.
3458 * tests/glr-regression.at
3459 (Incorrectly initialized location for empty right-hand side in GLR):
3460 In yyerror, use the msg arg.
3461 (Corrupted semantic options if user action cuts parse):
3462 (Incorrect lookahead during deterministic GLR):
3463 (Incorrect lookahead during nondeterministic GLR):
3464 Don't name a local var 'index'; it shadows string.h's 'index'.
3465
ed94ef2a
AD
34662006-01-19 Akim Demaille <akim@epita.fr>
3467
3468 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
3469 location, not just parts of it.
3470
e9ad4aec
PE
34712006-01-18 Paul Eggert <eggert@cs.ucla.edu>
3472
d6ca7905
PE
3473 * NEWS: Document the fact that multiple %unions are now allowed.
3474 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
3475 * TODO: This feature is now implemented, so remove it from
3476 the wishlist.
d6ca7905 3477
ef1b70e0
PE
3478 * Makefile.maint: Merge with coreutils Makefile.maint.
3479 (CVS_LIST): Use build-aux version if available.
3480 (VERSION_REGEXP): New macro.
3481 (syntax-check-rules): Add sc_no_if_have_config_h,
3482 sc_prohibit_assert_without_use, sc_require_config_h,
3483 sc_useless_cpp_parens.
3484 (sc_obsolete_symbols): Check for O_NDELAY.
3485 (sc_dd_max_sym_length): Track coreutils.
3486 (sc_unmarked_diagnostics): Look in all files, not just *.c.
3487 (sc_useless_cpp_parens): New rule.
3488 (news-date-check): Look for version or today's date.
3489 (changelog-check): Don't require version number near head.
3490 (copyright-check): Use current year instead of hardwiring 2005.
3491 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
3492 (announcement): Add --gpg-key-ID.
3493
3494 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
3495 with "file system".
3496
2073ce56 3497 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
3498 array. Problem reported by twlevo.
3499 * src/reader.c (packgram): Prepend a new sentinel before ritem.
3500 * src/lalr.c (build_relations): Rely on new sentinel.
3501 * src/gram.c (gram_free): Adjust to new sentinel.
3502
b7691f15
JD
35032006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
3504
3505 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
3506 yylookaheadNeeds. All uses updated.
3507 (yysplitStack): Rename local yynewLookaheadStatuses to
3508 yynewLookaheadNeeds.
3509 * data/glr-regression.at (Incorrect lookahead during nondeterministic
3510 GLR): In comments, change `lookahead status' to `lookahead need'.
3511
ddee1b06
PH
35122006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3513
3514 * data/glr.c (yysplitStack): A little stylistic rewrite.
3515
12f4614d
PH
35162006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3517
3518 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
3519
32c29292
JD
35202006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
3521
3522 * doc/bison.texinfo: Fix some typos.
3523 (GLR Semantic Actions): New subsection discussing special
3524 considerations because GLR semantic actions might be deferred.
3525 (Actions): Mention look-ahead usage of yylval.
3526 (Actions and Locations): Mention look-ahead usage of yylloc.
3527 (Special Features for Use in Actions): Add YYEOF entry and mention it
3528 in the yychar entry.
3529 In the yychar entry, remove mention of the local yychar case (pure
3530 parser) since this is irrelevant information when writing semantic
3531 actions and since it's already discussed in `Bison Symbols' where
3532 yychar is otherwise described as an external variable.
3533 In the yychar entry, don't call it the `current' look-ahead since it
3534 isn't when semantic actions are deferred.
3535 In the yychar and yyclearin entries, add note about deferred semantic
3536 actions.
3537 Add yylloc and yylval entries discussing look-ahead usage.
3538 (Look-Ahead Tokens): When discussing yychar, don't call it the
3539 `current' look-ahead, and do mention yylval and yylloc.
3540 (Error Recovery): Cross-reference `Action Features' when mentioning
3541 yyclearin.
3542 (Bison Symbols): In the yychar entry, don't call it the `current'
3543 look-ahead.
3544 In the yylloc and yylval entries, mention look-ahead usage.
3545
de366a2f 35462006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
3547
3548 * tests/glr-regression.at: Update copyright year to 2006.
3549
bf70fa87
JD
35502006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3551
3552 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
3553 use during nondeterministic operation to track which stacks have
3554 actually needed the current lookahead.
3555 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
3556 Allocate, deallocate, resize, and otherwise shuffle space for
3557 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
3558 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
3559 appropriately during nondeterministic operation.
3560 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
3561 members to store the current lookahead to be used by the deferred
3562 user action.
3563 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
3564 from which the RHS is taken. Set the lookahead members of the new
3565 yySemanticOption according to the lookahead status for stack yyk.
3566 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
3567 yyaddDeferredAction.
3568 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
3569 members of yySemanticOption before invoking yyuserAction, and then set
3570 them back to their current values afterward.
3571 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
3572 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
3573 * tests/glr-regression.at: Remove `.' from the ends of recent test case
3574 titles for consistency.
3575 (Leaked merged semantic value if user action cuts parse): In order to
3576 suppress lint warnings, use arguments in merge function, and assign
3577 char value < 128 in main.
3578 (Incorrect lookahead during deterministic GLR): New test case.
3579 (Incorrect lookahead during nondeterministic GLR): New test case.
3580
05449a2c
JD
35812006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3582
de366a2f 3583 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
3584 !yyvaluep as signal that no semantic value is available to print.
3585 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
3586 to print a semantic value.
3587
4158e0a1 35882006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 3589
4158e0a1
JD
3590 * tests/glr-regression.at: For consistency with my newer test cases,
3591 don't thank myself.
3592
d659304d
JD
35932006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
3594
3595 * data/glr.c (yyresolveValue): When merging semantic options, if at
3596 least one user action succeeds but a later one cuts the parse, then
3597 destroy the semantic value before returning rather than leaking it.
3598 (yyresolveStates): If a user action cuts the parse and thus
3599 yyresolveValue fails, ignore the (unset) semantic value rather than
3600 corrupting the yyGLRState, and empty the semantic options list since
3601 the user actions should have called all necessary destructors.
3602 Simplify code with YYCHK.
3603 * tests/glr-regression.at (Corrupted semantic options if user action
3604 cuts parse): New test case.
3605 (Undesirable destructors if user action cuts parse): New test case.
3606 Before applying any of this patch, this test case never actually failed
3607 for me... but only because the corrupted semantic options usually
3608 masked this bug.
3609 (Leaked merged semantic value if user action cuts parse): New test
3610 case.
3611
6ec2c0f2
AD
36122006-01-05 Akim Demaille <akim@epita.fr>
3613
3614 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
3615
1b9c21fb
PE
36162006-01-04 Paul Eggert <eggert@cs.ucla.edu>
3617
3618 * data/c.m4 (b4_c_modern): New macro, with a new provision for
3619 _MSC_VER. Problem reported by Cenzato Marco.
3620 (b4_c_function_def): Use it.
3621 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
3622 b4_c_modern.
3623 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
3624 than rolling our own.
3625
84866159
AD
36262006-01-04 Akim Demaille <akim@epita.fr>
3627
3628 Also warn about non-used mid-rule values.
3629 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
3630 member.
3631 (symbol_list_new): Adjust.
3632 * src/reader.c (symbol_typed_p): New.
3633 (grammar_rule_check): Use it.
3634 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
3635 Check its rule.
3636 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
3637 Use it.
3638 * tests/actions.at (Exotic Dollars): Adjust.
3639
378f4bd8
AD
36402006-01-04 Akim Demaille <akim@epita.fr>
3641
3642 * src/reader.c (grammar_midrule_action): If $$ is set in a
3643 mid-rule, move the `used' bit to its lhs.
3644 * tests/input.at (Unused values): New.
3645 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
3646
e2a21b6f
PE
36472006-01-03 Paul Eggert <eggert@cs.ucla.edu>
3648
54662697
PE
3649 * doc/bison.texinfo (Bison Options): Say more accurately what
3650 --yacc does.
3651 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
3652 about declarations in the grammar when in Yacc mode, as POSIX does
3653 not require a diagnostic when the grammar uses extensions.
3654
3655 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
3656
073f9288
PE
3657 Warn about dubious constructions like "%token T T".
3658 Reported by twlevo.
3659 * src/symtab.h (struct symbol.declared): New member.
3660 * src/symtab.c (symbol_new): Initialize it to false.
3661 (symbol_class_set): New arg DECLARING, specifying whether
3662 this is a declaration that we want to warn about, if there
3663 is more than one of them. All uses changed.
3664
1221b78a
PE
3665 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
3666 Allow multiple %union directives, whose contents concatenate.
3667 * src/parse-gram.y (grammar_declaration): Likewise.
3668 Use muscle_code_grow, so that we don't need stype_line any more.
3669 All uses changed.
3670
3671 * src/muscle_tab.c (muscle_grow): Fix comment.
3672
e2a21b6f
PE
3673 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
3674 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
3675 Update copyright year to 2006.
3676
8f7e3cf9
AD
36772006-01-03 Akim Demaille <akim@epita.fr>
3678
3679 Have glr.cc pass (some of) the calc.at tests.
3680 * data/glr.cc (b4_parse_param_orig): New.
3681 (b4_parse_param): Improve its definition, and bound it more
3682 clearly in the skeleton.
3683 (b4_epilogue): Append, instead of prepending, in order to keep
3684 #line consistency.
3685 Simplify the generation of auxiliary functions: locations and
3686 purity are mandated.
3687 (b4_global_tokens_and_yystype): Honor it.
3688 * data/location.cc (c++.m4): Don't include it.
3689 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
3690 and AT_SKEL_CC_IF.
3691 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
3692 AT_LALR1_CC_IF.
3693 Be sure to initialize the first position's filename.
3694 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
3695 mandated anyway.
3696 (AT_CHECK_CALC_GLR_CC): New.
3697 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
3698
3953ed88
AD
36992006-01-02 Akim Demaille <akim@epita.fr>
3700
3701 * src/output.c (output_skeleton): Don't hard wire the inclusion of
3702 c.m4.
0a96ba81 3703 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
3704 * data/glr.cc: Do not include stack.hh.
3705
9ecafbbf
AD
37062006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
3707
3708 * data/glr.c: Reformat whitespace with tabs.
3709 (b4_lpure_formals): Remove this unused m4 macro.
3710 * tests/cxx-type.at: Reformat whitespace with tabs.
3711 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
3712 since it's a member. Rename type to isNterm for clarity.
3713
c4d497a0
AD
37142005-12-29 Akim <akim@sulaco.local>
3715
3716 Let glr.cc catch up with symbol_value_print.
3717 * data/glr.cc (b4_yysymprint_generate): Replace by...
3718 (b4_yy_symbol_print_generate): this.
3719 (yy_symbol_print, yy_symbol_value_print): Declare them.
3720
4517da37
PE
37212005-12-28 Paul Eggert <eggert@cs.ucla.edu>
3722
3723 * src/location.h (boundary): Note that a line or column equal
3724 to INT_MAX indicates an overflow.
3725 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
3726 (rule_length_overflow, increment_rule_length, add_column_width):
3727 New functions.
3728 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
3729 (<SC_BRACED_CODE>"}"):
3730 Use increment_rule_length rather than incrementing it by hand.
3731 (adjust_location, handle_syncline): Diagnose overflow.
3732 (handle_action_dollar, handle_action_at):
3733 Fix bug with monstrosities like $-2147483648.
3734 Remove now-unnecessary checks.
3735 (scan_integer): Verify assumptions and remove now-unnecessary checks.
3736 (convert_ucn_to_byte): Verify assumptions.
3737 (handle_syncline): New arg LOC. All callers changed.
3738 Don't store through a value derived from char const * pointer.
3739
3740 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
3741 GCC warnings.
3742
e3233bf6
PE
37432005-12-27 Paul Eggert <eggert@cs.ucla.edu>
3744
3745 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
3746 Remove unnecessary forward static decls.
3747
8f3596a6
AD
37482005-12-27 Akim Demaille <akim@epita.fr>
3749
3750 * src/reader.c (grammar_current_rule_check): Also check that $$
3751 is used.
3752 Take the rule to check as argument, hence rename as...
3753 (grammar_rule_check): this.
3754 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
3755 Rename as...
3756 (grammar_rule_begin, grammar_rule_end): these, for consistency.
3757 (grammar_midrule_action, grammar_symbol_append): Now static.
3758 * tests/torture.at (input): Don't rely on the default action
3759 being always performed.
3760 * tests/calc.at: "Set" $$ even when the action is "cut" with
3761 YYERROR or other.
3762 * tests/actions.at (Exotic Dollars): Instead of using unused
3763 values, check that the warning is issued.
3764
721be13c
PE
37652005-12-22 Paul Eggert <eggert@cs.ucla.edu>
3766
3767 * NEWS: Improve wording for unused-value warnings.
3768
a0af42fc
AD
37692005-12-22 Akim Demaille <akim@epita.fr>
3770
3771 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
3772 (b4_yysymprint_generate): Rename as...
3773 (b4_yy_symbol_print_generate): this.
3774 Generate yy_symbol_print instead of yysymprint.
3775 Generate also yy_symbol_value_print, and use it.
3776
affac613
AD
37772005-12-22 Akim Demaille <akim@epita.fr>
3778
721be13c 3779 * NEWS: Warn about unused values.
affac613
AD
3780 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
3781 a `used' member.
3782 (symbol_list_n_get, symbol_list_n_used_set): New.
3783 (symbol_list_n_type_name_get): Use symbol_list_n_get.
3784 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
3785 * src/reader.c (grammar_current_rule_check): Check that values are
3786 used.
3787 * src/symtab.c (symbol_print): Accept 0.
3788 * tests/existing.at: Remove the type information.
3789 Empty the actions.
3790 Remove useless actions (beware of mid-rule actions: perl -000
3791 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
3792 * tests/actions.at (Exotic Dollars): Use unused values.
3793 * tests/calc.at: Likewise.
3794 * tests/glr-regression.at (No users destructors if stack 0 deleted):
3795 Likewise.
3796
3797 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
3798 rule_useful_p.
3799
9d9b8b70
PE
38002005-12-21 Paul Eggert <eggert@cs.ucla.edu>
3801
8bb4c753
PE
3802 Undo 2005-12-01 tentative license wording change. The wording is
3803 still being reviewed by the lawyers, and we don't want to wait for
3804 them before publishing a test release. For now, revert to the
3805 previous wording.
3806 * NEWS: Undo 2005-12-01 change.
3807 * data/glr.c: Revert to previous license wording.
3808 * data/glr.cc: Likewise.
3809 * data/lalr1.cc: Likewise.
3810 * data/location.cc: Likewise.
3811 * data/yacc.c: Likewise.
3812
9d9b8b70
PE
3813 * NEWS: Reword %destructor vs YYABORT etc.
3814 * data/glr.c: Use American spacing, for consistency.
3815 * data/glr.cc: Likewise.
3816 * data/lalr1.cc: Likewise.
3817 * data/yacc.c: Likewise.
3818 * data/yacc.c: Reformat comments slightly.
3819 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
3820 for consistency. Fix some spelling errors and reword recently-included
3821 text slightly.
3822 * tests/cxx-type.at: Cast results of malloc, for C++.
3823
2c3b392a
AD
38242005-12-21 Joel E. Denny <address@hidden>
3825
3826 * tests/cxx-type.at: Construct a tree, count the parents of shared
3827 nodes, and free each node once and only once. Previously, the memory
3828 for semantic values was leaked instead.
3829
d6cff4dc
AD
38302005-12-21 Joel E. Denny <address@hidden>
3831
3832 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
3833 (yylval, yylloc): If pure, #define to yystackp->yyval and
3834 yystackp->yyloc similar to yychar and yynerrs.
3835 (yyparse): If pure, remove local yylval and yylloc. Add local
3836 yystackp to accommodate pure definitions of yylval and yylloc.
3837 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
3838 yylvalp and yyllocp to &yylval and &yylloc.
3839 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
3840 namespace. Previously, nerrs and char were missing, but lval and lloc
3841 weren't necessary.
3842 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
3843 yylvalp and yyllocp parameters since, if pure, these are now always
3844 accessible through yystackp. If not pure, they are still accessible
3845 globally.
3846 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
3847 `if (YYID (N))' to pacify lint.
3848
a85284cf
AD
38492005-12-21 Akim Demaille <akim@epita.fr>
3850
3851 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
3852 destroy the RHS symbols of a rule.
3853 * data/yacc.c (yylen): Initialize to 0.
3854 Keep its value to the number of items to possibly shift.
3855 In particular, a regular successful parse that ends on YYFINAL by
3856 a (internal) YYACCEPT must not have yylen != 0.
3857 (yyerrorlab, yyreturn): Pop the RHS.
3858 Reorder a bit to emphasize the `shifting' bits of code.
3859 (YYPOPSTACK): Now accept a number of items to pop.
3860 * data/lalr1.cc: Likewise.
3861 * data/glr.c: Formatting changes.
3862 Use goto instead of fall through.
3863 * doc/bison.texinfo (Destructor Decl): Complete.
3864
d508c281
JMG
38652005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3866
3867 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
3868 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
3869 * djgpp/config.bat: Replace every occurence of the file name
3870 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
3871 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
3872 * djgpp/config.sed: Replace every occurence of the file name
3873 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
3874 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
3875 * djgpp/djunpack.bat: DJGPP specific file.
3876 * djgpp/fnchange.lst: DJGPP specific file.
3877 * djgpp/README.in: Add new information about how to unpack the bison
3878 source on MSDOS and other systems which have 8.3 file name restrictions
3879 using djunpack.bat and fnchange.lst.
3880
3e7a2cd9
PE
38812005-12-12 Paul Eggert <eggert@cs.ucla.edu>
3882
3883 * bootstrap (build_cvs_prefix): Remove; unused.
3884 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
3885 when getting gnulib.
3886
38872005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
3888
3889 * data/glr.c: Reorder typedef declarations for structs to match order
3890 of struct declarations.
3891 Rename yystack everywhere to yystackp except in yyparse where it's not
3892 a pointer.
3893 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
3894 consistency.
3895 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
3896 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
3897 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
3898 lint.
3899
877519f8
PE
39002005-12-09 Paul Eggert <eggert@cs.ucla.edu>
3901
0eca5a39
PE
3902 * tests/sets.at (Accept): Fix typos in regular expression used to
3903 sed out the final state number.
3904
2cec9080
PE
3905 Work around portability problem on Solaris 10: flex-generated
3906 files include <stdio.h> before <config.h>, which messes up
3907 because the latter defines __EXTENSIONS__. Address the problem
3908 by creating two new little files that include <config.h> first,
3909 then include the flex-generated files. Rewrite everyone else
3910 to include <config.h> first, as well.
3911 * lib/timevar.c: Always include "config.h".
3912 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
3913 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
3914 (EXTRA_bison_SOURCES): New macro.
3915 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
3916 * src/system.h: Don't include config.h.
3917 * src/LR0.c: Include <config.h> first.
3918 * src/assoc.c: Likewise.
3919 * src/closure.c: Likewise.
3920 * src/complain.c: Likewise.
3921 * src/conflicts.c: Likewise.
3922 * src/derives.c: Likewise.
3923 * src/files.c: Likewise.
3924 * src/getargs.c: Likewise.
3925 * src/gram.c: Likewise.
3926 * src/lalr.c: Likewise.
3927 * src/location.c: Likewise.
3928 * src/main.c: Likewise.
3929 * src/muscle_tab.c: Likewise.
3930 * src/nullable.c: Likewise.
3931 * src/output.c: Likewise.
3932 * src/parse-gram.y: Likewise.
3933 * src/print.c: Likewise.
3934 * src/print_graph.c: Likewise.
3935 * src/reader.c: Likewise.
3936 * src/reduce.c: Likewise.
3937 * src/relation.c: Likewise.
3938 * src/state.c: Likewise.
3939 * src/symlist.c: Likewise.
3940 * src/symtab.c: Likewise.
3941 * src/tables.c: Likewise.
3942 * src/uniqstr.c: Likewise.
3943 * src/vcg.c: Likewise.
3944
877519f8
PE
3945 * src/parse-gram.y: Fix minor problems uncovered by lint.
3946 (current_lhs, current_lhs_location): Now static.
3947 (current_assoc): Remove unused variable.
3948
3949 Cleanups so that Bison-generated parsers have less lint.
3950 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
3951 Prepend /*ARGSUSED*/, for lint's sake.
3952 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
3953 definition if 'lint' is defined.
3954 (YYID): New macro (or function, if lint).
3955 All uses of /*CONSTCOND*/0 replaced by YYID(0).
3956 * data/yacc.c: Likewise.
3957 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
3958 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
3959 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
3960 is C++ only.
3961 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
3962 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
3963 Use YYID(0) rather than 0, for lint.
3964 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
3965 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
3966
f5228370
PE
39672005-12-07 Paul Eggert <eggert@cs.ucla.edu>
3968
3969 * tests/glr-regression.at
3970 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
3971 Close memory leak reported by twlevo.
3972
69ce078b
PE
39732005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
3974
6ff99711
PE
3975 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
3976 all stacks.
3977 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
3978 * tests/glr-regression.at (No users destructors if stack 0 deleted):
3979 New test case.
3980 (Duplicated user destructor for lookahead): This test now is expected
3981 to succeed.
3982
af3412cd
PE
39832005-12-01 Paul Eggert <eggert@cs.ucla.edu>
3984
32b5b719 3985 * NEWS: Document the following change.
af3412cd
PE
3986 * data/yacc.c: Say "parser skeleton" rather than "file", since
3987 it's no longer just a file.
3988 * data/glr.c: Grant a special exception for C GLR parsers, that
3989 reads like the already-existing exception for C LALR(1) parsers.
3990 * data/glr.cc: Likewise.
3991 * data/lalr1.cc: Likewise.
3992 * data/location.cc: Likewise.
3993 * data/yacc.c: Reword the "written by" statement to clarify that
3994 it was the parser skeleton, not the entire output file.
3995 * data/glr.c: Written by Paul Hilfinger.
3996 * data/glr.cc: Written by Akim Demaille.
3997 * data/lalr1.cc: Likewise.
3998
035aa4a0
PE
39992005-11-18 Paul Eggert <eggert@cs.ucla.edu>
4000
d9963c85
PE
4001 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
4002 Fix typos in previous change that broke 'make check'.
4003 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
4004 supported in C.
4005 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
4006 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
4007 We can revert this once things settle down.
4008
035aa4a0
PE
4009 * src/conflicts.c (conflicts_print): Don't print file name twice
4010 when %expect fails because there were no conflicts.
4011 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
4012 change.
4013 * tests/conflicts.at (%expect not enough, %expect too much):
4014 (%expect with reduce conflicts): Adjust to new behavior.
4015
40162005-11-18 Akim Demaille <akim@epita.fr>
4017
4018 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
4019 errors.
4020 * NEWS: Document this.
4021 * doc/bison.texinfo (Expect Decl): Likewise.
4022
d1ff7a7c
AD
40232005-11-16 Akim Demaille <akim@epita.fr>
4024
4025 Generalize the display of semantic values and locations in traces.
4026 * data/glr.c (yy_reduce_print): Fix indices (again).
4027 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
4028 literal integers.
4029 * data/lalr1.cc (yyreduce_print): Rename as...
4030 (yy_reduce_print): this.
4031 Display values and locations.
4032 * data/yacc.c (yy_reduce_print): Likewise.
4033 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
4034 (yysymprint): Move higher to be visible from yy_reduce_print).
4035 (yyparse): Adjust.
4036 * tests/calc.at: Adjust the expected length of the traces.
4037
6de5398d
AD
40382005-11-14 Akim Demaille <akim@epita.fr>
4039
4040 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
4041 from 1 to N, while values and location start at 0.
4042 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
4043
a1373f55
AD
40442005-11-14 Akim Demaille <akim@epita.fr>
4045
4046 * data/glr.c (yy_reduce_print): Fix the $ number.
4047
613d8952
AD
40482005-11-14 Akim Demaille <akim@epita.fr>
4049
4050 "Use" parse parameters.
4051 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
4052 * data/glr.c, data/glr.cc: Use them.
4053 * data/glr.c (YYUSE): Have a C++ definition that supports
4054 non-pointer types.
4055
b2741627
AD
40562005-11-14 Akim Demaille <akim@epita.fr>
4057
4058 * data/glr.c (yyexpandGLRStack): Declare only if defined.
4059
5059b5c8
AD
40602005-11-14 Akim Demaille <akim@epita.fr>
4061
42249483
AD
4062 * data/glr.cc: New.
4063 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 4064
4626a15d
AD
40652005-11-12 Akim Demaille <akim@epita.fr>
4066
4067 Let position and location be PODs.
4068 * data/location.cc (position::initialize, location::initialize): New.
4069 (position::position, location::location): Define only if
4070 b4_location_constructors is defined.
4071 * data/lalr1.cc (b4_location_constructors): Define it for backward
4072 compatibility.
4073 * doc/bison.texinfo (Initial Action Decl): Use initialize.
4074
40752005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
4076
4077 * data/lalr1.cc: Move the body of the ctor and dtor into the
4078 parser file (instead of the header).
4079 Wrap the implementations in a "namespace yy".
4080
40812005-11-12 Akim Demaille <akim@epita.fr>
4082
4083 Have glr.c include its header file when created.
4084 * data/glr.c (b4_shared_declarations): New.
4085 Output them verbatim in the parser if !%defines, otherwise
4086 output then in the header file, and include it instead.
4087
1989d947
AD
40882005-11-11 Akim Demaille <akim@epita.fr>
4089
4090 * data/glr.c: Comment changes.
4091
40922005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
4093
4094 When yydebug, report semantic and location values for reductions.
4095 * data/glr.c (yy_reduce_print): Report the semantic values and the
4096 locations.
4097 (YY_REDUCE_PRINT): Adjust.
4098 (yyglrReduce): Use them.
4099 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
4100 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
4101 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
4102 traces.
4103
02998094
AD
41042005-11-10 Akim Demaille <akim@epita.fr>
4105
4106 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
4107 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
4108 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
4109
5210672f
PE
41102005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
4111
4112 * m4/cxx.m4, examples/Makefile.am: Don't build
4113 examples/calc++ if no C++ compiler is available. (trivial change)
4114
a8991a1d
AD
41152005-11-09 Akim Demaille <akim@epita.fr>
4116
4117 * src/scan-skel.l: Use a couple of asserts.
4118
36b5e963
AD
41192005-11-03 Akim Demaille <akim@epita.fr>
4120
4121 In some (weird) cases, the final state number is incorrect.
4122 Reported by Alexandre Duret-Lutz.
4123 * src/LR0.c (state_list_append): Remove the computation of
4124 final_state.
4125 (save_reductions): Do it here.
4126 (get_state): Alpha conversion.
4127 (generate_states): Use a for loop.
4128 * src/gram.h (item_number_is_rule_number)
4129 (item_number_is_symbol_number): New.
4130 * src/state.c: Use assert.
4131 * src/system.h: Include assert.h.
4132 * tests/sets.at (Accept): New.
4133
44e7ead1
PH
41342005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4135
4136 * data/glr.c (yyfill): Adjust comment.
36b5e963 4137 (yyresolveAction): Initialize default location properly
44e7ead1
PH
4138 for empty right-hand sides.
4139 (yydoAction): Ditto.
4140 Add comment explaining apparently dead code.
36b5e963
AD
4141 * tests/glr-regression.at
4142 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 4143 New test.
36b5e963 4144
e10a80ee
PE
41452005-10-30 Paul Eggert <eggert@cs.ucla.edu>
4146
4147 * bootstrap (cleanup_gnulib): New function. Use it to clean up
4148 gnulib when interrupted. This fixes some race conditions and
4149 works around some portability problems (one noted by Paul
4150 Hilfinger).
4151
067b32ee
AD
41522005-10-22 Akim <akim@epita.fr>
4153
4154 * Makefile.cfg: Adjust to config -> build-aux.
4155 Reported by twledo.
4156
4b367315
AD
41572005-10-21 Akim Demaille <akim@epita.fr>
4158
4159 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
4160 the %parse-params.
4161 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
4162 * data/yacc.c (b4_Pure_if): Rename as...
4163 (b4_yacc_pure_if): this.
4164 (YY_SYMBOL_PRINT, yyparse): Adjust.
4165 * doc/bison.texinfo: Formatting changes.
4166
24cc23d9
AD
41672005-10-21 Akim Demaille <akim@epita.fr>
4168
4169 Finish the transition config -> build-aux.
4170 * configure.ac, Makefile.am: Use build-aux.
4171 * config/prev-version, config/announce-gen, config/Makefile.am:
4172 Move to...
4173 * build-aux/prev-version, build-aux/announce-gen,
4174 * build-aux/Makefile.am: here.
4175
d4476375
AD
41762005-10-14 Akim Demaille <akim@epita.fr>
4177
4178 * examples/calc++/test: Use set -x only when VERBOSE.
4179
302c0aee
PE
41802005-10-13 Paul Eggert <eggert@cs.ucla.edu>
4181
4182 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
4183 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
4184
7625ec2c
AD
41852005-10-13 Akim Demaille <akim@epita.fr>
4186
4187 * src/scan-skel.l: Output the base name parts of the parser and
4188 header file names.
302c0aee 4189 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
4190 additional checks.
4191 Use this to exercise C++ outputs in subdirs.
4192 Reported by Oleg Smolsky.
4193
ba0fe3c7
PE
41942005-10-12 Paul Eggert <eggert@cs.ucla.edu>
4195
4196 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
4197 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
4198 Problem reported by John P. Hartmann.
4199 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
4200 already defined it.
4201
9b8a5ce0
AD
42022005-10-12 Akim Demaille <akim@epita.fr>
4203
4204 * src/parse-gram.y (version_check): Exit 63 to please missing
4205 (stands for "version mismatch).
4206 * tests/input.at, doc/bison.texinfo: Adjust.
4207
4f6e011e
PE
42082005-10-10 Paul Eggert <eggert@cs.ucla.edu>
4209
4210 Work around portability problems with Visual Age C compiler
4211 (xlc and xlC_r) reported by John P. Hartmann.
4212 * data/location.cc (initial_column, initial_line): Remove.
4213 All uses replaced by 0 and 1.
4214 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
4215 that xlc complains about.
4216 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 4217 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 4218 as __STDC__.
4d7aa45e
PE
4219 * data/yacc.c (YYMODERN_C): New macro, which also looks at
4220 __STDC_VERSION__. Use it everywhere instead of looking at
4221 __STDC__ and __cplusplus.
4f6e011e 4222
a1b3bf8c
AD
42232005-10-10 Akim Demaille <akim@epita.fr>
4224
4225 * examples/calc++/test: Be quiet unless VERBOSE.
4226
412e44aa
PE
42272005-10-05 Paul Eggert <eggert@cs.ucla.edu>
4228
2a4647a3
PE
4229 * data/c.m4 (yydestruct, yysymprint):
4230 Use YYUSE instead of casting to void.
4231 * data/glr.c (YYUSE): New macro.
4232 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
4233 Use it instead of rolling our own.
4234 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
4235 (YYCHK1):
4236 Use /*CONSTCOND*/ to suppress lint warnings.
4237 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
4238 (YY_STACK_PRINT): Use 'false' not '0'.
4239 (YYUSE): New macro.
4240 (yysymprint_, yydestruct_): Use it instead of rolling our own.
4241 * data/yacc.c (YYUSE): New macro.
4242 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
4243 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
4244 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
4245
4246
412e44aa
PE
4247 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
4248 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
4249
88c6637f
PE
42502005-10-04 Paul Eggert <eggert@cs.ucla.edu>
4251
2f4f028d
PE
4252 Undo the parts of the unlocked-I/O change that substituted
4253 putc or puts for printf. This might hurt performance a bit,
4254 but some people prefer the printf style.
4255 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
4256 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
4257 All uses replaced by YYFPRINTF and YYDPRINTF.
4258 * data/yacc.c: Likewise.
4259 * lib/bitset.c (bitset_print): Likewise.
4260 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
4261 putc and puts.
4262 * lib/lbitset.c (debug_lbitset): Likewise.
4263 * src/closure.c (print_firsts, print_fderives): Likewise.
4264 * src/gram.c (grammar_dump): Likewise.
4265 * src/lalr.c (look_ahead_tokens_print): Likewise.
4266 * src/output.c (escaped_output): Likewise.
4267 (user_actions_output): Break apart two printfs.
4268 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
4269 * src/reduce.c (reduce_print): Likewise.
4270 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
4271 * src/system.h: Include unlocked-io.h rathe than stdio.h.
4272
88c6637f
PE
4273 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
4274 Use assignments rather than casts-to-void to suppress
4275 unused-variable warnings. This pacifies 'lint'.
4276 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
4277 unused-variable warnings.
4278
fb32e373
JMG
42792005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4280
4281 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
4282
edb8f44f
PE
42832005-10-02 Paul Eggert <eggert@cs.ucla.edu>
4284
fb9c0b33
PE
4285 Use unlocked I/O for a minor performance improvement on hosts like
4286 GNU/Linux and Solaris that support unlocked I/O. The basic idea
4287 is to use the gnlib unlocked-io module, and to prefer putc and
4288 puts to printf when either will work (since the latter doesn't
4289 come in an unlocked flavor).
4290 * bootstrap (gnulib_modules): Add unlocked-io.
4291 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
4292 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
4293 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
4294 and similarly for puts and putc and printf.
4295 * data/yacc.c: Likewise.
4296 * lib/bitset.c (bitset_print): Likewise.
4297 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
4298 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
4299 to printf.
4300 * lib/lbitset.c (debug_lbitset): Likewise.
4301 * src/closure.c (print_firsts, print_fderives): Likewise.
4302 * src/gram.c (grammar_dump): Likewise.
4303 * src/lalr.c (look_ahead_tokens_print): Likewise.
4304 * src/output.c (escaped_output): Likewise.
4305 (user_actions_output): Coalesce two printfs.
2f4f028d 4306 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
4307 * src/reduce.c (reduce_print): Likewise.
4308 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 4309 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 4310
edb8f44f
PE
4311 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
4312 this confuses xgettext.
4313
b50d2359
AD
43142005-10-02 Akim Demaille <akim@epita.fr>
4315
4316 * bootstrap (gnulib_modules): Add strverscmp.
4317 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
4318 * m4/.cvsignore: Add strverscmp.m4.
4319 * src/parse-gram.y (%require): New token, new rule.
4320 (version_check): New.
4321 * src/scan-gram.l (%require): Adjust.
4322 * tests/input.at (AT_REQUIRE): New.
4323 Use it.
4324 * doc/bison.texinfo (Require Decl): New.
4325 (Calc++ Parser): Use %require.
4326
21667f64
AD
43272005-10-02 Akim Demaille <akim@epita.fr>
4328
4329 * data/location.cc: New.
4330
2b81e969
AD
43312005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
4332 Akim Demaille <akim@epita.fr>
4333
4334 Make sure -odir/foo.cc creates dir/location.hh etc.
4335 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
4336 (spec_file_prefix, spec_verbose_file, spec_graph_file)
4337 (spec_defines_file): Now const.
4338 (dir_prefix): New.
4339 (short_base_name): Remove.
4340 * src/files.c: Adjust.
4341 (dirname.h): Include.
4342 (base_name): Don't prototype it.
4343 (finput): Remove, duplicates gram_in.
4344 (full_base_name, short_base_name): Replace by...
4345 (all_but_ext, all_but_tab_ext): these.
4346 (compute_base_names): Rename as...
4347 (compute_file_name_parts): this.
4348 Update to compute the new variables, including dir_prefix.
4349 Adjust dependencies.
4350 * src/output.c (prepare): Output them.
4351 * src/reader.c: Adjust to use gram_in, not finput.
4352 * src/scan-skel.l (@dir_prefix@): New.
4353
ad6a9b97
JMG
43542005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4355
4356 * lib/subpipe.c: New function end_of_output_subpipe() added
4357 to allow support for non-posix systems. This is a no-op function
4358 for posix systems.
4359
4360 * lib/subpipe.h: New function end_of_output_subpipe() added
4361 to allow support for non-posix systems. This is a no-op function
4362 for posix systems.
4363
4364 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
4365 handle the lack of pipe/fork functionality on non-posix systems.
4366
4367 * djgpp/Makefile.maint: DJGPP specific file.
4368
4369 * djgpp/README.in: DJGPP specific file.
4370
4371 * djgpp/config.bat: DJGPP specific configuration file.
4372
4373 * djgpp/config.sed: DJGPP specific configuration file.
4374
4375 * djgpp/config.site: DJGPP specific configuration file.
4376
4377 * djgpp/config_h.sed: DJGPP specific configuration file.
4378
4379 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
4380
4381 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
4382
fc695704
AD
43832005-10-02 Akim Demaille <akim@epita.fr>
4384
4385 * data/location.cc: New, extract from...
4386 * data/lalr1.cc: here.
4387 (location.hh): Include it after the user prologue, in case the
4388 filename type is defined by the user.
4389 Forward declation location and position before the pre-prologue.
4390 (yyresult_): Rename as...
4391 (yyresult): this, it's a local variable, not an attribute.
4392 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
4393
43942005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
4395
4396 * examples/extexi: Restore the #line generation.
4397
fb9712a9
AD
43982005-09-30 Akim Demaille <akim@epita.fr>,
4399 Alexandre Duret-Lutz <adl@gnu.org>
4400
4401 Move the token type and YYSTYPE in the parser class.
4402 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
4403 (parser::token): New, from the moved free definition of tokens.
4404 (parser::semantic_value): Now a full definition instead of an
4405 indirection to YYSTYPE.
4406 (b4_post_prologue): No longer included in the header file, but
4407 in the implementation file.
4408 * doc/bison.texi (C+ Language Interface): Update.
4409 * src/parse-gram.y: Support unary %define.
4410 * tests/actions.at: Define global_tokens_and_yystype for backward
4411 compatibility until we update the tests.
4412 * tests/calc.at: Idem.
4413 (first_line, first_column, last_line, last_column): Define for lalr1.cc
4414 to simplify the code.
4415
55f0c7b1
PE
44162005-09-29 Paul Eggert <eggert@cs.ucla.edu>
4417
4418 Port to SunOS 4.1.4, which lacks strtoul and strerror.
4419 Ah, the good old days! Problem reported by Peter Klein.
4420 * bootstrap (gnulib_modules): Add strerror, strtoul.
4421 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
4422 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
4423
fb9712a9 44242005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
4425
4426 * data/c.m4 (b4_error_verbose_if): New.
4427 * data/lalr1.cc: Use it.
4428 (YYERROR_VERBOSE_IF): Remove.
4429 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
4430 parser members, replaced by...
4431 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
4432 local variables.
4433 (yysyntax_error_): Takes the state number as argument.
4434 (yyreduce_print_): Use the argument yyrule, not the former
4435 attribute yyn_.
4436
8a6f72f3
PE
44372005-09-26 Paul Eggert <eggert@cs.ucla.edu>
4438
4439 * bootstrap (gnulib_modules): Add verify.
4440 * lib/.cvsignore: Add verify.h.
4441 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
4442 * src/system.h (verify): Remove.
4443 Include verify.h instead.
4444 * src/tables.c (tables_generate): Use new API for 'verify'.
4445
0d50976f
PE
44462005-09-21 Paul Eggert <eggert@cs.ucla.edu>
4447
ebc3737e
PE
4448 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
4449 local variables whose names begin with 'yy'.
4450 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
4451 Trivial changes from Joel E. Denny.
4452
0d50976f
PE
4453 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
4454 it itself.
4455 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
4456 don't use alloca any more.
4457
4458 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
4459 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 4460 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
4461 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
4462 to match yacc.c, to test more hosts.
4463
a05b79df
PE
44642005-09-20 Paul Eggert <eggert@cs.ucla.edu>
4465
55289366
PE
4466 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
4467 doesn't affect behavior.
4468 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
4469 Solaris, AIX, MSC.
4470 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
4471 This works a bit better with glibc, if user code has already included
4472 stdlib.h.
4473 * doc/bison.texinfo (Bison Parser): Document that users can't
4474 arbitrarily use malloc and free for other purposes. Document
4475 that <alloca.h> and <malloc.h> might be included.
4476 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
4477 user must declare alloca.
4478
a05b79df
PE
4479 * HACKING (release): Forwarn the Translation Project about
4480 stable releses.
4481
3ab2ca22
AD
44822005-09-20 Akim Demaille <akim@epita.fr>
4483
4484 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
4485
a9739e7c
PE
44862005-09-19 Paul Eggert <eggert@cs.ucla.edu>
4487
a702593e
PE
4488 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
4489 (YYSTACK_ALLOC_MAXIMUM): Use it.
4490 (yysyntax_error): New function.
4491 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
4492 multiple syntax errors are reported, and alloca is being used.
4493 Instead, reallocate buffers twice as big each time, so that
4494 we waste at most half the allocated memory. Start with a small
4495 (128-byte) buffer that will suffice in most cases anyway.
4496 Use yysyntax_error to do most of the work.
4497
4498 * doc/bison.texinfo (Error Reporting, Table of Symbols):
4499 yynerrs is the number of errors reported, not the number of
4500 errors encountered.
4501
a9739e7c
PE
4502 * tests/glr-regression.at (Duplicated user destructor for lookahead):
4503 Mark it as expected to fail.
4504 Cast result of malloc; problem reported by twlevo@xs4all.nl.
4505 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
4506 Don't start user-code symbols with "yy", to avoid name space problems.
4507
f479c6c6
AD
45082005-09-19 Akim Demaille <akim@epita.fr>
4509
4510 Remove the traits, failed experiment.
4511 It never proved useful, and anyway because of the current
4512 definition, it was not possible to have several specialization of
4513 this traits, making it useless.
4514 * data/lalr1.cc (yy:traits): Remove.
4515 Inline its definitions in the parser class.
4516
e2586f82
AD
45172005-09-19 Akim Demaille <akim@epita.fr>
4518
4519 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
4520 least Mac OSX with a /usr/local install of gettext.
4521
2e8cf949
AD
45222005-09-19 Akim Demaille <akim@epita.fr>
4523
4524 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
4525 and yytoken for similarity with the other skeletons.
4526
c7fb0b90
AD
45272005-09-19 Akim Demaille <akim@epita.fr>
4528
4e26c69e 4529 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 4530
1bd0deda
PE
45312005-09-16 Paul Eggert <eggert@cs.ucla.edu>
4532
4533 * NEWS: Version 2.1.
4534
4535 * NEWS: Remove notice of yytname change, since it was never in an
4536 official release.
4537 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
4538 diagnostic.
4539 * src/output.c (prepare): Likewise.
4540 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
4541 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
4542 is not defined. This is an awful hack, but it's enough for now.
4543 All callers changed.
4544 * tests/glr-regression-at (make_value): Args are const pointers now,
4545 to avoid GCC warning.
4546 (Duplicated user destructor for lookahead): New test. Currently
4547 skipped. It fails on my host but I'm not sure it'll always fail.
4548
45492005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
4550
4551 * src/symtab.h (struct symbol): Declare the printer and destructor
4552 as const, to avoid accidental calls to free.
4553 (symbol_destructor_set, symbol_printer_set): Adjust.
4554 * src/symtab.c: Adjust.
4555
1bd0deda 45562005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
4557
4558 * data/c.m4 (b4_token_enums): New.
4559 (b4_token_defines): Rename as...
4560 (b4_token_enums_defines): this.
4561 (b4_token_defines): New, output only the #defines.
4562 * data/yacc.c, data/glr.c: Adjust.
4563 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
4564 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
4565 as default values.
4566
dbcdae2d
AD
45672005-09-16 Akim Demaille <akim@epita.fr>
4568
4569 * data/lalr1.cc (yylex_): Remove, inline its code.
4570 (yyreport_syntax_error_): Remove, replaced by...
4571 (yysyntax_error_): this which returns a string and leaves to the
4572 caller the call to the users' error function.
4573 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
4574 Move from members of the parser object...
4575 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
4576 to local variables of the parse function.
4577
70d8f291
AD
45782005-09-16 Akim Demaille <akim@epita.fr>
4579
4580 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
4581 since it's in Bison's name space.
4582
b47dbebe
PE
45832005-09-15 Paul Eggert <eggert@cs.ucla.edu>
4584
ae199bf1
PE
4585 * data/glr.c (yyresolveValue): Add default case to pacify
4586 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
4587
b47dbebe
PE
4588 * NEWS: Document when yyparse started to return 2.
4589 * doc/bison.texinfo (Parser Function): Document when yyparse
4590 returns 2.
4591
4592 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
4593 (b4_filename_type): Renamed back from b4_file_name_type. All uses
4594 changed.
4595 (class position): file_name -> filename (reverting). All uses changed.
4596
45972005-09-14 Paul Eggert <eggert@cs.ucla.edu>
4598
4599 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
4600 do anything if $@ exists. This reverts part of the 2005-07-07
4601 patch.
4602
00292f66
PE
46032005-09-11 Paul Eggert <eggert@cs.ucla.edu>
4604
4605 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
4606 contains obsolete information and isn't worth distributing as a
4607 separate file anyway.
4608 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
4609 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
4610 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
4611 (yyparse): Abort if user code uses longjmp to throw an unexpected
4612 value.
4613
a420f962
PE
46142005-09-09 Paul Eggert <eggert@cs.ucla.edu>
4615
00292f66
PE
4616 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
4617 Suggested by twlevo@xs4all.nl.
4618
127287e9
PE
4619 * data/glr.c (YYCHK1): Do not assume YYE is in range.
4620 This avoids a diagnostic from gcc -Wswitch-enum.
4621 Problem reported by twlevo@xs4all.nl.
4622
a420f962
PE
4623 * doc/bison.texinfo: Don't use "filename", as per GNU coding
4624 standards. Use "file name" or "file" or "name", depending on
4625 the context.
4626 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
4627 not to hack/foo.tab.c.
4628 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
4629 * data/glr.c: b4_filename -> b4_file_name.
4630 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
4631 All uses changed.
4632 (class position): filename -> file_name. All uses changed.
4633 * data/yacc.c: b4_filename -> b4_file_name.
4634 * lib/bitset.h: filename -> file_name in local vars.
4635 * lib/bitset_stats.c: Likewise.
4636 * src/files.c: Likewise.
4637 * src/scan-skel.l ("@output ".*\n): Likewise.
4638 * src/files.c (file_name_split): Renamed from filename_split.
4639 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
4640
46412005-09-08 Paul Eggert <eggert@cs.ucla.edu>
4642
4643 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
4644 to accommodate latest gnulib.
4645
4646 * tests/glr-regression.at (Duplicate representation of merged trees):
4647 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
4648
4649 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
4650 needed.
4651
42a6501d
PE
46522005-08-26 Paul Eggert <eggert@cs.ucla.edu>
4653
4654 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
4655 All uses changed. Invoke user destructor after an error during a
4656 split parse (trivial change from Joel E. Denny).
4657
4658 * tests/glr-regression.at
4659 (User destructor after an error during a split parse): New test case.
4660 Problem reported by Joel E. Denny in:
4661 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
4662
ef9a1faf
PE
46632005-08-25 Paul Eggert <eggert@cs.ucla.edu>
4664
5b4aaf78
PE
4665 * README-cvs: Give URLs for recommended tools.
4666 Mention Gzip version problem, and bootstrapping issues.
4667 Remove troubleshooting section, as it's somewhat obsolete.
4668
b5240ba5
PE
4669 * bootstrap (no_cache): New var, to accommodate different wget
4670 variants. Use it instead of '-C off'. Problem reported by
4671 twlevo@xs4all.nl.
4672
ef9a1faf
PE
4673 * data/glr.c (yydestroyStackItem): New function.
4674 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
4675 debugging information. Problem reported by Joel E. Denny.
4676
e6efa9da
AD
46772005-08-25 Akim Demaille <akim@epita.fr>
4678
4679 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
4680
adc90f13
PE
46812005-08-24 Paul Eggert <eggert@cs.ucla.edu>
4682
4683 * data/glr.c (yyrecoverSyntaxError, yyreturn):
4684 Don't invoke destructor on unresolved entries.
4685 * tests/glr-regression.at
4686 (User destructor for unresolved GLR semantic value): New test case.
4687 Problem reported by Joel E. Denny in:
4688 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
4689
f9315de5
PE
46902005-08-21 Paul Eggert <eggert@cs.ucla.edu>
4691
15d29c1f
PE
4692 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
4693 Add strnlen.c.
4694 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
4695 lib-prefix.m4, po.m4.
4696
dd5f2af2
PE
4697 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
4698 in yydestruct diagnostic, since it might not be an error.
4699 Problem reported by Joel Denny near end of
4700 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 4701 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
4702 * data/yacc.c (yyreturn): Likewise.
4703 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
4704
4705 * src/files.c: Remove obsolete FIXME comment.
4706
4707 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
4708 with the other templates, and to fix bogus run-on messages such
4709 as the one reported at the end of
4710 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
4711 All callers changed to avoid the newline.
4712 (yyprocessOneStack): Output two lines rather than one, to accommodate
4713 the above change. This changes the debug output format slightly.
4714
f9315de5
PE
4715 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
4716 reported by Joel E. Denny in
4717 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
4718 (trivial change).
4719 * tests/glr-regression.at (Duplicate representation of merged trees):
4720 New test, from Joel E. Denny in:
4721 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
4722 * THANKS: Add Joel E. Denny.
4723
4724 * configure.ac (AC_INIT): Bump to 2.0c.
4725
04098407
PE
47262005-07-24 Paul Eggert <eggert@cs.ucla.edu>
4727
4728 * NEWS: Version 2.0b.
4729
ca5d2013
PE
4730 * Makefile.am (SUBDIRS): Put examples before tests, so that
4731 "make check" doesn't finish with "All 1 tests passed".
4732
3d54b576
PE
4733 * tests/regression.at (Token definitions): Don't rely on
4734 AT_PARSER_CHECK for data that contains backslashes. It currently
4735 uses 'echo', and 'echo' isn't portable if its argument contains
4736 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
4737 that the byte '\0xff' is not printable in the C locale; it is,
4738 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
4739 not printable, so use '\0x81' to test.
4740
d53ae497
PE
4741 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
4742 version of GCC, since the macro is used with non-GCC compilers.
4743
fc01665e
PE
4744 Fix core dump reported by Pablo De Napoli in
4745 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
4746 * tests/regression.at (Invalid inputs with {}): New test.
4747 * src/parse-gram.y (token_name): Translate type before using
4748 it as an index.
4749
04098407
PE
4750 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
4751 the user's name space. All uses changed to __attribute__
4752 ((__unused__)).
4753 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
4754 Add __attribute__ ((__noreturn__)).
4755
4756 * etc/clcommit: Remove. We weren't using it, and it failed
4757 "make maintainer-distcheck".
4758 * Makefile.maint: Merge from coreutils.
4759 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
4760 (syntax-check-rules): Change list of rules as described below.
4761 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
4762 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
4763 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
4764 (sc_trailing_space): New rules.
4765 (sc_xalloc_h_in_src): Remove.
4766 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
4767 (sc_space_tab, sc_error_exit_success, sc_changelog):
4768 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
4769 (makefile-check, po-check, author_mark_check):
4770 (makefile_path_separator_check, copyright-check):
4771 Use grep -n, to make it easier to find violations.
4772 Use CVS_LIST and CVS_LIST_EXCEPT.
4773 (header_regexp, h_re): Remove.
4774 (dd_c): New macro.
4775 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
4776 (my-distcheck): Use more-modern GCC flags.
4777 (signatures, %.asc): Remove.
4778 (rel-files, announcement): Remove signatures.
4779 Restore old updating code, even though we don't use it, so
4780 that we're the same as coreutils.
4781 (alpha, beta, major): Depend on news-date-check.
4782 Make the upload commands.
4783
4784 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
4785 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
4786 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
4787 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
4788 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
4789 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
4790 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
4791 * tests/sets.at: Likewise.
4792
4793 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
4794 we comment out the Autoconf version number.
4795 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
4796 it's error-prone and "make maintainer-distcheck" rejects it.
4797
4798 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
4799 Indent calls to "error" to pacify "make maintainer-distcheck",
4800 when the calls are not intended to be translated.
4801 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
4802
4803 * src/Makefile.am (DEFS): Use +=, to pacify
4804 "make maintainer-distcheck".
4805 (bison_SOURCES): Add scan-skel.h.
4806 (sc_tight_scope): New rule, from coreutils.
4807
4808 * src/files.c (src_extension, header_extension):
4809 Now static, not extern.
4810 * src/getargs.c (short_options): Likewise.
4811 * src/muscle_tab.c (muscle_table): Likewise.
4812 * src/parse-gram.y (current_class, current_type, current_prec):
4813 Likewise.
4814 * src/reader.c (grammar_end, previous_rule_end): Likewise.
4815 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
4816 * src/main.c (main): Cast bindtextdomain and textdomain calls to
4817 void, to avoid warning when NLS is disabled.
4818 * src/output.c: Include scan-skel.h.
4819 (scan_skel): Remove decl, since scan-skel.h does this.
4820 (output_skeleton):
4821 Indent calls to "error" to pacify "make maintainer-distcheck".
4822 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
4823 * src/reader.h (gram_end, gram_lineno): New decls to pacify
4824 "make maintainer-distcheck".
4825 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
4826 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
4827 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
4828 (skel_lex_destroy, scan_skel): Move these decls to...
4829 * src/scan-skel.h: New file.
4830 * src/uniqstr.c (uniqstr_assert):
4831 Indent calls to "error" to pacify "make maintainer-distcheck".
4832
4833 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
4834 not @VAR@.
4835
4836 * tests/torture.at: Revamp to avoid misuse of atoi that
4837 "make maintainer-distcheck" complained about.
4838
4839 * examples/extexi (message): Don't print a message more than once,
4840 and omit line-number decoration that makes Emacs compile think
4841 that informative messages are worth worrying about.
4842
48432005-07-22 Paul Eggert <eggert@cs.ucla.edu>
4844
4845 * configure.ac: Update version number.
4846
4847 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
4848 accidentally.
4849 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
4850 autogenerated by the maintainer.
4851 * examples/calc++/.cvsignore: Add *.yy.
4852
4853 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
4854 * lib/bitset_stats.c (bitset_stats_init): Likewise.
4855 * lib/bitsetv.c (bitsetv_alloc): Likewise.
4856
4857 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
4858
4859 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
4860 from maintainer-distcheck about casting the argument of 'free'.
4861
4862 * NEWS: Mention recent yytname changes.
4863 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
4864
4865 * bootstrap: For translations that have not yet been upgraded to
4866 the new runtime-po domain, prime the pump by extracting the
4867 relevant strings from the obsolete translations. This code can be
4868 removed once the bison-runtime domain has been translated by each
4869 team.
4870
4871 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
4872 now that token names are already quoted.
4873
4874 Fix problem reported by Anthony Heading.
4875 * data/glr.c (YYTOKEN_TABLE): New macro.
4876 (yytname): Define if YYTOKEN_TABLE.
4877 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
4878 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
4879 (YYERROR_VERBOSE): Define the same way the other skeletons do.
4880 * src/output.c (prepare_symbols): Output token_table_flag.
4881
0ffda363
PE
48822005-07-21 Paul Eggert <eggert@cs.ucla.edu>
4883
4884 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
4885 again if the first call fails.
4886
4887 * data/glr.c (yytnamerr): New function.
4888 (yyreportSyntaxError): Use it to dequote most string literals.
4889 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
4890 with other skeletons. All uses changed.
4891 (yytnameerr_): New function.
4892 (yyreport_syntax_error): Use it to dequote most string literals.
4893 * data/yacc.c (yytnamerr): New function.
4894 (yyerrlab): Use it to decode most string literals.
4895 * doc/bison.texinfo (Decl Summary, Calling Convention):
4896 Clarify quoting convention of yytname.
4897 * src/output.c (prepare_symbols): Quote all names. This undoes
4898 the 2005-04-17 change, which is now accomplished (mostly) via
4899 changes in the parsers as described above.
4900 * tests/regression.at (Token definitions, Web2c Actions):
4901 Undo most 2005-04-17 change here, too.
4902
49032005-07-20 Paul Eggert <eggert@cs.ucla.edu>
4904
4905 Fix more problems reported by twlevo@xs4all.nl.
4906 * tests/cxx-type.at: Don't pipe output of ./types through sed to
4907 remove trailing spaces. This loses the exit status of ./types,
4908 and isn't needed since ./types shouldn't be emitting trailing
4909 spaces.
4910 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
4911 as the stack isn't valid in that case.
4912
4913 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4914 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4915 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4916 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
4917 is used.
4918 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
4919 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
4920 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
4921 Likewise.
4922
4923 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
4924 overly-picky compilers that reject 'char *foo = "bar";'.
4925
4926 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
4927 to FILE * parameter, not to stderr. This fixes a typo introduced
4928 in the 2005-07-12 change.
4929
4930 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
4931 warnings from GCC 4.
4932
4933 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
4934 (yyglrShiftDefer, yysplitStack):
4935 Remove unused parameters b4_pure_formals. All uses changed.
4936 (yyglrShift): Remove unused parameters b4_user_formals.
4937 All uses changed.
4938 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
4939
6100a9aa
PE
49402005-07-18 Paul Eggert <eggert@cs.ucla.edu>
4941
258b75ca
PE
4942 Destructor cleanups and regularization among the three skeletons.
4943 * NEWS: Document the behavior changes.
4944 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
4945 stack before failing, as the cleanup code will do it for us now.
4946 * data/lalr1.cc (yyerrlab): Likewise.
4947 * data/glr.c (yyparse): Pop everything off the stack before
4948 freeing it, so that destructors get called properly.
4949 * data/lalr1.cc (yyreturn): Likewise.
4950 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
4951 This is more consistent.
4952 * doc/bison.texinfo (Destructor Decl): Mention more reasons
4953 why destructors might be called. 1.875 -> 2.1.
4954 (Destructor Decl, Decl Summary, Table of Symbols):
4955 Some English-language cleanups for %destructor.
4956 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
4957 Add output line for destructor of start symbol.
4958 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
4959 because of that same extra output line.
4960
1a059451
PE
4961 * NEWS: Document minor wording changes in diagnostics of
4962 Bison-generated parsers.
4963 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
4964 Remove unused formals. All uses changed.
4965 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
4966 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
4967 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
4968 Rename yyoverflowab to yyexhaustedlab.
4969 When memory exhaustion occurs during syntax-error reporting,
4970 report it separately rather than in a single diagnostic; this
4971 eases translation.
4972 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
4973 (Memory Exhausted): Renamed from Parser Stack Overflow.
4974 Revamp wording slightly to prefer "memory exhaustion".
4975 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
4976
97460c78
PE
4977 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
4978
30757c8c
PE
4979 Add i18n support to the GLR skeleton. Partially fix the C++
4980 skeleton; a C++ expert needs to finish this. Remove debugging
4981 msgids; there's little point to having them translated, since they
4982 can be understood only by someone who can read the
4983 (English-language) source code.
4984
4985 Generate runtime-po/bison-runtime.pot automatically, so that we
4986 don't have to worry about garbage getting in that file. We'll
4987 make sure after the next official release that old msgids don't
4988 get lost. See
4989 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
4990
4991 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
4992 Now auto-generated.
4993 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
4994 Fix typos in explanations of the runtime file.
4995 * bootstrap: Change gettext keyword from YYI18N to YY_.
4996 Use standard Makefile.in.in in runtime-po, since we'll arrange
4997 for backward-compatible bison-runtime.po files in a different way.
4998 * data/glr.c (YY_): New macro, from yacc.c.
4999 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
5000 Translate messages intended for users.
5001 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
5002 the wording in the other skeletons. We don't know that the memory
5003 is virtual.
5004 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
5005 Use same method that yacc.c uses.
5006 Don't translate debugging messages.
5007 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
5008 it doesn't work (yet), and requires C++ expertise to fix.
5009 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
5010 Move defn to a more logical place, to be consistent with other
5011 skeletons.
5012 Don't translate debugging messages.
5013 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
5014 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
5015 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
5016 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
5017
ac8c5689
PE
5018 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
5019 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
5020 void, not int.
5021 * tests/glr-regression.at (Badly Collapsed GLR States):
5022 Likewise.
5023 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5024 yylex should return 0 at EOF rather than aborting.
5025
6100a9aa
PE
5026 Improve tests for stack overflow in GLR parser.
5027 Problem reported by twlevo@xs4all.nl.
5028 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
5029 All uses removed.
5030 (yyStackOverflow): Just longjmp, but with value 2 so that caller
5031 can handle the problem.
5032 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
5033 (yyparse): New local variable yyresult to record the result.
5034 Use result of setjmp to set it, rather than storing itinto
5035 struct.
5036 (yyDone): Remove label.
5037 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
5038 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
5039 if YYABORT is used).
5040 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
5041 yyparse status; put status > 1 into diagnostic.
5042 Check that status==2 works.
5043 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
5044 Use exit status 3 for failure to open (which shouldn't happen).
5045
15f40952
PE
50462005-07-17 Paul Eggert <eggert@cs.ucla.edu>
5047
67fd79c4
PE
5048 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
5049 1 on syntax error; just let yyparse do its thing.
5050 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
5051 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
5052 (Exploding the Stack Size with Alloca):
5053 (Exploding the Stack Size with Malloc):
5054 Expect exit status 2, not 1, since the parser is supposed to blow
5055 its stack. Problem reported by twlevo@xs4all.nl.
5056
15f40952
PE
5057 * data/glr.c (yyparse): Don't assume that the initial calls
5058 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
5059 Print a stack-overflow message and fail instead.
5060 Initialize the line-number information before creating the stack,
5061 so that the stack-overflow message can report line zero safely.
5062
f32c66b5
PE
50632005-07-14 Paul Eggert <eggert@cs.ucla.edu>
5064
a22ff96f 5065 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
5066 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
5067 (yyuserMerge): Provide a default case if b4_mergers is empty.
5068 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
5069 * tests/glr-regression.at
5070 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 5071 Add casts to pacify C++ compilers.
1beb0b24
PE
5072 * tests/glr-regression.at (Improper merging of GLR delayed action
5073 sets): Declare yylex before using it.
f32c66b5 5074 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
5075 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
5076 test for valgrind; valgrind is independent of g++.
5077 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
5078 for compatibility with POSIX 1003.1-2001 (if running coreutils).
5079 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
5080 Use a destructor, so that we can expand the stack. Change
5081 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 5082
d741bd1b
PE
50832005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5084
5085 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
5086 a valgrind failure. Problem reported by twlevo@xs4all.nl.
5087
0410a6e0
PE
50882005-07-13 Paul Eggert <eggert@cs.ucla.edu>
5089
5090 * PACKAGING: New file, suggested by Bruno Haible and taken from
5091 similar wording in gettext's PACKAGING file.
5092 * NEWS: Mention PACKAGING.
5093 * Makefile.am (EXTRA_DIST): Add PACKAGING.
5094
f7ab6a50
PE
50952005-07-12 Paul Eggert <eggert@cs.ucla.edu>
5096
baf785db 5097 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
5098 * bootstrap: Get runtime translations into runtime-po.
5099 Create runtime-po files automatically, if possible.
5100 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
5101 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
5102 does not infringe on the user's name space.
5103 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
5104 * doc/bison.texinfo (Internationalization): Revamp the English
5105 and Texinfo syntax a bit, to try to make it clearer.
5106 (Bison Options, Option Cross Key): Mention --print-localedir.
5107 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
5108 YYENABLE_NLS. Quote a bit more.
5109 * runtime-po/.cvsignore: New file.
5110 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
5111 * runtime-po/Rules-quot: Remove; now created by bootstrap.
5112 * runtime-po/quot.sed: Likewise.
5113 * runtime-po/boldquot.sed: Likewise.
5114 * runtime-po/en@quot.header: Likewise.
5115 * runtime-po/en@boldquot.header: Likewise.
5116 * runtime-po/insert-header.sin: Likewise.
5117 * runtime-po/remove-potcdate.sin: Likewise.
5118 * runtime-po/Makevars: Likewise.
5119 * runtime-po/LINGUAS: Likewise.
5120 * runtime-po/de.po: Likewise; we will rely on the translation project
5121 to maintain this, so "bootstrap" should get it.
0410a6e0 5122 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
5123 its value.
5124 * src/main.c (main): Bind the bison-runtime domain, too.
5125
51262005-07-12 Bruno Haible <bruno@clisp.org>
5127
5128 * data/yacc.c: Include <libintl.h> when NLS is enabled.
5129 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
5130 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
5131 * runtime-po: New directory.
5132 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
5133 $(DOMAIN).pot-update rule, so that old messages are never dropped.
5134 * runtime-po/Rules-quot: New file, copied from po/.
5135 * runtime-po/quot.sed: Likewise.
5136 * runtime-po/boldquot.sed: Likewise.
5137 * runtime-po/en@quot.header: Likewise.
5138 * runtime-po/en@boldquot.header: Likewise.
5139 * runtime-po/insert-header.sin: Likewise.
5140 * runtime-po/remove-potcdate.sin: Likewise.
5141 * runtime-po/Makevars: New file.
5142 * runtime-po/POTFILES.in: New file.
5143 * runtime-po/LINGUAS: New file.
5144 * runtime-po/bison-runtime.pot: New file.
5145 * runtime-po/de.po: New file.
5146 * m4/bison.m4: New file.
5147 * Makefile.am (SUBDIRS): Add runtime-po.
5148 (aclocaldir, aclocal_DATA): New variables.
5149 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
5150 Define aclocaldir.
5151 * src/getargs.c (usage): Document --print-localedir option.
5152 (PRINT_LOCALEDIR_OPTION): New enum item.
5153 (long_options): Add --print-localedir option.
5154 (getargs): Handle --print-localedir option.
5155 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
5156 (Internationalization): New section.
5157
22dda0f0
AD
51582005-07-12 Akim Demaille <akim@epita.fr>
5159
5160 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
5161 for consistency with the rest of the code.
5162 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
5163 Add separators.
5164
82b248ad
AD
51652005-07-12 Akim Demaille <akim@epita.fr>
5166
5167 * src/parse-gram.y: Use %printer instead of YYPRINT.
5168
fa0e9314
AD
51692005-07-12 Akim Demaille <akim@epita.fr>
5170
867a3e00
AD
5171 * src/symtab.h, src/symtab.c (symbol_print): New.
5172 * src/symlist.h, src/symlist.c (symbol_list_print): New.
5173 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
5174
51752005-07-12 Akim Demaille <akim@epita.fr>
5176
5177 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
5178 b4_at_dollar and b4_dollar_dollar.
5179
e054b190
PE
51802005-07-11 Paul Eggert <eggert@cs.ucla.edu>
5181
5182 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
5183 and Pennello's paper.
5184
34160ec4
PE
51852005-07-09 Paul Eggert <eggert@cs.ucla.edu>
5186
407d4a75
PE
5187 * data/yacc.c (yyparse): Undo previous patch. Instead,
5188 set yylsp[0] and yyvsp[0] only if the initial action
5189 sets yylloc and yylval, respectively.
5190
34160ec4
PE
5191 * data/yacc.c (yyparse): In the initial action, set
5192 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
5193 This avoids the use of undefined variables if the initial
5194 action does not set yylloc and/or yylval.
5195
c3d5a4a7
PE
51962005-07-07 Paul Eggert <eggert@cs.ucla.edu>
5197
b34d96c1
PE
5198 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
5199 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
5200 Remove from CVS. These files are automatically generated.
5201 * examples/extexi: Clarify that this file is now part of Bison,
5202 not GNU M4, and that it works with any POSIX-compatible Awk.
5203 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
5204 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
5205 so that we also get calc++-parser.yy. Geneate it.
5206 Use $(AWK), not gawk, since any conforming Awk will do.
5207 Put comment before action, since older 'make' can't handle comment
5208 in action.
5209 $(BUILT_SOURCES): List all built sources, not just some of them.
5210 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
5211 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
5212 $($(calc_sources_generated)): Remove unnecessary test for existence
5213 of target. (This had a shell syntax error anyway; a stray "x".)
5214 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
5215 calc++-parser.yy.
5216 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
5217
c3d5a4a7
PE
5218 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
5219 implied by the other modules.
5220
828c373b
AD
52212005-07-06 Akim Demaille <akim@epita.fr>
5222
5223 Bind examples/calc++ to the package.
5224 * examples/calc++/Makefile: Remove, replaced by...
5225 * examples/calc++/Makefile.am: ... this new file.
5226 * examples/calc++/test: Remove input.
5227 * examples/calc++/compile: Remove.
5228 * examples/Makefile.am: New.
5229 * configure.ac, Makefile.am: Adjust.
5230 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
5231
63cb01d6
PE
52322005-07-05 Paul Eggert <eggert@cs.ucla.edu>
5233
fd2df2ed
PE
5234 * data/glr.c (yyFail): Drastically simplify; since the format argument
5235 never had any % directives, we can simply pass it to yyerror.
5236 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
5237 be modified later, as that is the usual style in glr.c.
5238 Problems reported by Paul Hilfinger.
5239
63cb01d6
PE
5240 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
5241 and size overflow errors.
5242 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
5243 in case the user prolog sets feature-test macros like _GNU_SOURCE.
5244 (YYSIZEMAX): New macro.
5245 (yystpcpy): New function, taken from yacc.c.
5246 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
5247 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
5248 so that we don't have to maintain their signatures.
5249 (yyFail): Check for buffer overflow, by using vsnprintf rather
5250 than vsprintf. Allocate a bigger buffer if possible.
5251 Report an error if buffer allocation fails.
5252 (yyStackOverflow): New function.
5253 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
5254 the initialization was successful. It might fail if storage was
5255 exhausted.
5256 (yyexpandGLRStack): Add more checks for storage allocation failure.
5257 Use yyStackOverflow to report failures.
5258 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
5259 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
5260 Don't assume stack number fits in int.
5261 (yysplitStack): Check for storage allocation failure.
5262 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
5263 can print diagnostics on storage allocation failure. All callers
5264 changed.
5265 (yyresolveValue): Use yybool for boolean.
5266 (yyreportSyntaxError): Check for size-calculation overflow.
5267 This code is taken from yacc.c.
5268 (yyparse): Check for storage allocation errors when allocating
5269 the initial stack.
5270
1c59e0a1
AD
52712005-07-05 Akim Demaille <akim@epita.fr>
5272
5273 Extract calc++ from the documentation.
5274 * doc/bison.texinfo (Calc++): Add the extraction marks.
5275 * examples/extexi: New, from the aborted GNU Programming 2E.
5276 Separate the different paragraph of a file with empty lines.
5277 * examples/Makefile: Use it to extract the whole calc++ example.
5278
8a0adb01
AD
52792005-06-24 Akim Demaille <akim@epita.fr>
5280
5281 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
5282 class typedefs.
5283
12545799
AD
52842005-06-22 Akim Demaille <akim@epita.fr>
5285
5286 * doc/bison.texinfo (C++ Language Interface): First stab.
5287 (C++ Parsers): Remove.
5288
99be0235
AD
52892005-06-22 Akim Demaille <akim@epita.fr>
5290
5291 * data/lalr1.cc (yylex_): Honor %lex-param.
5292
0ffd4fd1
AD
52932005-06-22 Akim Demaille <akim@epita.fr>
5294
5295 Start a set of simple examples.
5296 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
5297 * examples/calc++/calc++-driver.hh,
5298 * examples/calc++/calc++-parser.yy,
5299 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
5300 * examples/calc++/compile, examples/calc++/test: New.
5301
0925ebb4
PE
53022005-06-09 Paul Eggert <eggert@cs.ucla.edu>
5303
5304 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
5305 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
5306 which stems from the 2005-05-27 patch.
5307
43d3b664
PH
53082005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5309
5310 * data/glr.c: Modify treatment of unused parameters to permit use
5311 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
5312
3062864d
PE
53132005-05-30 Paul Eggert <eggert@cs.ucla.edu>
5314
5315 Fix infringement on user name space reported by Janos Zoltan Szabo.
5316 * data/yacc.c (yyparse): strlen -> yystrlen.
5317
989b5b8e
AD
53182005-05-30 Akim Demaille <akim@epita.fr>
5319
5320 * data/lalr1.cc (_): New.
5321 Translate the various messages.
5322
bedf57f5
PE
53232005-05-27 Paul Eggert <eggert@cs.ucla.edu>
5324
5325 Fix infringement on user name space reported by Bruno Haible.
5326 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
5327 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
5328 the user's name space.
5329 (alloca): Include <stdlib.h> to get it, if it's not built in.
5330 (YYMALLOC, YYFREE): Define only if needed.
5331 (malloc, free): Declare, but only if needed, as this infringes on
5332 the user name space.
5333
4d1801f1
PE
53342005-05-25 Paul Eggert <eggert@cs.ucla.edu>
5335
5336 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
5337 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
5338 with %d format.
5339 * lib/ebitset.c (min, max): Undef before defining.
5340 * lib/vbitset.c (min, max): Likewise.
5341 * lib/subpipe.c (create_subpipe): Save local variables in case
5342 vfork clobbers them.
5343
53442005-05-24 Bruno Haible <bruno@clisp.org>
5345
5346 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
5347 error message syntax used by gcc-4.0.
5348
b94a9e1e
PE
53492005-05-23 Paul Eggert <eggert@cs.ucla.edu>
5350
85ac3861
PE
5351 * README: Mention m4 1.4.3. Remove obsolete advice about
5352 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
5353
b94a9e1e
PE
5354 * bootstrap: Remove workaround for problem I encountered with
5355 gettext 0.14.1; it seems to be fixed now.
5356
51c30d21
PE
53572005-05-22 Paul Eggert <eggert@cs.ucla.edu>
5358
009ce67d
PE
5359 * NEWS: Version 2.0a.
5360
f2a97c62
PE
5361 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
5362 the previous change.
5363
c8775f93
PE
5364 Various maintainer cleanups.
5365 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
5366 conftest*, for benefit of CVS commands run at the same time as
5367 "configure". Add build-aux, since "bootstrap" now creates it and
5368 its subfiles.
5369 * Makefile.cfg (move_if_change): Remove.
5370 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
5371 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
5372 (po_repo, do-po-update, po-update, wget_files, get-targets):
5373 (config.guess-url_prefix, config.sub-url_prefix):
5374 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
5375 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
5376 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
5377 Remove.
5378 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
5379 this is now the recommended name.
5380 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
5381 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
5382 ylwrap. These files now go into build-aux.
5383 * config/move-if-change: Remove.
5384 * config/prev-version.txt: Bump from 1.75 to 2.0.
5385
3ea5f0ec
PE
5386 * bootstrap: Add stdio-safer, unistd-safer modules.
5387 Remove m4/glibc2.m4 (introduced by latest gnulib, but
5388 we don't need it).
5389 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
5390 fopen-safer.c, stdio-safer.h, unistd-safer.h.
5391 * lib/subpipe.c: Include "unistd-safer.h".
5392 (create_subpipe): Make sure all the newly-created
5393 file descriptors are > 2, so that diagnostics don't
5394 get sent down them (which might cause Bison to hang, in theory).
5395 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
5396 * src/files.c (xfopen): Use fopen_safer, not fopen.
5397
51c30d21
PE
5398 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
5399 yesterday's yacc.c fix.
5400
cea1469d
PE
54012005-05-21 Paul Eggert <eggert@cs.ucla.edu>
5402
3ea5f0ec
PE
5403 * data/glr.c, data/lalr1.cc: Update copyright date.
5404
cea1469d
PE
5405 Fix a destructor bug reported by Wolfgang Spraul in
5406 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
5407 * data/yacc.c (yyabortlab): Don't call destructor, and
5408 don't set yychar to EMPTY.
5409 (yyoverflowlab): Don't call destructor.
5410 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
5411 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
5412 since we no longer output the message "discarding lookahead token
5413 end of input ()".
5414
5e6f62f2
PH
54152005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5416
5417 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
5418 fix a small glitch in debugging output.
5419 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
5420 after YY_SYMBOL_PRINT where needed.
5421
5422 (struct yyGLRState): Add some comments.
5423 (struct yySemanticOption): Add some comments.
5424 (union yyGLRStackItem): Add comment.
5425
5426 (yymergeOptionSets): Correct this to properly perform the union,
5427 avoiding infinite reported by Michael Rosien.
5428 Update comment.
5429
5430 * tests/glr-regression.at: Add test for GLR merging error reported
5431 by M. Rosien.
cea1469d 5432
0fb669f9
PE
54332005-05-13 Paul Eggert <eggert@cs.ucla.edu>
5434
5435 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
5436 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
5437 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
5438 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
5439 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
5440 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
5441 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
5442 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
5443 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
5444 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
5445 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
5446 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
5447 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
5448 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
5449 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
5450 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
5451 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
5452 src/derives.h, src/files.c, src/files.h, src/getargs.c,
5453 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
5454 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
5455 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
5456 src/output.h, src/parse-gram.c, src/parse-gram.h,
5457 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
5458 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
5459 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
5460 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
5461 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
5462 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
5463 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
5464 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
5465 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
5466 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
5467 tests/reduce.at, tests/regression.at, tests/sets.at,
5468 tests/synclines.at, tests/testsuite.at, tests/torture.at:
5469 Update FSF postal mail address.
5470
51f4735e
PE
54712005-05-11 Paul Eggert <eggert@cs.ucla.edu>
5472
5473 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
5474 Problem reported by Ralf Menzel.
5475
80ce3401
PE
54762005-05-01 Paul Eggert <eggert@cs.ucla.edu>
5477
5478 * tests/actions.at: Test that stack overflow invokes destructors.
5479 From Marcus Holland-Moritz.
5480 * data/yacc.c (yyerrlab): Move the code that destroys the stack
5481 from here....
5482 (yyreturn): to here. That way, destructors are called properly
5483 even if the stack overflows, or the user calls YYACCEPT or
5484 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
5485 (yyoverflowlab): Destroy the lookahead.
5486
54872005-04-24 Paul Eggert <eggert@cs.ucla.edu>
5488
5489 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
5490
72f000b0
PE
54912005-04-17 Paul Eggert <eggert@cs.ucla.edu>
5492
5493 * NEWS: Bison-generated C parsers no longer quote literal strings
5494 associated with tokens.
5495 * src/output.c (prepare_symbols): Don't escape strings,
5496 since users don't want to see C escapes.
5497 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
5498 in diagnostics.
c19683bb 5499 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
5500 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
5501
1094323f
PE
55022005-04-16 Paul Eggert <eggert@cs.ucla.edu>
5503
5504 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
5505 the data size is known to be too small and we can't increase it.
5506 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
5507
ca407bdf
PE
55082005-04-15 Paul Eggert <eggert@cs.ucla.edu>
5509
5510 * src/parse-gram.y: Include quotearg.h.
5511 (string_as_id): Quote $1 before using it as a key, since the
5512 lexer no longer quotes it for us.
5513 (string_content): Don't strip quotes, since lexer no longer
5514 quotes it for us.
5515 * src/scan-gram.l: Include quotearg.h.
5516 ("\""): Omit quote.
5517 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
5518 a key, since the rest of the lexer doesn't quote it.
5519 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
5520 * tests/regression.at (Token definitions): Check for backslashes
5521 in token strings.
5522
5523 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
5524 (YYSIZE_T): Define to unsigned long int when using an older compiler.
5525 (yyparse): Revamp code to generate long syntax error message, to
5526 make it easier to translate, and to avoid problems with arithmetic
5527 overflow. Change "virtual memory" to "memory" in diagnostic, since
5528 we don't know whether the memory is virtual.
5529
1ce59070
PE
55302005-04-13 Paul Eggert <eggert@cs.ucla.edu>
5531
5532 * NEWS: Bison-generated C parsers now use the _ macro to
5533 translate strings.
5534 * data/yacc.c (_) [!defined _]: New macro.
5535 All English strings wrapped inside this macro.
5536 * doc/bison.texinfo (Bison Parser): Document _.
5537 * po/POTFILES.in: Include src/parse-gram.c, since it now
5538 includes translateable strings that parse-gram.y doesn't.
5539
a749a695
PE
55402005-04-12 Paul Eggert <eggert@cs.ucla.edu>
5541
5542 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
5543 reverting the 2004-10-11 change to this function.
5544 (symbol_check_alias_consistency): Don't call symbol_type_set
5545 if the type name is already correct.
5546 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
5547
8fb1053b
PE
55482005-03-25 Paul Eggert <eggert@cs.ucla.edu>
5549
5550 * tests/regression.at (Token definitions): Don't use a token named
5551 c, as that generates a "#define c ..." that runs afoul of buggy
5552 stdlib.h that uses the identifier c as a member of struct
5553 drand48_data. Problem reported by Horst Wente.
5554
ff498c4a
PE
55552005-03-21 Paul Eggert <eggert@cs.ucla.edu>
5556
5557 * bootstrap: Change translation URL from
5558 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
5559 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
5560 redirection glitches. Problem reported by twlevo@xs4all.nl.
5561
65211d70
PE
55622005-03-20 Paul Eggert <eggert@cs.ucla.edu>
5563
5564 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
5565 after operands; POSIX says this isn't portable for the c99 command.
5566
9577fb1f
PE
55672005-03-18 Paul Eggert <eggert@cs.ucla.edu>
5568
5569 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
5570 immediately if a data overrun has occurred; this may help us track
5571 down what may be a spurious failure on MacOS.
5572
78b178f7
PE
55732005-03-17 Paul Eggert <eggert@cs.ucla.edu>
5574
a2599d0f
PE
5575 Respond to problems reported by twlevo@xs4all.nl.
5576
5577 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
5578
78b178f7
PE
5579 * src/vcg.h: Comment fix.
5580 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
5581 (G_CMAX): Change to -1 instead of INT_MAX.
5582
5583 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 5584
7296e729
PE
55852005-03-15 Paul Eggert <eggert@cs.ucla.edu>
5586
5587 * src/tables.c (state_number_to_vector_number): Put it inside an
5588 "#if 0", since it's not currently used. Problem reported by
5589 Roland McGrath.
5590
05ac60f3
PE
55912005-03-06 Paul Eggert <eggert@cs.ucla.edu>
5592
5593 * src/output.c (escaped_output): Renamed from
5594 escaped_file_name_output, since we now use it for symbol tags as
5595 well. All uses changed.
5596 (symbol_destructors_output, symbol_printers_output):
5597 Escape symbol tags too.
5598 Problem reported by Matyas Forstner in
5599 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
5600
5601 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
5602 not needed.
5603 * src/output.c (user_actions_output, token_definitions_output,
5604 symbol_destructors_output, symbol_printers_output): Likewise.
5605 * src/reader.c (prologue_augment): Likewise.
5606 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
5607
5608 * src/vcg.c (output_edge): Don't quote linestyle arg.
5609 Problem reported by twlevo@xs4all.nl.
5610
7eb453ac
PE
56112005-02-28 Paul Eggert <eggert@cs.ucla.edu>
5612
5613 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
5614 example, reported by Derek M Jones. Also, make the example even
5615 more outrageous, to better illustrate how bad the problem is.
5616
4c04c52a
PE
56172005-02-24 Paul Eggert <eggert@cs.ucla.edu>
5618
5619 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
5620 putsym. Typo reported by Sebastian Piping.
5621
a61e1620
PE
56222005-02-23 Paul Eggert <eggert@cs.ucla.edu>
5623
5624 * doc/bison.texinfo (Language and Grammar): some -> same
5625 (Epilogue): int he -> in the
5626 Typos reported by Sebastian Piping via Justin Pence.
5627
9ec93868
PE
56282005-02-07 Paul Eggert <eggert@cs.ucla.edu>
5629
5630 * tests/glr-regression.at (Improper handling of embedded actions
5631 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
5632 embedded actions and $-N in GLR parsers", work around an Autoconf bug
5633 with dollar signs in test names.
5634 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
5635 for a similar reason.
5636
73ce7e7e
PE
56372005-01-28 Paul Eggert <eggert@cs.ucla.edu>
5638
5639 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
5640 wants to redefine G_VIEW.
5641
2e72b98e
PE
56422005-01-27 Paul Eggert <eggert@cs.ucla.edu>
5643
5644 * src/vcg.c (get_view_str): Remove case for normal_view.
5645 Problem reported by twlevo@xs4all.nl.
5646
e0d634e5
PE
56472005-01-24 Paul Eggert <eggert@cs.ucla.edu>
5648
ccf830a4
PE
5649 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
5650 Problem reported by twlevo@xs4all.nl.
5651
e0d634e5
PE
5652 * doc/bison.texinfo: Change @dircategory from "GNU programming
5653 tools" to "Software development". Requested by Richard Stallman
5654 via Karl Berry.
5655
7bbc8cb0
PE
56562005-01-23 Paul Eggert <eggert@cs.ucla.edu>
5657
5658 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
5659 Problem reported by twlevo@xs4all.nl.
5660
08b770bc
PE
56612005-01-21 Paul Eggert <eggert@cs.ucla.edu>
5662
5663 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
5664 keyword; it's not needed with modern compilers, and it doesn't
5665 affect correctness with older compilers. Suggested by
5666 twlevo@xs4all.nl.
5667
95f22ad2
PE
56682005-01-17 Paul Eggert <eggert@cs.ucla.edu>
5669
5670 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
5671 gcc -Wswitch-default.
5672 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
5673 * data/yacc.c (yyparse): Likewise.
5674
d229d15c
PE
56752005-01-12 Paul Eggert <eggert@cs.ucla.edu>
5676
5677 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
5678 already. Let config.h define any nonstandard values.
5679
ecadd90f
PE
56802005-01-10 Paul Eggert <eggert@cs.ucla.edu>
5681
5682 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
5683 for the benefit of slower hosts. Problem reported by
5684 Nelson H. F. Beebe.
5685
213744b5
PE
56862005-01-07 Paul Eggert <eggert@cs.ucla.edu>
5687
5688 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
5689 being defined and not used.
5690 * data/lalr1.cc (yyparse): Likewise.
5691 Use "if (false)" rather than "if (0)".
5692
249d3236
PE
56932005-01-05 Paul Eggert <eggert@cs.ucla.edu>
5694
5695 * TODO: Mention that we should allow NUL bytes in tokens.
5696
987cc1fb
PE
56972005-01-02 Paul Eggert <eggert@cs.ucla.edu>
5698
5699 * src/scan-skel.l (<<EOF>>): Don't close standard output.
5700 Problem reported by Hans Aberg.
5701
08fe02d9
PE
57022005-01-01 Paul Eggert <eggert@cs.ucla.edu>
5703
5704 * src/getargs.c (version): Happy new year; update overall
5705 program copyright date from 2004 to 2005.
5706
5707 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
5708 Problem reported by Hans Aberg.
5709 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
5710 (Output file names.): Add a test for the case when standard output
5711 is closed.
5712
010c0266
PE
57132004-12-26 Paul Eggert <eggert@cs.ucla.edu>
5714
5715 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
5716 to fix an oversight in the Bison 2.0 manual.
5717
da12206a
PE
57182004-12-25 Paul Eggert <eggert@cs.ucla.edu>
5719
5720 * NEWS: Version 2.0. Reformat the existing news items since
5721 1.875, so that related items are grouped together.
3a4734aa 5722 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
5723 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
5724
c935d934
PE
5725 * tests/torture.at (Exploding the Stack Size with Alloca): Set
5726 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
5727 otherwise, we're not testing alloca. Unfortunately there's no
5728 simple way to consult HAVE_ALLOCA here.
5729
da12206a
PE
5730 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
5731 for yymsg, too.
5732
5733 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
5734 hand. This avoids a warning about comparing int to size_t when
5735 GCC warnings are enabled.
5736
0a2c5137
PE
57372004-12-22 Paul Eggert <eggert@cs.ucla.edu>
5738
d7e14fc0
PE
5739 * NEWS: Bison-generated parsers no longer default to using the
5740 alloca function (when available) to extend the parser stack, due
5741 to widespread problems in unchecked stack-overflow detection.
5742 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
5743 responsibility to set it to a positive value. This lets the user
5744 specify a value that is not a preprocessor constant.
5745 * data/yacc.c (YYMAXDEPTH): Likewise.
5746 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
5747 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
5748 to be a compile-time constant. However, explain the constraints on it.
5749 Also, explain the constraints on YYINITDEPTH.
5750 (Table of Symbols): Explain that alloca is no longer the default.
5751 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
5752 to 1.
5753
0a2c5137
PE
5754 * doc/bison.texinfo (Location Default Action): Mention that n must
5755 be zero when k is zero. Suggested by Frank Heckenbach.
5756
e019c247
AD
57572004-12-22 Akim Demaille <akim@epita.fr>
5758
5759 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
5760 (parser::state_type, parser::semantic_type, parser::location_type):
5761 Private, not public.
5762 (parser::parse): Return ints, not bool.
5763 Returning a bool introduces a problem: 0 corresponds to false, and
5764 it seems weird to return false on success. Returning true changes
5765 the conventions for yyparse.
5766 Alternatively we could return void and send an exception.
5767 There is no clear consensus (yet?).
5768 (state_stack, semantic_stack, location_stack): Rename as...
5769 (state_stack_type, semantic_stack_type, location_stack_type): these.
5770 Private, not public.
5771 * tests/c++.at: New.
5772 * tests/testsuite.at, tests/Makefile.am: Adjust.
5773
72731bb7
AD
57742004-12-21 Akim Demaille <akim@epita.fr>
5775
5776 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
5777
9a0d8bec
AD
57782004-12-21 Akim Demaille <akim@epita.fr>
5779
5780 Don't impose std::string for filenames.
5781
5782 * data/lalr1.cc (b4_filename_type): New.
5783 (position::filename): Use it.
5784 (parser.hh): Move the inclusion of stack.hh and location.hh below
5785 the user code, so that needed headers for the filename type can be
5786 included first.
72731bb7
AD
5787 Forward declare them before the user code.
5788 * tests/Makefile.am (check-local, installcheck-local): Pass
5789 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 5790
99880de5
AD
57912004-12-20 Akim Demaille <akim@epita.fr>
5792
5793 Use more STL like names: my_class instead of MyClass.
5794
5795 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
5796 (SemanticStack, SemanticType, StateStack, StateType)
5797 (TokenNumberType, Stack, Slice, Traits, Parser::location)
5798 (Parser::value): Rename as...
5799 (location_stack, location_type, rhs_number_type, semantic_stack)
5800 (semantic_type, state_stack, state_type, token_number_type, stack)
5801 (slice, traits, parser::yylloc, parser::yylval): these.
5802
5803 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
5804
9bec482e
PE
58052004-12-19 Paul Eggert <eggert@cs.ucla.edu>
5806
5807 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
5808 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
5809
f6fbd3da
PE
58102004-12-17 Paul Eggert <eggert@cs.ucla.edu>
5811
5812 Remove uses of 'short int' and 'unsigned short int'. This raises
5813 some arbitrary limits. It uses more memory but nowadays that's
5814 not much of an issue.
5815
5816 This change does not affect the generated parsers; that's a different
5817 task, as some users will want to conserve memory there.
5818
5819 Ideally we should use size_t to represent all object counts, and
5820 something like ptrdiff_t to represent signed differences of object
5821 counts; but that will require more code-cleanup than I have the
5822 time to do right now.
5823
5824 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
5825 Use size_t, not int or short int, to count objects.
5826 * src/closure.c (nritemset, closure): Likewise.
5827 * src/closure.h (nritemset, closure): Likewise.
5828 * src/nullable.c (nullable_compute): Likewise.
5829 * src/print.c (print_core): Likewise.
5830 * src/print_graph.c (print_core): Likewise.
5831 * src/state.c (state_compare, state_hash): Likewise.
5832 * src/state.h (struct state): Likewise.
5833 * src/tables.c (default_goto, goto_actions): Likewise.
5834
5835 * src/gram.h (rule_number, rule): Use int, not short int.
5836 * src/output.c (prepare_rules): Likewise.
5837 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
5838 errs, reductions): Likewise.
5839 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
5840 Likewise.
5841 * src/tables.c (vector_number, tally, action_number,
5842 ACTION_NUMBER_MINIMUM): Likewise.
5843 * src/output.c (muscle_insert_short_int_table): Remove.
5844
efeed023
AD
58452004-12-17 Akim Demaille <akim@epita.fr>
5846
5847 * data/lalr1.cc: Extensive Doxygenation.
5848 (error_): Rename as...
5849 (error): this, since it is visible to the user.
5850 Adjust callers.
5851 (Parser::message): Now an automatic variable from...
5852 (Parser::yyreport_syntax_error_): here.
5853 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
5854 Parser::error.
5855 * tests/input.at: Escape $.
5856
bc82c5a5
PE
58572004-12-16 Paul Eggert <eggert@cs.ucla.edu>
5858
5859 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
5860 Parenthesize rhs to avoid obscure problems with mistakes like
5861 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
5862 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
5863 b4_rhs_location): Likewise.
5864 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
5865 b4_rhs_location): Likewise.
5866
fd19f271
AD
58672004-12-16 Akim Demaille <akim@epita.fr>
5868
5869 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
5870 yacc.c: be sure to stay within yycheck_.
5871 * tests/actions.at: Re-enable C++ tests.
5872
10454ea4
AD
58732004-12-16 Akim Demaille <akim@epita.fr>
5874
5875 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
5876 real.
5877
c5b95ccf
AD
58782004-12-16 Akim Demaille <akim@epita.fr>
5879
5880 Use #define to handle the %name-prefix.
5881
5882 * data/glr.c, data/yacc.c: Comment changes.
5883 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
5884 so that one can refer to yylex in the parser file, and have it
5885 renamed, as is the case with other skeletons.
5886
617a8f12
AD
58872004-12-16 Akim Demaille <akim@epita.fr>
5888
5889 Move lalr1.cc internals into yy*.
5890
5891 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
5892 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
5893 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
5894 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
5895 (empty_, final_, terror_, errcode_, ntokens_)
5896 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
5897 (looka_, ilooka_, error_range_, nerrs_):
5898 Rename as...
5899 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
5900 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
5901 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
5902 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
5903 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
5904 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
5905 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
5906 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
5907 these.
5908
1e547e6e
PE
59092004-12-15 Paul Eggert <eggert@cs.ucla.edu>
5910
5911 Fix some problems reported by twlevo at xs4all.
5912 * src/symtab.c (symbol_new): Report an error if the input grammar
5913 contains too many symbols. This is better than calling abort() later.
5914 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
5915 (struct node, struct graph):
5916 Rename member expand to stretch. All uses changed.
5917 (struct graph): Remove member layoutalgorithm. All uses removed.
5918 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
5919 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
5920 All uses changed.
5921 (N_STRETCH): Rename from N_EXPAND. All uses changed.
5922
735d6bd4
AD
59232004-12-15 Akim Demaille <akim@epita.fr>
5924
5925 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
5926 Add more Doxygen comments.
5927 (symprint_, stack_print_, reduce_print_, destruct_, pop)
5928 (report_syntax_error_, translate_): Rename as...
5929 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
5930 (yypop_, yyreport_syntax_error_, yytranslate_): this.
5931
2e1f5829
AD
59322004-12-15 Akim Demaille <akim@epita.fr>
5933
5934 * data/lalr1.cc (lex_): Rename as...
5935 (yylex_): this.
5936 Move the trace here.
5937 Take the %name-prefix into account.
5938 Reported by Alexandre Duret-Lutz.
5939
a3cb6248
AD
59402004-12-15 Akim Demaille <akim@epita.fr>
5941
5942 Simplify the C++ parser constructor.
5943
5944 * data/lalr1.cc (debug_): Rename as...
5945 (yydebug_): so that the parser's internals are always in the yy*
5946 pseudo namespace.
5947 Adjust uses.
5948 (b4_parse_param_decl): Remove the leading comma as it is now only
5949 called as unique argument list.
5950 (Parser::Parser): Remove the constructor accepting a location and
5951 an initial debugging level.
5952 Remove from the other ctor the argument for the debugging level.
5953 (debug_level_type, debug_level, set_debug_level): New.
5954
5955 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
5956 constructor calls.
5957
07fed891
AD
59582004-12-15 Akim Demaille <akim@epita.fr>
5959
5960 Remove b4_root related material: failure experiment
a3cb6248 5961 (which goal was to allow to derive from a class).
07fed891
AD
5962
5963 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
5964 definitions and uses.
5965
e603eaa5
PE
59662004-12-14 Paul Eggert <eggert@cs.ucla.edu>
5967
5968 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
5969 not 2, since it's not portable to subtract 1 from the start of an
5970 array. The new item 0 is never set or used. All uses changed.
5971
5972 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
5973 the default definition of YYLLOC_DEFAULT. Problem reported
5974 by Frank Heckenbach.
5975
fafb007d
PE
59762004-12-12 Paul Eggert <eggert@cs.ucla.edu>
5977
5978 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
5979 the normal case and one for the error case. Just use the
5980 first one uniformly. Problem reported by Frank Heckenbach.
5981 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
5982 use exactly the same macro in both places.
5983 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
5984 so that the normal-case YYRHSLOC works for the error case too.
5985 All uses changed.
5986 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
5987 (YYLLOC_DEFAULT): Use the same macro as glr.c.
5988 * doc/bison.texinfo (Location Default Action): Don't claim that
5989 we have an array of locations. Use the same macro for both glr
5990 and lalr parsers. Mention YYRHSLOC. Mention what happens when
5991 the index is 0.
5992
48814dcd
PE
59932004-12-10 Paul Eggert <eggert@cs.ucla.edu>
5994
a4e1a53b
PE
5995 * HACKING: Update email addresses to send announcements to.
5996
48814dcd
PE
5997 * configure.ac (AC_INIT): Bump version to 1.875f.
5998
337116ba
PE
59992004-12-10 Paul Eggert <eggert@cs.ucla.edu>
6000
6001 * NEWS: Version 1.875e.
6002 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
6003
6004 * src/scan-skel.l: Include "complain.h", for "fatal".
6005
6006 * src/relation.h (relation_print, relation_digraph):
6007 Relation sizes are of type relation_node, not size_t (this is
6008 merely a doc fix, since the two types are equivalent).
6009 (relation_transpose): Relation sizes are of type relation_node,
6010 not int.
6011 * src/relation.c: Likewise.
6012 (top, infinity): Now of type relation_node, not int.
6013 (traverse, relation_transpose): Use relation_node, not int.
6014
6015 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
6016 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
6017 (yyparse): Remove unused local introduced in 2004-10-25 patch.
6018
6019 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 6020 specifying whether the test should be skipped. Use it tp
337116ba 6021 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 6022 fail on some hosts, and should be skipped.
337116ba 6023
da2a7671
PE
60242004-12-08 Paul Eggert <eggert@cs.ucla.edu>
6025
6026 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
6027 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
6028 unless otherwise specified below.
6029
6030 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
6031 to allocate kernel_base, kernel_items, kernel_size, since
6032 they needn't be initialized to 0.
6033 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
6034 * src/closure.c (new_closure): Likewise, for itemset.
6035 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
6036 * src/lalr.c (set_goto_map): Likewise, for temp_map.
6037 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
6038 (build_relations): Likewise for edge, states1, includes.
6039 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
6040 * src/reader.c (packgram): Likewise, for ritem, rules.
6041 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
6042 * src/relation.c (relation_digraph): Likewise for VERTICES.
6043 (relation_transpose): Likewise for new_R, end_R.
6044 * src/symtab.c (symbols_token_translations_init): Likewise for
6045 token_translations.
6046 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
6047 (token_actions): Likewise for yydefact, actrow, conflrow,
6048 conflict_list.
6049 (save_column): Likewise for froms[symno], tos[symno].
6050 (goto_actions): Likewise for state_count.
6051 (pack_table): Likewise for base, pos, check.
6052 (tables_generate): Likewise for width.
6053
6054 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
6055 for initial core. Just have a separate core, so we needn't worry
6056 about whether kernel_size and kernel_base are initialized.
6057
6058 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
6059 kernel_size, kernel_items): Remove unnecessary initialization.
6060 * src/conflicts.c (conflicts): Likewise.
6061 * src/derives.c (derives): Likewise.
6062 * src/muscle_tablc (muscle_insert): Likewise.
6063 * src/relation.c (relation_digraph): Likewise.
6064 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
6065 conflrow, conflict_table, conflict_list, table, check):
6066 Likewise.
6067
6068 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
6069 This is because all callers pass unsigned int.
6070 * src/closure.h (new_closure): Likewise.
6071
6072 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
6073 (build_relations): Initialize includes[i] in all cases.
6074 * src/reader.c (packgram): Always initialize rules[ruleno].prec
6075 and rules[ruleno].precsym. Initialize members in order.
6076 * src/relation.c (relation_transpose): Always initialize new_R[i]
6077 and end_R[i].
6078 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
6079
6080 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
6081 conflict_list[0] was always 0, but now it isn't initialized.
6082
6083 * src/table.c (table_grow): When conflict_table grew, the grown
6084 area wasn't cleared. Fix this.
6085
6086 * lib/.cvsignore: Add strdup.c, strdup.h.
6087 * m4/.cvsignore: Add strdup.m4.
6088
00baeeac
PE
60892004-12-07 Paul Eggert <eggert@cs.ucla.edu>
6090
6091 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
6092 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
6093 GOTO_NUMBER_MAXIMUM, since we occasionally compute
6094 ngotos + 1 without checking for overflow.
6095 (build_relations): Use END_NODE, not -1, to denote end of edges.
6096 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
6097 build_relations): Use goto_number, not int, for goto numbers.
6098 * src/tables.c (save_column, default_goto): Likewise.
6099
be3d9d42
AD
61002004-11-23 Akim Demaille <akim@epita.fr>
6101
6102 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
6103 of #defining from yystype.
6104 Don't typedef yystype, C++ does not need it.
6105 This lets it possible to forward declare it as union.
6106
78e526d5
PE
61072004-11-23 Paul Eggert <eggert@cs.ucla.edu>
6108
6109 * bootstrap (gnulib_modules): Add extensions.
6110 Problem reported by Jim Meyering.
6111
afbb696d
PE
61122004-11-22 Paul Eggert <eggert@cs.ucla.edu>
6113
6114 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
6115 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
6116 src/system.h, src/tables.c: XFREE -> free, to accommodate
6117 recent change to gnulib xalloc.h.
78e526d5 6118 Problem reported by Jim Meyering.
afbb696d 6119
c1f8f16a
AD
61202004-11-17 Akim Demaille <akim@epita.fr>
6121
6122 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
6123
db7e5eb5 61242004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
6125 Alexandre Duret-Lutz <adl@gnu.org>
6126
6127 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
6128 changes.
6129 (YYCDEBUG): Adjust.
6130 Use it instead of cdebug_.
6131 (Parser::debug_stream, Parser::set_debug_stream): New.
6132 (Parser::symprint_): Define cdebug_ for temporary backward
6133 compatibility.
6134 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
6135 debug_stream ().
6136
68e11668
AD
61372004-11-17 Akim Demaille <akim@epita.fr>
6138
6139 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
6140 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
6141 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
6142 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
6143
97cbc73e
PE
61442004-10-27 Paul Eggert <eggert@cs.ucla.edu>
6145
6146 * data/glr.c (yyloc_default): Remove; not used.
6147 Problem reported by Frank Heckenbach.
6148
e342c3be
AD
61492004-10-25 Akim Demaille <akim@epita.fr>
6150
6151 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
6152 Introduce another definition to address simple location arrays.
6153 (yyGLRStack): New member: yyerror_range.
6154 (yyrecoverSyntaxError, yyparse): Update it.
6155 (yyrecoverSyntaxError): Use it when shifting the error token to
6156 have an accurate range, equivalent to the one computed by both
6157 yacc.c and lalr1.cc.
6158 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
6159 that column numbers start at column 0, as per GNU Coding
6160 Standards, the others tests, and the doc.
6161 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
6162 Adjust to the above change (first column is 0).
6163 And adjust the location of the "<error>", now covering the whole
6164 line.
6165
93602feb 61662004-10-22 Akim Demaille <akim@epita.fr>
04098407 6167 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
6168
6169 Remove some arbitrary limits on goto numbers and relations.
6170 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
6171 initial values, since they're never used.
6172 (set_goto_map): ngotos is now unsigned, so test for overflow
6173 by seeing whether it wraps around to zero.
6174 * src/lalr.h (goto_number): Now size_t, not short int.
6175 (GOTO_NUMBER_MAXIMUM): Remove.
6176 * src/relation.c (relation_print, traverse, relation_transpose):
6177 Check for END_NODE rather than looking at sign.
6178 * src/relation.h (END_NODE): New macro.
6179 (relation_node): Now size_t, not short int.
6180
dba08b04
PE
61812004-10-22 Paul Eggert <eggert@cs.ucla.edu>
6182
6183 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
6184 keyword, not an identifier. Problem reported by Baron Schwartz in
6185 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
6186
df09ef2e
AD
61872004-10-11 Akim Demaille <akim@epita.fr>
6188
6189 * src/symtab.c (symbol_check_alias_consistency): Also check
6190 type names, destructors, and printers.
6191 Reported by Alexandre Duret-Lutz.
6192 Recode the handling of associativity and precedence in terms
6193 of symbol_precedence_set.
6194 Accept no redeclaration at all, not even equal to the previous
6195 value.
6196 (redeclaration): New.
6197 Use it to factor redeclaration complaints.
6198 (symbol_make_alias): Don't set the type of the alias, let
6199 symbol_check_alias_consistency do it as for other features.
6200 * src/symtab.h (symbol): Add new member prec_location, and
6201 type_location.
6202 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
6203 * tests/input.at (Incompatible Aliases): New.
6204
146bc99d
PE
62052004-10-09 Paul Eggert <eggert@cs.ucla.edu>
6206
6207 .cvsignore fixes to accommodate gnulib changes,
6208 and the practice of naming build directories "_build".
6209 * .cvsignore: Add "_*". Sort.
6210 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
6211 * m4/.cvsignore: Add "*_gl.m4".
6212
e503aa60
AD
62132004-10-06 Akim Demaille <akim@epita.fr>
6214
6215 * src/parse-gram.y (add_param): Fix the truncation of trailing
6216 spaces.
6217
b4a20338
AD
62182004-10-05 Akim Demaille <akim@epita.fr>
6219
6220 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
6221 whether the reducion was empty or not. This leaves room to
6222 improve the use of YYLLOC_DEFAULT in such a case.
6223 lalr1.cc is still experimental, so changing this is acceptable.
6224 And finally, there are probably not many users who changed the
6225 handling of locations in GLR, so changing is admissible too.
6226
6227 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
6228 empty reduction, set @$ to an empty location ending the previously
6229 stacked symbol.
6230 Adjust uses to make sure the code is triggered on empty
6231 reductions.
6232 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
6233 expected output: empty reductions have empty locations.
6234
f85a5e6f
AD
62352004-09-29 Akim Demaille <akim@epita.fr>
6236
6237 * data/lalr1.cc: Move towards a more standard C++ coding style
6238 for templates: Class < T > -> Class<T>.
6239
b203fc2c
AD
62402004-09-29 Akim Demaille <akim@epita.fr>
6241
6242 * data/lalr1.cc: Reinstall the former ctor, for sake of
6243 compatibility, but warn it will be removed.
6244 Move towards a more standard C++ coding style (i.e., type *var ->
6245 type* var).
6246
5b7e1e73
PE
62472004-09-27 Paul Eggert <eggert@cs.ucla.edu>
6248
3fee967f
PE
6249 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
6250 since it's less likely to work if NULs are involved in the future.
5b7e1e73 6251
0dcca5c2
AD
62522004-09-27 Akim Demaille <akim@epita.fr>
6253
6254 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
6255
6dde1c82
AD
62562004-09-27 Akim Demaille <akim@epita.fr>
6257
6258 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 6259 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
6260 and argument names.
6261 (b4_cc_constructor_call): Likewise.
6262
b233d555
AD
62632004-09-24 Akim Demaille <akim@epita.fr>
6264
6265 * src/parse-gram.y (add_param): Strip the leading and trailing
6266 blanks from a formal argument declaration.
6267 (YY_LOCATION_PRINT): New.
6268
619404e3
AD
62692004-09-24 Akim Demaille <akim@epita.fr>
6270
6271 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
6272 after the location.
6273
dd8d9022
AD
62742004-09-24 Akim Demaille <akim@epita.fr>
6275
6276 * doc/bison.texinfo (Table of Symbols): Sort.
6277
0092f063
AD
62782004-09-21 Akim Demaille <akim@epita.fr>
6279
6280 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
6281 the useless parentheses.
6282 Suggested by Paul Eggert.
6283
451364ed
AD
62842004-09-20 Akim Demaille <akim@epita.fr>
6285
6286 Let the initial-action act on the look-ahead, and use it for the
6287 "initial push" (corresponding to an hypothetical beginning-of-file).
6288 And let lalr1.cc honor %initial-action.
6289
6290 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
6291 example.
6292 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
6293 (Parser::Parser): Remove the ctor that used to initialize it.
6294 (Parser::parse): Like in the other skeletons, issue the "starting
6295 parse" message before any action.
6296 Honor %initial-action.
6297 Initialize the stacks with the lookahead.
6298 * data/yacc.c: Let $$ and @$ in %initial-action designate the
6299 look-ahead.
6300 Push them in the stacks.
6301 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
6302
18d192f0
AD
63032004-09-20 Akim Demaille <akim@epita.fr>
6304
6305 * doc/bison.texinfo (Initial Action Decl): New.
6306
b8458aa5
AD
63072004-09-20 Akim Demaille <akim@epita.fr>
6308
6309 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
6310 clearer criterion to define it.
6311 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
6312 When reducing on an empty RHS, use the latest stacked location as
6313 location.
6314 yylloc is not always available.
6315 * data/glr.c: Likewise.
6316 Also, honor initial-actions.
6317
3fc16193
AD
63182004-09-20 Akim Demaille <akim@epita.fr>
6319
6320 * data/yacc.c (YY_LOCATION_PRINT): New.
6321 Define when we know YYLTYPE's structure, i.e., when the default
6322 YYLLOC_DEFAULT is used.
6323 * data/c.m4 (b4_yysymprint_generate): Use it.
6324 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
6325 value of the result.
6326 (error_start_): Replace with...
6327 (error_range_): this location array.
6328 This allows to replace code relying on the implementation of
6329 locations by portable code.
6330 * data/yacc.c (yylerrsp): Replace with...
6331 (yyerror_range): this.
6332 Every time a token is popped, update yyerror_range[0], to have an
6333 accurate location for the error token.
6334 * data/glr.c (YY_LOCATION_PRINT): New.
6335 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
6336 deference a pointer.
6337 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
6338 report the location in %printers.
6339
6340 * src/scan-skel.l: Instead of abort, report error messages to ease
6341 understanding skeleton scanning failures.
6342
ecfe33e7
AD
63432004-09-16 Akim Demaille <akim@epita.fr>
6344
6345 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
6346 (iterator, const_iterator): these, to be more in the C++ spirit.
6347 Also, return reverse iterators so that when displaying the stack
6348 we display its bottom first.
6349 (Parser::stack_print_, Parser::reduce_print_): Match the messages
6350 from yacc.c.
6351 We should probably use vector here though.
6352
1576d44d
AD
63532004-09-16 Akim Demaille <akim@epita.fr>
6354
6355 Have more complete shift traces.
6356
6357 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
6358 to report Shifts instead of ad hoc YYDPRINTF invocations,
6359 including for the error token.
6360 * data/lalr1.cc (symprint_): Output the location.
6361 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
6362 output the location within the %printer.
6363 Activate GLR tests, at least to make sure they compile properly.
6364 They still don't pass though.
6365 * tests/calc.at: Adjust expect verbose output, since now "Entering
6366 state..." is on a different line than the "Shifting" message.
6367
9c66f418
AD
63682004-09-08 Akim Demaille <akim@epita.fr>
6369
6370 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
6371 Bison directive from the Bison file to the invocation of this
6372 macro, so that these directives are passed to
6373 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
6374 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
6375 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
6376 the extra Bison directives instead of the whole series.
6377 Change the grammar so that there are recoverable errors, and
6378 unrecoverable errors. Now we can have the parser give up before
6379 consuming the whole input. As a result we now can observe that
6380 the lookahead is freed when needed.
6381 Change the parser source to parse argv[1] instead of a hard coded
6382 string.
6383 Simplify yylex, and give a value and location to EOF.
6384 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
6385 passed directives already coded in the file.
6386 Add some tests to check the location of "error".
6387 For some tests, the C++ parser is correct, and not yacc.c.
6388 For other tests, they provide different, but unsatisfying, values,
6389 so keep the C++ value so that at least one parser is "correct"
6390 according to the test suite.
6391 (Actions after errors): Remove, this is subsumed by the
6392 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
6393
52d5733f
AD
63942004-09-06 Akim Demaille <akim@epita.fr>
6395
6396 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 6397 (Parser::pop): New.
52d5733f
AD
6398 Use it.
6399
a0e68930
AD
64002004-09-06 Akim Demaille <akim@epita.fr>
6401
6402 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
6403 argument, an informative message.
6404 Call YY_SYMBOL_PRINT.
6405 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
6406 * data/lalr1.cc (destruct_): Likewise.
6407 In addition, no longer depend on b4_yysymprint_generate and
6408 b4_yydestruct_generate to generate these functions, do it "by
6409 hand".
6410
e757bb10
AD
64112004-09-03 Akim Demaille <akim@epita.fr>
6412
6413 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
6414 invoked, yydestruct the lookahead.
6415 * tests/calc.at (Calculator $1): Update the expected lengths of
6416 traces: there is an added line for the discarded lookahead.
6417 * doc/bison.texinfo (Destructor Decl): Some rewording.
6418 Define "discarded" symbols.
6419
0fe1f06d
AD
64202004-09-02 Akim Demaille <akim@epita.fr>
6421
6422 * data/lalr1.cc (translate_, destruct_): No reason to be static.
6423
284acc8b
AD
64242004-09-02 Akim Demaille <akim@epita.fr>
6425
6426 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
6427 (YYDSYMPRINTF): Rename as...
6428 (YY_SYMBOL_PRINT): this.
6429 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
6430 two.
6431 Use it instead of direct symprint_ calls.
6432 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
6433 one.
6434
a5eb1ed2
AD
64352004-09-02 Akim Demaille <akim@epita.fr>
6436
b7c72fe1
AD
6437 * data/lalr1.cc (b4_yysymprint_generate): New.
6438 (symprint_): New member function, defined when YYDEBUG.
6439 Use it consistently instead of token/nterm debugging output by
6440 hand.
a5eb1ed2
AD
6441 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
6442 %printer calls to use cdebug_ when using lalr1.cc.
6443
417141dd
AD
64442004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
6445
6446 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
6447 with #ifdef YYDEBUG.
6448
2fa09258
AD
64492004-08-26 Akim Demaille <akim@epita.fr>
6450
6451 * doc/bison.texinfo (Implementing Loops): Rename as...
6452 (Implementing Gotos/Loops): this.
6453
9378b508
PE
64542004-08-13 Paul Eggert <eggert@cs.ucla.edu>
6455
6456 Adjust to latest gnulib.
6457 * bootstrap (gnulib_modules): Add xalloc-die.
6458 Set LC_ALL=C so that file names sort consistently.
6459 Prefer the gnulib copies of gettext.m4, glibc21.m4,
6460 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
6461 uintmax_t.m4, ulonglong.m4.
6462 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
6463 po.m4 since we are now using _gl.m4 instead.
6464
87a8ad5c
PE
64652004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
6466
6467 * src/scan-action.l: Remove. Scanning of semantic actions is
6468 handled in scan-gram.l.
6469
dca81a78
PE
64702004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
6471
6472 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
6473
6474 * src/location.h (struct): The file member is a uniqstr.
6475 (equal_boundaries): Use UNIQSTR_EQ for comparison.
6476
c9cbf7c5
PE
64772004-07-22 Paul Eggert <eggert@cs.ucla.edu>
6478
6479 Fix bug with non-%union parsers that have printers or destructors,
6480 which led to a Bison core dump. Reported by Peter Fales in
6481 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 6482
c9cbf7c5
PE
6483 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
6484 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
6485 not to our own type.
6486 * src/output.c (symbol_destructors_output, symbol_printers_output):
6487 Don't assume %union.
6488 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
6489 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
6490 UNION-FLAG. All callers changed.
6491 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
6492 Use type char, not unsigned int, when declaring an array of char;
6493 this lets us remove a cast.
6494 (Printers and Destructors): Add non-%union test cases.
6495
fa7e68c3
PE
64962004-06-21 Paul Eggert <eggert@cs.ucla.edu>
6497
6498 * doc/bison.texinfo: Minor editorial changes, mostly to the new
6499 GLR writeups. E.g., avoid frenchspacing and the future tense,
6500 change "lookahead" to "look-ahead", and change "wrt" to "with
6501 respect to".
2fa09258 6502
fa7e68c3
PE
65032004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6504
6505 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
6506 New sections, split off from the GLR Parsers section. Put the new
6507 Simple GLR Parser near the start of the GLR section, for clarity.
6508 Rewrite connective text.
6509
99a9344e
PE
65102004-06-21 Frank Heckenbach <frank@g-n-u.de>
6511
6512 * doc/bison.texinfo (Simple GLR Parsers): New section.
6513
8dd162d3
PE
65142004-06-21 Paul Eggert <eggert@cs.ucla.edu>
6515
6516 * NEWS, TODO, doc/bison.texinfo:
6517 Use "look-ahead" instead of "lookahead", to be consistent.
6518 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
6519 while we're fixing "look-ahead".
6520 * src/conflicts.c (shift_set): Renamed from shiftset.
6521 (look_ahead_set): Renamed from lookaheadset.
6522 * src/print.c: Likewise.
6523 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
6524 name for "lookahead".
6525 (report_types, usage): Likewise.
6526 * src/getargs.h (report_look_ahead_tokens): Renamed from
6527 report_lookaheads.
6528 * src/lalr.c (compute_look_ahead_tokens): Renamed from
6529 compute_lookaheads.
6530 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
6531 (look_ahead_tokens_print): Renamed from lookaheads_print.
6532 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
6533 state_rule_lookaheads_print.
6534 * src/state.h: Likewise.
6535 (reductions.look_ahead_tokens): Renamed from lookaheads.
6536 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
6537 AT_DATA_LOOKAHEADS_GRAMMAR.
6538
57a90331
PE
65392004-06-03 Paul Eggert <eggert@cs.ucla.edu>
6540
6541 * README: Update location of patched M4 distribution.
6542
8ed3234a
PE
65432004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
6544
6545 Don't assume the C++ compiler takes the same arguments as the C compiler
6546 (trivial change).
6547 * configure.ac (O0CXXFLAGS): New var.
6548 * tests/atlocal.in (CXXFLAGS): Use it.
6549
07971983
PE
65502004-05-29 Paul Eggert <eggert@cs.ucla.edu>
6551
6552 Fix some "make check" problems with C++ reported by
6553 Albert Chin-A-Young for Tru64 C++ in this thread:
6554 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
6555
6556 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
6557 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6558 Output to a .cc file for C++, not to a .c file.
6559 * tests/calc.at (AT_CHECK_CALC): Likewise.
6560 * tests/regression.at (AT_CHECK_DANCER): Likewise.
6561 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
6562
29058652
PE
65632004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
6564
6565 * tests/calc.at, tests/actions.at: Workaround for SGI
6566 C++ compiler. (trivial change)
6567
62cb8a99
PE
65682004-05-27 Paul Eggert <eggert@cs.ucla.edu>
6569
fd418816
PE
6570 Spent a few hours checking out which prerequisite versions the
6571 current sources actually require. I went all the way back to
6572 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
6573 a seemingly endless set of combinations of versions more recent
6574 than that. The bottom line is that the current sources require
6575 fairly recent versions of the build tools, and it'll be some work
6576 to change this.
6577 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
6578 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
6579 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
6580 Add comments explaining why those particular versions are
6581 currently needed.
2fa09258 6582
62cb8a99
PE
6583 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
6584 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 6585 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
6586
6587 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
6588 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
6589
caa52c10
PE
65902004-05-26 Paul Eggert <eggert@cs.ucla.edu>
6591
6592 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
6593 0.11.5. Suggested by Bruno Haible.
6594 * bootstrap: Remove gettext version checking.
6595
6596 * doc/bison.texinfo (Decl Summary): Also mention that %union
6597 can depend on prerequisite types. Problem reported by Tim
6598 Van Holder.
6599
4bfd5e4e
PE
66002004-05-25 Paul Eggert <eggert@cs.ucla.edu>
6601
2cef3017
PE
6602 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
6603 * README-alpha: Don't tell people not to package this.
6604
b9c85d5c
PE
6605 * bootstrap: Don't assume $(...) works; use `...` instead.
6606 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
6607 gettext better.
6608
4bfd5e4e
PE
6609 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
6610 put into the -d output file, and mention what to do if YYSTYPE is
6611 defined as a macro.
6612
6a36ff94
PE
66132004-05-24 Paul Eggert <eggert@cs.ucla.edu>
6614
6712933e
PE
6615 Undo change made earlier today: it caused autopoint to not bring
6616 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
6617 autopoint's.
6618
6619 * bootstrap: Check that gettext version matches what's in
6620 configure.ac. Warn users to ignore robots.txt ERROR 404.
6621 * bootstrap: Undo today's earlier change (logged below).
6622 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 6623
6a36ff94
PE
6624 The gettext version checking is causing more trouble than it's
6625 curing; remove it. Problem reported by Paul Hilfinger.
6626
6627 * bootstrap: Issue a warning that one can expect a message
6628 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
6629 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
6630
209ea708
PE
66312004-05-23 Paul Eggert <eggert@cs.ucla.edu>
6632
6633 Ensure that the C++ compiler used for testing actually works on a
6634 simple test program; if not, skip the C++-related tests. Problem
6635 reported by Vin Shelton in:
161a71f3 6636 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
6637
6638 * m4/cxx.m4: New file.
6639 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
6640 * tests/atlocal.in (BISON_CXX_WORKS): Add.
6641 * tests/local.at (AT_COMPILE_CXX): Use it.
6642
41ca2549
PE
66432004-05-21 Paul Eggert <eggert@cs.ucla.edu>
6644
383e69dc
PE
6645 * data/glr.c (yylloc): Output this macro even if locations are not
6646 being generated, as the GLR parser needs it even in that case.
6647 Problem reported by Troy A. Johnson
6648 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
6649
41ca2549
PE
6650 * configure.ac (AC_INIT): Update to 1.875e.
6651
e476c87d
PE
66522004-05-21 Paul Eggert <eggert@cs.ucla.edu>
6653
6654 * NEWS: Version 1.875d.
6655 * configure.ac (AC_INIT): Likewise.
6656 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
6657
6658 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
6659 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
6660 lalr1.cc runs afoul of the first, and the last two are no longer
6661 supported by GCC 3.4.0.
6662 * README: Mention GNU m4 1.4 or later; mention m4 patches.
6663 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
6664
233a88ad
PE
66652004-05-06 Paul Eggert <eggert@cs.ucla.edu>
6666
6667 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
6668 unsigned int, for compatibility with latest gnulib hash module.
6669 * src/state.c (state_hash, state_hasher): Likewise.
6670 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
6671 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 6672
12ffdd28
PE
66732004-05-03 Paul Eggert <eggert@cs.ucla.edu>
6674
6675 * NEWS: Unescaped newlines are no longer allowed in char & strings.
6676
6677 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
6678 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
6679 character and string literals.
6680 (unexpected_end): New function.
6681 (unexpected_eof): Use it.
6682 (unexpected_newline): New function.
6683 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
6684 actions.
e476c87d 6685
12ffdd28
PE
6686 * NEWS: Document %expect-rr.
6687
6688 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
6689 Fix typo by replacing $1 with $option.
6690 Remove more 'intl'-related files.
9668e2be 6691 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
6692
6693 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
6694 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
6695 strtoul.c.
6696 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
6697 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
6698 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
6699 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
6700 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
6701 * src/.cvsignore: Add *.output.
6702
6703 * src/parse-gram.y: Put copyright notice inside %{ %} so it
6704 gets copied to the output file.
e476c87d 6705
1f65350a
PE
67062004-04-28 Paul Eggert <eggert@twinsun.com>
6707
6708 Get files from the gnulib and po repositories, instead of relying
6709 on them being in our CVS. Upgrade to latest versions of gnulib
6710 and Automake.
6711
6712 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
6713 * bootstrap: Bootstrap from gnulib and po repositories.
6714 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
6715 * README-cvs: Document these changes. Remove version numbers from
6716 mentions of build tools, since they change so often. Mention Flex.
6717
6718 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
6719 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
6720 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
6721 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 6722 does this for us.
12ffdd28
PE
6723 (AC_ISC_POSIX): Remove; we no longer support this
6724 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
6725 (AC_HEADER_STDC): Remove: we now assume C89 or better.
6726 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
6727 Do not check for C89 headers, except for locale.h which is used
6728 by the Yacc library and must port to K&R hosts.
6729 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
6730 Do not check for C89 functions, except for setlocale which is
6731 used by the Yacc library.
6732 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
6733 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
6734 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
6735 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
6736 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
6737 AM_GNU_GETTEXT): Remove; now done by:
6738 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
6739 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
6740 for us.
6741
6742 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
6743 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
6744 Define to empty, as gnulib.mk will do the rest for us.
6745 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
6746 for us.
6747 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
6748 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
6749
6750 * src/files.c: Include gnulib's xstrndup.h.
6751
6752 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
6753 (REALLOC): Use xnrealloc, for likewise.
6754 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
6755 (strnlen, memrchr): Remove decls; functions no longer used.
6756 Include <stpcpy.h>.
6757
6758 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
6759 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
6760 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
6761 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
6762 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
6763 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
6764 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
6765 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
6766 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
6767 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
6768 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
6769 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
6770 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
6771 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
6772 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
6773 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
6774 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
6775 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
6776 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
6777 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
6778 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
6779 Remove, as these files are now generated automatically
6780 by bootstrap or automake.
6781
6782 * po/ChangeLog: Remove: all but one entry was a duplicate
6783 of this file, and I moved that 2000-11-02 entry here.
6784
6785 * config/.cvsignore: Add Makefile, depcomp, install-sh.
6786 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
6787 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
6788 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
6789 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
6790 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
6791 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
6792 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
6793 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
6794 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
6795 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
6796 xstrndup.h.
6797 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
6798 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
6799 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
6800 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
6801 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
6802 * src/.cvsignore: Remove *_.c.
6803
6804
6805 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
6806 support it. (The latest stable gzip doesn't.)
6807
68082004-04-27 Paul Eggert <eggert@twinsun.com>
6809
6810 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
6811 case, as stos_ is now used by destructors due to the 2004-02-09
6812 change.
6813
6814 Remove more K&R C support.
6815 * lib/libiberty.y (PARAMS): Remove. All uses removed.
6816 * lib/subpipe.c (errno): Remove decl.
6817 Include <stdlib.h> unconditionally.
6818 (EXIT_FAILURE): Remove macro.
6819 * src/complain.c (vfprintf, strerror): Remove.
6820 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
6821 unconditionally.
6822 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
6823 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
6824 (strchr, strspn, memchr): Remove decls.
6825 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
6826 unconditionally. Do not declare perror.
6827 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
6828 unconditionally.
6829
6830 * src/complain.c (_): Remove useless defn, as system.h defines this.
6831
6832 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
6833 with latest obstack.h.
6834 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
6835 to procedure types, as obstack.h now does that for us.
6836 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
6837
6838 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
6839 so that this include file can stand alone.
6840 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
6841 does this now. Include subpipe.h first after config.h, to
6842 test whether it can stand alone.
6843
6844 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
6845 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
6846 unused declaration.
6847
6848 * tests/synclines.at (%union synch line): Put a dummy member in
6849 the union, because empty unions aren't allowed in C. Caught
6850 by GCC 3.4.0.
6851
4f16766c
PE
68522004-04-13 Jim Meyering <jim@meyering.net>
6853
6854 * src/conflicts.c (conflicts_print): Correct format string typo:
6855 use `%%' to produce literal `%'. (trivial change)
6856
779e7ceb
PE
68572004-03-30 Paul Eggert <eggert@twinsun.com>
6858
6859 * src/getargs.c (version): Update copyright year to 2004.
6860
6861 * data/c.m4 (b4_int_type): Use 'short int' rather than
6862 'short', and similarly for 'long', 'unsigned', etc.
6863 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
6864 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
6865 yy_yypstack, yydumpstack): Likewise.
6866 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
6867 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
6868 Likewise.
6869 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
6870 yy_stack_print, yyparse): Likewise.
6871 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
6872 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
6873 * lib/bitset.c (bitset_print): Likewise.
6874 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
6875 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
6876 * lib/bitsetv.c (bitsetv_dump): Likewise.
6877 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
6878 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
6879 Likewise.
6880 * src/LR0.c (allocate_itemsets): Likewise.
6881 * src/gram.h (rule_number, rule): Likewise.
6882 * src/lalr.h (goto_number): Likewise.
6883 * src/nullable.c (nullable_compute): Likewise.
6884 * src/output.c (prepare_rules): Likewise.
6885 * src/relation.c (relation_print, relation_digraph): Likewise.
6886 * src/relation.h (relation_node): Likewise.
6887 * src/state.h (state_number, transitions, errs, reductions,
6888 struct state): Likewise.
6889 * src/symtab.h (symbol_number, struct symbol): Likewise.
6890 * src/tables.c (vector_number, tally, action_number,
6891 default_goto, goto_actions): Likewise.
6892 * tests/existing.at (GNU Cim Grammar): Likewise.
6893 * tests/regression.at (Web2c Actions): Likewise.
6894
6895 * src/output.c (muscle_insert_short_int_table): Renamed from
6896 muscle_insert_short_table. All uses changed.
6897
d6328241
PH
68982004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6899
6900 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
6901 (declaration): Replace expected_conflicts with expected_sr_conflicts.
6902 Add %expect-rr rule.
4f16766c 6903
d6328241
PH
6904 * src/scan-gram.l: Recognize %expect-rr.
6905
4f16766c 6906 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 6907 expected_conflicts.
4f16766c 6908 (expected_rr_conflicts): Declare.
d6328241
PH
6909
6910 * src/conflicts.c (expected_sr_conflicts): Rename from
6911 expected_conflicts.
6912 (expected_rr_conflicts): Define.
6913 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
6914 for GLR parsers.
6915 Use expected_sr_conflicts in place of expected_conflicts.
6916 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 6917
d6328241 6918 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 6919
1452af69
PE
69202004-03-08 Paul Eggert <eggert@gnu.org>
6921
6922 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 6923 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
6924
6925 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
6926 in lalr1.cc.
6927 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
6928 * src/scan-gram.l (scan_integer): New function.
6929 ({int}): Use it.
6930 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
6931 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
6932 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
6933 Say "long int", not "long", for uniformity with GNU style.
6934
006d217d
PE
69352004-02-25 Paul Eggert <eggert@twinsun.com>
6936
6937 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
6938 compilers. This fixes a problem with Intel's C++ compiler being
6939 chatty, reported by Guido Trentalancia in
161a71f3 6940 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 6941
c2729758
ADL
69422004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
6943
6944 Support %destructor and merge error locations in lalr1.cc.
6945
6946 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
6947 (Parser::stos_): Define unconditionally.
6948 (Parser::destruct_): New method. Generate its body with
6949 b4_yydestruct_generate.
6950 (Parser::error_start_): New attribute.
6951 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
6952 token which are discarded.
6953 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
6954 error_start_ when erroneous token are discarded.
6955 (Parser::parse) <yyerrlab1>: Compute the location of the error
6956 token so that it covers all the discarded tokens.
6957 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
6958 it can be called with `%skeleton "lalr1.cc"', and do that.
6959
dd0e0635
PE
69602004-02-02 Paul Eggert <eggert@twinsun.com>
6961
6962 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
6963 $(top_srcdir)/lib and ../lib. This fixes a bug reported
6964 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
6965 There's no need to mention top_builddir since Automake does that
6966 for us.
6967 (INCLUDES): Remove, as Automake says it's obsolescent.
6968 Contents migrated into AM_CPPFLAGS as described above.
6969 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
6970
69712004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6972
6973 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
6974 (yyreportSyntaxError): Handle case where lookahead token is
6975 YYEMPTY.
6976
be16239b
PH
69772004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6978
6979 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
6980 resulting parsers are compilable with C++.
6981
5fa90832
PE
69822003-12-23 Paul Eggert <eggert@twinsun.com>
6983
6984 * config/depcomp, config/install-sh: Sync with Automake 1.8.
6985 * src/output.c (output_skeleton): Rename local var.
6986 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
6987 Bison tokens, as this runs afoul of the 2003-10-07 change that
6988 disallowed NUL bytes in character constants or string literals.
6989
6990 * tests/local.at: Require Autoconf 2.59's Autotest.
6991 * tests/testsuite.at: Don't include local.at, since we now assume
6992 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
6993 including it.
6994 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
6995 multiple inclusion warnings.
dd0e0635 6996
b165c324
AD
69972003-12-02 Akim Demaille <akim@epita.fr>
6998
6999 * doc/bison.texinfo (How Can I Reset the Parser): More about start
7000 conditions.
7001 From Bruno Haible.
7002
26e06a21
ADL
70032003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
7004
7005 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
7006
92ac3705
PE
70072003-10-07 Paul Eggert <eggert@twinsun.com>
7008
6a5ecb38
PE
7009 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
7010 if testsuite doesn't exist.
7011
92ac3705
PE
7012 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
7013 literals, unfortunately.
7014 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
7015 Complain about NUL bytes in character constants or string literals.
7016
91d2c560
PE
70172003-10-05 Paul Eggert <eggert@twinsun.com>
7018
7019 * NEWS: Don't document %no-default-prec, as it's still
7020 too experimental.
7021 * doc/bison.texinfo: Document %no-default-prec only if
7022 the defaultprec flag is set. Normally it's not.
7023
0cc3da3a
PE
70242003-10-04 Paul Eggert <eggert@twinsun.com>
7025
7026 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
7027 non-modifiable lvalue, instead of a modifiable one.
7028 * doc/bison.texinfo (Actions): Document that $$ can
7029 be assigned to. Do not claim that $$ and $N are
7030 array element references: user code should not rely on this.
7031
22fccf95
PE
70322003-10-01 Paul Eggert <eggert@twinsun.com>
7033
7034 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
7035 (grammar_declaration): Use it.
7036 * src/scan-gram.l: New token %no-default-prec.
7037 * tests/conflicts.at: Revamp tests to use %no-default-prec.
7038 * NEWS, doc/bison.texinfo: Document the above.
7039
fc8f2965
AD
70402003-10-01 Akim Demaille <akim@epita.fr>
7041
7042 VCG no longer supports long_straight_phase.
7043
7044 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
7045 * src/print_graph.c (print_graph): Adjust.
7046
39a06c25
PE
70472003-09-30 Frank Heckenbach <frank@g-n-u.de>
7048 and Paul Eggert <eggert@twinsun.com>
7049
7050 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
7051 Table of Symbols): Document %default-prec.
7052 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
7053 (grammar_declaration): Set default_prec on %default-prec.
7054 * src/scan-gram.l (%default-prec): New token.
7055 * src/reader.h (default_prec): New flag.
7056 * src/reader.c: Likewise.
7057 (packgram): Handle it.
7058 * tests/conflicts.at (%default-prec without %prec,
7059 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 7060
39a06c25
PE
70612003-09-30 Paul Eggert <eggert@twinsun.com>
7062
7063 * tests/testsuite.at: Include local.at, not input.at, fixing
7064 a typo in the 2003-08-25 patch.
7065
62b6aef9
AD
70662003-08-27 Akim Demaille <akim@epita.fr>
7067
7068 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
7069 GCC warnings.
7070
89e1cc61
AD
70712003-08-26 Akim Demaille <akim@epita.fr>
7072
7073 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
7074 "<\#" to avoid magic from Gnus when posting parts of this script.
7075
a08460b0
AD
70762003-08-26 Akim Demaille <akim@epita.fr>
7077
7078 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
7079 (Parser::parse): here.
7080 Adjust: nerrs and errstatus is now replaced by...
7081 (Parser::nerrs_, Parser::errstatus_): New.
7082
603f1cfd
AD
70832003-08-25 Akim Demaille <akim@epita.fr>
7084
7085 * config/announce-gen, Makefile.cfg: New.
7086 * Makefile.am: Adjust.
7087 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
7088 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
7089
cd3684cf
AD
70902003-08-25 Akim Demaille <akim@epita.fr>
7091
7092 When reducing initial empty rules, Bison parser read an initial
7093 location that is not defined. This results in garbage, and that
7094 affects Bison's own parser. Therefore we need (i) to extend Bison
7095 to support a means to initialize this location, and (ii) to use
7096 this CVS Bison to fix CVS Bison's parser.
7097
7098 * src/reader.h, reader.c (epilogue_augment): Remove, replace
7099 with...
7100 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
7101 * src/parse-gram.y: Adjust.
7102 (%initial-action): New.
7103 (%error-verbose): Since we require CVS Bison, there is no reason
7104 not to use it.
7105 * src/scan-gram.l: Adjust.
7106 * src/Makefile.am (YACC): New, to make sure we use our own parser.
7107 * data/yacc.c (yyparse): Use b4_initial_action.
7108
4e03e201
AD
71092003-08-25 Akim Demaille <akim@epita.fr>
7110
7111 * doc/bison.texinfo: Don't promote stdout for error messages.
7112
8c182d05
AD
71132003-08-25 Akim Demaille <akim@epita.fr>
7114
7115 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
7116 From Alexandre Duret-Lutz.
7117
6a60c4cf
PE
71182003-08-25 Akim Demaille <akim@epita.fr>
7119
7120 Version 1.875c.
7121
25f66e1a
AD
71222003-08-25 Akim Demaille <akim@epita.fr>
7123
7124 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
7125 Use them.
7126
5348bfbe
AD
71272003-08-25 Akim Demaille <akim@epita.fr>
7128
7129 * data/lalr1.cc (Parser::reduce_print_): New.
7130 Use it.
7131
47301314
AD
71322003-08-25 Akim Demaille <akim@epita.fr>
7133
7134 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
7135 error recovery loops. This patch is based on
161a71f3 7136 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
7137 Also, augment the similarity between lalr1.cc and yacc.c.
7138 Note: the locations of error recovery rules are not correct yet.
7139
7140 * data/lalr1.cc: Comment changes to augment the similarity between
7141 lalr1.cc and yacc.c.
7142 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
7143 (yyerrlab1): Remove, but where it used to be (now the bottom part of
7144 yyerrlab), when hitting EOF, pop the whole stack here instead of
7145 merely falling thru the default error handling mechanism.
7146 (yyerrorlab): New label, with the old contents of YYERROR,
7147 plus the following change: pop the stack of rhs corresponding
7148 to the production that invoked YYERROR. That is how Yacc
7149 behaves (required by POSIX).
7150 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
7151 fail.
7152
1f7a61ff
AD
71532003-08-25 Akim Demaille <akim@epita.fr>
7154
7155 Tune local.at so that people can "autom4te -l autotest calc.at -o
7156 calc" for instance, to extract a sub test suite.
7157
7158 * tests/testsuite.at: Move the initialization, Autotest version
7159 requirement, and AT_TESTED invocation into...
7160 * tests/local.at: here.
7161 * tests/testsuite.at: Include it for compatibility with Autoconf
7162 2.57.
7163 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
7164 be ignore.
7165
327b5b56
PE
71662003-08-04 Paul Eggert <eggert@twinsun.com>
7167
7168 Rework code slightly to avoid gcc -Wtraditional warnings.
7169 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
7170 The returned value is now stored in *YY0. All callers changed.
7171 * src/output.c (merge_output): Adjust to the above change.
7172
0051e3ed
PE
71732003-07-26 Paul Eggert <eggert@twinsun.com>
7174
7175 * data/glr.c (YYASSERT): New macro.
7176 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
7177 yyresolveStates, yyprocessOneStack):
7178 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
7179 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 7180
137437c6
PE
71812003-07-25 Paul Eggert <eggert@twinsun.com>
7182
5b620e06
PE
7183 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
7184 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 7185 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
7186 by Frank Heckenbach, though I have omitted the structure-initialization
7187 part of his glr-knr.diff patch since I recall that the Portable
7188 C Compiler didn't require that change.
7189
137437c6
PE
7190 Let the user specify how to allocate and free memory.
7191 Derived from a suggestion by Frank Heckenbach in
161a71f3 7192 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
7193 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
7194 All uses of free, malloc, realloc changed to use these macros,
7195 and unnecessary casts removed.
7196 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
7197
ddb85ca5
PE
71982003-07-06 Matthias Mann <MatthiasMann@gmx.de>
7199
7200 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
7201 use s.empty() rather than s == "" to test for empty string; see
161a71f3 7202 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
7203 (trivial change)
7204
39910e09
AD
72052003-06-25 Akim Demaille <akim@epita.fr>
7206
7207 * config/depcomp, config/install-sh: Update from masters.
7208
0ae99356
PE
72092003-06-20 Paul Eggert <eggert@twinsun.com>
7210
7211 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
7212 and return properly parenthesized result.
7213 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
7214 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7215 Remove unnecessary parentheses from uses.
7216 * doc/bison.texinfo (Location Default Action): Describe the
7217 conventions for parentheses.
7218
cd05d13c
PE
72192003-06-19 Paul Eggert <eggert@twinsun.com>
7220
81fd08ca
PE
7221 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
7222 yyreportTree): Do not assume that size_t is the same width as int,
7223 when printing sizes. Print sizes using an unsigned format.
7224 Problem reported by Frank Heckenbach in
161a71f3 7225 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 7226
cd05d13c
PE
7227 Port to Forte Developer 7 C compiler.
7228 * data/glr.c (struct YYLTYPE): If locations are not being used,
7229 declare a single dummy member, as empty structs do not conform
7230 to the C standard.
7231 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
7232 the Forte Developer 7 C compiler complains that end-of-loop
7233 code is not reached.
7234
4dcf140b
PE
72352003-06-17 Paul Eggert <eggert@twinsun.com>
7236
7237 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
7238 avoid warnings from picky compilers about redefinition of PARAMS.
7239
8dd76bee
PE
72402003-06-17 Paul Eggert <eggert@twinsun.com>
7241
7242 Version 1.875b.
7243
7244 * NEWS: Document 1.875b.
7245
7246 * lib/bbitset.h: Do not include config.h; that's the includer's job.
7247 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
7248 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
7249 Don't use 'index' in comments, as it's a builtin fn on some hosts.
7250 * lib/bitset_stats.c: Include gettext.h unconditionally, as
7251 per recent gettext manual's suggestion.
7252 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
7253 Use prototypes, not old-style definitions.
7254 * lib/lbitset.c (lbitset_unused_clear): Likewise.
7255 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
7256 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
7257 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
7258 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
7259 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
7260 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
7261 vbitset_or_and_cmp, vbitset_copy): Likewise.
7262
7263 * lib/libiberty.h: Do not include config.h; that's the includer's job.
7264 Do not include <stdlib.h>.
7265 (PARAMS): Define unconditionally for C89.
7266 (ATTRIBUTE_NORETURN): Remove.
7267 (ATTRIBUTE_UNUSED): Define unconditionally.
7268
7269 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 7270 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
7271 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
7272 * lib/vbitset.c, lib/vbitset.h: New files.
7273 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
7274 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
7275 from libbitset.
7276
7277 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
7278 `How Can I Reset @code{yyparse}', since texinfo does not allow
7279 arbitrary @ in node names.
7280
7281 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
7282 shouldn't be needed according to the gettext 0.12.1 documentation
7283 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 7284 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 7285 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 7286 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 7287
8dd76bee
PE
7288 * lib/.cvsignore: Add stdbool.h.
7289 * m4/.cvsignore: Add nls.m4, po.m4.
7290
7291 Upgrade to CVS gnulib.
7292 * stdbool_.h: File renamed from stdbool.h.in.
7293 * configure.ac (AM_STDBOOL_H): Invoke this instead of
7294 AC_HEADER_STDBOOL.
7295 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
7296 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
7297 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
7298 (MOSTLYCLEANFILES): New var.
7299 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
7300 (stdbool.h): New rule.
7301 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
7302 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
7303 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
7304 m4/quote.m4: Upgrade to today's gnulib.
7305
7306 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
7307 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
7308 the tests right now.
7309 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
7310 yyerror are declared before use; C99 requires this.
7311
25005f6a
PH
73122003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7313
7314 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
7315 first.
7316 (yyrecoverSyntaxError): Correct the logic for setting and testing
7317 yyerrState.
7318 Correct comment on handling EOF.
7319 Allow states with only a default reduction, rather than failing
8dd76bee 7320 (I can't quite reconstruct why these were not allowed before).
25005f6a 7321
137437c6 7322 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 7323 buffer overruns, corrupting state.
8dd76bee
PE
7324
7325 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
7326 definition.
7327 * src/reader.h (max_left_semantic_context): New variable declaration.
7328 * src/scan-gram.l (max_left_semantic_context): Define.
7329 (handle_action_dollar): Update max_left_semantic_context.
7330 * data/glr.c (YYMAXLEFT): New definition.
7331 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
7332 (yyresolveAction): Ditto.
7333
7334 Fixes to problems with location handling in GLR parsers reported by
7335 Frank Heckenbach (2003/06/05).
7336
7337 * data/glr.c (YYLTYPE): Make trivial if locations not used.
7338 (YYRHSLOC): Add parentheses, and define only if locations used.
7339 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
7340 locations not used.
7341 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
7342 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 7343
25005f6a
PH
7344 * tests/cxx-type.at: Exercise location information; update tests
7345 to differentiate output with and without locations.
8dd76bee 7346 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
7347 because default YYLTYPE not yet defined.
7348 Change semantic actions to compute strings, rather than printing
7349 them directly (to test proper passing of semantics values). Change
7350 output to prefix notation and update test data and expected results.
7351 (yylex): Track locations.
7352 (stmtMerge): Return value rather than printing, and include arguments
7353 in value.
8dd76bee 7354
711f40b7
PE
73552003-06-03 Paul Eggert <eggert@twinsun.com>
7356
7357 Avoid warnings generated by GCC 2.95.4 when Bison is
7358 configured with --enable-gcc-warnings.
7359 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
7360 yy::]b4_parser_class_name[::translate_,
7361 yy::Stack::operator[] (unsigned),
7362 yy::Stack::operator[] (unsigned) const,
7363 yy::Slice::operator[] (unsigned),
7364 yy::Slice::operator[] (unsigned) const):
7365 Rename local vars to avoid warnings.
7366 * tests/glr-regression.at (Improper handling of embedded actions
7367 and $-N in GLR parsers): Remove unused local variable from yylex.
7368 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
7369 (void) as arg when not pure, since we now assume C89 when building
7370 Bison. Pacify GCC by using parameter.
7371
ac695f7d
PE
73722003-06-02 Paul Eggert <eggert@twinsun.com>
7373
7374 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
7375 yy::Location::lines, yy::Location::columns): Rename arguments
7376 to avoid shadowing; this removes a warning generated by GCC 3.3.
7377
26ec81e0
PE
73782003-06-01 Paul Eggert <eggert@twinsun.com>
7379
7380 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
7381 to g++, as GCC 3.3 complains if you do it.
7382 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
7383 everything that WARNING_CFLAGS has, except omit warnings
7384 not suitable for C++.
7385 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
7386 * tests/atlocal.in (CXXFLAGS): New var.
7387 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
7388
7389 Fix a GLR parser bug I reported in February; see
161a71f3 7390 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
7391 The problem was that GLR parsers did not conform to the C standard,
7392 because actions like { $1 = $2 + $3; } expanded to expressions
7393 that invoked YYFILL in separate subexpressions, and YYFILL assigned
7394 to a local variable. The C standard says that expressions
7395 like (var = f ()) + (var = f ()) have undefined behavior.
7396 Another problem was that GCC sometimes issues warnings that
7397 yyfill and its parameters are unused.
7398
7399 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
7400 as possibly unused.
7401 (yyfill): New function.
7402 (YYFILL): Use it.
7403 (yyuserAction): Change type of yynormal to bool, so that it matches
7404 the new yyfill signature. Mark it as possibly unused.
7405
7406
7407 Follow up on a bug I reported in February, where a Bison-generated
7408 parser can loop. Provide a test case and a fix for yacc.c. I
7409 don't have a fix for lalr1.cc or for glr.c, unfortunately.
7410 The original bug report is in:
161a71f3 7411 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
7412
7413 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
7414 macro's size was becoming unwieldy.
7415 (yyerrlab): Do not discard an empty lookahead symbol, as this
7416 might destroy garbage.
7417 (yyerrorlab): New label, with the old contents of YYERROR,
7418 plus the following change: pop the stack of rhs corresponding
7419 to the production that invoked YYERROR. That is how Yacc
7420 behaves, and POSIX requires this behavior.
7421 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
7422 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
7423 Define 'alarm' to do nothing if unistd.h is not available.
7424 Add a new rule "exp: '-' error;" to test the above change to
7425 data/yacc.c. Use 'alarm' to abort any test taking longer than
7426 10 seconds, as it's probably looping.
7427 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
7428 Also, the new yacc.c generates two fewer diagnostics for an
7429 existing test.
7430
d0829076
PE
74312003-05-24 Paul Eggert <eggert@twinsun.com>
7432
c6ae27df
PE
7433 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
7434 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
7435 This fixes a problem reported by John Bowman when the Compaq/HP
7436 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
7437 -ansi -Wall -gall).
7438 * data/yacc.c (union yyalloc): Likewise.
7439 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 7440
d0829076
PE
7441 Switch from 'int' to 'bool' where that makes sense.
7442
7443 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
7444 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
7445 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
7446 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
7447 Return or accept bool, not int. All callers changed.
7448 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
7449 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
7450 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
7451 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
7452 bitset_or_and_cmp_): Likewise.
7453 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
7454 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
7455 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
7456 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
7457 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
7458 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
7459 bitset_stats_or_and_cmp): Likewise.
7460 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
7461 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
7462 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
7463 ebitset_xor_cmp): Likewise.
7464 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
7465 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
7466 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
7467 lbitset_xor_cmp): Likewise.
7468 * lib/bbitset.h: Include <stdbool.h>.
7469 (struct bitset_vtable): The following members now return bool, not
7470 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
7471 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
7472 or_and_cmp).
7473 * src/conflicts.c (count_rr_conflicts): Likewise.
7474 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
7475 All uses changed.
7476 * lib/ebitset.c (ebitset_obstack_init): Likewise.
7477 * lib/lbitset.c (lbitset_obstack_init): Likewise.
7478 * src/getargs.c (debug_flag, defines_flag, locations_flag,
7479 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
7480 graph_flag): Likewise.
7481 * src/getargs.h (debug_flag, defines_flag, locations_flag,
7482 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
7483 graph_flag): Likewise.
7484 * src/output.c (error_verbose): Likewise.
7485 * src/output.h (error_verbose): Likewise.
7486 * src/reader.c (start_flag, typed): Likewise.
7487 * src/reader.h (typed): Likewise.
7488 * src/getargs.c (LOCATIONS_OPTION): New constant.
7489 (long_options, getargs): Use it.
7490 * src/lalr.c (build_relations): Use bool, not int.
7491 * src/nullable.c (nullable_compute): Likewise.
7492 * src/print.c (print_reductions): Likewise.
7493 * src/tables.c (action_row, pack_vector): Likewise.
7494 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
7495 * src/output.c (prepare): Use it.
7496 * src/output.c (token_definitions_output,
7497 symbol_destructors_output, symbol_destructors_output): Use string,
7498 not boolean integer, to keep track of whether to output separator.
7499 * src/print_graph.c (print_core): Likewise.
7500 * src/state.c (state_rule_lookaheads_print): Likewise.
7501
7502 * config/install-sh: Sync from automake 1.7.5.
7503
6b2584b7
PE
75042003-05-14 Paul Eggert <eggert@twinsun.com>
7505
7506 * src/parse-gram.y (rules_or_grammar_declaration): Require a
7507 semicolon after a grammar declaration, in the interest of possible
7508 future changes to the Bison input language.
7509 Do not allow a stray semicolon at the start of the grammar.
7510 (rhses.1): Allow one or more semicolons after any rule, including
7511 just before "|" as required by POSIX.
7512 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
7513 grammar.
7514
caf37a36
ADL
75152003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
7516
7517 %parse-param support for lalr1.cc.
7518
7519 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
7520 b4_cc_constructor_calls, b4_cc_constructor_call,
7521 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
7522 definitions.
7523 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
7524 parse-param arguments.
7525 (yy::b4_parser_class_name): Declare instance variables to
7526 hold parse-param arguments.
7527 * tests/calc.at: s/value/semantic_value/ because value clashes
7528 with a member of yy::b4_parser_class_name. Adjust C++ code
7529 to handle %parse-param. Enable %parse-param test in C++.
7530
3ab37077
PE
75312003-05-12 Paul Eggert <eggert@twinsun.com>
7532
7533 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
7534 English a bit. Fix fclose typo. Change "const char" to "char
7535 const", and use ANSI C rather than K&R for "main". Suggest
7536 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
7537 and suggest yy_switch_to_buffer.
7538
75392003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
7540
7541 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
7542 C89. This avoids a diagnostic on compilers that define __STDC__
7543 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 7544 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 7545
e743727f
PE
75462003-05-03 Paul Eggert <eggert@twinsun.com>
7547
7548 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
7549 Do not overrun array bounds.
7550 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 7551 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 7552
916708d5
AD
75532003-04-29 Akim Demaille <akim@epita.fr>
7554
7555 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
7556 * src/getargs.c, src/getargs.h: here, as bool, not int.
7557 (nondeterministic_parser): New.
7558 * src/parse-gram.y, src/scan-gram.l: Support
7559 %nondeterministic-parser.
7560 * src/output.c (prepare): Use nondeterministic_parser instead
7561 of glr_parser where appropriate.
7562 * src/tables.c (conflict_row, action_row, save_row)
7563 (token_actions, token_actions, pack_vector): Ditto.
7564
a06ea4aa
AD
75652003-04-29 Akim Demaille <akim@epita.fr>
7566
7567 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
7568
211074ca
AD
75692003-04-29 Akim Demaille <akim@epita.fr>
7570
7571 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
7572 with %pure-parser and %locations to exercise the patch from Yakov
7573 Markovitch below.
7574
6175ffe3
PE
75752003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
7576
7577 * data/yacc.c: (b4_lex_param): Corrected for the case where
7578 %lex-param is provided and %pure-parser isn't.
7579
b1e95857
PE
75802003-04-27 Paul Eggert <eggert@twinsun.com>
7581
7582 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 7583 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
7584 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
7585 if it is not defined.
7586 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
7587
acda9df6
PE
75882003-04-26 Paul Eggert <eggert@twinsun.com>
7589
3470c57b
PE
7590 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
7591 Declare to be of type suitable for the ninf value itself, not of
7592 type suitable for the corresponding table, since the latter might
7593 be unsigned but the ninf value might be negative. This fixes a
7594 bug reported by Alexandre Duret-Lutz in
161a71f3 7595 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 7596
acda9df6
PE
7597 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
7598 invokes it. We shouldn't invoke it twice because it will attempt
7599 to put error.o in the archive twice. This fixes a glitch reported
7600 by Martin Mokrejs in
161a71f3 7601 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 7602
b5250f26
PE
76032003-04-21 Paul Eggert <eggert@twinsun.com>
7604
7605 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
7606 to gnulib.
7607
089ac0f1
PE
76082003-04-21 Yakov Markovitch <Markovitch@iso.ru>
7609
7610 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
7611 Fix obvious typo that results in uncompilable GLR parsers
7612 when both %pure-parser and %locations are used. (trivial change)
7613
5ededac6
PE
76142003-04-17 Paul Eggert <eggert@twinsun.com>
7615
1b8f2fff
PE
7616 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
7617 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
7618 Do not insert the expected token via unput, as this runs afoul
7619 of a POSIX-compatibility bug in flex 2.5.31.
7620 All uses changed to BEGIN the parent state,
7621 since we no longer insert the expected token via unput.
7622 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
7623 that is no longer emitted after the above change.
7624
5ededac6
PE
7625 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
7626 the first one. This change is from Paul Hilfinger, and it fixes
7627 regression reported by Werner Lemberg in
161a71f3 7628 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
7629
7630 (resolve_sr_conflict): Don't invoke state_errs_set
7631 unless one or more tokens have been explicitly made errors.
7632 Otherwise, the above change causes Bison to abort.
7633
7634 * tests/existing.at (GNU pic Grammar): New test case, taken from
7635 Lemberg's email.
7636
b8be9132
AD
76372003-03-31 Akim Demaille <akim@epita.fr>
7638
7639 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
7640
d423d460
AD
76412003-03-31 Akim Demaille <akim@epita.fr>
7642
7643 * src/output.c (prepare_symbols): Avoid trailing spaces in the
7644 output.
7645
c7e441b4
AD
76462003-03-31 Akim Demaille <akim@epita.fr>
7647
7648 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
7649 From Paul Hilfinger.
7650
231897ad
AD
76512003-03-29 Akim Demaille <akim@epita.fr>
7652
7653 * m4/error.m4: Do not put under dynamic conditions some code which
7654 expansion is under static control.
7655
5b066063
AD
76562003-03-29 Akim Demaille <akim@epita.fr>
7657
7658 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
7659
22a74fec
AD
76602003-03-29 Akim Demaille <akim@epita.fr>
7661
7662 * doc/bison.texinfo (Strings are Destroyed): New.
7663
0eee27e7
PE
76642003-03-13 Paul Eggert <eggert@twinsun.com>
7665
7666 * .cvsignore: Add configure.lineno.
7667 * src/.cvsignore: Add yacc.
7668 * tests/.cvsignore: Add testsuite.log.
7669 * doc/fdl.texi: Sync with latest FSF version.
7670
f61aad93
PE
76712003-03-12 Paul Eggert <eggert@twinsun.com>
7672
537636c7
PE
7673 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
7674 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
7675 cursor, instead of leaving it undefined. This fixes a bug
7676 reported by Tim Van Holder in
161a71f3 7677 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
7678 * tests/input.at (Torturing the Scanner): Test the scanner on
7679 an empty input file, which was Tim Van Holder's test case.
7680
7681 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
7682 <sys/resource.h> can be included, include sys/time.h and
7683 sys/times.h first, if available. This works around the SunOS
7684 4.1.4 porting bug reported by Bruce Becker in
161a71f3 7685 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
7686
7687 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
7688 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
7689 AC_HEADER_SYS_WAIT.
7690
f61aad93
PE
7691 Merge changes from gnulib. This was prompted because the CVS
7692 snapshot didn't build on Solaris 7 due to strnlen problems.
7693
7694 These changes need to be merged back into gnulib:
7695 * lib/hash.c: Include <stdbool.h> unconditionally.
7696 * m4/onceonly.m4 (m4_quote): New macro.
7697 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
7698 Quote AC_FOREACH variable-expansions properly.
7699 The 2003-01-03 obstack.h change also needs merging.
7700 {end of changes requiring merging}
5b066063 7701
f61aad93
PE
7702 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
7703 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
7704 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
7705 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
7706 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
7707 New files, imported from gnulib.
7708 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
7709 above.
7710
7711 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
7712 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
7713 gnulib sources.
7714
7715 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
7716 Add.
7717 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
7718 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
7719 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
7720 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
7721 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
7722 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
7723 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
7724 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
7725 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
7726 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
7727 (jm_PREREQ_ARGMATCH): Remove.
7728 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
7729 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
7730
7731 * src/system.h: Include <stdbool.h> unconditionally.
7732
7733 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
7734 assuming at least C89 in the bitset code for some time now.
7735
d2ffe116
AD
77362003-03-03 Akim Demaille <akim@epita.fr>
7737
7738 * ro.po: New.
7739
052826fd
AD
77402003-03-02 Akim Demaille <akim@epita.fr>
7741
7742 * doc/bison.texinfo (Table of Symbols): Reactivate the
7743 documentation for %lex-param, and %parse-param.
7744
c4749565
AD
77452003-03-02 Akim Demaille <akim@epita.fr>
7746
7747 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
7748 generate verbose error messages.
7749 Use the number of tokens as an upper bound in yytname, as it
7750 cannot be a non terminal.
7751
d5286af1
AD
77522003-03-02 Akim Demaille <akim@epita.fr>
7753
7754 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
7755 message.
7756
22e304a6
AD
77572003-03-02 Akim Demaille <akim@epita.fr>
7758
22e304a6
AD
7759 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
7760 Use them to exercise yycheck overrun.
7761 Based on Andrew Suffield's grammar.
7762
67a25fed
AD
77632003-03-02 Akim Demaille <akim@epita.fr>
7764
7765 Create tests/local.at for Bison generic testing macros.
7766
7767 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
7768 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
7769 This new file.
7770 * tests/calc.at (AT_CHECK_CALC): Adjust.
7771 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
7772 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
7773 * tests/local.at: here.
7774 (AT_COMPILE_CXX): Tags the tests using it as c++.
7775 Ignore the test if CXX is not functional.
7776
9c2b381f
PE
77772003-03-01 Paul Eggert <eggert@twinsun.com>
7778
7779 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
7780 not loc->end, since loc->end might contain garbage and this leads
7781 to undefined behavior on some platforms.
7782 (id_loc, token_start): Use (IF_LINTed) initial values that do not
7783 depend on *loc, so that the reader doesn't give the the false
7784 impression that *loc is initialized.
7785 (<INITIAL>"%%"): Do not bother setting code_start, since its value
7786 does not survive the return.
7787
0433ba88
AD
77882003-03-01 Akim Demaille <akim@epita.fr>
7789
7790 * src/scan-gram.l (code_start): Always initialize it when entering
7791 into yylex, as SC_EPILOGUE is activated *before* the corresponding
7792 yylex invocation. An alternative would be making it static, but
7793 then it starts with the second %%'s beginning, instead of its end.
7794
b305ea69
PE
77952003-02-28 Paul Eggert <eggert@twinsun.com>
7796
7797 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
7798 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 7799 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 7800
c3d25e01
PE
78012003-02-26 Paul Eggert <eggert@twinsun.com>
7802
7803 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
7804 Remove Sequent/Pyramid discussion (nobody uses them any more).
7805 Merge VMS and MS-DOS discussion; these ports may well be dead
7806 but let's keep mentioning them for now. Put <> around email
7807 addresses. Add copyright notice.
7808
c267ffbc
PE
78092003-02-24 Paul Eggert <eggert@twinsun.com>
7810
7811 * data/glr.c (yy_reduce_print): yylineno -> yylno,
7812 to avoid collision with flex use of yylineno.
7813 Problem reported by Bruce Lilly in
161a71f3 7814 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
7815 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7816 * data/yacc.c (yy_reduce_print): Likewise.
7817
7818 * config/depcomp: Sync with Automake 1.7.3.
7819
f939fc12
AD
78202003-02-21 Akim Demaille <akim@epita.fr>
7821
7822 * data/lalr1.cc: Use temporary variables instead of casts to
7823 change integer types.
7824 Suggested by Paul Eggert.
7825
95923bd6
AD
78262003-02-21 Akim Demaille <akim@epita.fr>
7827
7828 * doc/bison.texinfo: Use "location" consistently to refer to @n,
7829 to avoid confusions with lalr1.cc's notion of Position.
7830 Suggested by Paul Eggert.
7831
2cdc240e
AD
78322003-02-20 Akim Demaille <akim@epita.fr>
7833
7834 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
7835 before initial_columns.
7836 (location.hh): Use consistent variable names when defining the
7837 operator<<.
7838 Use "last" so that we subtract from Positions, not from unsigned.
7839
5d003116
AD
78402003-02-20 Akim Demaille <akim@epita.fr>
7841
7842 * data/lalr1.cc (position.hh): New subfile, including the extended
7843 and Doxygen'ed documentation of class Position.
7844 (location.hh): Use it.
7845 Document a` la Doxygen.
ba1ecc07 7846 With the help of Benoit Perrot.
5d003116 7847
d02b25f9
AD
78482003-02-20 Akim Demaille <akim@epita.fr>
7849
7850 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
7851 AT_YACC_IF.
7852 Redefine AT_YYERROR_SEES_LOC_IF using it.
7853 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
7854 not defined.
7855 Don't use the location in yy::Parser::error_ and
7856 yy::Parser::print_ when not %locations.
7857 Activate more lalr1.cc tests.
7858
0d1c3a04
AD
78592003-02-19 Akim Demaille <akim@epita.fr>
7860
7861 * data/lalr1.cc: When displaying a line number, be sure to make it
7862 an int.
7863
60a777aa
AD
78642003-02-19 Akim Demaille <akim@epita.fr>
7865
7866 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
7867 Remove, useless.
7868 (YYABORT, YYACCEPT, YYERROR): New.
7869 * tests/calc.at: Renable the lalr1.cc test.
7870
0b86fc41
AD
78712003-02-19 Akim Demaille <akim@epita.fr>
7872
7873 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
7874 error recovery, mixing with/without pops and discarding of the
7875 lookahead.
7876 Exercise YYERROR.
7877 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
7878
da99a5dc
PE
78792003-02-17 Paul Eggert <eggert@twinsun.com>
7880
7881 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
7882 * tests/testsuite.at (AT_COMPILE): Use them.
7883 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 7884 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 7885
93b8c255
PE
78862003-02-12 Paul Eggert <eggert@twinsun.com>
7887
7888 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
7889 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 7890 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
7891 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
7892 Check for malloc failure, for consistency with yacc.c.
7893 (yytname_size): Remove, for consistency with yacc.c.
7894
7895 The bug still remains in data/lalr1.cc, as I didn't have time
7896 to fix it there.
7897
7548fed2
AD
78982003-02-06 Akim Demaille <akim@epita.fr>
7899
7900 * configure.ac (GXX): Rename as...
7901 (CXX): this, to keep the original Autoconf semantics.
7902 Require 2.57.
7903 * data/lalr1.cc: Fix b4_copyright invocations.
7904 If YYDEBUG is not defined, don't depend upon name_ being defined.
7905 (location.hh): Include string and iostream.
7906 (Position::filename): New member.
7907 (Position::Position ()): New.
7908 (operator<< (Position)): New.
7909 (operator- (Position, int)): New.
7910 (Location::first, Location::last): Rename as...
7911 (Location::begin, Location::end): these, to mock the conventional
7912 iterator names.
7913 (operator<< (Location)): New.
7914 * tests/atlocal.in (CXX): New.
7915 * tests/testsuite.at (AT_COMPILE_CXX): New.
7916 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
7917 locations in a more synthetic way.
7918 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
7919 lalr1.cc is used.
7920 Adjust the C locations to match those from Emacs: first column is
7921 column 0.
7922 Change all the expected results.
7923 Conform to the GCS: simplify the locations when applicable.
7924 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
7925 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
7926 these CPP macros with the m4 macros new defined by...
7927 (AT_CHECK_PUSHDEFS): this, i.e.:
7928 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 7929 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
7930 New macros.
7931 (AT_CHECK_POPDEFS): Undefine them.
7932 (AT_CHECK_CALC_LALR1_CC): New.
7933 Use it for the first lalr1.cc test.
7934
43a176ef
AD
79352003-02-04 Akim Demaille <akim@epita.fr>
7936
7937 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
7938 Location as is defined.
7939
fc049e9c
AD
79402003-02-04 Akim Demaille <akim@epita.fr>
7941
7942 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
7943 name_ being defined.
7944
a737b216
PE
79452003-02-03 Paul Eggert <eggert@twinsun.com>
7946
7947 * src/gram.h (start_symbol): Remove unused decl.
7948
7949 Use more-consistent naming conventions for local vars.
7950
7951 * src/derives.c (derives_compute): Change type of local var from
7952 int to rule_number.
7953 * src/gram.c (grammar_rules_partial_print): Likewise.
7954 * src/print.c (print_core): Likewise.
7955 * src/reduce.c (reduce_grammar_tables): Likewise.
7956
7957 * src/gram.c (grammar_dump): Change name of item_number *
7958 local var from r to rp.
7959 * src/nullable.c (nullable_compute): Likewise.
7960
7961 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
7962
7963 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
7964 for symbol or symbol_number var.
7965 * src/reader.c (grammar_start_symbol_set): Likewise.
7966 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
7967 Likewise.
7968 * src/state.c (transitions_to): Likewise.
7969 * src/state.h: Likewise.
7970 * src/tables.c (symbol_number_to_vector_number): Likewise.
7971
7972 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
7973 char * var.
7974
7975 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
7976 var.
7977
7978 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
7979 var.
7980
7981 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
7982 Use str, not s, for char * var. Use ch, not c, for character var.
7983 Use size for size var.
7984
7985 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
7986 char * var.
7987 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
7988 uniqstr var.
7989 * src/uniqstr.h: Likewise.
7990
7991 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
7992 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
7993 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
7994 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
7995 param to have same name as that of enum, so that we don't use
7996 "s" to stand for a non-state.
7997
68e93ad5
AD
79982003-02-02 Akim Demaille <akim@epita.fr>
7999
8000 * src/scan-skel.l: Scan more than one inert character per yylex
8001 invocation.
8002
92898986
PE
80032003-02-01 Paul Eggert <eggert@twinsun.com>
8004
8005 Version 1.875a.
8006
1d9d5d71
PE
8007 * po/LINGUAS: Add ms.
8008
0435d061
AD
80092003-01-30 Akim Demaille <akim@epita.fr>
8010
8011 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
8012
6029a57f
PH
80132003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8014
8015 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
8016 of $1.
0435d061
AD
8017
8018 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 8019 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 8020 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 8021
6029a57f
PH
8022 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
8023 (b4_rhs_location): Ditto.
0435d061 8024 (yyfill): New function to copy from stack tree into array
6029a57f 8025 incrementally.
0435d061
AD
8026 (yyuserAction): Modify to allow incremental move of semantic values
8027 to rhs array when in GLR mode.
8028 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
8029 as needed.
8030 Remove dummy use of yystack, as there is now a guaranteed use.
8031 (yydoAction): Modify to allow incremental move of semantic values
8032 to rhs array when in GLR mode.
8033 (yyresolveAction): Ditto.
8034 (yyglrShiftDefer): Update comment.
0435d061 8035 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
8036 (yyglrReduce): Ditto.
8037 (yydoAction): Ditto
0435d061 8038
6029a57f
PH
8039 * tests/glr-regr1.at: Rename to ...
8040 * tests/glr-regression.at: Add new regression test for the problems
8041 described above (adapted from S. Eken).
8042 Update copyright notice.
8043 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
8044 * tests/Makefile.am: Ditto.
8045
6cee6297
PE
80462003-01-28 Paul Eggert <eggert@twinsun.com>
8047
8048 * data/lalr1.cc: Do not use @output_header_name@ unless
8049 b4_defines_flag is set. This fixes two bugs reported by
8050 Tim Van Holder in
161a71f3
PE
8051 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
8052 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 8053
b2a836b5
PE
80542003-01-21 Paul Eggert <eggert@twinsun.com>
8055
8056 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
8057 we don't need to worry about yyerrlab1 being reported as an
8058 "unused label" by non-GCC C compilers. The downside is that if
8059 locations are used then a couple of statements are duplicated each
8060 time YYERROR is invoked, but the upside is that the warnings
8061 should vanish.
8062 (yyerrlab1): Move code to YERROR.
8063 (yyerrlab2): Remove. Change uses back to yyerrlab1.
8064 This reverts some of the 2002-12-27 change.
8065
4196b931
PE
80662003-01-17 Paul Eggert <eggert@twinsun.com>
8067
8068 * src/output.c (symbol_printers_output): Fix typo that led
8069 to core dump. Problem reported by Antonio Rus in
161a71f3 8070 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 8071
3ae831b4
AD
80722003-01-13 Akim Demaille <akim@epita.fr>,
8073 Quoc Peyrot <chojin@lrde.epita.fr>,
8074 Robert Anisko <anisko_r@lrde.epita.fr>
8075
8076 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
8077 when the stacks contain one element, as the loop would otherwise
8078 free the last state, and then use the top state (the one we just
8079 popped). This means that the initial elements will not be freed
8080 explicitly, as is the case in yacc.c; it is not a problem, as
8081 these elements have fake values.
8082
e3aa65c5
PE
80832003-01-11 Paul Eggert <eggert@twinsun.com>
8084
8085 * NEWS: %expect-violations are now just warnings, reverting
8086 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
8087 bootstrapping problem reported by Matthias Klose; see
161a71f3 8088 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
8089 * src/conflicts.c (conflicts_print): Likewise.
8090 * tests/conflicts.at (%expect not enough, %expect too much,
8091 %expect with reduce conflicts): Likewise.
8092 * doc/bison.texinfo (Expect Decl): Document this. Also mention
8093 that the warning is enabled if the number of conflicts changes
8094 (not necessarily increases).
8095
8096 * src/getargs.c (version): Update copyright year.
8097
f0057011
AD
80982003-01-09 Akim Demaille <akim@epita.fr>
8099
8100 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
8101
1ee6d2a0
PE
81022003-01-08 Paul Eggert <eggert@twinsun.com>
8103
8104 * Makefile.maint (WGETFLAGS):
8105 New macro, containing "-C off" to disable proxy caches.
8106 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
8107 (rel-check): Use $(WGET) instead of wget.
8108
d4fd77c4
PE
81092003-01-06 Paul Eggert <eggert@twinsun.com>
8110
8111 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
8112 the GLR paper of Scott, Johnstone and Hussain.
8113
464c6927
PE
81142003-01-04 Paul Eggert <eggert@twinsun.com>
8115
d600ee67
PE
8116 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
8117 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
8118 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
8119 (EXTRA_LIBRARIES): New var, for liby.a.
8120 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
8121 (EXTRA_SCRIPTS): New var, for yacc.
8122
464c6927
PE
8123 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
8124 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
8125 Problem reported by Nelson H. F. Beebe.
8126
81272003-01-03 Paul Eggert <eggert@twinsun.com>
8128
8129 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
8130 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
8131 when compiling Bison 1.875's `bitset bset = obstack_alloc
8132 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
8133
8134 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
8135 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
8136 grow to a huge size with typical invocation.
d600ee67 8137
464c6927
PE
8138 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
8139 Use the pattern recommended by Autoconf 2.57, except also protect
8140 against double-definition.
8141 * src/system.h: Likewise.
8142 Portability issues reported by Nelson H. F. Beebe.
d600ee67 8143
464c6927
PE
8144 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
8145 All uses changed. Provide a definition in both C and C++.
8146 (yytrue, yyfalse): Define even if defined (__cplusplus).
8147
8148 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
8149 Reported by Nelson H. F. Beebe.
d600ee67 8150
464c6927
PE
8151 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
8152
0f42c7d5
PE
81532003-01-02 Paul Eggert <eggert@twinsun.com>
8154
8155 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
8156 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
8157 Bug reported by Nelson H. F. Beebe.
8158
dc546b0f
PE
81592003-01-01 Paul Eggert <eggert@twinsun.com>
8160
8161 * Version 1.875.
8162
2c09b6a7
PE
81632002-12-30 Paul Eggert <eggert@twinsun.com>
8164
8165 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
8166 Moved here from...
8167 (<INITIAL>","): Here. This causes stray "," to be treated
8168 more uniformly.
8169
dc546b0f 8170 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
8171 last brace in braced code when not in Yacc mode, for compatibility
8172 with Bison 1.35. This resurrects the 2001-12-15 patch to
8173 src/reader.c.
8174
8175 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
8176 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
8177
535c0f63
PE
81782002-12-28 Paul Eggert <eggert@twinsun.com>
8179
8180 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
8181 that of SYM's type. This fixes Debian bug 168069, reported by
8182 Thomas Olsson.
d600ee67 8183
963fcc17
PE
81842002-12-28 Paul Eggert <eggert@twinsun.com>
8185
8186 Version 1.75f.
8187
8188 Switch back to the Yacc style of conflict reports, undoing some
8189 of the 2002-07-30 change.
8190 * doc/bison.texinfo (Understanding): Use Yacc style for
8191 conflict reports. Also, use new way of locating rules.
8192 * src/conflicts.c (conflict_report):
8193 Renamed from conflict_report_yacc, removing the old
8194 'conflict_report'. Translate the entire conflict report at once,
8195 so that we don't assume that "," has the same interpretation in
8196 all languages.
8197 (conflicts_output): Use Yacc-style conflict report for each state,
8198 instead of our more-complicated style.
8199 (conflicts_print): Use Yacc-style conflict report, except print
8200 the input file name when not emulating Yacc.
8201 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
8202 Conflicted Reduction, %expect not enough, %expect too much,
8203 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
8204 * tests/existing.at (GNU Cim Grammar): Likewise.
8205 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
8206
8207 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
8208 fatal): Don't invoke fflush; it's not needed and it might even be
8209 harmful for stdout, as stdout might not be open.
8210 * src/reduce.c (reduce_print): Likewise.
8211
b1efe548
PE
82122002-12-27 Paul Eggert <eggert@twinsun.com>
8213
8214 Fix a bug where error locations were not being recorded correctly.
8215 This problem was originally reported by Paul Hilfinger in
161a71f3 8216 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
8217
8218 * data/yacc.c (yyparse): New local var yylerrsp, to record the
8219 top of the location stack's error locations.
8220 (yyerrlab): Set it. When discarding a token, push its location
8221 onto yylerrsp so that we don't lose track of the error's end.
8222 (yyerrlab1): Now is only the target of YYERROR, so that we can
8223 properly record the location of the action that failed. For GCC
8224 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
8225 GCC warning about yyerrlab1 being unused if YYERROR is unused.
8226 (yyerrlab2): New label, which yyerrlab now falls through to.
8227 Compute the error's location by applying YYLLOC_DEFAULT to
8228 the locations of all the symbols that went into the error.
8229 * doc/bison.texinfo (Location Default Action): Mention that
8230 YYLLOC_DEFAULT is also invoked for syntax errors.
8231 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8232 Error locations include the locations of all the tokens that were
8233 discarded, not just the last token.
d600ee67 8234
983c5c2c
PE
82352002-12-26 Paul Eggert <eggert@twinsun.com>
8236
b1efe548
PE
8237 * src/files.c: Include quote.h.
8238 (compute_output_file_names): Warn if we detect conflicting
8239 outputs to the same file. This should catch the misunderstanding
8240 exemplified by Debian Bug 165349, reported by Bruce Stephens..
8241
8242 * src/conflicts.c (conflicts_print): If the user specifies
8243 "%expect N", report an error if there are any reduce/reduce
8244 conflicts. This is what the manual says should happen.
8245 This fixes Debian bug 130890, reported by Anthony DeRobertis.
8246 * tests/conflicts.at (%expect with reduce conflicts): New test.
8247
983c5c2c
PE
8248 Don't use m4_include on relative file names, as it doesn't work as
8249 desired if there happens to be a file with that name under ".".
d600ee67 8250
983c5c2c
PE
8251 * m4sugar/version.m4: Remove; it was included but it wasn't used.
8252 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
8253 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
8254 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
8255 * src/output.c (output_skeleton): Use full path names when
8256 specifying a file to include; don't rely on include path, as
8257 it's unreliable when the working file contains a file with
8258 that name.
d600ee67 8259
983c5c2c
PE
82602002-12-25 Paul Eggert <eggert@twinsun.com>
8261
8262 Remove obsolete references to bison.simple and bison.hairy.
8263 Problem mentioned by Aubin Mahe in
161a71f3 8264 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
8265 * data/glr.c: Comment fix.
8266 * doc/bison.1: Remove references. Also, mention "yacc".
8267
8268 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
8269 with -g option.
8270
8271 * src/parse-gram.y (declaration): Use enum "report_states" rather
8272 than its numeric value 1.
8273
8274 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
8275 opening a new one. This fixes Debian bug 165349, reported by
8276 Bruce Stephens.
8277
23f2d9dc
PE
82782002-12-24 Paul Eggert <eggert@twinsun.com>
8279
8280 Version 1.75e.
8281
8282 * Makefile.maint (cvs-update): Don't assume that the shell
8283 supports $(...), as Solaris sh doesn't.
8284
8285 * src/parse-gram.y (lloc_default): Remove test for empty
8286 nonterminals at the end, since it didn't change the result.
8287
82882002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
8289
8290 If the user does not define YYSTYPE as a macro, Bison now declares it
8291 using typedef instead of defining it as a macro. POSIX requires this.
8292 For consistency, YYLTYPE is also declared instead of defined.
8293
8294 %union directives can now have a tag before the `{', e.g., the
8295 directive `%union foo {...}' now generates the C code
8296 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
8297 The default union tag is `YYSTYPE', for compatibility with Solaris 9
8298 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
8299 instead of `yyltype'.
8300
8301 `yystype' and `yyltype' are now obsolescent macros instead of being
8302 typedefs or tags; they are no longer documented and will be
8303 withdrawn in a future release.
8304
8305 * data/glr.c (b4_location_type): Remove.
8306 (YYSTYPE): Renamed from yystype.
8307 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
8308 (struct YYLTYPE): Renamed from struct yyltype.
8309 (YYLTYPE): Renamed from yyltype.
8310 (yyltype, yystype): New (and obsolescent) macros,
8311 for backward compatibility.
8312 * data/yacc.c: Likewise.
8313
8314 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
8315 does not specify a union tag. This is for compatibility with
8316 Solaris 9 yacc.
8317
8318 * src/parse-gram.y (add_param): 2nd arg is now char * not char
8319 const *, since it is now modified by stripping surrounding { }.
8320 (current_braced_code): Remove.
8321 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
8322 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
8323 trailing " {...}". Now of type <chars>.
8324 (grammar_declaration): Adjust to bundled tokens.
8325 (code_content): Remove; stripping is now done by add_param.
8326 (print_token_value): Print contents of bundled tokens.
8327 (token_name): New function.
8328
8329 * src/reader.h (braced_code, current_braced_code): Remove.
8330 (token_name): New decl.
8331
8332 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
8333 token_type, not braced_code code_kind. All uses changed.
8334 (SC_PRE_CODE): New state, for scanning after a keyword that
8335 has (or usually has) an immediately-following braced code.
8336 (token_type): New local var, to keep track of which token type
8337 to return when scanning braced code.
8338 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 8339 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
8340 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
8341 instead of returning a token type immediately.
8342 (<INITIAL>"{"): Set token type.
8343 (<SC_BRACED_CODE>"}"): Use it.
8344 (handle_action_dollar, handle_action_at): Now returns bool
8345 indicating success. Fail if ! current_rule; this prevents a core dump.
8346 (handle_symbol_code_dollar, handle_symbol_code_at):
8347 Remove; merge body into caller.
8348 (handle_dollar, handle_at): Complain in invalid contexts.
8349
8350 * NEWS, doc/bison.texinfo: Document the above.
8351 * NEWS: Fix years and program names in copyright notice.
8352
879ca4f8
PE
83532002-12-17 Paul Eggert <eggert@twinsun.com>
8354
8355 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
8356 Reporting, Table of Symbols): Omit mentions of %lex-param and
8357 %parse-param from the documentation for now.
8358
1c5fe69d
PE
83592002-12-15 Paul Eggert <eggert@twinsun.com>
8360
8361 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
8362 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
8363 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
8364 disagreed with the Bison documentation. Bug
8365 reported by Andrew Walrond.
d600ee67 8366
1c5fe69d
PE
8367 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
8368 as the caller now does that.
8369 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
8370 (YYEMPTY): Parenthesize right hand side, since others use it.
8371 (yyparse): Don't assume that our generated code is the only code
8372 that sets yychar.
8373
d1de5372
PE
83742002-12-13 Paul Eggert <eggert@twinsun.com>
8375
8376 Version 1.75d.
8377
8378 POSIX requires a "yacc" command.
8379 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
8380 (MOSTLYCLEANFILES): Add yacc.
8381 (yacc): New rule.
1c5fe69d 8382 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
8383 as an alias for bison y.
8384
8385 * po/LINGUAS: Add da.
d600ee67 8386
d1de5372
PE
8387 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
8388 problem with latest <getopt.h>.
8389 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
8390
8391 * doc/fdl.texi: Upgrade to 1.2.
8392 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
8393 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
8394 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
8395 gnulib.
8396 * config/install-sh: Sync with autotools.
8397
8398 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 8399 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
8400 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
8401 locations are requested.
8402 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
8403 locations are requested.
8404
d0f3fe23
PE
84052002-12-12 Paul Eggert <eggert@twinsun.com>
8406
8407 Remove unportable casts and storage allocation tricks.
8408 While we're at it, remove almost all casts, since they
8409 usually aren't needed and are a sign of trouble.
8410
8411 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
8412
8413 * src/derives.c (derives_compute): Do not subtract NTOKENS from
8414 the pointer DSET returned by malloc; this isn't portable.
8415 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
8416 Similarly for DERIVES.
8417 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
8418 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
8419 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
8420
8421 * src/derives.c (derives_compute): Do not bother invoking
8422 int_of_rule_number, since rule numbers are integers.
8423
8424 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
8425 rather than XMALLOC (char, N).
8426
8427 * src/files.c (filename_split): Rewrite to avoid cast.
8428
8429 * src/gram.h (symbol_number_as_item_number,
8430 item_number_as_symbol_number, rule_number_as_item_number,
8431 item_number_as_rule_number):
8432 Now inline functions rather than macros, to avoid casts.
8433 * src/state.h (state_number_as_int): Likewise.
8434 * src/tables.c (state_number_to_vector_number,
8435 symbol_number_to_vector_number): Likewise.
8436
8437 * src/gram.h (int_of_rule_number): Remove; no longer used.
8438
8439 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
8440 since the resulting storage is always stored into.
8441
8442 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
8443 where it's needed.
8444
8445 * src/muscle_tab.c (muscle_m4_output):
8446 Now inline. Return bool, not int.
8447 * src/state.c (state_compare): Likewise.
8448 * src/symtab.c (symbol_check_defined,
8449 symbol_check_alias_consistency, symbol_pack, symbol_translation,
8450 hash_compare_symbol, hash_symbol):
8451 Likewise.
8452 * src/uniqstr.c (uniqstr_print): Likewise.
8453 * src/muscle_tab.c (muscle_m4_output_processor):
8454 New function, to avoid casts.
8455 * src/state.c (state_comparator, stage_hasher): Likewise.
8456 * src/symtab.c (symbol_check_defined_processor,
8457 symbol_check_alias_consistency_processor, symbol_pack_processor,
8458 symbol_translation_processor, hash_symbol_comparator,
8459 hash_symbol_hasher): Likewise.
8460 * src/uniqstr.c (uniqstr_print_processor): Likewise.
8461 * src/muscle_tab.c (muscles_m4_output):
8462 Use new functions instead of casting old functions unportably.
8463 * src/state.c (state_hash_new): Likewise.
8464 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
8465 symbols_token_translations_init):
8466 Likewise.
8467 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
8468
8469 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
8470 var instead of casting to long, to avoid casts.
8471 (prepare_states): Use MALLOC rather than alloca, so that we don't
8472 have to worry about alloca.
8473 * src/state.c (state_hash_lookup): Likewise.
8474
8475 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
8476 local var instead of casting to unsigned char, to avoid casts.
8477
8478 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
8479 STATE_ALLOC): Remove.
8480 (transitions_new, errs_new, reductions_new, state_new): Use malloc
8481 rather than calloc, and use offsetof to avoid allocating slightly
8482 too much storage.
8483 (state_new): Initialize all members.
8484
8485 * src/state.c (state_hash): Use unsigned accumulator, not signed.
8486
8487 * src/symtab.c (symbol_free): Remove; unused.
8488 (symbol_get): Remove cast in lhs of assignment.
8489 (symbols_do): Now static. Accept generic arguments, not
8490 hashing-related ones.
8491
8492 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
8493 (symbol_processor): Remove.
8494 (symbols_do): Remove decl; now static.
8495
8496 * src/system.h (alloca): Remove; decl no longer needed.
8497 (<stddef.h>): Include, for offsetof.
8498 (<inttypes.>, <stdint.h>): Include if available.
8499 (uintptr_t): New type, if system lacks it.
8500 (CALLOC, MALLOC, REALLOC): New macros.
8501 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
8502 new macros.
8503
8504 * src/tables.c (table_size): Now int, to pacify GCC.
8505 (table_grow, table_ninf_remap): Use signed table size.
8506 (save_row): Don't bother initializing locals when not needed.
8507 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
8508 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
8509
8510 * src/vcg.h: Correct misspellings.
8511
8512 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
8513
8514
8515 * src/getargs.c (getargs): Don't assume EOF == -1.
8516
26b4a969
PE
85172002-12-09 Paul Eggert <eggert@twinsun.com>
8518
8519 Change identifier spellings to avoid collisions with names
8520 that are reserved by POSIX.
8521
8522 Don't use names ending in _t, since POSIX reserves them.
8523 For consistency, remove _e and _s endings -- they're weren't
8524 needed to remove ambiguity. All uses changed.
8525 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
8526 turn was just renamed from struniq_t.
8527 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
8528 which in turn was just renamed from struniq_processor_t.
8529 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
8530 in turn was renamed from hash_compare_struniq_t.
8531 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
8532 (state_list): Renamed from state_list_t.
8533 * src/assoc.h (assoc): Renamed from assoc_t.
8534 * src/conflicts.c (enum conflict_resolution): Renamed from
8535 enum conflict_resolution_e.
8536 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
8537 (rule_list): Renamed from rule_list_t.
8538 * src/getargs.h (enum trace): Renamed from enum trace_e.
8539 (enum report): Renamed from enum report_e.
8540 * src/gram.h (item_number): Renamed from item_number_t.
8541 (rule_number): Renamed from rule_number_t.
8542 (struct rule_s): Remove the "rule_s" part; not used.
8543 (rule): Renamed from rule_t.
8544 (rule_filter): Renamed from rule_filter_t.
8545 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
8546 (goto_list): Renamed from goto_list_t.
8547 * src/lalr.h (goto_number): Renamed from goto_number_t.
8548 * src/location.h (location): Renamed from location_t.
8549 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
8550 and moved here from:
8551 * src/muscle_tab.h (muscle_entry_t): here.
8552 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
8553 (rule_list): Renamed from rule_list_t.
8554 * src/print_graph.c (static_graph): Renamed from graph.
8555 * src/reader.h (braced_code): Renamed from braced_code_t.
8556 Remove brace_code_e tag.
8557 * src/relation.h (relation_node): Renamed from relation_node_t.
8558 (relation_nodes): Renamed from relation_nodes_t.
8559 (relation): Renamed from relation_t.
8560 * src/state.h (state_number): Renamed from state_number_t.
8561 (struct state): Renamed from struct state_s.
8562 (state): Renamed from state_t.
8563 (transitions): Renamed from transitions_t. Unused (and
8564 misspelled) transtion_s tag removed.
8565 (errs): Renamed from errs_t. Unused errs_s tag removed.
8566 (reductions): Renamed from reductions_t. Unused tag
8567 reductions_s removed.
8568 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
8569 (struct symbol_list): Renamed from struct symbol_list_s.
8570 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
8571 (struct symbol): Renamed from struct symbol_s.
8572 (symbol): Renamed from symbol_t.
8573 * src/tables.c (vector_number): Renamed from vector_number_t.
8574 (action_number): Renamed from action_t.
8575 * src/tables.h (base_number): Renamed from base_t.
8576 * src/vcg.h (enum color): Renamed from enum color_e.
8577 (enum textmode): Renamed from enum textmode_e.
8578 (enum shape): Renamed from enum shape_e.
8579 (struct colorentry): Renamed from struct colorentry_s.
8580 (struct classname): Renamed from struct classname_s.
8581 (struct infoname): Renamed from struct infoname_s.
8582 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
8583 (enum decision): Renamed from enum decision_e.
8584 (enum orientation): Renamed from enum orientation_e.
8585 (enum alignment): Renamed from enum alignment_e.
8586 (enum arrow_mode): Renamed from enum arrow_mode_e.
8587 (enum crossing_type): Renamed from enum crossing_type_e.
8588 (enum view): Renamed from enum view_e.
8589 (struct node): Renamed from struct node_s.
8590 (node): Renamed from node_t.
8591 (enum linestyle): Renamed from enum linestyle_e.
8592 (enum arrowstyle): Renamed from enum arrowstyle_e.
8593 (struct edge): Renamed from struct edge.
8594 (edge): Renamed from edge_t.
8595 (struct graph): Renamed from struct graph_s.
8596 (graph): Renamed from graph_t.
8597 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
8598 Rename value_t -> value.
8599 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
8600 value_t_as_yystype -> value_as_yystype.
8601
8602 Don't include <errno.h> in the mainstream code, since it
8603 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
8604 * lib/get-errno.c, lib/get-errno.h: New files.
8605 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
8606 get-errno.c.
8607 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
8608 * src/output.c (output_skeleton): Likewise.
8609 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
8610 instead of errno.
8611 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
8612 Likewise.
8613 (handle_action_dollar, handle_action_at): Likewise.
8614 * src/system.h: Do not include <errno.h>.
8615 (TAB_EXT): Renamed from EXT_TAB.
8616 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
8617
8618 Avoid str[a-z]*, since <string.h> reserves that name space.
8619 Change all instances of "struniq" in names to "uniqstr", and
8620 likewise for "STRUNIQ" and "UNIQSTR".
8621 * src/uniqstr.c: Renamed from src/struniq.c.
8622 * src/uniqstr.h: Renamed from src/struniq.h.
8623 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
8624 * src/files.c (strsuffix): Remove; unused.
8625 (concat2): Renamed from stringappend. Now static.
8626 * src/files.h (strsuffix, stringappend): Remove; unused.
8627 * src/parse-gram.y (<chars>): Renamed from <string>.
8628 (<uniqstr>): Renamed from <struniq>.
8629 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
8630 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
8631 (struct graph_s.expand): Renamed from struct graph_s.stretch.
8632 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
8633 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
8634 (N_EXPAND): Renamed from N_STRETCH.
8635
8636 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
8637 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
8638 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
8639 Remove; unused.
8640 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
8641 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
8642 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
8643 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
8644 (BASE_MAXIMUM): Renamed from BASE_MAX.
8645 (BASE_MINIMUM): Renamed from BASE_MIN.
8646 (ACTION_MAX): Remove; unused.
8647 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
8648 Unnecessary casts removed from above defines.
8649
8650
8651 Fix misspelling in names.
8652 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
8653 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
8654 G_NODE_ALIGNEMENT.
8655
8656
8657 * lib/timevar.c (timevar_report): Renamed from time_report,
8658 for consistency with other names.
8659 * lib/timevar.h (timevar_report): New decl.
8660 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
8661
8662
8663 Sort include-file uses.
8664
8665 Reorder all include files under src to be in the order "system.h".
8666 then the ../lib include files in angle brackets (alphabetized),
8667 then the . include files in double-quotes (alphabetized). Fix
8668 dependency breakages encountered in this process, as follows:
8669 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
8670 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
8671 * src/state.h: Include "symtab.h".
8672
996b1c7e
PE
86732002-12-08 Paul Eggert <eggert@twinsun.com>
8674
8675 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
8676 since this causes problems when __file__ contains character
8677 sequences like "@" that are treated specially by src/scan-skel.l.
8678 Instead, just use the file's basename. This fixes the bug
8679 reported by Martin Mokrejs in
161a71f3 8680 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 8681
e19c4e5d
PE
86822002-12-06 Paul Eggert <eggert@twinsun.com>
8683
8684 Add support for rules that do not have trailing semicolons, as
8685 POSIX requires. Improve the quality of locations in Bison
8686 diagnostics.
26b4a969 8687
e19c4e5d
PE
8688 * src/location.c: Include <quotearg.h>.
8689 (empty_location): Now const.
8690 (location_print): New function. Follow the recommendation of the
8691 GNU Coding Standards for locations that span file boundaries.
8692 * src/location.h: Do not include <quotearg.h>; no longer needed.
8693 (boundary): New type.
8694 (location_t): Use it. This allows locations to span file boundaries.
8695 All member uses changed: file -> start.file or end.file (as needed),
8696 first_line -> start.line, first_column -> start.column,
8697 last_line -> end.line, last_column -> end.column.
8698 (equal_boundaries): New function.
8699 (LOCATION_RESET, LOCATION_STEP): Remove.
8700 (LOCATION_PRINT): Remove. All callers changed to use location_print.
8701 (empty_location): Now const.
8702 (location_print): New decl.
8703 * src/parse-gram.y (lloc_default): New function, which handles
8704 empty locations more accurately.
8705 (YYLLOC_DEFAULT): Use it.
8706 (%token COLON): Remove.
8707 (%token ID_COLON): New token.
26b4a969 8708 (rules): Use it.
e19c4e5d
PE
8709 (declarations, rules): Remove trailing semicolon.
8710 (declaration, rules_or_grammar_declaration):
8711 Allow empty (";") declaration.
8712 (symbol_def): Remove empty actions; no longer needed.
8713 (rules_or_grammar_declaration): Remove trailing semicolon.
8714 (semi_colon.opt): Remove.
8715 * src/reader.h: Include location.h.
8716 (scanner_cursor): New decl.
8717 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
8718 rolling our own.
8719 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
8720 of *loc.
8721 (STEP): Remove. No longer needed, now that adjust_location does
8722 the work. All uses removed.
8723 (scanner_cursor): New var.
8724 (adjust_location): Renamed from extend_location. It now sets
8725 *loc and adjusts the scanner cursor. All uses changed.
8726 Don't bother testing for CR.
8727 (handle_syncline): Remove location arg; now updates scanner cursor.
8728 All callers changed.
8729 (unexpected_end_of_file): Now accepts start boundary of token or
8730 comment, not location. All callers changed. Update scanner cursor,
8731 not the location.
8732 (SC_AFTER_IDENTIFIER): New state.
8733 (context_state): Renamed from c_context. All uses changed.
8734 (id_loc, code_start, token_start): New local vars.
8735 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
8736 processing of Yacc white space and equivalents here.
8737 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
8738 instead of returning ID immediately, since we need to search for
8739 a subsequent colon.
8740 (<INITIAL>"'", "\""): Save token_start.
8741 (<INITIAL>"%{", "{", "%%"): Save code_start.
8742 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
8743 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
8744 BEGIN context_state at end, not INITIAL.
8745 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
8746 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
8747 Return correct token start.
8748 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
8749 the start of a character, string or multiline comment is found.
8750 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
8751 Reduction): Adjust reported locations to match the more-precise
8752 results now expected.
8753 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
8754 * tests/reduce.at (Useless Rules, Reduced Automaton,
8755 Underivable Rules): Likewise.
8756 * tests/regression.at (Invalid inputs): No longer `expecting ";"
8757 or "|"' now that so many other tokens are allowed by the new grammar.
8758
8759 * src/complain.h (current_file): Remove duplicate decl;
8760 current_file is now owned by files.h.
8761 * src/complain.c, src/scan-gram.l: Include files.h.
8762
87632002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 8764
e19c4e5d
PE
8765 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
8766 promotes to int; it might be unsigned int.
8767 * data/yacc.c (yy_reduce_print): Likewise.
8768
8769 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
8770 be #defined in the prologue, not in the Bison declarations.
8771 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 8772
b64755e3
PE
87732002-12-02 Paul Eggert <eggert@twinsun.com>
8774
8775 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
8776 * lib/strtoul.c: New file, from gnulib.
8777 This fixes a porting bug reported by Peter Klein in
161a71f3 8778 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 8779
6e746484
PE
87802002-11-30 Paul Eggert <eggert@twinsun.com>
8781
b64755e3
PE
8782 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
8783 and put only a forward declaration in the prologue. This is for
8784 consistency with the other scanner helper functions.
8785
6ba55592
PE
8786 Type clashes now generate warnings, not errors, since it
8787 appears that POSIX may allow some grammars with type clashes.
8788 * src/reader.c (grammar_current_rule_check): Warn about
8789 type clashes instead of complaining.
8790 * tests/input.at (Type Clashes): Expect warnings, not complaints.
8791
6e746484
PE
8792 Add Yacc library, since POSIX requires it.
8793 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
8794 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
8795 * lib/main.c, lib/yyerror.c: New files.
8796
8797 gram_error can be static; it need not be extern.
8798 * src/reader.h (gram_error): Remove decl.
8799 * src/parse-gram.y (gram_error): Now static. Add static decl.
8800 (print_token_value): Omit parameter names from forward decl,
8801 for consistency.
8802
88510f9c
PE
88032002-11-29 Paul Eggert <eggert@twinsun.com>
8804
6e746484
PE
8805 * doc/bison.texinfo: Emphasize that yylex and yyerror must
8806 be declared before being used. E.g., one should typically
8807 declare them in the prologue. Use GNU coding style in examples.
8808 Put "const" consistently after the type it modifies. Mention
8809 that C99 supports "inline". Mention that yyerror traditionally
8810 returns "int".
8811
88510f9c
PE
8812 %parse-param and %lex-param now take just one argument, the
8813 declaration; the argument name is deduced from the declaration.
8814
8815 * doc/bison.texinfo (Parser Function, Pure Calling, Error
8816 Reporting, Table of Symbols): Document this.
8817 * src/parse-gram.y (add_param): New function.
8818 (COMMA): Remove.
8819 (declaration): Implement new rule for %parse-param and %lex-param.
8820 * src/scan-gram.l: "," now elicits a warning, rather than being
8821 a token; this is more compatible with byacc.
8822 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
8823
bb92250c
PE
88242002-11-27 Paul Eggert <eggert@twinsun.com>
8825
8826 Rename identifiers to avoid real and potential collisions.
8827
8828 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
8829 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 8830 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
8831 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
8832 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
8833 * src/parse-gram.y (print_token_value): Renamed from yyprint.
8834 All uses changed.
8835 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
8836 The name "yycontrol" violates the name space rules, and this stuff
8837 wasn't being used anyway.
8838 (input): Remove action; this stuff wasn't being used.
8839 (gram_error): Rename local variable yylloc -> loc.
8840 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
8841 (YY_DECL): Don't use "yy" at start of local variables.
8842 All uses changed, e.g., yylloc -> loc.
8843 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
8844 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
8845 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
8846 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
8847
8848 * src/parse-gram.y (gram_error): loc is now const *.
8849 * src/reader.h (gram_error): Likewise.
8850
3af4feb2
PE
88512002-11-24 Paul Eggert <eggert@twinsun.com>
8852
8853 Version 1.75c.
8854
8855 * tests/actions.at (Actions after errors): Use an output format
8856 more similar to that of the Printers and Destructors test.
8857 Test the position of the ';' token too.
8858 (Printers and Destructors): Likewise.
8859 (Printers and Destructors: %glr-parser): Remove for now, to avoid
8860 unnecessarily alarming people when the test fails.
8861
8862 * data/yacc.c (yyerrlab1): Move this label down, so that the
8863 parser does not discard the lookahead token if the user code
8864 invokes YYERROR. This change is required for POSIX conformance.
8865
8866 * lib/error.c: Sync with gnulib.
8867
88682002-11-22 Paul Eggert <eggert@twinsun.com>
8869
8870 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
8871 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
8872 * lib/xmalloc.c: Likewise.
26b4a969 8873
58004308
PE
88742002-11-20 Paul Eggert <eggert@twinsun.com>
8875
8876 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
8877
88782002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 8879
58004308
PE
8880 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
8881 should use `if (! x) abort ();' rather than `assert (x);', and
8882 anyway it's one less thing to worry about configuring.
8883
8884 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
8885 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
8886 and replace all instances of assert with abort.
8887 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8888 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
8889
8890 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
8891 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
8892 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
8893 hash_find_entry, hash_rehash, hash_insert): Likewise.
8894 * src/conflicts.c (resolve_sr_conflict): Likewise.
8895 * src/lalr.c (set_goto_map, map_goto): Likewise.
8896 * src/nullable.c (nullable_compute): Likewise.
8897 * src/output.c (prepare_rules, token_definitions_output): Likewise.
8898 * src/reader.c (packgram, reader): Likewise.
8899 * src/state.c (state_new, state_free, state_transitions_set,
8900 state_reduction_find): Likewise.
8901 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
8902 symbol_pack): Likewise.
8903 * src/tables.c (conflict_row, pack_vector): Likewise.
8904 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
8905 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
8906 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
8907 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
8908
8909 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
8910 (ARGMATCH_CONSTRAINT): New macro.
8911 (ARGMATCH_ASSERT): Use it.
8912
8913 * src/system.h (verify): New macro.
8914 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
8915 rather than assert.
8916 * src/tables.c (tables_generate): Likewise.
8917
8918 * src/struniq.c (struniq_assert): Now returns void, and aborts
8919 if the assertion is false.
8920 (struniq_assert_p): Remove.
8921 * src/struniq.h: Likewise.
8922
76ae8198
PE
89232002-11-18 Paul Eggert <eggert@twinsun.com>
8924
8925 * data/glr.c (yygetLRActions): Replace `yyindex' with
8926 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
8927 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 8928 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 8929
d3c4e709
AD
89302002-11-18 Akim Demaille <akim@epita.fr>
8931
8932 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
8933 space.
8934 From Tim Van Holder.
8935
8d8a7238
PE
89362002-11-17 Paul Eggert <eggert@twinsun.com>
8937
8938 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
8939 to "SyntaxError" for consistency with my 2002-11-15 change.
8940
8941 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
8942 not define to {}, since this breaks the common use of `YYDPRINTF
8943 ((...));' if a single statement is desired (e.g. before `else').
8944 Work around GCC warnings by surrounding corresponding calls with
8945 {} if needed.
8946 (yyhasResolvedValue): Remove unused function.
8947 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
8948 loop body.
8949 (yyreportSyntaxError): Renamed from yyreportParseError.
8950 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
8951 All uses changed.
8952 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
8953 extern when possible. Remove unused initializations.
8954
b0937b22
AD
89552002-11-16 Akim Demaille <akim@epita.fr>
8956
8957 Augment the similarity between GLR and LALR traces.
8958
8959 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
8960 (YY_REDUCE_PRINT): New.
8961 (yyparse): Use them.
8962 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
8963 YYDPRINT here.
8964 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
8965 state reached after the reduction/recovery, since...
8966 (yyparse, yyprocessOneStack): Report the state we are entering in.
8967
c5e3e510
AD
89682002-11-16 Akim Demaille <akim@epita.fr>
8969
8970 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
8971 Add support for --trace=skeleton.
8972 * src/scan-skel.l: %option debug.
8973 Scan strings of non-@ or \n instead of character by character.
8974 (scan_skel): Handle trace_skeleton.
8975 (QPUTS): New.
8976 (@output_parser_name@, @output_header_name@): ``Restore'' their
8977 support (used to be M4 macros).
8978 * data/yacc.c: Quote larger chunks, a la glr.c.
8979 * data/lalr1.cc: Likewise.
8980 The header guards are no longer available, so use some other
8981 string than `YYLSP_NEEDED'.
8982
4c6cc1db
AD
89832002-11-16 Akim Demaille <akim@epita.fr>
8984
8985 Make the ``Printers and Destructors'' test more verbose, taking
8986 `yacc.c''s behavior as (possibly wrong) reference.
8987
8988 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
8989 instead of fprint on stdout.
8990 Set and report the last_line of the symbols.
8991 Consistently display values and locations.
8992
6d9e8019
PE
89932002-11-16 Paul Eggert <eggert@twinsun.com>
8994
8995 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
8996
6e649e65
PE
89972002-11-15 Paul Eggert <eggert@twinsun.com>
8998
b25d88f6
PE
8999 * tests/actions.at (Actions after errors): New test case.
9000
6e649e65
PE
9001 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
9002 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
9003 tests/action.at, tests/calc.at, tests/conflicts.at,
9004 tests/cxx-type.at, tests/regression.at:
9005 "parse error" -> "syntax error" for POSIX compatibility.
9006 "parsing stack overflow..." -> "parser stack overflow" so
9007 that code matches Bison documentation.
9008
0f39aab9
AD
90092002-11-15 Akim Demaille <akim@epita.fr>
9010
9011 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
9012 take two BRACED_CODE, not two string_content.
9013 Free the scanner's obstack when we are done.
9014 (code_content): New.
9015 * tests/calc.at: Adjust.
9016 * doc/bison.texinfo: Adjust.
9017 Also, make sure to include the `,' for these declarations.
9018
761c1926
AD
90192002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
9020
9021 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
9022 definition; avoids potential autoreconf problems.
9023
b0f98b10
AD
90242002-11-15 Akim Demaille <akim@epita.fr>
9025
9026 Always check the value returned by yyparse.
9027
9028 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
9029 returned by yyparse.
9030 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
9031 Adjust calls.
9032 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
9033 returned by yyparse.
9034
970785f1
PH
90352002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9036
9037 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
9038 on input.at test.
9039
8fcc7db1
PE
90402002-11-14 Paul Eggert <eggert@twinsun.com>
9041
7ec1b48e
PE
9042 * src/output.c (output_skeleton): Call xfopen instead of
9043 duplicating xfopen's body.
9044
cfff7583 9045 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 9046 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 9047
8fcc7db1
PE
9048 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
9049 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
9050 Group compiler. Instead, use "$CC -E bar.c". Include the .h
9051 file twice in the grammar, as an extra check.
9052
9053 * tests/input.at (Torturing the Scanner): Surround the
9054 backslash-newline tests with "#if 0", to make it less likely that
9055 we'll run into compiler bugs. Bring back solitary \ inside
9056 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 9057 test backslash-newline in C character constant.
8fcc7db1 9058
4e8d992c
AD
90592002-11-14 Akim Demaille <akim@epita.fr>
9060
9061 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
9062 status of the compiler.
f32b346d 9063 Calling `exit 1' is no longer needed.
4e8d992c
AD
9064 Reported by Nelson H. F. Beebe.
9065
9501dc6e
AD
90662002-11-14 Akim Demaille <akim@epita.fr>
9067
9068 * tests/atlocal.in (CPPFLAGS): We have config.h.
9069 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
9070 New.
9071 * tests/actions.at, tests/calc.at, tests/conflicts.at,
9072 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
9073 * tests/regression.at, tests/torture.at: Use them for all the
9074 grammars that are to be compiled.
9075 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
9076 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
9077 * doc/bison.texinfo (GLR Parsers): Document `inline'.
9078
18b519c0
AD
90792002-11-14 Akim Demaille <akim@epita.fr>
9080
9081 * doc/bison.texinfo: Various formatting changes (alignments in
9082 samples, additional @group/@end group, GCS in samples.
9083 Use @deffn instead of simple @table to define the directives,
9084 macros, variables etc.
9085
9a86cdb9
PE
90862002-11-13 Paul Eggert <eggert@twinsun.com>
9087
daa33def 9088 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 9089 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 9090
daa33def 9091 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 9092 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
9093 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
9094 * tests/headers.at (export YYLTYPE): Likewise.
9095
9096 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 9097 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 9098
9a86cdb9
PE
9099 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
9100 comments, since they're not portable. Use GNU coding style.
9101
9c1e26bd
AD
91022002-11-13 Akim Demaille <akim@epita.fr>
9103
9104 * data/yacc.c: Leave bigger chunks of quoted text.
9105 (YYDSYMPRINTF): New.
9106 Use it to report symbol activities.
9107 * data/glr.c (YYDSYMPRINTF): New.
9108 Use it.
9109
87f721cc
PE
91102002-11-12 Paul Eggert <eggert@twinsun.com>
9111
9112 Version 1.75b.
9113
9114 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
9115 (yyglrReduce): Return yyok, not 0.
9116 This should avoid the enumerated-type warnings reported
464c6927 9117 by Nelson H. F. Beebe in
161a71f3 9118 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
9119
9120 * lib/bbitset.h (BITSET_INLINE): Remove.
9121 * lib/bitset.h [! BITSET_INLINE]: Remove.
9122 (bitset_set, bitset_reset, bitset_test): Rename local vars
9123 to avoid shadowing warnings by GCC.
9124
9125 * data/glr.c (inline): Remove #define. It's the user's
9126 responsibility to #define it away, just like 'const'.
464c6927 9127 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 9128 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 9129
87f721cc
PE
9130 * Makefile.maint (po-check): Scan .l and .y files instead of the
9131 .c and the .h files that they generate. This fixes the bug
9132 reported by Tim Van Holder in:
161a71f3 9133 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
9134 Look for N_ as well as for _. Try to avoid matching #define for
9135 N_ and _.
9136 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
9137 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
9138 * src/scan-gram.l: Revamp regular expressions so that " and '
9139 do not confuse xgettext.
9140
9141 * src/struniq.h (struniq_new): Do not declare the return type
9142 to be 'const'; this violates the C standard.
9143 * src/struniq.c (struniq_new): Likewise.
9144
be14ade5
AD
91452002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
9146
9147 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
9148 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
9149 linker.
9150
05291fbc
AD
91512002-11-12 Akim Demaille <akim@epita.fr>
9152
9153 * Makefile.maint: Sync with Autoconf:
9154 (local_updates): New.
9155
1f5fd52e
AD
91562002-11-12 Akim Demaille <akim@epita.fr>
9157
9158 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
9159
283f1e64
AD
91602002-11-12 Akim Demaille <akim@epita.fr>
9161
9162 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
9163 locations.
9164
886b69d1
AD
91652002-11-12 Akim Demaille <akim@epita.fr>
9166
9167 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
9168 not yyvalue.
9169
3df37415
AD
91702002-11-12 Akim Demaille <akim@epita.fr>
9171
9172 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
9173 Use it to test the GLR parser.
9174
7bd6c77e
AD
91752002-11-12 Akim Demaille <akim@epita.fr>
9176
9177 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
9178 defines it.
9179 * data/glr.c (yystos): New.
9180 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
9181 (YYDSYMPRINT): New.
9182 (yyval): Don't define it, it is handled via M4.
9183 (yyrecoverParseError): Free verbosely the discarded symbols.
9184 * data/yacc.c (yysymprint): Remove, rather...
9185 (b4_yysymprint_generate): invoke.
9186 * data/c.m4 (b4_yysymprint_generate): New.
9187 Accept pointers as arguments, as opposed to the version from
9188 yacc.c.
9189 (b4_yydestruct_generate): Likewise.
9190 * tests/cations.at (Printers and Destructors): Use Bison directives
9191 instead of CPP macros.
9192 Don't rely on internal details.
9193
b0400cc6
AD
91942002-11-12 Akim Demaille <akim@epita.fr>
9195
9196 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
9197 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
9198 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
9199 it against YYEMPTY and so forth), work on yytoken (i.e., set
9200 it to YYEMPTY etc.).
9201 (yydestruct): Replace with a b4_yydestruct_generate invocation.
9202 (b4_symbol_actions): Remove.
9203 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
9204 for 0, end-of-input.
9205
72f889cc
AD
92062002-11-12 Akim Demaille <akim@epita.fr>
9207
9208 * doc/bison.texinfo (Destructor Decl): New.
9209
b1ae9233
AD
92102002-11-12 Akim Demaille <akim@epita.fr>
9211
9212 * src/tables.c (tables_generate): Use free for pointers that
9213 cannot be NULL, not XFREE.
9214 (pack_vector): Use assert, not fatal, for bound violations.
9215 * src/state.c (state_new): Likewise.
9216 * src/reader.c (reader): Likewise.
9217 * src/lalr.c (set_goto_map): Likewise.
72f889cc 9218 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
9219 the file name.
9220
7ec2d4cd
AD
92212002-11-12 Akim Demaille <akim@epita.fr>
9222
9223 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
9224 Restore.
9225 * src/scan-gram.l (last_string): Is global to the file, not to
9226 yylex.
9227 * src/parse-gram.y (input): Don't append the epilogue here,
9228 (epilogue.opt): do it here, and free the scanner's obstack.
9229 * src/reader.c (epilogue_set): Rename as...
9230 (epilogue_augment): this.
9231 * data/c.m4 (b4_epilogue): Defaults to empty.
9232
573a6cd3
AD
92332002-11-12 Akim Demaille <akim@epita.fr>
9234
9235 * src/getargs.c (long_options): Remove duplicates.
9236 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
9237 Remove.
9238 * doc/bison.rnh: Remove.
9239 * doc/bison.texinfo (VMS Invocation): Remove.
9240
95612cfa
AD
92412002-11-12 Akim Demaille <akim@epita.fr>
9242
9243 * src/struniq.h, src/struniq.c (struniq_t): Is const.
9244 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
9245
9246 Use struniq for symbols.
9247
9248 * src/symtab.h (symbol_t): The tag member is a struniq.
9249 (symbol_type_set): Adjust.
9250 * src/symtab.c (symbol_new): Takes a struniq.
9251 (symbol_free): Don't free the tag member.
9252 (hash_compare_symbol_t, hash_symbol_t): Rename as...
9253 (hash_compare_symbol, hash_symbol): these.
9254 Use the fact that tags as struniqs.
9255 (symbol_get): Use struniq_new.
9256 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
9257 Returns a strniq.
9258 * src/reader.h (merger_list, grammar_currentmerge_set): The name
9259 and type members are struniqs.
9260 * src/reader.c (get_merge_function)
9261 (grammar_current_rule_merge_set): Adjust.
9262 (TYPE, current_type): Are struniq.
9263
9264 Use struniq for file names.
9265
9266 * src/files.h, src/files.c (infile): Split into...
9267 (grammar_file, current_file): these.
9268 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
9269 * src/reduce.c (reduce_print): Likewise.
9270 * src/getargs.c (getargs): Likewise.
9271 * src/complain.h, src/complain.c: Likewise.
9272 * src/main.c (main): Call struniqs_new early enough to use it for
9273 file names.
9274 Don't free the input file name.
9275
3e6656f9
AD
92762002-11-12 Akim Demaille <akim@epita.fr>
9277
9278 * src/symtab.c (symbol_free): Remove dead deactivated code:
9279 type_name are properly removed.
9280 Don't use XFREE to free items that cannot be NULL.
9281 * src/struniq.h, src/struniq.c: New.
9282 * src/main.c (main): Initialize/free struniqs.
9283 * src/parse-gram.y (%union): Add astruniq member.
9284 (yyprint): Adjust.
9285 * src/scan-gram.l (<{tag}>): Return a struniq.
9286 Free the obstack bit that used to store it.
9287 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
9288
7672019c
PE
92892002-11-11 Paul Eggert <eggert@twinsun.com>
9290
9291 Revamp to fix many (but not all) of the C- and M4-related quoting
9292 problems. Among other things, this fixes the Bison bug reported
9293 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 9294 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
9295
9296 Use new @ escapes consistently. Represent brackets with @{ and @}
9297 rather than @<:@ and @:>@, since this works a bit better with dumb
9298 editors like vi. Represent @ with @@, since @ is now consistently
9299 an escape. Use @oline@ and @ofile@ rather than __oline__ and
9300 __ofile__, to avoid unexpected expansions. Similarly, use @output
9301 rather than #output.
9302
9303 * data/c.m4 (b4_copyright): Omit file name from comment, since
9304 the file name could contain "*/".
9305 (b4_synclines_flag): Don't quote the 2nd argument; it should already
9306 be quoted. All uses changed.
9307
9308 * data/glr.c: Use new @ escapes consistently.
9309 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
9310 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
9311 Remove, since they couldn't handle arbitrary characters in file
9312 names.
9313 * data/lalr1.cc: Likewise.
9314 * data/yacc.c: Likewise.
9315
9316 * src/files.c (output_infix): Remove; all uses removed.
9317 * src/files.h: Likewise.
9318
9319 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
9320 mishandled funny characters in file names, and anyway it isn't
9321 needed any more.
9322 * data/yacc.c: Likewise.
9323 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
9324
9325 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
9326 * data/yacc.c: Likewise.
9327
9328 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
9329 strings now.
9330 (muscle_init): Quote filename as a C string.
9331 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
9332 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
9333 * src/output.c (escaped_file_name_output): New function.
9334 (prepare_symbols): Quote tokens for M4.
9335 (prepare): Don't insert output_infix, output_prefix,
9336 output_parser_name, output_header_name; this is now down by scan-skel.
9337 Insert skeleton as a C string.
9338
9339 * src/output.c (user_actions_output, symbol_destructors_output,
9340 symbol_printers_output): Quote filenames for C and M4.
9341 * src/reader.c (prologue_augment, epilogue_set): Likewise.
9342
9343 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
9344 escapes other than \\ and \'; this simplifies the code.
9345 (<SC_STRING>): Likewise, for \\ and \".
9346 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
9347 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
9348 Use new escapes @{ and @} for [ and ].
9349
9350 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
9351 them with auto vars.
9352 Switch to new escape scheme, where @ is the escape character uniformly.
9353 Abort if a stray escape character is found. Avoid unbounded input
9354 buffer when parsing non-escaped text.
9355
9356 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
9357 __oline__, #output, $@, and @{ do not have unintended meanings.
9358
acea4f3b
PE
93592002-11-09 Paul Eggert <eggert@twinsun.com>
9360
9361 Fix the test failure due to GCC warnings described in
161a71f3 9362 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
9363 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
9364 evaluate to 0 if it's impossible for NINF to be in the respective
9365 table.
9366 (yygetLRActions, yyrecoverParseError): Use them.
9367
9368 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
9369 counted in the token inserted at end of file. Now takes
9370 location_t *, not location_t, so that the location can be
9371 adjusted. All uses changed.
9372
9373 * tests/regression.at (Invalid inputs): Adjust wording in
9374 diagnostic to match the new behavior.
9375
9376 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
9377 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
9378 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
9379 abort ();'. This reduces the runtime of the "Many lookaheads"
9380 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
9381 GCC 3.2.
9382
20ef1ad5
PE
93832002-11-07 Paul Eggert <eggert@twinsun.com>
9384
9385 * src/parse-gram.y (CHARACTER): Remove unused token.
9386 All uses removed.
9387
9388 * src/scan-gram.l: Remove stack option. We no longer use the
9389 stack, since the stack was never deeper than 1; instead, use the
9390 new auto var c_context to record the stacked value.
9391
9392 Remove nounput option. At an unexpected end of file, we now unput
9393 the minimal input necessary to end cleanly; this simplifies the
9394 code.
9395
9396 Avoid unbounded token sizes where this is easy.
9397
9398 (unexpected_end_of_file): New function.
9399 Use it to systematize the error message on unexpected EOF.
9400 (last-string): Now auto, not static.
9401 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
9402 (scanner_last_string_free): Remove; not used.
9403 (percent_percent_count): Move decl to just before use.
9404 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
9405 not the (never otherwised-used) CHARACTER.
9406
93724f13
AD
94072002-11-07 Akim Demaille <akim@epita.fr>
9408
9409 Let yyerror always receive the msg as last argument, so that
9410 yyerror can be variadic.
9411
9412 * data/yacc.c (b4_yyerror_args): New.
9413 Use it when calling yyerror.
9414 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
9415 Use it when calling yyerror.
9416 * doc/bison.texinfo (Error Reporting): Adjust.
9417 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
9418 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
9419
6e40b4eb
AD
94202002-11-06 Akim Demaille <akim@epita.fr>
9421
9422 #line should have quoted strings.
9423 Ideally, this should be done by m4_quotearg.
9424
9425 * src/scan-skel.l: Include quotearg.h.
9426 Quote __ofile__.
9427 * src/output.c (symbol_printers_output)
9428 (symbol_destructors_output): Quote the file name.
9429
2dfbfc12
AD
94302002-11-06 Akim Demaille <akim@epita.fr>
9431
9432 * tests/regression.at (Invalid inputs): Adjust to the recent
9433 messages.
9434
437c2d80
AD
94352002-11-06 Akim Demaille <akim@epita.fr>
9436
9437 Restore --no-lines.
9438 Reported by Jim Kent.
9439
9440 * data/c.m4 (b4_syncline): New.
9441 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
9442 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
9443 * src/output.c (user_actions_output): Likewise.
9444 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 9445 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 9446
900c5db5
AD
94472002-11-06 Akim Demaille <akim@epita.fr>
9448
9449 * src/main.c (main): Free `infile'.
9450 * src/scan-gram.l (handle_syncline): New.
9451 Recognize `#line'.
9452 * src/output.c (user_actions_output, symbol_destructors_output)
9453 (symbol_printers_output): Use the location's file name, not
9454 infile.
9455 * src/reader.c (prologue_augment, epilogue_set): Likewise.
9456
e183b123 94572002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 9458
e183b123 9459 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 9460 either has GLR conflict entries.
e183b123 9461
193eb6b7
PE
94622002-11-05 Paul Eggert <eggert@twinsun.com>
9463
e183b123
PE
9464 * src/scan-gram.l: Use more accurate diagnostics, e.g.
9465 "integer out of range" rather than "invalid value".
9466 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
9467 accordingly.
9468
193eb6b7
PE
9469 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
9470 Also, remove one static variable in the scanner.
9471
9472 * src/scan-gram.l (braces_level): Now auto, not static.
9473 Initialize to zero if the compiler is being picky.
9474 (INITIAL): Clear braces_level instead of incrementing it.
9475 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
9476 as POSIX 1003.1-2001 requires.
9477 * src/system.h (IF_LINT): New macro, taken from coreutils.
9478 * configure.ac: Define "lint" if --enable-gcc-warnings.
9479
29c01725
AD
94802002-11-05 Akim Demaille <akim@epita.fr>
9481
9482 * src/scan-gram.l: When it starts with `%', complain about the
9483 whole directive, not just that `invalid character: %'.
9484
8aeac3ca
AD
94852002-11-04 Akim Demaille <akim@epita.fr>
9486
9487 * Makefile.maint: Update from Autoconf.
9488 (update, cvs-update, po-update, do-po-update): New.
9489
793a58bb
AD
94902002-11-04 Akim Demaille <akim@epita.fr>
9491
9492 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
9493 and yyerror.
9494 Have yyerror `use' its arguments.
9495 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
9496 returns true when location & yacc & pure & parse-param.
9497 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
9498
c4d720cd
AD
94992002-11-04 Akim Demaille <akim@epita.fr>
9500
9501 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
9502 clashes.
9503 * src/scan-gram.l: Use [\'] instead of ['] to pacify
9504 font-lock-mode.
9505 Use complain_at.
9506 Use quote, not quote_n since LOCATION_PRINT no longer uses the
9507 slot 0.
9508
613a0dc5
PE
95092002-11-03 Paul Eggert <eggert@twinsun.com>
9510
9511 * src/reader.c (get_merge_function, grammar_current_rule_check):
9512 Use consistent diagnostics for reporting type name clashes.
9513 Quote the types with <>, for consistency with Yacc.
9514 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
9515
2a8d363a
AD
95162002-11-03 Akim Demaille <akim@epita.fr>
9517
9518 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
9519 New.
9520 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
9521 (b4_parse_param): Remove.
9522 Use b4_identification.
9523 Propagate b4_pure_args where needed to pass them to yyerror.
9524 * data/glr.m4 (b4_parse_param): Remove.
9525 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
9526 (b4_lpure_formals): New.
9527 Use b4_identification.
9528 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
9529 b4_user_formals and b4_user_args.
9530 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
9531 (yyreportAmbiguity): When using a pure parser, also need
9532 the location, and the parse-params.
9533 Adjust callers.
9534 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
9535 When using a pure parser, also need the parse-params.
9536 Adjust callers.
9537 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
9538 (%pure-parser + %parse-param) LALR and GLR parsers.
9539 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
9540 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
9541 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
9542 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
9543 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
9544 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
9545 * doc/bison.texinfo: Untabify the whole file.
9546 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
9547 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
9548 (Error Reporting): Adjust to these new directives.
9549 Document %error-verbose, deprecate YYERROR_VERBOSE.
9550
9e32add8
AD
95512002-11-03 Akim Demaille <akim@epita.fr>
9552
9553 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
9554 AT_CHECK_CALC_GLR invocations to use % directives, instead of
9555 command line options.
9556 * tests/cxx-type.at: Formatting changes.
9557
b02d90a5
PE
95582002-11-03 Paul Eggert <eggert@twinsun.com>
9559
9560 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
9561 to count columns correctly, and to check for invalid inputs.
9e32add8 9562
b02d90a5
PE
9563 Use mbsnwidth to count columns correctly. Account for tabs, too.
9564 Include mbswidth.h.
9565 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
9566 (extend_location): New function.
9567 (YY_LINES): Remove.
9568
9569 Handle CRLF in C code rather than in Lex code.
9570 (YY_INPUT): New macro.
9571 (no_cr_read): New function.
9572
9573 Scan UCNs, even though we don't fully handle them yet.
9574 (convert_ucn_to_byte): New function.
9575
9576 Handle backslash-newline correctly in C code.
9577 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
9578 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
9579 all uses changed.
9580 (tag, splice): New EREs. Do not allow NUL or newline in tags.
9581 Use {splice} wherever C allows backslash-newline.
9582 YY_STEP after space, newline, vertical-tab.
9583 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 9584
b02d90a5
PE
9585 (letter, id): Don't assume ASCII; e.g., spell out a-z.
9586
9587 ({int}, handle_action_dollar, handle_action_at): Check for integer
9588 overflow.
9e32add8 9589
b02d90a5
PE
9590 (YY_STEP): Omit trailing semicolon, so that it's more like C.
9591
9592 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
9593 as well as \000. Check for UCHAR_MAX, not 255.
9594 Allow \x with an arbitrary positive number of digits, as in C.
9595 Check for overflow here.
9596 Allow \? and UCNs, for compatibility with C.
9597
9598 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
9599 with quote slot used by complain_at.
9600
9601 * tests/input.at: Add tests for backslash-newline, m4 quotes
9602 in symbols, long literals, and funny escapes in strings.
9603
9604 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
9605 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
9606 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
9607 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
9608 * m4/mbswidth.m4: New file, from GNU coreutils.
9609
9610 * doc/bison.texinfo (Grammar Outline): Document // comments.
9611 (Symbols): Document that trigraphs have no special meaning in Bison,
9612 nor is backslash-newline allowed.
9613 (Actions): Document that trigraphs have no special meaning.
9614
9615 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
9616 no longer used.
9617
96182002-11-02 Paul Eggert <eggert@twinsun.com>
9619
9620 * src/reader.c: Don't include quote.h; not needed.
9621 (get_merge_function): Reword warning to be consistent with
9622 type clash diagnostic in grammar_current_rule_check.
9623
9624 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
9625 bug in trigraph handling.
9626
9627 * src/output.c (prepare_symbols): When printing token names,
9628 escape "[" as "@<:@" and likewise for "]".
9629
9630 * src/system.h (errno): Remove declaration, as we are now
9631 assuming C89 or better, and C89 guarantees errno.
9632
762b212b
PE
96332002-10-30 Paul Eggert <eggert@twinsun.com>
9634
9635 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
9636 Check for close failures.
9637 * src/files.h (xfclose): Return void, not int, since it always
9638 returned zero.
9639 * src/files.c (xfclose): Likewise. Report I/O error if ferror
9640 indicates one.
9641 * src/output.c (output_skeleton): Use xfclose rather than fclose
9642 and ferror. xfclose now checks ferror.
9643
9644 * data/glr.c (YYLEFTMOST_STATE): Remove.
9645 (yyreportTree): Use a stack-based leftmost state. This avoids
9646 our continuing battles with bogus warnings about initializers.
9647
56100c60
AD
96482002-10-30 Akim Demaille <akim@epita.fr>
9649
9650 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
9651 #if.
9652
51b4a04c
PH
96532002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9654
9655 * tests/glr-regr1.at: New test for reported regressions.
9656 * tests/testsuite.at: Add glr-regr1.at test.
9657 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 9658
bf1ebda2
PE
96592002-10-24 Paul Eggert <eggert@twinsun.com>
9660
5c16c6b1
PE
9661 Version 1.75a.
9662
bf1ebda2
PE
9663 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
9664 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
9665 we use malloc. Don't assume 'A' through 'Z' are contiguous.
9666 Don't assume strdup exists; POSIX says its an XSI extension.
9667 Check for buffer overflow on input.
9668
b526ee61
AD
96692002-10-24 Akim Demaille <akim@epita.fr>
9670
9671 * src/output.c (output_skeleton): Don't disable M4sugar comments
9672 too soon: it results in comments being expanded.
9673 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
9674 first output.
9675
f1886bb2
AD
96762002-10-24 Akim Demaille <akim@epita.fr>
9677
9678 * data/yacc.c (m4_int_type): New.
9679 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
9680 char' as only yacc.c wants K&R portability.
9681 * data/glr.c (yysigned_char): Remove.
9682 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
9683 Reported by Quoc Peyrot.
9684
c5576256
PE
96852002-10-23 Paul Eggert <eggert@twinsun.com>
9686
9687 * src/main.c (main): With --trace=time, report times even if a
9688 non-fatal error occurs. Formerly, the times were reported in some
9689 such cases but not in others.
9690 * src/reader.c (reader): Just return if a complaint has been issued,
9691 instead of exiting, so that 'main' can report times.
9692
27b0ffea
AD
96932002-10-22 Akim Demaille <akim@epita.fr>
9694
9695 * src/system.h: Include sys/types.
9696 Reported by Bert Deknuydt.
9697
223a7883
PE
96982002-10-23 Paul Eggert <eggert@twinsun.com>
9699
9700 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
9701 Suggested by Art Haas.
9702
97032002-10-22 Paul Eggert <eggert@twinsun.com>
9704
9705 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
9706 decl; not needed any more.
9707 * src/main.c (main): Use return to exit, undoing yesterday's change.
9708 The last OS that we could find where this wouldn't work is
9709 SunOS 3.5, and that's too old to worry about now.
9710
9711 * data/glr.c (struct yyltype): Define members even when not
9712 doing locations. This is more consistent with yacc.c, and it
9713 works around the following bug reports:
161a71f3
PE
9714 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
9715 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 9716
223a7883
PE
9717 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
9718 @acronym consistently. Standardize on "Yacc" instead of "YACC",
9719 "Algol" instead of "ALGOL". Give a bit more history about BNF.
9720
8b76775a
AD
97212002-10-22 Akim Demaille <akim@epita.fr>
9722
9723 * data/README: New.
9724
6db10d14
PE
97252002-10-21 Paul Eggert <eggert@twinsun.com>
9726
9727 Be consistent about 'bool'; the old code used an enum in one
9728 module and an int in another, and this violates the C standard.
9729 * m4/stdbool.m4: New file, from coreutils 4.5.3.
9730 * configure.ac (AC_HEADER_STDBOOL): Add.
9731 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
9732 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
9733 * src/symtab.c (hash_compare_symbol_t): Likewise.
9734 * src/system.h (bool, false, true): Use a definition consistent
9735 with ../lib/hash.c. All uses changed.
9736
9737 * src/complain.c (warning_issued): Renamed from warn_message_count,
9738 so that we needn't worry about integer overflow (!).
9739 Now of type bool. All uses changed.
9740 (complaint_issued): Renamed from complain_message_count; likewise.
9741
9742 * src/main.c (main): Use exit to exit with failure.
27b0ffea 9743
6db10d14
PE
9744 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
9745 rather than 1 and 0.
9746 * src/main.c (main): Likewise.
9747 * src/getargs.c (getargs): Likewise.
9748 * src/reader.c (reader): Likewise.
9749
9750 * src/getarg.c (getargs): Remove duplicate code for
9751 "Try `bison --help'".
9752
9753 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
9754 What was that "2" for?
9755
9756 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
9757 * src/getargs.c (usage): Likewise.
9758
9759 * src/getargs.c (getargs): When there are too few operands, report
9760 the last one. When there are too many, report the first extra
9761 one. This is how diffutils does it.
9762
92a060fd
PE
97632002-10-20 Paul Eggert <eggert@twinsun.com>
9764
9765 Remove K&R vestiges.
9766 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
9767 * src/complain.c (VA_START): Remove. Assume prototypes.
9768 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
9769 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
9770 fatal): Assume prototypes.
9771 * src/complain.h: Assume prototypes.
9772 * src/system.h (PARAMS): Remove.
9773 Include <limits.h> unconditionally, since it's guaranteeed even
9774 for a freestanding C89 compiler.
9775 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
9776 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 9777
e7cb57c0
AD
97782002-10-20 Akim Demaille <akim@epita.fr>
9779
9780 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
9781 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
9782 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
9783 (yyresolveStates, yyresolveAction, yyresolveStack)
9784 (yyprocessOneStack): Use them.
9785 (yy_reduce_print): New.
9786 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
9787
0245f82d
AD
97882002-10-20 Akim Demaille <akim@epita.fr>
9789
9790 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
9791 arguments and output `void'.
9792 (b4_c_function): Rename as...
9793 (b4_c_function_def): this.
9794 (b4_c_function_decl, b4_c_ansi_function_def)
9795 (b4_c_ansi_function_decl): New.
9796 Change the interpretation of the arguments: before `int, foo', now
9797 `int foo, foo'.
9798 * data/yacc.c (yyparse): Prototype and define thanks to these.
9799 Adjust b4_c_function_def uses.
9800 * data/glr.c (yyparse): Likewise, but ANSI only.
9801
39912f52
AD
98022002-10-20 Akim Demaille <akim@epita.fr>
9803
9804 * src/output.c (prepare): Move the definition of `tokens_number',
9805 `nterms_number', `undef_token_number', `user_token_number_max'
9806 to...
9807 (prepare_tokens): Here.
9808 (prepare_tokens): Rename as...
9809 (prepare_symbols): this.
9810 (prepare): Move the definition of `rules_number' to...
9811 (prepare_rules): here.
9812 (prepare): Move the definition of `last', `final_state_number',
9813 `states_number' to...
9814 (prepare_states): here.
9815 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
9816
20c1e2ad
AD
98172002-10-20 Akim Demaille <akim@epita.fr>
9818
9819 * src/tables.h, src/tables.c, src/output.c: Comment changes.
9820
21964f43
AD
98212002-10-20 Akim Demaille <akim@epita.fr>
9822
9823 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
9824 * data/c.m4: here.
9825
66d30cd4
AD
98262002-10-20 Akim Demaille <akim@epita.fr>
9827
9828 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
9829 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
9830 `pair'.
9831 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
9832 `name' to...
9833 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
9834 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
9835 These.
9836
95f2c9fe
PE
98372002-10-19 Paul Eggert <eggert@twinsun.com>
9838
9839 Do not create a temporary file, as that involves security and
9840 cleanup headaches. Instead, use a pair of pipes.
9841 Derived from a suggestion by Florian Krohm.
9842 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
9843 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
9844 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
9845 (BISON_PREREQ_SUBPIPE): Add.
9846 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
9847 Add subpipe.h, subpipe.c.
9848 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
9849 * po/POTFILES.in: Add lib/subpipe.c.
9850 * src/output.c: Include "subpipe.h".
9851 (m4_invoke): Remove decl.
9852 (scan_skel): New decl.
9853 (output_skeleton): Use pipe rather than temporary file for m4 input.
9854 Check that m4sugar.m4 is readable, to avoid deadlock.
9855 Check for pipe I/O error.
9856 * src/scan-skel.l (readpipe): Remove decl.
9857 (scan_skel): New function, to be used in place of m4_invoke.
9858 Read from stream rather than file.
66d30cd4 9859
95f2c9fe
PE
9860 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
9861 float, as this generates a warning on Solaris 8 + GCC 3.2 with
9862 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
9863 this generates a more-accurate value anyway.
9864
9865 * lib/timevar.c (timervar_accumulate): Rename locals to
9866 avoid confusion with similarly-named more-global.
9867 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
9868
9869 * src/output.c (prepare): Use xstrdup to convert char const *
9870 to char *, to avoid GCC warning.
9871
c19988b7
AD
98722002-10-19 Akim Demaille <akim@epita.fr>
9873
9874 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
9875 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
9876 Use them to have `calc.y' ready for %pure-parser.
9877 * data/yacc.c (YYLEX): Pass a yylex return type to
9878 b4_c_function_call.
9879
ae7453f2
AD
98802002-10-19 Akim Demaille <akim@epita.fr>
9881
9882 Prototype support of %lex-param and %parse-param.
9883
9884 * src/parse-gram.y: Add the definition of the %lex-param and
9885 %parse-param tokens, plus their rules.
9886 Drop the `_' version of %glr-parser.
9887 Add the "," token.
9888 * src/scan-gram.l (INITIAL): Scan them.
9889 * src/muscle_tab.c: Comment changes.
9890 (muscle_insert, muscle_find): Rename `pair' as `probe'.
9891 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
9892 (muscle_entry_s): The `value' member is no longer const.
9893 Adjust all dependencies.
9894 * src/muscle_tab.c (muscle_init): Adjust: use
9895 MUSCLE_INSERT_STRING.
9896 Initialize the obstack earlier.
9897 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
9898 (muscle_pair_list_grow): New.
9899 * data/c.m4 (b4_c_function_call, b4_c_args): New.
9900 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
9901 * tests/calc.at: Use %locations, not --locations.
9902 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
9903
0e575721
AD
99042002-10-19 Akim Demaille <akim@epita.fr>
9905
9906 * src/getargs.c (usage): Take status as argument and exit
9907 accordingly.
9908 Report the traditional `Try ... --help' message when status != 0.
9909 (usage, version): Don't take a FILE * as arg, it is pointless.
9910 (getargs): When there is an incorrect number of arguments, make it
9911 an error, and report it GNUlically thanks to `usage ()'.
9912
724ce7f5
PE
99132002-10-18 Paul Eggert <eggert@twinsun.com>
9914
3a781eb2
PE
9915 * data/glr.c (yyreportParseError): Don't assume that sprintf
9916 yields the length of the printed string, as this is not true
9917 on SunOS 4.1.4. Reported by Peter Klein.
9918
724ce7f5
PE
9919 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
9920 * tests/conflicts.at (%nonassoc and eof): Likewise.
9921 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
9922
473d0a75
AD
99232002-10-17 Akim Demaille <akim@epita.fr>
9924
9925 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
9926 * src/getargs.c (trace_types, trace_args): Adjust.
9927 * src/reader.c (grammar_current_rule_prec_set)
9928 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
9929 Standardize error messages.
9930 And s/@prec/%prec/!
9931 (reader): Use trace_flag to enable scanner/parser debugging,
9932 instead of an adhoc scheme.
9933 * src/scan-gram.l: Remove trailing debugging code.
9934
e76d2469
PE
99352002-10-16 Paul Eggert <eggert@twinsun.com>
9936
93e2236a
PE
9937 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
9938 MUSCLE_TAB_H.
9939
e76d2469
PE
9940 * NEWS: Officially drop support for building Bison with K&R C,
9941 since it didn't work anyway and it's not worth worrying about.
9942 * Makefile.maint (wget_files): Remove ansi2knr.c.
9943 (ansi2knr.c-url_prefix): Remove.
9944 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
9945 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9946 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
9947
5bd1c419
PE
99482002-10-15 Paul Eggert <eggert@twinsun.com>
9949
9950 Stop using the "enum_" trick for K&R-style function definitions;
9951 it confused me, and I was the author! Instead, assume that people
9952 who want to use K&R C compilers (when using these modules in GCC,
9953 perhaps?) will run ansi2knr.
9954
9955 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
9956 All uses of "enum_" changed to "enum ".
9957 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
9958 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 9959
5bd1c419
PE
9960 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
9961 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
9962 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
9963 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
9964 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
9965 abitset_not, abitset_ones, abitset_or, abitset_or_and,
9966 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
9967 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
9968 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
9969 Use function prototypes; this removes the need for declaring
9970 static functions simply to provide their prototypes.
9971 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
9972 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
9973 bitset_count_, bitset_create, bitset_dump, bitset_first,
9974 bitset_free, bitset_init, bitset_last, bitset_next,
9975 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
9976 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
9977 bitset_print, bitset_release_memory, bitset_toggle_,
9978 bitset_type_choose, bitset_type_get, bitset_type_name_get,
9979 debug_bitset): Likewise.
9980 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
9981 * lib/bitset_stats.c (bitset_log_histogram_print,
9982 bitset_percent_histogram_print, bitset_stats_and,
9983 bitset_stats_and_cmp, bitset_stats_and_or,
9984 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
9985 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
9986 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
9987 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
9988 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
9989 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
9990 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
9991 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
9992 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
9993 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
9994 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
9995 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
9996 bitset_stats_zero): Likewise.
9997 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
9998 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
9999 bitsetv_dump, debug_bitsetv): Likewise.
10000 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
10001 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
10002 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
10003 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
10004 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
10005 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
10006 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
10007 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
10008 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
10009 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
10010 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
10011 Likewise.
10012 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
10013 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
10014 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
10015 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
10016 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
10017 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
10018 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
10019 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
10020 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
10021 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
10022 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 10023
ae26e1f0
AD
100242002-10-14 Akim Demaille <akim@epita.fr>
10025
10026 Version 1.75.
10027
d43baf71
AD
100282002-10-14 Akim Demaille <akim@epita.fr>
10029
10030 * tests/Makefile.am (maintainer-check-posix): New.
10031
7ebc83e3
AD
100322002-10-14 Akim Demaille <akim@epita.fr>
10033
10034 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
10035 member.
10036
05846dae
AD
100372002-10-14 Akim Demaille <akim@epita.fr>
10038
10039 * src/tables.c (table_ninf_remap): base -> tab.
10040 Reported by Matt Rosing.
10041
1318e37d
PE
100422002-10-14 Paul Eggert <eggert@twinsun.com>
10043
447fbb17
PE
10044 * tests/action.at, tests/calc.at, tests/conflicts.at,
10045 tests/cxx-type.at, tests/headers.at, tests/input.at,
10046 tests/regression.at, tests/synclines.at, tests/torture.at:
10047 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
10048 so that the tests still work even if POSIXLY_CORRECT is set.
10049 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 10050
1318e37d
PE
10051 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
10052 for portability to K&R hosts. Fix typo: signed char is guaranteed
10053 only to 127, not to 128.
10054 * data/glr.c (yysigned_char): New type.
10055 * data/yacc.c (yysigned_char): Likewise.
10056 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
10057
cc0f0794
PE
100582002-10-13 Paul Eggert <eggert@twinsun.com>
10059
5038f418
PE
10060 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
10061 true due to limited range of data type" warning from GCC.
10062
cc0f0794
PE
10063 * data/c.m4 (b4_token_defines): Protect against double-inclusion
10064 by wrapping enum yytokentype's definition inside #ifndef
10065 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
10066
6fed0802
AD
100672002-10-13 Akim Demaille <akim@epita.fr>
10068
10069 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
10070 Un yy- yyrhs to avoid the name clash with the global YYRHS.
10071
32f0598d
AD
100722002-10-13 Akim Demaille <akim@epita.fr>
10073
10074 * Makefile.maint: Update from Autoconf 2.54.
10075 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
10076
7ea9a33f
AD
100772002-10-13 Akim Demaille <akim@epita.fr>
10078
10079 * src/print.c (print_state): Separate the list of solved conflicts
10080 from the other items.
10081 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
10082
ea99527d
AD
100832002-10-13 Akim Demaille <akim@epita.fr>
10084
10085 Let nondeterministic skeletons be usable with deterministic
10086 tables.
10087
10088 With the patch, GAWK compiled by GCC without -O2 passes its test
10089 suite using a GLR parser driven by LALR tables. It fails with -O2
10090 because `struct stat' gives two different answers on my machine:
10091 88 (definition of an auto var) and later 96 (memset on this var).
10092 Hence the stack is badly corrumpted. The headers inclusion is to
10093 blame: if I move the awk.h inclusion before GLR's system header
10094 inclusion, the two struct stat have the same size.
10095
10096 * src/tables.c (pack_table): Always create conflict_table.
10097 (token_actions): Always create conflict_list.
10098 * data/glr.c (YYFLAG): Remove, unused.
10099
f377f69f
AD
101002002-10-13 Akim Demaille <akim@epita.fr>
10101
10102 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
10103 (O0FLAGS): New.
10104 (VALGRIND, GXX): New.
10105 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
10106 * tests/bison.in: Run $PREBISON a pre-command.
10107 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
10108 (maintainer-check-g++): New.
10109 * Makefile.am (maintainer-check): New.
10110
2a1fe6ed
AD
101112002-10-13 Akim Demaille <akim@epita.fr>
10112
10113 * data/glr.c: Formatting changes.
10114 Tweak some trace messages to match yacc.c's.
10115
f50adbbd
AD
101162002-10-13 Akim Demaille <akim@epita.fr>
10117
10118 GLR parsers sometimes raise parse errors instead of performing the
10119 default reduction.
10120 Reported by Charles-Henry de Boysson.
10121
10122 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 10123 check the length of the traces when %glr.
f50adbbd
AD
10124 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
10125 GLR's traces.
10126 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
10127 Test GLR parsers.
10128 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
10129 (yyltype): Remove the yy prefix from the member names.
10130 (yytable): Complete its comment.
10131 (yygetLRActions): Map error action number from YYTABLE from
10132 YYTABLE_NINF to 0.
10133 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
10134 (which was a bug: it should have been YYTABEL_NINF, and yet it was
10135 not satisfying as we could compare an YYACTION computed from
10136 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
10137 only value for error actions.
10138 (yyreportParseError): In verbose parse error messages, don't issue
10139 `error' in the list of expected tokens.
10140 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
10141 next action to perform to match glr.c's decoding.
10142 (yytable): Complete its comment.
10143
bcbad5b9
PE
101442002-10-13 Paul Eggert <eggert@twinsun.com>
10145
10146 Fix problem reported by Henrik Grubbstroem in
161a71f3 10147 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
10148 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
10149 because the Bison parser reads the second action before reducing
10150 the first one.
10151 * src/scan-gram.l (rule_length): New static var.
10152 Use it to keep track of the rule length in the scanner, since
10153 we can't expect the parser to be in lock-step sync with the scanner.
10154 (handle_action_dollar, handle_action_at): Use this var.
10155 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 10156
14904b89
PE
101572002-10-12 Paul Eggert <eggert@twinsun.com>
10158
1fe611e5
PE
10159 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
10160 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
10161 Include <sys/time.h> when checking for clock_t and struct tms.
10162 Use same include order as source.
10163 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 10164 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 10165
1fe611e5
PE
10166 * lib/timevar.c: Update copyright date and clarify comments.
10167 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 10168
1fe611e5
PE
10169 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
10170 GCC version as of today, then merge Bison's changes.
10171 Change "GCC" to "Bison" in copyright notice. timevar.def's
10172 author is Akim, so change that too.
10173
98194095
PE
10174 * src/reader.c (grammar_current_rule_check):
10175 Don't worry about the default action if $$ is untyped.
10176 Prevents bogus warnings reported by Jim Gifford in
161a71f3 10177 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 10178
14904b89
PE
10179 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
10180 * data/glr.c, data/lalr1.cc, data/yacc.c:
10181 Output token definitions before the first part of user declarations.
10182 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 10183 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 10184
ff6dca18
PE
101852002-10-11 Paul Eggert <eggert@twinsun.com>
10186
10187 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
10188 (yyparse): here. This undoes some of the 2002-07-25 change.
10189 Compatibility problem reported by Ralf S. Engelschall with
10190 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
10191
eb714592
AD
101922002-10-11 Akim Demaille <akim@epita.fr>
10193
10194 * tests/regression.at Characters Escapes): New.
10195 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
10196 characters.
10197 Reported by Jan Nieuwenhuizen.
10198
b7195100
AD
101992002-10-11 Akim Demaille <akim@epita.fr>
10200
10201 * po/id.po: New.
10202
f28a0f2d
PE
102032002-10-10 Paul Eggert <eggert@twinsun.com>
10204
10205 Portability fixes for bitsets; this also avoids several GCC
10206 warnings.
10207
10208 * lib/abitset.c: Include <stddef.h>, for offsetof.
10209 * lib/lbitset.c: Likewise.
10210
10211 * lib/abitset.c (abitset_bytes): Return a size that is aligned
10212 properly for vectors of objects. Do not assume that adding a
10213 header size to a multiple of a word size yields a value that is
10214 properly aligned for the whole union.
10215 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10216
10217 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
10218 unique names for structures.
10219 * lib/ebitset.c (ebitset_bytes): Likewise.
10220 * lib/lbitset.c (lbitset_bytes): Likewise.
10221
10222 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
10223 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
10224 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
10225 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
10226 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
10227 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
10228 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
10229 to improve the type-checking that GCC can do.
10230 * lib/bitset.c (bitset_op4_cmp): Likewise.
10231 * lib/bitset_stats.c (bitset_stats_count,
10232 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
10233 bitset_stats_copy, bitset_stats_disjoint_p,
10234 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
10235 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
10236 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
10237 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
10238 bitset_stats_and_or_cmp, bitset_stats_andn_or,
10239 bitset_stats_andn_or_cmp, bitset_stats_or_and,
10240 bitset_stats_or_and_cmp): Likewise.
10241 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
10242 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
10243 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
10244 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
10245
10246 * lib/abitset.h: Include bitset.h, not bbitset.h.
10247 * lib/ebitset.h: Likewise.
10248 * lib/lbitset.h: Likewise.
10249
10250 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
10251 All instances of parameters of type enum bitset_opts are now of
10252 type enum_bitset_opts, to conform to the C Standard, and similarly
10253 for enum_bitset_type.
10254 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
10255 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
10256
10257 Do not use "struct bitset_struct" to mean different things in
10258 different modules. Not only is this confusing, it violates
10259 the C Standard, which requires that structure types in different
10260 modules must be compatible if one is to be passed to the other.
10261 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
10262 All instances of "struct bitset_struct *" replaced with "bitset".
10263 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
10264 (union bitset_union, struct abitset_struct, struct ebitset_struct,
10265 struct lbitset_struct, struct bitset_stats_struct): New types.
10266 All uses of struct bitset_struct changed to union bitset_union,
10267 etc.
ba0fe3c7 10268 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
10269 struct bitset_struct): Remove.
10270 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
10271 struct bitset_struct): Remove.
10272 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
10273 bitset_struct): Remove.
10274 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
10275 Likewise.
10276
10277 Do not call a function of type T using a call that assumes the
10278 function is of a different type U. Standard C requires that a
10279 function must be called with a type that is compatible with its
10280 definition.
10281 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
10282 New decls.
10283 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
10284 New functions.
10285 * lib/ebitset.c (PFV): Remove.
10286 * lib/lbitset.c (PFV): Likewise.
10287 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
10288 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
10289 decls.
10290 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
10291 (ebitset_vtable): Use them.
10292 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
10293 lbitset_xor): New functions.
10294 (lbitset_vtable): Use them.
10295
10296 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
10297 Declare.
10298
10299 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
10300 GCC warning.
10301 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
10302 Use offsetof, for simplicity.
10303
6fbe4984
PE
103042002-10-06 Paul Eggert <eggert@twinsun.com>
10305
10306 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
10307 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 10308 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
10309 which was inadvertently undone by the 2002-09-30 patch.
10310 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
10311 the same width as int.
10312
420f93c8
PE
103132002-10-04 Paul Eggert <eggert@twinsun.com>
10314
10315 Version 1.50.
10316
10317 * configure.ac (AC_INIT), NEWS: Increment version number.
10318
10319 * doc/bison.texinfo: Minor spelling, grammar, and white space
10320 fixes.
10321 (Symbols): Mention that any negative value returned from yylex
10322 signifies end-of-input. Warn about negative chars. Mention
10323 the portable Standard C character set.
10324
10325 The GNU coding standard says CFLAGS and YFLAGS are reserved
10326 for the installer to set.
10327 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
10328 * src/Makefile.am (AM_CFLAGS): Likewise.
10329 (AM_YFLAGS): Renamed from YFLAGS.
10330
10331 Fix some MAX and MIN problems.
10332 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
10333 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
10334 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
10335 * src/reader.c (reader): Use it.
10336
10337 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
10338 POSIX 1003.1-2001 has removed fgrep.
10339
103402002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
10341
10342 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
10343 interpreted as signed.
10344 * lib/ebitset.c (ebitset_list): Fix bug.
10345
ff68026d
PE
103462002-10-01 Paul Eggert <eggert@twinsun.com>
10347
10348 More fixes for 64-bit hosts and large bitsets.
10349
10350 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
10351 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
10352 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
10353 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
10354 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
10355 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
10356 bitset_count_): Likewise.
10357 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
10358 bitset_first, bitset_last): Likewise.
10359 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
10360 bitset_stats_list_reverse, bitset_stats_size,
10361 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
10362 Likewise.
10363 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
10364 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
10365 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
10366 bitsetv_reflexive_transitive_closure): Likewise.
10367 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
10368 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
10369 Likewise.
10370 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
10371 Likewise.
420f93c8 10372
ff68026d
PE
10373 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
10374 Use size_t, not unsigned int, to count bytes.
10375 * lib/abitset.h (abitset_bytes): Likewise.
10376 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
10377 Likewise.
10378 * lib/bitset.h (bitset_bytes): Likewise.
10379 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
10380 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
10381 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10382 * lib/ebitset.c (ebitset_bytes): Likewise.
10383 * lib/ebitset.h (ebitset_bytes): Likewise.
10384 * lib/lbitset.c (lbitset_bytes): Likewise.
10385 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 10386
ff68026d
PE
10387 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
10388 abitset_subset_p, abitset_disjoint_p, abitset_and,
10389 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
10390 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
10391 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
10392 abitset_or_and, abitset_or_and_cmp):
10393 Use bitset_windex instead of unsigned int.
10394 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
10395 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
10396 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
10397 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
10398 Likewise.
10399 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 10400
ff68026d
PE
10401 * lib/bitset.c (bitset_print):
10402 Use proper printf formats for widths of integer types.
10403 * lib/bitset_stats.c (bitset_percent_histogram_print,
10404 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
10405 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
10406 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
10407 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 10408
ff68026d
PE
10409 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
10410 BITSET_SIZE_MAX): New macros.
10411 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
10412 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
10413 to BITSET_WINDEX_MAX.
10414
10415 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
10416 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
10417 since we now return the bitset_bindex type (not int).
10418
10419 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
10420 when computing sizes.
10421 * lib/ebitset.c (ebitset_elts_grow): Likewise.
10422
10423 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
10424 and avoid cast to unsigned.
10425
6aa452a6
AD
104262002-09-30 Akim Demaille <akim@epita.fr>
10427
10428 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
10429 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
10430 Updates from Michael Hayes.
10431
927f7817
AD
104322002-09-30 Art Haas <ahaas@neosoft.com>
10433
10434 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
10435 invocations.
10436 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
10437 defined.
10438
9738f41e
AD
104392002-09-27 Akim Demaille <akim@epita.fr>
10440
10441 Version 1.49c.
10442
a5c75d7f
AD
104432002-09-27 Akim Demaille <akim@epita.fr>
10444
10445 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
10446 (Because of AC_LIBSOURCE).
10447
8280e179
AD
104482002-09-27 Akim Demaille <akim@epita.fr>
10449
10450 Playing with Autoscan.
10451
10452 * configure.ac: Remove the old LIBOBJ tweaks.
10453 (AC_REPLACE_FUNCS): Add strrchr and strtol.
10454 * lib/strrchr.c: New.
10455 * lib/strtol.c: New, from the Coreutils 4.5.1.
10456
ae64af35
AD
104572002-09-27 Akim Demaille <akim@epita.fr>
10458
10459 Playing with Autoscan.
10460
10461 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
10462 * lib/Makefile.am (libbison_a_SOURCES): No longer include
10463 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
10464 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
10465 Coreutils 4.5.1.
10466
d1a1114f
AD
104672002-09-24 Akim Demaille <akim@epita.fr>
10468
10469 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
10470 (Frequently Asked Questions, Parser Stack Overflow): New.
10471
b906441c
AD
104722002-09-13 Akim Demaille <akim@epita.fr>
10473
10474 Playing with autoscan.
10475
10476 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
10477 * src/files.c (skeleton_find): Remove, unused.
10478 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
10479 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
10480
bd701811
AD
104812002-09-13 Akim Demaille <akim@epita.fr>
10482
10483 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
10484 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
10485
e0a13e7b
AD
104862002-09-13 Akim Demaille <akim@epita.fr>
10487
10488 * configure.ac: Require 2.54.
10489 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
10490 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
10491 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
10492 Remove, provided by Autoconf macros.
10493
c97011bf
AD
104942002-09-12 Akim Demaille <akim@epita.fr>
10495
10496 * m4/prereq.m4: Update, from Coreutils 4.5.1.
10497
d862b1be
AD
104982002-09-12 Akim Demaille <akim@epita.fr>
10499
10500 * m4/prereq.m4: Update, from Fileutils 4.1.5.
10501 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
10502 Reported by Martin Mokrejs.
10503
3d38c03a
AD
105042002-09-10 Akim Demaille <akim@epita.fr>
10505
10506 * src/parse-gram.y: Associate a human readable string to each
10507 token type.
10508 * tests/regression.at (Invalid inputs): Adjust.
10509
b6347355
AD
105102002-09-10 Gary V. Vaughan <gary@gnu.org>
10511
10512 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
10513 with an Autoconf-2.5x style configure.ac.
10514
09ba4ab2
PE
105152002-09-06 Paul Eggert <eggert@twinsun.com>
10516
10517 * doc/bison.texinfo (Conditions): Make explicit that the GPL
10518 exception applies only to yacc.c. This is a modification of a
10519 patch originally suggested by Akim Demaille.
10520
21846f69
AD
105212002-09-06 Akim Demaille <akim@epita.fr>
10522
09ba4ab2
PE
10523 * data/c.m4 (b4_copyright): Move the GPL exception comment from
10524 here to...
10525 * data/yacc.c: here.
10526
21846f69
AD
10527 * data/lalr1.cc (struct yyltype): Don't define it, since we use
10528 LocationType.
10529 (b4_ltype): Default to yy::Location from location.hh.
10530
c0ad8bf3
AD
105312002-09-04 Jim Meyering <jim@meyering.net>
10532
10533 * data/yacc.c: Guard the declaration of yytoknum also with
10534 `#ifdef YYPRINT', so it is declared only when used.
10535
3a93251e
AD
105362002-09-04 Akim Demaille <akim@epita.fr>
10537
10538 * configure.in: Rename as...
10539 * configure.ac: this.
10540 Bump to 1.49c.
10541
427c0dda
AD
105422002-09-04 Akim Demaille <akim@epita.fr>
10543
10544 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
10545 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
10546 translate maintainer only messages.
10547
6a254321
PE
105482002-08-12 Paul Eggert <eggert@twinsun.com>
10549
645e30d1
PE
10550 Version 1.49b.
10551
6a254321
PE
10552 * Makefile.am (SUBDIRS): Remove intl.
10553 (DISTCLEANFILES): Remove.
10554 * NEWS: Mention that GNU M4 is now required. Clarify what is
10555 meant by "larger grammars". Mention the pt_BR translation.
10556 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
10557 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
10558 Bump version from 0.11.2 to 0.11.5.
10559 (BISON_PREREQ_STAGE): Remove.
10560 (AM_GNU_GETTEXT): Use external gettext.
10561 (AC_OUTPUT): Remove intl/Makefile.
10562
10563 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
10564
10565 * data/glr.c: Include string.h, for strlen.
10566 (yyreportParseError): Use size_t for yysize.
10567 (yy_yypstack): No longer nested inside yypstates, as nested
10568 functions are not portable. Do not assume size_t is the
10569 same width as int.
10570 (yypstates): Do not assume that ptrdiff_t is the same width
10571 as int, and similarly for yyposn and YYINDEX.
10572
10573 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
10574
10575 * lib/Makefile.am (INCLUDES): Do not include from the intl
10576 directory, which has been removed.
10577 * src/Makefile.am (INCLUDES): Likewise.
10578
10579 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
10580 (bitsets_sources, additional_bitsets_sources, timevars_sources):
10581 New vars.
10582
10583 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
10584 * tests/Makefile.am (EXTRA_DIST): Likewise.
10585
10586 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
10587 Do not assume that bitset_windex is the same width as unsigned.
10588
10589 * lib/abitset.c (abitset_unused_clear): Do not assume that
10590 bitset_word is the same width as int.
10591 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
10592 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
10593 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
10594 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
10595 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
10596
10597 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
10598 portability to one's complement hosts!).
10599 * lib/ebitset.c (ebitset_op1): Likewise.
10600 * lib/lbitset.c (lbitset_op1): Likewise.
10601
10602 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
10603 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
10604 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
10605 Sync with fileutils.
10606 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
10607 lib/gettext.h: Sync with diffutils.
10608
10609 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
10610 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
10611
10612 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
10613 PROTOTYPES to check for prototypes, and "defined __STDC__" to
10614 check for void *.
10615
10616 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
10617 size_t; the old version tried to do this but casted improperly.
10618 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
10619 (bitset_test): Now returns int, not unsigned long.
10620
10621 * lib/bitset_stats.c: Include "gettext.h".
10622 (_): New macro.
10623 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
10624 name locals "index", as it generates unnecessary warnings on some
10625 hosts that have an "index" function.
10626
10627 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
10628 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
10629 they need translation.
10630 * src/LR0.c (state_list_append, new_itemsets, get_state,
10631 append_states, generate_states): Likewise.
10632 * src/assoc.c (assoc_to_string): Likewise.
10633 * src/closure.c (print_closure, set_firsts, closure): Likewise.
10634 * src/gram.c (grammar_dump): Likewise.
10635 * src/injections.c (injections_compute): Likewise.
10636 * src/lalr.c (lookaheads_print): Likewise.
10637 * src/relation.c (relation_transpose): Likewise.
10638 * src/scan-gram.l: Likewise.
10639 * src/tables.c (table_grow, pack_vector): Likewise.
10640
10641 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
10642 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
10643 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
10644 * m4/mbstate_t.m4: Sync with fileutils.
10645 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
10646
10647 * po/LINGUAS: Add pt_BR.
10648 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
10649 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
10650 lib/timevar.c.
10651 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
10652 manual recommends.
10653 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
10654
10655 * src/complain.c (strerror_r): Remove decl; not needed.
10656 (strerror): Use same pattern as ../lib/error.c.
10657
10658 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
10659
10660 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
10661
10662 * src/main.c (main): Cast result of bindtextdomain and textdomain
10663 to void, to avoid a GCC warning when --disable-nls is in effect.
10664
10665 * src/scan-gram.l: Use strings rather than escapes when possible,
10666 to minimize the number of warnings from xgettext.
10667 (handle_action_dollar, handle_action_at): Don't use isdigit,
10668 as it mishandles negative chars and it may not work as expected
10669 outside the C locale.
10670
10671 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
10672 this is a GCC extension and is not portable to other compilers.
10673
10674 * src/system.h (alloca): Use same pattern as ../lib/error.c.
10675 Do not include <ctype.h>; no longer needed.
10676 Do not include <malloc.h>; no longer needed (and generates
10677 warnings on OpenBSD 3.0).
10678
10679 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
10680 it's not portable.
10681
10682 * tests/regression.at: Do not use 'cc -c input.c -o input';
10683 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
10684
10685 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
10686 exit status as failure, not just exit status 1. Sun C exits
10687 with status 2 sometimes.
10688
10689 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
10690 Use it for the two large tests.
10691
c8f002c7
AD
106922002-08-02 Akim Demaille <akim@epita.fr>
10693
10694 * src/conflicts.c (conflicts_output): Don't output rules never
10695 reduced here, since anyway that computation doesn't work.
10696 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
10697 (rule_useless_p, rule_never_reduced_p): New.
10698 (grammar_rules_partial_print): Use a filter instead of a range.
10699 Display the title only if needed.
10700 (grammar_rules_print): Adjust.
10701 (grammar_rules_never_reduced_report): New.
10702 * src/tables.c (action_row): Move the computation of rules never
10703 reduced to...
10704 (token_actions): here.
10705 * src/main.c (main): Make the parser before making the report, so
10706 that rules never reduced are computed.
10707 Call grammar_rules_never_reduced_report.
10708 * src/print.c (print_results): Report rules never reduced.
10709 * tests/conflicts.at, tests/reduce.at: Adjust.
10710
cd08e51e
AD
107112002-08-01 Akim Demaille <akim@epita.fr>
10712
10713 Instead of attaching lookaheads and duplicating the rules being
10714 reduced by a state, attach the lookaheads to the reductions.
10715
10716 * src/state.h (state_t): Remove the `lookaheads',
10717 `lookaheads_rule' member.
10718 (reductions_t): Add a `lookaheads' member.
10719 Use a regular array for the `rules'.
10720 * src/state.c (reductions_new): Initialize the lookaheads member
10721 to 0.
10722 (state_rule_lookaheads_print): Adjust.
10723 * src/state.h, src/state.c (state_reductions_find): New.
10724 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
10725 (count_rr_conflicts): Adjust.
10726 * src/lalr.c (LArule): Remove.
10727 (add_lookback_edge): Adjust.
10728 (state_lookaheads_count): New.
10729 (states_lookaheads_initialize): Merge into...
10730 (initialize_LA): this.
10731 (lalr_free): Adjust.
10732 * src/main.c (main): Don't free nullable and derives too early: it
10733 is used by --verbose.
10734 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
10735
bb0027a9
AD
107362002-08-01 Akim Demaille <akim@epita.fr>
10737
10738 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
10739 `rule_number_t**'.
10740 (set_derives, free_derives): Rename as...
10741 (derives_compute, derives_free): this.
10742 Adjust all dependencies.
10743 * src/nullable.c (set_nullable, free_nullable): Rename as...
10744 (nullable_compute, nullable_free): these.
10745 (rule_list_t): Store rule_t *, not rule_number_t.
10746 * src/state.c (state_rule_lookaheads_print): Directly compare rule
10747 pointers, instead of their numbers.
10748 * src/main.c (main): Call nullable_free, and derives_free earlier,
10749 as they were lo longer used.
10750
3325ddc4
AD
107512002-08-01 Akim Demaille <akim@epita.fr>
10752
10753 * lib/timevar.c (get_time): Include children time.
10754 * src/lalr.h (LA, LArule): Don't export them: used with the
10755 state_t.
10756 * src/lalr.c (LA, LArule): Static.
10757 * src/lalr.h, src/lalr.c (lalr_free): New.
10758 * src/main.c (main): Call it.
10759 * src/tables.c (pack_vector): Check whether loc is >= to the
10760 table_size, not >.
10761 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
10762 (tables_generate): do it, since that's also it which allocates
10763 them.
10764 Don't free LA and LArule, main does.
10765
c6f1a33c
AD
107662002-07-31 Akim Demaille <akim@epita.fr>
10767
10768 Separate parser tables computation and output.
10769
10770 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
10771 (conflict_list, conflict_list_cnt, table, check, table_ninf)
10772 (yydefgoto, yydefact, high): Move to...
10773 * src/tables.h, src/tables.c: here.
10774 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
10775 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
10776 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
10777 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
10778 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
10779 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
10780 (action_row, save_row, token_actions, save_column, default_goto)
10781 (goto_actions, sort_actions, matching_state, pack_vector)
10782 (table_ninf_remap, pack_table, prepare_actions): Move to...
10783 * src/tables.c: here.
10784 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
10785 * src/output.c (token_actions, output_base, output_conflicts)
10786 (output_check): Merge into...
10787 (prepare_actions): this.
10788 (actions_output): Rename as...
10789 (user_actions_output): this.
10790 * src/main.c (main): Call tables_generate and tables_free.
10791
1509d42f
AD
107922002-07-31 Akim Demaille <akim@epita.fr>
10793
10794 Steal GCC's --time-report support.
10795
10796 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
10797 stolen/adjusted from GCC.
10798 * m4/stage.m4: Remove time related checks.
10799 * m4/timevar.m4: New.
10800 * configure.in: Adjust.
10801 * src/system.h: Adjust to using timevar.h.
10802 * src/getargs.h, src/getargs.c: Support trace_time for
10803 --trace=time.
10804 * src/main.c (stage): Remove.
10805 (main): Replace `stage' invocations with timevar calls.
10806 * src/output.c: Insert pertinent timevar calls.
10807
273a74fa
AD
108082002-07-31 Akim Demaille <akim@epita.fr>
10809
10810 Let --trace have arguments.
10811
10812 * src/getargs.h (enum trace_e): New.
10813 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
10814 (long_options, short_options): --trace/-T takes an optional
10815 argument.
10816 Change all the uses of trace_flag to reflect the new flags.
10817 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
10818
10819 Strengthen `stage' portability.
10820
10821 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
10822 * configure.in: Use it.
10823 Don't check for malloc.h and sys/times.h.
10824 * src/system.h: Include them when appropriate.
10825 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
10826 times and struct tms are available.
10827
217598da
AD
108282002-07-30 Akim Demaille <akim@epita.fr>
10829
10830 In verbose parse error message, don't report `error' as an
10831 expected token.
10832 * tests/actions.at (Printers and Destructors): Adjust.
10833 * tests/calc.at (Calculator $1): Adjust.
10834 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
10835 error message, do not report the parser accepts the error token in
10836 that state.
10837
52489d44
AD
108382002-07-30 Akim Demaille <akim@epita.fr>
10839
10840 Normalize conflict related messages.
10841
10842 * src/complain.h, src/complain.c (warn, complain): New.
10843 * src/conflicts.c (conflicts_print): Use them.
10844 (conflict_report_yacc): New, extracted from...
10845 (conflicts_print): here.
10846 * tests/conflicts.at, tests/existing.at: Adjust.
10847
e8832397
AD
108482002-07-30 Akim Demaille <akim@epita.fr>
10849
10850 Report rules which are never reduced by the parser: those hidden
10851 by conflicts.
10852
10853 * src/LR0.c (save_reductions): Don't make the final state too
10854 different: save its reduction (accept) instead of having a state
10855 without any action (no shift or goto, no reduce).
10856 Note: the final state is now a ``regular'' state, i.e., the
10857 parsers now contain `reduce 0' as default reduction.
10858 Nevertheless, since they decide to `accept' when yystate =
10859 final_state, they still will not reduce rule 0.
10860 * src/print.c (print_actions, print_reduction): Adjust.
10861 * src/output.c (action_row): Track reduced rules.
10862 (token_actions): Report rules never reduced.
10863 * tests/conflicts.at, tests/regression.at: Adjust.
10864
caf23d24
AD
108652002-07-30 Akim Demaille <akim@epita.fr>
10866
10867 `stage' was accidently included in a previous patch.
10868 Initiate its autoconfiscation.
10869
10870 * configure.in: Look for malloc.h and sys/times.h.
10871 * src/main.c (stage): Adjust.
10872 Report only when trace_flag.
10873
640748ee
AD
108742002-07-29 Akim Demaille <akim@epita.fr>
10875
10876 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
10877 state_number_t.
10878 (errs_t): symbol_t*, not symbol_number_t.
10879 (reductions_t): rule_t*, not rule_number_t.
10880 (FOR_EACH_SHIFT): New.
10881 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
10882 * src/print.c, src/print_graph.c: Adjust.
10883
88bce5a2
AD
108842002-07-29 Akim Demaille <akim@epita.fr>
10885
10886 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
10887
10888 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
10889 (endtoken, accept): these.
10890 * src/reader.c (reader): Set endtoken's default tag to "$end".
10891 Set undeftoken's tag to "$undefined" instead of "$undefined.".
10892 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
10893 Adjust.
10894
1bfb97db
AD
108952002-07-29 Akim Demaille <akim@epita.fr>
10896
10897 * src/reduce.c (reduce_grammar): When the language is empty,
10898 complain about the start symbol, not the axiom.
10899 Use its location.
10900 * tests/reduce.at (Empty Language): New.
10901
fc5734fe
AD
109022002-07-26 Akim Demaille <akim@epita.fr>
10903
10904 * src/reader.h, src/reader.c (gram_error): ... can't get
10905 yycontrol without making too strong assumptions on the parser
10906 itself.
10907 * src/output.c (prepare_tokens): Use the real 0th value of
10908 token_translations instead of `0'.
10909 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
10910 visible here.
10911 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
10912 for the time being: %locations ought to provide it to yyerror.
10913
3650b4b8
AD
109142002-07-25 Akim Demaille <akim@epita.fr>
10915
10916 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
10917 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
10918 * tests/regression.at (Web2c Actions): Adjust.
10919
4b3d3a8e
AD
109202002-07-25 Akim Demaille <akim@epita.fr>
10921
10922 Stop storing rules from 1 to nrules + 1.
10923
10924 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
10925 * src/nullable.c, src/output.c, src/print.c, src/reader.c
10926 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
10927 Iterate from 0 to nrules.
10928 Use rule_number_as_item_number and item_number_as_rule_number.
10929 Adjust to `derive' now containing possibly 0.
10930 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
10931 Handle the `- 1' part in rule numbers from/to item numbers.
10932 * src/conflicts.c (log_resolution): Fix the message which reversed
10933 shift and reduce.
10934 * src/output.c (action_row): Initialize default_rule to -1.
10935 (token_actions): Adjust.
10936 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
10937 expected output.
10938 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
10939
4a2a22f4
AD
109402002-07-25 Akim Demaille <akim@epita.fr>
10941
10942 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
10943 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
10944 (b4_c_knr_arg_decl): New.
10945 * data/yacc.c: Use it to define yysymprint, yydestruct, and
10946 yyreport_parse_error.
10947
b8df3223
AD
109482002-07-25 Akim Demaille <akim@epita.fr>
10949
10950 * data/yacc.c (yyreport_parse_error): New, extracted from...
10951 (yyparse): here.
10952 (yydestruct, yysymprint): Move above yyparse.
10953 Be K&R compliant.
10954
a762e609
AD
109552002-07-25 Akim Demaille <akim@epita.fr>
10956
10957 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
10958 replace...
10959 (b4_sint_type, b4_uint_type): these.
10960 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
10961 * tests/regression.at (Web2c Actions): Adjust.
10962
12b0043a
AD
109632002-07-25 Akim Demaille <akim@epita.fr>
10964
10965 * src/gram.h (TIEM_NUMBER_MAX): New.
10966 (item_number_of_rule_number, rule_number_of_item_number): Rename
10967 as...
10968 (rule_number_as_item_number, item_number_as_rule_number): these.
10969 Adjust dependencies.
10970 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
10971 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
10972 (symbol_number_to_vector_number): New.
10973 (order): Of vector_number_t* type.
10974 (base_t, BASE_MAX, BASE_MIN): New.
10975 (froms, tos, width, pos, check): Of base_t type.
10976 (action_number_t, ACTION_MIN, ACTION_MAX): New.
10977 (actrow): Of action_number_t type.
10978 (conflrow): Of unsigned int type.
10979 (table_ninf, base_ninf): New.
10980 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
10981 (muscle_insert_int_table, muscle_insert_base_table)
10982 (muscle_insert_rule_number_table): New.
10983 (prepare_tokens): Output `toknum' as int_table.
10984 (action_row): Returns a rule_number_t.
10985 Use ACTION_MIN, not SHRT_MIN.
10986 (token_actions): yydefact is rule_number_t*.
10987 (table_ninf_remap): New.
10988 (pack_table): Use it for `base' and `table'.
10989 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
10990 replaced with...
10991 (YYPACT_NINF, YYTABLE_NINF): these.
10992 (yypact, yytable): Compute their types instead of hard-coded
10993 `short'.
10994 * tests/regression.at (Web2c Actions): Adjust.
10995
5dde258a
AD
109962002-07-19 Akim Demaille <akim@epita.fr>
10997
10998 * src/scan-gram.l (id): Can start with an underscore.
10999
a945ec39
AD
110002002-07-16 Akim Demaille <akim@epita.fr>
11001
11002 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
11003 Adjust all former `associativity' dependencies.
11004 * src/symtab.c (symbol_new): Default associativity is `undef', not
11005 `right'.
11006 (symbol_check_alias_consistence): Adjust.
11007
fae437e8
AD
110082002-07-09 Akim Demaille <akim@epita.fr>
11009
11010 * doc/bison.texinfo: Properly set the ``header'' part.
11011 Use @dircategory ``GNU programming tools'' as per Texinfo's
11012 documentation.
11013 Use @copying.
11014
1a715ef2
AD
110152002-07-09 Akim Demaille <akim@epita.fr>
11016
11017 * lib/quotearg.h: Protect against multiple inclusions.
11018 * src/location.h (location_t): Add a `file' member.
11019 (LOCATION_RESET, LOCATION_PRINT): Adjust.
11020 * src/complain.c (warn_at, complain_at, fatal_at): Drop
11021 `error_one_per_line' support.
11022
a5d50994
AD
110232002-07-09 Akim Demaille <akim@epita.fr>
11024
11025 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
11026 * src/reader.c (lineno): Remove.
11027 Adjust all dependencies.
11028 (get_merge_function): Take a location and use complain_at.
11029 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
11030 * tests/regression.at (Invalid inputs, Mixing %token styles):
11031 Adjust.
11032
b275314e
AD
110332002-07-09 Akim Demaille <akim@epita.fr>
11034
11035 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
11036 recovery rule, and forbid extensions when --yacc.
11037 (gram_error): Use complain_at.
11038 * src/reader.c (reader): Exit if there were parse errors.
11039
865b9df1
AD
110402002-07-09 Akim Demaille <akim@epita.fr>
11041
11042 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
11043 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
11044 Reported by R Blake <blakers@mac.com>.
11045
c76e14da
AD
110462002-07-09 Akim Demaille <akim@epita.fr>
11047
11048 * data/yacc.c: Output the copyright notive in the header.
11049
7db2ed2d
AD
110502002-07-03 Akim Demaille <akim@epita.fr>
11051
11052 * src/output.c (froms, tos): Are state_number_t.
11053 (save_column): sp, sp1, and sp2 are state_number_t.
11054 (prepare): Rename `final' as `final_state_number', `nnts' as
11055 `nterms_number', `nrules' as `rules_number', `nstates' as
11056 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
11057 unused.
11058 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
11059 * data/lalr1.cc (nsym_): Remove, unused.
11060
e68e0410
AD
110612002-07-03 Akim Demaille <akim@epita.fr>
11062
11063 * src/lalr.h, src/lalr.c (goto_number_t): New.
11064 * src/lalr.c (goto_list_t): New.
11065 Propagate them.
11066 * src/nullable.c (rule_list_t): New.
11067 Propagate.
11068 * src/types.h: Remove.
11069
e1a4f3a4
AD
110702002-07-03 Akim Demaille <akim@epita.fr>
11071
11072 * src/closure.c (print_fderives): Use rule_rhs_print.
11073 * src/derives.c (print_derives): Use rule_rhs_print.
11074 (rule_list_t): New, replaces `shorts'.
11075 (set_derives): Add comments.
11076 * tests/sets.at (Nullable, Firsts): Adjust.
11077
536545f3
AD
110782002-07-03 Akim Demaille <akim@epita.fr>
11079
11080 * src/output.c (prepare_actions): Free `tally' and `width'.
11081 (prepare_actions): Allocate and free `order'.
11082 * src/symtab.c (symbols_free): Free `symbols'.
11083 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
11084 * src/output.c (m4_invoke): Move to...
11085 * src/scan-skel.l: here.
11086 (<<EOF>>): Close yyout, and free its name.
11087
8b752b00
AD
110882002-07-03 Akim Demaille <akim@epita.fr>
11089
11090 Fix some memory leaks, and fix a bug: state 0 was examined twice.
11091
11092 * src/LR0.c (new_state): Merge into...
11093 (state_list_append): this.
11094 (new_states): Merge into...
11095 (generate_states): here.
11096 (set_states): Don't ensure a proper `errs' state member here, do it...
11097 * src/conflicts.c (conflicts_solve): here.
11098 * src/state.h, src/state.c: Comment changes.
11099 (state_t): Rename member `shifts' as `transitions'.
11100 Adjust all dependencies.
11101 (errs_new): For consistency, also take the values as argument.
11102 (errs_dup): Remove.
11103 (state_errs_set): New.
11104 (state_reductions_set, state_transitions_set): Assert that no
11105 previous value was assigned.
11106 (state_free): New.
11107 (states_free): Use it.
11108 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
11109 temporary storage: use `errs' and `nerrs' as elsewhere.
11110 (set_conflicts): Allocate and free this `errs'.
11111
613f5e1a
AD
111122002-07-02 Akim Demaille <akim@epita.fr>
11113
11114 * lib/libiberty.h: New.
11115 * lib: Update the bitset implementation from upstream.
11116 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
11117 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
11118 * src/main.c: Adjust bitset stats calls.
11119
26e0cadc
PE
111202002-07-01 Paul Eggert <eggert@twinsun.com>
11121
11122 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
11123 char, so that negative chars don't collide with $.
11124
1154cced
AD
111252002-06-30 Akim Demaille <akim@epita.fr>
11126
11127 Have the GLR tests be `warning' checked, and fix the warnings.
11128
11129 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
11130 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
11131 (yyremoveDeletes): `yyi' and `yyj' are size_t.
11132 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
11133 (yyaddDeferredAction): static.
11134 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
11135 (yyreportParseError): yyprefix is const.
11136 yytokenp is used only when verbose.
11137 (yy__GNUC__): Replace with __GNUC__.
11138 (yypdumpstack): yyi is size_t.
11139 (yypreference): Un-yy local variables and arguments, to avoid
11140 clashes with `yyr1'. Anyway, we are not in the user name space.
11141 (yytname_size): be an int, as is compared with ints.
11142 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
11143 Use them.
11144 * tests/cxx-gram.at: Use quotation to protect $1.
11145 Use AT_COMPILE to enable warnings hunts.
11146 Prototype yylex and yyerror.
11147 `Use' argc.
11148 Include `string.h', not `strings.h'.
11149 Produce and prototype stmtMerge only when used.
11150 yylex takes a location.
11151
97650f4e
AD
111522002-06-30 Akim Demaille <akim@epita.fr>
11153
11154 We spend a lot of time in quotearg, in particular when --verbose.
11155
11156 * src/symtab.c (symbol_get): Store a quoted version of the key.
11157 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
11158 Adjust all callers.
11159
d2576365
AD
111602002-06-30 Akim Demaille <akim@epita.fr>
11161
11162 * src/state.h (reductions_t): Rename member `nreds' as num.
11163 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
11164 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
11165
ccaf65bc
AD
111662002-06-30 Akim Demaille <akim@epita.fr>
11167
11168 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
11169 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
11170 (shifts_to): Rename as...
11171 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
11172 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
11173 (TRANSITION_IS_DISABLED, transitions_to): these.
11174
87675353
AD
111752002-06-30 Akim Demaille <akim@epita.fr>
11176
11177 * src/print.c (print_shifts, print_gotos): Merge into...
11178 (print_transitions): this.
11179 (print_transitions, print_errs, print_reductions): Align the
11180 lookaheads columns.
11181 (print_core, print_transitions, print_errs, print_state,
11182 print_grammar): Output empty lines separator before, not after.
11183 (state_default_rule_compute): Rename as...
11184 (state_default_rule): this.
11185 * tests/conflicts.at (Defaulted Conflicted Reduction),
11186 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
11187 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
11188
ce4ccb4b
AD
111892002-06-30 Akim Demaille <akim@epita.fr>
11190
11191 Display items as we display rules.
11192
11193 * src/gram.h, src/gram.c (rule_lhs_print): New.
11194 * src/gram.c (grammar_rules_partial_print): Use it.
11195 * src/print.c (print_core): Likewise.
11196 * tests/conflicts.at (Defaulted Conflicted Reduction),
11197 (Unresolved SR Conflicts): Adjust.
11198 (Unresolved SR Conflicts): Adjust and rename as...
11199 (Resolved SR Conflicts): this, as was meant.
11200 * tests/regression.at (Web2c Report): Adjust.
11201
bc933ef1
AD
112022002-06-30 Akim Demaille <akim@epita.fr>
11203
11204 * src/print.c (state_default_rule_compute): New, extracted from...
11205 (print_reductions): here.
11206 Pessimize, but clarify the code.
11207 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
11208
53d4308d
AD
112092002-06-30 Akim Demaille <akim@epita.fr>
11210
11211 * src/output.c (action_row): Let default_rule be always a rule
11212 number.
11213
574fb2d5
AD
112142002-06-30 Akim Demaille <akim@epita.fr>
11215
11216 * src/closure.c (print_firsts, print_fderives, closure):
11217 Use BITSET_EXECUTE.
11218 * src/lalr.c (lookaheads_print): Likewise.
11219 * src/state.c (state_rule_lookaheads_print): Likewise.
11220 * src/print_graph.c (print_core): Likewise.
11221 * src/print.c (print_reductions): Likewise.
11222 * src/output.c (action_row): Likewise.
11223 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
11224
05811fd7
AD
112252002-06-30 Akim Demaille <akim@epita.fr>
11226
11227 * src/print_graph.c: Use report_flag.
11228
0e4d5753
AD
112292002-06-30 Akim Demaille <akim@epita.fr>
11230
11231 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
11232 to...
11233 * src/relation.h, src/relation.c (traverse, relation_digraph)
11234 (relation_print, relation_transpose): New.
11235
24c7d800
AD
112362002-06-30 Akim Demaille <akim@epita.fr>
11237
11238 * src/state.h, src/state.c (shifts_to): New.
11239 * src/lalr.c (build_relations): Use it.
11240
9222837b
AD
112412002-06-30 Akim Demaille <akim@epita.fr>
11242
11243 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
11244 (item_number_of_rule_number, rule_number_of_item_number): New.
11245 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
11246 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
11247 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
11248 Propagate their use.
11249 Much remains to be done, in particular wrt `shorts' from types.h.
11250
260008e5
AD
112512002-06-30 Akim Demaille <akim@epita.fr>
11252
11253 * src/symtab.c (symbol_new): Initialize the `printer' member.
11254
8a731ca8
AD
112552002-06-30 Akim Demaille <akim@epita.fr>
11256
11257 * src/LR0.c (save_reductions): Remove, replaced by...
11258 * src/state.h, src/state.c (state_reductions_set): New.
11259 (reductions, errs): Rename as...
11260 (reductions_t, errs_t): these.
11261 Adjust all dependencies.
11262
32e1e0a4
AD
112632002-06-30 Akim Demaille <akim@epita.fr>
11264
11265 * src/LR0.c (state_list_t, state_list_append): New.
11266 (first_state, last_state): Now symbol_list_t.
11267 (this_state): Remove.
11268 (new_itemsets, append_states, save_reductions): Take a state_t as
11269 argument.
11270 (set_states, generate_states): Adjust.
11271 (save_shifts): Remove, replaced by...
11272 * src/state.h, src/state.c (state_shifts_set): New.
11273 (shifts): Rename as...
11274 (shifts_t): this.
11275 Adjust all dependencies.
11276 * src/state.h (state_t): Remove the `next' member.
11277
e5fb6710
AD
112782002-06-30 Akim Demaille <akim@epita.fr>
11279
11280 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
11281 escaped in slot 0.
11282
c7ca99d4
AD
112832002-06-30 Akim Demaille <akim@epita.fr>
11284
11285 Use hash.h for the state hash table.
11286
11287 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
11288 (allocate_storage): Use state_hash_new.
11289 (free_storage): Use state_hash_free.
11290 (new_state, get_state): Adjust.
11291 * src/lalr.h, src/lalr.c (states): Move to...
11292 * src/states.h (state_t): Remove the `link' member, no longer
11293 used.
11294 * src/states.h, src/states.c: here.
11295 (state_hash_new, state_hash_free, state_hash_lookup)
11296 (state_hash_insert, states_free): New.
11297 * src/states.c (state_table, state_compare, state_hash): New.
11298 * src/output.c (output_actions): Do not free states now, since we
11299 still need to know the final_state number in `prepare', called
11300 afterwards. Do it...
11301 * src/main.c (main): here: call states_free after `output'.
11302
df0e7316
AD
113032002-06-30 Akim Demaille <akim@epita.fr>
11304
11305 * src/state.h, src/state.c (state_new): New, extracted from...
11306 * src/LR0.c (new_state): here.
11307 * src/state.h (STATE_ALLOC): Move to...
11308 * src/state.c: here.
11309 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
11310 * src/state.h, src/state.c: here.
11311
39f41916
AD
113122002-06-30 Akim Demaille <akim@epita.fr>
11313
11314 * src/reader.c (gensym): Rename as...
11315 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
11316 (getsym): Rename as...
11317 (symbol_get): this.
11318
d57650a5
AD
113192002-06-30 Akim Demaille <akim@epita.fr>
11320
11321 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
11322 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
11323 * src/output.c, src/print.c, src/print_graph.c: Propagate.
11324 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
11325
5a08f1ce
AD
113262002-06-30 Akim Demaille <akim@epita.fr>
11327
11328 Make the test suite pass with warnings checked.
11329
11330 * tests/actions.at (Printers and Destructors): Improve.
11331 Avoid unsigned vs. signed issues.
11332 * tests/calc.at: Don't exercise the scanner here, do it...
11333 * tests/input.at (Torturing the Scanner): here.
11334
720623af
PH
113352002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11336
88e7e941 11337 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
11338 reorganize first lines parallel to yacc.c.
11339
fb8135fa
AD
113402002-06-28 Akim Demaille <akim@epita.fr>
11341
11342 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
11343 (b4_token_enum, b4_token_defines): New, factored from...
11344 * data/lalr1.cc, data/yacc.c, glr.c: here.
11345
41442480
AD
113462002-06-28 Akim Demaille <akim@epita.fr>
11347
11348 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
11349 unused variables.
11350 * src/output.c (merger_output): static.
11351
e0e5bf84
AD
113522002-06-28 Akim Demaille <akim@epita.fr>
11353
ba0fe3c7 11354 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
11355 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
11356 pacify GCC.
11357 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 11358
676385e2
PH
113592002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11360
11361 Accumulated changelog for new GLR parsing features.
11362
6a254321 11363 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
11364 conflicts_total_count.
11365 * src/conflicts.h: Ditto.
11366 * src/output.c (token_actions): Use the new name.
11367 (output_conflicts): Change conflp => conflict_list_heads, and
11368 confl => conflict_list for better readability.
11369 * data/glr.c: Use the new names.
11370 * NEWS: Add self to GLR announcement.
e0e5bf84 11371
676385e2
PH
11372 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
11373
11374 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
11375 Akim Demaille.
11376
11377 * data/bison.glr: Change name to glr.c
11378 * data/glr.c: Renamed from bison.glr.
11379 * data/Makefile.am: Add glr.c
e0e5bf84
AD
11380
11381 * src/getargs.c:
11382
676385e2 11383 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 11384 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 11385
676385e2
PH
11386 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11387
11388 * data/bison.glr: Be sure to restore the
11389 current #line when returning to the skeleton contents after having
11390 exposed the input file's #line.
11391
11392 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11393
11394 * data/bison.glr: Bring up to date with changes to bison.simple.
11395
11396 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11397
11398 * data/bison.glr: Correct definitions that use b4_prefix.
11399 Various reformatting.
11400 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
11401 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
11402 yytokenp argument; now part of stack.
11403 (yychar): Define to behave as documented.
11404 (yyclearin): Ditto.
e0e5bf84 11405
676385e2
PH
11406 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11407
11408 * src/reader.h: Add declaration for free_merger_functions.
11409
11410 * src/reader.c (merge_functions): New variable.
11411 (get_merge_function): New function.
11412 (free_merger_functions): New function.
11413 (readgram): Check for %prec that is not followed by a symbol.
11414 Handle %dprec and %merge declarations.
11415 (packgram): Initialize dprec and merger fields in rules array.
11416
11417 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
11418 conflict_list_cnt, conflict_list_free): New variables.
11419 (table_grow): Also grow conflict_table.
e0e5bf84 11420 (prepare_rules): Output dprec and merger tables.
676385e2 11421 (conflict_row): New function.
e0e5bf84 11422 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
11423 default reduction in conflicted states for GLR parser so that there
11424 are spaces for the conflict lists.
11425 (save_row): Also save conflict information.
11426 (token_actions): Allocate conflict list.
11427 (merger_output): New function.
11428 (pack_vector): Pack conflict table, too.
11429 (output_conflicts): New function to output yyconflp and yyconfl.
11430 (output_check): Allocate conflict_tos.
11431 (output_actions): Output conflict tables, also.
11432 (output_skeleton): Output b4_mergers definition.
11433 (prepare): Output b4_max_rhs_length definition.
11434 Use 'bison.glr' as default skeleton for GLR parsers.
11435
11436 * src/gram.c (glr_parser): New flag.
11437 (grammar_free): Call free_merger_functions.
11438
11439 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
11440 all pairs of conflicting reductions, rather than just all tokens
11441 causing conflicts. Needed to size conflict tables.
e0e5bf84 11442 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
11443 interface.
11444 (conflicts_print): Ditto.
11445 (count_total_conflicts): New function.
11446
11447 * src/reader.h (merger_list): New type.
11448 (merge_functions): New variable.
11449
11450 * src/lex.h (tok_dprec, tok_merge): New token types.
11451
11452 * src/gram.h (rule_s): Add dprec and merger fields.
11453 (glr_parser): New flag.
11454
11455 * src/conflicts.h (count_total_conflicts): New function.
11456
11457 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
11458
11459 * doc/bison.texinfo (Generalized LR Parsing): New section.
11460 (GLR Parsers): New section.
11461 (Language and Grammar): Mention GLR parsing.
11462 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
11463 Correct typo ("tge" -> "the").
11464
11465 * data/bison.glr: New skeleton for GLR parsing.
11466
11467 * tests/cxx-gram.at: New tests for GLR parsing.
11468
11469 * tests/testsuite.at: Include cxx-gram.at.
11470
11471 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 11472
676385e2
PH
11473 * src/parse-gram.y:
11474
11475 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
11476
11477 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 11478
b5480d74 114792002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
11480
11481 * src/options.h, src/options.c: Remove.
11482 * src/getargs.c (short_options, long_options): New.
11483
60491a94
AD
114842002-06-27 Akim Demaille <akim@epita.fr>
11485
11486 * data/bison.simple, data/bison.c++: Rename as...
11487 * data/yacc.c, data/lalr1.cc: these.
11488 * doc/bison.texinfo (Environment Variables): Remove.
11489
9be0c25b
AD
114902002-06-25 Raja R Harinath <harinath@cs.umn.edu>
11491
11492 * src/getargs.c (report_argmatch): Initialize strtok().
11493
1ae72863
AD
114942002-06-20 Akim Demaille <akim@epita.fr>
11495
11496 * data/bison.simple (b4_symbol_actions): New, replaces...
11497 (b4_symbol_destructor, b4_symbol_printer): these.
11498 (yysymprint): Be sure to call YYPRINT only for tokens, and using
11499 user token numbers.
11500
87542d29
AD
115012002-06-20 Akim Demaille <akim@epita.fr>
11502
11503 * data/bison.simple (yydestructor): Rename as...
11504 (yydestruct): this.
11505
1a31ed21
AD
115062002-06-20 Akim Demaille <akim@epita.fr>
11507
11508 * src/symtab.h, src/symtab.c (symbol_type_set)
11509 (symbol_destructor_set, symbol_precedence_set): The location is
11510 the last argument.
11511 Adjust all callers.
11512
e776192e
AD
115132002-06-20 Akim Demaille <akim@epita.fr>
11514
11515 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
11516 internals.
11517 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
11518 Takes a location.
11519 * src/symtab.h, src/symtab.c (symbol_class_set)
11520 (symbol_user_token_number_set): Likewise.
11521 Adjust all callers.
11522 Promote complain_at.
11523 * tests/input.at (Type Clashes): Adjust.
11524
5c1180b3
AD
115252002-06-20 Akim Demaille <akim@epita.fr>
11526
11527 * data/bison.simple (YYLEX): Fix the declaration when
11528 %pure-parser.
11529
e3170060
AD
115302002-06-20 Akim Demaille <akim@epita.fr>
11531
11532 * data/bison.simple (yysymprint): Don't print the token number,
11533 just its name.
11534 * tests/actions.at (Destructors): Rename as...
11535 (Printers and Destructors): this.
11536 Also exercise %printer.
11537
253862fd
AD
115382002-06-20 Akim Demaille <akim@epita.fr>
11539
11540 * data/bison.simple (YYDSYMPRINT): New.
11541 Use it to remove many of the #if YYDEBUG/if (yydebug).
11542
366eea36
AD
115432002-06-20 Akim Demaille <akim@epita.fr>
11544
11545 * src/symtab.h, src/symtab.c (symbol_t): printer and
11546 printer_location are new members.
11547 (symbol_printer_set): New.
11548 * src/parse-gram.y (PERCENT_PRINTER): New token.
11549 Handle its associated rule.
11550 * src/scan-gram.l: Adjust.
11551 (handle_destructor_at, handle_destructor_dollar): Rename as...
11552 (handle_symbol_code_at, handle_symbol_code_dollar): these.
11553 * src/output.c (symbol_printers_output): New.
11554 (output_skeleton): Call it.
11555 * data/bison.simple (yysymprint): New. Cannot be named yyprint
11556 since there are already many grammar files with a user `yyprint'.
11557 Replace the calls to YYPRINT to calls to yysymprint.
11558 * tests/calc.at: Adjust.
11559 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
11560 taking advantage of parser very internal details (stack size!).
11561
4f25ebb0
AD
115622002-06-20 Akim Demaille <akim@epita.fr>
11563
11564 * src/scan-gram.l: Complete the scanner with the missing patterns
11565 to pacify Flex.
11566 Use `quote' and `symbol_tag_get' where appropriate.
11567
93b68a0e
AD
115682002-06-19 Akim Demaille <akim@epita.fr>
11569
11570 * tests/actions.at (Destructors): Augment to test locations.
11571 * data/bison.simple (yydestructor): Pass it the current location
11572 if locations are enabled.
11573 Prototype only when __STDC__ or C++.
11574 Change the argument names to move into the yy name space: there is
11575 user code here.
11576
58612f1d
AD
115772002-06-19 Akim Demaille <akim@epita.fr>
11578
74310291
AD
11579 * data/bison.simple (b4_pure_if): New.
11580 Use it instead of #ifdef YYPURE.
11581
115822002-06-19 Akim Demaille <akim@epita.fr>
11583
11584 * data/bison.simple (b4_location_if): New.
58612f1d
AD
11585 Use it instead of #ifdef YYLSP_NEEDED.
11586
f25bfb75
AD
115872002-06-19 Akim Demaille <akim@epita.fr>
11588
11589 Prepare @$ in %destructor, but currently don't bind it in the
11590 skeleton, as %location use is not cleaned up yet.
11591
11592 * src/scan-gram.l (handle_dollar, handle_destructor_at)
11593 (handle_action_at): New.
11594 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
11595 a braced_code_t and a location as additional arguments.
11596 (handle_destructor_dollar): Instead of requiring `b4_eval', just
11597 unquote one when outputting `b4_dollar_dollar'.
11598 Adjust callers.
11599 * data/bison.simple (b4_eval): Remove.
11600 (b4_symbol_destructor): Adjust.
11601 * tests/input.at (Invalid @n): Adjust.
11602
c732d2c6
AD
116032002-06-19 Zack Weinberg <zack@codesourcery.com>
11604
11605 * doc/bison.texinfo: Document ability to have multiple
11606 prologue sections.
11607
8c165d89
AD
116082002-06-18 Akim Demaille <akim@epita.fr>
11609
11610 * src/files.c (compute_base_names): When computing the output file
11611 names from the input file name, strip the directory part.
11612
ca98bf57
AD
116132002-06-18 Akim Demaille <akim@epita.fr>
11614
11615 * data/bison.simple.new: Comment changes.
11616 Reported by Andreas Schwab.
11617
0bfb02ff
AD
116182002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
11619
11620 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
11621 there are no `label `yyoverflowlab' defined but not used' warnings
11622 when yyoverflow is defined.
11623
24c0aad7
AD
116242002-06-18 Akim Demaille <akim@epita.fr>
11625
11626 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
11627 new member.
11628 (symbol_destructor_set): Adjust.
11629 * src/output.c (symbol_destructors_output): Output the destructor
11630 locations.
11631 Output the symbol name.
11632 * data/bison.simple (b4_symbol_destructor): Adjust.
11633
5719c109
AD
116342002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
11635 and Akim Demaille <akim@epita.fr>
11636
11637 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
11638 what's left on the stack when the error recovery hits EOF.
11639 * tests/actions.at (Destructors): Complete to exercise this case.
11640
9280d3ef
AD
116412002-06-17 Akim Demaille <akim@epita.fr>
11642
11643 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
11644 arguments is really empty, not only equal to `[]'.
11645 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
11646 member.
11647 (symbol_destructor_set): New.
11648 * src/output.c (symbol_destructors_output): New.
11649 * src/reader.h (brace_code_t, current_braced_code): New.
11650 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
11651 (handle_dollar): Rename as...
11652 (handle_action_dollar): this.
11653 (handle_destructor_dollar): New.
11654 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
11655 (grammar_declaration): Use it.
11656 * data/bison.simple (yystos): Is always defined.
11657 (yydestructor): New.
11658 * tests/actions.at (Destructors): New.
11659 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
11660
dafdc66f
AD
116612002-06-17 Akim Demaille <akim@epita.fr>
11662
11663 * src/symlist.h, src/symlist.c (symbol_list_length): New.
11664 * src/scan-gram.l (handle_dollar, handle_at): Compute the
11665 rule_length only when needed.
11666 * src/output.c (actions_output, token_definitions_output): Output
11667 the full M4 block.
11668 * src/symtab.c: Don't access directly to the symbol tag, use
11669 symbol_tag_get.
11670 * src/parse-gram.y: Use symbol_list_free.
11671
56c47203
AD
116722002-06-17 Akim Demaille <akim@epita.fr>
11673
11674 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
11675 (symbol_list_prepend, get_type_name): Move to...
11676 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
11677 (symbol_list_prepend, symbol_list_n_type_name_get): here.
11678 Adjust all callers.
11679 (symbol_list_free): New.
11680 * src/scan-gram.l (handle_dollar): Takes a location.
11681 * tests/input.at (Invalid $n): Adjust.
11682
1e0bab92
AD
116832002-06-17 Akim Demaille <akim@epita.fr>
11684
11685 * src/reader.h, src/reader.c (symbol_list_new): Export it.
11686 (symbol_list_prepend): New.
11687 * src/parse-gram.y (%union): `list' is a new member.
11688 (symbols.1): New, replaces...
11689 (terms_to_prec.1, nterms_to_type.1): these.
11690 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
11691 Take a location as additional argument.
11692 Adjust all callers.
11693
04e60654
AD
116942002-06-15 Akim Demaille <akim@epita.fr>
11695
11696 * src/parse-gram.y: Move %token in the declaration section so that
11697 we don't depend upon CVS Bison.
11698
10e5b8bd
AD
116992002-06-15 Akim Demaille <akim@epita.fr>
11700
11701 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
11702 * src/print.c (print_core): Use it.
11703
9801d40c
AD
117042002-06-15 Akim Demaille <akim@epita.fr>
11705
11706 * src/conflicts.c (log_resolution): Accept the rule involved in
11707 the sr conflicts instead of the lookahead number that points to
11708 that rule.
11709 (flush_reduce): Accept the current lookahead vector as argument,
11710 instead of the index in LA.
11711 (resolve_sr_conflict): Accept the current number of lookahead
11712 bitset to consider for the STATE, instead of the index in LA.
11713 (set_conflicts): Adjust.
11714 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
11715
c0263492
AD
117162002-06-15 Akim Demaille <akim@epita.fr>
11717
11718 * src/state.h (state_t): Replace the `lookaheadsp' member, a
11719 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
11720 Adjust all dependencies.
11721 * src/lalr.c (initialize_lookaheads): Split into...
11722 (states_lookaheads_count, states_lookaheads_initialize): these.
11723 (lalr): Adjust.
11724
9757c359
AD
117252002-06-15 Akim Demaille <akim@epita.fr>
11726
11727 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
11728 out of...
11729 (grammar_rules_print): here.
11730 * src/reduce.c (reduce_output): Use it.
11731 * tests/reduce.at (Useless Rules, Reduced Automaton)
11732 (Underivable Rules): Adjust.
11733
6b98e4b5
AD
117342002-06-15 Akim Demaille <akim@epita.fr>
11735
11736 Copy BYacc's nice way to report the grammar.
11737
11738 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
11739 New.
11740 Don't print the rules' location, it is confusing and useless.
11741 (rule_print): Use grammar_rhs_print.
11742 * src/print.c (print_grammar): Use grammar_rules_print.
11743
6b98e4b5
AD
117442002-06-15 Akim Demaille <akim@epita.fr>
11745
11746 Complete and rationalize `useless thing' warnings.
11747
11748 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
11749 (symbol_tag_print): New.
11750 Use them everywhere in place of accessing directly the tag member.
11751 * src/gram.h, src/gram.c (rule_print): New.
11752 Use it where a rule used to be printed `by hand'.
11753 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
11754 (reduce_grammar_tables): Report the useless rules.
11755 (reduce_print): Useless things are a warning, not an error.
11756 Report it as such.
11757 * tests/reduce.at (Useless Nonterminals, Useless Rules):
11758 (Reduced Automaton, Underivable Rules): Adjust.
11759 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
11760 * tests/conflicts.at (Unresolved SR Conflicts)
11761 (Solved SR Conflicts): Adjust.
11762
ee000ba4
AD
117632002-06-15 Akim Demaille <akim@epita.fr>
11764
11765 Let symbols have a location.
11766
11767 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
11768 (getsym): Adjust.
11769 Adjust all callers.
11770 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
11771 Use location_t, not int.
11772 * src/symtab.c (symbol_check_defined): Take advantage of the
11773 location.
11774 * tests/regression.at (Invalid inputs): Adjust.
11775
8efe435c
AD
117762002-06-15 Akim Demaille <akim@epita.fr>
11777
11778 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
11779 (input): Don't try to initialize yylloc here, do it in the
11780 scanner.
11781 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
11782 * src/gram.h (rule_t): Change line and action_line into location
11783 and action_location, of location_t type.
11784 Adjust all dependencies.
11785 * src/location.h, src/location.c (empty_location): New.
11786 * src/reader.h, src/reader.c (grammar_start_symbol_set)
11787 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
11788 (grammar_current_rule_symbol_append)
11789 (grammar_current_rule_action_append): Expect a location as argument.
11790 * src/reader.c (grammar_midrule_action): Adjust to attach an
11791 action's location as dummy symbol location.
11792 * src/symtab.h, src/symtab.c (startsymbol_location): New.
11793 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
11794 the line numbers.
11795
1921f1d7
AD
117962002-06-14 Akim Demaille <akim@epita.fr>
11797
11798 Grammar declarations may be found in the grammar section.
11799
11800 * src/parse-gram.y (rules_or_grammar_declaration): New.
11801 (declarations): Each declaration may end with a semicolon, not
11802 just...
11803 (grammar_declaration): `"%union"'.
11804 (grammar): Branch to rules_or_grammar_declaration.
11805
4515534c
AD
118062002-06-14 Akim Demaille <akim@epita.fr>
11807
11808 * src/main.c (main): Invoke scanner_free.
11809
f958596b
AD
118102002-06-14 Akim Demaille <akim@epita.fr>
11811
11812 * src/output.c (m4_invoke): Extracted from...
11813 (output_skeleton): here.
11814 Free tempfile.
11815
2c569025
AD
118162002-06-14 Akim Demaille <akim@epita.fr>
11817
11818 * src/parse-gram.y (directives, directive, gram)
11819 (grammar_directives, precedence_directives, precedence_directive):
11820 Rename as...
11821 (declarations, declaration, grammar, grammar_declaration)
11822 (precedence_declaration, precedence_declarator): these.
11823 (symbol_declaration): New.
11824
592e8d4d
AD
118252002-06-14 Akim Demaille <akim@epita.fr>
11826
11827 * src/files.c (action_obstack): Remove, unused.
11828 (output_obstack): Remove it, and all its dependencies, as it is no
11829 longer needed.
11830 * src/reader.c (epilogue_set): Build the epilogue in the
11831 muscle_obstack.
11832 * src/output.h, src/output.c (muscle_obstack): Move to...
11833 * src/muscle_tab.h, src/muscle_tab.h: here.
11834 (muscle_init): Initialize muscle_obstack.
11835 (muscle_free): New.
11836 * src/main.c (main): Call it.
11837
0c15323d
AD
118382002-06-14 Akim Demaille <akim@epita.fr>
11839
11840 * src/location.h: New, extracted from...
11841 * src/reader.h: here.
11842 * src/Makefile.am (noinst_HEADERS): Merge into
11843 (bison_SOURCES): this.
11844 Add location.h.
11845 * src/parse-gram.y: Use location_t instead of Bison's.
11846 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
11847 Use location_t instead of ints.
11848
e96c9728
AD
118492002-06-14 Akim Demaille <akim@epita.fr>
11850
11851 * data/bison.simple, data/bison.c++: Be sure to restore the
11852 current #line when returning to the skeleton contents after having
11853 exposed the input file's #line.
11854
75d1fe16
AD
118552002-06-12 Akim Demaille <akim@epita.fr>
11856
11857 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
11858 eager.
11859 * tests/actions.at (Exotic Dollars): New.
11860
6c35d22c
AD
118612002-06-12 Akim Demaille <akim@epita.fr>
11862
11863 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
11864 ['"/] too eagerly.
11865 * tests/input.at (Torturing the Scanner): New.
11866
1d6412ad
AD
118672002-06-11 Akim Demaille <akim@epita.fr>
11868
11869 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
11870 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
11871 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
11872 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
11873 * src/reader.c (reader): Use it.
11874
4cdb01db
AD
118752002-06-11 Akim Demaille <akim@epita.fr>
11876
11877 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
11878 Adjust all callers.
11879 (scanner_last_string_free): New.
11880
44995b2e
AD
118812002-06-11 Akim Demaille <akim@epita.fr>
11882
11883 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
11884 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
11885 (last_string, YY_OBS_FREE): New.
11886 Use them when returning an ID.
11887
e9955c83
AD
118882002-06-11 Akim Demaille <akim@epita.fr>
11889
11890 Have Bison grammars parsed by a Bison grammar.
11891
11892 * src/reader.c, src/reader.h (prologue_augment): New.
11893 * src/reader.c (copy_definition): Remove.
11894
11895 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
11896 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
11897 (grammar_current_rule_prec_set, grammar_current_rule_check)
11898 (grammar_current_rule_symbol_append)
11899 (grammar_current_rule_action_append): Export.
11900 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
11901 (symbol_list_action_append): Remove.
11902 Hook the routines from reader.
11903 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
11904 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
11905
11906 * src/reader.c (read_declarations): Remove, unused.
11907
11908 * src/parse-gram.y: Handle the epilogue.
11909 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
11910 (grammar_start_symbol_set): this.
11911 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
11912 * src/reader.c (readgram): Remove, unused.
11913 (reader): Adjust to insert eoftoken and axiom where appropriate.
11914
11915 * src/reader.c (copy_dollar): Replace with...
11916 * src/scan-gram.h (handle_dollar): this.
11917 * src/parse-gram.y: Remove `%thong'.
11918
11919 * src/reader.c (copy_at): Replace with...
11920 * src/scan-gram.h (handle_at): this.
11921
11922 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
11923 New.
11924
11925 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
11926 time being.
11927
11928 * src/reader.h, src/reader.c (grammar_rule_end): New.
11929
11930 * src/parse.y (current_type, current_class): New.
11931 Implement `%nterm', `%token' support.
11932 Merge `%term' into `%token'.
11933 (string_as_id): New.
11934 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
11935 type name.
11936
11937 * src/parse-gram.y: Be sure to handle properly the beginning of
11938 rules.
11939
11940 * src/parse-gram.y: Handle %type.
11941 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
11942
11943 * src/parse-gram.y: More directives support.
11944 * src/options.c: No longer handle source directives.
11945
11946 * src/parse-gram.y: Fix %output.
11947
11948 * src/parse-gram.y: Handle %union.
11949 Use the prologue locations.
11950 * src/reader.c (parse_union_decl): Remove.
11951
11952 * src/reader.h, src/reader.c (epilogue_set): New.
11953 * src/parse-gram.y: Use it.
11954
11955 * data/bison.simple, data/bison.c++: b4_stype is now either not
11956 defined, then default to int, or to the contents of %union,
11957 without `union' itself.
11958 Adjust.
11959 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
11960
11961 * src/output.c (actions_output): Don't output braces, as they are
11962 already handled by the scanner.
11963
11964 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
11965 characters to themselves.
11966
11967 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
11968 that the epilogue has a proper #line.
11969
11970 * src/parse-gram.y: Handle precedence/associativity.
11971
11972 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
11973 a terminal.
11974 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
11975 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
11976 at all to define terminals that cannot be emitted.
11977
11978 * src/scan-gram.l: Escape M4 characters.
11979
11980 * src/scan-gram.l: Working properly with escapes in user
11981 strings/characters.
11982
11983 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
11984 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
11985 grammar.
11986 Use more modest sizes, as for the time being the parser does not
11987 release memory, and therefore the process swallows a huge amount
11988 of memory.
11989
11990 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
11991 stricter %token grammar.
11992
11993 * src/symtab.h (associativity): Add `undef_assoc'.
11994 (symbol_precedence_set): Do nothing when passed an undef_assoc.
11995 * src/symtab.c (symbol_check_alias_consistence): Adjust.
11996
11997 * tests/regression.at (Invalid %directive): Remove, as it is now
11998 meaningless.
11999 (Invalid inputs): Adjust to the new error messages.
12000 (Token definitions): The new grammar doesn't allow too many
12001 eccentricities.
12002
12003 * src/lex.h, src/lex.c: Remove.
12004 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
12005 (copy_character, copy_string2, copy_string, copy_identifier)
12006 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
12007 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
12008 (parse_action): Remove.
12009 * po/POTFILES.in: Adjust.
12010
2e047461
AD
120112002-06-11 Akim Demaille <akim@epita.fr>
12012
cd05d13c 12013 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
12014 rule's action member: return the action as a string.
12015 Don't require `rule_length' as an argument: compute it.
12016 (grammar_current_rule_symbol_append)
12017 (grammar_current_rule_action_append): New, eved out from
12018 (readgram): here.
12019 Remove `action_flag', `rulelength', unused now.
12020
9af3fbce
AD
120212002-06-11 Akim Demaille <akim@epita.fr>
12022
12023 * src/reader.c (grammar_current_rule_prec_set).
12024 (grammar_current_rule_check): New, eved out from...
12025 (readgram): here.
12026 Remove `xaction', `first_rhs': useless.
12027 * tests/input.at (Type clashes): New.
12028 * tests/existing.at (GNU Cim Grammar): Adjust.
12029
1485e106
AD
120302002-06-11 Akim Demaille <akim@epita.fr>
12031
12032 * src/reader.c (grammar_midrule_action): New, Eved out from
12033 (readgram): here.
12034
da4160c3
AD
120352002-06-11 Akim Demaille <akim@epita.fr>
12036
12037 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
12038 New.
12039 (readgram): Use them as replacement of inlined code, crule and
12040 crule1.
12041
f6d0f937
AD
120422002-06-11 Akim Demaille <akim@epita.fr>
12043
12044 * src/reader.c (grammar_end, grammar_symbol_append): New.
12045 (readgram): Use them.
12046 Make the use of `p' as local as possible.
12047
69078d4b
AD
120482002-06-10 Akim Demaille <akim@epita.fr>
12049
12050 GCJ's parser requires the tokens to be defined before the prologue.
12051
12052 * data/bison.simple: Output the token definition before the user's
12053 prologue.
12054 * tests/regression.at (Braces parsing, Duplicate string)
12055 (Mixing %token styles): Check the output from bison.
12056 (Early token definitions): New.
12057
5e424082
AD
120582002-06-10 Akim Demaille <akim@epita.fr>
12059
12060 * src/symtab.c (symbol_user_token_number_set): Don't complain when
12061 assigning twice the same user number to a token, so that we can
12062 use it in...
12063 * src/lex.c (lex): here.
12064 Also use `symbol_class_set' instead of hand written code.
12065 * src/reader.c (parse_assoc_decl): Likewise.
12066
44536b35
AD
120672002-06-10 Akim Demaille <akim@epita.fr>
12068
12069 * src/symtab.c, src/symtab.c (symbol_class_set)
12070 (symbol_user_token_number_set): New.
12071 * src/reader.c (parse_token_decl): Use them.
12072 Use a switch instead of ifs.
12073 Use a single argument.
12074
8b9f2372
AD
120752002-06-10 Akim Demaille <akim@epita.fr>
12076
12077 Remove `%thong' support as it is undocumented, unused, duplicates
12078 `%token's job, and creates useless e-mail traffic with people who
12079 want to know what it is, why it is undocumented, unused, and
12080 duplicates `%token's job.
12081
12082 * src/reader.c (parse_thong_decl): Remove.
12083 * src/options.c (option_table): Remove "thong".
12084 * src/lex.h (tok_thong): Remove.
12085
3ae2b51f
AD
120862002-06-10 Akim Demaille <akim@epita.fr>
12087
12088 * src/symtab.c, src/symtab.c (symbol_type_set)
12089 (symbol_precedence_set): New.
12090 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
12091 (value_components_used): Remove, unused.
12092
2f1afb73
AD
120932002-06-09 Akim Demaille <akim@epita.fr>
12094
12095 Move symbols handling code out of the reader.
12096
12097 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
12098 (axiom): Move to...
12099 * src/symtab.h, src/symtab.c: here.
12100
12101 * src/gram.c (start_symbol): Remove: use startsymbol->number.
12102 * src/reader.c (startval): Rename as...
12103 * src/symtab.h, src/symtab.c (startsymbol): this.
12104 * src/reader.c: Adjust.
12105
12106 * src/reader.c (symbol_check_defined, symbol_make_alias)
12107 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
12108 (token_translations_init)
12109 Move to...
12110 * src/symtab.c: here.
12111 * src/reader.c (packsymbols): Move to...
12112 * src/symtab.h, src/symtab.c (symbols_pack): here.
12113 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
12114 argument.
12115
e9bca3ad
AD
121162002-06-03 Akim Demaille <akim@epita.fr>
12117
12118 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
12119 then statements.
12120
86eff183
AD
121212002-06-03 Akim Demaille <akim@epita.fr>
12122
12123 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
12124 structs with non literals.
12125 * src/scan-skel.l: never-interactive.
12126 * src/conflicts.c (enum conflict_resolution_e): No trailing
12127 comma.
12128 * src/getargs.c (usage): Split long literal strings.
12129 Reported by Hans Aberg.
12130
717be197
AD
121312002-05-28 Akim Demaille <akim@epita.fr>
12132
12133 * data/bison.c++: Use C++ ostreams.
12134 (cdebug_): New member.
12135
670ddffd
AD
121362002-05-28 Akim Demaille <akim@epita.fr>
12137
12138 * src/output.c (output_skeleton): Be sure to allocate enough room
12139 for `/' _and_ for `\0' in full_skeleton.
12140
769b430f
AD
121412002-05-28 Akim Demaille <akim@epita.fr>
12142
12143 * data/bison.c++: Catch up with bison.simple:
12144 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12145 and Paul Eggert <eggert@twinsun.com>: `error' handing.
12146 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
12147 and popping traces.
12148
7067cb36
PH
121492002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12150
12151 * src/output.c (output_skeleton): Put an explicit path in front of
12152 the skeleton file name, rather than relying on the -I directory,
12153 to partially alleviate effects of having a skeleton file lying around
12154 in the current directory.
769b430f 12155
4a713ec2
PH
121562002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12157
769b430f 12158 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
12159 obstack_printf should be obstack_fgrow1.
12160
b408954b
AD
121612002-05-26 Akim Demaille <akim@epita.fr>
12162
12163 * src/state.h (state_t): `solved_conflicts' is a new member.
12164 * src/LR0.c (new_state): Set it to 0.
12165 * src/conflicts.h, src/conflicts.c (print_conflicts)
12166 (free_conflicts, solve_conflicts): Rename as...
12167 (conflicts_print, conflicts_free, conflicts_solve): these.
12168 Adjust callers.
12169 * src/conflicts.c (enum conflict_resolution_e)
12170 (solved_conflicts_obstack): New, used by...
12171 (log_resolution): this.
12172 Adjust to attach the conflict resolution to each state.
12173 Complete the description with the precedence/associativity
12174 information.
12175 (resolve_sr_conflict): Adjust.
12176 * src/print.c (print_state): Output its solved_conflicts.
12177 * tests/conflicts.at (Unresolved SR Conflicts)
12178 (Solved SR Conflicts): Exercise --report=all.
12179
a49aecd5
AD
121802002-05-26 Akim Demaille <akim@epita.fr>
12181
12182 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
12183 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
12184 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
12185 (token_number_t, item_number_as_token_number)
12186 (token_number_as_item_number, muscle_insert_token_number_table):
12187 Rename as...
12188 (symbol_number_t, item_number_as_symbol_number)
12189 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
12190 these, since it is more appropriate.
12191
5504898e
AD
121922002-05-26 Akim Demaille <akim@epita.fr>
12193
12194 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
12195 `Error:' lines.
12196 * data/bison.simple (yystos) [YYDEBUG]: New.
12197 (yyparse) [YYDEBUG]: Display the symbols which are popped during
12198 error recovery.
12199 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
12200
ec3bc396
AD
122012002-05-25 Akim Demaille <akim@epita.fr>
12202
12203 * doc/bison.texinfo (Debugging): Split into...
12204 (Tracing): this new section, its former contents, and...
12205 (Understanding): this new section.
12206 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
12207 by...
12208 (report_flag): this.
12209 Adjust all dependencies.
12210 (report_args, report_types, report_argmatch): New.
12211 (usage, getargs): Report/support -r, --report.
12212 * src/options.h
12213 (struct option_table_struct): Rename as..,
12214 (struct option_table_s): this.
12215 Rename the `set_flag' member to `flag' to match with getopt_long's
12216 struct.
12217 * src/options.c (option_table): Split verbose into an entry for
12218 %verbose, and another for --verbose.
12219 Support --report/-r, so remove -r from the obsolete --raw.
12220 * src/print.c: Attach full item sets and lookaheads reports to
12221 report_flag instead of trace_flag.
12222 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
12223
78df8250
PE
122242002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12225 and Paul Eggert <eggert@twinsun.com>
769b430f 12226
78df8250
PE
12227 * data/bison.simple (yyparse): Correct error handling to conform to
12228 POSIX and yacc. Specifically, after syntax error is discovered,
12229 do not reduce further before shifting the error token.
12230 Clean up the code a bit by removing the labels yyerrdefault,
12231 yyerrhandle, yyerrpop.
12232 * NEWS: Document the above.
12233
c0c9ea05
PH
122342002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12235
12236 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
12237 type; it isn't always big enough, since it doesn't necessarily
12238 include non-terminals.
769b430f 12239 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
12240 the latter can be removed.
12241 (yy_token_number_type): Remove, only one use.
12242 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
12243 don't use TokenNumberType as element type.
769b430f 12244
c0c9ea05
PH
12245 * tests/regression.at: Modify expected output to agree with change
12246 to yyr1 and yytranslate.
769b430f 12247
6390a83f
FK
122482002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
12249
12250 * src/reader.c (parse_action): Use copy_character instead of
12251 obstack_1grow.
12252
db7c8e9a
AD
122532002-05-13 Akim Demaille <akim@epita.fr>
12254
12255 * tests/regression.at (Token definitions): Prototype yylex and
12256 yyerror.
12257
fcc61800
PH
122582002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12259
158c687b 12260 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
12261 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
12262 32-bit arithmetic.
12263 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
12264
5683e9b2
AD
122652002-05-07 Akim Demaille <akim@epita.fr>
12266
12267 * tests/synclines.at: Be sure to prototype yylex and yyerror to
12268 avoid GCC warnings.
12269
0c2d3f4c
AD
122702002-05-07 Akim Demaille <akim@epita.fr>
12271
12272 Kill GCC warnings.
12273
12274 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
12275 over the RHS of each rule.
12276 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
12277 * src/state.h (state_t): Member `nitems' is unsigned short.
12278 * src/LR0.c (get_state): Adjust.
12279 * src/reader.c (packgram): Likewise.
12280 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
12281 `Type'.
12282 (muscle_insert_int_table): Remove, unused.
12283 (prepare_rules): Remove `max'.
12284
1565b720
AD
122852002-05-06 Akim Demaille <akim@epita.fr>
12286
12287 * src/closure.c (print_firsts): Display of the symbol tags.
12288 (bitmatrix_print): Move to...
12289 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
12290 here.
12291 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
12292
cfaee611
AD
122932002-05-06 Akim Demaille <akim@epita.fr>
12294
12295 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
12296 hash_do_for_each.
12297
458be8e0
AD
122982002-05-06 Akim Demaille <akim@epita.fr>
12299
12300 * src/LR0.c (new_state, get_state): Instead of using the global
12301 `kernel_size' and `kernel_base', have two new arguments:
12302 `core_size' and `core'.
12303 Adjust callers.
12304
a900a624
AD
123052002-05-06 Akim Demaille <akim@epita.fr>
12306
12307 * src/reader.c (packgram): No longer end `ritem' with a 0
12308 sentinel: it is not used.
12309
d4e7d3a1
AD
123102002-05-05 Akim Demaille <akim@epita.fr>
12311
12312 New experimental feature: display the lookaheads in the report and
12313 graph.
12314
12315 * src/print (print_core): When --trace-flag, display the rules
12316 lookaheads.
12317 * src/print_graph.c (print_core): Likewise.
12318 Swap the arguments.
12319 Adjust caller.
12320
39ceb25b
AD
123212002-05-05 Akim Demaille <akim@epita.fr>
12322
12323 * tests/torture.at (Many lookaheads): New test.
12324
5372019f
AD
123252002-05-05 Akim Demaille <akim@epita.fr>
12326
12327 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
12328 (GENERATE_MUSCLE_INSERT_TABLE): this.
12329 (output_int_table, output_unsigned_int_table, output_short_table)
12330 (output_token_number_table, output_item_number_table): Replace with...
12331 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
12332 (muscle_insert_short_table, muscle_insert_token_number_table)
12333 (muscle_insert_item_number_table): these.
12334 Adjust all callers.
12335 (prepare_tokens): Don't free `translations', since...
12336 * src/reader.h, src/reader.c (grammar_free): do it.
12337 Move to...
12338 * src/gram.h, src/gram.c (grammar_free): here.
12339 * data/bison.simple, data/bison.c++: b4_token_number_max is now
12340 b4_translate_max.
12341
5df5f6d5
AD
123422002-05-05 Akim Demaille <akim@epita.fr>
12343
12344 * src/output.c (output_unsigned_int_table): New.
12345 (prepare_rules): `i' is unsigned.
12346 `prhs', `rline', `r2' are unsigned int.
12347 Rename muscle `rhs_number_max' as `rhs_max'.
12348 Output muscles `prhs_max', `rline_max', and `r2_max'.
12349 Free rline and r1.
12350 * data/bison.simple, data/bison.c++: Adjust to use these muscles
12351 to compute types instead of constant types.
12352 * tests/regression.at (Web2c Actions): Adjust.
12353
b87f8b21
AD
123542002-05-04 Akim Demaille <akim@epita.fr>
12355
12356 * src/symtab.h (SALIAS, SUNDEF): Rename as...
12357 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
12358 Adjust dependencies.
12359 * src/output.c (token_definitions_output): Be sure not to output a
12360 `#define 'a'' when fed with `%token 'a' "a"'.
12361 * tests/regression.at (Token definitions): New.
12362
8bb936e4
PE
123632002-05-03 Paul Eggert <eggert@twinsun.com>
12364
12365 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
12366 for K&R C.
12367
123682002-05-03 gettextize <bug-gnu-gettext@gnu.org>
12369
12370 * Makefile.am (SUBDIRS): Remove intl.
12371 (EXTRA_DIST): Add config/config.rpath.
12372
53c71a12
AD
123732002-05-03 Akim Demaille <akim@epita.fr>
12374
12375 * data/bison.simple (m4_if): Don't output empty enums.
12376 And actually, output valid enum definitions :(.
12377
289dd0cf
AD
123782002-05-03 Akim Demaille <akim@epita.fr>
12379
12380 * configure.bat: Remove, completely obsolete.
12381 * Makefile.am (EXTRA_DIST): Adjust.
12382 Don't distribute config.rpath...
12383 * config/Makefile.am (EXTRA_DIST): Do it.
12384
db85e524
AD
123852002-05-03 Akim Demaille <akim@epita.fr>
12386
12387 * configure.in (GETTEXT_VERSION): New.
12388 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
12389
83ccf991
AD
123902002-05-03 Akim Demaille <akim@epita.fr>
12391
12392 * data/bison.simple (b4_token_enum): New.
12393 (b4_token_defines): Use it to output tokens both as #define and
12394 enums.
12395 Suggested by Paul Eggert.
12396 * src/output.c (token_definitions_output): Don't output spurious
12397 white spaces.
12398
1f418995
AD
123992002-05-03 Akim Demaille <akim@epita.fr>
12400
12401 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
12402
45119f04
RA
124032002-05-02 Robert Anisko <robert@lrde.epita.fr>
12404
12405 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
12406 Update the stack class, give a try to deque as the default container.
12407
b2d52318
AD
124082002-05-02 Akim Demaille <akim@epita.fr>
12409
12410 * data/bison.simple (yyparse): Do not implement @$ = @1.
12411 (YYLLOC_DEFAULT): Adjust to do it.
12412 * doc/bison.texinfo (Location Default Action): Fix.
12413
3a8b4109
AD
124142002-05-02 Akim Demaille <akim@epita.fr>
12415
12416 * src/reader.c (parse_braces): Merge into...
12417 (parse_action): this.
12418
84614e13
AD
124192002-05-02 Akim Demaille <akim@epita.fr>
12420
12421 * configure.in (ALL_LINGUAS): Remove.
12422 * po/LINGUAS, hr.po: New.
12423
fdbcd8e2
AD
124242002-05-02 Akim Demaille <akim@epita.fr>
12425
12426 Remove the so called hairy (semantic) parsers.
12427
12428 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
12429 * src/gram.h, src/gram.c (semantic_parser): Remove.
12430 (rule_t): Remove the guard and guard_line members.
12431 * src/lex.h (token_t): remove tok_guard.
12432 * src/options.c (option_table): Remove %guard and %semantic_parser
12433 support.
12434 * src/output.c, src/output.h (guards_output): Remove.
12435 (prepare): Adjust.
12436 (token_definitions_output): Don't output the `T'
12437 tokens (???).
12438 (output_skeleton): Don't output the guards.
12439 * src/files.c, src/files.c (attrsfile): Remove.
12440 * src/reader.c (symbol_list): Remove the guard and guard_line
12441 members.
12442 Adjust dependencies.
12443 (parse_guard): Remove.
12444 * data/bison.hairy: Remove.
12445 * doc/bison.texinfo (Environment Variables): Remove occurrences of
12446 BISON_HAIRY.
12447
82b6cb3f
AD
124482002-05-02 Akim Demaille <akim@epita.fr>
12449
12450 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
12451 (parse_guard): Rename the formal argument `stack_offset' as
12452 `rule_length', which is more readable.
12453 Adjust callers.
12454 (copy_at, copy_dollar): Instead of outputting the hard coded
12455 values of $$, $n and so forth, output invocation to b4_lhs_value,
12456 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
12457 Note: this patch partially drops `semantic-parser' support: it
12458 always does `rule_length - n', where semantic parsers ought to
12459 always use `-n'.
82b6cb3f
AD
12460 * data/bison.simple, data/bison.c++ (b4_lhs_value)
12461 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
12462
6cbfbcc5
AD
124632002-05-02 Akim Demaille <akim@epita.fr>
12464
12465 * configure.in (AC_INIT): Bump to 1.49b.
12466 (AM_INIT_AUTOMAKE): Short invocation.
12467
b8548114
AD
124682002-05-02 Akim Demaille <akim@epita.fr>
12469
12470 Version 1.49a.
12471
c20cd1fa
AD
124722002-05-01 Akim Demaille <akim@epita.fr>
12473
12474 * src/skeleton.h: Remove.
12475
8a9566d4
AD
124762002-05-01 Akim Demaille <akim@epita.fr>
12477
12478 * src/skeleton.h: Fix the #endif.
12479 Reported by Magnus Fromreide.
12480
8c6d399a
PE
124812002-04-26 Paul Eggert <eggert@twinsun.com>
12482
12483 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
12484 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 12485 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 12486
2b7ed18a
RA
124872002-04-25 Robert Anisko <robert@lrde.epita.fr>
12488
12489 * src/scan-skel.l: Postprocess quadrigraphs.
12490
12491 * src/reader.c (copy_character): New function, used to output
12492 single characters while replacing `[' and `]' with quadrigraphs, to
12493 avoid troubles with M4 quotes.
12494 (copy_comment): Output characters with copy_character.
12495 (read_additionnal_code): Likewise.
12496 (copy_string2): Likewise.
12497 (copy_definition): Likewise.
12498
12499 * tests/calc.at: Exercise M4 quoting.
12500
34a89c50
AD
125012002-04-25 Akim Demaille <akim@epita.fr>
12502
12503 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
12504 between `!' and the command.
12505 Reported by Paul Eggert.
12506
0dd1580a
RA
125072002-04-24 Robert Anisko <robert@lrde.epita.fr>
12508
12509 * tests/calc.at: Exercise prologue splitting.
12510
12511 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
12512 `b4_post_prologue' instead of `b4_prologue'.
12513
12514 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
12515 muscles.
12516 (output): Free pre_prologue_obstack and post_prologue_obstack.
12517 * src/files.h, src/files.c (attrs_obstack): Remove.
12518 (pre_prologue_obstack, post_prologue_obstack): New.
12519 * src/reader.c (copy_definition): Add a parameter to specify the
12520 obstack to fill, instead of using attrs_obstack unconditionally.
12521 (read_declarations): Pass pre_prologue_obstack to copy_definition if
12522 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
12523
83c1796f
PE
125242002-04-23 Paul Eggert <eggert@twinsun.com>
12525
12526 * data/bison.simple: Remove unnecessary commentary and white
12527 space differences from 1_29-branch.
12528 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
12529
12530 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
12531 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
12532 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
12533 constructors or destructors.
12534
12535 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
12536
1207eeac
AD
125372002-04-23 Akim Demaille <akim@epita.fr>
12538
12539 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
12540 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
12541 location with columns.
12542 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
12543 All reported by Paul Eggert.
12544
78ab8f67
AD
125452002-04-22 Akim Demaille <akim@epita.fr>
12546
12547 * src/reduce.c (dump_grammar): Move to...
12548 * src/gram.h, src/gram.c (grammar_dump): here.
12549 Be sure to separate long item numbers.
12550 Don't read the members of a rule's prec if its nil.
12551
133c20e2
AD
125522002-04-22 Akim Demaille <akim@epita.fr>
12553
12554 * src/output.c (table_size, table_grow): New.
12555 (MAXTABLE): Remove, replace uses with table_size.
12556 (pack_vector): Instead of dying when the table is too big, grow it.
12557
9515e8a7
AD
125582002-04-22 Akim Demaille <akim@epita.fr>
12559
12560 * data/bison.simple (yyr1): Its type is that of a token number.
12561 * data/bison.c++ (r1_): Likewise.
12562 * tests/regression.at (Web2c Actions): Adjust.
12563
23c5a174
AD
125642002-04-22 Akim Demaille <akim@epita.fr>
12565
12566 * src/reader.c (token_translations_init): 256 is now the default
12567 value for the error token, i.e., it will be assigned another
12568 number if the user assigned 256 to one of her tokens.
12569 (reader): Don't force 256 to error.
12570 * doc/bison.texinfo (Symbols): Adjust.
12571 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
12572 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
12573 etc. instead of 10, 20, 30 (which was used to `jump' over error
12574 (256) and undefined (2)).
12575
5fbb0954
AD
125762002-04-22 Akim Demaille <akim@epita.fr>
12577
12578 Propagate more token_number_t.
12579
12580 * src/gram.h (token_number_as_item_number)
12581 (item_number_as_token_number): New.
12582 * src/output.c (GENERATE_OUTPUT_TABLE): New.
12583 Use it to create output_item_number_table and
12584 output_token_number_table.
12585 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
12586 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
12587 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
12588 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
12589
4f940944
AD
125902002-04-22 Akim Demaille <akim@epita.fr>
12591
12592 * src/output.h, src/output.c (get_lines_number): Remove.
12593
3ded9a63
AD
125942002-04-19 Akim Demaille <akim@epita.fr>
12595
12596 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
12597 as Lex/Flex'.
12598 (Debugging): More details about enabling the debugging features.
12599 (Table of Symbols): Describe $$, $n, @$, and @n.
12600 Suggested by Tim Josling.
12601
e0c471a9
AD
126022002-04-19 Akim Demaille <akim@epita.fr>
12603
12604 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
12605
fecc10cd
AD
126062002-04-10 Akim Demaille <akim@epita.fr>
12607
12608 * src/system.h: Rely on HAVE_LIMITS_H.
12609 Suggested by Paul Eggert.
12610
51dec47b
AD
126112002-04-09 Akim Demaille <akim@epita.fr>
12612
12613 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
12614 full stderr, and strip it according to the bison options, instead
12615 of composing the error message from different bits.
12616 This makes it easier to check for several error messages.
12617 Adjust all the invocations.
12618 Add an invocation exercising the error token.
12619 Add an invocation demonstrating a stupid error message.
12620 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
12621 Adjust the tests.
12622 Error message are for stderr, not stdout.
12623
007a50a4
AD
126242002-04-09 Akim Demaille <akim@epita.fr>
12625
12626 * src/gram.h, src/gram.c (error_token_number): Remove, use
12627 errtoken->number.
12628 * src/reader.c (reader): Don't specify the user token number (2)
12629 for $undefined, as it uselessly prevents using it.
12630 * src/gram.h (token_number_t): Move to...
12631 * src/symtab.h: here.
12632 (state_t.number): Is a token_number_t.
12633 * src/print.c, src/reader.c: Use undeftoken->number instead of
12634 hard coded 2.
12635 (Even though this 2 is not the same as above: the number of the
12636 undeftoken remains being 2, it is its user token number which
12637 might not be 2).
12638 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
12639 `user_token_number_max'.
12640 Output `undef_token_number'.
12641 * data/bison.simple, data/bison.c++: Use them.
12642 Be sure to map invalid yylex return values to
12643 `undef_token_number'. This saves us from gratuitous SEGV.
12644
12645 * tests/conflicts.at (Solved SR Conflicts)
12646 (Unresolved SR Conflicts): Adjust.
12647 * tests/regression.at (Web2c Actions): Adjust.
12648
06446ccf
AD
126492002-04-08 Akim Demaille <akim@epita.fr>
12650
12651 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
12652 Adding #line.
12653 Remove the duplicate `typedefs'.
12654 (RhsNumberType): Fix the declaration and various other typos.
12655 Use __ofile__.
12656 * data/bison.simple: Use __ofile__.
12657 * src/scan-skel.l: Handle __ofile__.
12658
62a3e4f0
AD
126592002-04-08 Akim Demaille <akim@epita.fr>
12660
12661 * src/gram.h (item_number_t): New, the type of item numbers in
12662 RITEM. Note that it must be able to code symbol numbers as
12663 positive number, and the negation of rule numbers as negative
12664 numbers.
12665 Adjust all dependencies (pretty many).
12666 * src/reduce.c (rule): Remove this `short *' pointer: use
12667 item_number_t.
12668 * src/system.h (MINSHORT, MAXSHORT): Remove.
12669 Include `limits.h'.
12670 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
12671 (shortcpy): Remove.
12672 (MAXTABLE): Move to...
12673 * src/output.c (MAXTABLE): here.
12674 (prepare_rules): Use output_int_table to output rhs.
12675 * data/bison.simple, data/bison.c++: Adjust.
12676 * tests/torture.at (Big triangle): Move the limit from 254 to
12677 500.
12678 * tests/regression.at (Web2c Actions): Ajust.
12679
12680 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
12681 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
12682 passes, but produces negative #line number, once fixed, GCC is
12683 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
12684 C), it passes.
12685 * src/state.h (state_h): Code input lines on ints, not shorts.
12686
bb88b0fc
AD
126872002-04-08 Akim Demaille <akim@epita.fr>
12688
12689 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
12690 and then the grammar.
12691
9a636f47
AD
126922002-04-08 Akim Demaille <akim@epita.fr>
12693
12694 * src/system.h: No longer using strndup.
12695
680e8701
AD
126962002-04-07 Akim Demaille <akim@epita.fr>
12697
12698 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
12699 * src/output.c (output_table_data): Return the longest number.
12700 (prepare_tokens): Output `token_number_max').
12701 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
12702 New.
12703 Use them to define yy_token_number_type/TokenNumberType.
12704 Use this type for yytranslate.
12705 * tests/torture.at (Big triangle): Push the limit from 124 to
12706 253.
12707 * tests/regression.at (Web2c Actions): Adjust.
12708
817e9f41
AD
127092002-04-07 Akim Demaille <akim@epita.fr>
12710
12711 * tests/torture.at (Big triangle): New.
12712 (GNU AWK Grammar, GNU Cim Grammar): Move to...
12713 * tests/existing.at: here.
12714
5123689b
AD
127152002-04-07 Akim Demaille <akim@epita.fr>
12716
12717 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
12718 nritems.
12719 Adjust dependencies.
12720
f3849179
AD
127212002-04-07 Akim Demaille <akim@epita.fr>
12722
12723 * src/reader.c: Normalize increments to prefix form.
12724
bd02036a
AD
127252002-04-07 Akim Demaille <akim@epita.fr>
12726
12727 * src/reader.c, symtab.c: Remove debugging code.
12728
db8837cb
AD
127292002-04-07 Akim Demaille <akim@epita.fr>
12730
12731 Rename all the `bucket's as `symbol_t'.
12732
12733 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
12734 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
12735 * src/symtab.c, src/symtab.h (bucket): Rename as...
12736 (symbol_t): this.
12737 (symbol_list_new, bucket_check_defined, bucket_make_alias)
12738 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
12739 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
12740 (buckets_new, buckets_free, buckets_do): Rename as...
12741 (symbol_list_new, symbol_check_defined, symbol_make_alias)
12742 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
12743 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
12744 (symbols_new, symbols_free, symbols_do): these.
12745
72a23c97
AD
127462002-04-07 Akim Demaille <akim@epita.fr>
12747
12748 Use lib/hash for the symbol table.
12749
12750 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
12751 EOF.
12752 * src/lex.c (lex): Set the `number' member of new terminals.
12753 * src/reader.c (bucket_check_defined, bucket_make_alias)
12754 (bucket_check_alias_consistence, bucket_translation): New.
12755 (reader, grammar_free, readgram, token_translations_init)
12756 (packsymbols): Adjust.
12757 (reader): Number the predefined tokens.
12758 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
12759 for predefined tokens.
12760 * src/symtab.h (bucket): Remove all the hash table related
12761 members.
12762 * src/symtab.c (symtab): Replace by...
12763 (bucket_table): this.
12764 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
12765 (buckets_new, buckets_do): New.
12766
280a38c3
AD
127672002-04-07 Akim Demaille <akim@epita.fr>
12768
12769 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
12770 (start_symbol, max_user_token_number, semantic_parser)
12771 (error_token_number): Initialize.
12772 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
12773 Initialize.
12774 (reader): Don't.
12775 (errtoken, eoftoken, undeftoken, axiom): Extern.
12776
03b31c0c
AD
127772002-04-07 Akim Demaille <akim@epita.fr>
12778
12779 * src/gram.h (rule_s): prec and precsym are now pointers
12780 to the bucket giving the priority/associativity.
12781 Member `associativity' removed: useless.
12782 * src/reduce.c, src/conflicts.c: Adjust.
12783
8b3df748
AD
127842002-04-07 Akim Demaille <akim@epita.fr>
12785
12786 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
12787 Properly escape the symbols' TAG when outputting them.
12788
e601aa1d
AD
127892002-04-07 Akim Demaille <akim@epita.fr>
12790
12791 * src/lalr.h (LA): Is a bitsetv, not bitset*.
12792
b0299a2e
AD
127932002-04-07 Akim Demaille <akim@epita.fr>
12794
12795 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
12796 (LArule): this, which is an array to rule_t*.
12797 * src/print.c, src/conflicts.c: Adjust.
12798
d7e1f00c
AD
127992002-04-07 Akim Demaille <akim@epita.fr>
12800
12801 * src/gram.h (rule_t): Rename `number' as `user_number'.
12802 `number' is a new member.
12803 Adjust dependencies.
12804 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
12805
cc9305dd
AD
128062002-04-07 Akim Demaille <akim@epita.fr>
12807
12808 As a result of the previous patch, it is no longer needed
12809 to reorder ritem itself.
12810
12811 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
12812
b0940840
AD
128132002-04-07 Akim Demaille <akim@epita.fr>
12814
12815 Be sure never to walk through RITEMS, but use only data related to
12816 the rules themselves. RITEMS should be banished.
12817
12818 * src/output.c (output_token_translations): Rename as...
12819 (prepare_tokens): this.
12820 In addition to `translate', prepare the muscles `tname' and
12821 `toknum', which were handled by...
12822 (output_rule_data): this.
12823 Remove, and move the remainder of its outputs into...
12824 (prepare_rules): this new routines, which also merges content from
12825 (output_gram): this.
12826 (prepare_rules): Be sure never to walk through RITEMS.
12827 (output_stos): Rename as...
12828 (prepare_stos): this.
12829 (output): Always invoke prepare_states, after all, just don't use it
12830 in the output if you don't need it.
12831
643a5994
AD
128322002-04-07 Akim Demaille <akim@epita.fr>
12833
12834 * src/LR0.c (new_state): Display `nstates' as the name of the
12835 newly created state.
12836 Adjust to initialize first_state and last_state if needed.
12837 Be sure to distinguish the initial from the final state.
12838 (new_states): Create the itemset of the initial state, and use
12839 new_state.
12840 * src/closure.c (closure): Now that the initial state has its
12841 items properly set, there is no need for a special case when
12842 creating `ruleset'.
12843
12844 As a result, now the rule 0, reducing to $axiom, is visible in the
12845 outputs. Adjust the test suite.
12846
12847 * tests/conflicts.at (Solved SR Conflicts)
12848 (Unresolved SR Conflicts): Adjust.
12849 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
12850 * tests/conflicts.at (S/R in initial): New.
12851
b4c4ccc2
AD
128522002-04-07 Akim Demaille <akim@epita.fr>
12853
12854 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
12855 the RHS of the rules.
12856 * src/output.c (output_gram): Likewise.
12857
bba97eb2
AD
128582002-04-07 Akim Demaille <akim@epita.fr>
12859
12860 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
12861 bucket.
12862 Adjust all dependencies.
12863 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
12864 `number' of the buckets too.
12865 * src/gram.h: Include `symtab.h'.
12866 (associativity): Move to...
12867 * src/symtab.h: here.
12868 No longer include `gram.h'.
12869
c3b407f4
AD
128702002-04-07 Akim Demaille <akim@epita.fr>
12871
12872 * src/gram.h, src/gram.c (rules_rhs_length): New.
12873 (ritem_longest_rhs): Use it.
12874 * src/gram.h (rule_t): `number' is a new member.
12875 * src/reader.c (packgram): Set it.
12876 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
12877 the end of `rules', and count them out of `nrules'.
12878 (reduce_output, dump_grammar): Adjust.
12879 * src/print.c (print_grammar): It is no longer needed to check for
12880 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
12881 * tests/reduce.at (Reduced Automaton): New test.
12882
11652ab3
AD
128832002-04-07 Akim Demaille <akim@epita.fr>
12884
12885 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
12886 lacking `+ 1' to nrules, Bison reported as useless a token if it
12887 was used solely to set the precedence of the last rule...
12888
26b23c1a
AD
128892002-04-07 Akim Demaille <akim@epita.fr>
12890
12891 * data/bison.c++, data/bison.simple: Don't output the current file
12892 name in #line, to avoid useless diffs between two identical
12893 outputs under different names.
12894
18bcecb0
AD
128952002-04-07 Akim Demaille <akim@epita.fr>
12896
12897 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
12898 Normalize loops to using `< nrules + 1', not `<= nrules'.
12899
fa770c86
AD
129002002-04-07 Akim Demaille <akim@epita.fr>
12901
12902 * TODO: Update.
12903
d9b739c3
AD
129042002-04-07 Akim Demaille <akim@epita.fr>
12905
12906 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
12907 bucket.value as bucket.number.
12908
99013900
AD
129092002-04-07 Akim Demaille <akim@epita.fr>
12910
12911 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
12912 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
12913 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
12914 RHS, instead of being an index in RITEMS.
12915
e966383b
PE
129162002-04-04 Paul Eggert <eggert@twinsun.com>
12917
12918 * doc/bison.texinfo: Update copyright date.
12919 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
12920 (Symbols): Warn about running Bison in one character set,
12921 but compiling and/or running in an incompatible one.
12922 Warn about character code 256, too.
12923
129242002-04-03 Paul Eggert <eggert@twinsun.com>
12925
12926 * src/bison.data (YYSTACK_ALLOC): Depend on whether
12927 YYERROR_VERBOSE is nonzero, not whether it is defined.
12928
12929 Merge changes from bison-1_29-branch.
c307773e 12930
8d6c48b9
PE
129312002-03-20 Paul Eggert <eggert@twinsun.com>
12932
12933 Merge fixes from Debian bison_1.34-1.diff.
12934
12935 * configure.in (AC_PREREQ): 2.53.
12936
e53c6322
AD
129372002-03-20 Akim Demaille <akim@epita.fr>
12938
12939 * src/conflicts.c (log_resolution): Argument `resolution' is const.
12940
9ffbeca7
PE
129412002-03-19 Paul Eggert <eggert@twinsun.com>
12942
21db0b2a
PE
12943 * src/bison.simple (YYCOPY): New macro.
12944 (YYSTACK_RELOCATE): Use it.
12945 Remove Type arg; no longer needed. All callers changed.
12946 (yymemcpy): Remove; no longer needed.
12947
9ffbeca7
PE
12948 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
12949 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
12950
642cb8f8
AD
129512002-03-19 Akim Demaille <akim@epita.fr>
12952
12953 Test and fix the #line outputs.
12954
12955 * tests/atlocal.at (GCC): New.
12956 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 12957 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
12958 (Action synch line, Epilogue synch line): New tests.
12959 * src/reader.c (parse_union_decl): Define the muscle stype_line.
12960 * data/bison.simple, data/bison.c++: Use it.
12961
3c31a486
AD
129622002-03-19 Akim Demaille <akim@epita.fr>
12963
12964 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
12965 (Solved SR Conflicts, %expect not enough, %expect right)
12966 (%expect too much): Move to...
12967 * tests/conflicts.at: this new file.
12968
0d8bed56
AD
129692002-03-19 Akim Demaille <akim@epita.fr>
12970
12971 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
12972 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
12973 that we can move to enums for instance.
12974 * src/output.c (token_definitions_output): Output a list of
12975 `token-name, token-number' instead of the #define.
12976 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
12977
9208d17f
AD
129782002-03-14 Akim Demaille <akim@epita.fr>
12979
12980 Use Gettext 0.11.1.
12981
af27eacb
RA
129822002-03-09 Robert Anisko <robert@lrde.epita.fr>
12983
12984 * data/bison.c++: Make the user able to add members to the generated
12985 parser by subclassing.
12986
9101a310
RA
129872002-03-05 Robert Anisko <robert@lrde.epita.fr>
12988
12989 * src/reader.c (read_additionnal_code): `c' should be an integer, not
12990 a character.
12991 Reported by Nicolas Tisserand and Nicolas Burrus.
12992
fff9bf0b
RA
129932002-03-04 Robert Anisko <robert@lrde.epita.fr>
12994
12995 * src/reader.c: Warn about lacking semi-colons, do not complain.
12996
64dba31e
RA
129972002-03-04 Robert Anisko <robert@lrde.epita.fr>
12998
12999 * data/bison.c++: Remove a debug line.
13000
374f5a14
RA
130012002-03-04 Robert Anisko <robert@lrde.epita.fr>
13002
13003 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
13004 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
13005 provide a default implementation.
13006
bfcf1f3a
AD
130072002-03-04 Akim Demaille <akim@epita.fr>
13008
13009 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
13010 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
13011 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
13012 * tests/semantic.at (Parsing Guards): Similarly.
13013 * src/reader.at (readgram): Complain if the last rule is not ended
13014 with a semi-colon.
13015
65ccf9fc
AD
130162002-03-04 Akim Demaille <akim@epita.fr>
13017
13018 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
13019 * src/closure.c: here.
13020 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
13021 RTC.
13022 * src/warshall.h, src/warshall.c: Remove.
13023 * tests/sets.at (Broken Closure): Adjust.
13024
d0039cbc
AD
130252002-03-04 Akim Demaille <akim@epita.fr>
13026
13027 * src/output.c (output_skeleton): tempdir is const.
13028 bytes_read is unused.
13029
345cea78
AD
130302002-03-04 Akim Demaille <akim@epita.fr>
13031
13032 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
13033 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
13034 Update.
13035 From Michael Hayes.
13036
564801f7
AD
130372002-03-04 Akim Demaille <akim@epita.fr>
13038
13039 * src/closure.c (closure): `r' is unused.
13040
e5352bc7
AD
130412002-03-04 Akim Demaille <akim@epita.fr>
13042
13043 * tests/sets.at (Broken Closure): Add the ending `;'.
13044 * src/reader.at (readgram): Complain if a rule is not ended with a
13045 semi-colon.
13046
914feea9
AD
130472002-03-04 Akim Demaille <akim@epita.fr>
13048
13049 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
13050 (count_sr_conflicts): Use bitset_count.
13051 * src/reduce.c (inaccessable_symbols): Ditto.
13052 (bits_size): Remove.
13053 * src/warshall.h, src/warshall.c: Convert to bitsetv.
13054
f0250de6
AD
130552002-03-04 Akim Demaille <akim@epita.fr>
13056
13057 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
13058 * src/reduce.c: Remove the `bitset_zero's following the
13059 `bitset_create's, as now it is performed by the latter.
13060
ef017502
AD
130612002-03-04 Akim Demaille <akim@epita.fr>
13062
13063 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
13064 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
13065 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
13066 latest sources from Michael.
13067
76514394
AD
130682002-03-04 Akim Demaille <akim@epita.fr>
13069
13070 * src/output.c (output): Don't free the grammar.
13071 * src/reader.c (grammar_free): New.
13072 * src/main.c (main): Call it and don't free symtab here.
13073
55024580
AD
130742002-03-04 Akim Demaille <akim@epita.fr>
13075
13076 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
13077 before returning.
13078 Reported by Benoit Perrot.
13079
f9abaa2c
AD
130802002-03-04 Akim Demaille <akim@epita.fr>
13081
13082 Use bitset operations when possible, not loops over bits.
13083
13084 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
13085 bitset_or.
13086 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
13087 * src/reduce.c (useless_nonterminals): Formatting changes.
13088 * src/warshall.c (TC): Use bitset_or.
13089
0e721e75
AD
130902002-03-04 Akim Demaille <akim@epita.fr>
13091
13092 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
13093 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
13094 Ditto.
13095
0fb1ffb1
AD
130962002-03-04 Akim Demaille <akim@epita.fr>
13097
13098 * src/lalr.c (F): Now a bitset*.
13099 Adjust all dependencies.
13100
b86796bf
AD
131012002-03-04 Akim Demaille <akim@epita.fr>
13102
13103 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
13104 Adjust all dependencies.
13105
602bbf31
AD
131062002-03-04 Akim Demaille <akim@epita.fr>
13107
13108 * src/L0.c, src/LR0.h (nstates): Be size_t.
13109 Adjust comparisons (signed vs unsigned).
13110 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
13111 bitset*.
13112 Adjust all dependencies.
13113
d8a0245c
AD
131142002-03-04 Akim Demaille <akim@epita.fr>
13115
13116 * src/closure.c (firsts): Now, also a bitset.
13117 Adjust all dependencies.
13118 (varsetsize): Remove, now unused.
13119 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
13120
34ba9743
AD
131212002-03-04 Akim Demaille <akim@epita.fr>
13122
13123 * src/print.c: Convert to use bitset.h, not hand coded iterations
13124 over ints.
13125
ed86e78c
AD
131262002-03-04 Akim Demaille <akim@epita.fr>
13127
13128 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
13129
dfdb1797
AD
131302002-03-04 Akim Demaille <akim@epita.fr>
13131
13132 * src/closure.c (ruleset): Be a bitset.
13133 (rulesetsize): Remove.
13134
7086e707
AD
131352002-03-04 Akim Demaille <akim@epita.fr>
13136
13137 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
13138 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
13139 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
13140 * src/closure.c (fderives): Be an array of bitsets.
13141
98254360
RA
131422002-02-28 Robert Anisko <robert@lrde.epita.fr>
13143
13144 * data/bison.c++: Merge the two generated headers. Insert a copyright
13145 notice in each output file.
13146
a75c057f
AD
131472002-02-28 Akim Demaille <akim@epita.fr>
13148
13149 * data/bison.c++: Copy the prologue of bison.simple to fetch
13150 useful M4 definitions, such as b4_header_guard.
13151
06b00abc
AD
131522002-02-25 Akim Demaille <akim@epita.fr>
13153
13154 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
13155 translator friendly scheme for the bgr
13156 copyright notice.
06b00abc 13157
70e7d534
AD
131582002-02-25 Akim Demaille <akim@epita.fr>
13159
13160 * src/output.c (header_output): Remove, now handled completely via
13161 M4.
13162
abe017f6
AD
131632002-02-25 Akim Demaille <akim@epita.fr>
13164
13165 * m4/m4.m4: New, from CVS Autoconf.
13166 * configure.in: Invoke it.
13167 * src/output.c (output_skeleton): Use its result instead of the
13168 hard coded name.
13169
381fb12e
AD
131702002-02-25 Akim Demaille <akim@epita.fr>
13171
13172 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
13173 Fileutils 4.1.5.
13174 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
13175 * src/output.c (output_skeleton): Use mkstemp to create a real
13176 temporary file.
13177 Move the filling of `skeleton' and its muscle to...
13178 (prepare): here.
13179 (output): Move the definition of the prologue muscle to...
13180 (prepare): here.
13181 * src/system.h (DEFAULT_TMPDIR): New.
13182
6f38107f
PE
131832002-02-14 Paul Eggert <eggert@twinsun.com>
13184
13185 Remove the support for C++ namespace cleanliness; it was
13186 causing more problems than it was curing, since it didn't work
13187 properly on some nonstandard C++ compilers. This can wait
13188 for a proper C++ parser.
13189
13190 * NEWS: Document this.
13191 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
13192 of C++, as it's treated like C now.
13193 * src/bison.simple (YYSTD): Remove.
13194 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
13195 Treat C++ just like Standard C instead of trying to support
13196 namespace cleanliness.
13197
80cce3da
AD
131982002-02-14 Akim Demaille <akim@epita.fr>
13199
13200 * tests/regression.at (else): Adjust to Andreas' change.
13201
842e8679
AD
132022002-02-14 Akim Demaille <akim@epita.fr>
13203
13204 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
13205
4bda3f10
AD
132062002-02-13 Andreas Schwab <schwab@suse.de>
13207
13208 * src/output.c (output_rule_data): Don't output NULL, it might
13209 not be defined yet.
13210
4162fa07 132112002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 13212
4162fa07
RA
13213 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
13214 (Copyright notice): Update.
b418ecd8 13215
bd16a5dc
AD
132162002-02-11 Akim Demaille <akim@epita.fr>
13217
13218 * tests/regression.at (%nonassoc and eof): Don't include
13219 nonportable headers.
13220
8d69a1a3
RA
132212002-02-08 Robert Anisko <robert@lrde.epita.fr>
13222
13223 * data/bison.c++: Correct error recovery. Make the user able to
13224 initialize the starting location.
13225
9b2d0677
AD
132262002-02-07 Akim Demaille <akim@epita.fr>
13227
13228 * tests/input.at: New.
13229
69e2658b
RA
132302002-02-07 Robert Anisko <robert@lrde.epita.fr>
13231
13232 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 13233 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
13234 directives around tables only needed for debugging.
13235
4aacc3a7
RA
132362002-02-07 Robert Anisko <robert@lrde.epita.fr>
13237
13238 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
13239 C++ parsers.
13240 (yy::b4_name::parse): Use print_.
13241
762a801e
RA
132422002-02-07 Robert Anisko <robert@lrde.epita.fr>
13243
13244 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
13245
4bb2bc3f
RA
132462002-02-07 Robert Anisko <robert@lrde.epita.fr>
13247
13248 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
13249 C++ parsers.
13250 (yy::b4_name::parse): Build verbose error messages, and use error_.
13251
6b45a3ca
RA
132522002-02-06 Robert Anisko <robert@lrde.epita.fr>
13253
13254 * data/bison.c++: Fix m4 quoting in comments.
13255
50997c6e
RA
132562002-02-06 Robert Anisko <robert@lrde.epita.fr>
13257
13258 * data/bison.c++: Adjust the parser code. Fix some muscles that were
13259 not expanded by m4.
13260
3f3eed27
AD
132612002-02-05 Akim Demaille <akim@epita.fr>
13262
13263 * data/bison.c++: Adjust to the M4 back end.
13264 More is certainly needed.
13265
be2a1a68
AD
132662002-02-05 Akim Demaille <akim@epita.fr>
13267
13268 Give a try to M4 as a back end.
13269
13270 * lib/readpipe.c: New, from wdiff.
13271 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
13272 BISON_HAIRY.
13273 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
13274 specific values. Now it is m4 that performs the lookup.
13275 * src/parse-skel.y: Remove.
13276 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
13277 * src/output.c (actions_output, guards_output)
13278 (token_definitions_output): No longer keeps track of the output
13279 line number, hence remove the second argument.
13280 (guards_output): Check against the guard member of a rule, not the
13281 action member.
13282 Adjust callers.
13283 (output_skeleton): Don't look for the skeleton location, let m4 do
13284 that.
13285 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
13286 file will be used.
13287 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
13288 (prepare): Given that for the time being changesyntax is not
13289 usable in M4, rename the muscles using `-' to `_'.
13290 Define `defines_flag', `output_parser_name' and `output_header_name'.
13291 * src/output.h (actions_output, guards_output)
13292 (token_definitions_output): Adjust prototypes.
13293 * src/scan-skel.l: Instead of scanning the skeletons, it now
13294 processes the output of m4: `__oline__' and `#output'.
13295 * data/bison.simple: Adjust to be used by M4(sugar).
13296 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
13297 to date.
13298 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
13299 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
13300 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
13301 shamelessly stolen from CVS Autoconf.
13302
beda758b
AD
133032002-02-05 Akim Demaille <akim@epita.fr>
13304
13305 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
13306 * configure.in: Check for the declarations of free and malloc.
13307 * src/muscle_tab.c: Adjust.
13308
5ece6d43
AD
133092002-02-05 Akim Demaille <akim@epita.fr>
13310
13311 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
13312 which have no values.
13313
5bb18f9a
AD
133142002-02-05 Akim Demaille <akim@epita.fr>
13315
13316 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
13317 * data/: here.
13318
894dd62e
PE
133192002-01-29 Paul Eggert <eggert@twinsun.com>
13320
13321 * src/bison.simple (YYSIZE_T): Do not define merely because
13322 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
13323 On some platforms, <alloca.h> does not declare YYSTD (size_t).
13324
82841af7
AD
133252002-01-27 Akim Demaille <akim@epita.fr>
13326
13327 Fix `%nonassoc and eof'.
13328
13329 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
13330 which were not properly copied! Replace
13331 memcpy (res->errs, src->errs, src->nerrs);
13332 with
13333 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
13334 !!!
13335 * tests/regression.at (%nonassoc and eof): Adjust to newest
13336 Autotest: `.' is not in the PATH.
13337
318b76e9
AD
133382002-01-27 Akim Demaille <akim@epita.fr>
13339
13340 * tests/sets.at (AT_EXTRACT_SETS): New.
13341 (Nullable): Use it.
13342 (Firsts): New.
13343
30d2f3d5
AD
133442002-01-26 Akim Demaille <akim@epita.fr>
13345
13346 * tests/actions.at, tests/calc.at, tests/headers.at,
13347 * tests/torture.at: Adjust to the newest Autotest which no longer
13348 forces `.' in the PATH.
13349
30f8c395
AD
133502002-01-25 Akim Demaille <akim@epita.fr>
13351
13352 * tests/regression.at (%nonassoc and eof): New.
13353 Suggested by Robert Anisko.
13354
29ae55f1
AD
133552002-01-24 Akim Demaille <akim@epita.fr>
13356
13357 Bison dumps core when trying to complain about broken input files.
13358 Reported by Cris van Pelt.
13359
13360 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
13361 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
13362 into...
13363 (Invalid inputs): Strengthen: exercise parse_percent_token.
13364
2b548aa6
RA
133652002-01-24 Robert Anisko <robert.anisko@epita.fr>
13366
13367 * src/Makefile.am: Add bison.c++.
13368 * src/bison.c++: New skeleton.
13369
bb0146c2
AD
133702002-01-21 Paolo Bonzini <bonzini@gnu.org>
13371
13372 * po/it.po: New.
13373
bec30531
AD
133742002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
13375
13376 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
13377
fc6edc45
MA
133782002-01-20 Marc Autret <marc@gnu.org>
13379
13380 * src/files.c (compute_output_file_names): Fix
13381
5e5d5415
MA
133822002-01-20 Marc Autret <marc@gnu.org>
13383
13384 * tests/output.at: New test.
13385 * src/files.c (compute_base_names): Don't map extensions when
13386 the YACC flag is set, use defaults.
13387 Reported by Evgeny Stambulchik.
13388
44ea3fbd
MA
133892002-01-20 Marc Autret <marc@gnu.org>
13390
ba0fe3c7
PE
13391 * src/system.h: Need to define __attribute__ away for non-GCC
13392 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
13393 Suggested by Albert Chin-A-Young.
13394
338963d1
TVH
133952002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
13396
13397 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
13398 canonical definition.
13399 * src/system.h: Use the canonical definition for PARAMS (avoids
13400 a conflict with the macro from lib/hash.h).
13401
c57b2479
AD
134022002-01-11 Akim Demaille <akim@epita.fr>
13403
13404 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 13405 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 13406
b85810ae
AD
134072002-01-09 Akim Demaille <akim@epita.fr>
13408
13409 * src/files.c, src/files.h (output_infix): New.
13410 (tab_extension): Remove.
13411 (compute_base_names): Compute the former, drop the latter.
13412 * src/output.c (prepare): Insert the muscles `output-infix', and
13413 `output-suffix'.
13414 * src/parse-skel.y (string, string.1): New.
13415 (section.header): Use it.
13416 (section.yacc): Remove.
13417 (prefix): Remove too.
13418 * src/scan-skel.l: Adjust.
13419 * src/bison.simple, src/bison.hairy: Adjust.
13420
cae60122
AD
134212002-01-09 Akim Demaille <akim@epita.fr>
13422
13423 * configure.in (WERROR_CFLAGS): Compute it.
13424 * src/Makefile.am (CFLAGS): Pass it.
13425 * tests/atlocal.in (CFLAGS): Idem.
13426 * src/files.c: Fix a few warnings.
13427 (get_extension_index): Remove, unused.
13428
ae404801
AD
134292002-01-08 Akim Demaille <akim@epita.fr>
13430
13431 * src/getargs.c (AS_FILE_NAME): New.
13432 (getargs): Use it to convert DOSish file names.
13433 * src/files.c (base_name): Rename as full_base_name to avoid
13434 clashes with `base_name ()'.
13435 (filename_split): New.
13436 (compute_base_names): N-th rewrite, using filename_split.
13437
22312b71
AD
134382002-01-08 Akim Demaille <akim@epita.fr>
13439
13440 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
13441 New, stolen from the Fileutils 4.1.
13442 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
13443 * configure.in: Check for the presence of memrchr, and of its
13444 prototype.
13445
a67cef01
TVH
134462002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
13447
13448 * lib/hash.h (__P): Added definition for this macro.
13449 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
13450 BUILT_SOURCES, to ensure they are generated first.
13451 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
13452 %error-verbose to allow bootstrapping with bison 1.30x.
13453
2b25d624
AD
134542002-01-06 Akim Demaille <akim@epita.fr>
13455
13456 * src/reader.c (parse_braces): Don't fetch the next char, the
13457 convention is to fetch on entry.
13458 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
13459 'switch' without a following semicolon.
13460 * tests/regression.at (braces parsing): New.
13461
3460813b
AD
134622002-01-06 Akim Demaille <akim@epita.fr>
13463
13464 Bison is dead wrong in its RR conflict reports.
13465
13466 * tests/torture.at (GNU Cim Grammar): New.
13467 * src/conflicts.c (count_rr_conflicts): Fix.
13468
73784c64
AD
134692002-01-06 Akim Demaille <akim@epita.fr>
13470
13471 Creating package.m4 from configure.ac causes too many problems.
13472
13473 * tests/Makefile.am (package.m4): Create it by hand,
13474 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
13475
25d81090
AD
134762002-01-06 Akim Demaille <akim@epita.fr>
13477
13478 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
13479 skeleton.h.
13480
a9b8959e
PE
134812002-01-04 Paul Eggert <eggert@twinsun.com>
13482
13483 * doc/bison.texinfo (Debugging):
13484 Remove YYSTDERR; it's no longer defined or used.
13485 Also, s/cstdio.h/cstdio/.
13486
25d81090
AD
134872002-01-03 Akim Demaille <akim@epita.fr>
13488
13489 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
13490
1109455c
AD
134912002-01-03 Akim Demaille <akim@epita.fr>
13492
13493 * src/parse-skel.y (process_skeleton): Don't bind the parser's
13494 tracing code to --trace, wait for a better --trace option, with
13495 args.
13496
7ea5e977
AD
134972002-01-03 Akim Demaille <akim@epita.fr>
13498
13499 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
13500 The ISO C++ standard is extremely clear about it: stderr is
13501 considered a macro, not a regular symbol (see table 94 `Header
13502 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
13503 Therefore std:: does not apply to it. It still does with fprintf.
13504 Also, s/cstdio.h/cstdio/.
13505
fab5b110
AD
135062002-01-03 Akim Demaille <akim@epita.fr>
13507
13508 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
13509 for non system headers.
13510
aed7fd9b
AD
135112002-01-02 Akim Demaille <akim@epita.fr>
13512
13513 Equip the skeleton chain with location tracking, runtime trace,
13514 pure parser and scanner.
13515
13516 * src/parse-skel.y: Request a pure parser, locations, and prefix
13517 renaming.
13518 (%union): Having several members with the same type does not help
13519 type mismatches, simplify.
13520 (YYPRINT, yyprint): New.
13521 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
13522 (skel_error): this.
13523 Handle locations.
13524 * src/scan-skel.l: Adjust to these changes.
13525 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
13526 (LOCATION_PRINT, skel_control_t): New.
13527
24fad99e
AD
135282001-12-30 Akim Demaille <akim@epita.fr>
13529
13530 * src/parse-skel.y: Get rid of the shift/reduce conflict:
13531 replace `gb' with BLANKS.
13532 * src/scan-skel.l: Adjust.
13533
a4b36db4
AD
135342001-12-30 Akim Demaille <akim@epita.fr>
13535
13536 * src/system.h: We don't need nor want bcopy.
13537 Throw away MS-DOS crap: we don't need getpid.
13538 * configure.in: We don't need strndup. It was even causing
13539 problems: because Flex includes the headers *before* us,
13540 _GNU_SOURCE is not defined by config.h, and therefore strndup was
13541 not visible.
13542 * lib/xstrndup.c: New.
13543 * src/scan-skel.l: Use it.
13544 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
13545 * src/parse-skel.y: Use %directives instead of #defines.
13546
1239777d
AD
135472001-12-30 Akim Demaille <akim@epita.fr>
13548
13549 * src/skeleton.h: New.
13550 * src/output.c (output_parser, output_master_parser): Remove, dead
13551 code.
13552 * src/output.h (get_lines_number, actions_output, guards_output)
13553 (token_definitions_output): Prototype them.
13554 * src/parse-skel.y: Add the license notice.
13555 Include output.h and skeleton.h.
13556 (process_skeleton): Returns void, and takes a single parameter.
13557 * src/scan-skel.l: Add the license notice.
13558 Include skeleton.h.
13559 Don't use %option yylineno: it seems that then Flex imagines
13560 REJECT has been used, and therefore it won't reallocate its
13561 buffers (which makes no other sense to me than a bug). It results
13562 in warnings for `unused: yy_flex_realloc'.
13563
9b3add5b
RA
135642001-12-30 Robert Anisko <robert.anisko@epita.fr>
13565
13566 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
13567 (MUSCLE_INSERT_PREFIX): ...to there.
13568 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
13569 (MUSCLE_INSERT_PREFIX): Move from here...
13570
13571 * src/bison.hairy: Add a section directive. Put braces around muscle
13572 names. This parser skeleton is still broken, but Bison should not
13573 choke on a bad muscle 'syntax'.
13574 * src/bison.simple: Add a section directive. Put braces around muscle
13575 names.
13576
13577 * src/files.h (strsuffix, stringappend): Add declarations.
13578 (tab_extension): Add declaration.
13579 (short_base_name): Add declaration.
13580
13581 * src/files.c (strsuffix, stringappend): No longer static. These
13582 functions are used in the skeleton parser.
13583 (tab_extension): New.
13584 (compute_base_names): Use the computations done in this function
fab5b110 13585 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
13586 names.
13587 (short_base_name): No longer static.
13588
13589 * src/output.c (output_skeleton): New.
13590 (output): Disable call to output_master_parser, and give a try to
13591 a new skeleton handling system.
13592 (guards_output, actions_output): No longer static.
13593 (token_definitions_output, get_lines_number): No longer static.
13594
13595 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
13596
fab5b110 13597 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
13598 parse-skel.y.
13599
13600 * src/parse-skel.y: New file.
13601 * src/scan-skel.l: New file.
13602
b5b61c61
AD
136032001-12-29 Akim Demaille <akim@epita.fr>
13604
13605 %name-prefix is broken.
13606
13607 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
13608 Adjust all dependencies.
13609 * tests/headers.at (export YYLTYPE): Strengthen this test: use
13610 %name-prefix.
13611
13612 Renaming yylval but not yylloc is not consistent. Now we do.
13613
13614 * src/bison.simple: Prefix yylloc if used.
13615 * doc/bison.texinfo (Decl Summary): Document that.
13616
8c9a50be
AD
136172001-12-29 Akim Demaille <akim@epita.fr>
13618
13619 * doc/bison.texinfo: Promote `%long-directive' over
13620 `%long_directive'.
13621 Remove all references to fixed-output-files, yacc is enough.
13622
d99361e6
AD
136232001-12-29 Akim Demaille <akim@epita.fr>
13624
13625 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
13626 user prologue. These are defaults.
13627 * tests/actions.at (Mid-rule actions): Make sure the user can
13628 define YYDEBUG and YYERROR_VERBOSE.
13629
b9cecb91
AD
136302001-12-29 Akim Demaille <akim@epita.fr>
13631
13632 * src/output.c (header_output): Don't forget to export YYLTYPE and
13633 yylloc.
13634 * tests/headers.at (export YYLTYPE): New, make sure it does.
13635 * tests/regression.at (%union and --defines, Invalid CPP headers):
13636 Move to...
13637 * tests/headers.at: here.
13638
aea13e97
AD
136392001-12-29 Akim Demaille <akim@epita.fr>
13640
13641 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
13642
931394cb
AD
136432001-12-29 Akim Demaille <akim@epita.fr>
13644
13645 * tests/actions.at (Mid-rule actions): Output on a single line
13646 instead of several.
13647
704a47c4
AD
136482001-12-29 Akim Demaille <akim@epita.fr>
13649
13650 * doc/bison.texinfo: Formatting changes.
13651
091e20bb
AD
136522001-12-29 Akim Demaille <akim@epita.fr>
13653
13654 Don't store the token defs in a muscle, just be ready to output it
13655 on command. Now possible via `symbols'. Fixes a memory leak.
13656
13657 * src/output.c (token_definitions_output): New.
13658 (output_parser, header_output): Use it.
13659 * src/reader.c (symbols_save): Remove.
13660
cce71710
AD
136612001-12-29 Akim Demaille <akim@epita.fr>
13662
13663 * src/bison.simple: Do not provide a default for YYSTYPE and
13664 YYLTYPE before the user's prologue. Otherwise it's hardly... a
13665 default.
13666
82c035a8
AD
136672001-12-29 Akim Demaille <akim@epita.fr>
13668
13669 Mid-rule actions are simply... ignored!
13670
13671 * src/reader.c (readgram): Be sure to attach mid-rule actions to
13672 the empty-rule associated to the dummy symbol, not to the host
13673 rule.
13674 * tests/actions.at (Mid-rule actions): New.
13675
8419d367
AD
136762001-12-29 Akim Demaille <akim@epita.fr>
13677
13678 Memory leak.
13679
13680 * src/reader.c (reader): Free grammar.
13681
375d5806
AD
136822001-12-29 Akim Demaille <akim@epita.fr>
13683
13684 Memory leak.
13685
13686 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
13687 since it allocates it for each state, although only one is needed.
13688 (allocate_storage): Do it here.
13689
f51cb8ff
AD
136902001-12-29 Akim Demaille <akim@epita.fr>
13691
13692 * src/options.h, src/options.c (create_long_option_table): Rename
13693 as...
13694 (long_option_table_new): this, with a clearer prototype.
13695 (percent_table): Remove, unused,
13696 * src/getargs.c (getargs): Adjust.
13697
29e88316
AD
136982001-12-29 Akim Demaille <akim@epita.fr>
13699
13700 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
13701 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
13702 as states.
13703
b9f71f19
AD
137042001-12-29 Akim Demaille <akim@epita.fr>
13705
13706 * src/lalr.c (build_relations): Rename `states' as `states1'.
13707 Sorry, I don't understand exactly what it is, no better name...
13708
1a2b5d37
AD
137092001-12-29 Akim Demaille <akim@epita.fr>
13710
13711 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
13712 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
13713 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
13714 as rules.
13715
1cca533e
AD
137162001-12-29 Akim Demaille <akim@epita.fr>
13717
13718 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
13719 ago.
13720
c03ae966
AD
137212001-12-29 Akim Demaille <akim@epita.fr>
13722
13723 * src/reader.c, src/reader.h (user_toknums): Remove.
13724 Adjust all users to use symbols[i]->user_token_number.
13725
5a670b1e
AD
137262001-12-29 Akim Demaille <akim@epita.fr>
13727
13728 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
13729 Adjust all users to use symbols[i]->prec or ->assoc.
13730
ad949da9
AD
137312001-12-29 Akim Demaille <akim@epita.fr>
13732
13733 * src/reader.c, src/reader.h (tags): Remove.
13734 Adjust all users to use symbols[i]->tag.
13735
0e78e603
AD
137362001-12-29 Akim Demaille <akim@epita.fr>
13737
13738 * src/gram.h, src/gram.c (symbols): New, similar to state_table
13739 and rule_table.
13740 * src/reader.c (packsymbols): Fill this table.
13741 Drop sprec.
13742 * src/conflicts.c (resolve_sr_conflict): Adjust.
13743 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
13744 single table.
13745 Use symbols[i]->tag instead of tags[i].
13746
213e640e
AD
137472001-12-29 Akim Demaille <akim@epita.fr>
13748
13749 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
13750 In addition, put a comment in there, to replace...
13751 * tests/regression.at (%union and C comments): Remove.
13752
e7b8bef1
AD
137532001-12-29 Akim Demaille <akim@epita.fr>
13754
13755 * tests/regression.at (Web2c Actions): Blindly move the actual
13756 output as expected output. The contents *seem* right to me, but I
13757 can't pretend reading perfectly parser tables... Nonetheless, all
13758 the other tests pass correctly, the table look OK, even though the
13759 presence of `$axiom' is to be noted: AFAICS it is useless (but
13760 harmless).
13761
b68e7744
AD
137622001-12-29 Akim Demaille <akim@epita.fr>
13763
13764 * src/reader.c (readgram): Don't add the rule 0 if there were no
13765 rules read. In other words, add it _after_ having performed
13766 grammar sanity checks.
13767 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
13768
78d5bae9
AD
137692001-12-29 Akim Demaille <akim@epita.fr>
13770
13771 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
13772 visible, and some states have now a different number.
13773
ff442794
AD
137742001-12-29 Akim Demaille <akim@epita.fr>
13775
13776 * src/reader.c (readgram): Bind the initial rule's lineno to that
13777 of the first rule.
13778 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
13779 (Solved SR Conflicts): Adjust rule 0's line number.
13780
610ab194
AD
137812001-12-29 Akim Demaille <akim@epita.fr>
13782
13783 Fix the `GAWK Grammar' failure.
13784
13785 * src/LR0.c (final_state): Initialize to -1 so that we do compute
13786 the reductions of the first state which was mistakenly confused
13787 with the final state because precisely final_state was initialized
13788 to 0.
13789 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
13790 now noticed by Bison.
13791 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
13792 have a reduction on $default.
13793
29d29c8f
AD
137942001-12-29 Akim Demaille <akim@epita.fr>
13795
13796 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
13797 rule line numbers.
13798 * src/closure.c (print_closure): Likewise.
13799 * src/derives.c (print_derives): Likewise.
13800 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
13801 now.
13802
7c6b64d0
AD
138032001-12-29 Akim Demaille <akim@epita.fr>
13804
13805 * src/lalr.c (lookaheads_print): New.
13806 (lalr): Call it when --trace-flag.
13807 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
13808 are dumped.
13809
3d4daee3
AD
138102001-12-29 Akim Demaille <akim@epita.fr>
13811
13812 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
13813 when walking through ritem, even via rule->rhs.
13814 * src/reduce.c (dump_grammar, useful_production, reduce_output)
13815 (useful_production, useless_nonterminals): Likewise.
13816 (reduce_grammar_tables): Likewise, plus update nritems.
13817 * src/nullable.c (set_nullable): Likewise.
13818 * src/lalr.c (build_relations): Likewise.
13819 * tests/sets.at (Nullable): Adjust.
13820 Fortunately, now, the $axiom is no longer nullable.
13821
9e7f6bbd
AD
138222001-12-29 Akim Demaille <akim@epita.fr>
13823
13824 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
13825 the 0-sentinel.
13826 * src/gram.c (ritem_longest_rhs): Likewise.
13827 * src/reduce.c (nonterminals_reduce): Likewise.
13828 * src/print_graph.c (print_graph): Likewise.
13829 * src/output.c (output_rule_data): Likewise.
13830 * src/nullable.c (set_nullable): Likewise.
13831
255ef638
AD
138322001-12-29 Akim Demaille <akim@epita.fr>
13833
13834 * src/output.c: Comment changes.
13835
0d8a7363
AD
138362001-12-27 Paul Eggert <eggert@twinsun.com>
13837
13838 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
13839 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
13840 Sparc, as they were causing more porting problems than the
13841 (minor) performance improvement was worth.
13842
13843 Also, catch up with 1.31's YYSTD.
13844
3db472b9
AD
138452001-12-27 Akim Demaille <akim@epita.fr>
13846
13847 * src/output.c (output_gram): Rely on nritems, not the
13848 0-sentinel. See below.
13849 Use -1 as separator, not 0.
13850 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
13851 Rely on -1 as separator in yyrhs, instead of 0.
13852 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
13853 twice `Now at end of input', therefore there are two lines less to
13854 expect.
13855
b365aa05
AD
138562001-12-27 Akim Demaille <akim@epita.fr>
13857
13858 * tests/regression.at (Unresolved SR Conflicts):
13859 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
13860 below.
13861
30171f79
AD
138622001-12-27 Akim Demaille <akim@epita.fr>
13863
13864 * src/LR0.c (new_state): Recognize the final state by the fact it
13865 is reached by eoftoken.
13866 (insert_start_shifting_state, insert_eof_shifting_state)
13867 (insert_accepting_state, augment_automaton): Remove, since now
13868 these states are automatically computed from the initial state.
13869 (generate_states): Adjust.
13870 * src/print.c: When reporting a rule number to the user, substract
13871 1, so that the axiom rule is rule 0, and the first user rule is 1.
13872 * src/reduce.c: Likewise.
13873 * src/print_graph.c (print_core): For the time being, just as for
13874 the report, depend upon --trace-flags to dump the full set of
13875 items.
13876 * src/reader.c (readgram): Once the grammar read, insert the rule
13877 0: `$axiom: START-SYMBOL $'.
13878 * tests/set.at: Adjust: rule 0 is now displayed, and since the
13879 number of the states has changed (the final state is no longer
13880 necessarily the last), catch up.
13881
75142d45
AD
138822001-12-27 Akim Demaille <akim@epita.fr>
13883
13884 Try to make the use of the eoftoken valid. Given that its value
13885 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
13886 is used instead of > 0 where appropriate, (ii), depend upon nritems
13887 instead of the 0-sentinel.
13888
13889 * src/gram.h, src/gram.c (nritems): New.
13890 Expected to be duplication of nitems, but for the time being...
13891 * src/reader.c (packgram): Assert nritems and nitems are equal.
13892 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
13893 * src/closure.c (print_closure, print_fderives): Likewise.
13894 * src/gram.c (ritem_print): Likewise.
13895 * src/print.c (print_core, print_grammar): Likewise.
13896 * src/print_graph.c: Likewise.
13897
b7c49edf
AD
138982001-12-27 Akim Demaille <akim@epita.fr>
13899
13900 * src/main.c (main): If there are complains after grammar
13901 reductions, then output the report anyway if requested, then die.
13902 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
13903 * src/reader.c (eoftoken): New.
13904 (parse_token_decl): If the token being defined has value `0', it
13905 is the eoftoken.
13906 (packsymbols): No longer hack `tags' to insert `$' by hand.
13907 Be sure to preserve the value of the eoftoken.
13908 (reader): Make sure eoftoken is defined.
13909 Initialize nsyms to 0: now eoftoken is created just like the others.
13910 * src/print.c (print_grammar): Don't special case the eof token.
13911 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
13912 lie anyway, albeit pleasant.
13913 * tests/calc.at: Exercise error messages with eoftoken.
13914 Change the grammar so that empty input is invalid.
13915 Adjust expectations.
13916 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
13917
ec2da99f
AD
139182001-12-27 Akim Demaille <akim@epita.fr>
13919
13920 * configure.in: Check the protos of strchr ans strspn.
13921 Replace strchr if needed.
13922 * src/system.h: Provide the protos of strchr, strspn and memchr if
13923 missing.
13924 * lib/strchr.c: New.
13925 * src/reader.c (symbols_save): Use strchr.
13926
8adfa272
AD
139272001-12-27 Akim Demaille <akim@epita.fr>
13928
13929 * src/print.c, src/print_graph.c (escape): New.
13930 Use it to quote the TAGS outputs.
13931 * src/print_graph.c (print_state): Now errors are in red, and
13932 reductions in green.
13933 Prefer high to wide: output the state number on a line of its own.
13934
80dac38c
AD
139352001-12-27 Akim Demaille <akim@epita.fr>
13936
13937 * src/state.h, src/state.c (reductions_new): New.
13938 * src/LR0.c (set_state_table): Let all the states have a
13939 `reductions', even if reduced to 0.
13940 (save_reductions): Adjust.
13941 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
13942 * src/print.c (print_reductions, print_actions): Adjust.
13943 * src/output.c (action_row): Adjust.
13944
2cec70b9
AD
139452001-12-27 Akim Demaille <akim@epita.fr>
13946
13947 * src/state.h, src/state.c (errs_new, errs_dup): New.
13948 * src/LR0.c (set_state_table): Let all the states have an errs,
13949 even if reduced to 0.
13950 * src/print.c (print_errs, print_reductions): Adjust.
13951 * src/output.c (output_actions, action_row): Adjust.
13952 * src/conflicts.c (resolve_sr_conflict): Adjust.
13953
13ca549a
AD
139542001-12-27 Akim Demaille <akim@epita.fr>
13955
13956 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
13957
5092aba5
AD
139582001-12-27 Akim Demaille <akim@epita.fr>
13959
13960 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
13961 * src/print.c: here.
13962 (lookaheadset, shiftset): New, used as additional storage by
13963 print_reductions.
13964 (print_results): Adjust.
13965 (print_shifts, print_gotos, print_errs): New, extracted from...
13966 (print_actions): here.
13967 * src/print_graph.c (print_actions): Remove dead code.
13968
11e2beca
AD
139692001-12-27 Akim Demaille <akim@epita.fr>
13970
13971 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
13972 `$n' and `@n'.
13973
dac3c910
AD
139742001-12-27 Akim Demaille <akim@epita.fr>
13975
13976 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
13977 (build_relations): Adjust.
13978
d0b0fefa
AD
139792001-12-27 Akim Demaille <akim@epita.fr>
13980
13981 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
13982 duplication.
13983
adc8c848
AD
139842001-12-27 Akim Demaille <akim@epita.fr>
13985
13986 * src/reader.c (packgram): Catch nitems overflows.
13987
14d293ac
AD
139882001-12-27 Akim Demaille <akim@epita.fr>
13989
13990 * src/files.c, src/files.h (guard_obstack): Remove.
13991 * src/output.c (output): Adjust.
13992 * src/reader.c (parse_braces): New, factoring...
13993 (copy_action, copy_guard): these two which are renamed as...
13994 (parse_action, parse_guard): these.
13995 As a voluntary consequence, using braces around guards is now
13996 mandatory.
13997
f499b062
AD
139982001-12-27 Akim Demaille <akim@epita.fr>
13999
14000 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
14001 * src/reader.c (symbol_list): `guard' and `guard_line' are new
14002 members.
14003 (symbol_list_new): Adjust.
14004 (copy_action): action_line is the first line, not the last.
14005 (copy_guard): Just as for actions, store the `action' only, not
14006 the switch/case/break flesh.
14007 Don't parse the user action that might follow the guard, let...
14008 (readgram): do it, i.e., now, there can be an action after a
14009 guard.
14010 In other words the guard is just explicitly optional.
14011 (packgram): Adjust.
14012 * src/output.c (guards_output): New.
14013 (output_parser): Call it when needed.
14014 (output): Also free the guard and attrs obstacks.
14015 * src/files.c, src/files.h (obstack_save): Remove.
14016 (output_files): Remove.
14017 As a result, if one needs the former `.act' file, using an
14018 appropriate skeleton which requires actions and guards is now
14019 required.
14020 * src/main.c (main): Adjust.
14021 * tests/semantic.at: New.
14022 * tests/regression.at: Use `input.y' as input file name.
14023 Avoid 8+3 problems by requiring input.c when the test needs the
14024 parser.
14025
d945f5cd
AD
140262001-12-27 Akim Demaille <akim@epita.fr>
14027
14028 * src/reader.c (symbol_list_new): Be sure to initialize all the
14029 fields.
14030
d200e455
AD
140312001-12-27 Akim Demaille <akim@epita.fr>
14032
14033 All the hacks using a final pseudo state are now useless.
14034
14035 * src/LR0.c (set_state_table): state_table holds exactly nstates.
14036 * src/lalr.c (nLA): New.
14037 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
14038 instead of lookaheadsp from the pseudo state (nstate + 1).
14039
f9507c28
AD
140402001-12-27 Akim Demaille <akim@epita.fr>
14041
14042 * src/output.c (action_row, token_actions): Use a state_t instead
14043 of a integer, and nlookaheads instead of the following state's
14044 lookaheadsp.
14045
065fbd27
AD
140462001-12-27 Akim Demaille <akim@epita.fr>
14047
14048 * src/conflicts.c (log_resolution, flush_shift)
14049 (resolve_sr_conflict, set_conflicts, solve_conflicts)
14050 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
14051 (conflicts_print, print_reductions): Use a state_t instead of an
14052 integer when referring to a state.
14053 As much as possible, depend upon nlookaheads, instead of the
14054 `lookaheadsp' member of the following state (since lookaheads of
14055 successive states are successive, the difference between state n + 1
14056 and n served as the number of lookaheads for state n).
14057 * src/lalr.c (add_lookback_edge): Likewise.
14058 * src/print.c (print_core, print_actions, print_state)
14059 (print_results): Likewise.
14060 * src/print_graph.c (print_core, print_actions, print_state)
14061 (print_graph): Likewise.
14062 * src/conflicts.h: Adjust.
14063
1b177bd7
AD
140642001-12-27 Akim Demaille <akim@epita.fr>
14065
14066 * src/bison.hairy: Formatting/comment changes.
14067 ANSIfy.
14068 Remove `register' indications.
14069 Add plenty of `static'.
14070
7742ddeb
AD
140712001-12-27 Akim Demaille <akim@epita.fr>
14072
14073 * src/output.c (prepare): Drop the muscle `ntbase' which
14074 duplicates ntokens.
14075 * src/bison.simple: Formatting/comment changes.
14076 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
14077 is an undocumented synonym.
14078
1fa14068
AD
140792001-12-22 Akim Demaille <akim@epita.fr>
14080
14081 * src/output.c (output_table_data): Change the prototype to use
14082 `int' for array ranges: some invocations do pass an int, not a
14083 short.
14084 Reported by Wayne Green.
14085
b9752825
AD
140862001-12-22 Akim Demaille <akim@epita.fr>
14087
14088 Some actions of web2c.y are improperly triggered.
14089 Reported by Mike Castle.
14090
14091 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
14092 * tests/regression.at (Web2c): Rename as...
14093 (Web2c Report): this.
14094 (Web2c Actions): New.
14095
776209d6
AD
140962001-12-22 Akim Demaille <akim@epita.fr>
14097
14098 Reductions in web2c.y are improperly reported.
14099 Reported by Mike Castle.
14100
14101 * src/conflicts.c (print_reductions): Fix.
14102 * tests/regression.at (Web2c): New.
14103
275fc3ad
AD
141042001-12-18 Akim Demaille <akim@epita.fr>
14105
14106 Some host fail on `assert (!"foo")', which expands to
14107 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
14108 Reported by Nelson Beebee.
14109
14110 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
14111 `#define it_succeeded 0' and `assert (it_succeeded)'.
14112
897668ee
MA
141132001-12-17 Marc Autret <autret_m@epita.fr>
14114
14115 * src/bison.simple: Don't hard code the skeleton line and filename.
14116 * src/output.c (output_parser): Rename 'line' as 'output_line'.
14117 New line counter 'skeleton_line' (skeleton-line muscle).
14118
ab3399e0
PE
141192001-12-17 Paul Eggert <eggert@twinsun.com>
14120
14121 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
14122 YYDEBUG must be defined to a nonzero value.
14123
14124 * src/bison.simple (yytname): Do not assume that the user defines
14125 YYDEBUG to a properly parenthesized expression.
14126
3877f72b
AD
141272001-12-17 Akim Demaille <akim@epita.fr>
14128
14129 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
14130 nlookaheads is a new member.
14131 Adjust all users.
14132 * src/lalr.h (nlookaheads): Remove this orphan declaration.
14133 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
14134 state.
776209d6 14135
331dbc1b
AD
141362001-12-17 Akim Demaille <akim@epita.fr>
14137
14138 * src/files.h, src/files.c (open_files, close_files): Remove.
14139 * src/main.c (main): Don't open/close files, nor invoke lex_free,
14140 let...
14141 * src/reader.c (reader): Do it.
776209d6 14142
be750e4c
AD
141432001-12-17 Akim Demaille <akim@epita.fr>
14144
14145 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 14146
709ae8c6
AD
141472001-12-17 Akim Demaille <akim@epita.fr>
14148
14149 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
14150 (flush_reduce): New.
14151 (resolve_sr_conflict): Adjust.
776209d6 14152
f87685c3
AD
141532001-12-17 Akim Demaille <akim@epita.fr>
14154
14155 * src/output.c (output_obstack): Be static and rename as...
14156 (format_obstack): this, to avoid any confusion with files.c's
14157 output_obstack.
14158 * src/reader.h (muscle_obstack): Move to...
14159 * src/output.h: here, since it's defined in output.c.
14160
837491d8
AD
141612001-12-17 Akim Demaille <akim@epita.fr>
14162
14163 * src/output.c (action_row, save_column, default_goto)
14164 (sort_actions, matching_state, pack_vector): Better variable
14165 locality.
14166
796d61fb
AD
141672001-12-17 Akim Demaille <akim@epita.fr>
14168
14169 * src/output.c: Various formatting changes.
776209d6 14170
64d15509
AD
141712001-12-17 Akim Demaille <akim@epita.fr>
14172
14173 * src/files.c (output_files): Free the output_obstack.
14174 * src/main.c (main): Call print and print_graph conditionally.
14175 * src/print.c (print): Work unconditionally.
14176 * src/print_graph.c (print_graph): Work unconditionally.
14177 * src/conflicts.c (log_resolution): Output only if verbose_flag.
14178
fbc8ecb7
MA
141792001-12-16 Marc Autret <autret_m@epita.fr>
14180
14181 * src/output.c (actions_output): Fix. When we use %no-lines,
14182 there is one less line per action.
14183
f0440388
MA
141842001-12-16 Marc Autret <autret_m@epita.fr>
14185
14186 * src/bison.simple: Remove a useless #line directive.
14187 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
14188 * src/output.c (get_lines_number): New.
776209d6 14189 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
14190 output muscles.
14191 Fix line numbering.
14192 (actions_output): Computes the number of lines taken by actions.
14193 (output_master_parser): Insert new skeleton which is the name of
14194 the output parser file name.
14195
a79986b8
MA
141962001-12-15 Marc Autret <autret_m@epita.fr>
14197
14198 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
14199
4ec8e00f
MA
142002001-12-15 Marc Autret <autret_m@epita.fr>
14201
14202 * src/output.c (output_gram): Keep track of the hairy one.
14203
1a4648ff
AD
142042001-12-15 Akim Demaille <akim@epita.fr>
14205
14206 Make `make distcheck' work.
14207
14208 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
14209 system.h which uses libgettext.h.
14210
9c2c67e6
AD
142112001-12-15 Akim Demaille <akim@epita.fr>
14212
14213 * src/nullable.c (set_nullable): Useless rules must be skipped,
14214 otherwise, since we range over their symbols, we might look at a
14215 nonterminal which no longer ``exists'', i.e., it is not counted in
14216 `nvars', hence we overflow our arrays.
14217
93ede233
AD
142182001-12-15 Akim Demaille <akim@epita.fr>
14219
14220 The header can also be produced directly, without any obstack!
14221 Yahoo!
14222
14223 * src/files.c, src/files.h (defines_obstack): Remove.
14224 (compute_header_macro): Global.
14225 (defines_obstack_save): Remove.
14226 * src/reader.c (parse_union_decl): No longer output to
14227 defines_obstack: its content can be found in the `stype' muscle
14228 anyway.
14229 (output_token_translations): Merge into...
14230 (symbols_output): this.
14231 Rename as...
14232 (symbols_save): this.
14233 (reader): Adjust.
14234 * src/output.c (header_output): New.
14235 (output): Call it.
14236
2666f928
AD
142372001-12-15 Akim Demaille <akim@epita.fr>
14238
14239 * src/reader.c (parse_union_decl): Instead of handling two obstack
14240 simultaneously, use one to define the `stype' muscle, and use the
14241 value of the latter to fill defines_obstack.
14242 (copy_comment): Remove.
14243 (copy_comment2): Work for a single obstack.
14244 Rename as...
14245 (copy_comment): this.
14246
428046f8
AD
142472001-12-15 Akim Demaille <akim@epita.fr>
14248
14249 * src/lex.c, src/lex.h (xgetc): No longer static.
14250 * src/reader.c (parse_union_decl): Revamp.
14251
ea52d706
AD
142522001-12-15 Akim Demaille <akim@epita.fr>
14253
14254 Still making progress in separating Bison into (i) input, (ii)
14255 process, (iii) output: now we can directly output the parser file
14256 without using table_obstack at all.
14257
14258 * src/files.c, src/files.h (table_obstack): Bye bye.
14259 (parser_file_name): New.
14260 * src/files.c (compute_output_file_names): Compute it.
14261 * src/output.c (actions_output, output_parser)
14262 (output_master_parser): To a file instead of an obstack.
14263
3f96f4dc
AD
142642001-12-15 Akim Demaille <akim@epita.fr>
14265
14266 Attach actions to rules, instead of pre-outputting them to
14267 actions_obstack.
14268
14269 * src/gram.h (rule_t): action and action_line are new members.
14270 * src/reader.c (symbol_list): Likewise.
14271 (copy_action): Save the actions within the rule.
14272 (packgram): Save them in rule_table.
14273 * src/output.c (actions_output): New.
14274 (output_parser): Use it on `%%actions'.
14275 (output_rule_data): Don't free rule_table.
14276 (output): Do it.
14277 (prepare): Don't save the `action' muscle.
14278 * src/bison.simple: s/%%action/%%actions/.
14279
51576fb3
AD
142802001-12-15 Akim Demaille <akim@epita.fr>
14281
14282 * src/reader.c (copy_action): When --yacc, don't append a `;'
14283 to the user action: let it fail if lacking.
dee049eb 14284 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 14285
2648a72d
AD
142862001-12-14 Akim Demaille <akim@epita.fr>
14287
14288 * src/lex.c (literalchar): Simply return the char you decoded, non
14289 longer mess around with obstacks and int pointers.
14290 Adjust all callers.
14291
92790e5b
AD
142922001-12-14 Akim Demaille <akim@epita.fr>
14293
14294 * src/lex.c (literalchar): Don't escape the special characters,
14295 just decode them, and keep them as char (before, eol was output as
14296 the 2 char string `\n' etc.).
14297 * src/output.c (output_rule_data): Use quotearg to output the
14298 token strings.
14299
927c1557
PE
143002001-12-13 Paul Eggert <eggert@twinsun.com>
14301
14302 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
14303 Do not infringe on the global user namespace when using C++.
14304 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
14305 All uses of `fprintf' and `stderr' changed.
14306
14307 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
14308
ed8e1f68
AD
143092001-12-13 Akim Demaille <akim@epita.fr>
14310
14311 The computation of nullable is broken: it doesn't handle empty
14312 RHS's properly.
14313
14314 * tests/torture.at (GNU AWK Grammar): New.
14315 * tests/sets.at (Nullable): New.
14316 * src/nullable.c (set_nullable): Instead of blindly looping over
14317 `ritems', loop over the rules, and then over their rhs's.
14318
14319 Work around Autotest bugs.
14320
14321 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
14322 frame, because Autotest understand lines starting with a `+' as
14323 traces from the shell. Then, they are not processed properly.
14324 Admittedly an Autotest bug, but we don't have time to wait for
14325 Autotest to catch up.
14326 * tests/regression.at (Broken Closure): Adjust to the new table
14327 frames.
14328 Move to...
14329 * tests/sets.at: here.
14330
cb581495
AD
143312001-12-13 Akim Demaille <akim@epita.fr>
14332
14333 * src/closure.c (closure): Use nrules instead of playing tricks
14334 with BITS_PER_WORD.
14335
2e729273
AD
143362001-12-13 Akim Demaille <akim@epita.fr>
14337
14338 * src/print.c (print_actions): Output the handling of `$' as the
14339 traces do: shifting the token EOF. Before EOF was treated as a
14340 nonterminal.
14341 * tests/regression.at: Adjust some tests.
14342 * src/print_graph.c (print_core): Complete the set of items via
14343 closure. The next-to-final and final states are still unsatisfying,
14344 but that's to be addressed elsewhere.
14345 No longer output the rule numbers, but do output the state number.
14346 A single loop for the shifts + gotos is enough, but picked a
14347 distinct color for each.
14348 (print_graph): Initialize and finalize closure.
14349
107f7dfb
AD
143502001-12-13 Akim Demaille <akim@epita.fr>
14351
14352 * src/reader.c (readgram): Remove dead code, an strip useless
14353 braces.
14354 (get_type): Remove, unused.
14355
9b53a24f
AD
143562001-12-12 Akim Demaille <akim@epita.fr>
14357
14358 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
14359 on that of lib/error.c.
14360
dbfb6dcd
AD
143612001-12-12 Akim Demaille <akim@epita.fr>
14362
14363 Some hosts don't like `/' in includes.
14364
14365 * src/system.h: Include libgettext.h without qualifying the path.
14366 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
14367 $(top_srcdir).
14368
c25fb648
MA
143692001-12-11 Marc Autret <autret_m@epita.fr>
14370
14371 * src/output.c (output_parser): Remove useless muscle.
14372
710ddc4f
MA
143732001-12-11 Marc Autret <autret_m@epita.fr>
14374
14375 * src/bison.simple: Remove #line just before %%epilogue. It
14376 is now handled in ...
14377 * src/reader.c (read_additionnal_code): Add the output of a
14378 #line for the epilogue.
14379
e83d80b8
MA
143802001-12-10 Marc Autret <autret_m@epita.fr>
14381
927c1557 14382 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
14383 replace precedent remove.
14384 * src/bison.simple: Remove #line before %%prologue because
14385 %%input-line is wrong at this time.
14386
971d5158
MA
143872001-12-10 Marc Autret <autret_m@epita.fr>
14388
14389 * src/reader.c (symbols_output): Clean up.
927c1557 14390 * src/output.c (output_gram, output): Clean up.
971d5158 14391
5edafffd
AD
143922001-12-10 Akim Demaille <akim@epita.fr>
14393
14394 * src/lalr.c (initialize_lookaheads): New. Extracted from...
14395 * src/LR0.c (set_state_table): here.
14396 * src/lalr.c (lalr): Call it.
14397
0279f8e9
AD
143982001-12-10 Akim Demaille <akim@epita.fr>
14399
14400 * src/state.h (shifts): Remove the `number' member: shifts are
14401 attached to state, hence no longer need to be labelled with a
14402 state number.
14403
190c4f5f
AD
144042001-12-10 Akim Demaille <akim@epita.fr>
14405
14406 Now that states have a complete set of members, the linked list of
14407 shifts is useless: just fill directly the state's shifts member.
14408
14409 * src/state.h (shifts): Remove the `next' member.
14410 * src/LR0.c (first_state, last_state): Remove.
14411 Adjust the callers.
14412 (augment_automaton): Don't look for the shifts that must be added
14413 a shift on EOF: it is those of the state we looked for! But now,
14414 since shifts are attached, it is no longer needed to looking
14415 merely by its id: its number.
14416
2a73b93d
AD
144172001-12-10 Akim Demaille <akim@epita.fr>
14418
14419 * src/LR0.c (augment_automaton): Better variable locality.
14420 Remove an impossible branch: if there is a state corresponding to
14421 the start symbol being shifted, then there is shift for the start
14422 symbol from the initial state.
14423
74392f6a
AD
144242001-12-10 Akim Demaille <akim@epita.fr>
14425
14426 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
14427 only when appropriate: when insert_start_shifting_state' is not
14428 invoked.
14429 * tests/regression.at (Rule Line Numbers): Adjust.
14430
37c82725
AD
144312001-12-10 Akim Demaille <akim@epita.fr>
14432
14433 * src/LR0.c (augment_automaton): Now that all states have shifts,
14434 merge the two cases addition shifts to the initial state.
14435
6a164e0c
AD
144362001-12-10 Akim Demaille <akim@epita.fr>
14437
14438 * src/lalr.c (set_state_table): Move to...
14439 * src/LR0.c: here.
14440 * src/lalr.c (lalr): Don't call it...
14441 * src/LR0.c (generate_states): do it.
14442 * src/LR0.h (first_state): Remove, only the table is used.
14443
7215de24
AD
144442001-12-10 Akim Demaille <akim@epita.fr>
14445
14446 * src/LR0.h (first_shift, first_reduction): Remove.
14447 * src/lalr.c: Don't use first_shift: find shifts through the
14448 states.
14449
80e25d4d
AD
144502001-12-10 Akim Demaille <akim@epita.fr>
14451
14452 * src/LR0.c: Attach shifts to states as soon as they are
14453 computed.
14454 * src/lalr.c (set_state_table): Instead of assigning shifts to
14455 state, just assert that the mapping was properly done.
14456
0ab3728b
AD
144572001-12-10 Akim Demaille <akim@epita.fr>
14458
14459 * src/LR0.c (insert_start_shift): Rename as...
14460 (insert_start_shifting_state): this.
14461 (insert_eof_shifting_state, insert_accepting_state): New.
14462 (augment_automaton): Adjust.
14463 Better locality of the variables.
14464 When looking if the start_symbol is shifted from the initial
14465 state, using `while (... symbol != start_symbol ...)' sounds
14466 better than `while (... symbol < start_symbol ...)': If fail
14467 to see how the order between symbols could be relevant!
14468
78af9bbc
AD
144692001-12-10 Akim Demaille <akim@epita.fr>
14470
14471 * src/getargs.h: Don't declare `spec_name_prefix' and
14472 `spec_file_prefix', declared by src/files.h.
14473 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
14474 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
14475 * src/output.c (prepare): Adjust.
14476 * src/reader.c (symbols_output): Likewise.
14477 * src/vmsgetargs.c: Vaguely adjust, but who cares?
14478
bdef2a41
AD
144792001-12-10 Akim Demaille <akim@epita.fr>
14480
14481 * src/muscle_tab.c (muscle_init): NULL is a better default than
14482 `"0"'.
14483
3735969c
AD
144842001-12-10 Akim Demaille <akim@epita.fr>
14485
14486 * src/reader.c (reader): Calling symbols_output once is enough.
14487
49701457
AD
144882001-12-10 Akim Demaille <akim@epita.fr>
14489
14490 Now that states have a complete set of members, the linked list of
14491 reductions is useless: just fill directly the state's reductions
14492 member.
14493
14494 * src/state.h (struct reductions): Remove member `number' and
14495 `next'.
14496 * src/LR0.c (first_reduction, last_reduction): Remove.
14497 (save_reductions): Don't link the new reductions, store them in
14498 this_state.
14499 * src/lalr.c (set_state_table): No need to attach reductions to
14500 states, it's already done.
14501 * src/output.c (output_actions): No longer free the shifts, then
14502 the reductions, then the states: free all the states and their
14503 members.
14504
0edad749
AD
145052001-12-10 Akim Demaille <akim@epita.fr>
14506
14507 * src/options.c (OPTN, DRTV, BOTH): New.
14508 (option_table): Use them.
14509
0edad749
AD
14510 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
14511 the job of system.h.
14512 * src/options.c: Don't include stdio.h and xalloc.h for the same
14513 reasons.
14514
5449dd0f
AD
145152001-12-10 Akim Demaille <akim@epita.fr>
14516
14517 * src/output.c (output, prepare): Make sure the values of the
14518 muscles `action' and `prologue' are 0-terminated.
14519
a870c567
AD
145202001-12-10 Akim Demaille <akim@epita.fr>
14521
14522 Clean up GCC warnings.
14523
14524 * src/reader.c (copy_action): `buf' is not used.
14525 (parse_skel_decl): Be static.
14526 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
14527 * src/options.h (create_long_option_table): Have a real prototype.
14528 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
14529 (hash_delete_at): Return const void *.
14530 Adjust casts to preserve the const.
14531
80df8768
AD
145322001-12-10 Akim Demaille <akim@epita.fr>
14533
14534 * configure.in: Require 2.52g.
14535 M4 is not needed, but AUTOM4TE is.
14536 * m4/m4.m4: Remove.
14537 * tests/Makefile.am: Adjust.
14538
f693ad14
AD
145392001-12-10 Akim Demaille <akim@epita.fr>
14540
14541 One structure for states is enough, even though theoretically
14542 there are LR(0) states and LALR(1) states.
14543
14544 * src/lalr.h (state_t): Remove.
14545 (state_table): Be state_t **, not state_t *.
14546 * src/state.h (core, CORE_ALLOC): Rename as...
14547 (state_t, STATE_ALLOC): this.
14548 Add the LALR(1) members: shifts, reductions, errs.
14549 * src/LR0.c (state_table): Rename as...
14550 (state_hash): this, to avoid name clashes with the global
14551 `state_table'.
14552 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
14553 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
14554
74ffbcb6
AD
145552001-12-10 Akim Demaille <akim@epita.fr>
14556
14557 Bison dumps core on bash.y.
14558 Reported by Pascal Bart.
14559
14560 * src/warshall.c (bitmatrix_print): New.
14561 (TC): Use it.
ba0fe3c7 14562 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
14563 j must be the outer loop.
14564 * tests/regression.at (Broken Closure): New.
14565
07708e19
AD
145662001-12-05 Akim Demaille <akim@epita.fr>
14567
14568 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
14569 its argument.
ba1ecc07 14570 Reported by Peter Hamorsky.
07708e19 14571
92b16366
AD
145722001-12-05 Akim Demaille <akim@epita.fr>
14573
14574 * src/conflicts.c (err_table): Remove.
14575 (resolve_sr_conflict): Adjust.
14576 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
14577 Rename as...
14578 (state_t.reductions, state_t.shifts): this.
14579
076ab033
AD
145802001-12-05 Akim Demaille <akim@epita.fr>
14581
14582 * src/reduce.c (reduce_grammar_tables): No longer disable the
14583 removal of useless rules via CPP but via `if (0)', so that the
14584 compiler still check the code is valid.
14585 For instance, it should have noticed `rline' no longer exists: use
14586 the `line' member of rule_t.
14587 * src/gram.c (dummy, rline): Remove, unused.
14588
3843c413
AD
145892001-12-05 Akim Demaille <akim@epita.fr>
14590
14591 * src/output.c (pack_vector): Use assert, not berror.
14592 * src/main.c (berror): Remove, unused.
14593
43168960
AD
145942001-12-05 Akim Demaille <akim@epita.fr>
14595
14596 New experimental feature: if --verbose --trace output all the
14597 items of a state, not only its kernel.
14598
14599 * src/print.c (print_core): If `trace_flag', then invoke closure
14600 before outputting the items of the state (print_core is no longer
14601 a correct name them).
14602 (print_results): Invoke new_closure/free_closure if needed.
14603
b2872512
AD
146042001-12-05 Akim Demaille <akim@epita.fr>
14605
14606 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
14607 * src/closure.c, src/closure.h (itemsetsize): Rename as...
14608 (nitemset): for consistency with the rest of the project.
14609
23cbcc6c
AD
146102001-12-05 Akim Demaille <akim@epita.fr>
14611
14612 * src/closure.c (print_closure): Improve.
14613 (closure): Use it for printing input and output.
14614
03ec521c
AD
146152001-12-05 Akim Demaille <akim@epita.fr>
14616
14617 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
14618 indexed by nonterminals.
14619
3a7456dd
AD
146202001-12-05 Akim Demaille <akim@epita.fr>
14621
14622 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
14623 what it was!).
14624 * src/warshall.h: Remove accidental duplication of the content.
14625
1cbcf2e7
AD
146262001-12-05 Akim Demaille <akim@epita.fr>
14627
14628 * src/closure.c (set_fderives): De-obfuscate.
14629
84182270
AD
146302001-12-05 Akim Demaille <akim@epita.fr>
14631
14632 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
14633
3f6f053c
AD
146342001-12-05 Akim Demaille <akim@epita.fr>
14635
14636 * src/closure.c (set_firsts): De-obfuscate.
14637
7a5350ba
AD
146382001-12-05 Akim Demaille <akim@epita.fr>
14639
14640 * src/output.c (action_row): De-obfuscate
14641 using the good o' techniques: arrays not pointers, variable
14642 locality, BITISSET, RESETBIT etc.
14643
d954473d
AD
146442001-12-05 Akim Demaille <akim@epita.fr>
14645
14646 Pessimize the code to simplify it: from now on, all the states
14647 have a valid SHIFTS, which NSHIFTS is possibly 0.
14648
14649 * src/LR0.c (shifts_new): Be global and move to..
14650 * src/state.c, src/state.h: here.
14651 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
14652 * src/print_graph: Adjust.
14653
9839bbe5
AD
146542001-12-05 Akim Demaille <akim@epita.fr>
14655
14656 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
14657 * src/conflicts.c: Use it.
14658 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
14659 incorrectly ``simplified''.
14660
9f136c07
AD
146612001-12-05 Akim Demaille <akim@epita.fr>
14662
14663 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
14664 using the good o' techniques: arrays not pointers, variable
14665 locality, BITISSET, RESETBIT etc.
14666
b608206e
AD
146672001-12-05 Akim Demaille <akim@epita.fr>
14668
14669 * src/state.h (SHIFT_SYMBOL): New.
14670 * src/conflicts.c: Use it to deobfuscate.
14671
52afa962
AD
146722001-12-05 Akim Demaille <akim@epita.fr>
14673
14674 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
14675 (print_reductions): De-obfuscate using the good o' techniques:
14676 arrays not pointers, variable locality, BITISSET.
14677
e74dc321
AD
146782001-12-05 Akim Demaille <akim@epita.fr>
14679
14680 * src/conflicts.c (print_reductions): Arrays, not pointers.
14681 Use BITISSET.
14682
768fca83
AD
146832001-12-05 Akim Demaille <akim@epita.fr>
14684
14685 * src/conflicts.c (print_reductions): Pessimize, but clarify.
14686
a17e599f
AD
146872001-12-05 Akim Demaille <akim@epita.fr>
14688
14689 * src/conflicts.c (print_reductions): Improve variable locality.
14690
a04bc341
AD
146912001-12-05 Akim Demaille <akim@epita.fr>
14692
14693 * src/conflicts.c (print_reductions): Pessimize, but clarify.
14694
c8ea038e
AD
146952001-12-05 Akim Demaille <akim@epita.fr>
14696
14697 * src/conflicts.c (print_reductions): Improve variable locality.
14698
aa2aab3c
AD
146992001-12-05 Akim Demaille <akim@epita.fr>
14700
14701 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
14702 * src/lalr.c: Use them.
14703
b178c8cc
AD
147042001-12-05 Akim Demaille <akim@epita.fr>
14705
14706 * src/LR0.c (augment_automaton): Formatting changes.
14707 Better variable locality.
14708
f67d13aa
AD
147092001-12-05 Akim Demaille <akim@epita.fr>
14710
14711 * src/lalr.c (matrix_print): New.
14712 (transpose): Use it.
14713 Use arrays instead of pointers.
14714
c2713865
AD
147152001-12-05 Akim Demaille <akim@epita.fr>
14716
14717 * src/lalr.c (maxrhs): Move to...
14718 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
14719 * src/lalr.c (build_relations): Adjust.
14720
9887c18a
AD
147212001-12-05 Akim Demaille <akim@epita.fr>
14722
14723 * src/lalr.c (transpose): Free the memory allocated to the
14724 argument, as it is replaced by the results by the unique caller.
14725 (build_relations): Merely invoke transpose: it handles the memory
14726 deallocation.
14727 Improve variable locality.
14728 Avoid variables used as mere abbreviations.
14729 (compute_lookaheads): Use arrays instead of pointers.
14730
4d4f699c
AD
147312001-12-05 Akim Demaille <akim@epita.fr>
14732
14733 * src/lalr.c (initialize_F): Improve variable locality.
14734 Avoid variables used as mere abbreviations.
14735
80a69750
AD
147362001-12-05 Akim Demaille <akim@epita.fr>
14737
14738 * src/derives.c (print_derives): Display the ruleno.
14739 * src/lalr.c (initialize_F, transpose): Better variable locality
14740 to improve readability.
14741 Avoid variables used as mere abbreviations.
14742
fe961097
AD
147432001-12-05 Akim Demaille <akim@epita.fr>
14744
14745 * src/lalr.c (traverse): Use arrays instead of pointers.
14746
e3e4e814
AD
147472001-12-05 Akim Demaille <akim@epita.fr>
14748
14749 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
14750 the handling of squeue.
14751 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
14752
630e182b
AD
147532001-12-05 Akim Demaille <akim@epita.fr>
14754
14755 Because useless nonterminals are now kept alive (instead of being
14756 `destroyed'), we now sometimes examine them, and store information
14757 related to them. Hence we need to know their number, and adjust
14758 memory allocations.
14759
14760 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
14761 static.
14762 * src/LR0.c (allocate_itemsets): The memory allocated to
14763 `symbol_count' was used for two different purpose: once to count
14764 the number of occurrences of each symbol, and later reassigned to
14765 `shift_symbol', containing the symbol that can be shifted from a
14766 given state.
14767 Deobfuscate, i.e., allocate, use and free `symbol_count' here
14768 only, and...
14769 (new_itemsets): Allocate `shift_symbol' here.
14770 (allocate_itemsets): symbol_count includes useless nonterminals.
14771 Make room for them.
14772 (free_storage): Use `free', not `XFREE', for pointers that cannot
14773 be null.
14774
81b51460
AD
147752001-12-05 Akim Demaille <akim@epita.fr>
14776
14777 * src/nullable.c (set_nullable): Deobfuscate the handling of
14778 ritem.
14779 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
14780
3067fbef
AD
147812001-12-05 Akim Demaille <akim@epita.fr>
14782
14783 * src/gram.c, src/gram.h (ritem_print): New.
14784 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
14785 (This useless function was defined only to work around VMS linkers
14786 that can't handle compilation units with variables only).
14787 * src/reduce.c (dump_grammar): Use it to trace the construction of
14788 ritem.
14789
c2bea5f9
PE
147902001-12-04 Paul Eggert <eggert@twinsun.com>
14791
7d27c823
PE
14792 * src/bison.simple (union yyalloc): Change member names
14793 to be the same as the stack names.
14794 (yyparse): yyptr is now union yyalloc *, not char *.
14795 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
14796 and may generate better code on some machines.
c2bea5f9
PE
14797 (yystpcpy): Use prototype if __STDC__ is defined, not just
14798 if __cplusplus is defined.
35687a9d 14799
2c8a9dfa
AD
148002001-11-30 Akim Demaille <akim@epita.fr>
14801
14802 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
14803 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
14804 Gettext doesn't compile cleanly, and dies with -Werror.
14805 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
14806 Include WARNING_CFLAGS here.
14807 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
14808 before being defined.
14809
f4e421e6
AD
148102001-11-27 Paul Eggert <eggert@twinsun.com>
14811
14812 * lib/quotearg.h (quotearg_n, quotearg_n_style):
14813 First arg is int, not unsigned.
14814 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
14815 (SIZE_MAX, UINT_MAX): New macros.
14816 (quotearg_n_options): Abort if N is negative.
14817 Avoid overflow check on hosts where size_t is 64 bits and int
14818 is 32 bits, as overflow is impossible there.
14819 Fix off-by-one typo that caused unnecessary reallocation.
14820
7093d0f5
AD
148212001-11-29 Paul Eggert <eggert@twinsun.com>
14822
14823 Name space cleanup in generated parser.
14824
14825 * doc/bison.texinfo (Bison Parser): Discuss system headers
14826 and their effect on the user name space.
14827
14828 * src/bison.simple:
14829 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
14830 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
14831 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
14832
14833 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
14834 on user names when possible.
14835
14836 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
14837 Simplify test for whather <alloca.h> exists.
14838
14839 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
14840
14841 (<stdio.h>): Include if YYDEBUG.
14842
14843 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
14844 ! defined (yyoverflow) && ! defined (yymemcpy).
14845
14846 (yymemcpy, yyparse): Rename local variables as needed so that
14847 they all begin with 'yy'.
14848
14849 (yystrlen, yystpcpy): New functions.
14850
14851 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
14852 All uses changed.
14853
14854 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
14855 instead of relying on string.h functions. Use YYSTACK_ALLOC
14856 and YYSTACK_FREE instead of malloc and free.
14857
fd51e5ff
AD
148582001-11-30 Akim Demaille <akim@epita.fr>
14859
14860 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
14861 before their first uses.
14862 (YYBISON, YYPURE): Move to the top of the output.
14863
7d13ff5f
AD
148642001-11-30 Akim Demaille <akim@epita.fr>
14865
14866 * tests/reduce.at (Useless Nonterminals): Fix.
14867
892a3995
AD
148682001-11-30 Akim Demaille <akim@epita.fr>
14869
14870 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
14871 if body instead of `;' to pacify GCC's warnings.
14872
68f1e3ed
AD
148732001-11-30 Akim Demaille <akim@epita.fr>
14874
14875 Instead of mapping the LHS of unused rules to -1, keep the LHS
14876 valid, but flag the rules as invalid.
14877
14878 * src/gram.h (rule_t): `useful' is a new member.
14879 * src/print.c (print_grammar): Adjust.
14880 * src/derives.c (set_derives): Likewise.
14881 * src/reader.c (packgram, reduce_output): Likewise.
14882 * src/reduce.c (reduce_grammar_tables): Likewise.
14883 * tests/reduce.at (Underivable Rules, Useless Rules): New.
14884
d2d1b42b
AD
148852001-11-30 Akim Demaille <akim@epita.fr>
14886
14887 * src/reduce.c (reduce_output): Formatting changes.
14888 * src/print.c (print_results, print_grammar): Likewise.
14889 * tests/regression.at (Rule Line Numbers)
14890 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
14891
760b53a8
AD
148922001-11-30 Akim Demaille <akim@epita.fr>
14893
14894 * src/reduce.c (nonterminals_reduce): Instead of throwing away
14895 useless nonterminals, move them at the end of the symbol arrays.
14896 (reduce_output): Adjust.
14897 * tests/reduce.at (Useless Nonterminals): Adjust.
14898
00238958
AD
148992001-11-30 Akim Demaille <akim@epita.fr>
14900
14901 * src/reduce.c: Various comment/formatting changes.
14902 (nonterminals_reduce): New, extracted from...
14903 (reduce_grammar_tables): here.
14904 (reduce_grammar): Call nonterminals_reduce.
14905
396452de
PE
149062001-11-29 Paul Eggert <eggert@twinsun.com>
14907
14908 * src/bison.simple (YYSTACK_REALLOC): Remove.
14909 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
14910 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
14911 New macros.
14912 (union yyalloc): New type.
14913 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
14914 an arbitrary restriction on hosts where size_t is wider than int.
14915
14916 (yyparse): Don't dump core if alloca or malloc fails; instead, report
14917 a parser stack overflow. Allocate just one block of memory for all
14918 three stacks, instead of allocating three blocks; this typically is
14919 faster and reduces fragmentation.
14920
14921 Do not limit the number of items in the stack to a value that fits
14922 in 'int', as this is an arbitrary limit on hosts with 64-bit
14923 size_t and 32-bit int.
14924
147e184c
MA
149252001-11-29 Marc Autret <autret_m@epita.fr>
14926
14927 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
14928 of defining YYERROR_VERBOSE.
14929 [AT_DATA]: $4 is now out of C declarations in the prologue.
14930
426cf563
MA
149312001-11-28 Marc Autret <autret_m@epita.fr>
14932
14933 * src/reader.c (parse_dquoted_param): New.
14934 (parse_skel_decl): Use it.
14935 * src/lex.h: Add its prototype.
14936 * src/lex.c (literalchar): Become not static.
14937
c7925b99
MA
149382001-11-28 Marc Autret <autret_m@epita.fr>
14939
14940 * src/output.h: And put its extern declaration here.
14941 * src/output.c (error_verbose): Define here.
14942 (prepare): Echo name modification.
14943 * src/getargs.h: Clean its extern declaration.
14944 * src/getargs.c (error_verbose_flag): Remove.
14945 (getargs): Remove case 'e'.
14946 * src/options.c (option_table): 'error-verbose' is now seen as simple
14947 percent option.
14948 Include output.h.
14949
14950 * src/reader.c (read_declarations): Remove case tok_include.
14951 (parse_include_decl): Remove.
14952 * src/lex.h (token_t): Remove tok_include.
14953 * src/options.c (option_table): 'include' is now a simple command line
14954 option.
14955
5b5d1929
MA
149562001-11-28 Marc Autret <autret_m@epita.fr>
14957
14958 * src/bison.simple: Adjust muscle names.
14959 * src/muscle_tab.c (muscle_init): Also rename the muscles.
14960 * src/output.c (prepare): s/_/-/ for the muscles names.
14961 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
14962
8850be4b
MA
149632001-11-28 Marc Autret <autret_m@epita.fr>
14964
14965 * src/bison.simple: Fix debug.
14966 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
14967
4a38e613
AD
149682001-11-28 Akim Demaille <akim@epita.fr>
14969
14970 * src/LR0.c (shifts_new): New.
14971 (save_shifts, insert_start_shift, augment_automaton): Use it.
14972
4b35e1c1
AD
149732001-11-28 Akim Demaille <akim@epita.fr>
14974
14975 * src/closure.c (closure): `b' and `ruleno' denote the same value:
14976 keep ruleno only.
14977
d2b04478
AD
149782001-11-28 Akim Demaille <akim@epita.fr>
14979
14980 * src/closure.c (closure): Instead of looping over word in array
14981 then bits in words, loop over bits in array.
14982
2c4c30aa
AD
149832001-11-28 Akim Demaille <akim@epita.fr>
14984
14985 * src/closure.c (closure): No longer optimize the special case
14986 where all the bits of `ruleset[r]' are set to 0, to make the code
14987 clearer.
14988
576890b7
AD
149892001-11-28 Akim Demaille <akim@epita.fr>
14990
14991 * src/closure.c (closure): `r' and `c' are new variables, used to
14992 de-obfuscate accesses to RULESET and CORE.
14993
cb487d7d
AD
149942001-11-28 Akim Demaille <akim@epita.fr>
14995
14996 * src/reduce.c (reduce_print): Use ngettext.
14997 (dump_grammar): Improve the trace accuracy.
14998
6013d43f
AD
149992001-11-28 Akim Demaille <akim@epita.fr>
15000
15001 * src/reduce.c (dump_grammar): Don't translate trace messages.
15002
cb4956ee
AD
150032001-11-28 Akim Demaille <akim@epita.fr>
15004
15005 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
15006 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
15007 as all tags are free'ed afterwards.
15008 From Enrico Scholz.
15009
648185ab
PE
150102001-11-27 Paul Eggert <eggert@twinsun.com>
15011
15012 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
15013 use alloca when we didn't want to, and vice versa.
15014
68254a03
MA
150152001-11-27 Marc Autret <autret_m@epita.fr>
15016
9113b58f
AD
15017 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
15018 initialization.
68254a03
MA
15019 * src/output.c (prepare): Remove its update.
15020
04d843a2
MA
150212001-11-27 Marc Autret <autret_m@epita.fr>
15022
15023 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
15024 Use %error-verbose.
15025
d2079671 150262001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
15027
15028 * src/bison.simple: Remove YYERROR_VERBOSE using.
15029 Use %%error_verbose.
15030 (yyparse): Likewise.
15031 * src/output.c (prepare): Give its final value.
15032 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
15033 * src/getargs.h: Add its extern declaration.
15034 * src/getargs.c (error_verbose_flag): New int.
15035 (getargs): Update to catch new case.
15036 * src/options.c (option_table): 'error-verbose' is a new option.
15037 (shortopts): Update.
15038
e0327bc8
AD
150392001-11-27 Akim Demaille <akim@epita.fr>
15040
15041 * src/system.h: Use intl/libgettext.h.
15042 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
15043
000f1a3c
AD
150442001-11-27 Akim Demaille <akim@epita.fr>
15045
15046 * tests/torture.at (Exploding the Stack Size with Malloc):
15047 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
15048
26cfe0be
AD
150492001-11-27 Akim Demaille <akim@epita.fr>
15050
15051 * src/files.c: Include error.h.
15052 Reported by Hans Aberg.
15053
f6bd5427
MA
150542001-11-26 Marc Autret <autret_m@epita.fr>
15055
d2079671 15056 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
15057 (read_declarations): Add case tok_include.
15058 * src/getargs.h (include): Add its extern definition.
15059 * src/getargs.c (include): New const char *.
15060 (getargs): Add case '-I'.
15061 * src/options.c (option_table): Add include as command line and
15062 percent option.
15063 * src/lex.h (token_t): Add tok_include.
15064
2ca209c1
AD
150652001-11-26 Akim Demaille <akim@epita.fr>
15066
15067 * src/reader.c (readgram): Make sure rules for mid-rule actions
15068 have a lineno equal to that of their host rule.
15069 Reported by Hans Aberg.
15070 * tests/regression.at (Rule Line Numbers): New.
15071
0e41b407
AD
150722001-11-26 Akim Demaille <akim@epita.fr>
15073
15074 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
15075 size_ts.
15076
150772001-11-26 Akim Demaille <akim@epita.fr>
15078
15079 * src/complain.c, src/complain.h (error): Remove, provided by
15080 lib/error.[ch].
15081
e0c40012
AD
150822001-11-26 Akim Demaille <akim@epita.fr>
15083
15084 * src/reader.c (read_declarations): Don't abort on tok_illegal,
15085 issue an error message.
15086 * tests/regression.at (Invalid %directive): New.
15087 Reported by Hans Aberg.
15088
5e147124
AD
150892001-11-26 Akim Demaille <akim@epita.fr>
15090
15091 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
15092 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
15093
a034c8b8
AD
150942001-11-26 Akim Demaille <akim@epita.fr>
15095
15096 * src/conflicts.c (conflicts_print): Don't complain at all when
15097 there are no reduce/reduce conflicts, and as many shift/reduce
15098 conflicts as expected.
15099 * tests/regression.at (%expect right): Adjust.
15100
c64a20f3
AD
151012001-11-23 Akim Demaille <akim@epita.fr>
15102
15103 * lib/alloca.c: Update, from fileutils.
15104
5b0d29bb
AD
151052001-11-23 Akim Demaille <akim@epita.fr>
15106
15107 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
15108
722c4bfe
AD
151092001-11-23 Akim Demaille <akim@epita.fr>
15110
15111 * src/system.h: Include alloca.h.
15112 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
15113
6255b435
AD
151142001-11-23 Akim Demaille <akim@epita.fr>
15115
15116 * src/print_graph.c (print_actions): Remove `rule', unused.
15117 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
15118 pacify GCC's signed < unsigned warnings.
15119 * src/closure.c (itemsetsize): Likewise.
15120 * src/reader.c (symbol_list_new): Static.
15121
b29b2ed5
AD
151222001-11-23 Akim Demaille <akim@epita.fr>
15123
15124 Attaching lineno to buckets is stupid, since only one copy of each
15125 symbol is kept, only the line of the first occurrence is kept too.
15126
15127 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
15128 * src/reader.c (rline_allocated): Remove, unused.
15129 (symbol_list): Have a `line' member.
15130 (symbol_list_new): New.
15131 (readgram): Use it.
15132 * src/print.c (print_grammar): Output the rule line numbers.
15133 * tests/regression.at (Solved SR Conflicts)
15134 (Unresolved SR Conflicts): Adjust.
15135 Reported by Hans Aberg.
15136
a81b1d4a
MA
151372001-11-22 Marc Autret <autret_m@epita.fr>
15138
15139 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
15140
c1ecb3c1
MA
151412001-11-22 Marc Autret <autret_m@epita.fr>
15142
15143 * src/muscle_tab.c (muscle_init): Remove initialization of
15144 skeleton muscle.
15145 * src/output.c (output_master_parser): Do it here.
15146
fbe01355
AD
151472001-11-20 Akim Demaille <akim@epita.fr>
15148
15149 * po/sv.po: New.
15150 * configure.in (ALL_LINGUAS): Adjust.
15151 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
15152 longer contains strings to translate.
15153
81e895c0
AD
151542001-11-19 Akim Demaille <akim@epita.fr>
15155
15156 * src/conflicts.c (conflicts_print): Add a missing \n.
15157
6bb1878b
AD
151582001-11-19 Akim Demaille <akim@epita.fr>
15159
15160 * src/nullable.c (nullable_print): New.
15161 (set_nullable): Call it when tracing.
15162 Better locality of variables.
15163
d9ec2d07
AD
151642001-11-19 Akim Demaille <akim@epita.fr>
15165
15166 * src/print.c (print_actions): Better locality of variables.
15167
720e5c1b
AD
151682001-11-19 Akim Demaille <akim@epita.fr>
15169
15170 * src/derives.c (print_derives): Fix and enrich.
15171 * src/closure.c (print_fderives): Likewise.
15172
fb908786
AD
151732001-11-19 Akim Demaille <akim@epita.fr>
15174
15175 * src/closure.c (itemsetend): Remove, replaced with...
15176 (itemsetsize): new.
15177
125ecb56
AD
151782001-11-19 Akim Demaille <akim@epita.fr>
15179
15180 * src/LR0.c (kernel_end): Remove, replaced with...
15181 (kernel_size): new.
15182
d8cf039f
AD
151832001-11-19 Akim Demaille <akim@epita.fr>
15184
15185 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
15186 to clarify.
15187
7bec0760
AD
151882001-11-19 Akim Demaille <akim@epita.fr>
15189
15190 * src/closure.c (closure): Use arrays instead of pointers to clarify.
15191
c87d4863
AD
151922001-11-19 Akim Demaille <akim@epita.fr>
15193
15194 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
15195 trace messages.
15196 * src/LR0.c: Likewise.
15197 (allocate_itemsets): Use arrays instead of pointers to clarify.
15198
9bfe901c
AD
151992001-11-19 Akim Demaille <akim@epita.fr>
15200
15201 * src/getargs.c (statistics_flag): Replace with...
15202 (trace_flag): New.
15203 (longopts): Accept --trace instead of --statistics.
15204 * src/getargs.h, src/options.c: Adjust.
15205 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
15206 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
15207
97db7bd4
AD
152082001-11-19 Akim Demaille <akim@epita.fr>
15209
cc72668c 15210 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
15211 pointers to clarify the code.
15212 (save_reductions, save_shifts): Factor common parts of alternatives.
15213
2c5f66ed
AD
152142001-11-19 Akim Demaille <akim@epita.fr>
15215
15216 * src/LR0.c (new_state, get_state): Complete TRACE code.
15217 * src/closure.c: Include `reader.h' to get `tags', needed by the
15218 trace code.
15219 Rename the conditional DEBUG as TRACE.
15220 Output consistently TRACEs to stderr, not stdout.
15221 * src/derives.c: Likewise.
15222 * src/reduce.c: (inaccessable_symbols): Using if is better style
15223 than goto.
15224 Use `#if TRACE' instead of `#if 0' for tracing code.
15225
300f275f
AD
152262001-11-19 Akim Demaille <akim@epita.fr>
15227
15228 * src/system.h (LIST_FREE, shortcpy): New.
15229 * src/LR0.c: Use them.
15230 * src/output.c (free_itemsets, free_reductions, free_shifts):
15231 Remove, replaced by LIST_FREE.
15232
f59c437a
AD
152332001-11-19 Akim Demaille <akim@epita.fr>
15234
15235 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
15236 (REDUCTIONS_ALLOC): New.
15237 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
15238 allocation.
15239
6986fd9e
AD
152402001-11-19 Akim Demaille <akim@epita.fr>
15241
15242 * src/LR0.c (new_state): Complete trace code.
15243 * src/nullable.c (set_nullable): Don't translate traces.
15244
4bc30f78
AD
152452001-11-19 Akim Demaille <akim@epita.fr>
15246
15247 * src/print_graph.c (print_core): Better locality of variables.
15248 * src/print.c (print_core): Likewise.
15249
08a946e0
AD
152502001-11-19 Akim Demaille <akim@epita.fr>
15251
15252 * src/vcg.c: You do the output, so you are responsible of the
15253 handling of VCG syntax, in particular: use quotearg.
15254 * src/print_graph.c: Don't.
15255 (print_actions): Don't output the actions as part of the nodes,
15256 since that's the job of the edges.
15257 (print_state): Don't output by hand: fill the node description,
9bfe901c 15258 and ask for its output.
08a946e0 15259
f0473484
AD
152602001-11-19 Akim Demaille <akim@epita.fr>
15261
cc72668c
AD
15262 * src/bison.simple (yyparse): When verbosely reporting an error,
15263 no longer put additional quotes around token names.
f0473484
AD
15264 * tests/calc.at: Adjust.
15265
e41dc700
AD
152662001-11-19 Akim Demaille <akim@epita.fr>
15267
15268 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
15269 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
15270 * src/output.c: Adjust.
15271
652a871c
AD
152722001-11-19 Akim Demaille <akim@epita.fr>
15273
15274 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
15275 (rule_t): this.
15276 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
15277
b2ed6e58
AD
152782001-11-19 Akim Demaille <akim@epita.fr>
15279
15280 * src/gram.h (rule_t): New.
15281 (rule_table): New.
15282 (rrhs, rlhs): Remove, part of state_t.
15283 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
15284 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15285 * src/reader.c, src/reduce.c: Adjust.
15286
edad7067
AD
152872001-11-19 Akim Demaille <akim@epita.fr>
15288
15289 * src/reader.c (symbols_output): New, extracted from...
15290 (packsymbols): Here.
15291 (reader): Call it.
15292
3feec034
AD
152932001-11-19 Akim Demaille <akim@epita.fr>
15294
15295 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
15296 (maxrhs): this new function.
15297
ddcd5fdf
AD
152982001-11-19 Akim Demaille <akim@epita.fr>
15299
cc72668c 15300 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
15301 Adjust.
15302
bb527fc2
AD
153032001-11-19 Akim Demaille <akim@epita.fr>
15304
cc72668c 15305 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
15306 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
15307 * src/lalr.c: Adjust.
15308
a845a697
AD
153092001-11-19 Akim Demaille <akim@epita.fr>
15310
15311 * src/lalr.c (initialize_LA): Only initialize LA. Let...
15312 (set_state_table): handle the `lookaheads' members.
15313
f004bf6a
AD
153142001-11-19 Akim Demaille <akim@epita.fr>
15315
cc72668c
AD
15316 * src/lalr.h (lookaheads): Removed array, whose contents is now
15317 a member of...
f004bf6a
AD
15318 (state_t): this structure.
15319 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
15320 Adjust.
15321
de326cc0
AD
153222001-11-19 Akim Demaille <akim@epita.fr>
15323
cc72668c
AD
15324 * src/lalr.h (consistent): Removed array, whose contents is now
15325 a member of...
de326cc0
AD
15326 (state_t): this structure.
15327 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
15328 Adjust.
15329
90b4416b
AD
153302001-11-19 Akim Demaille <akim@epita.fr>
15331
cc72668c
AD
15332 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
15333 contents are now members of...
90b4416b
AD
15334 (state_t): this structure.
15335 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
15336 Adjust.
15337
9703cc49
AD
153382001-11-19 Akim Demaille <akim@epita.fr>
15339
15340 * src/lalr.h (state_t): New.
15341 (state_table): Be a state_t * instead of a core **.
15342 (accessing_symbol): Remove, part of state_t.
15343 * src/lalr.c: Adjust.
15344 (set_accessing_symbol): Merge into...
15345 (set_state_table): this.
15346 * src/print_graph.c, src/conflicts.c: Adjust.
15347
d803322e
AD
153482001-11-14 Akim Demaille <akim@epita.fr>
15349
15350 * tests/calc.at, tests/output.at, tests/regression.at,
15351 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
15352 now the tests are run in private dirs, therefore AC_CLEANUP and
15353 family can be simplified to 0-ary.
15354 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
15355 use abs. path to find config.h.
15356 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
15357 stderr, there can be way too much random noise.
15358 Instead pass -Werror to GCC and rely on the exit status.
15359 Reported by Wolfram Wagner.
15360
3d76b07d
AD
153612001-11-14 Akim Demaille <akim@epita.fr>
15362
15363 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
15364 defined only if yyoverflow is defined, to avoid `warning: unused
15365 variable `yyvs1''.
15366 Reported by The Test Suite.
15367
09b503c8
AD
153682001-11-14 Akim Demaille <akim@epita.fr>
15369
15370 * src/print.c: Include reduce.h.
15371 Reported by Hans Aberg.
15372
153732001-11-14 Akim Demaille <akim@epita.fr>
15374
15375 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
15376 Revert a previous patch: these are really const.
15377 * src/conflicts.c (conflict_report): Additional useless pair of
15378 braces to pacify GCC's warnings for `if () if () {} else {}'.
15379 * src/lex.c (parse_percent_token): Replace equal_offset with
15380 arg_offset.
15381 arg is const.
15382 Be sure to strdup `arg' when used, since there is no reason for
15383 token_buffer not to change.
15384
0f37a994
AD
153852001-11-14 Akim Demaille <akim@epita.fr>
15386
15387 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
15388 definition.
15389 * src/main.c (main): Use them.
15390 Suggested by Hans Aberg.
15391
d39d93b8
AD
153922001-11-12 Akim Demaille <akim@epita.fr>
15393
15394 * src/system.h (ngettext): Now that we use ngettext, be sure to
15395 provide a default definition when NLS are not used.
15396
9edcd895
AD
153972001-11-12 Akim Demaille <akim@epita.fr>
15398
15399 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
15400 Use @kbd to denote user input.
15401 (Language and Grammar): ANSIfy the example.
15402 Adjust its layout for info/notinfo.
15403 (Location Tracking Calc): Output error messages to stderr.
15404 Output locations in a more GNUtically correct way.
15405 Fix a couple of Englishos.
15406 Adjust @group/@end group pairs.
15407
7da99ede
AD
154082001-11-12 Akim Demaille <akim@epita.fr>
15409
e3aa65c5 15410 %expect was not functioning at all.
7da99ede
AD
15411
15412 * src/conflicts.c (expected_conflicts): Set to -1.
15413 (conflict_report): Use ngettext.
15414 (conflicts_print): Check %expect and make its violation an error.
15415 * doc/bison.texinfo (Expect Decl): Adjust.
15416 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
15417 * tests/regression.at (%expect not enough, %expect right)
15418 (%expect too much): New.
15419
ba9dda1a
AD
154202001-11-12 Akim Demaille <akim@epita.fr>
15421
15422 * tests/regression.at (Conflicts): Rename as...
15423 (Unresolved SR Conflicts): this.
15424 (Solved SR Conflicts): New.
15425
337c5bd1
AD
154262001-11-12 Akim Demaille <akim@epita.fr>
15427
15428 * src/reduce.c (print_results): Rename as...
15429 (reduce_output): This.
15430 Output to OUT, passed as argument, instead of output_obstack.
15431 (dump_grammar): Likewise.
15432 (reduce_free): New.
15433 Also free V1.
15434 (reduce_grammar): No longer call reduce_output, since...
15435 * src/print.c (print_results): do it.
15436 * src/main.c (main): Call reduce_free;
15437
c73a41af
AD
154382001-11-12 Akim Demaille <akim@epita.fr>
15439
15440 * src/conflicts.c (print_reductions): Accept OUT as argument.
15441 Output to it, not to output_obstack.
15442 * src/print.c (print_actions): Adjust.
15443
0df87bb6
AD
154442001-11-12 Akim Demaille <akim@epita.fr>
15445
15446 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
15447 the result instead of using...
15448 (src_total, rrc_total, src_count, rrc_count): Remove.
15449 (any_conflicts): Remove.
15450 (print_conflicts): Split into...
15451 (conflicts_print, conflicts_output): New.
15452 * src/conflicts.h: Adjust.
15453 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 15454 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
15455 * tests/regression.at (Conflicts): New.
15456 Reported by Tom Lane.
15457
e4d3d4de
AD
154582001-11-12 Akim Demaille <akim@epita.fr>
15459
15460 * tests/regression.at (Invalid input): Remove, duplicate with
15461 ``Invalid input: 1''.
15462
6d7d248e
AD
154632001-11-12 Akim Demaille <akim@epita.fr>
15464
15465 * tests/torture.at (AT_DATA_STACK_TORTURE)
15466 (Exploding the Stack Size with Alloca)
15467 (Exploding the Stack Size with Malloc): New.
15468
e9e4c321
AD
154692001-11-12 Akim Demaille <akim@epita.fr>
15470
15471 * src/bison.simple (YYSTACK_REALLOC): New.
15472 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 15473 Reported by Per Allansson.
e9e4c321 15474
5f7e0832
AD
154752001-11-12 Pascal Bart <pascal.bart@epita.fr>
15476
15477 * src/bison.simple: Define type yystype instead of YYSTYPE, and
15478 define CPP macro, which substitute YYSTYPE by yystype.
15479 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
15480 with yyltype/YYLTYPE. This allows inclusion of the generated
15481 header within the parser if the compiler, such as GGC, accepts
15482 multiple equivalent #defines.
15483 From Akim.
15484
e3f1699f
AD
154852001-11-05 Akim Demaille <akim@epita.fr>
15486
15487 * src/reader.c (symbols_output): New, extracted from...
15488 (packsymbols): here.
15489 (reader): Adjust.
15490
65be0866
AD
154912001-11-05 Akim Demaille <akim@epita.fr>
15492
15493 * src/lex.c (parse_percent_token): s/quotearg/quote/.
15494
e4d910bf
AD
154952001-11-05 Akim Demaille <akim@epita.fr>
15496
15497 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
15498 pattern.
15499
951366c1
AD
155002001-11-05 Akim Demaille <akim@epita.fr>
15501
15502 * src/options.h (struct option_table_struct): set_flags is void*.
15503 * src/options.c (longopts): Support `--output' and `%output'.
15504 (usage): Adjust.
15505 * src/lex.h (tok_setopt): Remove, replaced with...
15506 (tok_intopt, tok_stropt): these new guys.
15507 * src/lex.c (getopt.h): Not needed.
15508 (token_buffer, unlexed_token_buffer): Not const.
15509 (percent_table): Promote `-' over `_' in directive names.
15510 Active `%name-prefix', `file-prefix', and `output'.
15511 (parse_percent_token): Accept possible arguments to directives.
15512 Promote `-' over `_' in directive names.
15513
d8988b2f
AD
155142001-11-04 Akim Demaille <akim@epita.fr>
15515
15516 * doc/bison.texinfo (Decl Summary): Split the list into
15517 `directives for grammars' and `directives for bison'.
15518 Sort'em.
15519 Add description of `%name-prefix', `file-prefix', and `output'.
15520 Promote `-' over `_' in directive names.
15521 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
15522 Simplify the description of `--name-prefix'.
15523 Promote `-' over `_' in directive names.
15524 Promote `--output' over `--output-file'.
15525 Fix the description of `--defines'.
15526 * tests/output.at: Exercise %file-prefix and %output.
15527
6468d18e
AD
155282001-11-02 Akim Demaille <akim@epita.fr>
15529
15530 * doc/refcard.tex: Update.
15531
6b7e85b9
AD
155322001-11-02 Akim Demaille <akim@epita.fr>
15533
15534 * src/symtab.h (SUNDEF): New.
15535 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
15536 stand for `uninitialized', instead of 0.
15537 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
15538 * src/lex.c (lex): Adjust.
15539
15540 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
15541 Number it 0.
15542 Let yylex return it instead of a plain 0.
15543 Reported by Dick Streefland.
15544
cd5aafcf
AD
155452001-11-02 Akim Demaille <akim@epita.fr>
15546
15547 * tests/regression.at (Mixing %token styles): New test.
15548
037ca2f1
AD
155492001-11-02 Akim Demaille <akim@epita.fr>
15550
15551 * src/reader.c (parse_thong_decl): Formatting changes.
15552 (token_translations_init): New, extracted from...
15553 (packsymbols): Here.
15554 Adjust.
15555
270a173c
AD
155562001-11-01 Akim Demaille <akim@epita.fr>
15557
15558 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
15559 Check that `9foo.y' produces correct cpp guards.
15560 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
15561 guards.
15562 Reported by Wwp.
15563
561f9a30
AD
155642001-11-01 Akim Demaille <akim@epita.fr>
15565
15566 * tests/regression.at (Invalid input: 2): New.
15567 * src/lex.c (unlexed_token_buffer): New.
15568 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
15569 too.
15570 Reported by Wwp.
15571
f987e9d2
AD
155722001-11-01 Akim Demaille <akim@epita.fr>
15573
15574 * tests/calc.at: Catch up with 1.30.
15575 * configure.in: Bump to 1.49a.
15576 Adjust to newer Autotest.
15577
0846f581
PB
155782001-10-19 Pascal Bart <pascal.bart@epita.fr>
15579
15580 * src/conflicts.c: Move global variables rrc_total and src_total ...
15581 (print_conflicts): here.
15582 * src/output.c (output): Free global variable user_toknums.
15583 * src/lex.c (token_obstack): Become static.
15584
3c1a79b3
AD
155852001-10-18 Akim Demaille <akim@epita.fr>
15586
15587 * tests/atlocal.in (GCC): Add.
15588 * tests/calc.at: s/m4_match/m4_bmatch/.
15589 s/m4_patsubst/m4_bpatsubst/.
15590 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
15591 * configure.in: AC_SUBST(GCC).
15592
5d52e7d0
MA
155932001-10-14 Marc Autret <autret_m@epita.fr>
15594
15595 * src/options.c (create_long_option_table): Fix.
15596
631aa1d3
AD
155972001-10-10 Akim Demaille <akim@epita.fr>
15598
15599 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
15600
f6ec6d13
AD
156012001-10-04 Akim Demaille <akim@epita.fr>
15602
15603 * src/reader.c (parse_union_decl): Push the caracters in
15604 union_obstack, not attrs_obstack.
15605
342b8b6e
AD
156062001-10-04 Akim Demaille <akim@epita.fr>
15607
15608 Merge in the branch 1.29.
15609
15610 * src/reader.c (packsymbols): Use a temporary obstack for
15611 `%%tokendef', since output_stack is already used elsewhere.
15612
15613 2001-10-02 Akim Demaille <akim@epita.fr>
15614
15615 Bump 1.29d.
15616
15617 2001-10-02 Akim Demaille <akim@epita.fr>
15618
15619 Version 1.29c.
15620
15621 2001-10-02 Akim Demaille <akim@epita.fr>
15622
15623 * tests/regression.at (Invalid CPP headers): New.
15624 From Alexander Belopolsky.
15625 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
15626
15627 2001-10-02 Akim Demaille <akim@epita.fr>
15628
15629 * tests/regression.at (Invalid input): New.
15630 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
15631 Reported by Shura.
15632
15633 2001-10-02 Akim Demaille <akim@epita.fr>
15634
15635 * tests/calc.at: Now that --debug works, the tests must be adjusted.
15636
15637 2001-10-02 Akim Demaille <akim@epita.fr>
15638
15639 * src/output.c (output_parser): Assert `skeleton'.
15640 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
15641 systems.
15642 From Shura.
15643
15644 2001-10-01 Marc Autret <autret_m@epita.fr>
15645
15646 * src/lex.h: Echo modifications.
15647 * src/lex.c (unlex): Parameter is now token_t.
15648 From Hans Aberg.
15649
15650 2001-10-01 Marc Autret <autret_m@epita.fr>
15651
15652 * src/main.c: Include lex.h.
15653 From Hans Aberg.
15654
15655 2001-09-29 Akim Demaille <akim@epita.fr>
15656
15657 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
15658
15659 2001-09-28 Akim Demaille <akim@epita.fr>
15660
15661 * tests/testsuite.at: Update to newer Autotest.
15662 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
15663
15664 2001-09-27 Akim Demaille <akim@epita.fr>
15665
15666 Position independent wrapper.
15667
15668 * tests/bison: Remove.
15669 * tests/bison.in: New.
15670 * configure.in: Adjust.
15671
15672 2001-09-27 Paul Eggert <eggert@twinsun.com>
15673
15674 Port quotearg fixes from tar 1.13.24.
15675
15676 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
15677 tm to be declared.
15678 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
15679 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
15680
15681 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
15682 * m4/mbrtowc.m4: New file.
15683 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
15684 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
15685
15686 2001-09-27 Akim Demaille <akim@epita.fr>
15687
15688 Bump to 1.29c.
15689
15690 2001-09-27 Akim Demaille <akim@epita.fr>
15691
15692 Version 1.29b.
15693
15694 2001-09-25 Akim Demaille <akim@epita.fr>
15695
15696 * src/system.h: Include `xalloc.h'.
15697 Remove it from the C files.
15698 * src/files.c (output_files): Free the obstacks.
15699 * src/lex.c (init_lex): Rename as...
15700 (lex_init): this.
15701 (lex_free): New.
15702 * src/main.c (main): Use it.
15703
15704 2001-09-24 Marc Autret <autret_m@epita.fr>
15705
15706 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
15707 to output informations in fout (FILE*).
15708 (open_graph, close_graph): Likewise.
15709 (output_graph, output_edge, output_node): Likewise.
15710 * src/vcg.h: Update function prototypes.
15711 * src/print_graph.c (print_graph): Open output graph file.
15712 (print_actions): Adjust.
15713 * src/files.h: Remove extern declaration.
15714 * src/files.c: Remove graph_obstack declaration.
15715 (open_files): Remove graph_obstack initialization.
15716 (output_files): Remove graph_obstack saving.
15717
15718 2001-09-24 Marc Autret <autret_m@epita.fr>
15719
15720 * src/files.c (compute_output_file_names): Fix.
15721
15722 2001-09-24 Marc Autret <autret_m@epita.fr>,
15723 Akim Demaille <akim@epita.fr>
15724
15725 * src/reader.c (reader): Remove call to free_symtab ().
15726 * src/main.c (main): Call it here.
15727 Include symtab.h.
15728 * src/conflicts.c (initialize_conflicts): Rename as...
15729 (solve_conflicts): this.
15730 * src/print.c (print_core, print_actions, print_state)
15731 (print_grammar): Dump to a file instead a `output_obstack'.
15732 (print_results): Dump `output_obstack', and then proceed with the
15733 FILE *.
15734 * src/files.c (compute_output_file_names, close_files): New.
15735 (output_files): Adjust.
15736 * src/main.c (main): Adjust.
15737
15738 2001-09-23 Marc Autret <autret_m@epita.fr>
15739
15740 * src/files.c (compute_header_macro): Computes header macro name
15741 from spec_defines_file when given.
15742
15743 2001-09-23 Marc Autret <autret_m@epita.fr>
15744
15745 * src/files.c (output_files): Add default extensions.
15746
15747 2001-09-22 Akim Demaille <akim@epita.fr>
15748
15749 * src/conflicts.c (finalize_conflicts): Rename as...
15750 (free_conflicts): this.
15751
15752 2001-09-22 Akim Demaille <akim@epita.fr>
15753
15754 * src/gram.c (gram_free): Rename back as...
15755 (dummy): this.
15756 (output_token_translations): Free `token_translations'.
15757 * src/symtab.c (free_symtab): Free the tag field.
15758
15759 2001-09-22 Akim Demaille <akim@epita.fr>
15760
15761 Remove `translations' as it is always set to true.
15762
15763 * src/gram.h: Adjust.
15764 * src/reader.c (packsymbols, parse_token_decl): Adjust
15765 * src/print.c (print_grammar): Adjust.
15766 * src/output.c (output_token_translations): Adjust.
15767 * src/lex.c (lex): Adjust.
15768 * src/gram.c: Be sure the set pointers to NULL.
15769 (dummy): Rename as...
15770 (gram_free): this.
15771
15772 2001-09-22 Akim Demaille <akim@epita.fr>
15773
15774 * configure.in: Invoke AM_LIB_DMALLOC.
15775 * src/system.h: Use dmalloc.
15776 * src/LR0.c: Be sure to have pointers initialized to NULL.
15777 (allocate_itemsets): Allocate kernel_items only if needed.
15778
15779 2001-09-22 Akim Demaille <akim@epita.fr>
15780
15781 * configure.in: Bump to 1.29b.
15782 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
15783 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
15784 need xmalloc.c in calc.y.
15785 From Pascal Bart.
15786
15787 2001-09-21 Akim Demaille <akim@epita.fr>
15788
15789 Version 1.29a.
15790 * Makefile.maint, config/config.guess, config/config.sub,
15791 * config/missing: Update from masters.
15792 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
15793 upon package.m4.
15794 * configure.in (ALL_LINGUAS): Add `tr'.
15795
15796 2001-09-21 Akim Demaille <akim@epita.fr>
15797
15798 * tests/Makefile.am (package.m4): Move to...
15799 ($(srcdir)/$(TESTSUITE)): here.
15800
15801 2001-09-20 Akim Demaille <akim@epita.fr>
15802
15803 * src/complain.c: No longer try to be standalone: use system.h.
15804 Don't assume __STDC__ is defined to 1. Just test if it is defined.
15805 * src/complain.h: Likewise.
15806 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
15807 Remove the unused variable `n'.
15808 From Albert Chin-A-Young.
15809
15810 2001-09-18 Marc Autret <autret_m@epita.fr>
15811
15812 * doc/bison.1: Update.
15813 * doc/bison.texinfo (Bison Options): Update --defines and --graph
15814 descriptions.
15815 (Option Cross Key): Update.
15816 Add --graph.
15817
15818 2001-09-18 Marc Autret <autret_m@epita.fr>
15819
15820 * tests/regression.at: New test (comment in %union).
15821
15822 2001-09-18 Marc Autret <autret_m@epita.fr>
15823
15824 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
15825 do that.
15826 Reported by Keith Browne.
15827
15828 2001-09-18 Marc Autret <autret_m@epita.fr>
15829
15830 * tests/output.at: Add tests for --defines and --graph.
15831
15832 2001-09-18 Marc Autret <autret_m@epita.fr>
15833
15834 * tests/output.at: Removes tests of %{header,src}_extension features.
15835
15836 2001-09-18 Akim Demaille <akim@epita.fr>
15837
15838 * tests/Makefile.am (package.m4): New.
15839 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
15840 (_AT_CHECK_CALC_ERROR): Likewise.
15841 Factor the `, ' part of verbose error messages.
15842
15843 2001-09-18 Marc Autret <autret_m@epita.fr>
15844
15845 * src/getargs.c (longopts): Declare --defines and --graph as options
15846 with optional arguments.
15847 * src/files.h: Add extern declarations.
15848 * src/files.c (spec_graph_file, spec_defines_file): New.
15849 (output_files): Update.
15850 Remove CPP-outed code.
15851
15852 2001-09-18 Marc Autret <autret_m@epita.fr>
15853
15854 Turn off %{source,header}_extension feature.
15855
15856 * src/files.c (compute_exts_from_gf): Update.
15857 (compute_exts_from_src): Update.
15858 (output_files): CPP-out useless code.
15859 * src/files.h: Remove {header,source}_extension extern declarations.
15860 * src/reader.c (parse_dquoted_param): CPP-out.
15861 (parse_header_extension_decl): Remove.
15862 (parse_source_extension_decl): Remove.
15863 (read_declarations): Remove cases tok_{hdrext,srcext}.
15864 * src/lex.c (percent_table): Remove {header,source}_extension entries.
15865 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
15866
15867 2001-09-10 Akim Demaille <akim@epita.fr>
15868
15869 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
15870 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
15871 (AT_CHECK_OUTPUT): this.
15872 Merely check ls' exit status, its output is useless.
15873
15874 2001-09-10 Akim Demaille <akim@epita.fr>
15875
15876 * tests/calc.at: Use m4_match.
15877 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
15878
15879 2001-09-10 Marc Autret <autret_m@epita.fr>,
15880 Akim Demaille <akim@epita.fr>
15881
15882 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
15883 enum color_e.
15884 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
15885 to `normal'.
15886 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
15887 * src/lex.h: Adjust prototype.
15888 (token_t): Add `tok_undef'.
15889 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
15890 (parse_percent_token): Now returns token_t.
15891 Add default statement in switch.
15892 (lex): Separate `c' as an input variable, from the token_t result
15893 part.
15894 (unlexed): Is a token_t.
15895
15896 2001-09-10 Akim Demaille <akim@epita.fr>
15897
15898 * configure.in: Bump to 1.29a.
15899
15900 2001-09-07 Akim Demaille <akim@epita.fr>
15901
15902 Version 1.29.
15903
15904 2001-08-30 Akim Demaille <akim@epita.fr>
15905
15906 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
15907 * m4/atconfig.m4: Remove.
15908 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
15909 * tests/bison: New.
15910 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
15911 m4_if, m4_patsubst, and m4_regexp.
15912 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
15913 `input' file instead of echo.
15914
15915 2001-08-29 Akim Demaille <akim@epita.fr>
15916
15917 Bump to 1.28e.
15918
15919 2001-08-29 Akim Demaille <akim@epita.fr>
15920
15921 Version 1.28d.
15922
15923 2001-08-29 Paul Eggert <eggert@twinsun.com>
15924
15925 * src/bison.simple (yyparse): Don't take the address of an
15926 item before the start of an array, as that doesn't conform to
15927 the C Standard.
15928
15929 2001-08-29 Robert Anisko <anisko_r@epita.fr>
15930
15931 * doc/bison.texinfo (Location Tracking Calc): New node.
15932
15933 2001-08-29 Paul Eggert <eggert@twinsun.com>
15934
15935 * src/output.c (output): Do not define const, as this now
15936 causes more problems than it cures.
15937
15938 2001-08-29 Akim Demaille <akim@epita.fr>
15939
15940 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
15941 the nodes.
15942 Be sure to tag the `detailmenu'.
15943
15944 2001-08-29 Akim Demaille <akim@epita.fr>
15945
15946 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
15947 download in a tmp dir.
15948
15949 2001-08-28 Marc Autret <autret_m@epita.fr>
15950
15951 * config/depcomp: New file.
15952
15953 2001-08-28 Marc Autret <autret_m@epita.fr>
15954
15955 * doc/bison.1 (mandoc): Adjust.
15956 From Juan Manuel Guerrero.
15957
15958 2001-08-28 Marc Autret <autret_m@epita.fr>
15959
15960 * src/print_graph.c (print_state): Fix.
15961
15962 2001-08-27 Marc Autret <autret_m@epita.fr>
15963
15964 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
15965 char * members.
15966 Echo modifications to the functions prototypes.
15967 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
15968
15969 2001-08-27 Marc Autret <autret_m@epita.fr>
15970
15971 * src/vcg.c: Include `xalloc.h'.
15972 (add_colorentry): New.
15973 (add_classname): New.
15974 (add_infoname): New.
15975 * src/vcg.h: Add new prototypes.
15976
15977 2001-08-27 Akim Demaille <akim@epita.fr>
15978
15979 * Makefile.maint: Sync. again with CVS Autoconf.
15980
15981 2001-08-27 Akim Demaille <akim@epita.fr>
15982
15983 * Makefile.maint: Formatting changes.
15984 (po-update, cvs-update, update): New targets.
15985 (AMTAR): Remove.
15986
15987 2001-08-27 Akim Demaille <akim@epita.fr>
15988
15989 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
15990 * Makefile.maint: Sync. with CVS Autoconf.
15991
15992 2001-08-27 Marc Autret <autret_m@epita.fr>
15993
15994 * src/vcg.h (struct infoname_s): New.
15995 (struct colorentry_s): New.
15996 (graph_s): New fields {vertical,horizontal}_order in structure.
15997 Add `infoname' field.
15998 Add `colorentry' field;
15999 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
16000 (G_HORIZONTAL_ORDER): New.
16001 (G_INFONAME): New.
16002 (G_COLORENTRY): New.
16003 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
16004 Add output of `infoname'.
16005 Add output of `colorentry'.
16006
16007 2001-08-27 Marc Autret <autret_m@epita.fr>
16008
16009 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
16010 This one shadowed a global parameter.
16011
16012 2001-08-24 Marc Autret <autret_m@epita.fr>
16013
16014 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
16015 instead of `unsigned'.
16016 (print_state): Do not call obstack_object_size () in obstack_grow ()
16017 to avoid macro variables shadowing.
16018
16019 2001-08-23 Marc Autret <autret_m@epita.fr>
16020
16021 * src/lex.c (percent_table): Typo: s/naem/name/.
16022 Add graph option.
16023 Normalize new options declarations.
16024
16025 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
16026
16027 * tests/suite.at: Exercise %header_extension and %source_extension.
16028
16029 2001-08-16 Marc Autret <autret_m@epita.fr>
16030
16031 * src/reader.c (parse_dquoted_param): New.
16032 (parse_header_extension_decl): Use it.
16033 (parse_source_extension_decl): Likewise.
16034
16035 2001-08-16 Marc Autret <autret_m@epita.fr>
16036
16037 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
16038 (get_xxxx_str): Use assert () instead of complain ().
16039 Remove return invokations in default cases.
16040 (get_decision_str): Modify default behaviour. Remove second argument.
16041 Echo modifications on calls.
16042 (output_graph): Fix.
16043
16044 2001-08-16 Marc Autret <autret_m@epita.fr>
16045
16046 * src/getargs.c (usage): Update with ``-g, --graph''.
16047
16048 2001-08-16 Marc Autret <autret_m@epita.fr>
16049
16050 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
16051 (Option Cross Key): Likewise.
16052 * doc/bison.1: Update.
16053
1c8c2190
PB
160542001-09-25 Pascal Bart <pascal.bart@epita.fr>
16055
16056 * src/output.c (output_master_parser): Don't finish action_obstack.
16057 (output_parser): Don't care about the muscle action, here.
16058 (prepare): Copy the action_obstack in the action muscle.
16059 (output): Free action_obstack.
16060
180d45ba
PB
160612001-09-23 Pascal Bart <pascal.bart@epita.fr>
16062
16063 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
16064 will contain `%union' declaration.
16065 (parse_union_decl): Delete #line directive output.
16066 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
16067 informations about %union.
16068 (parse_union_decl): Copy the union_obstack in the muscle stype.
16069 * src/bison.simple: Add new #line directive.
16070 Add typdef %%stype YYSTYPE.
16071
c51d1a19
PB
160722001-09-23 Pascal Bart <pascal.bart@epita.fr>
16073
16074 * src/bison.simple: Add new `#line' directive.
16075
6f9344da
PB
160762001-09-22 Pascal Bart <pascal.bart@epita.fr>
16077
16078 * src/bison.simple: New `#line' directive.
16079 * src/output.c (output_parser): Support new dynamic muscle input_line.
16080
652def80
MA
160812001-09-22 Marc Autret <autret_m@epita.fr>
16082
16083 * src/output.c (output_master_parser): New.
16084 (output_parser): Be more re-entrant.
16085
25b222fa
MA
160862001-09-21 Marc Autret <autret_m@epita.fr>
16087
16088 * src/reader.c (copy_definition, parse_union_decl): Update and use
16089 `linef' muscle.
16090 (copy_action): Likewise.
16091 Use obstack_1grow ().
16092 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
16093
6bc35ae5
MA
160942001-09-21 Marc Autret <autret_m@epita.fr>
16095
16096 * src/options.c (option_table): Adjust.
16097 * src/lex.c (parse_percent_token): Fix.
16098
c0629aa1
PB
160992001-09-20 Pascal Bart <pascal.bart@epita.fr>
16100
16101 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 16102
82b6d266
PB
161032001-09-20 Pascal Bart <pascal.bart@epita.fr>
16104
16105 * src/lex.c (parse_percent_token): Change type of variable `tx', which
16106 is now an option_table_struct*.
16107 (option_strcmp): New function option_strcmp.
16108 (parse_percent_token): Call option_strcmp.
16109 * src/getargs.c (xalloc.h, options.h): Include it.
16110 (getargs): Call create_long_option_table.
16111 (getargs): Free longopts at the end of the function.
16112 (shortopts): Move in options.c.
16113 * src/options.c (create_long_option_table): New function. Convert
16114 information from option_table to option structure.
16115 * src/reader.c (options.h): Include it.
16116
16117 * src/Makefile.am: Adjust.
16118 * src/options.c (option_table): Create from longopts and percent_table.
16119 * src/getargs.c (longopts): Delete.
16120 * src/lex.c (struct percent_table_struct): Delete.
16121 (percent_table): Delete.
16122 (options.h): Include it.
16123 * src/options.c: Create.
16124 * src/options.h: Create.
16125 Declare enum opt_access_e.
16126 Define struct option_table_struct.
16127
75f5aaea
MA
161282001-09-20 Marc Autret <autret_m@epita.fr>
16129
16130 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
16131 sections of Bison.
16132
f508cb0a
PB
161332001-09-19 Pascal Bart <pascal.bart@epita.fr>
16134
16135 * src/bison.simple: s/%%filename/%%skeleton.
16136 * src/muscle_tab.c (getargs.h): Include it.
16137 (muscle_init): Insert new muscle skeleton.
16138
13105fc1
PB
161392001-09-18 Pascal Bart <pascal.bart@epita.fr>
16140
16141 * src/output.c (output_parser): Delete unused variable actions_dumped.
16142
b0c4483e
PB
161432001-09-07 Pascal Bart <pascal.bart@epita.fr>
16144
16145 * src/output.c (output): Delete call to reader_output_yylsp.
16146 * src/reader.c (reader): Likewise.
ba0fe3c7 16147 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 16148
11d82f03
MA
161492001-09-02 Marc Autret <autret_m@epita.fr>
16150
16151 * src/reader.c: Include muscle_tab.h.
16152 (parse_union_decl): Update.
16153 (parse_macro_decl): Rename parse_muscle_decl.
16154 Update to use renamed functions and variable.
16155 (read_declarations, copy_action, read_additionnal_code, : Updated
16156 with correct variables and functions names.
16157 (packsymbols, reader): Likewise.
342b8b6e 16158
11d82f03 16159 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 16160
11d82f03
MA
16161 * src/output.c: Include muscle_tab.h
16162 In all functions using macro_insert, change by using muscle_insert ().
16163 (macro_obstack): Rename muscle_obstack.
16164 Echo modifications in the whole file.
16165 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
16166 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
16167 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
16168
16169 * src/muscle_tab.h: Update double inclusion macros.
16170 (macro_entry_s): Rename muscle_entry_s.
16171 Update prototypes.
342b8b6e 16172
11d82f03
MA
16173 * src/muscle_tab.c: Include muscle_tab.h.
16174 Rename macro_tabble to muscle_table.
16175 (mhash1, mhash2, mcmp): Use muscle_entry.
16176 (macro_init): Rename muscle_init. Update.
16177 (macro_insert): Rename muscle_insert. Update.
16178 (macro_find): Rename muscle_find. Update.
16179
16180 * src/main.c: Include muscle_tab.h.
16181 (main): Call muscle_init ().
16182 * src/Makefile.am (bison_SOURCES): Echo modifications.
16183
93a37297
MA
161842001-09-02 Marc Autret <autret_m@epita.fr>
16185
f753cd62 16186 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 16187
f753cd62
MA
16188 * src/muscle_tab.c, src/muscle_tab.h: Add files.
16189
161902001-09-02 Marc Autret <autret_m@epita.fr>
16191
16192 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 16193
682d48cd
PB
161942001-09-01 Pascal Bart <pascal.bart@epita.fr>
16195
342b8b6e 16196 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
16197 filename.
16198
087c8fda
MA
161992001-09-01 Marc Autret <autret_m@epita.fr>
16200
16201 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
16202 to an explicit value to activate the feature. We do it here.
16203
dda680cb
PB
162042001-08-31 Pascal Bart <pascal.bart@epita.fr>
16205
16206 * src/output.c (prepare): Delete the `filename' muscule insertion.
16207 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
16208 (parse_union_decl): Likewise.
16209 * src/macrotab.c (macro_init): Initialize filename by infile.
16210
9e644e64
MA
162112001-08-31 Marc Autret <autret_m@epita.fr>
16212
16213 * src/bison.simple (YYLSP_NEEDED): New definition.
16214 * src/output.c (prepare): Add macro insertion of `locations_flag'
16215
17da6427
PB
162162001-08-31 Pascal Bart <pascal.bart@epita.fr>
16217
16218 * src/output.c (prepare): Delete insertion of previous muscles,
16219 and insert the `prefix' muscles.
16220 * src/macrotab.c (macro_init): Likewise.
16221 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 16222 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
16223 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
16224 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 16225 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
16226 name_prefix.
16227
e8cb70b9
PB
162282001-08-31 Pascal Bart <pascal.bart@epita.fr>
16229
16230 * src/main.c (main): Standardize.
16231 * src/output.c (output_table_data, output_parser): Likewise.
16232 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
16233
63c2d5de
MA
162342001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
16235
342b8b6e 16236 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
16237 %%epilogue.
16238 * src/output.c (output): Rename %%declarations to %%prologue.
16239 * src/bison.simple: Echo modifications.
342b8b6e 16240
d8cb5183
MA
162412001-08-31 Marc Autret <autret_m@epita.fr>
16242
16243 * src/reader.c (readgram): CleanUp.
16244 (output_token_defines): Likewise.
16245 (packsymbols): Likewise.
16246 (reader): Likewise.
16247 * src/output.c (output): CPP-out useless code.
16248
6c686258
PB
162492001-08-31 Pascal Bart <pascal.bart@epita.fr>
16250
342b8b6e 16251 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
16252 output_trailers and output_headers.
16253 * src/output.h: Remove obsolete functions prototypes of output_headers
16254 and output_trailers.
16255
8f451ef7
PB
162562001-08-30 Pascal Bart <pascal.bart@epita.fr>
16257
16258 * src/main.c: Include macrotab.h.
342b8b6e 16259 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
16260 Adjust functions prototypes.
16261 * src/macrotab.c (macro_insert): Constify key and value.
16262 (macro_find): Constify key.
16263 (macro_insert): Include 'xalloc.h'
16264 (macro_insert): Use XMALLOC.
16265 (macro_find): Constify return value.
16266 * src/output.c (output_table_data): Rename table to table_data.
16267 (output_parser): Constify macro_key, macro_value.
16268
997b6fd0 162692001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
16270
16271 * src/reader.c (parse_skel_decl): New.
342b8b6e 16272 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
16273 * src/lex.h (token_t): New token `tok_skel'.
16274 * src/lex.c (percent_table): Add skeleton option entry.
16275 Standardize.
16276
ff48177d
MA
162772001-08-29 Marc Autret <autret_m@epita.fr>
16278
16279 * src/bison.simple: Add %%user_code directive at the end.
16280 * src/reader.c (read_additionnal_code): New.
16281 (reader): Use it.
16282 * src/output.c (output_program): Remove.
16283 (output): Update.
16284
b33160bf
MA
162852001-08-28 Marc Autret <autret_m@epita.fr>
16286
16287 * src/output.c (output_actions): Clean up.
4e5caae2 16288 (output_gram): CPP-out useless code.
b33160bf
MA
16289 * src/reader.c (reader): Clean up, CPP-out useless code.
16290
d1a2daf7
PB
162912001-08-28 Pascal Bart <pascal.bart@epita.fr>
16292
342b8b6e 16293 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 16294 directive.
d1a2daf7
PB
16295 * src/bison.simple: Add `%%definitions'.
16296
2b763dfe
MA
162972001-08-28 Marc Autret <autret_m@epita.fr>
16298
16299 * config/depcomp: New file.
16300
f1a87ef6
PE
163012001-08-27 Paul Eggert <eggert@twinsun.com>
16302
16303 * src/bison.simple (yyparse): Don't take the address of an
16304 item before the start of an array, as that doesn't conform to
16305 the C Standard.
16306
82e236e2
RA
163072001-08-27 Robert Anisko <robert.anisko@epita.fr>
16308
f1a87ef6 16309 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
16310 obstack. It was done too late here.
16311
16312 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
16313 completely wrong.
16314 (reader): Initialize the macro obstack here, since we need it to grow
16315 '%define' directives.
16316
16317 * src/reader.h: Declare the macro obstack as extern.
16318
b0cfa28a
RA
163192001-08-27 Robert Anisko <robert.anisko@epita.fr>
16320
16321 * src/output.c (output_parser): Fix. Store single '%' characters in
16322 the output obstack instead of throwing them away.
16323
6fc74234
AD
163242001-08-27 Akim Demaille <akim@epita.fr>
16325
16326 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
16327
9c76d118
RA
163282001-08-25 Robert Anisko <robert.anisko@epita.fr>
16329
16330 * lib/Makefile.am: Adjust.
16331
a8289c62
RA
163322001-08-25 Robert Anisko <robert.anisko@epita.fr>
16333
16334 * src/bison.simple: Update and add '%%' directives.
16335
b6610515
RA
163362001-08-25 Robert Anisko <robert.anisko@epita.fr>
16337
16338 * src/reader.c (reader): Remove calls to 'output_headers' and
16339 'output_trailers'. Remove some C output.
16340 (readgram): Disable a piece of code that was writing a default
16341 definition for 'YYSTYPE'.
16342 (reader_output_yylsp): Remove.
16343 (packsymbols): Output token defintions to a macro.
16344 (copy_definition): Disable C output.
6fc74234 16345
b6610515
RA
16346 * src/reader.c (parse_macro_decl): New function used to parse macro
16347 declarations.
16348 (copy_string2): Put the body of copy_string into this new function.
16349 Add a parameter to let the caller choose whether he wants to copy the
16350 string delimiters or not.
16351 (copy_string): Be a simple call to copy_string2 with the last argument
16352 bound to true.
16353 (read_declarations): Add case for macro definition.
16354 (copy_identifier): New.
6fc74234 16355 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
16356 rather than lex.
16357
26f609ff
RA
163582001-08-25 Robert Anisko <robert.anisko@epita.fr>
16359
16360 * src/output.c (prepare): Add prefixed names.
16361 (output_parser): Output semantic actions.
16362 (output_parser): Fix bug on '%%line' directives.
6fc74234 16363
26f609ff
RA
16364 * src/output.c (output_headers): Remove. The C code printed by this
16365 function should now be in the skeletons.
16366 (output_trailers): Remove.
16367 (output): Disable call to 'reader_output_yylsp'.
16368 (output_rule_data): Do not output tables to the table obstack.
16369
16370 * src/output.c: Remove some C dedicated output.
16371 Improve the use of macro and output obstacks.
16372 (output_defines): Remove.
6fc74234 16373
26f609ff
RA
16374 * src/output.c (output_token_translations): Associate 'translate'
16375 table with a macro. No output to the table obstack.
16376 (output_gram): Same for 'rhs' and 'prhs'.
16377 (output_stos): Same for 'stos'.
16378 (output_rule_data): Same for 'r1' and 'r2'.
16379 (token_actions): Same for 'defact'.
16380 (goto_actions): Same for 'defgoto'.
16381 (output_base): Same for 'pact' and 'pgoto'.
16382 (output_table): Same for 'table'.
16383 (output_check): Same for 'check'.
6fc74234 16384
26f609ff
RA
16385 * src/output.c (output_table_data): New function.
16386 (output_short_table): Remove.
16387 (output_short_or_char_table): Remove.
6fc74234 16388
26f609ff
RA
16389 * src/output.c (output_parser): Replace most of the skeleton copy code
16390 with something new. Skeletons are now processed character by character
16391 rather than line by line, and Bison looks for '%%' macros. This is the
16392 first step in making Bison's output process (a lot) more flexible.
16393 (output_parser): Use the macro table.
16394
6f43b113
RA
163952001-08-25 Robert Anisko <robert.anisko@epita.fr>
16396
16397 * src/main.c (main): Initialize the macro table.
16398
dd3127cf
RA
163992001-08-25 Robert Anisko <robert.anisko@epita.fr>
16400
16401 * src/lex.c (percent_table): Add tok_define.
16402 * src/lex.h: Add tok_define.
16403
aa321494
RA
164042001-08-25 Robert Anisko <robert.anisko@epita.fr>
16405
16406 * src/macrotab.c: New file.
16407 * src/macrotab.h: New file.
16408 * src/Makefile.am: Update.
16409
68bd3b6b
RA
164102001-08-25 Robert Anisko <robert.anisko@epita.fr>
16411
16412 * lib/hash.c: New file.
16413 * lib/hash.h: New file.
16414 * lib/Makefile.am: Update.
16415
45f8dd1e
AD
164162001-08-15 Akim Demaille <akim@epita.fr>
16417
16418 Version 1.28c.
16419
40a64a7a 164202001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
16421
16422 * src/reader.c (readgram): Indent output macro YYSTYPE.
16423 (packsymbols): Likewise.
16424 (output_token_defines): Likewise.
16425 * src/files.c: Standardize.
16426 (compute_header_macro): New.
16427 (defines_obstack_save): New. Use compute_header_macro.
16428 (output_files): Update. Use defines_obstack_save.
16429
f9a8293a
AD
164302001-08-15 Akim Demaille <akim@epita.fr>
16431
16432 * doc/bison.texinfo (Table of Symbols): Document
16433 YYSTACK_USE_ALLOCA.
16434
150ca7a7
AD
164352001-08-15 Akim Demaille <akim@epita.fr>
16436
16437 * missing: Update from CVS Automake.
16438 * config/config.guess, config/config.sub, config/texinfo.tex:
16439 Update from gnu.org.
16440
69b5cec4
AD
164412001-08-15 Akim Demaille <akim@epita.fr>
16442
16443 * Makefile.maint: Sync with CVS Autoconf.
16444
f2b5126e
PB
164452001-08-14 Pascal Bart <pascal.bart@epita.fr>
16446
69b5cec4 16447 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
16448 `fdl.texi'.
16449 * doc/fdl.texi: Add to package.
16450
4ecbf796
MA
164512001-08-14 Marc Autret <autret_m@epita.fr>
16452
16453 Turn on %{source,header}_extension features.
16454
69b5cec4 16455 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
16456 source_extension.
16457 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 16458 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
16459 between options.
16460
95fb5662
MA
164612001-08-14 Marc Autret <autret_m@epita.fr>
16462
16463 * src/files.c (compute_base_names): Add extensions computing when
16464 `--file-prefix' used.
16465 Standardize function calls.
16466
78d09da9
MA
164672001-08-13 Marc Autret <autret_m@epita.fr>
16468
69b5cec4 16469 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
16470 defining it (defined but null disables alloca).
16471
5a009f2c
MA
164722001-08-13 Marc Autret <autret_m@epita.fr>
16473
16474 * src/bison.simple (_yy_memcpy): CPP reformat.
16475
1e41465a
PB
164762001-08-13 Pascal Bart <pascal.bart@epita.fr>
16477
16478 * tests/atconfig.in (CPPFLAGS): Fix.
16479
c67a198d
PB
164802001-08-10 Pascal Bart <pascal.bart@epita.fr>
16481
79282c6c 16482 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
16483 `gpl.texi'.
16484 * doc/gpl.texi: Add to package.
16485
09a6de7e
MA
164862001-08-10 Marc Autret <autret_m@epita.fr>
16487
16488 * src/print_graph.h: Fix.
16489 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
16490
b77b9ee0
AD
164912001-08-10 Akim Demaille <akim@epita.fr>
16492
16493 * src/system.h: Provide default declarations for stpcpy, strndup,
16494 and strnlen.
16495
3e259915
MA
164962001-08-10 Robert Anisko <anisko_r@epita.fr>
16497
16498 * doc/bison.texinfo (Locations): Update @$ stuff.
16499
ca96bc2d
MA
165002001-08-09 Robert Anisko <anisko_r@epita.fr>
16501
16502 * src/bison.simple (YYLLOC_DEFAULT): Update.
16503 (yyparse): Adjust.
16504
fdc6758b
MA
165052001-08-08 Marc Autret <autret_m@epita.fr>
16506
b77b9ee0 16507 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
16508 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
16509 Reported by Fabrice Bauzac.
957d4dbf 16510
600cad3b
MA
165112001-08-08 Marc Autret <autret_m@epita.fr>
16512
16513 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
16514 * src/vcg.c (output_node): Fix.
16515 * src/vcg.h: Cleanup.
16516 * src/print_graph.c: Add comments.
b77b9ee0 16517 (node_output_size): New global variable. Simplify the formatting of
600cad3b 16518 the VCG graph output.
b77b9ee0 16519 (print_actions): Unused code is now used. It notifies the final state
600cad3b 16520 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 16521 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
16522 blue.
16523 Get the current node name and node_obstack by argument.
16524 (node_obstack): New variable.
16525 (print_state): Manage node_obstack.
16526 (print_core): Use node_obstack given by argument.
16527 A node is not only computed here but in print_actions also.
16528 (print_graph): CPP out useless code instead of commenting it.
16529
976e528f
AD
165302001-08-07 Pascal Bart <pascal.bart@epita.fr>
16531
16532 * tests/atconfig.in (CPPFLAGS): Fix.
16533
20e8e5ca
AD
165342001-08-07 Akim Demaille <akim@epita.fr>
16535
16536 * src/print_graph.c (quote): New.
16537 (print_core): Use it.
16538
957d4dbf 165392001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 16540
3e3da797
AD
16541 * src/vcg.c (complain.h): Include it.
16542 Unepitaize `return' invocations.
c4b66126 16543 [NDEBUG] (main): Remove.
79282c6c 16544 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
16545 * src/files.c (open_files): Initialize graph_obstack.
16546 * src/print_graph.c (print_actions): CPP out useless code.
16547 (print_core): Don't output the last `\n' in labels.
16548 Use `quote'.
16549 * src/files.c (output_files): Output the VCG file.
16550 * src/main.c (main): Invoke print_graph ();
3e3da797 16551
957d4dbf 165522001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
16553
16554 Automaton VCG graph output.
16555 Using option ``-g'' or long option ``--graph'', you can generate
16556 a gram_filename.vcg file containing a VCG description of the LALR (1)
16557 automaton of your grammar.
16558
16559 * src/main.c: Call to print_graph() function.
16560 * src/getargs.h: Update.
16561 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
16562 (graph_flag): New flag.
16563 (longopts): Update.
16564 (getargs): Add case `g'.
16565 * src/files.c (graph_obstack): New obstack struct.
16566 (open_files): Initialize new obstack.
16567 (output_files): Saves graph_obstack if required.
16568 * src/files.h (graph_obstack): New extern declaration.
16569 * src/Makefile.am: Add new source files.
16570
927c1557 165712001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
16572
16573 * src/print_graph.c, src/print_graph.h (graph): New.
16574 * src/vcg.h: New file.
16575 * src/vcg.c: New file, VCG graph handling.
16576
7333d403
AD
165772001-08-06 Marc Autret <autret_m@epita.fr>
16578
16579 Add of %source_extension and %header_extension which specify
16580 the source or/and the header output file extension.
16581
16582 * src/files.c (compute_base_names): Remove initialisation of
16583 src_extension and header_extension.
16584 (compute_exts_from_gf): Update.
16585 (compute_exts_from_src): Update.
16586 (output_files): Update.
16587 * src/reader.c (parse_header_extension_decl): New.
16588 (parse_source_extension_decl): New.
16589 (read_declarations): New case statements for the new tokens.
16590 * src/lex.c (percent_table): Add entries for %source_extension
16591 and %header_extension.
16592 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
16593
84163231
AD
165942001-08-06 Marc Autret <autret_m@epita.fr>
16595
16596 * configure.in: Bump to 1.28c.
16597 * doc/bison.texinfo: Texinfo thingies.
16598
8303fc42
AD
165992001-08-04 Pascal Bart <pascal.bart@epita.fr>
16600
16601 * tests/atconfig.in (CPPFLAGS): Add.
16602 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
16603
70a84437
AD
166042001-08-03 Akim Demaille <akim@epita.fr>
16605
16606 Version 1.28b.
16607
2ce10144
AD
166082001-08-03 Akim Demaille <akim@epita.fr>
16609
16610 * tests/Makefile.am (check-local): Ship testsuite.
16611 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
16612 Include `string.h'.
16613
1e3e4bc1
AD
166142001-08-03 Akim Demaille <akim@epita.fr>
16615
16616 * configure.in: Try using -Wformat when compiling.
16617
42b45b7f
AD
166182001-08-03 Akim Demaille <akim@epita.fr>
16619
16620 * configure.in: Bump to 1.28b.
16621
8f13fe33
AD
166222001-08-03 Akim Demaille <akim@epita.fr>
16623
16624 * src/complain.c: Adjust strerror_r portability issues.
16625
b37ba92c
AD
166262001-08-03 Akim Demaille <akim@epita.fr>
16627
16628 Version 1.28a.
16629
b0ce6046
AD
166302001-08-03 Akim Demaille <akim@epita.fr>
16631
16632 * src/getargs.c, src/getarg.h (skeleton)): Constify.
16633 * src/lex.c (literalchar): Avoid name clashes on `buf'.
16634 * src/getargs.c: Include complain.h.
16635 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
16636 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
16637
d01c415b
AD
166382001-08-03 Akim Demaille <akim@epita.fr>
16639
16640 * src/reader.c (readgram): Display hidden chars in error messages.
16641
459dd1a6
AD
166422001-08-03 Akim Demaille <akim@epita.fr>
16643
16644 Update to gettext 0.10.39.
16645
53b74c0c
AD
166462001-08-03 Akim Demaille <akim@epita.fr>
16647
16648 * lib/strspn.c: New.
16649
234a3be3
AD
166502001-08-01 Marc Autret <autret_m@epita.fr>
16651
16652 * doc/bison.texinfo: Update.
16653 * doc/bison.1 (mandoc): Update.
16654 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
16655 * src/files.c: Support output files extensions computing.
16656 (src_extension): New static variable.
16657 (header_extension): New static variable.
16658 (tr): New function.
16659 (get_extension_index): New function, gets the index of an extension
16660 filename in a string.
16661 (compute_exts_from_gf): New function, computes extensions from the
16662 grammar file extension.
16663 (compute_exts_from_src): New functions, computes extensions from the
16664 C source file extension, file given by ``-o'' option.
16665 (compute_base_names): Update.
16666 (output_files): Update.
16667
847bf1f5
AD
166682001-08-01 Robert Anisko <anisko_r@epita.fr>
16669
d995fee7 16670 * doc/bison.texi: Document @$.
847bf1f5
AD
16671 (Locations): New section.
16672
d074a105
AD
166732001-07-18 Akim Demaille <akim@epita.fr>
16674
16675 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
16676 * config/prev-version.txt, config/move-if-change: New.
16677 * Makefile.am: Adjust.
16678
3419715d
AD
166792001-07-08 Pascal Bart <pascal.bart@epita.fr>
16680
16681 * src/bison.simple (yyparse): Suppress warning `comparaison
16682 between signed and unsigned'.
16683
62ab6972
AD
166842001-07-05 Pascal Bart <pascal.bart@epita.fr>
16685
16686 * src/getargs.h (raw_flag): Remove.
16687 * src/getargs.c: Die on `-r'/`--raw'.
16688 * src/lex.c (parse_percent_token): Die on `%raw'.
16689 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
16690 * tests/calc.at: Suppress test with option `--raw'.
16691
1e24cc5b
AD
166922001-07-14 Akim Demaille <akim@epita.fr>
16693
16694 * config/: New.
16695 * configure.in: Require Autoconf 2.50.
16696 Update to gettext 0.10.38.
16697
32dfccf8
AD
166982001-03-16 Akim Demaille <akim@epita.fr>
16699
16700 * doc/bison.texinfo: ANSIfy the examples.
16701
cd5bd6ac
AD
167022001-03-16 Akim Demaille <akim@epita.fr>
16703
16704 * getargs.c (skeleton): New variable.
16705 (longopts): --skeleton is a new option.
16706 (shortopts, getargs): -S is a new option.
16707 * getargs.h: Declare skeleton.
16708 * output.c (output_parser): Use it.
16709
5141b016
AD
167102001-03-16 Akim Demaille <akim@epita.fr>
16711
16712 * m4/strerror_r.m4: New.
16713 * m4/error.m4: Run AC_FUNC_STRERROR_R.
16714 * lib/error.h, lib/error.c: Update.
16715
447992b9
AD
167162001-03-16 Akim Demaille <akim@epita.fr>
16717
16718 * src/getargs.c (longopts): Clean up.
16719
274d42ce
AD
167202001-02-21 Akim Demaille <akim@epita.fr>
16721
16722 * src/reader.c (gensym): `gensym_count' is your own.
16723 Use a static buf to create the symbol name, as token_buffer is no
16724 longer a buffer.
16725
22c821f3
AD
167262001-02-08 Akim Demaille <akim@epita.fr>
16727
16728 * src/conflicts.c (conflict_report): Be sure not to append to res
16729 between two calls, which could happen if both first sprintf were
16730 skipped, but not the first cp += strlen.
16731
18569462
AD
167322001-02-08 Akim Demaille <akim@epita.fr>
16733
16734 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
16735 New, from fileutils 4.0.37.
16736 * configure.in: Require Autoconf 2.49c. I took some time before
16737 making this decision. This is the only way out for portability
16738 issues in Bison, it would mean way too much duplicate effort to
16739 import in Bison features implemented in 2.49c since 2.13.
16740 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
16741
0d8f3c8a
AD
167422001-02-02 Akim Demaille <akim@epita.fr>
16743
16744 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 16745 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 16746
f17bcd1f
AD
167472001-01-19 Akim Demaille <akim@epita.fr>
16748
16749 Get rid of the ad hoc handling of token_buffer in the scanner: use
16750 the obstacks.
16751
16752 * src/lex.c (token_obstack): New.
16753 (init_lex): Initialize it. No longer call...
16754 (grow_token_buffer): this. Remove it.
16755 Adjust all the places which used it to use the obstack.
16756
511e79b3
AD
167572001-01-19 Akim Demaille <akim@epita.fr>
16758
16759 * src/lex.h: Rename all the tokens:
16760 s/\bENDFILE\b/tok_eof/g;
16761 s/\bIDENTIFIER\b/tok_identifier/g;
16762 etc.
16763 Let them be enums, not #define, to ease debugging.
16764 Adjust all the code.
16765
0d6508ef
AD
167662001-01-18 Akim Demaille <akim@epita.fr>
16767
16768 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
16769 * src/lex.c (maxtoken, grow_token_buffer): Static.
16770
6deb4447
AD
167712001-01-18 Akim Demaille <akim@epita.fr>
16772
16773 Since we now use obstacks, more % directives can be enabled.
16774
16775 * src/lex.c (percent_table): Also accept `%yacc',
16776 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
16777 `%debug'.
16778 Handle the actions for `%semantic_parser' and `%pure_parser' here,
16779 instead of returning a token.
16780 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
16781 * src/reader.c (read_declarations): Adjust.
16782 * src/files.c (open_files): Don't call `compute_base_names', don't
16783 compute `attrsfile' since they depend upon data which might be
16784 *in* the input file now.
16785 (output_files): Do it here.
16786 * src/output.c (output_headers): Document the fact that this patch
16787 introduces a guaranteed SEGV for semantic parsers.
16788 * doc/bison.texinfo: Document them.
16789 * tests/suite.at: Exercise these %options.
16790
ff4423cc
AD
167912000-12-20 Akim Demaille <akim@epita.fr>
16792
16793 Also handle the output file (--verbose) with obstacks.
16794
16795 * files.c (foutput): Remove.
16796 (output_obstack): New.
16797 Adjust all dependencies.
16798 * src/conflicts.c: Return a string.
16799 * src/system.h (obstack_grow_string): Rename as...
16800 (obstack_sgrow): this. Be ready to work with non literals.
16801 (obstack_fgrow4): New.
16802
956dba3a
AD
168032000-12-20 Akim Demaille <akim@epita.fr>
16804
16805 * src/files.c (open_files): Fix the computation of short_base_name
16806 in the case of `-o foo.tab.c'.
16807
337bab46
AD
168082000-12-20 Akim Demaille <akim@epita.fr>
16809
16810 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
16811 (copy_dollar): Now that everything uses obstacks, get rid of the
16812 FILE * parameters.
16813
5d3214b8
AD
168142000-12-20 Akim Demaille <akim@epita.fr>
16815
16816 * src/files.c (open_files): Actually the `.output' file is based
16817 on the short_base_name, not base_name.
16818 * tests/suite.at (Checking output file names): Adjust.
16819
29092a57
AD
168202000-12-20 Akim Demaille <akim@epita.fr>
16821
16822 * src/bison.s1: Remove, we now use directly...
16823 * src/bison.simple: this.
16824 * src/Makefile.am: Use pkgdata instead of data.
16825
ea5607fd
AD
168262000-12-20 Akim Demaille <akim@epita.fr>
16827
16828 * src/files.c (guard_obstack): New.
16829 (open_files): Initialize it.
16830 (output_files): Dump it...
16831 * src/files.h: Export it.
16832 * src/reader.c (copy_guard): Use it.
16833
27110317
AD
168342000-12-19 Akim Demaille <akim@epita.fr>
16835
16836 * src/files.c (outfile, defsfile, actfile): Removed as global
16837 vars.
16838 (open_files): Don't compute them.
16839 (output_files): Adjust.
16840 (base_name, short_base_name): Be global.
16841 Adjust dependencies.
16842
19c50364
AD
168432000-12-19 Akim Demaille <akim@epita.fr>
16844
16845 * src/files.c (strsuffix): New.
16846 (stringappend): Be just like strcat but allocate.
16847 (base_names): Eve out from open_files.
16848 Try to simplify the rather hairy computation of base_name and
16849 short_base_name.
16850 (open_files): Use it.
16851 * tests/suite.at (Checking output file names): New test.
16852
573c1d9f
AD
168532000-12-19 Akim Demaille <akim@epita.fr>
16854
16855 * src/system.h (obstack_grow_literal_string): Rename as...
16856 (obstack_grow_string): this.
16857 * src/output.c (output_parser): Recognize `%% actions' instead of
16858 `$'.
16859 * src/bison.s1: s/$/%% actions/.
16860 * src/bison.hairy: Likewise.
16861
ef7ddedd
AD
168622000-12-19 Akim Demaille <akim@epita.fr>
16863
16864 * src/output.c (output_parser): Compute the `#line' lines when
16865 there are.
16866 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
16867 Suggested by Hans Aberg.
16868
ff61dabd
AD
168692000-12-19 Akim Demaille <akim@epita.fr>
16870
16871 Let the handling of the skeleton files be local to the procedures
16872 that use it.
16873
16874 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
16875 longer static.
16876 (fparser, open_extra_files): Remove.
16877 (open_files, output_files): Don't take care of fparser.
16878 * src/files.h: Adjust.
16879 * src/output.c (output_parser): Open and close the file to the
16880 skeleton.
16881 * src/reader.c (read_declarations): When %semantic_parser, open
16882 fguard.
16883
55b96341
AD
168842000-12-19 Akim Demaille <akim@epita.fr>
16885
16886 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
16887 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
16888
358c15b7
AD
168892000-12-19 Akim Demaille <akim@epita.fr>
16890
16891 * src/files.c (open_files): Yipee! We no longer need all the code
16892 looking for `/tmp' since we have no tmp file.
16893
7de3329e
AD
168942000-12-19 Akim Demaille <akim@epita.fr>
16895
16896 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
16897 New macros.
16898 * src/files.c (open_files): Less dependency on MSDOS etc.
16899
3abcd459
AD
169002000-12-14 Akim Demaille <akim@epita.fr>
16901
16902 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
16903 Provide a default definition.
16904 Use it when executing the default @ action.
16905 * src/reader.c (reader_output_yylsp): No longer include
16906 `timestamp' and `text' in the default YYLTYPE.
16907
2a91a95e
AD
169082000-12-12 Akim Demaille <akim@epita.fr>
16909
16910 * src/reader.c (copy_definition, parse_union_decl, copy_action)
16911 (copy_guard): Quote the file names.
16912 Reported by Laurent Mascherpa.
16913
14d3eb9b
AD
169142000-12-12 Akim Demaille <akim@epita.fr>
16915
16916 * src/output.c (output_headers, output_program, output): Be sure
16917 to escape special characters when outputting filenames.
16918 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
16919 (output_headers): Don't depend on them, Use ACTSTR.
16920
d7045ec6
AD
169212000-11-17 Akim Demaille <akim@epita.fr>
16922
16923 * lib/obstack.h: Formatting changes.
16924 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
16925 prevents type checking.
16926 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
16927 cast the value to (void *): assigning a `foo *' to a `void *'
16928 variable is valid.
16929 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
16930 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
16931 append characters.
16932
6fd54b73
AD
169332000-11-17 Akim Demaille <akim@epita.fr>
16934
16935 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
16936 as...
16937 (suite.m4, regression.m4, calc.m4): these.
16938 * tests/atgeneral.m4: Update from CVS Autoconf.
16939
4c50eae6
AD
169402000-11-17 Akim Demaille <akim@epita.fr>
16941
16942 * tests/regression.m4 (%union and --defines): New test,
16943 demonstrating a current bug in the obstack implementation.
16944
a35f64ea
AD
169452000-11-17 Akim Demaille <akim@epita.fr>
16946
16947 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
16948 macros.
16949 Use them to declare the variables which are global or local to
16950 `yyparse'.
16951
7de23534
AD
169522000-11-17 Akim Demaille <akim@epita.fr>
16953
16954 * acconfig.h: Remove, no longer used.
16955
aa7815f5
AD
169562000-11-07 Akim Demaille <akim@epita.fr>
16957
16958 * src: s/Copyright (C)/Copyright/g.
16959
5af1f549
AD
169602000-11-07 Akim Demaille <akim@epita.fr>
16961
16962 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
16963 defining.
16964 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
16965
553e2b22
AD
169662000-11-07 Akim Demaille <akim@epita.fr>
16967
16968 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
16969 Merge in a single CPP if/else.
16970
8a4f41d6
AD
169712000-11-07 Akim Demaille <akim@epita.fr>
16972
16973 * src/output.c (output): Remove useless variables.
16974 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
16975 argument `data' for consistency with the prototypes.
16976 Qualify it `const'.
16977 (obstack_copy, obstack_copy0): Rename the second argument as
16978 `address' for consistency. Qualify it `const'.
16979 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
16980 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
16981 `const' their input argument (`data' or `address').
16982 Adjust the corresponding macros to include `const' in casts.
16983
095a3fb5
AD
169842000-11-03 Akim Demaille <akim@epita.fr>
16985
16986 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
16987 s/PFILE1/BISON_HAIRY/.
16988 Adjust dependencies.
16989
d1cdce7c
AD
169902000-11-03 Akim Demaille <akim@epita.fr>
16991
090c5ebf 16992 For some reason, this was not applied.
d1cdce7c
AD
16993
16994 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
16995 `unlink': it's no longer used.
16996
9311529b
AD
169972000-11-03 Akim Demaille <akim@epita.fr>
16998
16999 * src/files.c (skeleton_find): New function, eved out of...
17000 (open_files, open_extra_files): here.
17001
d8880f69
AD
170022000-11-03 Akim Demaille <akim@epita.fr>
17003
17004 Don't use `atexit'.
17005
17006 * src/files.c (obstack_save): New function.
17007 (done): Rename as...
17008 (output_files): this.
17009 Use `obstack_save'.
17010 * src/main.c (main): Don't use `atexit' to register `done', since
17011 it no longer has to remove tmp files, just call `output_files'
17012 when there are no errors.
17013
0dbb648e
AD
170142000-11-02 Akim Demaille <akim@epita.fr>
17015
17016 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
17017 `unlink': it's no longer used.
17018 * src/files.h: Formatting changes.
17019
896fe5c1
AD
170202000-11-02 Akim Demaille <akim@epita.fr>
17021
17022 Remove the last uses of mktemp and unlink/delete.
17023
17024 * src/files.c (fdefines, ftable): Removed.
17025 (defines_ostack, table_obstack): New.
17026 Adjust dependencies of the former into uses of the latter.
17027 * src/output.c (output_short_or_char_table, output_short_table):
17028 Convert to using obstacks.
17029 * src/reader.c (copy_comment2): Accept one FILE * and two
17030 obstacks.
17031 (output_token_defines, reader_output_yylsp): Use obstacks.
17032 * src/system.h (obstack_fgrow3): New.
1f65350a 17033 * po/POTFILES.in: Adjust.
896fe5c1 17034
dd60faec
AD
170352000-11-01 Akim Demaille <akim@epita.fr>
17036
17037 Change each use of `fattrs' into a use of `attrs_obstack'.
17038
17039 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
17040 * src/files.c (fattrs): Remove.
17041 (attrs_obstack): New.
17042 Adjust all dependencies.
17043 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
17044
8c7ebe49
AD
170452000-11-01 Akim Demaille <akim@epita.fr>
17046
17047 Introduce obstacks.
17048 Change each use of `faction' into a use of `action_obstack'.
17049
17050 * lib/obstack.h, lib/obstack.c: New files.
17051 * src/files.c (faction): Remove.
17052 (action_obstack): New.
17053 Adjust all dependencies.
17054
77aee789
AD
170552000-10-20 Akim Demaille <akim@epita.fr>
17056
17057 * lib/quote.h (PARAMS): New macro. Use it.
17058
43591cec
AD
170592000-10-16 Akim Demaille <akim@epita.fr>
17060
17061 * src/output.c (output_short_or_char_table): New function.
17062 (output_short_table, output_token_translations): Use it.
17063 (goto_actions): Use output_short_table.
17064
1e9798d5
AD
170652000-10-16 Akim Demaille <akim@epita.fr>
17066
17067 * src/symtab.c (bucket_new): New function.
17068 (getsym): Use it.
17069
17070 * src/output.c (output_short_table): New argument to display the
17071 comment associated with the table.
17072 Adjust dependencies.
17073 (output_gram): Use it.
17074 (output_rule_data): Nicer output layout for YYTNAME.
17075
f282676b
AD
170762000-10-16 Akim Demaille <akim@epita.fr>
17077
17078 * src/lex.c (read_typename): New function.
17079 (lex): Use it.
17080 * src/reader.c (copy_dollar): Likewise.
17081
550a72a3
AD
170822000-10-16 Akim Demaille <akim@epita.fr>
17083
17084 * src/reader.c (copy_comment2): Expect the input stream to be on
17085 the `/' which is suspected to open a comment, instead of being
17086 called after `//' or `/*' was read.
17087 (copy_comment, copy_definition, parse_union_decl, copy_action)
17088 (copy_guard): Adjust.
17089
131e2fef
AD
170902000-10-16 Akim Demaille <akim@epita.fr>
17091
17092 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
17093 `read_signed_integer'.
17094
79282c5a
AD
170952000-10-16 Akim Demaille <akim@epita.fr>
17096
17097 * src/reader.c (copy_dollar): New function.
17098 (copy_guard, copy_action): Use it.
17099
ff4a34be
AD
171002000-10-16 Akim Demaille <akim@epita.fr>
17101
17102 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
17103 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
17104 New files, from Fileutils 4.0.27.
17105 * src/main.c (printable_version): Remove.
17106 * src/lex.c, src/reader.c: Use `quote'.
17107
171082000-10-04 Akim Demaille <akim@epita.fr>
17109
17110 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
17111
14ded682
AD
171122000-10-04 Akim Demaille <akim@epita.fr>
17113
17114 * doc/bison.texinfo: Various typos spotted by Neil Booth.
17115
8e03724b
AD
171162000-10-04 Akim Demaille <akim@epita.fr>
17117
17118 When a literal string is used to define two different tokens,
17119 `bison -v' segfaults.
17120 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
17121
17122 * tests/regression.m4: New file.
17123 Include the core of the sample provided by Piotr Gackiewicz.
17124 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
17125 properly.
17126
a9e64249
AD
171272000-10-04 Akim Demaille <akim@epita.fr>
17128
17129 * src/reader.c (parse_expect_decl): Keep `count' within the size
17130 of `buffer'.
17131 From Neil Booth.
17132
da9abf43
AD
171332000-10-02 Paul Eggert <eggert@twinsun.com>
17134
17135 * bison.s1 (yyparse): Assign the default value
17136 unconditionally, to avoid a GCC warning and make the parser a
17137 tad smaller.
17138
c33638bb
AD
171392000-10-02 Akim Demaille <akim@epita.fr>
17140
17141 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
17142 options.
17143
444c570a
AD
171442000-10-02 Akim Demaille <akim@epita.fr>
17145
17146 * src/derives.c, src/print.c, src/reduce.c: To ease the
17147 translation, move some `\n' out of the translated strings.
17148
89cab50d
AD
171492000-10-02 Akim Demaille <akim@epita.fr>
17150
17151 The location tracking mechanism is precious for parse error
17152 messages. Nevertheless, it is enabled only when `@n' is used in
17153 the grammar, which is a different issue (you can use it in error
17154 message, but not in the grammar per se). Therefore, there should
17155 be another means to enable it.
17156
17157 * src/getargs.c (getargs): Support `--locations'.
17158 (usage): Report it.
17159 * src/getargs.h (locationsflag): Export it.
17160 * src/lex.c (percent_table): Support `%locations'.
17161 * src/reader.c (yylsp_needed): Remove this variable, now replaced
17162 with `locationsflag'.
17163 * doc/bison.texinfo: Document `--locations' and `%locations'.
17164 Sort the options.
17165 * tests/calc.m4: Test it.
17166
17167 For regularity of the names, replace each
17168 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
17169 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
17170 In addition replace each `flag' with `_flag'.
17171
d6c2cba0
AD
171722000-10-02 Akim Demaille <akim@epita.fr>
17173
17174 Also test parse error messages, including with YYERROR_VERBOSE.
17175
17176 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
17177 associative).
17178 Use it to check the computations.
17179 Use it to check `nonassoc' is honored.
17180 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
17181 `--yyerror-verbose'.
17182 (_AT_CHECK_CALC): Adjust to this option.
17183 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
17184
5a35a6cb
AD
171852000-10-02 Akim Demaille <akim@epita.fr>
17186
17187 Test also `--verbose', `--defines' and `--name-prefix'. Testing
17188 the latter demonstrates a flaw in the handling of non debugging
17189 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
17190 was used in order to simplify:
17191
17192 #if YYDEBUG
17193 if (yydebug)
17194 {
17195 ...
17196 }
17197 #endif
17198
17199 into
17200
17201 if (yydebug)
17202 {
17203 ...
17204 }
17205
17206 unfortunately this leads to a CPP conflict when
17207 `--name-prefix=foo' is used since it produces `#define yydebug
17208 foodebug'.
17209
17210 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
17211 (YYDPRINTF): New macro.
17212 Spread its use.
17213 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
17214 the bison options.
17215 Also test `--verbose', `--defines' and `--name-prefix'.
17216
71da9eea
AD
172172000-10-02 Akim Demaille <akim@epita.fr>
17218
17219 Improve the readability of the produced parsers.
17220
17221 * src/bison.s1: Formatting changes.
17222 Improve the comment related to the `$' mark.
17223 (yydefault): Don't fall through to `yyresume': `goto' there.
17224 * src/output.c (output_parser): When the `$' is met, skip the end
17225 of its line.
17226 New variable, `number_of_dollar_signs', to check there's exactly
17227 one `$' in the parser skeleton.
17228
95e36146
AD
172292000-10-02 Akim Demaille <akim@epita.fr>
17230
17231 * lib/xstrdup.c: New file, from the fileutils.
17232 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
17233 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
17234 instead of strlen + xmalloc + strcpy.
17235 * src/symtab.c (copys): Remove, use xstrdup instead.
17236
d7020c20
AD
172372000-10-02 Akim Demaille <akim@epita.fr>
17238
17239 * src/gram.h (associativity): New enum type which replaces the
17240 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
17241 `right_assoc', `left_assoc' and `non_assoc'.
17242 Adjust all dependencies.
17243 * src/reader.c: Formatting changes.
17244 (LTYPESTR): Don't define it, use it as a literal in
17245 `reader_output_yylsp'.
17246 * src/symtab.h (symbol_class): New enum type which replaces the
17247 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
17248 `sunknown', `stoken and `snterm'.
17249
1916f98e
AD
172502000-10-02 Akim Demaille <akim@epita.fr>
17251
17252 * src/getargs.c (fixed_outfiles): Rename as...
17253 (yaccflag): for consistency and accuracy.
17254 Adjust dependencies.
17255
d7913476
AD
172562000-10-02 Akim Demaille <akim@epita.fr>
17257
17258 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
17259 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
17260 difficult and introduced a lot of core dump. It turns out that
17261 Bison used an implementation of `xmalloc' based on `calloc', and
17262 at various places it does depend upon the initialization to 0. I
17263 have not tried to isolate the pertinent places, and all the former
17264 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
17265 someone should address this issue.
17266
17267 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
17268 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
17269 files.
17270 Adjust dependencies.
17271 * src/warshall.h: New file.
17272 Propagate.
17273
340ef489
AD
172742000-10-02 Akim Demaille <akim@epita.fr>
17275
17276 Various anti-`extern in *.c' changes.
17277
17278 * src/system.h: Include `assert.h'.
17279
b2ca4022
AD
172802000-10-02 Akim Demaille <akim@epita.fr>
17281
17282 * src/state.h (nstates, final_state, first_state, first_shift)
17283 (first_reduction): Move their exportation from here...
17284 * src/LR0.h: to here.
17285 Adjust dependencies.
17286 * src/getargs.c (statisticsflag): New variable.
17287 Add support for `--statistics'.
17288 Adjust dependencies.
17289
17290 Remove a lot of now useless `extern' statements in most files.
17291
403b315b
AD
172922000-10-02 Akim Demaille <akim@epita.fr>
17293
17294 * src/LR0.h: New file.
17295 Propagate its use.
17296
07a58c13
AD
172972000-10-02 Akim Demaille <akim@epita.fr>
17298
17299 * src/print.h: New file.
17300 Propagate its use.
17301 * src/print.c: Formatting and ordering changes.
17302 (verbose, terse): Replace with...
17303 (print_results): this new function.
17304 Adjust dependencies.
17305
0619caf0
AD
173062000-10-02 Akim Demaille <akim@epita.fr>
17307
17308 * src/conflicts.c (conflict_report): New function.
17309 (conflict_log, verbose_conflict_log): Replace with...
17310 (print_conflicts): this function.
17311 Adjust dependencies.
17312 * src/conflicts.h: New file.
17313 Propagate its inclusion.
17314
3519ec76
AD
173152000-10-02 Akim Demaille <akim@epita.fr>
17316
17317 * src/nullable.h: New file.
17318 Propagate its inclusion.
17319 * src/nullable.c: Formatting changes.
17320
015acc48
AD
173212000-10-02 Akim Demaille <akim@epita.fr>
17322
17323 * src/reduce.h: New file.
17324 Propagate its inclusion.
17325 * src/reduce.c: Topological sort and other formatting changes.
17326 (bool, TRUE, FALSE): Move their definition to...
17327 * src/system.h: here.
17328
8963a27b
AD
173292000-10-02 Akim Demaille <akim@epita.fr>
17330
17331 * src/files.c: Formatting changes.
17332 (tryopen, tryclose, openfiles): Rename as...
17333 (xfopen, xfclose, open_files): this.
17334 (stringappend): static.
17335 * src/files.h: Complete the list of exported symbols.
17336 Propagate its use.
17337
a70083a3
AD
173382000-10-02 Akim Demaille <akim@epita.fr>
17339
17340 * src/reader.h: New file.
17341 Propagate its use instead of tedious list of `extern' and
17342 prototypes.
17343 * src/reader.c: Formatting changes, topological sort,
17344 s/register//.
17345
abadc117
AD
173462000-10-02 Akim Demaille <akim@epita.fr>
17347
17348 * src/lex.h: Prototype `lex.c' exported functions.
17349 * src/reader.c: Adjust.
17350 * src/lex.c: Formatting changes.
17351 (safegetc): Rename as...
17352 (xgetc): this.
17353
720d742f
AD
173542000-10-02 Akim Demaille <akim@epita.fr>
17355
17356 * src/lalr.h: New file.
17357 Propagate its inclusion instead of prototypes and `extern'.
17358 * src/lalr.c: Formatting changes, topological sorting etc.
17359
f2acea59
AD
173602000-10-02 Akim Demaille <akim@epita.fr>
17361
17362 * src/output.c (token_actions): Introduce a temporary array,
17363 YYDEFACT, that makes it possible for this function to use
17364 output_short_table.
17365
d019d655
AD
173662000-10-02 Akim Demaille <akim@epita.fr>
17367
17368 `user_toknums' is output as a `short[]' in `output.c', while it is
17369 defined as a `int[]' in `reader.c'. For consistency with the
17370 other output tables, `user_toknums' is now defined as a table of
17371 shorts.
17372
17373 * src/reader.c (user_toknums): Be a short table instead of an int
17374 table.
17375 Adjust dependencies.
17376
17377 Factor the short table outputs.
17378
17379 * src/output.c (output_short_table): New function.
17380 * src/output.c (output_gram, output_stos, output_rule_data)
17381 (output_base, output_table, output_check): Use it.
17382
6c89f1c1
AD
173832000-10-02 Akim Demaille <akim@epita.fr>
17384
17385 * src/output.c (output): Topological sort of the functions, in
17386 order to get rid of the `static' prototypes.
17387 No longer use `register'.
17388 * src/output.h: New file.
17389 Propagate its inclusion in files explicitly prototyping functions
17390 from output.c.
17391
d9efd181
AD
173922000-09-21 Akim Demaille <akim@epita.fr>
17393
17394 * src/atgeneral.m4: Update from Autoconf.
17395
c29240e7 173962000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
17397
17398 * src/closure.h: New file.
17399 * src/closure.c: Formatting changes, topological sort over the
17400 functions, use of closure.h.
17401 (initialize_closure, finalize_closure): Rename as...
17402 (new_closure, free_closure): these. Adjust dependencies.
17403 * src/LR0.c: Formatting changes, topological sort, use of
17404 cloture.h.
17405 (initialize_states): Rename as...
17406 (new_states): this.
17407 * src/Makefile.am (noinst_HEADERS): Adjust.
17408
499daa50
AD
174092000-09-20 Akim Demaille <akim@epita.fr>
17410
17411 * src/acconfig.h: Don't protect config.h against multiple
17412 inclusion.
17413 Don't define PARAMS.
17414 * src/system.h: Define PARAMS.
17415 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
17416 purpose of config.h. system.h must not try to fix wrong
17417 definitions in config.h.
17418
cc84fd5d
AD
174192000-09-20 Akim Demaille <akim@epita.fr>
17420
17421 * src/derives.h: New file.
17422 * src/main.c, src/derives.h: Use it.
17423 Formatting changes.
17424 * src/Makefile.am (noinst_HEADERS): Adjust.
17425
db5b3a89
AD
174262000-09-20 Akim Demaille <akim@epita.fr>
17427
17428 * tests/atgeneral.m4: Update from Autoconf.
17429 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
17430 (AT_CHECK_CALC): New macros.
17431 Use these macros to test bison with options `', `--raw',
17432 `--debug', `--yacc', `--yacc --debug'.
17433
ceed8467
AD
174342000-09-19 Akim Demaille <akim@epita.fr>
17435
17436 * src/output.c: Formatting changes.
17437 * src/machine.h: Remove, leaving its contents in...
17438 * src/system.h: here.
17439 Include stdio.h.
17440 Adjust all dependencies on stdio.h and machine.h.
17441 * src/getargs.h: New file.
17442 Let all `extern' declarations about getargs.c be replaced with
17443 inclusion of `getargs.h'.
17444 * src/Makefile.am (noinst_HEADERS): Adjust.
17445
17446 * tests/calc.m4 (yyin): Be initialized in main, not on the global
17447 scope.
17448 (yyerror): Returns void, not int.
17449 * doc/bison.texinfo: Formatting changes.
17450
05a1d24b
AD
174512000-09-19 Akim Demaille <akim@epita.fr>
17452
17453 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
17454 portable.
17455
cbd25751
AD
174562000-09-18 Akim Demaille <akim@epita.fr>
17457
17458 * configure.in: Append WARNING_CFLAGS to CFLAGS.
17459 * src/Makefile.am (INCLUDES): Don't.
17460 Be ready to fetch headers in lib/.
17461
13863333
AD
174622000-09-18 Akim Demaille <akim@epita.fr>
17463
17464 * doc/bison.texinfo: Update the copyright.
17465 ANSIfy and GNUify the examples.
17466 Remove the old menu.
17467
0d533154
AD
174682000-09-18 Akim Demaille <akim@epita.fr>
17469
17470 First set of tests: use the `calc' example from the documentation.
17471
17472 * src/bison.s1 (yyparse): Condition the code using `yytname' which
17473 is defined only when YYDEBUG is.
17474 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
17475 * src/files.c (tryopen, tryclose): Formatting changes.
17476 Move to the top and be static.
17477 * src/reader.c (read_signed_integer): Likewise.
17478 * tests/calc.m4: New file.
17479 * Makefile.am, suite.m4: Adjust.
17480 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
17481
e79137ac
AD
174822000-09-18 Akim Demaille <akim@epita.fr>
17483
17484 Add support for an Autotest test suite for Bison.
17485
17486 * m4/m4.m4, m4/atconfig.m4: New files.
17487 * m4/Makefile.am (EXTRA_DIST): Adjust.
17488 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
17489 files.
17490 * src/getargs.c: Display a more standard --version message.
17491 * src/reader.c (reader): Formatting changes.
17492 No longer depend upon VERSION_STRING.
17493 * configure.in: No longer use `dnl'.
17494 Set up the test suite and the new directory `tests/.
17495 (VERSION_STRING): Remove.
17496
27821bff
AD
174972000-04-14 Akim Demaille <akim@epita.fr>
17498
17499 * src/reader.c (copy_comment2): New function, same as former
17500 `copy_comment', but outputs into two FILE *.
17501 (copy_comment): Use it.
17502 (parse_union_decl): Use it.
17503 (get_type, parse_start_decl): Use the same `invalid' message.
17504 (parse_start_decl, parse_union_decl): Use the same `multiple'
17505 message.
17506 (parse_union_decl, copy_guard, copy_action): Use the same
17507 `unmatched' message.
17508 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
17509
cfe5fbc0
AD
175102000-03-31 Akim Demaille <akim@epita.fr>
17511
17512 * src/files.c (tryopen, tryclose): Move to the top.
17513 Be static.
17514
cb7db13e
AD
175152000-03-31 Akim Demaille <akim@epita.fr>
17516
17517 * src/main.c (main): Don't call `done', exit does it.
17518
a0f6b076
AD
175192000-03-31 Akim Demaille <akim@epita.fr>
17520
36281465
AD
17521 * allocate.c: s/return (foo)/return foo/.
17522 * lalr.c: Likewise.
17523 * LR0.c: Likewise.
17524 * output.c: Likewise.
17525 * reader.c: Likewise.
17526 * symtab.c: Likewise.
17527 * vmsgetargs.c: Likewise.
17528
175292000-03-31 Akim Demaille <akim@epita.fr>
17530
17531 Clean up the error reporting functions.
a0f6b076
AD
17532
17533 * src/report.c: New file.
17534 * src/report.h: Likewise.
17535 * src/Makefile.am: Adjust.
17536 * m4/error.m4: New file.
17537 * m4/Makefile.am: Adjust.
17538 * configure.in (jm_PREREQ_ERROR): Call it.
17539 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
17540 Remove.
17541 (fatal, fatals): Remove. All callers use complain.c::fatal.
17542 (warn, warni, warns, warnss, warnss): Remove. All callers use
17543 complain.c::complain.
17544 (toomany): Remove, use fatal instead.
17545 * src/files.c (done): No argument, use complain_message_count.
17546 * src/main.c (main): Register `done' to `atexit'.
17547
17548 * src/getargs.c (usage): More `fputs', less `fprintf'.
17549
18539825
AD
175502000-03-28 Akim Demaille <akim@epita.fr>
17551
17552 * lib/: New directory.
17553 * Makefile.am (SUBDIRS): Adjust.
17554 * configure.in: Adjust.
17555 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
17556 useless.
17557 * src/alloca.c: Moved to lib/.
17558 * src/getopt.c: Likewise.
17559 * src/getopt1.c: Likewise.
17560 * src/getopt.h: Likewise.
17561 * src/ansi2knr.c: Likewise.
17562 * src/ansi2knr.1: Likewise.
17563 * src/Makefile.am: Adjust.
17564 * lib/Makefile.am: New file.
17565
9f306f2a
AD
175662000-03-28 Akim Demaille <akim@epita.fr>
17567
17568 * src/getargs.c (usage): Refresh the help message.
17569
0ba347b6
AD
175702000-03-17 Akim Demaille <akim@epita.fr>
17571
17572 * src/getopt1.c: Updated from textutils 2.0e
17573 * src/getopt.c: Likewise.
17574 * src/getopt.h: Likewise.
17575
dbe7f271
AD
175762000-03-17 Akim Demaille <akim@epita.fr>
17577
17578 * src/Makefile.am (bison.simple): Fix the awk program: quote only
17579 the file name, not the whole `#line LINE FILE'.
17580
75bbe78d
AD
175812000-03-17 Akim Demaille <akim@epita.fr>
17582
17583 On syntax errors, report the token on which we choked.
17584
aa5fd0ee
AD
17585 * src/bison.s1 (yyparse): In the label yyerrlab, when
17586 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 17587
7b306f52
AD
175882000-03-17 Akim Demaille <akim@epita.fr>
17589
aa5fd0ee 17590 * src/reader.c (copy_at): New function.
7b306f52
AD
17591 (copy_guard): Use it.
17592 (copy_action): Use it.
17593
e87b5700
AD
175942000-03-17 Akim Demaille <akim@epita.fr>
17595
17596 Be kind to translators, save some useless translations.
17597
aa5fd0ee 17598 * src/main.c (banner): New function.
e87b5700
AD
17599 (fatal_banner): Use it.
17600 (warn_banner): Use it.
17601
ae3c3164
AD
176022000-03-17 Akim Demaille <akim@epita.fr>
17603
aa5fd0ee
AD
17604 * src/reader.c (copy_definition): Use copy_string and
17605 copy_comment. Removed now unused `match', `ended',
17606 `cplus_comment'.
ae3c3164
AD
17607 (copy_comment, copy_string): Moved, to be visible from
17608 copy_definition.
17609
4dc58e7c
AD
176102000-03-17 Akim Demaille <akim@epita.fr>
17611
aa5fd0ee
AD
17612 * src/reader.c (copy_string): Declare `static inline'. No
17613 problems with inline, since it is checked by configure.
4dc58e7c
AD
17614 (copy_comment): Likewise.
17615
0a6384c4
AD
176162000-03-17 Akim Demaille <akim@epita.fr>
17617
aa5fd0ee 17618 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 17619
3cef001a
AD
176202000-03-17 Akim Demaille <akim@epita.fr>
17621
aa5fd0ee 17622 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
17623 (copy_action): Use it. Removed now unused `match', `ended',
17624 `cplus_comment'.
17625 (copy_guard): Likewise.
17626
ca36d2ef
AD
176272000-03-17 Akim Demaille <akim@epita.fr>
17628
aa5fd0ee 17629 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
17630 (copy_action): Use it.
17631 (copy_guard): Likewise.
17632
6666f98f
AD
176332000-03-17 Akim Demaille <akim@epita.fr>
17634
17635 Change the handling of @s so that they behave exactly like $s.
17636 There is now a pseudo variable @$ (readble and writable), location
17637 of the lhs of the rule (by default ranging from the location of
17638 the first symbol of the rhs, to the location of the last symbol,
17639 or, if the rhs is empty, YYLLOC).
17640
17641 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
17642 yyval.
17643 (yyparse): When providing a default semantic action, provide a
17644 default location action.
17645 (after the $): No longer change `*YYLSP', just stack YYLOC the
17646 same way you stack YYVAL.
17647 * src/reader.c (read_declarations): Use warns.
17648 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
17649 (copy_action, case '@'): Likewise.
17650 Use a standard error message, to save useless work from
17651 translators.
17652
41aca2e0
AD
176532000-03-17 Akim Demaille <akim@epita.fr>
17654
aa5fd0ee
AD
17655 * src/bison.s1: Formatting and cosmetics changes.
17656 * src/reader.c: Likewise.
41aca2e0
AD
17657 Update the Copyright notice.
17658
dc08c1d5
AD
176592000-03-17 Akim Demaille <akim@epita.fr>
17660
aa5fd0ee
AD
17661 * src/bison.s1 (#line): All set to `#line' only, since the
17662 Makefile now handles them.
dc08c1d5 17663
9ee3c97b
AD
176642000-03-16 Akim Demaille <akim@epita.fr>
17665
17666 * src/output.c (output_rule_data): Output the documentation of
17667 some of the tables.
17668 (Copyright notice): Update.
17669 Formatting changes.
17670
0de741ca
AD
176712000-03-16 Akim Demaille <akim@epita.fr>
17672
17673 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
17674 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
17675 One `#if YYDEBUG' remains, since it uses variables which are
17676 defined only if `YYDEBUG != 0'.
17677
bb10be54
AD
176782000-03-16 Akim Demaille <akim@epita.fr>
17679
17680 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
17681 and related variables so that the similarities are highlighted.
17682
b07b484a
AD
176832000-03-16 Akim Demaille <akim@epita.fr>
17684
17685 * src/bison.s1: Properly indent CPP directives.
17686
361f60b3
AD
176872000-03-16 Akim Demaille <akim@epita.fr>
17688
17689 * src/bison.s1: Properly indent the `alloca' CPP section.
17690
8c44d3ec
AD
176912000-03-16 Akim Demaille <akim@epita.fr>
17692
17693 Do not hard code values of directories in `configure.in'.
17694 Update the `configure' tool chain.
17695
17696 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
17697 src/makefile.am.
17698 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
17699 (AC_OUTPUT): Add m4/Makefile.
17700 Bump to bison 1.28a, 1.29 has never been released.
17701 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
17702 handled via src/Makefile.am.
17703 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
17704 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
17705 autoheader.
17706 * Makefile.am (SUBDIRS): Add m4.
17707 (ACLOCAL_AM_FLAGS): New variable.
17708 (AUTOMAKE_OPTIONS): Add check-news.
17709 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
17710 the proper line number and file name.
17711 (DEFS): Propagate the location of bison library files and of the
17712 locale files.
17713 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
17714 builddir.
17715 * acinclude.m4: Remove, replaced by the directory m4.
17716 * m4/Makefile.am (EXTRA_DIST): New variable.
17717 * m4/gettext.m4: New file, from the fileutils.
17718 * m4/lcmessage.m4: Likewise
17719 * m4/progtest.m4: Likewise.
17720 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
17721
f95997e7
AD
177222000-03-10 Akim Demaille <akim@epita.fr>
17723
17724 * src/closure.c:
17725 Formatting changes of various comments.
17726 Respect the GNU coding standards at various places.
17727 Don't use `_()' when no translation is needed.
17728
177291999-12-13 Jesse Thilo <jthilo@gnu.org>
17730
17731 * src/files.c:
17732 OS/2 honors TMPDIR environment variable.
17733
177341999-12-13 Jesse Thilo <jthilo@gnu.org>
17735
17736 * doc/bison.texinfo: Tweaked spelling and grammar.
17737 Updated ISBN.
17738 Removed reference to price of printed copy.
17739 Mention BISON_SIMPLE and BISON_HAIRY.
17740
177411999-12-13 Jesse Thilo <jthilo@gnu.org>
17742
17743 * configure.in, NEWS:
17744 Bison 1.29 released.
17745
177461999-10-27 Jesse Thilo <jthilo@gnu.org>
17747
17748 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
17749 Added reference card.
17750
177511999-07-26 Jesse Thilo <jthilo@gnu.org>
17752
17753 * po/ru.po: Added Russian translation.
17754
177551999-07-26 Jesse Thilo <jthilo@gnu.org>
17756
17757 * configure.in: Added Russian translation.
17758
177591999-07-06 Jesse Thilo <jthilo@gnu.org>
17760
17761 * configure.in, NEWS, README:
17762 Released version 1.28.
17763
177641999-06-14 Jesse Thilo <jthilo@gnu.org>
17765
17766 * src/system.h:
17767 Squashed redefinition warning on some systems.
17768
17769 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
17770 Have configure build version string instead of relying on ANSI string
17771 concatentation.
17772
177731999-06-14 Jesse Thilo <jthilo@gnu.org>
17774
17775 * po/POTFILES.in: Got rid of version.c.
17776
177771999-06-14 Jesse Thilo <jthilo@gnu.org>
17778
17779 * acconfig.h, configure.in:
17780 Have configure build version string instead of relying on ANSI string
17781 concatentation.
17782
177831999-06-08 Jesse Thilo <jthilo@gnu.org>
17784
17785 * doc/bison.1:
17786 Dropped mention of `+' for long-named options.
17787
177881999-05-30 Jesse Thilo <jthilo@gnu.org>
17789
17790 * src/files.c: Added <unistd.h> for unlink().
17791
17792 * src/Makefile.am, src/system.h:
17793 I18n fixes.
17794
177951999-05-30 Jesse Thilo <jthilo@gnu.org>
17796
17797 * README: Added a FAQ list.
17798
17799 * configure.in, acconfig.h:
17800 I18n fixes.
17801
178021999-05-30 Jesse Thilo <jthilo@gnu.org>
17803
17804 * doc/FAQ, doc/Makefile.am:
17805 Added a FAQ list.
17806
178071999-05-19 Jesse Thilo <jthilo@gnu.org>
17808
17809 * src/alloc.h, src/symtab.h, src/version.c:
17810 Protected inclusion of "config.h" with HAVE_CONFIG_H.
17811
178121999-04-18 Jesse Thilo <jthilo@gnu.org>
17813
17814 * src/.cvsignore, src/Makefile.am:
17815 Reorganized: sources in `src', documentation in `doc'.
17816
17817 * src/lex.c (literalchar):
17818 fixed the code for escaping double quotes (thanks
17819 Jonathan Czisny.)
17820
178211999-04-18 Jesse Thilo <jthilo@gnu.org>
17822
17823 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
17824 Adjusted paths to reflect directory reorganization.
17825
178261999-04-18 Jesse Thilo <jthilo@gnu.org>
17827
17828 * doc/.cvsignore, doc/Makefile.am:
17829 Reorganized: sources in `src', documentation in `doc'.
17830
178311999-04-18 Jesse Thilo <jthilo@gnu.org>
17832
17833 * configure.in:
17834 Updated AC_INIT file to reflect directory reorganization.
17835
17836 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
17837 Reorganized: sources in `src', documentation in `doc'.
17838
178391999-04-13 Jesse Thilo <jthilo@gnu.org>
17840
17841 * src/allocate.c:
17842 Don't declare calloc() and realloc() if not necessary.
17843
178441999-04-13 Jesse Thilo <jthilo@gnu.org>
17845
17846 * configure.in, acconfig.h, acinclude.m4:
17847 Don't declare calloc() and realloc() if not necessary.
17848
178491999-03-23 Jesse Thilo <jthilo@gnu.org>
17850
17851 * po/.cvsignore: Added i18n support.
17852
178531999-03-23 Jesse Thilo <jthilo@gnu.org>
17854
17855 * acconfig.h, configure.in, Makefile.am:
17856 Added i18n support.
17857
178581999-03-22 Jesse Thilo <jthilo@gnu.org>
17859
17860 * src/bison.s1: Fixed #line numbers.
17861
178621999-03-15 Jesse Thilo <jthilo@gnu.org>
17863
17864 * po/es.po, po/fr.po, po/nl.po, po/de.po:
17865 Added PO files from Translation Project.
17866
178671999-03-03 Jesse Thilo <jthilo@gnu.org>
17868
17869 * Makefile.am:
17870 Added support for non-ANSI compilers (ansi2knr).
17871
178721999-02-16 Jesse Thilo <jthilo@gnu.org>
17873
17874 * configure.in: Bumped version number to 1.27.
17875
17876 * Makefile.am:
17877 Added `bison.simple' to list of files removed by `make distclean'.
17878
178791999-02-12 Jesse Thilo <jthilo@gnu.org>
17880
17881 * src/files.c, src/files.h:
17882 Defined locations of parser files in config.h instead of Makefile.
17883
178841999-02-12 Jesse Thilo <jthilo@gnu.org>
17885
17886 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
17887 Defined locations of parser files in config.h instead of Makefile.
17888
178891999-02-09 Jesse Thilo <jthilo@gnu.org>
17890
17891 * Makefile.am:
17892 Removed inappropriate use of $< macro.
17893
178941999-02-05 Jesse Thilo <jthilo@gnu.org>
17895
17896 * po/Makefile.in.in, po/POTFILES.in:
17897 Add `po' directory skeleton.
17898
178991999-01-27 Jesse Thilo <jthilo@gnu.org>
17900
17901 * README: Document help-bison list.
17902
17903 * configure.in: Add check for mkstemp().
17904
179051999-01-20 Jesse Thilo <jthilo@gnu.org>
17906
17907 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
17908 Hush a few compiler warnings.
17909
17910 * src/files.c:
17911 Add tryclose(), which verifies that fclose was successful.
17912 Hush a couple of compiler warnings.
17913
179141999-01-20 Jesse Thilo <jthilo@gnu.org>
17915
17916 * Makefile.am, OChangeLog:
17917 ChangeLog is now automatically generated. Include the old version as
17918 OChangeLog.
17919
179201999-01-14 Jesse Thilo <jthilo@gnu.org>
17921
17922 * 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:
17923 Update FSF address.
17924
179251999-01-14 Jesse Thilo <jthilo@gnu.org>
17926
17927 * doc/bison.texinfo: Fix formatting glitch.
17928
17929 * doc/bison.texinfo: Update FSF address.
17930
179311999-01-14 Jesse Thilo <jthilo@gnu.org>
17932
17933 * acconfig.h: Update FSF address.
17934
179351999-01-08 Jesse Thilo <jthilo@gnu.org>
17936
17937 * src/system.h:
17938 Don't define PACKAGE here, since config.h defines it.
17939
179401998-12-30 Jesse Thilo <jthilo@gnu.org>
17941
17942 * src/reader.c: Update copyright date.
17943
17944 * src/main.c:
17945 Ditch sprintf to statically-sized buffers in fatal/warn functions in
17946 favor of output directly to stderr (avoids buffer overruns).
17947
17948 * src/reader.c: Some checks for premature EOF.
17949
17950 * 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:
17951 Use prototypes if the compiler understands them.
17952
17953 * src/files.c: Honor TMPDIR on Unix hosts.
17954 Use prototypes if the compiler understands them.
17955
17956 * src/reader.c:
17957 Fix a couple of buffer overrun bugs.
17958 Use prototypes if the compiler understands them.
17959
17960 * src/system.h: Include unistd.h and ctype.h.
17961 Use #ifdef instead of #if for NLS symbols.
17962
179631998-12-30 Jesse Thilo <jthilo@gnu.org>
17964
17965 * doc/bison.texinfo:
17966 Delete comment "consider using @set for edition number, etc..." since
17967 we now are doing so.
17968
179691998-12-30 Jesse Thilo <jthilo@gnu.org>
17970
17971 * configure.in:
17972 Use prototypes if the compiler understands them.
17973
17974 * NEWS: Document 1.26 highlights.
17975
17976 * Makefile.am: Require Automake 1.3 or later.
17977
17978 * acconfig.h:
17979 Use prototypes if the compiler understands them.
17980
179811998-12-29 Jesse Thilo <jthilo@gnu.org>
17982
17983 * src/version.c:
17984 Use VERSION symbol from automake for version number.
17985
179861998-12-29 Jesse Thilo <jthilo@gnu.org>
17987
17988 * acconfig.h, configure.in, version.cin:
17989 Use VERSION symbol from automake for version number.
17990
179911998-11-28 Jesse Thilo <jthilo@gnu.org>
17992
17993 * Makefile.am:
17994 Distribute original version of simple parser (bison.s1), not built
17995 version (bison.simple).
17996
179971998-11-28 Jesse Thilo <jthilo@gnu.org>
17998
17999 * doc/bison.texinfo: Add info dir entry.
18000
18001 * doc/bison.texinfo:
18002 Let automake put version number into documentation.
18003
180041998-11-26 Jesse Thilo <jthilo@gnu.org>
18005
18006 * src/bison.cld, src/build.com, src/vmshlp.mar:
18007 Add non-RCS files from /gd/gnu/bison.
18008
180091998-11-26 Jesse Thilo <jthilo@gnu.org>
18010
18011 * doc/bison.1:
18012 Document the BISON_HAIRY and BISON_SIMPLE variables.
18013
180141998-11-25 Jesse Thilo <jthilo@gnu.org>
18015
18016 * src/version.c: Build version.c automatically.
18017
18018 * src/reader.c:
18019 Fix token numbering (used to start at 258, not 257).
18020
18021 * src/system.h: Include config.h.
18022
18023 * src/getargs.c: Update bug report address.
18024
18025 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
18026 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
18027
180281998-11-25 Jesse Thilo <jthilo@gnu.org>
18029
18030 * Makefile.am:
18031 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
18032
18033 * configure.in, version.cin:
18034 Build version.c automatically.
18035
18036 * AUTHORS: Add AUTHORS file.
18037
18038 * README: Update bug report address.
18039
18040 * bison.simple:
18041 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
18042
18043 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
18044 Add automake stuff.
18045
180461998-11-25 Jesse Thilo <jthilo@gnu.org>
18047
18048 * doc/bison.texinfo: Clean up some formatting.
18049
180501998-05-05 Richard Stallman <rms@gnu.org>
18051
18052 * doc/bison.texinfo:
18053 Explain better why to make a pure parser.
18054
180551998-01-05 Richard Stallman <rms@gnu.org>
18056
18057 * src/files.c (openfiles):
18058 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
18059 find a temporary directory, if possible. Do not unlink files while
18060 they are open.
18061
180621997-08-25 Richard Stallman <rms@gnu.org>
18063
18064 * src/reader.c (stack_offset;):
18065 Change some warni to warns.
18066
18067 * src/lex.c (literalchar): Use warns, not warni.
18068
180691997-06-28 Richard Stallman <rms@gnu.org>
18070
18071 * src/bison.s1: Add a Bison version comment.
18072
18073 * src/main.c (fatal, warn, berror):
18074 Use program_name.
18075
180761997-06-28 Richard Stallman <rms@gnu.org>
18077
18078 * Makefile.in (bison_version): New variable.
18079 (dist): Use that variable.
18080 (bison.s1): Substitute the Bison version into bison.simple.
18081
18082 * bison.simple: Add a Bison version comment.
18083
180841997-06-18 Richard Stallman <rms@gnu.org>
18085
18086 * src/main.c (fatal, warn, berror):
18087 Make error messages standard.
18088 (toomany): Improve error message text.
18089
18090 * 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:
18091 new.h renamed to alloc.h.
18092
180931997-06-18 Richard Stallman <rms@gnu.org>
18094
18095 * Makefile.in: new.h renamed to alloc.h.
18096
180971997-05-24 Richard Stallman <rms@gnu.org>
18098
18099 * src/lex.c (literalchar):
18100 Fix the code for escaping \, " and '.
18101
18102 (lex): Avoid trouble when there are many chars
18103 to discard in a char literal with just several chars in it.
18104
181051997-05-17 Richard Stallman <rms@gnu.org>
18106
18107 * src/bison.s1:
18108 Use malloc, if using alloca is troublesome.
18109 (YYSTACK_USE_ALLOCA): New flag macro.
18110 Define it for some systems and compilers.
18111 (YYSTACK_ALLOC): New macro.
18112 (yyparse): Use YYSTACK_ALLOC to allocate stack.
18113 If it was malloc'd, free it.
18114
181151997-05-17 Richard Stallman <rms@gnu.org>
18116
18117 * bison.simple:
18118 Use malloc, if using alloca is troublesome.
18119 (YYSTACK_USE_ALLOCA): New flag macro.
18120 Define it for some systems and compilers.
18121 (YYSTACK_ALLOC): New macro.
18122 (yyparse): Use YYSTACK_ALLOC to allocate stack.
18123 If it was malloc'd, free it.
18124
181251997-04-23 Richard Stallman <rms@gnu.org>
18126
18127 * src/bison.s1:
18128 (alloca) [__hpux]: Always define as __builtin_alloca.
18129
181301997-04-23 Richard Stallman <rms@gnu.org>
18131
18132 * bison.simple:
18133 (alloca) [__hpux]: Always define as __builtin_alloca.
18134
181351997-04-22 Richard Stallman <rms@gnu.org>
18136
18137 * src/bison.s1:
18138 [__hpux]: Include alloca.h (right for HPUX 10)
18139 instead of declaring alloca (right for HPUX 9).
18140
18141 * src/bison.s1 (__yy_memcpy):
18142 Declare arg `count' as unsigned int.
18143 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
18144
181451997-04-22 Richard Stallman <rms@gnu.org>
18146
18147 * bison.simple:
18148 [__hpux]: Include alloca.h (right for HPUX 10)
18149 instead of declaring alloca (right for HPUX 9).
18150
18151 * bison.simple (__yy_memcpy):
18152 Declare arg `count' as unsigned int.
18153 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
18154
181551997-01-03 Richard Stallman <rms@gnu.org>
18156
18157 * src/allocate.c: [__STDC__ or _MSC_VER]:
18158 Declare calloc and realloc to return void *.
18159
181601997-01-02 Richard Stallman <rms@gnu.org>
18161
18162 * src/system.h:
18163 [_MSC_VER]: Include stdlib.h and process.h.
18164 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
18165
18166 * src/main.c (main): Return FAILURE as a value.
18167 (printable_version): Declare arg as int, not char.
18168
181691997-01-02 Richard Stallman <rms@gnu.org>
18170
18171 * Makefile.in (dist):
18172 Explicitly check for symlinks, and copy them.
18173
181741996-12-19 Richard Stallman <rms@gnu.org>
18175
18176 * src/files.c:
18177 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
18178
181791996-12-18 Paul Eggert <eggert@gnu.org>
18180
18181 * src/bison.s1 (yyparse):
18182 If __GNUC__ and YYPARSE_PARAM are both defined,
18183 declare yyparse to have a void * argument.
18184
181851996-12-18 Paul Eggert <eggert@gnu.org>
18186
18187 * bison.simple (yyparse):
18188 If __GNUC__ and YYPARSE_PARAM are both defined,
18189 declare yyparse to have a void * argument.
18190
181911996-12-17 Richard Stallman <rms@gnu.org>
18192
18193 * src/reduce.c (nbits): Add some casts.
18194
181951996-08-12 Richard Stallman <rms@gnu.org>
18196
18197 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
18198
181991996-08-12 Richard Stallman <rms@gnu.org>
18200
18201 * bison.simple: Test _MSDOS as well as _MSDOS_.
18202
182031996-07-31 Richard Stallman <rms@gnu.org>
18204
18205 * src/bison.s1:
18206 [__sun && __i386]: Include alloca.h.
18207
182081996-07-31 Richard Stallman <rms@gnu.org>
18209
18210 * bison.simple:
18211 [__sun && __i386]: Include alloca.h.
18212
182131996-07-30 Richard Stallman <rms@gnu.org>
18214
18215 * src/bison.s1: Comment change.
18216
18217 * src/bison.s1: Test _MSDOS_, not MSDOS.
18218
182191996-07-30 Richard Stallman <rms@gnu.org>
18220
18221 * bison.simple: Comment change.
18222
18223 * bison.simple: Test _MSDOS_, not MSDOS.
18224
182251996-06-01 Richard Stallman <rms@gnu.org>
18226
18227 * 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:
18228 Insert `_' macro around many string constants.
18229
18230 * src/main.c:
18231 Insert `_' macro around many string constants.
18232
18233 (main): Call setlocale, bindtextdomain and textdomain.
18234
18235 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
18236 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
18237 [ENABLE_NLS]: Include libintl.h.
18238 [ENABLE_NLS] (gettext): Define.
18239 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
18240 (N_, PACKAGE, LOCALEDIR): New macros.
18241
182421996-06-01 Richard Stallman <rms@gnu.org>
18243
18244 * POTFILES.in: New file.
18245
18246 * Makefile.in (allocate.o):
18247 Define target explicitly.
18248
18249 * Makefile.in (CFLAGS): Set to @CFLAGS@.
18250 (LDFLAGS): Set to @LDFLAGS@.
18251 (configure): Run autoconf only if preceding `cd' succeeds.
18252 (bison.s1): Redirect output to temporary file then move the
18253 temporary to the target, rather than redirecting directly to bison.s1.
18254 (clean): Remove config.status and config.log.
18255 (distclean): Don't remove config.status here.
18256
182571996-05-12 Richard Stallman <rms@gnu.org>
18258
18259 * src/bison.s1:
18260 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
18261
182621996-05-12 Richard Stallman <rms@gnu.org>
18263
18264 * bison.simple:
18265 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
18266
182671996-05-11 Richard Stallman <rms@gnu.org>
18268
18269 * src/bison.s1 (__yy_memcpy):
18270 Really reorder the args, as was supposedly done on Feb 14 1995.
18271 (yyparse): Calls changed accordingly.
18272
182731996-05-11 Richard Stallman <rms@gnu.org>
18274
18275 * Makefile.in (dist): Don't use $(srcdir).
18276
18277 * bison.simple (__yy_memcpy):
18278 Really reorder the args, as was supposedly done on Feb 14 1995.
18279 (yyparse): Calls changed accordingly.
18280
182811996-01-27 Richard Stallman <rms@gnu.org>
18282
18283 * src/output.c (output_rule_data):
18284 Test YYERROR_VERBOSE in the conditional
18285 around the definition of ttyname.
18286
182871995-12-29 Richard Stallman <rms@gnu.org>
18288
18289 * src/bison.s1:
18290 Fix line numbers in #line commands.
18291
182921995-12-29 Richard Stallman <rms@gnu.org>
18293
18294 * bison.simple:
18295 Fix line numbers in #line commands.
18296
182971995-12-27 Richard Stallman <rms@gnu.org>
18298
18299 * src/bison.s1 (YYPARSE_PARAM_DECL):
18300 In C++, make it always null.
18301 (YYPARSE_PARAM_ARG): New macro.
18302 (yyparse): Use YYPARSE_PARAM_ARG.
18303
183041995-12-27 Richard Stallman <rms@gnu.org>
18305
18306 * bison.simple (YYPARSE_PARAM_DECL):
18307 In C++, make it always null.
18308 (YYPARSE_PARAM_ARG): New macro.
18309 (yyparse): Use YYPARSE_PARAM_ARG.
18310
183111995-11-29 Richard Stallman <rms@gnu.org>
18312
18313 * doc/bison.texinfo:
18314 Describe literal string tokens, %raw, %no_lines, %token_table.
18315
183161995-11-29 Daniel Hagerty <hag@gnu.org>
18317
18318 * doc/bison.texinfo: Fixed update date
18319
183201995-10-16 Richard Stallman <rms@gnu.org>
18321
18322 * src/version.c: Version 1.25.
18323
183241995-10-16 Richard Stallman <rms@gnu.org>
18325
18326 * NEWS: *** empty log message ***
18327
183281995-10-16 Richard Stallman <rms@gnu.org>
18329
18330 * doc/bison.1, doc/bison.rnh:
18331 Add new options.
18332
183331995-10-15 Richard Stallman <rms@gnu.org>
18334
18335 * src/vmsgetargs.c, src/getargs.c:
18336 Added -n, -k, and -raw switches.
18337 (noparserflag, toknumflag, rawtoknumflag): New variables.
18338
18339 * src/symtab.h (SALIAS):
18340 New #define for adding aliases to %token.
18341 (struct bucket): Added `alias' field.
18342
18343 * src/reduce.c (reduce_grammar):
18344 Revise error message.
18345 (print_notices): Remove final `.' from error message.
18346
18347 * src/reader.c (reader_output_yylsp):
18348 New function.
18349 (readgram): Use `#if 0' around code that accepted %command
18350 inside grammar rules: The documentation doesn't allow it,
18351 and it will fail since the %command processors scan for the next %.
18352 (parse_token_decl): Extended the %token
18353 declaration to allow a multi-character symbol as an alias.
18354 (parse_thong_decl): New function.
18355 (read_declarations): Added %thong declarations.
18356 (read_declarations): Handle NOOP to deal with allowing
18357 % declarations as another means to specify the flags.
18358 (readgram): Allow %prec prior to semantics embedded in a rule.
18359 (skip_to_char, read_declarations, copy_definition)
18360 (parse_token_decl, parse_start_decl, parse_type_decl)
18361 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
18362 (get_type_name, copy_guard, copy_action, readgram)
18363 (get_type, packsymbols): Revised most error messages.
18364 Changed `fatal' to `warnxxx' to avoid aborting for error.
18365 Revised and use multiple warnxxx functions to avoid using VARARGS1.
18366 (read_declarations): Improve the error message for
18367 an invalid character. Do not abort.
18368 (read_declarations, copy_guard, copy_action): Use
18369 printable_version to avoid unprintable characters in printed output.
18370 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
18371 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
18372 Allow the type of a non-terminal can be given
18373 more than once, as long as all specifications give the same type.
18374
18375 * src/output.c:
18376 (output_headers, output_trailers, output, output_gram)
18377 (output_rule_data): Implement noparserflag variable.
18378 Implement toknumflag variable.
18379 (output): Call reader_output_yylsp to output LTYPESTR.
18380
18381 * src/main.c (main):
18382 If reader sees an error, don't process the grammar.
18383 (fatals): Updated to not use VARARGS1.
18384 (printable_version, int_to_string, warn, warni, warns, warnss)
18385 (warnsss): New error reporting functions. Avoid abort for error.
18386
18387 * src/lex.h:
18388 Added THONG and NOOP for alias processing.
18389 Added SETOPT for the new code that allows setting options with %flags.
18390
18391 * src/lex.c:
18392 Include getopt.h. Add some extern decls.
18393 (safegetc): New function to deal with EOF gracefully.
18394 (literalchar); new function to deal with reading \ escapes.
18395 (lex): Use literalchar.
18396 (lex): Implemented "..." tokens.
18397 (literalchar, lex, parse_percent_token): Made tokenbuffer
18398 always contain the token. This includes growing the token
18399 buffer while reading an integer.
18400 (parse_percent_token): Replaced if-else statement with percent_table.
18401 (parse_percent_token): Added % declarations as another
18402 way to specify the flags -n, -l, and -r. Also added hooks for
18403 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
18404 major changes to files.c.
18405 (lex) Retain in the incoming stream a character following
18406 an incorrect '/'.
18407 (skip_white_space, lex): Revised most error messages
18408 and changed fatal to warn to avoid aborting.
18409 (percent_table): Added %thong declarations.
18410
18411 * src/gram.h: Comment changes.
18412
18413 * src/files.c (openfiles, open_extra_files, done):
18414 Add faction flag
18415 and actfile file. Handle noparserflag. Both for -n switch.
18416
18417 * src/conflicts.c (resolve_sr_conflict):
18418 Remove use of alloca.
18419
184201995-06-01 Jim Meyering <meyering@gnu.org>
18421
18422 * doc/bison.texinfo: *** empty log message ***
18423
184241995-05-06 Richard Stallman <rms@gnu.org>
18425
18426 * src/bison.s1: Comment change.
18427
184281995-05-06 Richard Stallman <rms@gnu.org>
18429
18430 * bison.simple: Comment change.
18431
184321995-05-03 Richard Stallman <rms@gnu.org>
18433
18434 * src/version.c: Version now 1.24.
18435
18436 * src/bison.s1: Change distribution terms.
18437
18438 * src/version.c: Version now 1.23.
18439
184401995-05-03 Richard Stallman <rms@gnu.org>
18441
18442 * doc/bison.texinfo:
18443 Rewrite "Conditions for Using Bison".
18444 Update version to 1.24.
18445
184461995-05-03 Richard Stallman <rms@gnu.org>
18447
18448 * bison.simple: Change distribution terms.
18449
184501995-02-23 Richard Stallman <rms@gnu.org>
18451
18452 * src/files.c: Test __VMS_POSIX as well as VMS.
18453
184541995-02-14 Jim Meyering <meyering@gnu.org>
18455
18456 * src/bison.s1 (__yy_memcpy):
18457 Renamed from __yy_bcopy to avoid
18458 confusion. Reverse FROM and TO arguments to be consistent with
18459 those of memcpy.
18460
184611995-02-14 Jim Meyering <meyering@gnu.org>
18462
18463 * bison.simple (__yy_memcpy):
18464 Renamed from __yy_bcopy to avoid
18465 confusion. Reverse FROM and TO arguments to be consistent with
18466 those of memcpy.
18467
184681994-11-10 David J. MacKenzie <djm@gnu.org>
18469
18470 * NEWS: reformat
18471
18472 * NEWS: New file.
18473
18474 * Makefile.in (DISTFILES): Include NEWS.
18475
18476 * Makefile.in (DISTFILES):
18477 Include install-sh, not install.sh.
18478
18479 * configure.in: Update to Autoconf v2 macro names.
18480
184811994-10-05 David J. MacKenzie <djm@gnu.org>
18482
18483 * Makefile.in: fix typo
18484
18485 * Makefile.in (prefix, exec_prefix):
18486 Let configure set them.
18487
184881994-09-28 David J. MacKenzie <djm@gnu.org>
18489
18490 * Makefile.in: Set datadir to $(prefix)/share.
18491
184921994-09-15 Richard Stallman <rms@gnu.org>
18493
18494 * src/bison.s1:
18495 Update copyright notice and GPL version.
18496
184971994-09-15 Richard Stallman <rms@gnu.org>
18498
18499 * bison.simple:
18500 Update copyright notice and GPL version.
18501
185021994-07-12 Richard Stallman <rms@gnu.org>
18503
18504 * src/reduce.c, src/reader.c:
18505 entered into RCS
18506
185071994-05-05 David J. MacKenzie <djm@gnu.org>
18508
18509 * Makefile.in: entered into RCS
18510
185111994-03-26 Richard Stallman <rms@gnu.org>
18512
18513 * src/bison.s1: entered into RCS
18514
185151994-03-26 Richard Stallman <rms@gnu.org>
18516
18517 * bison.simple: entered into RCS
18518
185191994-03-25 Richard Stallman <rms@gnu.org>
18520
18521 * src/main.c: entered into RCS
18522
185231994-03-24 Richard Stallman <rms@gnu.org>
18524
18525 * src/conflicts.c: entered into RCS
18526
185271994-01-02 Richard Stallman <rms@gnu.org>
18528
18529 * Makefile.in: *** empty log message ***
18530
185311993-11-21 Richard Stallman <rms@gnu.org>
18532
18533 * src/bison.s1: *** empty log message ***
18534
185351993-11-21 Richard Stallman <rms@gnu.org>
18536
18537 * doc/bison.texinfo: entered into RCS
18538
18539 * doc/bison.texinfo: *** empty log message ***
18540
185411993-11-21 Richard Stallman <rms@gnu.org>
18542
18543 * bison.simple: *** empty log message ***
18544
185451993-10-25 David J. MacKenzie <djm@gnu.org>
18546
18547 * doc/bison.texinfo: *** empty log message ***
18548
185491993-10-19 Richard Stallman <rms@gnu.org>
18550
18551 * src/bison.s1: *** empty log message ***
18552
185531993-10-19 Richard Stallman <rms@gnu.org>
18554
18555 * bison.simple: *** empty log message ***
18556
185571993-10-14 Richard Stallman <rms@gnu.org>
18558
18559 * src/bison.s1: *** empty log message ***
18560
185611993-10-14 Richard Stallman <rms@gnu.org>
18562
18563 * bison.simple: *** empty log message ***
18564
185651993-09-14 David J. MacKenzie <djm@gnu.org>
18566
18567 * doc/bison.texinfo: *** empty log message ***
18568
185691993-09-13 Noah Friedman <friedman@gnu.org>
18570
18571 * Makefile.in: *** empty log message ***
18572
185731993-09-10 Richard Stallman <rms@gnu.org>
18574
18575 * src/conflicts.c: *** empty log message ***
18576
18577 * src/system.h: entered into RCS
18578
185791993-09-10 Richard Stallman <rms@gnu.org>
18580
18581 * doc/bison.1: entered into RCS
18582
185831993-09-06 Noah Friedman <friedman@gnu.org>
18584
18585 * src/version.c: entered into RCS
18586
185871993-09-06 Noah Friedman <friedman@gnu.org>
18588
18589 * Makefile.in: *** empty log message ***
18590
185911993-07-30 David J. MacKenzie <djm@gnu.org>
18592
18593 * Makefile.in: *** empty log message ***
18594
185951993-07-24 Richard Stallman <rms@gnu.org>
18596
18597 * src/bison.s1: *** empty log message ***
18598
185991993-07-24 Richard Stallman <rms@gnu.org>
18600
18601 * bison.simple: *** empty log message ***
18602
186031993-07-08 David J. MacKenzie <djm@gnu.org>
18604
18605 * Makefile.in: *** empty log message ***
18606
186071993-07-04 Richard Stallman <rms@gnu.org>
18608
18609 * src/bison.s1: *** empty log message ***
18610
186111993-07-04 Richard Stallman <rms@gnu.org>
18612
18613 * bison.simple: *** empty log message ***
18614
186151993-06-26 David J. MacKenzie <djm@gnu.org>
18616
18617 * src/getargs.c: entered into RCS
18618
186191993-06-26 David J. MacKenzie <djm@gnu.org>
18620
18621 * doc/bison.texinfo: *** empty log message ***
18622
18623 * doc/bison.1: New file.
18624
186251993-06-25 Richard Stallman <rms@gnu.org>
18626
18627 * src/getargs.c: New file.
18628
186291993-06-16 Richard Stallman <rms@gnu.org>
18630
18631 * src/bison.s1: *** empty log message ***
18632
186331993-06-16 Richard Stallman <rms@gnu.org>
18634
18635 * bison.simple: *** empty log message ***
18636
186371993-06-03 Richard Stallman <rms@gnu.org>
18638
18639 * src/bison.s1: New file.
18640
186411993-06-03 Richard Stallman <rms@gnu.org>
18642
18643 * doc/bison.texinfo: *** empty log message ***
18644
186451993-06-03 Richard Stallman <rms@gnu.org>
18646
18647 * bison.simple: New file.
18648
186491993-05-19 Richard Stallman <rms@gnu.org>
18650
18651 * doc/bison.texinfo: New file.
18652
186531993-05-07 Noah Friedman <friedman@gnu.org>
18654
18655 * Makefile.in: *** empty log message ***
18656
186571993-04-28 Noah Friedman <friedman@gnu.org>
18658
18659 * src/reader.c: *** empty log message ***
18660
186611993-04-23 Noah Friedman <friedman@gnu.org>
18662
18663 * src/alloc.h: entered into RCS
18664
186651993-04-20 David J. MacKenzie <djm@gnu.org>
18666
18667 * src/version.c: *** empty log message ***
18668
18669 * src/files.c, src/allocate.c:
18670 entered into RCS
18671
18672 * src/reader.c: *** empty log message ***
18673
18674 * src/lex.c: entered into RCS
18675
18676 * src/conflicts.c: New file.
18677
18678 * src/symtab.c: entered into RCS
18679
18680 * src/alloc.h: New file.
18681
18682 * src/LR0.c: entered into RCS
18683
186841993-04-18 Noah Friedman <friedman@gnu.org>
18685
18686 * src/reader.c: New file.
18687
18688 * src/version.c: *** empty log message ***
18689
186901993-04-18 Noah Friedman <friedman@gnu.org>
18691
18692 * Makefile.in: *** empty log message ***
18693
186941993-04-17 Noah Friedman <friedman@gnu.org>
18695
18696 * Makefile.in: *** empty log message ***
18697
186981993-04-15 Richard Stallman <rms@gnu.org>
18699
18700 * src/main.c, src/files.c:
18701 New file.
18702
187031993-04-15 Noah Friedman <friedman@gnu.org>
18704
18705 * configure.in: entered into RCS
18706
18707 * configure.in: *** empty log message ***
18708
18709 * configure.in: New file.
18710
187111993-04-14 Richard Stallman <rms@gnu.org>
18712
18713 * Makefile.in: New file.
18714
187151993-04-13 Richard Stallman <rms@gnu.org>
18716
18717 * src/version.c: New file.
18718
187191993-03-25 Richard Stallman <rms@gnu.org>
18720
18721 * src/output.c: entered into RCS
18722
187231992-09-25 Richard Stallman <rms@gnu.org>
18724
18725 * configure.bat: entered into RCS
18726
187271992-06-22 Richard Stallman <rms@gnu.org>
18728
18729 * src/vmsgetargs.c: entered into RCS
18730
187311992-06-22 Richard Stallman <rms@gnu.org>
18732
18733 * doc/bison.rnh: entered into RCS
18734
187351992-04-20 David J. MacKenzie <djm@gnu.org>
18736
18737 * README: entered into RCS
18738
187391992-01-22 Richard Stallman <rms@gnu.org>
18740
18741 * src/machine.h: entered into RCS
18742
187431991-12-21 Richard Stallman <rms@gnu.org>
18744
18745 * src/lalr.c, src/closure.c:
18746 entered into RCS
18747
187481991-12-20 Richard Stallman <rms@gnu.org>
18749
18750 * src/state.h: entered into RCS
18751
187521991-12-18 Richard Stallman <rms@gnu.org>
18753
18754 * src/print.c, src/nullable.c, src/derives.c:
18755 entered into RCS
18756
187571991-11-03 David J. MacKenzie <djm@gnu.org>
18758
18759 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
18760 entered into RCS
18761
187621988-09-09 Richard Stallman <rms@gnu.org>
18763
18764 * src/bison.hairy: entered into RCS
18765
187661987-12-16 Richard Stallman <rms@gnu.org>
18767
18768 * REFERENCES: entered into RCS
dc546b0f 18769
f294a2c2 18770
04098407 18771 -----
f294a2c2 18772
04098407 18773 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
95021767
JD
18774 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
18775 Free Software Foundation, Inc.
f294a2c2 18776
04098407
PE
18777 Copying and distribution of this file, with or without
18778 modification, are permitted provided the copyright notice and this
18779 notice are preserved.
e9071366
AD
18780
18781$Id$