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