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