]>
Commit | Line | Data |
---|---|---|
996b1c7e PE |
1 | 2002-12-08 Paul Eggert <eggert@twinsun.com> |
2 | ||
3 | * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__, | |
4 | since this causes problems when __file__ contains character | |
5 | sequences like "@" that are treated specially by src/scan-skel.l. | |
6 | Instead, just use the file's basename. This fixes the bug | |
7 | reported by Martin Mokrejs in | |
8 | <http://mail.gnu.org/pipermail/bug-bison/2002-December/001949.html>. | |
9 | ||
e19c4e5d PE |
10 | 2002-12-06 Paul Eggert <eggert@twinsun.com> |
11 | ||
12 | Add support for rules that do not have trailing semicolons, as | |
13 | POSIX requires. Improve the quality of locations in Bison | |
14 | diagnostics. | |
15 | ||
16 | * src/location.c: Include <quotearg.h>. | |
17 | (empty_location): Now const. | |
18 | (location_print): New function. Follow the recommendation of the | |
19 | GNU Coding Standards for locations that span file boundaries. | |
20 | * src/location.h: Do not include <quotearg.h>; no longer needed. | |
21 | (boundary): New type. | |
22 | (location_t): Use it. This allows locations to span file boundaries. | |
23 | All member uses changed: file -> start.file or end.file (as needed), | |
24 | first_line -> start.line, first_column -> start.column, | |
25 | last_line -> end.line, last_column -> end.column. | |
26 | (equal_boundaries): New function. | |
27 | (LOCATION_RESET, LOCATION_STEP): Remove. | |
28 | (LOCATION_PRINT): Remove. All callers changed to use location_print. | |
29 | (empty_location): Now const. | |
30 | (location_print): New decl. | |
31 | * src/parse-gram.y (lloc_default): New function, which handles | |
32 | empty locations more accurately. | |
33 | (YYLLOC_DEFAULT): Use it. | |
34 | (%token COLON): Remove. | |
35 | (%token ID_COLON): New token. | |
36 | (rules): Use it. | |
37 | (declarations, rules): Remove trailing semicolon. | |
38 | (declaration, rules_or_grammar_declaration): | |
39 | Allow empty (";") declaration. | |
40 | (symbol_def): Remove empty actions; no longer needed. | |
41 | (rules_or_grammar_declaration): Remove trailing semicolon. | |
42 | (semi_colon.opt): Remove. | |
43 | * src/reader.h: Include location.h. | |
44 | (scanner_cursor): New decl. | |
45 | * src/reduce.c (nonterminals_reduce): Use warn_at rather than | |
46 | rolling our own. | |
47 | * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead | |
48 | of *loc. | |
49 | (STEP): Remove. No longer needed, now that adjust_location does | |
50 | the work. All uses removed. | |
51 | (scanner_cursor): New var. | |
52 | (adjust_location): Renamed from extend_location. It now sets | |
53 | *loc and adjusts the scanner cursor. All uses changed. | |
54 | Don't bother testing for CR. | |
55 | (handle_syncline): Remove location arg; now updates scanner cursor. | |
56 | All callers changed. | |
57 | (unexpected_end_of_file): Now accepts start boundary of token or | |
58 | comment, not location. All callers changed. Update scanner cursor, | |
59 | not the location. | |
60 | (SC_AFTER_IDENTIFIER): New state. | |
61 | (context_state): Renamed from c_context. All uses changed. | |
62 | (id_loc, code_start, token_start): New local vars. | |
63 | (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all | |
64 | processing of Yacc white space and equivalents here. | |
65 | (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER | |
66 | instead of returning ID immediately, since we need to search for | |
67 | a subsequent colon. | |
68 | (<INITIAL>"'", "\""): Save token_start. | |
69 | (<INITIAL>"%{", "{", "%%"): Save code_start. | |
70 | (<SC_AFTER_IDENTIFIER>): New state, looking for a colon. | |
71 | (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>): | |
72 | BEGIN context_state at end, not INITIAL. | |
73 | (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'", | |
74 | <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>): | |
75 | Return correct token start. | |
76 | (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when | |
77 | the start of a character, string or multiline comment is found. | |
78 | * tests/conflicts.at (S/R in initial, Defaulted Conflicted | |
79 | Reduction): Adjust reported locations to match the more-precise | |
80 | results now expected. | |
81 | * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise. | |
82 | * tests/reduce.at (Useless Rules, Reduced Automaton, | |
83 | Underivable Rules): Likewise. | |
84 | * tests/regression.at (Invalid inputs): No longer `expecting ";" | |
85 | or "|"' now that so many other tokens are allowed by the new grammar. | |
86 | ||
87 | * src/complain.h (current_file): Remove duplicate decl; | |
88 | current_file is now owned by files.h. | |
89 | * src/complain.c, src/scan-gram.l: Include files.h. | |
90 | ||
91 | 2002-12-06 Paul Eggert <eggert@twinsun.com> | |
92 | ||
93 | * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule] | |
94 | promotes to int; it might be unsigned int. | |
95 | * data/yacc.c (yy_reduce_print): Likewise. | |
96 | ||
97 | * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should | |
98 | be #defined in the prologue, not in the Bison declarations. | |
99 | This fixes Debian Bug 102878, reported by Shaul Karl. | |
100 | ||
b64755e3 PE |
101 | 2002-12-02 Paul Eggert <eggert@twinsun.com> |
102 | ||
103 | * configure.ac (AC_REPLACE_FUNCS): Add strtoul. | |
104 | * lib/strtoul.c: New file, from gnulib. | |
105 | This fixes a porting bug reported by Peter Klein in | |
106 | <http://mail.gnu.org/pipermail/bug-bison/2002-December/001944.html>. | |
107 | ||
6e746484 PE |
108 | 2002-11-30 Paul Eggert <eggert@twinsun.com> |
109 | ||
b64755e3 PE |
110 | * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue, |
111 | and put only a forward declaration in the prologue. This is for | |
112 | consistency with the other scanner helper functions. | |
113 | ||
6ba55592 PE |
114 | Type clashes now generate warnings, not errors, since it |
115 | appears that POSIX may allow some grammars with type clashes. | |
116 | * src/reader.c (grammar_current_rule_check): Warn about | |
117 | type clashes instead of complaining. | |
118 | * tests/input.at (Type Clashes): Expect warnings, not complaints. | |
119 | ||
6e746484 PE |
120 | Add Yacc library, since POSIX requires it. |
121 | * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu. | |
122 | * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros. | |
123 | * lib/main.c, lib/yyerror.c: New files. | |
124 | ||
125 | gram_error can be static; it need not be extern. | |
126 | * src/reader.h (gram_error): Remove decl. | |
127 | * src/parse-gram.y (gram_error): Now static. Add static decl. | |
128 | (print_token_value): Omit parameter names from forward decl, | |
129 | for consistency. | |
130 | ||
88510f9c PE |
131 | 2002-11-29 Paul Eggert <eggert@twinsun.com> |
132 | ||
6e746484 PE |
133 | * doc/bison.texinfo: Emphasize that yylex and yyerror must |
134 | be declared before being used. E.g., one should typically | |
135 | declare them in the prologue. Use GNU coding style in examples. | |
136 | Put "const" consistently after the type it modifies. Mention | |
137 | that C99 supports "inline". Mention that yyerror traditionally | |
138 | returns "int". | |
139 | ||
88510f9c PE |
140 | %parse-param and %lex-param now take just one argument, the |
141 | declaration; the argument name is deduced from the declaration. | |
142 | ||
143 | * doc/bison.texinfo (Parser Function, Pure Calling, Error | |
144 | Reporting, Table of Symbols): Document this. | |
145 | * src/parse-gram.y (add_param): New function. | |
146 | (COMMA): Remove. | |
147 | (declaration): Implement new rule for %parse-param and %lex-param. | |
148 | * src/scan-gram.l: "," now elicits a warning, rather than being | |
149 | a token; this is more compatible with byacc. | |
150 | * tests/calc.at (Simple LALR Calculator): Adopt new convention. | |
151 | ||
bb92250c PE |
152 | 2002-11-27 Paul Eggert <eggert@twinsun.com> |
153 | ||
154 | Rename identifiers to avoid real and potential collisions. | |
155 | ||
156 | * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput, | |
157 | to avoid collision with lex macro described by Bruce Lilly in | |
158 | <http://mail.gnu.org/pipermail/bug-bison/2002-November/001929.html>. | |
159 | * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise. | |
160 | * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value. | |
161 | * src/parse-gram.y (print_token_value): Renamed from yyprint. | |
162 | All uses changed. | |
163 | (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed. | |
164 | The name "yycontrol" violates the name space rules, and this stuff | |
165 | wasn't being used anyway. | |
166 | (input): Remove action; this stuff wasn't being used. | |
167 | (gram_error): Rename local variable yylloc -> loc. | |
168 | * src/reader.h (struct gram_control_s, gram_control_t): Remove. | |
169 | (YY_DECL): Don't use "yy" at start of local variables. | |
170 | All uses changed, e.g., yylloc -> loc. | |
171 | * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed. | |
172 | (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed. | |
173 | (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed. | |
174 | (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed. | |
175 | ||
176 | * src/parse-gram.y (gram_error): loc is now const *. | |
177 | * src/reader.h (gram_error): Likewise. | |
178 | ||
3af4feb2 PE |
179 | 2002-11-24 Paul Eggert <eggert@twinsun.com> |
180 | ||
181 | Version 1.75c. | |
182 | ||
183 | * tests/actions.at (Actions after errors): Use an output format | |
184 | more similar to that of the Printers and Destructors test. | |
185 | Test the position of the ';' token too. | |
186 | (Printers and Destructors): Likewise. | |
187 | (Printers and Destructors: %glr-parser): Remove for now, to avoid | |
188 | unnecessarily alarming people when the test fails. | |
189 | ||
190 | * data/yacc.c (yyerrlab1): Move this label down, so that the | |
191 | parser does not discard the lookahead token if the user code | |
192 | invokes YYERROR. This change is required for POSIX conformance. | |
193 | ||
194 | * lib/error.c: Sync with gnulib. | |
195 | ||
196 | 2002-11-22 Paul Eggert <eggert@twinsun.com> | |
197 | ||
198 | * lib/quotearg.c, lib/quotearg.h: Sync with gnulib. | |
199 | * lib/mbswidth.c, lib/mbswidth.h: Likewise. | |
200 | * lib/xmalloc.c: Likewise. | |
201 | ||
58004308 PE |
202 | 2002-11-20 Paul Eggert <eggert@twinsun.com> |
203 | ||
204 | * lib/argmatch.c, lib/argmatch.h: Sync with gnulib. | |
205 | ||
206 | 2002-11-20 Paul Eggert <eggert@twinsun.com> | |
207 | ||
208 | Avoid use of <assert.h>, as the GNU Coding Standards hint that one | |
209 | should use `if (! x) abort ();' rather than `assert (x);', and | |
210 | anyway it's one less thing to worry about configuring. | |
211 | ||
212 | * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>. | |
213 | * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise, | |
214 | and replace all instances of assert with abort. | |
215 | * tests/calc.at (_AT_DATA_CALC_Y): Likewise. | |
216 | * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise. | |
217 | ||
218 | * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates, | |
219 | yyresolveAction, yyprocessOneStack): Use abort rather than assert. | |
220 | * lib/hash.c (hash_lookup, hash_get_first, hash_get_next, | |
221 | hash_find_entry, hash_rehash, hash_insert): Likewise. | |
222 | * src/conflicts.c (resolve_sr_conflict): Likewise. | |
223 | * src/lalr.c (set_goto_map, map_goto): Likewise. | |
224 | * src/nullable.c (nullable_compute): Likewise. | |
225 | * src/output.c (prepare_rules, token_definitions_output): Likewise. | |
226 | * src/reader.c (packgram, reader): Likewise. | |
227 | * src/state.c (state_new, state_free, state_transitions_set, | |
228 | state_reduction_find): Likewise. | |
229 | * src/symtab.c (symbol_user_token_number_set, symbol_make_alias, | |
230 | symbol_pack): Likewise. | |
231 | * src/tables.c (conflict_row, pack_vector): Likewise. | |
232 | * src/vcg.c (get_color_str, get_textmode_str, get_shape_str, | |
233 | get_layoutalgorithm_str, get_decision_str, get_orientation_str, | |
234 | get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str, | |
235 | get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise. | |
236 | ||
237 | * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef. | |
238 | (ARGMATCH_CONSTRAINT): New macro. | |
239 | (ARGMATCH_ASSERT): Use it. | |
240 | ||
241 | * src/system.h (verify): New macro. | |
242 | * src/getargs.c (trace_argmatch, report_argmatch): Use verify | |
243 | rather than assert. | |
244 | * src/tables.c (tables_generate): Likewise. | |
245 | ||
246 | * src/struniq.c (struniq_assert): Now returns void, and aborts | |
247 | if the assertion is false. | |
248 | (struniq_assert_p): Remove. | |
249 | * src/struniq.h: Likewise. | |
250 | ||
76ae8198 PE |
251 | 2002-11-18 Paul Eggert <eggert@twinsun.com> |
252 | ||
253 | * data/glr.c (yygetLRActions): Replace `yyindex' with | |
254 | `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch. | |
255 | This fixes the regression with Sun ONE Studio 7 cc that I reported in | |
256 | <http://mail.gnu.org/pipermail/bug-bison/2002-November/001892.html>. | |
257 | ||
d3c4e709 AD |
258 | 2002-11-18 Akim Demaille <akim@epita.fr> |
259 | ||
260 | * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a | |
261 | space. | |
262 | From Tim Van Holder. | |
263 | ||
8d8a7238 PE |
264 | 2002-11-17 Paul Eggert <eggert@twinsun.com> |
265 | ||
266 | Pacify Sun ONE Studio 7 lint. Also, rename "ParseError" | |
267 | to "SyntaxError" for consistency with my 2002-11-15 change. | |
268 | ||
269 | * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do | |
270 | not define to {}, since this breaks the common use of `YYDPRINTF | |
271 | ((...));' if a single statement is desired (e.g. before `else'). | |
272 | Work around GCC warnings by surrounding corresponding calls with | |
273 | {} if needed. | |
274 | (yyhasResolvedValue): Remove unused function. | |
275 | (yymergeOptionSets, yyresolvStack): Use `continue;' for empty | |
276 | loop body. | |
277 | (yyreportSyntaxError): Renamed from yyreportParseError. | |
278 | (yyrecoverSyntaxError): Renamed from yyrecoverParseError. | |
279 | All uses changed. | |
280 | * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of | |
281 | extern when possible. Remove unused initializations. | |
282 | ||
b0937b22 AD |
283 | 2002-11-16 Akim Demaille <akim@epita.fr> |
284 | ||
285 | Augment the similarity between GLR and LALR traces. | |
286 | ||
287 | * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print) | |
288 | (YY_REDUCE_PRINT): New. | |
289 | (yyparse): Use them. | |
290 | * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for | |
291 | YYDPRINT here. | |
292 | (yyglrReduce, yyrecoverParseError, yyparse): Don't report the | |
293 | state reached after the reduction/recovery, since... | |
294 | (yyparse, yyprocessOneStack): Report the state we are entering in. | |
295 | ||
c5e3e510 AD |
296 | 2002-11-16 Akim Demaille <akim@epita.fr> |
297 | ||
298 | * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types): | |
299 | Add support for --trace=skeleton. | |
300 | * src/scan-skel.l: %option debug. | |
301 | Scan strings of non-@ or \n instead of character by character. | |
302 | (scan_skel): Handle trace_skeleton. | |
303 | (QPUTS): New. | |
304 | (@output_parser_name@, @output_header_name@): ``Restore'' their | |
305 | support (used to be M4 macros). | |
306 | * data/yacc.c: Quote larger chunks, a la glr.c. | |
307 | * data/lalr1.cc: Likewise. | |
308 | The header guards are no longer available, so use some other | |
309 | string than `YYLSP_NEEDED'. | |
310 | ||
4c6cc1db AD |
311 | 2002-11-16 Akim Demaille <akim@epita.fr> |
312 | ||
313 | Make the ``Printers and Destructors'' test more verbose, taking | |
314 | `yacc.c''s behavior as (possibly wrong) reference. | |
315 | ||
316 | * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf | |
317 | instead of fprint on stdout. | |
318 | Set and report the last_line of the symbols. | |
319 | Consistently display values and locations. | |
320 | ||
6d9e8019 PE |
321 | 2002-11-16 Paul Eggert <eggert@twinsun.com> |
322 | ||
323 | * data/yacc.c: Avoid over-quoting of __line__ and __file__. | |
324 | ||
6e649e65 PE |
325 | 2002-11-15 Paul Eggert <eggert@twinsun.com> |
326 | ||
b25d88f6 PE |
327 | * tests/actions.at (Actions after errors): New test case. |
328 | ||
6e649e65 PE |
329 | * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo, |
330 | src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h, | |
331 | tests/action.at, tests/calc.at, tests/conflicts.at, | |
332 | tests/cxx-type.at, tests/regression.at: | |
333 | "parse error" -> "syntax error" for POSIX compatibility. | |
334 | "parsing stack overflow..." -> "parser stack overflow" so | |
335 | that code matches Bison documentation. | |
336 | ||
0f39aab9 AD |
337 | 2002-11-15 Akim Demaille <akim@epita.fr> |
338 | ||
339 | * src/parse-gram.y (declaration): Have %parse-param and %lex-param | |
340 | take two BRACED_CODE, not two string_content. | |
341 | Free the scanner's obstack when we are done. | |
342 | (code_content): New. | |
343 | * tests/calc.at: Adjust. | |
344 | * doc/bison.texinfo: Adjust. | |
345 | Also, make sure to include the `,' for these declarations. | |
346 | ||
761c1926 AD |
347 | 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be> |
348 | ||
349 | * m4/prereq.m4: Removed the commented jm_PREREQ_HASH | |
350 | definition; avoids potential autoreconf problems. | |
351 | ||
b0f98b10 AD |
352 | 2002-11-15 Akim Demaille <akim@epita.fr> |
353 | ||
354 | Always check the value returned by yyparse. | |
355 | ||
356 | * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value | |
357 | returned by yyparse. | |
358 | (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument. | |
359 | Adjust calls. | |
360 | * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value | |
361 | returned by yyparse. | |
362 | ||
970785f1 PH |
363 | 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
364 | ||
365 | * data/glr.c (yyFail): Always set yyerrflag. Corrects regression | |
366 | on input.at test. | |
367 | ||
8fcc7db1 PE |
368 | 2002-11-14 Paul Eggert <eggert@twinsun.com> |
369 | ||
7ec1b48e PE |
370 | * src/output.c (output_skeleton): Call xfopen instead of |
371 | duplicating xfopen's body. | |
372 | ||
cfff7583 PE |
373 | Fix bugs reported by Nelson H. F. Beebe in |
374 | <http://mail.gnu.org/pipermail/bug-bison/2002-November/001893.html>. | |
375 | ||
8fcc7db1 PE |
376 | * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that |
377 | "$CC -E foo.h" is allowed, as this doesn't work with the Portland | |
378 | Group compiler. Instead, use "$CC -E bar.c". Include the .h | |
379 | file twice in the grammar, as an extra check. | |
380 | ||
381 | * tests/input.at (Torturing the Scanner): Surround the | |
382 | backslash-newline tests with "#if 0", to make it less likely that | |
383 | we'll run into compiler bugs. Bring back solitary \ inside | |
384 | comment, but add a closing comment to work around HP C bug. Don't | |
385 | test backslash-newline in C character constant. This should fix | |
386 | the input.at bug reported by Nelson H. F. Beebe in | |
387 | <http://mail.gnu.org/pipermail/bug-bison/2002-November/001893.html>. | |
388 | ||
4e8d992c AD |
389 | 2002-11-14 Akim Demaille <akim@epita.fr> |
390 | ||
391 | * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit | |
392 | status of the compiler. | |
f32b346d | 393 | Calling `exit 1' is no longer needed. |
4e8d992c AD |
394 | Reported by Nelson H. F. Beebe. |
395 | ||
9501dc6e AD |
396 | 2002-11-14 Akim Demaille <akim@epita.fr> |
397 | ||
398 | * tests/atlocal.in (CPPFLAGS): We have config.h. | |
399 | * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR): | |
400 | New. | |
401 | * tests/actions.at, tests/calc.at, tests/conflicts.at, | |
402 | * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at, | |
403 | * tests/regression.at, tests/torture.at: Use them for all the | |
404 | grammars that are to be compiled. | |
405 | * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as... | |
406 | * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this. | |
407 | * doc/bison.texinfo (GLR Parsers): Document `inline'. | |
408 | ||
18b519c0 AD |
409 | 2002-11-14 Akim Demaille <akim@epita.fr> |
410 | ||
411 | * doc/bison.texinfo: Various formatting changes (alignments in | |
412 | samples, additional @group/@end group, GCS in samples. | |
413 | Use @deffn instead of simple @table to define the directives, | |
414 | macros, variables etc. | |
415 | ||
9a86cdb9 PE |
416 | 2002-11-13 Paul Eggert <eggert@twinsun.com> |
417 | ||
daa33def PE |
418 | Fix some bugs reported by Albert Chin-A-Young in |
419 | <http://mail.gnu.org/pipermail/bug-bison/2002-November/001881.html>. | |
18b519c0 | 420 | |
daa33def | 421 | * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c |
8fcc7db1 | 422 | -o c"; the HP C compiler chatters during compilation. |
daa33def PE |
423 | Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c". |
424 | * tests/headers.at (export YYLTYPE): Likewise. | |
425 | ||
426 | * tests/input.at (Torturing the Scanner): Remove lines containing | |
8fcc7db1 | 427 | solitary backslashes, as they tickle a bug in the HP C compiler. |
daa33def | 428 | |
9a86cdb9 PE |
429 | * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid // |
430 | comments, since they're not portable. Use GNU coding style. | |
431 | ||
9c1e26bd AD |
432 | 2002-11-13 Akim Demaille <akim@epita.fr> |
433 | ||
434 | * data/yacc.c: Leave bigger chunks of quoted text. | |
435 | (YYDSYMPRINTF): New. | |
436 | Use it to report symbol activities. | |
437 | * data/glr.c (YYDSYMPRINTF): New. | |
438 | Use it. | |
439 | ||
87f721cc PE |
440 | 2002-11-12 Paul Eggert <eggert@twinsun.com> |
441 | ||
442 | Version 1.75b. | |
443 | ||
444 | * data/glr.c (yydoAction): Return YYRESULTTAG, not int. | |
445 | (yyglrReduce): Return yyok, not 0. | |
446 | This should avoid the enumerated-type warnings reported | |
447 | by Nelson H.F. Beebe in | |
448 | <http://mail.gnu.org/pipermail/bug-bison/2002-November/001872.html>. | |
449 | ||
450 | * lib/bbitset.h (BITSET_INLINE): Remove. | |
451 | * lib/bitset.h [! BITSET_INLINE]: Remove. | |
452 | (bitset_set, bitset_reset, bitset_test): Rename local vars | |
453 | to avoid shadowing warnings by GCC. | |
454 | ||
455 | * data/glr.c (inline): Remove #define. It's the user's | |
456 | responsibility to #define it away, just like 'const'. | |
457 | This fixes one of the bugs reported by Nelson H.F. Beebe in | |
458 | <http://mail.gnu.org/pipermail/bug-bison/2002-November/001873.html>. | |
18b519c0 | 459 | |
87f721cc PE |
460 | * Makefile.maint (po-check): Scan .l and .y files instead of the |
461 | .c and the .h files that they generate. This fixes the bug | |
462 | reported by Tim Van Holder in: | |
463 | <http://mail.gnu.org/pipermail/bison-patches/2002-November/001352.html> | |
464 | Look for N_ as well as for _. Try to avoid matching #define for | |
465 | N_ and _. | |
466 | * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c, | |
467 | src/system.h. Add src/parse-gram.y, src/scan-gram.l. | |
468 | * src/scan-gram.l: Revamp regular expressions so that " and ' | |
469 | do not confuse xgettext. | |
470 | ||
471 | * src/struniq.h (struniq_new): Do not declare the return type | |
472 | to be 'const'; this violates the C standard. | |
473 | * src/struniq.c (struniq_new): Likewise. | |
474 | ||
be14ade5 AD |
475 | 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com> |
476 | ||
477 | * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the | |
478 | duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq | |
479 | linker. | |
480 | ||
05291fbc AD |
481 | 2002-11-12 Akim Demaille <akim@epita.fr> |
482 | ||
483 | * Makefile.maint: Sync with Autoconf: | |
484 | (local_updates): New. | |
485 | ||
1f5fd52e AD |
486 | 2002-11-12 Akim Demaille <akim@epita.fr> |
487 | ||
488 | * po/POTFILES.in (src/lalr.c, src/state.c): Remove | |
489 | ||
283f1e64 AD |
490 | 2002-11-12 Akim Demaille <akim@epita.fr> |
491 | ||
492 | * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the | |
493 | locations. | |
494 | ||
886b69d1 AD |
495 | 2002-11-12 Akim Demaille <akim@epita.fr> |
496 | ||
497 | * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT, | |
498 | not yyvalue. | |
499 | ||
3df37415 AD |
500 | 2002-11-12 Akim Demaille <akim@epita.fr> |
501 | ||
502 | * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New. | |
503 | Use it to test the GLR parser. | |
504 | ||
7bd6c77e AD |
505 | 2002-11-12 Akim Demaille <akim@epita.fr> |
506 | ||
507 | * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton | |
508 | defines it. | |
509 | * data/glr.c (yystos): New. | |
510 | (b4_yysymprint_generate, b4_yydestruct_generate): Invoke. | |
511 | (YYDSYMPRINT): New. | |
512 | (yyval): Don't define it, it is handled via M4. | |
513 | (yyrecoverParseError): Free verbosely the discarded symbols. | |
514 | * data/yacc.c (yysymprint): Remove, rather... | |
515 | (b4_yysymprint_generate): invoke. | |
516 | * data/c.m4 (b4_yysymprint_generate): New. | |
517 | Accept pointers as arguments, as opposed to the version from | |
518 | yacc.c. | |
519 | (b4_yydestruct_generate): Likewise. | |
520 | * tests/cations.at (Printers and Destructors): Use Bison directives | |
521 | instead of CPP macros. | |
522 | Don't rely on internal details. | |
523 | ||
b0400cc6 AD |
524 | 2002-11-12 Akim Demaille <akim@epita.fr> |
525 | ||
526 | * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New. | |
527 | * data/yacc.c: Rename yychar1 as yytoken, as in glr.c. | |
528 | Don't work on yychar (i.e., do set it to YYEMPTY, don't match | |
529 | it against YYEMPTY and so forth), work on yytoken (i.e., set | |
530 | it to YYEMPTY etc.). | |
531 | (yydestruct): Replace with a b4_yydestruct_generate invocation. | |
532 | (b4_symbol_actions): Remove. | |
533 | * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands | |
534 | for 0, end-of-input. | |
535 | ||
72f889cc AD |
536 | 2002-11-12 Akim Demaille <akim@epita.fr> |
537 | ||
538 | * doc/bison.texinfo (Destructor Decl): New. | |
539 | ||
b1ae9233 AD |
540 | 2002-11-12 Akim Demaille <akim@epita.fr> |
541 | ||
542 | * src/tables.c (tables_generate): Use free for pointers that | |
543 | cannot be NULL, not XFREE. | |
544 | (pack_vector): Use assert, not fatal, for bound violations. | |
545 | * src/state.c (state_new): Likewise. | |
546 | * src/reader.c (reader): Likewise. | |
547 | * src/lalr.c (set_goto_map): Likewise. | |
72f889cc | 548 | * src/location.h (LOCATION_PRINT): If first_line is 0, just issue |
b1ae9233 AD |
549 | the file name. |
550 | ||
7ec2d4cd AD |
551 | 2002-11-12 Akim Demaille <akim@epita.fr> |
552 | ||
553 | * src/scan-gram.l, src/reader.h (scanner_last_string_free): | |
554 | Restore. | |
555 | * src/scan-gram.l (last_string): Is global to the file, not to | |
556 | yylex. | |
557 | * src/parse-gram.y (input): Don't append the epilogue here, | |
558 | (epilogue.opt): do it here, and free the scanner's obstack. | |
559 | * src/reader.c (epilogue_set): Rename as... | |
560 | (epilogue_augment): this. | |
561 | * data/c.m4 (b4_epilogue): Defaults to empty. | |
562 | ||
573a6cd3 AD |
563 | 2002-11-12 Akim Demaille <akim@epita.fr> |
564 | ||
565 | * src/getargs.c (long_options): Remove duplicates. | |
566 | * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar: | |
567 | Remove. | |
568 | * doc/bison.rnh: Remove. | |
569 | * doc/bison.texinfo (VMS Invocation): Remove. | |
570 | ||
95612cfa AD |
571 | 2002-11-12 Akim Demaille <akim@epita.fr> |
572 | ||
573 | * src/struniq.h, src/struniq.c (struniq_t): Is const. | |
574 | (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New. | |
575 | ||
576 | Use struniq for symbols. | |
577 | ||
578 | * src/symtab.h (symbol_t): The tag member is a struniq. | |
579 | (symbol_type_set): Adjust. | |
580 | * src/symtab.c (symbol_new): Takes a struniq. | |
581 | (symbol_free): Don't free the tag member. | |
582 | (hash_compare_symbol_t, hash_symbol_t): Rename as... | |
583 | (hash_compare_symbol, hash_symbol): these. | |
584 | Use the fact that tags as struniqs. | |
585 | (symbol_get): Use struniq_new. | |
586 | * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get): | |
587 | Returns a strniq. | |
588 | * src/reader.h (merger_list, grammar_currentmerge_set): The name | |
589 | and type members are struniqs. | |
590 | * src/reader.c (get_merge_function) | |
591 | (grammar_current_rule_merge_set): Adjust. | |
592 | (TYPE, current_type): Are struniq. | |
593 | ||
594 | Use struniq for file names. | |
595 | ||
596 | * src/files.h, src/files.c (infile): Split into... | |
597 | (grammar_file, current_file): these. | |
598 | * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust. | |
599 | * src/reduce.c (reduce_print): Likewise. | |
600 | * src/getargs.c (getargs): Likewise. | |
601 | * src/complain.h, src/complain.c: Likewise. | |
602 | * src/main.c (main): Call struniqs_new early enough to use it for | |
603 | file names. | |
604 | Don't free the input file name. | |
605 | ||
3e6656f9 AD |
606 | 2002-11-12 Akim Demaille <akim@epita.fr> |
607 | ||
608 | * src/symtab.c (symbol_free): Remove dead deactivated code: | |
609 | type_name are properly removed. | |
610 | Don't use XFREE to free items that cannot be NULL. | |
611 | * src/struniq.h, src/struniq.c: New. | |
612 | * src/main.c (main): Initialize/free struniqs. | |
613 | * src/parse-gram.y (%union): Add astruniq member. | |
614 | (yyprint): Adjust. | |
615 | * src/scan-gram.l (<{tag}>): Return a struniq. | |
616 | Free the obstack bit that used to store it. | |
617 | * src/symtab.h (symbol_t): The 'type_name' member is a struniq. | |
618 | ||
7672019c PE |
619 | 2002-11-11 Paul Eggert <eggert@twinsun.com> |
620 | ||
621 | Revamp to fix many (but not all) of the C- and M4-related quoting | |
622 | problems. Among other things, this fixes the Bison bug reported | |
623 | by Jan Hubicka when processing the Bash grammar; see: | |
624 | <http://mail.gnu.org/pipermail/bison-patches/2002-November/001329.html> | |
625 | ||
626 | Use new @ escapes consistently. Represent brackets with @{ and @} | |
627 | rather than @<:@ and @:>@, since this works a bit better with dumb | |
628 | editors like vi. Represent @ with @@, since @ is now consistently | |
629 | an escape. Use @oline@ and @ofile@ rather than __oline__ and | |
630 | __ofile__, to avoid unexpected expansions. Similarly, use @output | |
631 | rather than #output. | |
632 | ||
633 | * data/c.m4 (b4_copyright): Omit file name from comment, since | |
634 | the file name could contain "*/". | |
635 | (b4_synclines_flag): Don't quote the 2nd argument; it should already | |
636 | be quoted. All uses changed. | |
637 | ||
638 | * data/glr.c: Use new @ escapes consistently. | |
639 | (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name, | |
640 | b4_output_header_suffix, b4_output_header_name, b4_header_guard): | |
641 | Remove, since they couldn't handle arbitrary characters in file | |
642 | names. | |
643 | * data/lalr1.cc: Likewise. | |
644 | * data/yacc.c: Likewise. | |
645 | ||
646 | * src/files.c (output_infix): Remove; all uses removed. | |
647 | * src/files.h: Likewise. | |
648 | ||
649 | * data/glr.c: Remove use of "#ifdef b4_header_guard", since it | |
650 | mishandled funny characters in file names, and anyway it isn't | |
651 | needed any more. | |
652 | * data/yacc.c: Likewise. | |
653 | * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard. | |
654 | ||
655 | * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would. | |
656 | * data/yacc.c: Likewise. | |
657 | ||
658 | * src/muscle_tab.c: Include quotearg.h, since we need to quote C | |
659 | strings now. | |
660 | (muscle_init): Quote filename as a C string. | |
661 | * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused. | |
662 | (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros. | |
663 | * src/output.c (escaped_file_name_output): New function. | |
664 | (prepare_symbols): Quote tokens for M4. | |
665 | (prepare): Don't insert output_infix, output_prefix, | |
666 | output_parser_name, output_header_name; this is now down by scan-skel. | |
667 | Insert skeleton as a C string. | |
668 | ||
669 | * src/output.c (user_actions_output, symbol_destructors_output, | |
670 | symbol_printers_output): Quote filenames for C and M4. | |
671 | * src/reader.c (prologue_augment, epilogue_set): Likewise. | |
672 | ||
673 | * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash | |
674 | escapes other than \\ and \'; this simplifies the code. | |
675 | (<SC_STRING>): Likewise, for \\ and \". | |
676 | (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE, | |
677 | SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too. | |
678 | Use new escapes @{ and @} for [ and ]. | |
679 | ||
680 | * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing | |
681 | them with auto vars. | |
682 | Switch to new escape scheme, where @ is the escape character uniformly. | |
683 | Abort if a stray escape character is found. Avoid unbounded input | |
684 | buffer when parsing non-escaped text. | |
685 | ||
686 | * tests/input.at (Torturing the Scanner): Add tests that @oline@, | |
687 | __oline__, #output, $@, and @{ do not have unintended meanings. | |
688 | ||
acea4f3b PE |
689 | 2002-11-09 Paul Eggert <eggert@twinsun.com> |
690 | ||
691 | Fix the test failure due to GCC warnings described in | |
692 | <http://mail.gnu.org/pipermail/bug-bison/2002-November/001815.html>. | |
693 | * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which | |
694 | evaluate to 0 if it's impossible for NINF to be in the respective | |
695 | table. | |
696 | (yygetLRActions, yyrecoverParseError): Use them. | |
697 | ||
698 | * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were | |
699 | counted in the token inserted at end of file. Now takes | |
700 | location_t *, not location_t, so that the location can be | |
701 | adjusted. All uses changed. | |
702 | ||
703 | * tests/regression.at (Invalid inputs): Adjust wording in | |
704 | diagnostic to match the new behavior. | |
705 | ||
706 | * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR, | |
707 | AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR, | |
708 | AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x)) | |
709 | abort ();'. This reduces the runtime of the "Many lookaheads" | |
710 | test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running | |
711 | GCC 3.2. | |
712 | ||
20ef1ad5 PE |
713 | 2002-11-07 Paul Eggert <eggert@twinsun.com> |
714 | ||
715 | * src/parse-gram.y (CHARACTER): Remove unused token. | |
716 | All uses removed. | |
717 | ||
718 | * src/scan-gram.l: Remove stack option. We no longer use the | |
719 | stack, since the stack was never deeper than 1; instead, use the | |
720 | new auto var c_context to record the stacked value. | |
721 | ||
722 | Remove nounput option. At an unexpected end of file, we now unput | |
723 | the minimal input necessary to end cleanly; this simplifies the | |
724 | code. | |
725 | ||
726 | Avoid unbounded token sizes where this is easy. | |
727 | ||
728 | (unexpected_end_of_file): New function. | |
729 | Use it to systematize the error message on unexpected EOF. | |
730 | (last-string): Now auto, not static. | |
731 | (YY_OBS_FREE): Remove unnecessary do while (0) wrapper. | |
732 | (scanner_last_string_free): Remove; not used. | |
733 | (percent_percent_count): Move decl to just before use. | |
734 | (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file, | |
735 | not the (never otherwised-used) CHARACTER. | |
736 | ||
93724f13 AD |
737 | 2002-11-07 Akim Demaille <akim@epita.fr> |
738 | ||
739 | Let yyerror always receive the msg as last argument, so that | |
740 | yyerror can be variadic. | |
741 | ||
742 | * data/yacc.c (b4_yyerror_args): New. | |
743 | Use it when calling yyerror. | |
744 | * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New. | |
745 | Use it when calling yyerror. | |
746 | * doc/bison.texinfo (Error Reporting): Adjust. | |
747 | * tests/calc.at (_AT_DATA_CALC_Y): Adjust. | |
748 | * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust. | |
749 | ||
6e40b4eb AD |
750 | 2002-11-06 Akim Demaille <akim@epita.fr> |
751 | ||
752 | #line should have quoted strings. | |
753 | Ideally, this should be done by m4_quotearg. | |
754 | ||
755 | * src/scan-skel.l: Include quotearg.h. | |
756 | Quote __ofile__. | |
757 | * src/output.c (symbol_printers_output) | |
758 | (symbol_destructors_output): Quote the file name. | |
759 | ||
2dfbfc12 AD |
760 | 2002-11-06 Akim Demaille <akim@epita.fr> |
761 | ||
762 | * tests/regression.at (Invalid inputs): Adjust to the recent | |
763 | messages. | |
764 | ||
437c2d80 AD |
765 | 2002-11-06 Akim Demaille <akim@epita.fr> |
766 | ||
767 | Restore --no-lines. | |
768 | Reported by Jim Kent. | |
769 | ||
770 | * data/c.m4 (b4_syncline): New. | |
771 | * data/glr.c, data/yacc.c, data/lalr1.cc: Use it. | |
772 | * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline. | |
773 | * src/output.c (user_actions_output): Likewise. | |
774 | (prepare): Define 'b4_synclines_flag'. | |
2dfbfc12 | 775 | * src/muscle_tab.c (muscle_init): Don't define b4_linef. |
437c2d80 | 776 | |
900c5db5 AD |
777 | 2002-11-06 Akim Demaille <akim@epita.fr> |
778 | ||
779 | * src/main.c (main): Free `infile'. | |
780 | * src/scan-gram.l (handle_syncline): New. | |
781 | Recognize `#line'. | |
782 | * src/output.c (user_actions_output, symbol_destructors_output) | |
783 | (symbol_printers_output): Use the location's file name, not | |
784 | infile. | |
785 | * src/reader.c (prologue_augment, epilogue_set): Likewise. | |
786 | ||
e183b123 | 787 | 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
51b4a04c | 788 | |
e183b123 | 789 | * src/tables.c (matching_state): Don't allow states to match if |
51b4a04c | 790 | either has GLR conflict entries. |
e183b123 | 791 | |
193eb6b7 PE |
792 | 2002-11-05 Paul Eggert <eggert@twinsun.com> |
793 | ||
e183b123 PE |
794 | * src/scan-gram.l: Use more accurate diagnostics, e.g. |
795 | "integer out of range" rather than "invalid value". | |
796 | * tests/input.at (Invalid $n, Invalid @n): Change expected wording | |
797 | accordingly. | |
798 | ||
193eb6b7 PE |
799 | Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires. |
800 | Also, remove one static variable in the scanner. | |
801 | ||
802 | * src/scan-gram.l (braces_level): Now auto, not static. | |
803 | Initialize to zero if the compiler is being picky. | |
804 | (INITIAL): Clear braces_level instead of incrementing it. | |
805 | (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code, | |
806 | as POSIX 1003.1-2001 requires. | |
807 | * src/system.h (IF_LINT): New macro, taken from coreutils. | |
808 | * configure.ac: Define "lint" if --enable-gcc-warnings. | |
809 | ||
29c01725 AD |
810 | 2002-11-05 Akim Demaille <akim@epita.fr> |
811 | ||
812 | * src/scan-gram.l: When it starts with `%', complain about the | |
813 | whole directive, not just that `invalid character: %'. | |
814 | ||
8aeac3ca AD |
815 | 2002-11-04 Akim Demaille <akim@epita.fr> |
816 | ||
817 | * Makefile.maint: Update from Autoconf. | |
818 | (update, cvs-update, po-update, do-po-update): New. | |
819 | ||
793a58bb AD |
820 | 2002-11-04 Akim Demaille <akim@epita.fr> |
821 | ||
822 | * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex | |
823 | and yyerror. | |
824 | Have yyerror `use' its arguments. | |
825 | * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF | |
826 | returns true when location & yacc & pure & parse-param. | |
827 | (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments. | |
828 | ||
c4d720cd AD |
829 | 2002-11-04 Akim Demaille <akim@epita.fr> |
830 | ||
831 | * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid | |
832 | clashes. | |
833 | * src/scan-gram.l: Use [\'] instead of ['] to pacify | |
834 | font-lock-mode. | |
835 | Use complain_at. | |
836 | Use quote, not quote_n since LOCATION_PRINT no longer uses the | |
837 | slot 0. | |
838 | ||
613a0dc5 PE |
839 | 2002-11-03 Paul Eggert <eggert@twinsun.com> |
840 | ||
841 | * src/reader.c (get_merge_function, grammar_current_rule_check): | |
842 | Use consistent diagnostics for reporting type name clashes. | |
843 | Quote the types with <>, for consistency with Yacc. | |
844 | * tests/input.at (Type Clashes): Adjust to diagnostic changes. | |
845 | ||
2a8d363a AD |
846 | 2002-11-03 Akim Demaille <akim@epita.fr> |
847 | ||
848 | * data/c.m4 (b4_identification, b4_user_args, b4_parse_param): | |
849 | New. | |
850 | * data/yacc.m4 (b4_pure_args, b4_Pure_args): New. | |
851 | (b4_parse_param): Remove. | |
852 | Use b4_identification. | |
853 | Propagate b4_pure_args where needed to pass them to yyerror. | |
854 | * data/glr.m4 (b4_parse_param): Remove. | |
855 | (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args) | |
856 | (b4_lpure_formals): New. | |
857 | Use b4_identification. | |
858 | (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by | |
859 | b4_user_formals and b4_user_args. | |
860 | (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer) | |
861 | (yyreportAmbiguity): When using a pure parser, also need | |
862 | the location, and the parse-params. | |
863 | Adjust callers. | |
864 | (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError): | |
865 | When using a pure parser, also need the parse-params. | |
866 | Adjust callers. | |
867 | * tests/calc.at: Test pure (%pure-parser) and absolutely pure | |
868 | (%pure-parser + %parse-param) LALR and GLR parsers. | |
869 | (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF, | |
870 | AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF, | |
871 | AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF. | |
872 | (_AT_DATA_CALC_Y): Equip for purity of yyerror. | |
873 | (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF. | |
874 | * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity. | |
875 | * doc/bison.texinfo: Untabify the whole file. | |
876 | (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM. | |
877 | (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM. | |
878 | (Error Reporting): Adjust to these new directives. | |
879 | Document %error-verbose, deprecate YYERROR_VERBOSE. | |
880 | ||
9e32add8 AD |
881 | 2002-11-03 Akim Demaille <akim@epita.fr> |
882 | ||
883 | * tests/calc.at: Change all the AT_CHECK_CALC_LALR and | |
884 | AT_CHECK_CALC_GLR invocations to use % directives, instead of | |
885 | command line options. | |
886 | * tests/cxx-type.at: Formatting changes. | |
887 | ||
b02d90a5 PE |
888 | 2002-11-03 Paul Eggert <eggert@twinsun.com> |
889 | ||
890 | * src/scan-gram.l: Revamp to fix POSIX incompatibilities, | |
891 | to count columns correctly, and to check for invalid inputs. | |
9e32add8 | 892 | |
b02d90a5 PE |
893 | Use mbsnwidth to count columns correctly. Account for tabs, too. |
894 | Include mbswidth.h. | |
895 | (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS. | |
896 | (extend_location): New function. | |
897 | (YY_LINES): Remove. | |
898 | ||
899 | Handle CRLF in C code rather than in Lex code. | |
900 | (YY_INPUT): New macro. | |
901 | (no_cr_read): New function. | |
902 | ||
903 | Scan UCNs, even though we don't fully handle them yet. | |
904 | (convert_ucn_to_byte): New function. | |
905 | ||
906 | Handle backslash-newline correctly in C code. | |
907 | (SC_LINE_COMMENT, SC_YACC_COMMENT): New states. | |
908 | (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.; | |
909 | all uses changed. | |
910 | (tag, splice): New EREs. Do not allow NUL or newline in tags. | |
911 | Use {splice} wherever C allows backslash-newline. | |
912 | YY_STEP after space, newline, vertical-tab. | |
913 | ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT). | |
9e32add8 | 914 | |
b02d90a5 PE |
915 | (letter, id): Don't assume ASCII; e.g., spell out a-z. |
916 | ||
917 | ({int}, handle_action_dollar, handle_action_at): Check for integer | |
918 | overflow. | |
9e32add8 | 919 | |
b02d90a5 PE |
920 | (YY_STEP): Omit trailing semicolon, so that it's more like C. |
921 | ||
922 | (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00 | |
923 | as well as \000. Check for UCHAR_MAX, not 255. | |
924 | Allow \x with an arbitrary positive number of digits, as in C. | |
925 | Check for overflow here. | |
926 | Allow \? and UCNs, for compatibility with C. | |
927 | ||
928 | (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision | |
929 | with quote slot used by complain_at. | |
930 | ||
931 | * tests/input.at: Add tests for backslash-newline, m4 quotes | |
932 | in symbols, long literals, and funny escapes in strings. | |
933 | ||
934 | * configure.ac (jm_PREREQ_MBSWIDTH): Add. | |
935 | * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c. | |
936 | * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext. | |
937 | * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4. | |
938 | * m4/mbswidth.m4: New file, from GNU coreutils. | |
939 | ||
940 | * doc/bison.texinfo (Grammar Outline): Document // comments. | |
941 | (Symbols): Document that trigraphs have no special meaning in Bison, | |
942 | nor is backslash-newline allowed. | |
943 | (Actions): Document that trigraphs have no special meaning. | |
944 | ||
945 | * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove; | |
946 | no longer used. | |
947 | ||
948 | 2002-11-02 Paul Eggert <eggert@twinsun.com> | |
949 | ||
950 | * src/reader.c: Don't include quote.h; not needed. | |
951 | (get_merge_function): Reword warning to be consistent with | |
952 | type clash diagnostic in grammar_current_rule_check. | |
953 | ||
954 | * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two | |
955 | bug in trigraph handling. | |
956 | ||
957 | * src/output.c (prepare_symbols): When printing token names, | |
958 | escape "[" as "@<:@" and likewise for "]". | |
959 | ||
960 | * src/system.h (errno): Remove declaration, as we are now | |
961 | assuming C89 or better, and C89 guarantees errno. | |
962 | ||
762b212b PE |
963 | 2002-10-30 Paul Eggert <eggert@twinsun.com> |
964 | ||
965 | * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write): | |
966 | Check for close failures. | |
967 | * src/files.h (xfclose): Return void, not int, since it always | |
968 | returned zero. | |
969 | * src/files.c (xfclose): Likewise. Report I/O error if ferror | |
970 | indicates one. | |
971 | * src/output.c (output_skeleton): Use xfclose rather than fclose | |
972 | and ferror. xfclose now checks ferror. | |
973 | ||
974 | * data/glr.c (YYLEFTMOST_STATE): Remove. | |
975 | (yyreportTree): Use a stack-based leftmost state. This avoids | |
976 | our continuing battles with bogus warnings about initializers. | |
977 | ||
56100c60 AD |
978 | 2002-10-30 Akim Demaille <akim@epita.fr> |
979 | ||
980 | * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only | |
981 | #if. | |
982 | ||
51b4a04c PH |
983 | 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
984 | ||
985 | * tests/glr-regr1.at: New test for reported regressions. | |
986 | * tests/testsuite.at: Add glr-regr1.at test. | |
987 | * tests/Makefile.am: Add glr-regr1.at test. | |
e183b123 | 988 | |
bf1ebda2 PE |
989 | 2002-10-24 Paul Eggert <eggert@twinsun.com> |
990 | ||
5c16c6b1 PE |
991 | Version 1.75a. |
992 | ||
bf1ebda2 PE |
993 | * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration. |
994 | * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since | |
995 | we use malloc. Don't assume 'A' through 'Z' are contiguous. | |
996 | Don't assume strdup exists; POSIX says its an XSI extension. | |
997 | Check for buffer overflow on input. | |
998 | ||
b526ee61 AD |
999 | 2002-10-24 Akim Demaille <akim@epita.fr> |
1000 | ||
1001 | * src/output.c (output_skeleton): Don't disable M4sugar comments | |
1002 | too soon: it results in comments being expanded. | |
1003 | * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the | |
1004 | first output. | |
1005 | ||
f1886bb2 AD |
1006 | 2002-10-24 Akim Demaille <akim@epita.fr> |
1007 | ||
1008 | * data/yacc.c (m4_int_type): New. | |
1009 | * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed | |
1010 | char' as only yacc.c wants K&R portability. | |
1011 | * data/glr.c (yysigned_char): Remove. | |
1012 | * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name. | |
1013 | Reported by Quoc Peyrot. | |
1014 | ||
c5576256 PE |
1015 | 2002-10-23 Paul Eggert <eggert@twinsun.com> |
1016 | ||
1017 | * src/main.c (main): With --trace=time, report times even if a | |
1018 | non-fatal error occurs. Formerly, the times were reported in some | |
1019 | such cases but not in others. | |
1020 | * src/reader.c (reader): Just return if a complaint has been issued, | |
1021 | instead of exiting, so that 'main' can report times. | |
1022 | ||
27b0ffea AD |
1023 | 2002-10-22 Akim Demaille <akim@epita.fr> |
1024 | ||
1025 | * src/system.h: Include sys/types. | |
1026 | Reported by Bert Deknuydt. | |
1027 | ||
223a7883 PE |
1028 | 2002-10-23 Paul Eggert <eggert@twinsun.com> |
1029 | ||
1030 | * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX. | |
1031 | Suggested by Art Haas. | |
1032 | ||
1033 | 2002-10-22 Paul Eggert <eggert@twinsun.com> | |
1034 | ||
1035 | * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit | |
1036 | decl; not needed any more. | |
1037 | * src/main.c (main): Use return to exit, undoing yesterday's change. | |
1038 | The last OS that we could find where this wouldn't work is | |
1039 | SunOS 3.5, and that's too old to worry about now. | |
1040 | ||
1041 | * data/glr.c (struct yyltype): Define members even when not | |
1042 | doing locations. This is more consistent with yacc.c, and it | |
1043 | works around the following bug reports: | |
1044 | http://mail.gnu.org/pipermail/bug-bison/2002-October/001764.html | |
1045 | http://mail.gnu.org/pipermail/bug-bison/2002-October/001769.html | |
1046 | and I hope it also fixes this bug report: | |
1047 | http://mail.gnu.org/pipermail/bug-bison/2002-October/001748.html | |
27b0ffea | 1048 | |
223a7883 PE |
1049 | * doc/bison.texinfo: Minor spelling and typographical fixes. Use |
1050 | @acronym consistently. Standardize on "Yacc" instead of "YACC", | |
1051 | "Algol" instead of "ALGOL". Give a bit more history about BNF. | |
1052 | ||
8b76775a AD |
1053 | 2002-10-22 Akim Demaille <akim@epita.fr> |
1054 | ||
1055 | * data/README: New. | |
1056 | ||
6db10d14 PE |
1057 | 2002-10-21 Paul Eggert <eggert@twinsun.com> |
1058 | ||
1059 | Be consistent about 'bool'; the old code used an enum in one | |
1060 | module and an int in another, and this violates the C standard. | |
1061 | * m4/stdbool.m4: New file, from coreutils 4.5.3. | |
1062 | * configure.ac (AC_HEADER_STDBOOL): Add. | |
1063 | * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4. | |
1064 | * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a) | |
1065 | * src/symtab.c (hash_compare_symbol_t): Likewise. | |
1066 | * src/system.h (bool, false, true): Use a definition consistent | |
1067 | with ../lib/hash.c. All uses changed. | |
1068 | ||
1069 | * src/complain.c (warning_issued): Renamed from warn_message_count, | |
1070 | so that we needn't worry about integer overflow (!). | |
1071 | Now of type bool. All uses changed. | |
1072 | (complaint_issued): Renamed from complain_message_count; likewise. | |
1073 | ||
1074 | * src/main.c (main): Use exit to exit with failure. | |
27b0ffea | 1075 | |
6db10d14 PE |
1076 | * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS |
1077 | rather than 1 and 0. | |
1078 | * src/main.c (main): Likewise. | |
1079 | * src/getargs.c (getargs): Likewise. | |
1080 | * src/reader.c (reader): Likewise. | |
1081 | ||
1082 | * src/getarg.c (getargs): Remove duplicate code for | |
1083 | "Try `bison --help'". | |
1084 | ||
1085 | * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2. | |
1086 | What was that "2" for? | |
1087 | ||
1088 | * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)). | |
1089 | * src/getargs.c (usage): Likewise. | |
1090 | ||
1091 | * src/getargs.c (getargs): When there are too few operands, report | |
1092 | the last one. When there are too many, report the first extra | |
1093 | one. This is how diffutils does it. | |
1094 | ||
92a060fd PE |
1095 | 2002-10-20 Paul Eggert <eggert@twinsun.com> |
1096 | ||
1097 | Remove K&R vestiges. | |
1098 | * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove. | |
1099 | * src/complain.c (VA_START): Remove. Assume prototypes. | |
1100 | (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro. | |
1101 | (private_strerror, warn_at, warn, complain_at, complain, fatal_at, | |
1102 | fatal): Assume prototypes. | |
1103 | * src/complain.h: Assume prototypes. | |
1104 | * src/system.h (PARAMS): Remove. | |
1105 | Include <limits.h> unconditionally, since it's guaranteeed even | |
1106 | for a freestanding C89 compiler. | |
1107 | (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them. | |
1108 | * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype. | |
8b76775a | 1109 | |
e7cb57c0 AD |
1110 | 2002-10-20 Akim Demaille <akim@epita.fr> |
1111 | ||
1112 | * src/muscle_tab.c (muscle_grow): Remove trailing debugging code. | |
1113 | * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New. | |
1114 | (yyuserAction, yydoAction, yyglrReduce, yyresolveValue) | |
1115 | (yyresolveStates, yyresolveAction, yyresolveStack) | |
1116 | (yyprocessOneStack): Use them. | |
1117 | (yy_reduce_print): New. | |
1118 | * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param. | |
1119 | ||
0245f82d AD |
1120 | 2002-10-20 Akim Demaille <akim@epita.fr> |
1121 | ||
1122 | * data/c.m4 (b4_c_ansi_args): Recognize functions with no | |
1123 | arguments and output `void'. | |
1124 | (b4_c_function): Rename as... | |
1125 | (b4_c_function_def): this. | |
1126 | (b4_c_function_decl, b4_c_ansi_function_def) | |
1127 | (b4_c_ansi_function_decl): New. | |
1128 | Change the interpretation of the arguments: before `int, foo', now | |
1129 | `int foo, foo'. | |
1130 | * data/yacc.c (yyparse): Prototype and define thanks to these. | |
1131 | Adjust b4_c_function_def uses. | |
1132 | * data/glr.c (yyparse): Likewise, but ANSI only. | |
1133 | ||
39912f52 AD |
1134 | 2002-10-20 Akim Demaille <akim@epita.fr> |
1135 | ||
1136 | * src/output.c (prepare): Move the definition of `tokens_number', | |
1137 | `nterms_number', `undef_token_number', `user_token_number_max' | |
1138 | to... | |
1139 | (prepare_tokens): Here. | |
1140 | (prepare_tokens): Rename as... | |
1141 | (prepare_symbols): this. | |
1142 | (prepare): Move the definition of `rules_number' to... | |
1143 | (prepare_rules): here. | |
1144 | (prepare): Move the definition of `last', `final_state_number', | |
1145 | `states_number' to... | |
1146 | (prepare_states): here. | |
1147 | * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'. | |
1148 | ||
20c1e2ad AD |
1149 | 2002-10-20 Akim Demaille <akim@epita.fr> |
1150 | ||
1151 | * src/tables.h, src/tables.c, src/output.c: Comment changes. | |
1152 | ||
21964f43 AD |
1153 | 2002-10-20 Akim Demaille <akim@epita.fr> |
1154 | ||
1155 | * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to... | |
1156 | * data/c.m4: here. | |
1157 | ||
66d30cd4 AD |
1158 | 2002-10-20 Akim Demaille <akim@epita.fr> |
1159 | ||
1160 | * src/output.c (prepare): Use MUSCLE_INSERT_STRING. | |
1161 | * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as | |
1162 | `pair'. | |
1163 | (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth', | |
1164 | `name' to... | |
1165 | * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type) | |
1166 | (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name): | |
1167 | These. | |
1168 | ||
95f2c9fe PE |
1169 | 2002-10-19 Paul Eggert <eggert@twinsun.com> |
1170 | ||
1171 | Do not create a temporary file, as that involves security and | |
1172 | cleanup headaches. Instead, use a pair of pipes. | |
1173 | Derived from a suggestion by Florian Krohm. | |
1174 | * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files. | |
1175 | * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove. | |
1176 | * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove. | |
1177 | (BISON_PREREQ_SUBPIPE): Add. | |
1178 | * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c. | |
1179 | Add subpipe.h, subpipe.c. | |
1180 | * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4. | |
1181 | * po/POTFILES.in: Add lib/subpipe.c. | |
1182 | * src/output.c: Include "subpipe.h". | |
1183 | (m4_invoke): Remove decl. | |
1184 | (scan_skel): New decl. | |
1185 | (output_skeleton): Use pipe rather than temporary file for m4 input. | |
1186 | Check that m4sugar.m4 is readable, to avoid deadlock. | |
1187 | Check for pipe I/O error. | |
1188 | * src/scan-skel.l (readpipe): Remove decl. | |
1189 | (scan_skel): New function, to be used in place of m4_invoke. | |
1190 | Read from stream rather than file. | |
66d30cd4 | 1191 | |
95f2c9fe PE |
1192 | * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to |
1193 | float, as this generates a warning on Solaris 8 + GCC 3.2 with | |
1194 | --enable-gcc-warnings. Instead, divide into 1.0 rather than 1; | |
1195 | this generates a more-accurate value anyway. | |
1196 | ||
1197 | * lib/timevar.c (timervar_accumulate): Rename locals to | |
1198 | avoid confusion with similarly-named more-global. | |
1199 | * src/muscle_tab.c (muscle_pair_list_grow): Likewise. | |
1200 | ||
1201 | * src/output.c (prepare): Use xstrdup to convert char const * | |
1202 | to char *, to avoid GCC warning. | |
1203 | ||
c19988b7 AD |
1204 | 2002-10-19 Akim Demaille <akim@epita.fr> |
1205 | ||
1206 | * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS, | |
1207 | LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS. | |
1208 | Use them to have `calc.y' ready for %pure-parser. | |
1209 | * data/yacc.c (YYLEX): Pass a yylex return type to | |
1210 | b4_c_function_call. | |
1211 | ||
ae7453f2 AD |
1212 | 2002-10-19 Akim Demaille <akim@epita.fr> |
1213 | ||
1214 | Prototype support of %lex-param and %parse-param. | |
1215 | ||
1216 | * src/parse-gram.y: Add the definition of the %lex-param and | |
1217 | %parse-param tokens, plus their rules. | |
1218 | Drop the `_' version of %glr-parser. | |
1219 | Add the "," token. | |
1220 | * src/scan-gram.l (INITIAL): Scan them. | |
1221 | * src/muscle_tab.c: Comment changes. | |
1222 | (muscle_insert, muscle_find): Rename `pair' as `probe'. | |
1223 | * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused. | |
1224 | (muscle_entry_s): The `value' member is no longer const. | |
1225 | Adjust all dependencies. | |
1226 | * src/muscle_tab.c (muscle_init): Adjust: use | |
1227 | MUSCLE_INSERT_STRING. | |
1228 | Initialize the obstack earlier. | |
1229 | * src/muscle_tab.h, src/muscle_tab.c (muscle_grow) | |
1230 | (muscle_pair_list_grow): New. | |
1231 | * data/c.m4 (b4_c_function_call, b4_c_args): New. | |
1232 | * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param. | |
1233 | * tests/calc.at: Use %locations, not --locations. | |
1234 | (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser. | |
1235 | ||
0e575721 AD |
1236 | 2002-10-19 Akim Demaille <akim@epita.fr> |
1237 | ||
1238 | * src/getargs.c (usage): Take status as argument and exit | |
1239 | accordingly. | |
1240 | Report the traditional `Try ... --help' message when status != 0. | |
1241 | (usage, version): Don't take a FILE * as arg, it is pointless. | |
1242 | (getargs): When there is an incorrect number of arguments, make it | |
1243 | an error, and report it GNUlically thanks to `usage ()'. | |
1244 | ||
724ce7f5 PE |
1245 | 2002-10-18 Paul Eggert <eggert@twinsun.com> |
1246 | ||
3a781eb2 PE |
1247 | * data/glr.c (yyreportParseError): Don't assume that sprintf |
1248 | yields the length of the printed string, as this is not true | |
1249 | on SunOS 4.1.4. Reported by Peter Klein. | |
1250 | ||
724ce7f5 PE |
1251 | * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc. |
1252 | * tests/conflicts.at (%nonassoc and eof): Likewise. | |
1253 | Fixes SunOS 4.1.4 test failure reported by Peter Klein. | |
1254 | ||
473d0a75 AD |
1255 | 2002-10-17 Akim Demaille <akim@epita.fr> |
1256 | ||
1257 | * src/getargs.h (trace_e): Add trace_scan, and trace_parse. | |
1258 | * src/getargs.c (trace_types, trace_args): Adjust. | |
1259 | * src/reader.c (grammar_current_rule_prec_set) | |
1260 | (grammar_current_rule_dprec_set, grammar_current_rule_merge_set): | |
1261 | Standardize error messages. | |
1262 | And s/@prec/%prec/! | |
1263 | (reader): Use trace_flag to enable scanner/parser debugging, | |
1264 | instead of an adhoc scheme. | |
1265 | * src/scan-gram.l: Remove trailing debugging code. | |
1266 | ||
e76d2469 PE |
1267 | 2002-10-16 Paul Eggert <eggert@twinsun.com> |
1268 | ||
93e2236a PE |
1269 | * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as |
1270 | MUSCLE_TAB_H. | |
1271 | ||
e76d2469 PE |
1272 | * NEWS: Officially drop support for building Bison with K&R C, |
1273 | since it didn't work anyway and it's not worth worrying about. | |
1274 | * Makefile.maint (wget_files): Remove ansi2knr.c. | |
1275 | (ansi2knr.c-url_prefix): Remove. | |
1276 | * lib/.cvsignore: Remove ansi2knr, ansi2knr.*. | |
1277 | * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove. | |
1278 | * src/Makefile.am (AUTOMAKE_OPTIONS): Remove. | |
1279 | ||
5bd1c419 PE |
1280 | 2002-10-15 Paul Eggert <eggert@twinsun.com> |
1281 | ||
1282 | Stop using the "enum_" trick for K&R-style function definitions; | |
1283 | it confused me, and I was the author! Instead, assume that people | |
1284 | who want to use K&R C compilers (when using these modules in GCC, | |
1285 | perhaps?) will run ansi2knr. | |
1286 | ||
1287 | * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove. | |
1288 | All uses of "enum_" changed to "enum ". | |
1289 | * lib/ebitset.c (enum_ebitset_find_mode): Likewise. | |
1290 | * lib/lbitset.c (enum_lbitset_find_mode): Likewise. | |
e76d2469 | 1291 | |
5bd1c419 PE |
1292 | * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or, |
1293 | abitset_and_or_cmp, abitset_andn, abitset_andn_cmp, | |
1294 | abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy, | |
1295 | abitset_copy1, abitset_disjoint_p, abitset_empty_p, | |
1296 | abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse, | |
1297 | abitset_not, abitset_ones, abitset_or, abitset_or_and, | |
1298 | abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set, | |
1299 | abitset_size, abitset_small_list, abitset_subset_p, abitset_test, | |
1300 | abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero): | |
1301 | Use function prototypes; this removes the need for declaring | |
1302 | static functions simply to provide their prototypes. | |
1303 | * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_, | |
1304 | bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_, | |
1305 | bitset_count_, bitset_create, bitset_dump, bitset_first, | |
1306 | bitset_free, bitset_init, bitset_last, bitset_next, | |
1307 | bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p, | |
1308 | bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev, | |
1309 | bitset_print, bitset_release_memory, bitset_toggle_, | |
1310 | bitset_type_choose, bitset_type_get, bitset_type_name_get, | |
1311 | debug_bitset): Likewise. | |
1312 | * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise. | |
1313 | * lib/bitset_stats.c (bitset_log_histogram_print, | |
1314 | bitset_percent_histogram_print, bitset_stats_and, | |
1315 | bitset_stats_and_cmp, bitset_stats_and_or, | |
1316 | bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp, | |
1317 | bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy, | |
1318 | bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p, | |
1319 | bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable, | |
1320 | bitset_stats_equal_p, bitset_stats_free, bitset_stats_init, | |
1321 | bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not, | |
1322 | bitset_stats_ones, bitset_stats_or, bitset_stats_or_and, | |
1323 | bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print, | |
1324 | bitset_stats_print_1, bitset_stats_read, bitset_stats_reset, | |
1325 | bitset_stats_set, bitset_stats_size, bitset_stats_subset_p, | |
1326 | bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get, | |
1327 | bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp, | |
1328 | bitset_stats_zero): Likewise. | |
1329 | * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free, | |
1330 | bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure, | |
1331 | bitsetv_dump, debug_bitsetv): Likewise. | |
1332 | * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn, | |
1333 | ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_, | |
1334 | ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add, | |
1335 | ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find, | |
1336 | ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove, | |
1337 | ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p, | |
1338 | ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list, | |
1339 | ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp, | |
1340 | ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset, | |
1341 | ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test, | |
1342 | ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero): | |
1343 | Likewise. | |
1344 | * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp, | |
1345 | lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy, | |
1346 | lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc, | |
1347 | lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free, | |
1348 | lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p, | |
1349 | lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init, | |
1350 | lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones, | |
1351 | lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune, | |
1352 | lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size, | |
1353 | lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor, | |
1354 | lbitset_xor_cmp, lbitset_zero): Likewise. | |
e76d2469 | 1355 | |
ae26e1f0 AD |
1356 | 2002-10-14 Akim Demaille <akim@epita.fr> |
1357 | ||
1358 | Version 1.75. | |
1359 | ||
d43baf71 AD |
1360 | 2002-10-14 Akim Demaille <akim@epita.fr> |
1361 | ||
1362 | * tests/Makefile.am (maintainer-check-posix): New. | |
1363 | ||
7ebc83e3 AD |
1364 | 2002-10-14 Akim Demaille <akim@epita.fr> |
1365 | ||
1366 | * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc | |
1367 | member. | |
1368 | ||
05846dae AD |
1369 | 2002-10-14 Akim Demaille <akim@epita.fr> |
1370 | ||
1371 | * src/tables.c (table_ninf_remap): base -> tab. | |
1372 | Reported by Matt Rosing. | |
1373 | ||
1318e37d PE |
1374 | 2002-10-14 Paul Eggert <eggert@twinsun.com> |
1375 | ||
447fbb17 PE |
1376 | * tests/action.at, tests/calc.at, tests/conflicts.at, |
1377 | tests/cxx-type.at, tests/headers.at, tests/input.at, | |
1378 | tests/regression.at, tests/synclines.at, tests/torture.at: | |
1379 | Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c", | |
1380 | so that the tests still work even if POSIXLY_CORRECT is set. | |
1381 | * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise. | |
05846dae | 1382 | |
1318e37d PE |
1383 | * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char, |
1384 | for portability to K&R hosts. Fix typo: signed char is guaranteed | |
1385 | only to 127, not to 128. | |
1386 | * data/glr.c (yysigned_char): New type. | |
1387 | * data/yacc.c (yysigned_char): Likewise. | |
1388 | * tests/regression.at (Web2c Actions): signed char -> yysigned_char. | |
1389 | ||
cc0f0794 PE |
1390 | 2002-10-13 Paul Eggert <eggert@twinsun.com> |
1391 | ||
5038f418 PE |
1392 | * data/yacc.c (yyparse): Rewrite to avoid "comparison is always |
1393 | true due to limited range of data type" warning from GCC. | |
1394 | ||
cc0f0794 PE |
1395 | * data/c.m4 (b4_token_defines): Protect against double-inclusion |
1396 | by wrapping enum yytokentype's definition inside #ifndef | |
1397 | YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12. | |
1398 | ||
6fed0802 AD |
1399 | 2002-10-13 Akim Demaille <akim@epita.fr> |
1400 | ||
1401 | * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction): | |
1402 | Un yy- yyrhs to avoid the name clash with the global YYRHS. | |
1403 | ||
32f0598d AD |
1404 | 2002-10-13 Akim Demaille <akim@epita.fr> |
1405 | ||
1406 | * Makefile.maint: Update from Autoconf 2.54. | |
1407 | * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54. | |
1408 | ||
7ea9a33f AD |
1409 | 2002-10-13 Akim Demaille <akim@epita.fr> |
1410 | ||
1411 | * src/print.c (print_state): Separate the list of solved conflicts | |
1412 | from the other items. | |
1413 | * tests/conflicts.at (Resolved SR Conflicts): Adjust. | |
1414 | ||
ea99527d AD |
1415 | 2002-10-13 Akim Demaille <akim@epita.fr> |
1416 | ||
1417 | Let nondeterministic skeletons be usable with deterministic | |
1418 | tables. | |
1419 | ||
1420 | With the patch, GAWK compiled by GCC without -O2 passes its test | |
1421 | suite using a GLR parser driven by LALR tables. It fails with -O2 | |
1422 | because `struct stat' gives two different answers on my machine: | |
1423 | 88 (definition of an auto var) and later 96 (memset on this var). | |
1424 | Hence the stack is badly corrumpted. The headers inclusion is to | |
1425 | blame: if I move the awk.h inclusion before GLR's system header | |
1426 | inclusion, the two struct stat have the same size. | |
1427 | ||
1428 | * src/tables.c (pack_table): Always create conflict_table. | |
1429 | (token_actions): Always create conflict_list. | |
1430 | * data/glr.c (YYFLAG): Remove, unused. | |
1431 | ||
f377f69f AD |
1432 | 2002-10-13 Akim Demaille <akim@epita.fr> |
1433 | ||
1434 | * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code. | |
1435 | (O0FLAGS): New. | |
1436 | (VALGRIND, GXX): New. | |
1437 | * tests/atlocal.in (CFLAGS): Use O0FLAGS. | |
1438 | * tests/bison.in: Run $PREBISON a pre-command. | |
1439 | * tests/Makefile.am (maintainer-check, maintainer-check-valgrind) | |
1440 | (maintainer-check-g++): New. | |
1441 | * Makefile.am (maintainer-check): New. | |
1442 | ||
2a1fe6ed AD |
1443 | 2002-10-13 Akim Demaille <akim@epita.fr> |
1444 | ||
1445 | * data/glr.c: Formatting changes. | |
1446 | Tweak some trace messages to match yacc.c's. | |
1447 | ||
f50adbbd AD |
1448 | 2002-10-13 Akim Demaille <akim@epita.fr> |
1449 | ||
1450 | GLR parsers sometimes raise parse errors instead of performing the | |
1451 | default reduction. | |
1452 | Reported by Charles-Henry de Boysson. | |
1453 | ||
1454 | * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't | |
1455 | check the length of the traces when %glr. | |
1456 | (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from | |
1457 | GLR's traces. | |
1458 | (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New. | |
1459 | Test GLR parsers. | |
1460 | * data/glr.c (YYLEFTMOST_STATE): Fix its value. | |
1461 | (yyltype): Remove the yy prefix from the member names. | |
1462 | (yytable): Complete its comment. | |
1463 | (yygetLRActions): Map error action number from YYTABLE from | |
1464 | YYTABLE_NINF to 0. | |
1465 | (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF | |
1466 | (which was a bug: it should have been YYTABEL_NINF, and yet it was | |
1467 | not satisfying as we could compare an YYACTION computed from | |
1468 | YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the | |
1469 | only value for error actions. | |
1470 | (yyreportParseError): In verbose parse error messages, don't issue | |
1471 | `error' in the list of expected tokens. | |
1472 | * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the | |
1473 | next action to perform to match glr.c's decoding. | |
1474 | (yytable): Complete its comment. | |
1475 | ||
bcbad5b9 PE |
1476 | 2002-10-13 Paul Eggert <eggert@twinsun.com> |
1477 | ||
1478 | Fix problem reported by Henrik Grubbstroem in | |
1479 | <http://mail.gnu.org/pipermail/bug-bison/2002-October/001670.html>: | |
1480 | "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected, | |
1481 | because the Bison parser reads the second action before reducing | |
1482 | the first one. | |
1483 | * src/scan-gram.l (rule_length): New static var. | |
1484 | Use it to keep track of the rule length in the scanner, since | |
1485 | we can't expect the parser to be in lock-step sync with the scanner. | |
1486 | (handle_action_dollar, handle_action_at): Use this var. | |
1487 | * tests/actions.at (Exotic Dollars): Test for the problem. | |
05846dae | 1488 | |
14904b89 PE |
1489 | 2002-10-12 Paul Eggert <eggert@twinsun.com> |
1490 | ||
1fe611e5 PE |
1491 | * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>. |
1492 | * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>. | |
1493 | Include <sys/time.h> when checking for clock_t and struct tms. | |
1494 | Use same include order as source. | |
1495 | This is for the SunOS 4.1.4 porting bug reported by Peter Klein in | |
1496 | <http://mail.gnu.org/pipermail/bug-bison/2002-October/001674.html>. | |
05846dae | 1497 | |
1fe611e5 PE |
1498 | * lib/timevar.c: Update copyright date and clarify comments. |
1499 | (get_time) [IN_GCC]: Keep the GCC version for reference. | |
05846dae | 1500 | |
1fe611e5 PE |
1501 | * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import |
1502 | GCC version as of today, then merge Bison's changes. | |
1503 | Change "GCC" to "Bison" in copyright notice. timevar.def's | |
1504 | author is Akim, so change that too. | |
1505 | ||
98194095 PE |
1506 | * src/reader.c (grammar_current_rule_check): |
1507 | Don't worry about the default action if $$ is untyped. | |
1508 | Prevents bogus warnings reported by Jim Gifford in | |
1509 | <http://mail.gnu.org/pipermail/bug-bison/2002-October/001673.html>. | |
1510 | ||
14904b89 PE |
1511 | * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE. |
1512 | * data/glr.c, data/lalr1.cc, data/yacc.c: | |
1513 | Output token definitions before the first part of user declarations. | |
1514 | Fixes compatibility problem reported by Jim Gifford for kbd in | |
1515 | <http://mail.gnu.org/pipermail/bug-bison/2002-October/001672.html>. | |
1516 | ||
ff6dca18 PE |
1517 | 2002-10-11 Paul Eggert <eggert@twinsun.com> |
1518 | ||
1519 | * data/yacc.c (yyreport_parse_error): Remove, putting its body into... | |
1520 | (yyparse): here. This undoes some of the 2002-07-25 change. | |
1521 | Compatibility problem reported by Ralf S. Engelschall with | |
1522 | OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>. | |
1523 | ||
eb714592 AD |
1524 | 2002-10-11 Akim Demaille <akim@epita.fr> |
1525 | ||
1526 | * tests/regression.at Characters Escapes): New. | |
1527 | * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and | |
1528 | characters. | |
1529 | Reported by Jan Nieuwenhuizen. | |
1530 | ||
b7195100 AD |
1531 | 2002-10-11 Akim Demaille <akim@epita.fr> |
1532 | ||
1533 | * po/id.po: New. | |
1534 | ||
f28a0f2d PE |
1535 | 2002-10-10 Paul Eggert <eggert@twinsun.com> |
1536 | ||
1537 | Portability fixes for bitsets; this also avoids several GCC | |
1538 | warnings. | |
1539 | ||
1540 | * lib/abitset.c: Include <stddef.h>, for offsetof. | |
1541 | * lib/lbitset.c: Likewise. | |
1542 | ||
1543 | * lib/abitset.c (abitset_bytes): Return a size that is aligned | |
1544 | properly for vectors of objects. Do not assume that adding a | |
1545 | header size to a multiple of a word size yields a value that is | |
1546 | properly aligned for the whole union. | |
1547 | * lib/bitsetv.c (bitsetv_alloc): Likewise. | |
1548 | ||
1549 | * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new, | |
1550 | unique names for structures. | |
1551 | * lib/ebitset.c (ebitset_bytes): Likewise. | |
1552 | * lib/lbitset.c (lbitset_bytes): Likewise. | |
1553 | ||
1554 | * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p, | |
1555 | abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p, | |
1556 | abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn, | |
1557 | abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor, | |
1558 | abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp, | |
1559 | abitset_andn_or, abitset_andn_or_cmp, abitset_or_and, | |
1560 | abitset_or_and_cmp, abitset_copy): Supply prototype decls, | |
1561 | to improve the type-checking that GCC can do. | |
1562 | * lib/bitset.c (bitset_op4_cmp): Likewise. | |
1563 | * lib/bitset_stats.c (bitset_stats_count, | |
1564 | bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero, | |
1565 | bitset_stats_copy, bitset_stats_disjoint_p, | |
1566 | bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p, | |
1567 | bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn, | |
1568 | bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp, | |
1569 | bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or, | |
1570 | bitset_stats_and_or_cmp, bitset_stats_andn_or, | |
1571 | bitset_stats_andn_or_cmp, bitset_stats_or_and, | |
1572 | bitset_stats_or_and_cmp): Likewise. | |
1573 | * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn, | |
1574 | lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor, | |
1575 | lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not, | |
1576 | lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise. | |
1577 | ||
1578 | * lib/abitset.h: Include bitset.h, not bbitset.h. | |
1579 | * lib/ebitset.h: Likewise. | |
1580 | * lib/lbitset.h: Likewise. | |
1581 | ||
1582 | * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types. | |
1583 | All instances of parameters of type enum bitset_opts are now of | |
1584 | type enum_bitset_opts, to conform to the C Standard, and similarly | |
1585 | for enum_bitset_type. | |
1586 | * lib/ebitset.c (enum_ebitset_find_mode): Likewise. | |
1587 | * lib/lbitset.c (enum_lbitset_find_mode): Likewise. | |
1588 | ||
1589 | Do not use "struct bitset_struct" to mean different things in | |
1590 | different modules. Not only is this confusing, it violates | |
1591 | the C Standard, which requires that structure types in different | |
1592 | modules must be compatible if one is to be passed to the other. | |
1593 | * lib/bbitset.h (bitset): Now points to a union, not to a struct. | |
1594 | All instances of "struct bitset_struct *" replaced with "bitset". | |
1595 | * lib/bitset.h (struct bitset_struct): Remove, replacing with.... | |
1596 | (union bitset_union, struct abitset_struct, struct ebitset_struct, | |
1597 | struct lbitset_struct, struct bitset_stats_struct): New types. | |
1598 | All uses of struct bitset_struct changed to union bitset_union, | |
1599 | etc. | |
1600 | * lib/abitset.c (struct abitset_struct, abitset, | |
1601 | struct bitset_struct): Remove. | |
1602 | * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats, | |
1603 | struct bitset_struct): Remove. | |
1604 | * lib/ebitset.c (struct ebitset_struct, ebitset, struct | |
1605 | bitset_struct): Remove. | |
1606 | * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct): | |
1607 | Likewise. | |
1608 | ||
1609 | Do not call a function of type T using a call that assumes the | |
1610 | function is of a different type U. Standard C requires that a | |
1611 | function must be called with a type that is compatible with its | |
1612 | definition. | |
1613 | * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_): | |
1614 | New decls. | |
1615 | * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_): | |
1616 | New functions. | |
1617 | * lib/ebitset.c (PFV): Remove. | |
1618 | * lib/lbitset.c (PFV): Likewise. | |
1619 | * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or, | |
1620 | ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New | |
1621 | decls. | |
1622 | (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions. | |
1623 | (ebitset_vtable): Use them. | |
1624 | * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or, | |
1625 | lbitset_xor): New functions. | |
1626 | (lbitset_vtable): Use them. | |
1627 | ||
1628 | * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p): | |
1629 | Declare. | |
1630 | ||
1631 | * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a | |
1632 | GCC warning. | |
1633 | * lib/lbitset.c (LBITSET_CURRENT1): Likewise. | |
1634 | Use offsetof, for simplicity. | |
1635 | ||
6fbe4984 PE |
1636 | 2002-10-06 Paul Eggert <eggert@twinsun.com> |
1637 | ||
1638 | * lib/bitset.h (bitset_reset): Do not assume that bitset_word is | |
1639 | the same width as int. This reapplies a hunk of the 2002-08-12 patch | |
1640 | <http://mail.gnu.org/pipermail/bison-patches/2002-August/001111.html>, | |
1641 | which was inadvertently undone by the 2002-09-30 patch. | |
1642 | * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is | |
1643 | the same width as int. | |
1644 | ||
420f93c8 PE |
1645 | 2002-10-04 Paul Eggert <eggert@twinsun.com> |
1646 | ||
1647 | Version 1.50. | |
1648 | ||
1649 | * configure.ac (AC_INIT), NEWS: Increment version number. | |
1650 | ||
1651 | * doc/bison.texinfo: Minor spelling, grammar, and white space | |
1652 | fixes. | |
1653 | (Symbols): Mention that any negative value returned from yylex | |
1654 | signifies end-of-input. Warn about negative chars. Mention | |
1655 | the portable Standard C character set. | |
1656 | ||
1657 | The GNU coding standard says CFLAGS and YFLAGS are reserved | |
1658 | for the installer to set. | |
1659 | * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS. | |
1660 | * src/Makefile.am (AM_CFLAGS): Likewise. | |
1661 | (AM_YFLAGS): Renamed from YFLAGS. | |
1662 | ||
1663 | Fix some MAX and MIN problems. | |
1664 | * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN. | |
1665 | * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX. | |
1666 | * src/symtab.h (SYMBOL_NUMBER_MAX): New macro. | |
1667 | * src/reader.c (reader): Use it. | |
1668 | ||
1669 | * tests/regression.at (Braces parsing): Use grep, not fgrep, as | |
1670 | POSIX 1003.1-2001 has removed fgrep. | |
1671 | ||
1672 | 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz> | |
1673 | ||
1674 | * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be | |
1675 | interpreted as signed. | |
1676 | * lib/ebitset.c (ebitset_list): Fix bug. | |
1677 | ||
ff68026d PE |
1678 | 2002-10-01 Paul Eggert <eggert@twinsun.com> |
1679 | ||
1680 | More fixes for 64-bit hosts and large bitsets. | |
1681 | ||
1682 | * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list, | |
1683 | abitset_size, abitset_list, abitset_list_reverse, abitset_list): | |
1684 | Use bitset_bindex, not int or unsigned int or size_t, to count bits. | |
1685 | * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count, | |
1686 | struct bitset_vtable.list, struct bitset_vtable.list_reverse, | |
1687 | bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last, | |
1688 | bitset_count_): Likewise. | |
1689 | * lib/bitset.h (bitset_iterator.num, bitset_iterator.i, | |
1690 | bitset_first, bitset_last): Likewise. | |
1691 | * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list, | |
1692 | bitset_stats_list_reverse, bitset_stats_size, | |
1693 | bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse): | |
1694 | Likewise. | |
1695 | * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise. | |
1696 | * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free, | |
1697 | bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure, | |
1698 | bitsetv_reflexive_transitive_closure): Likewise. | |
1699 | * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise. | |
1700 | * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse): | |
1701 | Likewise. | |
1702 | * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge): | |
1703 | Likewise. | |
420f93c8 | 1704 | |
ff68026d PE |
1705 | * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes): |
1706 | Use size_t, not unsigned int, to count bytes. | |
1707 | * lib/abitset.h (abitset_bytes): Likewise. | |
1708 | * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc): | |
1709 | Likewise. | |
1710 | * lib/bitset.h (bitset_bytes): Likewise. | |
1711 | * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise. | |
1712 | * lib/bitset_stats.h (bitset_stats_bytes): Likewise. | |
1713 | * lib/bitsetv.c (bitsetv_alloc): Likewise. | |
1714 | * lib/ebitset.c (ebitset_bytes): Likewise. | |
1715 | * lib/ebitset.h (ebitset_bytes): Likewise. | |
1716 | * lib/lbitset.c (lbitset_bytes): Likewise. | |
1717 | * lib/lbitset.h (lbitset_bytes): Likewise. | |
420f93c8 | 1718 | |
ff68026d PE |
1719 | * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p, |
1720 | abitset_subset_p, abitset_disjoint_p, abitset_and, | |
1721 | abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or, | |
1722 | abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or, | |
1723 | abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp, | |
1724 | abitset_or_and, abitset_or_and_cmp): | |
1725 | Use bitset_windex instead of unsigned int. | |
1726 | * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise. | |
1727 | * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow, | |
1728 | ebitset_elt_add, ebitset_elt_remove, ebitset_weed, | |
1729 | ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init): | |
1730 | Likewise. | |
1731 | * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise. | |
420f93c8 | 1732 | |
ff68026d PE |
1733 | * lib/bitset.c (bitset_print): |
1734 | Use proper printf formats for widths of integer types. | |
1735 | * lib/bitset_stats.c (bitset_percent_histogram_print, | |
1736 | bitset_log_histogram_print, bitset_stats_print_1): Likewise. | |
1737 | * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise. | |
1738 | * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise. | |
1739 | * lib/lbitset.c (lbitset_bytes): Likewise. | |
420f93c8 | 1740 | |
ff68026d PE |
1741 | * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX, |
1742 | BITSET_SIZE_MAX): New macros. | |
1743 | (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that | |
1744 | sizeof (bitset_word) == sizeof (bitset_windex). All uses changed | |
1745 | to BITSET_WINDEX_MAX. | |
1746 | ||
1747 | * lib/bitset.c (bitset_next, bitset_prev, bitset_first, | |
1748 | bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value, | |
1749 | since we now return the bitset_bindex type (not int). | |
1750 | ||
1751 | * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow | |
1752 | when computing sizes. | |
1753 | * lib/ebitset.c (ebitset_elts_grow): Likewise. | |
1754 | ||
1755 | * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation | |
1756 | and avoid cast to unsigned. | |
1757 | ||
6aa452a6 AD |
1758 | 2002-09-30 Akim Demaille <akim@epita.fr> |
1759 | ||
1760 | * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h, | |
1761 | * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c: | |
1762 | Updates from Michael Hayes. | |
1763 | ||
927f7817 AD |
1764 | 2002-09-30 Art Haas <ahaas@neosoft.com> |
1765 | ||
1766 | * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER | |
1767 | invocations. | |
1768 | * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not | |
1769 | defined. | |
1770 | ||
9738f41e AD |
1771 | 2002-09-27 Akim Demaille <akim@epita.fr> |
1772 | ||
1773 | Version 1.49c. | |
1774 | ||
a5c75d7f AD |
1775 | 2002-09-27 Akim Demaille <akim@epita.fr> |
1776 | ||
1777 | * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7. | |
1778 | (Because of AC_LIBSOURCE). | |
1779 | ||
8280e179 AD |
1780 | 2002-09-27 Akim Demaille <akim@epita.fr> |
1781 | ||
1782 | Playing with Autoscan. | |
1783 | ||
1784 | * configure.ac: Remove the old LIBOBJ tweaks. | |
1785 | (AC_REPLACE_FUNCS): Add strrchr and strtol. | |
1786 | * lib/strrchr.c: New. | |
1787 | * lib/strtol.c: New, from the Coreutils 4.5.1. | |
1788 | ||
ae64af35 AD |
1789 | 2002-09-27 Akim Demaille <akim@epita.fr> |
1790 | ||
1791 | Playing with Autoscan. | |
1792 | ||
1793 | * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New. | |
1794 | * lib/Makefile.am (libbison_a_SOURCES): No longer include | |
1795 | argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd. | |
1796 | * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the | |
1797 | Coreutils 4.5.1. | |
1798 | ||
d1a1114f AD |
1799 | 2002-09-24 Akim Demaille <akim@epita.fr> |
1800 | ||
1801 | * doc/bison.texinfo (Stack Overflow): xref to Recursion. | |
1802 | (Frequently Asked Questions, Parser Stack Overflow): New. | |
1803 | ||
b906441c AD |
1804 | 2002-09-13 Akim Demaille <akim@epita.fr> |
1805 | ||
1806 | Playing with autoscan. | |
1807 | ||
1808 | * src/reader.c (get_merge_function): Use xstrdup, not strdup. | |
1809 | * src/files.c (skeleton_find): Remove, unused. | |
1810 | * m4/memcmp.m4: New, from the Coreutils 4.5.1. | |
1811 | * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP. | |
1812 | ||
bd701811 AD |
1813 | 2002-09-13 Akim Demaille <akim@epita.fr> |
1814 | ||
1815 | * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3. | |
1816 | * Makefile.am (AUTOMAKE_OPTIONS): Don't. | |
1817 | ||
e0a13e7b AD |
1818 | 2002-09-13 Akim Demaille <akim@epita.fr> |
1819 | ||
1820 | * configure.ac: Require 2.54. | |
1821 | s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/. | |
1822 | s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/. | |
1823 | * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4: | |
1824 | Remove, provided by Autoconf macros. | |
1825 | ||
c97011bf AD |
1826 | 2002-09-12 Akim Demaille <akim@epita.fr> |
1827 | ||
1828 | * m4/prereq.m4: Update, from Coreutils 4.5.1. | |
1829 | ||
d862b1be AD |
1830 | 2002-09-12 Akim Demaille <akim@epita.fr> |
1831 | ||
1832 | * m4/prereq.m4: Update, from Fileutils 4.1.5. | |
1833 | * configure.ac (jm_PREREQ_TEMPNAME): Invoke it. | |
1834 | Reported by Martin Mokrejs. | |
1835 | ||
3d38c03a AD |
1836 | 2002-09-10 Akim Demaille <akim@epita.fr> |
1837 | ||
1838 | * src/parse-gram.y: Associate a human readable string to each | |
1839 | token type. | |
1840 | * tests/regression.at (Invalid inputs): Adjust. | |
1841 | ||
b6347355 AD |
1842 | 2002-09-10 Gary V. Vaughan <gary@gnu.org> |
1843 | ||
1844 | * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships | |
1845 | with an Autoconf-2.5x style configure.ac. | |
1846 | ||
09ba4ab2 PE |
1847 | 2002-09-06 Paul Eggert <eggert@twinsun.com> |
1848 | ||
1849 | * doc/bison.texinfo (Conditions): Make explicit that the GPL | |
1850 | exception applies only to yacc.c. This is a modification of a | |
1851 | patch originally suggested by Akim Demaille. | |
1852 | ||
21846f69 AD |
1853 | 2002-09-06 Akim Demaille <akim@epita.fr> |
1854 | ||
09ba4ab2 PE |
1855 | * data/c.m4 (b4_copyright): Move the GPL exception comment from |
1856 | here to... | |
1857 | * data/yacc.c: here. | |
1858 | ||
21846f69 AD |
1859 | * data/lalr1.cc (struct yyltype): Don't define it, since we use |
1860 | LocationType. | |
1861 | (b4_ltype): Default to yy::Location from location.hh. | |
1862 | ||
c0ad8bf3 AD |
1863 | 2002-09-04 Jim Meyering <jim@meyering.net> |
1864 | ||
1865 | * data/yacc.c: Guard the declaration of yytoknum also with | |
1866 | `#ifdef YYPRINT', so it is declared only when used. | |
1867 | ||
3a93251e AD |
1868 | 2002-09-04 Akim Demaille <akim@epita.fr> |
1869 | ||
1870 | * configure.in: Rename as... | |
1871 | * configure.ac: this. | |
1872 | Bump to 1.49c. | |
1873 | ||
427c0dda AD |
1874 | 2002-09-04 Akim Demaille <akim@epita.fr> |
1875 | ||
1876 | * src/assoc.c, src/closure.c, src/gram.c, src/injections.c, | |
1877 | * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't | |
1878 | translate maintainer only messages. | |
1879 | ||
6a254321 PE |
1880 | 2002-08-12 Paul Eggert <eggert@twinsun.com> |
1881 | ||
645e30d1 PE |
1882 | Version 1.49b. |
1883 | ||
6a254321 PE |
1884 | * Makefile.am (SUBDIRS): Remove intl. |
1885 | (DISTCLEANFILES): Remove. | |
1886 | * NEWS: Mention that GNU M4 is now required. Clarify what is | |
1887 | meant by "larger grammars". Mention the pt_BR translation. | |
1888 | * configure.in (AC_CHECK_DECLS): Add getenv, getopt. | |
1889 | (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var. | |
1890 | Bump version from 0.11.2 to 0.11.5. | |
1891 | (BISON_PREREQ_STAGE): Remove. | |
1892 | (AM_GNU_GETTEXT): Use external gettext. | |
1893 | (AC_OUTPUT): Remove intl/Makefile. | |
1894 | ||
1895 | * config/depcomp, config/install-sh: Sync with Automake 1.6.3. | |
1896 | ||
1897 | * data/glr.c: Include string.h, for strlen. | |
1898 | (yyreportParseError): Use size_t for yysize. | |
1899 | (yy_yypstack): No longer nested inside yypstates, as nested | |
1900 | functions are not portable. Do not assume size_t is the | |
1901 | same width as int. | |
1902 | (yypstates): Do not assume that ptrdiff_t is the same width | |
1903 | as int, and similarly for yyposn and YYINDEX. | |
1904 | ||
1905 | * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage. | |
1906 | ||
1907 | * lib/Makefile.am (INCLUDES): Do not include from the intl | |
1908 | directory, which has been removed. | |
1909 | * src/Makefile.am (INCLUDES): Likewise. | |
1910 | ||
1911 | * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h. | |
1912 | (bitsets_sources, additional_bitsets_sources, timevars_sources): | |
1913 | New vars. | |
1914 | ||
1915 | * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension. | |
1916 | * tests/Makefile.am (EXTRA_DIST): Likewise. | |
1917 | ||
1918 | * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list): | |
1919 | Do not assume that bitset_windex is the same width as unsigned. | |
1920 | ||
1921 | * lib/abitset.c (abitset_unused_clear): Do not assume that | |
1922 | bitset_word is the same width as int. | |
1923 | * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise. | |
1924 | * lib/bitset.h (bitset_set, bitset_reset): Likewise. | |
1925 | * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise. | |
1926 | * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise. | |
1927 | * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise. | |
1928 | ||
1929 | * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for | |
1930 | portability to one's complement hosts!). | |
1931 | * lib/ebitset.c (ebitset_op1): Likewise. | |
1932 | * lib/lbitset.c (lbitset_op1): Likewise. | |
1933 | ||
1934 | * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar. | |
1935 | * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h, | |
1936 | lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c: | |
1937 | Sync with fileutils. | |
1938 | * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c, | |
1939 | lib/gettext.h: Sync with diffutils. | |
1940 | ||
1941 | * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c, | |
1942 | lib/strspn.c, lib/tempname.c: Use GPL, not LGPL. | |
1943 | ||
1944 | * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use | |
1945 | PROTOTYPES to check for prototypes, and "defined __STDC__" to | |
1946 | check for void *. | |
1947 | ||
1948 | * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not | |
1949 | size_t; the old version tried to do this but casted improperly. | |
1950 | (bitset_bindex, bitset_windex): Now size_t, not unsigned long. | |
1951 | (bitset_test): Now returns int, not unsigned long. | |
1952 | ||
1953 | * lib/bitset_stats.c: Include "gettext.h". | |
1954 | (_): New macro. | |
1955 | (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't | |
1956 | name locals "index", as it generates unnecessary warnings on some | |
1957 | hosts that have an "index" function. | |
1958 | ||
1959 | * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print, | |
1960 | bitset_stats_read, bitset_stats_write): Wrap strings in _() if | |
1961 | they need translation. | |
1962 | * src/LR0.c (state_list_append, new_itemsets, get_state, | |
1963 | append_states, generate_states): Likewise. | |
1964 | * src/assoc.c (assoc_to_string): Likewise. | |
1965 | * src/closure.c (print_closure, set_firsts, closure): Likewise. | |
1966 | * src/gram.c (grammar_dump): Likewise. | |
1967 | * src/injections.c (injections_compute): Likewise. | |
1968 | * src/lalr.c (lookaheads_print): Likewise. | |
1969 | * src/relation.c (relation_transpose): Likewise. | |
1970 | * src/scan-gram.l: Likewise. | |
1971 | * src/tables.c (table_grow, pack_vector): Likewise. | |
1972 | ||
1973 | * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4, | |
1974 | glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4. | |
1975 | * m4/malloc.m4, m4/realloc.m4: Sync with diffutils. | |
1976 | * m4/mbstate_t.m4: Sync with fileutils. | |
1977 | * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T. | |
1978 | ||
1979 | * po/LINGUAS: Add pt_BR. | |
1980 | * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c, | |
1981 | src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c, | |
1982 | lib/timevar.c. | |
1983 | Use src/parse-gram.y instead of src/parse-gram.c, as the gettext | |
1984 | manual recommends. | |
1985 | Similarly, use src/scan-gram.l instead of src/scan-gram.c. | |
1986 | ||
1987 | * src/complain.c (strerror_r): Remove decl; not needed. | |
1988 | (strerror): Use same pattern as ../lib/error.c. | |
1989 | ||
1990 | * src/files.c, src/files.h (compute_header_macro): Remove; unused. | |
1991 | ||
1992 | * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int. | |
1993 | ||
1994 | * src/main.c (main): Cast result of bindtextdomain and textdomain | |
1995 | to void, to avoid a GCC warning when --disable-nls is in effect. | |
1996 | ||
1997 | * src/scan-gram.l: Use strings rather than escapes when possible, | |
1998 | to minimize the number of warnings from xgettext. | |
1999 | (handle_action_dollar, handle_action_at): Don't use isdigit, | |
2000 | as it mishandles negative chars and it may not work as expected | |
2001 | outside the C locale. | |
2002 | ||
2003 | * src/symtab.c (symbol_get): Don't cast LHS of an assignment; | |
2004 | this is a GCC extension and is not portable to other compilers. | |
2005 | ||
2006 | * src/system.h (alloca): Use same pattern as ../lib/error.c. | |
2007 | Do not include <ctype.h>; no longer needed. | |
2008 | Do not include <malloc.h>; no longer needed (and generates | |
2009 | warnings on OpenBSD 3.0). | |
2010 | ||
2011 | * tests/cxx-type.at (yylex): Do not pass signed char to isupper; | |
2012 | it's not portable. | |
2013 | ||
2014 | * tests/regression.at: Do not use 'cc -c input.c -o input'; | |
2015 | Sun C rejects this. Instead, use 'cc -c input.c -o input.o'. | |
2016 | ||
2017 | * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero | |
2018 | exit status as failure, not just exit status 1. Sun C exits | |
2019 | with status 2 sometimes. | |
2020 | ||
2021 | * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro. | |
2022 | Use it for the two large tests. | |
2023 | ||
c8f002c7 AD |
2024 | 2002-08-02 Akim Demaille <akim@epita.fr> |
2025 | ||
2026 | * src/conflicts.c (conflicts_output): Don't output rules never | |
2027 | reduced here, since anyway that computation doesn't work. | |
2028 | * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p) | |
2029 | (rule_useless_p, rule_never_reduced_p): New. | |
2030 | (grammar_rules_partial_print): Use a filter instead of a range. | |
2031 | Display the title only if needed. | |
2032 | (grammar_rules_print): Adjust. | |
2033 | (grammar_rules_never_reduced_report): New. | |
2034 | * src/tables.c (action_row): Move the computation of rules never | |
2035 | reduced to... | |
2036 | (token_actions): here. | |
2037 | * src/main.c (main): Make the parser before making the report, so | |
2038 | that rules never reduced are computed. | |
2039 | Call grammar_rules_never_reduced_report. | |
2040 | * src/print.c (print_results): Report rules never reduced. | |
2041 | * tests/conflicts.at, tests/reduce.at: Adjust. | |
2042 | ||
cd08e51e AD |
2043 | 2002-08-01 Akim Demaille <akim@epita.fr> |
2044 | ||
2045 | Instead of attaching lookaheads and duplicating the rules being | |
2046 | reduced by a state, attach the lookaheads to the reductions. | |
2047 | ||
2048 | * src/state.h (state_t): Remove the `lookaheads', | |
2049 | `lookaheads_rule' member. | |
2050 | (reductions_t): Add a `lookaheads' member. | |
2051 | Use a regular array for the `rules'. | |
2052 | * src/state.c (reductions_new): Initialize the lookaheads member | |
2053 | to 0. | |
2054 | (state_rule_lookaheads_print): Adjust. | |
2055 | * src/state.h, src/state.c (state_reductions_find): New. | |
2056 | * src/conflicts.c (resolve_sr_conflict, set_conflicts) | |
2057 | (count_rr_conflicts): Adjust. | |
2058 | * src/lalr.c (LArule): Remove. | |
2059 | (add_lookback_edge): Adjust. | |
2060 | (state_lookaheads_count): New. | |
2061 | (states_lookaheads_initialize): Merge into... | |
2062 | (initialize_LA): this. | |
2063 | (lalr_free): Adjust. | |
2064 | * src/main.c (main): Don't free nullable and derives too early: it | |
2065 | is used by --verbose. | |
2066 | * src/print.c, src/print_graph.c, src/tables.c: Adjust. | |
2067 | ||
bb0027a9 AD |
2068 | 2002-08-01 Akim Demaille <akim@epita.fr> |
2069 | ||
2070 | * src/derives.h, src/derives.c (derives): A `rule_t***' instead of | |
2071 | `rule_number_t**'. | |
2072 | (set_derives, free_derives): Rename as... | |
2073 | (derives_compute, derives_free): this. | |
2074 | Adjust all dependencies. | |
2075 | * src/nullable.c (set_nullable, free_nullable): Rename as... | |
2076 | (nullable_compute, nullable_free): these. | |
2077 | (rule_list_t): Store rule_t *, not rule_number_t. | |
2078 | * src/state.c (state_rule_lookaheads_print): Directly compare rule | |
2079 | pointers, instead of their numbers. | |
2080 | * src/main.c (main): Call nullable_free, and derives_free earlier, | |
2081 | as they were lo longer used. | |
2082 | ||
3325ddc4 AD |
2083 | 2002-08-01 Akim Demaille <akim@epita.fr> |
2084 | ||
2085 | * lib/timevar.c (get_time): Include children time. | |
2086 | * src/lalr.h (LA, LArule): Don't export them: used with the | |
2087 | state_t. | |
2088 | * src/lalr.c (LA, LArule): Static. | |
2089 | * src/lalr.h, src/lalr.c (lalr_free): New. | |
2090 | * src/main.c (main): Call it. | |
2091 | * src/tables.c (pack_vector): Check whether loc is >= to the | |
2092 | table_size, not >. | |
2093 | (pack_tables): Don't free froms, tos, conflict_tos, and pos... | |
2094 | (tables_generate): do it, since that's also it which allocates | |
2095 | them. | |
2096 | Don't free LA and LArule, main does. | |
2097 | ||
c6f1a33c AD |
2098 | 2002-07-31 Akim Demaille <akim@epita.fr> |
2099 | ||
2100 | Separate parser tables computation and output. | |
2101 | ||
2102 | * src/output.c (nvectors, base_t, base, base_ninf, conflict_table) | |
2103 | (conflict_list, conflict_list_cnt, table, check, table_ninf) | |
2104 | (yydefgoto, yydefact, high): Move to... | |
2105 | * src/tables.h, src/tables.c: here. | |
2106 | * src/output.c (vector_number_t, VECTOR_NUMBER_MAX) | |
2107 | (VECTOR_NUMBER_MIN, state_number_to_vector_number) | |
2108 | (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN) | |
2109 | (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX) | |
2110 | (ACTION_MIN, actrow, order, nentries, pos, conflrow) | |
2111 | (conflict_list_free, table_size, lowzero, table_grow, conflict_row) | |
2112 | (action_row, save_row, token_actions, save_column, default_goto) | |
2113 | (goto_actions, sort_actions, matching_state, pack_vector) | |
2114 | (table_ninf_remap, pack_table, prepare_actions): Move to... | |
2115 | * src/tables.c: here. | |
2116 | * src/tables.h, src/tables.c(tables_generate, tables_free): New. | |
2117 | * src/output.c (token_actions, output_base, output_conflicts) | |
2118 | (output_check): Merge into... | |
2119 | (prepare_actions): this. | |
2120 | (actions_output): Rename as... | |
2121 | (user_actions_output): this. | |
2122 | * src/main.c (main): Call tables_generate and tables_free. | |
2123 | ||
1509d42f AD |
2124 | 2002-07-31 Akim Demaille <akim@epita.fr> |
2125 | ||
2126 | Steal GCC's --time-report support. | |
2127 | ||
2128 | * lib/timevar.c, lib/timevar.h, lib/timevar.def: New, | |
2129 | stolen/adjusted from GCC. | |
2130 | * m4/stage.m4: Remove time related checks. | |
2131 | * m4/timevar.m4: New. | |
2132 | * configure.in: Adjust. | |
2133 | * src/system.h: Adjust to using timevar.h. | |
2134 | * src/getargs.h, src/getargs.c: Support trace_time for | |
2135 | --trace=time. | |
2136 | * src/main.c (stage): Remove. | |
2137 | (main): Replace `stage' invocations with timevar calls. | |
2138 | * src/output.c: Insert pertinent timevar calls. | |
2139 | ||
273a74fa AD |
2140 | 2002-07-31 Akim Demaille <akim@epita.fr> |
2141 | ||
2142 | Let --trace have arguments. | |
2143 | ||
2144 | * src/getargs.h (enum trace_e): New. | |
2145 | * src/getargs.c (trace_args, trace_types, trace_argmatch): New. | |
2146 | (long_options, short_options): --trace/-T takes an optional | |
2147 | argument. | |
2148 | Change all the uses of trace_flag to reflect the new flags. | |
2149 | * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets. | |
2150 | ||
2151 | Strengthen `stage' portability. | |
2152 | ||
2153 | * m4/stage.m4 (BISON_PREREQ_STAGE): New. | |
2154 | * configure.in: Use it. | |
2155 | Don't check for malloc.h and sys/times.h. | |
2156 | * src/system.h: Include them when appropriate. | |
2157 | * src/main.c (stage): Compile only when mallinfo, struct mallinfo, | |
2158 | times and struct tms are available. | |
2159 | ||
217598da AD |
2160 | 2002-07-30 Akim Demaille <akim@epita.fr> |
2161 | ||
2162 | In verbose parse error message, don't report `error' as an | |
2163 | expected token. | |
2164 | * tests/actions.at (Printers and Destructors): Adjust. | |
2165 | * tests/calc.at (Calculator $1): Adjust. | |
2166 | * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose | |
2167 | error message, do not report the parser accepts the error token in | |
2168 | that state. | |
2169 | ||
52489d44 AD |
2170 | 2002-07-30 Akim Demaille <akim@epita.fr> |
2171 | ||
2172 | Normalize conflict related messages. | |
2173 | ||
2174 | * src/complain.h, src/complain.c (warn, complain): New. | |
2175 | * src/conflicts.c (conflicts_print): Use them. | |
2176 | (conflict_report_yacc): New, extracted from... | |
2177 | (conflicts_print): here. | |
2178 | * tests/conflicts.at, tests/existing.at: Adjust. | |
2179 | ||
e8832397 AD |
2180 | 2002-07-30 Akim Demaille <akim@epita.fr> |
2181 | ||
2182 | Report rules which are never reduced by the parser: those hidden | |
2183 | by conflicts. | |
2184 | ||
2185 | * src/LR0.c (save_reductions): Don't make the final state too | |
2186 | different: save its reduction (accept) instead of having a state | |
2187 | without any action (no shift or goto, no reduce). | |
2188 | Note: the final state is now a ``regular'' state, i.e., the | |
2189 | parsers now contain `reduce 0' as default reduction. | |
2190 | Nevertheless, since they decide to `accept' when yystate = | |
2191 | final_state, they still will not reduce rule 0. | |
2192 | * src/print.c (print_actions, print_reduction): Adjust. | |
2193 | * src/output.c (action_row): Track reduced rules. | |
2194 | (token_actions): Report rules never reduced. | |
2195 | * tests/conflicts.at, tests/regression.at: Adjust. | |
2196 | ||
caf23d24 AD |
2197 | 2002-07-30 Akim Demaille <akim@epita.fr> |
2198 | ||
2199 | `stage' was accidently included in a previous patch. | |
2200 | Initiate its autoconfiscation. | |
2201 | ||
2202 | * configure.in: Look for malloc.h and sys/times.h. | |
2203 | * src/main.c (stage): Adjust. | |
2204 | Report only when trace_flag. | |
2205 | ||
640748ee AD |
2206 | 2002-07-29 Akim Demaille <akim@epita.fr> |
2207 | ||
2208 | * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not | |
2209 | state_number_t. | |
2210 | (errs_t): symbol_t*, not symbol_number_t. | |
2211 | (reductions_t): rule_t*, not rule_number_t. | |
2212 | (FOR_EACH_SHIFT): New. | |
2213 | * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c | |
2214 | * src/print.c, src/print_graph.c: Adjust. | |
2215 | ||
88bce5a2 AD |
2216 | 2002-07-29 Akim Demaille <akim@epita.fr> |
2217 | ||
2218 | Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $. | |
2219 | ||
2220 | * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as... | |
2221 | (endtoken, accept): these. | |
2222 | * src/reader.c (reader): Set endtoken's default tag to "$end". | |
2223 | Set undeftoken's tag to "$undefined" instead of "$undefined.". | |
2224 | * doc/bison.texinfo (Table of Symbols): Mention $accept and $end. | |
2225 | Adjust. | |
2226 | ||
1bfb97db AD |
2227 | 2002-07-29 Akim Demaille <akim@epita.fr> |
2228 | ||
2229 | * src/reduce.c (reduce_grammar): When the language is empty, | |
2230 | complain about the start symbol, not the axiom. | |
2231 | Use its location. | |
2232 | * tests/reduce.at (Empty Language): New. | |
2233 | ||
fc5734fe AD |
2234 | 2002-07-26 Akim Demaille <akim@epita.fr> |
2235 | ||
2236 | * src/reader.h, src/reader.c (gram_error): ... can't get | |
2237 | yycontrol without making too strong assumptions on the parser | |
2238 | itself. | |
2239 | * src/output.c (prepare_tokens): Use the real 0th value of | |
2240 | token_translations instead of `0'. | |
2241 | * src/parse-gram.y (yyerror): Don't rely on yycontrol being | |
2242 | visible here. | |
2243 | * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc | |
2244 | for the time being: %locations ought to provide it to yyerror. | |
2245 | ||
3650b4b8 AD |
2246 | 2002-07-25 Akim Demaille <akim@epita.fr> |
2247 | ||
2248 | * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1. | |
2249 | * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./. | |
2250 | * tests/regression.at (Web2c Actions): Adjust. | |
2251 | ||
4b3d3a8e AD |
2252 | 2002-07-25 Akim Demaille <akim@epita.fr> |
2253 | ||
2254 | Stop storing rules from 1 to nrules + 1. | |
2255 | ||
2256 | * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c | |
2257 | * src/nullable.c, src/output.c, src/print.c, src/reader.c | |
2258 | * src/reduce.c: Allocate and free from &rules[0], not &rules[1]. | |
2259 | Iterate from 0 to nrules. | |
2260 | Use rule_number_as_item_number and item_number_as_rule_number. | |
2261 | Adjust to `derive' now containing possibly 0. | |
2262 | * src/gram.h (rule_number_as_item_number, item_number_as_rule_number): | |
2263 | Handle the `- 1' part in rule numbers from/to item numbers. | |
2264 | * src/conflicts.c (log_resolution): Fix the message which reversed | |
2265 | shift and reduce. | |
2266 | * src/output.c (action_row): Initialize default_rule to -1. | |
2267 | (token_actions): Adjust. | |
2268 | * tests/sets.at (Nullable, Firsts): Fix the previously bogus | |
2269 | expected output. | |
2270 | * tests/conflicts.at (Resolved SR Conflicts): Likewise. | |
2271 | ||
4a2a22f4 AD |
2272 | 2002-07-25 Akim Demaille <akim@epita.fr> |
2273 | ||
2274 | * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg) | |
2275 | (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls) | |
2276 | (b4_c_knr_arg_decl): New. | |
2277 | * data/yacc.c: Use it to define yysymprint, yydestruct, and | |
2278 | yyreport_parse_error. | |
2279 | ||
b8df3223 AD |
2280 | 2002-07-25 Akim Demaille <akim@epita.fr> |
2281 | ||
2282 | * data/yacc.c (yyreport_parse_error): New, extracted from... | |
2283 | (yyparse): here. | |
2284 | (yydestruct, yysymprint): Move above yyparse. | |
2285 | Be K&R compliant. | |
2286 | ||
a762e609 AD |
2287 | 2002-07-25 Akim Demaille <akim@epita.fr> |
2288 | ||
2289 | * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New, | |
2290 | replace... | |
2291 | (b4_sint_type, b4_uint_type): these. | |
2292 | * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for. | |
2293 | * tests/regression.at (Web2c Actions): Adjust. | |
2294 | ||
12b0043a AD |
2295 | 2002-07-25 Akim Demaille <akim@epita.fr> |
2296 | ||
2297 | * src/gram.h (TIEM_NUMBER_MAX): New. | |
2298 | (item_number_of_rule_number, rule_number_of_item_number): Rename | |
2299 | as... | |
2300 | (rule_number_as_item_number, item_number_as_rule_number): these. | |
2301 | Adjust dependencies. | |
2302 | * src/output.c (vector_number_t, VECTOR_NUMBER_MAX) | |
2303 | (VECTOR_NUMBER_MIN, state_number_to_vector_number) | |
2304 | (symbol_number_to_vector_number): New. | |
2305 | (order): Of vector_number_t* type. | |
2306 | (base_t, BASE_MAX, BASE_MIN): New. | |
2307 | (froms, tos, width, pos, check): Of base_t type. | |
2308 | (action_number_t, ACTION_MIN, ACTION_MAX): New. | |
2309 | (actrow): Of action_number_t type. | |
2310 | (conflrow): Of unsigned int type. | |
2311 | (table_ninf, base_ninf): New. | |
2312 | (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value. | |
2313 | (muscle_insert_int_table, muscle_insert_base_table) | |
2314 | (muscle_insert_rule_number_table): New. | |
2315 | (prepare_tokens): Output `toknum' as int_table. | |
2316 | (action_row): Returns a rule_number_t. | |
2317 | Use ACTION_MIN, not SHRT_MIN. | |
2318 | (token_actions): yydefact is rule_number_t*. | |
2319 | (table_ninf_remap): New. | |
2320 | (pack_table): Use it for `base' and `table'. | |
2321 | * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove, | |
2322 | replaced with... | |
2323 | (YYPACT_NINF, YYTABLE_NINF): these. | |
2324 | (yypact, yytable): Compute their types instead of hard-coded | |
2325 | `short'. | |
2326 | * tests/regression.at (Web2c Actions): Adjust. | |
2327 | ||
5dde258a AD |
2328 | 2002-07-19 Akim Demaille <akim@epita.fr> |
2329 | ||
2330 | * src/scan-gram.l (id): Can start with an underscore. | |
2331 | ||
a945ec39 AD |
2332 | 2002-07-16 Akim Demaille <akim@epita.fr> |
2333 | ||
2334 | * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New. | |
2335 | Adjust all former `associativity' dependencies. | |
2336 | * src/symtab.c (symbol_new): Default associativity is `undef', not | |
2337 | `right'. | |
2338 | (symbol_check_alias_consistence): Adjust. | |
2339 | ||
fae437e8 AD |
2340 | 2002-07-09 Akim Demaille <akim@epita.fr> |
2341 | ||
2342 | * doc/bison.texinfo: Properly set the ``header'' part. | |
2343 | Use @dircategory ``GNU programming tools'' as per Texinfo's | |
2344 | documentation. | |
2345 | Use @copying. | |
2346 | ||
1a715ef2 AD |
2347 | 2002-07-09 Akim Demaille <akim@epita.fr> |
2348 | ||
2349 | * lib/quotearg.h: Protect against multiple inclusions. | |
2350 | * src/location.h (location_t): Add a `file' member. | |
2351 | (LOCATION_RESET, LOCATION_PRINT): Adjust. | |
2352 | * src/complain.c (warn_at, complain_at, fatal_at): Drop | |
2353 | `error_one_per_line' support. | |
2354 | ||
a5d50994 AD |
2355 | 2002-07-09 Akim Demaille <akim@epita.fr> |
2356 | ||
2357 | * src/complain.h, src/complain.c (warn, complain): Remove, unused. | |
2358 | * src/reader.c (lineno): Remove. | |
2359 | Adjust all dependencies. | |
2360 | (get_merge_function): Take a location and use complain_at. | |
2361 | * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise. | |
2362 | * tests/regression.at (Invalid inputs, Mixing %token styles): | |
2363 | Adjust. | |
2364 | ||
b275314e AD |
2365 | 2002-07-09 Akim Demaille <akim@epita.fr> |
2366 | ||
2367 | * src/parse-gram.y (rules_or_grammar_declaration): Add an error | |
2368 | recovery rule, and forbid extensions when --yacc. | |
2369 | (gram_error): Use complain_at. | |
2370 | * src/reader.c (reader): Exit if there were parse errors. | |
2371 | ||
865b9df1 AD |
2372 | 2002-07-09 Akim Demaille <akim@epita.fr> |
2373 | ||
2374 | * tests/synclines.at (AT_SYNCLINES_COMPILE): New. | |
2375 | (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs. | |
2376 | Reported by R Blake <blakers@mac.com>. | |
2377 | ||
c76e14da AD |
2378 | 2002-07-09 Akim Demaille <akim@epita.fr> |
2379 | ||
2380 | * data/yacc.c: Output the copyright notive in the header. | |
2381 | ||
7db2ed2d AD |
2382 | 2002-07-03 Akim Demaille <akim@epita.fr> |
2383 | ||
2384 | * src/output.c (froms, tos): Are state_number_t. | |
2385 | (save_column): sp, sp1, and sp2 are state_number_t. | |
2386 | (prepare): Rename `final' as `final_state_number', `nnts' as | |
2387 | `nterms_number', `nrules' as `rules_number', `nstates' as | |
2388 | `states_number', and `ntokens' as `tokens_number'. Remove `nsym', | |
2389 | unused. | |
2390 | * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust. | |
2391 | * data/lalr1.cc (nsym_): Remove, unused. | |
2392 | ||
e68e0410 AD |
2393 | 2002-07-03 Akim Demaille <akim@epita.fr> |
2394 | ||
2395 | * src/lalr.h, src/lalr.c (goto_number_t): New. | |
2396 | * src/lalr.c (goto_list_t): New. | |
2397 | Propagate them. | |
2398 | * src/nullable.c (rule_list_t): New. | |
2399 | Propagate. | |
2400 | * src/types.h: Remove. | |
2401 | ||
e1a4f3a4 AD |
2402 | 2002-07-03 Akim Demaille <akim@epita.fr> |
2403 | ||
2404 | * src/closure.c (print_fderives): Use rule_rhs_print. | |
2405 | * src/derives.c (print_derives): Use rule_rhs_print. | |
2406 | (rule_list_t): New, replaces `shorts'. | |
2407 | (set_derives): Add comments. | |
2408 | * tests/sets.at (Nullable, Firsts): Adjust. | |
2409 | ||
536545f3 AD |
2410 | 2002-07-03 Akim Demaille <akim@epita.fr> |
2411 | ||
2412 | * src/output.c (prepare_actions): Free `tally' and `width'. | |
2413 | (prepare_actions): Allocate and free `order'. | |
2414 | * src/symtab.c (symbols_free): Free `symbols'. | |
2415 | * src/scan-gram.l (scanner_free): Clear Flex's scanners memory. | |
2416 | * src/output.c (m4_invoke): Move to... | |
2417 | * src/scan-skel.l: here. | |
2418 | (<<EOF>>): Close yyout, and free its name. | |
2419 | ||
8b752b00 AD |
2420 | 2002-07-03 Akim Demaille <akim@epita.fr> |
2421 | ||
2422 | Fix some memory leaks, and fix a bug: state 0 was examined twice. | |
2423 | ||
2424 | * src/LR0.c (new_state): Merge into... | |
2425 | (state_list_append): this. | |
2426 | (new_states): Merge into... | |
2427 | (generate_states): here. | |
2428 | (set_states): Don't ensure a proper `errs' state member here, do it... | |
2429 | * src/conflicts.c (conflicts_solve): here. | |
2430 | * src/state.h, src/state.c: Comment changes. | |
2431 | (state_t): Rename member `shifts' as `transitions'. | |
2432 | Adjust all dependencies. | |
2433 | (errs_new): For consistency, also take the values as argument. | |
2434 | (errs_dup): Remove. | |
2435 | (state_errs_set): New. | |
2436 | (state_reductions_set, state_transitions_set): Assert that no | |
2437 | previous value was assigned. | |
2438 | (state_free): New. | |
2439 | (states_free): Use it. | |
2440 | * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as | |
2441 | temporary storage: use `errs' and `nerrs' as elsewhere. | |
2442 | (set_conflicts): Allocate and free this `errs'. | |
2443 | ||
613f5e1a AD |
2444 | 2002-07-02 Akim Demaille <akim@epita.fr> |
2445 | ||
2446 | * lib/libiberty.h: New. | |
2447 | * lib: Update the bitset implementation from upstream. | |
2448 | * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c, | |
2449 | * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE. | |
2450 | * src/main.c: Adjust bitset stats calls. | |
2451 | ||
26e0cadc PE |
2452 | 2002-07-01 Paul Eggert <eggert@twinsun.com> |
2453 | ||
2454 | * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned | |
2455 | char, so that negative chars don't collide with $. | |
2456 | ||
1154cced AD |
2457 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2458 | ||
2459 | Have the GLR tests be `warning' checked, and fix the warnings. | |
2460 | ||
2461 | * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG | |
2462 | (yyuserAction, yyreportAmbiguity): `Use' all the arguments. | |
2463 | (yyremoveDeletes): `yyi' and `yyj' are size_t. | |
2464 | Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies. | |
2465 | (yyaddDeferredAction): static. | |
2466 | (yyglrReduce): yyi, yyk, amd yyposn are size_t. | |
2467 | (yyreportParseError): yyprefix is const. | |
2468 | yytokenp is used only when verbose. | |
2469 | (yy__GNUC__): Replace with __GNUC__. | |
2470 | (yypdumpstack): yyi is size_t. | |
2471 | (yypreference): Un-yy local variables and arguments, to avoid | |
2472 | clashes with `yyr1'. Anyway, we are not in the user name space. | |
2473 | (yytname_size): be an int, as is compared with ints. | |
2474 | * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New. | |
2475 | Use them. | |
2476 | * tests/cxx-gram.at: Use quotation to protect $1. | |
2477 | Use AT_COMPILE to enable warnings hunts. | |
2478 | Prototype yylex and yyerror. | |
2479 | `Use' argc. | |
2480 | Include `string.h', not `strings.h'. | |
2481 | Produce and prototype stmtMerge only when used. | |
2482 | yylex takes a location. | |
2483 | ||
97650f4e AD |
2484 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2485 | ||
2486 | We spend a lot of time in quotearg, in particular when --verbose. | |
2487 | ||
2488 | * src/symtab.c (symbol_get): Store a quoted version of the key. | |
2489 | (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove. | |
2490 | Adjust all callers. | |
2491 | ||
d2576365 AD |
2492 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2493 | ||
2494 | * src/state.h (reductions_t): Rename member `nreds' as num. | |
2495 | (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'. | |
2496 | * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types. | |
2497 | ||
ccaf65bc AD |
2498 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2499 | ||
2500 | * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT) | |
2501 | (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED) | |
2502 | (shifts_to): Rename as... | |
2503 | (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION) | |
2504 | (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE) | |
2505 | (TRANSITION_IS_DISABLED, transitions_to): these. | |
2506 | ||
87675353 AD |
2507 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2508 | ||
2509 | * src/print.c (print_shifts, print_gotos): Merge into... | |
2510 | (print_transitions): this. | |
2511 | (print_transitions, print_errs, print_reductions): Align the | |
2512 | lookaheads columns. | |
2513 | (print_core, print_transitions, print_errs, print_state, | |
2514 | print_grammar): Output empty lines separator before, not after. | |
2515 | (state_default_rule_compute): Rename as... | |
2516 | (state_default_rule): this. | |
2517 | * tests/conflicts.at (Defaulted Conflicted Reduction), | |
2518 | (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust. | |
2519 | * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust. | |
2520 | ||
ce4ccb4b AD |
2521 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2522 | ||
2523 | Display items as we display rules. | |
2524 | ||
2525 | * src/gram.h, src/gram.c (rule_lhs_print): New. | |
2526 | * src/gram.c (grammar_rules_partial_print): Use it. | |
2527 | * src/print.c (print_core): Likewise. | |
2528 | * tests/conflicts.at (Defaulted Conflicted Reduction), | |
2529 | (Unresolved SR Conflicts): Adjust. | |
2530 | (Unresolved SR Conflicts): Adjust and rename as... | |
2531 | (Resolved SR Conflicts): this, as was meant. | |
2532 | * tests/regression.at (Web2c Report): Adjust. | |
2533 | ||
bc933ef1 AD |
2534 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2535 | ||
2536 | * src/print.c (state_default_rule_compute): New, extracted from... | |
2537 | (print_reductions): here. | |
2538 | Pessimize, but clarify the code. | |
2539 | * tests/conflicts.at (Defaulted Conflicted Reduction): New. | |
2540 | ||
53d4308d AD |
2541 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2542 | ||
2543 | * src/output.c (action_row): Let default_rule be always a rule | |
2544 | number. | |
2545 | ||
574fb2d5 AD |
2546 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2547 | ||
2548 | * src/closure.c (print_firsts, print_fderives, closure): | |
2549 | Use BITSET_EXECUTE. | |
2550 | * src/lalr.c (lookaheads_print): Likewise. | |
2551 | * src/state.c (state_rule_lookaheads_print): Likewise. | |
2552 | * src/print_graph.c (print_core): Likewise. | |
2553 | * src/print.c (print_reductions): Likewise. | |
2554 | * src/output.c (action_row): Likewise. | |
2555 | Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL. | |
2556 | ||
05811fd7 AD |
2557 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2558 | ||
2559 | * src/print_graph.c: Use report_flag. | |
2560 | ||
0e4d5753 AD |
2561 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2562 | ||
2563 | * src/lalr.c (traverse, digraph, matrix_print, transpose): Move | |
2564 | to... | |
2565 | * src/relation.h, src/relation.c (traverse, relation_digraph) | |
2566 | (relation_print, relation_transpose): New. | |
2567 | ||
24c7d800 AD |
2568 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2569 | ||
2570 | * src/state.h, src/state.c (shifts_to): New. | |
2571 | * src/lalr.c (build_relations): Use it. | |
2572 | ||
9222837b AD |
2573 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2574 | ||
2575 | * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number) | |
2576 | (item_number_of_rule_number, rule_number_of_item_number): New. | |
2577 | * src/LR0.c, src/closure.c, src/derives.c, src/derives.h, | |
2578 | * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c, | |
2579 | * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h: | |
2580 | Propagate their use. | |
2581 | Much remains to be done, in particular wrt `shorts' from types.h. | |
2582 | ||
260008e5 AD |
2583 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2584 | ||
2585 | * src/symtab.c (symbol_new): Initialize the `printer' member. | |
2586 | ||
8a731ca8 AD |
2587 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2588 | ||
2589 | * src/LR0.c (save_reductions): Remove, replaced by... | |
2590 | * src/state.h, src/state.c (state_reductions_set): New. | |
2591 | (reductions, errs): Rename as... | |
2592 | (reductions_t, errs_t): these. | |
2593 | Adjust all dependencies. | |
2594 | ||
32e1e0a4 AD |
2595 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2596 | ||
2597 | * src/LR0.c (state_list_t, state_list_append): New. | |
2598 | (first_state, last_state): Now symbol_list_t. | |
2599 | (this_state): Remove. | |
2600 | (new_itemsets, append_states, save_reductions): Take a state_t as | |
2601 | argument. | |
2602 | (set_states, generate_states): Adjust. | |
2603 | (save_shifts): Remove, replaced by... | |
2604 | * src/state.h, src/state.c (state_shifts_set): New. | |
2605 | (shifts): Rename as... | |
2606 | (shifts_t): this. | |
2607 | Adjust all dependencies. | |
2608 | * src/state.h (state_t): Remove the `next' member. | |
2609 | ||
e5fb6710 AD |
2610 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2611 | ||
2612 | * src/vcg.c (quote): Use slot 2, since we often pass symbol tag | |
2613 | escaped in slot 0. | |
2614 | ||
c7ca99d4 AD |
2615 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2616 | ||
2617 | Use hash.h for the state hash table. | |
2618 | ||
2619 | * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove. | |
2620 | (allocate_storage): Use state_hash_new. | |
2621 | (free_storage): Use state_hash_free. | |
2622 | (new_state, get_state): Adjust. | |
2623 | * src/lalr.h, src/lalr.c (states): Move to... | |
2624 | * src/states.h (state_t): Remove the `link' member, no longer | |
2625 | used. | |
2626 | * src/states.h, src/states.c: here. | |
2627 | (state_hash_new, state_hash_free, state_hash_lookup) | |
2628 | (state_hash_insert, states_free): New. | |
2629 | * src/states.c (state_table, state_compare, state_hash): New. | |
2630 | * src/output.c (output_actions): Do not free states now, since we | |
2631 | still need to know the final_state number in `prepare', called | |
2632 | afterwards. Do it... | |
2633 | * src/main.c (main): here: call states_free after `output'. | |
2634 | ||
df0e7316 AD |
2635 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2636 | ||
2637 | * src/state.h, src/state.c (state_new): New, extracted from... | |
2638 | * src/LR0.c (new_state): here. | |
2639 | * src/state.h (STATE_ALLOC): Move to... | |
2640 | * src/state.c: here. | |
2641 | * src/LR0.h, src/LR0.c (nstates, final_state): Move to... | |
2642 | * src/state.h, src/state.c: here. | |
2643 | ||
39f41916 AD |
2644 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2645 | ||
2646 | * src/reader.c (gensym): Rename as... | |
2647 | * src/symtab.h, src/symtab.c (dummy_symbol_get): this. | |
2648 | (getsym): Rename as... | |
2649 | (symbol_get): this. | |
2650 | ||
d57650a5 AD |
2651 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2652 | ||
2653 | * src/state.h (state_number_t, STATE_NUMBER_MAX): New. | |
2654 | * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h, | |
2655 | * src/output.c, src/print.c, src/print_graph.c: Propagate. | |
2656 | * src/LR0.h, src/LR0.h (final_state): Is a state_t*. | |
2657 | ||
5a08f1ce AD |
2658 | 2002-06-30 Akim Demaille <akim@epita.fr> |
2659 | ||
2660 | Make the test suite pass with warnings checked. | |
2661 | ||
2662 | * tests/actions.at (Printers and Destructors): Improve. | |
2663 | Avoid unsigned vs. signed issues. | |
2664 | * tests/calc.at: Don't exercise the scanner here, do it... | |
2665 | * tests/input.at (Torturing the Scanner): here. | |
2666 | ||
720623af PH |
2667 | 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
2668 | ||
88e7e941 | 2669 | * data/glr.c: Correct typo in Emacs-mode directive. Slightly |
720623af PH |
2670 | reorganize first lines parallel to yacc.c. |
2671 | ||
fb8135fa AD |
2672 | 2002-06-28 Akim Demaille <akim@epita.fr> |
2673 | ||
2674 | * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define) | |
2675 | (b4_token_enum, b4_token_defines): New, factored from... | |
2676 | * data/lalr1.cc, data/yacc.c, glr.c: here. | |
2677 | ||
41442480 AD |
2678 | 2002-06-28 Akim Demaille <akim@epita.fr> |
2679 | ||
2680 | * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for | |
2681 | unused variables. | |
2682 | * src/output.c (merger_output): static. | |
2683 | ||
e0e5bf84 AD |
2684 | 2002-06-28 Akim Demaille <akim@epita.fr> |
2685 | ||
2686 | * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../. | |
2687 | * src/conflicts.c (conflicts_total_count): `i' is unsigned, to | |
2688 | pacify GCC. | |
2689 | * src/output.c (save_row): Initialize all the variables to pacify GCC. | |
e0e5bf84 | 2690 | |
676385e2 PH |
2691 | 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
2692 | ||
2693 | Accumulated changelog for new GLR parsing features. | |
2694 | ||
6a254321 | 2695 | * src/conflicts.c (count_total_conflicts): Change name to |
676385e2 PH |
2696 | conflicts_total_count. |
2697 | * src/conflicts.h: Ditto. | |
2698 | * src/output.c (token_actions): Use the new name. | |
2699 | (output_conflicts): Change conflp => conflict_list_heads, and | |
2700 | confl => conflict_list for better readability. | |
2701 | * data/glr.c: Use the new names. | |
2702 | * NEWS: Add self to GLR announcement. | |
e0e5bf84 | 2703 | |
676385e2 PH |
2704 | * src/reader.c (free_merger_functions): Cleanup: XFREE->free. |
2705 | ||
2706 | * doc/bison.texinfo (GLR Parsers): Make corrections suggested by | |
2707 | Akim Demaille. | |
2708 | ||
2709 | * data/bison.glr: Change name to glr.c | |
2710 | * data/glr.c: Renamed from bison.glr. | |
2711 | * data/Makefile.am: Add glr.c | |
e0e5bf84 AD |
2712 | |
2713 | * src/getargs.c: | |
2714 | ||
676385e2 PH |
2715 | * src/symlist.h: Add dprec and merger fields to symbol_list_s. |
2716 | * src/symlist.c (symbol_list_new): Initialize dprec and merger fields. | |
e0e5bf84 | 2717 | |
676385e2 PH |
2718 | Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
2719 | ||
2720 | * data/bison.glr: Be sure to restore the | |
2721 | current #line when returning to the skeleton contents after having | |
2722 | exposed the input file's #line. | |
2723 | ||
2724 | Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
2725 | ||
2726 | * data/bison.glr: Bring up to date with changes to bison.simple. | |
2727 | ||
2728 | Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
2729 | ||
2730 | * data/bison.glr: Correct definitions that use b4_prefix. | |
2731 | Various reformatting. | |
2732 | (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack. | |
2733 | (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove | |
2734 | yytokenp argument; now part of stack. | |
2735 | (yychar): Define to behave as documented. | |
2736 | (yyclearin): Ditto. | |
e0e5bf84 | 2737 | |
676385e2 PH |
2738 | Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
2739 | ||
2740 | * src/reader.h: Add declaration for free_merger_functions. | |
2741 | ||
2742 | * src/reader.c (merge_functions): New variable. | |
2743 | (get_merge_function): New function. | |
2744 | (free_merger_functions): New function. | |
2745 | (readgram): Check for %prec that is not followed by a symbol. | |
2746 | Handle %dprec and %merge declarations. | |
2747 | (packgram): Initialize dprec and merger fields in rules array. | |
2748 | ||
2749 | * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list, | |
2750 | conflict_list_cnt, conflict_list_free): New variables. | |
2751 | (table_grow): Also grow conflict_table. | |
e0e5bf84 | 2752 | (prepare_rules): Output dprec and merger tables. |
676385e2 | 2753 | (conflict_row): New function. |
e0e5bf84 | 2754 | (action_row): Output conflict lists for GLR parser. Don't use |
676385e2 PH |
2755 | default reduction in conflicted states for GLR parser so that there |
2756 | are spaces for the conflict lists. | |
2757 | (save_row): Also save conflict information. | |
2758 | (token_actions): Allocate conflict list. | |
2759 | (merger_output): New function. | |
2760 | (pack_vector): Pack conflict table, too. | |
2761 | (output_conflicts): New function to output yyconflp and yyconfl. | |
2762 | (output_check): Allocate conflict_tos. | |
2763 | (output_actions): Output conflict tables, also. | |
2764 | (output_skeleton): Output b4_mergers definition. | |
2765 | (prepare): Output b4_max_rhs_length definition. | |
2766 | Use 'bison.glr' as default skeleton for GLR parsers. | |
2767 | ||
2768 | * src/gram.c (glr_parser): New flag. | |
2769 | (grammar_free): Call free_merger_functions. | |
2770 | ||
2771 | * src/conflicts.c (count_rr_conflicts): Augment to optionally count | |
2772 | all pairs of conflicting reductions, rather than just all tokens | |
2773 | causing conflicts. Needed to size conflict tables. | |
e0e5bf84 | 2774 | (conflicts_output): Modify call to count_rr_conflicts for new |
676385e2 PH |
2775 | interface. |
2776 | (conflicts_print): Ditto. | |
2777 | (count_total_conflicts): New function. | |
2778 | ||
2779 | * src/reader.h (merger_list): New type. | |
2780 | (merge_functions): New variable. | |
2781 | ||
2782 | * src/lex.h (tok_dprec, tok_merge): New token types. | |
2783 | ||
2784 | * src/gram.h (rule_s): Add dprec and merger fields. | |
2785 | (glr_parser): New flag. | |
2786 | ||
2787 | * src/conflicts.h (count_total_conflicts): New function. | |
2788 | ||
2789 | * src/options.c (option_table): Add %dprec, %merge, and %glr-parser. | |
2790 | ||
2791 | * doc/bison.texinfo (Generalized LR Parsing): New section. | |
2792 | (GLR Parsers): New section. | |
2793 | (Language and Grammar): Mention GLR parsing. | |
2794 | (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR | |
2795 | Correct typo ("tge" -> "the"). | |
2796 | ||
2797 | * data/bison.glr: New skeleton for GLR parsing. | |
2798 | ||
2799 | * tests/cxx-gram.at: New tests for GLR parsing. | |
2800 | ||
2801 | * tests/testsuite.at: Include cxx-gram.at. | |
2802 | ||
2803 | * tests/Makefile.am: Add cxx-gram.at. | |
e0e5bf84 | 2804 | |
676385e2 PH |
2805 | * src/parse-gram.y: |
2806 | ||
2807 | * src/scan-gram.l: Add %dprec, %glr-parser, %merge. | |
2808 | ||
2809 | * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser. | |
e0e5bf84 | 2810 | |
b5480d74 | 2811 | 2002-06-27 Akim Demaille <akim@epita.fr> |
e2aaf4c4 AD |
2812 | |
2813 | * src/options.h, src/options.c: Remove. | |
2814 | * src/getargs.c (short_options, long_options): New. | |
2815 | ||
60491a94 AD |
2816 | 2002-06-27 Akim Demaille <akim@epita.fr> |
2817 | ||
2818 | * data/bison.simple, data/bison.c++: Rename as... | |
2819 | * data/yacc.c, data/lalr1.cc: these. | |
2820 | * doc/bison.texinfo (Environment Variables): Remove. | |
2821 | ||
9be0c25b AD |
2822 | 2002-06-25 Raja R Harinath <harinath@cs.umn.edu> |
2823 | ||
2824 | * src/getargs.c (report_argmatch): Initialize strtok(). | |
2825 | ||
1ae72863 AD |
2826 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2827 | ||
2828 | * data/bison.simple (b4_symbol_actions): New, replaces... | |
2829 | (b4_symbol_destructor, b4_symbol_printer): these. | |
2830 | (yysymprint): Be sure to call YYPRINT only for tokens, and using | |
2831 | user token numbers. | |
2832 | ||
87542d29 AD |
2833 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2834 | ||
2835 | * data/bison.simple (yydestructor): Rename as... | |
2836 | (yydestruct): this. | |
2837 | ||
1a31ed21 AD |
2838 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2839 | ||
2840 | * src/symtab.h, src/symtab.c (symbol_type_set) | |
2841 | (symbol_destructor_set, symbol_precedence_set): The location is | |
2842 | the last argument. | |
2843 | Adjust all callers. | |
2844 | ||
e776192e AD |
2845 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2846 | ||
2847 | * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser | |
2848 | internals. | |
2849 | * src/reader.h, src/reader.c (grammar_current_rule_prec_set): | |
2850 | Takes a location. | |
2851 | * src/symtab.h, src/symtab.c (symbol_class_set) | |
2852 | (symbol_user_token_number_set): Likewise. | |
2853 | Adjust all callers. | |
2854 | Promote complain_at. | |
2855 | * tests/input.at (Type Clashes): Adjust. | |
2856 | ||
5c1180b3 AD |
2857 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2858 | ||
2859 | * data/bison.simple (YYLEX): Fix the declaration when | |
2860 | %pure-parser. | |
2861 | ||
e3170060 AD |
2862 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2863 | ||
2864 | * data/bison.simple (yysymprint): Don't print the token number, | |
2865 | just its name. | |
2866 | * tests/actions.at (Destructors): Rename as... | |
2867 | (Printers and Destructors): this. | |
2868 | Also exercise %printer. | |
2869 | ||
253862fd AD |
2870 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2871 | ||
2872 | * data/bison.simple (YYDSYMPRINT): New. | |
2873 | Use it to remove many of the #if YYDEBUG/if (yydebug). | |
2874 | ||
366eea36 AD |
2875 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2876 | ||
2877 | * src/symtab.h, src/symtab.c (symbol_t): printer and | |
2878 | printer_location are new members. | |
2879 | (symbol_printer_set): New. | |
2880 | * src/parse-gram.y (PERCENT_PRINTER): New token. | |
2881 | Handle its associated rule. | |
2882 | * src/scan-gram.l: Adjust. | |
2883 | (handle_destructor_at, handle_destructor_dollar): Rename as... | |
2884 | (handle_symbol_code_at, handle_symbol_code_dollar): these. | |
2885 | * src/output.c (symbol_printers_output): New. | |
2886 | (output_skeleton): Call it. | |
2887 | * data/bison.simple (yysymprint): New. Cannot be named yyprint | |
2888 | since there are already many grammar files with a user `yyprint'. | |
2889 | Replace the calls to YYPRINT to calls to yysymprint. | |
2890 | * tests/calc.at: Adjust. | |
2891 | * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was | |
2892 | taking advantage of parser very internal details (stack size!). | |
2893 | ||
4f25ebb0 AD |
2894 | 2002-06-20 Akim Demaille <akim@epita.fr> |
2895 | ||
2896 | * src/scan-gram.l: Complete the scanner with the missing patterns | |
2897 | to pacify Flex. | |
2898 | Use `quote' and `symbol_tag_get' where appropriate. | |
2899 | ||
93b68a0e AD |
2900 | 2002-06-19 Akim Demaille <akim@epita.fr> |
2901 | ||
2902 | * tests/actions.at (Destructors): Augment to test locations. | |
2903 | * data/bison.simple (yydestructor): Pass it the current location | |
2904 | if locations are enabled. | |
2905 | Prototype only when __STDC__ or C++. | |
2906 | Change the argument names to move into the yy name space: there is | |
2907 | user code here. | |
2908 | ||
58612f1d AD |
2909 | 2002-06-19 Akim Demaille <akim@epita.fr> |
2910 | ||
74310291 AD |
2911 | * data/bison.simple (b4_pure_if): New. |
2912 | Use it instead of #ifdef YYPURE. | |
2913 | ||
2914 | 2002-06-19 Akim Demaille <akim@epita.fr> | |
2915 | ||
2916 | * data/bison.simple (b4_location_if): New. | |
58612f1d AD |
2917 | Use it instead of #ifdef YYLSP_NEEDED. |
2918 | ||
f25bfb75 AD |
2919 | 2002-06-19 Akim Demaille <akim@epita.fr> |
2920 | ||
2921 | Prepare @$ in %destructor, but currently don't bind it in the | |
2922 | skeleton, as %location use is not cleaned up yet. | |
2923 | ||
2924 | * src/scan-gram.l (handle_dollar, handle_destructor_at) | |
2925 | (handle_action_at): New. | |
2926 | (handle_at, handle_action_dollar, handle_destructor_dollar): Take | |
2927 | a braced_code_t and a location as additional arguments. | |
2928 | (handle_destructor_dollar): Instead of requiring `b4_eval', just | |
2929 | unquote one when outputting `b4_dollar_dollar'. | |
2930 | Adjust callers. | |
2931 | * data/bison.simple (b4_eval): Remove. | |
2932 | (b4_symbol_destructor): Adjust. | |
2933 | * tests/input.at (Invalid @n): Adjust. | |
2934 | ||
c732d2c6 AD |
2935 | 2002-06-19 Zack Weinberg <zack@codesourcery.com> |
2936 | ||
2937 | * doc/bison.texinfo: Document ability to have multiple | |
2938 | prologue sections. | |
2939 | ||
8c165d89 AD |
2940 | 2002-06-18 Akim Demaille <akim@epita.fr> |
2941 | ||
2942 | * src/files.c (compute_base_names): When computing the output file | |
2943 | names from the input file name, strip the directory part. | |
2944 | ||
ca98bf57 AD |
2945 | 2002-06-18 Akim Demaille <akim@epita.fr> |
2946 | ||
2947 | * data/bison.simple.new: Comment changes. | |
2948 | Reported by Andreas Schwab. | |
2949 | ||
0bfb02ff AD |
2950 | 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu> |
2951 | ||
2952 | * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that | |
2953 | there are no `label `yyoverflowlab' defined but not used' warnings | |
2954 | when yyoverflow is defined. | |
2955 | ||
24c0aad7 AD |
2956 | 2002-06-18 Akim Demaille <akim@epita.fr> |
2957 | ||
2958 | * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a | |
2959 | new member. | |
2960 | (symbol_destructor_set): Adjust. | |
2961 | * src/output.c (symbol_destructors_output): Output the destructor | |
2962 | locations. | |
2963 | Output the symbol name. | |
2964 | * data/bison.simple (b4_symbol_destructor): Adjust. | |
2965 | ||
5719c109 AD |
2966 | 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com> |
2967 | and Akim Demaille <akim@epita.fr> | |
2968 | ||
2969 | * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy | |
2970 | what's left on the stack when the error recovery hits EOF. | |
2971 | * tests/actions.at (Destructors): Complete to exercise this case. | |
2972 | ||
9280d3ef AD |
2973 | 2002-06-17 Akim Demaille <akim@epita.fr> |
2974 | ||
2975 | * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of | |
2976 | arguments is really empty, not only equal to `[]'. | |
2977 | * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new | |
2978 | member. | |
2979 | (symbol_destructor_set): New. | |
2980 | * src/output.c (symbol_destructors_output): New. | |
2981 | * src/reader.h (brace_code_t, current_braced_code): New. | |
2982 | * src/scan-gram.l (BRACED_CODE): Use it to branch on... | |
2983 | (handle_dollar): Rename as... | |
2984 | (handle_action_dollar): this. | |
2985 | (handle_destructor_dollar): New. | |
2986 | * src/parse-gram.y (PERCENT_DESTRUCTOR): New. | |
2987 | (grammar_declaration): Use it. | |
2988 | * data/bison.simple (yystos): Is always defined. | |
2989 | (yydestructor): New. | |
2990 | * tests/actions.at (Destructors): New. | |
2991 | * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep. | |
2992 | ||
dafdc66f AD |
2993 | 2002-06-17 Akim Demaille <akim@epita.fr> |
2994 | ||
2995 | * src/symlist.h, src/symlist.c (symbol_list_length): New. | |
2996 | * src/scan-gram.l (handle_dollar, handle_at): Compute the | |
2997 | rule_length only when needed. | |
2998 | * src/output.c (actions_output, token_definitions_output): Output | |
2999 | the full M4 block. | |
3000 | * src/symtab.c: Don't access directly to the symbol tag, use | |
3001 | symbol_tag_get. | |
3002 | * src/parse-gram.y: Use symbol_list_free. | |
3003 | ||
56c47203 AD |
3004 | 2002-06-17 Akim Demaille <akim@epita.fr> |
3005 | ||
3006 | * src/reader.h, src/reader.c (symbol_list, symbol_list_new) | |
3007 | (symbol_list_prepend, get_type_name): Move to... | |
3008 | * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new) | |
3009 | (symbol_list_prepend, symbol_list_n_type_name_get): here. | |
3010 | Adjust all callers. | |
3011 | (symbol_list_free): New. | |
3012 | * src/scan-gram.l (handle_dollar): Takes a location. | |
3013 | * tests/input.at (Invalid $n): Adjust. | |
3014 | ||
1e0bab92 AD |
3015 | 2002-06-17 Akim Demaille <akim@epita.fr> |
3016 | ||
3017 | * src/reader.h, src/reader.c (symbol_list_new): Export it. | |
3018 | (symbol_list_prepend): New. | |
3019 | * src/parse-gram.y (%union): `list' is a new member. | |
3020 | (symbols.1): New, replaces... | |
3021 | (terms_to_prec.1, nterms_to_type.1): these. | |
3022 | * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set) | |
3023 | Take a location as additional argument. | |
3024 | Adjust all callers. | |
3025 | ||
04e60654 AD |
3026 | 2002-06-15 Akim Demaille <akim@epita.fr> |
3027 | ||
3028 | * src/parse-gram.y: Move %token in the declaration section so that | |
3029 | we don't depend upon CVS Bison. | |
3030 | ||
10e5b8bd AD |
3031 | 2002-06-15 Akim Demaille <akim@epita.fr> |
3032 | ||
3033 | * src/state.h, src/state.c (state_rule_lookaheads_print): New. | |
3034 | * src/print.c (print_core): Use it. | |
3035 | ||
9801d40c AD |
3036 | 2002-06-15 Akim Demaille <akim@epita.fr> |
3037 | ||
3038 | * src/conflicts.c (log_resolution): Accept the rule involved in | |
3039 | the sr conflicts instead of the lookahead number that points to | |
3040 | that rule. | |
3041 | (flush_reduce): Accept the current lookahead vector as argument, | |
3042 | instead of the index in LA. | |
3043 | (resolve_sr_conflict): Accept the current number of lookahead | |
3044 | bitset to consider for the STATE, instead of the index in LA. | |
3045 | (set_conflicts): Adjust. | |
3046 | * src/lalr.c, src/lalr.h, src/state.h: Comment changes. | |
3047 | ||
c0263492 AD |
3048 | 2002-06-15 Akim Demaille <akim@epita.fr> |
3049 | ||
3050 | * src/state.h (state_t): Replace the `lookaheadsp' member, a | |
3051 | short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**). | |
3052 | Adjust all dependencies. | |
3053 | * src/lalr.c (initialize_lookaheads): Split into... | |
3054 | (states_lookaheads_count, states_lookaheads_initialize): these. | |
3055 | (lalr): Adjust. | |
3056 | ||
9757c359 AD |
3057 | 2002-06-15 Akim Demaille <akim@epita.fr> |
3058 | ||
3059 | * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved | |
3060 | out of... | |
3061 | (grammar_rules_print): here. | |
3062 | * src/reduce.c (reduce_output): Use it. | |
3063 | * tests/reduce.at (Useless Rules, Reduced Automaton) | |
3064 | (Underivable Rules): Adjust. | |
3065 | ||
6b98e4b5 AD |
3066 | 2002-06-15 Akim Demaille <akim@epita.fr> |
3067 | ||
3068 | Copy BYacc's nice way to report the grammar. | |
3069 | ||
3070 | * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print): | |
3071 | New. | |
3072 | Don't print the rules' location, it is confusing and useless. | |
3073 | (rule_print): Use grammar_rhs_print. | |
3074 | * src/print.c (print_grammar): Use grammar_rules_print. | |
3075 | ||
6b98e4b5 AD |
3076 | 2002-06-15 Akim Demaille <akim@epita.fr> |
3077 | ||
3078 | Complete and rationalize `useless thing' warnings. | |
3079 | ||
3080 | * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n) | |
3081 | (symbol_tag_print): New. | |
3082 | Use them everywhere in place of accessing directly the tag member. | |
3083 | * src/gram.h, src/gram.c (rule_print): New. | |
3084 | Use it where a rule used to be printed `by hand'. | |
3085 | * src/reduce.c (nonterminals_reduce): Report the use nonterminals. | |
3086 | (reduce_grammar_tables): Report the useless rules. | |
3087 | (reduce_print): Useless things are a warning, not an error. | |
3088 | Report it as such. | |
3089 | * tests/reduce.at (Useless Nonterminals, Useless Rules): | |
3090 | (Reduced Automaton, Underivable Rules): Adjust. | |
3091 | * tests/regression.at (Web2c Report, Web2c Report): Adjust. | |
3092 | * tests/conflicts.at (Unresolved SR Conflicts) | |
3093 | (Solved SR Conflicts): Adjust. | |
3094 | ||
ee000ba4 AD |
3095 | 2002-06-15 Akim Demaille <akim@epita.fr> |
3096 | ||
3097 | Let symbols have a location. | |
3098 | ||
3099 | * src/symtab.h, src/symtab.c (symbol_t): Location is a new member. | |
3100 | (getsym): Adjust. | |
3101 | Adjust all callers. | |
3102 | * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at): | |
3103 | Use location_t, not int. | |
3104 | * src/symtab.c (symbol_check_defined): Take advantage of the | |
3105 | location. | |
3106 | * tests/regression.at (Invalid inputs): Adjust. | |
3107 | ||
8efe435c AD |
3108 | 2002-06-15 Akim Demaille <akim@epita.fr> |
3109 | ||
3110 | * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New. | |
3111 | (input): Don't try to initialize yylloc here, do it in the | |
3112 | scanner. | |
3113 | * src/scan-gram.l (YY_USER_INIT): Initialize yylloc. | |
3114 | * src/gram.h (rule_t): Change line and action_line into location | |
3115 | and action_location, of location_t type. | |
3116 | Adjust all dependencies. | |
3117 | * src/location.h, src/location.c (empty_location): New. | |
3118 | * src/reader.h, src/reader.c (grammar_start_symbol_set) | |
3119 | (grammar_symbol_append, grammar_rule_begin, grammar_rule_end) | |
3120 | (grammar_current_rule_symbol_append) | |
3121 | (grammar_current_rule_action_append): Expect a location as argument. | |
3122 | * src/reader.c (grammar_midrule_action): Adjust to attach an | |
3123 | action's location as dummy symbol location. | |
3124 | * src/symtab.h, src/symtab.c (startsymbol_location): New. | |
3125 | * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust | |
3126 | the line numbers. | |
3127 | ||
1921f1d7 AD |
3128 | 2002-06-14 Akim Demaille <akim@epita.fr> |
3129 | ||
3130 | Grammar declarations may be found in the grammar section. | |
3131 | ||
3132 | * src/parse-gram.y (rules_or_grammar_declaration): New. | |
3133 | (declarations): Each declaration may end with a semicolon, not | |
3134 | just... | |
3135 | (grammar_declaration): `"%union"'. | |
3136 | (grammar): Branch to rules_or_grammar_declaration. | |
3137 | ||
4515534c AD |
3138 | 2002-06-14 Akim Demaille <akim@epita.fr> |
3139 | ||
3140 | * src/main.c (main): Invoke scanner_free. | |
3141 | ||
f958596b AD |
3142 | 2002-06-14 Akim Demaille <akim@epita.fr> |
3143 | ||
3144 | * src/output.c (m4_invoke): Extracted from... | |
3145 | (output_skeleton): here. | |
3146 | Free tempfile. | |
3147 | ||
2c569025 AD |
3148 | 2002-06-14 Akim Demaille <akim@epita.fr> |
3149 | ||
3150 | * src/parse-gram.y (directives, directive, gram) | |
3151 | (grammar_directives, precedence_directives, precedence_directive): | |
3152 | Rename as... | |
3153 | (declarations, declaration, grammar, grammar_declaration) | |
3154 | (precedence_declaration, precedence_declarator): these. | |
3155 | (symbol_declaration): New. | |
3156 | ||
592e8d4d AD |
3157 | 2002-06-14 Akim Demaille <akim@epita.fr> |
3158 | ||
3159 | * src/files.c (action_obstack): Remove, unused. | |
3160 | (output_obstack): Remove it, and all its dependencies, as it is no | |
3161 | longer needed. | |
3162 | * src/reader.c (epilogue_set): Build the epilogue in the | |
3163 | muscle_obstack. | |
3164 | * src/output.h, src/output.c (muscle_obstack): Move to... | |
3165 | * src/muscle_tab.h, src/muscle_tab.h: here. | |
3166 | (muscle_init): Initialize muscle_obstack. | |
3167 | (muscle_free): New. | |
3168 | * src/main.c (main): Call it. | |
3169 | ||
0c15323d AD |
3170 | 2002-06-14 Akim Demaille <akim@epita.fr> |
3171 | ||
3172 | * src/location.h: New, extracted from... | |
3173 | * src/reader.h: here. | |
3174 | * src/Makefile.am (noinst_HEADERS): Merge into | |
3175 | (bison_SOURCES): this. | |
3176 | Add location.h. | |
3177 | * src/parse-gram.y: Use location_t instead of Bison's. | |
3178 | * src/reader.h, src/reader.c (prologue_augment, epilogue_set): | |
3179 | Use location_t instead of ints. | |
3180 | ||
e96c9728 AD |
3181 | 2002-06-14 Akim Demaille <akim@epita.fr> |
3182 | ||
3183 | * data/bison.simple, data/bison.c++: Be sure to restore the | |
3184 | current #line when returning to the skeleton contents after having | |
3185 | exposed the input file's #line. | |
3186 | ||
75d1fe16 AD |
3187 | 2002-06-12 Akim Demaille <akim@epita.fr> |
3188 | ||
3189 | * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too | |
3190 | eager. | |
3191 | * tests/actions.at (Exotic Dollars): New. | |
3192 | ||
6c35d22c AD |
3193 | 2002-06-12 Akim Demaille <akim@epita.fr> |
3194 | ||
3195 | * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst | |
3196 | ['"/] too eagerly. | |
3197 | * tests/input.at (Torturing the Scanner): New. | |
3198 | ||
1d6412ad AD |
3199 | 2002-06-11 Akim Demaille <akim@epita.fr> |
3200 | ||
3201 | * src/scan-gram.l (YY_OBS_INIT): Remove, replace with... | |
3202 | [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE] | |
3203 | [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment. | |
3204 | * src/reader.h, src/scan-gram.l (scanner_initialize): this. | |
3205 | * src/reader.c (reader): Use it. | |
3206 | ||
4cdb01db AD |
3207 | 2002-06-11 Akim Demaille <akim@epita.fr> |
3208 | ||
3209 | * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval. | |
3210 | Adjust all callers. | |
3211 | (scanner_last_string_free): New. | |
3212 | ||
44995b2e AD |
3213 | 2002-06-11 Akim Demaille <akim@epita.fr> |
3214 | ||
3215 | * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as... | |
3216 | (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these. | |
3217 | (last_string, YY_OBS_FREE): New. | |
3218 | Use them when returning an ID. | |
3219 | ||
e9955c83 AD |
3220 | 2002-06-11 Akim Demaille <akim@epita.fr> |
3221 | ||
3222 | Have Bison grammars parsed by a Bison grammar. | |
3223 | ||
3224 | * src/reader.c, src/reader.h (prologue_augment): New. | |
3225 | * src/reader.c (copy_definition): Remove. | |
3226 | ||
3227 | * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment) | |
3228 | (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action) | |
3229 | (grammar_current_rule_prec_set, grammar_current_rule_check) | |
3230 | (grammar_current_rule_symbol_append) | |
3231 | (grammar_current_rule_action_append): Export. | |
3232 | * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_ | |
3233 | (symbol_list_action_append): Remove. | |
3234 | Hook the routines from reader. | |
3235 | * src/scan-gram.l: In INITIAL, characters and strings are tokens. | |
3236 | * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now. | |
3237 | ||
3238 | * src/reader.c (read_declarations): Remove, unused. | |
3239 | ||
3240 | * src/parse-gram.y: Handle the epilogue. | |
3241 | * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as... | |
3242 | (grammar_start_symbol_set): this. | |
3243 | * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet. | |
3244 | * src/reader.c (readgram): Remove, unused. | |
3245 | (reader): Adjust to insert eoftoken and axiom where appropriate. | |
3246 | ||
3247 | * src/reader.c (copy_dollar): Replace with... | |
3248 | * src/scan-gram.h (handle_dollar): this. | |
3249 | * src/parse-gram.y: Remove `%thong'. | |
3250 | ||
3251 | * src/reader.c (copy_at): Replace with... | |
3252 | * src/scan-gram.h (handle_at): this. | |
3253 | ||
3254 | * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at): | |
3255 | New. | |
3256 | ||
3257 | * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the | |
3258 | time being. | |
3259 | ||
3260 | * src/reader.h, src/reader.c (grammar_rule_end): New. | |
3261 | ||
3262 | * src/parse.y (current_type, current_class): New. | |
3263 | Implement `%nterm', `%token' support. | |
3264 | Merge `%term' into `%token'. | |
3265 | (string_as_id): New. | |
3266 | * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the | |
3267 | type name. | |
3268 | ||
3269 | * src/parse-gram.y: Be sure to handle properly the beginning of | |
3270 | rules. | |
3271 | ||
3272 | * src/parse-gram.y: Handle %type. | |
3273 | * src/reader.c (grammar_rule_end): Call grammar_current_rule_check. | |
3274 | ||
3275 | * src/parse-gram.y: More directives support. | |
3276 | * src/options.c: No longer handle source directives. | |
3277 | ||
3278 | * src/parse-gram.y: Fix %output. | |
3279 | ||
3280 | * src/parse-gram.y: Handle %union. | |
3281 | Use the prologue locations. | |
3282 | * src/reader.c (parse_union_decl): Remove. | |
3283 | ||
3284 | * src/reader.h, src/reader.c (epilogue_set): New. | |
3285 | * src/parse-gram.y: Use it. | |
3286 | ||
3287 | * data/bison.simple, data/bison.c++: b4_stype is now either not | |
3288 | defined, then default to int, or to the contents of %union, | |
3289 | without `union' itself. | |
3290 | Adjust. | |
3291 | * src/muscle_tab.c (muscle_init): Don't predefine `stype'. | |
3292 | ||
3293 | * src/output.c (actions_output): Don't output braces, as they are | |
3294 | already handled by the scanner. | |
3295 | ||
3296 | * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of | |
3297 | characters to themselves. | |
3298 | ||
3299 | * tests/reduce.at (Reduced Automaton): End the grammars with %% so | |
3300 | that the epilogue has a proper #line. | |
3301 | ||
3302 | * src/parse-gram.y: Handle precedence/associativity. | |
3303 | ||
3304 | * src/symtab.c (symbol_precedence_set): Requires the symbol to be | |
3305 | a terminal. | |
3306 | * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters. | |
3307 | * tests/calc.at: Do not use `%token "foo"' as it makes not sense | |
3308 | at all to define terminals that cannot be emitted. | |
3309 | ||
3310 | * src/scan-gram.l: Escape M4 characters. | |
3311 | ||
3312 | * src/scan-gram.l: Working properly with escapes in user | |
3313 | strings/characters. | |
3314 | ||
3315 | * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR) | |
3316 | (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING' | |
3317 | grammar. | |
3318 | Use more modest sizes, as for the time being the parser does not | |
3319 | release memory, and therefore the process swallows a huge amount | |
3320 | of memory. | |
3321 | ||
3322 | * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the | |
3323 | stricter %token grammar. | |
3324 | ||
3325 | * src/symtab.h (associativity): Add `undef_assoc'. | |
3326 | (symbol_precedence_set): Do nothing when passed an undef_assoc. | |
3327 | * src/symtab.c (symbol_check_alias_consistence): Adjust. | |
3328 | ||
3329 | * tests/regression.at (Invalid %directive): Remove, as it is now | |
3330 | meaningless. | |
3331 | (Invalid inputs): Adjust to the new error messages. | |
3332 | (Token definitions): The new grammar doesn't allow too many | |
3333 | eccentricities. | |
3334 | ||
3335 | * src/lex.h, src/lex.c: Remove. | |
3336 | * src/reader.c (lastprec, skip_to_char, read_signed_integer) | |
3337 | (copy_character, copy_string2, copy_string, copy_identifier) | |
3338 | (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl) | |
3339 | (parse_muscle_decl, parse_dquoted_param, parse_skel_decl) | |
3340 | (parse_action): Remove. | |
3341 | * po/POTFILES.in: Adjust. | |
3342 | ||
2e047461 AD |
3343 | 2002-06-11 Akim Demaille <akim@epita.fr> |
3344 | ||
3345 | * src/reader.c (parse_action): Don't store directly into the | |
3346 | rule's action member: return the action as a string. | |
3347 | Don't require `rule_length' as an argument: compute it. | |
3348 | (grammar_current_rule_symbol_append) | |
3349 | (grammar_current_rule_action_append): New, eved out from | |
3350 | (readgram): here. | |
3351 | Remove `action_flag', `rulelength', unused now. | |
3352 | ||
9af3fbce AD |
3353 | 2002-06-11 Akim Demaille <akim@epita.fr> |
3354 | ||
3355 | * src/reader.c (grammar_current_rule_prec_set). | |
3356 | (grammar_current_rule_check): New, eved out from... | |
3357 | (readgram): here. | |
3358 | Remove `xaction', `first_rhs': useless. | |
3359 | * tests/input.at (Type clashes): New. | |
3360 | * tests/existing.at (GNU Cim Grammar): Adjust. | |
3361 | ||
1485e106 AD |
3362 | 2002-06-11 Akim Demaille <akim@epita.fr> |
3363 | ||
3364 | * src/reader.c (grammar_midrule_action): New, Eved out from | |
3365 | (readgram): here. | |
3366 | ||
da4160c3 AD |
3367 | 2002-06-11 Akim Demaille <akim@epita.fr> |
3368 | ||
3369 | * src/reader.c (grammar_rule_begin, previous_rule, current_rule): | |
3370 | New. | |
3371 | (readgram): Use them as replacement of inlined code, crule and | |
3372 | crule1. | |
3373 | ||
f6d0f937 AD |
3374 | 2002-06-11 Akim Demaille <akim@epita.fr> |
3375 | ||
3376 | * src/reader.c (grammar_end, grammar_symbol_append): New. | |
3377 | (readgram): Use them. | |
3378 | Make the use of `p' as local as possible. | |
3379 | ||
69078d4b AD |
3380 | 2002-06-10 Akim Demaille <akim@epita.fr> |
3381 | ||
3382 | GCJ's parser requires the tokens to be defined before the prologue. | |
3383 | ||
3384 | * data/bison.simple: Output the token definition before the user's | |
3385 | prologue. | |
3386 | * tests/regression.at (Braces parsing, Duplicate string) | |
3387 | (Mixing %token styles): Check the output from bison. | |
3388 | (Early token definitions): New. | |
3389 | ||
5e424082 AD |
3390 | 2002-06-10 Akim Demaille <akim@epita.fr> |
3391 | ||
3392 | * src/symtab.c (symbol_user_token_number_set): Don't complain when | |
3393 | assigning twice the same user number to a token, so that we can | |
3394 | use it in... | |
3395 | * src/lex.c (lex): here. | |
3396 | Also use `symbol_class_set' instead of hand written code. | |
3397 | * src/reader.c (parse_assoc_decl): Likewise. | |
3398 | ||
44536b35 AD |
3399 | 2002-06-10 Akim Demaille <akim@epita.fr> |
3400 | ||
3401 | * src/symtab.c, src/symtab.c (symbol_class_set) | |
3402 | (symbol_user_token_number_set): New. | |
3403 | * src/reader.c (parse_token_decl): Use them. | |
3404 | Use a switch instead of ifs. | |
3405 | Use a single argument. | |
3406 | ||
8b9f2372 AD |
3407 | 2002-06-10 Akim Demaille <akim@epita.fr> |
3408 | ||
3409 | Remove `%thong' support as it is undocumented, unused, duplicates | |
3410 | `%token's job, and creates useless e-mail traffic with people who | |
3411 | want to know what it is, why it is undocumented, unused, and | |
3412 | duplicates `%token's job. | |
3413 | ||
3414 | * src/reader.c (parse_thong_decl): Remove. | |
3415 | * src/options.c (option_table): Remove "thong". | |
3416 | * src/lex.h (tok_thong): Remove. | |
3417 | ||
3ae2b51f AD |
3418 | 2002-06-10 Akim Demaille <akim@epita.fr> |
3419 | ||
3420 | * src/symtab.c, src/symtab.c (symbol_type_set) | |
3421 | (symbol_precedence_set): New. | |
3422 | * src/reader.c (parse_type_decl, parse_assoc_decl): Use them. | |
3423 | (value_components_used): Remove, unused. | |
3424 | ||
2f1afb73 AD |
3425 | 2002-06-09 Akim Demaille <akim@epita.fr> |
3426 | ||
3427 | Move symbols handling code out of the reader. | |
3428 | ||
3429 | * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken) | |
3430 | (axiom): Move to... | |
3431 | * src/symtab.h, src/symtab.c: here. | |
3432 | ||
3433 | * src/gram.c (start_symbol): Remove: use startsymbol->number. | |
3434 | * src/reader.c (startval): Rename as... | |
3435 | * src/symtab.h, src/symtab.c (startsymbol): this. | |
3436 | * src/reader.c: Adjust. | |
3437 | ||
3438 | * src/reader.c (symbol_check_defined, symbol_make_alias) | |
3439 | (symbol_check_alias_consistence, symbol_pack, symbol_translation) | |
3440 | (token_translations_init) | |
3441 | Move to... | |
3442 | * src/symtab.c: here. | |
3443 | * src/reader.c (packsymbols): Move to... | |
3444 | * src/symtab.h, src/symtab.c (symbols_pack): here. | |
3445 | * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as | |
3446 | argument. | |
3447 | ||
e9bca3ad AD |
3448 | 2002-06-03 Akim Demaille <akim@epita.fr> |
3449 | ||
3450 | * src/muscle_tab.c (muscle_insert, muscle_find): Declarations, | |
3451 | then statements. | |
3452 | ||
86eff183 AD |
3453 | 2002-06-03 Akim Demaille <akim@epita.fr> |
3454 | ||
3455 | * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize | |
3456 | structs with non literals. | |
3457 | * src/scan-skel.l: never-interactive. | |
3458 | * src/conflicts.c (enum conflict_resolution_e): No trailing | |
3459 | comma. | |
3460 | * src/getargs.c (usage): Split long literal strings. | |
3461 | Reported by Hans Aberg. | |
3462 | ||
717be197 AD |
3463 | 2002-05-28 Akim Demaille <akim@epita.fr> |
3464 | ||
3465 | * data/bison.c++: Use C++ ostreams. | |
3466 | (cdebug_): New member. | |
3467 | ||
670ddffd AD |
3468 | 2002-05-28 Akim Demaille <akim@epita.fr> |
3469 | ||
3470 | * src/output.c (output_skeleton): Be sure to allocate enough room | |
3471 | for `/' _and_ for `\0' in full_skeleton. | |
3472 | ||
769b430f AD |
3473 | 2002-05-28 Akim Demaille <akim@epita.fr> |
3474 | ||
3475 | * data/bison.c++: Catch up with bison.simple: | |
3476 | 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
3477 | and Paul Eggert <eggert@twinsun.com>: `error' handing. | |
3478 | 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_, | |
3479 | and popping traces. | |
3480 | ||
7067cb36 PH |
3481 | 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3482 | ||
3483 | * src/output.c (output_skeleton): Put an explicit path in front of | |
3484 | the skeleton file name, rather than relying on the -I directory, | |
3485 | to partially alleviate effects of having a skeleton file lying around | |
3486 | in the current directory. | |
769b430f | 3487 | |
4a713ec2 PH |
3488 | 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3489 | ||
769b430f | 3490 | * src/conflicts.c (log_resolution): Correct typo: |
4a713ec2 PH |
3491 | obstack_printf should be obstack_fgrow1. |
3492 | ||
b408954b AD |
3493 | 2002-05-26 Akim Demaille <akim@epita.fr> |
3494 | ||
3495 | * src/state.h (state_t): `solved_conflicts' is a new member. | |
3496 | * src/LR0.c (new_state): Set it to 0. | |
3497 | * src/conflicts.h, src/conflicts.c (print_conflicts) | |
3498 | (free_conflicts, solve_conflicts): Rename as... | |
3499 | (conflicts_print, conflicts_free, conflicts_solve): these. | |
3500 | Adjust callers. | |
3501 | * src/conflicts.c (enum conflict_resolution_e) | |
3502 | (solved_conflicts_obstack): New, used by... | |
3503 | (log_resolution): this. | |
3504 | Adjust to attach the conflict resolution to each state. | |
3505 | Complete the description with the precedence/associativity | |
3506 | information. | |
3507 | (resolve_sr_conflict): Adjust. | |
3508 | * src/print.c (print_state): Output its solved_conflicts. | |
3509 | * tests/conflicts.at (Unresolved SR Conflicts) | |
3510 | (Solved SR Conflicts): Exercise --report=all. | |
3511 | ||
a49aecd5 AD |
3512 | 2002-05-26 Akim Demaille <akim@epita.fr> |
3513 | ||
3514 | * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c, | |
3515 | * src/nullable.c, src/output.c, src/print.c, src/print_graph.c, | |
3516 | * src/reader.c, src/reduce.c, src/state.h, src/symtab.h | |
3517 | (token_number_t, item_number_as_token_number) | |
3518 | (token_number_as_item_number, muscle_insert_token_number_table): | |
3519 | Rename as... | |
3520 | (symbol_number_t, item_number_as_symbol_number) | |
3521 | (symbol_number_as_item_number, muscle_insert_symbol_number_table): | |
3522 | these, since it is more appropriate. | |
3523 | ||
5504898e AD |
3524 | 2002-05-26 Akim Demaille <akim@epita.fr> |
3525 | ||
3526 | * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional | |
3527 | `Error:' lines. | |
3528 | * data/bison.simple (yystos) [YYDEBUG]: New. | |
3529 | (yyparse) [YYDEBUG]: Display the symbols which are popped during | |
3530 | error recovery. | |
3531 | * tests/regression.at (Web2c Actions): Adjust: yystos is output now. | |
3532 | ||
ec3bc396 AD |
3533 | 2002-05-25 Akim Demaille <akim@epita.fr> |
3534 | ||
3535 | * doc/bison.texinfo (Debugging): Split into... | |
3536 | (Tracing): this new section, its former contents, and... | |
3537 | (Understanding): this new section. | |
3538 | * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced | |
3539 | by... | |
3540 | (report_flag): this. | |
3541 | Adjust all dependencies. | |
3542 | (report_args, report_types, report_argmatch): New. | |
3543 | (usage, getargs): Report/support -r, --report. | |
3544 | * src/options.h | |
3545 | (struct option_table_struct): Rename as.., | |
3546 | (struct option_table_s): this. | |
3547 | Rename the `set_flag' member to `flag' to match with getopt_long's | |
3548 | struct. | |
3549 | * src/options.c (option_table): Split verbose into an entry for | |
3550 | %verbose, and another for --verbose. | |
3551 | Support --report/-r, so remove -r from the obsolete --raw. | |
3552 | * src/print.c: Attach full item sets and lookaheads reports to | |
3553 | report_flag instead of trace_flag. | |
3554 | * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1. | |
3555 | ||
78df8250 PE |
3556 | 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3557 | and Paul Eggert <eggert@twinsun.com> | |
769b430f | 3558 | |
78df8250 PE |
3559 | * data/bison.simple (yyparse): Correct error handling to conform to |
3560 | POSIX and yacc. Specifically, after syntax error is discovered, | |
3561 | do not reduce further before shifting the error token. | |
3562 | Clean up the code a bit by removing the labels yyerrdefault, | |
3563 | yyerrhandle, yyerrpop. | |
3564 | * NEWS: Document the above. | |
3565 | ||
c0c9ea05 PH |
3566 | 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3567 | ||
3568 | * data/bison.simple (yyr1): Don't use yy_token_number_type as element | |
3569 | type; it isn't always big enough, since it doesn't necessarily | |
3570 | include non-terminals. | |
769b430f | 3571 | (yytranslate): Expand definition of yy_token_number_type, so that |
c0c9ea05 PH |
3572 | the latter can be removed. |
3573 | (yy_token_number_type): Remove, only one use. | |
3574 | * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple--- | |
3575 | don't use TokenNumberType as element type. | |
769b430f | 3576 | |
c0c9ea05 PH |
3577 | * tests/regression.at: Modify expected output to agree with change |
3578 | to yyr1 and yytranslate. | |
769b430f | 3579 | |
6390a83f FK |
3580 | 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com> |
3581 | ||
3582 | * src/reader.c (parse_action): Use copy_character instead of | |
3583 | obstack_1grow. | |
3584 | ||
db7c8e9a AD |
3585 | 2002-05-13 Akim Demaille <akim@epita.fr> |
3586 | ||
3587 | * tests/regression.at (Token definitions): Prototype yylex and | |
3588 | yyerror. | |
3589 | ||
fcc61800 PH |
3590 | 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
3591 | ||
158c687b | 3592 | * src/scan-skel.l: Correct off-by-one error in handling of __oline__. |
fcc61800 PH |
3593 | * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect |
3594 | 32-bit arithmetic. | |
3595 | * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto. | |
3596 | ||
5683e9b2 AD |
3597 | 2002-05-07 Akim Demaille <akim@epita.fr> |
3598 | ||
3599 | * tests/synclines.at: Be sure to prototype yylex and yyerror to | |
3600 | avoid GCC warnings. | |
3601 | ||
0c2d3f4c AD |
3602 | 2002-05-07 Akim Demaille <akim@epita.fr> |
3603 | ||
3604 | Kill GCC warnings. | |
3605 | ||
3606 | * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop | |
3607 | over the RHS of each rule. | |
3608 | * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int. | |
3609 | * src/state.h (state_t): Member `nitems' is unsigned short. | |
3610 | * src/LR0.c (get_state): Adjust. | |
3611 | * src/reader.c (packgram): Likewise. | |
3612 | * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type | |
3613 | `Type'. | |
3614 | (muscle_insert_int_table): Remove, unused. | |
3615 | (prepare_rules): Remove `max'. | |
3616 | ||
1565b720 AD |
3617 | 2002-05-06 Akim Demaille <akim@epita.fr> |
3618 | ||
3619 | * src/closure.c (print_firsts): Display of the symbol tags. | |
3620 | (bitmatrix_print): Move to... | |
3621 | * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump): | |
3622 | here. | |
3623 | * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust. | |
3624 | ||
cfaee611 AD |
3625 | 2002-05-06 Akim Demaille <akim@epita.fr> |
3626 | ||
3627 | * src/muscle_tab.c (muscle_m4_output): Must return TRUE for | |
3628 | hash_do_for_each. | |
3629 | ||
458be8e0 AD |
3630 | 2002-05-06 Akim Demaille <akim@epita.fr> |
3631 | ||
3632 | * src/LR0.c (new_state, get_state): Instead of using the global | |
3633 | `kernel_size' and `kernel_base', have two new arguments: | |
3634 | `core_size' and `core'. | |
3635 | Adjust callers. | |
3636 | ||
a900a624 AD |
3637 | 2002-05-06 Akim Demaille <akim@epita.fr> |
3638 | ||
3639 | * src/reader.c (packgram): No longer end `ritem' with a 0 | |
3640 | sentinel: it is not used. | |
3641 | ||
d4e7d3a1 AD |
3642 | 2002-05-05 Akim Demaille <akim@epita.fr> |
3643 | ||
3644 | New experimental feature: display the lookaheads in the report and | |
3645 | graph. | |
3646 | ||
3647 | * src/print (print_core): When --trace-flag, display the rules | |
3648 | lookaheads. | |
3649 | * src/print_graph.c (print_core): Likewise. | |
3650 | Swap the arguments. | |
3651 | Adjust caller. | |
3652 | ||
39ceb25b AD |
3653 | 2002-05-05 Akim Demaille <akim@epita.fr> |
3654 | ||
3655 | * tests/torture.at (Many lookaheads): New test. | |
3656 | ||
5372019f AD |
3657 | 2002-05-05 Akim Demaille <akim@epita.fr> |
3658 | ||
3659 | * src/output.c (GENERATE_OUTPUT_TABLE): Replace with... | |
3660 | (GENERATE_MUSCLE_INSERT_TABLE): this. | |
3661 | (output_int_table, output_unsigned_int_table, output_short_table) | |
3662 | (output_token_number_table, output_item_number_table): Replace with... | |
3663 | (muscle_insert_int_table, muscle_insert_unsigned_int_table) | |
3664 | (muscle_insert_short_table, muscle_insert_token_number_table) | |
3665 | (muscle_insert_item_number_table): these. | |
3666 | Adjust all callers. | |
3667 | (prepare_tokens): Don't free `translations', since... | |
3668 | * src/reader.h, src/reader.c (grammar_free): do it. | |
3669 | Move to... | |
3670 | * src/gram.h, src/gram.c (grammar_free): here. | |
3671 | * data/bison.simple, data/bison.c++: b4_token_number_max is now | |
3672 | b4_translate_max. | |
3673 | ||
5df5f6d5 AD |
3674 | 2002-05-05 Akim Demaille <akim@epita.fr> |
3675 | ||
3676 | * src/output.c (output_unsigned_int_table): New. | |
3677 | (prepare_rules): `i' is unsigned. | |
3678 | `prhs', `rline', `r2' are unsigned int. | |
3679 | Rename muscle `rhs_number_max' as `rhs_max'. | |
3680 | Output muscles `prhs_max', `rline_max', and `r2_max'. | |
3681 | Free rline and r1. | |
3682 | * data/bison.simple, data/bison.c++: Adjust to use these muscles | |
3683 | to compute types instead of constant types. | |
3684 | * tests/regression.at (Web2c Actions): Adjust. | |
3685 | ||
b87f8b21 AD |
3686 | 2002-05-04 Akim Demaille <akim@epita.fr> |
3687 | ||
3688 | * src/symtab.h (SALIAS, SUNDEF): Rename as... | |
3689 | (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these. | |
3690 | Adjust dependencies. | |
3691 | * src/output.c (token_definitions_output): Be sure not to output a | |
3692 | `#define 'a'' when fed with `%token 'a' "a"'. | |
3693 | * tests/regression.at (Token definitions): New. | |
3694 | ||
8bb936e4 PE |
3695 | 2002-05-03 Paul Eggert <eggert@twinsun.com> |
3696 | ||
3697 | * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE | |
3698 | for K&R C. | |
3699 | ||
3700 | 2002-05-03 gettextize <bug-gnu-gettext@gnu.org> | |
3701 | ||
3702 | * Makefile.am (SUBDIRS): Remove intl. | |
3703 | (EXTRA_DIST): Add config/config.rpath. | |
3704 | ||
53c71a12 AD |
3705 | 2002-05-03 Akim Demaille <akim@epita.fr> |
3706 | ||
3707 | * data/bison.simple (m4_if): Don't output empty enums. | |
3708 | And actually, output valid enum definitions :(. | |
3709 | ||
289dd0cf AD |
3710 | 2002-05-03 Akim Demaille <akim@epita.fr> |
3711 | ||
3712 | * configure.bat: Remove, completely obsolete. | |
3713 | * Makefile.am (EXTRA_DIST): Adjust. | |
3714 | Don't distribute config.rpath... | |
3715 | * config/Makefile.am (EXTRA_DIST): Do it. | |
3716 | ||
db85e524 AD |
3717 | 2002-05-03 Akim Demaille <akim@epita.fr> |
3718 | ||
3719 | * configure.in (GETTEXT_VERSION): New. | |
3720 | Suggested by Bruno Haible for the forthcoming Gettext 0.10.3. | |
3721 | ||
83ccf991 AD |
3722 | 2002-05-03 Akim Demaille <akim@epita.fr> |
3723 | ||
3724 | * data/bison.simple (b4_token_enum): New. | |
3725 | (b4_token_defines): Use it to output tokens both as #define and | |
3726 | enums. | |
3727 | Suggested by Paul Eggert. | |
3728 | * src/output.c (token_definitions_output): Don't output spurious | |
3729 | white spaces. | |
3730 | ||
1f418995 AD |
3731 | 2002-05-03 Akim Demaille <akim@epita.fr> |
3732 | ||
3733 | * data/m4sugar/m4sugar.m4: Update from CVS Autoconf. | |
3734 | ||
45119f04 RA |
3735 | 2002-05-02 Robert Anisko <robert@lrde.epita.fr> |
3736 | ||
3737 | * data/bison.c++: Adapt expansion of $s and @s to the C++ parser. | |
3738 | Update the stack class, give a try to deque as the default container. | |
3739 | ||
b2d52318 AD |
3740 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3741 | ||
3742 | * data/bison.simple (yyparse): Do not implement @$ = @1. | |
3743 | (YYLLOC_DEFAULT): Adjust to do it. | |
3744 | * doc/bison.texinfo (Location Default Action): Fix. | |
3745 | ||
3a8b4109 AD |
3746 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3747 | ||
3748 | * src/reader.c (parse_braces): Merge into... | |
3749 | (parse_action): this. | |
3750 | ||
84614e13 AD |
3751 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3752 | ||
3753 | * configure.in (ALL_LINGUAS): Remove. | |
3754 | * po/LINGUAS, hr.po: New. | |
3755 | ||
fdbcd8e2 AD |
3756 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3757 | ||
3758 | Remove the so called hairy (semantic) parsers. | |
3759 | ||
3760 | * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove. | |
3761 | * src/gram.h, src/gram.c (semantic_parser): Remove. | |
3762 | (rule_t): Remove the guard and guard_line members. | |
3763 | * src/lex.h (token_t): remove tok_guard. | |
3764 | * src/options.c (option_table): Remove %guard and %semantic_parser | |
3765 | support. | |
3766 | * src/output.c, src/output.h (guards_output): Remove. | |
3767 | (prepare): Adjust. | |
3768 | (token_definitions_output): Don't output the `T' | |
3769 | tokens (???). | |
3770 | (output_skeleton): Don't output the guards. | |
3771 | * src/files.c, src/files.c (attrsfile): Remove. | |
3772 | * src/reader.c (symbol_list): Remove the guard and guard_line | |
3773 | members. | |
3774 | Adjust dependencies. | |
3775 | (parse_guard): Remove. | |
3776 | * data/bison.hairy: Remove. | |
3777 | * doc/bison.texinfo (Environment Variables): Remove occurrences of | |
3778 | BISON_HAIRY. | |
3779 | ||
82b6cb3f AD |
3780 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3781 | ||
3782 | * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action) | |
3783 | (parse_guard): Rename the formal argument `stack_offset' as | |
3784 | `rule_length', which is more readable. | |
3785 | Adjust callers. | |
3786 | (copy_at, copy_dollar): Instead of outputting the hard coded | |
3787 | values of $$, $n and so forth, output invocation to b4_lhs_value, | |
3788 | b4_lhs_location, b4_rhs_value, and b4_rhs_location. | |
900c877b AD |
3789 | Note: this patch partially drops `semantic-parser' support: it |
3790 | always does `rule_length - n', where semantic parsers ought to | |
3791 | always use `-n'. | |
82b6cb3f AD |
3792 | * data/bison.simple, data/bison.c++ (b4_lhs_value) |
3793 | (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New. | |
3794 | ||
6cbfbcc5 AD |
3795 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3796 | ||
3797 | * configure.in (AC_INIT): Bump to 1.49b. | |
3798 | (AM_INIT_AUTOMAKE): Short invocation. | |
3799 | ||
b8548114 AD |
3800 | 2002-05-02 Akim Demaille <akim@epita.fr> |
3801 | ||
3802 | Version 1.49a. | |
3803 | ||
c20cd1fa AD |
3804 | 2002-05-01 Akim Demaille <akim@epita.fr> |
3805 | ||
3806 | * src/skeleton.h: Remove. | |
3807 | ||
8a9566d4 AD |
3808 | 2002-05-01 Akim Demaille <akim@epita.fr> |
3809 | ||
3810 | * src/skeleton.h: Fix the #endif. | |
3811 | Reported by Magnus Fromreide. | |
3812 | ||
8c6d399a PE |
3813 | 2002-04-26 Paul Eggert <eggert@twinsun.com> |
3814 | ||
3815 | * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL): | |
3816 | Define if we define YYSTYPE and YYLTYPE, respectively. | |
b756bb75 | 3817 | (YYCOPY): Fix [] quoting problem in the non-GCC case. |
8a9566d4 | 3818 | |
2b7ed18a RA |
3819 | 2002-04-25 Robert Anisko <robert@lrde.epita.fr> |
3820 | ||
3821 | * src/scan-skel.l: Postprocess quadrigraphs. | |
3822 | ||
3823 | * src/reader.c (copy_character): New function, used to output | |
3824 | single characters while replacing `[' and `]' with quadrigraphs, to | |
3825 | avoid troubles with M4 quotes. | |
3826 | (copy_comment): Output characters with copy_character. | |
3827 | (read_additionnal_code): Likewise. | |
3828 | (copy_string2): Likewise. | |
3829 | (copy_definition): Likewise. | |
3830 | ||
3831 | * tests/calc.at: Exercise M4 quoting. | |
3832 | ||
34a89c50 AD |
3833 | 2002-04-25 Akim Demaille <akim@epita.fr> |
3834 | ||
3835 | * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space | |
3836 | between `!' and the command. | |
3837 | Reported by Paul Eggert. | |
3838 | ||
0dd1580a RA |
3839 | 2002-04-24 Robert Anisko <robert@lrde.epita.fr> |
3840 | ||
3841 | * tests/calc.at: Exercise prologue splitting. | |
3842 | ||
3843 | * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and | |
3844 | `b4_post_prologue' instead of `b4_prologue'. | |
3845 | ||
3846 | * src/output.c (prepare): Add the `pre_prologue' and `post_prologue' | |
3847 | muscles. | |
3848 | (output): Free pre_prologue_obstack and post_prologue_obstack. | |
3849 | * src/files.h, src/files.c (attrs_obstack): Remove. | |
3850 | (pre_prologue_obstack, post_prologue_obstack): New. | |
3851 | * src/reader.c (copy_definition): Add a parameter to specify the | |
3852 | obstack to fill, instead of using attrs_obstack unconditionally. | |
3853 | (read_declarations): Pass pre_prologue_obstack to copy_definition if | |
3854 | `%union' has not yet been seen, pass post_prologue_obstack otherwise. | |
3855 | ||
83c1796f PE |
3856 | 2002-04-23 Paul Eggert <eggert@twinsun.com> |
3857 | ||
3858 | * data/bison.simple: Remove unnecessary commentary and white | |
3859 | space differences from 1_29-branch. | |
3860 | Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE). | |
3861 | ||
3862 | (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY, | |
3863 | YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or | |
3864 | if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial | |
3865 | constructors or destructors. | |
3866 | ||
3867 | (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack. | |
3868 | ||
1207eeac AD |
3869 | 2002-04-23 Akim Demaille <akim@epita.fr> |
3870 | ||
3871 | * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels. | |
3872 | * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's | |
3873 | location with columns. | |
3874 | * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'. | |
3875 | All reported by Paul Eggert. | |
3876 | ||
78ab8f67 AD |
3877 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3878 | ||
3879 | * src/reduce.c (dump_grammar): Move to... | |
3880 | * src/gram.h, src/gram.c (grammar_dump): here. | |
3881 | Be sure to separate long item numbers. | |
3882 | Don't read the members of a rule's prec if its nil. | |
3883 | ||
133c20e2 AD |
3884 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3885 | ||
3886 | * src/output.c (table_size, table_grow): New. | |
3887 | (MAXTABLE): Remove, replace uses with table_size. | |
3888 | (pack_vector): Instead of dying when the table is too big, grow it. | |
3889 | ||
9515e8a7 AD |
3890 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3891 | ||
3892 | * data/bison.simple (yyr1): Its type is that of a token number. | |
3893 | * data/bison.c++ (r1_): Likewise. | |
3894 | * tests/regression.at (Web2c Actions): Adjust. | |
3895 | ||
23c5a174 AD |
3896 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3897 | ||
3898 | * src/reader.c (token_translations_init): 256 is now the default | |
3899 | value for the error token, i.e., it will be assigned another | |
3900 | number if the user assigned 256 to one of her tokens. | |
3901 | (reader): Don't force 256 to error. | |
3902 | * doc/bison.texinfo (Symbols): Adjust. | |
3903 | * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR) | |
3904 | (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3 | |
3905 | etc. instead of 10, 20, 30 (which was used to `jump' over error | |
3906 | (256) and undefined (2)). | |
3907 | ||
5fbb0954 AD |
3908 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3909 | ||
3910 | Propagate more token_number_t. | |
3911 | ||
3912 | * src/gram.h (token_number_as_item_number) | |
3913 | (item_number_as_token_number): New. | |
3914 | * src/output.c (GENERATE_OUTPUT_TABLE): New. | |
3915 | Use it to create output_item_number_table and | |
3916 | output_token_number_table. | |
3917 | * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c, | |
3918 | * src/lex.c, src/nullable.c, src/output.c, src/print.c, | |
3919 | * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h, | |
3920 | * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts. | |
3921 | ||
4f940944 AD |
3922 | 2002-04-22 Akim Demaille <akim@epita.fr> |
3923 | ||
3924 | * src/output.h, src/output.c (get_lines_number): Remove. | |
3925 | ||
3ded9a63 AD |
3926 | 2002-04-19 Akim Demaille <akim@epita.fr> |
3927 | ||
3928 | * doc/bison.texinfo (Actions): Make clear that `|' is not the same | |
3929 | as Lex/Flex'. | |
3930 | (Debugging): More details about enabling the debugging features. | |
3931 | (Table of Symbols): Describe $$, $n, @$, and @n. | |
3932 | Suggested by Tim Josling. | |
3933 | ||
e0c471a9 AD |
3934 | 2002-04-19 Akim Demaille <akim@epita.fr> |
3935 | ||
3936 | * doc/bison.texinfo: Remove the uses of the obsolete @refill. | |
3937 | ||
fecc10cd AD |
3938 | 2002-04-10 Akim Demaille <akim@epita.fr> |
3939 | ||
3940 | * src/system.h: Rely on HAVE_LIMITS_H. | |
3941 | Suggested by Paul Eggert. | |
3942 | ||
51dec47b AD |
3943 | 2002-04-09 Akim Demaille <akim@epita.fr> |
3944 | ||
3945 | * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the | |
3946 | full stderr, and strip it according to the bison options, instead | |
3947 | of composing the error message from different bits. | |
3948 | This makes it easier to check for several error messages. | |
3949 | Adjust all the invocations. | |
3950 | Add an invocation exercising the error token. | |
3951 | Add an invocation demonstrating a stupid error message. | |
3952 | (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0. | |
3953 | Adjust the tests. | |
3954 | Error message are for stderr, not stdout. | |
3955 | ||
007a50a4 AD |
3956 | 2002-04-09 Akim Demaille <akim@epita.fr> |
3957 | ||
3958 | * src/gram.h, src/gram.c (error_token_number): Remove, use | |
3959 | errtoken->number. | |
3960 | * src/reader.c (reader): Don't specify the user token number (2) | |
3961 | for $undefined, as it uselessly prevents using it. | |
3962 | * src/gram.h (token_number_t): Move to... | |
3963 | * src/symtab.h: here. | |
3964 | (state_t.number): Is a token_number_t. | |
3965 | * src/print.c, src/reader.c: Use undeftoken->number instead of | |
3966 | hard coded 2. | |
3967 | (Even though this 2 is not the same as above: the number of the | |
3968 | undeftoken remains being 2, it is its user token number which | |
3969 | might not be 2). | |
3970 | * src/output.c (prepare_tokens): Rename the `maxtok' muscle with | |
3971 | `user_token_number_max'. | |
3972 | Output `undef_token_number'. | |
3973 | * data/bison.simple, data/bison.c++: Use them. | |
3974 | Be sure to map invalid yylex return values to | |
3975 | `undef_token_number'. This saves us from gratuitous SEGV. | |
3976 | ||
3977 | * tests/conflicts.at (Solved SR Conflicts) | |
3978 | (Unresolved SR Conflicts): Adjust. | |
3979 | * tests/regression.at (Web2c Actions): Adjust. | |
3980 | ||
06446ccf AD |
3981 | 2002-04-08 Akim Demaille <akim@epita.fr> |
3982 | ||
3983 | * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/. | |
3984 | Adding #line. | |
3985 | Remove the duplicate `typedefs'. | |
3986 | (RhsNumberType): Fix the declaration and various other typos. | |
3987 | Use __ofile__. | |
3988 | * data/bison.simple: Use __ofile__. | |
3989 | * src/scan-skel.l: Handle __ofile__. | |
3990 | ||
62a3e4f0 AD |
3991 | 2002-04-08 Akim Demaille <akim@epita.fr> |
3992 | ||
3993 | * src/gram.h (item_number_t): New, the type of item numbers in | |
3994 | RITEM. Note that it must be able to code symbol numbers as | |
3995 | positive number, and the negation of rule numbers as negative | |
3996 | numbers. | |
3997 | Adjust all dependencies (pretty many). | |
3998 | * src/reduce.c (rule): Remove this `short *' pointer: use | |
3999 | item_number_t. | |
4000 | * src/system.h (MINSHORT, MAXSHORT): Remove. | |
4001 | Include `limits.h'. | |
4002 | Adjust dependencies to using SHRT_MAX and SHRT_MIN. | |
4003 | (shortcpy): Remove. | |
4004 | (MAXTABLE): Move to... | |
4005 | * src/output.c (MAXTABLE): here. | |
4006 | (prepare_rules): Use output_int_table to output rhs. | |
4007 | * data/bison.simple, data/bison.c++: Adjust. | |
4008 | * tests/torture.at (Big triangle): Move the limit from 254 to | |
4009 | 500. | |
4010 | * tests/regression.at (Web2c Actions): Ajust. | |
4011 | ||
4012 | Trying with bigger grammars shows various phenomena: at 3000 (28Mb | |
4013 | of grammar file) bison is killed by my system, at 2000 (12Mb) bison | |
4014 | passes, but produces negative #line number, once fixed, GCC is | |
4015 | killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of | |
4016 | C), it passes. | |
4017 | * src/state.h (state_h): Code input lines on ints, not shorts. | |
4018 | ||
bb88b0fc AD |
4019 | 2002-04-08 Akim Demaille <akim@epita.fr> |
4020 | ||
4021 | * src/reduce.c (reduce_grammar): First reduce the nonterminals, | |
4022 | and then the grammar. | |
4023 | ||
9a636f47 AD |
4024 | 2002-04-08 Akim Demaille <akim@epita.fr> |
4025 | ||
4026 | * src/system.h: No longer using strndup. | |
4027 | ||
680e8701 AD |
4028 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4029 | ||
4030 | * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New. | |
4031 | * src/output.c (output_table_data): Return the longest number. | |
4032 | (prepare_tokens): Output `token_number_max'). | |
4033 | * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type): | |
4034 | New. | |
4035 | Use them to define yy_token_number_type/TokenNumberType. | |
4036 | Use this type for yytranslate. | |
4037 | * tests/torture.at (Big triangle): Push the limit from 124 to | |
4038 | 253. | |
4039 | * tests/regression.at (Web2c Actions): Adjust. | |
4040 | ||
817e9f41 AD |
4041 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4042 | ||
4043 | * tests/torture.at (Big triangle): New. | |
4044 | (GNU AWK Grammar, GNU Cim Grammar): Move to... | |
4045 | * tests/existing.at: here. | |
4046 | ||
5123689b AD |
4047 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4048 | ||
4049 | * src/gram.h, src/gram.c (nitems): Remove, it is an alias of | |
4050 | nritems. | |
4051 | Adjust dependencies. | |
4052 | ||
f3849179 AD |
4053 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4054 | ||
4055 | * src/reader.c: Normalize increments to prefix form. | |
4056 | ||
bd02036a AD |
4057 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4058 | ||
4059 | * src/reader.c, symtab.c: Remove debugging code. | |
4060 | ||
db8837cb AD |
4061 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4062 | ||
4063 | Rename all the `bucket's as `symbol_t'. | |
4064 | ||
4065 | * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c, | |
4066 | * src/reader.c, src/reader.h, src/reduce.c, src/state.h, | |
4067 | * src/symtab.c, src/symtab.h (bucket): Rename as... | |
4068 | (symbol_t): this. | |
4069 | (symbol_list_new, bucket_check_defined, bucket_make_alias) | |
4070 | (bucket_check_alias_consistence, bucket_pack, bucket_translation) | |
4071 | (bucket_new, bucket_free, hash_compare_bucket, hash_bucket) | |
4072 | (buckets_new, buckets_free, buckets_do): Rename as... | |
4073 | (symbol_list_new, symbol_check_defined, symbol_make_alias) | |
4074 | (symbol_check_alias_consistence, symbol_pack, symbol_translation) | |
4075 | (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t) | |
4076 | (symbols_new, symbols_free, symbols_do): these. | |
4077 | ||
72a23c97 AD |
4078 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4079 | ||
4080 | Use lib/hash for the symbol table. | |
4081 | ||
4082 | * src/gram.c (ntokens): Initialize to 1, to reserve a slot for | |
4083 | EOF. | |
4084 | * src/lex.c (lex): Set the `number' member of new terminals. | |
4085 | * src/reader.c (bucket_check_defined, bucket_make_alias) | |
4086 | (bucket_check_alias_consistence, bucket_translation): New. | |
4087 | (reader, grammar_free, readgram, token_translations_init) | |
4088 | (packsymbols): Adjust. | |
4089 | (reader): Number the predefined tokens. | |
4090 | * src/reduce.c (inaccessable_symbols): Just use hard coded numbers | |
4091 | for predefined tokens. | |
4092 | * src/symtab.h (bucket): Remove all the hash table related | |
4093 | members. | |
4094 | * src/symtab.c (symtab): Replace by... | |
4095 | (bucket_table): this. | |
4096 | (bucket_new, bucket_free, hash_compare_bucket, hash_bucket) | |
4097 | (buckets_new, buckets_do): New. | |
4098 | ||
280a38c3 AD |
4099 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4100 | ||
4101 | * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems) | |
4102 | (start_symbol, max_user_token_number, semantic_parser) | |
4103 | (error_token_number): Initialize. | |
4104 | * src/reader.c (grammar, start_flag, startval, typed, lastprec): | |
4105 | Initialize. | |
4106 | (reader): Don't. | |
4107 | (errtoken, eoftoken, undeftoken, axiom): Extern. | |
4108 | ||
03b31c0c AD |
4109 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4110 | ||
4111 | * src/gram.h (rule_s): prec and precsym are now pointers | |
4112 | to the bucket giving the priority/associativity. | |
4113 | Member `associativity' removed: useless. | |
4114 | * src/reduce.c, src/conflicts.c: Adjust. | |
4115 | ||
8b3df748 AD |
4116 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4117 | ||
4118 | * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c: | |
4119 | Properly escape the symbols' TAG when outputting them. | |
4120 | ||
e601aa1d AD |
4121 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4122 | ||
4123 | * src/lalr.h (LA): Is a bitsetv, not bitset*. | |
4124 | ||
b0299a2e AD |
4125 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4126 | ||
4127 | * src/lalr.h, src/lalr.c (LAruleno): Replace with... | |
4128 | (LArule): this, which is an array to rule_t*. | |
4129 | * src/print.c, src/conflicts.c: Adjust. | |
4130 | ||
d7e1f00c AD |
4131 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4132 | ||
4133 | * src/gram.h (rule_t): Rename `number' as `user_number'. | |
4134 | `number' is a new member. | |
4135 | Adjust dependencies. | |
4136 | * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number. | |
4137 | ||
cc9305dd AD |
4138 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4139 | ||
4140 | As a result of the previous patch, it is no longer needed | |
4141 | to reorder ritem itself. | |
4142 | ||
4143 | * src/reduce.c (reduce_grammar_tables): Don't sort RITEM. | |
4144 | ||
b0940840 AD |
4145 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4146 | ||
4147 | Be sure never to walk through RITEMS, but use only data related to | |
4148 | the rules themselves. RITEMS should be banished. | |
4149 | ||
4150 | * src/output.c (output_token_translations): Rename as... | |
4151 | (prepare_tokens): this. | |
4152 | In addition to `translate', prepare the muscles `tname' and | |
4153 | `toknum', which were handled by... | |
4154 | (output_rule_data): this. | |
4155 | Remove, and move the remainder of its outputs into... | |
4156 | (prepare_rules): this new routines, which also merges content from | |
4157 | (output_gram): this. | |
4158 | (prepare_rules): Be sure never to walk through RITEMS. | |
4159 | (output_stos): Rename as... | |
4160 | (prepare_stos): this. | |
4161 | (output): Always invoke prepare_states, after all, just don't use it | |
4162 | in the output if you don't need it. | |
4163 | ||
643a5994 AD |
4164 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4165 | ||
4166 | * src/LR0.c (new_state): Display `nstates' as the name of the | |
4167 | newly created state. | |
4168 | Adjust to initialize first_state and last_state if needed. | |
4169 | Be sure to distinguish the initial from the final state. | |
4170 | (new_states): Create the itemset of the initial state, and use | |
4171 | new_state. | |
4172 | * src/closure.c (closure): Now that the initial state has its | |
4173 | items properly set, there is no need for a special case when | |
4174 | creating `ruleset'. | |
4175 | ||
4176 | As a result, now the rule 0, reducing to $axiom, is visible in the | |
4177 | outputs. Adjust the test suite. | |
4178 | ||
4179 | * tests/conflicts.at (Solved SR Conflicts) | |
4180 | (Unresolved SR Conflicts): Adjust. | |
4181 | * tests/regression.at (Web2c Report, Rule Line Numbers): Idem. | |
4182 | * tests/conflicts.at (S/R in initial): New. | |
4183 | ||
b4c4ccc2 AD |
4184 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4185 | ||
4186 | * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over | |
4187 | the RHS of the rules. | |
4188 | * src/output.c (output_gram): Likewise. | |
4189 | ||
bba97eb2 AD |
4190 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4191 | ||
4192 | * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's | |
4193 | bucket. | |
4194 | Adjust all dependencies. | |
4195 | * src/reduce.c (nonterminals_reduce): Don't forget to renumber the | |
4196 | `number' of the buckets too. | |
4197 | * src/gram.h: Include `symtab.h'. | |
4198 | (associativity): Move to... | |
4199 | * src/symtab.h: here. | |
4200 | No longer include `gram.h'. | |
4201 | ||
c3b407f4 AD |
4202 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4203 | ||
4204 | * src/gram.h, src/gram.c (rules_rhs_length): New. | |
4205 | (ritem_longest_rhs): Use it. | |
4206 | * src/gram.h (rule_t): `number' is a new member. | |
4207 | * src/reader.c (packgram): Set it. | |
4208 | * src/reduce.c (reduce_grammar_tables): Move the useless rules at | |
4209 | the end of `rules', and count them out of `nrules'. | |
4210 | (reduce_output, dump_grammar): Adjust. | |
4211 | * src/print.c (print_grammar): It is no longer needed to check for | |
4212 | the usefulness of a rule, as useless rules are beyond `nrules + 1'. | |
4213 | * tests/reduce.at (Reduced Automaton): New test. | |
4214 | ||
11652ab3 AD |
4215 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4216 | ||
4217 | * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a | |
4218 | lacking `+ 1' to nrules, Bison reported as useless a token if it | |
4219 | was used solely to set the precedence of the last rule... | |
4220 | ||
26b23c1a AD |
4221 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4222 | ||
4223 | * data/bison.c++, data/bison.simple: Don't output the current file | |
4224 | name in #line, to avoid useless diffs between two identical | |
4225 | outputs under different names. | |
4226 | ||
18bcecb0 AD |
4227 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4228 | ||
4229 | * src/closure.c, src/print.c, src/reader.c, src/reduce.c: | |
4230 | Normalize loops to using `< nrules + 1', not `<= nrules'. | |
4231 | ||
fa770c86 AD |
4232 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4233 | ||
4234 | * TODO: Update. | |
4235 | ||
d9b739c3 AD |
4236 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4237 | ||
4238 | * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename | |
4239 | bucket.value as bucket.number. | |
4240 | ||
99013900 AD |
4241 | 2002-04-07 Akim Demaille <akim@epita.fr> |
4242 | ||
4243 | * src/closure.c, src/derives.c, src/gram.h, src/lalr.c, | |
4244 | * src/nullable.c, src/output.c, src/print.c, src/print_graph.c, | |
4245 | * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the | |
4246 | RHS, instead of being an index in RITEMS. | |
4247 | ||
e966383b PE |
4248 | 2002-04-04 Paul Eggert <eggert@twinsun.com> |
4249 | ||
4250 | * doc/bison.texinfo: Update copyright date. | |
4251 | (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII. | |
4252 | (Symbols): Warn about running Bison in one character set, | |
4253 | but compiling and/or running in an incompatible one. | |
4254 | Warn about character code 256, too. | |
4255 | ||
4256 | 2002-04-03 Paul Eggert <eggert@twinsun.com> | |
4257 | ||
4258 | * src/bison.data (YYSTACK_ALLOC): Depend on whether | |
4259 | YYERROR_VERBOSE is nonzero, not whether it is defined. | |
4260 | ||
4261 | Merge changes from bison-1_29-branch. | |
c307773e | 4262 | |
8d6c48b9 PE |
4263 | 2002-03-20 Paul Eggert <eggert@twinsun.com> |
4264 | ||
4265 | Merge fixes from Debian bison_1.34-1.diff. | |
4266 | ||
4267 | * configure.in (AC_PREREQ): 2.53. | |
4268 | ||
e53c6322 AD |
4269 | 2002-03-20 Akim Demaille <akim@epita.fr> |
4270 | ||
4271 | * src/conflicts.c (log_resolution): Argument `resolution' is const. | |
4272 | ||
9ffbeca7 PE |
4273 | 2002-03-19 Paul Eggert <eggert@twinsun.com> |
4274 | ||
21db0b2a PE |
4275 | * src/bison.simple (YYCOPY): New macro. |
4276 | (YYSTACK_RELOCATE): Use it. | |
4277 | Remove Type arg; no longer needed. All callers changed. | |
4278 | (yymemcpy): Remove; no longer needed. | |
4279 | ||
9ffbeca7 PE |
4280 | * Makefile.am (AUTOMAKE_OPTIONS): 1.6. |
4281 | * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove. | |
4282 | ||
642cb8f8 AD |
4283 | 2002-03-19 Akim Demaille <akim@epita.fr> |
4284 | ||
4285 | Test and fix the #line outputs. | |
4286 | ||
4287 | * tests/atlocal.at (GCC): New. | |
4288 | * tests/synclines.at (AT_TEST_SYNCLINE): New macro. | |
4289 | (Prologue synch line, ,%union synch line, Postprologue synch line) | |
4290 | (Action synch line, Epilogue synch line): New tests. | |
4291 | * src/reader.c (parse_union_decl): Define the muscle stype_line. | |
4292 | * data/bison.simple, data/bison.c++: Use it. | |
4293 | ||
3c31a486 AD |
4294 | 2002-03-19 Akim Demaille <akim@epita.fr> |
4295 | ||
4296 | * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts) | |
4297 | (Solved SR Conflicts, %expect not enough, %expect right) | |
4298 | (%expect too much): Move to... | |
4299 | * tests/conflicts.at: this new file. | |
4300 | ||
0d8bed56 AD |
4301 | 2002-03-19 Akim Demaille <akim@epita.fr> |
4302 | ||
4303 | * data/m4sugar/m4sugar.m4: Update from CVS Autoconf. | |
4304 | * data/bison.simple, data/bison.c++: Handle the `#define' part, so | |
4305 | that we can move to enums for instance. | |
4306 | * src/output.c (token_definitions_output): Output a list of | |
4307 | `token-name, token-number' instead of the #define. | |
4308 | (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'. | |
4309 | ||
9208d17f AD |
4310 | 2002-03-14 Akim Demaille <akim@epita.fr> |
4311 | ||
4312 | Use Gettext 0.11.1. | |
4313 | ||
af27eacb RA |
4314 | 2002-03-09 Robert Anisko <robert@lrde.epita.fr> |
4315 | ||
4316 | * data/bison.c++: Make the user able to add members to the generated | |
4317 | parser by subclassing. | |
4318 | ||
9101a310 RA |
4319 | 2002-03-05 Robert Anisko <robert@lrde.epita.fr> |
4320 | ||
4321 | * src/reader.c (read_additionnal_code): `c' should be an integer, not | |
4322 | a character. | |
4323 | Reported by Nicolas Tisserand and Nicolas Burrus. | |
4324 | ||
fff9bf0b RA |
4325 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
4326 | ||
4327 | * src/reader.c: Warn about lacking semi-colons, do not complain. | |
4328 | ||
64dba31e RA |
4329 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
4330 | ||
4331 | * data/bison.c++: Remove a debug line. | |
4332 | ||
374f5a14 RA |
4333 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
4334 | ||
4335 | * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge | |
4336 | location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and | |
4337 | provide a default implementation. | |
4338 | ||
bfcf1f3a AD |
4339 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4340 | ||
4341 | * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'. | |
4342 | * tests/output.at (AT_CHECK_OUTPUT): Likewise. | |
4343 | * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto. | |
4344 | * tests/semantic.at (Parsing Guards): Similarly. | |
4345 | * src/reader.at (readgram): Complain if the last rule is not ended | |
4346 | with a semi-colon. | |
4347 | ||
65ccf9fc AD |
4348 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4349 | ||
4350 | * src/warshall.h, src/warshall.c (bitmatrix_print): Move to... | |
4351 | * src/closure.c: here. | |
4352 | (set_firsts): Use bitsetv_reflexive_transitive_closure instead of | |
4353 | RTC. | |
4354 | * src/warshall.h, src/warshall.c: Remove. | |
4355 | * tests/sets.at (Broken Closure): Adjust. | |
4356 | ||
d0039cbc AD |
4357 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4358 | ||
4359 | * src/output.c (output_skeleton): tempdir is const. | |
4360 | bytes_read is unused. | |
4361 | ||
345cea78 AD |
4362 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4363 | ||
4364 | * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c, | |
4365 | * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c: | |
4366 | Update. | |
4367 | From Michael Hayes. | |
4368 | ||
564801f7 AD |
4369 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4370 | ||
4371 | * src/closure.c (closure): `r' is unused. | |
4372 | ||
e5352bc7 AD |
4373 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4374 | ||
4375 | * tests/sets.at (Broken Closure): Add the ending `;'. | |
4376 | * src/reader.at (readgram): Complain if a rule is not ended with a | |
4377 | semi-colon. | |
4378 | ||
914feea9 AD |
4379 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4380 | ||
4381 | * src/conflicts.c (set_conflicts): Use bitset_disjoint_p. | |
4382 | (count_sr_conflicts): Use bitset_count. | |
4383 | * src/reduce.c (inaccessable_symbols): Ditto. | |
4384 | (bits_size): Remove. | |
4385 | * src/warshall.h, src/warshall.c: Convert to bitsetv. | |
4386 | ||
f0250de6 AD |
4387 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4388 | ||
4389 | * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c, | |
4390 | * src/reduce.c: Remove the `bitset_zero's following the | |
4391 | `bitset_create's, as now it is performed by the latter. | |
4392 | ||
ef017502 AD |
4393 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4394 | ||
4395 | * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h, | |
4396 | * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h, | |
4397 | * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the | |
4398 | latest sources from Michael. | |
4399 | ||
76514394 AD |
4400 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4401 | ||
4402 | * src/output.c (output): Don't free the grammar. | |
4403 | * src/reader.c (grammar_free): New. | |
4404 | * src/main.c (main): Call it and don't free symtab here. | |
4405 | ||
55024580 AD |
4406 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4407 | ||
4408 | * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer | |
4409 | before returning. | |
4410 | Reported by Benoit Perrot. | |
4411 | ||
f9abaa2c AD |
4412 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4413 | ||
4414 | Use bitset operations when possible, not loops over bits. | |
4415 | ||
4416 | * src/conflicts.c (set_conflicts, count_sr_conflicts): Use | |
4417 | bitset_or. | |
4418 | * src/print.c (print_reductions): Use bitset_and, bitset_andn. | |
4419 | * src/reduce.c (useless_nonterminals): Formatting changes. | |
4420 | * src/warshall.c (TC): Use bitset_or. | |
4421 | ||
0e721e75 AD |
4422 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4423 | ||
4424 | * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused. | |
4425 | * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET): | |
4426 | Ditto. | |
4427 | ||
0fb1ffb1 AD |
4428 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4429 | ||
4430 | * src/lalr.c (F): Now a bitset*. | |
4431 | Adjust all dependencies. | |
4432 | ||
b86796bf AD |
4433 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4434 | ||
4435 | * src/conflicts.c (shiftset, lookaheadset): Now bitset. | |
4436 | Adjust all dependencies. | |
4437 | ||
602bbf31 AD |
4438 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4439 | ||
4440 | * src/L0.c, src/LR0.h (nstates): Be size_t. | |
4441 | Adjust comparisons (signed vs unsigned). | |
4442 | * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a | |
4443 | bitset*. | |
4444 | Adjust all dependencies. | |
4445 | ||
d8a0245c AD |
4446 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4447 | ||
4448 | * src/closure.c (firsts): Now, also a bitset. | |
4449 | Adjust all dependencies. | |
4450 | (varsetsize): Remove, now unused. | |
4451 | * src/warshall.h, src/warshall.c: Now work on arrays of bitsets. | |
4452 | ||
34ba9743 AD |
4453 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4454 | ||
4455 | * src/print.c: Convert to use bitset.h, not hand coded iterations | |
4456 | over ints. | |
4457 | ||
ed86e78c AD |
4458 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4459 | ||
4460 | * src/reduce.c: Convert to use bitset.h, not hand coded BSet. | |
4461 | ||
dfdb1797 AD |
4462 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4463 | ||
4464 | * src/closure.c (ruleset): Be a bitset. | |
4465 | (rulesetsize): Remove. | |
4466 | ||
7086e707 AD |
4467 | 2002-03-04 Akim Demaille <akim@epita.fr> |
4468 | ||
4469 | * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c, | |
4470 | * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, | |
4471 | * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New. | |
4472 | * src/closure.c (fderives): Be an array of bitsets. | |
4473 | ||
98254360 RA |
4474 | 2002-02-28 Robert Anisko <robert@lrde.epita.fr> |
4475 | ||
4476 | * data/bison.c++: Merge the two generated headers. Insert a copyright | |
4477 | notice in each output file. | |
4478 | ||
a75c057f AD |
4479 | 2002-02-28 Akim Demaille <akim@epita.fr> |
4480 | ||
4481 | * data/bison.c++: Copy the prologue of bison.simple to fetch | |
4482 | useful M4 definitions, such as b4_header_guard. | |
4483 | ||
06b00abc AD |
4484 | 2002-02-25 Akim Demaille <akim@epita.fr> |
4485 | ||
4486 | * src/getargs.c (version): Give the name of the authors, and use a | |
a75c057f AD |
4487 | translator friendly scheme for the bgr |
4488 | copyright notice. | |
06b00abc | 4489 | |
70e7d534 AD |
4490 | 2002-02-25 Akim Demaille <akim@epita.fr> |
4491 | ||
4492 | * src/output.c (header_output): Remove, now handled completely via | |
4493 | M4. | |
4494 | ||
abe017f6 AD |
4495 | 2002-02-25 Akim Demaille <akim@epita.fr> |
4496 | ||
4497 | * m4/m4.m4: New, from CVS Autoconf. | |
4498 | * configure.in: Invoke it. | |
4499 | * src/output.c (output_skeleton): Use its result instead of the | |
4500 | hard coded name. | |
4501 | ||
381fb12e AD |
4502 | 2002-02-25 Akim Demaille <akim@epita.fr> |
4503 | ||
4504 | * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from | |
4505 | Fileutils 4.1.5. | |
4506 | * configure.in: Invoke UTILS_FUNC_MKSTEMP. | |
4507 | * src/output.c (output_skeleton): Use mkstemp to create a real | |
4508 | temporary file. | |
4509 | Move the filling of `skeleton' and its muscle to... | |
4510 | (prepare): here. | |
4511 | (output): Move the definition of the prologue muscle to... | |
4512 | (prepare): here. | |
4513 | * src/system.h (DEFAULT_TMPDIR): New. | |
4514 | ||
6f38107f PE |
4515 | 2002-02-14 Paul Eggert <eggert@twinsun.com> |
4516 | ||
4517 | Remove the support for C++ namespace cleanliness; it was | |
4518 | causing more problems than it was curing, since it didn't work | |
4519 | properly on some nonstandard C++ compilers. This can wait | |
4520 | for a proper C++ parser. | |
4521 | ||
4522 | * NEWS: Document this. | |
4523 | * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention | |
4524 | of C++, as it's treated like C now. | |
4525 | * src/bison.simple (YYSTD): Remove. | |
4526 | (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL): | |
4527 | Treat C++ just like Standard C instead of trying to support | |
4528 | namespace cleanliness. | |
4529 | ||
80cce3da AD |
4530 | 2002-02-14 Akim Demaille <akim@epita.fr> |
4531 | ||
4532 | * tests/regression.at (else): Adjust to Andreas' change. | |
4533 | ||
842e8679 AD |
4534 | 2002-02-14 Akim Demaille <akim@epita.fr> |
4535 | ||
4536 | * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c. | |
4537 | ||
4bda3f10 AD |
4538 | 2002-02-13 Andreas Schwab <schwab@suse.de> |
4539 | ||
4540 | * src/output.c (output_rule_data): Don't output NULL, it might | |
4541 | not be defined yet. | |
4542 | ||
4162fa07 | 4543 | 2002-02-11 Robert Anisko <robert@lrde.epita.fr> |
b418ecd8 | 4544 | |
4162fa07 RA |
4545 | * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue. |
4546 | (Copyright notice): Update. | |
b418ecd8 | 4547 | |
bd16a5dc AD |
4548 | 2002-02-11 Akim Demaille <akim@epita.fr> |
4549 | ||
4550 | * tests/regression.at (%nonassoc and eof): Don't include | |
4551 | nonportable headers. | |
4552 | ||
8d69a1a3 RA |
4553 | 2002-02-08 Robert Anisko <robert@lrde.epita.fr> |
4554 | ||
4555 | * data/bison.c++: Correct error recovery. Make the user able to | |
4556 | initialize the starting location. | |
4557 | ||
9b2d0677 AD |
4558 | 2002-02-07 Akim Demaille <akim@epita.fr> |
4559 | ||
4560 | * tests/input.at: New. | |
4561 | ||
69e2658b RA |
4562 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
4563 | ||
4564 | * data/bison.c++: Replace some direct m4 expansions by constants. Be | |
9b2d0677 | 4565 | more consistent when naming methods and variables. Put preprocessor |
69e2658b RA |
4566 | directives around tables only needed for debugging. |
4567 | ||
4aacc3a7 RA |
4568 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
4569 | ||
4570 | * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in | |
4571 | C++ parsers. | |
4572 | (yy::b4_name::parse): Use print_. | |
4573 | ||
762a801e RA |
4574 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
4575 | ||
4576 | * data/bison.c++ (yy::b4_name::parse): Error recovery is back. | |
4577 | ||
4bb2bc3f RA |
4578 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
4579 | ||
4580 | * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in | |
4581 | C++ parsers. | |
4582 | (yy::b4_name::parse): Build verbose error messages, and use error_. | |
4583 | ||
6b45a3ca RA |
4584 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> |
4585 | ||
4586 | * data/bison.c++: Fix m4 quoting in comments. | |
4587 | ||
50997c6e RA |
4588 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> |
4589 | ||
4590 | * data/bison.c++: Adjust the parser code. Fix some muscles that were | |
4591 | not expanded by m4. | |
4592 | ||
3f3eed27 AD |
4593 | 2002-02-05 Akim Demaille <akim@epita.fr> |
4594 | ||
4595 | * data/bison.c++: Adjust to the M4 back end. | |
4596 | More is certainly needed. | |
4597 | ||
be2a1a68 AD |
4598 | 2002-02-05 Akim Demaille <akim@epita.fr> |
4599 | ||
4600 | Give a try to M4 as a back end. | |
4601 | ||
4602 | * lib/readpipe.c: New, from wdiff. | |
4603 | * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and | |
4604 | BISON_HAIRY. | |
4605 | * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS | |
4606 | specific values. Now it is m4 that performs the lookup. | |
4607 | * src/parse-skel.y: Remove. | |
4608 | * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New. | |
4609 | * src/output.c (actions_output, guards_output) | |
4610 | (token_definitions_output): No longer keeps track of the output | |
4611 | line number, hence remove the second argument. | |
4612 | (guards_output): Check against the guard member of a rule, not the | |
4613 | action member. | |
4614 | Adjust callers. | |
4615 | (output_skeleton): Don't look for the skeleton location, let m4 do | |
4616 | that. | |
4617 | Create `/tmp/muscles.m4'. This is temporary, a proper temporary | |
4618 | file will be used. | |
4619 | Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton. | |
4620 | (prepare): Given that for the time being changesyntax is not | |
4621 | usable in M4, rename the muscles using `-' to `_'. | |
4622 | Define `defines_flag', `output_parser_name' and `output_header_name'. | |
4623 | * src/output.h (actions_output, guards_output) | |
4624 | (token_definitions_output): Adjust prototypes. | |
4625 | * src/scan-skel.l: Instead of scanning the skeletons, it now | |
4626 | processes the output of m4: `__oline__' and `#output'. | |
4627 | * data/bison.simple: Adjust to be used by M4(sugar). | |
4628 | * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up | |
4629 | to date. | |
4630 | * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR' | |
4631 | instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'. | |
4632 | * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New, | |
4633 | shamelessly stolen from CVS Autoconf. | |
4634 | ||
beda758b AD |
4635 | 2002-02-05 Akim Demaille <akim@epita.fr> |
4636 | ||
4637 | * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version. | |
4638 | * configure.in: Check for the declarations of free and malloc. | |
4639 | * src/muscle_tab.c: Adjust. | |
4640 | ||
5ece6d43 AD |
4641 | 2002-02-05 Akim Demaille <akim@epita.fr> |
4642 | ||
4643 | * src/muscle_tab.c (muscle_init): Don't default to NULL muscle | |
4644 | which have no values. | |
4645 | ||
5bb18f9a AD |
4646 | 2002-02-05 Akim Demaille <akim@epita.fr> |
4647 | ||
4648 | * src/bison.simple, src/bison.hairy, src/bison.c++: Move to... | |
4649 | * data/: here. | |
4650 | ||
894dd62e PE |
4651 | 2002-01-29 Paul Eggert <eggert@twinsun.com> |
4652 | ||
4653 | * src/bison.simple (YYSIZE_T): Do not define merely because | |
4654 | YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined. | |
4655 | On some platforms, <alloca.h> does not declare YYSTD (size_t). | |
4656 | ||
82841af7 AD |
4657 | 2002-01-27 Akim Demaille <akim@epita.fr> |
4658 | ||
4659 | Fix `%nonassoc and eof'. | |
4660 | ||
4661 | * src/state.c (errs_dup): Aaaah! The failure was due to bytes | |
4662 | which were not properly copied! Replace | |
4663 | memcpy (res->errs, src->errs, src->nerrs); | |
4664 | with | |
4665 | memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0])); | |
4666 | !!! | |
4667 | * tests/regression.at (%nonassoc and eof): Adjust to newest | |
4668 | Autotest: `.' is not in the PATH. | |
4669 | ||
318b76e9 AD |
4670 | 2002-01-27 Akim Demaille <akim@epita.fr> |
4671 | ||
4672 | * tests/sets.at (AT_EXTRACT_SETS): New. | |
4673 | (Nullable): Use it. | |
4674 | (Firsts): New. | |
4675 | ||
30d2f3d5 AD |
4676 | 2002-01-26 Akim Demaille <akim@epita.fr> |
4677 | ||
4678 | * tests/actions.at, tests/calc.at, tests/headers.at, | |
4679 | * tests/torture.at: Adjust to the newest Autotest which no longer | |
4680 | forces `.' in the PATH. | |
4681 | ||
30f8c395 AD |
4682 | 2002-01-25 Akim Demaille <akim@epita.fr> |
4683 | ||
4684 | * tests/regression.at (%nonassoc and eof): New. | |
4685 | Suggested by Robert Anisko. | |
4686 | ||
29ae55f1 AD |
4687 | 2002-01-24 Akim Demaille <akim@epita.fr> |
4688 | ||
4689 | Bison dumps core when trying to complain about broken input files. | |
4690 | Reported by Cris van Pelt. | |
4691 | ||
4692 | * src/lex.c (parse_percent_token): Be sure to set token_buffer. | |
4693 | * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge | |
4694 | into... | |
4695 | (Invalid inputs): Strengthen: exercise parse_percent_token. | |
4696 | ||
2b548aa6 RA |
4697 | 2002-01-24 Robert Anisko <robert.anisko@epita.fr> |
4698 | ||
4699 | * src/Makefile.am: Add bison.c++. | |
4700 | * src/bison.c++: New skeleton. | |
4701 | ||
bb0146c2 AD |
4702 | 2002-01-21 Paolo Bonzini <bonzini@gnu.org> |
4703 | ||
4704 | * po/it.po: New. | |
4705 | ||
bec30531 AD |
4706 | 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net> |
4707 | ||
4708 | * src/files.c (skeleton_find) [MSDOS]: Fix cp definition. | |
4709 | ||
fc6edc45 MA |
4710 | 2002-01-20 Marc Autret <marc@gnu.org> |
4711 | ||
4712 | * src/files.c (compute_output_file_names): Fix | |
4713 | ||
5e5d5415 MA |
4714 | 2002-01-20 Marc Autret <marc@gnu.org> |
4715 | ||
4716 | * tests/output.at: New test. | |
4717 | * src/files.c (compute_base_names): Don't map extensions when | |
4718 | the YACC flag is set, use defaults. | |
4719 | Reported by Evgeny Stambulchik. | |
4720 | ||
44ea3fbd MA |
4721 | 2002-01-20 Marc Autret <marc@gnu.org> |
4722 | ||
bb0146c2 | 4723 | * src/system.h: Need to define __attribute__ away for non-GCC |
44ea3fbd MA |
4724 | compilers as well (i.e. the vendor C compiler). |
4725 | Suggested by Albert Chin-A-Young. | |
4726 | ||
338963d1 TVH |
4727 | 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be> |
4728 | ||
4729 | * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the | |
4730 | canonical definition. | |
4731 | * src/system.h: Use the canonical definition for PARAMS (avoids | |
4732 | a conflict with the macro from lib/hash.h). | |
4733 | ||
c57b2479 AD |
4734 | 2002-01-11 Akim Demaille <akim@epita.fr> |
4735 | ||
4736 | * configure.in: Use AC_FUNC_STRNLEN. | |
d9e9746c | 4737 | Fixes the failures observed on AIX 4.3 by H.Merijn Brand. |
c57b2479 | 4738 | |
b85810ae AD |
4739 | 2002-01-09 Akim Demaille <akim@epita.fr> |
4740 | ||
4741 | * src/files.c, src/files.h (output_infix): New. | |
4742 | (tab_extension): Remove. | |
4743 | (compute_base_names): Compute the former, drop the latter. | |
4744 | * src/output.c (prepare): Insert the muscles `output-infix', and | |
4745 | `output-suffix'. | |
4746 | * src/parse-skel.y (string, string.1): New. | |
4747 | (section.header): Use it. | |
4748 | (section.yacc): Remove. | |
4749 | (prefix): Remove too. | |
4750 | * src/scan-skel.l: Adjust. | |
4751 | * src/bison.simple, src/bison.hairy: Adjust. | |
4752 | ||
cae60122 AD |
4753 | 2002-01-09 Akim Demaille <akim@epita.fr> |
4754 | ||
4755 | * configure.in (WERROR_CFLAGS): Compute it. | |
4756 | * src/Makefile.am (CFLAGS): Pass it. | |
4757 | * tests/atlocal.in (CFLAGS): Idem. | |
4758 | * src/files.c: Fix a few warnings. | |
4759 | (get_extension_index): Remove, unused. | |
4760 | ||
ae404801 AD |
4761 | 2002-01-08 Akim Demaille <akim@epita.fr> |
4762 | ||
4763 | * src/getargs.c (AS_FILE_NAME): New. | |
4764 | (getargs): Use it to convert DOSish file names. | |
4765 | * src/files.c (base_name): Rename as full_base_name to avoid | |
4766 | clashes with `base_name ()'. | |
4767 | (filename_split): New. | |
4768 | (compute_base_names): N-th rewrite, using filename_split. | |
4769 | ||
22312b71 AD |
4770 | 2002-01-08 Akim Demaille <akim@epita.fr> |
4771 | ||
4772 | * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c: | |
4773 | New, stolen from the Fileutils 4.1. | |
4774 | * lib/Makefile.am (libbison_a_SOURCES): Adjust. | |
4775 | * configure.in: Check for the presence of memrchr, and of its | |
4776 | prototype. | |
4777 | ||
a67cef01 TVH |
4778 | 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be> |
4779 | ||
4780 | * lib/hash.h (__P): Added definition for this macro. | |
4781 | * src/Makefile.am: Add parse-skel.c and scan-skel.c to | |
4782 | BUILT_SOURCES, to ensure they are generated first. | |
4783 | * src/parse-skel.y: Use YYERROR_VERBOSE instead of | |
4784 | %error-verbose to allow bootstrapping with bison 1.30x. | |
4785 | ||
2b25d624 AD |
4786 | 2002-01-06 Akim Demaille <akim@epita.fr> |
4787 | ||
4788 | * src/reader.c (parse_braces): Don't fetch the next char, the | |
4789 | convention is to fetch on entry. | |
4790 | * tests/torture.at (GNU Cim Grammar): Reintroduce their weird | |
4791 | 'switch' without a following semicolon. | |
4792 | * tests/regression.at (braces parsing): New. | |
4793 | ||
3460813b AD |
4794 | 2002-01-06 Akim Demaille <akim@epita.fr> |
4795 | ||
4796 | Bison is dead wrong in its RR conflict reports. | |
4797 | ||
4798 | * tests/torture.at (GNU Cim Grammar): New. | |
4799 | * src/conflicts.c (count_rr_conflicts): Fix. | |
4800 | ||
73784c64 AD |
4801 | 2002-01-06 Akim Demaille <akim@epita.fr> |
4802 | ||
4803 | Creating package.m4 from configure.ac causes too many problems. | |
4804 | ||
4805 | * tests/Makefile.am (package.m4): Create it by hand, | |
4806 | AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf. | |
4807 | ||
25d81090 AD |
4808 | 2002-01-06 Akim Demaille <akim@epita.fr> |
4809 | ||
4810 | * src/Makefile.am (bison_SOURCES): Add parse-skel.h and | |
4811 | skeleton.h. | |
4812 | ||
a9b8959e PE |
4813 | 2002-01-04 Paul Eggert <eggert@twinsun.com> |
4814 | ||
4815 | * doc/bison.texinfo (Debugging): | |
4816 | Remove YYSTDERR; it's no longer defined or used. | |
4817 | Also, s/cstdio.h/cstdio/. | |
4818 | ||
25d81090 AD |
4819 | 2002-01-03 Akim Demaille <akim@epita.fr> |
4820 | ||
4821 | * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf. | |
4822 | ||
1109455c AD |
4823 | 2002-01-03 Akim Demaille <akim@epita.fr> |
4824 | ||
4825 | * src/parse-skel.y (process_skeleton): Don't bind the parser's | |
4826 | tracing code to --trace, wait for a better --trace option, with | |
4827 | args. | |
4828 | ||
7ea5e977 AD |
4829 | 2002-01-03 Akim Demaille <akim@epita.fr> |
4830 | ||
4831 | * src/bison.simple (YYSTDERR): Remove, replace `stderr'. | |
4832 | The ISO C++ standard is extremely clear about it: stderr is | |
4833 | considered a macro, not a regular symbol (see table 94 `Header | |
4834 | <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files). | |
4835 | Therefore std:: does not apply to it. It still does with fprintf. | |
4836 | Also, s/cstdio.h/cstdio/. | |
4837 | ||
fab5b110 AD |
4838 | 2002-01-03 Akim Demaille <akim@epita.fr> |
4839 | ||
4840 | * lib/quotearg.c: Use `#include "..."' instead of `#include <...>' | |
4841 | for non system headers. | |
4842 | ||
aed7fd9b AD |
4843 | 2002-01-02 Akim Demaille <akim@epita.fr> |
4844 | ||
4845 | Equip the skeleton chain with location tracking, runtime trace, | |
4846 | pure parser and scanner. | |
4847 | ||
4848 | * src/parse-skel.y: Request a pure parser, locations, and prefix | |
4849 | renaming. | |
4850 | (%union): Having several members with the same type does not help | |
4851 | type mismatches, simplify. | |
4852 | (YYPRINT, yyprint): New. | |
4853 | (yyerror): ``Rename'' (there is a #define yyerror skel_error) as... | |
4854 | (skel_error): this. | |
4855 | Handle locations. | |
4856 | * src/scan-skel.l: Adjust to these changes. | |
4857 | * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP) | |
4858 | (LOCATION_PRINT, skel_control_t): New. | |
4859 | ||
24fad99e AD |
4860 | 2001-12-30 Akim Demaille <akim@epita.fr> |
4861 | ||
4862 | * src/parse-skel.y: Get rid of the shift/reduce conflict: | |
4863 | replace `gb' with BLANKS. | |
4864 | * src/scan-skel.l: Adjust. | |
4865 | ||
a4b36db4 AD |
4866 | 2001-12-30 Akim Demaille <akim@epita.fr> |
4867 | ||
4868 | * src/system.h: We don't need nor want bcopy. | |
4869 | Throw away MS-DOS crap: we don't need getpid. | |
4870 | * configure.in: We don't need strndup. It was even causing | |
4871 | problems: because Flex includes the headers *before* us, | |
4872 | _GNU_SOURCE is not defined by config.h, and therefore strndup was | |
4873 | not visible. | |
4874 | * lib/xstrndup.c: New. | |
4875 | * src/scan-skel.l: Use it. | |
4876 | Be sure to initialize yylval.muscle member when scanning a MUSCLE. | |
4877 | * src/parse-skel.y: Use %directives instead of #defines. | |
4878 | ||
1239777d AD |
4879 | 2001-12-30 Akim Demaille <akim@epita.fr> |
4880 | ||
4881 | * src/skeleton.h: New. | |
4882 | * src/output.c (output_parser, output_master_parser): Remove, dead | |
4883 | code. | |
4884 | * src/output.h (get_lines_number, actions_output, guards_output) | |
4885 | (token_definitions_output): Prototype them. | |
4886 | * src/parse-skel.y: Add the license notice. | |
4887 | Include output.h and skeleton.h. | |
4888 | (process_skeleton): Returns void, and takes a single parameter. | |
4889 | * src/scan-skel.l: Add the license notice. | |
4890 | Include skeleton.h. | |
4891 | Don't use %option yylineno: it seems that then Flex imagines | |
4892 | REJECT has been used, and therefore it won't reallocate its | |
4893 | buffers (which makes no other sense to me than a bug). It results | |
4894 | in warnings for `unused: yy_flex_realloc'. | |
4895 | ||
9b3add5b RA |
4896 | 2001-12-30 Robert Anisko <robert.anisko@epita.fr> |
4897 | ||
4898 | * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
4899 | (MUSCLE_INSERT_PREFIX): ...to there. | |
4900 | * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
4901 | (MUSCLE_INSERT_PREFIX): Move from here... | |
4902 | ||
4903 | * src/bison.hairy: Add a section directive. Put braces around muscle | |
4904 | names. This parser skeleton is still broken, but Bison should not | |
4905 | choke on a bad muscle 'syntax'. | |
4906 | * src/bison.simple: Add a section directive. Put braces around muscle | |
4907 | names. | |
4908 | ||
4909 | * src/files.h (strsuffix, stringappend): Add declarations. | |
4910 | (tab_extension): Add declaration. | |
4911 | (short_base_name): Add declaration. | |
4912 | ||
4913 | * src/files.c (strsuffix, stringappend): No longer static. These | |
4914 | functions are used in the skeleton parser. | |
4915 | (tab_extension): New. | |
4916 | (compute_base_names): Use the computations done in this function | |
fab5b110 | 4917 | to guess if the generated parsers should have '.tab' in their |
9b3add5b RA |
4918 | names. |
4919 | (short_base_name): No longer static. | |
4920 | ||
4921 | * src/output.c (output_skeleton): New. | |
4922 | (output): Disable call to output_master_parser, and give a try to | |
4923 | a new skeleton handling system. | |
4924 | (guards_output, actions_output): No longer static. | |
4925 | (token_definitions_output, get_lines_number): No longer static. | |
4926 | ||
4927 | * configure.in: Use AM_PROG_LEX and AC_PROG_YACC. | |
4928 | ||
fab5b110 | 4929 | * src/Makefile.am (bison_SOURCES): Add scan-skel.l and |
9b3add5b RA |
4930 | parse-skel.y. |
4931 | ||
4932 | * src/parse-skel.y: New file. | |
4933 | * src/scan-skel.l: New file. | |
4934 | ||
b5b61c61 AD |
4935 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4936 | ||
4937 | %name-prefix is broken. | |
4938 | ||
4939 | * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy". | |
4940 | Adjust all dependencies. | |
4941 | * tests/headers.at (export YYLTYPE): Strengthen this test: use | |
4942 | %name-prefix. | |
4943 | ||
4944 | Renaming yylval but not yylloc is not consistent. Now we do. | |
4945 | ||
4946 | * src/bison.simple: Prefix yylloc if used. | |
4947 | * doc/bison.texinfo (Decl Summary): Document that. | |
4948 | ||
8c9a50be AD |
4949 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4950 | ||
4951 | * doc/bison.texinfo: Promote `%long-directive' over | |
4952 | `%long_directive'. | |
4953 | Remove all references to fixed-output-files, yacc is enough. | |
4954 | ||
d99361e6 AD |
4955 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4956 | ||
4957 | * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the | |
4958 | user prologue. These are defaults. | |
4959 | * tests/actions.at (Mid-rule actions): Make sure the user can | |
4960 | define YYDEBUG and YYERROR_VERBOSE. | |
4961 | ||
b9cecb91 AD |
4962 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4963 | ||
4964 | * src/output.c (header_output): Don't forget to export YYLTYPE and | |
4965 | yylloc. | |
4966 | * tests/headers.at (export YYLTYPE): New, make sure it does. | |
4967 | * tests/regression.at (%union and --defines, Invalid CPP headers): | |
4968 | Move to... | |
4969 | * tests/headers.at: here. | |
4970 | ||
aea13e97 AD |
4971 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4972 | ||
4973 | * src/gram.h (rule_s): Member `assoc' is of type `associativity'. | |
4974 | ||
931394cb AD |
4975 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4976 | ||
4977 | * tests/actions.at (Mid-rule actions): Output on a single line | |
4978 | instead of several. | |
4979 | ||
704a47c4 AD |
4980 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4981 | ||
4982 | * doc/bison.texinfo: Formatting changes. | |
4983 | ||
091e20bb AD |
4984 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4985 | ||
4986 | Don't store the token defs in a muscle, just be ready to output it | |
4987 | on command. Now possible via `symbols'. Fixes a memory leak. | |
4988 | ||
4989 | * src/output.c (token_definitions_output): New. | |
4990 | (output_parser, header_output): Use it. | |
4991 | * src/reader.c (symbols_save): Remove. | |
4992 | ||
cce71710 AD |
4993 | 2001-12-29 Akim Demaille <akim@epita.fr> |
4994 | ||
4995 | * src/bison.simple: Do not provide a default for YYSTYPE and | |
4996 | YYLTYPE before the user's prologue. Otherwise it's hardly... a | |
4997 | default. | |
4998 | ||
82c035a8 AD |
4999 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5000 | ||
5001 | Mid-rule actions are simply... ignored! | |
5002 | ||
5003 | * src/reader.c (readgram): Be sure to attach mid-rule actions to | |
5004 | the empty-rule associated to the dummy symbol, not to the host | |
5005 | rule. | |
5006 | * tests/actions.at (Mid-rule actions): New. | |
5007 | ||
8419d367 AD |
5008 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5009 | ||
5010 | Memory leak. | |
5011 | ||
5012 | * src/reader.c (reader): Free grammar. | |
5013 | ||
375d5806 AD |
5014 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5015 | ||
5016 | Memory leak. | |
5017 | ||
5018 | * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here, | |
5019 | since it allocates it for each state, although only one is needed. | |
5020 | (allocate_storage): Do it here. | |
5021 | ||
f51cb8ff AD |
5022 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5023 | ||
5024 | * src/options.h, src/options.c (create_long_option_table): Rename | |
5025 | as... | |
5026 | (long_option_table_new): this, with a clearer prototype. | |
5027 | (percent_table): Remove, unused, | |
5028 | * src/getargs.c (getargs): Adjust. | |
5029 | ||
29e88316 AD |
5030 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5031 | ||
5032 | * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c | |
5033 | * src/print.c, src/print_graph.c, src/state.h: Rename state_table | |
5034 | as states. | |
5035 | ||
b9f71f19 AD |
5036 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5037 | ||
5038 | * src/lalr.c (build_relations): Rename `states' as `states1'. | |
5039 | Sorry, I don't understand exactly what it is, no better name... | |
5040 | ||
1a2b5d37 AD |
5041 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5042 | ||
5043 | * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c | |
5044 | * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c | |
5045 | * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table | |
5046 | as rules. | |
5047 | ||
1cca533e AD |
5048 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5049 | ||
5050 | * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long | |
5051 | ago. | |
5052 | ||
c03ae966 AD |
5053 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5054 | ||
5055 | * src/reader.c, src/reader.h (user_toknums): Remove. | |
5056 | Adjust all users to use symbols[i]->user_token_number. | |
5057 | ||
5a670b1e AD |
5058 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5059 | ||
5060 | * src/gram.c, src/gram.h (sprec, sassoc): Remove. | |
5061 | Adjust all users to use symbols[i]->prec or ->assoc. | |
5062 | ||
ad949da9 AD |
5063 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5064 | ||
5065 | * src/reader.c, src/reader.h (tags): Remove. | |
5066 | Adjust all users to use symbols[i]->tag. | |
5067 | ||
0e78e603 AD |
5068 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5069 | ||
5070 | * src/gram.h, src/gram.c (symbols): New, similar to state_table | |
5071 | and rule_table. | |
5072 | * src/reader.c (packsymbols): Fill this table. | |
5073 | Drop sprec. | |
5074 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
5075 | * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a | |
5076 | single table. | |
5077 | Use symbols[i]->tag instead of tags[i]. | |
5078 | ||
213e640e AD |
5079 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5080 | ||
5081 | * tests/calc.at (_AT_DATA_CALC_Y): Also use %union. | |
5082 | In addition, put a comment in there, to replace... | |
5083 | * tests/regression.at (%union and C comments): Remove. | |
5084 | ||
e7b8bef1 AD |
5085 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5086 | ||
5087 | * tests/regression.at (Web2c Actions): Blindly move the actual | |
5088 | output as expected output. The contents *seem* right to me, but I | |
5089 | can't pretend reading perfectly parser tables... Nonetheless, all | |
5090 | the other tests pass correctly, the table look OK, even though the | |
5091 | presence of `$axiom' is to be noted: AFAICS it is useless (but | |
5092 | harmless). | |
5093 | ||
b68e7744 AD |
5094 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5095 | ||
5096 | * src/reader.c (readgram): Don't add the rule 0 if there were no | |
5097 | rules read. In other words, add it _after_ having performed | |
5098 | grammar sanity checks. | |
5099 | Fixes the `tests/regression.at (Invalid input: 1)' Failure. | |
5100 | ||
78d5bae9 AD |
5101 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5102 | ||
5103 | * tests/regression.at (Web2c Report): Catch up: the rule 0 is now | |
5104 | visible, and some states have now a different number. | |
5105 | ||
ff442794 AD |
5106 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5107 | ||
5108 | * src/reader.c (readgram): Bind the initial rule's lineno to that | |
5109 | of the first rule. | |
5110 | * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts): | |
5111 | (Solved SR Conflicts): Adjust rule 0's line number. | |
5112 | ||
610ab194 AD |
5113 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5114 | ||
5115 | Fix the `GAWK Grammar' failure. | |
5116 | ||
5117 | * src/LR0.c (final_state): Initialize to -1 so that we do compute | |
5118 | the reductions of the first state which was mistakenly confused | |
5119 | with the final state because precisely final_state was initialized | |
5120 | to 0. | |
5121 | * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads, | |
5122 | now noticed by Bison. | |
5123 | * tests/regression.at (Rule Line Numbers): Adjust: state 0 does | |
5124 | have a reduction on $default. | |
5125 | ||
29d29c8f AD |
5126 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5127 | ||
5128 | * src/gram.c (ritem_print): Be sure to subtract 1 when displaying | |
5129 | rule line numbers. | |
5130 | * src/closure.c (print_closure): Likewise. | |
5131 | * src/derives.c (print_derives): Likewise. | |
5132 | * tests/sets.at (Nullable): Adjust: the rule numbers are correct | |
5133 | now. | |
5134 | ||
7c6b64d0 AD |
5135 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5136 | ||
5137 | * src/lalr.c (lookaheads_print): New. | |
5138 | (lalr): Call it when --trace-flag. | |
5139 | * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads | |
5140 | are dumped. | |
5141 | ||
3d4daee3 AD |
5142 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5143 | ||
5144 | * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0', | |
5145 | when walking through ritem, even via rule->rhs. | |
5146 | * src/reduce.c (dump_grammar, useful_production, reduce_output) | |
5147 | (useful_production, useless_nonterminals): Likewise. | |
5148 | (reduce_grammar_tables): Likewise, plus update nritems. | |
5149 | * src/nullable.c (set_nullable): Likewise. | |
5150 | * src/lalr.c (build_relations): Likewise. | |
5151 | * tests/sets.at (Nullable): Adjust. | |
5152 | Fortunately, now, the $axiom is no longer nullable. | |
5153 | ||
9e7f6bbd AD |
5154 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5155 | ||
5156 | * src/LR0.c (generate_states): Use nritems, not nitems, nor using | |
5157 | the 0-sentinel. | |
5158 | * src/gram.c (ritem_longest_rhs): Likewise. | |
5159 | * src/reduce.c (nonterminals_reduce): Likewise. | |
5160 | * src/print_graph.c (print_graph): Likewise. | |
5161 | * src/output.c (output_rule_data): Likewise. | |
5162 | * src/nullable.c (set_nullable): Likewise. | |
5163 | ||
255ef638 AD |
5164 | 2001-12-29 Akim Demaille <akim@epita.fr> |
5165 | ||
5166 | * src/output.c: Comment changes. | |
5167 | ||
0d8a7363 AD |
5168 | 2001-12-27 Paul Eggert <eggert@twinsun.com> |
5169 | ||
5170 | * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special | |
5171 | cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and | |
5172 | Sparc, as they were causing more porting problems than the | |
5173 | (minor) performance improvement was worth. | |
5174 | ||
5175 | Also, catch up with 1.31's YYSTD. | |
5176 | ||
3db472b9 AD |
5177 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5178 | ||
5179 | * src/output.c (output_gram): Rely on nritems, not the | |
5180 | 0-sentinel. See below. | |
5181 | Use -1 as separator, not 0. | |
5182 | * src/bison.simple (yyparse): Subtract 1 to the rule numbers. | |
5183 | Rely on -1 as separator in yyrhs, instead of 0. | |
5184 | * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue | |
5185 | twice `Now at end of input', therefore there are two lines less to | |
5186 | expect. | |
5187 | ||
b365aa05 AD |
5188 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5189 | ||
5190 | * tests/regression.at (Unresolved SR Conflicts): | |
5191 | (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes | |
5192 | below. | |
5193 | ||
30171f79 AD |
5194 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5195 | ||
5196 | * src/LR0.c (new_state): Recognize the final state by the fact it | |
5197 | is reached by eoftoken. | |
5198 | (insert_start_shifting_state, insert_eof_shifting_state) | |
5199 | (insert_accepting_state, augment_automaton): Remove, since now | |
5200 | these states are automatically computed from the initial state. | |
5201 | (generate_states): Adjust. | |
5202 | * src/print.c: When reporting a rule number to the user, substract | |
5203 | 1, so that the axiom rule is rule 0, and the first user rule is 1. | |
5204 | * src/reduce.c: Likewise. | |
5205 | * src/print_graph.c (print_core): For the time being, just as for | |
5206 | the report, depend upon --trace-flags to dump the full set of | |
5207 | items. | |
5208 | * src/reader.c (readgram): Once the grammar read, insert the rule | |
5209 | 0: `$axiom: START-SYMBOL $'. | |
5210 | * tests/set.at: Adjust: rule 0 is now displayed, and since the | |
5211 | number of the states has changed (the final state is no longer | |
5212 | necessarily the last), catch up. | |
5213 | ||
75142d45 AD |
5214 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5215 | ||
5216 | Try to make the use of the eoftoken valid. Given that its value | |
5217 | is 0 which was also used as a sentinel in ritem, (i) make sure >= 0 | |
5218 | is used instead of > 0 where appropriate, (ii), depend upon nritems | |
5219 | instead of the 0-sentinel. | |
5220 | ||
5221 | * src/gram.h, src/gram.c (nritems): New. | |
5222 | Expected to be duplication of nitems, but for the time being... | |
5223 | * src/reader.c (packgram): Assert nritems and nitems are equal. | |
5224 | * src/LR0.c (allocate_itemsets, new_itemsets): Adjust. | |
5225 | * src/closure.c (print_closure, print_fderives): Likewise. | |
5226 | * src/gram.c (ritem_print): Likewise. | |
5227 | * src/print.c (print_core, print_grammar): Likewise. | |
5228 | * src/print_graph.c: Likewise. | |
5229 | ||
b7c49edf AD |
5230 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5231 | ||
5232 | * src/main.c (main): If there are complains after grammar | |
5233 | reductions, then output the report anyway if requested, then die. | |
5234 | * src/symtab.c (bucket_new): Initialize `value' to -1, not 0. | |
5235 | * src/reader.c (eoftoken): New. | |
5236 | (parse_token_decl): If the token being defined has value `0', it | |
5237 | is the eoftoken. | |
5238 | (packsymbols): No longer hack `tags' to insert `$' by hand. | |
5239 | Be sure to preserve the value of the eoftoken. | |
5240 | (reader): Make sure eoftoken is defined. | |
5241 | Initialize nsyms to 0: now eoftoken is created just like the others. | |
5242 | * src/print.c (print_grammar): Don't special case the eof token. | |
5243 | * src/regression.at: Adjust: `$' has value 0, not -1, which was a | |
5244 | lie anyway, albeit pleasant. | |
5245 | * tests/calc.at: Exercise error messages with eoftoken. | |
5246 | Change the grammar so that empty input is invalid. | |
5247 | Adjust expectations. | |
5248 | When yyungeting, be sure to use a valid yylloc: use last_yylloc. | |
5249 | ||
ec2da99f AD |
5250 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5251 | ||
5252 | * configure.in: Check the protos of strchr ans strspn. | |
5253 | Replace strchr if needed. | |
5254 | * src/system.h: Provide the protos of strchr, strspn and memchr if | |
5255 | missing. | |
5256 | * lib/strchr.c: New. | |
5257 | * src/reader.c (symbols_save): Use strchr. | |
5258 | ||
8adfa272 AD |
5259 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5260 | ||
5261 | * src/print.c, src/print_graph.c (escape): New. | |
5262 | Use it to quote the TAGS outputs. | |
5263 | * src/print_graph.c (print_state): Now errors are in red, and | |
5264 | reductions in green. | |
5265 | Prefer high to wide: output the state number on a line of its own. | |
5266 | ||
80dac38c AD |
5267 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5268 | ||
5269 | * src/state.h, src/state.c (reductions_new): New. | |
5270 | * src/LR0.c (set_state_table): Let all the states have a | |
5271 | `reductions', even if reduced to 0. | |
5272 | (save_reductions): Adjust. | |
5273 | * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust. | |
5274 | * src/print.c (print_reductions, print_actions): Adjust. | |
5275 | * src/output.c (action_row): Adjust. | |
5276 | ||
2cec70b9 AD |
5277 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5278 | ||
5279 | * src/state.h, src/state.c (errs_new, errs_dup): New. | |
5280 | * src/LR0.c (set_state_table): Let all the states have an errs, | |
5281 | even if reduced to 0. | |
5282 | * src/print.c (print_errs, print_reductions): Adjust. | |
5283 | * src/output.c (output_actions, action_row): Adjust. | |
5284 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
5285 | ||
13ca549a AD |
5286 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5287 | ||
5288 | * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL. | |
5289 | ||
5092aba5 AD |
5290 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5291 | ||
5292 | * src/conflicts.c, src/conflicts.h (print_reductions): Move to... | |
5293 | * src/print.c: here. | |
5294 | (lookaheadset, shiftset): New, used as additional storage by | |
5295 | print_reductions. | |
5296 | (print_results): Adjust. | |
5297 | (print_shifts, print_gotos, print_errs): New, extracted from... | |
5298 | (print_actions): here. | |
5299 | * src/print_graph.c (print_actions): Remove dead code. | |
5300 | ||
11e2beca AD |
5301 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5302 | ||
5303 | * src/reader.c (copy_dollar, copy_at): Better checking of `n' in | |
5304 | `$n' and `@n'. | |
5305 | ||
dac3c910 AD |
5306 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5307 | ||
5308 | * src/lalr.c (add_lookback_edge): Use state_t instead of ints. | |
5309 | (build_relations): Adjust. | |
5310 | ||
d0b0fefa AD |
5311 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5312 | ||
5313 | * src/lalr.c (set_goto_map): Remove a wrong but benign loop | |
5314 | duplication. | |
5315 | ||
adc8c848 AD |
5316 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5317 | ||
5318 | * src/reader.c (packgram): Catch nitems overflows. | |
5319 | ||
14d293ac AD |
5320 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5321 | ||
5322 | * src/files.c, src/files.h (guard_obstack): Remove. | |
5323 | * src/output.c (output): Adjust. | |
5324 | * src/reader.c (parse_braces): New, factoring... | |
5325 | (copy_action, copy_guard): these two which are renamed as... | |
5326 | (parse_action, parse_guard): these. | |
5327 | As a voluntary consequence, using braces around guards is now | |
5328 | mandatory. | |
5329 | ||
f499b062 AD |
5330 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5331 | ||
5332 | * src/gram.h (rule_t): `guard' and `guard_line' are new members. | |
5333 | * src/reader.c (symbol_list): `guard' and `guard_line' are new | |
5334 | members. | |
5335 | (symbol_list_new): Adjust. | |
5336 | (copy_action): action_line is the first line, not the last. | |
5337 | (copy_guard): Just as for actions, store the `action' only, not | |
5338 | the switch/case/break flesh. | |
5339 | Don't parse the user action that might follow the guard, let... | |
5340 | (readgram): do it, i.e., now, there can be an action after a | |
5341 | guard. | |
5342 | In other words the guard is just explicitly optional. | |
5343 | (packgram): Adjust. | |
5344 | * src/output.c (guards_output): New. | |
5345 | (output_parser): Call it when needed. | |
5346 | (output): Also free the guard and attrs obstacks. | |
5347 | * src/files.c, src/files.h (obstack_save): Remove. | |
5348 | (output_files): Remove. | |
5349 | As a result, if one needs the former `.act' file, using an | |
5350 | appropriate skeleton which requires actions and guards is now | |
5351 | required. | |
5352 | * src/main.c (main): Adjust. | |
5353 | * tests/semantic.at: New. | |
5354 | * tests/regression.at: Use `input.y' as input file name. | |
5355 | Avoid 8+3 problems by requiring input.c when the test needs the | |
5356 | parser. | |
5357 | ||
d945f5cd AD |
5358 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5359 | ||
5360 | * src/reader.c (symbol_list_new): Be sure to initialize all the | |
5361 | fields. | |
5362 | ||
d200e455 AD |
5363 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5364 | ||
5365 | All the hacks using a final pseudo state are now useless. | |
5366 | ||
5367 | * src/LR0.c (set_state_table): state_table holds exactly nstates. | |
5368 | * src/lalr.c (nLA): New. | |
5369 | (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it | |
5370 | instead of lookaheadsp from the pseudo state (nstate + 1). | |
5371 | ||
f9507c28 AD |
5372 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5373 | ||
5374 | * src/output.c (action_row, token_actions): Use a state_t instead | |
5375 | of a integer, and nlookaheads instead of the following state's | |
5376 | lookaheadsp. | |
5377 | ||
065fbd27 AD |
5378 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5379 | ||
5380 | * src/conflicts.c (log_resolution, flush_shift) | |
5381 | (resolve_sr_conflict, set_conflicts, solve_conflicts) | |
5382 | (count_sr_conflicts, count_rr_conflicts, conflicts_output) | |
5383 | (conflicts_print, print_reductions): Use a state_t instead of an | |
5384 | integer when referring to a state. | |
5385 | As much as possible, depend upon nlookaheads, instead of the | |
5386 | `lookaheadsp' member of the following state (since lookaheads of | |
5387 | successive states are successive, the difference between state n + 1 | |
5388 | and n served as the number of lookaheads for state n). | |
5389 | * src/lalr.c (add_lookback_edge): Likewise. | |
5390 | * src/print.c (print_core, print_actions, print_state) | |
5391 | (print_results): Likewise. | |
5392 | * src/print_graph.c (print_core, print_actions, print_state) | |
5393 | (print_graph): Likewise. | |
5394 | * src/conflicts.h: Adjust. | |
5395 | ||
1b177bd7 AD |
5396 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5397 | ||
5398 | * src/bison.hairy: Formatting/comment changes. | |
5399 | ANSIfy. | |
5400 | Remove `register' indications. | |
5401 | Add plenty of `static'. | |
5402 | ||
7742ddeb AD |
5403 | 2001-12-27 Akim Demaille <akim@epita.fr> |
5404 | ||
5405 | * src/output.c (prepare): Drop the muscle `ntbase' which | |
5406 | duplicates ntokens. | |
5407 | * src/bison.simple: Formatting/comment changes. | |
5408 | Use YYNTOKENS only, which is documented, but not YYNTBASE, which | |
5409 | is an undocumented synonym. | |
5410 | ||
1fa14068 AD |
5411 | 2001-12-22 Akim Demaille <akim@epita.fr> |
5412 | ||
5413 | * src/output.c (output_table_data): Change the prototype to use | |
5414 | `int' for array ranges: some invocations do pass an int, not a | |
5415 | short. | |
5416 | Reported by Wayne Green. | |
5417 | ||
b9752825 AD |
5418 | 2001-12-22 Akim Demaille <akim@epita.fr> |
5419 | ||
5420 | Some actions of web2c.y are improperly triggered. | |
5421 | Reported by Mike Castle. | |
5422 | ||
5423 | * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/. | |
5424 | * tests/regression.at (Web2c): Rename as... | |
5425 | (Web2c Report): this. | |
5426 | (Web2c Actions): New. | |
5427 | ||
776209d6 AD |
5428 | 2001-12-22 Akim Demaille <akim@epita.fr> |
5429 | ||
5430 | Reductions in web2c.y are improperly reported. | |
5431 | Reported by Mike Castle. | |
5432 | ||
5433 | * src/conflicts.c (print_reductions): Fix. | |
5434 | * tests/regression.at (Web2c): New. | |
5435 | ||
275fc3ad AD |
5436 | 2001-12-18 Akim Demaille <akim@epita.fr> |
5437 | ||
5438 | Some host fail on `assert (!"foo")', which expands to | |
5439 | ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__)) | |
5440 | Reported by Nelson Beebee. | |
5441 | ||
5442 | * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with | |
5443 | `#define it_succeeded 0' and `assert (it_succeeded)'. | |
5444 | ||
897668ee MA |
5445 | 2001-12-17 Marc Autret <autret_m@epita.fr> |
5446 | ||
5447 | * src/bison.simple: Don't hard code the skeleton line and filename. | |
5448 | * src/output.c (output_parser): Rename 'line' as 'output_line'. | |
5449 | New line counter 'skeleton_line' (skeleton-line muscle). | |
5450 | ||
ab3399e0 PE |
5451 | 2001-12-17 Paul Eggert <eggert@twinsun.com> |
5452 | ||
5453 | * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that | |
5454 | YYDEBUG must be defined to a nonzero value. | |
5455 | ||
5456 | * src/bison.simple (yytname): Do not assume that the user defines | |
5457 | YYDEBUG to a properly parenthesized expression. | |
5458 | ||
3877f72b AD |
5459 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5460 | ||
5461 | * src/state.h (state_t): Rename lookaheads as lookaheadsp. | |
5462 | nlookaheads is a new member. | |
5463 | Adjust all users. | |
5464 | * src/lalr.h (nlookaheads): Remove this orphan declaration. | |
5465 | * src/lalr.c (initialize_lookaheads): Set nlookaheads for each | |
5466 | state. | |
776209d6 | 5467 | |
331dbc1b AD |
5468 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5469 | ||
5470 | * src/files.h, src/files.c (open_files, close_files): Remove. | |
5471 | * src/main.c (main): Don't open/close files, nor invoke lex_free, | |
5472 | let... | |
5473 | * src/reader.c (reader): Do it. | |
776209d6 | 5474 | |
be750e4c AD |
5475 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5476 | ||
5477 | * src/conflicts.c (print_reductions): Formatting changes. | |
776209d6 | 5478 | |
709ae8c6 AD |
5479 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5480 | ||
5481 | * src/conflicts.c (flush_shift): Also adjust lookaheadset. | |
5482 | (flush_reduce): New. | |
5483 | (resolve_sr_conflict): Adjust. | |
776209d6 | 5484 | |
f87685c3 AD |
5485 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5486 | ||
5487 | * src/output.c (output_obstack): Be static and rename as... | |
5488 | (format_obstack): this, to avoid any confusion with files.c's | |
5489 | output_obstack. | |
5490 | * src/reader.h (muscle_obstack): Move to... | |
5491 | * src/output.h: here, since it's defined in output.c. | |
5492 | ||
837491d8 AD |
5493 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5494 | ||
5495 | * src/output.c (action_row, save_column, default_goto) | |
5496 | (sort_actions, matching_state, pack_vector): Better variable | |
5497 | locality. | |
5498 | ||
796d61fb AD |
5499 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5500 | ||
5501 | * src/output.c: Various formatting changes. | |
776209d6 | 5502 | |
64d15509 AD |
5503 | 2001-12-17 Akim Demaille <akim@epita.fr> |
5504 | ||
5505 | * src/files.c (output_files): Free the output_obstack. | |
5506 | * src/main.c (main): Call print and print_graph conditionally. | |
5507 | * src/print.c (print): Work unconditionally. | |
5508 | * src/print_graph.c (print_graph): Work unconditionally. | |
5509 | * src/conflicts.c (log_resolution): Output only if verbose_flag. | |
5510 | ||
fbc8ecb7 MA |
5511 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
5512 | ||
5513 | * src/output.c (actions_output): Fix. When we use %no-lines, | |
5514 | there is one less line per action. | |
5515 | ||
f0440388 MA |
5516 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
5517 | ||
5518 | * src/bison.simple: Remove a useless #line directive. | |
5519 | s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'. | |
5520 | * src/output.c (get_lines_number): New. | |
776209d6 | 5521 | (output_parser): Adjust, now takes care about the lines of a |
f0440388 MA |
5522 | output muscles. |
5523 | Fix line numbering. | |
5524 | (actions_output): Computes the number of lines taken by actions. | |
5525 | (output_master_parser): Insert new skeleton which is the name of | |
5526 | the output parser file name. | |
5527 | ||
a79986b8 MA |
5528 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
5529 | ||
5530 | * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility. | |
5531 | ||
4ec8e00f MA |
5532 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
5533 | ||
5534 | * src/output.c (output_gram): Keep track of the hairy one. | |
5535 | ||
1a4648ff AD |
5536 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5537 | ||
5538 | Make `make distcheck' work. | |
5539 | ||
5540 | * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses | |
5541 | system.h which uses libgettext.h. | |
5542 | ||
9c2c67e6 AD |
5543 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5544 | ||
5545 | * src/nullable.c (set_nullable): Useless rules must be skipped, | |
5546 | otherwise, since we range over their symbols, we might look at a | |
5547 | nonterminal which no longer ``exists'', i.e., it is not counted in | |
5548 | `nvars', hence we overflow our arrays. | |
5549 | ||
93ede233 AD |
5550 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5551 | ||
5552 | The header can also be produced directly, without any obstack! | |
5553 | Yahoo! | |
5554 | ||
5555 | * src/files.c, src/files.h (defines_obstack): Remove. | |
5556 | (compute_header_macro): Global. | |
5557 | (defines_obstack_save): Remove. | |
5558 | * src/reader.c (parse_union_decl): No longer output to | |
5559 | defines_obstack: its content can be found in the `stype' muscle | |
5560 | anyway. | |
5561 | (output_token_translations): Merge into... | |
5562 | (symbols_output): this. | |
5563 | Rename as... | |
5564 | (symbols_save): this. | |
5565 | (reader): Adjust. | |
5566 | * src/output.c (header_output): New. | |
5567 | (output): Call it. | |
5568 | ||
2666f928 AD |
5569 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5570 | ||
5571 | * src/reader.c (parse_union_decl): Instead of handling two obstack | |
5572 | simultaneously, use one to define the `stype' muscle, and use the | |
5573 | value of the latter to fill defines_obstack. | |
5574 | (copy_comment): Remove. | |
5575 | (copy_comment2): Work for a single obstack. | |
5576 | Rename as... | |
5577 | (copy_comment): this. | |
5578 | ||
428046f8 AD |
5579 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5580 | ||
5581 | * src/lex.c, src/lex.h (xgetc): No longer static. | |
5582 | * src/reader.c (parse_union_decl): Revamp. | |
5583 | ||
ea52d706 AD |
5584 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5585 | ||
5586 | Still making progress in separating Bison into (i) input, (ii) | |
5587 | process, (iii) output: now we can directly output the parser file | |
5588 | without using table_obstack at all. | |
5589 | ||
5590 | * src/files.c, src/files.h (table_obstack): Bye bye. | |
5591 | (parser_file_name): New. | |
5592 | * src/files.c (compute_output_file_names): Compute it. | |
5593 | * src/output.c (actions_output, output_parser) | |
5594 | (output_master_parser): To a file instead of an obstack. | |
5595 | ||
3f96f4dc AD |
5596 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5597 | ||
5598 | Attach actions to rules, instead of pre-outputting them to | |
5599 | actions_obstack. | |
5600 | ||
5601 | * src/gram.h (rule_t): action and action_line are new members. | |
5602 | * src/reader.c (symbol_list): Likewise. | |
5603 | (copy_action): Save the actions within the rule. | |
5604 | (packgram): Save them in rule_table. | |
5605 | * src/output.c (actions_output): New. | |
5606 | (output_parser): Use it on `%%actions'. | |
5607 | (output_rule_data): Don't free rule_table. | |
5608 | (output): Do it. | |
5609 | (prepare): Don't save the `action' muscle. | |
5610 | * src/bison.simple: s/%%action/%%actions/. | |
5611 | ||
51576fb3 AD |
5612 | 2001-12-15 Akim Demaille <akim@epita.fr> |
5613 | ||
5614 | * src/reader.c (copy_action): When --yacc, don't append a `;' | |
5615 | to the user action: let it fail if lacking. | |
dee049eb | 5616 | Suggested by Arnold Robbins and Tom Tromey. |
51576fb3 | 5617 | |
2648a72d AD |
5618 | 2001-12-14 Akim Demaille <akim@epita.fr> |
5619 | ||
5620 | * src/lex.c (literalchar): Simply return the char you decoded, non | |
5621 | longer mess around with obstacks and int pointers. | |
5622 | Adjust all callers. | |
5623 | ||
92790e5b AD |
5624 | 2001-12-14 Akim Demaille <akim@epita.fr> |
5625 | ||
5626 | * src/lex.c (literalchar): Don't escape the special characters, | |
5627 | just decode them, and keep them as char (before, eol was output as | |
5628 | the 2 char string `\n' etc.). | |
5629 | * src/output.c (output_rule_data): Use quotearg to output the | |
5630 | token strings. | |
5631 | ||
927c1557 PE |
5632 | 2001-12-13 Paul Eggert <eggert@twinsun.com> |
5633 | ||
5634 | * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE): | |
5635 | Do not infringe on the global user namespace when using C++. | |
5636 | (YYFPRINTF, YYSTDERR): New macros, needed for the above. | |
5637 | All uses of `fprintf' and `stderr' changed. | |
5638 | ||
5639 | * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR. | |
5640 | ||
ed8e1f68 AD |
5641 | 2001-12-13 Akim Demaille <akim@epita.fr> |
5642 | ||
5643 | The computation of nullable is broken: it doesn't handle empty | |
5644 | RHS's properly. | |
5645 | ||
5646 | * tests/torture.at (GNU AWK Grammar): New. | |
5647 | * tests/sets.at (Nullable): New. | |
5648 | * src/nullable.c (set_nullable): Instead of blindly looping over | |
5649 | `ritems', loop over the rules, and then over their rhs's. | |
5650 | ||
5651 | Work around Autotest bugs. | |
5652 | ||
5653 | * src/warshall.c (bitmatrix_print): Don't use `+--+' as table | |
5654 | frame, because Autotest understand lines starting with a `+' as | |
5655 | traces from the shell. Then, they are not processed properly. | |
5656 | Admittedly an Autotest bug, but we don't have time to wait for | |
5657 | Autotest to catch up. | |
5658 | * tests/regression.at (Broken Closure): Adjust to the new table | |
5659 | frames. | |
5660 | Move to... | |
5661 | * tests/sets.at: here. | |
5662 | ||
cb581495 AD |
5663 | 2001-12-13 Akim Demaille <akim@epita.fr> |
5664 | ||
5665 | * src/closure.c (closure): Use nrules instead of playing tricks | |
5666 | with BITS_PER_WORD. | |
5667 | ||
2e729273 AD |
5668 | 2001-12-13 Akim Demaille <akim@epita.fr> |
5669 | ||
5670 | * src/print.c (print_actions): Output the handling of `$' as the | |
5671 | traces do: shifting the token EOF. Before EOF was treated as a | |
5672 | nonterminal. | |
5673 | * tests/regression.at: Adjust some tests. | |
5674 | * src/print_graph.c (print_core): Complete the set of items via | |
5675 | closure. The next-to-final and final states are still unsatisfying, | |
5676 | but that's to be addressed elsewhere. | |
5677 | No longer output the rule numbers, but do output the state number. | |
5678 | A single loop for the shifts + gotos is enough, but picked a | |
5679 | distinct color for each. | |
5680 | (print_graph): Initialize and finalize closure. | |
5681 | ||
107f7dfb AD |
5682 | 2001-12-13 Akim Demaille <akim@epita.fr> |
5683 | ||
5684 | * src/reader.c (readgram): Remove dead code, an strip useless | |
5685 | braces. | |
5686 | (get_type): Remove, unused. | |
5687 | ||
9b53a24f AD |
5688 | 2001-12-12 Akim Demaille <akim@epita.fr> |
5689 | ||
5690 | * src/complain.h, src/complain.c: Remove error_one_per_line, rely | |
5691 | on that of lib/error.c. | |
5692 | ||
dbfb6dcd AD |
5693 | 2001-12-12 Akim Demaille <akim@epita.fr> |
5694 | ||
5695 | Some hosts don't like `/' in includes. | |
5696 | ||
5697 | * src/system.h: Include libgettext.h without qualifying the path. | |
5698 | * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove | |
5699 | $(top_srcdir). | |
5700 | ||
c25fb648 MA |
5701 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
5702 | ||
5703 | * src/output.c (output_parser): Remove useless muscle. | |
5704 | ||
710ddc4f MA |
5705 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
5706 | ||
5707 | * src/bison.simple: Remove #line just before %%epilogue. It | |
5708 | is now handled in ... | |
5709 | * src/reader.c (read_additionnal_code): Add the output of a | |
5710 | #line for the epilogue. | |
5711 | ||
e83d80b8 MA |
5712 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
5713 | ||
927c1557 | 5714 | * src/reader.c (copy_definition): Re-use CPP-outed code which |
e83d80b8 MA |
5715 | replace precedent remove. |
5716 | * src/bison.simple: Remove #line before %%prologue because | |
5717 | %%input-line is wrong at this time. | |
5718 | ||
971d5158 MA |
5719 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
5720 | ||
5721 | * src/reader.c (symbols_output): Clean up. | |
927c1557 | 5722 | * src/output.c (output_gram, output): Clean up. |
971d5158 | 5723 | |
5edafffd AD |
5724 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5725 | ||
5726 | * src/lalr.c (initialize_lookaheads): New. Extracted from... | |
5727 | * src/LR0.c (set_state_table): here. | |
5728 | * src/lalr.c (lalr): Call it. | |
5729 | ||
0279f8e9 AD |
5730 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5731 | ||
5732 | * src/state.h (shifts): Remove the `number' member: shifts are | |
5733 | attached to state, hence no longer need to be labelled with a | |
5734 | state number. | |
5735 | ||
190c4f5f AD |
5736 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5737 | ||
5738 | Now that states have a complete set of members, the linked list of | |
5739 | shifts is useless: just fill directly the state's shifts member. | |
5740 | ||
5741 | * src/state.h (shifts): Remove the `next' member. | |
5742 | * src/LR0.c (first_state, last_state): Remove. | |
5743 | Adjust the callers. | |
5744 | (augment_automaton): Don't look for the shifts that must be added | |
5745 | a shift on EOF: it is those of the state we looked for! But now, | |
5746 | since shifts are attached, it is no longer needed to looking | |
5747 | merely by its id: its number. | |
5748 | ||
2a73b93d AD |
5749 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5750 | ||
5751 | * src/LR0.c (augment_automaton): Better variable locality. | |
5752 | Remove an impossible branch: if there is a state corresponding to | |
5753 | the start symbol being shifted, then there is shift for the start | |
5754 | symbol from the initial state. | |
5755 | ||
74392f6a AD |
5756 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5757 | ||
5758 | * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state' | |
5759 | only when appropriate: when insert_start_shifting_state' is not | |
5760 | invoked. | |
5761 | * tests/regression.at (Rule Line Numbers): Adjust. | |
5762 | ||
37c82725 AD |
5763 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5764 | ||
5765 | * src/LR0.c (augment_automaton): Now that all states have shifts, | |
5766 | merge the two cases addition shifts to the initial state. | |
5767 | ||
6a164e0c AD |
5768 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5769 | ||
5770 | * src/lalr.c (set_state_table): Move to... | |
5771 | * src/LR0.c: here. | |
5772 | * src/lalr.c (lalr): Don't call it... | |
5773 | * src/LR0.c (generate_states): do it. | |
5774 | * src/LR0.h (first_state): Remove, only the table is used. | |
5775 | ||
7215de24 AD |
5776 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5777 | ||
5778 | * src/LR0.h (first_shift, first_reduction): Remove. | |
5779 | * src/lalr.c: Don't use first_shift: find shifts through the | |
5780 | states. | |
5781 | ||
80e25d4d AD |
5782 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5783 | ||
5784 | * src/LR0.c: Attach shifts to states as soon as they are | |
5785 | computed. | |
5786 | * src/lalr.c (set_state_table): Instead of assigning shifts to | |
5787 | state, just assert that the mapping was properly done. | |
5788 | ||
0ab3728b AD |
5789 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5790 | ||
5791 | * src/LR0.c (insert_start_shift): Rename as... | |
5792 | (insert_start_shifting_state): this. | |
5793 | (insert_eof_shifting_state, insert_accepting_state): New. | |
5794 | (augment_automaton): Adjust. | |
5795 | Better locality of the variables. | |
5796 | When looking if the start_symbol is shifted from the initial | |
5797 | state, using `while (... symbol != start_symbol ...)' sounds | |
5798 | better than `while (... symbol < start_symbol ...)': If fail | |
5799 | to see how the order between symbols could be relevant! | |
5800 | ||
78af9bbc AD |
5801 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5802 | ||
5803 | * src/getargs.h: Don't declare `spec_name_prefix' and | |
5804 | `spec_file_prefix', declared by src/files.h. | |
5805 | * src/files.c, src/files.h: Default for spec_name_prefix is "yy". | |
5806 | * src/muscle_tab.c (muscle_init): Default prefix to NULL. | |
5807 | * src/output.c (prepare): Adjust. | |
5808 | * src/reader.c (symbols_output): Likewise. | |
5809 | * src/vmsgetargs.c: Vaguely adjust, but who cares? | |
5810 | ||
bdef2a41 AD |
5811 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5812 | ||
5813 | * src/muscle_tab.c (muscle_init): NULL is a better default than | |
5814 | `"0"'. | |
5815 | ||
3735969c AD |
5816 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5817 | ||
5818 | * src/reader.c (reader): Calling symbols_output once is enough. | |
5819 | ||
49701457 AD |
5820 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5821 | ||
5822 | Now that states have a complete set of members, the linked list of | |
5823 | reductions is useless: just fill directly the state's reductions | |
5824 | member. | |
5825 | ||
5826 | * src/state.h (struct reductions): Remove member `number' and | |
5827 | `next'. | |
5828 | * src/LR0.c (first_reduction, last_reduction): Remove. | |
5829 | (save_reductions): Don't link the new reductions, store them in | |
5830 | this_state. | |
5831 | * src/lalr.c (set_state_table): No need to attach reductions to | |
5832 | states, it's already done. | |
5833 | * src/output.c (output_actions): No longer free the shifts, then | |
5834 | the reductions, then the states: free all the states and their | |
5835 | members. | |
5836 | ||
0edad749 AD |
5837 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5838 | ||
5839 | * src/options.c (OPTN, DRTV, BOTH): New. | |
5840 | (option_table): Use them. | |
5841 | ||
0edad749 AD |
5842 | * src/muscle_tab.c: Don't include xalloc.h and string.h: that's |
5843 | the job of system.h. | |
5844 | * src/options.c: Don't include stdio.h and xalloc.h for the same | |
5845 | reasons. | |
5846 | ||
5449dd0f AD |
5847 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5848 | ||
5849 | * src/output.c (output, prepare): Make sure the values of the | |
5850 | muscles `action' and `prologue' are 0-terminated. | |
5851 | ||
a870c567 AD |
5852 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5853 | ||
5854 | Clean up GCC warnings. | |
5855 | ||
5856 | * src/reader.c (copy_action): `buf' is not used. | |
5857 | (parse_skel_decl): Be static. | |
5858 | * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. | |
5859 | * src/options.h (create_long_option_table): Have a real prototype. | |
5860 | * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) | |
5861 | (hash_delete_at): Return const void *. | |
5862 | Adjust casts to preserve the const. | |
5863 | ||
80df8768 AD |
5864 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5865 | ||
5866 | * configure.in: Require 2.52g. | |
5867 | M4 is not needed, but AUTOM4TE is. | |
5868 | * m4/m4.m4: Remove. | |
5869 | * tests/Makefile.am: Adjust. | |
5870 | ||
f693ad14 AD |
5871 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5872 | ||
5873 | One structure for states is enough, even though theoretically | |
5874 | there are LR(0) states and LALR(1) states. | |
5875 | ||
5876 | * src/lalr.h (state_t): Remove. | |
5877 | (state_table): Be state_t **, not state_t *. | |
5878 | * src/state.h (core, CORE_ALLOC): Rename as... | |
5879 | (state_t, STATE_ALLOC): this. | |
5880 | Add the LALR(1) members: shifts, reductions, errs. | |
5881 | * src/LR0.c (state_table): Rename as... | |
5882 | (state_hash): this, to avoid name clashes with the global | |
5883 | `state_table'. | |
5884 | * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c | |
5885 | * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust. | |
5886 | ||
74ffbcb6 AD |
5887 | 2001-12-10 Akim Demaille <akim@epita.fr> |
5888 | ||
5889 | Bison dumps core on bash.y. | |
5890 | Reported by Pascal Bart. | |
5891 | ||
5892 | * src/warshall.c (bitmatrix_print): New. | |
5893 | (TC): Use it. | |
5894 | When performing a transitive closure R(i, j) && R(j, k) => R(i, k), | |
5895 | j must be the outer loop. | |
5896 | * tests/regression.at (Broken Closure): New. | |
5897 | ||
07708e19 AD |
5898 | 2001-12-05 Akim Demaille <akim@epita.fr> |
5899 | ||
5900 | * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and | |
5901 | its argument. | |
5902 |