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