]> git.saurik.com Git - bison.git/blame - ChangeLog
* tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
[bison.git] / ChangeLog
CommitLineData
34a89c50
AD
12002-04-25 Akim Demaille <akim@epita.fr>
2
3 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
4 between `!' and the command.
5 Reported by Paul Eggert.
6
0dd1580a
RA
72002-04-24 Robert Anisko <robert@lrde.epita.fr>
8
9 * tests/calc.at: Exercise prologue splitting.
10
11 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
12 `b4_post_prologue' instead of `b4_prologue'.
13
14 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
15 muscles.
16 (output): Free pre_prologue_obstack and post_prologue_obstack.
17 * src/files.h, src/files.c (attrs_obstack): Remove.
18 (pre_prologue_obstack, post_prologue_obstack): New.
19 * src/reader.c (copy_definition): Add a parameter to specify the
20 obstack to fill, instead of using attrs_obstack unconditionally.
21 (read_declarations): Pass pre_prologue_obstack to copy_definition if
22 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
23
83c1796f
PE
242002-04-23 Paul Eggert <eggert@twinsun.com>
25
26 * data/bison.simple: Remove unnecessary commentary and white
27 space differences from 1_29-branch.
28 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
29
30 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
31 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
32 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
33 constructors or destructors.
34
35 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
36
1207eeac
AD
372002-04-23 Akim Demaille <akim@epita.fr>
38
39 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
40 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
41 location with columns.
42 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
43 All reported by Paul Eggert.
44
78ab8f67
AD
452002-04-22 Akim Demaille <akim@epita.fr>
46
47 * src/reduce.c (dump_grammar): Move to...
48 * src/gram.h, src/gram.c (grammar_dump): here.
49 Be sure to separate long item numbers.
50 Don't read the members of a rule's prec if its nil.
51
133c20e2
AD
522002-04-22 Akim Demaille <akim@epita.fr>
53
54 * src/output.c (table_size, table_grow): New.
55 (MAXTABLE): Remove, replace uses with table_size.
56 (pack_vector): Instead of dying when the table is too big, grow it.
57
9515e8a7
AD
582002-04-22 Akim Demaille <akim@epita.fr>
59
60 * data/bison.simple (yyr1): Its type is that of a token number.
61 * data/bison.c++ (r1_): Likewise.
62 * tests/regression.at (Web2c Actions): Adjust.
63
23c5a174
AD
642002-04-22 Akim Demaille <akim@epita.fr>
65
66 * src/reader.c (token_translations_init): 256 is now the default
67 value for the error token, i.e., it will be assigned another
68 number if the user assigned 256 to one of her tokens.
69 (reader): Don't force 256 to error.
70 * doc/bison.texinfo (Symbols): Adjust.
71 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
72 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
73 etc. instead of 10, 20, 30 (which was used to `jump' over error
74 (256) and undefined (2)).
75
5fbb0954
AD
762002-04-22 Akim Demaille <akim@epita.fr>
77
78 Propagate more token_number_t.
79
80 * src/gram.h (token_number_as_item_number)
81 (item_number_as_token_number): New.
82 * src/output.c (GENERATE_OUTPUT_TABLE): New.
83 Use it to create output_item_number_table and
84 output_token_number_table.
85 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
86 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
87 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
88 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
89
4f940944
AD
902002-04-22 Akim Demaille <akim@epita.fr>
91
92 * src/output.h, src/output.c (get_lines_number): Remove.
93
3ded9a63
AD
942002-04-19 Akim Demaille <akim@epita.fr>
95
96 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
97 as Lex/Flex'.
98 (Debugging): More details about enabling the debugging features.
99 (Table of Symbols): Describe $$, $n, @$, and @n.
100 Suggested by Tim Josling.
101
e0c471a9
AD
1022002-04-19 Akim Demaille <akim@epita.fr>
103
104 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
105
fecc10cd
AD
1062002-04-10 Akim Demaille <akim@epita.fr>
107
108 * src/system.h: Rely on HAVE_LIMITS_H.
109 Suggested by Paul Eggert.
110
51dec47b
AD
1112002-04-09 Akim Demaille <akim@epita.fr>
112
113 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
114 full stderr, and strip it according to the bison options, instead
115 of composing the error message from different bits.
116 This makes it easier to check for several error messages.
117 Adjust all the invocations.
118 Add an invocation exercising the error token.
119 Add an invocation demonstrating a stupid error message.
120 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
121 Adjust the tests.
122 Error message are for stderr, not stdout.
123
007a50a4
AD
1242002-04-09 Akim Demaille <akim@epita.fr>
125
126 * src/gram.h, src/gram.c (error_token_number): Remove, use
127 errtoken->number.
128 * src/reader.c (reader): Don't specify the user token number (2)
129 for $undefined, as it uselessly prevents using it.
130 * src/gram.h (token_number_t): Move to...
131 * src/symtab.h: here.
132 (state_t.number): Is a token_number_t.
133 * src/print.c, src/reader.c: Use undeftoken->number instead of
134 hard coded 2.
135 (Even though this 2 is not the same as above: the number of the
136 undeftoken remains being 2, it is its user token number which
137 might not be 2).
138 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
139 `user_token_number_max'.
140 Output `undef_token_number'.
141 * data/bison.simple, data/bison.c++: Use them.
142 Be sure to map invalid yylex return values to
143 `undef_token_number'. This saves us from gratuitous SEGV.
144
145 * tests/conflicts.at (Solved SR Conflicts)
146 (Unresolved SR Conflicts): Adjust.
147 * tests/regression.at (Web2c Actions): Adjust.
148
06446ccf
AD
1492002-04-08 Akim Demaille <akim@epita.fr>
150
151 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
152 Adding #line.
153 Remove the duplicate `typedefs'.
154 (RhsNumberType): Fix the declaration and various other typos.
155 Use __ofile__.
156 * data/bison.simple: Use __ofile__.
157 * src/scan-skel.l: Handle __ofile__.
158
62a3e4f0
AD
1592002-04-08 Akim Demaille <akim@epita.fr>
160
161 * src/gram.h (item_number_t): New, the type of item numbers in
162 RITEM. Note that it must be able to code symbol numbers as
163 positive number, and the negation of rule numbers as negative
164 numbers.
165 Adjust all dependencies (pretty many).
166 * src/reduce.c (rule): Remove this `short *' pointer: use
167 item_number_t.
168 * src/system.h (MINSHORT, MAXSHORT): Remove.
169 Include `limits.h'.
170 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
171 (shortcpy): Remove.
172 (MAXTABLE): Move to...
173 * src/output.c (MAXTABLE): here.
174 (prepare_rules): Use output_int_table to output rhs.
175 * data/bison.simple, data/bison.c++: Adjust.
176 * tests/torture.at (Big triangle): Move the limit from 254 to
177 500.
178 * tests/regression.at (Web2c Actions): Ajust.
179
180 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
181 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
182 passes, but produces negative #line number, once fixed, GCC is
183 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
184 C), it passes.
185 * src/state.h (state_h): Code input lines on ints, not shorts.
186
bb88b0fc
AD
1872002-04-08 Akim Demaille <akim@epita.fr>
188
189 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
190 and then the grammar.
191
9a636f47
AD
1922002-04-08 Akim Demaille <akim@epita.fr>
193
194 * src/system.h: No longer using strndup.
195
680e8701
AD
1962002-04-07 Akim Demaille <akim@epita.fr>
197
198 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
199 * src/output.c (output_table_data): Return the longest number.
200 (prepare_tokens): Output `token_number_max').
201 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
202 New.
203 Use them to define yy_token_number_type/TokenNumberType.
204 Use this type for yytranslate.
205 * tests/torture.at (Big triangle): Push the limit from 124 to
206 253.
207 * tests/regression.at (Web2c Actions): Adjust.
208
817e9f41
AD
2092002-04-07 Akim Demaille <akim@epita.fr>
210
211 * tests/torture.at (Big triangle): New.
212 (GNU AWK Grammar, GNU Cim Grammar): Move to...
213 * tests/existing.at: here.
214
5123689b
AD
2152002-04-07 Akim Demaille <akim@epita.fr>
216
217 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
218 nritems.
219 Adjust dependencies.
220
f3849179
AD
2212002-04-07 Akim Demaille <akim@epita.fr>
222
223 * src/reader.c: Normalize increments to prefix form.
224
bd02036a
AD
2252002-04-07 Akim Demaille <akim@epita.fr>
226
227 * src/reader.c, symtab.c: Remove debugging code.
228
db8837cb
AD
2292002-04-07 Akim Demaille <akim@epita.fr>
230
231 Rename all the `bucket's as `symbol_t'.
232
233 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
234 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
235 * src/symtab.c, src/symtab.h (bucket): Rename as...
236 (symbol_t): this.
237 (symbol_list_new, bucket_check_defined, bucket_make_alias)
238 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
239 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
240 (buckets_new, buckets_free, buckets_do): Rename as...
241 (symbol_list_new, symbol_check_defined, symbol_make_alias)
242 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
243 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
244 (symbols_new, symbols_free, symbols_do): these.
245
72a23c97
AD
2462002-04-07 Akim Demaille <akim@epita.fr>
247
248 Use lib/hash for the symbol table.
249
250 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
251 EOF.
252 * src/lex.c (lex): Set the `number' member of new terminals.
253 * src/reader.c (bucket_check_defined, bucket_make_alias)
254 (bucket_check_alias_consistence, bucket_translation): New.
255 (reader, grammar_free, readgram, token_translations_init)
256 (packsymbols): Adjust.
257 (reader): Number the predefined tokens.
258 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
259 for predefined tokens.
260 * src/symtab.h (bucket): Remove all the hash table related
261 members.
262 * src/symtab.c (symtab): Replace by...
263 (bucket_table): this.
264 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
265 (buckets_new, buckets_do): New.
266
280a38c3
AD
2672002-04-07 Akim Demaille <akim@epita.fr>
268
269 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
270 (start_symbol, max_user_token_number, semantic_parser)
271 (error_token_number): Initialize.
272 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
273 Initialize.
274 (reader): Don't.
275 (errtoken, eoftoken, undeftoken, axiom): Extern.
276
03b31c0c
AD
2772002-04-07 Akim Demaille <akim@epita.fr>
278
279 * src/gram.h (rule_s): prec and precsym are now pointers
280 to the bucket giving the priority/associativity.
281 Member `associativity' removed: useless.
282 * src/reduce.c, src/conflicts.c: Adjust.
283
8b3df748
AD
2842002-04-07 Akim Demaille <akim@epita.fr>
285
286 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
287 Properly escape the symbols' TAG when outputting them.
288
e601aa1d
AD
2892002-04-07 Akim Demaille <akim@epita.fr>
290
291 * src/lalr.h (LA): Is a bitsetv, not bitset*.
292
b0299a2e
AD
2932002-04-07 Akim Demaille <akim@epita.fr>
294
295 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
296 (LArule): this, which is an array to rule_t*.
297 * src/print.c, src/conflicts.c: Adjust.
298
d7e1f00c
AD
2992002-04-07 Akim Demaille <akim@epita.fr>
300
301 * src/gram.h (rule_t): Rename `number' as `user_number'.
302 `number' is a new member.
303 Adjust dependencies.
304 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
305
cc9305dd
AD
3062002-04-07 Akim Demaille <akim@epita.fr>
307
308 As a result of the previous patch, it is no longer needed
309 to reorder ritem itself.
310
311 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
312
b0940840
AD
3132002-04-07 Akim Demaille <akim@epita.fr>
314
315 Be sure never to walk through RITEMS, but use only data related to
316 the rules themselves. RITEMS should be banished.
317
318 * src/output.c (output_token_translations): Rename as...
319 (prepare_tokens): this.
320 In addition to `translate', prepare the muscles `tname' and
321 `toknum', which were handled by...
322 (output_rule_data): this.
323 Remove, and move the remainder of its outputs into...
324 (prepare_rules): this new routines, which also merges content from
325 (output_gram): this.
326 (prepare_rules): Be sure never to walk through RITEMS.
327 (output_stos): Rename as...
328 (prepare_stos): this.
329 (output): Always invoke prepare_states, after all, just don't use it
330 in the output if you don't need it.
331
643a5994
AD
3322002-04-07 Akim Demaille <akim@epita.fr>
333
334 * src/LR0.c (new_state): Display `nstates' as the name of the
335 newly created state.
336 Adjust to initialize first_state and last_state if needed.
337 Be sure to distinguish the initial from the final state.
338 (new_states): Create the itemset of the initial state, and use
339 new_state.
340 * src/closure.c (closure): Now that the initial state has its
341 items properly set, there is no need for a special case when
342 creating `ruleset'.
343
344 As a result, now the rule 0, reducing to $axiom, is visible in the
345 outputs. Adjust the test suite.
346
347 * tests/conflicts.at (Solved SR Conflicts)
348 (Unresolved SR Conflicts): Adjust.
349 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
350 * tests/conflicts.at (S/R in initial): New.
351
b4c4ccc2
AD
3522002-04-07 Akim Demaille <akim@epita.fr>
353
354 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
355 the RHS of the rules.
356 * src/output.c (output_gram): Likewise.
357
bba97eb2
AD
3582002-04-07 Akim Demaille <akim@epita.fr>
359
360 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
361 bucket.
362 Adjust all dependencies.
363 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
364 `number' of the buckets too.
365 * src/gram.h: Include `symtab.h'.
366 (associativity): Move to...
367 * src/symtab.h: here.
368 No longer include `gram.h'.
369
c3b407f4
AD
3702002-04-07 Akim Demaille <akim@epita.fr>
371
372 * src/gram.h, src/gram.c (rules_rhs_length): New.
373 (ritem_longest_rhs): Use it.
374 * src/gram.h (rule_t): `number' is a new member.
375 * src/reader.c (packgram): Set it.
376 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
377 the end of `rules', and count them out of `nrules'.
378 (reduce_output, dump_grammar): Adjust.
379 * src/print.c (print_grammar): It is no longer needed to check for
380 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
381 * tests/reduce.at (Reduced Automaton): New test.
382
11652ab3
AD
3832002-04-07 Akim Demaille <akim@epita.fr>
384
385 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
386 lacking `+ 1' to nrules, Bison reported as useless a token if it
387 was used solely to set the precedence of the last rule...
388
26b23c1a
AD
3892002-04-07 Akim Demaille <akim@epita.fr>
390
391 * data/bison.c++, data/bison.simple: Don't output the current file
392 name in #line, to avoid useless diffs between two identical
393 outputs under different names.
394
18bcecb0
AD
3952002-04-07 Akim Demaille <akim@epita.fr>
396
397 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
398 Normalize loops to using `< nrules + 1', not `<= nrules'.
399
fa770c86
AD
4002002-04-07 Akim Demaille <akim@epita.fr>
401
402 * TODO: Update.
403
d9b739c3
AD
4042002-04-07 Akim Demaille <akim@epita.fr>
405
406 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
407 bucket.value as bucket.number.
408
99013900
AD
4092002-04-07 Akim Demaille <akim@epita.fr>
410
411 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
412 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
413 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
414 RHS, instead of being an index in RITEMS.
415
e966383b
PE
4162002-04-04 Paul Eggert <eggert@twinsun.com>
417
418 * doc/bison.texinfo: Update copyright date.
419 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
420 (Symbols): Warn about running Bison in one character set,
421 but compiling and/or running in an incompatible one.
422 Warn about character code 256, too.
423
4242002-04-03 Paul Eggert <eggert@twinsun.com>
425
426 * src/bison.data (YYSTACK_ALLOC): Depend on whether
427 YYERROR_VERBOSE is nonzero, not whether it is defined.
428
429 Merge changes from bison-1_29-branch.
c307773e 430
8d6c48b9
PE
4312002-03-20 Paul Eggert <eggert@twinsun.com>
432
433 Merge fixes from Debian bison_1.34-1.diff.
434
435 * configure.in (AC_PREREQ): 2.53.
436
e53c6322
AD
4372002-03-20 Akim Demaille <akim@epita.fr>
438
439 * src/conflicts.c (log_resolution): Argument `resolution' is const.
440
9ffbeca7
PE
4412002-03-19 Paul Eggert <eggert@twinsun.com>
442
21db0b2a
PE
443 * src/bison.simple (YYCOPY): New macro.
444 (YYSTACK_RELOCATE): Use it.
445 Remove Type arg; no longer needed. All callers changed.
446 (yymemcpy): Remove; no longer needed.
447
9ffbeca7
PE
448 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
449 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
450
642cb8f8
AD
4512002-03-19 Akim Demaille <akim@epita.fr>
452
453 Test and fix the #line outputs.
454
455 * tests/atlocal.at (GCC): New.
456 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
457 (Prologue synch line, ,%union synch line, Postprologue synch line)
458 (Action synch line, Epilogue synch line): New tests.
459 * src/reader.c (parse_union_decl): Define the muscle stype_line.
460 * data/bison.simple, data/bison.c++: Use it.
461
3c31a486
AD
4622002-03-19 Akim Demaille <akim@epita.fr>
463
464 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
465 (Solved SR Conflicts, %expect not enough, %expect right)
466 (%expect too much): Move to...
467 * tests/conflicts.at: this new file.
468
0d8bed56
AD
4692002-03-19 Akim Demaille <akim@epita.fr>
470
471 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
472 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
473 that we can move to enums for instance.
474 * src/output.c (token_definitions_output): Output a list of
475 `token-name, token-number' instead of the #define.
476 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
477
9208d17f
AD
4782002-03-14 Akim Demaille <akim@epita.fr>
479
480 Use Gettext 0.11.1.
481
af27eacb
RA
4822002-03-09 Robert Anisko <robert@lrde.epita.fr>
483
484 * data/bison.c++: Make the user able to add members to the generated
485 parser by subclassing.
486
9101a310
RA
4872002-03-05 Robert Anisko <robert@lrde.epita.fr>
488
489 * src/reader.c (read_additionnal_code): `c' should be an integer, not
490 a character.
491 Reported by Nicolas Tisserand and Nicolas Burrus.
492
fff9bf0b
RA
4932002-03-04 Robert Anisko <robert@lrde.epita.fr>
494
495 * src/reader.c: Warn about lacking semi-colons, do not complain.
496
64dba31e
RA
4972002-03-04 Robert Anisko <robert@lrde.epita.fr>
498
499 * data/bison.c++: Remove a debug line.
500
374f5a14
RA
5012002-03-04 Robert Anisko <robert@lrde.epita.fr>
502
503 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
504 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
505 provide a default implementation.
506
bfcf1f3a
AD
5072002-03-04 Akim Demaille <akim@epita.fr>
508
509 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
510 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
511 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
512 * tests/semantic.at (Parsing Guards): Similarly.
513 * src/reader.at (readgram): Complain if the last rule is not ended
514 with a semi-colon.
515
65ccf9fc
AD
5162002-03-04 Akim Demaille <akim@epita.fr>
517
518 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
519 * src/closure.c: here.
520 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
521 RTC.
522 * src/warshall.h, src/warshall.c: Remove.
523 * tests/sets.at (Broken Closure): Adjust.
524
d0039cbc
AD
5252002-03-04 Akim Demaille <akim@epita.fr>
526
527 * src/output.c (output_skeleton): tempdir is const.
528 bytes_read is unused.
529
345cea78
AD
5302002-03-04 Akim Demaille <akim@epita.fr>
531
532 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
533 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
534 Update.
535 From Michael Hayes.
536
564801f7
AD
5372002-03-04 Akim Demaille <akim@epita.fr>
538
539 * src/closure.c (closure): `r' is unused.
540
e5352bc7
AD
5412002-03-04 Akim Demaille <akim@epita.fr>
542
543 * tests/sets.at (Broken Closure): Add the ending `;'.
544 * src/reader.at (readgram): Complain if a rule is not ended with a
545 semi-colon.
546
914feea9
AD
5472002-03-04 Akim Demaille <akim@epita.fr>
548
549 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
550 (count_sr_conflicts): Use bitset_count.
551 * src/reduce.c (inaccessable_symbols): Ditto.
552 (bits_size): Remove.
553 * src/warshall.h, src/warshall.c: Convert to bitsetv.
554
f0250de6
AD
5552002-03-04 Akim Demaille <akim@epita.fr>
556
557 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
558 * src/reduce.c: Remove the `bitset_zero's following the
559 `bitset_create's, as now it is performed by the latter.
560
ef017502
AD
5612002-03-04 Akim Demaille <akim@epita.fr>
562
563 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
564 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
565 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
566 latest sources from Michael.
567
76514394
AD
5682002-03-04 Akim Demaille <akim@epita.fr>
569
570 * src/output.c (output): Don't free the grammar.
571 * src/reader.c (grammar_free): New.
572 * src/main.c (main): Call it and don't free symtab here.
573
55024580
AD
5742002-03-04 Akim Demaille <akim@epita.fr>
575
576 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
577 before returning.
578 Reported by Benoit Perrot.
579
f9abaa2c
AD
5802002-03-04 Akim Demaille <akim@epita.fr>
581
582 Use bitset operations when possible, not loops over bits.
583
584 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
585 bitset_or.
586 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
587 * src/reduce.c (useless_nonterminals): Formatting changes.
588 * src/warshall.c (TC): Use bitset_or.
589
0e721e75
AD
5902002-03-04 Akim Demaille <akim@epita.fr>
591
592 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
593 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
594 Ditto.
595
0fb1ffb1
AD
5962002-03-04 Akim Demaille <akim@epita.fr>
597
598 * src/lalr.c (F): Now a bitset*.
599 Adjust all dependencies.
600
b86796bf
AD
6012002-03-04 Akim Demaille <akim@epita.fr>
602
603 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
604 Adjust all dependencies.
605
602bbf31
AD
6062002-03-04 Akim Demaille <akim@epita.fr>
607
608 * src/L0.c, src/LR0.h (nstates): Be size_t.
609 Adjust comparisons (signed vs unsigned).
610 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
611 bitset*.
612 Adjust all dependencies.
613
d8a0245c
AD
6142002-03-04 Akim Demaille <akim@epita.fr>
615
616 * src/closure.c (firsts): Now, also a bitset.
617 Adjust all dependencies.
618 (varsetsize): Remove, now unused.
619 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
620
34ba9743
AD
6212002-03-04 Akim Demaille <akim@epita.fr>
622
623 * src/print.c: Convert to use bitset.h, not hand coded iterations
624 over ints.
625
ed86e78c
AD
6262002-03-04 Akim Demaille <akim@epita.fr>
627
628 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
629
dfdb1797
AD
6302002-03-04 Akim Demaille <akim@epita.fr>
631
632 * src/closure.c (ruleset): Be a bitset.
633 (rulesetsize): Remove.
634
7086e707
AD
6352002-03-04 Akim Demaille <akim@epita.fr>
636
637 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
638 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
639 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
640 * src/closure.c (fderives): Be an array of bitsets.
641
98254360
RA
6422002-02-28 Robert Anisko <robert@lrde.epita.fr>
643
644 * data/bison.c++: Merge the two generated headers. Insert a copyright
645 notice in each output file.
646
a75c057f
AD
6472002-02-28 Akim Demaille <akim@epita.fr>
648
649 * data/bison.c++: Copy the prologue of bison.simple to fetch
650 useful M4 definitions, such as b4_header_guard.
651
06b00abc
AD
6522002-02-25 Akim Demaille <akim@epita.fr>
653
654 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
655 translator friendly scheme for the bgr
656 copyright notice.
06b00abc 657
70e7d534
AD
6582002-02-25 Akim Demaille <akim@epita.fr>
659
660 * src/output.c (header_output): Remove, now handled completely via
661 M4.
662
abe017f6
AD
6632002-02-25 Akim Demaille <akim@epita.fr>
664
665 * m4/m4.m4: New, from CVS Autoconf.
666 * configure.in: Invoke it.
667 * src/output.c (output_skeleton): Use its result instead of the
668 hard coded name.
669
381fb12e
AD
6702002-02-25 Akim Demaille <akim@epita.fr>
671
672 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
673 Fileutils 4.1.5.
674 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
675 * src/output.c (output_skeleton): Use mkstemp to create a real
676 temporary file.
677 Move the filling of `skeleton' and its muscle to...
678 (prepare): here.
679 (output): Move the definition of the prologue muscle to...
680 (prepare): here.
681 * src/system.h (DEFAULT_TMPDIR): New.
682
6f38107f
PE
6832002-02-14 Paul Eggert <eggert@twinsun.com>
684
685 Remove the support for C++ namespace cleanliness; it was
686 causing more problems than it was curing, since it didn't work
687 properly on some nonstandard C++ compilers. This can wait
688 for a proper C++ parser.
689
690 * NEWS: Document this.
691 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
692 of C++, as it's treated like C now.
693 * src/bison.simple (YYSTD): Remove.
694 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
695 Treat C++ just like Standard C instead of trying to support
696 namespace cleanliness.
697
80cce3da
AD
6982002-02-14 Akim Demaille <akim@epita.fr>
699
700 * tests/regression.at (else): Adjust to Andreas' change.
701
842e8679
AD
7022002-02-14 Akim Demaille <akim@epita.fr>
703
704 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
705
4bda3f10
AD
7062002-02-13 Andreas Schwab <schwab@suse.de>
707
708 * src/output.c (output_rule_data): Don't output NULL, it might
709 not be defined yet.
710
4162fa07 7112002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 712
4162fa07
RA
713 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
714 (Copyright notice): Update.
b418ecd8 715
bd16a5dc
AD
7162002-02-11 Akim Demaille <akim@epita.fr>
717
718 * tests/regression.at (%nonassoc and eof): Don't include
719 nonportable headers.
720
8d69a1a3
RA
7212002-02-08 Robert Anisko <robert@lrde.epita.fr>
722
723 * data/bison.c++: Correct error recovery. Make the user able to
724 initialize the starting location.
725
9b2d0677
AD
7262002-02-07 Akim Demaille <akim@epita.fr>
727
728 * tests/input.at: New.
729
69e2658b
RA
7302002-02-07 Robert Anisko <robert@lrde.epita.fr>
731
732 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 733 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
734 directives around tables only needed for debugging.
735
4aacc3a7
RA
7362002-02-07 Robert Anisko <robert@lrde.epita.fr>
737
738 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
739 C++ parsers.
740 (yy::b4_name::parse): Use print_.
741
762a801e
RA
7422002-02-07 Robert Anisko <robert@lrde.epita.fr>
743
744 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
745
4bb2bc3f
RA
7462002-02-07 Robert Anisko <robert@lrde.epita.fr>
747
748 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
749 C++ parsers.
750 (yy::b4_name::parse): Build verbose error messages, and use error_.
751
6b45a3ca
RA
7522002-02-06 Robert Anisko <robert@lrde.epita.fr>
753
754 * data/bison.c++: Fix m4 quoting in comments.
755
50997c6e
RA
7562002-02-06 Robert Anisko <robert@lrde.epita.fr>
757
758 * data/bison.c++: Adjust the parser code. Fix some muscles that were
759 not expanded by m4.
760
3f3eed27
AD
7612002-02-05 Akim Demaille <akim@epita.fr>
762
763 * data/bison.c++: Adjust to the M4 back end.
764 More is certainly needed.
765
be2a1a68
AD
7662002-02-05 Akim Demaille <akim@epita.fr>
767
768 Give a try to M4 as a back end.
769
770 * lib/readpipe.c: New, from wdiff.
771 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
772 BISON_HAIRY.
773 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
774 specific values. Now it is m4 that performs the lookup.
775 * src/parse-skel.y: Remove.
776 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
777 * src/output.c (actions_output, guards_output)
778 (token_definitions_output): No longer keeps track of the output
779 line number, hence remove the second argument.
780 (guards_output): Check against the guard member of a rule, not the
781 action member.
782 Adjust callers.
783 (output_skeleton): Don't look for the skeleton location, let m4 do
784 that.
785 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
786 file will be used.
787 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
788 (prepare): Given that for the time being changesyntax is not
789 usable in M4, rename the muscles using `-' to `_'.
790 Define `defines_flag', `output_parser_name' and `output_header_name'.
791 * src/output.h (actions_output, guards_output)
792 (token_definitions_output): Adjust prototypes.
793 * src/scan-skel.l: Instead of scanning the skeletons, it now
794 processes the output of m4: `__oline__' and `#output'.
795 * data/bison.simple: Adjust to be used by M4(sugar).
796 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
797 to date.
798 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
799 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
800 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
801 shamelessly stolen from CVS Autoconf.
802
beda758b
AD
8032002-02-05 Akim Demaille <akim@epita.fr>
804
805 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
806 * configure.in: Check for the declarations of free and malloc.
807 * src/muscle_tab.c: Adjust.
808
5ece6d43
AD
8092002-02-05 Akim Demaille <akim@epita.fr>
810
811 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
812 which have no values.
813
5bb18f9a
AD
8142002-02-05 Akim Demaille <akim@epita.fr>
815
816 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
817 * data/: here.
818
894dd62e
PE
8192002-01-29 Paul Eggert <eggert@twinsun.com>
820
821 * src/bison.simple (YYSIZE_T): Do not define merely because
822 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
823 On some platforms, <alloca.h> does not declare YYSTD (size_t).
824
82841af7
AD
8252002-01-27 Akim Demaille <akim@epita.fr>
826
827 Fix `%nonassoc and eof'.
828
829 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
830 which were not properly copied! Replace
831 memcpy (res->errs, src->errs, src->nerrs);
832 with
833 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
834 !!!
835 * tests/regression.at (%nonassoc and eof): Adjust to newest
836 Autotest: `.' is not in the PATH.
837
318b76e9
AD
8382002-01-27 Akim Demaille <akim@epita.fr>
839
840 * tests/sets.at (AT_EXTRACT_SETS): New.
841 (Nullable): Use it.
842 (Firsts): New.
843
30d2f3d5
AD
8442002-01-26 Akim Demaille <akim@epita.fr>
845
846 * tests/actions.at, tests/calc.at, tests/headers.at,
847 * tests/torture.at: Adjust to the newest Autotest which no longer
848 forces `.' in the PATH.
849
30f8c395
AD
8502002-01-25 Akim Demaille <akim@epita.fr>
851
852 * tests/regression.at (%nonassoc and eof): New.
853 Suggested by Robert Anisko.
854
29ae55f1
AD
8552002-01-24 Akim Demaille <akim@epita.fr>
856
857 Bison dumps core when trying to complain about broken input files.
858 Reported by Cris van Pelt.
859
860 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
861 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
862 into...
863 (Invalid inputs): Strengthen: exercise parse_percent_token.
864
2b548aa6
RA
8652002-01-24 Robert Anisko <robert.anisko@epita.fr>
866
867 * src/Makefile.am: Add bison.c++.
868 * src/bison.c++: New skeleton.
869
bb0146c2
AD
8702002-01-21 Paolo Bonzini <bonzini@gnu.org>
871
872 * po/it.po: New.
873
bec30531
AD
8742002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
875
876 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
877
fc6edc45
MA
8782002-01-20 Marc Autret <marc@gnu.org>
879
880 * src/files.c (compute_output_file_names): Fix
881
5e5d5415
MA
8822002-01-20 Marc Autret <marc@gnu.org>
883
884 * tests/output.at: New test.
885 * src/files.c (compute_base_names): Don't map extensions when
886 the YACC flag is set, use defaults.
887 Reported by Evgeny Stambulchik.
888
44ea3fbd
MA
8892002-01-20 Marc Autret <marc@gnu.org>
890
bb0146c2 891 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
892 compilers as well (i.e. the vendor C compiler).
893 Suggested by Albert Chin-A-Young.
894
338963d1
TVH
8952002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
896
897 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
898 canonical definition.
899 * src/system.h: Use the canonical definition for PARAMS (avoids
900 a conflict with the macro from lib/hash.h).
901
c57b2479
AD
9022002-01-11 Akim Demaille <akim@epita.fr>
903
904 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 905 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 906
b85810ae
AD
9072002-01-09 Akim Demaille <akim@epita.fr>
908
909 * src/files.c, src/files.h (output_infix): New.
910 (tab_extension): Remove.
911 (compute_base_names): Compute the former, drop the latter.
912 * src/output.c (prepare): Insert the muscles `output-infix', and
913 `output-suffix'.
914 * src/parse-skel.y (string, string.1): New.
915 (section.header): Use it.
916 (section.yacc): Remove.
917 (prefix): Remove too.
918 * src/scan-skel.l: Adjust.
919 * src/bison.simple, src/bison.hairy: Adjust.
920
cae60122
AD
9212002-01-09 Akim Demaille <akim@epita.fr>
922
923 * configure.in (WERROR_CFLAGS): Compute it.
924 * src/Makefile.am (CFLAGS): Pass it.
925 * tests/atlocal.in (CFLAGS): Idem.
926 * src/files.c: Fix a few warnings.
927 (get_extension_index): Remove, unused.
928
ae404801
AD
9292002-01-08 Akim Demaille <akim@epita.fr>
930
931 * src/getargs.c (AS_FILE_NAME): New.
932 (getargs): Use it to convert DOSish file names.
933 * src/files.c (base_name): Rename as full_base_name to avoid
934 clashes with `base_name ()'.
935 (filename_split): New.
936 (compute_base_names): N-th rewrite, using filename_split.
937
22312b71
AD
9382002-01-08 Akim Demaille <akim@epita.fr>
939
940 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
941 New, stolen from the Fileutils 4.1.
942 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
943 * configure.in: Check for the presence of memrchr, and of its
944 prototype.
945
a67cef01
TVH
9462002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
947
948 * lib/hash.h (__P): Added definition for this macro.
949 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
950 BUILT_SOURCES, to ensure they are generated first.
951 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
952 %error-verbose to allow bootstrapping with bison 1.30x.
953
2b25d624
AD
9542002-01-06 Akim Demaille <akim@epita.fr>
955
956 * src/reader.c (parse_braces): Don't fetch the next char, the
957 convention is to fetch on entry.
958 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
959 'switch' without a following semicolon.
960 * tests/regression.at (braces parsing): New.
961
3460813b
AD
9622002-01-06 Akim Demaille <akim@epita.fr>
963
964 Bison is dead wrong in its RR conflict reports.
965
966 * tests/torture.at (GNU Cim Grammar): New.
967 * src/conflicts.c (count_rr_conflicts): Fix.
968
73784c64
AD
9692002-01-06 Akim Demaille <akim@epita.fr>
970
971 Creating package.m4 from configure.ac causes too many problems.
972
973 * tests/Makefile.am (package.m4): Create it by hand,
974 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
975
25d81090
AD
9762002-01-06 Akim Demaille <akim@epita.fr>
977
978 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
979 skeleton.h.
980
a9b8959e
PE
9812002-01-04 Paul Eggert <eggert@twinsun.com>
982
983 * doc/bison.texinfo (Debugging):
984 Remove YYSTDERR; it's no longer defined or used.
985 Also, s/cstdio.h/cstdio/.
986
25d81090
AD
9872002-01-03 Akim Demaille <akim@epita.fr>
988
989 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
990
1109455c
AD
9912002-01-03 Akim Demaille <akim@epita.fr>
992
993 * src/parse-skel.y (process_skeleton): Don't bind the parser's
994 tracing code to --trace, wait for a better --trace option, with
995 args.
996
7ea5e977
AD
9972002-01-03 Akim Demaille <akim@epita.fr>
998
999 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1000 The ISO C++ standard is extremely clear about it: stderr is
1001 considered a macro, not a regular symbol (see table 94 `Header
1002 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1003 Therefore std:: does not apply to it. It still does with fprintf.
1004 Also, s/cstdio.h/cstdio/.
1005
fab5b110
AD
10062002-01-03 Akim Demaille <akim@epita.fr>
1007
1008 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1009 for non system headers.
1010
aed7fd9b
AD
10112002-01-02 Akim Demaille <akim@epita.fr>
1012
1013 Equip the skeleton chain with location tracking, runtime trace,
1014 pure parser and scanner.
1015
1016 * src/parse-skel.y: Request a pure parser, locations, and prefix
1017 renaming.
1018 (%union): Having several members with the same type does not help
1019 type mismatches, simplify.
1020 (YYPRINT, yyprint): New.
1021 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1022 (skel_error): this.
1023 Handle locations.
1024 * src/scan-skel.l: Adjust to these changes.
1025 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1026 (LOCATION_PRINT, skel_control_t): New.
1027
24fad99e
AD
10282001-12-30 Akim Demaille <akim@epita.fr>
1029
1030 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1031 replace `gb' with BLANKS.
1032 * src/scan-skel.l: Adjust.
1033
a4b36db4
AD
10342001-12-30 Akim Demaille <akim@epita.fr>
1035
1036 * src/system.h: We don't need nor want bcopy.
1037 Throw away MS-DOS crap: we don't need getpid.
1038 * configure.in: We don't need strndup. It was even causing
1039 problems: because Flex includes the headers *before* us,
1040 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1041 not visible.
1042 * lib/xstrndup.c: New.
1043 * src/scan-skel.l: Use it.
1044 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1045 * src/parse-skel.y: Use %directives instead of #defines.
1046
1239777d
AD
10472001-12-30 Akim Demaille <akim@epita.fr>
1048
1049 * src/skeleton.h: New.
1050 * src/output.c (output_parser, output_master_parser): Remove, dead
1051 code.
1052 * src/output.h (get_lines_number, actions_output, guards_output)
1053 (token_definitions_output): Prototype them.
1054 * src/parse-skel.y: Add the license notice.
1055 Include output.h and skeleton.h.
1056 (process_skeleton): Returns void, and takes a single parameter.
1057 * src/scan-skel.l: Add the license notice.
1058 Include skeleton.h.
1059 Don't use %option yylineno: it seems that then Flex imagines
1060 REJECT has been used, and therefore it won't reallocate its
1061 buffers (which makes no other sense to me than a bug). It results
1062 in warnings for `unused: yy_flex_realloc'.
1063
9b3add5b
RA
10642001-12-30 Robert Anisko <robert.anisko@epita.fr>
1065
1066 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1067 (MUSCLE_INSERT_PREFIX): ...to there.
1068 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1069 (MUSCLE_INSERT_PREFIX): Move from here...
1070
1071 * src/bison.hairy: Add a section directive. Put braces around muscle
1072 names. This parser skeleton is still broken, but Bison should not
1073 choke on a bad muscle 'syntax'.
1074 * src/bison.simple: Add a section directive. Put braces around muscle
1075 names.
1076
1077 * src/files.h (strsuffix, stringappend): Add declarations.
1078 (tab_extension): Add declaration.
1079 (short_base_name): Add declaration.
1080
1081 * src/files.c (strsuffix, stringappend): No longer static. These
1082 functions are used in the skeleton parser.
1083 (tab_extension): New.
1084 (compute_base_names): Use the computations done in this function
fab5b110 1085 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
1086 names.
1087 (short_base_name): No longer static.
1088
1089 * src/output.c (output_skeleton): New.
1090 (output): Disable call to output_master_parser, and give a try to
1091 a new skeleton handling system.
1092 (guards_output, actions_output): No longer static.
1093 (token_definitions_output, get_lines_number): No longer static.
1094
1095 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1096
fab5b110 1097 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
1098 parse-skel.y.
1099
1100 * src/parse-skel.y: New file.
1101 * src/scan-skel.l: New file.
1102
b5b61c61
AD
11032001-12-29 Akim Demaille <akim@epita.fr>
1104
1105 %name-prefix is broken.
1106
1107 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1108 Adjust all dependencies.
1109 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1110 %name-prefix.
1111
1112 Renaming yylval but not yylloc is not consistent. Now we do.
1113
1114 * src/bison.simple: Prefix yylloc if used.
1115 * doc/bison.texinfo (Decl Summary): Document that.
1116
8c9a50be
AD
11172001-12-29 Akim Demaille <akim@epita.fr>
1118
1119 * doc/bison.texinfo: Promote `%long-directive' over
1120 `%long_directive'.
1121 Remove all references to fixed-output-files, yacc is enough.
1122
d99361e6
AD
11232001-12-29 Akim Demaille <akim@epita.fr>
1124
1125 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1126 user prologue. These are defaults.
1127 * tests/actions.at (Mid-rule actions): Make sure the user can
1128 define YYDEBUG and YYERROR_VERBOSE.
1129
b9cecb91
AD
11302001-12-29 Akim Demaille <akim@epita.fr>
1131
1132 * src/output.c (header_output): Don't forget to export YYLTYPE and
1133 yylloc.
1134 * tests/headers.at (export YYLTYPE): New, make sure it does.
1135 * tests/regression.at (%union and --defines, Invalid CPP headers):
1136 Move to...
1137 * tests/headers.at: here.
1138
aea13e97
AD
11392001-12-29 Akim Demaille <akim@epita.fr>
1140
1141 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1142
931394cb
AD
11432001-12-29 Akim Demaille <akim@epita.fr>
1144
1145 * tests/actions.at (Mid-rule actions): Output on a single line
1146 instead of several.
1147
704a47c4
AD
11482001-12-29 Akim Demaille <akim@epita.fr>
1149
1150 * doc/bison.texinfo: Formatting changes.
1151
091e20bb
AD
11522001-12-29 Akim Demaille <akim@epita.fr>
1153
1154 Don't store the token defs in a muscle, just be ready to output it
1155 on command. Now possible via `symbols'. Fixes a memory leak.
1156
1157 * src/output.c (token_definitions_output): New.
1158 (output_parser, header_output): Use it.
1159 * src/reader.c (symbols_save): Remove.
1160
cce71710
AD
11612001-12-29 Akim Demaille <akim@epita.fr>
1162
1163 * src/bison.simple: Do not provide a default for YYSTYPE and
1164 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1165 default.
1166
82c035a8
AD
11672001-12-29 Akim Demaille <akim@epita.fr>
1168
1169 Mid-rule actions are simply... ignored!
1170
1171 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1172 the empty-rule associated to the dummy symbol, not to the host
1173 rule.
1174 * tests/actions.at (Mid-rule actions): New.
1175
8419d367
AD
11762001-12-29 Akim Demaille <akim@epita.fr>
1177
1178 Memory leak.
1179
1180 * src/reader.c (reader): Free grammar.
1181
375d5806
AD
11822001-12-29 Akim Demaille <akim@epita.fr>
1183
1184 Memory leak.
1185
1186 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1187 since it allocates it for each state, although only one is needed.
1188 (allocate_storage): Do it here.
1189
f51cb8ff
AD
11902001-12-29 Akim Demaille <akim@epita.fr>
1191
1192 * src/options.h, src/options.c (create_long_option_table): Rename
1193 as...
1194 (long_option_table_new): this, with a clearer prototype.
1195 (percent_table): Remove, unused,
1196 * src/getargs.c (getargs): Adjust.
1197
29e88316
AD
11982001-12-29 Akim Demaille <akim@epita.fr>
1199
1200 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1201 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1202 as states.
1203
b9f71f19
AD
12042001-12-29 Akim Demaille <akim@epita.fr>
1205
1206 * src/lalr.c (build_relations): Rename `states' as `states1'.
1207 Sorry, I don't understand exactly what it is, no better name...
1208
1a2b5d37
AD
12092001-12-29 Akim Demaille <akim@epita.fr>
1210
1211 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1212 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1213 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1214 as rules.
1215
1cca533e
AD
12162001-12-29 Akim Demaille <akim@epita.fr>
1217
1218 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1219 ago.
1220
c03ae966
AD
12212001-12-29 Akim Demaille <akim@epita.fr>
1222
1223 * src/reader.c, src/reader.h (user_toknums): Remove.
1224 Adjust all users to use symbols[i]->user_token_number.
1225
5a670b1e
AD
12262001-12-29 Akim Demaille <akim@epita.fr>
1227
1228 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1229 Adjust all users to use symbols[i]->prec or ->assoc.
1230
ad949da9
AD
12312001-12-29 Akim Demaille <akim@epita.fr>
1232
1233 * src/reader.c, src/reader.h (tags): Remove.
1234 Adjust all users to use symbols[i]->tag.
1235
0e78e603
AD
12362001-12-29 Akim Demaille <akim@epita.fr>
1237
1238 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1239 and rule_table.
1240 * src/reader.c (packsymbols): Fill this table.
1241 Drop sprec.
1242 * src/conflicts.c (resolve_sr_conflict): Adjust.
1243 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1244 single table.
1245 Use symbols[i]->tag instead of tags[i].
1246
213e640e
AD
12472001-12-29 Akim Demaille <akim@epita.fr>
1248
1249 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1250 In addition, put a comment in there, to replace...
1251 * tests/regression.at (%union and C comments): Remove.
1252
e7b8bef1
AD
12532001-12-29 Akim Demaille <akim@epita.fr>
1254
1255 * tests/regression.at (Web2c Actions): Blindly move the actual
1256 output as expected output. The contents *seem* right to me, but I
1257 can't pretend reading perfectly parser tables... Nonetheless, all
1258 the other tests pass correctly, the table look OK, even though the
1259 presence of `$axiom' is to be noted: AFAICS it is useless (but
1260 harmless).
1261
b68e7744
AD
12622001-12-29 Akim Demaille <akim@epita.fr>
1263
1264 * src/reader.c (readgram): Don't add the rule 0 if there were no
1265 rules read. In other words, add it _after_ having performed
1266 grammar sanity checks.
1267 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1268
78d5bae9
AD
12692001-12-29 Akim Demaille <akim@epita.fr>
1270
1271 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1272 visible, and some states have now a different number.
1273
ff442794
AD
12742001-12-29 Akim Demaille <akim@epita.fr>
1275
1276 * src/reader.c (readgram): Bind the initial rule's lineno to that
1277 of the first rule.
1278 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1279 (Solved SR Conflicts): Adjust rule 0's line number.
1280
610ab194
AD
12812001-12-29 Akim Demaille <akim@epita.fr>
1282
1283 Fix the `GAWK Grammar' failure.
1284
1285 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1286 the reductions of the first state which was mistakenly confused
1287 with the final state because precisely final_state was initialized
1288 to 0.
1289 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1290 now noticed by Bison.
1291 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1292 have a reduction on $default.
1293
29d29c8f
AD
12942001-12-29 Akim Demaille <akim@epita.fr>
1295
1296 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1297 rule line numbers.
1298 * src/closure.c (print_closure): Likewise.
1299 * src/derives.c (print_derives): Likewise.
1300 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1301 now.
1302
7c6b64d0
AD
13032001-12-29 Akim Demaille <akim@epita.fr>
1304
1305 * src/lalr.c (lookaheads_print): New.
1306 (lalr): Call it when --trace-flag.
1307 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1308 are dumped.
1309
3d4daee3
AD
13102001-12-29 Akim Demaille <akim@epita.fr>
1311
1312 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1313 when walking through ritem, even via rule->rhs.
1314 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1315 (useful_production, useless_nonterminals): Likewise.
1316 (reduce_grammar_tables): Likewise, plus update nritems.
1317 * src/nullable.c (set_nullable): Likewise.
1318 * src/lalr.c (build_relations): Likewise.
1319 * tests/sets.at (Nullable): Adjust.
1320 Fortunately, now, the $axiom is no longer nullable.
1321
9e7f6bbd
AD
13222001-12-29 Akim Demaille <akim@epita.fr>
1323
1324 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1325 the 0-sentinel.
1326 * src/gram.c (ritem_longest_rhs): Likewise.
1327 * src/reduce.c (nonterminals_reduce): Likewise.
1328 * src/print_graph.c (print_graph): Likewise.
1329 * src/output.c (output_rule_data): Likewise.
1330 * src/nullable.c (set_nullable): Likewise.
1331
255ef638
AD
13322001-12-29 Akim Demaille <akim@epita.fr>
1333
1334 * src/output.c: Comment changes.
1335
0d8a7363
AD
13362001-12-27 Paul Eggert <eggert@twinsun.com>
1337
1338 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1339 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1340 Sparc, as they were causing more porting problems than the
1341 (minor) performance improvement was worth.
1342
1343 Also, catch up with 1.31's YYSTD.
1344
3db472b9
AD
13452001-12-27 Akim Demaille <akim@epita.fr>
1346
1347 * src/output.c (output_gram): Rely on nritems, not the
1348 0-sentinel. See below.
1349 Use -1 as separator, not 0.
1350 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1351 Rely on -1 as separator in yyrhs, instead of 0.
1352 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1353 twice `Now at end of input', therefore there are two lines less to
1354 expect.
1355
b365aa05
AD
13562001-12-27 Akim Demaille <akim@epita.fr>
1357
1358 * tests/regression.at (Unresolved SR Conflicts):
1359 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1360 below.
1361
30171f79
AD
13622001-12-27 Akim Demaille <akim@epita.fr>
1363
1364 * src/LR0.c (new_state): Recognize the final state by the fact it
1365 is reached by eoftoken.
1366 (insert_start_shifting_state, insert_eof_shifting_state)
1367 (insert_accepting_state, augment_automaton): Remove, since now
1368 these states are automatically computed from the initial state.
1369 (generate_states): Adjust.
1370 * src/print.c: When reporting a rule number to the user, substract
1371 1, so that the axiom rule is rule 0, and the first user rule is 1.
1372 * src/reduce.c: Likewise.
1373 * src/print_graph.c (print_core): For the time being, just as for
1374 the report, depend upon --trace-flags to dump the full set of
1375 items.
1376 * src/reader.c (readgram): Once the grammar read, insert the rule
1377 0: `$axiom: START-SYMBOL $'.
1378 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1379 number of the states has changed (the final state is no longer
1380 necessarily the last), catch up.
1381
75142d45
AD
13822001-12-27 Akim Demaille <akim@epita.fr>
1383
1384 Try to make the use of the eoftoken valid. Given that its value
1385 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1386 is used instead of > 0 where appropriate, (ii), depend upon nritems
1387 instead of the 0-sentinel.
1388
1389 * src/gram.h, src/gram.c (nritems): New.
1390 Expected to be duplication of nitems, but for the time being...
1391 * src/reader.c (packgram): Assert nritems and nitems are equal.
1392 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1393 * src/closure.c (print_closure, print_fderives): Likewise.
1394 * src/gram.c (ritem_print): Likewise.
1395 * src/print.c (print_core, print_grammar): Likewise.
1396 * src/print_graph.c: Likewise.
1397
b7c49edf
AD
13982001-12-27 Akim Demaille <akim@epita.fr>
1399
1400 * src/main.c (main): If there are complains after grammar
1401 reductions, then output the report anyway if requested, then die.
1402 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1403 * src/reader.c (eoftoken): New.
1404 (parse_token_decl): If the token being defined has value `0', it
1405 is the eoftoken.
1406 (packsymbols): No longer hack `tags' to insert `$' by hand.
1407 Be sure to preserve the value of the eoftoken.
1408 (reader): Make sure eoftoken is defined.
1409 Initialize nsyms to 0: now eoftoken is created just like the others.
1410 * src/print.c (print_grammar): Don't special case the eof token.
1411 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1412 lie anyway, albeit pleasant.
1413 * tests/calc.at: Exercise error messages with eoftoken.
1414 Change the grammar so that empty input is invalid.
1415 Adjust expectations.
1416 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1417
ec2da99f
AD
14182001-12-27 Akim Demaille <akim@epita.fr>
1419
1420 * configure.in: Check the protos of strchr ans strspn.
1421 Replace strchr if needed.
1422 * src/system.h: Provide the protos of strchr, strspn and memchr if
1423 missing.
1424 * lib/strchr.c: New.
1425 * src/reader.c (symbols_save): Use strchr.
1426
8adfa272
AD
14272001-12-27 Akim Demaille <akim@epita.fr>
1428
1429 * src/print.c, src/print_graph.c (escape): New.
1430 Use it to quote the TAGS outputs.
1431 * src/print_graph.c (print_state): Now errors are in red, and
1432 reductions in green.
1433 Prefer high to wide: output the state number on a line of its own.
1434
80dac38c
AD
14352001-12-27 Akim Demaille <akim@epita.fr>
1436
1437 * src/state.h, src/state.c (reductions_new): New.
1438 * src/LR0.c (set_state_table): Let all the states have a
1439 `reductions', even if reduced to 0.
1440 (save_reductions): Adjust.
1441 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1442 * src/print.c (print_reductions, print_actions): Adjust.
1443 * src/output.c (action_row): Adjust.
1444
2cec70b9
AD
14452001-12-27 Akim Demaille <akim@epita.fr>
1446
1447 * src/state.h, src/state.c (errs_new, errs_dup): New.
1448 * src/LR0.c (set_state_table): Let all the states have an errs,
1449 even if reduced to 0.
1450 * src/print.c (print_errs, print_reductions): Adjust.
1451 * src/output.c (output_actions, action_row): Adjust.
1452 * src/conflicts.c (resolve_sr_conflict): Adjust.
1453
13ca549a
AD
14542001-12-27 Akim Demaille <akim@epita.fr>
1455
1456 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1457
5092aba5
AD
14582001-12-27 Akim Demaille <akim@epita.fr>
1459
1460 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1461 * src/print.c: here.
1462 (lookaheadset, shiftset): New, used as additional storage by
1463 print_reductions.
1464 (print_results): Adjust.
1465 (print_shifts, print_gotos, print_errs): New, extracted from...
1466 (print_actions): here.
1467 * src/print_graph.c (print_actions): Remove dead code.
1468
11e2beca
AD
14692001-12-27 Akim Demaille <akim@epita.fr>
1470
1471 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1472 `$n' and `@n'.
1473
dac3c910
AD
14742001-12-27 Akim Demaille <akim@epita.fr>
1475
1476 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1477 (build_relations): Adjust.
1478
d0b0fefa
AD
14792001-12-27 Akim Demaille <akim@epita.fr>
1480
1481 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1482 duplication.
1483
adc8c848
AD
14842001-12-27 Akim Demaille <akim@epita.fr>
1485
1486 * src/reader.c (packgram): Catch nitems overflows.
1487
14d293ac
AD
14882001-12-27 Akim Demaille <akim@epita.fr>
1489
1490 * src/files.c, src/files.h (guard_obstack): Remove.
1491 * src/output.c (output): Adjust.
1492 * src/reader.c (parse_braces): New, factoring...
1493 (copy_action, copy_guard): these two which are renamed as...
1494 (parse_action, parse_guard): these.
1495 As a voluntary consequence, using braces around guards is now
1496 mandatory.
1497
f499b062
AD
14982001-12-27 Akim Demaille <akim@epita.fr>
1499
1500 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1501 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1502 members.
1503 (symbol_list_new): Adjust.
1504 (copy_action): action_line is the first line, not the last.
1505 (copy_guard): Just as for actions, store the `action' only, not
1506 the switch/case/break flesh.
1507 Don't parse the user action that might follow the guard, let...
1508 (readgram): do it, i.e., now, there can be an action after a
1509 guard.
1510 In other words the guard is just explicitly optional.
1511 (packgram): Adjust.
1512 * src/output.c (guards_output): New.
1513 (output_parser): Call it when needed.
1514 (output): Also free the guard and attrs obstacks.
1515 * src/files.c, src/files.h (obstack_save): Remove.
1516 (output_files): Remove.
1517 As a result, if one needs the former `.act' file, using an
1518 appropriate skeleton which requires actions and guards is now
1519 required.
1520 * src/main.c (main): Adjust.
1521 * tests/semantic.at: New.
1522 * tests/regression.at: Use `input.y' as input file name.
1523 Avoid 8+3 problems by requiring input.c when the test needs the
1524 parser.
1525
d945f5cd
AD
15262001-12-27 Akim Demaille <akim@epita.fr>
1527
1528 * src/reader.c (symbol_list_new): Be sure to initialize all the
1529 fields.
1530
d200e455
AD
15312001-12-27 Akim Demaille <akim@epita.fr>
1532
1533 All the hacks using a final pseudo state are now useless.
1534
1535 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1536 * src/lalr.c (nLA): New.
1537 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1538 instead of lookaheadsp from the pseudo state (nstate + 1).
1539
f9507c28
AD
15402001-12-27 Akim Demaille <akim@epita.fr>
1541
1542 * src/output.c (action_row, token_actions): Use a state_t instead
1543 of a integer, and nlookaheads instead of the following state's
1544 lookaheadsp.
1545
065fbd27
AD
15462001-12-27 Akim Demaille <akim@epita.fr>
1547
1548 * src/conflicts.c (log_resolution, flush_shift)
1549 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1550 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1551 (conflicts_print, print_reductions): Use a state_t instead of an
1552 integer when referring to a state.
1553 As much as possible, depend upon nlookaheads, instead of the
1554 `lookaheadsp' member of the following state (since lookaheads of
1555 successive states are successive, the difference between state n + 1
1556 and n served as the number of lookaheads for state n).
1557 * src/lalr.c (add_lookback_edge): Likewise.
1558 * src/print.c (print_core, print_actions, print_state)
1559 (print_results): Likewise.
1560 * src/print_graph.c (print_core, print_actions, print_state)
1561 (print_graph): Likewise.
1562 * src/conflicts.h: Adjust.
1563
1b177bd7
AD
15642001-12-27 Akim Demaille <akim@epita.fr>
1565
1566 * src/bison.hairy: Formatting/comment changes.
1567 ANSIfy.
1568 Remove `register' indications.
1569 Add plenty of `static'.
1570
7742ddeb
AD
15712001-12-27 Akim Demaille <akim@epita.fr>
1572
1573 * src/output.c (prepare): Drop the muscle `ntbase' which
1574 duplicates ntokens.
1575 * src/bison.simple: Formatting/comment changes.
1576 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1577 is an undocumented synonym.
1578
1fa14068
AD
15792001-12-22 Akim Demaille <akim@epita.fr>
1580
1581 * src/output.c (output_table_data): Change the prototype to use
1582 `int' for array ranges: some invocations do pass an int, not a
1583 short.
1584 Reported by Wayne Green.
1585
b9752825
AD
15862001-12-22 Akim Demaille <akim@epita.fr>
1587
1588 Some actions of web2c.y are improperly triggered.
1589 Reported by Mike Castle.
1590
1591 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1592 * tests/regression.at (Web2c): Rename as...
1593 (Web2c Report): this.
1594 (Web2c Actions): New.
1595
776209d6
AD
15962001-12-22 Akim Demaille <akim@epita.fr>
1597
1598 Reductions in web2c.y are improperly reported.
1599 Reported by Mike Castle.
1600
1601 * src/conflicts.c (print_reductions): Fix.
1602 * tests/regression.at (Web2c): New.
1603
275fc3ad
AD
16042001-12-18 Akim Demaille <akim@epita.fr>
1605
1606 Some host fail on `assert (!"foo")', which expands to
1607 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1608 Reported by Nelson Beebee.
1609
1610 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1611 `#define it_succeeded 0' and `assert (it_succeeded)'.
1612
897668ee
MA
16132001-12-17 Marc Autret <autret_m@epita.fr>
1614
1615 * src/bison.simple: Don't hard code the skeleton line and filename.
1616 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1617 New line counter 'skeleton_line' (skeleton-line muscle).
1618
ab3399e0
PE
16192001-12-17 Paul Eggert <eggert@twinsun.com>
1620
1621 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1622 YYDEBUG must be defined to a nonzero value.
1623
1624 * src/bison.simple (yytname): Do not assume that the user defines
1625 YYDEBUG to a properly parenthesized expression.
1626
3877f72b
AD
16272001-12-17 Akim Demaille <akim@epita.fr>
1628
1629 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1630 nlookaheads is a new member.
1631 Adjust all users.
1632 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1633 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1634 state.
776209d6 1635
331dbc1b
AD
16362001-12-17 Akim Demaille <akim@epita.fr>
1637
1638 * src/files.h, src/files.c (open_files, close_files): Remove.
1639 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1640 let...
1641 * src/reader.c (reader): Do it.
776209d6 1642
be750e4c
AD
16432001-12-17 Akim Demaille <akim@epita.fr>
1644
1645 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 1646
709ae8c6
AD
16472001-12-17 Akim Demaille <akim@epita.fr>
1648
1649 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1650 (flush_reduce): New.
1651 (resolve_sr_conflict): Adjust.
776209d6 1652
f87685c3
AD
16532001-12-17 Akim Demaille <akim@epita.fr>
1654
1655 * src/output.c (output_obstack): Be static and rename as...
1656 (format_obstack): this, to avoid any confusion with files.c's
1657 output_obstack.
1658 * src/reader.h (muscle_obstack): Move to...
1659 * src/output.h: here, since it's defined in output.c.
1660
837491d8
AD
16612001-12-17 Akim Demaille <akim@epita.fr>
1662
1663 * src/output.c (action_row, save_column, default_goto)
1664 (sort_actions, matching_state, pack_vector): Better variable
1665 locality.
1666
796d61fb
AD
16672001-12-17 Akim Demaille <akim@epita.fr>
1668
1669 * src/output.c: Various formatting changes.
776209d6 1670
64d15509
AD
16712001-12-17 Akim Demaille <akim@epita.fr>
1672
1673 * src/files.c (output_files): Free the output_obstack.
1674 * src/main.c (main): Call print and print_graph conditionally.
1675 * src/print.c (print): Work unconditionally.
1676 * src/print_graph.c (print_graph): Work unconditionally.
1677 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1678
fbc8ecb7
MA
16792001-12-16 Marc Autret <autret_m@epita.fr>
1680
1681 * src/output.c (actions_output): Fix. When we use %no-lines,
1682 there is one less line per action.
1683
f0440388
MA
16842001-12-16 Marc Autret <autret_m@epita.fr>
1685
1686 * src/bison.simple: Remove a useless #line directive.
1687 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1688 * src/output.c (get_lines_number): New.
776209d6 1689 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
1690 output muscles.
1691 Fix line numbering.
1692 (actions_output): Computes the number of lines taken by actions.
1693 (output_master_parser): Insert new skeleton which is the name of
1694 the output parser file name.
1695
a79986b8
MA
16962001-12-15 Marc Autret <autret_m@epita.fr>
1697
1698 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1699
4ec8e00f
MA
17002001-12-15 Marc Autret <autret_m@epita.fr>
1701
1702 * src/output.c (output_gram): Keep track of the hairy one.
1703
1a4648ff
AD
17042001-12-15 Akim Demaille <akim@epita.fr>
1705
1706 Make `make distcheck' work.
1707
1708 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1709 system.h which uses libgettext.h.
1710
9c2c67e6
AD
17112001-12-15 Akim Demaille <akim@epita.fr>
1712
1713 * src/nullable.c (set_nullable): Useless rules must be skipped,
1714 otherwise, since we range over their symbols, we might look at a
1715 nonterminal which no longer ``exists'', i.e., it is not counted in
1716 `nvars', hence we overflow our arrays.
1717
93ede233
AD
17182001-12-15 Akim Demaille <akim@epita.fr>
1719
1720 The header can also be produced directly, without any obstack!
1721 Yahoo!
1722
1723 * src/files.c, src/files.h (defines_obstack): Remove.
1724 (compute_header_macro): Global.
1725 (defines_obstack_save): Remove.
1726 * src/reader.c (parse_union_decl): No longer output to
1727 defines_obstack: its content can be found in the `stype' muscle
1728 anyway.
1729 (output_token_translations): Merge into...
1730 (symbols_output): this.
1731 Rename as...
1732 (symbols_save): this.
1733 (reader): Adjust.
1734 * src/output.c (header_output): New.
1735 (output): Call it.
1736
2666f928
AD
17372001-12-15 Akim Demaille <akim@epita.fr>
1738
1739 * src/reader.c (parse_union_decl): Instead of handling two obstack
1740 simultaneously, use one to define the `stype' muscle, and use the
1741 value of the latter to fill defines_obstack.
1742 (copy_comment): Remove.
1743 (copy_comment2): Work for a single obstack.
1744 Rename as...
1745 (copy_comment): this.
1746
428046f8
AD
17472001-12-15 Akim Demaille <akim@epita.fr>
1748
1749 * src/lex.c, src/lex.h (xgetc): No longer static.
1750 * src/reader.c (parse_union_decl): Revamp.
1751
ea52d706
AD
17522001-12-15 Akim Demaille <akim@epita.fr>
1753
1754 Still making progress in separating Bison into (i) input, (ii)
1755 process, (iii) output: now we can directly output the parser file
1756 without using table_obstack at all.
1757
1758 * src/files.c, src/files.h (table_obstack): Bye bye.
1759 (parser_file_name): New.
1760 * src/files.c (compute_output_file_names): Compute it.
1761 * src/output.c (actions_output, output_parser)
1762 (output_master_parser): To a file instead of an obstack.
1763
3f96f4dc
AD
17642001-12-15 Akim Demaille <akim@epita.fr>
1765
1766 Attach actions to rules, instead of pre-outputting them to
1767 actions_obstack.
1768
1769 * src/gram.h (rule_t): action and action_line are new members.
1770 * src/reader.c (symbol_list): Likewise.
1771 (copy_action): Save the actions within the rule.
1772 (packgram): Save them in rule_table.
1773 * src/output.c (actions_output): New.
1774 (output_parser): Use it on `%%actions'.
1775 (output_rule_data): Don't free rule_table.
1776 (output): Do it.
1777 (prepare): Don't save the `action' muscle.
1778 * src/bison.simple: s/%%action/%%actions/.
1779
51576fb3
AD
17802001-12-15 Akim Demaille <akim@epita.fr>
1781
1782 * src/reader.c (copy_action): When --yacc, don't append a `;'
1783 to the user action: let it fail if lacking.
dee049eb 1784 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 1785
2648a72d
AD
17862001-12-14 Akim Demaille <akim@epita.fr>
1787
1788 * src/lex.c (literalchar): Simply return the char you decoded, non
1789 longer mess around with obstacks and int pointers.
1790 Adjust all callers.
1791
92790e5b
AD
17922001-12-14 Akim Demaille <akim@epita.fr>
1793
1794 * src/lex.c (literalchar): Don't escape the special characters,
1795 just decode them, and keep them as char (before, eol was output as
1796 the 2 char string `\n' etc.).
1797 * src/output.c (output_rule_data): Use quotearg to output the
1798 token strings.
1799
927c1557
PE
18002001-12-13 Paul Eggert <eggert@twinsun.com>
1801
1802 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1803 Do not infringe on the global user namespace when using C++.
1804 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1805 All uses of `fprintf' and `stderr' changed.
1806
1807 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1808
ed8e1f68
AD
18092001-12-13 Akim Demaille <akim@epita.fr>
1810
1811 The computation of nullable is broken: it doesn't handle empty
1812 RHS's properly.
1813
1814 * tests/torture.at (GNU AWK Grammar): New.
1815 * tests/sets.at (Nullable): New.
1816 * src/nullable.c (set_nullable): Instead of blindly looping over
1817 `ritems', loop over the rules, and then over their rhs's.
1818
1819 Work around Autotest bugs.
1820
1821 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1822 frame, because Autotest understand lines starting with a `+' as
1823 traces from the shell. Then, they are not processed properly.
1824 Admittedly an Autotest bug, but we don't have time to wait for
1825 Autotest to catch up.
1826 * tests/regression.at (Broken Closure): Adjust to the new table
1827 frames.
1828 Move to...
1829 * tests/sets.at: here.
1830
cb581495
AD
18312001-12-13 Akim Demaille <akim@epita.fr>
1832
1833 * src/closure.c (closure): Use nrules instead of playing tricks
1834 with BITS_PER_WORD.
1835
2e729273
AD
18362001-12-13 Akim Demaille <akim@epita.fr>
1837
1838 * src/print.c (print_actions): Output the handling of `$' as the
1839 traces do: shifting the token EOF. Before EOF was treated as a
1840 nonterminal.
1841 * tests/regression.at: Adjust some tests.
1842 * src/print_graph.c (print_core): Complete the set of items via
1843 closure. The next-to-final and final states are still unsatisfying,
1844 but that's to be addressed elsewhere.
1845 No longer output the rule numbers, but do output the state number.
1846 A single loop for the shifts + gotos is enough, but picked a
1847 distinct color for each.
1848 (print_graph): Initialize and finalize closure.
1849
107f7dfb
AD
18502001-12-13 Akim Demaille <akim@epita.fr>
1851
1852 * src/reader.c (readgram): Remove dead code, an strip useless
1853 braces.
1854 (get_type): Remove, unused.
1855
9b53a24f
AD
18562001-12-12 Akim Demaille <akim@epita.fr>
1857
1858 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1859 on that of lib/error.c.
1860
dbfb6dcd
AD
18612001-12-12 Akim Demaille <akim@epita.fr>
1862
1863 Some hosts don't like `/' in includes.
1864
1865 * src/system.h: Include libgettext.h without qualifying the path.
1866 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1867 $(top_srcdir).
1868
c25fb648
MA
18692001-12-11 Marc Autret <autret_m@epita.fr>
1870
1871 * src/output.c (output_parser): Remove useless muscle.
1872
710ddc4f
MA
18732001-12-11 Marc Autret <autret_m@epita.fr>
1874
1875 * src/bison.simple: Remove #line just before %%epilogue. It
1876 is now handled in ...
1877 * src/reader.c (read_additionnal_code): Add the output of a
1878 #line for the epilogue.
1879
e83d80b8
MA
18802001-12-10 Marc Autret <autret_m@epita.fr>
1881
927c1557 1882 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
1883 replace precedent remove.
1884 * src/bison.simple: Remove #line before %%prologue because
1885 %%input-line is wrong at this time.
1886
971d5158
MA
18872001-12-10 Marc Autret <autret_m@epita.fr>
1888
1889 * src/reader.c (symbols_output): Clean up.
927c1557 1890 * src/output.c (output_gram, output): Clean up.
971d5158 1891
5edafffd
AD
18922001-12-10 Akim Demaille <akim@epita.fr>
1893
1894 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1895 * src/LR0.c (set_state_table): here.
1896 * src/lalr.c (lalr): Call it.
1897
0279f8e9
AD
18982001-12-10 Akim Demaille <akim@epita.fr>
1899
1900 * src/state.h (shifts): Remove the `number' member: shifts are
1901 attached to state, hence no longer need to be labelled with a
1902 state number.
1903
190c4f5f
AD
19042001-12-10 Akim Demaille <akim@epita.fr>
1905
1906 Now that states have a complete set of members, the linked list of
1907 shifts is useless: just fill directly the state's shifts member.
1908
1909 * src/state.h (shifts): Remove the `next' member.
1910 * src/LR0.c (first_state, last_state): Remove.
1911 Adjust the callers.
1912 (augment_automaton): Don't look for the shifts that must be added
1913 a shift on EOF: it is those of the state we looked for! But now,
1914 since shifts are attached, it is no longer needed to looking
1915 merely by its id: its number.
1916
2a73b93d
AD
19172001-12-10 Akim Demaille <akim@epita.fr>
1918
1919 * src/LR0.c (augment_automaton): Better variable locality.
1920 Remove an impossible branch: if there is a state corresponding to
1921 the start symbol being shifted, then there is shift for the start
1922 symbol from the initial state.
1923
74392f6a
AD
19242001-12-10 Akim Demaille <akim@epita.fr>
1925
1926 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1927 only when appropriate: when insert_start_shifting_state' is not
1928 invoked.
1929 * tests/regression.at (Rule Line Numbers): Adjust.
1930
37c82725
AD
19312001-12-10 Akim Demaille <akim@epita.fr>
1932
1933 * src/LR0.c (augment_automaton): Now that all states have shifts,
1934 merge the two cases addition shifts to the initial state.
1935
6a164e0c
AD
19362001-12-10 Akim Demaille <akim@epita.fr>
1937
1938 * src/lalr.c (set_state_table): Move to...
1939 * src/LR0.c: here.
1940 * src/lalr.c (lalr): Don't call it...
1941 * src/LR0.c (generate_states): do it.
1942 * src/LR0.h (first_state): Remove, only the table is used.
1943
7215de24
AD
19442001-12-10 Akim Demaille <akim@epita.fr>
1945
1946 * src/LR0.h (first_shift, first_reduction): Remove.
1947 * src/lalr.c: Don't use first_shift: find shifts through the
1948 states.
1949
80e25d4d
AD
19502001-12-10 Akim Demaille <akim@epita.fr>
1951
1952 * src/LR0.c: Attach shifts to states as soon as they are
1953 computed.
1954 * src/lalr.c (set_state_table): Instead of assigning shifts to
1955 state, just assert that the mapping was properly done.
1956
0ab3728b
AD
19572001-12-10 Akim Demaille <akim@epita.fr>
1958
1959 * src/LR0.c (insert_start_shift): Rename as...
1960 (insert_start_shifting_state): this.
1961 (insert_eof_shifting_state, insert_accepting_state): New.
1962 (augment_automaton): Adjust.
1963 Better locality of the variables.
1964 When looking if the start_symbol is shifted from the initial
1965 state, using `while (... symbol != start_symbol ...)' sounds
1966 better than `while (... symbol < start_symbol ...)': If fail
1967 to see how the order between symbols could be relevant!
1968
78af9bbc
AD
19692001-12-10 Akim Demaille <akim@epita.fr>
1970
1971 * src/getargs.h: Don't declare `spec_name_prefix' and
1972 `spec_file_prefix', declared by src/files.h.
1973 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1974 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1975 * src/output.c (prepare): Adjust.
1976 * src/reader.c (symbols_output): Likewise.
1977 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1978
bdef2a41
AD
19792001-12-10 Akim Demaille <akim@epita.fr>
1980
1981 * src/muscle_tab.c (muscle_init): NULL is a better default than
1982 `"0"'.
1983
3735969c
AD
19842001-12-10 Akim Demaille <akim@epita.fr>
1985
1986 * src/reader.c (reader): Calling symbols_output once is enough.
1987
49701457
AD
19882001-12-10 Akim Demaille <akim@epita.fr>
1989
1990 Now that states have a complete set of members, the linked list of
1991 reductions is useless: just fill directly the state's reductions
1992 member.
1993
1994 * src/state.h (struct reductions): Remove member `number' and
1995 `next'.
1996 * src/LR0.c (first_reduction, last_reduction): Remove.
1997 (save_reductions): Don't link the new reductions, store them in
1998 this_state.
1999 * src/lalr.c (set_state_table): No need to attach reductions to
2000 states, it's already done.
2001 * src/output.c (output_actions): No longer free the shifts, then
2002 the reductions, then the states: free all the states and their
2003 members.
2004
0edad749
AD
20052001-12-10 Akim Demaille <akim@epita.fr>
2006
2007 * src/options.c (OPTN, DRTV, BOTH): New.
2008 (option_table): Use them.
2009
0edad749
AD
2010 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2011 the job of system.h.
2012 * src/options.c: Don't include stdio.h and xalloc.h for the same
2013 reasons.
2014
5449dd0f
AD
20152001-12-10 Akim Demaille <akim@epita.fr>
2016
2017 * src/output.c (output, prepare): Make sure the values of the
2018 muscles `action' and `prologue' are 0-terminated.
2019
a870c567
AD
20202001-12-10 Akim Demaille <akim@epita.fr>
2021
2022 Clean up GCC warnings.
2023
2024 * src/reader.c (copy_action): `buf' is not used.
2025 (parse_skel_decl): Be static.
2026 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2027 * src/options.h (create_long_option_table): Have a real prototype.
2028 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2029 (hash_delete_at): Return const void *.
2030 Adjust casts to preserve the const.
2031
80df8768
AD
20322001-12-10 Akim Demaille <akim@epita.fr>
2033
2034 * configure.in: Require 2.52g.
2035 M4 is not needed, but AUTOM4TE is.
2036 * m4/m4.m4: Remove.
2037 * tests/Makefile.am: Adjust.
2038
f693ad14
AD
20392001-12-10 Akim Demaille <akim@epita.fr>
2040
2041 One structure for states is enough, even though theoretically
2042 there are LR(0) states and LALR(1) states.
2043
2044 * src/lalr.h (state_t): Remove.
2045 (state_table): Be state_t **, not state_t *.
2046 * src/state.h (core, CORE_ALLOC): Rename as...
2047 (state_t, STATE_ALLOC): this.
2048 Add the LALR(1) members: shifts, reductions, errs.
2049 * src/LR0.c (state_table): Rename as...
2050 (state_hash): this, to avoid name clashes with the global
2051 `state_table'.
2052 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2053 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2054
74ffbcb6
AD
20552001-12-10 Akim Demaille <akim@epita.fr>
2056
2057 Bison dumps core on bash.y.
2058 Reported by Pascal Bart.
2059
2060 * src/warshall.c (bitmatrix_print): New.
2061 (TC): Use it.
2062 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2063 j must be the outer loop.
2064 * tests/regression.at (Broken Closure): New.
2065
07708e19
AD
20662001-12-05 Akim Demaille <akim@epita.fr>
2067
2068 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2069 its argument.
2070