]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
* lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-02-25 Akim Demaille <akim@epita.fr>
2
3 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
4 Fileutils 4.1.5.
5 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
6 * src/output.c (output_skeleton): Use mkstemp to create a real
7 temporary file.
8 Move the filling of `skeleton' and its muscle to...
9 (prepare): here.
10 (output): Move the definition of the prologue muscle to...
11 (prepare): here.
12 * src/system.h (DEFAULT_TMPDIR): New.
13
142002-02-14 Paul Eggert <eggert@twinsun.com>
15
16 Remove the support for C++ namespace cleanliness; it was
17 causing more problems than it was curing, since it didn't work
18 properly on some nonstandard C++ compilers. This can wait
19 for a proper C++ parser.
20
21 * NEWS: Document this.
22 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
23 of C++, as it's treated like C now.
24 * src/bison.simple (YYSTD): Remove.
25 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
26 Treat C++ just like Standard C instead of trying to support
27 namespace cleanliness.
28
292002-02-14 Akim Demaille <akim@epita.fr>
30
31 * tests/regression.at (else): Adjust to Andreas' change.
32
332002-02-14 Akim Demaille <akim@epita.fr>
34
35 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
36
372002-02-13 Andreas Schwab <schwab@suse.de>
38
39 * src/output.c (output_rule_data): Don't output NULL, it might
40 not be defined yet.
41
422002-02-11 Robert Anisko <robert@lrde.epita.fr>
43
44 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
45 (Copyright notice): Update.
46
472002-02-11 Akim Demaille <akim@epita.fr>
48
49 * tests/regression.at (%nonassoc and eof): Don't include
50 nonportable headers.
51
522002-02-08 Robert Anisko <robert@lrde.epita.fr>
53
54 * data/bison.c++: Correct error recovery. Make the user able to
55 initialize the starting location.
56
572002-02-07 Akim Demaille <akim@epita.fr>
58
59 * tests/input.at: New.
60
612002-02-07 Robert Anisko <robert@lrde.epita.fr>
62
63 * data/bison.c++: Replace some direct m4 expansions by constants. Be
64 more consistent when naming methods and variables. Put preprocessor
65 directives around tables only needed for debugging.
66
672002-02-07 Robert Anisko <robert@lrde.epita.fr>
68
69 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
70 C++ parsers.
71 (yy::b4_name::parse): Use print_.
72
732002-02-07 Robert Anisko <robert@lrde.epita.fr>
74
75 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
76
772002-02-07 Robert Anisko <robert@lrde.epita.fr>
78
79 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
80 C++ parsers.
81 (yy::b4_name::parse): Build verbose error messages, and use error_.
82
832002-02-06 Robert Anisko <robert@lrde.epita.fr>
84
85 * data/bison.c++: Fix m4 quoting in comments.
86
872002-02-06 Robert Anisko <robert@lrde.epita.fr>
88
89 * data/bison.c++: Adjust the parser code. Fix some muscles that were
90 not expanded by m4.
91
922002-02-05 Akim Demaille <akim@epita.fr>
93
94 * data/bison.c++: Adjust to the M4 back end.
95 More is certainly needed.
96
972002-02-05 Akim Demaille <akim@epita.fr>
98
99 Give a try to M4 as a back end.
100
101 * lib/readpipe.c: New, from wdiff.
102 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
103 BISON_HAIRY.
104 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
105 specific values. Now it is m4 that performs the lookup.
106 * src/parse-skel.y: Remove.
107 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
108 * src/output.c (actions_output, guards_output)
109 (token_definitions_output): No longer keeps track of the output
110 line number, hence remove the second argument.
111 (guards_output): Check against the guard member of a rule, not the
112 action member.
113 Adjust callers.
114 (output_skeleton): Don't look for the skeleton location, let m4 do
115 that.
116 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
117 file will be used.
118 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
119 (prepare): Given that for the time being changesyntax is not
120 usable in M4, rename the muscles using `-' to `_'.
121 Define `defines_flag', `output_parser_name' and `output_header_name'.
122 * src/output.h (actions_output, guards_output)
123 (token_definitions_output): Adjust prototypes.
124 * src/scan-skel.l: Instead of scanning the skeletons, it now
125 processes the output of m4: `__oline__' and `#output'.
126 * data/bison.simple: Adjust to be used by M4(sugar).
127 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
128 to date.
129 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
130 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
131 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
132 shamelessly stolen from CVS Autoconf.
133
1342002-02-05 Akim Demaille <akim@epita.fr>
135
136 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
137 * configure.in: Check for the declarations of free and malloc.
138 * src/muscle_tab.c: Adjust.
139
1402002-02-05 Akim Demaille <akim@epita.fr>
141
142 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
143 which have no values.
144
1452002-02-05 Akim Demaille <akim@epita.fr>
146
147 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
148 * data/: here.
149
1502002-01-29 Paul Eggert <eggert@twinsun.com>
151
152 * src/bison.simple (YYSIZE_T): Do not define merely because
153 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
154 On some platforms, <alloca.h> does not declare YYSTD (size_t).
155
1562002-01-27 Akim Demaille <akim@epita.fr>
157
158 Fix `%nonassoc and eof'.
159
160 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
161 which were not properly copied! Replace
162 memcpy (res->errs, src->errs, src->nerrs);
163 with
164 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
165 !!!
166 * tests/regression.at (%nonassoc and eof): Adjust to newest
167 Autotest: `.' is not in the PATH.
168
1692002-01-27 Akim Demaille <akim@epita.fr>
170
171 * tests/sets.at (AT_EXTRACT_SETS): New.
172 (Nullable): Use it.
173 (Firsts): New.
174
1752002-01-26 Akim Demaille <akim@epita.fr>
176
177 * tests/actions.at, tests/calc.at, tests/headers.at,
178 * tests/torture.at: Adjust to the newest Autotest which no longer
179 forces `.' in the PATH.
180
1812002-01-25 Akim Demaille <akim@epita.fr>
182
183 * tests/regression.at (%nonassoc and eof): New.
184 Suggested by Robert Anisko.
185
1862002-01-24 Akim Demaille <akim@epita.fr>
187
188 Bison dumps core when trying to complain about broken input files.
189 Reported by Cris van Pelt.
190
191 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
192 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
193 into...
194 (Invalid inputs): Strengthen: exercise parse_percent_token.
195
1962002-01-24 Robert Anisko <robert.anisko@epita.fr>
197
198 * src/Makefile.am: Add bison.c++.
199 * src/bison.c++: New skeleton.
200
2012002-01-21 Paolo Bonzini <bonzini@gnu.org>
202
203 * po/it.po: New.
204
2052002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
206
207 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
208
2092002-01-20 Marc Autret <marc@gnu.org>
210
211 * src/files.c (compute_output_file_names): Fix
212
2132002-01-20 Marc Autret <marc@gnu.org>
214
215 * tests/output.at: New test.
216 * src/files.c (compute_base_names): Don't map extensions when
217 the YACC flag is set, use defaults.
218 Reported by Evgeny Stambulchik.
219
2202002-01-20 Marc Autret <marc@gnu.org>
221
222 * src/system.h: Need to define __attribute__ away for non-GCC
223 compilers as well (i.e. the vendor C compiler).
224 Suggested by Albert Chin-A-Young.
225
2262002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
227
228 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
229 canonical definition.
230 * src/system.h: Use the canonical definition for PARAMS (avoids
231 a conflict with the macro from lib/hash.h).
232
2332002-01-11 Akim Demaille <akim@epita.fr>
234
235 * configure.in: Use AC_FUNC_STRNLEN.
236 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
237
2382002-01-09 Akim Demaille <akim@epita.fr>
239
240 * src/files.c, src/files.h (output_infix): New.
241 (tab_extension): Remove.
242 (compute_base_names): Compute the former, drop the latter.
243 * src/output.c (prepare): Insert the muscles `output-infix', and
244 `output-suffix'.
245 * src/parse-skel.y (string, string.1): New.
246 (section.header): Use it.
247 (section.yacc): Remove.
248 (prefix): Remove too.
249 * src/scan-skel.l: Adjust.
250 * src/bison.simple, src/bison.hairy: Adjust.
251
2522002-01-09 Akim Demaille <akim@epita.fr>
253
254 * configure.in (WERROR_CFLAGS): Compute it.
255 * src/Makefile.am (CFLAGS): Pass it.
256 * tests/atlocal.in (CFLAGS): Idem.
257 * src/files.c: Fix a few warnings.
258 (get_extension_index): Remove, unused.
259
2602002-01-08 Akim Demaille <akim@epita.fr>
261
262 * src/getargs.c (AS_FILE_NAME): New.
263 (getargs): Use it to convert DOSish file names.
264 * src/files.c (base_name): Rename as full_base_name to avoid
265 clashes with `base_name ()'.
266 (filename_split): New.
267 (compute_base_names): N-th rewrite, using filename_split.
268
2692002-01-08 Akim Demaille <akim@epita.fr>
270
271 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
272 New, stolen from the Fileutils 4.1.
273 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
274 * configure.in: Check for the presence of memrchr, and of its
275 prototype.
276
2772002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
278
279 * lib/hash.h (__P): Added definition for this macro.
280 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
281 BUILT_SOURCES, to ensure they are generated first.
282 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
283 %error-verbose to allow bootstrapping with bison 1.30x.
284
2852002-01-06 Akim Demaille <akim@epita.fr>
286
287 * src/reader.c (parse_braces): Don't fetch the next char, the
288 convention is to fetch on entry.
289 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
290 'switch' without a following semicolon.
291 * tests/regression.at (braces parsing): New.
292
2932002-01-06 Akim Demaille <akim@epita.fr>
294
295 Bison is dead wrong in its RR conflict reports.
296
297 * tests/torture.at (GNU Cim Grammar): New.
298 * src/conflicts.c (count_rr_conflicts): Fix.
299
3002002-01-06 Akim Demaille <akim@epita.fr>
301
302 Creating package.m4 from configure.ac causes too many problems.
303
304 * tests/Makefile.am (package.m4): Create it by hand,
305 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
306
3072002-01-06 Akim Demaille <akim@epita.fr>
308
309 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
310 skeleton.h.
311
3122002-01-04 Paul Eggert <eggert@twinsun.com>
313
314 * doc/bison.texinfo (Debugging):
315 Remove YYSTDERR; it's no longer defined or used.
316 Also, s/cstdio.h/cstdio/.
317
3182002-01-03 Akim Demaille <akim@epita.fr>
319
320 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
321
3222002-01-03 Akim Demaille <akim@epita.fr>
323
324 * src/parse-skel.y (process_skeleton): Don't bind the parser's
325 tracing code to --trace, wait for a better --trace option, with
326 args.
327
3282002-01-03 Akim Demaille <akim@epita.fr>
329
330 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
331 The ISO C++ standard is extremely clear about it: stderr is
332 considered a macro, not a regular symbol (see table 94 `Header
333 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
334 Therefore std:: does not apply to it. It still does with fprintf.
335 Also, s/cstdio.h/cstdio/.
336
3372002-01-03 Akim Demaille <akim@epita.fr>
338
339 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
340 for non system headers.
341
3422002-01-02 Akim Demaille <akim@epita.fr>
343
344 Equip the skeleton chain with location tracking, runtime trace,
345 pure parser and scanner.
346
347 * src/parse-skel.y: Request a pure parser, locations, and prefix
348 renaming.
349 (%union): Having several members with the same type does not help
350 type mismatches, simplify.
351 (YYPRINT, yyprint): New.
352 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
353 (skel_error): this.
354 Handle locations.
355 * src/scan-skel.l: Adjust to these changes.
356 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
357 (LOCATION_PRINT, skel_control_t): New.
358
3592001-12-30 Akim Demaille <akim@epita.fr>
360
361 * src/parse-skel.y: Get rid of the shift/reduce conflict:
362 replace `gb' with BLANKS.
363 * src/scan-skel.l: Adjust.
364
3652001-12-30 Akim Demaille <akim@epita.fr>
366
367 * src/system.h: We don't need nor want bcopy.
368 Throw away MS-DOS crap: we don't need getpid.
369 * configure.in: We don't need strndup. It was even causing
370 problems: because Flex includes the headers *before* us,
371 _GNU_SOURCE is not defined by config.h, and therefore strndup was
372 not visible.
373 * lib/xstrndup.c: New.
374 * src/scan-skel.l: Use it.
375 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
376 * src/parse-skel.y: Use %directives instead of #defines.
377
3782001-12-30 Akim Demaille <akim@epita.fr>
379
380 * src/skeleton.h: New.
381 * src/output.c (output_parser, output_master_parser): Remove, dead
382 code.
383 * src/output.h (get_lines_number, actions_output, guards_output)
384 (token_definitions_output): Prototype them.
385 * src/parse-skel.y: Add the license notice.
386 Include output.h and skeleton.h.
387 (process_skeleton): Returns void, and takes a single parameter.
388 * src/scan-skel.l: Add the license notice.
389 Include skeleton.h.
390 Don't use %option yylineno: it seems that then Flex imagines
391 REJECT has been used, and therefore it won't reallocate its
392 buffers (which makes no other sense to me than a bug). It results
393 in warnings for `unused: yy_flex_realloc'.
394
3952001-12-30 Robert Anisko <robert.anisko@epita.fr>
396
397 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
398 (MUSCLE_INSERT_PREFIX): ...to there.
399 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
400 (MUSCLE_INSERT_PREFIX): Move from here...
401
402 * src/bison.hairy: Add a section directive. Put braces around muscle
403 names. This parser skeleton is still broken, but Bison should not
404 choke on a bad muscle 'syntax'.
405 * src/bison.simple: Add a section directive. Put braces around muscle
406 names.
407
408 * src/files.h (strsuffix, stringappend): Add declarations.
409 (tab_extension): Add declaration.
410 (short_base_name): Add declaration.
411
412 * src/files.c (strsuffix, stringappend): No longer static. These
413 functions are used in the skeleton parser.
414 (tab_extension): New.
415 (compute_base_names): Use the computations done in this function
416 to guess if the generated parsers should have '.tab' in their
417 names.
418 (short_base_name): No longer static.
419
420 * src/output.c (output_skeleton): New.
421 (output): Disable call to output_master_parser, and give a try to
422 a new skeleton handling system.
423 (guards_output, actions_output): No longer static.
424 (token_definitions_output, get_lines_number): No longer static.
425
426 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
427
428 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
429 parse-skel.y.
430
431 * src/parse-skel.y: New file.
432 * src/scan-skel.l: New file.
433
4342001-12-29 Akim Demaille <akim@epita.fr>
435
436 %name-prefix is broken.
437
438 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
439 Adjust all dependencies.
440 * tests/headers.at (export YYLTYPE): Strengthen this test: use
441 %name-prefix.
442
443 Renaming yylval but not yylloc is not consistent. Now we do.
444
445 * src/bison.simple: Prefix yylloc if used.
446 * doc/bison.texinfo (Decl Summary): Document that.
447
4482001-12-29 Akim Demaille <akim@epita.fr>
449
450 * doc/bison.texinfo: Promote `%long-directive' over
451 `%long_directive'.
452 Remove all references to fixed-output-files, yacc is enough.
453
4542001-12-29 Akim Demaille <akim@epita.fr>
455
456 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
457 user prologue. These are defaults.
458 * tests/actions.at (Mid-rule actions): Make sure the user can
459 define YYDEBUG and YYERROR_VERBOSE.
460
4612001-12-29 Akim Demaille <akim@epita.fr>
462
463 * src/output.c (header_output): Don't forget to export YYLTYPE and
464 yylloc.
465 * tests/headers.at (export YYLTYPE): New, make sure it does.
466 * tests/regression.at (%union and --defines, Invalid CPP headers):
467 Move to...
468 * tests/headers.at: here.
469
4702001-12-29 Akim Demaille <akim@epita.fr>
471
472 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
473
4742001-12-29 Akim Demaille <akim@epita.fr>
475
476 * tests/actions.at (Mid-rule actions): Output on a single line
477 instead of several.
478
4792001-12-29 Akim Demaille <akim@epita.fr>
480
481 * doc/bison.texinfo: Formatting changes.
482
4832001-12-29 Akim Demaille <akim@epita.fr>
484
485 Don't store the token defs in a muscle, just be ready to output it
486 on command. Now possible via `symbols'. Fixes a memory leak.
487
488 * src/output.c (token_definitions_output): New.
489 (output_parser, header_output): Use it.
490 * src/reader.c (symbols_save): Remove.
491
4922001-12-29 Akim Demaille <akim@epita.fr>
493
494 * src/bison.simple: Do not provide a default for YYSTYPE and
495 YYLTYPE before the user's prologue. Otherwise it's hardly... a
496 default.
497
4982001-12-29 Akim Demaille <akim@epita.fr>
499
500 Mid-rule actions are simply... ignored!
501
502 * src/reader.c (readgram): Be sure to attach mid-rule actions to
503 the empty-rule associated to the dummy symbol, not to the host
504 rule.
505 * tests/actions.at (Mid-rule actions): New.
506
5072001-12-29 Akim Demaille <akim@epita.fr>
508
509 Memory leak.
510
511 * src/reader.c (reader): Free grammar.
512
5132001-12-29 Akim Demaille <akim@epita.fr>
514
515 Memory leak.
516
517 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
518 since it allocates it for each state, although only one is needed.
519 (allocate_storage): Do it here.
520
5212001-12-29 Akim Demaille <akim@epita.fr>
522
523 * src/options.h, src/options.c (create_long_option_table): Rename
524 as...
525 (long_option_table_new): this, with a clearer prototype.
526 (percent_table): Remove, unused,
527 * src/getargs.c (getargs): Adjust.
528
5292001-12-29 Akim Demaille <akim@epita.fr>
530
531 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
532 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
533 as states.
534
5352001-12-29 Akim Demaille <akim@epita.fr>
536
537 * src/lalr.c (build_relations): Rename `states' as `states1'.
538 Sorry, I don't understand exactly what it is, no better name...
539
5402001-12-29 Akim Demaille <akim@epita.fr>
541
542 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
543 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
544 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
545 as rules.
546
5472001-12-29 Akim Demaille <akim@epita.fr>
548
549 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
550 ago.
551
5522001-12-29 Akim Demaille <akim@epita.fr>
553
554 * src/reader.c, src/reader.h (user_toknums): Remove.
555 Adjust all users to use symbols[i]->user_token_number.
556
5572001-12-29 Akim Demaille <akim@epita.fr>
558
559 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
560 Adjust all users to use symbols[i]->prec or ->assoc.
561
5622001-12-29 Akim Demaille <akim@epita.fr>
563
564 * src/reader.c, src/reader.h (tags): Remove.
565 Adjust all users to use symbols[i]->tag.
566
5672001-12-29 Akim Demaille <akim@epita.fr>
568
569 * src/gram.h, src/gram.c (symbols): New, similar to state_table
570 and rule_table.
571 * src/reader.c (packsymbols): Fill this table.
572 Drop sprec.
573 * src/conflicts.c (resolve_sr_conflict): Adjust.
574 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
575 single table.
576 Use symbols[i]->tag instead of tags[i].
577
5782001-12-29 Akim Demaille <akim@epita.fr>
579
580 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
581 In addition, put a comment in there, to replace...
582 * tests/regression.at (%union and C comments): Remove.
583
5842001-12-29 Akim Demaille <akim@epita.fr>
585
586 * tests/regression.at (Web2c Actions): Blindly move the actual
587 output as expected output. The contents *seem* right to me, but I
588 can't pretend reading perfectly parser tables... Nonetheless, all
589 the other tests pass correctly, the table look OK, even though the
590 presence of `$axiom' is to be noted: AFAICS it is useless (but
591 harmless).
592
5932001-12-29 Akim Demaille <akim@epita.fr>
594
595 * src/reader.c (readgram): Don't add the rule 0 if there were no
596 rules read. In other words, add it _after_ having performed
597 grammar sanity checks.
598 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
599
6002001-12-29 Akim Demaille <akim@epita.fr>
601
602 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
603 visible, and some states have now a different number.
604
6052001-12-29 Akim Demaille <akim@epita.fr>
606
607 * src/reader.c (readgram): Bind the initial rule's lineno to that
608 of the first rule.
609 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
610 (Solved SR Conflicts): Adjust rule 0's line number.
611
6122001-12-29 Akim Demaille <akim@epita.fr>
613
614 Fix the `GAWK Grammar' failure.
615
616 * src/LR0.c (final_state): Initialize to -1 so that we do compute
617 the reductions of the first state which was mistakenly confused
618 with the final state because precisely final_state was initialized
619 to 0.
620 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
621 now noticed by Bison.
622 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
623 have a reduction on $default.
624
6252001-12-29 Akim Demaille <akim@epita.fr>
626
627 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
628 rule line numbers.
629 * src/closure.c (print_closure): Likewise.
630 * src/derives.c (print_derives): Likewise.
631 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
632 now.
633
6342001-12-29 Akim Demaille <akim@epita.fr>
635
636 * src/lalr.c (lookaheads_print): New.
637 (lalr): Call it when --trace-flag.
638 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
639 are dumped.
640
6412001-12-29 Akim Demaille <akim@epita.fr>
642
643 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
644 when walking through ritem, even via rule->rhs.
645 * src/reduce.c (dump_grammar, useful_production, reduce_output)
646 (useful_production, useless_nonterminals): Likewise.
647 (reduce_grammar_tables): Likewise, plus update nritems.
648 * src/nullable.c (set_nullable): Likewise.
649 * src/lalr.c (build_relations): Likewise.
650 * tests/sets.at (Nullable): Adjust.
651 Fortunately, now, the $axiom is no longer nullable.
652
6532001-12-29 Akim Demaille <akim@epita.fr>
654
655 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
656 the 0-sentinel.
657 * src/gram.c (ritem_longest_rhs): Likewise.
658 * src/reduce.c (nonterminals_reduce): Likewise.
659 * src/print_graph.c (print_graph): Likewise.
660 * src/output.c (output_rule_data): Likewise.
661 * src/nullable.c (set_nullable): Likewise.
662
6632001-12-29 Akim Demaille <akim@epita.fr>
664
665 * src/output.c: Comment changes.
666
6672001-12-27 Paul Eggert <eggert@twinsun.com>
668
669 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
670 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
671 Sparc, as they were causing more porting problems than the
672 (minor) performance improvement was worth.
673
674 Also, catch up with 1.31's YYSTD.
675
6762001-12-27 Akim Demaille <akim@epita.fr>
677
678 * src/output.c (output_gram): Rely on nritems, not the
679 0-sentinel. See below.
680 Use -1 as separator, not 0.
681 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
682 Rely on -1 as separator in yyrhs, instead of 0.
683 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
684 twice `Now at end of input', therefore there are two lines less to
685 expect.
686
6872001-12-27 Akim Demaille <akim@epita.fr>
688
689 * tests/regression.at (Unresolved SR Conflicts):
690 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
691 below.
692
6932001-12-27 Akim Demaille <akim@epita.fr>
694
695 * src/LR0.c (new_state): Recognize the final state by the fact it
696 is reached by eoftoken.
697 (insert_start_shifting_state, insert_eof_shifting_state)
698 (insert_accepting_state, augment_automaton): Remove, since now
699 these states are automatically computed from the initial state.
700 (generate_states): Adjust.
701 * src/print.c: When reporting a rule number to the user, substract
702 1, so that the axiom rule is rule 0, and the first user rule is 1.
703 * src/reduce.c: Likewise.
704 * src/print_graph.c (print_core): For the time being, just as for
705 the report, depend upon --trace-flags to dump the full set of
706 items.
707 * src/reader.c (readgram): Once the grammar read, insert the rule
708 0: `$axiom: START-SYMBOL $'.
709 * tests/set.at: Adjust: rule 0 is now displayed, and since the
710 number of the states has changed (the final state is no longer
711 necessarily the last), catch up.
712
7132001-12-27 Akim Demaille <akim@epita.fr>
714
715 Try to make the use of the eoftoken valid. Given that its value
716 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
717 is used instead of > 0 where appropriate, (ii), depend upon nritems
718 instead of the 0-sentinel.
719
720 * src/gram.h, src/gram.c (nritems): New.
721 Expected to be duplication of nitems, but for the time being...
722 * src/reader.c (packgram): Assert nritems and nitems are equal.
723 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
724 * src/closure.c (print_closure, print_fderives): Likewise.
725 * src/gram.c (ritem_print): Likewise.
726 * src/print.c (print_core, print_grammar): Likewise.
727 * src/print_graph.c: Likewise.
728
7292001-12-27 Akim Demaille <akim@epita.fr>
730
731 * src/main.c (main): If there are complains after grammar
732 reductions, then output the report anyway if requested, then die.
733 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
734 * src/reader.c (eoftoken): New.
735 (parse_token_decl): If the token being defined has value `0', it
736 is the eoftoken.
737 (packsymbols): No longer hack `tags' to insert `$' by hand.
738 Be sure to preserve the value of the eoftoken.
739 (reader): Make sure eoftoken is defined.
740 Initialize nsyms to 0: now eoftoken is created just like the others.
741 * src/print.c (print_grammar): Don't special case the eof token.
742 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
743 lie anyway, albeit pleasant.
744 * tests/calc.at: Exercise error messages with eoftoken.
745 Change the grammar so that empty input is invalid.
746 Adjust expectations.
747 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
748
7492001-12-27 Akim Demaille <akim@epita.fr>
750
751 * configure.in: Check the protos of strchr ans strspn.
752 Replace strchr if needed.
753 * src/system.h: Provide the protos of strchr, strspn and memchr if
754 missing.
755 * lib/strchr.c: New.
756 * src/reader.c (symbols_save): Use strchr.
757
7582001-12-27 Akim Demaille <akim@epita.fr>
759
760 * src/print.c, src/print_graph.c (escape): New.
761 Use it to quote the TAGS outputs.
762 * src/print_graph.c (print_state): Now errors are in red, and
763 reductions in green.
764 Prefer high to wide: output the state number on a line of its own.
765
7662001-12-27 Akim Demaille <akim@epita.fr>
767
768 * src/state.h, src/state.c (reductions_new): New.
769 * src/LR0.c (set_state_table): Let all the states have a
770 `reductions', even if reduced to 0.
771 (save_reductions): Adjust.
772 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
773 * src/print.c (print_reductions, print_actions): Adjust.
774 * src/output.c (action_row): Adjust.
775
7762001-12-27 Akim Demaille <akim@epita.fr>
777
778 * src/state.h, src/state.c (errs_new, errs_dup): New.
779 * src/LR0.c (set_state_table): Let all the states have an errs,
780 even if reduced to 0.
781 * src/print.c (print_errs, print_reductions): Adjust.
782 * src/output.c (output_actions, action_row): Adjust.
783 * src/conflicts.c (resolve_sr_conflict): Adjust.
784
7852001-12-27 Akim Demaille <akim@epita.fr>
786
787 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
788
7892001-12-27 Akim Demaille <akim@epita.fr>
790
791 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
792 * src/print.c: here.
793 (lookaheadset, shiftset): New, used as additional storage by
794 print_reductions.
795 (print_results): Adjust.
796 (print_shifts, print_gotos, print_errs): New, extracted from...
797 (print_actions): here.
798 * src/print_graph.c (print_actions): Remove dead code.
799
8002001-12-27 Akim Demaille <akim@epita.fr>
801
802 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
803 `$n' and `@n'.
804
8052001-12-27 Akim Demaille <akim@epita.fr>
806
807 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
808 (build_relations): Adjust.
809
8102001-12-27 Akim Demaille <akim@epita.fr>
811
812 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
813 duplication.
814
8152001-12-27 Akim Demaille <akim@epita.fr>
816
817 * src/reader.c (packgram): Catch nitems overflows.
818
8192001-12-27 Akim Demaille <akim@epita.fr>
820
821 * src/files.c, src/files.h (guard_obstack): Remove.
822 * src/output.c (output): Adjust.
823 * src/reader.c (parse_braces): New, factoring...
824 (copy_action, copy_guard): these two which are renamed as...
825 (parse_action, parse_guard): these.
826 As a voluntary consequence, using braces around guards is now
827 mandatory.
828
8292001-12-27 Akim Demaille <akim@epita.fr>
830
831 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
832 * src/reader.c (symbol_list): `guard' and `guard_line' are new
833 members.
834 (symbol_list_new): Adjust.
835 (copy_action): action_line is the first line, not the last.
836 (copy_guard): Just as for actions, store the `action' only, not
837 the switch/case/break flesh.
838 Don't parse the user action that might follow the guard, let...
839 (readgram): do it, i.e., now, there can be an action after a
840 guard.
841 In other words the guard is just explicitly optional.
842 (packgram): Adjust.
843 * src/output.c (guards_output): New.
844 (output_parser): Call it when needed.
845 (output): Also free the guard and attrs obstacks.
846 * src/files.c, src/files.h (obstack_save): Remove.
847 (output_files): Remove.
848 As a result, if one needs the former `.act' file, using an
849 appropriate skeleton which requires actions and guards is now
850 required.
851 * src/main.c (main): Adjust.
852 * tests/semantic.at: New.
853 * tests/regression.at: Use `input.y' as input file name.
854 Avoid 8+3 problems by requiring input.c when the test needs the
855 parser.
856
8572001-12-27 Akim Demaille <akim@epita.fr>
858
859 * src/reader.c (symbol_list_new): Be sure to initialize all the
860 fields.
861
8622001-12-27 Akim Demaille <akim@epita.fr>
863
864 All the hacks using a final pseudo state are now useless.
865
866 * src/LR0.c (set_state_table): state_table holds exactly nstates.
867 * src/lalr.c (nLA): New.
868 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
869 instead of lookaheadsp from the pseudo state (nstate + 1).
870
8712001-12-27 Akim Demaille <akim@epita.fr>
872
873 * src/output.c (action_row, token_actions): Use a state_t instead
874 of a integer, and nlookaheads instead of the following state's
875 lookaheadsp.
876
8772001-12-27 Akim Demaille <akim@epita.fr>
878
879 * src/conflicts.c (log_resolution, flush_shift)
880 (resolve_sr_conflict, set_conflicts, solve_conflicts)
881 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
882 (conflicts_print, print_reductions): Use a state_t instead of an
883 integer when referring to a state.
884 As much as possible, depend upon nlookaheads, instead of the
885 `lookaheadsp' member of the following state (since lookaheads of
886 successive states are successive, the difference between state n + 1
887 and n served as the number of lookaheads for state n).
888 * src/lalr.c (add_lookback_edge): Likewise.
889 * src/print.c (print_core, print_actions, print_state)
890 (print_results): Likewise.
891 * src/print_graph.c (print_core, print_actions, print_state)
892 (print_graph): Likewise.
893 * src/conflicts.h: Adjust.
894
8952001-12-27 Akim Demaille <akim@epita.fr>
896
897 * src/bison.hairy: Formatting/comment changes.
898 ANSIfy.
899 Remove `register' indications.
900 Add plenty of `static'.
901
9022001-12-27 Akim Demaille <akim@epita.fr>
903
904 * src/output.c (prepare): Drop the muscle `ntbase' which
905 duplicates ntokens.
906 * src/bison.simple: Formatting/comment changes.
907 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
908 is an undocumented synonym.
909
9102001-12-22 Akim Demaille <akim@epita.fr>
911
912 * src/output.c (output_table_data): Change the prototype to use
913 `int' for array ranges: some invocations do pass an int, not a
914 short.
915 Reported by Wayne Green.
916
9172001-12-22 Akim Demaille <akim@epita.fr>
918
919 Some actions of web2c.y are improperly triggered.
920 Reported by Mike Castle.
921
922 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
923 * tests/regression.at (Web2c): Rename as...
924 (Web2c Report): this.
925 (Web2c Actions): New.
926
9272001-12-22 Akim Demaille <akim@epita.fr>
928
929 Reductions in web2c.y are improperly reported.
930 Reported by Mike Castle.
931
932 * src/conflicts.c (print_reductions): Fix.
933 * tests/regression.at (Web2c): New.
934
9352001-12-18 Akim Demaille <akim@epita.fr>
936
937 Some host fail on `assert (!"foo")', which expands to
938 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
939 Reported by Nelson Beebee.
940
941 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
942 `#define it_succeeded 0' and `assert (it_succeeded)'.
943
9442001-12-17 Marc Autret <autret_m@epita.fr>
945
946 * src/bison.simple: Don't hard code the skeleton line and filename.
947 * src/output.c (output_parser): Rename 'line' as 'output_line'.
948 New line counter 'skeleton_line' (skeleton-line muscle).
949
9502001-12-17 Paul Eggert <eggert@twinsun.com>
951
952 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
953 YYDEBUG must be defined to a nonzero value.
954
955 * src/bison.simple (yytname): Do not assume that the user defines
956 YYDEBUG to a properly parenthesized expression.
957
9582001-12-17 Akim Demaille <akim@epita.fr>
959
960 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
961 nlookaheads is a new member.
962 Adjust all users.
963 * src/lalr.h (nlookaheads): Remove this orphan declaration.
964 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
965 state.
966
9672001-12-17 Akim Demaille <akim@epita.fr>
968
969 * src/files.h, src/files.c (open_files, close_files): Remove.
970 * src/main.c (main): Don't open/close files, nor invoke lex_free,
971 let...
972 * src/reader.c (reader): Do it.
973
9742001-12-17 Akim Demaille <akim@epita.fr>
975
976 * src/conflicts.c (print_reductions): Formatting changes.
977
9782001-12-17 Akim Demaille <akim@epita.fr>
979
980 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
981 (flush_reduce): New.
982 (resolve_sr_conflict): Adjust.
983
9842001-12-17 Akim Demaille <akim@epita.fr>
985
986 * src/output.c (output_obstack): Be static and rename as...
987 (format_obstack): this, to avoid any confusion with files.c's
988 output_obstack.
989 * src/reader.h (muscle_obstack): Move to...
990 * src/output.h: here, since it's defined in output.c.
991
9922001-12-17 Akim Demaille <akim@epita.fr>
993
994 * src/output.c (action_row, save_column, default_goto)
995 (sort_actions, matching_state, pack_vector): Better variable
996 locality.
997
9982001-12-17 Akim Demaille <akim@epita.fr>
999
1000 * src/output.c: Various formatting changes.
1001
10022001-12-17 Akim Demaille <akim@epita.fr>
1003
1004 * src/files.c (output_files): Free the output_obstack.
1005 * src/main.c (main): Call print and print_graph conditionally.
1006 * src/print.c (print): Work unconditionally.
1007 * src/print_graph.c (print_graph): Work unconditionally.
1008 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1009
10102001-12-16 Marc Autret <autret_m@epita.fr>
1011
1012 * src/output.c (actions_output): Fix. When we use %no-lines,
1013 there is one less line per action.
1014
10152001-12-16 Marc Autret <autret_m@epita.fr>
1016
1017 * src/bison.simple: Remove a useless #line directive.
1018 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1019 * src/output.c (get_lines_number): New.
1020 (output_parser): Adjust, now takes care about the lines of a
1021 output muscles.
1022 Fix line numbering.
1023 (actions_output): Computes the number of lines taken by actions.
1024 (output_master_parser): Insert new skeleton which is the name of
1025 the output parser file name.
1026
10272001-12-15 Marc Autret <autret_m@epita.fr>
1028
1029 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1030
10312001-12-15 Marc Autret <autret_m@epita.fr>
1032
1033 * src/output.c (output_gram): Keep track of the hairy one.
1034
10352001-12-15 Akim Demaille <akim@epita.fr>
1036
1037 Make `make distcheck' work.
1038
1039 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1040 system.h which uses libgettext.h.
1041
10422001-12-15 Akim Demaille <akim@epita.fr>
1043
1044 * src/nullable.c (set_nullable): Useless rules must be skipped,
1045 otherwise, since we range over their symbols, we might look at a
1046 nonterminal which no longer ``exists'', i.e., it is not counted in
1047 `nvars', hence we overflow our arrays.
1048
10492001-12-15 Akim Demaille <akim@epita.fr>
1050
1051 The header can also be produced directly, without any obstack!
1052 Yahoo!
1053
1054 * src/files.c, src/files.h (defines_obstack): Remove.
1055 (compute_header_macro): Global.
1056 (defines_obstack_save): Remove.
1057 * src/reader.c (parse_union_decl): No longer output to
1058 defines_obstack: its content can be found in the `stype' muscle
1059 anyway.
1060 (output_token_translations): Merge into...
1061 (symbols_output): this.
1062 Rename as...
1063 (symbols_save): this.
1064 (reader): Adjust.
1065 * src/output.c (header_output): New.
1066 (output): Call it.
1067
10682001-12-15 Akim Demaille <akim@epita.fr>
1069
1070 * src/reader.c (parse_union_decl): Instead of handling two obstack
1071 simultaneously, use one to define the `stype' muscle, and use the
1072 value of the latter to fill defines_obstack.
1073 (copy_comment): Remove.
1074 (copy_comment2): Work for a single obstack.
1075 Rename as...
1076 (copy_comment): this.
1077
10782001-12-15 Akim Demaille <akim@epita.fr>
1079
1080 * src/lex.c, src/lex.h (xgetc): No longer static.
1081 * src/reader.c (parse_union_decl): Revamp.
1082
10832001-12-15 Akim Demaille <akim@epita.fr>
1084
1085 Still making progress in separating Bison into (i) input, (ii)
1086 process, (iii) output: now we can directly output the parser file
1087 without using table_obstack at all.
1088
1089 * src/files.c, src/files.h (table_obstack): Bye bye.
1090 (parser_file_name): New.
1091 * src/files.c (compute_output_file_names): Compute it.
1092 * src/output.c (actions_output, output_parser)
1093 (output_master_parser): To a file instead of an obstack.
1094
10952001-12-15 Akim Demaille <akim@epita.fr>
1096
1097 Attach actions to rules, instead of pre-outputting them to
1098 actions_obstack.
1099
1100 * src/gram.h (rule_t): action and action_line are new members.
1101 * src/reader.c (symbol_list): Likewise.
1102 (copy_action): Save the actions within the rule.
1103 (packgram): Save them in rule_table.
1104 * src/output.c (actions_output): New.
1105 (output_parser): Use it on `%%actions'.
1106 (output_rule_data): Don't free rule_table.
1107 (output): Do it.
1108 (prepare): Don't save the `action' muscle.
1109 * src/bison.simple: s/%%action/%%actions/.
1110
11112001-12-15 Akim Demaille <akim@epita.fr>
1112
1113 * src/reader.c (copy_action): When --yacc, don't append a `;'
1114 to the user action: let it fail if lacking.
1115 Suggested by Arnold Robbins and Tom Tromey.
1116
11172001-12-14 Akim Demaille <akim@epita.fr>
1118
1119 * src/lex.c (literalchar): Simply return the char you decoded, non
1120 longer mess around with obstacks and int pointers.
1121 Adjust all callers.
1122
11232001-12-14 Akim Demaille <akim@epita.fr>
1124
1125 * src/lex.c (literalchar): Don't escape the special characters,
1126 just decode them, and keep them as char (before, eol was output as
1127 the 2 char string `\n' etc.).
1128 * src/output.c (output_rule_data): Use quotearg to output the
1129 token strings.
1130
11312001-12-13 Paul Eggert <eggert@twinsun.com>
1132
1133 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1134 Do not infringe on the global user namespace when using C++.
1135 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1136 All uses of `fprintf' and `stderr' changed.
1137
1138 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1139
11402001-12-13 Akim Demaille <akim@epita.fr>
1141
1142 The computation of nullable is broken: it doesn't handle empty
1143 RHS's properly.
1144
1145 * tests/torture.at (GNU AWK Grammar): New.
1146 * tests/sets.at (Nullable): New.
1147 * src/nullable.c (set_nullable): Instead of blindly looping over
1148 `ritems', loop over the rules, and then over their rhs's.
1149
1150 Work around Autotest bugs.
1151
1152 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1153 frame, because Autotest understand lines starting with a `+' as
1154 traces from the shell. Then, they are not processed properly.
1155 Admittedly an Autotest bug, but we don't have time to wait for
1156 Autotest to catch up.
1157 * tests/regression.at (Broken Closure): Adjust to the new table
1158 frames.
1159 Move to...
1160 * tests/sets.at: here.
1161
11622001-12-13 Akim Demaille <akim@epita.fr>
1163
1164 * src/closure.c (closure): Use nrules instead of playing tricks
1165 with BITS_PER_WORD.
1166
11672001-12-13 Akim Demaille <akim@epita.fr>
1168
1169 * src/print.c (print_actions): Output the handling of `$' as the
1170 traces do: shifting the token EOF. Before EOF was treated as a
1171 nonterminal.
1172 * tests/regression.at: Adjust some tests.
1173 * src/print_graph.c (print_core): Complete the set of items via
1174 closure. The next-to-final and final states are still unsatisfying,
1175 but that's to be addressed elsewhere.
1176 No longer output the rule numbers, but do output the state number.
1177 A single loop for the shifts + gotos is enough, but picked a
1178 distinct color for each.
1179 (print_graph): Initialize and finalize closure.
1180
11812001-12-13 Akim Demaille <akim@epita.fr>
1182
1183 * src/reader.c (readgram): Remove dead code, an strip useless
1184 braces.
1185 (get_type): Remove, unused.
1186
11872001-12-12 Akim Demaille <akim@epita.fr>
1188
1189 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1190 on that of lib/error.c.
1191
11922001-12-12 Akim Demaille <akim@epita.fr>
1193
1194 Some hosts don't like `/' in includes.
1195
1196 * src/system.h: Include libgettext.h without qualifying the path.
1197 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1198 $(top_srcdir).
1199
12002001-12-11 Marc Autret <autret_m@epita.fr>
1201
1202 * src/output.c (output_parser): Remove useless muscle.
1203
12042001-12-11 Marc Autret <autret_m@epita.fr>
1205
1206 * src/bison.simple: Remove #line just before %%epilogue. It
1207 is now handled in ...
1208 * src/reader.c (read_additionnal_code): Add the output of a
1209 #line for the epilogue.
1210
12112001-12-10 Marc Autret <autret_m@epita.fr>
1212
1213 * src/reader.c (copy_definition): Re-use CPP-outed code which
1214 replace precedent remove.
1215 * src/bison.simple: Remove #line before %%prologue because
1216 %%input-line is wrong at this time.
1217
12182001-12-10 Marc Autret <autret_m@epita.fr>
1219
1220 * src/reader.c (symbols_output): Clean up.
1221 * src/output.c (output_gram, output): Clean up.
1222
12232001-12-10 Akim Demaille <akim@epita.fr>
1224
1225 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1226 * src/LR0.c (set_state_table): here.
1227 * src/lalr.c (lalr): Call it.
1228
12292001-12-10 Akim Demaille <akim@epita.fr>
1230
1231 * src/state.h (shifts): Remove the `number' member: shifts are
1232 attached to state, hence no longer need to be labelled with a
1233 state number.
1234
12352001-12-10 Akim Demaille <akim@epita.fr>
1236
1237 Now that states have a complete set of members, the linked list of
1238 shifts is useless: just fill directly the state's shifts member.
1239
1240 * src/state.h (shifts): Remove the `next' member.
1241 * src/LR0.c (first_state, last_state): Remove.
1242 Adjust the callers.
1243 (augment_automaton): Don't look for the shifts that must be added
1244 a shift on EOF: it is those of the state we looked for! But now,
1245 since shifts are attached, it is no longer needed to looking
1246 merely by its id: its number.
1247
12482001-12-10 Akim Demaille <akim@epita.fr>
1249
1250 * src/LR0.c (augment_automaton): Better variable locality.
1251 Remove an impossible branch: if there is a state corresponding to
1252 the start symbol being shifted, then there is shift for the start
1253 symbol from the initial state.
1254
12552001-12-10 Akim Demaille <akim@epita.fr>
1256
1257 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1258 only when appropriate: when insert_start_shifting_state' is not
1259 invoked.
1260 * tests/regression.at (Rule Line Numbers): Adjust.
1261
12622001-12-10 Akim Demaille <akim@epita.fr>
1263
1264 * src/LR0.c (augment_automaton): Now that all states have shifts,
1265 merge the two cases addition shifts to the initial state.
1266
12672001-12-10 Akim Demaille <akim@epita.fr>
1268
1269 * src/lalr.c (set_state_table): Move to...
1270 * src/LR0.c: here.
1271 * src/lalr.c (lalr): Don't call it...
1272 * src/LR0.c (generate_states): do it.
1273 * src/LR0.h (first_state): Remove, only the table is used.
1274
12752001-12-10 Akim Demaille <akim@epita.fr>
1276
1277 * src/LR0.h (first_shift, first_reduction): Remove.
1278 * src/lalr.c: Don't use first_shift: find shifts through the
1279 states.
1280
12812001-12-10 Akim Demaille <akim@epita.fr>
1282
1283 * src/LR0.c: Attach shifts to states as soon as they are
1284 computed.
1285 * src/lalr.c (set_state_table): Instead of assigning shifts to
1286 state, just assert that the mapping was properly done.
1287
12882001-12-10 Akim Demaille <akim@epita.fr>
1289
1290 * src/LR0.c (insert_start_shift): Rename as...
1291 (insert_start_shifting_state): this.
1292 (insert_eof_shifting_state, insert_accepting_state): New.
1293 (augment_automaton): Adjust.
1294 Better locality of the variables.
1295 When looking if the start_symbol is shifted from the initial
1296 state, using `while (... symbol != start_symbol ...)' sounds
1297 better than `while (... symbol < start_symbol ...)': If fail
1298 to see how the order between symbols could be relevant!
1299
13002001-12-10 Akim Demaille <akim@epita.fr>
1301
1302 * src/getargs.h: Don't declare `spec_name_prefix' and
1303 `spec_file_prefix', declared by src/files.h.
1304 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1305 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1306 * src/output.c (prepare): Adjust.
1307 * src/reader.c (symbols_output): Likewise.
1308 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1309
13102001-12-10 Akim Demaille <akim@epita.fr>
1311
1312 * src/muscle_tab.c (muscle_init): NULL is a better default than
1313 `"0"'.
1314
13152001-12-10 Akim Demaille <akim@epita.fr>
1316
1317 * src/reader.c (reader): Calling symbols_output once is enough.
1318
13192001-12-10 Akim Demaille <akim@epita.fr>
1320
1321 Now that states have a complete set of members, the linked list of
1322 reductions is useless: just fill directly the state's reductions
1323 member.
1324
1325 * src/state.h (struct reductions): Remove member `number' and
1326 `next'.
1327 * src/LR0.c (first_reduction, last_reduction): Remove.
1328 (save_reductions): Don't link the new reductions, store them in
1329 this_state.
1330 * src/lalr.c (set_state_table): No need to attach reductions to
1331 states, it's already done.
1332 * src/output.c (output_actions): No longer free the shifts, then
1333 the reductions, then the states: free all the states and their
1334 members.
1335
13362001-12-10 Akim Demaille <akim@epita.fr>
1337
1338 * src/options.c (OPTN, DRTV, BOTH): New.
1339 (option_table): Use them.
1340
1341 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1342 the job of system.h.
1343 * src/options.c: Don't include stdio.h and xalloc.h for the same
1344 reasons.
1345
13462001-12-10 Akim Demaille <akim@epita.fr>
1347
1348 * src/output.c (output, prepare): Make sure the values of the
1349 muscles `action' and `prologue' are 0-terminated.
1350
13512001-12-10 Akim Demaille <akim@epita.fr>
1352
1353 Clean up GCC warnings.
1354
1355 * src/reader.c (copy_action): `buf' is not used.
1356 (parse_skel_decl): Be static.
1357 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1358 * src/options.h (create_long_option_table): Have a real prototype.
1359 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1360 (hash_delete_at): Return const void *.
1361 Adjust casts to preserve the const.
1362
13632001-12-10 Akim Demaille <akim@epita.fr>
1364
1365 * configure.in: Require 2.52g.
1366 M4 is not needed, but AUTOM4TE is.
1367 * m4/m4.m4: Remove.
1368 * tests/Makefile.am: Adjust.
1369
13702001-12-10 Akim Demaille <akim@epita.fr>
1371
1372 One structure for states is enough, even though theoretically
1373 there are LR(0) states and LALR(1) states.
1374
1375 * src/lalr.h (state_t): Remove.
1376 (state_table): Be state_t **, not state_t *.
1377 * src/state.h (core, CORE_ALLOC): Rename as...
1378 (state_t, STATE_ALLOC): this.
1379 Add the LALR(1) members: shifts, reductions, errs.
1380 * src/LR0.c (state_table): Rename as...
1381 (state_hash): this, to avoid name clashes with the global
1382 `state_table'.
1383 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1384 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1385
13862001-12-10 Akim Demaille <akim@epita.fr>
1387
1388 Bison dumps core on bash.y.
1389 Reported by Pascal Bart.
1390
1391 * src/warshall.c (bitmatrix_print): New.
1392 (TC): Use it.
1393 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1394 j must be the outer loop.
1395 * tests/regression.at (Broken Closure): New.
1396
13972001-12-05 Akim Demaille <akim@epita.fr>
1398
1399 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1400 its argument.
1401