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