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