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