]>
Commit | Line | Data |
---|---|---|
1 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
2 | ||
3 | * src/closure.c (firsts): Now, also a bitset. | |
4 | Adjust all dependencies. | |
5 | (varsetsize): Remove, now unused. | |
6 | * src/warshall.h, src/warshall.c: Now work on arrays of bitsets. | |
7 | ||
8 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
9 | ||
10 | * src/print.c: Convert to use bitset.h, not hand coded iterations | |
11 | over ints. | |
12 | ||
13 | ||
14 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
15 | ||
16 | * src/reduce.c: Convert to use bitset.h, not hand coded BSet. | |
17 | ||
18 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
19 | ||
20 | * src/closure.c (ruleset): Be a bitset. | |
21 | (rulesetsize): Remove. | |
22 | ||
23 | ||
24 | 2002-03-04 Akim Demaille <akim@epita.fr> | |
25 | ||
26 | * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c, | |
27 | * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, | |
28 | * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New. | |
29 | * src/closure.c (fderives): Be an array of bitsets. | |
30 | ||
31 | 2002-02-28 Robert Anisko <robert@lrde.epita.fr> | |
32 | ||
33 | * data/bison.c++: Merge the two generated headers. Insert a copyright | |
34 | notice in each output file. | |
35 | ||
36 | 2002-02-28 Akim Demaille <akim@epita.fr> | |
37 | ||
38 | * data/bison.c++: Copy the prologue of bison.simple to fetch | |
39 | useful M4 definitions, such as b4_header_guard. | |
40 | ||
41 | 2002-02-25 Akim Demaille <akim@epita.fr> | |
42 | ||
43 | * src/getargs.c (version): Give the name of the authors, and use a | |
44 | translator friendly scheme for the bgr | |
45 | copyright notice. | |
46 | ||
47 | 2002-02-25 Akim Demaille <akim@epita.fr> | |
48 | ||
49 | * src/output.c (header_output): Remove, now handled completely via | |
50 | M4. | |
51 | ||
52 | 2002-02-25 Akim Demaille <akim@epita.fr> | |
53 | ||
54 | * m4/m4.m4: New, from CVS Autoconf. | |
55 | * configure.in: Invoke it. | |
56 | * src/output.c (output_skeleton): Use its result instead of the | |
57 | hard coded name. | |
58 | ||
59 | 2002-02-25 Akim Demaille <akim@epita.fr> | |
60 | ||
61 | * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from | |
62 | Fileutils 4.1.5. | |
63 | * configure.in: Invoke UTILS_FUNC_MKSTEMP. | |
64 | * src/output.c (output_skeleton): Use mkstemp to create a real | |
65 | temporary file. | |
66 | Move the filling of `skeleton' and its muscle to... | |
67 | (prepare): here. | |
68 | (output): Move the definition of the prologue muscle to... | |
69 | (prepare): here. | |
70 | * src/system.h (DEFAULT_TMPDIR): New. | |
71 | ||
72 | 2002-02-14 Paul Eggert <eggert@twinsun.com> | |
73 | ||
74 | Remove the support for C++ namespace cleanliness; it was | |
75 | causing more problems than it was curing, since it didn't work | |
76 | properly on some nonstandard C++ compilers. This can wait | |
77 | for a proper C++ parser. | |
78 | ||
79 | * NEWS: Document this. | |
80 | * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention | |
81 | of C++, as it's treated like C now. | |
82 | * src/bison.simple (YYSTD): Remove. | |
83 | (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL): | |
84 | Treat C++ just like Standard C instead of trying to support | |
85 | namespace cleanliness. | |
86 | ||
87 | 2002-02-14 Akim Demaille <akim@epita.fr> | |
88 | ||
89 | * tests/regression.at (else): Adjust to Andreas' change. | |
90 | ||
91 | 2002-02-14 Akim Demaille <akim@epita.fr> | |
92 | ||
93 | * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c. | |
94 | ||
95 | 2002-02-13 Andreas Schwab <schwab@suse.de> | |
96 | ||
97 | * src/output.c (output_rule_data): Don't output NULL, it might | |
98 | not be defined yet. | |
99 | ||
100 | 2002-02-11 Robert Anisko <robert@lrde.epita.fr> | |
101 | ||
102 | * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue. | |
103 | (Copyright notice): Update. | |
104 | ||
105 | 2002-02-11 Akim Demaille <akim@epita.fr> | |
106 | ||
107 | * tests/regression.at (%nonassoc and eof): Don't include | |
108 | nonportable headers. | |
109 | ||
110 | 2002-02-08 Robert Anisko <robert@lrde.epita.fr> | |
111 | ||
112 | * data/bison.c++: Correct error recovery. Make the user able to | |
113 | initialize the starting location. | |
114 | ||
115 | 2002-02-07 Akim Demaille <akim@epita.fr> | |
116 | ||
117 | * tests/input.at: New. | |
118 | ||
119 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> | |
120 | ||
121 | * data/bison.c++: Replace some direct m4 expansions by constants. Be | |
122 | more consistent when naming methods and variables. Put preprocessor | |
123 | directives around tables only needed for debugging. | |
124 | ||
125 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> | |
126 | ||
127 | * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in | |
128 | C++ parsers. | |
129 | (yy::b4_name::parse): Use print_. | |
130 | ||
131 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> | |
132 | ||
133 | * data/bison.c++ (yy::b4_name::parse): Error recovery is back. | |
134 | ||
135 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> | |
136 | ||
137 | * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in | |
138 | C++ parsers. | |
139 | (yy::b4_name::parse): Build verbose error messages, and use error_. | |
140 | ||
141 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> | |
142 | ||
143 | * data/bison.c++: Fix m4 quoting in comments. | |
144 | ||
145 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> | |
146 | ||
147 | * data/bison.c++: Adjust the parser code. Fix some muscles that were | |
148 | not expanded by m4. | |
149 | ||
150 | 2002-02-05 Akim Demaille <akim@epita.fr> | |
151 | ||
152 | * data/bison.c++: Adjust to the M4 back end. | |
153 | More is certainly needed. | |
154 | ||
155 | 2002-02-05 Akim Demaille <akim@epita.fr> | |
156 | ||
157 | Give a try to M4 as a back end. | |
158 | ||
159 | * lib/readpipe.c: New, from wdiff. | |
160 | * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and | |
161 | BISON_HAIRY. | |
162 | * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS | |
163 | specific values. Now it is m4 that performs the lookup. | |
164 | * src/parse-skel.y: Remove. | |
165 | * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New. | |
166 | * src/output.c (actions_output, guards_output) | |
167 | (token_definitions_output): No longer keeps track of the output | |
168 | line number, hence remove the second argument. | |
169 | (guards_output): Check against the guard member of a rule, not the | |
170 | action member. | |
171 | Adjust callers. | |
172 | (output_skeleton): Don't look for the skeleton location, let m4 do | |
173 | that. | |
174 | Create `/tmp/muscles.m4'. This is temporary, a proper temporary | |
175 | file will be used. | |
176 | Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton. | |
177 | (prepare): Given that for the time being changesyntax is not | |
178 | usable in M4, rename the muscles using `-' to `_'. | |
179 | Define `defines_flag', `output_parser_name' and `output_header_name'. | |
180 | * src/output.h (actions_output, guards_output) | |
181 | (token_definitions_output): Adjust prototypes. | |
182 | * src/scan-skel.l: Instead of scanning the skeletons, it now | |
183 | processes the output of m4: `__oline__' and `#output'. | |
184 | * data/bison.simple: Adjust to be used by M4(sugar). | |
185 | * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up | |
186 | to date. | |
187 | * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR' | |
188 | instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'. | |
189 | * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New, | |
190 | shamelessly stolen from CVS Autoconf. | |
191 | ||
192 | 2002-02-05 Akim Demaille <akim@epita.fr> | |
193 | ||
194 | * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version. | |
195 | * configure.in: Check for the declarations of free and malloc. | |
196 | * src/muscle_tab.c: Adjust. | |
197 | ||
198 | 2002-02-05 Akim Demaille <akim@epita.fr> | |
199 | ||
200 | * src/muscle_tab.c (muscle_init): Don't default to NULL muscle | |
201 | which have no values. | |
202 | ||
203 | 2002-02-05 Akim Demaille <akim@epita.fr> | |
204 | ||
205 | * src/bison.simple, src/bison.hairy, src/bison.c++: Move to... | |
206 | * data/: here. | |
207 | ||
208 | 2002-01-29 Paul Eggert <eggert@twinsun.com> | |
209 | ||
210 | * src/bison.simple (YYSIZE_T): Do not define merely because | |
211 | YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined. | |
212 | On some platforms, <alloca.h> does not declare YYSTD (size_t). | |
213 | ||
214 | 2002-01-27 Akim Demaille <akim@epita.fr> | |
215 | ||
216 | Fix `%nonassoc and eof'. | |
217 | ||
218 | * src/state.c (errs_dup): Aaaah! The failure was due to bytes | |
219 | which were not properly copied! Replace | |
220 | memcpy (res->errs, src->errs, src->nerrs); | |
221 | with | |
222 | memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0])); | |
223 | !!! | |
224 | * tests/regression.at (%nonassoc and eof): Adjust to newest | |
225 | Autotest: `.' is not in the PATH. | |
226 | ||
227 | 2002-01-27 Akim Demaille <akim@epita.fr> | |
228 | ||
229 | * tests/sets.at (AT_EXTRACT_SETS): New. | |
230 | (Nullable): Use it. | |
231 | (Firsts): New. | |
232 | ||
233 | 2002-01-26 Akim Demaille <akim@epita.fr> | |
234 | ||
235 | * tests/actions.at, tests/calc.at, tests/headers.at, | |
236 | * tests/torture.at: Adjust to the newest Autotest which no longer | |
237 | forces `.' in the PATH. | |
238 | ||
239 | 2002-01-25 Akim Demaille <akim@epita.fr> | |
240 | ||
241 | * tests/regression.at (%nonassoc and eof): New. | |
242 | Suggested by Robert Anisko. | |
243 | ||
244 | 2002-01-24 Akim Demaille <akim@epita.fr> | |
245 | ||
246 | Bison dumps core when trying to complain about broken input files. | |
247 | Reported by Cris van Pelt. | |
248 | ||
249 | * src/lex.c (parse_percent_token): Be sure to set token_buffer. | |
250 | * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge | |
251 | into... | |
252 | (Invalid inputs): Strengthen: exercise parse_percent_token. | |
253 | ||
254 | 2002-01-24 Robert Anisko <robert.anisko@epita.fr> | |
255 | ||
256 | * src/Makefile.am: Add bison.c++. | |
257 | * src/bison.c++: New skeleton. | |
258 | ||
259 | 2002-01-21 Paolo Bonzini <bonzini@gnu.org> | |
260 | ||
261 | * po/it.po: New. | |
262 | ||
263 | 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net> | |
264 | ||
265 | * src/files.c (skeleton_find) [MSDOS]: Fix cp definition. | |
266 | ||
267 | 2002-01-20 Marc Autret <marc@gnu.org> | |
268 | ||
269 | * src/files.c (compute_output_file_names): Fix | |
270 | ||
271 | 2002-01-20 Marc Autret <marc@gnu.org> | |
272 | ||
273 | * tests/output.at: New test. | |
274 | * src/files.c (compute_base_names): Don't map extensions when | |
275 | the YACC flag is set, use defaults. | |
276 | Reported by Evgeny Stambulchik. | |
277 | ||
278 | 2002-01-20 Marc Autret <marc@gnu.org> | |
279 | ||
280 | * src/system.h: Need to define __attribute__ away for non-GCC | |
281 | compilers as well (i.e. the vendor C compiler). | |
282 | Suggested by Albert Chin-A-Young. | |
283 | ||
284 | 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be> | |
285 | ||
286 | * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the | |
287 | canonical definition. | |
288 | * src/system.h: Use the canonical definition for PARAMS (avoids | |
289 | a conflict with the macro from lib/hash.h). | |
290 | ||
291 | 2002-01-11 Akim Demaille <akim@epita.fr> | |
292 | ||
293 | * configure.in: Use AC_FUNC_STRNLEN. | |
294 | Fixes the failures observed on AIX 4.3 by H.Merijn Brand. | |
295 | ||
296 | 2002-01-09 Akim Demaille <akim@epita.fr> | |
297 | ||
298 | * src/files.c, src/files.h (output_infix): New. | |
299 | (tab_extension): Remove. | |
300 | (compute_base_names): Compute the former, drop the latter. | |
301 | * src/output.c (prepare): Insert the muscles `output-infix', and | |
302 | `output-suffix'. | |
303 | * src/parse-skel.y (string, string.1): New. | |
304 | (section.header): Use it. | |
305 | (section.yacc): Remove. | |
306 | (prefix): Remove too. | |
307 | * src/scan-skel.l: Adjust. | |
308 | * src/bison.simple, src/bison.hairy: Adjust. | |
309 | ||
310 | 2002-01-09 Akim Demaille <akim@epita.fr> | |
311 | ||
312 | * configure.in (WERROR_CFLAGS): Compute it. | |
313 | * src/Makefile.am (CFLAGS): Pass it. | |
314 | * tests/atlocal.in (CFLAGS): Idem. | |
315 | * src/files.c: Fix a few warnings. | |
316 | (get_extension_index): Remove, unused. | |
317 | ||
318 | 2002-01-08 Akim Demaille <akim@epita.fr> | |
319 | ||
320 | * src/getargs.c (AS_FILE_NAME): New. | |
321 | (getargs): Use it to convert DOSish file names. | |
322 | * src/files.c (base_name): Rename as full_base_name to avoid | |
323 | clashes with `base_name ()'. | |
324 | (filename_split): New. | |
325 | (compute_base_names): N-th rewrite, using filename_split. | |
326 | ||
327 | 2002-01-08 Akim Demaille <akim@epita.fr> | |
328 | ||
329 | * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c: | |
330 | New, stolen from the Fileutils 4.1. | |
331 | * lib/Makefile.am (libbison_a_SOURCES): Adjust. | |
332 | * configure.in: Check for the presence of memrchr, and of its | |
333 | prototype. | |
334 | ||
335 | 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be> | |
336 | ||
337 | * lib/hash.h (__P): Added definition for this macro. | |
338 | * src/Makefile.am: Add parse-skel.c and scan-skel.c to | |
339 | BUILT_SOURCES, to ensure they are generated first. | |
340 | * src/parse-skel.y: Use YYERROR_VERBOSE instead of | |
341 | %error-verbose to allow bootstrapping with bison 1.30x. | |
342 | ||
343 | 2002-01-06 Akim Demaille <akim@epita.fr> | |
344 | ||
345 | * src/reader.c (parse_braces): Don't fetch the next char, the | |
346 | convention is to fetch on entry. | |
347 | * tests/torture.at (GNU Cim Grammar): Reintroduce their weird | |
348 | 'switch' without a following semicolon. | |
349 | * tests/regression.at (braces parsing): New. | |
350 | ||
351 | 2002-01-06 Akim Demaille <akim@epita.fr> | |
352 | ||
353 | Bison is dead wrong in its RR conflict reports. | |
354 | ||
355 | * tests/torture.at (GNU Cim Grammar): New. | |
356 | * src/conflicts.c (count_rr_conflicts): Fix. | |
357 | ||
358 | 2002-01-06 Akim Demaille <akim@epita.fr> | |
359 | ||
360 | Creating package.m4 from configure.ac causes too many problems. | |
361 | ||
362 | * tests/Makefile.am (package.m4): Create it by hand, | |
363 | AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf. | |
364 | ||
365 | 2002-01-06 Akim Demaille <akim@epita.fr> | |
366 | ||
367 | * src/Makefile.am (bison_SOURCES): Add parse-skel.h and | |
368 | skeleton.h. | |
369 | ||
370 | 2002-01-04 Paul Eggert <eggert@twinsun.com> | |
371 | ||
372 | * doc/bison.texinfo (Debugging): | |
373 | Remove YYSTDERR; it's no longer defined or used. | |
374 | Also, s/cstdio.h/cstdio/. | |
375 | ||
376 | 2002-01-03 Akim Demaille <akim@epita.fr> | |
377 | ||
378 | * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf. | |
379 | ||
380 | 2002-01-03 Akim Demaille <akim@epita.fr> | |
381 | ||
382 | * src/parse-skel.y (process_skeleton): Don't bind the parser's | |
383 | tracing code to --trace, wait for a better --trace option, with | |
384 | args. | |
385 | ||
386 | 2002-01-03 Akim Demaille <akim@epita.fr> | |
387 | ||
388 | * src/bison.simple (YYSTDERR): Remove, replace `stderr'. | |
389 | The ISO C++ standard is extremely clear about it: stderr is | |
390 | considered a macro, not a regular symbol (see table 94 `Header | |
391 | <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files). | |
392 | Therefore std:: does not apply to it. It still does with fprintf. | |
393 | Also, s/cstdio.h/cstdio/. | |
394 | ||
395 | 2002-01-03 Akim Demaille <akim@epita.fr> | |
396 | ||
397 | * lib/quotearg.c: Use `#include "..."' instead of `#include <...>' | |
398 | for non system headers. | |
399 | ||
400 | 2002-01-02 Akim Demaille <akim@epita.fr> | |
401 | ||
402 | Equip the skeleton chain with location tracking, runtime trace, | |
403 | pure parser and scanner. | |
404 | ||
405 | * src/parse-skel.y: Request a pure parser, locations, and prefix | |
406 | renaming. | |
407 | (%union): Having several members with the same type does not help | |
408 | type mismatches, simplify. | |
409 | (YYPRINT, yyprint): New. | |
410 | (yyerror): ``Rename'' (there is a #define yyerror skel_error) as... | |
411 | (skel_error): this. | |
412 | Handle locations. | |
413 | * src/scan-skel.l: Adjust to these changes. | |
414 | * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP) | |
415 | (LOCATION_PRINT, skel_control_t): New. | |
416 | ||
417 | 2001-12-30 Akim Demaille <akim@epita.fr> | |
418 | ||
419 | * src/parse-skel.y: Get rid of the shift/reduce conflict: | |
420 | replace `gb' with BLANKS. | |
421 | * src/scan-skel.l: Adjust. | |
422 | ||
423 | 2001-12-30 Akim Demaille <akim@epita.fr> | |
424 | ||
425 | * src/system.h: We don't need nor want bcopy. | |
426 | Throw away MS-DOS crap: we don't need getpid. | |
427 | * configure.in: We don't need strndup. It was even causing | |
428 | problems: because Flex includes the headers *before* us, | |
429 | _GNU_SOURCE is not defined by config.h, and therefore strndup was | |
430 | not visible. | |
431 | * lib/xstrndup.c: New. | |
432 | * src/scan-skel.l: Use it. | |
433 | Be sure to initialize yylval.muscle member when scanning a MUSCLE. | |
434 | * src/parse-skel.y: Use %directives instead of #defines. | |
435 | ||
436 | 2001-12-30 Akim Demaille <akim@epita.fr> | |
437 | ||
438 | * src/skeleton.h: New. | |
439 | * src/output.c (output_parser, output_master_parser): Remove, dead | |
440 | code. | |
441 | * src/output.h (get_lines_number, actions_output, guards_output) | |
442 | (token_definitions_output): Prototype them. | |
443 | * src/parse-skel.y: Add the license notice. | |
444 | Include output.h and skeleton.h. | |
445 | (process_skeleton): Returns void, and takes a single parameter. | |
446 | * src/scan-skel.l: Add the license notice. | |
447 | Include skeleton.h. | |
448 | Don't use %option yylineno: it seems that then Flex imagines | |
449 | REJECT has been used, and therefore it won't reallocate its | |
450 | buffers (which makes no other sense to me than a bug). It results | |
451 | in warnings for `unused: yy_flex_realloc'. | |
452 | ||
453 | 2001-12-30 Robert Anisko <robert.anisko@epita.fr> | |
454 | ||
455 | * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
456 | (MUSCLE_INSERT_PREFIX): ...to there. | |
457 | * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
458 | (MUSCLE_INSERT_PREFIX): Move from here... | |
459 | ||
460 | * src/bison.hairy: Add a section directive. Put braces around muscle | |
461 | names. This parser skeleton is still broken, but Bison should not | |
462 | choke on a bad muscle 'syntax'. | |
463 | * src/bison.simple: Add a section directive. Put braces around muscle | |
464 | names. | |
465 | ||
466 | * src/files.h (strsuffix, stringappend): Add declarations. | |
467 | (tab_extension): Add declaration. | |
468 | (short_base_name): Add declaration. | |
469 | ||
470 | * src/files.c (strsuffix, stringappend): No longer static. These | |
471 | functions are used in the skeleton parser. | |
472 | (tab_extension): New. | |
473 | (compute_base_names): Use the computations done in this function | |
474 | to guess if the generated parsers should have '.tab' in their | |
475 | names. | |
476 | (short_base_name): No longer static. | |
477 | ||
478 | * src/output.c (output_skeleton): New. | |
479 | (output): Disable call to output_master_parser, and give a try to | |
480 | a new skeleton handling system. | |
481 | (guards_output, actions_output): No longer static. | |
482 | (token_definitions_output, get_lines_number): No longer static. | |
483 | ||
484 | * configure.in: Use AM_PROG_LEX and AC_PROG_YACC. | |
485 | ||
486 | * src/Makefile.am (bison_SOURCES): Add scan-skel.l and | |
487 | parse-skel.y. | |
488 | ||
489 | * src/parse-skel.y: New file. | |
490 | * src/scan-skel.l: New file. | |
491 | ||
492 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
493 | ||
494 | %name-prefix is broken. | |
495 | ||
496 | * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy". | |
497 | Adjust all dependencies. | |
498 | * tests/headers.at (export YYLTYPE): Strengthen this test: use | |
499 | %name-prefix. | |
500 | ||
501 | Renaming yylval but not yylloc is not consistent. Now we do. | |
502 | ||
503 | * src/bison.simple: Prefix yylloc if used. | |
504 | * doc/bison.texinfo (Decl Summary): Document that. | |
505 | ||
506 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
507 | ||
508 | * doc/bison.texinfo: Promote `%long-directive' over | |
509 | `%long_directive'. | |
510 | Remove all references to fixed-output-files, yacc is enough. | |
511 | ||
512 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
513 | ||
514 | * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the | |
515 | user prologue. These are defaults. | |
516 | * tests/actions.at (Mid-rule actions): Make sure the user can | |
517 | define YYDEBUG and YYERROR_VERBOSE. | |
518 | ||
519 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
520 | ||
521 | * src/output.c (header_output): Don't forget to export YYLTYPE and | |
522 | yylloc. | |
523 | * tests/headers.at (export YYLTYPE): New, make sure it does. | |
524 | * tests/regression.at (%union and --defines, Invalid CPP headers): | |
525 | Move to... | |
526 | * tests/headers.at: here. | |
527 | ||
528 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
529 | ||
530 | * src/gram.h (rule_s): Member `assoc' is of type `associativity'. | |
531 | ||
532 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
533 | ||
534 | * tests/actions.at (Mid-rule actions): Output on a single line | |
535 | instead of several. | |
536 | ||
537 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
538 | ||
539 | * doc/bison.texinfo: Formatting changes. | |
540 | ||
541 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
542 | ||
543 | Don't store the token defs in a muscle, just be ready to output it | |
544 | on command. Now possible via `symbols'. Fixes a memory leak. | |
545 | ||
546 | * src/output.c (token_definitions_output): New. | |
547 | (output_parser, header_output): Use it. | |
548 | * src/reader.c (symbols_save): Remove. | |
549 | ||
550 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
551 | ||
552 | * src/bison.simple: Do not provide a default for YYSTYPE and | |
553 | YYLTYPE before the user's prologue. Otherwise it's hardly... a | |
554 | default. | |
555 | ||
556 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
557 | ||
558 | Mid-rule actions are simply... ignored! | |
559 | ||
560 | * src/reader.c (readgram): Be sure to attach mid-rule actions to | |
561 | the empty-rule associated to the dummy symbol, not to the host | |
562 | rule. | |
563 | * tests/actions.at (Mid-rule actions): New. | |
564 | ||
565 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
566 | ||
567 | Memory leak. | |
568 | ||
569 | * src/reader.c (reader): Free grammar. | |
570 | ||
571 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
572 | ||
573 | Memory leak. | |
574 | ||
575 | * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here, | |
576 | since it allocates it for each state, although only one is needed. | |
577 | (allocate_storage): Do it here. | |
578 | ||
579 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
580 | ||
581 | * src/options.h, src/options.c (create_long_option_table): Rename | |
582 | as... | |
583 | (long_option_table_new): this, with a clearer prototype. | |
584 | (percent_table): Remove, unused, | |
585 | * src/getargs.c (getargs): Adjust. | |
586 | ||
587 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
588 | ||
589 | * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c | |
590 | * src/print.c, src/print_graph.c, src/state.h: Rename state_table | |
591 | as states. | |
592 | ||
593 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
594 | ||
595 | * src/lalr.c (build_relations): Rename `states' as `states1'. | |
596 | Sorry, I don't understand exactly what it is, no better name... | |
597 | ||
598 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
599 | ||
600 | * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c | |
601 | * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c | |
602 | * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table | |
603 | as rules. | |
604 | ||
605 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
606 | ||
607 | * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long | |
608 | ago. | |
609 | ||
610 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
611 | ||
612 | * src/reader.c, src/reader.h (user_toknums): Remove. | |
613 | Adjust all users to use symbols[i]->user_token_number. | |
614 | ||
615 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
616 | ||
617 | * src/gram.c, src/gram.h (sprec, sassoc): Remove. | |
618 | Adjust all users to use symbols[i]->prec or ->assoc. | |
619 | ||
620 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
621 | ||
622 | * src/reader.c, src/reader.h (tags): Remove. | |
623 | Adjust all users to use symbols[i]->tag. | |
624 | ||
625 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
626 | ||
627 | * src/gram.h, src/gram.c (symbols): New, similar to state_table | |
628 | and rule_table. | |
629 | * src/reader.c (packsymbols): Fill this table. | |
630 | Drop sprec. | |
631 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
632 | * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a | |
633 | single table. | |
634 | Use symbols[i]->tag instead of tags[i]. | |
635 | ||
636 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
637 | ||
638 | * tests/calc.at (_AT_DATA_CALC_Y): Also use %union. | |
639 | In addition, put a comment in there, to replace... | |
640 | * tests/regression.at (%union and C comments): Remove. | |
641 | ||
642 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
643 | ||
644 | * tests/regression.at (Web2c Actions): Blindly move the actual | |
645 | output as expected output. The contents *seem* right to me, but I | |
646 | can't pretend reading perfectly parser tables... Nonetheless, all | |
647 | the other tests pass correctly, the table look OK, even though the | |
648 | presence of `$axiom' is to be noted: AFAICS it is useless (but | |
649 | harmless). | |
650 | ||
651 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
652 | ||
653 | * src/reader.c (readgram): Don't add the rule 0 if there were no | |
654 | rules read. In other words, add it _after_ having performed | |
655 | grammar sanity checks. | |
656 | Fixes the `tests/regression.at (Invalid input: 1)' Failure. | |
657 | ||
658 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
659 | ||
660 | * tests/regression.at (Web2c Report): Catch up: the rule 0 is now | |
661 | visible, and some states have now a different number. | |
662 | ||
663 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
664 | ||
665 | * src/reader.c (readgram): Bind the initial rule's lineno to that | |
666 | of the first rule. | |
667 | * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts): | |
668 | (Solved SR Conflicts): Adjust rule 0's line number. | |
669 | ||
670 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
671 | ||
672 | Fix the `GAWK Grammar' failure. | |
673 | ||
674 | * src/LR0.c (final_state): Initialize to -1 so that we do compute | |
675 | the reductions of the first state which was mistakenly confused | |
676 | with the final state because precisely final_state was initialized | |
677 | to 0. | |
678 | * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads, | |
679 | now noticed by Bison. | |
680 | * tests/regression.at (Rule Line Numbers): Adjust: state 0 does | |
681 | have a reduction on $default. | |
682 | ||
683 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
684 | ||
685 | * src/gram.c (ritem_print): Be sure to subtract 1 when displaying | |
686 | rule line numbers. | |
687 | * src/closure.c (print_closure): Likewise. | |
688 | * src/derives.c (print_derives): Likewise. | |
689 | * tests/sets.at (Nullable): Adjust: the rule numbers are correct | |
690 | now. | |
691 | ||
692 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
693 | ||
694 | * src/lalr.c (lookaheads_print): New. | |
695 | (lalr): Call it when --trace-flag. | |
696 | * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads | |
697 | are dumped. | |
698 | ||
699 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
700 | ||
701 | * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0', | |
702 | when walking through ritem, even via rule->rhs. | |
703 | * src/reduce.c (dump_grammar, useful_production, reduce_output) | |
704 | (useful_production, useless_nonterminals): Likewise. | |
705 | (reduce_grammar_tables): Likewise, plus update nritems. | |
706 | * src/nullable.c (set_nullable): Likewise. | |
707 | * src/lalr.c (build_relations): Likewise. | |
708 | * tests/sets.at (Nullable): Adjust. | |
709 | Fortunately, now, the $axiom is no longer nullable. | |
710 | ||
711 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
712 | ||
713 | * src/LR0.c (generate_states): Use nritems, not nitems, nor using | |
714 | the 0-sentinel. | |
715 | * src/gram.c (ritem_longest_rhs): Likewise. | |
716 | * src/reduce.c (nonterminals_reduce): Likewise. | |
717 | * src/print_graph.c (print_graph): Likewise. | |
718 | * src/output.c (output_rule_data): Likewise. | |
719 | * src/nullable.c (set_nullable): Likewise. | |
720 | ||
721 | 2001-12-29 Akim Demaille <akim@epita.fr> | |
722 | ||
723 | * src/output.c: Comment changes. | |
724 | ||
725 | 2001-12-27 Paul Eggert <eggert@twinsun.com> | |
726 | ||
727 | * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special | |
728 | cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and | |
729 | Sparc, as they were causing more porting problems than the | |
730 | (minor) performance improvement was worth. | |
731 | ||
732 | Also, catch up with 1.31's YYSTD. | |
733 | ||
734 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
735 | ||
736 | * src/output.c (output_gram): Rely on nritems, not the | |
737 | 0-sentinel. See below. | |
738 | Use -1 as separator, not 0. | |
739 | * src/bison.simple (yyparse): Subtract 1 to the rule numbers. | |
740 | Rely on -1 as separator in yyrhs, instead of 0. | |
741 | * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue | |
742 | twice `Now at end of input', therefore there are two lines less to | |
743 | expect. | |
744 | ||
745 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
746 | ||
747 | * tests/regression.at (Unresolved SR Conflicts): | |
748 | (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes | |
749 | below. | |
750 | ||
751 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
752 | ||
753 | * src/LR0.c (new_state): Recognize the final state by the fact it | |
754 | is reached by eoftoken. | |
755 | (insert_start_shifting_state, insert_eof_shifting_state) | |
756 | (insert_accepting_state, augment_automaton): Remove, since now | |
757 | these states are automatically computed from the initial state. | |
758 | (generate_states): Adjust. | |
759 | * src/print.c: When reporting a rule number to the user, substract | |
760 | 1, so that the axiom rule is rule 0, and the first user rule is 1. | |
761 | * src/reduce.c: Likewise. | |
762 | * src/print_graph.c (print_core): For the time being, just as for | |
763 | the report, depend upon --trace-flags to dump the full set of | |
764 | items. | |
765 | * src/reader.c (readgram): Once the grammar read, insert the rule | |
766 | 0: `$axiom: START-SYMBOL $'. | |
767 | * tests/set.at: Adjust: rule 0 is now displayed, and since the | |
768 | number of the states has changed (the final state is no longer | |
769 | necessarily the last), catch up. | |
770 | ||
771 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
772 | ||
773 | Try to make the use of the eoftoken valid. Given that its value | |
774 | is 0 which was also used as a sentinel in ritem, (i) make sure >= 0 | |
775 | is used instead of > 0 where appropriate, (ii), depend upon nritems | |
776 | instead of the 0-sentinel. | |
777 | ||
778 | * src/gram.h, src/gram.c (nritems): New. | |
779 | Expected to be duplication of nitems, but for the time being... | |
780 | * src/reader.c (packgram): Assert nritems and nitems are equal. | |
781 | * src/LR0.c (allocate_itemsets, new_itemsets): Adjust. | |
782 | * src/closure.c (print_closure, print_fderives): Likewise. | |
783 | * src/gram.c (ritem_print): Likewise. | |
784 | * src/print.c (print_core, print_grammar): Likewise. | |
785 | * src/print_graph.c: Likewise. | |
786 | ||
787 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
788 | ||
789 | * src/main.c (main): If there are complains after grammar | |
790 | reductions, then output the report anyway if requested, then die. | |
791 | * src/symtab.c (bucket_new): Initialize `value' to -1, not 0. | |
792 | * src/reader.c (eoftoken): New. | |
793 | (parse_token_decl): If the token being defined has value `0', it | |
794 | is the eoftoken. | |
795 | (packsymbols): No longer hack `tags' to insert `$' by hand. | |
796 | Be sure to preserve the value of the eoftoken. | |
797 | (reader): Make sure eoftoken is defined. | |
798 | Initialize nsyms to 0: now eoftoken is created just like the others. | |
799 | * src/print.c (print_grammar): Don't special case the eof token. | |
800 | * src/regression.at: Adjust: `$' has value 0, not -1, which was a | |
801 | lie anyway, albeit pleasant. | |
802 | * tests/calc.at: Exercise error messages with eoftoken. | |
803 | Change the grammar so that empty input is invalid. | |
804 | Adjust expectations. | |
805 | When yyungeting, be sure to use a valid yylloc: use last_yylloc. | |
806 | ||
807 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
808 | ||
809 | * configure.in: Check the protos of strchr ans strspn. | |
810 | Replace strchr if needed. | |
811 | * src/system.h: Provide the protos of strchr, strspn and memchr if | |
812 | missing. | |
813 | * lib/strchr.c: New. | |
814 | * src/reader.c (symbols_save): Use strchr. | |
815 | ||
816 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
817 | ||
818 | * src/print.c, src/print_graph.c (escape): New. | |
819 | Use it to quote the TAGS outputs. | |
820 | * src/print_graph.c (print_state): Now errors are in red, and | |
821 | reductions in green. | |
822 | Prefer high to wide: output the state number on a line of its own. | |
823 | ||
824 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
825 | ||
826 | * src/state.h, src/state.c (reductions_new): New. | |
827 | * src/LR0.c (set_state_table): Let all the states have a | |
828 | `reductions', even if reduced to 0. | |
829 | (save_reductions): Adjust. | |
830 | * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust. | |
831 | * src/print.c (print_reductions, print_actions): Adjust. | |
832 | * src/output.c (action_row): Adjust. | |
833 | ||
834 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
835 | ||
836 | * src/state.h, src/state.c (errs_new, errs_dup): New. | |
837 | * src/LR0.c (set_state_table): Let all the states have an errs, | |
838 | even if reduced to 0. | |
839 | * src/print.c (print_errs, print_reductions): Adjust. | |
840 | * src/output.c (output_actions, action_row): Adjust. | |
841 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
842 | ||
843 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
844 | ||
845 | * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL. | |
846 | ||
847 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
848 | ||
849 | * src/conflicts.c, src/conflicts.h (print_reductions): Move to... | |
850 | * src/print.c: here. | |
851 | (lookaheadset, shiftset): New, used as additional storage by | |
852 | print_reductions. | |
853 | (print_results): Adjust. | |
854 | (print_shifts, print_gotos, print_errs): New, extracted from... | |
855 | (print_actions): here. | |
856 | * src/print_graph.c (print_actions): Remove dead code. | |
857 | ||
858 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
859 | ||
860 | * src/reader.c (copy_dollar, copy_at): Better checking of `n' in | |
861 | `$n' and `@n'. | |
862 | ||
863 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
864 | ||
865 | * src/lalr.c (add_lookback_edge): Use state_t instead of ints. | |
866 | (build_relations): Adjust. | |
867 | ||
868 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
869 | ||
870 | * src/lalr.c (set_goto_map): Remove a wrong but benign loop | |
871 | duplication. | |
872 | ||
873 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
874 | ||
875 | * src/reader.c (packgram): Catch nitems overflows. | |
876 | ||
877 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
878 | ||
879 | * src/files.c, src/files.h (guard_obstack): Remove. | |
880 | * src/output.c (output): Adjust. | |
881 | * src/reader.c (parse_braces): New, factoring... | |
882 | (copy_action, copy_guard): these two which are renamed as... | |
883 | (parse_action, parse_guard): these. | |
884 | As a voluntary consequence, using braces around guards is now | |
885 | mandatory. | |
886 | ||
887 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
888 | ||
889 | * src/gram.h (rule_t): `guard' and `guard_line' are new members. | |
890 | * src/reader.c (symbol_list): `guard' and `guard_line' are new | |
891 | members. | |
892 | (symbol_list_new): Adjust. | |
893 | (copy_action): action_line is the first line, not the last. | |
894 | (copy_guard): Just as for actions, store the `action' only, not | |
895 | the switch/case/break flesh. | |
896 | Don't parse the user action that might follow the guard, let... | |
897 | (readgram): do it, i.e., now, there can be an action after a | |
898 | guard. | |
899 | In other words the guard is just explicitly optional. | |
900 | (packgram): Adjust. | |
901 | * src/output.c (guards_output): New. | |
902 | (output_parser): Call it when needed. | |
903 | (output): Also free the guard and attrs obstacks. | |
904 | * src/files.c, src/files.h (obstack_save): Remove. | |
905 | (output_files): Remove. | |
906 | As a result, if one needs the former `.act' file, using an | |
907 | appropriate skeleton which requires actions and guards is now | |
908 | required. | |
909 | * src/main.c (main): Adjust. | |
910 | * tests/semantic.at: New. | |
911 | * tests/regression.at: Use `input.y' as input file name. | |
912 | Avoid 8+3 problems by requiring input.c when the test needs the | |
913 | parser. | |
914 | ||
915 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
916 | ||
917 | * src/reader.c (symbol_list_new): Be sure to initialize all the | |
918 | fields. | |
919 | ||
920 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
921 | ||
922 | All the hacks using a final pseudo state are now useless. | |
923 | ||
924 | * src/LR0.c (set_state_table): state_table holds exactly nstates. | |
925 | * src/lalr.c (nLA): New. | |
926 | (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it | |
927 | instead of lookaheadsp from the pseudo state (nstate + 1). | |
928 | ||
929 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
930 | ||
931 | * src/output.c (action_row, token_actions): Use a state_t instead | |
932 | of a integer, and nlookaheads instead of the following state's | |
933 | lookaheadsp. | |
934 | ||
935 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
936 | ||
937 | * src/conflicts.c (log_resolution, flush_shift) | |
938 | (resolve_sr_conflict, set_conflicts, solve_conflicts) | |
939 | (count_sr_conflicts, count_rr_conflicts, conflicts_output) | |
940 | (conflicts_print, print_reductions): Use a state_t instead of an | |
941 | integer when referring to a state. | |
942 | As much as possible, depend upon nlookaheads, instead of the | |
943 | `lookaheadsp' member of the following state (since lookaheads of | |
944 | successive states are successive, the difference between state n + 1 | |
945 | and n served as the number of lookaheads for state n). | |
946 | * src/lalr.c (add_lookback_edge): Likewise. | |
947 | * src/print.c (print_core, print_actions, print_state) | |
948 | (print_results): Likewise. | |
949 | * src/print_graph.c (print_core, print_actions, print_state) | |
950 | (print_graph): Likewise. | |
951 | * src/conflicts.h: Adjust. | |
952 | ||
953 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
954 | ||
955 | * src/bison.hairy: Formatting/comment changes. | |
956 | ANSIfy. | |
957 | Remove `register' indications. | |
958 | Add plenty of `static'. | |
959 | ||
960 | 2001-12-27 Akim Demaille <akim@epita.fr> | |
961 | ||
962 | * src/output.c (prepare): Drop the muscle `ntbase' which | |
963 | duplicates ntokens. | |
964 | * src/bison.simple: Formatting/comment changes. | |
965 | Use YYNTOKENS only, which is documented, but not YYNTBASE, which | |
966 | is an undocumented synonym. | |
967 | ||
968 | 2001-12-22 Akim Demaille <akim@epita.fr> | |
969 | ||
970 | * src/output.c (output_table_data): Change the prototype to use | |
971 | `int' for array ranges: some invocations do pass an int, not a | |
972 | short. | |
973 | Reported by Wayne Green. | |
974 | ||
975 | 2001-12-22 Akim Demaille <akim@epita.fr> | |
976 | ||
977 | Some actions of web2c.y are improperly triggered. | |
978 | Reported by Mike Castle. | |
979 | ||
980 | * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/. | |
981 | * tests/regression.at (Web2c): Rename as... | |
982 | (Web2c Report): this. | |
983 | (Web2c Actions): New. | |
984 | ||
985 | 2001-12-22 Akim Demaille <akim@epita.fr> | |
986 | ||
987 | Reductions in web2c.y are improperly reported. | |
988 | Reported by Mike Castle. | |
989 | ||
990 | * src/conflicts.c (print_reductions): Fix. | |
991 | * tests/regression.at (Web2c): New. | |
992 | ||
993 | 2001-12-18 Akim Demaille <akim@epita.fr> | |
994 | ||
995 | Some host fail on `assert (!"foo")', which expands to | |
996 | ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__)) | |
997 | Reported by Nelson Beebee. | |
998 | ||
999 | * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with | |
1000 | `#define it_succeeded 0' and `assert (it_succeeded)'. | |
1001 | ||
1002 | 2001-12-17 Marc Autret <autret_m@epita.fr> | |
1003 | ||
1004 | * src/bison.simple: Don't hard code the skeleton line and filename. | |
1005 | * src/output.c (output_parser): Rename 'line' as 'output_line'. | |
1006 | New line counter 'skeleton_line' (skeleton-line muscle). | |
1007 | ||
1008 | 2001-12-17 Paul Eggert <eggert@twinsun.com> | |
1009 | ||
1010 | * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that | |
1011 | YYDEBUG must be defined to a nonzero value. | |
1012 | ||
1013 | * src/bison.simple (yytname): Do not assume that the user defines | |
1014 | YYDEBUG to a properly parenthesized expression. | |
1015 | ||
1016 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
1017 | ||
1018 | * src/state.h (state_t): Rename lookaheads as lookaheadsp. | |
1019 | nlookaheads is a new member. | |
1020 | Adjust all users. | |
1021 | * src/lalr.h (nlookaheads): Remove this orphan declaration. | |
1022 | * src/lalr.c (initialize_lookaheads): Set nlookaheads for each | |
1023 | state. | |
1024 | ||
1025 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
1026 | ||
1027 | * src/files.h, src/files.c (open_files, close_files): Remove. | |
1028 | * src/main.c (main): Don't open/close files, nor invoke lex_free, | |
1029 | let... | |
1030 | * src/reader.c (reader): Do it. | |
1031 | ||
1032 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
1033 | ||
1034 | * src/conflicts.c (print_reductions): Formatting changes. | |
1035 | ||
1036 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
1037 | ||
1038 | * src/conflicts.c (flush_shift): Also adjust lookaheadset. | |
1039 | (flush_reduce): New. | |
1040 | (resolve_sr_conflict): Adjust. | |
1041 | ||
1042 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
1043 | ||
1044 | * src/output.c (output_obstack): Be static and rename as... | |
1045 | (format_obstack): this, to avoid any confusion with files.c's | |
1046 | output_obstack. | |
1047 | * src/reader.h (muscle_obstack): Move to... | |
1048 | * src/output.h: here, since it's defined in output.c. | |
1049 | ||
1050 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
1051 | ||
1052 | * src/output.c (action_row, save_column, default_goto) | |
1053 | (sort_actions, matching_state, pack_vector): Better variable | |
1054 | locality. | |
1055 | ||
1056 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
1057 | ||
1058 | * src/output.c: Various formatting changes. | |
1059 | ||
1060 | 2001-12-17 Akim Demaille <akim@epita.fr> | |
1061 | ||
1062 | * src/files.c (output_files): Free the output_obstack. | |
1063 | * src/main.c (main): Call print and print_graph conditionally. | |
1064 | * src/print.c (print): Work unconditionally. | |
1065 | * src/print_graph.c (print_graph): Work unconditionally. | |
1066 | * src/conflicts.c (log_resolution): Output only if verbose_flag. | |
1067 | ||
1068 | 2001-12-16 Marc Autret <autret_m@epita.fr> | |
1069 | ||
1070 | * src/output.c (actions_output): Fix. When we use %no-lines, | |
1071 | there is one less line per action. | |
1072 | ||
1073 | 2001-12-16 Marc Autret <autret_m@epita.fr> | |
1074 | ||
1075 | * src/bison.simple: Remove a useless #line directive. | |
1076 | s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'. | |
1077 | * src/output.c (get_lines_number): New. | |
1078 | (output_parser): Adjust, now takes care about the lines of a | |
1079 | output muscles. | |
1080 | Fix line numbering. | |
1081 | (actions_output): Computes the number of lines taken by actions. | |
1082 | (output_master_parser): Insert new skeleton which is the name of | |
1083 | the output parser file name. | |
1084 | ||
1085 | 2001-12-15 Marc Autret <autret_m@epita.fr> | |
1086 | ||
1087 | * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility. | |
1088 | ||
1089 | 2001-12-15 Marc Autret <autret_m@epita.fr> | |
1090 | ||
1091 | * src/output.c (output_gram): Keep track of the hairy one. | |
1092 | ||
1093 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
1094 | ||
1095 | Make `make distcheck' work. | |
1096 | ||
1097 | * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses | |
1098 | system.h which uses libgettext.h. | |
1099 | ||
1100 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
1101 | ||
1102 | * src/nullable.c (set_nullable): Useless rules must be skipped, | |
1103 | otherwise, since we range over their symbols, we might look at a | |
1104 | nonterminal which no longer ``exists'', i.e., it is not counted in | |
1105 | `nvars', hence we overflow our arrays. | |
1106 | ||
1107 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
1108 | ||
1109 | The header can also be produced directly, without any obstack! | |
1110 | Yahoo! | |
1111 | ||
1112 | * src/files.c, src/files.h (defines_obstack): Remove. | |
1113 | (compute_header_macro): Global. | |
1114 | (defines_obstack_save): Remove. | |
1115 | * src/reader.c (parse_union_decl): No longer output to | |
1116 | defines_obstack: its content can be found in the `stype' muscle | |
1117 | anyway. | |
1118 | (output_token_translations): Merge into... | |
1119 | (symbols_output): this. | |
1120 | Rename as... | |
1121 | (symbols_save): this. | |
1122 | (reader): Adjust. | |
1123 | * src/output.c (header_output): New. | |
1124 | (output): Call it. | |
1125 | ||
1126 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
1127 | ||
1128 | * src/reader.c (parse_union_decl): Instead of handling two obstack | |
1129 | simultaneously, use one to define the `stype' muscle, and use the | |
1130 | value of the latter to fill defines_obstack. | |
1131 | (copy_comment): Remove. | |
1132 | (copy_comment2): Work for a single obstack. | |
1133 | Rename as... | |
1134 | (copy_comment): this. | |
1135 | ||
1136 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
1137 | ||
1138 | * src/lex.c, src/lex.h (xgetc): No longer static. | |
1139 | * src/reader.c (parse_union_decl): Revamp. | |
1140 | ||
1141 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
1142 | ||
1143 | Still making progress in separating Bison into (i) input, (ii) | |
1144 | process, (iii) output: now we can directly output the parser file | |
1145 | without using table_obstack at all. | |
1146 | ||
1147 | * src/files.c, src/files.h (table_obstack): Bye bye. | |
1148 | (parser_file_name): New. | |
1149 | * src/files.c (compute_output_file_names): Compute it. | |
1150 | * src/output.c (actions_output, output_parser) | |
1151 | (output_master_parser): To a file instead of an obstack. | |
1152 | ||
1153 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
1154 | ||
1155 | Attach actions to rules, instead of pre-outputting them to | |
1156 | actions_obstack. | |
1157 | ||
1158 | * src/gram.h (rule_t): action and action_line are new members. | |
1159 | * src/reader.c (symbol_list): Likewise. | |
1160 | (copy_action): Save the actions within the rule. | |
1161 | (packgram): Save them in rule_table. | |
1162 | * src/output.c (actions_output): New. | |
1163 | (output_parser): Use it on `%%actions'. | |
1164 | (output_rule_data): Don't free rule_table. | |
1165 | (output): Do it. | |
1166 | (prepare): Don't save the `action' muscle. | |
1167 | * src/bison.simple: s/%%action/%%actions/. | |
1168 | ||
1169 | 2001-12-15 Akim Demaille <akim@epita.fr> | |
1170 | ||
1171 | * src/reader.c (copy_action): When --yacc, don't append a `;' | |
1172 | to the user action: let it fail if lacking. | |
1173 | Suggested by Arnold Robbins and Tom Tromey. | |
1174 | ||
1175 | 2001-12-14 Akim Demaille <akim@epita.fr> | |
1176 | ||
1177 | * src/lex.c (literalchar): Simply return the char you decoded, non | |
1178 | longer mess around with obstacks and int pointers. | |
1179 | Adjust all callers. | |
1180 | ||
1181 | 2001-12-14 Akim Demaille <akim@epita.fr> | |
1182 | ||
1183 | * src/lex.c (literalchar): Don't escape the special characters, | |
1184 | just decode them, and keep them as char (before, eol was output as | |
1185 | the 2 char string `\n' etc.). | |
1186 | * src/output.c (output_rule_data): Use quotearg to output the | |
1187 | token strings. | |
1188 | ||
1189 | 2001-12-13 Paul Eggert <eggert@twinsun.com> | |
1190 | ||
1191 | * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE): | |
1192 | Do not infringe on the global user namespace when using C++. | |
1193 | (YYFPRINTF, YYSTDERR): New macros, needed for the above. | |
1194 | All uses of `fprintf' and `stderr' changed. | |
1195 | ||
1196 | * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR. | |
1197 | ||
1198 | 2001-12-13 Akim Demaille <akim@epita.fr> | |
1199 | ||
1200 | The computation of nullable is broken: it doesn't handle empty | |
1201 | RHS's properly. | |
1202 | ||
1203 | * tests/torture.at (GNU AWK Grammar): New. | |
1204 | * tests/sets.at (Nullable): New. | |
1205 | * src/nullable.c (set_nullable): Instead of blindly looping over | |
1206 | `ritems', loop over the rules, and then over their rhs's. | |
1207 | ||
1208 | Work around Autotest bugs. | |
1209 | ||
1210 | * src/warshall.c (bitmatrix_print): Don't use `+--+' as table | |
1211 | frame, because Autotest understand lines starting with a `+' as | |
1212 | traces from the shell. Then, they are not processed properly. | |
1213 | Admittedly an Autotest bug, but we don't have time to wait for | |
1214 | Autotest to catch up. | |
1215 | * tests/regression.at (Broken Closure): Adjust to the new table | |
1216 | frames. | |
1217 | Move to... | |
1218 | * tests/sets.at: here. | |
1219 | ||
1220 | 2001-12-13 Akim Demaille <akim@epita.fr> | |
1221 | ||
1222 | * src/closure.c (closure): Use nrules instead of playing tricks | |
1223 | with BITS_PER_WORD. | |
1224 | ||
1225 | 2001-12-13 Akim Demaille <akim@epita.fr> | |
1226 | ||
1227 | * src/print.c (print_actions): Output the handling of `$' as the | |
1228 | traces do: shifting the token EOF. Before EOF was treated as a | |
1229 | nonterminal. | |
1230 | * tests/regression.at: Adjust some tests. | |
1231 | * src/print_graph.c (print_core): Complete the set of items via | |
1232 | closure. The next-to-final and final states are still unsatisfying, | |
1233 | but that's to be addressed elsewhere. | |
1234 | No longer output the rule numbers, but do output the state number. | |
1235 | A single loop for the shifts + gotos is enough, but picked a | |
1236 | distinct color for each. | |
1237 | (print_graph): Initialize and finalize closure. | |
1238 | ||
1239 | 2001-12-13 Akim Demaille <akim@epita.fr> | |
1240 | ||
1241 | * src/reader.c (readgram): Remove dead code, an strip useless | |
1242 | braces. | |
1243 | (get_type): Remove, unused. | |
1244 | ||
1245 | 2001-12-12 Akim Demaille <akim@epita.fr> | |
1246 | ||
1247 | * src/complain.h, src/complain.c: Remove error_one_per_line, rely | |
1248 | on that of lib/error.c. | |
1249 | ||
1250 | 2001-12-12 Akim Demaille <akim@epita.fr> | |
1251 | ||
1252 | Some hosts don't like `/' in includes. | |
1253 | ||
1254 | * src/system.h: Include libgettext.h without qualifying the path. | |
1255 | * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove | |
1256 | $(top_srcdir). | |
1257 | ||
1258 | 2001-12-11 Marc Autret <autret_m@epita.fr> | |
1259 | ||
1260 | * src/output.c (output_parser): Remove useless muscle. | |
1261 | ||
1262 | 2001-12-11 Marc Autret <autret_m@epita.fr> | |
1263 | ||
1264 | * src/bison.simple: Remove #line just before %%epilogue. It | |
1265 | is now handled in ... | |
1266 | * src/reader.c (read_additionnal_code): Add the output of a | |
1267 | #line for the epilogue. | |
1268 | ||
1269 | 2001-12-10 Marc Autret <autret_m@epita.fr> | |
1270 | ||
1271 | * src/reader.c (copy_definition): Re-use CPP-outed code which | |
1272 | replace precedent remove. | |
1273 | * src/bison.simple: Remove #line before %%prologue because | |
1274 | %%input-line is wrong at this time. | |
1275 | ||
1276 | 2001-12-10 Marc Autret <autret_m@epita.fr> | |
1277 | ||
1278 | * src/reader.c (symbols_output): Clean up. | |
1279 | * src/output.c (output_gram, output): Clean up. | |
1280 | ||
1281 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1282 | ||
1283 | * src/lalr.c (initialize_lookaheads): New. Extracted from... | |
1284 | * src/LR0.c (set_state_table): here. | |
1285 | * src/lalr.c (lalr): Call it. | |
1286 | ||
1287 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1288 | ||
1289 | * src/state.h (shifts): Remove the `number' member: shifts are | |
1290 | attached to state, hence no longer need to be labelled with a | |
1291 | state number. | |
1292 | ||
1293 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1294 | ||
1295 | Now that states have a complete set of members, the linked list of | |
1296 | shifts is useless: just fill directly the state's shifts member. | |
1297 | ||
1298 | * src/state.h (shifts): Remove the `next' member. | |
1299 | * src/LR0.c (first_state, last_state): Remove. | |
1300 | Adjust the callers. | |
1301 | (augment_automaton): Don't look for the shifts that must be added | |
1302 | a shift on EOF: it is those of the state we looked for! But now, | |
1303 | since shifts are attached, it is no longer needed to looking | |
1304 | merely by its id: its number. | |
1305 | ||
1306 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1307 | ||
1308 | * src/LR0.c (augment_automaton): Better variable locality. | |
1309 | Remove an impossible branch: if there is a state corresponding to | |
1310 | the start symbol being shifted, then there is shift for the start | |
1311 | symbol from the initial state. | |
1312 | ||
1313 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1314 | ||
1315 | * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state' | |
1316 | only when appropriate: when insert_start_shifting_state' is not | |
1317 | invoked. | |
1318 | * tests/regression.at (Rule Line Numbers): Adjust. | |
1319 | ||
1320 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1321 | ||
1322 | * src/LR0.c (augment_automaton): Now that all states have shifts, | |
1323 | merge the two cases addition shifts to the initial state. | |
1324 | ||
1325 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1326 | ||
1327 | * src/lalr.c (set_state_table): Move to... | |
1328 | * src/LR0.c: here. | |
1329 | * src/lalr.c (lalr): Don't call it... | |
1330 | * src/LR0.c (generate_states): do it. | |
1331 | * src/LR0.h (first_state): Remove, only the table is used. | |
1332 | ||
1333 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1334 | ||
1335 | * src/LR0.h (first_shift, first_reduction): Remove. | |
1336 | * src/lalr.c: Don't use first_shift: find shifts through the | |
1337 | states. | |
1338 | ||
1339 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1340 | ||
1341 | * src/LR0.c: Attach shifts to states as soon as they are | |
1342 | computed. | |
1343 | * src/lalr.c (set_state_table): Instead of assigning shifts to | |
1344 | state, just assert that the mapping was properly done. | |
1345 | ||
1346 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1347 | ||
1348 | * src/LR0.c (insert_start_shift): Rename as... | |
1349 | (insert_start_shifting_state): this. | |
1350 | (insert_eof_shifting_state, insert_accepting_state): New. | |
1351 | (augment_automaton): Adjust. | |
1352 | Better locality of the variables. | |
1353 | When looking if the start_symbol is shifted from the initial | |
1354 | state, using `while (... symbol != start_symbol ...)' sounds | |
1355 | better than `while (... symbol < start_symbol ...)': If fail | |
1356 | to see how the order between symbols could be relevant! | |
1357 | ||
1358 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1359 | ||
1360 | * src/getargs.h: Don't declare `spec_name_prefix' and | |
1361 | `spec_file_prefix', declared by src/files.h. | |
1362 | * src/files.c, src/files.h: Default for spec_name_prefix is "yy". | |
1363 | * src/muscle_tab.c (muscle_init): Default prefix to NULL. | |
1364 | * src/output.c (prepare): Adjust. | |
1365 | * src/reader.c (symbols_output): Likewise. | |
1366 | * src/vmsgetargs.c: Vaguely adjust, but who cares? | |
1367 | ||
1368 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1369 | ||
1370 | * src/muscle_tab.c (muscle_init): NULL is a better default than | |
1371 | `"0"'. | |
1372 | ||
1373 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1374 | ||
1375 | * src/reader.c (reader): Calling symbols_output once is enough. | |
1376 | ||
1377 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1378 | ||
1379 | Now that states have a complete set of members, the linked list of | |
1380 | reductions is useless: just fill directly the state's reductions | |
1381 | member. | |
1382 | ||
1383 | * src/state.h (struct reductions): Remove member `number' and | |
1384 | `next'. | |
1385 | * src/LR0.c (first_reduction, last_reduction): Remove. | |
1386 | (save_reductions): Don't link the new reductions, store them in | |
1387 | this_state. | |
1388 | * src/lalr.c (set_state_table): No need to attach reductions to | |
1389 | states, it's already done. | |
1390 | * src/output.c (output_actions): No longer free the shifts, then | |
1391 | the reductions, then the states: free all the states and their | |
1392 | members. | |
1393 | ||
1394 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1395 | ||
1396 | * src/options.c (OPTN, DRTV, BOTH): New. | |
1397 | (option_table): Use them. | |
1398 | ||
1399 | * src/muscle_tab.c: Don't include xalloc.h and string.h: that's | |
1400 | the job of system.h. | |
1401 | * src/options.c: Don't include stdio.h and xalloc.h for the same | |
1402 | reasons. | |
1403 | ||
1404 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1405 | ||
1406 | * src/output.c (output, prepare): Make sure the values of the | |
1407 | muscles `action' and `prologue' are 0-terminated. | |
1408 | ||
1409 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1410 | ||
1411 | Clean up GCC warnings. | |
1412 | ||
1413 | * src/reader.c (copy_action): `buf' is not used. | |
1414 | (parse_skel_decl): Be static. | |
1415 | * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. | |
1416 | * src/options.h (create_long_option_table): Have a real prototype. | |
1417 | * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) | |
1418 | (hash_delete_at): Return const void *. | |
1419 | Adjust casts to preserve the const. | |
1420 | ||
1421 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1422 | ||
1423 | * configure.in: Require 2.52g. | |
1424 | M4 is not needed, but AUTOM4TE is. | |
1425 | * m4/m4.m4: Remove. | |
1426 | * tests/Makefile.am: Adjust. | |
1427 | ||
1428 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1429 | ||
1430 | One structure for states is enough, even though theoretically | |
1431 | there are LR(0) states and LALR(1) states. | |
1432 | ||
1433 | * src/lalr.h (state_t): Remove. | |
1434 | (state_table): Be state_t **, not state_t *. | |
1435 | * src/state.h (core, CORE_ALLOC): Rename as... | |
1436 | (state_t, STATE_ALLOC): this. | |
1437 | Add the LALR(1) members: shifts, reductions, errs. | |
1438 | * src/LR0.c (state_table): Rename as... | |
1439 | (state_hash): this, to avoid name clashes with the global | |
1440 | `state_table'. | |
1441 | * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c | |
1442 | * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust. | |
1443 | ||
1444 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
1445 | ||
1446 | Bison dumps core on bash.y. | |
1447 | Reported by Pascal Bart. | |
1448 | ||
1449 | * src/warshall.c (bitmatrix_print): New. | |
1450 | (TC): Use it. | |
1451 | When performing a transitive closure R(i, j) && R(j, k) => R(i, k), | |
1452 | j must be the outer loop. | |
1453 | * tests/regression.at (Broken Closure): New. | |
1454 | ||
1455 | 2001-12-05 Akim Demaille <akim@epita.fr> | |
1456 | ||
1457 | * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and | |
1458 | its argument. | |
1459 |