]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
* src/print.c: Convert to use bitset.h, not hand coded iterations
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-03-04 Akim Demaille <akim@epita.fr>
2
3 * src/print.c: Convert to use bitset.h, not hand coded iterations
4 over ints.
5
6
72002-03-04 Akim Demaille <akim@epita.fr>
8
9 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
10
112002-03-04 Akim Demaille <akim@epita.fr>
12
13 * src/closure.c (ruleset): Be a bitset.
14 (rulesetsize): Remove.
15
16
172002-03-04 Akim Demaille <akim@epita.fr>
18
19 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
20 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
21 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
22 * src/closure.c (fderives): Be an array of bitsets.
23
242002-02-28 Robert Anisko <robert@lrde.epita.fr>
25
26 * data/bison.c++: Merge the two generated headers. Insert a copyright
27 notice in each output file.
28
292002-02-28 Akim Demaille <akim@epita.fr>
30
31 * data/bison.c++: Copy the prologue of bison.simple to fetch
32 useful M4 definitions, such as b4_header_guard.
33
342002-02-25 Akim Demaille <akim@epita.fr>
35
36 * src/getargs.c (version): Give the name of the authors, and use a
37 translator friendly scheme for the bgr
38 copyright notice.
39
402002-02-25 Akim Demaille <akim@epita.fr>
41
42 * src/output.c (header_output): Remove, now handled completely via
43 M4.
44
452002-02-25 Akim Demaille <akim@epita.fr>
46
47 * m4/m4.m4: New, from CVS Autoconf.
48 * configure.in: Invoke it.
49 * src/output.c (output_skeleton): Use its result instead of the
50 hard coded name.
51
522002-02-25 Akim Demaille <akim@epita.fr>
53
54 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
55 Fileutils 4.1.5.
56 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
57 * src/output.c (output_skeleton): Use mkstemp to create a real
58 temporary file.
59 Move the filling of `skeleton' and its muscle to...
60 (prepare): here.
61 (output): Move the definition of the prologue muscle to...
62 (prepare): here.
63 * src/system.h (DEFAULT_TMPDIR): New.
64
652002-02-14 Paul Eggert <eggert@twinsun.com>
66
67 Remove the support for C++ namespace cleanliness; it was
68 causing more problems than it was curing, since it didn't work
69 properly on some nonstandard C++ compilers. This can wait
70 for a proper C++ parser.
71
72 * NEWS: Document this.
73 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
74 of C++, as it's treated like C now.
75 * src/bison.simple (YYSTD): Remove.
76 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
77 Treat C++ just like Standard C instead of trying to support
78 namespace cleanliness.
79
802002-02-14 Akim Demaille <akim@epita.fr>
81
82 * tests/regression.at (else): Adjust to Andreas' change.
83
842002-02-14 Akim Demaille <akim@epita.fr>
85
86 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
87
882002-02-13 Andreas Schwab <schwab@suse.de>
89
90 * src/output.c (output_rule_data): Don't output NULL, it might
91 not be defined yet.
92
932002-02-11 Robert Anisko <robert@lrde.epita.fr>
94
95 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
96 (Copyright notice): Update.
97
982002-02-11 Akim Demaille <akim@epita.fr>
99
100 * tests/regression.at (%nonassoc and eof): Don't include
101 nonportable headers.
102
1032002-02-08 Robert Anisko <robert@lrde.epita.fr>
104
105 * data/bison.c++: Correct error recovery. Make the user able to
106 initialize the starting location.
107
1082002-02-07 Akim Demaille <akim@epita.fr>
109
110 * tests/input.at: New.
111
1122002-02-07 Robert Anisko <robert@lrde.epita.fr>
113
114 * data/bison.c++: Replace some direct m4 expansions by constants. Be
115 more consistent when naming methods and variables. Put preprocessor
116 directives around tables only needed for debugging.
117
1182002-02-07 Robert Anisko <robert@lrde.epita.fr>
119
120 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
121 C++ parsers.
122 (yy::b4_name::parse): Use print_.
123
1242002-02-07 Robert Anisko <robert@lrde.epita.fr>
125
126 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
127
1282002-02-07 Robert Anisko <robert@lrde.epita.fr>
129
130 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
131 C++ parsers.
132 (yy::b4_name::parse): Build verbose error messages, and use error_.
133
1342002-02-06 Robert Anisko <robert@lrde.epita.fr>
135
136 * data/bison.c++: Fix m4 quoting in comments.
137
1382002-02-06 Robert Anisko <robert@lrde.epita.fr>
139
140 * data/bison.c++: Adjust the parser code. Fix some muscles that were
141 not expanded by m4.
142
1432002-02-05 Akim Demaille <akim@epita.fr>
144
145 * data/bison.c++: Adjust to the M4 back end.
146 More is certainly needed.
147
1482002-02-05 Akim Demaille <akim@epita.fr>
149
150 Give a try to M4 as a back end.
151
152 * lib/readpipe.c: New, from wdiff.
153 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
154 BISON_HAIRY.
155 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
156 specific values. Now it is m4 that performs the lookup.
157 * src/parse-skel.y: Remove.
158 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
159 * src/output.c (actions_output, guards_output)
160 (token_definitions_output): No longer keeps track of the output
161 line number, hence remove the second argument.
162 (guards_output): Check against the guard member of a rule, not the
163 action member.
164 Adjust callers.
165 (output_skeleton): Don't look for the skeleton location, let m4 do
166 that.
167 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
168 file will be used.
169 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
170 (prepare): Given that for the time being changesyntax is not
171 usable in M4, rename the muscles using `-' to `_'.
172 Define `defines_flag', `output_parser_name' and `output_header_name'.
173 * src/output.h (actions_output, guards_output)
174 (token_definitions_output): Adjust prototypes.
175 * src/scan-skel.l: Instead of scanning the skeletons, it now
176 processes the output of m4: `__oline__' and `#output'.
177 * data/bison.simple: Adjust to be used by M4(sugar).
178 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
179 to date.
180 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
181 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
182 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
183 shamelessly stolen from CVS Autoconf.
184
1852002-02-05 Akim Demaille <akim@epita.fr>
186
187 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
188 * configure.in: Check for the declarations of free and malloc.
189 * src/muscle_tab.c: Adjust.
190
1912002-02-05 Akim Demaille <akim@epita.fr>
192
193 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
194 which have no values.
195
1962002-02-05 Akim Demaille <akim@epita.fr>
197
198 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
199 * data/: here.
200
2012002-01-29 Paul Eggert <eggert@twinsun.com>
202
203 * src/bison.simple (YYSIZE_T): Do not define merely because
204 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
205 On some platforms, <alloca.h> does not declare YYSTD (size_t).
206
2072002-01-27 Akim Demaille <akim@epita.fr>
208
209 Fix `%nonassoc and eof'.
210
211 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
212 which were not properly copied! Replace
213 memcpy (res->errs, src->errs, src->nerrs);
214 with
215 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
216 !!!
217 * tests/regression.at (%nonassoc and eof): Adjust to newest
218 Autotest: `.' is not in the PATH.
219
2202002-01-27 Akim Demaille <akim@epita.fr>
221
222 * tests/sets.at (AT_EXTRACT_SETS): New.
223 (Nullable): Use it.
224 (Firsts): New.
225
2262002-01-26 Akim Demaille <akim@epita.fr>
227
228 * tests/actions.at, tests/calc.at, tests/headers.at,
229 * tests/torture.at: Adjust to the newest Autotest which no longer
230 forces `.' in the PATH.
231
2322002-01-25 Akim Demaille <akim@epita.fr>
233
234 * tests/regression.at (%nonassoc and eof): New.
235 Suggested by Robert Anisko.
236
2372002-01-24 Akim Demaille <akim@epita.fr>
238
239 Bison dumps core when trying to complain about broken input files.
240 Reported by Cris van Pelt.
241
242 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
243 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
244 into...
245 (Invalid inputs): Strengthen: exercise parse_percent_token.
246
2472002-01-24 Robert Anisko <robert.anisko@epita.fr>
248
249 * src/Makefile.am: Add bison.c++.
250 * src/bison.c++: New skeleton.
251
2522002-01-21 Paolo Bonzini <bonzini@gnu.org>
253
254 * po/it.po: New.
255
2562002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
257
258 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
259
2602002-01-20 Marc Autret <marc@gnu.org>
261
262 * src/files.c (compute_output_file_names): Fix
263
2642002-01-20 Marc Autret <marc@gnu.org>
265
266 * tests/output.at: New test.
267 * src/files.c (compute_base_names): Don't map extensions when
268 the YACC flag is set, use defaults.
269 Reported by Evgeny Stambulchik.
270
2712002-01-20 Marc Autret <marc@gnu.org>
272
273 * src/system.h: Need to define __attribute__ away for non-GCC
274 compilers as well (i.e. the vendor C compiler).
275 Suggested by Albert Chin-A-Young.
276
2772002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
278
279 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
280 canonical definition.
281 * src/system.h: Use the canonical definition for PARAMS (avoids
282 a conflict with the macro from lib/hash.h).
283
2842002-01-11 Akim Demaille <akim@epita.fr>
285
286 * configure.in: Use AC_FUNC_STRNLEN.
287 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
288
2892002-01-09 Akim Demaille <akim@epita.fr>
290
291 * src/files.c, src/files.h (output_infix): New.
292 (tab_extension): Remove.
293 (compute_base_names): Compute the former, drop the latter.
294 * src/output.c (prepare): Insert the muscles `output-infix', and
295 `output-suffix'.
296 * src/parse-skel.y (string, string.1): New.
297 (section.header): Use it.
298 (section.yacc): Remove.
299 (prefix): Remove too.
300 * src/scan-skel.l: Adjust.
301 * src/bison.simple, src/bison.hairy: Adjust.
302
3032002-01-09 Akim Demaille <akim@epita.fr>
304
305 * configure.in (WERROR_CFLAGS): Compute it.
306 * src/Makefile.am (CFLAGS): Pass it.
307 * tests/atlocal.in (CFLAGS): Idem.
308 * src/files.c: Fix a few warnings.
309 (get_extension_index): Remove, unused.
310
3112002-01-08 Akim Demaille <akim@epita.fr>
312
313 * src/getargs.c (AS_FILE_NAME): New.
314 (getargs): Use it to convert DOSish file names.
315 * src/files.c (base_name): Rename as full_base_name to avoid
316 clashes with `base_name ()'.
317 (filename_split): New.
318 (compute_base_names): N-th rewrite, using filename_split.
319
3202002-01-08 Akim Demaille <akim@epita.fr>
321
322 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
323 New, stolen from the Fileutils 4.1.
324 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
325 * configure.in: Check for the presence of memrchr, and of its
326 prototype.
327
3282002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
329
330 * lib/hash.h (__P): Added definition for this macro.
331 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
332 BUILT_SOURCES, to ensure they are generated first.
333 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
334 %error-verbose to allow bootstrapping with bison 1.30x.
335
3362002-01-06 Akim Demaille <akim@epita.fr>
337
338 * src/reader.c (parse_braces): Don't fetch the next char, the
339 convention is to fetch on entry.
340 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
341 'switch' without a following semicolon.
342 * tests/regression.at (braces parsing): New.
343
3442002-01-06 Akim Demaille <akim@epita.fr>
345
346 Bison is dead wrong in its RR conflict reports.
347
348 * tests/torture.at (GNU Cim Grammar): New.
349 * src/conflicts.c (count_rr_conflicts): Fix.
350
3512002-01-06 Akim Demaille <akim@epita.fr>
352
353 Creating package.m4 from configure.ac causes too many problems.
354
355 * tests/Makefile.am (package.m4): Create it by hand,
356 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
357
3582002-01-06 Akim Demaille <akim@epita.fr>
359
360 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
361 skeleton.h.
362
3632002-01-04 Paul Eggert <eggert@twinsun.com>
364
365 * doc/bison.texinfo (Debugging):
366 Remove YYSTDERR; it's no longer defined or used.
367 Also, s/cstdio.h/cstdio/.
368
3692002-01-03 Akim Demaille <akim@epita.fr>
370
371 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
372
3732002-01-03 Akim Demaille <akim@epita.fr>
374
375 * src/parse-skel.y (process_skeleton): Don't bind the parser's
376 tracing code to --trace, wait for a better --trace option, with
377 args.
378
3792002-01-03 Akim Demaille <akim@epita.fr>
380
381 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
382 The ISO C++ standard is extremely clear about it: stderr is
383 considered a macro, not a regular symbol (see table 94 `Header
384 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
385 Therefore std:: does not apply to it. It still does with fprintf.
386 Also, s/cstdio.h/cstdio/.
387
3882002-01-03 Akim Demaille <akim@epita.fr>
389
390 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
391 for non system headers.
392
3932002-01-02 Akim Demaille <akim@epita.fr>
394
395 Equip the skeleton chain with location tracking, runtime trace,
396 pure parser and scanner.
397
398 * src/parse-skel.y: Request a pure parser, locations, and prefix
399 renaming.
400 (%union): Having several members with the same type does not help
401 type mismatches, simplify.
402 (YYPRINT, yyprint): New.
403 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
404 (skel_error): this.
405 Handle locations.
406 * src/scan-skel.l: Adjust to these changes.
407 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
408 (LOCATION_PRINT, skel_control_t): New.
409
4102001-12-30 Akim Demaille <akim@epita.fr>
411
412 * src/parse-skel.y: Get rid of the shift/reduce conflict:
413 replace `gb' with BLANKS.
414 * src/scan-skel.l: Adjust.
415
4162001-12-30 Akim Demaille <akim@epita.fr>
417
418 * src/system.h: We don't need nor want bcopy.
419 Throw away MS-DOS crap: we don't need getpid.
420 * configure.in: We don't need strndup. It was even causing
421 problems: because Flex includes the headers *before* us,
422 _GNU_SOURCE is not defined by config.h, and therefore strndup was
423 not visible.
424 * lib/xstrndup.c: New.
425 * src/scan-skel.l: Use it.
426 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
427 * src/parse-skel.y: Use %directives instead of #defines.
428
4292001-12-30 Akim Demaille <akim@epita.fr>
430
431 * src/skeleton.h: New.
432 * src/output.c (output_parser, output_master_parser): Remove, dead
433 code.
434 * src/output.h (get_lines_number, actions_output, guards_output)
435 (token_definitions_output): Prototype them.
436 * src/parse-skel.y: Add the license notice.
437 Include output.h and skeleton.h.
438 (process_skeleton): Returns void, and takes a single parameter.
439 * src/scan-skel.l: Add the license notice.
440 Include skeleton.h.
441 Don't use %option yylineno: it seems that then Flex imagines
442 REJECT has been used, and therefore it won't reallocate its
443 buffers (which makes no other sense to me than a bug). It results
444 in warnings for `unused: yy_flex_realloc'.
445
4462001-12-30 Robert Anisko <robert.anisko@epita.fr>
447
448 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
449 (MUSCLE_INSERT_PREFIX): ...to there.
450 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
451 (MUSCLE_INSERT_PREFIX): Move from here...
452
453 * src/bison.hairy: Add a section directive. Put braces around muscle
454 names. This parser skeleton is still broken, but Bison should not
455 choke on a bad muscle 'syntax'.
456 * src/bison.simple: Add a section directive. Put braces around muscle
457 names.
458
459 * src/files.h (strsuffix, stringappend): Add declarations.
460 (tab_extension): Add declaration.
461 (short_base_name): Add declaration.
462
463 * src/files.c (strsuffix, stringappend): No longer static. These
464 functions are used in the skeleton parser.
465 (tab_extension): New.
466 (compute_base_names): Use the computations done in this function
467 to guess if the generated parsers should have '.tab' in their
468 names.
469 (short_base_name): No longer static.
470
471 * src/output.c (output_skeleton): New.
472 (output): Disable call to output_master_parser, and give a try to
473 a new skeleton handling system.
474 (guards_output, actions_output): No longer static.
475 (token_definitions_output, get_lines_number): No longer static.
476
477 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
478
479 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
480 parse-skel.y.
481
482 * src/parse-skel.y: New file.
483 * src/scan-skel.l: New file.
484
4852001-12-29 Akim Demaille <akim@epita.fr>
486
487 %name-prefix is broken.
488
489 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
490 Adjust all dependencies.
491 * tests/headers.at (export YYLTYPE): Strengthen this test: use
492 %name-prefix.
493
494 Renaming yylval but not yylloc is not consistent. Now we do.
495
496 * src/bison.simple: Prefix yylloc if used.
497 * doc/bison.texinfo (Decl Summary): Document that.
498
4992001-12-29 Akim Demaille <akim@epita.fr>
500
501 * doc/bison.texinfo: Promote `%long-directive' over
502 `%long_directive'.
503 Remove all references to fixed-output-files, yacc is enough.
504
5052001-12-29 Akim Demaille <akim@epita.fr>
506
507 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
508 user prologue. These are defaults.
509 * tests/actions.at (Mid-rule actions): Make sure the user can
510 define YYDEBUG and YYERROR_VERBOSE.
511
5122001-12-29 Akim Demaille <akim@epita.fr>
513
514 * src/output.c (header_output): Don't forget to export YYLTYPE and
515 yylloc.
516 * tests/headers.at (export YYLTYPE): New, make sure it does.
517 * tests/regression.at (%union and --defines, Invalid CPP headers):
518 Move to...
519 * tests/headers.at: here.
520
5212001-12-29 Akim Demaille <akim@epita.fr>
522
523 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
524
5252001-12-29 Akim Demaille <akim@epita.fr>
526
527 * tests/actions.at (Mid-rule actions): Output on a single line
528 instead of several.
529
5302001-12-29 Akim Demaille <akim@epita.fr>
531
532 * doc/bison.texinfo: Formatting changes.
533
5342001-12-29 Akim Demaille <akim@epita.fr>
535
536 Don't store the token defs in a muscle, just be ready to output it
537 on command. Now possible via `symbols'. Fixes a memory leak.
538
539 * src/output.c (token_definitions_output): New.
540 (output_parser, header_output): Use it.
541 * src/reader.c (symbols_save): Remove.
542
5432001-12-29 Akim Demaille <akim@epita.fr>
544
545 * src/bison.simple: Do not provide a default for YYSTYPE and
546 YYLTYPE before the user's prologue. Otherwise it's hardly... a
547 default.
548
5492001-12-29 Akim Demaille <akim@epita.fr>
550
551 Mid-rule actions are simply... ignored!
552
553 * src/reader.c (readgram): Be sure to attach mid-rule actions to
554 the empty-rule associated to the dummy symbol, not to the host
555 rule.
556 * tests/actions.at (Mid-rule actions): New.
557
5582001-12-29 Akim Demaille <akim@epita.fr>
559
560 Memory leak.
561
562 * src/reader.c (reader): Free grammar.
563
5642001-12-29 Akim Demaille <akim@epita.fr>
565
566 Memory leak.
567
568 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
569 since it allocates it for each state, although only one is needed.
570 (allocate_storage): Do it here.
571
5722001-12-29 Akim Demaille <akim@epita.fr>
573
574 * src/options.h, src/options.c (create_long_option_table): Rename
575 as...
576 (long_option_table_new): this, with a clearer prototype.
577 (percent_table): Remove, unused,
578 * src/getargs.c (getargs): Adjust.
579
5802001-12-29 Akim Demaille <akim@epita.fr>
581
582 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
583 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
584 as states.
585
5862001-12-29 Akim Demaille <akim@epita.fr>
587
588 * src/lalr.c (build_relations): Rename `states' as `states1'.
589 Sorry, I don't understand exactly what it is, no better name...
590
5912001-12-29 Akim Demaille <akim@epita.fr>
592
593 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
594 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
595 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
596 as rules.
597
5982001-12-29 Akim Demaille <akim@epita.fr>
599
600 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
601 ago.
602
6032001-12-29 Akim Demaille <akim@epita.fr>
604
605 * src/reader.c, src/reader.h (user_toknums): Remove.
606 Adjust all users to use symbols[i]->user_token_number.
607
6082001-12-29 Akim Demaille <akim@epita.fr>
609
610 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
611 Adjust all users to use symbols[i]->prec or ->assoc.
612
6132001-12-29 Akim Demaille <akim@epita.fr>
614
615 * src/reader.c, src/reader.h (tags): Remove.
616 Adjust all users to use symbols[i]->tag.
617
6182001-12-29 Akim Demaille <akim@epita.fr>
619
620 * src/gram.h, src/gram.c (symbols): New, similar to state_table
621 and rule_table.
622 * src/reader.c (packsymbols): Fill this table.
623 Drop sprec.
624 * src/conflicts.c (resolve_sr_conflict): Adjust.
625 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
626 single table.
627 Use symbols[i]->tag instead of tags[i].
628
6292001-12-29 Akim Demaille <akim@epita.fr>
630
631 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
632 In addition, put a comment in there, to replace...
633 * tests/regression.at (%union and C comments): Remove.
634
6352001-12-29 Akim Demaille <akim@epita.fr>
636
637 * tests/regression.at (Web2c Actions): Blindly move the actual
638 output as expected output. The contents *seem* right to me, but I
639 can't pretend reading perfectly parser tables... Nonetheless, all
640 the other tests pass correctly, the table look OK, even though the
641 presence of `$axiom' is to be noted: AFAICS it is useless (but
642 harmless).
643
6442001-12-29 Akim Demaille <akim@epita.fr>
645
646 * src/reader.c (readgram): Don't add the rule 0 if there were no
647 rules read. In other words, add it _after_ having performed
648 grammar sanity checks.
649 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
650
6512001-12-29 Akim Demaille <akim@epita.fr>
652
653 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
654 visible, and some states have now a different number.
655
6562001-12-29 Akim Demaille <akim@epita.fr>
657
658 * src/reader.c (readgram): Bind the initial rule's lineno to that
659 of the first rule.
660 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
661 (Solved SR Conflicts): Adjust rule 0's line number.
662
6632001-12-29 Akim Demaille <akim@epita.fr>
664
665 Fix the `GAWK Grammar' failure.
666
667 * src/LR0.c (final_state): Initialize to -1 so that we do compute
668 the reductions of the first state which was mistakenly confused
669 with the final state because precisely final_state was initialized
670 to 0.
671 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
672 now noticed by Bison.
673 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
674 have a reduction on $default.
675
6762001-12-29 Akim Demaille <akim@epita.fr>
677
678 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
679 rule line numbers.
680 * src/closure.c (print_closure): Likewise.
681 * src/derives.c (print_derives): Likewise.
682 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
683 now.
684
6852001-12-29 Akim Demaille <akim@epita.fr>
686
687 * src/lalr.c (lookaheads_print): New.
688 (lalr): Call it when --trace-flag.
689 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
690 are dumped.
691
6922001-12-29 Akim Demaille <akim@epita.fr>
693
694 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
695 when walking through ritem, even via rule->rhs.
696 * src/reduce.c (dump_grammar, useful_production, reduce_output)
697 (useful_production, useless_nonterminals): Likewise.
698 (reduce_grammar_tables): Likewise, plus update nritems.
699 * src/nullable.c (set_nullable): Likewise.
700 * src/lalr.c (build_relations): Likewise.
701 * tests/sets.at (Nullable): Adjust.
702 Fortunately, now, the $axiom is no longer nullable.
703
7042001-12-29 Akim Demaille <akim@epita.fr>
705
706 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
707 the 0-sentinel.
708 * src/gram.c (ritem_longest_rhs): Likewise.
709 * src/reduce.c (nonterminals_reduce): Likewise.
710 * src/print_graph.c (print_graph): Likewise.
711 * src/output.c (output_rule_data): Likewise.
712 * src/nullable.c (set_nullable): Likewise.
713
7142001-12-29 Akim Demaille <akim@epita.fr>
715
716 * src/output.c: Comment changes.
717
7182001-12-27 Paul Eggert <eggert@twinsun.com>
719
720 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
721 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
722 Sparc, as they were causing more porting problems than the
723 (minor) performance improvement was worth.
724
725 Also, catch up with 1.31's YYSTD.
726
7272001-12-27 Akim Demaille <akim@epita.fr>
728
729 * src/output.c (output_gram): Rely on nritems, not the
730 0-sentinel. See below.
731 Use -1 as separator, not 0.
732 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
733 Rely on -1 as separator in yyrhs, instead of 0.
734 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
735 twice `Now at end of input', therefore there are two lines less to
736 expect.
737
7382001-12-27 Akim Demaille <akim@epita.fr>
739
740 * tests/regression.at (Unresolved SR Conflicts):
741 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
742 below.
743
7442001-12-27 Akim Demaille <akim@epita.fr>
745
746 * src/LR0.c (new_state): Recognize the final state by the fact it
747 is reached by eoftoken.
748 (insert_start_shifting_state, insert_eof_shifting_state)
749 (insert_accepting_state, augment_automaton): Remove, since now
750 these states are automatically computed from the initial state.
751 (generate_states): Adjust.
752 * src/print.c: When reporting a rule number to the user, substract
753 1, so that the axiom rule is rule 0, and the first user rule is 1.
754 * src/reduce.c: Likewise.
755 * src/print_graph.c (print_core): For the time being, just as for
756 the report, depend upon --trace-flags to dump the full set of
757 items.
758 * src/reader.c (readgram): Once the grammar read, insert the rule
759 0: `$axiom: START-SYMBOL $'.
760 * tests/set.at: Adjust: rule 0 is now displayed, and since the
761 number of the states has changed (the final state is no longer
762 necessarily the last), catch up.
763
7642001-12-27 Akim Demaille <akim@epita.fr>
765
766 Try to make the use of the eoftoken valid. Given that its value
767 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
768 is used instead of > 0 where appropriate, (ii), depend upon nritems
769 instead of the 0-sentinel.
770
771 * src/gram.h, src/gram.c (nritems): New.
772 Expected to be duplication of nitems, but for the time being...
773 * src/reader.c (packgram): Assert nritems and nitems are equal.
774 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
775 * src/closure.c (print_closure, print_fderives): Likewise.
776 * src/gram.c (ritem_print): Likewise.
777 * src/print.c (print_core, print_grammar): Likewise.
778 * src/print_graph.c: Likewise.
779
7802001-12-27 Akim Demaille <akim@epita.fr>
781
782 * src/main.c (main): If there are complains after grammar
783 reductions, then output the report anyway if requested, then die.
784 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
785 * src/reader.c (eoftoken): New.
786 (parse_token_decl): If the token being defined has value `0', it
787 is the eoftoken.
788 (packsymbols): No longer hack `tags' to insert `$' by hand.
789 Be sure to preserve the value of the eoftoken.
790 (reader): Make sure eoftoken is defined.
791 Initialize nsyms to 0: now eoftoken is created just like the others.
792 * src/print.c (print_grammar): Don't special case the eof token.
793 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
794 lie anyway, albeit pleasant.
795 * tests/calc.at: Exercise error messages with eoftoken.
796 Change the grammar so that empty input is invalid.
797 Adjust expectations.
798 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
799
8002001-12-27 Akim Demaille <akim@epita.fr>
801
802 * configure.in: Check the protos of strchr ans strspn.
803 Replace strchr if needed.
804 * src/system.h: Provide the protos of strchr, strspn and memchr if
805 missing.
806 * lib/strchr.c: New.
807 * src/reader.c (symbols_save): Use strchr.
808
8092001-12-27 Akim Demaille <akim@epita.fr>
810
811 * src/print.c, src/print_graph.c (escape): New.
812 Use it to quote the TAGS outputs.
813 * src/print_graph.c (print_state): Now errors are in red, and
814 reductions in green.
815 Prefer high to wide: output the state number on a line of its own.
816
8172001-12-27 Akim Demaille <akim@epita.fr>
818
819 * src/state.h, src/state.c (reductions_new): New.
820 * src/LR0.c (set_state_table): Let all the states have a
821 `reductions', even if reduced to 0.
822 (save_reductions): Adjust.
823 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
824 * src/print.c (print_reductions, print_actions): Adjust.
825 * src/output.c (action_row): Adjust.
826
8272001-12-27 Akim Demaille <akim@epita.fr>
828
829 * src/state.h, src/state.c (errs_new, errs_dup): New.
830 * src/LR0.c (set_state_table): Let all the states have an errs,
831 even if reduced to 0.
832 * src/print.c (print_errs, print_reductions): Adjust.
833 * src/output.c (output_actions, action_row): Adjust.
834 * src/conflicts.c (resolve_sr_conflict): Adjust.
835
8362001-12-27 Akim Demaille <akim@epita.fr>
837
838 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
839
8402001-12-27 Akim Demaille <akim@epita.fr>
841
842 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
843 * src/print.c: here.
844 (lookaheadset, shiftset): New, used as additional storage by
845 print_reductions.
846 (print_results): Adjust.
847 (print_shifts, print_gotos, print_errs): New, extracted from...
848 (print_actions): here.
849 * src/print_graph.c (print_actions): Remove dead code.
850
8512001-12-27 Akim Demaille <akim@epita.fr>
852
853 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
854 `$n' and `@n'.
855
8562001-12-27 Akim Demaille <akim@epita.fr>
857
858 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
859 (build_relations): Adjust.
860
8612001-12-27 Akim Demaille <akim@epita.fr>
862
863 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
864 duplication.
865
8662001-12-27 Akim Demaille <akim@epita.fr>
867
868 * src/reader.c (packgram): Catch nitems overflows.
869
8702001-12-27 Akim Demaille <akim@epita.fr>
871
872 * src/files.c, src/files.h (guard_obstack): Remove.
873 * src/output.c (output): Adjust.
874 * src/reader.c (parse_braces): New, factoring...
875 (copy_action, copy_guard): these two which are renamed as...
876 (parse_action, parse_guard): these.
877 As a voluntary consequence, using braces around guards is now
878 mandatory.
879
8802001-12-27 Akim Demaille <akim@epita.fr>
881
882 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
883 * src/reader.c (symbol_list): `guard' and `guard_line' are new
884 members.
885 (symbol_list_new): Adjust.
886 (copy_action): action_line is the first line, not the last.
887 (copy_guard): Just as for actions, store the `action' only, not
888 the switch/case/break flesh.
889 Don't parse the user action that might follow the guard, let...
890 (readgram): do it, i.e., now, there can be an action after a
891 guard.
892 In other words the guard is just explicitly optional.
893 (packgram): Adjust.
894 * src/output.c (guards_output): New.
895 (output_parser): Call it when needed.
896 (output): Also free the guard and attrs obstacks.
897 * src/files.c, src/files.h (obstack_save): Remove.
898 (output_files): Remove.
899 As a result, if one needs the former `.act' file, using an
900 appropriate skeleton which requires actions and guards is now
901 required.
902 * src/main.c (main): Adjust.
903 * tests/semantic.at: New.
904 * tests/regression.at: Use `input.y' as input file name.
905 Avoid 8+3 problems by requiring input.c when the test needs the
906 parser.
907
9082001-12-27 Akim Demaille <akim@epita.fr>
909
910 * src/reader.c (symbol_list_new): Be sure to initialize all the
911 fields.
912
9132001-12-27 Akim Demaille <akim@epita.fr>
914
915 All the hacks using a final pseudo state are now useless.
916
917 * src/LR0.c (set_state_table): state_table holds exactly nstates.
918 * src/lalr.c (nLA): New.
919 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
920 instead of lookaheadsp from the pseudo state (nstate + 1).
921
9222001-12-27 Akim Demaille <akim@epita.fr>
923
924 * src/output.c (action_row, token_actions): Use a state_t instead
925 of a integer, and nlookaheads instead of the following state's
926 lookaheadsp.
927
9282001-12-27 Akim Demaille <akim@epita.fr>
929
930 * src/conflicts.c (log_resolution, flush_shift)
931 (resolve_sr_conflict, set_conflicts, solve_conflicts)
932 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
933 (conflicts_print, print_reductions): Use a state_t instead of an
934 integer when referring to a state.
935 As much as possible, depend upon nlookaheads, instead of the
936 `lookaheadsp' member of the following state (since lookaheads of
937 successive states are successive, the difference between state n + 1
938 and n served as the number of lookaheads for state n).
939 * src/lalr.c (add_lookback_edge): Likewise.
940 * src/print.c (print_core, print_actions, print_state)
941 (print_results): Likewise.
942 * src/print_graph.c (print_core, print_actions, print_state)
943 (print_graph): Likewise.
944 * src/conflicts.h: Adjust.
945
9462001-12-27 Akim Demaille <akim@epita.fr>
947
948 * src/bison.hairy: Formatting/comment changes.
949 ANSIfy.
950 Remove `register' indications.
951 Add plenty of `static'.
952
9532001-12-27 Akim Demaille <akim@epita.fr>
954
955 * src/output.c (prepare): Drop the muscle `ntbase' which
956 duplicates ntokens.
957 * src/bison.simple: Formatting/comment changes.
958 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
959 is an undocumented synonym.
960
9612001-12-22 Akim Demaille <akim@epita.fr>
962
963 * src/output.c (output_table_data): Change the prototype to use
964 `int' for array ranges: some invocations do pass an int, not a
965 short.
966 Reported by Wayne Green.
967
9682001-12-22 Akim Demaille <akim@epita.fr>
969
970 Some actions of web2c.y are improperly triggered.
971 Reported by Mike Castle.
972
973 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
974 * tests/regression.at (Web2c): Rename as...
975 (Web2c Report): this.
976 (Web2c Actions): New.
977
9782001-12-22 Akim Demaille <akim@epita.fr>
979
980 Reductions in web2c.y are improperly reported.
981 Reported by Mike Castle.
982
983 * src/conflicts.c (print_reductions): Fix.
984 * tests/regression.at (Web2c): New.
985
9862001-12-18 Akim Demaille <akim@epita.fr>
987
988 Some host fail on `assert (!"foo")', which expands to
989 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
990 Reported by Nelson Beebee.
991
992 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
993 `#define it_succeeded 0' and `assert (it_succeeded)'.
994
9952001-12-17 Marc Autret <autret_m@epita.fr>
996
997 * src/bison.simple: Don't hard code the skeleton line and filename.
998 * src/output.c (output_parser): Rename 'line' as 'output_line'.
999 New line counter 'skeleton_line' (skeleton-line muscle).
1000
10012001-12-17 Paul Eggert <eggert@twinsun.com>
1002
1003 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1004 YYDEBUG must be defined to a nonzero value.
1005
1006 * src/bison.simple (yytname): Do not assume that the user defines
1007 YYDEBUG to a properly parenthesized expression.
1008
10092001-12-17 Akim Demaille <akim@epita.fr>
1010
1011 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1012 nlookaheads is a new member.
1013 Adjust all users.
1014 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1015 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1016 state.
1017
10182001-12-17 Akim Demaille <akim@epita.fr>
1019
1020 * src/files.h, src/files.c (open_files, close_files): Remove.
1021 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1022 let...
1023 * src/reader.c (reader): Do it.
1024
10252001-12-17 Akim Demaille <akim@epita.fr>
1026
1027 * src/conflicts.c (print_reductions): Formatting changes.
1028
10292001-12-17 Akim Demaille <akim@epita.fr>
1030
1031 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1032 (flush_reduce): New.
1033 (resolve_sr_conflict): Adjust.
1034
10352001-12-17 Akim Demaille <akim@epita.fr>
1036
1037 * src/output.c (output_obstack): Be static and rename as...
1038 (format_obstack): this, to avoid any confusion with files.c's
1039 output_obstack.
1040 * src/reader.h (muscle_obstack): Move to...
1041 * src/output.h: here, since it's defined in output.c.
1042
10432001-12-17 Akim Demaille <akim@epita.fr>
1044
1045 * src/output.c (action_row, save_column, default_goto)
1046 (sort_actions, matching_state, pack_vector): Better variable
1047 locality.
1048
10492001-12-17 Akim Demaille <akim@epita.fr>
1050
1051 * src/output.c: Various formatting changes.
1052
10532001-12-17 Akim Demaille <akim@epita.fr>
1054
1055 * src/files.c (output_files): Free the output_obstack.
1056 * src/main.c (main): Call print and print_graph conditionally.
1057 * src/print.c (print): Work unconditionally.
1058 * src/print_graph.c (print_graph): Work unconditionally.
1059 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1060
10612001-12-16 Marc Autret <autret_m@epita.fr>
1062
1063 * src/output.c (actions_output): Fix. When we use %no-lines,
1064 there is one less line per action.
1065
10662001-12-16 Marc Autret <autret_m@epita.fr>
1067
1068 * src/bison.simple: Remove a useless #line directive.
1069 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1070 * src/output.c (get_lines_number): New.
1071 (output_parser): Adjust, now takes care about the lines of a
1072 output muscles.
1073 Fix line numbering.
1074 (actions_output): Computes the number of lines taken by actions.
1075 (output_master_parser): Insert new skeleton which is the name of
1076 the output parser file name.
1077
10782001-12-15 Marc Autret <autret_m@epita.fr>
1079
1080 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1081
10822001-12-15 Marc Autret <autret_m@epita.fr>
1083
1084 * src/output.c (output_gram): Keep track of the hairy one.
1085
10862001-12-15 Akim Demaille <akim@epita.fr>
1087
1088 Make `make distcheck' work.
1089
1090 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1091 system.h which uses libgettext.h.
1092
10932001-12-15 Akim Demaille <akim@epita.fr>
1094
1095 * src/nullable.c (set_nullable): Useless rules must be skipped,
1096 otherwise, since we range over their symbols, we might look at a
1097 nonterminal which no longer ``exists'', i.e., it is not counted in
1098 `nvars', hence we overflow our arrays.
1099
11002001-12-15 Akim Demaille <akim@epita.fr>
1101
1102 The header can also be produced directly, without any obstack!
1103 Yahoo!
1104
1105 * src/files.c, src/files.h (defines_obstack): Remove.
1106 (compute_header_macro): Global.
1107 (defines_obstack_save): Remove.
1108 * src/reader.c (parse_union_decl): No longer output to
1109 defines_obstack: its content can be found in the `stype' muscle
1110 anyway.
1111 (output_token_translations): Merge into...
1112 (symbols_output): this.
1113 Rename as...
1114 (symbols_save): this.
1115 (reader): Adjust.
1116 * src/output.c (header_output): New.
1117 (output): Call it.
1118
11192001-12-15 Akim Demaille <akim@epita.fr>
1120
1121 * src/reader.c (parse_union_decl): Instead of handling two obstack
1122 simultaneously, use one to define the `stype' muscle, and use the
1123 value of the latter to fill defines_obstack.
1124 (copy_comment): Remove.
1125 (copy_comment2): Work for a single obstack.
1126 Rename as...
1127 (copy_comment): this.
1128
11292001-12-15 Akim Demaille <akim@epita.fr>
1130
1131 * src/lex.c, src/lex.h (xgetc): No longer static.
1132 * src/reader.c (parse_union_decl): Revamp.
1133
11342001-12-15 Akim Demaille <akim@epita.fr>
1135
1136 Still making progress in separating Bison into (i) input, (ii)
1137 process, (iii) output: now we can directly output the parser file
1138 without using table_obstack at all.
1139
1140 * src/files.c, src/files.h (table_obstack): Bye bye.
1141 (parser_file_name): New.
1142 * src/files.c (compute_output_file_names): Compute it.
1143 * src/output.c (actions_output, output_parser)
1144 (output_master_parser): To a file instead of an obstack.
1145
11462001-12-15 Akim Demaille <akim@epita.fr>
1147
1148 Attach actions to rules, instead of pre-outputting them to
1149 actions_obstack.
1150
1151 * src/gram.h (rule_t): action and action_line are new members.
1152 * src/reader.c (symbol_list): Likewise.
1153 (copy_action): Save the actions within the rule.
1154 (packgram): Save them in rule_table.
1155 * src/output.c (actions_output): New.
1156 (output_parser): Use it on `%%actions'.
1157 (output_rule_data): Don't free rule_table.
1158 (output): Do it.
1159 (prepare): Don't save the `action' muscle.
1160 * src/bison.simple: s/%%action/%%actions/.
1161
11622001-12-15 Akim Demaille <akim@epita.fr>
1163
1164 * src/reader.c (copy_action): When --yacc, don't append a `;'
1165 to the user action: let it fail if lacking.
1166 Suggested by Arnold Robbins and Tom Tromey.
1167
11682001-12-14 Akim Demaille <akim@epita.fr>
1169
1170 * src/lex.c (literalchar): Simply return the char you decoded, non
1171 longer mess around with obstacks and int pointers.
1172 Adjust all callers.
1173
11742001-12-14 Akim Demaille <akim@epita.fr>
1175
1176 * src/lex.c (literalchar): Don't escape the special characters,
1177 just decode them, and keep them as char (before, eol was output as
1178 the 2 char string `\n' etc.).
1179 * src/output.c (output_rule_data): Use quotearg to output the
1180 token strings.
1181
11822001-12-13 Paul Eggert <eggert@twinsun.com>
1183
1184 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1185 Do not infringe on the global user namespace when using C++.
1186 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1187 All uses of `fprintf' and `stderr' changed.
1188
1189 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1190
11912001-12-13 Akim Demaille <akim@epita.fr>
1192
1193 The computation of nullable is broken: it doesn't handle empty
1194 RHS's properly.
1195
1196 * tests/torture.at (GNU AWK Grammar): New.
1197 * tests/sets.at (Nullable): New.
1198 * src/nullable.c (set_nullable): Instead of blindly looping over
1199 `ritems', loop over the rules, and then over their rhs's.
1200
1201 Work around Autotest bugs.
1202
1203 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1204 frame, because Autotest understand lines starting with a `+' as
1205 traces from the shell. Then, they are not processed properly.
1206 Admittedly an Autotest bug, but we don't have time to wait for
1207 Autotest to catch up.
1208 * tests/regression.at (Broken Closure): Adjust to the new table
1209 frames.
1210 Move to...
1211 * tests/sets.at: here.
1212
12132001-12-13 Akim Demaille <akim@epita.fr>
1214
1215 * src/closure.c (closure): Use nrules instead of playing tricks
1216 with BITS_PER_WORD.
1217
12182001-12-13 Akim Demaille <akim@epita.fr>
1219
1220 * src/print.c (print_actions): Output the handling of `$' as the
1221 traces do: shifting the token EOF. Before EOF was treated as a
1222 nonterminal.
1223 * tests/regression.at: Adjust some tests.
1224 * src/print_graph.c (print_core): Complete the set of items via
1225 closure. The next-to-final and final states are still unsatisfying,
1226 but that's to be addressed elsewhere.
1227 No longer output the rule numbers, but do output the state number.
1228 A single loop for the shifts + gotos is enough, but picked a
1229 distinct color for each.
1230 (print_graph): Initialize and finalize closure.
1231
12322001-12-13 Akim Demaille <akim@epita.fr>
1233
1234 * src/reader.c (readgram): Remove dead code, an strip useless
1235 braces.
1236 (get_type): Remove, unused.
1237
12382001-12-12 Akim Demaille <akim@epita.fr>
1239
1240 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1241 on that of lib/error.c.
1242
12432001-12-12 Akim Demaille <akim@epita.fr>
1244
1245 Some hosts don't like `/' in includes.
1246
1247 * src/system.h: Include libgettext.h without qualifying the path.
1248 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1249 $(top_srcdir).
1250
12512001-12-11 Marc Autret <autret_m@epita.fr>
1252
1253 * src/output.c (output_parser): Remove useless muscle.
1254
12552001-12-11 Marc Autret <autret_m@epita.fr>
1256
1257 * src/bison.simple: Remove #line just before %%epilogue. It
1258 is now handled in ...
1259 * src/reader.c (read_additionnal_code): Add the output of a
1260 #line for the epilogue.
1261
12622001-12-10 Marc Autret <autret_m@epita.fr>
1263
1264 * src/reader.c (copy_definition): Re-use CPP-outed code which
1265 replace precedent remove.
1266 * src/bison.simple: Remove #line before %%prologue because
1267 %%input-line is wrong at this time.
1268
12692001-12-10 Marc Autret <autret_m@epita.fr>
1270
1271 * src/reader.c (symbols_output): Clean up.
1272 * src/output.c (output_gram, output): Clean up.
1273
12742001-12-10 Akim Demaille <akim@epita.fr>
1275
1276 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1277 * src/LR0.c (set_state_table): here.
1278 * src/lalr.c (lalr): Call it.
1279
12802001-12-10 Akim Demaille <akim@epita.fr>
1281
1282 * src/state.h (shifts): Remove the `number' member: shifts are
1283 attached to state, hence no longer need to be labelled with a
1284 state number.
1285
12862001-12-10 Akim Demaille <akim@epita.fr>
1287
1288 Now that states have a complete set of members, the linked list of
1289 shifts is useless: just fill directly the state's shifts member.
1290
1291 * src/state.h (shifts): Remove the `next' member.
1292 * src/LR0.c (first_state, last_state): Remove.
1293 Adjust the callers.
1294 (augment_automaton): Don't look for the shifts that must be added
1295 a shift on EOF: it is those of the state we looked for! But now,
1296 since shifts are attached, it is no longer needed to looking
1297 merely by its id: its number.
1298
12992001-12-10 Akim Demaille <akim@epita.fr>
1300
1301 * src/LR0.c (augment_automaton): Better variable locality.
1302 Remove an impossible branch: if there is a state corresponding to
1303 the start symbol being shifted, then there is shift for the start
1304 symbol from the initial state.
1305
13062001-12-10 Akim Demaille <akim@epita.fr>
1307
1308 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1309 only when appropriate: when insert_start_shifting_state' is not
1310 invoked.
1311 * tests/regression.at (Rule Line Numbers): Adjust.
1312
13132001-12-10 Akim Demaille <akim@epita.fr>
1314
1315 * src/LR0.c (augment_automaton): Now that all states have shifts,
1316 merge the two cases addition shifts to the initial state.
1317
13182001-12-10 Akim Demaille <akim@epita.fr>
1319
1320 * src/lalr.c (set_state_table): Move to...
1321 * src/LR0.c: here.
1322 * src/lalr.c (lalr): Don't call it...
1323 * src/LR0.c (generate_states): do it.
1324 * src/LR0.h (first_state): Remove, only the table is used.
1325
13262001-12-10 Akim Demaille <akim@epita.fr>
1327
1328 * src/LR0.h (first_shift, first_reduction): Remove.
1329 * src/lalr.c: Don't use first_shift: find shifts through the
1330 states.
1331
13322001-12-10 Akim Demaille <akim@epita.fr>
1333
1334 * src/LR0.c: Attach shifts to states as soon as they are
1335 computed.
1336 * src/lalr.c (set_state_table): Instead of assigning shifts to
1337 state, just assert that the mapping was properly done.
1338
13392001-12-10 Akim Demaille <akim@epita.fr>
1340
1341 * src/LR0.c (insert_start_shift): Rename as...
1342 (insert_start_shifting_state): this.
1343 (insert_eof_shifting_state, insert_accepting_state): New.
1344 (augment_automaton): Adjust.
1345 Better locality of the variables.
1346 When looking if the start_symbol is shifted from the initial
1347 state, using `while (... symbol != start_symbol ...)' sounds
1348 better than `while (... symbol < start_symbol ...)': If fail
1349 to see how the order between symbols could be relevant!
1350
13512001-12-10 Akim Demaille <akim@epita.fr>
1352
1353 * src/getargs.h: Don't declare `spec_name_prefix' and
1354 `spec_file_prefix', declared by src/files.h.
1355 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1356 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1357 * src/output.c (prepare): Adjust.
1358 * src/reader.c (symbols_output): Likewise.
1359 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1360
13612001-12-10 Akim Demaille <akim@epita.fr>
1362
1363 * src/muscle_tab.c (muscle_init): NULL is a better default than
1364 `"0"'.
1365
13662001-12-10 Akim Demaille <akim@epita.fr>
1367
1368 * src/reader.c (reader): Calling symbols_output once is enough.
1369
13702001-12-10 Akim Demaille <akim@epita.fr>
1371
1372 Now that states have a complete set of members, the linked list of
1373 reductions is useless: just fill directly the state's reductions
1374 member.
1375
1376 * src/state.h (struct reductions): Remove member `number' and
1377 `next'.
1378 * src/LR0.c (first_reduction, last_reduction): Remove.
1379 (save_reductions): Don't link the new reductions, store them in
1380 this_state.
1381 * src/lalr.c (set_state_table): No need to attach reductions to
1382 states, it's already done.
1383 * src/output.c (output_actions): No longer free the shifts, then
1384 the reductions, then the states: free all the states and their
1385 members.
1386
13872001-12-10 Akim Demaille <akim@epita.fr>
1388
1389 * src/options.c (OPTN, DRTV, BOTH): New.
1390 (option_table): Use them.
1391
1392 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1393 the job of system.h.
1394 * src/options.c: Don't include stdio.h and xalloc.h for the same
1395 reasons.
1396
13972001-12-10 Akim Demaille <akim@epita.fr>
1398
1399 * src/output.c (output, prepare): Make sure the values of the
1400 muscles `action' and `prologue' are 0-terminated.
1401
14022001-12-10 Akim Demaille <akim@epita.fr>
1403
1404 Clean up GCC warnings.
1405
1406 * src/reader.c (copy_action): `buf' is not used.
1407 (parse_skel_decl): Be static.
1408 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1409 * src/options.h (create_long_option_table): Have a real prototype.
1410 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1411 (hash_delete_at): Return const void *.
1412 Adjust casts to preserve the const.
1413
14142001-12-10 Akim Demaille <akim@epita.fr>
1415
1416 * configure.in: Require 2.52g.
1417 M4 is not needed, but AUTOM4TE is.
1418 * m4/m4.m4: Remove.
1419 * tests/Makefile.am: Adjust.
1420
14212001-12-10 Akim Demaille <akim@epita.fr>
1422
1423 One structure for states is enough, even though theoretically
1424 there are LR(0) states and LALR(1) states.
1425
1426 * src/lalr.h (state_t): Remove.
1427 (state_table): Be state_t **, not state_t *.
1428 * src/state.h (core, CORE_ALLOC): Rename as...
1429 (state_t, STATE_ALLOC): this.
1430 Add the LALR(1) members: shifts, reductions, errs.
1431 * src/LR0.c (state_table): Rename as...
1432 (state_hash): this, to avoid name clashes with the global
1433 `state_table'.
1434 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1435 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1436
14372001-12-10 Akim Demaille <akim@epita.fr>
1438
1439 Bison dumps core on bash.y.
1440 Reported by Pascal Bart.
1441
1442 * src/warshall.c (bitmatrix_print): New.
1443 (TC): Use it.
1444 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1445 j must be the outer loop.
1446 * tests/regression.at (Broken Closure): New.
1447
14482001-12-05 Akim Demaille <akim@epita.fr>
1449
1450 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1451 its argument.
1452