]> git.saurik.com Git - bison.git/blame - ChangeLog
More.
[bison.git] / ChangeLog
CommitLineData
5683e9b2
AD
12002-05-07 Akim Demaille <akim@epita.fr>
2
3 * tests/synclines.at: Be sure to prototype yylex and yyerror to
4 avoid GCC warnings.
5
0c2d3f4c
AD
62002-05-07 Akim Demaille <akim@epita.fr>
7
8 Kill GCC warnings.
9
10 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
11 over the RHS of each rule.
12 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
13 * src/state.h (state_t): Member `nitems' is unsigned short.
14 * src/LR0.c (get_state): Adjust.
15 * src/reader.c (packgram): Likewise.
16 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17 `Type'.
18 (muscle_insert_int_table): Remove, unused.
19 (prepare_rules): Remove `max'.
20
1565b720
AD
212002-05-06 Akim Demaille <akim@epita.fr>
22
23 * src/closure.c (print_firsts): Display of the symbol tags.
24 (bitmatrix_print): Move to...
25 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
26 here.
27 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
28
cfaee611
AD
292002-05-06 Akim Demaille <akim@epita.fr>
30
31 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
32 hash_do_for_each.
33
458be8e0
AD
342002-05-06 Akim Demaille <akim@epita.fr>
35
36 * src/LR0.c (new_state, get_state): Instead of using the global
37 `kernel_size' and `kernel_base', have two new arguments:
38 `core_size' and `core'.
39 Adjust callers.
40
a900a624
AD
412002-05-06 Akim Demaille <akim@epita.fr>
42
43 * src/reader.c (packgram): No longer end `ritem' with a 0
44 sentinel: it is not used.
45
d4e7d3a1
AD
462002-05-05 Akim Demaille <akim@epita.fr>
47
48 New experimental feature: display the lookaheads in the report and
49 graph.
50
51 * src/print (print_core): When --trace-flag, display the rules
52 lookaheads.
53 * src/print_graph.c (print_core): Likewise.
54 Swap the arguments.
55 Adjust caller.
56
39ceb25b
AD
572002-05-05 Akim Demaille <akim@epita.fr>
58
59 * tests/torture.at (Many lookaheads): New test.
60
5372019f
AD
612002-05-05 Akim Demaille <akim@epita.fr>
62
63 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
64 (GENERATE_MUSCLE_INSERT_TABLE): this.
65 (output_int_table, output_unsigned_int_table, output_short_table)
66 (output_token_number_table, output_item_number_table): Replace with...
67 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
68 (muscle_insert_short_table, muscle_insert_token_number_table)
69 (muscle_insert_item_number_table): these.
70 Adjust all callers.
71 (prepare_tokens): Don't free `translations', since...
72 * src/reader.h, src/reader.c (grammar_free): do it.
73 Move to...
74 * src/gram.h, src/gram.c (grammar_free): here.
75 * data/bison.simple, data/bison.c++: b4_token_number_max is now
76 b4_translate_max.
77
5df5f6d5
AD
782002-05-05 Akim Demaille <akim@epita.fr>
79
80 * src/output.c (output_unsigned_int_table): New.
81 (prepare_rules): `i' is unsigned.
82 `prhs', `rline', `r2' are unsigned int.
83 Rename muscle `rhs_number_max' as `rhs_max'.
84 Output muscles `prhs_max', `rline_max', and `r2_max'.
85 Free rline and r1.
86 * data/bison.simple, data/bison.c++: Adjust to use these muscles
87 to compute types instead of constant types.
88 * tests/regression.at (Web2c Actions): Adjust.
89
b87f8b21
AD
902002-05-04 Akim Demaille <akim@epita.fr>
91
92 * src/symtab.h (SALIAS, SUNDEF): Rename as...
93 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
94 Adjust dependencies.
95 * src/output.c (token_definitions_output): Be sure not to output a
96 `#define 'a'' when fed with `%token 'a' "a"'.
97 * tests/regression.at (Token definitions): New.
98
8bb936e4
PE
992002-05-03 Paul Eggert <eggert@twinsun.com>
100
101 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
102 for K&R C.
103
1042002-05-03 gettextize <bug-gnu-gettext@gnu.org>
105
106 * Makefile.am (SUBDIRS): Remove intl.
107 (EXTRA_DIST): Add config/config.rpath.
108
53c71a12
AD
1092002-05-03 Akim Demaille <akim@epita.fr>
110
111 * data/bison.simple (m4_if): Don't output empty enums.
112 And actually, output valid enum definitions :(.
113
289dd0cf
AD
1142002-05-03 Akim Demaille <akim@epita.fr>
115
116 * configure.bat: Remove, completely obsolete.
117 * Makefile.am (EXTRA_DIST): Adjust.
118 Don't distribute config.rpath...
119 * config/Makefile.am (EXTRA_DIST): Do it.
120
db85e524
AD
1212002-05-03 Akim Demaille <akim@epita.fr>
122
123 * configure.in (GETTEXT_VERSION): New.
124 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
125
83ccf991
AD
1262002-05-03 Akim Demaille <akim@epita.fr>
127
128 * data/bison.simple (b4_token_enum): New.
129 (b4_token_defines): Use it to output tokens both as #define and
130 enums.
131 Suggested by Paul Eggert.
132 * src/output.c (token_definitions_output): Don't output spurious
133 white spaces.
134
1f418995
AD
1352002-05-03 Akim Demaille <akim@epita.fr>
136
137 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
138
45119f04
RA
1392002-05-02 Robert Anisko <robert@lrde.epita.fr>
140
141 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
142 Update the stack class, give a try to deque as the default container.
143
b2d52318
AD
1442002-05-02 Akim Demaille <akim@epita.fr>
145
146 * data/bison.simple (yyparse): Do not implement @$ = @1.
147 (YYLLOC_DEFAULT): Adjust to do it.
148 * doc/bison.texinfo (Location Default Action): Fix.
149
3a8b4109
AD
1502002-05-02 Akim Demaille <akim@epita.fr>
151
152 * src/reader.c (parse_braces): Merge into...
153 (parse_action): this.
154
84614e13
AD
1552002-05-02 Akim Demaille <akim@epita.fr>
156
157 * configure.in (ALL_LINGUAS): Remove.
158 * po/LINGUAS, hr.po: New.
159
fdbcd8e2
AD
1602002-05-02 Akim Demaille <akim@epita.fr>
161
162 Remove the so called hairy (semantic) parsers.
163
164 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
165 * src/gram.h, src/gram.c (semantic_parser): Remove.
166 (rule_t): Remove the guard and guard_line members.
167 * src/lex.h (token_t): remove tok_guard.
168 * src/options.c (option_table): Remove %guard and %semantic_parser
169 support.
170 * src/output.c, src/output.h (guards_output): Remove.
171 (prepare): Adjust.
172 (token_definitions_output): Don't output the `T'
173 tokens (???).
174 (output_skeleton): Don't output the guards.
175 * src/files.c, src/files.c (attrsfile): Remove.
176 * src/reader.c (symbol_list): Remove the guard and guard_line
177 members.
178 Adjust dependencies.
179 (parse_guard): Remove.
180 * data/bison.hairy: Remove.
181 * doc/bison.texinfo (Environment Variables): Remove occurrences of
182 BISON_HAIRY.
183
82b6cb3f
AD
1842002-05-02 Akim Demaille <akim@epita.fr>
185
186 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
187 (parse_guard): Rename the formal argument `stack_offset' as
188 `rule_length', which is more readable.
189 Adjust callers.
190 (copy_at, copy_dollar): Instead of outputting the hard coded
191 values of $$, $n and so forth, output invocation to b4_lhs_value,
192 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
193 Note: this patch partially drops `semantic-parser' support: it
194 always does `rule_length - n', where semantic parsers ought to
195 always use `-n'.
82b6cb3f
AD
196 * data/bison.simple, data/bison.c++ (b4_lhs_value)
197 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
198
6cbfbcc5
AD
1992002-05-02 Akim Demaille <akim@epita.fr>
200
201 * configure.in (AC_INIT): Bump to 1.49b.
202 (AM_INIT_AUTOMAKE): Short invocation.
203
b8548114
AD
2042002-05-02 Akim Demaille <akim@epita.fr>
205
206 Version 1.49a.
207
c20cd1fa
AD
2082002-05-01 Akim Demaille <akim@epita.fr>
209
210 * src/skeleton.h: Remove.
211
8a9566d4
AD
2122002-05-01 Akim Demaille <akim@epita.fr>
213
214 * src/skeleton.h: Fix the #endif.
215 Reported by Magnus Fromreide.
216
8c6d399a
PE
2172002-04-26 Paul Eggert <eggert@twinsun.com>
218
219 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
220 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 221 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 222
2b7ed18a
RA
2232002-04-25 Robert Anisko <robert@lrde.epita.fr>
224
225 * src/scan-skel.l: Postprocess quadrigraphs.
226
227 * src/reader.c (copy_character): New function, used to output
228 single characters while replacing `[' and `]' with quadrigraphs, to
229 avoid troubles with M4 quotes.
230 (copy_comment): Output characters with copy_character.
231 (read_additionnal_code): Likewise.
232 (copy_string2): Likewise.
233 (copy_definition): Likewise.
234
235 * tests/calc.at: Exercise M4 quoting.
236
34a89c50
AD
2372002-04-25 Akim Demaille <akim@epita.fr>
238
239 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
240 between `!' and the command.
241 Reported by Paul Eggert.
242
0dd1580a
RA
2432002-04-24 Robert Anisko <robert@lrde.epita.fr>
244
245 * tests/calc.at: Exercise prologue splitting.
246
247 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
248 `b4_post_prologue' instead of `b4_prologue'.
249
250 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
251 muscles.
252 (output): Free pre_prologue_obstack and post_prologue_obstack.
253 * src/files.h, src/files.c (attrs_obstack): Remove.
254 (pre_prologue_obstack, post_prologue_obstack): New.
255 * src/reader.c (copy_definition): Add a parameter to specify the
256 obstack to fill, instead of using attrs_obstack unconditionally.
257 (read_declarations): Pass pre_prologue_obstack to copy_definition if
258 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
259
83c1796f
PE
2602002-04-23 Paul Eggert <eggert@twinsun.com>
261
262 * data/bison.simple: Remove unnecessary commentary and white
263 space differences from 1_29-branch.
264 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
265
266 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
267 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
268 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
269 constructors or destructors.
270
271 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
272
1207eeac
AD
2732002-04-23 Akim Demaille <akim@epita.fr>
274
275 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
276 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
277 location with columns.
278 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
279 All reported by Paul Eggert.
280
78ab8f67
AD
2812002-04-22 Akim Demaille <akim@epita.fr>
282
283 * src/reduce.c (dump_grammar): Move to...
284 * src/gram.h, src/gram.c (grammar_dump): here.
285 Be sure to separate long item numbers.
286 Don't read the members of a rule's prec if its nil.
287
133c20e2
AD
2882002-04-22 Akim Demaille <akim@epita.fr>
289
290 * src/output.c (table_size, table_grow): New.
291 (MAXTABLE): Remove, replace uses with table_size.
292 (pack_vector): Instead of dying when the table is too big, grow it.
293
9515e8a7
AD
2942002-04-22 Akim Demaille <akim@epita.fr>
295
296 * data/bison.simple (yyr1): Its type is that of a token number.
297 * data/bison.c++ (r1_): Likewise.
298 * tests/regression.at (Web2c Actions): Adjust.
299
23c5a174
AD
3002002-04-22 Akim Demaille <akim@epita.fr>
301
302 * src/reader.c (token_translations_init): 256 is now the default
303 value for the error token, i.e., it will be assigned another
304 number if the user assigned 256 to one of her tokens.
305 (reader): Don't force 256 to error.
306 * doc/bison.texinfo (Symbols): Adjust.
307 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
308 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
309 etc. instead of 10, 20, 30 (which was used to `jump' over error
310 (256) and undefined (2)).
311
5fbb0954
AD
3122002-04-22 Akim Demaille <akim@epita.fr>
313
314 Propagate more token_number_t.
315
316 * src/gram.h (token_number_as_item_number)
317 (item_number_as_token_number): New.
318 * src/output.c (GENERATE_OUTPUT_TABLE): New.
319 Use it to create output_item_number_table and
320 output_token_number_table.
321 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
322 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
323 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
324 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
325
4f940944
AD
3262002-04-22 Akim Demaille <akim@epita.fr>
327
328 * src/output.h, src/output.c (get_lines_number): Remove.
329
3ded9a63
AD
3302002-04-19 Akim Demaille <akim@epita.fr>
331
332 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
333 as Lex/Flex'.
334 (Debugging): More details about enabling the debugging features.
335 (Table of Symbols): Describe $$, $n, @$, and @n.
336 Suggested by Tim Josling.
337
e0c471a9
AD
3382002-04-19 Akim Demaille <akim@epita.fr>
339
340 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
341
fecc10cd
AD
3422002-04-10 Akim Demaille <akim@epita.fr>
343
344 * src/system.h: Rely on HAVE_LIMITS_H.
345 Suggested by Paul Eggert.
346
51dec47b
AD
3472002-04-09 Akim Demaille <akim@epita.fr>
348
349 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
350 full stderr, and strip it according to the bison options, instead
351 of composing the error message from different bits.
352 This makes it easier to check for several error messages.
353 Adjust all the invocations.
354 Add an invocation exercising the error token.
355 Add an invocation demonstrating a stupid error message.
356 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
357 Adjust the tests.
358 Error message are for stderr, not stdout.
359
007a50a4
AD
3602002-04-09 Akim Demaille <akim@epita.fr>
361
362 * src/gram.h, src/gram.c (error_token_number): Remove, use
363 errtoken->number.
364 * src/reader.c (reader): Don't specify the user token number (2)
365 for $undefined, as it uselessly prevents using it.
366 * src/gram.h (token_number_t): Move to...
367 * src/symtab.h: here.
368 (state_t.number): Is a token_number_t.
369 * src/print.c, src/reader.c: Use undeftoken->number instead of
370 hard coded 2.
371 (Even though this 2 is not the same as above: the number of the
372 undeftoken remains being 2, it is its user token number which
373 might not be 2).
374 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
375 `user_token_number_max'.
376 Output `undef_token_number'.
377 * data/bison.simple, data/bison.c++: Use them.
378 Be sure to map invalid yylex return values to
379 `undef_token_number'. This saves us from gratuitous SEGV.
380
381 * tests/conflicts.at (Solved SR Conflicts)
382 (Unresolved SR Conflicts): Adjust.
383 * tests/regression.at (Web2c Actions): Adjust.
384
06446ccf
AD
3852002-04-08 Akim Demaille <akim@epita.fr>
386
387 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
388 Adding #line.
389 Remove the duplicate `typedefs'.
390 (RhsNumberType): Fix the declaration and various other typos.
391 Use __ofile__.
392 * data/bison.simple: Use __ofile__.
393 * src/scan-skel.l: Handle __ofile__.
394
62a3e4f0
AD
3952002-04-08 Akim Demaille <akim@epita.fr>
396
397 * src/gram.h (item_number_t): New, the type of item numbers in
398 RITEM. Note that it must be able to code symbol numbers as
399 positive number, and the negation of rule numbers as negative
400 numbers.
401 Adjust all dependencies (pretty many).
402 * src/reduce.c (rule): Remove this `short *' pointer: use
403 item_number_t.
404 * src/system.h (MINSHORT, MAXSHORT): Remove.
405 Include `limits.h'.
406 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
407 (shortcpy): Remove.
408 (MAXTABLE): Move to...
409 * src/output.c (MAXTABLE): here.
410 (prepare_rules): Use output_int_table to output rhs.
411 * data/bison.simple, data/bison.c++: Adjust.
412 * tests/torture.at (Big triangle): Move the limit from 254 to
413 500.
414 * tests/regression.at (Web2c Actions): Ajust.
415
416 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
417 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
418 passes, but produces negative #line number, once fixed, GCC is
419 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
420 C), it passes.
421 * src/state.h (state_h): Code input lines on ints, not shorts.
422
bb88b0fc
AD
4232002-04-08 Akim Demaille <akim@epita.fr>
424
425 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
426 and then the grammar.
427
9a636f47
AD
4282002-04-08 Akim Demaille <akim@epita.fr>
429
430 * src/system.h: No longer using strndup.
431
680e8701
AD
4322002-04-07 Akim Demaille <akim@epita.fr>
433
434 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
435 * src/output.c (output_table_data): Return the longest number.
436 (prepare_tokens): Output `token_number_max').
437 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
438 New.
439 Use them to define yy_token_number_type/TokenNumberType.
440 Use this type for yytranslate.
441 * tests/torture.at (Big triangle): Push the limit from 124 to
442 253.
443 * tests/regression.at (Web2c Actions): Adjust.
444
817e9f41
AD
4452002-04-07 Akim Demaille <akim@epita.fr>
446
447 * tests/torture.at (Big triangle): New.
448 (GNU AWK Grammar, GNU Cim Grammar): Move to...
449 * tests/existing.at: here.
450
5123689b
AD
4512002-04-07 Akim Demaille <akim@epita.fr>
452
453 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
454 nritems.
455 Adjust dependencies.
456
f3849179
AD
4572002-04-07 Akim Demaille <akim@epita.fr>
458
459 * src/reader.c: Normalize increments to prefix form.
460
bd02036a
AD
4612002-04-07 Akim Demaille <akim@epita.fr>
462
463 * src/reader.c, symtab.c: Remove debugging code.
464
db8837cb
AD
4652002-04-07 Akim Demaille <akim@epita.fr>
466
467 Rename all the `bucket's as `symbol_t'.
468
469 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
470 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
471 * src/symtab.c, src/symtab.h (bucket): Rename as...
472 (symbol_t): this.
473 (symbol_list_new, bucket_check_defined, bucket_make_alias)
474 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
475 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
476 (buckets_new, buckets_free, buckets_do): Rename as...
477 (symbol_list_new, symbol_check_defined, symbol_make_alias)
478 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
479 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
480 (symbols_new, symbols_free, symbols_do): these.
481
72a23c97
AD
4822002-04-07 Akim Demaille <akim@epita.fr>
483
484 Use lib/hash for the symbol table.
485
486 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
487 EOF.
488 * src/lex.c (lex): Set the `number' member of new terminals.
489 * src/reader.c (bucket_check_defined, bucket_make_alias)
490 (bucket_check_alias_consistence, bucket_translation): New.
491 (reader, grammar_free, readgram, token_translations_init)
492 (packsymbols): Adjust.
493 (reader): Number the predefined tokens.
494 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
495 for predefined tokens.
496 * src/symtab.h (bucket): Remove all the hash table related
497 members.
498 * src/symtab.c (symtab): Replace by...
499 (bucket_table): this.
500 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
501 (buckets_new, buckets_do): New.
502
280a38c3
AD
5032002-04-07 Akim Demaille <akim@epita.fr>
504
505 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
506 (start_symbol, max_user_token_number, semantic_parser)
507 (error_token_number): Initialize.
508 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
509 Initialize.
510 (reader): Don't.
511 (errtoken, eoftoken, undeftoken, axiom): Extern.
512
03b31c0c
AD
5132002-04-07 Akim Demaille <akim@epita.fr>
514
515 * src/gram.h (rule_s): prec and precsym are now pointers
516 to the bucket giving the priority/associativity.
517 Member `associativity' removed: useless.
518 * src/reduce.c, src/conflicts.c: Adjust.
519
8b3df748
AD
5202002-04-07 Akim Demaille <akim@epita.fr>
521
522 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
523 Properly escape the symbols' TAG when outputting them.
524
e601aa1d
AD
5252002-04-07 Akim Demaille <akim@epita.fr>
526
527 * src/lalr.h (LA): Is a bitsetv, not bitset*.
528
b0299a2e
AD
5292002-04-07 Akim Demaille <akim@epita.fr>
530
531 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
532 (LArule): this, which is an array to rule_t*.
533 * src/print.c, src/conflicts.c: Adjust.
534
d7e1f00c
AD
5352002-04-07 Akim Demaille <akim@epita.fr>
536
537 * src/gram.h (rule_t): Rename `number' as `user_number'.
538 `number' is a new member.
539 Adjust dependencies.
540 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
541
cc9305dd
AD
5422002-04-07 Akim Demaille <akim@epita.fr>
543
544 As a result of the previous patch, it is no longer needed
545 to reorder ritem itself.
546
547 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
548
b0940840
AD
5492002-04-07 Akim Demaille <akim@epita.fr>
550
551 Be sure never to walk through RITEMS, but use only data related to
552 the rules themselves. RITEMS should be banished.
553
554 * src/output.c (output_token_translations): Rename as...
555 (prepare_tokens): this.
556 In addition to `translate', prepare the muscles `tname' and
557 `toknum', which were handled by...
558 (output_rule_data): this.
559 Remove, and move the remainder of its outputs into...
560 (prepare_rules): this new routines, which also merges content from
561 (output_gram): this.
562 (prepare_rules): Be sure never to walk through RITEMS.
563 (output_stos): Rename as...
564 (prepare_stos): this.
565 (output): Always invoke prepare_states, after all, just don't use it
566 in the output if you don't need it.
567
643a5994
AD
5682002-04-07 Akim Demaille <akim@epita.fr>
569
570 * src/LR0.c (new_state): Display `nstates' as the name of the
571 newly created state.
572 Adjust to initialize first_state and last_state if needed.
573 Be sure to distinguish the initial from the final state.
574 (new_states): Create the itemset of the initial state, and use
575 new_state.
576 * src/closure.c (closure): Now that the initial state has its
577 items properly set, there is no need for a special case when
578 creating `ruleset'.
579
580 As a result, now the rule 0, reducing to $axiom, is visible in the
581 outputs. Adjust the test suite.
582
583 * tests/conflicts.at (Solved SR Conflicts)
584 (Unresolved SR Conflicts): Adjust.
585 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
586 * tests/conflicts.at (S/R in initial): New.
587
b4c4ccc2
AD
5882002-04-07 Akim Demaille <akim@epita.fr>
589
590 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
591 the RHS of the rules.
592 * src/output.c (output_gram): Likewise.
593
bba97eb2
AD
5942002-04-07 Akim Demaille <akim@epita.fr>
595
596 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
597 bucket.
598 Adjust all dependencies.
599 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
600 `number' of the buckets too.
601 * src/gram.h: Include `symtab.h'.
602 (associativity): Move to...
603 * src/symtab.h: here.
604 No longer include `gram.h'.
605
c3b407f4
AD
6062002-04-07 Akim Demaille <akim@epita.fr>
607
608 * src/gram.h, src/gram.c (rules_rhs_length): New.
609 (ritem_longest_rhs): Use it.
610 * src/gram.h (rule_t): `number' is a new member.
611 * src/reader.c (packgram): Set it.
612 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
613 the end of `rules', and count them out of `nrules'.
614 (reduce_output, dump_grammar): Adjust.
615 * src/print.c (print_grammar): It is no longer needed to check for
616 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
617 * tests/reduce.at (Reduced Automaton): New test.
618
11652ab3
AD
6192002-04-07 Akim Demaille <akim@epita.fr>
620
621 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
622 lacking `+ 1' to nrules, Bison reported as useless a token if it
623 was used solely to set the precedence of the last rule...
624
26b23c1a
AD
6252002-04-07 Akim Demaille <akim@epita.fr>
626
627 * data/bison.c++, data/bison.simple: Don't output the current file
628 name in #line, to avoid useless diffs between two identical
629 outputs under different names.
630
18bcecb0
AD
6312002-04-07 Akim Demaille <akim@epita.fr>
632
633 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
634 Normalize loops to using `< nrules + 1', not `<= nrules'.
635
fa770c86
AD
6362002-04-07 Akim Demaille <akim@epita.fr>
637
638 * TODO: Update.
639
d9b739c3
AD
6402002-04-07 Akim Demaille <akim@epita.fr>
641
642 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
643 bucket.value as bucket.number.
644
99013900
AD
6452002-04-07 Akim Demaille <akim@epita.fr>
646
647 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
648 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
649 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
650 RHS, instead of being an index in RITEMS.
651
e966383b
PE
6522002-04-04 Paul Eggert <eggert@twinsun.com>
653
654 * doc/bison.texinfo: Update copyright date.
655 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
656 (Symbols): Warn about running Bison in one character set,
657 but compiling and/or running in an incompatible one.
658 Warn about character code 256, too.
659
6602002-04-03 Paul Eggert <eggert@twinsun.com>
661
662 * src/bison.data (YYSTACK_ALLOC): Depend on whether
663 YYERROR_VERBOSE is nonzero, not whether it is defined.
664
665 Merge changes from bison-1_29-branch.
c307773e 666
8d6c48b9
PE
6672002-03-20 Paul Eggert <eggert@twinsun.com>
668
669 Merge fixes from Debian bison_1.34-1.diff.
670
671 * configure.in (AC_PREREQ): 2.53.
672
e53c6322
AD
6732002-03-20 Akim Demaille <akim@epita.fr>
674
675 * src/conflicts.c (log_resolution): Argument `resolution' is const.
676
9ffbeca7
PE
6772002-03-19 Paul Eggert <eggert@twinsun.com>
678
21db0b2a
PE
679 * src/bison.simple (YYCOPY): New macro.
680 (YYSTACK_RELOCATE): Use it.
681 Remove Type arg; no longer needed. All callers changed.
682 (yymemcpy): Remove; no longer needed.
683
9ffbeca7
PE
684 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
685 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
686
642cb8f8
AD
6872002-03-19 Akim Demaille <akim@epita.fr>
688
689 Test and fix the #line outputs.
690
691 * tests/atlocal.at (GCC): New.
692 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
693 (Prologue synch line, ,%union synch line, Postprologue synch line)
694 (Action synch line, Epilogue synch line): New tests.
695 * src/reader.c (parse_union_decl): Define the muscle stype_line.
696 * data/bison.simple, data/bison.c++: Use it.
697
3c31a486
AD
6982002-03-19 Akim Demaille <akim@epita.fr>
699
700 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
701 (Solved SR Conflicts, %expect not enough, %expect right)
702 (%expect too much): Move to...
703 * tests/conflicts.at: this new file.
704
0d8bed56
AD
7052002-03-19 Akim Demaille <akim@epita.fr>
706
707 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
708 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
709 that we can move to enums for instance.
710 * src/output.c (token_definitions_output): Output a list of
711 `token-name, token-number' instead of the #define.
712 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
713
9208d17f
AD
7142002-03-14 Akim Demaille <akim@epita.fr>
715
716 Use Gettext 0.11.1.
717
af27eacb
RA
7182002-03-09 Robert Anisko <robert@lrde.epita.fr>
719
720 * data/bison.c++: Make the user able to add members to the generated
721 parser by subclassing.
722
9101a310
RA
7232002-03-05 Robert Anisko <robert@lrde.epita.fr>
724
725 * src/reader.c (read_additionnal_code): `c' should be an integer, not
726 a character.
727 Reported by Nicolas Tisserand and Nicolas Burrus.
728
fff9bf0b
RA
7292002-03-04 Robert Anisko <robert@lrde.epita.fr>
730
731 * src/reader.c: Warn about lacking semi-colons, do not complain.
732
64dba31e
RA
7332002-03-04 Robert Anisko <robert@lrde.epita.fr>
734
735 * data/bison.c++: Remove a debug line.
736
374f5a14
RA
7372002-03-04 Robert Anisko <robert@lrde.epita.fr>
738
739 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
740 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
741 provide a default implementation.
742
bfcf1f3a
AD
7432002-03-04 Akim Demaille <akim@epita.fr>
744
745 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
746 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
747 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
748 * tests/semantic.at (Parsing Guards): Similarly.
749 * src/reader.at (readgram): Complain if the last rule is not ended
750 with a semi-colon.
751
65ccf9fc
AD
7522002-03-04 Akim Demaille <akim@epita.fr>
753
754 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
755 * src/closure.c: here.
756 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
757 RTC.
758 * src/warshall.h, src/warshall.c: Remove.
759 * tests/sets.at (Broken Closure): Adjust.
760
d0039cbc
AD
7612002-03-04 Akim Demaille <akim@epita.fr>
762
763 * src/output.c (output_skeleton): tempdir is const.
764 bytes_read is unused.
765
345cea78
AD
7662002-03-04 Akim Demaille <akim@epita.fr>
767
768 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
769 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
770 Update.
771 From Michael Hayes.
772
564801f7
AD
7732002-03-04 Akim Demaille <akim@epita.fr>
774
775 * src/closure.c (closure): `r' is unused.
776
e5352bc7
AD
7772002-03-04 Akim Demaille <akim@epita.fr>
778
779 * tests/sets.at (Broken Closure): Add the ending `;'.
780 * src/reader.at (readgram): Complain if a rule is not ended with a
781 semi-colon.
782
914feea9
AD
7832002-03-04 Akim Demaille <akim@epita.fr>
784
785 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
786 (count_sr_conflicts): Use bitset_count.
787 * src/reduce.c (inaccessable_symbols): Ditto.
788 (bits_size): Remove.
789 * src/warshall.h, src/warshall.c: Convert to bitsetv.
790
f0250de6
AD
7912002-03-04 Akim Demaille <akim@epita.fr>
792
793 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
794 * src/reduce.c: Remove the `bitset_zero's following the
795 `bitset_create's, as now it is performed by the latter.
796
ef017502
AD
7972002-03-04 Akim Demaille <akim@epita.fr>
798
799 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
800 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
801 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
802 latest sources from Michael.
803
76514394
AD
8042002-03-04 Akim Demaille <akim@epita.fr>
805
806 * src/output.c (output): Don't free the grammar.
807 * src/reader.c (grammar_free): New.
808 * src/main.c (main): Call it and don't free symtab here.
809
55024580
AD
8102002-03-04 Akim Demaille <akim@epita.fr>
811
812 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
813 before returning.
814 Reported by Benoit Perrot.
815
f9abaa2c
AD
8162002-03-04 Akim Demaille <akim@epita.fr>
817
818 Use bitset operations when possible, not loops over bits.
819
820 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
821 bitset_or.
822 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
823 * src/reduce.c (useless_nonterminals): Formatting changes.
824 * src/warshall.c (TC): Use bitset_or.
825
0e721e75
AD
8262002-03-04 Akim Demaille <akim@epita.fr>
827
828 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
829 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
830 Ditto.
831
0fb1ffb1
AD
8322002-03-04 Akim Demaille <akim@epita.fr>
833
834 * src/lalr.c (F): Now a bitset*.
835 Adjust all dependencies.
836
b86796bf
AD
8372002-03-04 Akim Demaille <akim@epita.fr>
838
839 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
840 Adjust all dependencies.
841
602bbf31
AD
8422002-03-04 Akim Demaille <akim@epita.fr>
843
844 * src/L0.c, src/LR0.h (nstates): Be size_t.
845 Adjust comparisons (signed vs unsigned).
846 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
847 bitset*.
848 Adjust all dependencies.
849
d8a0245c
AD
8502002-03-04 Akim Demaille <akim@epita.fr>
851
852 * src/closure.c (firsts): Now, also a bitset.
853 Adjust all dependencies.
854 (varsetsize): Remove, now unused.
855 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
856
34ba9743
AD
8572002-03-04 Akim Demaille <akim@epita.fr>
858
859 * src/print.c: Convert to use bitset.h, not hand coded iterations
860 over ints.
861
ed86e78c
AD
8622002-03-04 Akim Demaille <akim@epita.fr>
863
864 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
865
dfdb1797
AD
8662002-03-04 Akim Demaille <akim@epita.fr>
867
868 * src/closure.c (ruleset): Be a bitset.
869 (rulesetsize): Remove.
870
7086e707
AD
8712002-03-04 Akim Demaille <akim@epita.fr>
872
873 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
874 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
875 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
876 * src/closure.c (fderives): Be an array of bitsets.
877
98254360
RA
8782002-02-28 Robert Anisko <robert@lrde.epita.fr>
879
880 * data/bison.c++: Merge the two generated headers. Insert a copyright
881 notice in each output file.
882
a75c057f
AD
8832002-02-28 Akim Demaille <akim@epita.fr>
884
885 * data/bison.c++: Copy the prologue of bison.simple to fetch
886 useful M4 definitions, such as b4_header_guard.
887
06b00abc
AD
8882002-02-25 Akim Demaille <akim@epita.fr>
889
890 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
891 translator friendly scheme for the bgr
892 copyright notice.
06b00abc 893
70e7d534
AD
8942002-02-25 Akim Demaille <akim@epita.fr>
895
896 * src/output.c (header_output): Remove, now handled completely via
897 M4.
898
abe017f6
AD
8992002-02-25 Akim Demaille <akim@epita.fr>
900
901 * m4/m4.m4: New, from CVS Autoconf.
902 * configure.in: Invoke it.
903 * src/output.c (output_skeleton): Use its result instead of the
904 hard coded name.
905
381fb12e
AD
9062002-02-25 Akim Demaille <akim@epita.fr>
907
908 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
909 Fileutils 4.1.5.
910 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
911 * src/output.c (output_skeleton): Use mkstemp to create a real
912 temporary file.
913 Move the filling of `skeleton' and its muscle to...
914 (prepare): here.
915 (output): Move the definition of the prologue muscle to...
916 (prepare): here.
917 * src/system.h (DEFAULT_TMPDIR): New.
918
6f38107f
PE
9192002-02-14 Paul Eggert <eggert@twinsun.com>
920
921 Remove the support for C++ namespace cleanliness; it was
922 causing more problems than it was curing, since it didn't work
923 properly on some nonstandard C++ compilers. This can wait
924 for a proper C++ parser.
925
926 * NEWS: Document this.
927 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
928 of C++, as it's treated like C now.
929 * src/bison.simple (YYSTD): Remove.
930 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
931 Treat C++ just like Standard C instead of trying to support
932 namespace cleanliness.
933
80cce3da
AD
9342002-02-14 Akim Demaille <akim@epita.fr>
935
936 * tests/regression.at (else): Adjust to Andreas' change.
937
842e8679
AD
9382002-02-14 Akim Demaille <akim@epita.fr>
939
940 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
941
4bda3f10
AD
9422002-02-13 Andreas Schwab <schwab@suse.de>
943
944 * src/output.c (output_rule_data): Don't output NULL, it might
945 not be defined yet.
946
4162fa07 9472002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 948
4162fa07
RA
949 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
950 (Copyright notice): Update.
b418ecd8 951
bd16a5dc
AD
9522002-02-11 Akim Demaille <akim@epita.fr>
953
954 * tests/regression.at (%nonassoc and eof): Don't include
955 nonportable headers.
956
8d69a1a3
RA
9572002-02-08 Robert Anisko <robert@lrde.epita.fr>
958
959 * data/bison.c++: Correct error recovery. Make the user able to
960 initialize the starting location.
961
9b2d0677
AD
9622002-02-07 Akim Demaille <akim@epita.fr>
963
964 * tests/input.at: New.
965
69e2658b
RA
9662002-02-07 Robert Anisko <robert@lrde.epita.fr>
967
968 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 969 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
970 directives around tables only needed for debugging.
971
4aacc3a7
RA
9722002-02-07 Robert Anisko <robert@lrde.epita.fr>
973
974 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
975 C++ parsers.
976 (yy::b4_name::parse): Use print_.
977
762a801e
RA
9782002-02-07 Robert Anisko <robert@lrde.epita.fr>
979
980 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
981
4bb2bc3f
RA
9822002-02-07 Robert Anisko <robert@lrde.epita.fr>
983
984 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
985 C++ parsers.
986 (yy::b4_name::parse): Build verbose error messages, and use error_.
987
6b45a3ca
RA
9882002-02-06 Robert Anisko <robert@lrde.epita.fr>
989
990 * data/bison.c++: Fix m4 quoting in comments.
991
50997c6e
RA
9922002-02-06 Robert Anisko <robert@lrde.epita.fr>
993
994 * data/bison.c++: Adjust the parser code. Fix some muscles that were
995 not expanded by m4.
996
3f3eed27
AD
9972002-02-05 Akim Demaille <akim@epita.fr>
998
999 * data/bison.c++: Adjust to the M4 back end.
1000 More is certainly needed.
1001
be2a1a68
AD
10022002-02-05 Akim Demaille <akim@epita.fr>
1003
1004 Give a try to M4 as a back end.
1005
1006 * lib/readpipe.c: New, from wdiff.
1007 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
1008 BISON_HAIRY.
1009 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
1010 specific values. Now it is m4 that performs the lookup.
1011 * src/parse-skel.y: Remove.
1012 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
1013 * src/output.c (actions_output, guards_output)
1014 (token_definitions_output): No longer keeps track of the output
1015 line number, hence remove the second argument.
1016 (guards_output): Check against the guard member of a rule, not the
1017 action member.
1018 Adjust callers.
1019 (output_skeleton): Don't look for the skeleton location, let m4 do
1020 that.
1021 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
1022 file will be used.
1023 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
1024 (prepare): Given that for the time being changesyntax is not
1025 usable in M4, rename the muscles using `-' to `_'.
1026 Define `defines_flag', `output_parser_name' and `output_header_name'.
1027 * src/output.h (actions_output, guards_output)
1028 (token_definitions_output): Adjust prototypes.
1029 * src/scan-skel.l: Instead of scanning the skeletons, it now
1030 processes the output of m4: `__oline__' and `#output'.
1031 * data/bison.simple: Adjust to be used by M4(sugar).
1032 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
1033 to date.
1034 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
1035 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
1036 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
1037 shamelessly stolen from CVS Autoconf.
1038
beda758b
AD
10392002-02-05 Akim Demaille <akim@epita.fr>
1040
1041 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
1042 * configure.in: Check for the declarations of free and malloc.
1043 * src/muscle_tab.c: Adjust.
1044
5ece6d43
AD
10452002-02-05 Akim Demaille <akim@epita.fr>
1046
1047 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
1048 which have no values.
1049
5bb18f9a
AD
10502002-02-05 Akim Demaille <akim@epita.fr>
1051
1052 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
1053 * data/: here.
1054
894dd62e
PE
10552002-01-29 Paul Eggert <eggert@twinsun.com>
1056
1057 * src/bison.simple (YYSIZE_T): Do not define merely because
1058 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1059 On some platforms, <alloca.h> does not declare YYSTD (size_t).
1060
82841af7
AD
10612002-01-27 Akim Demaille <akim@epita.fr>
1062
1063 Fix `%nonassoc and eof'.
1064
1065 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
1066 which were not properly copied! Replace
1067 memcpy (res->errs, src->errs, src->nerrs);
1068 with
1069 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1070 !!!
1071 * tests/regression.at (%nonassoc and eof): Adjust to newest
1072 Autotest: `.' is not in the PATH.
1073
318b76e9
AD
10742002-01-27 Akim Demaille <akim@epita.fr>
1075
1076 * tests/sets.at (AT_EXTRACT_SETS): New.
1077 (Nullable): Use it.
1078 (Firsts): New.
1079
30d2f3d5
AD
10802002-01-26 Akim Demaille <akim@epita.fr>
1081
1082 * tests/actions.at, tests/calc.at, tests/headers.at,
1083 * tests/torture.at: Adjust to the newest Autotest which no longer
1084 forces `.' in the PATH.
1085
30f8c395
AD
10862002-01-25 Akim Demaille <akim@epita.fr>
1087
1088 * tests/regression.at (%nonassoc and eof): New.
1089 Suggested by Robert Anisko.
1090
29ae55f1
AD
10912002-01-24 Akim Demaille <akim@epita.fr>
1092
1093 Bison dumps core when trying to complain about broken input files.
1094 Reported by Cris van Pelt.
1095
1096 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
1097 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
1098 into...
1099 (Invalid inputs): Strengthen: exercise parse_percent_token.
1100
2b548aa6
RA
11012002-01-24 Robert Anisko <robert.anisko@epita.fr>
1102
1103 * src/Makefile.am: Add bison.c++.
1104 * src/bison.c++: New skeleton.
1105
bb0146c2
AD
11062002-01-21 Paolo Bonzini <bonzini@gnu.org>
1107
1108 * po/it.po: New.
1109
bec30531
AD
11102002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1111
1112 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1113
fc6edc45
MA
11142002-01-20 Marc Autret <marc@gnu.org>
1115
1116 * src/files.c (compute_output_file_names): Fix
1117
5e5d5415
MA
11182002-01-20 Marc Autret <marc@gnu.org>
1119
1120 * tests/output.at: New test.
1121 * src/files.c (compute_base_names): Don't map extensions when
1122 the YACC flag is set, use defaults.
1123 Reported by Evgeny Stambulchik.
1124
44ea3fbd
MA
11252002-01-20 Marc Autret <marc@gnu.org>
1126
bb0146c2 1127 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
1128 compilers as well (i.e. the vendor C compiler).
1129 Suggested by Albert Chin-A-Young.
1130
338963d1
TVH
11312002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1132
1133 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1134 canonical definition.
1135 * src/system.h: Use the canonical definition for PARAMS (avoids
1136 a conflict with the macro from lib/hash.h).
1137
c57b2479
AD
11382002-01-11 Akim Demaille <akim@epita.fr>
1139
1140 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 1141 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 1142
b85810ae
AD
11432002-01-09 Akim Demaille <akim@epita.fr>
1144
1145 * src/files.c, src/files.h (output_infix): New.
1146 (tab_extension): Remove.
1147 (compute_base_names): Compute the former, drop the latter.
1148 * src/output.c (prepare): Insert the muscles `output-infix', and
1149 `output-suffix'.
1150 * src/parse-skel.y (string, string.1): New.
1151 (section.header): Use it.
1152 (section.yacc): Remove.
1153 (prefix): Remove too.
1154 * src/scan-skel.l: Adjust.
1155 * src/bison.simple, src/bison.hairy: Adjust.
1156
cae60122
AD
11572002-01-09 Akim Demaille <akim@epita.fr>
1158
1159 * configure.in (WERROR_CFLAGS): Compute it.
1160 * src/Makefile.am (CFLAGS): Pass it.
1161 * tests/atlocal.in (CFLAGS): Idem.
1162 * src/files.c: Fix a few warnings.
1163 (get_extension_index): Remove, unused.
1164
ae404801
AD
11652002-01-08 Akim Demaille <akim@epita.fr>
1166
1167 * src/getargs.c (AS_FILE_NAME): New.
1168 (getargs): Use it to convert DOSish file names.
1169 * src/files.c (base_name): Rename as full_base_name to avoid
1170 clashes with `base_name ()'.
1171 (filename_split): New.
1172 (compute_base_names): N-th rewrite, using filename_split.
1173
22312b71
AD
11742002-01-08 Akim Demaille <akim@epita.fr>
1175
1176 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1177 New, stolen from the Fileutils 4.1.
1178 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1179 * configure.in: Check for the presence of memrchr, and of its
1180 prototype.
1181
a67cef01
TVH
11822002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1183
1184 * lib/hash.h (__P): Added definition for this macro.
1185 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1186 BUILT_SOURCES, to ensure they are generated first.
1187 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1188 %error-verbose to allow bootstrapping with bison 1.30x.
1189
2b25d624
AD
11902002-01-06 Akim Demaille <akim@epita.fr>
1191
1192 * src/reader.c (parse_braces): Don't fetch the next char, the
1193 convention is to fetch on entry.
1194 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1195 'switch' without a following semicolon.
1196 * tests/regression.at (braces parsing): New.
1197
3460813b
AD
11982002-01-06 Akim Demaille <akim@epita.fr>
1199
1200 Bison is dead wrong in its RR conflict reports.
1201
1202 * tests/torture.at (GNU Cim Grammar): New.
1203 * src/conflicts.c (count_rr_conflicts): Fix.
1204
73784c64
AD
12052002-01-06 Akim Demaille <akim@epita.fr>
1206
1207 Creating package.m4 from configure.ac causes too many problems.
1208
1209 * tests/Makefile.am (package.m4): Create it by hand,
1210 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1211
25d81090
AD
12122002-01-06 Akim Demaille <akim@epita.fr>
1213
1214 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1215 skeleton.h.
1216
a9b8959e
PE
12172002-01-04 Paul Eggert <eggert@twinsun.com>
1218
1219 * doc/bison.texinfo (Debugging):
1220 Remove YYSTDERR; it's no longer defined or used.
1221 Also, s/cstdio.h/cstdio/.
1222
25d81090
AD
12232002-01-03 Akim Demaille <akim@epita.fr>
1224
1225 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1226
1109455c
AD
12272002-01-03 Akim Demaille <akim@epita.fr>
1228
1229 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1230 tracing code to --trace, wait for a better --trace option, with
1231 args.
1232
7ea5e977
AD
12332002-01-03 Akim Demaille <akim@epita.fr>
1234
1235 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1236 The ISO C++ standard is extremely clear about it: stderr is
1237 considered a macro, not a regular symbol (see table 94 `Header
1238 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1239 Therefore std:: does not apply to it. It still does with fprintf.
1240 Also, s/cstdio.h/cstdio/.
1241
fab5b110
AD
12422002-01-03 Akim Demaille <akim@epita.fr>
1243
1244 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1245 for non system headers.
1246
aed7fd9b
AD
12472002-01-02 Akim Demaille <akim@epita.fr>
1248
1249 Equip the skeleton chain with location tracking, runtime trace,
1250 pure parser and scanner.
1251
1252 * src/parse-skel.y: Request a pure parser, locations, and prefix
1253 renaming.
1254 (%union): Having several members with the same type does not help
1255 type mismatches, simplify.
1256 (YYPRINT, yyprint): New.
1257 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1258 (skel_error): this.
1259 Handle locations.
1260 * src/scan-skel.l: Adjust to these changes.
1261 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1262 (LOCATION_PRINT, skel_control_t): New.
1263
24fad99e
AD
12642001-12-30 Akim Demaille <akim@epita.fr>
1265
1266 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1267 replace `gb' with BLANKS.
1268 * src/scan-skel.l: Adjust.
1269
a4b36db4
AD
12702001-12-30 Akim Demaille <akim@epita.fr>
1271
1272 * src/system.h: We don't need nor want bcopy.
1273 Throw away MS-DOS crap: we don't need getpid.
1274 * configure.in: We don't need strndup. It was even causing
1275 problems: because Flex includes the headers *before* us,
1276 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1277 not visible.
1278 * lib/xstrndup.c: New.
1279 * src/scan-skel.l: Use it.
1280 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1281 * src/parse-skel.y: Use %directives instead of #defines.
1282
1239777d
AD
12832001-12-30 Akim Demaille <akim@epita.fr>
1284
1285 * src/skeleton.h: New.
1286 * src/output.c (output_parser, output_master_parser): Remove, dead
1287 code.
1288 * src/output.h (get_lines_number, actions_output, guards_output)
1289 (token_definitions_output): Prototype them.
1290 * src/parse-skel.y: Add the license notice.
1291 Include output.h and skeleton.h.
1292 (process_skeleton): Returns void, and takes a single parameter.
1293 * src/scan-skel.l: Add the license notice.
1294 Include skeleton.h.
1295 Don't use %option yylineno: it seems that then Flex imagines
1296 REJECT has been used, and therefore it won't reallocate its
1297 buffers (which makes no other sense to me than a bug). It results
1298 in warnings for `unused: yy_flex_realloc'.
1299
9b3add5b
RA
13002001-12-30 Robert Anisko <robert.anisko@epita.fr>
1301
1302 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1303 (MUSCLE_INSERT_PREFIX): ...to there.
1304 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1305 (MUSCLE_INSERT_PREFIX): Move from here...
1306
1307 * src/bison.hairy: Add a section directive. Put braces around muscle
1308 names. This parser skeleton is still broken, but Bison should not
1309 choke on a bad muscle 'syntax'.
1310 * src/bison.simple: Add a section directive. Put braces around muscle
1311 names.
1312
1313 * src/files.h (strsuffix, stringappend): Add declarations.
1314 (tab_extension): Add declaration.
1315 (short_base_name): Add declaration.
1316
1317 * src/files.c (strsuffix, stringappend): No longer static. These
1318 functions are used in the skeleton parser.
1319 (tab_extension): New.
1320 (compute_base_names): Use the computations done in this function
fab5b110 1321 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
1322 names.
1323 (short_base_name): No longer static.
1324
1325 * src/output.c (output_skeleton): New.
1326 (output): Disable call to output_master_parser, and give a try to
1327 a new skeleton handling system.
1328 (guards_output, actions_output): No longer static.
1329 (token_definitions_output, get_lines_number): No longer static.
1330
1331 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1332
fab5b110 1333 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
1334 parse-skel.y.
1335
1336 * src/parse-skel.y: New file.
1337 * src/scan-skel.l: New file.
1338
b5b61c61
AD
13392001-12-29 Akim Demaille <akim@epita.fr>
1340
1341 %name-prefix is broken.
1342
1343 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1344 Adjust all dependencies.
1345 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1346 %name-prefix.
1347
1348 Renaming yylval but not yylloc is not consistent. Now we do.
1349
1350 * src/bison.simple: Prefix yylloc if used.
1351 * doc/bison.texinfo (Decl Summary): Document that.
1352
8c9a50be
AD
13532001-12-29 Akim Demaille <akim@epita.fr>
1354
1355 * doc/bison.texinfo: Promote `%long-directive' over
1356 `%long_directive'.
1357 Remove all references to fixed-output-files, yacc is enough.
1358
d99361e6
AD
13592001-12-29 Akim Demaille <akim@epita.fr>
1360
1361 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1362 user prologue. These are defaults.
1363 * tests/actions.at (Mid-rule actions): Make sure the user can
1364 define YYDEBUG and YYERROR_VERBOSE.
1365
b9cecb91
AD
13662001-12-29 Akim Demaille <akim@epita.fr>
1367
1368 * src/output.c (header_output): Don't forget to export YYLTYPE and
1369 yylloc.
1370 * tests/headers.at (export YYLTYPE): New, make sure it does.
1371 * tests/regression.at (%union and --defines, Invalid CPP headers):
1372 Move to...
1373 * tests/headers.at: here.
1374
aea13e97
AD
13752001-12-29 Akim Demaille <akim@epita.fr>
1376
1377 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1378
931394cb
AD
13792001-12-29 Akim Demaille <akim@epita.fr>
1380
1381 * tests/actions.at (Mid-rule actions): Output on a single line
1382 instead of several.
1383
704a47c4
AD
13842001-12-29 Akim Demaille <akim@epita.fr>
1385
1386 * doc/bison.texinfo: Formatting changes.
1387
091e20bb
AD
13882001-12-29 Akim Demaille <akim@epita.fr>
1389
1390 Don't store the token defs in a muscle, just be ready to output it
1391 on command. Now possible via `symbols'. Fixes a memory leak.
1392
1393 * src/output.c (token_definitions_output): New.
1394 (output_parser, header_output): Use it.
1395 * src/reader.c (symbols_save): Remove.
1396
cce71710
AD
13972001-12-29 Akim Demaille <akim@epita.fr>
1398
1399 * src/bison.simple: Do not provide a default for YYSTYPE and
1400 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1401 default.
1402
82c035a8
AD
14032001-12-29 Akim Demaille <akim@epita.fr>
1404
1405 Mid-rule actions are simply... ignored!
1406
1407 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1408 the empty-rule associated to the dummy symbol, not to the host
1409 rule.
1410 * tests/actions.at (Mid-rule actions): New.
1411
8419d367
AD
14122001-12-29 Akim Demaille <akim@epita.fr>
1413
1414 Memory leak.
1415
1416 * src/reader.c (reader): Free grammar.
1417
375d5806
AD
14182001-12-29 Akim Demaille <akim@epita.fr>
1419
1420 Memory leak.
1421
1422 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1423 since it allocates it for each state, although only one is needed.
1424 (allocate_storage): Do it here.
1425
f51cb8ff
AD
14262001-12-29 Akim Demaille <akim@epita.fr>
1427
1428 * src/options.h, src/options.c (create_long_option_table): Rename
1429 as...
1430 (long_option_table_new): this, with a clearer prototype.
1431 (percent_table): Remove, unused,
1432 * src/getargs.c (getargs): Adjust.
1433
29e88316
AD
14342001-12-29 Akim Demaille <akim@epita.fr>
1435
1436 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1437 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1438 as states.
1439
b9f71f19
AD
14402001-12-29 Akim Demaille <akim@epita.fr>
1441
1442 * src/lalr.c (build_relations): Rename `states' as `states1'.
1443 Sorry, I don't understand exactly what it is, no better name...
1444
1a2b5d37
AD
14452001-12-29 Akim Demaille <akim@epita.fr>
1446
1447 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1448 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1449 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1450 as rules.
1451
1cca533e
AD
14522001-12-29 Akim Demaille <akim@epita.fr>
1453
1454 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1455 ago.
1456
c03ae966
AD
14572001-12-29 Akim Demaille <akim@epita.fr>
1458
1459 * src/reader.c, src/reader.h (user_toknums): Remove.
1460 Adjust all users to use symbols[i]->user_token_number.
1461
5a670b1e
AD
14622001-12-29 Akim Demaille <akim@epita.fr>
1463
1464 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1465 Adjust all users to use symbols[i]->prec or ->assoc.
1466
ad949da9
AD
14672001-12-29 Akim Demaille <akim@epita.fr>
1468
1469 * src/reader.c, src/reader.h (tags): Remove.
1470 Adjust all users to use symbols[i]->tag.
1471
0e78e603
AD
14722001-12-29 Akim Demaille <akim@epita.fr>
1473
1474 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1475 and rule_table.
1476 * src/reader.c (packsymbols): Fill this table.
1477 Drop sprec.
1478 * src/conflicts.c (resolve_sr_conflict): Adjust.
1479 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1480 single table.
1481 Use symbols[i]->tag instead of tags[i].
1482
213e640e
AD
14832001-12-29 Akim Demaille <akim@epita.fr>
1484
1485 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1486 In addition, put a comment in there, to replace...
1487 * tests/regression.at (%union and C comments): Remove.
1488
e7b8bef1
AD
14892001-12-29 Akim Demaille <akim@epita.fr>
1490
1491 * tests/regression.at (Web2c Actions): Blindly move the actual
1492 output as expected output. The contents *seem* right to me, but I
1493 can't pretend reading perfectly parser tables... Nonetheless, all
1494 the other tests pass correctly, the table look OK, even though the
1495 presence of `$axiom' is to be noted: AFAICS it is useless (but
1496 harmless).
1497
b68e7744
AD
14982001-12-29 Akim Demaille <akim@epita.fr>
1499
1500 * src/reader.c (readgram): Don't add the rule 0 if there were no
1501 rules read. In other words, add it _after_ having performed
1502 grammar sanity checks.
1503 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1504
78d5bae9
AD
15052001-12-29 Akim Demaille <akim@epita.fr>
1506
1507 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1508 visible, and some states have now a different number.
1509
ff442794
AD
15102001-12-29 Akim Demaille <akim@epita.fr>
1511
1512 * src/reader.c (readgram): Bind the initial rule's lineno to that
1513 of the first rule.
1514 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1515 (Solved SR Conflicts): Adjust rule 0's line number.
1516
610ab194
AD
15172001-12-29 Akim Demaille <akim@epita.fr>
1518
1519 Fix the `GAWK Grammar' failure.
1520
1521 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1522 the reductions of the first state which was mistakenly confused
1523 with the final state because precisely final_state was initialized
1524 to 0.
1525 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1526 now noticed by Bison.
1527 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1528 have a reduction on $default.
1529
29d29c8f
AD
15302001-12-29 Akim Demaille <akim@epita.fr>
1531
1532 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1533 rule line numbers.
1534 * src/closure.c (print_closure): Likewise.
1535 * src/derives.c (print_derives): Likewise.
1536 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1537 now.
1538
7c6b64d0
AD
15392001-12-29 Akim Demaille <akim@epita.fr>
1540
1541 * src/lalr.c (lookaheads_print): New.
1542 (lalr): Call it when --trace-flag.
1543 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1544 are dumped.
1545
3d4daee3
AD
15462001-12-29 Akim Demaille <akim@epita.fr>
1547
1548 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1549 when walking through ritem, even via rule->rhs.
1550 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1551 (useful_production, useless_nonterminals): Likewise.
1552 (reduce_grammar_tables): Likewise, plus update nritems.
1553 * src/nullable.c (set_nullable): Likewise.
1554 * src/lalr.c (build_relations): Likewise.
1555 * tests/sets.at (Nullable): Adjust.
1556 Fortunately, now, the $axiom is no longer nullable.
1557
9e7f6bbd
AD
15582001-12-29 Akim Demaille <akim@epita.fr>
1559
1560 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1561 the 0-sentinel.
1562 * src/gram.c (ritem_longest_rhs): Likewise.
1563 * src/reduce.c (nonterminals_reduce): Likewise.
1564 * src/print_graph.c (print_graph): Likewise.
1565 * src/output.c (output_rule_data): Likewise.
1566 * src/nullable.c (set_nullable): Likewise.
1567
255ef638
AD
15682001-12-29 Akim Demaille <akim@epita.fr>
1569
1570 * src/output.c: Comment changes.
1571
0d8a7363
AD
15722001-12-27 Paul Eggert <eggert@twinsun.com>
1573
1574 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1575 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1576 Sparc, as they were causing more porting problems than the
1577 (minor) performance improvement was worth.
1578
1579 Also, catch up with 1.31's YYSTD.
1580
3db472b9
AD
15812001-12-27 Akim Demaille <akim@epita.fr>
1582
1583 * src/output.c (output_gram): Rely on nritems, not the
1584 0-sentinel. See below.
1585 Use -1 as separator, not 0.
1586 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1587 Rely on -1 as separator in yyrhs, instead of 0.
1588 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1589 twice `Now at end of input', therefore there are two lines less to
1590 expect.
1591
b365aa05
AD
15922001-12-27 Akim Demaille <akim@epita.fr>
1593
1594 * tests/regression.at (Unresolved SR Conflicts):
1595 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1596 below.
1597
30171f79
AD
15982001-12-27 Akim Demaille <akim@epita.fr>
1599
1600 * src/LR0.c (new_state): Recognize the final state by the fact it
1601 is reached by eoftoken.
1602 (insert_start_shifting_state, insert_eof_shifting_state)
1603 (insert_accepting_state, augment_automaton): Remove, since now
1604 these states are automatically computed from the initial state.
1605 (generate_states): Adjust.
1606 * src/print.c: When reporting a rule number to the user, substract
1607 1, so that the axiom rule is rule 0, and the first user rule is 1.
1608 * src/reduce.c: Likewise.
1609 * src/print_graph.c (print_core): For the time being, just as for
1610 the report, depend upon --trace-flags to dump the full set of
1611 items.
1612 * src/reader.c (readgram): Once the grammar read, insert the rule
1613 0: `$axiom: START-SYMBOL $'.
1614 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1615 number of the states has changed (the final state is no longer
1616 necessarily the last), catch up.
1617
75142d45
AD
16182001-12-27 Akim Demaille <akim@epita.fr>
1619
1620 Try to make the use of the eoftoken valid. Given that its value
1621 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1622 is used instead of > 0 where appropriate, (ii), depend upon nritems
1623 instead of the 0-sentinel.
1624
1625 * src/gram.h, src/gram.c (nritems): New.
1626 Expected to be duplication of nitems, but for the time being...
1627 * src/reader.c (packgram): Assert nritems and nitems are equal.
1628 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1629 * src/closure.c (print_closure, print_fderives): Likewise.
1630 * src/gram.c (ritem_print): Likewise.
1631 * src/print.c (print_core, print_grammar): Likewise.
1632 * src/print_graph.c: Likewise.
1633
b7c49edf
AD
16342001-12-27 Akim Demaille <akim@epita.fr>
1635
1636 * src/main.c (main): If there are complains after grammar
1637 reductions, then output the report anyway if requested, then die.
1638 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1639 * src/reader.c (eoftoken): New.
1640 (parse_token_decl): If the token being defined has value `0', it
1641 is the eoftoken.
1642 (packsymbols): No longer hack `tags' to insert `$' by hand.
1643 Be sure to preserve the value of the eoftoken.
1644 (reader): Make sure eoftoken is defined.
1645 Initialize nsyms to 0: now eoftoken is created just like the others.
1646 * src/print.c (print_grammar): Don't special case the eof token.
1647 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1648 lie anyway, albeit pleasant.
1649 * tests/calc.at: Exercise error messages with eoftoken.
1650 Change the grammar so that empty input is invalid.
1651 Adjust expectations.
1652 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1653
ec2da99f
AD
16542001-12-27 Akim Demaille <akim@epita.fr>
1655
1656 * configure.in: Check the protos of strchr ans strspn.
1657 Replace strchr if needed.
1658 * src/system.h: Provide the protos of strchr, strspn and memchr if
1659 missing.
1660 * lib/strchr.c: New.
1661 * src/reader.c (symbols_save): Use strchr.
1662
8adfa272
AD
16632001-12-27 Akim Demaille <akim@epita.fr>
1664
1665 * src/print.c, src/print_graph.c (escape): New.
1666 Use it to quote the TAGS outputs.
1667 * src/print_graph.c (print_state): Now errors are in red, and
1668 reductions in green.
1669 Prefer high to wide: output the state number on a line of its own.
1670
80dac38c
AD
16712001-12-27 Akim Demaille <akim@epita.fr>
1672
1673 * src/state.h, src/state.c (reductions_new): New.
1674 * src/LR0.c (set_state_table): Let all the states have a
1675 `reductions', even if reduced to 0.
1676 (save_reductions): Adjust.
1677 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1678 * src/print.c (print_reductions, print_actions): Adjust.
1679 * src/output.c (action_row): Adjust.
1680
2cec70b9
AD
16812001-12-27 Akim Demaille <akim@epita.fr>
1682
1683 * src/state.h, src/state.c (errs_new, errs_dup): New.
1684 * src/LR0.c (set_state_table): Let all the states have an errs,
1685 even if reduced to 0.
1686 * src/print.c (print_errs, print_reductions): Adjust.
1687 * src/output.c (output_actions, action_row): Adjust.
1688 * src/conflicts.c (resolve_sr_conflict): Adjust.
1689
13ca549a
AD
16902001-12-27 Akim Demaille <akim@epita.fr>
1691
1692 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1693
5092aba5
AD
16942001-12-27 Akim Demaille <akim@epita.fr>
1695
1696 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1697 * src/print.c: here.
1698 (lookaheadset, shiftset): New, used as additional storage by
1699 print_reductions.
1700 (print_results): Adjust.
1701 (print_shifts, print_gotos, print_errs): New, extracted from...
1702 (print_actions): here.
1703 * src/print_graph.c (print_actions): Remove dead code.
1704
11e2beca
AD
17052001-12-27 Akim Demaille <akim@epita.fr>
1706
1707 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1708 `$n' and `@n'.
1709
dac3c910
AD
17102001-12-27 Akim Demaille <akim@epita.fr>
1711
1712 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1713 (build_relations): Adjust.
1714
d0b0fefa
AD
17152001-12-27 Akim Demaille <akim@epita.fr>
1716
1717 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1718 duplication.
1719
adc8c848
AD
17202001-12-27 Akim Demaille <akim@epita.fr>
1721
1722 * src/reader.c (packgram): Catch nitems overflows.
1723
14d293ac
AD
17242001-12-27 Akim Demaille <akim@epita.fr>
1725
1726 * src/files.c, src/files.h (guard_obstack): Remove.
1727 * src/output.c (output): Adjust.
1728 * src/reader.c (parse_braces): New, factoring...
1729 (copy_action, copy_guard): these two which are renamed as...
1730 (parse_action, parse_guard): these.
1731 As a voluntary consequence, using braces around guards is now
1732 mandatory.
1733
f499b062
AD
17342001-12-27 Akim Demaille <akim@epita.fr>
1735
1736 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1737 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1738 members.
1739 (symbol_list_new): Adjust.
1740 (copy_action): action_line is the first line, not the last.
1741 (copy_guard): Just as for actions, store the `action' only, not
1742 the switch/case/break flesh.
1743 Don't parse the user action that might follow the guard, let...
1744 (readgram): do it, i.e., now, there can be an action after a
1745 guard.
1746 In other words the guard is just explicitly optional.
1747 (packgram): Adjust.
1748 * src/output.c (guards_output): New.
1749 (output_parser): Call it when needed.
1750 (output): Also free the guard and attrs obstacks.
1751 * src/files.c, src/files.h (obstack_save): Remove.
1752 (output_files): Remove.
1753 As a result, if one needs the former `.act' file, using an
1754 appropriate skeleton which requires actions and guards is now
1755 required.
1756 * src/main.c (main): Adjust.
1757 * tests/semantic.at: New.
1758 * tests/regression.at: Use `input.y' as input file name.
1759 Avoid 8+3 problems by requiring input.c when the test needs the
1760 parser.
1761
d945f5cd
AD
17622001-12-27 Akim Demaille <akim@epita.fr>
1763
1764 * src/reader.c (symbol_list_new): Be sure to initialize all the
1765 fields.
1766
d200e455
AD
17672001-12-27 Akim Demaille <akim@epita.fr>
1768
1769 All the hacks using a final pseudo state are now useless.
1770
1771 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1772 * src/lalr.c (nLA): New.
1773 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1774 instead of lookaheadsp from the pseudo state (nstate + 1).
1775
f9507c28
AD
17762001-12-27 Akim Demaille <akim@epita.fr>
1777
1778 * src/output.c (action_row, token_actions): Use a state_t instead
1779 of a integer, and nlookaheads instead of the following state's
1780 lookaheadsp.
1781
065fbd27
AD
17822001-12-27 Akim Demaille <akim@epita.fr>
1783
1784 * src/conflicts.c (log_resolution, flush_shift)
1785 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1786 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1787 (conflicts_print, print_reductions): Use a state_t instead of an
1788 integer when referring to a state.
1789 As much as possible, depend upon nlookaheads, instead of the
1790 `lookaheadsp' member of the following state (since lookaheads of
1791 successive states are successive, the difference between state n + 1
1792 and n served as the number of lookaheads for state n).
1793 * src/lalr.c (add_lookback_edge): Likewise.
1794 * src/print.c (print_core, print_actions, print_state)
1795 (print_results): Likewise.
1796 * src/print_graph.c (print_core, print_actions, print_state)
1797 (print_graph): Likewise.
1798 * src/conflicts.h: Adjust.
1799
1b177bd7
AD
18002001-12-27 Akim Demaille <akim@epita.fr>
1801
1802 * src/bison.hairy: Formatting/comment changes.
1803 ANSIfy.
1804 Remove `register' indications.
1805 Add plenty of `static'.
1806
7742ddeb
AD
18072001-12-27 Akim Demaille <akim@epita.fr>
1808
1809 * src/output.c (prepare): Drop the muscle `ntbase' which
1810 duplicates ntokens.
1811 * src/bison.simple: Formatting/comment changes.
1812 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1813 is an undocumented synonym.
1814
1fa14068
AD
18152001-12-22 Akim Demaille <akim@epita.fr>
1816
1817 * src/output.c (output_table_data): Change the prototype to use
1818 `int' for array ranges: some invocations do pass an int, not a
1819 short.
1820 Reported by Wayne Green.
1821
b9752825
AD
18222001-12-22 Akim Demaille <akim@epita.fr>
1823
1824 Some actions of web2c.y are improperly triggered.
1825 Reported by Mike Castle.
1826
1827 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1828 * tests/regression.at (Web2c): Rename as...
1829 (Web2c Report): this.
1830 (Web2c Actions): New.
1831
776209d6
AD
18322001-12-22 Akim Demaille <akim@epita.fr>
1833
1834 Reductions in web2c.y are improperly reported.
1835 Reported by Mike Castle.
1836
1837 * src/conflicts.c (print_reductions): Fix.
1838 * tests/regression.at (Web2c): New.
1839
275fc3ad
AD
18402001-12-18 Akim Demaille <akim@epita.fr>
1841
1842 Some host fail on `assert (!"foo")', which expands to
1843 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1844 Reported by Nelson Beebee.
1845
1846 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1847 `#define it_succeeded 0' and `assert (it_succeeded)'.
1848
897668ee
MA
18492001-12-17 Marc Autret <autret_m@epita.fr>
1850
1851 * src/bison.simple: Don't hard code the skeleton line and filename.
1852 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1853 New line counter 'skeleton_line' (skeleton-line muscle).
1854
ab3399e0
PE
18552001-12-17 Paul Eggert <eggert@twinsun.com>
1856
1857 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1858 YYDEBUG must be defined to a nonzero value.
1859
1860 * src/bison.simple (yytname): Do not assume that the user defines
1861 YYDEBUG to a properly parenthesized expression.
1862
3877f72b
AD
18632001-12-17 Akim Demaille <akim@epita.fr>
1864
1865 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1866 nlookaheads is a new member.
1867 Adjust all users.
1868 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1869 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1870 state.
776209d6 1871
331dbc1b
AD
18722001-12-17 Akim Demaille <akim@epita.fr>
1873
1874 * src/files.h, src/files.c (open_files, close_files): Remove.
1875 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1876 let...
1877 * src/reader.c (reader): Do it.
776209d6 1878
be750e4c
AD
18792001-12-17 Akim Demaille <akim@epita.fr>
1880
1881 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 1882
709ae8c6
AD
18832001-12-17 Akim Demaille <akim@epita.fr>
1884
1885 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1886 (flush_reduce): New.
1887 (resolve_sr_conflict): Adjust.
776209d6 1888
f87685c3
AD
18892001-12-17 Akim Demaille <akim@epita.fr>
1890
1891 * src/output.c (output_obstack): Be static and rename as...
1892 (format_obstack): this, to avoid any confusion with files.c's
1893 output_obstack.
1894 * src/reader.h (muscle_obstack): Move to...
1895 * src/output.h: here, since it's defined in output.c.
1896
837491d8
AD
18972001-12-17 Akim Demaille <akim@epita.fr>
1898
1899 * src/output.c (action_row, save_column, default_goto)
1900 (sort_actions, matching_state, pack_vector): Better variable
1901 locality.
1902
796d61fb
AD
19032001-12-17 Akim Demaille <akim@epita.fr>
1904
1905 * src/output.c: Various formatting changes.
776209d6 1906
64d15509
AD
19072001-12-17 Akim Demaille <akim@epita.fr>
1908
1909 * src/files.c (output_files): Free the output_obstack.
1910 * src/main.c (main): Call print and print_graph conditionally.
1911 * src/print.c (print): Work unconditionally.
1912 * src/print_graph.c (print_graph): Work unconditionally.
1913 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1914
fbc8ecb7
MA
19152001-12-16 Marc Autret <autret_m@epita.fr>
1916
1917 * src/output.c (actions_output): Fix. When we use %no-lines,
1918 there is one less line per action.
1919
f0440388
MA
19202001-12-16 Marc Autret <autret_m@epita.fr>
1921
1922 * src/bison.simple: Remove a useless #line directive.
1923 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1924 * src/output.c (get_lines_number): New.
776209d6 1925 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
1926 output muscles.
1927 Fix line numbering.
1928 (actions_output): Computes the number of lines taken by actions.
1929 (output_master_parser): Insert new skeleton which is the name of
1930 the output parser file name.
1931
a79986b8
MA
19322001-12-15 Marc Autret <autret_m@epita.fr>
1933
1934 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1935
4ec8e00f
MA
19362001-12-15 Marc Autret <autret_m@epita.fr>
1937
1938 * src/output.c (output_gram): Keep track of the hairy one.
1939
1a4648ff
AD
19402001-12-15 Akim Demaille <akim@epita.fr>
1941
1942 Make `make distcheck' work.
1943
1944 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1945 system.h which uses libgettext.h.
1946
9c2c67e6
AD
19472001-12-15 Akim Demaille <akim@epita.fr>
1948
1949 * src/nullable.c (set_nullable): Useless rules must be skipped,
1950 otherwise, since we range over their symbols, we might look at a
1951 nonterminal which no longer ``exists'', i.e., it is not counted in
1952 `nvars', hence we overflow our arrays.
1953
93ede233
AD
19542001-12-15 Akim Demaille <akim@epita.fr>
1955
1956 The header can also be produced directly, without any obstack!
1957 Yahoo!
1958
1959 * src/files.c, src/files.h (defines_obstack): Remove.
1960 (compute_header_macro): Global.
1961 (defines_obstack_save): Remove.
1962 * src/reader.c (parse_union_decl): No longer output to
1963 defines_obstack: its content can be found in the `stype' muscle
1964 anyway.
1965 (output_token_translations): Merge into...
1966 (symbols_output): this.
1967 Rename as...
1968 (symbols_save): this.
1969 (reader): Adjust.
1970 * src/output.c (header_output): New.
1971 (output): Call it.
1972
2666f928
AD
19732001-12-15 Akim Demaille <akim@epita.fr>
1974
1975 * src/reader.c (parse_union_decl): Instead of handling two obstack
1976 simultaneously, use one to define the `stype' muscle, and use the
1977 value of the latter to fill defines_obstack.
1978 (copy_comment): Remove.
1979 (copy_comment2): Work for a single obstack.
1980 Rename as...
1981 (copy_comment): this.
1982
428046f8
AD
19832001-12-15 Akim Demaille <akim@epita.fr>
1984
1985 * src/lex.c, src/lex.h (xgetc): No longer static.
1986 * src/reader.c (parse_union_decl): Revamp.
1987
ea52d706
AD
19882001-12-15 Akim Demaille <akim@epita.fr>
1989
1990 Still making progress in separating Bison into (i) input, (ii)
1991 process, (iii) output: now we can directly output the parser file
1992 without using table_obstack at all.
1993
1994 * src/files.c, src/files.h (table_obstack): Bye bye.
1995 (parser_file_name): New.
1996 * src/files.c (compute_output_file_names): Compute it.
1997 * src/output.c (actions_output, output_parser)
1998 (output_master_parser): To a file instead of an obstack.
1999
3f96f4dc
AD
20002001-12-15 Akim Demaille <akim@epita.fr>
2001
2002 Attach actions to rules, instead of pre-outputting them to
2003 actions_obstack.
2004
2005 * src/gram.h (rule_t): action and action_line are new members.
2006 * src/reader.c (symbol_list): Likewise.
2007 (copy_action): Save the actions within the rule.
2008 (packgram): Save them in rule_table.
2009 * src/output.c (actions_output): New.
2010 (output_parser): Use it on `%%actions'.
2011 (output_rule_data): Don't free rule_table.
2012 (output): Do it.
2013 (prepare): Don't save the `action' muscle.
2014 * src/bison.simple: s/%%action/%%actions/.
2015
51576fb3
AD
20162001-12-15 Akim Demaille <akim@epita.fr>
2017
2018 * src/reader.c (copy_action): When --yacc, don't append a `;'
2019 to the user action: let it fail if lacking.
dee049eb 2020 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 2021
2648a72d
AD
20222001-12-14 Akim Demaille <akim@epita.fr>
2023
2024 * src/lex.c (literalchar): Simply return the char you decoded, non
2025 longer mess around with obstacks and int pointers.
2026 Adjust all callers.
2027
92790e5b
AD
20282001-12-14 Akim Demaille <akim@epita.fr>
2029
2030 * src/lex.c (literalchar): Don't escape the special characters,
2031 just decode them, and keep them as char (before, eol was output as
2032 the 2 char string `\n' etc.).
2033 * src/output.c (output_rule_data): Use quotearg to output the
2034 token strings.
2035
927c1557
PE
20362001-12-13 Paul Eggert <eggert@twinsun.com>
2037
2038 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
2039 Do not infringe on the global user namespace when using C++.
2040 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
2041 All uses of `fprintf' and `stderr' changed.
2042
2043 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2044
ed8e1f68
AD
20452001-12-13 Akim Demaille <akim@epita.fr>
2046
2047 The computation of nullable is broken: it doesn't handle empty
2048 RHS's properly.
2049
2050 * tests/torture.at (GNU AWK Grammar): New.
2051 * tests/sets.at (Nullable): New.
2052 * src/nullable.c (set_nullable): Instead of blindly looping over
2053 `ritems', loop over the rules, and then over their rhs's.
2054
2055 Work around Autotest bugs.
2056
2057 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2058 frame, because Autotest understand lines starting with a `+' as
2059 traces from the shell. Then, they are not processed properly.
2060 Admittedly an Autotest bug, but we don't have time to wait for
2061 Autotest to catch up.
2062 * tests/regression.at (Broken Closure): Adjust to the new table
2063 frames.
2064 Move to...
2065 * tests/sets.at: here.
2066
cb581495
AD
20672001-12-13 Akim Demaille <akim@epita.fr>
2068
2069 * src/closure.c (closure): Use nrules instead of playing tricks
2070 with BITS_PER_WORD.
2071
2e729273
AD
20722001-12-13 Akim Demaille <akim@epita.fr>
2073
2074 * src/print.c (print_actions): Output the handling of `$' as the
2075 traces do: shifting the token EOF. Before EOF was treated as a
2076 nonterminal.
2077 * tests/regression.at: Adjust some tests.
2078 * src/print_graph.c (print_core): Complete the set of items via
2079 closure. The next-to-final and final states are still unsatisfying,
2080 but that's to be addressed elsewhere.
2081 No longer output the rule numbers, but do output the state number.
2082 A single loop for the shifts + gotos is enough, but picked a
2083 distinct color for each.
2084 (print_graph): Initialize and finalize closure.
2085
107f7dfb
AD
20862001-12-13 Akim Demaille <akim@epita.fr>
2087
2088 * src/reader.c (readgram): Remove dead code, an strip useless
2089 braces.
2090 (get_type): Remove, unused.
2091
9b53a24f
AD
20922001-12-12 Akim Demaille <akim@epita.fr>
2093
2094 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
2095 on that of lib/error.c.
2096
dbfb6dcd
AD
20972001-12-12 Akim Demaille <akim@epita.fr>
2098
2099 Some hosts don't like `/' in includes.
2100
2101 * src/system.h: Include libgettext.h without qualifying the path.
2102 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
2103 $(top_srcdir).
2104
c25fb648
MA
21052001-12-11 Marc Autret <autret_m@epita.fr>
2106
2107 * src/output.c (output_parser): Remove useless muscle.
2108
710ddc4f
MA
21092001-12-11 Marc Autret <autret_m@epita.fr>
2110
2111 * src/bison.simple: Remove #line just before %%epilogue. It
2112 is now handled in ...
2113 * src/reader.c (read_additionnal_code): Add the output of a
2114 #line for the epilogue.
2115
e83d80b8
MA
21162001-12-10 Marc Autret <autret_m@epita.fr>
2117
927c1557 2118 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
2119 replace precedent remove.
2120 * src/bison.simple: Remove #line before %%prologue because
2121 %%input-line is wrong at this time.
2122
971d5158
MA
21232001-12-10 Marc Autret <autret_m@epita.fr>
2124
2125 * src/reader.c (symbols_output): Clean up.
927c1557 2126 * src/output.c (output_gram, output): Clean up.
971d5158 2127
5edafffd
AD
21282001-12-10 Akim Demaille <akim@epita.fr>
2129
2130 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2131 * src/LR0.c (set_state_table): here.
2132 * src/lalr.c (lalr): Call it.
2133
0279f8e9
AD
21342001-12-10 Akim Demaille <akim@epita.fr>
2135
2136 * src/state.h (shifts): Remove the `number' member: shifts are
2137 attached to state, hence no longer need to be labelled with a
2138 state number.
2139
190c4f5f
AD
21402001-12-10 Akim Demaille <akim@epita.fr>
2141
2142 Now that states have a complete set of members, the linked list of
2143 shifts is useless: just fill directly the state's shifts member.
2144
2145 * src/state.h (shifts): Remove the `next' member.
2146 * src/LR0.c (first_state, last_state): Remove.
2147 Adjust the callers.
2148 (augment_automaton): Don't look for the shifts that must be added
2149 a shift on EOF: it is those of the state we looked for! But now,
2150 since shifts are attached, it is no longer needed to looking
2151 merely by its id: its number.
2152
2a73b93d
AD
21532001-12-10 Akim Demaille <akim@epita.fr>
2154
2155 * src/LR0.c (augment_automaton): Better variable locality.
2156 Remove an impossible branch: if there is a state corresponding to
2157 the start symbol being shifted, then there is shift for the start
2158 symbol from the initial state.
2159
74392f6a
AD
21602001-12-10 Akim Demaille <akim@epita.fr>
2161
2162 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2163 only when appropriate: when insert_start_shifting_state' is not
2164 invoked.
2165 * tests/regression.at (Rule Line Numbers): Adjust.
2166
37c82725
AD
21672001-12-10 Akim Demaille <akim@epita.fr>
2168
2169 * src/LR0.c (augment_automaton): Now that all states have shifts,
2170 merge the two cases addition shifts to the initial state.
2171
6a164e0c
AD
21722001-12-10 Akim Demaille <akim@epita.fr>
2173
2174 * src/lalr.c (set_state_table): Move to...
2175 * src/LR0.c: here.
2176 * src/lalr.c (lalr): Don't call it...
2177 * src/LR0.c (generate_states): do it.
2178 * src/LR0.h (first_state): Remove, only the table is used.
2179
7215de24
AD
21802001-12-10 Akim Demaille <akim@epita.fr>
2181
2182 * src/LR0.h (first_shift, first_reduction): Remove.
2183 * src/lalr.c: Don't use first_shift: find shifts through the
2184 states.
2185
80e25d4d
AD
21862001-12-10 Akim Demaille <akim@epita.fr>
2187
2188 * src/LR0.c: Attach shifts to states as soon as they are
2189 computed.
2190 * src/lalr.c (set_state_table): Instead of assigning shifts to
2191 state, just assert that the mapping was properly done.
2192
0ab3728b
AD
21932001-12-10 Akim Demaille <akim@epita.fr>
2194
2195 * src/LR0.c (insert_start_shift): Rename as...
2196 (insert_start_shifting_state): this.
2197 (insert_eof_shifting_state, insert_accepting_state): New.
2198 (augment_automaton): Adjust.
2199 Better locality of the variables.
2200 When looking if the start_symbol is shifted from the initial
2201 state, using `while (... symbol != start_symbol ...)' sounds
2202 better than `while (... symbol < start_symbol ...)': If fail
2203 to see how the order between symbols could be relevant!
2204
78af9bbc
AD
22052001-12-10 Akim Demaille <akim@epita.fr>
2206
2207 * src/getargs.h: Don't declare `spec_name_prefix' and
2208 `spec_file_prefix', declared by src/files.h.
2209 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2210 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2211 * src/output.c (prepare): Adjust.
2212 * src/reader.c (symbols_output): Likewise.
2213 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2214
bdef2a41
AD
22152001-12-10 Akim Demaille <akim@epita.fr>
2216
2217 * src/muscle_tab.c (muscle_init): NULL is a better default than
2218 `"0"'.
2219
3735969c
AD
22202001-12-10 Akim Demaille <akim@epita.fr>
2221
2222 * src/reader.c (reader): Calling symbols_output once is enough.
2223
49701457
AD
22242001-12-10 Akim Demaille <akim@epita.fr>
2225
2226 Now that states have a complete set of members, the linked list of
2227 reductions is useless: just fill directly the state's reductions
2228 member.
2229
2230 * src/state.h (struct reductions): Remove member `number' and
2231 `next'.
2232 * src/LR0.c (first_reduction, last_reduction): Remove.
2233 (save_reductions): Don't link the new reductions, store them in
2234 this_state.
2235 * src/lalr.c (set_state_table): No need to attach reductions to
2236 states, it's already done.
2237 * src/output.c (output_actions): No longer free the shifts, then
2238 the reductions, then the states: free all the states and their
2239 members.
2240
0edad749
AD
22412001-12-10 Akim Demaille <akim@epita.fr>
2242
2243 * src/options.c (OPTN, DRTV, BOTH): New.
2244 (option_table): Use them.
2245
0edad749
AD
2246 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2247 the job of system.h.
2248 * src/options.c: Don't include stdio.h and xalloc.h for the same
2249 reasons.
2250
5449dd0f
AD
22512001-12-10 Akim Demaille <akim@epita.fr>
2252
2253 * src/output.c (output, prepare): Make sure the values of the
2254 muscles `action' and `prologue' are 0-terminated.
2255
a870c567
AD
22562001-12-10 Akim Demaille <akim@epita.fr>
2257
2258 Clean up GCC warnings.
2259
2260 * src/reader.c (copy_action): `buf' is not used.
2261 (parse_skel_decl): Be static.
2262 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2263 * src/options.h (create_long_option_table): Have a real prototype.
2264 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2265 (hash_delete_at): Return const void *.
2266 Adjust casts to preserve the const.
2267
80df8768
AD
22682001-12-10 Akim Demaille <akim@epita.fr>
2269
2270 * configure.in: Require 2.52g.
2271 M4 is not needed, but AUTOM4TE is.
2272 * m4/m4.m4: Remove.
2273 * tests/Makefile.am: Adjust.
2274
f693ad14
AD
22752001-12-10 Akim Demaille <akim@epita.fr>
2276
2277 One structure for states is enough, even though theoretically
2278 there are LR(0) states and LALR(1) states.
2279
2280 * src/lalr.h (state_t): Remove.
2281 (state_table): Be state_t **, not state_t *.
2282 * src/state.h (core, CORE_ALLOC): Rename as...
2283 (state_t, STATE_ALLOC): this.
2284 Add the LALR(1) members: shifts, reductions, errs.
2285 * src/LR0.c (state_table): Rename as...
2286 (state_hash): this, to avoid name clashes with the global
2287 `state_table'.
2288 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2289 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2290
74ffbcb6
AD
22912001-12-10 Akim Demaille <akim@epita.fr>
2292
2293 Bison dumps core on bash.y.
2294 Reported by Pascal Bart.
2295
2296 * src/warshall.c (bitmatrix_print): New.
2297 (TC): Use it.
2298 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2299 j must be the outer loop.
2300 * tests/regression.at (Broken Closure): New.
2301
07708e19
AD
23022001-12-05 Akim Demaille <akim@epita.fr>
2303
2304 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2305 its argument.
2306