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