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