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