]> git.saurik.com Git - bison.git/blob - ChangeLog
* TODO: Update.
[bison.git] / ChangeLog
1 2002-04-07 Akim Demaille <akim@epita.fr>
2
3 * TODO: Update.
4
5
6 2002-04-07 Akim Demaille <akim@epita.fr>
7
8 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
9 bucket.value as bucket.number.
10
11
12 2002-04-07 Akim Demaille <akim@epita.fr>
13
14 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
15 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17 RHS, instead of being an index in RITEMS.
18
19 2002-04-04 Paul Eggert <eggert@twinsun.com>
20
21 * doc/bison.texinfo: Update copyright date.
22 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
23 (Symbols): Warn about running Bison in one character set,
24 but compiling and/or running in an incompatible one.
25 Warn about character code 256, too.
26
27 2002-04-03 Paul Eggert <eggert@twinsun.com>
28
29 * src/bison.data (YYSTACK_ALLOC): Depend on whether
30 YYERROR_VERBOSE is nonzero, not whether it is defined.
31
32 Merge changes from bison-1_29-branch.
33
34 2002-03-20 Paul Eggert <eggert@twinsun.com>
35
36 Merge fixes from Debian bison_1.34-1.diff.
37
38 * configure.in (AC_PREREQ): 2.53.
39
40 2002-03-20 Akim Demaille <akim@epita.fr>
41
42 * src/conflicts.c (log_resolution): Argument `resolution' is const.
43
44 2002-03-19 Paul Eggert <eggert@twinsun.com>
45
46 * src/bison.simple (YYCOPY): New macro.
47 (YYSTACK_RELOCATE): Use it.
48 Remove Type arg; no longer needed. All callers changed.
49 (yymemcpy): Remove; no longer needed.
50
51 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
52 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
53
54 2002-03-19 Akim Demaille <akim@epita.fr>
55
56 Test and fix the #line outputs.
57
58 * tests/atlocal.at (GCC): New.
59 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
60 (Prologue synch line, ,%union synch line, Postprologue synch line)
61 (Action synch line, Epilogue synch line): New tests.
62 * src/reader.c (parse_union_decl): Define the muscle stype_line.
63 * data/bison.simple, data/bison.c++: Use it.
64
65
66 2002-03-19 Akim Demaille <akim@epita.fr>
67
68 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
69 (Solved SR Conflicts, %expect not enough, %expect right)
70 (%expect too much): Move to...
71 * tests/conflicts.at: this new file.
72
73 2002-03-19 Akim Demaille <akim@epita.fr>
74
75 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
76 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
77 that we can move to enums for instance.
78 * src/output.c (token_definitions_output): Output a list of
79 `token-name, token-number' instead of the #define.
80 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
81
82 2002-03-14 Akim Demaille <akim@epita.fr>
83
84 Use Gettext 0.11.1.
85
86 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
87
88 * data/bison.c++: Make the user able to add members to the generated
89 parser by subclassing.
90
91 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
92
93 * src/reader.c (read_additionnal_code): `c' should be an integer, not
94 a character.
95 Reported by Nicolas Tisserand and Nicolas Burrus.
96
97 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
98
99 * src/reader.c: Warn about lacking semi-colons, do not complain.
100
101 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
102
103 * data/bison.c++: Remove a debug line.
104
105 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
106
107 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
108 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
109 provide a default implementation.
110
111 2002-03-04 Akim Demaille <akim@epita.fr>
112
113 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
114 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
115 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
116 * tests/semantic.at (Parsing Guards): Similarly.
117 * src/reader.at (readgram): Complain if the last rule is not ended
118 with a semi-colon.
119
120 2002-03-04 Akim Demaille <akim@epita.fr>
121
122 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
123 * src/closure.c: here.
124 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
125 RTC.
126 * src/warshall.h, src/warshall.c: Remove.
127 * tests/sets.at (Broken Closure): Adjust.
128
129 2002-03-04 Akim Demaille <akim@epita.fr>
130
131 * src/output.c (output_skeleton): tempdir is const.
132 bytes_read is unused.
133
134 2002-03-04 Akim Demaille <akim@epita.fr>
135
136 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
137 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
138 Update.
139 From Michael Hayes.
140
141 2002-03-04 Akim Demaille <akim@epita.fr>
142
143 * src/closure.c (closure): `r' is unused.
144
145 2002-03-04 Akim Demaille <akim@epita.fr>
146
147 * tests/sets.at (Broken Closure): Add the ending `;'.
148 * src/reader.at (readgram): Complain if a rule is not ended with a
149 semi-colon.
150
151 2002-03-04 Akim Demaille <akim@epita.fr>
152
153 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
154 (count_sr_conflicts): Use bitset_count.
155 * src/reduce.c (inaccessable_symbols): Ditto.
156 (bits_size): Remove.
157 * src/warshall.h, src/warshall.c: Convert to bitsetv.
158
159 2002-03-04 Akim Demaille <akim@epita.fr>
160
161 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
162 * src/reduce.c: Remove the `bitset_zero's following the
163 `bitset_create's, as now it is performed by the latter.
164
165 2002-03-04 Akim Demaille <akim@epita.fr>
166
167 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
168 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
169 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
170 latest sources from Michael.
171
172 2002-03-04 Akim Demaille <akim@epita.fr>
173
174 * src/output.c (output): Don't free the grammar.
175 * src/reader.c (grammar_free): New.
176 * src/main.c (main): Call it and don't free symtab here.
177
178 2002-03-04 Akim Demaille <akim@epita.fr>
179
180 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
181 before returning.
182 Reported by Benoit Perrot.
183
184 2002-03-04 Akim Demaille <akim@epita.fr>
185
186 Use bitset operations when possible, not loops over bits.
187
188 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
189 bitset_or.
190 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
191 * src/reduce.c (useless_nonterminals): Formatting changes.
192 * src/warshall.c (TC): Use bitset_or.
193
194 2002-03-04 Akim Demaille <akim@epita.fr>
195
196 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
197 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
198 Ditto.
199
200 2002-03-04 Akim Demaille <akim@epita.fr>
201
202 * src/lalr.c (F): Now a bitset*.
203 Adjust all dependencies.
204
205 2002-03-04 Akim Demaille <akim@epita.fr>
206
207 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
208 Adjust all dependencies.
209
210 2002-03-04 Akim Demaille <akim@epita.fr>
211
212 * src/L0.c, src/LR0.h (nstates): Be size_t.
213 Adjust comparisons (signed vs unsigned).
214 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
215 bitset*.
216 Adjust all dependencies.
217
218 2002-03-04 Akim Demaille <akim@epita.fr>
219
220 * src/closure.c (firsts): Now, also a bitset.
221 Adjust all dependencies.
222 (varsetsize): Remove, now unused.
223 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
224
225 2002-03-04 Akim Demaille <akim@epita.fr>
226
227 * src/print.c: Convert to use bitset.h, not hand coded iterations
228 over ints.
229
230 2002-03-04 Akim Demaille <akim@epita.fr>
231
232 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
233
234 2002-03-04 Akim Demaille <akim@epita.fr>
235
236 * src/closure.c (ruleset): Be a bitset.
237 (rulesetsize): Remove.
238
239 2002-03-04 Akim Demaille <akim@epita.fr>
240
241 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
242 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
243 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
244 * src/closure.c (fderives): Be an array of bitsets.
245
246 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
247
248 * data/bison.c++: Merge the two generated headers. Insert a copyright
249 notice in each output file.
250
251 2002-02-28 Akim Demaille <akim@epita.fr>
252
253 * data/bison.c++: Copy the prologue of bison.simple to fetch
254 useful M4 definitions, such as b4_header_guard.
255
256 2002-02-25 Akim Demaille <akim@epita.fr>
257
258 * src/getargs.c (version): Give the name of the authors, and use a
259 translator friendly scheme for the bgr
260 copyright notice.
261
262 2002-02-25 Akim Demaille <akim@epita.fr>
263
264 * src/output.c (header_output): Remove, now handled completely via
265 M4.
266
267 2002-02-25 Akim Demaille <akim@epita.fr>
268
269 * m4/m4.m4: New, from CVS Autoconf.
270 * configure.in: Invoke it.
271 * src/output.c (output_skeleton): Use its result instead of the
272 hard coded name.
273
274 2002-02-25 Akim Demaille <akim@epita.fr>
275
276 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
277 Fileutils 4.1.5.
278 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
279 * src/output.c (output_skeleton): Use mkstemp to create a real
280 temporary file.
281 Move the filling of `skeleton' and its muscle to...
282 (prepare): here.
283 (output): Move the definition of the prologue muscle to...
284 (prepare): here.
285 * src/system.h (DEFAULT_TMPDIR): New.
286
287 2002-02-14 Paul Eggert <eggert@twinsun.com>
288
289 Remove the support for C++ namespace cleanliness; it was
290 causing more problems than it was curing, since it didn't work
291 properly on some nonstandard C++ compilers. This can wait
292 for a proper C++ parser.
293
294 * NEWS: Document this.
295 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
296 of C++, as it's treated like C now.
297 * src/bison.simple (YYSTD): Remove.
298 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
299 Treat C++ just like Standard C instead of trying to support
300 namespace cleanliness.
301
302 2002-02-14 Akim Demaille <akim@epita.fr>
303
304 * tests/regression.at (else): Adjust to Andreas' change.
305
306 2002-02-14 Akim Demaille <akim@epita.fr>
307
308 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
309
310 2002-02-13 Andreas Schwab <schwab@suse.de>
311
312 * src/output.c (output_rule_data): Don't output NULL, it might
313 not be defined yet.
314
315 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
316
317 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
318 (Copyright notice): Update.
319
320 2002-02-11 Akim Demaille <akim@epita.fr>
321
322 * tests/regression.at (%nonassoc and eof): Don't include
323 nonportable headers.
324
325 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
326
327 * data/bison.c++: Correct error recovery. Make the user able to
328 initialize the starting location.
329
330 2002-02-07 Akim Demaille <akim@epita.fr>
331
332 * tests/input.at: New.
333
334 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
335
336 * data/bison.c++: Replace some direct m4 expansions by constants. Be
337 more consistent when naming methods and variables. Put preprocessor
338 directives around tables only needed for debugging.
339
340 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
341
342 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
343 C++ parsers.
344 (yy::b4_name::parse): Use print_.
345
346 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
347
348 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
349
350 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
351
352 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
353 C++ parsers.
354 (yy::b4_name::parse): Build verbose error messages, and use error_.
355
356 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
357
358 * data/bison.c++: Fix m4 quoting in comments.
359
360 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
361
362 * data/bison.c++: Adjust the parser code. Fix some muscles that were
363 not expanded by m4.
364
365 2002-02-05 Akim Demaille <akim@epita.fr>
366
367 * data/bison.c++: Adjust to the M4 back end.
368 More is certainly needed.
369
370 2002-02-05 Akim Demaille <akim@epita.fr>
371
372 Give a try to M4 as a back end.
373
374 * lib/readpipe.c: New, from wdiff.
375 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
376 BISON_HAIRY.
377 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
378 specific values. Now it is m4 that performs the lookup.
379 * src/parse-skel.y: Remove.
380 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
381 * src/output.c (actions_output, guards_output)
382 (token_definitions_output): No longer keeps track of the output
383 line number, hence remove the second argument.
384 (guards_output): Check against the guard member of a rule, not the
385 action member.
386 Adjust callers.
387 (output_skeleton): Don't look for the skeleton location, let m4 do
388 that.
389 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
390 file will be used.
391 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
392 (prepare): Given that for the time being changesyntax is not
393 usable in M4, rename the muscles using `-' to `_'.
394 Define `defines_flag', `output_parser_name' and `output_header_name'.
395 * src/output.h (actions_output, guards_output)
396 (token_definitions_output): Adjust prototypes.
397 * src/scan-skel.l: Instead of scanning the skeletons, it now
398 processes the output of m4: `__oline__' and `#output'.
399 * data/bison.simple: Adjust to be used by M4(sugar).
400 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
401 to date.
402 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
403 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
404 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
405 shamelessly stolen from CVS Autoconf.
406
407 2002-02-05 Akim Demaille <akim@epita.fr>
408
409 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
410 * configure.in: Check for the declarations of free and malloc.
411 * src/muscle_tab.c: Adjust.
412
413 2002-02-05 Akim Demaille <akim@epita.fr>
414
415 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
416 which have no values.
417
418 2002-02-05 Akim Demaille <akim@epita.fr>
419
420 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
421 * data/: here.
422
423 2002-01-29 Paul Eggert <eggert@twinsun.com>
424
425 * src/bison.simple (YYSIZE_T): Do not define merely because
426 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
427 On some platforms, <alloca.h> does not declare YYSTD (size_t).
428
429 2002-01-27 Akim Demaille <akim@epita.fr>
430
431 Fix `%nonassoc and eof'.
432
433 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
434 which were not properly copied! Replace
435 memcpy (res->errs, src->errs, src->nerrs);
436 with
437 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
438 !!!
439 * tests/regression.at (%nonassoc and eof): Adjust to newest
440 Autotest: `.' is not in the PATH.
441
442 2002-01-27 Akim Demaille <akim@epita.fr>
443
444 * tests/sets.at (AT_EXTRACT_SETS): New.
445 (Nullable): Use it.
446 (Firsts): New.
447
448 2002-01-26 Akim Demaille <akim@epita.fr>
449
450 * tests/actions.at, tests/calc.at, tests/headers.at,
451 * tests/torture.at: Adjust to the newest Autotest which no longer
452 forces `.' in the PATH.
453
454 2002-01-25 Akim Demaille <akim@epita.fr>
455
456 * tests/regression.at (%nonassoc and eof): New.
457 Suggested by Robert Anisko.
458
459 2002-01-24 Akim Demaille <akim@epita.fr>
460
461 Bison dumps core when trying to complain about broken input files.
462 Reported by Cris van Pelt.
463
464 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
465 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
466 into...
467 (Invalid inputs): Strengthen: exercise parse_percent_token.
468
469 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
470
471 * src/Makefile.am: Add bison.c++.
472 * src/bison.c++: New skeleton.
473
474 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
475
476 * po/it.po: New.
477
478 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
479
480 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
481
482 2002-01-20 Marc Autret <marc@gnu.org>
483
484 * src/files.c (compute_output_file_names): Fix
485
486 2002-01-20 Marc Autret <marc@gnu.org>
487
488 * tests/output.at: New test.
489 * src/files.c (compute_base_names): Don't map extensions when
490 the YACC flag is set, use defaults.
491 Reported by Evgeny Stambulchik.
492
493 2002-01-20 Marc Autret <marc@gnu.org>
494
495 * src/system.h: Need to define __attribute__ away for non-GCC
496 compilers as well (i.e. the vendor C compiler).
497 Suggested by Albert Chin-A-Young.
498
499 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
500
501 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
502 canonical definition.
503 * src/system.h: Use the canonical definition for PARAMS (avoids
504 a conflict with the macro from lib/hash.h).
505
506 2002-01-11 Akim Demaille <akim@epita.fr>
507
508 * configure.in: Use AC_FUNC_STRNLEN.
509 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
510
511 2002-01-09 Akim Demaille <akim@epita.fr>
512
513 * src/files.c, src/files.h (output_infix): New.
514 (tab_extension): Remove.
515 (compute_base_names): Compute the former, drop the latter.
516 * src/output.c (prepare): Insert the muscles `output-infix', and
517 `output-suffix'.
518 * src/parse-skel.y (string, string.1): New.
519 (section.header): Use it.
520 (section.yacc): Remove.
521 (prefix): Remove too.
522 * src/scan-skel.l: Adjust.
523 * src/bison.simple, src/bison.hairy: Adjust.
524
525 2002-01-09 Akim Demaille <akim@epita.fr>
526
527 * configure.in (WERROR_CFLAGS): Compute it.
528 * src/Makefile.am (CFLAGS): Pass it.
529 * tests/atlocal.in (CFLAGS): Idem.
530 * src/files.c: Fix a few warnings.
531 (get_extension_index): Remove, unused.
532
533 2002-01-08 Akim Demaille <akim@epita.fr>
534
535 * src/getargs.c (AS_FILE_NAME): New.
536 (getargs): Use it to convert DOSish file names.
537 * src/files.c (base_name): Rename as full_base_name to avoid
538 clashes with `base_name ()'.
539 (filename_split): New.
540 (compute_base_names): N-th rewrite, using filename_split.
541
542 2002-01-08 Akim Demaille <akim@epita.fr>
543
544 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
545 New, stolen from the Fileutils 4.1.
546 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
547 * configure.in: Check for the presence of memrchr, and of its
548 prototype.
549
550 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
551
552 * lib/hash.h (__P): Added definition for this macro.
553 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
554 BUILT_SOURCES, to ensure they are generated first.
555 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
556 %error-verbose to allow bootstrapping with bison 1.30x.
557
558 2002-01-06 Akim Demaille <akim@epita.fr>
559
560 * src/reader.c (parse_braces): Don't fetch the next char, the
561 convention is to fetch on entry.
562 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
563 'switch' without a following semicolon.
564 * tests/regression.at (braces parsing): New.
565
566 2002-01-06 Akim Demaille <akim@epita.fr>
567
568 Bison is dead wrong in its RR conflict reports.
569
570 * tests/torture.at (GNU Cim Grammar): New.
571 * src/conflicts.c (count_rr_conflicts): Fix.
572
573 2002-01-06 Akim Demaille <akim@epita.fr>
574
575 Creating package.m4 from configure.ac causes too many problems.
576
577 * tests/Makefile.am (package.m4): Create it by hand,
578 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
579
580 2002-01-06 Akim Demaille <akim@epita.fr>
581
582 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
583 skeleton.h.
584
585 2002-01-04 Paul Eggert <eggert@twinsun.com>
586
587 * doc/bison.texinfo (Debugging):
588 Remove YYSTDERR; it's no longer defined or used.
589 Also, s/cstdio.h/cstdio/.
590
591 2002-01-03 Akim Demaille <akim@epita.fr>
592
593 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
594
595 2002-01-03 Akim Demaille <akim@epita.fr>
596
597 * src/parse-skel.y (process_skeleton): Don't bind the parser's
598 tracing code to --trace, wait for a better --trace option, with
599 args.
600
601 2002-01-03 Akim Demaille <akim@epita.fr>
602
603 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
604 The ISO C++ standard is extremely clear about it: stderr is
605 considered a macro, not a regular symbol (see table 94 `Header
606 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
607 Therefore std:: does not apply to it. It still does with fprintf.
608 Also, s/cstdio.h/cstdio/.
609
610 2002-01-03 Akim Demaille <akim@epita.fr>
611
612 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
613 for non system headers.
614
615 2002-01-02 Akim Demaille <akim@epita.fr>
616
617 Equip the skeleton chain with location tracking, runtime trace,
618 pure parser and scanner.
619
620 * src/parse-skel.y: Request a pure parser, locations, and prefix
621 renaming.
622 (%union): Having several members with the same type does not help
623 type mismatches, simplify.
624 (YYPRINT, yyprint): New.
625 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
626 (skel_error): this.
627 Handle locations.
628 * src/scan-skel.l: Adjust to these changes.
629 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
630 (LOCATION_PRINT, skel_control_t): New.
631
632 2001-12-30 Akim Demaille <akim@epita.fr>
633
634 * src/parse-skel.y: Get rid of the shift/reduce conflict:
635 replace `gb' with BLANKS.
636 * src/scan-skel.l: Adjust.
637
638 2001-12-30 Akim Demaille <akim@epita.fr>
639
640 * src/system.h: We don't need nor want bcopy.
641 Throw away MS-DOS crap: we don't need getpid.
642 * configure.in: We don't need strndup. It was even causing
643 problems: because Flex includes the headers *before* us,
644 _GNU_SOURCE is not defined by config.h, and therefore strndup was
645 not visible.
646 * lib/xstrndup.c: New.
647 * src/scan-skel.l: Use it.
648 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
649 * src/parse-skel.y: Use %directives instead of #defines.
650
651 2001-12-30 Akim Demaille <akim@epita.fr>
652
653 * src/skeleton.h: New.
654 * src/output.c (output_parser, output_master_parser): Remove, dead
655 code.
656 * src/output.h (get_lines_number, actions_output, guards_output)
657 (token_definitions_output): Prototype them.
658 * src/parse-skel.y: Add the license notice.
659 Include output.h and skeleton.h.
660 (process_skeleton): Returns void, and takes a single parameter.
661 * src/scan-skel.l: Add the license notice.
662 Include skeleton.h.
663 Don't use %option yylineno: it seems that then Flex imagines
664 REJECT has been used, and therefore it won't reallocate its
665 buffers (which makes no other sense to me than a bug). It results
666 in warnings for `unused: yy_flex_realloc'.
667
668 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
669
670 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
671 (MUSCLE_INSERT_PREFIX): ...to there.
672 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
673 (MUSCLE_INSERT_PREFIX): Move from here...
674
675 * src/bison.hairy: Add a section directive. Put braces around muscle
676 names. This parser skeleton is still broken, but Bison should not
677 choke on a bad muscle 'syntax'.
678 * src/bison.simple: Add a section directive. Put braces around muscle
679 names.
680
681 * src/files.h (strsuffix, stringappend): Add declarations.
682 (tab_extension): Add declaration.
683 (short_base_name): Add declaration.
684
685 * src/files.c (strsuffix, stringappend): No longer static. These
686 functions are used in the skeleton parser.
687 (tab_extension): New.
688 (compute_base_names): Use the computations done in this function
689 to guess if the generated parsers should have '.tab' in their
690 names.
691 (short_base_name): No longer static.
692
693 * src/output.c (output_skeleton): New.
694 (output): Disable call to output_master_parser, and give a try to
695 a new skeleton handling system.
696 (guards_output, actions_output): No longer static.
697 (token_definitions_output, get_lines_number): No longer static.
698
699 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
700
701 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
702 parse-skel.y.
703
704 * src/parse-skel.y: New file.
705 * src/scan-skel.l: New file.
706
707 2001-12-29 Akim Demaille <akim@epita.fr>
708
709 %name-prefix is broken.
710
711 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
712 Adjust all dependencies.
713 * tests/headers.at (export YYLTYPE): Strengthen this test: use
714 %name-prefix.
715
716 Renaming yylval but not yylloc is not consistent. Now we do.
717
718 * src/bison.simple: Prefix yylloc if used.
719 * doc/bison.texinfo (Decl Summary): Document that.
720
721 2001-12-29 Akim Demaille <akim@epita.fr>
722
723 * doc/bison.texinfo: Promote `%long-directive' over
724 `%long_directive'.
725 Remove all references to fixed-output-files, yacc is enough.
726
727 2001-12-29 Akim Demaille <akim@epita.fr>
728
729 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
730 user prologue. These are defaults.
731 * tests/actions.at (Mid-rule actions): Make sure the user can
732 define YYDEBUG and YYERROR_VERBOSE.
733
734 2001-12-29 Akim Demaille <akim@epita.fr>
735
736 * src/output.c (header_output): Don't forget to export YYLTYPE and
737 yylloc.
738 * tests/headers.at (export YYLTYPE): New, make sure it does.
739 * tests/regression.at (%union and --defines, Invalid CPP headers):
740 Move to...
741 * tests/headers.at: here.
742
743 2001-12-29 Akim Demaille <akim@epita.fr>
744
745 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
746
747 2001-12-29 Akim Demaille <akim@epita.fr>
748
749 * tests/actions.at (Mid-rule actions): Output on a single line
750 instead of several.
751
752 2001-12-29 Akim Demaille <akim@epita.fr>
753
754 * doc/bison.texinfo: Formatting changes.
755
756 2001-12-29 Akim Demaille <akim@epita.fr>
757
758 Don't store the token defs in a muscle, just be ready to output it
759 on command. Now possible via `symbols'. Fixes a memory leak.
760
761 * src/output.c (token_definitions_output): New.
762 (output_parser, header_output): Use it.
763 * src/reader.c (symbols_save): Remove.
764
765 2001-12-29 Akim Demaille <akim@epita.fr>
766
767 * src/bison.simple: Do not provide a default for YYSTYPE and
768 YYLTYPE before the user's prologue. Otherwise it's hardly... a
769 default.
770
771 2001-12-29 Akim Demaille <akim@epita.fr>
772
773 Mid-rule actions are simply... ignored!
774
775 * src/reader.c (readgram): Be sure to attach mid-rule actions to
776 the empty-rule associated to the dummy symbol, not to the host
777 rule.
778 * tests/actions.at (Mid-rule actions): New.
779
780 2001-12-29 Akim Demaille <akim@epita.fr>
781
782 Memory leak.
783
784 * src/reader.c (reader): Free grammar.
785
786 2001-12-29 Akim Demaille <akim@epita.fr>
787
788 Memory leak.
789
790 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
791 since it allocates it for each state, although only one is needed.
792 (allocate_storage): Do it here.
793
794 2001-12-29 Akim Demaille <akim@epita.fr>
795
796 * src/options.h, src/options.c (create_long_option_table): Rename
797 as...
798 (long_option_table_new): this, with a clearer prototype.
799 (percent_table): Remove, unused,
800 * src/getargs.c (getargs): Adjust.
801
802 2001-12-29 Akim Demaille <akim@epita.fr>
803
804 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
805 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
806 as states.
807
808 2001-12-29 Akim Demaille <akim@epita.fr>
809
810 * src/lalr.c (build_relations): Rename `states' as `states1'.
811 Sorry, I don't understand exactly what it is, no better name...
812
813 2001-12-29 Akim Demaille <akim@epita.fr>
814
815 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
816 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
817 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
818 as rules.
819
820 2001-12-29 Akim Demaille <akim@epita.fr>
821
822 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
823 ago.
824
825 2001-12-29 Akim Demaille <akim@epita.fr>
826
827 * src/reader.c, src/reader.h (user_toknums): Remove.
828 Adjust all users to use symbols[i]->user_token_number.
829
830 2001-12-29 Akim Demaille <akim@epita.fr>
831
832 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
833 Adjust all users to use symbols[i]->prec or ->assoc.
834
835 2001-12-29 Akim Demaille <akim@epita.fr>
836
837 * src/reader.c, src/reader.h (tags): Remove.
838 Adjust all users to use symbols[i]->tag.
839
840 2001-12-29 Akim Demaille <akim@epita.fr>
841
842 * src/gram.h, src/gram.c (symbols): New, similar to state_table
843 and rule_table.
844 * src/reader.c (packsymbols): Fill this table.
845 Drop sprec.
846 * src/conflicts.c (resolve_sr_conflict): Adjust.
847 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
848 single table.
849 Use symbols[i]->tag instead of tags[i].
850
851 2001-12-29 Akim Demaille <akim@epita.fr>
852
853 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
854 In addition, put a comment in there, to replace...
855 * tests/regression.at (%union and C comments): Remove.
856
857 2001-12-29 Akim Demaille <akim@epita.fr>
858
859 * tests/regression.at (Web2c Actions): Blindly move the actual
860 output as expected output. The contents *seem* right to me, but I
861 can't pretend reading perfectly parser tables... Nonetheless, all
862 the other tests pass correctly, the table look OK, even though the
863 presence of `$axiom' is to be noted: AFAICS it is useless (but
864 harmless).
865
866 2001-12-29 Akim Demaille <akim@epita.fr>
867
868 * src/reader.c (readgram): Don't add the rule 0 if there were no
869 rules read. In other words, add it _after_ having performed
870 grammar sanity checks.
871 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
872
873 2001-12-29 Akim Demaille <akim@epita.fr>
874
875 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
876 visible, and some states have now a different number.
877
878 2001-12-29 Akim Demaille <akim@epita.fr>
879
880 * src/reader.c (readgram): Bind the initial rule's lineno to that
881 of the first rule.
882 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
883 (Solved SR Conflicts): Adjust rule 0's line number.
884
885 2001-12-29 Akim Demaille <akim@epita.fr>
886
887 Fix the `GAWK Grammar' failure.
888
889 * src/LR0.c (final_state): Initialize to -1 so that we do compute
890 the reductions of the first state which was mistakenly confused
891 with the final state because precisely final_state was initialized
892 to 0.
893 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
894 now noticed by Bison.
895 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
896 have a reduction on $default.
897
898 2001-12-29 Akim Demaille <akim@epita.fr>
899
900 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
901 rule line numbers.
902 * src/closure.c (print_closure): Likewise.
903 * src/derives.c (print_derives): Likewise.
904 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
905 now.
906
907 2001-12-29 Akim Demaille <akim@epita.fr>
908
909 * src/lalr.c (lookaheads_print): New.
910 (lalr): Call it when --trace-flag.
911 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
912 are dumped.
913
914 2001-12-29 Akim Demaille <akim@epita.fr>
915
916 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
917 when walking through ritem, even via rule->rhs.
918 * src/reduce.c (dump_grammar, useful_production, reduce_output)
919 (useful_production, useless_nonterminals): Likewise.
920 (reduce_grammar_tables): Likewise, plus update nritems.
921 * src/nullable.c (set_nullable): Likewise.
922 * src/lalr.c (build_relations): Likewise.
923 * tests/sets.at (Nullable): Adjust.
924 Fortunately, now, the $axiom is no longer nullable.
925
926 2001-12-29 Akim Demaille <akim@epita.fr>
927
928 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
929 the 0-sentinel.
930 * src/gram.c (ritem_longest_rhs): Likewise.
931 * src/reduce.c (nonterminals_reduce): Likewise.
932 * src/print_graph.c (print_graph): Likewise.
933 * src/output.c (output_rule_data): Likewise.
934 * src/nullable.c (set_nullable): Likewise.
935
936 2001-12-29 Akim Demaille <akim@epita.fr>
937
938 * src/output.c: Comment changes.
939
940 2001-12-27 Paul Eggert <eggert@twinsun.com>
941
942 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
943 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
944 Sparc, as they were causing more porting problems than the
945 (minor) performance improvement was worth.
946
947 Also, catch up with 1.31's YYSTD.
948
949 2001-12-27 Akim Demaille <akim@epita.fr>
950
951 * src/output.c (output_gram): Rely on nritems, not the
952 0-sentinel. See below.
953 Use -1 as separator, not 0.
954 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
955 Rely on -1 as separator in yyrhs, instead of 0.
956 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
957 twice `Now at end of input', therefore there are two lines less to
958 expect.
959
960 2001-12-27 Akim Demaille <akim@epita.fr>
961
962 * tests/regression.at (Unresolved SR Conflicts):
963 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
964 below.
965
966 2001-12-27 Akim Demaille <akim@epita.fr>
967
968 * src/LR0.c (new_state): Recognize the final state by the fact it
969 is reached by eoftoken.
970 (insert_start_shifting_state, insert_eof_shifting_state)
971 (insert_accepting_state, augment_automaton): Remove, since now
972 these states are automatically computed from the initial state.
973 (generate_states): Adjust.
974 * src/print.c: When reporting a rule number to the user, substract
975 1, so that the axiom rule is rule 0, and the first user rule is 1.
976 * src/reduce.c: Likewise.
977 * src/print_graph.c (print_core): For the time being, just as for
978 the report, depend upon --trace-flags to dump the full set of
979 items.
980 * src/reader.c (readgram): Once the grammar read, insert the rule
981 0: `$axiom: START-SYMBOL $'.
982 * tests/set.at: Adjust: rule 0 is now displayed, and since the
983 number of the states has changed (the final state is no longer
984 necessarily the last), catch up.
985
986 2001-12-27 Akim Demaille <akim@epita.fr>
987
988 Try to make the use of the eoftoken valid. Given that its value
989 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
990 is used instead of > 0 where appropriate, (ii), depend upon nritems
991 instead of the 0-sentinel.
992
993 * src/gram.h, src/gram.c (nritems): New.
994 Expected to be duplication of nitems, but for the time being...
995 * src/reader.c (packgram): Assert nritems and nitems are equal.
996 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
997 * src/closure.c (print_closure, print_fderives): Likewise.
998 * src/gram.c (ritem_print): Likewise.
999 * src/print.c (print_core, print_grammar): Likewise.
1000 * src/print_graph.c: Likewise.
1001
1002 2001-12-27 Akim Demaille <akim@epita.fr>
1003
1004 * src/main.c (main): If there are complains after grammar
1005 reductions, then output the report anyway if requested, then die.
1006 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1007 * src/reader.c (eoftoken): New.
1008 (parse_token_decl): If the token being defined has value `0', it
1009 is the eoftoken.
1010 (packsymbols): No longer hack `tags' to insert `$' by hand.
1011 Be sure to preserve the value of the eoftoken.
1012 (reader): Make sure eoftoken is defined.
1013 Initialize nsyms to 0: now eoftoken is created just like the others.
1014 * src/print.c (print_grammar): Don't special case the eof token.
1015 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1016 lie anyway, albeit pleasant.
1017 * tests/calc.at: Exercise error messages with eoftoken.
1018 Change the grammar so that empty input is invalid.
1019 Adjust expectations.
1020 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1021
1022 2001-12-27 Akim Demaille <akim@epita.fr>
1023
1024 * configure.in: Check the protos of strchr ans strspn.
1025 Replace strchr if needed.
1026 * src/system.h: Provide the protos of strchr, strspn and memchr if
1027 missing.
1028 * lib/strchr.c: New.
1029 * src/reader.c (symbols_save): Use strchr.
1030
1031 2001-12-27 Akim Demaille <akim@epita.fr>
1032
1033 * src/print.c, src/print_graph.c (escape): New.
1034 Use it to quote the TAGS outputs.
1035 * src/print_graph.c (print_state): Now errors are in red, and
1036 reductions in green.
1037 Prefer high to wide: output the state number on a line of its own.
1038
1039 2001-12-27 Akim Demaille <akim@epita.fr>
1040
1041 * src/state.h, src/state.c (reductions_new): New.
1042 * src/LR0.c (set_state_table): Let all the states have a
1043 `reductions', even if reduced to 0.
1044 (save_reductions): Adjust.
1045 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1046 * src/print.c (print_reductions, print_actions): Adjust.
1047 * src/output.c (action_row): Adjust.
1048
1049 2001-12-27 Akim Demaille <akim@epita.fr>
1050
1051 * src/state.h, src/state.c (errs_new, errs_dup): New.
1052 * src/LR0.c (set_state_table): Let all the states have an errs,
1053 even if reduced to 0.
1054 * src/print.c (print_errs, print_reductions): Adjust.
1055 * src/output.c (output_actions, action_row): Adjust.
1056 * src/conflicts.c (resolve_sr_conflict): Adjust.
1057
1058 2001-12-27 Akim Demaille <akim@epita.fr>
1059
1060 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1061
1062 2001-12-27 Akim Demaille <akim@epita.fr>
1063
1064 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1065 * src/print.c: here.
1066 (lookaheadset, shiftset): New, used as additional storage by
1067 print_reductions.
1068 (print_results): Adjust.
1069 (print_shifts, print_gotos, print_errs): New, extracted from...
1070 (print_actions): here.
1071 * src/print_graph.c (print_actions): Remove dead code.
1072
1073 2001-12-27 Akim Demaille <akim@epita.fr>
1074
1075 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1076 `$n' and `@n'.
1077
1078 2001-12-27 Akim Demaille <akim@epita.fr>
1079
1080 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1081 (build_relations): Adjust.
1082
1083 2001-12-27 Akim Demaille <akim@epita.fr>
1084
1085 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1086 duplication.
1087
1088 2001-12-27 Akim Demaille <akim@epita.fr>
1089
1090 * src/reader.c (packgram): Catch nitems overflows.
1091
1092 2001-12-27 Akim Demaille <akim@epita.fr>
1093
1094 * src/files.c, src/files.h (guard_obstack): Remove.
1095 * src/output.c (output): Adjust.
1096 * src/reader.c (parse_braces): New, factoring...
1097 (copy_action, copy_guard): these two which are renamed as...
1098 (parse_action, parse_guard): these.
1099 As a voluntary consequence, using braces around guards is now
1100 mandatory.
1101
1102 2001-12-27 Akim Demaille <akim@epita.fr>
1103
1104 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1105 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1106 members.
1107 (symbol_list_new): Adjust.
1108 (copy_action): action_line is the first line, not the last.
1109 (copy_guard): Just as for actions, store the `action' only, not
1110 the switch/case/break flesh.
1111 Don't parse the user action that might follow the guard, let...
1112 (readgram): do it, i.e., now, there can be an action after a
1113 guard.
1114 In other words the guard is just explicitly optional.
1115 (packgram): Adjust.
1116 * src/output.c (guards_output): New.
1117 (output_parser): Call it when needed.
1118 (output): Also free the guard and attrs obstacks.
1119 * src/files.c, src/files.h (obstack_save): Remove.
1120 (output_files): Remove.
1121 As a result, if one needs the former `.act' file, using an
1122 appropriate skeleton which requires actions and guards is now
1123 required.
1124 * src/main.c (main): Adjust.
1125 * tests/semantic.at: New.
1126 * tests/regression.at: Use `input.y' as input file name.
1127 Avoid 8+3 problems by requiring input.c when the test needs the
1128 parser.
1129
1130 2001-12-27 Akim Demaille <akim@epita.fr>
1131
1132 * src/reader.c (symbol_list_new): Be sure to initialize all the
1133 fields.
1134
1135 2001-12-27 Akim Demaille <akim@epita.fr>
1136
1137 All the hacks using a final pseudo state are now useless.
1138
1139 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1140 * src/lalr.c (nLA): New.
1141 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1142 instead of lookaheadsp from the pseudo state (nstate + 1).
1143
1144 2001-12-27 Akim Demaille <akim@epita.fr>
1145
1146 * src/output.c (action_row, token_actions): Use a state_t instead
1147 of a integer, and nlookaheads instead of the following state's
1148 lookaheadsp.
1149
1150 2001-12-27 Akim Demaille <akim@epita.fr>
1151
1152 * src/conflicts.c (log_resolution, flush_shift)
1153 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1154 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1155 (conflicts_print, print_reductions): Use a state_t instead of an
1156 integer when referring to a state.
1157 As much as possible, depend upon nlookaheads, instead of the
1158 `lookaheadsp' member of the following state (since lookaheads of
1159 successive states are successive, the difference between state n + 1
1160 and n served as the number of lookaheads for state n).
1161 * src/lalr.c (add_lookback_edge): Likewise.
1162 * src/print.c (print_core, print_actions, print_state)
1163 (print_results): Likewise.
1164 * src/print_graph.c (print_core, print_actions, print_state)
1165 (print_graph): Likewise.
1166 * src/conflicts.h: Adjust.
1167
1168 2001-12-27 Akim Demaille <akim@epita.fr>
1169
1170 * src/bison.hairy: Formatting/comment changes.
1171 ANSIfy.
1172 Remove `register' indications.
1173 Add plenty of `static'.
1174
1175 2001-12-27 Akim Demaille <akim@epita.fr>
1176
1177 * src/output.c (prepare): Drop the muscle `ntbase' which
1178 duplicates ntokens.
1179 * src/bison.simple: Formatting/comment changes.
1180 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1181 is an undocumented synonym.
1182
1183 2001-12-22 Akim Demaille <akim@epita.fr>
1184
1185 * src/output.c (output_table_data): Change the prototype to use
1186 `int' for array ranges: some invocations do pass an int, not a
1187 short.
1188 Reported by Wayne Green.
1189
1190 2001-12-22 Akim Demaille <akim@epita.fr>
1191
1192 Some actions of web2c.y are improperly triggered.
1193 Reported by Mike Castle.
1194
1195 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1196 * tests/regression.at (Web2c): Rename as...
1197 (Web2c Report): this.
1198 (Web2c Actions): New.
1199
1200 2001-12-22 Akim Demaille <akim@epita.fr>
1201
1202 Reductions in web2c.y are improperly reported.
1203 Reported by Mike Castle.
1204
1205 * src/conflicts.c (print_reductions): Fix.
1206 * tests/regression.at (Web2c): New.
1207
1208 2001-12-18 Akim Demaille <akim@epita.fr>
1209
1210 Some host fail on `assert (!"foo")', which expands to
1211 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1212 Reported by Nelson Beebee.
1213
1214 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1215 `#define it_succeeded 0' and `assert (it_succeeded)'.
1216
1217 2001-12-17 Marc Autret <autret_m@epita.fr>
1218
1219 * src/bison.simple: Don't hard code the skeleton line and filename.
1220 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1221 New line counter 'skeleton_line' (skeleton-line muscle).
1222
1223 2001-12-17 Paul Eggert <eggert@twinsun.com>
1224
1225 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1226 YYDEBUG must be defined to a nonzero value.
1227
1228 * src/bison.simple (yytname): Do not assume that the user defines
1229 YYDEBUG to a properly parenthesized expression.
1230
1231 2001-12-17 Akim Demaille <akim@epita.fr>
1232
1233 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1234 nlookaheads is a new member.
1235 Adjust all users.
1236 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1237 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1238 state.
1239
1240 2001-12-17 Akim Demaille <akim@epita.fr>
1241
1242 * src/files.h, src/files.c (open_files, close_files): Remove.
1243 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1244 let...
1245 * src/reader.c (reader): Do it.
1246
1247 2001-12-17 Akim Demaille <akim@epita.fr>
1248
1249 * src/conflicts.c (print_reductions): Formatting changes.
1250
1251 2001-12-17 Akim Demaille <akim@epita.fr>
1252
1253 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1254 (flush_reduce): New.
1255 (resolve_sr_conflict): Adjust.
1256
1257 2001-12-17 Akim Demaille <akim@epita.fr>
1258
1259 * src/output.c (output_obstack): Be static and rename as...
1260 (format_obstack): this, to avoid any confusion with files.c's
1261 output_obstack.
1262 * src/reader.h (muscle_obstack): Move to...
1263 * src/output.h: here, since it's defined in output.c.
1264
1265 2001-12-17 Akim Demaille <akim@epita.fr>
1266
1267 * src/output.c (action_row, save_column, default_goto)
1268 (sort_actions, matching_state, pack_vector): Better variable
1269 locality.
1270
1271 2001-12-17 Akim Demaille <akim@epita.fr>
1272
1273 * src/output.c: Various formatting changes.
1274
1275 2001-12-17 Akim Demaille <akim@epita.fr>
1276
1277 * src/files.c (output_files): Free the output_obstack.
1278 * src/main.c (main): Call print and print_graph conditionally.
1279 * src/print.c (print): Work unconditionally.
1280 * src/print_graph.c (print_graph): Work unconditionally.
1281 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1282
1283 2001-12-16 Marc Autret <autret_m@epita.fr>
1284
1285 * src/output.c (actions_output): Fix. When we use %no-lines,
1286 there is one less line per action.
1287
1288 2001-12-16 Marc Autret <autret_m@epita.fr>
1289
1290 * src/bison.simple: Remove a useless #line directive.
1291 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1292 * src/output.c (get_lines_number): New.
1293 (output_parser): Adjust, now takes care about the lines of a
1294 output muscles.
1295 Fix line numbering.
1296 (actions_output): Computes the number of lines taken by actions.
1297 (output_master_parser): Insert new skeleton which is the name of
1298 the output parser file name.
1299
1300 2001-12-15 Marc Autret <autret_m@epita.fr>
1301
1302 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1303
1304 2001-12-15 Marc Autret <autret_m@epita.fr>
1305
1306 * src/output.c (output_gram): Keep track of the hairy one.
1307
1308 2001-12-15 Akim Demaille <akim@epita.fr>
1309
1310 Make `make distcheck' work.
1311
1312 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1313 system.h which uses libgettext.h.
1314
1315 2001-12-15 Akim Demaille <akim@epita.fr>
1316
1317 * src/nullable.c (set_nullable): Useless rules must be skipped,
1318 otherwise, since we range over their symbols, we might look at a
1319 nonterminal which no longer ``exists'', i.e., it is not counted in
1320 `nvars', hence we overflow our arrays.
1321
1322 2001-12-15 Akim Demaille <akim@epita.fr>
1323
1324 The header can also be produced directly, without any obstack!
1325 Yahoo!
1326
1327 * src/files.c, src/files.h (defines_obstack): Remove.
1328 (compute_header_macro): Global.
1329 (defines_obstack_save): Remove.
1330 * src/reader.c (parse_union_decl): No longer output to
1331 defines_obstack: its content can be found in the `stype' muscle
1332 anyway.
1333 (output_token_translations): Merge into...
1334 (symbols_output): this.
1335 Rename as...
1336 (symbols_save): this.
1337 (reader): Adjust.
1338 * src/output.c (header_output): New.
1339 (output): Call it.
1340
1341 2001-12-15 Akim Demaille <akim@epita.fr>
1342
1343 * src/reader.c (parse_union_decl): Instead of handling two obstack
1344 simultaneously, use one to define the `stype' muscle, and use the
1345 value of the latter to fill defines_obstack.
1346 (copy_comment): Remove.
1347 (copy_comment2): Work for a single obstack.
1348 Rename as...
1349 (copy_comment): this.
1350
1351 2001-12-15 Akim Demaille <akim@epita.fr>
1352
1353 * src/lex.c, src/lex.h (xgetc): No longer static.
1354 * src/reader.c (parse_union_decl): Revamp.
1355
1356 2001-12-15 Akim Demaille <akim@epita.fr>
1357
1358 Still making progress in separating Bison into (i) input, (ii)
1359 process, (iii) output: now we can directly output the parser file
1360 without using table_obstack at all.
1361
1362 * src/files.c, src/files.h (table_obstack): Bye bye.
1363 (parser_file_name): New.
1364 * src/files.c (compute_output_file_names): Compute it.
1365 * src/output.c (actions_output, output_parser)
1366 (output_master_parser): To a file instead of an obstack.
1367
1368 2001-12-15 Akim Demaille <akim@epita.fr>
1369
1370 Attach actions to rules, instead of pre-outputting them to
1371 actions_obstack.
1372
1373 * src/gram.h (rule_t): action and action_line are new members.
1374 * src/reader.c (symbol_list): Likewise.
1375 (copy_action): Save the actions within the rule.
1376 (packgram): Save them in rule_table.
1377 * src/output.c (actions_output): New.
1378 (output_parser): Use it on `%%actions'.
1379 (output_rule_data): Don't free rule_table.
1380 (output): Do it.
1381 (prepare): Don't save the `action' muscle.
1382 * src/bison.simple: s/%%action/%%actions/.
1383
1384 2001-12-15 Akim Demaille <akim@epita.fr>
1385
1386 * src/reader.c (copy_action): When --yacc, don't append a `;'
1387 to the user action: let it fail if lacking.
1388 Suggested by Arnold Robbins and Tom Tromey.
1389
1390 2001-12-14 Akim Demaille <akim@epita.fr>
1391
1392 * src/lex.c (literalchar): Simply return the char you decoded, non
1393 longer mess around with obstacks and int pointers.
1394 Adjust all callers.
1395
1396 2001-12-14 Akim Demaille <akim@epita.fr>
1397
1398 * src/lex.c (literalchar): Don't escape the special characters,
1399 just decode them, and keep them as char (before, eol was output as
1400 the 2 char string `\n' etc.).
1401 * src/output.c (output_rule_data): Use quotearg to output the
1402 token strings.
1403
1404 2001-12-13 Paul Eggert <eggert@twinsun.com>
1405
1406 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1407 Do not infringe on the global user namespace when using C++.
1408 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1409 All uses of `fprintf' and `stderr' changed.
1410
1411 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1412
1413 2001-12-13 Akim Demaille <akim@epita.fr>
1414
1415 The computation of nullable is broken: it doesn't handle empty
1416 RHS's properly.
1417
1418 * tests/torture.at (GNU AWK Grammar): New.
1419 * tests/sets.at (Nullable): New.
1420 * src/nullable.c (set_nullable): Instead of blindly looping over
1421 `ritems', loop over the rules, and then over their rhs's.
1422
1423 Work around Autotest bugs.
1424
1425 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1426 frame, because Autotest understand lines starting with a `+' as
1427 traces from the shell. Then, they are not processed properly.
1428 Admittedly an Autotest bug, but we don't have time to wait for
1429 Autotest to catch up.
1430 * tests/regression.at (Broken Closure): Adjust to the new table
1431 frames.
1432 Move to...
1433 * tests/sets.at: here.
1434
1435 2001-12-13 Akim Demaille <akim@epita.fr>
1436
1437 * src/closure.c (closure): Use nrules instead of playing tricks
1438 with BITS_PER_WORD.
1439
1440 2001-12-13 Akim Demaille <akim@epita.fr>
1441
1442 * src/print.c (print_actions): Output the handling of `$' as the
1443 traces do: shifting the token EOF. Before EOF was treated as a
1444 nonterminal.
1445 * tests/regression.at: Adjust some tests.
1446 * src/print_graph.c (print_core): Complete the set of items via
1447 closure. The next-to-final and final states are still unsatisfying,
1448 but that's to be addressed elsewhere.
1449 No longer output the rule numbers, but do output the state number.
1450 A single loop for the shifts + gotos is enough, but picked a
1451 distinct color for each.
1452 (print_graph): Initialize and finalize closure.
1453
1454 2001-12-13 Akim Demaille <akim@epita.fr>
1455
1456 * src/reader.c (readgram): Remove dead code, an strip useless
1457 braces.
1458 (get_type): Remove, unused.
1459
1460 2001-12-12 Akim Demaille <akim@epita.fr>
1461
1462 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1463 on that of lib/error.c.
1464
1465 2001-12-12 Akim Demaille <akim@epita.fr>
1466
1467 Some hosts don't like `/' in includes.
1468
1469 * src/system.h: Include libgettext.h without qualifying the path.
1470 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1471 $(top_srcdir).
1472
1473 2001-12-11 Marc Autret <autret_m@epita.fr>
1474
1475 * src/output.c (output_parser): Remove useless muscle.
1476
1477 2001-12-11 Marc Autret <autret_m@epita.fr>
1478
1479 * src/bison.simple: Remove #line just before %%epilogue. It
1480 is now handled in ...
1481 * src/reader.c (read_additionnal_code): Add the output of a
1482 #line for the epilogue.
1483
1484 2001-12-10 Marc Autret <autret_m@epita.fr>
1485
1486 * src/reader.c (copy_definition): Re-use CPP-outed code which
1487 replace precedent remove.
1488 * src/bison.simple: Remove #line before %%prologue because
1489 %%input-line is wrong at this time.
1490
1491 2001-12-10 Marc Autret <autret_m@epita.fr>
1492
1493 * src/reader.c (symbols_output): Clean up.
1494 * src/output.c (output_gram, output): Clean up.
1495
1496 2001-12-10 Akim Demaille <akim@epita.fr>
1497
1498 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1499 * src/LR0.c (set_state_table): here.
1500 * src/lalr.c (lalr): Call it.
1501
1502 2001-12-10 Akim Demaille <akim@epita.fr>
1503
1504 * src/state.h (shifts): Remove the `number' member: shifts are
1505 attached to state, hence no longer need to be labelled with a
1506 state number.
1507
1508 2001-12-10 Akim Demaille <akim@epita.fr>
1509
1510 Now that states have a complete set of members, the linked list of
1511 shifts is useless: just fill directly the state's shifts member.
1512
1513 * src/state.h (shifts): Remove the `next' member.
1514 * src/LR0.c (first_state, last_state): Remove.
1515 Adjust the callers.
1516 (augment_automaton): Don't look for the shifts that must be added
1517 a shift on EOF: it is those of the state we looked for! But now,
1518 since shifts are attached, it is no longer needed to looking
1519 merely by its id: its number.
1520
1521 2001-12-10 Akim Demaille <akim@epita.fr>
1522
1523 * src/LR0.c (augment_automaton): Better variable locality.
1524 Remove an impossible branch: if there is a state corresponding to
1525 the start symbol being shifted, then there is shift for the start
1526 symbol from the initial state.
1527
1528 2001-12-10 Akim Demaille <akim@epita.fr>
1529
1530 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1531 only when appropriate: when insert_start_shifting_state' is not
1532 invoked.
1533 * tests/regression.at (Rule Line Numbers): Adjust.
1534
1535 2001-12-10 Akim Demaille <akim@epita.fr>
1536
1537 * src/LR0.c (augment_automaton): Now that all states have shifts,
1538 merge the two cases addition shifts to the initial state.
1539
1540 2001-12-10 Akim Demaille <akim@epita.fr>
1541
1542 * src/lalr.c (set_state_table): Move to...
1543 * src/LR0.c: here.
1544 * src/lalr.c (lalr): Don't call it...
1545 * src/LR0.c (generate_states): do it.
1546 * src/LR0.h (first_state): Remove, only the table is used.
1547
1548 2001-12-10 Akim Demaille <akim@epita.fr>
1549
1550 * src/LR0.h (first_shift, first_reduction): Remove.
1551 * src/lalr.c: Don't use first_shift: find shifts through the
1552 states.
1553
1554 2001-12-10 Akim Demaille <akim@epita.fr>
1555
1556 * src/LR0.c: Attach shifts to states as soon as they are
1557 computed.
1558 * src/lalr.c (set_state_table): Instead of assigning shifts to
1559 state, just assert that the mapping was properly done.
1560
1561 2001-12-10 Akim Demaille <akim@epita.fr>
1562
1563 * src/LR0.c (insert_start_shift): Rename as...
1564 (insert_start_shifting_state): this.
1565 (insert_eof_shifting_state, insert_accepting_state): New.
1566 (augment_automaton): Adjust.
1567 Better locality of the variables.
1568 When looking if the start_symbol is shifted from the initial
1569 state, using `while (... symbol != start_symbol ...)' sounds
1570 better than `while (... symbol < start_symbol ...)': If fail
1571 to see how the order between symbols could be relevant!
1572
1573 2001-12-10 Akim Demaille <akim@epita.fr>
1574
1575 * src/getargs.h: Don't declare `spec_name_prefix' and
1576 `spec_file_prefix', declared by src/files.h.
1577 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1578 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1579 * src/output.c (prepare): Adjust.
1580 * src/reader.c (symbols_output): Likewise.
1581 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1582
1583 2001-12-10 Akim Demaille <akim@epita.fr>
1584
1585 * src/muscle_tab.c (muscle_init): NULL is a better default than
1586 `"0"'.
1587
1588 2001-12-10 Akim Demaille <akim@epita.fr>
1589
1590 * src/reader.c (reader): Calling symbols_output once is enough.
1591
1592 2001-12-10 Akim Demaille <akim@epita.fr>
1593
1594 Now that states have a complete set of members, the linked list of
1595 reductions is useless: just fill directly the state's reductions
1596 member.
1597
1598 * src/state.h (struct reductions): Remove member `number' and
1599 `next'.
1600 * src/LR0.c (first_reduction, last_reduction): Remove.
1601 (save_reductions): Don't link the new reductions, store them in
1602 this_state.
1603 * src/lalr.c (set_state_table): No need to attach reductions to
1604 states, it's already done.
1605 * src/output.c (output_actions): No longer free the shifts, then
1606 the reductions, then the states: free all the states and their
1607 members.
1608
1609 2001-12-10 Akim Demaille <akim@epita.fr>
1610
1611 * src/options.c (OPTN, DRTV, BOTH): New.
1612 (option_table): Use them.
1613
1614 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1615 the job of system.h.
1616 * src/options.c: Don't include stdio.h and xalloc.h for the same
1617 reasons.
1618
1619 2001-12-10 Akim Demaille <akim@epita.fr>
1620
1621 * src/output.c (output, prepare): Make sure the values of the
1622 muscles `action' and `prologue' are 0-terminated.
1623
1624 2001-12-10 Akim Demaille <akim@epita.fr>
1625
1626 Clean up GCC warnings.
1627
1628 * src/reader.c (copy_action): `buf' is not used.
1629 (parse_skel_decl): Be static.
1630 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1631 * src/options.h (create_long_option_table): Have a real prototype.
1632 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1633 (hash_delete_at): Return const void *.
1634 Adjust casts to preserve the const.
1635
1636 2001-12-10 Akim Demaille <akim@epita.fr>
1637
1638 * configure.in: Require 2.52g.
1639 M4 is not needed, but AUTOM4TE is.
1640 * m4/m4.m4: Remove.
1641 * tests/Makefile.am: Adjust.
1642
1643 2001-12-10 Akim Demaille <akim@epita.fr>
1644
1645 One structure for states is enough, even though theoretically
1646 there are LR(0) states and LALR(1) states.
1647
1648 * src/lalr.h (state_t): Remove.
1649 (state_table): Be state_t **, not state_t *.
1650 * src/state.h (core, CORE_ALLOC): Rename as...
1651 (state_t, STATE_ALLOC): this.
1652 Add the LALR(1) members: shifts, reductions, errs.
1653 * src/LR0.c (state_table): Rename as...
1654 (state_hash): this, to avoid name clashes with the global
1655 `state_table'.
1656 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1657 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1658
1659 2001-12-10 Akim Demaille <akim@epita.fr>
1660
1661 Bison dumps core on bash.y.
1662 Reported by Pascal Bart.
1663
1664 * src/warshall.c (bitmatrix_print): New.
1665 (TC): Use it.
1666 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1667 j must be the outer loop.
1668 * tests/regression.at (Broken Closure): New.
1669
1670 2001-12-05 Akim Demaille <akim@epita.fr>
1671
1672 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1673 its argument.
1674 Reported by Peter Hámorský.
1675
1676 2001-12-05 Akim Demaille <akim@epita.fr>
1677
1678 * src/conflicts.c (err_table): Remove.
1679 (resolve_sr_conflict): Adjust.
1680 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
1681 Rename as...
1682 (state_t.reductions, state_t.shifts): this.
1683
1684 2001-12-05 Akim Demaille <akim@epita.fr>
1685
1686 * src/reduce.c (reduce_grammar_tables): No longer disable the
1687 removal of useless rules via CPP but via `if (0)', so that the
1688 compiler still check the code is valid.
1689 For instance, it should have noticed `rline' no longer exists: use
1690 the `line' member of rule_t.
1691 * src/gram.c (dummy, rline): Remove, unused.
1692
1693 2001-12-05 Akim Demaille <akim@epita.fr>
1694
1695 * src/output.c (pack_vector): Use assert, not berror.
1696 * src/main.c (berror): Remove, unused.
1697
1698 2001-12-05 Akim Demaille <akim@epita.fr>
1699
1700 New experimental feature: if --verbose --trace output all the
1701 items of a state, not only its kernel.
1702
1703 * src/print.c (print_core): If `trace_flag', then invoke closure
1704 before outputting the items of the state (print_core is no longer
1705 a correct name them).
1706 (print_results): Invoke new_closure/free_closure if needed.
1707
1708 2001-12-05 Akim Demaille <akim@epita.fr>
1709
1710 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
1711 * src/closure.c, src/closure.h (itemsetsize): Rename as...
1712 (nitemset): for consistency with the rest of the project.
1713
1714 2001-12-05 Akim Demaille <akim@epita.fr>
1715
1716 * src/closure.c (print_closure): Improve.
1717 (closure): Use it for printing input and output.
1718
1719 2001-12-05 Akim Demaille <akim@epita.fr>
1720
1721 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
1722 indexed by nonterminals.
1723
1724 2001-12-05 Akim Demaille <akim@epita.fr>
1725
1726 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
1727 what it was!).
1728 * src/warshall.h: Remove accidental duplication of the content.
1729
1730 2001-12-05 Akim Demaille <akim@epita.fr>
1731
1732 * src/closure.c (set_fderives): De-obfuscate.
1733
1734 2001-12-05 Akim Demaille <akim@epita.fr>
1735
1736 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
1737
1738 2001-12-05 Akim Demaille <akim@epita.fr>
1739
1740 * src/closure.c (set_firsts): De-obfuscate.
1741
1742 2001-12-05 Akim Demaille <akim@epita.fr>
1743
1744 * src/output.c (action_row): De-obfuscate
1745 using the good o' techniques: arrays not pointers, variable
1746 locality, BITISSET, RESETBIT etc.
1747
1748 2001-12-05 Akim Demaille <akim@epita.fr>
1749
1750 Pessimize the code to simplify it: from now on, all the states
1751 have a valid SHIFTS, which NSHIFTS is possibly 0.
1752
1753 * src/LR0.c (shifts_new): Be global and move to..
1754 * src/state.c, src/state.h: here.
1755 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
1756 * src/print_graph: Adjust.
1757
1758 2001-12-05 Akim Demaille <akim@epita.fr>
1759
1760 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
1761 * src/conflicts.c: Use it.
1762 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
1763 incorrectly ``simplified''.
1764
1765 2001-12-05 Akim Demaille <akim@epita.fr>
1766
1767 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
1768 using the good o' techniques: arrays not pointers, variable
1769 locality, BITISSET, RESETBIT etc.
1770
1771 2001-12-05 Akim Demaille <akim@epita.fr>
1772
1773 * src/state.h (SHIFT_SYMBOL): New.
1774 * src/conflicts.c: Use it to deobfuscate.
1775
1776 2001-12-05 Akim Demaille <akim@epita.fr>
1777
1778 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
1779 (print_reductions): De-obfuscate using the good o' techniques:
1780 arrays not pointers, variable locality, BITISSET.
1781
1782 2001-12-05 Akim Demaille <akim@epita.fr>
1783
1784 * src/conflicts.c (print_reductions): Arrays, not pointers.
1785 Use BITISSET.
1786
1787 2001-12-05 Akim Demaille <akim@epita.fr>
1788
1789 * src/conflicts.c (print_reductions): Pessimize, but clarify.
1790
1791 2001-12-05 Akim Demaille <akim@epita.fr>
1792
1793 * src/conflicts.c (print_reductions): Improve variable locality.
1794
1795 2001-12-05 Akim Demaille <akim@epita.fr>
1796
1797 * src/conflicts.c (print_reductions): Pessimize, but clarify.
1798
1799 2001-12-05 Akim Demaille <akim@epita.fr>
1800
1801 * src/conflicts.c (print_reductions): Improve variable locality.
1802
1803 2001-12-05 Akim Demaille <akim@epita.fr>
1804
1805 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
1806 * src/lalr.c: Use them.
1807
1808 2001-12-05 Akim Demaille <akim@epita.fr>
1809
1810 * src/LR0.c (augment_automaton): Formatting changes.
1811 Better variable locality.
1812
1813 2001-12-05 Akim Demaille <akim@epita.fr>
1814
1815 * src/lalr.c (matrix_print): New.
1816 (transpose): Use it.
1817 Use arrays instead of pointers.
1818
1819 2001-12-05 Akim Demaille <akim@epita.fr>
1820
1821 * src/lalr.c (maxrhs): Move to...
1822 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
1823 * src/lalr.c (build_relations): Adjust.
1824
1825 2001-12-05 Akim Demaille <akim@epita.fr>
1826
1827 * src/lalr.c (transpose): Free the memory allocated to the
1828 argument, as it is replaced by the results by the unique caller.
1829 (build_relations): Merely invoke transpose: it handles the memory
1830 deallocation.
1831 Improve variable locality.
1832 Avoid variables used as mere abbreviations.
1833 (compute_lookaheads): Use arrays instead of pointers.
1834
1835 2001-12-05 Akim Demaille <akim@epita.fr>
1836
1837 * src/lalr.c (initialize_F): Improve variable locality.
1838 Avoid variables used as mere abbreviations.
1839
1840 2001-12-05 Akim Demaille <akim@epita.fr>
1841
1842 * src/derives.c (print_derives): Display the ruleno.
1843 * src/lalr.c (initialize_F, transpose): Better variable locality
1844 to improve readability.
1845 Avoid variables used as mere abbreviations.
1846
1847 2001-12-05 Akim Demaille <akim@epita.fr>
1848
1849 * src/lalr.c (traverse): Use arrays instead of pointers.
1850
1851 2001-12-05 Akim Demaille <akim@epita.fr>
1852
1853 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
1854 the handling of squeue.
1855 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
1856
1857 2001-12-05 Akim Demaille <akim@epita.fr>
1858
1859 Because useless nonterminals are now kept alive (instead of being
1860 `destroyed'), we now sometimes examine them, and store information
1861 related to them. Hence we need to know their number, and adjust
1862 memory allocations.
1863
1864 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
1865 static.
1866 * src/LR0.c (allocate_itemsets): The memory allocated to
1867 `symbol_count' was used for two different purpose: once to count
1868 the number of occurrences of each symbol, and later reassigned to
1869 `shift_symbol', containing the symbol that can be shifted from a
1870 given state.
1871 Deobfuscate, i.e., allocate, use and free `symbol_count' here
1872 only, and...
1873 (new_itemsets): Allocate `shift_symbol' here.
1874 (allocate_itemsets): symbol_count includes useless nonterminals.
1875 Make room for them.
1876 (free_storage): Use `free', not `XFREE', for pointers that cannot
1877 be null.
1878
1879 2001-12-05 Akim Demaille <akim@epita.fr>
1880
1881 * src/nullable.c (set_nullable): Deobfuscate the handling of
1882 ritem.
1883 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
1884
1885 2001-12-05 Akim Demaille <akim@epita.fr>
1886
1887 * src/gram.c, src/gram.h (ritem_print): New.
1888 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
1889 (This useless function was defined only to work around VMS linkers
1890 that can't handle compilation units with variables only).
1891 * src/reduce.c (dump_grammar): Use it to trace the construction of
1892 ritem.
1893
1894 2001-12-04 Paul Eggert <eggert@twinsun.com>
1895
1896 * src/bison.simple (union yyalloc): Change member names
1897 to be the same as the stack names.
1898 (yyparse): yyptr is now union yyalloc *, not char *.
1899 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
1900 and may generate better code on some machines.
1901 (yystpcpy): Use prototype if __STDC__ is defined, not just
1902 if __cplusplus is defined.
1903
1904 2001-11-30 Akim Demaille <akim@epita.fr>
1905
1906 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
1907 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
1908 Gettext doesn't compile cleanly, and dies with -Werror.
1909 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
1910 Include WARNING_CFLAGS here.
1911 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
1912 before being defined.
1913
1914 2001-11-27 Paul Eggert <eggert@twinsun.com>
1915
1916 * lib/quotearg.h (quotearg_n, quotearg_n_style):
1917 First arg is int, not unsigned.
1918 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
1919 (SIZE_MAX, UINT_MAX): New macros.
1920 (quotearg_n_options): Abort if N is negative.
1921 Avoid overflow check on hosts where size_t is 64 bits and int
1922 is 32 bits, as overflow is impossible there.
1923 Fix off-by-one typo that caused unnecessary reallocation.
1924
1925 2001-11-29 Paul Eggert <eggert@twinsun.com>
1926
1927 Name space cleanup in generated parser.
1928
1929 * doc/bison.texinfo (Bison Parser): Discuss system headers
1930 and their effect on the user name space.
1931
1932 * src/bison.simple:
1933 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
1934 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
1935 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
1936
1937 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
1938 on user names when possible.
1939
1940 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
1941 Simplify test for whather <alloca.h> exists.
1942
1943 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
1944
1945 (<stdio.h>): Include if YYDEBUG.
1946
1947 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
1948 ! defined (yyoverflow) && ! defined (yymemcpy).
1949
1950 (yymemcpy, yyparse): Rename local variables as needed so that
1951 they all begin with 'yy'.
1952
1953 (yystrlen, yystpcpy): New functions.
1954
1955 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
1956 All uses changed.
1957
1958 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
1959 instead of relying on string.h functions. Use YYSTACK_ALLOC
1960 and YYSTACK_FREE instead of malloc and free.
1961
1962 2001-11-30 Akim Demaille <akim@epita.fr>
1963
1964 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
1965 before their first uses.
1966 (YYBISON, YYPURE): Move to the top of the output.
1967
1968 2001-11-30 Akim Demaille <akim@epita.fr>
1969
1970 * tests/reduce.at (Useless Nonterminals): Fix.
1971
1972 2001-11-30 Akim Demaille <akim@epita.fr>
1973
1974 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
1975 if body instead of `;' to pacify GCC's warnings.
1976
1977 2001-11-30 Akim Demaille <akim@epita.fr>
1978
1979 Instead of mapping the LHS of unused rules to -1, keep the LHS
1980 valid, but flag the rules as invalid.
1981
1982 * src/gram.h (rule_t): `useful' is a new member.
1983 * src/print.c (print_grammar): Adjust.
1984 * src/derives.c (set_derives): Likewise.
1985 * src/reader.c (packgram, reduce_output): Likewise.
1986 * src/reduce.c (reduce_grammar_tables): Likewise.
1987 * tests/reduce.at (Underivable Rules, Useless Rules): New.
1988
1989 2001-11-30 Akim Demaille <akim@epita.fr>
1990
1991 * src/reduce.c (reduce_output): Formatting changes.
1992 * src/print.c (print_results, print_grammar): Likewise.
1993 * tests/regression.at (Rule Line Numbers)
1994 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
1995
1996 2001-11-30 Akim Demaille <akim@epita.fr>
1997
1998 * src/reduce.c (nonterminals_reduce): Instead of throwing away
1999 useless nonterminals, move them at the end of the symbol arrays.
2000 (reduce_output): Adjust.
2001 * tests/reduce.at (Useless Nonterminals): Adjust.
2002
2003 2001-11-30 Akim Demaille <akim@epita.fr>
2004
2005 * src/reduce.c: Various comment/formatting changes.
2006 (nonterminals_reduce): New, extracted from...
2007 (reduce_grammar_tables): here.
2008 (reduce_grammar): Call nonterminals_reduce.
2009
2010 2001-11-29 Paul Eggert <eggert@twinsun.com>
2011
2012 * src/bison.simple (YYSTACK_REALLOC): Remove.
2013 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
2014 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
2015 New macros.
2016 (union yyalloc): New type.
2017 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
2018 an arbitrary restriction on hosts where size_t is wider than int.
2019
2020 (yyparse): Don't dump core if alloca or malloc fails; instead, report
2021 a parser stack overflow. Allocate just one block of memory for all
2022 three stacks, instead of allocating three blocks; this typically is
2023 faster and reduces fragmentation.
2024
2025 Do not limit the number of items in the stack to a value that fits
2026 in 'int', as this is an arbitrary limit on hosts with 64-bit
2027 size_t and 32-bit int.
2028
2029 2001-11-29 Marc Autret <autret_m@epita.fr>
2030
2031 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
2032 of defining YYERROR_VERBOSE.
2033 [AT_DATA]: $4 is now out of C declarations in the prologue.
2034
2035 2001-11-28 Marc Autret <autret_m@epita.fr>
2036
2037 * src/reader.c (parse_dquoted_param): New.
2038 (parse_skel_decl): Use it.
2039 * src/lex.h: Add its prototype.
2040 * src/lex.c (literalchar): Become not static.
2041
2042 2001-11-28 Marc Autret <autret_m@epita.fr>
2043
2044 * src/output.h: And put its extern declaration here.
2045 * src/output.c (error_verbose): Define here.
2046 (prepare): Echo name modification.
2047 * src/getargs.h: Clean its extern declaration.
2048 * src/getargs.c (error_verbose_flag): Remove.
2049 (getargs): Remove case 'e'.
2050 * src/options.c (option_table): 'error-verbose' is now seen as simple
2051 percent option.
2052 Include output.h.
2053
2054 * src/reader.c (read_declarations): Remove case tok_include.
2055 (parse_include_decl): Remove.
2056 * src/lex.h (token_t): Remove tok_include.
2057 * src/options.c (option_table): 'include' is now a simple command line
2058 option.
2059
2060 2001-11-28 Marc Autret <autret_m@epita.fr>
2061
2062 * src/bison.simple: Adjust muscle names.
2063 * src/muscle_tab.c (muscle_init): Also rename the muscles.
2064 * src/output.c (prepare): s/_/-/ for the muscles names.
2065 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
2066
2067 2001-11-28 Marc Autret <autret_m@epita.fr>
2068
2069 * src/bison.simple: Fix debug.
2070 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
2071
2072 2001-11-28 Akim Demaille <akim@epita.fr>
2073
2074 * src/LR0.c (shifts_new): New.
2075 (save_shifts, insert_start_shift, augment_automaton): Use it.
2076
2077 2001-11-28 Akim Demaille <akim@epita.fr>
2078
2079 * src/closure.c (closure): `b' and `ruleno' denote the same value:
2080 keep ruleno only.
2081
2082 2001-11-28 Akim Demaille <akim@epita.fr>
2083
2084 * src/closure.c (closure): Instead of looping over word in array
2085 then bits in words, loop over bits in array.
2086
2087 2001-11-28 Akim Demaille <akim@epita.fr>
2088
2089 * src/closure.c (closure): No longer optimize the special case
2090 where all the bits of `ruleset[r]' are set to 0, to make the code
2091 clearer.
2092
2093 2001-11-28 Akim Demaille <akim@epita.fr>
2094
2095 * src/closure.c (closure): `r' and `c' are new variables, used to
2096 de-obfuscate accesses to RULESET and CORE.
2097
2098 2001-11-28 Akim Demaille <akim@epita.fr>
2099
2100 * src/reduce.c (reduce_print): Use ngettext.
2101 (dump_grammar): Improve the trace accuracy.
2102
2103 2001-11-28 Akim Demaille <akim@epita.fr>
2104
2105 * src/reduce.c (dump_grammar): Don't translate trace messages.
2106
2107 2001-11-28 Akim Demaille <akim@epita.fr>
2108
2109 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
2110 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
2111 as all tags are free'ed afterwards.
2112 From Enrico Scholz.
2113
2114 2001-11-27 Paul Eggert <eggert@twinsun.com>
2115
2116 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
2117 use alloca when we didn't want to, and vice versa.
2118
2119 2001-11-27 Marc Autret <autret_m@epita.fr>
2120
2121 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
2122 initialization.
2123 * src/output.c (prepare): Remove its update.
2124
2125 2001-11-27 Marc Autret <autret_m@epita.fr>
2126
2127 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
2128 Use %error-verbose.
2129
2130 2001-11-27 Marc Autret <autret_m@epita.fr>
2131
2132 * src/bison.simple: Remove YYERROR_VERBOSE using.
2133 Use %%error_verbose.
2134 (yyparse): Likewise.
2135 * src/output.c (prepare): Give its final value.
2136 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
2137 * src/getargs.h: Add its extern declaration.
2138 * src/getargs.c (error_verbose_flag): New int.
2139 (getargs): Update to catch new case.
2140 * src/options.c (option_table): 'error-verbose' is a new option.
2141 (shortopts): Update.
2142
2143 2001-11-27 Akim Demaille <akim@epita.fr>
2144
2145 * src/system.h: Use intl/libgettext.h.
2146 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
2147
2148 2001-11-27 Akim Demaille <akim@epita.fr>
2149
2150 * tests/torture.at (Exploding the Stack Size with Malloc):
2151 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
2152
2153 2001-11-27 Akim Demaille <akim@epita.fr>
2154
2155 * src/files.c: Include error.h.
2156 Reported by Hans Aberg.
2157
2158 2001-11-26 Marc Autret <autret_m@epita.fr>
2159
2160 * src/reader.c (parse_include_decl): New, not yet implemented.
2161 (read_declarations): Add case tok_include.
2162 * src/getargs.h (include): Add its extern definition.
2163 * src/getargs.c (include): New const char *.
2164 (getargs): Add case '-I'.
2165 * src/options.c (option_table): Add include as command line and
2166 percent option.
2167 * src/lex.h (token_t): Add tok_include.
2168
2169 2001-11-26 Akim Demaille <akim@epita.fr>
2170
2171 * src/reader.c (readgram): Make sure rules for mid-rule actions
2172 have a lineno equal to that of their host rule.
2173 Reported by Hans Aberg.
2174 * tests/regression.at (Rule Line Numbers): New.
2175
2176 2001-11-26 Akim Demaille <akim@epita.fr>
2177
2178 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
2179 size_ts.
2180
2181 2001-11-26 Akim Demaille <akim@epita.fr>
2182
2183 * src/complain.c, src/complain.h (error): Remove, provided by
2184 lib/error.[ch].
2185
2186 2001-11-26 Akim Demaille <akim@epita.fr>
2187
2188 * src/reader.c (read_declarations): Don't abort on tok_illegal,
2189 issue an error message.
2190 * tests/regression.at (Invalid %directive): New.
2191 Reported by Hans Aberg.
2192
2193 2001-11-26 Akim Demaille <akim@epita.fr>
2194
2195 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
2196 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
2197
2198 2001-11-26 Akim Demaille <akim@epita.fr>
2199
2200 * src/conflicts.c (conflicts_print): Don't complain at all when
2201 there are no reduce/reduce conflicts, and as many shift/reduce
2202 conflicts as expected.
2203 * tests/regression.at (%expect right): Adjust.
2204
2205 2001-11-23 Akim Demaille <akim@epita.fr>
2206
2207 * lib/alloca.c: Update, from fileutils.
2208
2209 2001-11-23 Akim Demaille <akim@epita.fr>
2210
2211 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
2212
2213 2001-11-23 Akim Demaille <akim@epita.fr>
2214
2215 * src/system.h: Include alloca.h.
2216 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
2217
2218 2001-11-23 Akim Demaille <akim@epita.fr>
2219
2220 * src/print_graph.c (print_actions): Remove `rule', unused.
2221 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
2222 pacify GCC's signed < unsigned warnings.
2223 * src/closure.c (itemsetsize): Likewise.
2224 * src/reader.c (symbol_list_new): Static.
2225
2226 2001-11-23 Akim Demaille <akim@epita.fr>
2227
2228 Attaching lineno to buckets is stupid, since only one copy of each
2229 symbol is kept, only the line of the first occurrence is kept too.
2230
2231 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
2232 * src/reader.c (rline_allocated): Remove, unused.
2233 (symbol_list): Have a `line' member.
2234 (symbol_list_new): New.
2235 (readgram): Use it.
2236 * src/print.c (print_grammar): Output the rule line numbers.
2237 * tests/regression.at (Solved SR Conflicts)
2238 (Unresolved SR Conflicts): Adjust.
2239 Reported by Hans Aberg.
2240
2241 2001-11-22 Marc Autret <autret_m@epita.fr>
2242
2243 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
2244
2245 2001-11-22 Marc Autret <autret_m@epita.fr>
2246
2247 * src/muscle_tab.c (muscle_init): Remove initialization of
2248 skeleton muscle.
2249 * src/output.c (output_master_parser): Do it here.
2250
2251 2001-11-20 Akim Demaille <akim@epita.fr>
2252
2253 * po/sv.po: New.
2254 * configure.in (ALL_LINGUAS): Adjust.
2255 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
2256 longer contains strings to translate.
2257
2258 2001-11-19 Akim Demaille <akim@epita.fr>
2259
2260 * src/conflicts.c (conflicts_print): Add a missing \n.
2261
2262 2001-11-19 Akim Demaille <akim@epita.fr>
2263
2264 * src/nullable.c (nullable_print): New.
2265 (set_nullable): Call it when tracing.
2266 Better locality of variables.
2267
2268 2001-11-19 Akim Demaille <akim@epita.fr>
2269
2270 * src/print.c (print_actions): Better locality of variables.
2271
2272 2001-11-19 Akim Demaille <akim@epita.fr>
2273
2274 * src/derives.c (print_derives): Fix and enrich.
2275 * src/closure.c (print_fderives): Likewise.
2276
2277 2001-11-19 Akim Demaille <akim@epita.fr>
2278
2279 * src/closure.c (itemsetend): Remove, replaced with...
2280 (itemsetsize): new.
2281
2282 2001-11-19 Akim Demaille <akim@epita.fr>
2283
2284 * src/LR0.c (kernel_end): Remove, replaced with...
2285 (kernel_size): new.
2286
2287 2001-11-19 Akim Demaille <akim@epita.fr>
2288
2289 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
2290 to clarify.
2291
2292 2001-11-19 Akim Demaille <akim@epita.fr>
2293
2294 * src/closure.c (closure): Use arrays instead of pointers to clarify.
2295
2296 2001-11-19 Akim Demaille <akim@epita.fr>
2297
2298 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
2299 trace messages.
2300 * src/LR0.c: Likewise.
2301 (allocate_itemsets): Use arrays instead of pointers to clarify.
2302
2303 2001-11-19 Akim Demaille <akim@epita.fr>
2304
2305 * src/getargs.c (statistics_flag): Replace with...
2306 (trace_flag): New.
2307 (longopts): Accept --trace instead of --statistics.
2308 * src/getargs.h, src/options.c: Adjust.
2309 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
2310 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
2311
2312 2001-11-19 Akim Demaille <akim@epita.fr>
2313
2314 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
2315 pointers to clarify the code.
2316 (save_reductions, save_shifts): Factor common parts of alternatives.
2317
2318 2001-11-19 Akim Demaille <akim@epita.fr>
2319
2320 * src/LR0.c (new_state, get_state): Complete TRACE code.
2321 * src/closure.c: Include `reader.h' to get `tags', needed by the
2322 trace code.
2323 Rename the conditional DEBUG as TRACE.
2324 Output consistently TRACEs to stderr, not stdout.
2325 * src/derives.c: Likewise.
2326 * src/reduce.c: (inaccessable_symbols): Using if is better style
2327 than goto.
2328 Use `#if TRACE' instead of `#if 0' for tracing code.
2329
2330 2001-11-19 Akim Demaille <akim@epita.fr>
2331
2332 * src/system.h (LIST_FREE, shortcpy): New.
2333 * src/LR0.c: Use them.
2334 * src/output.c (free_itemsets, free_reductions, free_shifts):
2335 Remove, replaced by LIST_FREE.
2336
2337 2001-11-19 Akim Demaille <akim@epita.fr>
2338
2339 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
2340 (REDUCTIONS_ALLOC): New.
2341 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
2342 allocation.
2343
2344 2001-11-19 Akim Demaille <akim@epita.fr>
2345
2346 * src/LR0.c (new_state): Complete trace code.
2347 * src/nullable.c (set_nullable): Don't translate traces.
2348
2349 2001-11-19 Akim Demaille <akim@epita.fr>
2350
2351 * src/print_graph.c (print_core): Better locality of variables.
2352 * src/print.c (print_core): Likewise.
2353
2354 2001-11-19 Akim Demaille <akim@epita.fr>
2355
2356 * src/vcg.c: You do the output, so you are responsible of the
2357 handling of VCG syntax, in particular: use quotearg.
2358 * src/print_graph.c: Don't.
2359 (print_actions): Don't output the actions as part of the nodes,
2360 since that's the job of the edges.
2361 (print_state): Don't output by hand: fill the node description,
2362 and ask for its output.
2363
2364 2001-11-19 Akim Demaille <akim@epita.fr>
2365
2366 * src/bison.simple (yyparse): When verbosely reporting an error,
2367 no longer put additional quotes around token names.
2368 * tests/calc.at: Adjust.
2369
2370 2001-11-19 Akim Demaille <akim@epita.fr>
2371
2372 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
2373 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
2374 * src/output.c: Adjust.
2375
2376 2001-11-19 Akim Demaille <akim@epita.fr>
2377
2378 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
2379 (rule_t): this.
2380 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
2381
2382 2001-11-19 Akim Demaille <akim@epita.fr>
2383
2384 * src/gram.h (rule_t): New.
2385 (rule_table): New.
2386 (rrhs, rlhs): Remove, part of state_t.
2387 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
2388 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
2389 * src/reader.c, src/reduce.c: Adjust.
2390
2391 2001-11-19 Akim Demaille <akim@epita.fr>
2392
2393 * src/reader.c (symbols_output): New, extracted from...
2394 (packsymbols): Here.
2395 (reader): Call it.
2396
2397 2001-11-19 Akim Demaille <akim@epita.fr>
2398
2399 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
2400 (maxrhs): this new function.
2401
2402 2001-11-19 Akim Demaille <akim@epita.fr>
2403
2404 * src/lalr.c (F): New macro to access the variable F.
2405 Adjust.
2406
2407 2001-11-19 Akim Demaille <akim@epita.fr>
2408
2409 * src/lalr.h (LA): New macro to access the variable LA.
2410 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2411 * src/lalr.c: Adjust.
2412
2413 2001-11-19 Akim Demaille <akim@epita.fr>
2414
2415 * src/lalr.c (initialize_LA): Only initialize LA. Let...
2416 (set_state_table): handle the `lookaheads' members.
2417
2418 2001-11-19 Akim Demaille <akim@epita.fr>
2419
2420 * src/lalr.h (lookaheads): Removed array, whose contents is now
2421 a member of...
2422 (state_t): this structure.
2423 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2424 Adjust.
2425
2426 2001-11-19 Akim Demaille <akim@epita.fr>
2427
2428 * src/lalr.h (consistent): Removed array, whose contents is now
2429 a member of...
2430 (state_t): this structure.
2431 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2432 Adjust.
2433
2434 2001-11-19 Akim Demaille <akim@epita.fr>
2435
2436 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
2437 contents are now members of...
2438 (state_t): this structure.
2439 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
2440 Adjust.
2441
2442 2001-11-19 Akim Demaille <akim@epita.fr>
2443
2444 * src/lalr.h (state_t): New.
2445 (state_table): Be a state_t * instead of a core **.
2446 (accessing_symbol): Remove, part of state_t.
2447 * src/lalr.c: Adjust.
2448 (set_accessing_symbol): Merge into...
2449 (set_state_table): this.
2450 * src/print_graph.c, src/conflicts.c: Adjust.
2451
2452 2001-11-14 Akim Demaille <akim@epita.fr>
2453
2454 * tests/calc.at, tests/output.at, tests/regression.at,
2455 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
2456 now the tests are run in private dirs, therefore AC_CLEANUP and
2457 family can be simplified to 0-ary.
2458 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
2459 use abs. path to find config.h.
2460 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
2461 stderr, there can be way too much random noise.
2462 Instead pass -Werror to GCC and rely on the exit status.
2463 Reported by Wolfram Wagner.
2464
2465 2001-11-14 Akim Demaille <akim@epita.fr>
2466
2467 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
2468 defined only if yyoverflow is defined, to avoid `warning: unused
2469 variable `yyvs1''.
2470 Reported by The Test Suite.
2471
2472 2001-11-14 Akim Demaille <akim@epita.fr>
2473
2474 * src/print.c: Include reduce.h.
2475 Reported by Hans Aberg.
2476
2477 2001-11-14 Akim Demaille <akim@epita.fr>
2478
2479 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
2480 Revert a previous patch: these are really const.
2481 * src/conflicts.c (conflict_report): Additional useless pair of
2482 braces to pacify GCC's warnings for `if () if () {} else {}'.
2483 * src/lex.c (parse_percent_token): Replace equal_offset with
2484 arg_offset.
2485 arg is const.
2486 Be sure to strdup `arg' when used, since there is no reason for
2487 token_buffer not to change.
2488
2489 2001-11-14 Akim Demaille <akim@epita.fr>
2490
2491 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
2492 definition.
2493 * src/main.c (main): Use them.
2494 Suggested by Hans Aberg.
2495
2496 2001-11-12 Akim Demaille <akim@epita.fr>
2497
2498 * src/system.h (ngettext): Now that we use ngettext, be sure to
2499 provide a default definition when NLS are not used.
2500
2501 2001-11-12 Akim Demaille <akim@epita.fr>
2502
2503 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
2504 Use @kbd to denote user input.
2505 (Language and Grammar): ANSIfy the example.
2506 Adjust its layout for info/notinfo.
2507 (Location Tracking Calc): Output error messages to stderr.
2508 Output locations in a more GNUtically correct way.
2509 Fix a couple of Englishos.
2510 Adjust @group/@end group pairs.
2511
2512 2001-11-12 Akim Demaille <akim@epita.fr>
2513
2514 %expext was not functioning at all.
2515
2516 * src/conflicts.c (expected_conflicts): Set to -1.
2517 (conflict_report): Use ngettext.
2518 (conflicts_print): Check %expect and make its violation an error.
2519 * doc/bison.texinfo (Expect Decl): Adjust.
2520 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
2521 * tests/regression.at (%expect not enough, %expect right)
2522 (%expect too much): New.
2523
2524 2001-11-12 Akim Demaille <akim@epita.fr>
2525
2526 * tests/regression.at (Conflicts): Rename as...
2527 (Unresolved SR Conflicts): this.
2528 (Solved SR Conflicts): New.
2529
2530 2001-11-12 Akim Demaille <akim@epita.fr>
2531
2532 * src/reduce.c (print_results): Rename as...
2533 (reduce_output): This.
2534 Output to OUT, passed as argument, instead of output_obstack.
2535 (dump_grammar): Likewise.
2536 (reduce_free): New.
2537 Also free V1.
2538 (reduce_grammar): No longer call reduce_output, since...
2539 * src/print.c (print_results): do it.
2540 * src/main.c (main): Call reduce_free;
2541
2542 2001-11-12 Akim Demaille <akim@epita.fr>
2543
2544 * src/conflicts.c (print_reductions): Accept OUT as argument.
2545 Output to it, not to output_obstack.
2546 * src/print.c (print_actions): Adjust.
2547
2548 2001-11-12 Akim Demaille <akim@epita.fr>
2549
2550 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
2551 the result instead of using...
2552 (src_total, rrc_total, src_count, rrc_count): Remove.
2553 (any_conflicts): Remove.
2554 (print_conflicts): Split into...
2555 (conflicts_print, conflicts_output): New.
2556 * src/conflicts.h: Adjust.
2557 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
2558 * src/print.c (print_grammar): Issue `\n' between two rules.
2559 * tests/regression.at (Conflicts): New.
2560 Reported by Tom Lane.
2561
2562 2001-11-12 Akim Demaille <akim@epita.fr>
2563
2564 * tests/regression.at (Invalid input): Remove, duplicate with
2565 ``Invalid input: 1''.
2566
2567 2001-11-12 Akim Demaille <akim@epita.fr>
2568
2569 * tests/torture.at (AT_DATA_STACK_TORTURE)
2570 (Exploding the Stack Size with Alloca)
2571 (Exploding the Stack Size with Malloc): New.
2572
2573 2001-11-12 Akim Demaille <akim@epita.fr>
2574
2575 * src/bison.simple (YYSTACK_REALLOC): New.
2576 (yyparse) [!yyoverflow]: Use it and free the old stack.
2577 Reported by Per Allansson.
2578
2579 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
2580
2581 * src/bison.simple: Define type yystype instead of YYSTYPE, and
2582 define CPP macro, which substitute YYSTYPE by yystype.
2583 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
2584 with yyltype/YYLTYPE. This allows inclusion of the generated
2585 header within the parser if the compiler, such as GGC, accepts
2586 multiple equivalent #defines.
2587 From Akim.
2588
2589 2001-11-05 Akim Demaille <akim@epita.fr>
2590
2591 * src/reader.c (symbols_output): New, extracted from...
2592 (packsymbols): here.
2593 (reader): Adjust.
2594
2595 2001-11-05 Akim Demaille <akim@epita.fr>
2596
2597 * src/lex.c (parse_percent_token): s/quotearg/quote/.
2598
2599 2001-11-05 Akim Demaille <akim@epita.fr>
2600
2601 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
2602 pattern.
2603
2604 2001-11-05 Akim Demaille <akim@epita.fr>
2605
2606 * src/options.h (struct option_table_struct): set_flags is void*.
2607 * src/options.c (longopts): Support `--output' and `%output'.
2608 (usage): Adjust.
2609 * src/lex.h (tok_setopt): Remove, replaced with...
2610 (tok_intopt, tok_stropt): these new guys.
2611 * src/lex.c (getopt.h): Not needed.
2612 (token_buffer, unlexed_token_buffer): Not const.
2613 (percent_table): Promote `-' over `_' in directive names.
2614 Active `%name-prefix', `file-prefix', and `output'.
2615 (parse_percent_token): Accept possible arguments to directives.
2616 Promote `-' over `_' in directive names.
2617
2618 2001-11-04 Akim Demaille <akim@epita.fr>
2619
2620 * doc/bison.texinfo (Decl Summary): Split the list into
2621 `directives for grammars' and `directives for bison'.
2622 Sort'em.
2623 Add description of `%name-prefix', `file-prefix', and `output'.
2624 Promote `-' over `_' in directive names.
2625 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
2626 Simplify the description of `--name-prefix'.
2627 Promote `-' over `_' in directive names.
2628 Promote `--output' over `--output-file'.
2629 Fix the description of `--defines'.
2630 * tests/output.at: Exercise %file-prefix and %output.
2631
2632 2001-11-02 Akim Demaille <akim@epita.fr>
2633
2634 * doc/refcard.tex: Update.
2635
2636 2001-11-02 Akim Demaille <akim@epita.fr>
2637
2638 * src/symtab.h (SUNDEF): New.
2639 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
2640 stand for `uninitialized', instead of 0.
2641 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
2642 * src/lex.c (lex): Adjust.
2643
2644 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
2645 Number it 0.
2646 Let yylex return it instead of a plain 0.
2647 Reported by Dick Streefland.
2648
2649 2001-11-02 Akim Demaille <akim@epita.fr>
2650
2651 * tests/regression.at (Mixing %token styles): New test.
2652
2653 2001-11-02 Akim Demaille <akim@epita.fr>
2654
2655 * src/reader.c (parse_thong_decl): Formatting changes.
2656 (token_translations_init): New, extracted from...
2657 (packsymbols): Here.
2658 Adjust.
2659
2660 2001-11-01 Akim Demaille <akim@epita.fr>
2661
2662 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
2663 Check that `9foo.y' produces correct cpp guards.
2664 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
2665 guards.
2666 Reported by Wwp.
2667
2668 2001-11-01 Akim Demaille <akim@epita.fr>
2669
2670 * tests/regression.at (Invalid input: 2): New.
2671 * src/lex.c (unlexed_token_buffer): New.
2672 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
2673 too.
2674 Reported by Wwp.
2675
2676 2001-11-01 Akim Demaille <akim@epita.fr>
2677
2678 * tests/calc.at: Catch up with 1.30.
2679 * configure.in: Bump to 1.49a.
2680 Adjust to newer Autotest.
2681
2682 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
2683
2684 * src/conflicts.c: Move global variables rrc_total and src_total ...
2685 (print_conflicts): here.
2686 * src/output.c (output): Free global variable user_toknums.
2687 * src/lex.c (token_obstack): Become static.
2688
2689 2001-10-18 Akim Demaille <akim@epita.fr>
2690
2691 * tests/atlocal.in (GCC): Add.
2692 * tests/calc.at: s/m4_match/m4_bmatch/.
2693 s/m4_patsubst/m4_bpatsubst/.
2694 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
2695 * configure.in: AC_SUBST(GCC).
2696
2697 2001-10-14 Marc Autret <autret_m@epita.fr>
2698
2699 * src/options.c (create_long_option_table): Fix.
2700
2701 2001-10-10 Akim Demaille <akim@epita.fr>
2702
2703 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
2704
2705 2001-10-04 Akim Demaille <akim@epita.fr>
2706
2707 * src/reader.c (parse_union_decl): Push the caracters in
2708 union_obstack, not attrs_obstack.
2709
2710 2001-10-04 Akim Demaille <akim@epita.fr>
2711
2712 Merge in the branch 1.29.
2713
2714 * src/reader.c (packsymbols): Use a temporary obstack for
2715 `%%tokendef', since output_stack is already used elsewhere.
2716
2717 2001-10-02 Akim Demaille <akim@epita.fr>
2718
2719 Bump 1.29d.
2720
2721 2001-10-02 Akim Demaille <akim@epita.fr>
2722
2723 Version 1.29c.
2724
2725 2001-10-02 Akim Demaille <akim@epita.fr>
2726
2727 * tests/regression.at (Invalid CPP headers): New.
2728 From Alexander Belopolsky.
2729 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
2730
2731 2001-10-02 Akim Demaille <akim@epita.fr>
2732
2733 * tests/regression.at (Invalid input): New.
2734 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
2735 Reported by Shura.
2736
2737 2001-10-02 Akim Demaille <akim@epita.fr>
2738
2739 * tests/calc.at: Now that --debug works, the tests must be adjusted.
2740
2741 2001-10-02 Akim Demaille <akim@epita.fr>
2742
2743 * src/output.c (output_parser): Assert `skeleton'.
2744 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
2745 systems.
2746 From Shura.
2747
2748 2001-10-01 Marc Autret <autret_m@epita.fr>
2749
2750 * src/lex.h: Echo modifications.
2751 * src/lex.c (unlex): Parameter is now token_t.
2752 From Hans Aberg.
2753
2754 2001-10-01 Marc Autret <autret_m@epita.fr>
2755
2756 * src/main.c: Include lex.h.
2757 From Hans Aberg.
2758
2759 2001-09-29 Akim Demaille <akim@epita.fr>
2760
2761 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
2762
2763 2001-09-28 Akim Demaille <akim@epita.fr>
2764
2765 * tests/testsuite.at: Update to newer Autotest.
2766 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
2767
2768 2001-09-27 Akim Demaille <akim@epita.fr>
2769
2770 Position independent wrapper.
2771
2772 * tests/bison: Remove.
2773 * tests/bison.in: New.
2774 * configure.in: Adjust.
2775
2776 2001-09-27 Paul Eggert <eggert@twinsun.com>
2777
2778 Port quotearg fixes from tar 1.13.24.
2779
2780 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
2781 tm to be declared.
2782 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
2783 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
2784
2785 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
2786 * m4/mbrtowc.m4: New file.
2787 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
2788 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
2789
2790 2001-09-27 Akim Demaille <akim@epita.fr>
2791
2792 Bump to 1.29c.
2793
2794 2001-09-27 Akim Demaille <akim@epita.fr>
2795
2796 Version 1.29b.
2797
2798 2001-09-25 Akim Demaille <akim@epita.fr>
2799
2800 * src/system.h: Include `xalloc.h'.
2801 Remove it from the C files.
2802 * src/files.c (output_files): Free the obstacks.
2803 * src/lex.c (init_lex): Rename as...
2804 (lex_init): this.
2805 (lex_free): New.
2806 * src/main.c (main): Use it.
2807
2808 2001-09-24 Marc Autret <autret_m@epita.fr>
2809
2810 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
2811 to output informations in fout (FILE*).
2812 (open_graph, close_graph): Likewise.
2813 (output_graph, output_edge, output_node): Likewise.
2814 * src/vcg.h: Update function prototypes.
2815 * src/print_graph.c (print_graph): Open output graph file.
2816 (print_actions): Adjust.
2817 * src/files.h: Remove extern declaration.
2818 * src/files.c: Remove graph_obstack declaration.
2819 (open_files): Remove graph_obstack initialization.
2820 (output_files): Remove graph_obstack saving.
2821
2822 2001-09-24 Marc Autret <autret_m@epita.fr>
2823
2824 * src/files.c (compute_output_file_names): Fix.
2825
2826 2001-09-24 Marc Autret <autret_m@epita.fr>,
2827 Akim Demaille <akim@epita.fr>
2828
2829 * src/reader.c (reader): Remove call to free_symtab ().
2830 * src/main.c (main): Call it here.
2831 Include symtab.h.
2832 * src/conflicts.c (initialize_conflicts): Rename as...
2833 (solve_conflicts): this.
2834 * src/print.c (print_core, print_actions, print_state)
2835 (print_grammar): Dump to a file instead a `output_obstack'.
2836 (print_results): Dump `output_obstack', and then proceed with the
2837 FILE *.
2838 * src/files.c (compute_output_file_names, close_files): New.
2839 (output_files): Adjust.
2840 * src/main.c (main): Adjust.
2841
2842 2001-09-23 Marc Autret <autret_m@epita.fr>
2843
2844 * src/files.c (compute_header_macro): Computes header macro name
2845 from spec_defines_file when given.
2846
2847 2001-09-23 Marc Autret <autret_m@epita.fr>
2848
2849 * src/files.c (output_files): Add default extensions.
2850
2851 2001-09-22 Akim Demaille <akim@epita.fr>
2852
2853 * src/conflicts.c (finalize_conflicts): Rename as...
2854 (free_conflicts): this.
2855
2856 2001-09-22 Akim Demaille <akim@epita.fr>
2857
2858 * src/gram.c (gram_free): Rename back as...
2859 (dummy): this.
2860 (output_token_translations): Free `token_translations'.
2861 * src/symtab.c (free_symtab): Free the tag field.
2862
2863 2001-09-22 Akim Demaille <akim@epita.fr>
2864
2865 Remove `translations' as it is always set to true.
2866
2867 * src/gram.h: Adjust.
2868 * src/reader.c (packsymbols, parse_token_decl): Adjust
2869 * src/print.c (print_grammar): Adjust.
2870 * src/output.c (output_token_translations): Adjust.
2871 * src/lex.c (lex): Adjust.
2872 * src/gram.c: Be sure the set pointers to NULL.
2873 (dummy): Rename as...
2874 (gram_free): this.
2875
2876 2001-09-22 Akim Demaille <akim@epita.fr>
2877
2878 * configure.in: Invoke AM_LIB_DMALLOC.
2879 * src/system.h: Use dmalloc.
2880 * src/LR0.c: Be sure to have pointers initialized to NULL.
2881 (allocate_itemsets): Allocate kernel_items only if needed.
2882
2883 2001-09-22 Akim Demaille <akim@epita.fr>
2884
2885 * configure.in: Bump to 1.29b.
2886 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
2887 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
2888 need xmalloc.c in calc.y.
2889 From Pascal Bart.
2890
2891 2001-09-21 Akim Demaille <akim@epita.fr>
2892
2893 Version 1.29a.
2894 * Makefile.maint, config/config.guess, config/config.sub,
2895 * config/missing: Update from masters.
2896 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
2897 upon package.m4.
2898 * configure.in (ALL_LINGUAS): Add `tr'.
2899
2900 2001-09-21 Akim Demaille <akim@epita.fr>
2901
2902 * tests/Makefile.am (package.m4): Move to...
2903 ($(srcdir)/$(TESTSUITE)): here.
2904
2905 2001-09-20 Akim Demaille <akim@epita.fr>
2906
2907 * src/complain.c: No longer try to be standalone: use system.h.
2908 Don't assume __STDC__ is defined to 1. Just test if it is defined.
2909 * src/complain.h: Likewise.
2910 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
2911 Remove the unused variable `n'.
2912 From Albert Chin-A-Young.
2913
2914 2001-09-18 Marc Autret <autret_m@epita.fr>
2915
2916 * doc/bison.1: Update.
2917 * doc/bison.texinfo (Bison Options): Update --defines and --graph
2918 descriptions.
2919 (Option Cross Key): Update.
2920 Add --graph.
2921
2922 2001-09-18 Marc Autret <autret_m@epita.fr>
2923
2924 * tests/regression.at: New test (comment in %union).
2925
2926 2001-09-18 Marc Autret <autret_m@epita.fr>
2927
2928 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
2929 do that.
2930 Reported by Keith Browne.
2931
2932 2001-09-18 Marc Autret <autret_m@epita.fr>
2933
2934 * tests/output.at: Add tests for --defines and --graph.
2935
2936 2001-09-18 Marc Autret <autret_m@epita.fr>
2937
2938 * tests/output.at: Removes tests of %{header,src}_extension features.
2939
2940 2001-09-18 Akim Demaille <akim@epita.fr>
2941
2942 * tests/Makefile.am (package.m4): New.
2943 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
2944 (_AT_CHECK_CALC_ERROR): Likewise.
2945 Factor the `, ' part of verbose error messages.
2946
2947 2001-09-18 Marc Autret <autret_m@epita.fr>
2948
2949 * src/getargs.c (longopts): Declare --defines and --graph as options
2950 with optional arguments.
2951 * src/files.h: Add extern declarations.
2952 * src/files.c (spec_graph_file, spec_defines_file): New.
2953 (output_files): Update.
2954 Remove CPP-outed code.
2955
2956 2001-09-18 Marc Autret <autret_m@epita.fr>
2957
2958 Turn off %{source,header}_extension feature.
2959
2960 * src/files.c (compute_exts_from_gf): Update.
2961 (compute_exts_from_src): Update.
2962 (output_files): CPP-out useless code.
2963 * src/files.h: Remove {header,source}_extension extern declarations.
2964 * src/reader.c (parse_dquoted_param): CPP-out.
2965 (parse_header_extension_decl): Remove.
2966 (parse_source_extension_decl): Remove.
2967 (read_declarations): Remove cases tok_{hdrext,srcext}.
2968 * src/lex.c (percent_table): Remove {header,source}_extension entries.
2969 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
2970
2971 2001-09-10 Akim Demaille <akim@epita.fr>
2972
2973 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
2974 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
2975 (AT_CHECK_OUTPUT): this.
2976 Merely check ls' exit status, its output is useless.
2977
2978 2001-09-10 Akim Demaille <akim@epita.fr>
2979
2980 * tests/calc.at: Use m4_match.
2981 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
2982
2983 2001-09-10 Marc Autret <autret_m@epita.fr>,
2984 Akim Demaille <akim@epita.fr>
2985
2986 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
2987 enum color_e.
2988 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
2989 to `normal'.
2990 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
2991 * src/lex.h: Adjust prototype.
2992 (token_t): Add `tok_undef'.
2993 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
2994 (parse_percent_token): Now returns token_t.
2995 Add default statement in switch.
2996 (lex): Separate `c' as an input variable, from the token_t result
2997 part.
2998 (unlexed): Is a token_t.
2999
3000 2001-09-10 Akim Demaille <akim@epita.fr>
3001
3002 * configure.in: Bump to 1.29a.
3003
3004 2001-09-07 Akim Demaille <akim@epita.fr>
3005
3006 Version 1.29.
3007
3008 2001-08-30 Akim Demaille <akim@epita.fr>
3009
3010 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
3011 * m4/atconfig.m4: Remove.
3012 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
3013 * tests/bison: New.
3014 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
3015 m4_if, m4_patsubst, and m4_regexp.
3016 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
3017 `input' file instead of echo.
3018
3019 2001-08-29 Akim Demaille <akim@epita.fr>
3020
3021 Bump to 1.28e.
3022
3023 2001-08-29 Akim Demaille <akim@epita.fr>
3024
3025 Version 1.28d.
3026
3027 2001-08-29 Paul Eggert <eggert@twinsun.com>
3028
3029 * src/bison.simple (yyparse): Don't take the address of an
3030 item before the start of an array, as that doesn't conform to
3031 the C Standard.
3032
3033 2001-08-29 Robert Anisko <anisko_r@epita.fr>
3034
3035 * doc/bison.texinfo (Location Tracking Calc): New node.
3036
3037 2001-08-29 Paul Eggert <eggert@twinsun.com>
3038
3039 * src/output.c (output): Do not define const, as this now
3040 causes more problems than it cures.
3041
3042 2001-08-29 Akim Demaille <akim@epita.fr>
3043
3044 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
3045 the nodes.
3046 Be sure to tag the `detailmenu'.
3047
3048 2001-08-29 Akim Demaille <akim@epita.fr>
3049
3050 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
3051 download in a tmp dir.
3052
3053 2001-08-28 Marc Autret <autret_m@epita.fr>
3054
3055 * config/depcomp: New file.
3056
3057 2001-08-28 Marc Autret <autret_m@epita.fr>
3058
3059 * doc/bison.1 (mandoc): Adjust.
3060 From Juan Manuel Guerrero.
3061
3062 2001-08-28 Marc Autret <autret_m@epita.fr>
3063
3064 * src/print_graph.c (print_state): Fix.
3065
3066 2001-08-27 Marc Autret <autret_m@epita.fr>
3067
3068 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
3069 char * members.
3070 Echo modifications to the functions prototypes.
3071 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
3072
3073 2001-08-27 Marc Autret <autret_m@epita.fr>
3074
3075 * src/vcg.c: Include `xalloc.h'.
3076 (add_colorentry): New.
3077 (add_classname): New.
3078 (add_infoname): New.
3079 * src/vcg.h: Add new prototypes.
3080
3081 2001-08-27 Akim Demaille <akim@epita.fr>
3082
3083 * Makefile.maint: Sync. again with CVS Autoconf.
3084
3085 2001-08-27 Akim Demaille <akim@epita.fr>
3086
3087 * Makefile.maint: Formatting changes.
3088 (po-update, cvs-update, update): New targets.
3089 (AMTAR): Remove.
3090
3091 2001-08-27 Akim Demaille <akim@epita.fr>
3092
3093 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
3094 * Makefile.maint: Sync. with CVS Autoconf.
3095
3096 2001-08-27 Marc Autret <autret_m@epita.fr>
3097
3098 * src/vcg.h (struct infoname_s): New.
3099 (struct colorentry_s): New.
3100 (graph_s): New fields {vertical,horizontal}_order in structure.
3101 Add `infoname' field.
3102 Add `colorentry' field;
3103 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
3104 (G_HORIZONTAL_ORDER): New.
3105 (G_INFONAME): New.
3106 (G_COLORENTRY): New.
3107 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
3108 Add output of `infoname'.
3109 Add output of `colorentry'.
3110
3111 2001-08-27 Marc Autret <autret_m@epita.fr>
3112
3113 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
3114 This one shadowed a global parameter.
3115
3116 2001-08-24 Marc Autret <autret_m@epita.fr>
3117
3118 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
3119 instead of `unsigned'.
3120 (print_state): Do not call obstack_object_size () in obstack_grow ()
3121 to avoid macro variables shadowing.
3122
3123 2001-08-23 Marc Autret <autret_m@epita.fr>
3124
3125 * src/lex.c (percent_table): Typo: s/naem/name/.
3126 Add graph option.
3127 Normalize new options declarations.
3128
3129 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
3130
3131 * tests/suite.at: Exercise %header_extension and %source_extension.
3132
3133 2001-08-16 Marc Autret <autret_m@epita.fr>
3134
3135 * src/reader.c (parse_dquoted_param): New.
3136 (parse_header_extension_decl): Use it.
3137 (parse_source_extension_decl): Likewise.
3138
3139 2001-08-16 Marc Autret <autret_m@epita.fr>
3140
3141 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
3142 (get_xxxx_str): Use assert () instead of complain ().
3143 Remove return invokations in default cases.
3144 (get_decision_str): Modify default behaviour. Remove second argument.
3145 Echo modifications on calls.
3146 (output_graph): Fix.
3147
3148 2001-08-16 Marc Autret <autret_m@epita.fr>
3149
3150 * src/getargs.c (usage): Update with ``-g, --graph''.
3151
3152 2001-08-16 Marc Autret <autret_m@epita.fr>
3153
3154 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
3155 (Option Cross Key): Likewise.
3156 * doc/bison.1: Update.
3157
3158 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
3159
3160 * src/output.c (output_master_parser): Don't finish action_obstack.
3161 (output_parser): Don't care about the muscle action, here.
3162 (prepare): Copy the action_obstack in the action muscle.
3163 (output): Free action_obstack.
3164
3165 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
3166
3167 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
3168 will contain `%union' declaration.
3169 (parse_union_decl): Delete #line directive output.
3170 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
3171 informations about %union.
3172 (parse_union_decl): Copy the union_obstack in the muscle stype.
3173 * src/bison.simple: Add new #line directive.
3174 Add typdef %%stype YYSTYPE.
3175
3176 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
3177
3178 * src/bison.simple: Add new `#line' directive.
3179
3180 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
3181
3182 * src/bison.simple: New `#line' directive.
3183 * src/output.c (output_parser): Support new dynamic muscle input_line.
3184
3185 2001-09-22 Marc Autret <autret_m@epita.fr>
3186
3187 * src/output.c (output_master_parser): New.
3188 (output_parser): Be more re-entrant.
3189
3190 2001-09-21 Marc Autret <autret_m@epita.fr>
3191
3192 * src/reader.c (copy_definition, parse_union_decl): Update and use
3193 `linef' muscle.
3194 (copy_action): Likewise.
3195 Use obstack_1grow ().
3196 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
3197
3198 2001-09-21 Marc Autret <autret_m@epita.fr>
3199
3200 * src/options.c (option_table): Adjust.
3201 * src/lex.c (parse_percent_token): Fix.
3202
3203 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
3204
3205 * src/options.c (symtab.h): Include it, need by lex.h.
3206
3207 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
3208
3209 * src/lex.c (parse_percent_token): Change type of variable `tx', which
3210 is now an option_table_struct*.
3211 (option_strcmp): New function option_strcmp.
3212 (parse_percent_token): Call option_strcmp.
3213 * src/getargs.c (xalloc.h, options.h): Include it.
3214 (getargs): Call create_long_option_table.
3215 (getargs): Free longopts at the end of the function.
3216 (shortopts): Move in options.c.
3217 * src/options.c (create_long_option_table): New function. Convert
3218 information from option_table to option structure.
3219 * src/reader.c (options.h): Include it.
3220
3221 * src/Makefile.am: Adjust.
3222 * src/options.c (option_table): Create from longopts and percent_table.
3223 * src/getargs.c (longopts): Delete.
3224 * src/lex.c (struct percent_table_struct): Delete.
3225 (percent_table): Delete.
3226 (options.h): Include it.
3227 * src/options.c: Create.
3228 * src/options.h: Create.
3229 Declare enum opt_access_e.
3230 Define struct option_table_struct.
3231
3232 2001-09-20 Marc Autret <autret_m@epita.fr>
3233
3234 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
3235 sections of Bison.
3236
3237 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
3238
3239 * src/bison.simple: s/%%filename/%%skeleton.
3240 * src/muscle_tab.c (getargs.h): Include it.
3241 (muscle_init): Insert new muscle skeleton.
3242
3243 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
3244
3245 * src/output.c (output_parser): Delete unused variable actions_dumped.
3246
3247 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
3248
3249 * src/output.c (output): Delete call to reader_output_yylsp.
3250 * src/reader.c (reader): Likewise.
3251 * src/reader.h: Delete declaration of reader_output_yylsp.
3252
3253 2001-09-02 Marc Autret <autret_m@epita.fr>
3254
3255 * src/reader.c: Include muscle_tab.h.
3256 (parse_union_decl): Update.
3257 (parse_macro_decl): Rename parse_muscle_decl.
3258 Update to use renamed functions and variable.
3259 (read_declarations, copy_action, read_additionnal_code, : Updated
3260 with correct variables and functions names.
3261 (packsymbols, reader): Likewise.
3262
3263 * src/reader.h (muscle_obstack): Extern declaration update.
3264
3265 * src/output.c: Include muscle_tab.h
3266 In all functions using macro_insert, change by using muscle_insert ().
3267 (macro_obstack): Rename muscle_obstack.
3268 Echo modifications in the whole file.
3269 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
3270 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
3271 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
3272
3273 * src/muscle_tab.h: Update double inclusion macros.
3274 (macro_entry_s): Rename muscle_entry_s.
3275 Update prototypes.
3276
3277 * src/muscle_tab.c: Include muscle_tab.h.
3278 Rename macro_tabble to muscle_table.
3279 (mhash1, mhash2, mcmp): Use muscle_entry.
3280 (macro_init): Rename muscle_init. Update.
3281 (macro_insert): Rename muscle_insert. Update.
3282 (macro_find): Rename muscle_find. Update.
3283
3284 * src/main.c: Include muscle_tab.h.
3285 (main): Call muscle_init ().
3286 * src/Makefile.am (bison_SOURCES): Echo modifications.
3287
3288 2001-09-02 Marc Autret <autret_m@epita.fr>
3289
3290 Now the files macro_tab.[ch] are named muscle_tab.[ch].
3291
3292 * src/muscle_tab.c, src/muscle_tab.h: Add files.
3293
3294 2001-09-02 Marc Autret <autret_m@epita.fr>
3295
3296 * src/macrotab.c, src/macrotab.h: Remove.
3297
3298 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
3299
3300 * src/reader.c (copy_guard): Use muscle to specify the `#line'
3301 filename.
3302
3303 2001-09-01 Marc Autret <autret_m@epita.fr>
3304
3305 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
3306 to an explicit value to activate the feature. We do it here.
3307
3308 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3309
3310 * src/output.c (prepare): Delete the `filename' muscule insertion.
3311 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
3312 (parse_union_decl): Likewise.
3313 * src/macrotab.c (macro_init): Initialize filename by infile.
3314
3315 2001-08-31 Marc Autret <autret_m@epita.fr>
3316
3317 * src/bison.simple (YYLSP_NEEDED): New definition.
3318 * src/output.c (prepare): Add macro insertion of `locations_flag'
3319
3320 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3321
3322 * src/output.c (prepare): Delete insertion of previous muscles,
3323 and insert the `prefix' muscles.
3324 * src/macrotab.c (macro_init): Likewise.
3325 (macro_init): Initialization prefix directive by `yy'.
3326 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
3327 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
3328 yylval, yydebug, yyerror, yynerrs and yyparse.
3329 New directive `#define' to substitute yydebug, ... with option
3330 name_prefix.
3331
3332 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3333
3334 * src/main.c (main): Standardize.
3335 * src/output.c (output_table_data, output_parser): Likewise.
3336 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
3337
3338 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
3339
3340 * src/reader.c (read_additionnal_code): Rename %%user_code to
3341 %%epilogue.
3342 * src/output.c (output): Rename %%declarations to %%prologue.
3343 * src/bison.simple: Echo modifications.
3344
3345 2001-08-31 Marc Autret <autret_m@epita.fr>
3346
3347 * src/reader.c (readgram): CleanUp.
3348 (output_token_defines): Likewise.
3349 (packsymbols): Likewise.
3350 (reader): Likewise.
3351 * src/output.c (output): CPP-out useless code.
3352
3353 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
3354
3355 * src/reader.c (reader): Delete obsolete call to function
3356 output_trailers and output_headers.
3357 * src/output.h: Remove obsolete functions prototypes of output_headers
3358 and output_trailers.
3359
3360 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
3361
3362 * src/main.c: Include macrotab.h.
3363 * src/macrotab.h (macro_entry_s): Constify fields.
3364 Adjust functions prototypes.
3365 * src/macrotab.c (macro_insert): Constify key and value.
3366 (macro_find): Constify key.
3367 (macro_insert): Include 'xalloc.h'
3368 (macro_insert): Use XMALLOC.
3369 (macro_find): Constify return value.
3370 * src/output.c (output_table_data): Rename table to table_data.
3371 (output_parser): Constify macro_key, macro_value.
3372
3373 2001-08-30 Marc Autret <autret_m@epita.fr>
3374
3375 * src/reader.c (parse_skel_decl): New.
3376 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
3377 * src/lex.h (token_t): New token `tok_skel'.
3378 * src/lex.c (percent_table): Add skeleton option entry.
3379 Standardize.
3380
3381 2001-08-29 Marc Autret <autret_m@epita.fr>
3382
3383 * src/bison.simple: Add %%user_code directive at the end.
3384 * src/reader.c (read_additionnal_code): New.
3385 (reader): Use it.
3386 * src/output.c (output_program): Remove.
3387 (output): Update.
3388
3389 2001-08-28 Marc Autret <autret_m@epita.fr>
3390
3391 * src/output.c (output_actions): Clean up.
3392 (output_gram): CPP-out useless code.
3393 * src/reader.c (reader): Clean up, CPP-out useless code.
3394
3395 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
3396
3397 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
3398 directive.
3399 * src/bison.simple: Add `%%definitions'.
3400
3401 2001-08-28 Marc Autret <autret_m@epita.fr>
3402
3403 * config/depcomp: New file.
3404
3405 2001-08-27 Paul Eggert <eggert@twinsun.com>
3406
3407 * src/bison.simple (yyparse): Don't take the address of an
3408 item before the start of an array, as that doesn't conform to
3409 the C Standard.
3410
3411 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3412
3413 * src/output.c (output): Remove the initialization of the macro
3414 obstack. It was done too late here.
3415
3416 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
3417 completely wrong.
3418 (reader): Initialize the macro obstack here, since we need it to grow
3419 '%define' directives.
3420
3421 * src/reader.h: Declare the macro obstack as extern.
3422
3423 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
3424
3425 * src/output.c (output_parser): Fix. Store single '%' characters in
3426 the output obstack instead of throwing them away.
3427
3428 2001-08-27 Akim Demaille <akim@epita.fr>
3429
3430 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
3431
3432 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3433
3434 * lib/Makefile.am: Adjust.
3435
3436 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3437
3438 * src/bison.simple: Update and add '%%' directives.
3439
3440 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3441
3442 * src/reader.c (reader): Remove calls to 'output_headers' and
3443 'output_trailers'. Remove some C output.
3444 (readgram): Disable a piece of code that was writing a default
3445 definition for 'YYSTYPE'.
3446 (reader_output_yylsp): Remove.
3447 (packsymbols): Output token defintions to a macro.
3448 (copy_definition): Disable C output.
3449
3450 * src/reader.c (parse_macro_decl): New function used to parse macro
3451 declarations.
3452 (copy_string2): Put the body of copy_string into this new function.
3453 Add a parameter to let the caller choose whether he wants to copy the
3454 string delimiters or not.
3455 (copy_string): Be a simple call to copy_string2 with the last argument
3456 bound to true.
3457 (read_declarations): Add case for macro definition.
3458 (copy_identifier): New.
3459 (parse_macro_decl): Read macro identifiers using copy_identifier
3460 rather than lex.
3461
3462 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3463
3464 * src/output.c (prepare): Add prefixed names.
3465 (output_parser): Output semantic actions.
3466 (output_parser): Fix bug on '%%line' directives.
3467
3468 * src/output.c (output_headers): Remove. The C code printed by this
3469 function should now be in the skeletons.
3470 (output_trailers): Remove.
3471 (output): Disable call to 'reader_output_yylsp'.
3472 (output_rule_data): Do not output tables to the table obstack.
3473
3474 * src/output.c: Remove some C dedicated output.
3475 Improve the use of macro and output obstacks.
3476 (output_defines): Remove.
3477
3478 * src/output.c (output_token_translations): Associate 'translate'
3479 table with a macro. No output to the table obstack.
3480 (output_gram): Same for 'rhs' and 'prhs'.
3481 (output_stos): Same for 'stos'.
3482 (output_rule_data): Same for 'r1' and 'r2'.
3483 (token_actions): Same for 'defact'.
3484 (goto_actions): Same for 'defgoto'.
3485 (output_base): Same for 'pact' and 'pgoto'.
3486 (output_table): Same for 'table'.
3487 (output_check): Same for 'check'.
3488
3489 * src/output.c (output_table_data): New function.
3490 (output_short_table): Remove.
3491 (output_short_or_char_table): Remove.
3492
3493 * src/output.c (output_parser): Replace most of the skeleton copy code
3494 with something new. Skeletons are now processed character by character
3495 rather than line by line, and Bison looks for '%%' macros. This is the
3496 first step in making Bison's output process (a lot) more flexible.
3497 (output_parser): Use the macro table.
3498
3499 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3500
3501 * src/main.c (main): Initialize the macro table.
3502
3503 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3504
3505 * src/lex.c (percent_table): Add tok_define.
3506 * src/lex.h: Add tok_define.
3507
3508 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3509
3510 * src/macrotab.c: New file.
3511 * src/macrotab.h: New file.
3512 * src/Makefile.am: Update.
3513
3514 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
3515
3516 * lib/hash.c: New file.
3517 * lib/hash.h: New file.
3518 * lib/Makefile.am: Update.
3519
3520 2001-08-15 Akim Demaille <akim@epita.fr>
3521
3522 Version 1.28c.
3523
3524 2001-08-15 Marc Autret <autret_m@epita.fr>
3525
3526 * src/reader.c (readgram): Indent output macro YYSTYPE.
3527 (packsymbols): Likewise.
3528 (output_token_defines): Likewise.
3529 * src/files.c: Standardize.
3530 (compute_header_macro): New.
3531 (defines_obstack_save): New. Use compute_header_macro.
3532 (output_files): Update. Use defines_obstack_save.
3533
3534 2001-08-15 Akim Demaille <akim@epita.fr>
3535
3536 * doc/bison.texinfo (Table of Symbols): Document
3537 YYSTACK_USE_ALLOCA.
3538
3539 2001-08-15 Akim Demaille <akim@epita.fr>
3540
3541 * missing: Update from CVS Automake.
3542 * config/config.guess, config/config.sub, config/texinfo.tex:
3543 Update from gnu.org.
3544
3545 2001-08-15 Akim Demaille <akim@epita.fr>
3546
3547 * Makefile.maint: Sync with CVS Autoconf.
3548
3549 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
3550
3551 * doc/bison.texinfo: Include GNU Free Documentation License from
3552 `fdl.texi'.
3553 * doc/fdl.texi: Add to package.
3554
3555 2001-08-14 Marc Autret <autret_m@epita.fr>
3556
3557 Turn on %{source,header}_extension features.
3558
3559 * src/lex.c (percent_table): Un-CPP out header_extension and
3560 source_extension.
3561 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
3562 (compute_exts_from_src): Remove conditions. It restores priorities
3563 between options.
3564
3565 2001-08-14 Marc Autret <autret_m@epita.fr>
3566
3567 * src/files.c (compute_base_names): Add extensions computing when
3568 `--file-prefix' used.
3569 Standardize function calls.
3570
3571 2001-08-13 Marc Autret <autret_m@epita.fr>
3572
3573 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
3574 defining it (defined but null disables alloca).
3575
3576 2001-08-13 Marc Autret <autret_m@epita.fr>
3577
3578 * src/bison.simple (_yy_memcpy): CPP reformat.
3579
3580 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
3581
3582 * tests/atconfig.in (CPPFLAGS): Fix.
3583
3584 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
3585
3586 * doc/bison.texinfo: Include GNU General Public License from
3587 `gpl.texi'.
3588 * doc/gpl.texi: Add to package.
3589
3590 2001-08-10 Marc Autret <autret_m@epita.fr>
3591
3592 * src/print_graph.h: Fix.
3593 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
3594
3595 2001-08-10 Akim Demaille <akim@epita.fr>
3596
3597 * src/system.h: Provide default declarations for stpcpy, strndup,
3598 and strnlen.
3599
3600 2001-08-10 Robert Anisko <anisko_r@epita.fr>
3601
3602 * doc/bison.texinfo (Locations): Update @$ stuff.
3603
3604 2001-08-09 Robert Anisko <anisko_r@epita.fr>
3605
3606 * src/bison.simple (YYLLOC_DEFAULT): Update.
3607 (yyparse): Adjust.
3608
3609 2001-08-08 Marc Autret <autret_m@epita.fr>
3610
3611 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
3612 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
3613 Reported by Fabrice Bauzac.
3614
3615 2001-08-08 Marc Autret <autret_m@epita.fr>
3616
3617 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
3618 * src/vcg.c (output_node): Fix.
3619 * src/vcg.h: Cleanup.
3620 * src/print_graph.c: Add comments.
3621 (node_output_size): New global variable. Simplify the formatting of
3622 the VCG graph output.
3623 (print_actions): Unused code is now used. It notifies the final state
3624 and no action states in the VCG graph. It also give the reduce actions.
3625 The `shift and goto' edges are red and the `go to state' edges are
3626 blue.
3627 Get the current node name and node_obstack by argument.
3628 (node_obstack): New variable.
3629 (print_state): Manage node_obstack.
3630 (print_core): Use node_obstack given by argument.
3631 A node is not only computed here but in print_actions also.
3632 (print_graph): CPP out useless code instead of commenting it.
3633
3634 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
3635
3636 * tests/atconfig.in (CPPFLAGS): Fix.
3637
3638 2001-08-07 Akim Demaille <akim@epita.fr>
3639
3640 * src/print_graph.c (quote): New.
3641 (print_core): Use it.
3642
3643 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3644
3645 * src/vcg.c (complain.h): Include it.
3646 Unepitaize `return' invocations.
3647 [NDEBUG] (main): Remove.
3648 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
3649 * src/files.c (open_files): Initialize graph_obstack.
3650 * src/print_graph.c (print_actions): CPP out useless code.
3651 (print_core): Don't output the last `\n' in labels.
3652 Use `quote'.
3653 * src/files.c (output_files): Output the VCG file.
3654 * src/main.c (main): Invoke print_graph ();
3655
3656 2001-08-06 Marc Autret <autret_m@epita.fr>
3657
3658 Automaton VCG graph output.
3659 Using option ``-g'' or long option ``--graph'', you can generate
3660 a gram_filename.vcg file containing a VCG description of the LALR (1)
3661 automaton of your grammar.
3662
3663 * src/main.c: Call to print_graph() function.
3664 * src/getargs.h: Update.
3665 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
3666 (graph_flag): New flag.
3667 (longopts): Update.
3668 (getargs): Add case `g'.
3669 * src/files.c (graph_obstack): New obstack struct.
3670 (open_files): Initialize new obstack.
3671 (output_files): Saves graph_obstack if required.
3672 * src/files.h (graph_obstack): New extern declaration.
3673 * src/Makefile.am: Add new source files.
3674
3675 2001-08-06 Marc Autret <autret_m@epita.fr>
3676
3677 * src/print_graph.c, src/print_graph.h (graph): New.
3678 * src/vcg.h: New file.
3679 * src/vcg.c: New file, VCG graph handling.
3680
3681 2001-08-06 Marc Autret <autret_m@epita.fr>
3682
3683 Add of %source_extension and %header_extension which specify
3684 the source or/and the header output file extension.
3685
3686 * src/files.c (compute_base_names): Remove initialisation of
3687 src_extension and header_extension.
3688 (compute_exts_from_gf): Update.
3689 (compute_exts_from_src): Update.
3690 (output_files): Update.
3691 * src/reader.c (parse_header_extension_decl): New.
3692 (parse_source_extension_decl): New.
3693 (read_declarations): New case statements for the new tokens.
3694 * src/lex.c (percent_table): Add entries for %source_extension
3695 and %header_extension.
3696 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
3697
3698 2001-08-06 Marc Autret <autret_m@epita.fr>
3699
3700 * configure.in: Bump to 1.28c.
3701 * doc/bison.texinfo: Texinfo thingies.
3702
3703 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
3704
3705 * tests/atconfig.in (CPPFLAGS): Add.
3706 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
3707
3708 2001-08-03 Akim Demaille <akim@epita.fr>
3709
3710 Version 1.28b.
3711
3712 2001-08-03 Akim Demaille <akim@epita.fr>
3713
3714 * tests/Makefile.am (check-local): Ship testsuite.
3715 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
3716 Include `string.h'.
3717
3718 2001-08-03 Akim Demaille <akim@epita.fr>
3719
3720 * configure.in: Try using -Wformat when compiling.
3721
3722 2001-08-03 Akim Demaille <akim@epita.fr>
3723
3724 * configure.in: Bump to 1.28b.
3725
3726 2001-08-03 Akim Demaille <akim@epita.fr>
3727
3728 * src/complain.c: Adjust strerror_r portability issues.
3729
3730 2001-08-03 Akim Demaille <akim@epita.fr>
3731
3732 Version 1.28a.
3733
3734 2001-08-03 Akim Demaille <akim@epita.fr>
3735
3736 * src/getargs.c, src/getarg.h (skeleton)): Constify.
3737 * src/lex.c (literalchar): Avoid name clashes on `buf'.
3738 * src/getargs.c: Include complain.h.
3739 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
3740 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
3741
3742 2001-08-03 Akim Demaille <akim@epita.fr>
3743
3744 * src/reader.c (readgram): Display hidden chars in error messages.
3745
3746 2001-08-03 Akim Demaille <akim@epita.fr>
3747
3748 Update to gettext 0.10.39.
3749
3750 2001-08-03 Akim Demaille <akim@epita.fr>
3751
3752 * lib/strspn.c: New.
3753
3754 2001-08-01 Marc Autret <autret_m@epita.fr>
3755
3756 * doc/bison.texinfo: Update.
3757 * doc/bison.1 (mandoc): Update.
3758 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
3759 * src/files.c: Support output files extensions computing.
3760 (src_extension): New static variable.
3761 (header_extension): New static variable.
3762 (tr): New function.
3763 (get_extension_index): New function, gets the index of an extension
3764 filename in a string.
3765 (compute_exts_from_gf): New function, computes extensions from the
3766 grammar file extension.
3767 (compute_exts_from_src): New functions, computes extensions from the
3768 C source file extension, file given by ``-o'' option.
3769 (compute_base_names): Update.
3770 (output_files): Update.
3771
3772 2001-08-01 Robert Anisko <anisko_r@epita.fr>
3773
3774 * doc/bison.texi: Document @$.
3775 (Locations): New section.
3776
3777 2001-07-18 Akim Demaille <akim@epita.fr>
3778
3779 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
3780 * config/prev-version.txt, config/move-if-change: New.
3781 * Makefile.am: Adjust.
3782
3783 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
3784
3785 * src/bison.simple (yyparse): Suppress warning `comparaison
3786 between signed and unsigned'.
3787
3788 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
3789
3790 * src/getargs.h (raw_flag): Remove.
3791 * src/getargs.c: Die on `-r'/`--raw'.
3792 * src/lex.c (parse_percent_token): Die on `%raw'.
3793 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
3794 * tests/calc.at: Suppress test with option `--raw'.
3795
3796 2001-07-14 Akim Demaille <akim@epita.fr>
3797
3798 * config/: New.
3799 * configure.in: Require Autoconf 2.50.
3800 Update to gettext 0.10.38.
3801
3802 2001-03-16 Akim Demaille <akim@epita.fr>
3803
3804 * doc/bison.texinfo: ANSIfy the examples.
3805
3806 2001-03-16 Akim Demaille <akim@epita.fr>
3807
3808 * getargs.c (skeleton): New variable.
3809 (longopts): --skeleton is a new option.
3810 (shortopts, getargs): -S is a new option.
3811 * getargs.h: Declare skeleton.
3812 * output.c (output_parser): Use it.
3813
3814 2001-03-16 Akim Demaille <akim@epita.fr>
3815
3816 * m4/strerror_r.m4: New.
3817 * m4/error.m4: Run AC_FUNC_STRERROR_R.
3818 * lib/error.h, lib/error.c: Update.
3819
3820 2001-03-16 Akim Demaille <akim@epita.fr>
3821
3822 * src/getargs.c (longopts): Clean up.
3823
3824 2001-02-21 Akim Demaille <akim@epita.fr>
3825
3826 * src/reader.c (gensym): `gensym_count' is your own.
3827 Use a static buf to create the symbol name, as token_buffer is no
3828 longer a buffer.
3829
3830 2001-02-08 Akim Demaille <akim@epita.fr>
3831
3832 * src/conflicts.c (conflict_report): Be sure not to append to res
3833 between two calls, which could happen if both first sprintf were
3834 skipped, but not the first cp += strlen.
3835
3836 2001-02-08 Akim Demaille <akim@epita.fr>
3837
3838 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
3839 New, from fileutils 4.0.37.
3840 * configure.in: Require Autoconf 2.49c. I took some time before
3841 making this decision. This is the only way out for portability
3842 issues in Bison, it would mean way too much duplicate effort to
3843 import in Bison features implemented in 2.49c since 2.13.
3844 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
3845
3846 2001-02-02 Akim Demaille <akim@epita.fr>
3847
3848 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
3849 * lib/xalloc.h, lib/xmalloc.c: Update.
3850
3851 2001-01-19 Akim Demaille <akim@epita.fr>
3852
3853 Get rid of the ad hoc handling of token_buffer in the scanner: use
3854 the obstacks.
3855
3856 * src/lex.c (token_obstack): New.
3857 (init_lex): Initialize it. No longer call...
3858 (grow_token_buffer): this. Remove it.
3859 Adjust all the places which used it to use the obstack.
3860
3861 2001-01-19 Akim Demaille <akim@epita.fr>
3862
3863 * src/lex.h: Rename all the tokens:
3864 s/\bENDFILE\b/tok_eof/g;
3865 s/\bIDENTIFIER\b/tok_identifier/g;
3866 etc.
3867 Let them be enums, not #define, to ease debugging.
3868 Adjust all the code.
3869
3870 2001-01-18 Akim Demaille <akim@epita.fr>
3871
3872 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
3873 * src/lex.c (maxtoken, grow_token_buffer): Static.
3874
3875 2001-01-18 Akim Demaille <akim@epita.fr>
3876
3877 Since we now use obstacks, more % directives can be enabled.
3878
3879 * src/lex.c (percent_table): Also accept `%yacc',
3880 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
3881 `%debug'.
3882 Handle the actions for `%semantic_parser' and `%pure_parser' here,
3883 instead of returning a token.
3884 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
3885 * src/reader.c (read_declarations): Adjust.
3886 * src/files.c (open_files): Don't call `compute_base_names', don't
3887 compute `attrsfile' since they depend upon data which might be
3888 *in* the input file now.
3889 (output_files): Do it here.
3890 * src/output.c (output_headers): Document the fact that this patch
3891 introduces a guaranteed SEGV for semantic parsers.
3892 * doc/bison.texinfo: Document them.
3893 * tests/suite.at: Exercise these %options.
3894
3895 2000-12-20 Akim Demaille <akim@epita.fr>
3896
3897 Also handle the output file (--verbose) with obstacks.
3898
3899 * files.c (foutput): Remove.
3900 (output_obstack): New.
3901 Adjust all dependencies.
3902 * src/conflicts.c: Return a string.
3903 * src/system.h (obstack_grow_string): Rename as...
3904 (obstack_sgrow): this. Be ready to work with non literals.
3905 (obstack_fgrow4): New.
3906
3907 2000-12-20 Akim Demaille <akim@epita.fr>
3908
3909 * src/files.c (open_files): Fix the computation of short_base_name
3910 in the case of `-o foo.tab.c'.
3911
3912 2000-12-20 Akim Demaille <akim@epita.fr>
3913
3914 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
3915 (copy_dollar): Now that everything uses obstacks, get rid of the
3916 FILE * parameters.
3917
3918 2000-12-20 Akim Demaille <akim@epita.fr>
3919
3920 * src/files.c (open_files): Actually the `.output' file is based
3921 on the short_base_name, not base_name.
3922 * tests/suite.at (Checking output file names): Adjust.
3923
3924 2000-12-20 Akim Demaille <akim@epita.fr>
3925
3926 * src/bison.s1: Remove, we now use directly...
3927 * src/bison.simple: this.
3928 * src/Makefile.am: Use pkgdata instead of data.
3929
3930 2000-12-20 Akim Demaille <akim@epita.fr>
3931
3932 * src/files.c (guard_obstack): New.
3933 (open_files): Initialize it.
3934 (output_files): Dump it...
3935 * src/files.h: Export it.
3936 * src/reader.c (copy_guard): Use it.
3937
3938 2000-12-19 Akim Demaille <akim@epita.fr>
3939
3940 * src/files.c (outfile, defsfile, actfile): Removed as global
3941 vars.
3942 (open_files): Don't compute them.
3943 (output_files): Adjust.
3944 (base_name, short_base_name): Be global.
3945 Adjust dependencies.
3946
3947 2000-12-19 Akim Demaille <akim@epita.fr>
3948
3949 * src/files.c (strsuffix): New.
3950 (stringappend): Be just like strcat but allocate.
3951 (base_names): Eve out from open_files.
3952 Try to simplify the rather hairy computation of base_name and
3953 short_base_name.
3954 (open_files): Use it.
3955 * tests/suite.at (Checking output file names): New test.
3956
3957 2000-12-19 Akim Demaille <akim@epita.fr>
3958
3959 * src/system.h (obstack_grow_literal_string): Rename as...
3960 (obstack_grow_string): this.
3961 * src/output.c (output_parser): Recognize `%% actions' instead of
3962 `$'.
3963 * src/bison.s1: s/$/%% actions/.
3964 * src/bison.hairy: Likewise.
3965
3966 2000-12-19 Akim Demaille <akim@epita.fr>
3967
3968 * src/output.c (output_parser): Compute the `#line' lines when
3969 there are.
3970 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
3971 Suggested by Hans Aberg.
3972
3973 2000-12-19 Akim Demaille <akim@epita.fr>
3974
3975 Let the handling of the skeleton files be local to the procedures
3976 that use it.
3977
3978 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
3979 longer static.
3980 (fparser, open_extra_files): Remove.
3981 (open_files, output_files): Don't take care of fparser.
3982 * src/files.h: Adjust.
3983 * src/output.c (output_parser): Open and close the file to the
3984 skeleton.
3985 * src/reader.c (read_declarations): When %semantic_parser, open
3986 fguard.
3987
3988 2000-12-19 Akim Demaille <akim@epita.fr>
3989
3990 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
3991 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
3992
3993 2000-12-19 Akim Demaille <akim@epita.fr>
3994
3995 * src/files.c (open_files): Yipee! We no longer need all the code
3996 looking for `/tmp' since we have no tmp file.
3997
3998 2000-12-19 Akim Demaille <akim@epita.fr>
3999
4000 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
4001 New macros.
4002 * src/files.c (open_files): Less dependency on MSDOS etc.
4003
4004 2000-12-14 Akim Demaille <akim@epita.fr>
4005
4006 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
4007 Provide a default definition.
4008 Use it when executing the default @ action.
4009 * src/reader.c (reader_output_yylsp): No longer include
4010 `timestamp' and `text' in the default YYLTYPE.
4011
4012 2000-12-12 Akim Demaille <akim@epita.fr>
4013
4014 * src/reader.c (copy_definition, parse_union_decl, copy_action)
4015 (copy_guard): Quote the file names.
4016 Reported by Laurent Mascherpa.
4017
4018 2000-12-12 Akim Demaille <akim@epita.fr>
4019
4020 * src/output.c (output_headers, output_program, output): Be sure
4021 to escape special characters when outputting filenames.
4022 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
4023 (output_headers): Don't depend on them, Use ACTSTR.
4024
4025 2000-11-17 Akim Demaille <akim@epita.fr>
4026
4027 * lib/obstack.h: Formatting changes.
4028 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
4029 prevents type checking.
4030 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
4031 cast the value to (void *): assigning a `foo *' to a `void *'
4032 variable is valid.
4033 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
4034 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
4035 append characters.
4036
4037 2000-11-17 Akim Demaille <akim@epita.fr>
4038
4039 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
4040 as...
4041 (suite.m4, regression.m4, calc.m4): these.
4042 * tests/atgeneral.m4: Update from CVS Autoconf.
4043
4044 2000-11-17 Akim Demaille <akim@epita.fr>
4045
4046 * tests/regression.m4 (%union and --defines): New test,
4047 demonstrating a current bug in the obstack implementation.
4048
4049 2000-11-17 Akim Demaille <akim@epita.fr>
4050
4051 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
4052 macros.
4053 Use them to declare the variables which are global or local to
4054 `yyparse'.
4055
4056 2000-11-17 Akim Demaille <akim@epita.fr>
4057
4058 * acconfig.h: Remove, no longer used.
4059
4060 2000-11-07 Akim Demaille <akim@epita.fr>
4061
4062 * src: s/Copyright (C)/Copyright/g.
4063
4064 2000-11-07 Akim Demaille <akim@epita.fr>
4065
4066 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
4067 defining.
4068 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
4069
4070 2000-11-07 Akim Demaille <akim@epita.fr>
4071
4072 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
4073 Merge in a single CPP if/else.
4074
4075 2000-11-07 Akim Demaille <akim@epita.fr>
4076
4077 * src/output.c (output): Remove useless variables.
4078 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
4079 argument `data' for consistency with the prototypes.
4080 Qualify it `const'.
4081 (obstack_copy, obstack_copy0): Rename the second argument as
4082 `address' for consistency. Qualify it `const'.
4083 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
4084 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
4085 `const' their input argument (`data' or `address').
4086 Adjust the corresponding macros to include `const' in casts.
4087
4088 2000-11-03 Akim Demaille <akim@epita.fr>
4089
4090 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
4091 s/PFILE1/BISON_HAIRY/.
4092 Adjust dependencies.
4093
4094 2000-11-03 Akim Demaille <akim@epita.fr>
4095
4096 For some reason, this was not applied.
4097
4098 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
4099 `unlink': it's no longer used.
4100
4101 2000-11-03 Akim Demaille <akim@epita.fr>
4102
4103 * src/files.c (skeleton_find): New function, eved out of...
4104 (open_files, open_extra_files): here.
4105
4106 2000-11-03 Akim Demaille <akim@epita.fr>
4107
4108 Don't use `atexit'.
4109
4110 * src/files.c (obstack_save): New function.
4111 (done): Rename as...
4112 (output_files): this.
4113 Use `obstack_save'.
4114 * src/main.c (main): Don't use `atexit' to register `done', since
4115 it no longer has to remove tmp files, just call `output_files'
4116 when there are no errors.
4117
4118 2000-11-02 Akim Demaille <akim@epita.fr>
4119
4120 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
4121 `unlink': it's no longer used.
4122 * src/files.h: Formatting changes.
4123
4124 2000-11-02 Akim Demaille <akim@epita.fr>
4125
4126 Remove the last uses of mktemp and unlink/delete.
4127
4128 * src/files.c (fdefines, ftable): Removed.
4129 (defines_ostack, table_obstack): New.
4130 Adjust dependencies of the former into uses of the latter.
4131 * src/output.c (output_short_or_char_table, output_short_table):
4132 Convert to using obstacks.
4133 * src/reader.c (copy_comment2): Accept one FILE * and two
4134 obstacks.
4135 (output_token_defines, reader_output_yylsp): Use obstacks.
4136 * src/system.h (obstack_fgrow3): New.
4137
4138 2000-11-01 Akim Demaille <akim@epita.fr>
4139
4140 Change each use of `fattrs' into a use of `attrs_obstack'.
4141
4142 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
4143 * src/files.c (fattrs): Remove.
4144 (attrs_obstack): New.
4145 Adjust all dependencies.
4146 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
4147
4148 2000-11-01 Akim Demaille <akim@epita.fr>
4149
4150 Introduce obstacks.
4151 Change each use of `faction' into a use of `action_obstack'.
4152
4153 * lib/obstack.h, lib/obstack.c: New files.
4154 * src/files.c (faction): Remove.
4155 (action_obstack): New.
4156 Adjust all dependencies.
4157
4158 2000-10-20 Akim Demaille <akim@epita.fr>
4159
4160 * lib/quote.h (PARAMS): New macro. Use it.
4161
4162 2000-10-16 Akim Demaille <akim@epita.fr>
4163
4164 * src/output.c (output_short_or_char_table): New function.
4165 (output_short_table, output_token_translations): Use it.
4166 (goto_actions): Use output_short_table.
4167
4168 2000-10-16 Akim Demaille <akim@epita.fr>
4169
4170 * src/symtab.c (bucket_new): New function.
4171 (getsym): Use it.
4172
4173 * src/output.c (output_short_table): New argument to display the
4174 comment associated with the table.
4175 Adjust dependencies.
4176 (output_gram): Use it.
4177 (output_rule_data): Nicer output layout for YYTNAME.
4178
4179 2000-10-16 Akim Demaille <akim@epita.fr>
4180
4181 * src/lex.c (read_typename): New function.
4182 (lex): Use it.
4183 * src/reader.c (copy_dollar): Likewise.
4184
4185 2000-10-16 Akim Demaille <akim@epita.fr>
4186
4187 * src/reader.c (copy_comment2): Expect the input stream to be on
4188 the `/' which is suspected to open a comment, instead of being
4189 called after `//' or `/*' was read.
4190 (copy_comment, copy_definition, parse_union_decl, copy_action)
4191 (copy_guard): Adjust.
4192
4193 2000-10-16 Akim Demaille <akim@epita.fr>
4194
4195 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
4196 `read_signed_integer'.
4197
4198 2000-10-16 Akim Demaille <akim@epita.fr>
4199
4200 * src/reader.c (copy_dollar): New function.
4201 (copy_guard, copy_action): Use it.
4202
4203 2000-10-16 Akim Demaille <akim@epita.fr>
4204
4205 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
4206 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
4207 New files, from Fileutils 4.0.27.
4208 * src/main.c (printable_version): Remove.
4209 * src/lex.c, src/reader.c: Use `quote'.
4210
4211 2000-10-04 Akim Demaille <akim@epita.fr>
4212
4213 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
4214
4215 2000-10-04 Akim Demaille <akim@epita.fr>
4216
4217 * doc/bison.texinfo: Various typos spotted by Neil Booth.
4218
4219 2000-10-04 Akim Demaille <akim@epita.fr>
4220
4221 When a literal string is used to define two different tokens,
4222 `bison -v' segfaults.
4223 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
4224
4225 * tests/regression.m4: New file.
4226 Include the core of the sample provided by Piotr Gackiewicz.
4227 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
4228 properly.
4229
4230 2000-10-04 Akim Demaille <akim@epita.fr>
4231
4232 * src/reader.c (parse_expect_decl): Keep `count' within the size
4233 of `buffer'.
4234 From Neil Booth.
4235
4236 2000-10-02 Paul Eggert <eggert@twinsun.com>
4237
4238 * bison.s1 (yyparse): Assign the default value
4239 unconditionally, to avoid a GCC warning and make the parser a
4240 tad smaller.
4241
4242 2000-10-02 Akim Demaille <akim@epita.fr>
4243
4244 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
4245 options.
4246
4247 2000-10-02 Akim Demaille <akim@epita.fr>
4248
4249 * src/derives.c, src/print.c, src/reduce.c: To ease the
4250 translation, move some `\n' out of the translated strings.
4251
4252 2000-10-02 Akim Demaille <akim@epita.fr>
4253
4254 The location tracking mechanism is precious for parse error
4255 messages. Nevertheless, it is enabled only when `@n' is used in
4256 the grammar, which is a different issue (you can use it in error
4257 message, but not in the grammar per se). Therefore, there should
4258 be another means to enable it.
4259
4260 * src/getargs.c (getargs): Support `--locations'.
4261 (usage): Report it.
4262 * src/getargs.h (locationsflag): Export it.
4263 * src/lex.c (percent_table): Support `%locations'.
4264 * src/reader.c (yylsp_needed): Remove this variable, now replaced
4265 with `locationsflag'.
4266 * doc/bison.texinfo: Document `--locations' and `%locations'.
4267 Sort the options.
4268 * tests/calc.m4: Test it.
4269
4270 For regularity of the names, replace each
4271 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
4272 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
4273 In addition replace each `flag' with `_flag'.
4274
4275 2000-10-02 Akim Demaille <akim@epita.fr>
4276
4277 Also test parse error messages, including with YYERROR_VERBOSE.
4278
4279 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
4280 associative).
4281 Use it to check the computations.
4282 Use it to check `nonassoc' is honored.
4283 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
4284 `--yyerror-verbose'.
4285 (_AT_CHECK_CALC): Adjust to this option.
4286 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
4287
4288 2000-10-02 Akim Demaille <akim@epita.fr>
4289
4290 Test also `--verbose', `--defines' and `--name-prefix'. Testing
4291 the latter demonstrates a flaw in the handling of non debugging
4292 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
4293 was used in order to simplify:
4294
4295 #if YYDEBUG
4296 if (yydebug)
4297 {
4298 ...
4299 }
4300 #endif
4301
4302 into
4303
4304 if (yydebug)
4305 {
4306 ...
4307 }
4308
4309 unfortunately this leads to a CPP conflict when
4310 `--name-prefix=foo' is used since it produces `#define yydebug
4311 foodebug'.
4312
4313 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
4314 (YYDPRINTF): New macro.
4315 Spread its use.
4316 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
4317 the bison options.
4318 Also test `--verbose', `--defines' and `--name-prefix'.
4319
4320 2000-10-02 Akim Demaille <akim@epita.fr>
4321
4322 Improve the readability of the produced parsers.
4323
4324 * src/bison.s1: Formatting changes.
4325 Improve the comment related to the `$' mark.
4326 (yydefault): Don't fall through to `yyresume': `goto' there.
4327 * src/output.c (output_parser): When the `$' is met, skip the end
4328 of its line.
4329 New variable, `number_of_dollar_signs', to check there's exactly
4330 one `$' in the parser skeleton.
4331
4332 2000-10-02 Akim Demaille <akim@epita.fr>
4333
4334 * lib/xstrdup.c: New file, from the fileutils.
4335 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
4336 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
4337 instead of strlen + xmalloc + strcpy.
4338 * src/symtab.c (copys): Remove, use xstrdup instead.
4339
4340 2000-10-02 Akim Demaille <akim@epita.fr>
4341
4342 * src/gram.h (associativity): New enum type which replaces the
4343 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
4344 `right_assoc', `left_assoc' and `non_assoc'.
4345 Adjust all dependencies.
4346 * src/reader.c: Formatting changes.
4347 (LTYPESTR): Don't define it, use it as a literal in
4348 `reader_output_yylsp'.
4349 * src/symtab.h (symbol_class): New enum type which replaces the
4350 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
4351 `sunknown', `stoken and `snterm'.
4352
4353 2000-10-02 Akim Demaille <akim@epita.fr>
4354
4355 * src/getargs.c (fixed_outfiles): Rename as...
4356 (yaccflag): for consistency and accuracy.
4357 Adjust dependencies.
4358
4359 2000-10-02 Akim Demaille <akim@epita.fr>
4360
4361 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
4362 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
4363 difficult and introduced a lot of core dump. It turns out that
4364 Bison used an implementation of `xmalloc' based on `calloc', and
4365 at various places it does depend upon the initialization to 0. I
4366 have not tried to isolate the pertinent places, and all the former
4367 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
4368 someone should address this issue.
4369
4370 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
4371 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
4372 files.
4373 Adjust dependencies.
4374 * src/warshall.h: New file.
4375 Propagate.
4376
4377 2000-10-02 Akim Demaille <akim@epita.fr>
4378
4379 Various anti-`extern in *.c' changes.
4380
4381 * src/system.h: Include `assert.h'.
4382
4383 2000-10-02 Akim Demaille <akim@epita.fr>
4384
4385 * src/state.h (nstates, final_state, first_state, first_shift)
4386 (first_reduction): Move their exportation from here...
4387 * src/LR0.h: to here.
4388 Adjust dependencies.
4389 * src/getargs.c (statisticsflag): New variable.
4390 Add support for `--statistics'.
4391 Adjust dependencies.
4392
4393 Remove a lot of now useless `extern' statements in most files.
4394
4395 2000-10-02 Akim Demaille <akim@epita.fr>
4396
4397 * src/LR0.h: New file.
4398 Propagate its use.
4399
4400 2000-10-02 Akim Demaille <akim@epita.fr>
4401
4402 * src/print.h: New file.
4403 Propagate its use.
4404 * src/print.c: Formatting and ordering changes.
4405 (verbose, terse): Replace with...
4406 (print_results): this new function.
4407 Adjust dependencies.
4408
4409 2000-10-02 Akim Demaille <akim@epita.fr>
4410
4411 * src/conflicts.c (conflict_report): New function.
4412 (conflict_log, verbose_conflict_log): Replace with...
4413 (print_conflicts): this function.
4414 Adjust dependencies.
4415 * src/conflicts.h: New file.
4416 Propagate its inclusion.
4417
4418 2000-10-02 Akim Demaille <akim@epita.fr>
4419
4420 * src/nullable.h: New file.
4421 Propagate its inclusion.
4422 * src/nullable.c: Formatting changes.
4423
4424 2000-10-02 Akim Demaille <akim@epita.fr>
4425
4426 * src/reduce.h: New file.
4427 Propagate its inclusion.
4428 * src/reduce.c: Topological sort and other formatting changes.
4429 (bool, TRUE, FALSE): Move their definition to...
4430 * src/system.h: here.
4431
4432 2000-10-02 Akim Demaille <akim@epita.fr>
4433
4434 * src/files.c: Formatting changes.
4435 (tryopen, tryclose, openfiles): Rename as...
4436 (xfopen, xfclose, open_files): this.
4437 (stringappend): static.
4438 * src/files.h: Complete the list of exported symbols.
4439 Propagate its use.
4440
4441 2000-10-02 Akim Demaille <akim@epita.fr>
4442
4443 * src/reader.h: New file.
4444 Propagate its use instead of tedious list of `extern' and
4445 prototypes.
4446 * src/reader.c: Formatting changes, topological sort,
4447 s/register//.
4448
4449 2000-10-02 Akim Demaille <akim@epita.fr>
4450
4451 * src/lex.h: Prototype `lex.c' exported functions.
4452 * src/reader.c: Adjust.
4453 * src/lex.c: Formatting changes.
4454 (safegetc): Rename as...
4455 (xgetc): this.
4456
4457 2000-10-02 Akim Demaille <akim@epita.fr>
4458
4459 * src/lalr.h: New file.
4460 Propagate its inclusion instead of prototypes and `extern'.
4461 * src/lalr.c: Formatting changes, topological sorting etc.
4462
4463 2000-10-02 Akim Demaille <akim@epita.fr>
4464
4465 * src/output.c (token_actions): Introduce a temporary array,
4466 YYDEFACT, that makes it possible for this function to use
4467 output_short_table.
4468
4469 2000-10-02 Akim Demaille <akim@epita.fr>
4470
4471 `user_toknums' is output as a `short[]' in `output.c', while it is
4472 defined as a `int[]' in `reader.c'. For consistency with the
4473 other output tables, `user_toknums' is now defined as a table of
4474 shorts.
4475
4476 * src/reader.c (user_toknums): Be a short table instead of an int
4477 table.
4478 Adjust dependencies.
4479
4480 Factor the short table outputs.
4481
4482 * src/output.c (output_short_table): New function.
4483 * src/output.c (output_gram, output_stos, output_rule_data)
4484 (output_base, output_table, output_check): Use it.
4485
4486 2000-10-02 Akim Demaille <akim@epita.fr>
4487
4488 * src/output.c (output): Topological sort of the functions, in
4489 order to get rid of the `static' prototypes.
4490 No longer use `register'.
4491 * src/output.h: New file.
4492 Propagate its inclusion in files explicitly prototyping functions
4493 from output.c.
4494
4495 2000-09-21 Akim Demaille <akim@epita.fr>
4496
4497 * src/atgeneral.m4: Update from Autoconf.
4498
4499 2000-09-21 Akim Demaille <akim@epita.fr>
4500
4501 * src/closure.h: New file.
4502 * src/closure.c: Formatting changes, topological sort over the
4503 functions, use of closure.h.
4504 (initialize_closure, finalize_closure): Rename as...
4505 (new_closure, free_closure): these. Adjust dependencies.
4506 * src/LR0.c: Formatting changes, topological sort, use of
4507 cloture.h.
4508 (initialize_states): Rename as...
4509 (new_states): this.
4510 * src/Makefile.am (noinst_HEADERS): Adjust.
4511
4512 2000-09-20 Akim Demaille <akim@epita.fr>
4513
4514 * src/acconfig.h: Don't protect config.h against multiple
4515 inclusion.
4516 Don't define PARAMS.
4517 * src/system.h: Define PARAMS.
4518 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
4519 purpose of config.h. system.h must not try to fix wrong
4520 definitions in config.h.
4521
4522 2000-09-20 Akim Demaille <akim@epita.fr>
4523
4524 * src/derives.h: New file.
4525 * src/main.c, src/derives.h: Use it.
4526 Formatting changes.
4527 * src/Makefile.am (noinst_HEADERS): Adjust.
4528
4529 2000-09-20 Akim Demaille <akim@epita.fr>
4530
4531 * tests/atgeneral.m4: Update from Autoconf.
4532 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
4533 (AT_CHECK_CALC): New macros.
4534 Use these macros to test bison with options `', `--raw',
4535 `--debug', `--yacc', `--yacc --debug'.
4536
4537 2000-09-19 Akim Demaille <akim@epita.fr>
4538
4539 * src/output.c: Formatting changes.
4540 * src/machine.h: Remove, leaving its contents in...
4541 * src/system.h: here.
4542 Include stdio.h.
4543 Adjust all dependencies on stdio.h and machine.h.
4544 * src/getargs.h: New file.
4545 Let all `extern' declarations about getargs.c be replaced with
4546 inclusion of `getargs.h'.
4547 * src/Makefile.am (noinst_HEADERS): Adjust.
4548
4549 * tests/calc.m4 (yyin): Be initialized in main, not on the global
4550 scope.
4551 (yyerror): Returns void, not int.
4552 * doc/bison.texinfo: Formatting changes.
4553
4554 2000-09-19 Akim Demaille <akim@epita.fr>
4555
4556 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
4557 portable.
4558
4559 2000-09-18 Akim Demaille <akim@epita.fr>
4560
4561 * configure.in: Append WARNING_CFLAGS to CFLAGS.
4562 * src/Makefile.am (INCLUDES): Don't.
4563 Be ready to fetch headers in lib/.
4564
4565 2000-09-18 Akim Demaille <akim@epita.fr>
4566
4567 * doc/bison.texinfo: Update the copyright.
4568 ANSIfy and GNUify the examples.
4569 Remove the old menu.
4570
4571 2000-09-18 Akim Demaille <akim@epita.fr>
4572
4573 First set of tests: use the `calc' example from the documentation.
4574
4575 * src/bison.s1 (yyparse): Condition the code using `yytname' which
4576 is defined only when YYDEBUG is.
4577 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
4578 * src/files.c (tryopen, tryclose): Formatting changes.
4579 Move to the top and be static.
4580 * src/reader.c (read_signed_integer): Likewise.
4581 * tests/calc.m4: New file.
4582 * Makefile.am, suite.m4: Adjust.
4583 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
4584
4585 2000-09-18 Akim Demaille <akim@epita.fr>
4586
4587 Add support for an Autotest test suite for Bison.
4588
4589 * m4/m4.m4, m4/atconfig.m4: New files.
4590 * m4/Makefile.am (EXTRA_DIST): Adjust.
4591 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
4592 files.
4593 * src/getargs.c: Display a more standard --version message.
4594 * src/reader.c (reader): Formatting changes.
4595 No longer depend upon VERSION_STRING.
4596 * configure.in: No longer use `dnl'.
4597 Set up the test suite and the new directory `tests/.
4598 (VERSION_STRING): Remove.
4599
4600 2000-04-14 Akim Demaille <akim@epita.fr>
4601
4602 * src/reader.c (copy_comment2): New function, same as former
4603 `copy_comment', but outputs into two FILE *.
4604 (copy_comment): Use it.
4605 (parse_union_decl): Use it.
4606 (get_type, parse_start_decl): Use the same `invalid' message.
4607 (parse_start_decl, parse_union_decl): Use the same `multiple'
4608 message.
4609 (parse_union_decl, copy_guard, copy_action): Use the same
4610 `unmatched' message.
4611 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
4612
4613 2000-03-31 Akim Demaille <akim@epita.fr>
4614
4615 * src/files.c (tryopen, tryclose): Move to the top.
4616 Be static.
4617
4618 2000-03-31 Akim Demaille <akim@epita.fr>
4619
4620 * src/main.c (main): Don't call `done', exit does it.
4621
4622 2000-03-31 Akim Demaille <akim@epita.fr>
4623
4624 * allocate.c: s/return (foo)/return foo/.
4625 * lalr.c: Likewise.
4626 * LR0.c: Likewise.
4627 * output.c: Likewise.
4628 * reader.c: Likewise.
4629 * symtab.c: Likewise.
4630 * vmsgetargs.c: Likewise.
4631
4632 2000-03-31 Akim Demaille <akim@epita.fr>
4633
4634 Clean up the error reporting functions.
4635
4636 * src/report.c: New file.
4637 * src/report.h: Likewise.
4638 * src/Makefile.am: Adjust.
4639 * m4/error.m4: New file.
4640 * m4/Makefile.am: Adjust.
4641 * configure.in (jm_PREREQ_ERROR): Call it.
4642 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
4643 Remove.
4644 (fatal, fatals): Remove. All callers use complain.c::fatal.
4645 (warn, warni, warns, warnss, warnss): Remove. All callers use
4646 complain.c::complain.
4647 (toomany): Remove, use fatal instead.
4648 * src/files.c (done): No argument, use complain_message_count.
4649 * src/main.c (main): Register `done' to `atexit'.
4650
4651 * src/getargs.c (usage): More `fputs', less `fprintf'.
4652
4653 2000-03-28 Akim Demaille <akim@epita.fr>
4654
4655 * lib/: New directory.
4656 * Makefile.am (SUBDIRS): Adjust.
4657 * configure.in: Adjust.
4658 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
4659 useless.
4660 * src/alloca.c: Moved to lib/.
4661 * src/getopt.c: Likewise.
4662 * src/getopt1.c: Likewise.
4663 * src/getopt.h: Likewise.
4664 * src/ansi2knr.c: Likewise.
4665 * src/ansi2knr.1: Likewise.
4666 * src/Makefile.am: Adjust.
4667 * lib/Makefile.am: New file.
4668
4669 2000-03-28 Akim Demaille <akim@epita.fr>
4670
4671 * src/getargs.c (usage): Refresh the help message.
4672
4673 2000-03-17 Akim Demaille <akim@epita.fr>
4674
4675 * src/getopt1.c: Updated from textutils 2.0e
4676 * src/getopt.c: Likewise.
4677 * src/getopt.h: Likewise.
4678
4679 2000-03-17 Akim Demaille <akim@epita.fr>
4680
4681 * src/Makefile.am (bison.simple): Fix the awk program: quote only
4682 the file name, not the whole `#line LINE FILE'.
4683
4684 2000-03-17 Akim Demaille <akim@epita.fr>
4685
4686 On syntax errors, report the token on which we choked.
4687
4688 * src/bison.s1 (yyparse): In the label yyerrlab, when
4689 YYERROR_VERBOSE, add yychar in msg.
4690
4691 2000-03-17 Akim Demaille <akim@epita.fr>
4692
4693 * src/reader.c (copy_at): New function.
4694 (copy_guard): Use it.
4695 (copy_action): Use it.
4696
4697 2000-03-17 Akim Demaille <akim@epita.fr>
4698
4699 Be kind to translators, save some useless translations.
4700
4701 * src/main.c (banner): New function.
4702 (fatal_banner): Use it.
4703 (warn_banner): Use it.
4704
4705 2000-03-17 Akim Demaille <akim@epita.fr>
4706
4707 * src/reader.c (copy_definition): Use copy_string and
4708 copy_comment. Removed now unused `match', `ended',
4709 `cplus_comment'.
4710 (copy_comment, copy_string): Moved, to be visible from
4711 copy_definition.
4712
4713 2000-03-17 Akim Demaille <akim@epita.fr>
4714
4715 * src/reader.c (copy_string): Declare `static inline'. No
4716 problems with inline, since it is checked by configure.
4717 (copy_comment): Likewise.
4718
4719 2000-03-17 Akim Demaille <akim@epita.fr>
4720
4721 * src/reader.c (packsymbols): Formatting changes.
4722
4723 2000-03-17 Akim Demaille <akim@epita.fr>
4724
4725 * src/reader.c (copy_comment): New function, factored out from:
4726 (copy_action): Use it. Removed now unused `match', `ended',
4727 `cplus_comment'.
4728 (copy_guard): Likewise.
4729
4730 2000-03-17 Akim Demaille <akim@epita.fr>
4731
4732 * src/reader.c (copy_string): New function, factored out from:
4733 (copy_action): Use it.
4734 (copy_guard): Likewise.
4735
4736 2000-03-17 Akim Demaille <akim@epita.fr>
4737
4738 Change the handling of @s so that they behave exactly like $s.
4739 There is now a pseudo variable @$ (readble and writable), location
4740 of the lhs of the rule (by default ranging from the location of
4741 the first symbol of the rhs, to the location of the last symbol,
4742 or, if the rhs is empty, YYLLOC).
4743
4744 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
4745 yyval.
4746 (yyparse): When providing a default semantic action, provide a
4747 default location action.
4748 (after the $): No longer change `*YYLSP', just stack YYLOC the
4749 same way you stack YYVAL.
4750 * src/reader.c (read_declarations): Use warns.
4751 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
4752 (copy_action, case '@'): Likewise.
4753 Use a standard error message, to save useless work from
4754 translators.
4755
4756 2000-03-17 Akim Demaille <akim@epita.fr>
4757
4758 * src/bison.s1: Formatting and cosmetics changes.
4759 * src/reader.c: Likewise.
4760 Update the Copyright notice.
4761
4762 2000-03-17 Akim Demaille <akim@epita.fr>
4763
4764 * src/bison.s1 (#line): All set to `#line' only, since the
4765 Makefile now handles them.
4766
4767 2000-03-16 Akim Demaille <akim@epita.fr>
4768
4769 * src/output.c (output_rule_data): Output the documentation of
4770 some of the tables.
4771 (Copyright notice): Update.
4772 Formatting changes.
4773
4774 2000-03-16 Akim Demaille <akim@epita.fr>
4775
4776 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
4777 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
4778 One `#if YYDEBUG' remains, since it uses variables which are
4779 defined only if `YYDEBUG != 0'.
4780
4781 2000-03-16 Akim Demaille <akim@epita.fr>
4782
4783 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
4784 and related variables so that the similarities are highlighted.
4785
4786 2000-03-16 Akim Demaille <akim@epita.fr>
4787
4788 * src/bison.s1: Properly indent CPP directives.
4789
4790 2000-03-16 Akim Demaille <akim@epita.fr>
4791
4792 * src/bison.s1: Properly indent the `alloca' CPP section.
4793
4794 2000-03-16 Akim Demaille <akim@epita.fr>
4795
4796 Do not hard code values of directories in `configure.in'.
4797 Update the `configure' tool chain.
4798
4799 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
4800 src/makefile.am.
4801 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
4802 (AC_OUTPUT): Add m4/Makefile.
4803 Bump to bison 1.28a, 1.29 has never been released.
4804 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
4805 handled via src/Makefile.am.
4806 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
4807 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
4808 autoheader.
4809 * Makefile.am (SUBDIRS): Add m4.
4810 (ACLOCAL_AM_FLAGS): New variable.
4811 (AUTOMAKE_OPTIONS): Add check-news.
4812 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
4813 the proper line number and file name.
4814 (DEFS): Propagate the location of bison library files and of the
4815 locale files.
4816 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
4817 builddir.
4818 * acinclude.m4: Remove, replaced by the directory m4.
4819 * m4/Makefile.am (EXTRA_DIST): New variable.
4820 * m4/gettext.m4: New file, from the fileutils.
4821 * m4/lcmessage.m4: Likewise
4822 * m4/progtest.m4: Likewise.
4823 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
4824
4825 2000-03-10 Akim Demaille <akim@epita.fr>
4826
4827 * src/closure.c:
4828 Formatting changes of various comments.
4829 Respect the GNU coding standards at various places.
4830 Don't use `_()' when no translation is needed.
4831
4832 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4833
4834 * src/files.c:
4835 OS/2 honors TMPDIR environment variable.
4836
4837 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4838
4839 * doc/bison.texinfo: Tweaked spelling and grammar.
4840 Updated ISBN.
4841 Removed reference to price of printed copy.
4842 Mention BISON_SIMPLE and BISON_HAIRY.
4843
4844 1999-12-13 Jesse Thilo <jthilo@gnu.org>
4845
4846 * configure.in, NEWS:
4847 Bison 1.29 released.
4848
4849 1999-10-27 Jesse Thilo <jthilo@gnu.org>
4850
4851 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
4852 Added reference card.
4853
4854 1999-07-26 Jesse Thilo <jthilo@gnu.org>
4855
4856 * po/ru.po: Added Russian translation.
4857
4858 1999-07-26 Jesse Thilo <jthilo@gnu.org>
4859
4860 * configure.in: Added Russian translation.
4861
4862 1999-07-06 Jesse Thilo <jthilo@gnu.org>
4863
4864 * configure.in, NEWS, README:
4865 Released version 1.28.
4866
4867 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4868
4869 * src/system.h:
4870 Squashed redefinition warning on some systems.
4871
4872 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
4873 Have configure build version string instead of relying on ANSI string
4874 concatentation.
4875
4876 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4877
4878 * po/POTFILES.in: Got rid of version.c.
4879
4880 1999-06-14 Jesse Thilo <jthilo@gnu.org>
4881
4882 * acconfig.h, configure.in:
4883 Have configure build version string instead of relying on ANSI string
4884 concatentation.
4885
4886 1999-06-08 Jesse Thilo <jthilo@gnu.org>
4887
4888 * doc/bison.1:
4889 Dropped mention of `+' for long-named options.
4890
4891 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4892
4893 * src/files.c: Added <unistd.h> for unlink().
4894
4895 * src/Makefile.am, src/system.h:
4896 I18n fixes.
4897
4898 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4899
4900 * README: Added a FAQ list.
4901
4902 * configure.in, acconfig.h:
4903 I18n fixes.
4904
4905 1999-05-30 Jesse Thilo <jthilo@gnu.org>
4906
4907 * doc/FAQ, doc/Makefile.am:
4908 Added a FAQ list.
4909
4910 1999-05-19 Jesse Thilo <jthilo@gnu.org>
4911
4912 * src/alloc.h, src/symtab.h, src/version.c:
4913 Protected inclusion of "config.h" with HAVE_CONFIG_H.
4914
4915 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4916
4917 * src/.cvsignore, src/Makefile.am:
4918 Reorganized: sources in `src', documentation in `doc'.
4919
4920 * src/lex.c (literalchar):
4921 fixed the code for escaping double quotes (thanks
4922 Jonathan Czisny.)
4923
4924 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4925
4926 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
4927 Adjusted paths to reflect directory reorganization.
4928
4929 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4930
4931 * doc/.cvsignore, doc/Makefile.am:
4932 Reorganized: sources in `src', documentation in `doc'.
4933
4934 1999-04-18 Jesse Thilo <jthilo@gnu.org>
4935
4936 * configure.in:
4937 Updated AC_INIT file to reflect directory reorganization.
4938
4939 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
4940 Reorganized: sources in `src', documentation in `doc'.
4941
4942 1999-04-13 Jesse Thilo <jthilo@gnu.org>
4943
4944 * src/allocate.c:
4945 Don't declare calloc() and realloc() if not necessary.
4946
4947 1999-04-13 Jesse Thilo <jthilo@gnu.org>
4948
4949 * configure.in, acconfig.h, acinclude.m4:
4950 Don't declare calloc() and realloc() if not necessary.
4951
4952 1999-03-23 Jesse Thilo <jthilo@gnu.org>
4953
4954 * po/.cvsignore: Added i18n support.
4955
4956 1999-03-23 Jesse Thilo <jthilo@gnu.org>
4957
4958 * acconfig.h, configure.in, Makefile.am:
4959 Added i18n support.
4960
4961 1999-03-22 Jesse Thilo <jthilo@gnu.org>
4962
4963 * src/bison.s1: Fixed #line numbers.
4964
4965 1999-03-15 Jesse Thilo <jthilo@gnu.org>
4966
4967 * po/es.po, po/fr.po, po/nl.po, po/de.po:
4968 Added PO files from Translation Project.
4969
4970 1999-03-03 Jesse Thilo <jthilo@gnu.org>
4971
4972 * Makefile.am:
4973 Added support for non-ANSI compilers (ansi2knr).
4974
4975 1999-02-16 Jesse Thilo <jthilo@gnu.org>
4976
4977 * configure.in: Bumped version number to 1.27.
4978
4979 * Makefile.am:
4980 Added `bison.simple' to list of files removed by `make distclean'.
4981
4982 1999-02-12 Jesse Thilo <jthilo@gnu.org>
4983
4984 * src/files.c, src/files.h:
4985 Defined locations of parser files in config.h instead of Makefile.
4986
4987 1999-02-12 Jesse Thilo <jthilo@gnu.org>
4988
4989 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
4990 Defined locations of parser files in config.h instead of Makefile.
4991
4992 1999-02-09 Jesse Thilo <jthilo@gnu.org>
4993
4994 * Makefile.am:
4995 Removed inappropriate use of $< macro.
4996
4997 1999-02-05 Jesse Thilo <jthilo@gnu.org>
4998
4999 * po/Makefile.in.in, po/POTFILES.in:
5000 Add `po' directory skeleton.
5001
5002 1999-01-27 Jesse Thilo <jthilo@gnu.org>
5003
5004 * README: Document help-bison list.
5005
5006 * configure.in: Add check for mkstemp().
5007
5008 1999-01-20 Jesse Thilo <jthilo@gnu.org>
5009
5010 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
5011 Hush a few compiler warnings.
5012
5013 * src/files.c:
5014 Add tryclose(), which verifies that fclose was successful.
5015 Hush a couple of compiler warnings.
5016
5017 1999-01-20 Jesse Thilo <jthilo@gnu.org>
5018
5019 * Makefile.am, OChangeLog:
5020 ChangeLog is now automatically generated. Include the old version as
5021 OChangeLog.
5022
5023 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5024
5025 * src/gram.h, src/lalr.c, src/lex.c, src/lex.h, src/machine.h, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/state.h, src/symtab.c, src/symtab.h, src/types.h, src/vmsgetargs.c, src/warshall.c, src/allocate.c, src/alloc.h, src/bison.s1, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/files.h, src/getargs.c, src/gram.c, src/LR0.c:
5026 Update FSF address.
5027
5028 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5029
5030 * doc/bison.texinfo: Fix formatting glitch.
5031
5032 * doc/bison.texinfo: Update FSF address.
5033
5034 1999-01-14 Jesse Thilo <jthilo@gnu.org>
5035
5036 * acconfig.h: Update FSF address.
5037
5038 1999-01-08 Jesse Thilo <jthilo@gnu.org>
5039
5040 * src/system.h:
5041 Don't define PACKAGE here, since config.h defines it.
5042
5043 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5044
5045 * src/reader.c: Update copyright date.
5046
5047 * src/main.c:
5048 Ditch sprintf to statically-sized buffers in fatal/warn functions in
5049 favor of output directly to stderr (avoids buffer overruns).
5050
5051 * src/reader.c: Some checks for premature EOF.
5052
5053 * src/allocate.c, src/alloc.h, src/closure.c, src/conflicts.c, src/derives.c, src/getargs.c, src/gram.c, src/lalr.c, src/lex.c, src/LR0.c, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reduce.c, src/symtab.c, src/symtab.h, src/warshall.c:
5054 Use prototypes if the compiler understands them.
5055
5056 * src/files.c: Honor TMPDIR on Unix hosts.
5057 Use prototypes if the compiler understands them.
5058
5059 * src/reader.c:
5060 Fix a couple of buffer overrun bugs.
5061 Use prototypes if the compiler understands them.
5062
5063 * src/system.h: Include unistd.h and ctype.h.
5064 Use #ifdef instead of #if for NLS symbols.
5065
5066 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5067
5068 * doc/bison.texinfo:
5069 Delete comment "consider using @set for edition number, etc..." since
5070 we now are doing so.
5071
5072 1998-12-30 Jesse Thilo <jthilo@gnu.org>
5073
5074 * configure.in:
5075 Use prototypes if the compiler understands them.
5076
5077 * NEWS: Document 1.26 highlights.
5078
5079 * Makefile.am: Require Automake 1.3 or later.
5080
5081 * acconfig.h:
5082 Use prototypes if the compiler understands them.
5083
5084 1998-12-29 Jesse Thilo <jthilo@gnu.org>
5085
5086 * src/version.c:
5087 Use VERSION symbol from automake for version number.
5088
5089 1998-12-29 Jesse Thilo <jthilo@gnu.org>
5090
5091 * acconfig.h, configure.in, version.cin:
5092 Use VERSION symbol from automake for version number.
5093
5094 1998-11-28 Jesse Thilo <jthilo@gnu.org>
5095
5096 * Makefile.am:
5097 Distribute original version of simple parser (bison.s1), not built
5098 version (bison.simple).
5099
5100 1998-11-28 Jesse Thilo <jthilo@gnu.org>
5101
5102 * doc/bison.texinfo: Add info dir entry.
5103
5104 * doc/bison.texinfo:
5105 Let automake put version number into documentation.
5106
5107 1998-11-26 Jesse Thilo <jthilo@gnu.org>
5108
5109 * src/bison.cld, src/build.com, src/vmshlp.mar:
5110 Add non-RCS files from /gd/gnu/bison.
5111
5112 1998-11-26 Jesse Thilo <jthilo@gnu.org>
5113
5114 * doc/bison.1:
5115 Document the BISON_HAIRY and BISON_SIMPLE variables.
5116
5117 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5118
5119 * src/version.c: Build version.c automatically.
5120
5121 * src/reader.c:
5122 Fix token numbering (used to start at 258, not 257).
5123
5124 * src/system.h: Include config.h.
5125
5126 * src/getargs.c: Update bug report address.
5127
5128 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
5129 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
5130
5131 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5132
5133 * Makefile.am:
5134 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
5135
5136 * configure.in, version.cin:
5137 Build version.c automatically.
5138
5139 * AUTHORS: Add AUTHORS file.
5140
5141 * README: Update bug report address.
5142
5143 * bison.simple:
5144 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
5145
5146 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
5147 Add automake stuff.
5148
5149 1998-11-25 Jesse Thilo <jthilo@gnu.org>
5150
5151 * doc/bison.texinfo: Clean up some formatting.
5152
5153 1998-05-05 Richard Stallman <rms@gnu.org>
5154
5155 * doc/bison.texinfo:
5156 Explain better why to make a pure parser.
5157
5158 1998-01-05 Richard Stallman <rms@gnu.org>
5159
5160 * src/files.c (openfiles):
5161 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
5162 find a temporary directory, if possible. Do not unlink files while
5163 they are open.
5164
5165 1997-08-25 Richard Stallman <rms@gnu.org>
5166
5167 * src/reader.c (stack_offset;):
5168 Change some warni to warns.
5169
5170 * src/lex.c (literalchar): Use warns, not warni.
5171
5172 1997-06-28 Richard Stallman <rms@gnu.org>
5173
5174 * src/bison.s1: Add a Bison version comment.
5175
5176 * src/main.c (fatal, warn, berror):
5177 Use program_name.
5178
5179 1997-06-28 Richard Stallman <rms@gnu.org>
5180
5181 * Makefile.in (bison_version): New variable.
5182 (dist): Use that variable.
5183 (bison.s1): Substitute the Bison version into bison.simple.
5184
5185 * bison.simple: Add a Bison version comment.
5186
5187 1997-06-18 Richard Stallman <rms@gnu.org>
5188
5189 * src/main.c (fatal, warn, berror):
5190 Make error messages standard.
5191 (toomany): Improve error message text.
5192
5193 * src/LR0.c, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/lalr.c, src/lex.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/symtab.c:
5194 new.h renamed to alloc.h.
5195
5196 1997-06-18 Richard Stallman <rms@gnu.org>
5197
5198 * Makefile.in: new.h renamed to alloc.h.
5199
5200 1997-05-24 Richard Stallman <rms@gnu.org>
5201
5202 * src/lex.c (literalchar):
5203 Fix the code for escaping \, " and '.
5204
5205 (lex): Avoid trouble when there are many chars
5206 to discard in a char literal with just several chars in it.
5207
5208 1997-05-17 Richard Stallman <rms@gnu.org>
5209
5210 * src/bison.s1:
5211 Use malloc, if using alloca is troublesome.
5212 (YYSTACK_USE_ALLOCA): New flag macro.
5213 Define it for some systems and compilers.
5214 (YYSTACK_ALLOC): New macro.
5215 (yyparse): Use YYSTACK_ALLOC to allocate stack.
5216 If it was malloc'd, free it.
5217
5218 1997-05-17 Richard Stallman <rms@gnu.org>
5219
5220 * bison.simple:
5221 Use malloc, if using alloca is troublesome.
5222 (YYSTACK_USE_ALLOCA): New flag macro.
5223 Define it for some systems and compilers.
5224 (YYSTACK_ALLOC): New macro.
5225 (yyparse): Use YYSTACK_ALLOC to allocate stack.
5226 If it was malloc'd, free it.
5227
5228 1997-04-23 Richard Stallman <rms@gnu.org>
5229
5230 * src/bison.s1:
5231 (alloca) [__hpux]: Always define as __builtin_alloca.
5232
5233 1997-04-23 Richard Stallman <rms@gnu.org>
5234
5235 * bison.simple:
5236 (alloca) [__hpux]: Always define as __builtin_alloca.
5237
5238 1997-04-22 Richard Stallman <rms@gnu.org>
5239
5240 * src/bison.s1:
5241 [__hpux]: Include alloca.h (right for HPUX 10)
5242 instead of declaring alloca (right for HPUX 9).
5243
5244 * src/bison.s1 (__yy_memcpy):
5245 Declare arg `count' as unsigned int.
5246 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
5247
5248 1997-04-22 Richard Stallman <rms@gnu.org>
5249
5250 * bison.simple:
5251 [__hpux]: Include alloca.h (right for HPUX 10)
5252 instead of declaring alloca (right for HPUX 9).
5253
5254 * bison.simple (__yy_memcpy):
5255 Declare arg `count' as unsigned int.
5256 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
5257
5258 1997-01-03 Richard Stallman <rms@gnu.org>
5259
5260 * src/allocate.c: [__STDC__ or _MSC_VER]:
5261 Declare calloc and realloc to return void *.
5262
5263 1997-01-02 Richard Stallman <rms@gnu.org>
5264
5265 * src/system.h:
5266 [_MSC_VER]: Include stdlib.h and process.h.
5267 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
5268
5269 * src/main.c (main): Return FAILURE as a value.
5270 (printable_version): Declare arg as int, not char.
5271
5272 1997-01-02 Richard Stallman <rms@gnu.org>
5273
5274 * Makefile.in (dist):
5275 Explicitly check for symlinks, and copy them.
5276
5277 1996-12-19 Richard Stallman <rms@gnu.org>
5278
5279 * src/files.c:
5280 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
5281
5282 1996-12-18 Paul Eggert <eggert@gnu.org>
5283
5284 * src/bison.s1 (yyparse):
5285 If __GNUC__ and YYPARSE_PARAM are both defined,
5286 declare yyparse to have a void * argument.
5287
5288 1996-12-18 Paul Eggert <eggert@gnu.org>
5289
5290 * bison.simple (yyparse):
5291 If __GNUC__ and YYPARSE_PARAM are both defined,
5292 declare yyparse to have a void * argument.
5293
5294 1996-12-17 Richard Stallman <rms@gnu.org>
5295
5296 * src/reduce.c (nbits): Add some casts.
5297
5298 1996-08-12 Richard Stallman <rms@gnu.org>
5299
5300 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
5301
5302 1996-08-12 Richard Stallman <rms@gnu.org>
5303
5304 * bison.simple: Test _MSDOS as well as _MSDOS_.
5305
5306 1996-07-31 Richard Stallman <rms@gnu.org>
5307
5308 * src/bison.s1:
5309 [__sun && __i386]: Include alloca.h.
5310
5311 1996-07-31 Richard Stallman <rms@gnu.org>
5312
5313 * bison.simple:
5314 [__sun && __i386]: Include alloca.h.
5315
5316 1996-07-30 Richard Stallman <rms@gnu.org>
5317
5318 * src/bison.s1: Comment change.
5319
5320 * src/bison.s1: Test _MSDOS_, not MSDOS.
5321
5322 1996-07-30 Richard Stallman <rms@gnu.org>
5323
5324 * bison.simple: Comment change.
5325
5326 * bison.simple: Test _MSDOS_, not MSDOS.
5327
5328 1996-06-01 Richard Stallman <rms@gnu.org>
5329
5330 * src/reduce.c, src/reader.c, src/print.c, src/output.c, src/nullable.c, src/lex.c, src/lalr.c, src/getargs.c, src/derives.c, src/conflicts.c, src/closure.c, src/allocate.c:
5331 Insert `_' macro around many string constants.
5332
5333 * src/main.c:
5334 Insert `_' macro around many string constants.
5335
5336 (main): Call setlocale, bindtextdomain and textdomain.
5337
5338 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
5339 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
5340 [ENABLE_NLS]: Include libintl.h.
5341 [ENABLE_NLS] (gettext): Define.
5342 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
5343 (N_, PACKAGE, LOCALEDIR): New macros.
5344
5345 1996-06-01 Richard Stallman <rms@gnu.org>
5346
5347 * POTFILES.in: New file.
5348
5349 * Makefile.in (allocate.o):
5350 Define target explicitly.
5351
5352 * Makefile.in (CFLAGS): Set to @CFLAGS@.
5353 (LDFLAGS): Set to @LDFLAGS@.
5354 (configure): Run autoconf only if preceding `cd' succeeds.
5355 (bison.s1): Redirect output to temporary file then move the
5356 temporary to the target, rather than redirecting directly to bison.s1.
5357 (clean): Remove config.status and config.log.
5358 (distclean): Don't remove config.status here.
5359
5360 1996-05-12 Richard Stallman <rms@gnu.org>
5361
5362 * src/bison.s1:
5363 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5364
5365 1996-05-12 Richard Stallman <rms@gnu.org>
5366
5367 * bison.simple:
5368 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
5369
5370 1996-05-11 Richard Stallman <rms@gnu.org>
5371
5372 * src/bison.s1 (__yy_memcpy):
5373 Really reorder the args, as was supposedly done on Feb 14 1995.
5374 (yyparse): Calls changed accordingly.
5375
5376 1996-05-11 Richard Stallman <rms@gnu.org>
5377
5378 * Makefile.in (dist): Don't use $(srcdir).
5379
5380 * bison.simple (__yy_memcpy):
5381 Really reorder the args, as was supposedly done on Feb 14 1995.
5382 (yyparse): Calls changed accordingly.
5383
5384 1996-01-27 Richard Stallman <rms@gnu.org>
5385
5386 * src/output.c (output_rule_data):
5387 Test YYERROR_VERBOSE in the conditional
5388 around the definition of ttyname.
5389
5390 1995-12-29 Richard Stallman <rms@gnu.org>
5391
5392 * src/bison.s1:
5393 Fix line numbers in #line commands.
5394
5395 1995-12-29 Richard Stallman <rms@gnu.org>
5396
5397 * bison.simple:
5398 Fix line numbers in #line commands.
5399
5400 1995-12-27 Richard Stallman <rms@gnu.org>
5401
5402 * src/bison.s1 (YYPARSE_PARAM_DECL):
5403 In C++, make it always null.
5404 (YYPARSE_PARAM_ARG): New macro.
5405 (yyparse): Use YYPARSE_PARAM_ARG.
5406
5407 1995-12-27 Richard Stallman <rms@gnu.org>
5408
5409 * bison.simple (YYPARSE_PARAM_DECL):
5410 In C++, make it always null.
5411 (YYPARSE_PARAM_ARG): New macro.
5412 (yyparse): Use YYPARSE_PARAM_ARG.
5413
5414 1995-11-29 Richard Stallman <rms@gnu.org>
5415
5416 * doc/bison.texinfo:
5417 Describe literal string tokens, %raw, %no_lines, %token_table.
5418
5419 1995-11-29 Daniel Hagerty <hag@gnu.org>
5420
5421 * doc/bison.texinfo: Fixed update date
5422
5423 1995-10-16 Richard Stallman <rms@gnu.org>
5424
5425 * src/version.c: Version 1.25.
5426
5427 1995-10-16 Richard Stallman <rms@gnu.org>
5428
5429 * NEWS: *** empty log message ***
5430
5431 1995-10-16 Richard Stallman <rms@gnu.org>
5432
5433 * doc/bison.1, doc/bison.rnh:
5434 Add new options.
5435
5436 1995-10-15 Richard Stallman <rms@gnu.org>
5437
5438 * src/vmsgetargs.c, src/getargs.c:
5439 Added -n, -k, and -raw switches.
5440 (noparserflag, toknumflag, rawtoknumflag): New variables.
5441
5442 * src/symtab.h (SALIAS):
5443 New #define for adding aliases to %token.
5444 (struct bucket): Added `alias' field.
5445
5446 * src/reduce.c (reduce_grammar):
5447 Revise error message.
5448 (print_notices): Remove final `.' from error message.
5449
5450 * src/reader.c (reader_output_yylsp):
5451 New function.
5452 (readgram): Use `#if 0' around code that accepted %command
5453 inside grammar rules: The documentation doesn't allow it,
5454 and it will fail since the %command processors scan for the next %.
5455 (parse_token_decl): Extended the %token
5456 declaration to allow a multi-character symbol as an alias.
5457 (parse_thong_decl): New function.
5458 (read_declarations): Added %thong declarations.
5459 (read_declarations): Handle NOOP to deal with allowing
5460 % declarations as another means to specify the flags.
5461 (readgram): Allow %prec prior to semantics embedded in a rule.
5462 (skip_to_char, read_declarations, copy_definition)
5463 (parse_token_decl, parse_start_decl, parse_type_decl)
5464 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
5465 (get_type_name, copy_guard, copy_action, readgram)
5466 (get_type, packsymbols): Revised most error messages.
5467 Changed `fatal' to `warnxxx' to avoid aborting for error.
5468 Revised and use multiple warnxxx functions to avoid using VARARGS1.
5469 (read_declarations): Improve the error message for
5470 an invalid character. Do not abort.
5471 (read_declarations, copy_guard, copy_action): Use
5472 printable_version to avoid unprintable characters in printed output.
5473 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
5474 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
5475 Allow the type of a non-terminal can be given
5476 more than once, as long as all specifications give the same type.
5477
5478 * src/output.c:
5479 (output_headers, output_trailers, output, output_gram)
5480 (output_rule_data): Implement noparserflag variable.
5481 Implement toknumflag variable.
5482 (output): Call reader_output_yylsp to output LTYPESTR.
5483
5484 * src/main.c (main):
5485 If reader sees an error, don't process the grammar.
5486 (fatals): Updated to not use VARARGS1.
5487 (printable_version, int_to_string, warn, warni, warns, warnss)
5488 (warnsss): New error reporting functions. Avoid abort for error.
5489
5490 * src/lex.h:
5491 Added THONG and NOOP for alias processing.
5492 Added SETOPT for the new code that allows setting options with %flags.
5493
5494 * src/lex.c:
5495 Include getopt.h. Add some extern decls.
5496 (safegetc): New function to deal with EOF gracefully.
5497 (literalchar); new function to deal with reading \ escapes.
5498 (lex): Use literalchar.
5499 (lex): Implemented "..." tokens.
5500 (literalchar, lex, parse_percent_token): Made tokenbuffer
5501 always contain the token. This includes growing the token
5502 buffer while reading an integer.
5503 (parse_percent_token): Replaced if-else statement with percent_table.
5504 (parse_percent_token): Added % declarations as another
5505 way to specify the flags -n, -l, and -r. Also added hooks for
5506 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
5507 major changes to files.c.
5508 (lex) Retain in the incoming stream a character following
5509 an incorrect '/'.
5510 (skip_white_space, lex): Revised most error messages
5511 and changed fatal to warn to avoid aborting.
5512 (percent_table): Added %thong declarations.
5513
5514 * src/gram.h: Comment changes.
5515
5516 * src/files.c (openfiles, open_extra_files, done):
5517 Add faction flag
5518 and actfile file. Handle noparserflag. Both for -n switch.
5519
5520 * src/conflicts.c (resolve_sr_conflict):
5521 Remove use of alloca.
5522
5523 1995-06-01 Jim Meyering <meyering@gnu.org>
5524
5525 * doc/bison.texinfo: *** empty log message ***
5526
5527 1995-05-06 Richard Stallman <rms@gnu.org>
5528
5529 * src/bison.s1: Comment change.
5530
5531 1995-05-06 Richard Stallman <rms@gnu.org>
5532
5533 * bison.simple: Comment change.
5534
5535 1995-05-03 Richard Stallman <rms@gnu.org>
5536
5537 * src/version.c: Version now 1.24.
5538
5539 * src/bison.s1: Change distribution terms.
5540
5541 * src/version.c: Version now 1.23.
5542
5543 1995-05-03 Richard Stallman <rms@gnu.org>
5544
5545 * doc/bison.texinfo:
5546 Rewrite "Conditions for Using Bison".
5547 Update version to 1.24.
5548
5549 1995-05-03 Richard Stallman <rms@gnu.org>
5550
5551 * bison.simple: Change distribution terms.
5552
5553 1995-02-23 Richard Stallman <rms@gnu.org>
5554
5555 * src/files.c: Test __VMS_POSIX as well as VMS.
5556
5557 1995-02-14 Jim Meyering <meyering@gnu.org>
5558
5559 * src/bison.s1 (__yy_memcpy):
5560 Renamed from __yy_bcopy to avoid
5561 confusion. Reverse FROM and TO arguments to be consistent with
5562 those of memcpy.
5563
5564 1995-02-14 Jim Meyering <meyering@gnu.org>
5565
5566 * bison.simple (__yy_memcpy):
5567 Renamed from __yy_bcopy to avoid
5568 confusion. Reverse FROM and TO arguments to be consistent with
5569 those of memcpy.
5570
5571 1994-11-10 David J. MacKenzie <djm@gnu.org>
5572
5573 * NEWS: reformat
5574
5575 * NEWS: New file.
5576
5577 * Makefile.in (DISTFILES): Include NEWS.
5578
5579 * Makefile.in (DISTFILES):
5580 Include install-sh, not install.sh.
5581
5582 * configure.in: Update to Autoconf v2 macro names.
5583
5584 1994-10-05 David J. MacKenzie <djm@gnu.org>
5585
5586 * Makefile.in: fix typo
5587
5588 * Makefile.in (prefix, exec_prefix):
5589 Let configure set them.
5590
5591 1994-09-28 David J. MacKenzie <djm@gnu.org>
5592
5593 * Makefile.in: Set datadir to $(prefix)/share.
5594
5595 1994-09-15 Richard Stallman <rms@gnu.org>
5596
5597 * src/bison.s1:
5598 Update copyright notice and GPL version.
5599
5600 1994-09-15 Richard Stallman <rms@gnu.org>
5601
5602 * bison.simple:
5603 Update copyright notice and GPL version.
5604
5605 1994-07-12 Richard Stallman <rms@gnu.org>
5606
5607 * src/reduce.c, src/reader.c:
5608 entered into RCS
5609
5610 1994-05-05 David J. MacKenzie <djm@gnu.org>
5611
5612 * Makefile.in: entered into RCS
5613
5614 1994-03-26 Richard Stallman <rms@gnu.org>
5615
5616 * src/bison.s1: entered into RCS
5617
5618 1994-03-26 Richard Stallman <rms@gnu.org>
5619
5620 * bison.simple: entered into RCS
5621
5622 1994-03-25 Richard Stallman <rms@gnu.org>
5623
5624 * src/main.c: entered into RCS
5625
5626 1994-03-24 Richard Stallman <rms@gnu.org>
5627
5628 * src/conflicts.c: entered into RCS
5629
5630 1994-01-02 Richard Stallman <rms@gnu.org>
5631
5632 * Makefile.in: *** empty log message ***
5633
5634 1993-11-21 Richard Stallman <rms@gnu.org>
5635
5636 * src/bison.s1: *** empty log message ***
5637
5638 1993-11-21 Richard Stallman <rms@gnu.org>
5639
5640 * doc/bison.texinfo: entered into RCS
5641
5642 * doc/bison.texinfo: *** empty log message ***
5643
5644 1993-11-21 Richard Stallman <rms@gnu.org>
5645
5646 * bison.simple: *** empty log message ***
5647
5648 1993-10-25 David J. MacKenzie <djm@gnu.org>
5649
5650 * doc/bison.texinfo: *** empty log message ***
5651
5652 1993-10-19 Richard Stallman <rms@gnu.org>
5653
5654 * src/bison.s1: *** empty log message ***
5655
5656 1993-10-19 Richard Stallman <rms@gnu.org>
5657
5658 * bison.simple: *** empty log message ***
5659
5660 1993-10-14 Richard Stallman <rms@gnu.org>
5661
5662 * src/bison.s1: *** empty log message ***
5663
5664 1993-10-14 Richard Stallman <rms@gnu.org>
5665
5666 * bison.simple: *** empty log message ***
5667
5668 1993-09-14 David J. MacKenzie <djm@gnu.org>
5669
5670 * doc/bison.texinfo: *** empty log message ***
5671
5672 1993-09-13 Noah Friedman <friedman@gnu.org>
5673
5674 * Makefile.in: *** empty log message ***
5675
5676 1993-09-10 Richard Stallman <rms@gnu.org>
5677
5678 * src/conflicts.c: *** empty log message ***
5679
5680 * src/system.h: entered into RCS
5681
5682 1993-09-10 Richard Stallman <rms@gnu.org>
5683
5684 * doc/bison.1: entered into RCS
5685
5686 1993-09-06 Noah Friedman <friedman@gnu.org>
5687
5688 * src/version.c: entered into RCS
5689
5690 1993-09-06 Noah Friedman <friedman@gnu.org>
5691
5692 * Makefile.in: *** empty log message ***
5693
5694 1993-07-30 David J. MacKenzie <djm@gnu.org>
5695
5696 * Makefile.in: *** empty log message ***
5697
5698 1993-07-24 Richard Stallman <rms@gnu.org>
5699
5700 * src/bison.s1: *** empty log message ***
5701
5702 1993-07-24 Richard Stallman <rms@gnu.org>
5703
5704 * bison.simple: *** empty log message ***
5705
5706 1993-07-08 David J. MacKenzie <djm@gnu.org>
5707
5708 * Makefile.in: *** empty log message ***
5709
5710 1993-07-04 Richard Stallman <rms@gnu.org>
5711
5712 * src/bison.s1: *** empty log message ***
5713
5714 1993-07-04 Richard Stallman <rms@gnu.org>
5715
5716 * bison.simple: *** empty log message ***
5717
5718 1993-06-26 David J. MacKenzie <djm@gnu.org>
5719
5720 * src/getargs.c: entered into RCS
5721
5722 1993-06-26 David J. MacKenzie <djm@gnu.org>
5723
5724 * doc/bison.texinfo: *** empty log message ***
5725
5726 * doc/bison.1: New file.
5727
5728 1993-06-25 Richard Stallman <rms@gnu.org>
5729
5730 * src/getargs.c: New file.
5731
5732 1993-06-16 Richard Stallman <rms@gnu.org>
5733
5734 * src/bison.s1: *** empty log message ***
5735
5736 1993-06-16 Richard Stallman <rms@gnu.org>
5737
5738 * bison.simple: *** empty log message ***
5739
5740 1993-06-03 Richard Stallman <rms@gnu.org>
5741
5742 * src/bison.s1: New file.
5743
5744 1993-06-03 Richard Stallman <rms@gnu.org>
5745
5746 * doc/bison.texinfo: *** empty log message ***
5747
5748 1993-06-03 Richard Stallman <rms@gnu.org>
5749
5750 * bison.simple: New file.
5751
5752 1993-05-19 Richard Stallman <rms@gnu.org>
5753
5754 * doc/bison.texinfo: New file.
5755
5756 1993-05-07 Noah Friedman <friedman@gnu.org>
5757
5758 * Makefile.in: *** empty log message ***
5759
5760 1993-04-28 Noah Friedman <friedman@gnu.org>
5761
5762 * src/reader.c: *** empty log message ***
5763
5764 1993-04-23 Noah Friedman <friedman@gnu.org>
5765
5766 * src/alloc.h: entered into RCS
5767
5768 1993-04-20 David J. MacKenzie <djm@gnu.org>
5769
5770 * src/version.c: *** empty log message ***
5771
5772 * src/files.c, src/allocate.c:
5773 entered into RCS
5774
5775 * src/reader.c: *** empty log message ***
5776
5777 * src/lex.c: entered into RCS
5778
5779 * src/conflicts.c: New file.
5780
5781 * src/symtab.c: entered into RCS
5782
5783 * src/alloc.h: New file.
5784
5785 * src/LR0.c: entered into RCS
5786
5787 1993-04-18 Noah Friedman <friedman@gnu.org>
5788
5789 * src/reader.c: New file.
5790
5791 * src/version.c: *** empty log message ***
5792
5793 1993-04-18 Noah Friedman <friedman@gnu.org>
5794
5795 * Makefile.in: *** empty log message ***
5796
5797 1993-04-17 Noah Friedman <friedman@gnu.org>
5798
5799 * Makefile.in: *** empty log message ***
5800
5801 1993-04-15 Richard Stallman <rms@gnu.org>
5802
5803 * src/main.c, src/files.c:
5804 New file.
5805
5806 1993-04-15 Noah Friedman <friedman@gnu.org>
5807
5808 * configure.in: entered into RCS
5809
5810 * configure.in: *** empty log message ***
5811
5812 * configure.in: New file.
5813
5814 1993-04-14 Richard Stallman <rms@gnu.org>
5815
5816 * Makefile.in: New file.
5817
5818 1993-04-13 Richard Stallman <rms@gnu.org>
5819
5820 * src/version.c: New file.
5821
5822 1993-03-25 Richard Stallman <rms@gnu.org>
5823
5824 * src/output.c: entered into RCS
5825
5826 1992-09-25 Richard Stallman <rms@gnu.org>
5827
5828 * configure.bat: entered into RCS
5829
5830 1992-06-22 Richard Stallman <rms@gnu.org>
5831
5832 * src/vmsgetargs.c: entered into RCS
5833
5834 1992-06-22 Richard Stallman <rms@gnu.org>
5835
5836 * doc/bison.rnh: entered into RCS
5837
5838 1992-04-20 David J. MacKenzie <djm@gnu.org>
5839
5840 * README: entered into RCS
5841
5842 1992-01-22 Richard Stallman <rms@gnu.org>
5843
5844 * src/machine.h: entered into RCS
5845
5846 1991-12-21 Richard Stallman <rms@gnu.org>
5847
5848 * src/lalr.c, src/closure.c:
5849 entered into RCS
5850
5851 1991-12-20 Richard Stallman <rms@gnu.org>
5852
5853 * src/state.h: entered into RCS
5854
5855 1991-12-18 Richard Stallman <rms@gnu.org>
5856
5857 * src/print.c, src/nullable.c, src/derives.c:
5858 entered into RCS
5859
5860 1991-11-03 David J. MacKenzie <djm@gnu.org>
5861
5862 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
5863 entered into RCS
5864
5865 1988-09-09 Richard Stallman <rms@gnu.org>
5866
5867 * src/bison.hairy: entered into RCS
5868
5869 1987-12-16 Richard Stallman <rms@gnu.org>
5870
5871 * REFERENCES: entered into RCS