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