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