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