]> git.saurik.com Git - bison.git/blame - ChangeLog
Grammar declarations may be found in the grammar section.
[bison.git] / ChangeLog
CommitLineData
1921f1d7
AD
12002-06-14 Akim Demaille <akim@epita.fr>
2
3 Grammar declarations may be found in the grammar section.
4
5 * src/parse-gram.y (rules_or_grammar_declaration): New.
6 (declarations): Each declaration may end with a semicolon, not
7 just...
8 (grammar_declaration): `"%union"'.
9 (grammar): Branch to rules_or_grammar_declaration.
10
11
4515534c
AD
122002-06-14 Akim Demaille <akim@epita.fr>
13
14 * src/main.c (main): Invoke scanner_free.
15
16
f958596b
AD
172002-06-14 Akim Demaille <akim@epita.fr>
18
19 * src/output.c (m4_invoke): Extracted from...
20 (output_skeleton): here.
21 Free tempfile.
22
23
2c569025
AD
242002-06-14 Akim Demaille <akim@epita.fr>
25
26 * src/parse-gram.y (directives, directive, gram)
27 (grammar_directives, precedence_directives, precedence_directive):
28 Rename as...
29 (declarations, declaration, grammar, grammar_declaration)
30 (precedence_declaration, precedence_declarator): these.
31 (symbol_declaration): New.
32
33
592e8d4d
AD
342002-06-14 Akim Demaille <akim@epita.fr>
35
36 * src/files.c (action_obstack): Remove, unused.
37 (output_obstack): Remove it, and all its dependencies, as it is no
38 longer needed.
39 * src/reader.c (epilogue_set): Build the epilogue in the
40 muscle_obstack.
41 * src/output.h, src/output.c (muscle_obstack): Move to...
42 * src/muscle_tab.h, src/muscle_tab.h: here.
43 (muscle_init): Initialize muscle_obstack.
44 (muscle_free): New.
45 * src/main.c (main): Call it.
46
47
0c15323d
AD
482002-06-14 Akim Demaille <akim@epita.fr>
49
50 * src/location.h: New, extracted from...
51 * src/reader.h: here.
52 * src/Makefile.am (noinst_HEADERS): Merge into
53 (bison_SOURCES): this.
54 Add location.h.
55 * src/parse-gram.y: Use location_t instead of Bison's.
56 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
57 Use location_t instead of ints.
58
59
e96c9728
AD
602002-06-14 Akim Demaille <akim@epita.fr>
61
62 * data/bison.simple, data/bison.c++: Be sure to restore the
63 current #line when returning to the skeleton contents after having
64 exposed the input file's #line.
65
75d1fe16
AD
662002-06-12 Akim Demaille <akim@epita.fr>
67
68 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
69 eager.
70 * tests/actions.at (Exotic Dollars): New.
71
6c35d22c
AD
722002-06-12 Akim Demaille <akim@epita.fr>
73
74 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
75 ['"/] too eagerly.
76 * tests/input.at (Torturing the Scanner): New.
77
1d6412ad
AD
782002-06-11 Akim Demaille <akim@epita.fr>
79
80 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
81 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
82 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
83 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
84 * src/reader.c (reader): Use it.
85
4cdb01db
AD
862002-06-11 Akim Demaille <akim@epita.fr>
87
88 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
89 Adjust all callers.
90 (scanner_last_string_free): New.
91
44995b2e
AD
922002-06-11 Akim Demaille <akim@epita.fr>
93
94 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
95 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
96 (last_string, YY_OBS_FREE): New.
97 Use them when returning an ID.
98
e9955c83
AD
992002-06-11 Akim Demaille <akim@epita.fr>
100
101 Have Bison grammars parsed by a Bison grammar.
102
103 * src/reader.c, src/reader.h (prologue_augment): New.
104 * src/reader.c (copy_definition): Remove.
105
106 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
107 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
108 (grammar_current_rule_prec_set, grammar_current_rule_check)
109 (grammar_current_rule_symbol_append)
110 (grammar_current_rule_action_append): Export.
111 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
112 (symbol_list_action_append): Remove.
113 Hook the routines from reader.
114 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
115 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
116
117 * src/reader.c (read_declarations): Remove, unused.
118
119 * src/parse-gram.y: Handle the epilogue.
120 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
121 (grammar_start_symbol_set): this.
122 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
123 * src/reader.c (readgram): Remove, unused.
124 (reader): Adjust to insert eoftoken and axiom where appropriate.
125
126 * src/reader.c (copy_dollar): Replace with...
127 * src/scan-gram.h (handle_dollar): this.
128 * src/parse-gram.y: Remove `%thong'.
129
130 * src/reader.c (copy_at): Replace with...
131 * src/scan-gram.h (handle_at): this.
132
133 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
134 New.
135
136 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
137 time being.
138
139 * src/reader.h, src/reader.c (grammar_rule_end): New.
140
141 * src/parse.y (current_type, current_class): New.
142 Implement `%nterm', `%token' support.
143 Merge `%term' into `%token'.
144 (string_as_id): New.
145 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
146 type name.
147
148 * src/parse-gram.y: Be sure to handle properly the beginning of
149 rules.
150
151 * src/parse-gram.y: Handle %type.
152 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
153
154 * src/parse-gram.y: More directives support.
155 * src/options.c: No longer handle source directives.
156
157 * src/parse-gram.y: Fix %output.
158
159 * src/parse-gram.y: Handle %union.
160 Use the prologue locations.
161 * src/reader.c (parse_union_decl): Remove.
162
163 * src/reader.h, src/reader.c (epilogue_set): New.
164 * src/parse-gram.y: Use it.
165
166 * data/bison.simple, data/bison.c++: b4_stype is now either not
167 defined, then default to int, or to the contents of %union,
168 without `union' itself.
169 Adjust.
170 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
171
172 * src/output.c (actions_output): Don't output braces, as they are
173 already handled by the scanner.
174
175 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
176 characters to themselves.
177
178 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
179 that the epilogue has a proper #line.
180
181 * src/parse-gram.y: Handle precedence/associativity.
182
183 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
184 a terminal.
185 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
186 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
187 at all to define terminals that cannot be emitted.
188
189 * src/scan-gram.l: Escape M4 characters.
190
191 * src/scan-gram.l: Working properly with escapes in user
192 strings/characters.
193
194 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
195 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
196 grammar.
197 Use more modest sizes, as for the time being the parser does not
198 release memory, and therefore the process swallows a huge amount
199 of memory.
200
201 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
202 stricter %token grammar.
203
204 * src/symtab.h (associativity): Add `undef_assoc'.
205 (symbol_precedence_set): Do nothing when passed an undef_assoc.
206 * src/symtab.c (symbol_check_alias_consistence): Adjust.
207
208 * tests/regression.at (Invalid %directive): Remove, as it is now
209 meaningless.
210 (Invalid inputs): Adjust to the new error messages.
211 (Token definitions): The new grammar doesn't allow too many
212 eccentricities.
213
214 * src/lex.h, src/lex.c: Remove.
215 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
216 (copy_character, copy_string2, copy_string, copy_identifier)
217 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
218 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
219 (parse_action): Remove.
220 * po/POTFILES.in: Adjust.
221
2e047461
AD
2222002-06-11 Akim Demaille <akim@epita.fr>
223
224 * src/reader.c (parse_action): Don't store directly into the
225 rule's action member: return the action as a string.
226 Don't require `rule_length' as an argument: compute it.
227 (grammar_current_rule_symbol_append)
228 (grammar_current_rule_action_append): New, eved out from
229 (readgram): here.
230 Remove `action_flag', `rulelength', unused now.
231
9af3fbce
AD
2322002-06-11 Akim Demaille <akim@epita.fr>
233
234 * src/reader.c (grammar_current_rule_prec_set).
235 (grammar_current_rule_check): New, eved out from...
236 (readgram): here.
237 Remove `xaction', `first_rhs': useless.
238 * tests/input.at (Type clashes): New.
239 * tests/existing.at (GNU Cim Grammar): Adjust.
240
1485e106
AD
2412002-06-11 Akim Demaille <akim@epita.fr>
242
243 * src/reader.c (grammar_midrule_action): New, Eved out from
244 (readgram): here.
245
da4160c3
AD
2462002-06-11 Akim Demaille <akim@epita.fr>
247
248 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
249 New.
250 (readgram): Use them as replacement of inlined code, crule and
251 crule1.
252
f6d0f937
AD
2532002-06-11 Akim Demaille <akim@epita.fr>
254
255 * src/reader.c (grammar_end, grammar_symbol_append): New.
256 (readgram): Use them.
257 Make the use of `p' as local as possible.
258
69078d4b
AD
2592002-06-10 Akim Demaille <akim@epita.fr>
260
261 GCJ's parser requires the tokens to be defined before the prologue.
262
263 * data/bison.simple: Output the token definition before the user's
264 prologue.
265 * tests/regression.at (Braces parsing, Duplicate string)
266 (Mixing %token styles): Check the output from bison.
267 (Early token definitions): New.
268
5e424082
AD
2692002-06-10 Akim Demaille <akim@epita.fr>
270
271 * src/symtab.c (symbol_user_token_number_set): Don't complain when
272 assigning twice the same user number to a token, so that we can
273 use it in...
274 * src/lex.c (lex): here.
275 Also use `symbol_class_set' instead of hand written code.
276 * src/reader.c (parse_assoc_decl): Likewise.
277
44536b35
AD
2782002-06-10 Akim Demaille <akim@epita.fr>
279
280 * src/symtab.c, src/symtab.c (symbol_class_set)
281 (symbol_user_token_number_set): New.
282 * src/reader.c (parse_token_decl): Use them.
283 Use a switch instead of ifs.
284 Use a single argument.
285
8b9f2372
AD
2862002-06-10 Akim Demaille <akim@epita.fr>
287
288 Remove `%thong' support as it is undocumented, unused, duplicates
289 `%token's job, and creates useless e-mail traffic with people who
290 want to know what it is, why it is undocumented, unused, and
291 duplicates `%token's job.
292
293 * src/reader.c (parse_thong_decl): Remove.
294 * src/options.c (option_table): Remove "thong".
295 * src/lex.h (tok_thong): Remove.
296
3ae2b51f
AD
2972002-06-10 Akim Demaille <akim@epita.fr>
298
299 * src/symtab.c, src/symtab.c (symbol_type_set)
300 (symbol_precedence_set): New.
301 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
302 (value_components_used): Remove, unused.
303
2f1afb73
AD
3042002-06-09 Akim Demaille <akim@epita.fr>
305
306 Move symbols handling code out of the reader.
307
308 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
309 (axiom): Move to...
310 * src/symtab.h, src/symtab.c: here.
311
312 * src/gram.c (start_symbol): Remove: use startsymbol->number.
313 * src/reader.c (startval): Rename as...
314 * src/symtab.h, src/symtab.c (startsymbol): this.
315 * src/reader.c: Adjust.
316
317 * src/reader.c (symbol_check_defined, symbol_make_alias)
318 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
319 (token_translations_init)
320 Move to...
321 * src/symtab.c: here.
322 * src/reader.c (packsymbols): Move to...
323 * src/symtab.h, src/symtab.c (symbols_pack): here.
324 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
325 argument.
326
e9bca3ad
AD
3272002-06-03 Akim Demaille <akim@epita.fr>
328
329 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
330 then statements.
331
86eff183
AD
3322002-06-03 Akim Demaille <akim@epita.fr>
333
334 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
335 structs with non literals.
336 * src/scan-skel.l: never-interactive.
337 * src/conflicts.c (enum conflict_resolution_e): No trailing
338 comma.
339 * src/getargs.c (usage): Split long literal strings.
340 Reported by Hans Aberg.
341
717be197
AD
3422002-05-28 Akim Demaille <akim@epita.fr>
343
344 * data/bison.c++: Use C++ ostreams.
345 (cdebug_): New member.
346
670ddffd
AD
3472002-05-28 Akim Demaille <akim@epita.fr>
348
349 * src/output.c (output_skeleton): Be sure to allocate enough room
350 for `/' _and_ for `\0' in full_skeleton.
351
769b430f
AD
3522002-05-28 Akim Demaille <akim@epita.fr>
353
354 * data/bison.c++: Catch up with bison.simple:
355 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
356 and Paul Eggert <eggert@twinsun.com>: `error' handing.
357 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
358 and popping traces.
359
7067cb36
PH
3602002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
361
362 * src/output.c (output_skeleton): Put an explicit path in front of
363 the skeleton file name, rather than relying on the -I directory,
364 to partially alleviate effects of having a skeleton file lying around
365 in the current directory.
769b430f 366
4a713ec2
PH
3672002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
368
769b430f 369 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
370 obstack_printf should be obstack_fgrow1.
371
b408954b
AD
3722002-05-26 Akim Demaille <akim@epita.fr>
373
374 * src/state.h (state_t): `solved_conflicts' is a new member.
375 * src/LR0.c (new_state): Set it to 0.
376 * src/conflicts.h, src/conflicts.c (print_conflicts)
377 (free_conflicts, solve_conflicts): Rename as...
378 (conflicts_print, conflicts_free, conflicts_solve): these.
379 Adjust callers.
380 * src/conflicts.c (enum conflict_resolution_e)
381 (solved_conflicts_obstack): New, used by...
382 (log_resolution): this.
383 Adjust to attach the conflict resolution to each state.
384 Complete the description with the precedence/associativity
385 information.
386 (resolve_sr_conflict): Adjust.
387 * src/print.c (print_state): Output its solved_conflicts.
388 * tests/conflicts.at (Unresolved SR Conflicts)
389 (Solved SR Conflicts): Exercise --report=all.
390
a49aecd5
AD
3912002-05-26 Akim Demaille <akim@epita.fr>
392
393 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
394 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
395 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
396 (token_number_t, item_number_as_token_number)
397 (token_number_as_item_number, muscle_insert_token_number_table):
398 Rename as...
399 (symbol_number_t, item_number_as_symbol_number)
400 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
401 these, since it is more appropriate.
402
5504898e
AD
4032002-05-26 Akim Demaille <akim@epita.fr>
404
405 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
406 `Error:' lines.
407 * data/bison.simple (yystos) [YYDEBUG]: New.
408 (yyparse) [YYDEBUG]: Display the symbols which are popped during
409 error recovery.
410 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
411
ec3bc396
AD
4122002-05-25 Akim Demaille <akim@epita.fr>
413
414 * doc/bison.texinfo (Debugging): Split into...
415 (Tracing): this new section, its former contents, and...
416 (Understanding): this new section.
417 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
418 by...
419 (report_flag): this.
420 Adjust all dependencies.
421 (report_args, report_types, report_argmatch): New.
422 (usage, getargs): Report/support -r, --report.
423 * src/options.h
424 (struct option_table_struct): Rename as..,
425 (struct option_table_s): this.
426 Rename the `set_flag' member to `flag' to match with getopt_long's
427 struct.
428 * src/options.c (option_table): Split verbose into an entry for
429 %verbose, and another for --verbose.
430 Support --report/-r, so remove -r from the obsolete --raw.
431 * src/print.c: Attach full item sets and lookaheads reports to
432 report_flag instead of trace_flag.
433 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
434
78df8250
PE
4352002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
436 and Paul Eggert <eggert@twinsun.com>
769b430f 437
78df8250
PE
438 * data/bison.simple (yyparse): Correct error handling to conform to
439 POSIX and yacc. Specifically, after syntax error is discovered,
440 do not reduce further before shifting the error token.
441 Clean up the code a bit by removing the labels yyerrdefault,
442 yyerrhandle, yyerrpop.
443 * NEWS: Document the above.
444
c0c9ea05
PH
4452002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
446
447 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
448 type; it isn't always big enough, since it doesn't necessarily
449 include non-terminals.
769b430f 450 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
451 the latter can be removed.
452 (yy_token_number_type): Remove, only one use.
453 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
454 don't use TokenNumberType as element type.
769b430f 455
c0c9ea05
PH
456 * tests/regression.at: Modify expected output to agree with change
457 to yyr1 and yytranslate.
769b430f 458
6390a83f
FK
4592002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
460
461 * src/reader.c (parse_action): Use copy_character instead of
462 obstack_1grow.
463
db7c8e9a
AD
4642002-05-13 Akim Demaille <akim@epita.fr>
465
466 * tests/regression.at (Token definitions): Prototype yylex and
467 yyerror.
468
fcc61800
PH
4692002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
470
158c687b 471 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
472 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
473 32-bit arithmetic.
474 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
475
5683e9b2
AD
4762002-05-07 Akim Demaille <akim@epita.fr>
477
478 * tests/synclines.at: Be sure to prototype yylex and yyerror to
479 avoid GCC warnings.
480
0c2d3f4c
AD
4812002-05-07 Akim Demaille <akim@epita.fr>
482
483 Kill GCC warnings.
484
485 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
486 over the RHS of each rule.
487 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
488 * src/state.h (state_t): Member `nitems' is unsigned short.
489 * src/LR0.c (get_state): Adjust.
490 * src/reader.c (packgram): Likewise.
491 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
492 `Type'.
493 (muscle_insert_int_table): Remove, unused.
494 (prepare_rules): Remove `max'.
495
1565b720
AD
4962002-05-06 Akim Demaille <akim@epita.fr>
497
498 * src/closure.c (print_firsts): Display of the symbol tags.
499 (bitmatrix_print): Move to...
500 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
501 here.
502 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
503
cfaee611
AD
5042002-05-06 Akim Demaille <akim@epita.fr>
505
506 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
507 hash_do_for_each.
508
458be8e0
AD
5092002-05-06 Akim Demaille <akim@epita.fr>
510
511 * src/LR0.c (new_state, get_state): Instead of using the global
512 `kernel_size' and `kernel_base', have two new arguments:
513 `core_size' and `core'.
514 Adjust callers.
515
a900a624
AD
5162002-05-06 Akim Demaille <akim@epita.fr>
517
518 * src/reader.c (packgram): No longer end `ritem' with a 0
519 sentinel: it is not used.
520
d4e7d3a1
AD
5212002-05-05 Akim Demaille <akim@epita.fr>
522
523 New experimental feature: display the lookaheads in the report and
524 graph.
525
526 * src/print (print_core): When --trace-flag, display the rules
527 lookaheads.
528 * src/print_graph.c (print_core): Likewise.
529 Swap the arguments.
530 Adjust caller.
531
39ceb25b
AD
5322002-05-05 Akim Demaille <akim@epita.fr>
533
534 * tests/torture.at (Many lookaheads): New test.
535
5372019f
AD
5362002-05-05 Akim Demaille <akim@epita.fr>
537
538 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
539 (GENERATE_MUSCLE_INSERT_TABLE): this.
540 (output_int_table, output_unsigned_int_table, output_short_table)
541 (output_token_number_table, output_item_number_table): Replace with...
542 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
543 (muscle_insert_short_table, muscle_insert_token_number_table)
544 (muscle_insert_item_number_table): these.
545 Adjust all callers.
546 (prepare_tokens): Don't free `translations', since...
547 * src/reader.h, src/reader.c (grammar_free): do it.
548 Move to...
549 * src/gram.h, src/gram.c (grammar_free): here.
550 * data/bison.simple, data/bison.c++: b4_token_number_max is now
551 b4_translate_max.
552
5df5f6d5
AD
5532002-05-05 Akim Demaille <akim@epita.fr>
554
555 * src/output.c (output_unsigned_int_table): New.
556 (prepare_rules): `i' is unsigned.
557 `prhs', `rline', `r2' are unsigned int.
558 Rename muscle `rhs_number_max' as `rhs_max'.
559 Output muscles `prhs_max', `rline_max', and `r2_max'.
560 Free rline and r1.
561 * data/bison.simple, data/bison.c++: Adjust to use these muscles
562 to compute types instead of constant types.
563 * tests/regression.at (Web2c Actions): Adjust.
564
b87f8b21
AD
5652002-05-04 Akim Demaille <akim@epita.fr>
566
567 * src/symtab.h (SALIAS, SUNDEF): Rename as...
568 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
569 Adjust dependencies.
570 * src/output.c (token_definitions_output): Be sure not to output a
571 `#define 'a'' when fed with `%token 'a' "a"'.
572 * tests/regression.at (Token definitions): New.
573
8bb936e4
PE
5742002-05-03 Paul Eggert <eggert@twinsun.com>
575
576 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
577 for K&R C.
578
5792002-05-03 gettextize <bug-gnu-gettext@gnu.org>
580
581 * Makefile.am (SUBDIRS): Remove intl.
582 (EXTRA_DIST): Add config/config.rpath.
583
53c71a12
AD
5842002-05-03 Akim Demaille <akim@epita.fr>
585
586 * data/bison.simple (m4_if): Don't output empty enums.
587 And actually, output valid enum definitions :(.
588
289dd0cf
AD
5892002-05-03 Akim Demaille <akim@epita.fr>
590
591 * configure.bat: Remove, completely obsolete.
592 * Makefile.am (EXTRA_DIST): Adjust.
593 Don't distribute config.rpath...
594 * config/Makefile.am (EXTRA_DIST): Do it.
595
db85e524
AD
5962002-05-03 Akim Demaille <akim@epita.fr>
597
598 * configure.in (GETTEXT_VERSION): New.
599 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
600
83ccf991
AD
6012002-05-03 Akim Demaille <akim@epita.fr>
602
603 * data/bison.simple (b4_token_enum): New.
604 (b4_token_defines): Use it to output tokens both as #define and
605 enums.
606 Suggested by Paul Eggert.
607 * src/output.c (token_definitions_output): Don't output spurious
608 white spaces.
609
1f418995
AD
6102002-05-03 Akim Demaille <akim@epita.fr>
611
612 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
613
45119f04
RA
6142002-05-02 Robert Anisko <robert@lrde.epita.fr>
615
616 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
617 Update the stack class, give a try to deque as the default container.
618
b2d52318
AD
6192002-05-02 Akim Demaille <akim@epita.fr>
620
621 * data/bison.simple (yyparse): Do not implement @$ = @1.
622 (YYLLOC_DEFAULT): Adjust to do it.
623 * doc/bison.texinfo (Location Default Action): Fix.
624
3a8b4109
AD
6252002-05-02 Akim Demaille <akim@epita.fr>
626
627 * src/reader.c (parse_braces): Merge into...
628 (parse_action): this.
629
84614e13
AD
6302002-05-02 Akim Demaille <akim@epita.fr>
631
632 * configure.in (ALL_LINGUAS): Remove.
633 * po/LINGUAS, hr.po: New.
634
fdbcd8e2
AD
6352002-05-02 Akim Demaille <akim@epita.fr>
636
637 Remove the so called hairy (semantic) parsers.
638
639 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
640 * src/gram.h, src/gram.c (semantic_parser): Remove.
641 (rule_t): Remove the guard and guard_line members.
642 * src/lex.h (token_t): remove tok_guard.
643 * src/options.c (option_table): Remove %guard and %semantic_parser
644 support.
645 * src/output.c, src/output.h (guards_output): Remove.
646 (prepare): Adjust.
647 (token_definitions_output): Don't output the `T'
648 tokens (???).
649 (output_skeleton): Don't output the guards.
650 * src/files.c, src/files.c (attrsfile): Remove.
651 * src/reader.c (symbol_list): Remove the guard and guard_line
652 members.
653 Adjust dependencies.
654 (parse_guard): Remove.
655 * data/bison.hairy: Remove.
656 * doc/bison.texinfo (Environment Variables): Remove occurrences of
657 BISON_HAIRY.
658
82b6cb3f
AD
6592002-05-02 Akim Demaille <akim@epita.fr>
660
661 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
662 (parse_guard): Rename the formal argument `stack_offset' as
663 `rule_length', which is more readable.
664 Adjust callers.
665 (copy_at, copy_dollar): Instead of outputting the hard coded
666 values of $$, $n and so forth, output invocation to b4_lhs_value,
667 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
668 Note: this patch partially drops `semantic-parser' support: it
669 always does `rule_length - n', where semantic parsers ought to
670 always use `-n'.
82b6cb3f
AD
671 * data/bison.simple, data/bison.c++ (b4_lhs_value)
672 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
673
6cbfbcc5
AD
6742002-05-02 Akim Demaille <akim@epita.fr>
675
676 * configure.in (AC_INIT): Bump to 1.49b.
677 (AM_INIT_AUTOMAKE): Short invocation.
678
b8548114
AD
6792002-05-02 Akim Demaille <akim@epita.fr>
680
681 Version 1.49a.
682
c20cd1fa
AD
6832002-05-01 Akim Demaille <akim@epita.fr>
684
685 * src/skeleton.h: Remove.
686
8a9566d4
AD
6872002-05-01 Akim Demaille <akim@epita.fr>
688
689 * src/skeleton.h: Fix the #endif.
690 Reported by Magnus Fromreide.
691
8c6d399a
PE
6922002-04-26 Paul Eggert <eggert@twinsun.com>
693
694 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
695 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 696 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 697
2b7ed18a
RA
6982002-04-25 Robert Anisko <robert@lrde.epita.fr>
699
700 * src/scan-skel.l: Postprocess quadrigraphs.
701
702 * src/reader.c (copy_character): New function, used to output
703 single characters while replacing `[' and `]' with quadrigraphs, to
704 avoid troubles with M4 quotes.
705 (copy_comment): Output characters with copy_character.
706 (read_additionnal_code): Likewise.
707 (copy_string2): Likewise.
708 (copy_definition): Likewise.
709
710 * tests/calc.at: Exercise M4 quoting.
711
34a89c50
AD
7122002-04-25 Akim Demaille <akim@epita.fr>
713
714 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
715 between `!' and the command.
716 Reported by Paul Eggert.
717
0dd1580a
RA
7182002-04-24 Robert Anisko <robert@lrde.epita.fr>
719
720 * tests/calc.at: Exercise prologue splitting.
721
722 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
723 `b4_post_prologue' instead of `b4_prologue'.
724
725 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
726 muscles.
727 (output): Free pre_prologue_obstack and post_prologue_obstack.
728 * src/files.h, src/files.c (attrs_obstack): Remove.
729 (pre_prologue_obstack, post_prologue_obstack): New.
730 * src/reader.c (copy_definition): Add a parameter to specify the
731 obstack to fill, instead of using attrs_obstack unconditionally.
732 (read_declarations): Pass pre_prologue_obstack to copy_definition if
733 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
734
83c1796f
PE
7352002-04-23 Paul Eggert <eggert@twinsun.com>
736
737 * data/bison.simple: Remove unnecessary commentary and white
738 space differences from 1_29-branch.
739 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
740
741 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
742 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
743 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
744 constructors or destructors.
745
746 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
747
1207eeac
AD
7482002-04-23 Akim Demaille <akim@epita.fr>
749
750 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
751 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
752 location with columns.
753 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
754 All reported by Paul Eggert.
755
78ab8f67
AD
7562002-04-22 Akim Demaille <akim@epita.fr>
757
758 * src/reduce.c (dump_grammar): Move to...
759 * src/gram.h, src/gram.c (grammar_dump): here.
760 Be sure to separate long item numbers.
761 Don't read the members of a rule's prec if its nil.
762
133c20e2
AD
7632002-04-22 Akim Demaille <akim@epita.fr>
764
765 * src/output.c (table_size, table_grow): New.
766 (MAXTABLE): Remove, replace uses with table_size.
767 (pack_vector): Instead of dying when the table is too big, grow it.
768
9515e8a7
AD
7692002-04-22 Akim Demaille <akim@epita.fr>
770
771 * data/bison.simple (yyr1): Its type is that of a token number.
772 * data/bison.c++ (r1_): Likewise.
773 * tests/regression.at (Web2c Actions): Adjust.
774
23c5a174
AD
7752002-04-22 Akim Demaille <akim@epita.fr>
776
777 * src/reader.c (token_translations_init): 256 is now the default
778 value for the error token, i.e., it will be assigned another
779 number if the user assigned 256 to one of her tokens.
780 (reader): Don't force 256 to error.
781 * doc/bison.texinfo (Symbols): Adjust.
782 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
783 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
784 etc. instead of 10, 20, 30 (which was used to `jump' over error
785 (256) and undefined (2)).
786
5fbb0954
AD
7872002-04-22 Akim Demaille <akim@epita.fr>
788
789 Propagate more token_number_t.
790
791 * src/gram.h (token_number_as_item_number)
792 (item_number_as_token_number): New.
793 * src/output.c (GENERATE_OUTPUT_TABLE): New.
794 Use it to create output_item_number_table and
795 output_token_number_table.
796 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
797 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
798 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
799 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
800
4f940944
AD
8012002-04-22 Akim Demaille <akim@epita.fr>
802
803 * src/output.h, src/output.c (get_lines_number): Remove.
804
3ded9a63
AD
8052002-04-19 Akim Demaille <akim@epita.fr>
806
807 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
808 as Lex/Flex'.
809 (Debugging): More details about enabling the debugging features.
810 (Table of Symbols): Describe $$, $n, @$, and @n.
811 Suggested by Tim Josling.
812
e0c471a9
AD
8132002-04-19 Akim Demaille <akim@epita.fr>
814
815 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
816
fecc10cd
AD
8172002-04-10 Akim Demaille <akim@epita.fr>
818
819 * src/system.h: Rely on HAVE_LIMITS_H.
820 Suggested by Paul Eggert.
821
51dec47b
AD
8222002-04-09 Akim Demaille <akim@epita.fr>
823
824 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
825 full stderr, and strip it according to the bison options, instead
826 of composing the error message from different bits.
827 This makes it easier to check for several error messages.
828 Adjust all the invocations.
829 Add an invocation exercising the error token.
830 Add an invocation demonstrating a stupid error message.
831 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
832 Adjust the tests.
833 Error message are for stderr, not stdout.
834
007a50a4
AD
8352002-04-09 Akim Demaille <akim@epita.fr>
836
837 * src/gram.h, src/gram.c (error_token_number): Remove, use
838 errtoken->number.
839 * src/reader.c (reader): Don't specify the user token number (2)
840 for $undefined, as it uselessly prevents using it.
841 * src/gram.h (token_number_t): Move to...
842 * src/symtab.h: here.
843 (state_t.number): Is a token_number_t.
844 * src/print.c, src/reader.c: Use undeftoken->number instead of
845 hard coded 2.
846 (Even though this 2 is not the same as above: the number of the
847 undeftoken remains being 2, it is its user token number which
848 might not be 2).
849 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
850 `user_token_number_max'.
851 Output `undef_token_number'.
852 * data/bison.simple, data/bison.c++: Use them.
853 Be sure to map invalid yylex return values to
854 `undef_token_number'. This saves us from gratuitous SEGV.
855
856 * tests/conflicts.at (Solved SR Conflicts)
857 (Unresolved SR Conflicts): Adjust.
858 * tests/regression.at (Web2c Actions): Adjust.
859
06446ccf
AD
8602002-04-08 Akim Demaille <akim@epita.fr>
861
862 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
863 Adding #line.
864 Remove the duplicate `typedefs'.
865 (RhsNumberType): Fix the declaration and various other typos.
866 Use __ofile__.
867 * data/bison.simple: Use __ofile__.
868 * src/scan-skel.l: Handle __ofile__.
869
62a3e4f0
AD
8702002-04-08 Akim Demaille <akim@epita.fr>
871
872 * src/gram.h (item_number_t): New, the type of item numbers in
873 RITEM. Note that it must be able to code symbol numbers as
874 positive number, and the negation of rule numbers as negative
875 numbers.
876 Adjust all dependencies (pretty many).
877 * src/reduce.c (rule): Remove this `short *' pointer: use
878 item_number_t.
879 * src/system.h (MINSHORT, MAXSHORT): Remove.
880 Include `limits.h'.
881 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
882 (shortcpy): Remove.
883 (MAXTABLE): Move to...
884 * src/output.c (MAXTABLE): here.
885 (prepare_rules): Use output_int_table to output rhs.
886 * data/bison.simple, data/bison.c++: Adjust.
887 * tests/torture.at (Big triangle): Move the limit from 254 to
888 500.
889 * tests/regression.at (Web2c Actions): Ajust.
890
891 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
892 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
893 passes, but produces negative #line number, once fixed, GCC is
894 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
895 C), it passes.
896 * src/state.h (state_h): Code input lines on ints, not shorts.
897
bb88b0fc
AD
8982002-04-08 Akim Demaille <akim@epita.fr>
899
900 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
901 and then the grammar.
902
9a636f47
AD
9032002-04-08 Akim Demaille <akim@epita.fr>
904
905 * src/system.h: No longer using strndup.
906
680e8701
AD
9072002-04-07 Akim Demaille <akim@epita.fr>
908
909 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
910 * src/output.c (output_table_data): Return the longest number.
911 (prepare_tokens): Output `token_number_max').
912 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
913 New.
914 Use them to define yy_token_number_type/TokenNumberType.
915 Use this type for yytranslate.
916 * tests/torture.at (Big triangle): Push the limit from 124 to
917 253.
918 * tests/regression.at (Web2c Actions): Adjust.
919
817e9f41
AD
9202002-04-07 Akim Demaille <akim@epita.fr>
921
922 * tests/torture.at (Big triangle): New.
923 (GNU AWK Grammar, GNU Cim Grammar): Move to...
924 * tests/existing.at: here.
925
5123689b
AD
9262002-04-07 Akim Demaille <akim@epita.fr>
927
928 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
929 nritems.
930 Adjust dependencies.
931
f3849179
AD
9322002-04-07 Akim Demaille <akim@epita.fr>
933
934 * src/reader.c: Normalize increments to prefix form.
935
bd02036a
AD
9362002-04-07 Akim Demaille <akim@epita.fr>
937
938 * src/reader.c, symtab.c: Remove debugging code.
939
db8837cb
AD
9402002-04-07 Akim Demaille <akim@epita.fr>
941
942 Rename all the `bucket's as `symbol_t'.
943
944 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
945 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
946 * src/symtab.c, src/symtab.h (bucket): Rename as...
947 (symbol_t): this.
948 (symbol_list_new, bucket_check_defined, bucket_make_alias)
949 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
950 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
951 (buckets_new, buckets_free, buckets_do): Rename as...
952 (symbol_list_new, symbol_check_defined, symbol_make_alias)
953 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
954 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
955 (symbols_new, symbols_free, symbols_do): these.
956
72a23c97
AD
9572002-04-07 Akim Demaille <akim@epita.fr>
958
959 Use lib/hash for the symbol table.
960
961 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
962 EOF.
963 * src/lex.c (lex): Set the `number' member of new terminals.
964 * src/reader.c (bucket_check_defined, bucket_make_alias)
965 (bucket_check_alias_consistence, bucket_translation): New.
966 (reader, grammar_free, readgram, token_translations_init)
967 (packsymbols): Adjust.
968 (reader): Number the predefined tokens.
969 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
970 for predefined tokens.
971 * src/symtab.h (bucket): Remove all the hash table related
972 members.
973 * src/symtab.c (symtab): Replace by...
974 (bucket_table): this.
975 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
976 (buckets_new, buckets_do): New.
977
280a38c3
AD
9782002-04-07 Akim Demaille <akim@epita.fr>
979
980 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
981 (start_symbol, max_user_token_number, semantic_parser)
982 (error_token_number): Initialize.
983 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
984 Initialize.
985 (reader): Don't.
986 (errtoken, eoftoken, undeftoken, axiom): Extern.
987
03b31c0c
AD
9882002-04-07 Akim Demaille <akim@epita.fr>
989
990 * src/gram.h (rule_s): prec and precsym are now pointers
991 to the bucket giving the priority/associativity.
992 Member `associativity' removed: useless.
993 * src/reduce.c, src/conflicts.c: Adjust.
994
8b3df748
AD
9952002-04-07 Akim Demaille <akim@epita.fr>
996
997 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
998 Properly escape the symbols' TAG when outputting them.
999
e601aa1d
AD
10002002-04-07 Akim Demaille <akim@epita.fr>
1001
1002 * src/lalr.h (LA): Is a bitsetv, not bitset*.
1003
b0299a2e
AD
10042002-04-07 Akim Demaille <akim@epita.fr>
1005
1006 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
1007 (LArule): this, which is an array to rule_t*.
1008 * src/print.c, src/conflicts.c: Adjust.
1009
d7e1f00c
AD
10102002-04-07 Akim Demaille <akim@epita.fr>
1011
1012 * src/gram.h (rule_t): Rename `number' as `user_number'.
1013 `number' is a new member.
1014 Adjust dependencies.
1015 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
1016
cc9305dd
AD
10172002-04-07 Akim Demaille <akim@epita.fr>
1018
1019 As a result of the previous patch, it is no longer needed
1020 to reorder ritem itself.
1021
1022 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
1023
b0940840
AD
10242002-04-07 Akim Demaille <akim@epita.fr>
1025
1026 Be sure never to walk through RITEMS, but use only data related to
1027 the rules themselves. RITEMS should be banished.
1028
1029 * src/output.c (output_token_translations): Rename as...
1030 (prepare_tokens): this.
1031 In addition to `translate', prepare the muscles `tname' and
1032 `toknum', which were handled by...
1033 (output_rule_data): this.
1034 Remove, and move the remainder of its outputs into...
1035 (prepare_rules): this new routines, which also merges content from
1036 (output_gram): this.
1037 (prepare_rules): Be sure never to walk through RITEMS.
1038 (output_stos): Rename as...
1039 (prepare_stos): this.
1040 (output): Always invoke prepare_states, after all, just don't use it
1041 in the output if you don't need it.
1042
643a5994
AD
10432002-04-07 Akim Demaille <akim@epita.fr>
1044
1045 * src/LR0.c (new_state): Display `nstates' as the name of the
1046 newly created state.
1047 Adjust to initialize first_state and last_state if needed.
1048 Be sure to distinguish the initial from the final state.
1049 (new_states): Create the itemset of the initial state, and use
1050 new_state.
1051 * src/closure.c (closure): Now that the initial state has its
1052 items properly set, there is no need for a special case when
1053 creating `ruleset'.
1054
1055 As a result, now the rule 0, reducing to $axiom, is visible in the
1056 outputs. Adjust the test suite.
1057
1058 * tests/conflicts.at (Solved SR Conflicts)
1059 (Unresolved SR Conflicts): Adjust.
1060 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
1061 * tests/conflicts.at (S/R in initial): New.
1062
b4c4ccc2
AD
10632002-04-07 Akim Demaille <akim@epita.fr>
1064
1065 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
1066 the RHS of the rules.
1067 * src/output.c (output_gram): Likewise.
1068
bba97eb2
AD
10692002-04-07 Akim Demaille <akim@epita.fr>
1070
1071 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
1072 bucket.
1073 Adjust all dependencies.
1074 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
1075 `number' of the buckets too.
1076 * src/gram.h: Include `symtab.h'.
1077 (associativity): Move to...
1078 * src/symtab.h: here.
1079 No longer include `gram.h'.
1080
c3b407f4
AD
10812002-04-07 Akim Demaille <akim@epita.fr>
1082
1083 * src/gram.h, src/gram.c (rules_rhs_length): New.
1084 (ritem_longest_rhs): Use it.
1085 * src/gram.h (rule_t): `number' is a new member.
1086 * src/reader.c (packgram): Set it.
1087 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
1088 the end of `rules', and count them out of `nrules'.
1089 (reduce_output, dump_grammar): Adjust.
1090 * src/print.c (print_grammar): It is no longer needed to check for
1091 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
1092 * tests/reduce.at (Reduced Automaton): New test.
1093
11652ab3
AD
10942002-04-07 Akim Demaille <akim@epita.fr>
1095
1096 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
1097 lacking `+ 1' to nrules, Bison reported as useless a token if it
1098 was used solely to set the precedence of the last rule...
1099
26b23c1a
AD
11002002-04-07 Akim Demaille <akim@epita.fr>
1101
1102 * data/bison.c++, data/bison.simple: Don't output the current file
1103 name in #line, to avoid useless diffs between two identical
1104 outputs under different names.
1105
18bcecb0
AD
11062002-04-07 Akim Demaille <akim@epita.fr>
1107
1108 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
1109 Normalize loops to using `< nrules + 1', not `<= nrules'.
1110
fa770c86
AD
11112002-04-07 Akim Demaille <akim@epita.fr>
1112
1113 * TODO: Update.
1114
d9b739c3
AD
11152002-04-07 Akim Demaille <akim@epita.fr>
1116
1117 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
1118 bucket.value as bucket.number.
1119
99013900
AD
11202002-04-07 Akim Demaille <akim@epita.fr>
1121
1122 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
1123 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
1124 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
1125 RHS, instead of being an index in RITEMS.
1126
e966383b
PE
11272002-04-04 Paul Eggert <eggert@twinsun.com>
1128
1129 * doc/bison.texinfo: Update copyright date.
1130 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
1131 (Symbols): Warn about running Bison in one character set,
1132 but compiling and/or running in an incompatible one.
1133 Warn about character code 256, too.
1134
11352002-04-03 Paul Eggert <eggert@twinsun.com>
1136
1137 * src/bison.data (YYSTACK_ALLOC): Depend on whether
1138 YYERROR_VERBOSE is nonzero, not whether it is defined.
1139
1140 Merge changes from bison-1_29-branch.
c307773e 1141
8d6c48b9
PE
11422002-03-20 Paul Eggert <eggert@twinsun.com>
1143
1144 Merge fixes from Debian bison_1.34-1.diff.
1145
1146 * configure.in (AC_PREREQ): 2.53.
1147
e53c6322
AD
11482002-03-20 Akim Demaille <akim@epita.fr>
1149
1150 * src/conflicts.c (log_resolution): Argument `resolution' is const.
1151
9ffbeca7
PE
11522002-03-19 Paul Eggert <eggert@twinsun.com>
1153
21db0b2a
PE
1154 * src/bison.simple (YYCOPY): New macro.
1155 (YYSTACK_RELOCATE): Use it.
1156 Remove Type arg; no longer needed. All callers changed.
1157 (yymemcpy): Remove; no longer needed.
1158
9ffbeca7
PE
1159 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
1160 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1161
642cb8f8
AD
11622002-03-19 Akim Demaille <akim@epita.fr>
1163
1164 Test and fix the #line outputs.
1165
1166 * tests/atlocal.at (GCC): New.
1167 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
1168 (Prologue synch line, ,%union synch line, Postprologue synch line)
1169 (Action synch line, Epilogue synch line): New tests.
1170 * src/reader.c (parse_union_decl): Define the muscle stype_line.
1171 * data/bison.simple, data/bison.c++: Use it.
1172
3c31a486
AD
11732002-03-19 Akim Demaille <akim@epita.fr>
1174
1175 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
1176 (Solved SR Conflicts, %expect not enough, %expect right)
1177 (%expect too much): Move to...
1178 * tests/conflicts.at: this new file.
1179
0d8bed56
AD
11802002-03-19 Akim Demaille <akim@epita.fr>
1181
1182 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
1183 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
1184 that we can move to enums for instance.
1185 * src/output.c (token_definitions_output): Output a list of
1186 `token-name, token-number' instead of the #define.
1187 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
1188
9208d17f
AD
11892002-03-14 Akim Demaille <akim@epita.fr>
1190
1191 Use Gettext 0.11.1.
1192
af27eacb
RA
11932002-03-09 Robert Anisko <robert@lrde.epita.fr>
1194
1195 * data/bison.c++: Make the user able to add members to the generated
1196 parser by subclassing.
1197
9101a310
RA
11982002-03-05 Robert Anisko <robert@lrde.epita.fr>
1199
1200 * src/reader.c (read_additionnal_code): `c' should be an integer, not
1201 a character.
1202 Reported by Nicolas Tisserand and Nicolas Burrus.
1203
fff9bf0b
RA
12042002-03-04 Robert Anisko <robert@lrde.epita.fr>
1205
1206 * src/reader.c: Warn about lacking semi-colons, do not complain.
1207
64dba31e
RA
12082002-03-04 Robert Anisko <robert@lrde.epita.fr>
1209
1210 * data/bison.c++: Remove a debug line.
1211
374f5a14
RA
12122002-03-04 Robert Anisko <robert@lrde.epita.fr>
1213
1214 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
1215 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
1216 provide a default implementation.
1217
bfcf1f3a
AD
12182002-03-04 Akim Demaille <akim@epita.fr>
1219
1220 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
1221 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
1222 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
1223 * tests/semantic.at (Parsing Guards): Similarly.
1224 * src/reader.at (readgram): Complain if the last rule is not ended
1225 with a semi-colon.
1226
65ccf9fc
AD
12272002-03-04 Akim Demaille <akim@epita.fr>
1228
1229 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
1230 * src/closure.c: here.
1231 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
1232 RTC.
1233 * src/warshall.h, src/warshall.c: Remove.
1234 * tests/sets.at (Broken Closure): Adjust.
1235
d0039cbc
AD
12362002-03-04 Akim Demaille <akim@epita.fr>
1237
1238 * src/output.c (output_skeleton): tempdir is const.
1239 bytes_read is unused.
1240
345cea78
AD
12412002-03-04 Akim Demaille <akim@epita.fr>
1242
1243 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
1244 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
1245 Update.
1246 From Michael Hayes.
1247
564801f7
AD
12482002-03-04 Akim Demaille <akim@epita.fr>
1249
1250 * src/closure.c (closure): `r' is unused.
1251
e5352bc7
AD
12522002-03-04 Akim Demaille <akim@epita.fr>
1253
1254 * tests/sets.at (Broken Closure): Add the ending `;'.
1255 * src/reader.at (readgram): Complain if a rule is not ended with a
1256 semi-colon.
1257
914feea9
AD
12582002-03-04 Akim Demaille <akim@epita.fr>
1259
1260 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
1261 (count_sr_conflicts): Use bitset_count.
1262 * src/reduce.c (inaccessable_symbols): Ditto.
1263 (bits_size): Remove.
1264 * src/warshall.h, src/warshall.c: Convert to bitsetv.
1265
f0250de6
AD
12662002-03-04 Akim Demaille <akim@epita.fr>
1267
1268 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
1269 * src/reduce.c: Remove the `bitset_zero's following the
1270 `bitset_create's, as now it is performed by the latter.
1271
ef017502
AD
12722002-03-04 Akim Demaille <akim@epita.fr>
1273
1274 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
1275 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
1276 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
1277 latest sources from Michael.
1278
76514394
AD
12792002-03-04 Akim Demaille <akim@epita.fr>
1280
1281 * src/output.c (output): Don't free the grammar.
1282 * src/reader.c (grammar_free): New.
1283 * src/main.c (main): Call it and don't free symtab here.
1284
55024580
AD
12852002-03-04 Akim Demaille <akim@epita.fr>
1286
1287 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
1288 before returning.
1289 Reported by Benoit Perrot.
1290
f9abaa2c
AD
12912002-03-04 Akim Demaille <akim@epita.fr>
1292
1293 Use bitset operations when possible, not loops over bits.
1294
1295 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
1296 bitset_or.
1297 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
1298 * src/reduce.c (useless_nonterminals): Formatting changes.
1299 * src/warshall.c (TC): Use bitset_or.
1300
0e721e75
AD
13012002-03-04 Akim Demaille <akim@epita.fr>
1302
1303 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
1304 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
1305 Ditto.
1306
0fb1ffb1
AD
13072002-03-04 Akim Demaille <akim@epita.fr>
1308
1309 * src/lalr.c (F): Now a bitset*.
1310 Adjust all dependencies.
1311
b86796bf
AD
13122002-03-04 Akim Demaille <akim@epita.fr>
1313
1314 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
1315 Adjust all dependencies.
1316
602bbf31
AD
13172002-03-04 Akim Demaille <akim@epita.fr>
1318
1319 * src/L0.c, src/LR0.h (nstates): Be size_t.
1320 Adjust comparisons (signed vs unsigned).
1321 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
1322 bitset*.
1323 Adjust all dependencies.
1324
d8a0245c
AD
13252002-03-04 Akim Demaille <akim@epita.fr>
1326
1327 * src/closure.c (firsts): Now, also a bitset.
1328 Adjust all dependencies.
1329 (varsetsize): Remove, now unused.
1330 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
1331
34ba9743
AD
13322002-03-04 Akim Demaille <akim@epita.fr>
1333
1334 * src/print.c: Convert to use bitset.h, not hand coded iterations
1335 over ints.
1336
ed86e78c
AD
13372002-03-04 Akim Demaille <akim@epita.fr>
1338
1339 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
1340
dfdb1797
AD
13412002-03-04 Akim Demaille <akim@epita.fr>
1342
1343 * src/closure.c (ruleset): Be a bitset.
1344 (rulesetsize): Remove.
1345
7086e707
AD
13462002-03-04 Akim Demaille <akim@epita.fr>
1347
1348 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
1349 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
1350 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
1351 * src/closure.c (fderives): Be an array of bitsets.
1352
98254360
RA
13532002-02-28 Robert Anisko <robert@lrde.epita.fr>
1354
1355 * data/bison.c++: Merge the two generated headers. Insert a copyright
1356 notice in each output file.
1357
a75c057f
AD
13582002-02-28 Akim Demaille <akim@epita.fr>
1359
1360 * data/bison.c++: Copy the prologue of bison.simple to fetch
1361 useful M4 definitions, such as b4_header_guard.
1362
06b00abc
AD
13632002-02-25 Akim Demaille <akim@epita.fr>
1364
1365 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
1366 translator friendly scheme for the bgr
1367 copyright notice.
06b00abc 1368
70e7d534
AD
13692002-02-25 Akim Demaille <akim@epita.fr>
1370
1371 * src/output.c (header_output): Remove, now handled completely via
1372 M4.
1373
abe017f6
AD
13742002-02-25 Akim Demaille <akim@epita.fr>
1375
1376 * m4/m4.m4: New, from CVS Autoconf.
1377 * configure.in: Invoke it.
1378 * src/output.c (output_skeleton): Use its result instead of the
1379 hard coded name.
1380
381fb12e
AD
13812002-02-25 Akim Demaille <akim@epita.fr>
1382
1383 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
1384 Fileutils 4.1.5.
1385 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
1386 * src/output.c (output_skeleton): Use mkstemp to create a real
1387 temporary file.
1388 Move the filling of `skeleton' and its muscle to...
1389 (prepare): here.
1390 (output): Move the definition of the prologue muscle to...
1391 (prepare): here.
1392 * src/system.h (DEFAULT_TMPDIR): New.
1393
6f38107f
PE
13942002-02-14 Paul Eggert <eggert@twinsun.com>
1395
1396 Remove the support for C++ namespace cleanliness; it was
1397 causing more problems than it was curing, since it didn't work
1398 properly on some nonstandard C++ compilers. This can wait
1399 for a proper C++ parser.
1400
1401 * NEWS: Document this.
1402 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
1403 of C++, as it's treated like C now.
1404 * src/bison.simple (YYSTD): Remove.
1405 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
1406 Treat C++ just like Standard C instead of trying to support
1407 namespace cleanliness.
1408
80cce3da
AD
14092002-02-14 Akim Demaille <akim@epita.fr>
1410
1411 * tests/regression.at (else): Adjust to Andreas' change.
1412
842e8679
AD
14132002-02-14 Akim Demaille <akim@epita.fr>
1414
1415 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
1416
4bda3f10
AD
14172002-02-13 Andreas Schwab <schwab@suse.de>
1418
1419 * src/output.c (output_rule_data): Don't output NULL, it might
1420 not be defined yet.
1421
4162fa07 14222002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 1423
4162fa07
RA
1424 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
1425 (Copyright notice): Update.
b418ecd8 1426
bd16a5dc
AD
14272002-02-11 Akim Demaille <akim@epita.fr>
1428
1429 * tests/regression.at (%nonassoc and eof): Don't include
1430 nonportable headers.
1431
8d69a1a3
RA
14322002-02-08 Robert Anisko <robert@lrde.epita.fr>
1433
1434 * data/bison.c++: Correct error recovery. Make the user able to
1435 initialize the starting location.
1436
9b2d0677
AD
14372002-02-07 Akim Demaille <akim@epita.fr>
1438
1439 * tests/input.at: New.
1440
69e2658b
RA
14412002-02-07 Robert Anisko <robert@lrde.epita.fr>
1442
1443 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 1444 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
1445 directives around tables only needed for debugging.
1446
4aacc3a7
RA
14472002-02-07 Robert Anisko <robert@lrde.epita.fr>
1448
1449 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
1450 C++ parsers.
1451 (yy::b4_name::parse): Use print_.
1452
762a801e
RA
14532002-02-07 Robert Anisko <robert@lrde.epita.fr>
1454
1455 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
1456
4bb2bc3f
RA
14572002-02-07 Robert Anisko <robert@lrde.epita.fr>
1458
1459 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
1460 C++ parsers.
1461 (yy::b4_name::parse): Build verbose error messages, and use error_.
1462
6b45a3ca
RA
14632002-02-06 Robert Anisko <robert@lrde.epita.fr>
1464
1465 * data/bison.c++: Fix m4 quoting in comments.
1466
50997c6e
RA
14672002-02-06 Robert Anisko <robert@lrde.epita.fr>
1468
1469 * data/bison.c++: Adjust the parser code. Fix some muscles that were
1470 not expanded by m4.
1471
3f3eed27
AD
14722002-02-05 Akim Demaille <akim@epita.fr>
1473
1474 * data/bison.c++: Adjust to the M4 back end.
1475 More is certainly needed.
1476
be2a1a68
AD
14772002-02-05 Akim Demaille <akim@epita.fr>
1478
1479 Give a try to M4 as a back end.
1480
1481 * lib/readpipe.c: New, from wdiff.
1482 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
1483 BISON_HAIRY.
1484 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
1485 specific values. Now it is m4 that performs the lookup.
1486 * src/parse-skel.y: Remove.
1487 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
1488 * src/output.c (actions_output, guards_output)
1489 (token_definitions_output): No longer keeps track of the output
1490 line number, hence remove the second argument.
1491 (guards_output): Check against the guard member of a rule, not the
1492 action member.
1493 Adjust callers.
1494 (output_skeleton): Don't look for the skeleton location, let m4 do
1495 that.
1496 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
1497 file will be used.
1498 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
1499 (prepare): Given that for the time being changesyntax is not
1500 usable in M4, rename the muscles using `-' to `_'.
1501 Define `defines_flag', `output_parser_name' and `output_header_name'.
1502 * src/output.h (actions_output, guards_output)
1503 (token_definitions_output): Adjust prototypes.
1504 * src/scan-skel.l: Instead of scanning the skeletons, it now
1505 processes the output of m4: `__oline__' and `#output'.
1506 * data/bison.simple: Adjust to be used by M4(sugar).
1507 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
1508 to date.
1509 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
1510 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
1511 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
1512 shamelessly stolen from CVS Autoconf.
1513
beda758b
AD
15142002-02-05 Akim Demaille <akim@epita.fr>
1515
1516 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
1517 * configure.in: Check for the declarations of free and malloc.
1518 * src/muscle_tab.c: Adjust.
1519
5ece6d43
AD
15202002-02-05 Akim Demaille <akim@epita.fr>
1521
1522 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
1523 which have no values.
1524
5bb18f9a
AD
15252002-02-05 Akim Demaille <akim@epita.fr>
1526
1527 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
1528 * data/: here.
1529
894dd62e
PE
15302002-01-29 Paul Eggert <eggert@twinsun.com>
1531
1532 * src/bison.simple (YYSIZE_T): Do not define merely because
1533 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1534 On some platforms, <alloca.h> does not declare YYSTD (size_t).
1535
82841af7
AD
15362002-01-27 Akim Demaille <akim@epita.fr>
1537
1538 Fix `%nonassoc and eof'.
1539
1540 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
1541 which were not properly copied! Replace
1542 memcpy (res->errs, src->errs, src->nerrs);
1543 with
1544 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1545 !!!
1546 * tests/regression.at (%nonassoc and eof): Adjust to newest
1547 Autotest: `.' is not in the PATH.
1548
318b76e9
AD
15492002-01-27 Akim Demaille <akim@epita.fr>
1550
1551 * tests/sets.at (AT_EXTRACT_SETS): New.
1552 (Nullable): Use it.
1553 (Firsts): New.
1554
30d2f3d5
AD
15552002-01-26 Akim Demaille <akim@epita.fr>
1556
1557 * tests/actions.at, tests/calc.at, tests/headers.at,
1558 * tests/torture.at: Adjust to the newest Autotest which no longer
1559 forces `.' in the PATH.
1560
30f8c395
AD
15612002-01-25 Akim Demaille <akim@epita.fr>
1562
1563 * tests/regression.at (%nonassoc and eof): New.
1564 Suggested by Robert Anisko.
1565
29ae55f1
AD
15662002-01-24 Akim Demaille <akim@epita.fr>
1567
1568 Bison dumps core when trying to complain about broken input files.
1569 Reported by Cris van Pelt.
1570
1571 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
1572 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
1573 into...
1574 (Invalid inputs): Strengthen: exercise parse_percent_token.
1575
2b548aa6
RA
15762002-01-24 Robert Anisko <robert.anisko@epita.fr>
1577
1578 * src/Makefile.am: Add bison.c++.
1579 * src/bison.c++: New skeleton.
1580
bb0146c2
AD
15812002-01-21 Paolo Bonzini <bonzini@gnu.org>
1582
1583 * po/it.po: New.
1584
bec30531
AD
15852002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1586
1587 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1588
fc6edc45
MA
15892002-01-20 Marc Autret <marc@gnu.org>
1590
1591 * src/files.c (compute_output_file_names): Fix
1592
5e5d5415
MA
15932002-01-20 Marc Autret <marc@gnu.org>
1594
1595 * tests/output.at: New test.
1596 * src/files.c (compute_base_names): Don't map extensions when
1597 the YACC flag is set, use defaults.
1598 Reported by Evgeny Stambulchik.
1599
44ea3fbd
MA
16002002-01-20 Marc Autret <marc@gnu.org>
1601
bb0146c2 1602 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
1603 compilers as well (i.e. the vendor C compiler).
1604 Suggested by Albert Chin-A-Young.
1605
338963d1
TVH
16062002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1607
1608 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1609 canonical definition.
1610 * src/system.h: Use the canonical definition for PARAMS (avoids
1611 a conflict with the macro from lib/hash.h).
1612
c57b2479
AD
16132002-01-11 Akim Demaille <akim@epita.fr>
1614
1615 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 1616 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 1617
b85810ae
AD
16182002-01-09 Akim Demaille <akim@epita.fr>
1619
1620 * src/files.c, src/files.h (output_infix): New.
1621 (tab_extension): Remove.
1622 (compute_base_names): Compute the former, drop the latter.
1623 * src/output.c (prepare): Insert the muscles `output-infix', and
1624 `output-suffix'.
1625 * src/parse-skel.y (string, string.1): New.
1626 (section.header): Use it.
1627 (section.yacc): Remove.
1628 (prefix): Remove too.
1629 * src/scan-skel.l: Adjust.
1630 * src/bison.simple, src/bison.hairy: Adjust.
1631
cae60122
AD
16322002-01-09 Akim Demaille <akim@epita.fr>
1633
1634 * configure.in (WERROR_CFLAGS): Compute it.
1635 * src/Makefile.am (CFLAGS): Pass it.
1636 * tests/atlocal.in (CFLAGS): Idem.
1637 * src/files.c: Fix a few warnings.
1638 (get_extension_index): Remove, unused.
1639
ae404801
AD
16402002-01-08 Akim Demaille <akim@epita.fr>
1641
1642 * src/getargs.c (AS_FILE_NAME): New.
1643 (getargs): Use it to convert DOSish file names.
1644 * src/files.c (base_name): Rename as full_base_name to avoid
1645 clashes with `base_name ()'.
1646 (filename_split): New.
1647 (compute_base_names): N-th rewrite, using filename_split.
1648
22312b71
AD
16492002-01-08 Akim Demaille <akim@epita.fr>
1650
1651 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1652 New, stolen from the Fileutils 4.1.
1653 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1654 * configure.in: Check for the presence of memrchr, and of its
1655 prototype.
1656
a67cef01
TVH
16572002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1658
1659 * lib/hash.h (__P): Added definition for this macro.
1660 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1661 BUILT_SOURCES, to ensure they are generated first.
1662 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1663 %error-verbose to allow bootstrapping with bison 1.30x.
1664
2b25d624
AD
16652002-01-06 Akim Demaille <akim@epita.fr>
1666
1667 * src/reader.c (parse_braces): Don't fetch the next char, the
1668 convention is to fetch on entry.
1669 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1670 'switch' without a following semicolon.
1671 * tests/regression.at (braces parsing): New.
1672
3460813b
AD
16732002-01-06 Akim Demaille <akim@epita.fr>
1674
1675 Bison is dead wrong in its RR conflict reports.
1676
1677 * tests/torture.at (GNU Cim Grammar): New.
1678 * src/conflicts.c (count_rr_conflicts): Fix.
1679
73784c64
AD
16802002-01-06 Akim Demaille <akim@epita.fr>
1681
1682 Creating package.m4 from configure.ac causes too many problems.
1683
1684 * tests/Makefile.am (package.m4): Create it by hand,
1685 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1686
25d81090
AD
16872002-01-06 Akim Demaille <akim@epita.fr>
1688
1689 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1690 skeleton.h.
1691
a9b8959e
PE
16922002-01-04 Paul Eggert <eggert@twinsun.com>
1693
1694 * doc/bison.texinfo (Debugging):
1695 Remove YYSTDERR; it's no longer defined or used.
1696 Also, s/cstdio.h/cstdio/.
1697
25d81090
AD
16982002-01-03 Akim Demaille <akim@epita.fr>
1699
1700 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1701
1109455c
AD
17022002-01-03 Akim Demaille <akim@epita.fr>
1703
1704 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1705 tracing code to --trace, wait for a better --trace option, with
1706 args.
1707
7ea5e977
AD
17082002-01-03 Akim Demaille <akim@epita.fr>
1709
1710 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1711 The ISO C++ standard is extremely clear about it: stderr is
1712 considered a macro, not a regular symbol (see table 94 `Header
1713 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1714 Therefore std:: does not apply to it. It still does with fprintf.
1715 Also, s/cstdio.h/cstdio/.
1716
fab5b110
AD
17172002-01-03 Akim Demaille <akim@epita.fr>
1718
1719 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1720 for non system headers.
1721
aed7fd9b
AD
17222002-01-02 Akim Demaille <akim@epita.fr>
1723
1724 Equip the skeleton chain with location tracking, runtime trace,
1725 pure parser and scanner.
1726
1727 * src/parse-skel.y: Request a pure parser, locations, and prefix
1728 renaming.
1729 (%union): Having several members with the same type does not help
1730 type mismatches, simplify.
1731 (YYPRINT, yyprint): New.
1732 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1733 (skel_error): this.
1734 Handle locations.
1735 * src/scan-skel.l: Adjust to these changes.
1736 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1737 (LOCATION_PRINT, skel_control_t): New.
1738
24fad99e
AD
17392001-12-30 Akim Demaille <akim@epita.fr>
1740
1741 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1742 replace `gb' with BLANKS.
1743 * src/scan-skel.l: Adjust.
1744
a4b36db4
AD
17452001-12-30 Akim Demaille <akim@epita.fr>
1746
1747 * src/system.h: We don't need nor want bcopy.
1748 Throw away MS-DOS crap: we don't need getpid.
1749 * configure.in: We don't need strndup. It was even causing
1750 problems: because Flex includes the headers *before* us,
1751 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1752 not visible.
1753 * lib/xstrndup.c: New.
1754 * src/scan-skel.l: Use it.
1755 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1756 * src/parse-skel.y: Use %directives instead of #defines.
1757
1239777d
AD
17582001-12-30 Akim Demaille <akim@epita.fr>
1759
1760 * src/skeleton.h: New.
1761 * src/output.c (output_parser, output_master_parser): Remove, dead
1762 code.
1763 * src/output.h (get_lines_number, actions_output, guards_output)
1764 (token_definitions_output): Prototype them.
1765 * src/parse-skel.y: Add the license notice.
1766 Include output.h and skeleton.h.
1767 (process_skeleton): Returns void, and takes a single parameter.
1768 * src/scan-skel.l: Add the license notice.
1769 Include skeleton.h.
1770 Don't use %option yylineno: it seems that then Flex imagines
1771 REJECT has been used, and therefore it won't reallocate its
1772 buffers (which makes no other sense to me than a bug). It results
1773 in warnings for `unused: yy_flex_realloc'.
1774
9b3add5b
RA
17752001-12-30 Robert Anisko <robert.anisko@epita.fr>
1776
1777 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1778 (MUSCLE_INSERT_PREFIX): ...to there.
1779 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1780 (MUSCLE_INSERT_PREFIX): Move from here...
1781
1782 * src/bison.hairy: Add a section directive. Put braces around muscle
1783 names. This parser skeleton is still broken, but Bison should not
1784 choke on a bad muscle 'syntax'.
1785 * src/bison.simple: Add a section directive. Put braces around muscle
1786 names.
1787
1788 * src/files.h (strsuffix, stringappend): Add declarations.
1789 (tab_extension): Add declaration.
1790 (short_base_name): Add declaration.
1791
1792 * src/files.c (strsuffix, stringappend): No longer static. These
1793 functions are used in the skeleton parser.
1794 (tab_extension): New.
1795 (compute_base_names): Use the computations done in this function
fab5b110 1796 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
1797 names.
1798 (short_base_name): No longer static.
1799
1800 * src/output.c (output_skeleton): New.
1801 (output): Disable call to output_master_parser, and give a try to
1802 a new skeleton handling system.
1803 (guards_output, actions_output): No longer static.
1804 (token_definitions_output, get_lines_number): No longer static.
1805
1806 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1807
fab5b110 1808 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
1809 parse-skel.y.
1810
1811 * src/parse-skel.y: New file.
1812 * src/scan-skel.l: New file.
1813
b5b61c61
AD
18142001-12-29 Akim Demaille <akim@epita.fr>
1815
1816 %name-prefix is broken.
1817
1818 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1819 Adjust all dependencies.
1820 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1821 %name-prefix.
1822
1823 Renaming yylval but not yylloc is not consistent. Now we do.
1824
1825 * src/bison.simple: Prefix yylloc if used.
1826 * doc/bison.texinfo (Decl Summary): Document that.
1827
8c9a50be
AD
18282001-12-29 Akim Demaille <akim@epita.fr>
1829
1830 * doc/bison.texinfo: Promote `%long-directive' over
1831 `%long_directive'.
1832 Remove all references to fixed-output-files, yacc is enough.
1833
d99361e6
AD
18342001-12-29 Akim Demaille <akim@epita.fr>
1835
1836 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1837 user prologue. These are defaults.
1838 * tests/actions.at (Mid-rule actions): Make sure the user can
1839 define YYDEBUG and YYERROR_VERBOSE.
1840
b9cecb91
AD
18412001-12-29 Akim Demaille <akim@epita.fr>
1842
1843 * src/output.c (header_output): Don't forget to export YYLTYPE and
1844 yylloc.
1845 * tests/headers.at (export YYLTYPE): New, make sure it does.
1846 * tests/regression.at (%union and --defines, Invalid CPP headers):
1847 Move to...
1848 * tests/headers.at: here.
1849
aea13e97
AD
18502001-12-29 Akim Demaille <akim@epita.fr>
1851
1852 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1853
931394cb
AD
18542001-12-29 Akim Demaille <akim@epita.fr>
1855
1856 * tests/actions.at (Mid-rule actions): Output on a single line
1857 instead of several.
1858
704a47c4
AD
18592001-12-29 Akim Demaille <akim@epita.fr>
1860
1861 * doc/bison.texinfo: Formatting changes.
1862
091e20bb
AD
18632001-12-29 Akim Demaille <akim@epita.fr>
1864
1865 Don't store the token defs in a muscle, just be ready to output it
1866 on command. Now possible via `symbols'. Fixes a memory leak.
1867
1868 * src/output.c (token_definitions_output): New.
1869 (output_parser, header_output): Use it.
1870 * src/reader.c (symbols_save): Remove.
1871
cce71710
AD
18722001-12-29 Akim Demaille <akim@epita.fr>
1873
1874 * src/bison.simple: Do not provide a default for YYSTYPE and
1875 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1876 default.
1877
82c035a8
AD
18782001-12-29 Akim Demaille <akim@epita.fr>
1879
1880 Mid-rule actions are simply... ignored!
1881
1882 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1883 the empty-rule associated to the dummy symbol, not to the host
1884 rule.
1885 * tests/actions.at (Mid-rule actions): New.
1886
8419d367
AD
18872001-12-29 Akim Demaille <akim@epita.fr>
1888
1889 Memory leak.
1890
1891 * src/reader.c (reader): Free grammar.
1892
375d5806
AD
18932001-12-29 Akim Demaille <akim@epita.fr>
1894
1895 Memory leak.
1896
1897 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1898 since it allocates it for each state, although only one is needed.
1899 (allocate_storage): Do it here.
1900
f51cb8ff
AD
19012001-12-29 Akim Demaille <akim@epita.fr>
1902
1903 * src/options.h, src/options.c (create_long_option_table): Rename
1904 as...
1905 (long_option_table_new): this, with a clearer prototype.
1906 (percent_table): Remove, unused,
1907 * src/getargs.c (getargs): Adjust.
1908
29e88316
AD
19092001-12-29 Akim Demaille <akim@epita.fr>
1910
1911 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1912 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1913 as states.
1914
b9f71f19
AD
19152001-12-29 Akim Demaille <akim@epita.fr>
1916
1917 * src/lalr.c (build_relations): Rename `states' as `states1'.
1918 Sorry, I don't understand exactly what it is, no better name...
1919
1a2b5d37
AD
19202001-12-29 Akim Demaille <akim@epita.fr>
1921
1922 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1923 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1924 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1925 as rules.
1926
1cca533e
AD
19272001-12-29 Akim Demaille <akim@epita.fr>
1928
1929 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1930 ago.
1931
c03ae966
AD
19322001-12-29 Akim Demaille <akim@epita.fr>
1933
1934 * src/reader.c, src/reader.h (user_toknums): Remove.
1935 Adjust all users to use symbols[i]->user_token_number.
1936
5a670b1e
AD
19372001-12-29 Akim Demaille <akim@epita.fr>
1938
1939 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1940 Adjust all users to use symbols[i]->prec or ->assoc.
1941
ad949da9
AD
19422001-12-29 Akim Demaille <akim@epita.fr>
1943
1944 * src/reader.c, src/reader.h (tags): Remove.
1945 Adjust all users to use symbols[i]->tag.
1946
0e78e603
AD
19472001-12-29 Akim Demaille <akim@epita.fr>
1948
1949 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1950 and rule_table.
1951 * src/reader.c (packsymbols): Fill this table.
1952 Drop sprec.
1953 * src/conflicts.c (resolve_sr_conflict): Adjust.
1954 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1955 single table.
1956 Use symbols[i]->tag instead of tags[i].
1957
213e640e
AD
19582001-12-29 Akim Demaille <akim@epita.fr>
1959
1960 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1961 In addition, put a comment in there, to replace...
1962 * tests/regression.at (%union and C comments): Remove.
1963
e7b8bef1
AD
19642001-12-29 Akim Demaille <akim@epita.fr>
1965
1966 * tests/regression.at (Web2c Actions): Blindly move the actual
1967 output as expected output. The contents *seem* right to me, but I
1968 can't pretend reading perfectly parser tables... Nonetheless, all
1969 the other tests pass correctly, the table look OK, even though the
1970 presence of `$axiom' is to be noted: AFAICS it is useless (but
1971 harmless).
1972
b68e7744
AD
19732001-12-29 Akim Demaille <akim@epita.fr>
1974
1975 * src/reader.c (readgram): Don't add the rule 0 if there were no
1976 rules read. In other words, add it _after_ having performed
1977 grammar sanity checks.
1978 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1979
78d5bae9
AD
19802001-12-29 Akim Demaille <akim@epita.fr>
1981
1982 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1983 visible, and some states have now a different number.
1984
ff442794
AD
19852001-12-29 Akim Demaille <akim@epita.fr>
1986
1987 * src/reader.c (readgram): Bind the initial rule's lineno to that
1988 of the first rule.
1989 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1990 (Solved SR Conflicts): Adjust rule 0's line number.
1991
610ab194
AD
19922001-12-29 Akim Demaille <akim@epita.fr>
1993
1994 Fix the `GAWK Grammar' failure.
1995
1996 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1997 the reductions of the first state which was mistakenly confused
1998 with the final state because precisely final_state was initialized
1999 to 0.
2000 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
2001 now noticed by Bison.
2002 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
2003 have a reduction on $default.
2004
29d29c8f
AD
20052001-12-29 Akim Demaille <akim@epita.fr>
2006
2007 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
2008 rule line numbers.
2009 * src/closure.c (print_closure): Likewise.
2010 * src/derives.c (print_derives): Likewise.
2011 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
2012 now.
2013
7c6b64d0
AD
20142001-12-29 Akim Demaille <akim@epita.fr>
2015
2016 * src/lalr.c (lookaheads_print): New.
2017 (lalr): Call it when --trace-flag.
2018 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
2019 are dumped.
2020
3d4daee3
AD
20212001-12-29 Akim Demaille <akim@epita.fr>
2022
2023 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
2024 when walking through ritem, even via rule->rhs.
2025 * src/reduce.c (dump_grammar, useful_production, reduce_output)
2026 (useful_production, useless_nonterminals): Likewise.
2027 (reduce_grammar_tables): Likewise, plus update nritems.
2028 * src/nullable.c (set_nullable): Likewise.
2029 * src/lalr.c (build_relations): Likewise.
2030 * tests/sets.at (Nullable): Adjust.
2031 Fortunately, now, the $axiom is no longer nullable.
2032
9e7f6bbd
AD
20332001-12-29 Akim Demaille <akim@epita.fr>
2034
2035 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
2036 the 0-sentinel.
2037 * src/gram.c (ritem_longest_rhs): Likewise.
2038 * src/reduce.c (nonterminals_reduce): Likewise.
2039 * src/print_graph.c (print_graph): Likewise.
2040 * src/output.c (output_rule_data): Likewise.
2041 * src/nullable.c (set_nullable): Likewise.
2042
255ef638
AD
20432001-12-29 Akim Demaille <akim@epita.fr>
2044
2045 * src/output.c: Comment changes.
2046
0d8a7363
AD
20472001-12-27 Paul Eggert <eggert@twinsun.com>
2048
2049 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
2050 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
2051 Sparc, as they were causing more porting problems than the
2052 (minor) performance improvement was worth.
2053
2054 Also, catch up with 1.31's YYSTD.
2055
3db472b9
AD
20562001-12-27 Akim Demaille <akim@epita.fr>
2057
2058 * src/output.c (output_gram): Rely on nritems, not the
2059 0-sentinel. See below.
2060 Use -1 as separator, not 0.
2061 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
2062 Rely on -1 as separator in yyrhs, instead of 0.
2063 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
2064 twice `Now at end of input', therefore there are two lines less to
2065 expect.
2066
b365aa05
AD
20672001-12-27 Akim Demaille <akim@epita.fr>
2068
2069 * tests/regression.at (Unresolved SR Conflicts):
2070 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
2071 below.
2072
30171f79
AD
20732001-12-27 Akim Demaille <akim@epita.fr>
2074
2075 * src/LR0.c (new_state): Recognize the final state by the fact it
2076 is reached by eoftoken.
2077 (insert_start_shifting_state, insert_eof_shifting_state)
2078 (insert_accepting_state, augment_automaton): Remove, since now
2079 these states are automatically computed from the initial state.
2080 (generate_states): Adjust.
2081 * src/print.c: When reporting a rule number to the user, substract
2082 1, so that the axiom rule is rule 0, and the first user rule is 1.
2083 * src/reduce.c: Likewise.
2084 * src/print_graph.c (print_core): For the time being, just as for
2085 the report, depend upon --trace-flags to dump the full set of
2086 items.
2087 * src/reader.c (readgram): Once the grammar read, insert the rule
2088 0: `$axiom: START-SYMBOL $'.
2089 * tests/set.at: Adjust: rule 0 is now displayed, and since the
2090 number of the states has changed (the final state is no longer
2091 necessarily the last), catch up.
2092
75142d45
AD
20932001-12-27 Akim Demaille <akim@epita.fr>
2094
2095 Try to make the use of the eoftoken valid. Given that its value
2096 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
2097 is used instead of > 0 where appropriate, (ii), depend upon nritems
2098 instead of the 0-sentinel.
2099
2100 * src/gram.h, src/gram.c (nritems): New.
2101 Expected to be duplication of nitems, but for the time being...
2102 * src/reader.c (packgram): Assert nritems and nitems are equal.
2103 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
2104 * src/closure.c (print_closure, print_fderives): Likewise.
2105 * src/gram.c (ritem_print): Likewise.
2106 * src/print.c (print_core, print_grammar): Likewise.
2107 * src/print_graph.c: Likewise.
2108
b7c49edf
AD
21092001-12-27 Akim Demaille <akim@epita.fr>
2110
2111 * src/main.c (main): If there are complains after grammar
2112 reductions, then output the report anyway if requested, then die.
2113 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
2114 * src/reader.c (eoftoken): New.
2115 (parse_token_decl): If the token being defined has value `0', it
2116 is the eoftoken.
2117 (packsymbols): No longer hack `tags' to insert `$' by hand.
2118 Be sure to preserve the value of the eoftoken.
2119 (reader): Make sure eoftoken is defined.
2120 Initialize nsyms to 0: now eoftoken is created just like the others.
2121 * src/print.c (print_grammar): Don't special case the eof token.
2122 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
2123 lie anyway, albeit pleasant.
2124 * tests/calc.at: Exercise error messages with eoftoken.
2125 Change the grammar so that empty input is invalid.
2126 Adjust expectations.
2127 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
2128
ec2da99f
AD
21292001-12-27 Akim Demaille <akim@epita.fr>
2130
2131 * configure.in: Check the protos of strchr ans strspn.
2132 Replace strchr if needed.
2133 * src/system.h: Provide the protos of strchr, strspn and memchr if
2134 missing.
2135 * lib/strchr.c: New.
2136 * src/reader.c (symbols_save): Use strchr.
2137
8adfa272
AD
21382001-12-27 Akim Demaille <akim@epita.fr>
2139
2140 * src/print.c, src/print_graph.c (escape): New.
2141 Use it to quote the TAGS outputs.
2142 * src/print_graph.c (print_state): Now errors are in red, and
2143 reductions in green.
2144 Prefer high to wide: output the state number on a line of its own.
2145
80dac38c
AD
21462001-12-27 Akim Demaille <akim@epita.fr>
2147
2148 * src/state.h, src/state.c (reductions_new): New.
2149 * src/LR0.c (set_state_table): Let all the states have a
2150 `reductions', even if reduced to 0.
2151 (save_reductions): Adjust.
2152 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
2153 * src/print.c (print_reductions, print_actions): Adjust.
2154 * src/output.c (action_row): Adjust.
2155
2cec70b9
AD
21562001-12-27 Akim Demaille <akim@epita.fr>
2157
2158 * src/state.h, src/state.c (errs_new, errs_dup): New.
2159 * src/LR0.c (set_state_table): Let all the states have an errs,
2160 even if reduced to 0.
2161 * src/print.c (print_errs, print_reductions): Adjust.
2162 * src/output.c (output_actions, action_row): Adjust.
2163 * src/conflicts.c (resolve_sr_conflict): Adjust.
2164
13ca549a
AD
21652001-12-27 Akim Demaille <akim@epita.fr>
2166
2167 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
2168
5092aba5
AD
21692001-12-27 Akim Demaille <akim@epita.fr>
2170
2171 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
2172 * src/print.c: here.
2173 (lookaheadset, shiftset): New, used as additional storage by
2174 print_reductions.
2175 (print_results): Adjust.
2176 (print_shifts, print_gotos, print_errs): New, extracted from...
2177 (print_actions): here.
2178 * src/print_graph.c (print_actions): Remove dead code.
2179
11e2beca
AD
21802001-12-27 Akim Demaille <akim@epita.fr>
2181
2182 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
2183 `$n' and `@n'.
2184
dac3c910
AD
21852001-12-27 Akim Demaille <akim@epita.fr>
2186
2187 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
2188 (build_relations): Adjust.
2189
d0b0fefa
AD
21902001-12-27 Akim Demaille <akim@epita.fr>
2191
2192 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
2193 duplication.
2194
adc8c848
AD
21952001-12-27 Akim Demaille <akim@epita.fr>
2196
2197 * src/reader.c (packgram): Catch nitems overflows.
2198
14d293ac
AD
21992001-12-27 Akim Demaille <akim@epita.fr>
2200
2201 * src/files.c, src/files.h (guard_obstack): Remove.
2202 * src/output.c (output): Adjust.
2203 * src/reader.c (parse_braces): New, factoring...
2204 (copy_action, copy_guard): these two which are renamed as...
2205 (parse_action, parse_guard): these.
2206 As a voluntary consequence, using braces around guards is now
2207 mandatory.
2208
f499b062
AD
22092001-12-27 Akim Demaille <akim@epita.fr>
2210
2211 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
2212 * src/reader.c (symbol_list): `guard' and `guard_line' are new
2213 members.
2214 (symbol_list_new): Adjust.
2215 (copy_action): action_line is the first line, not the last.
2216 (copy_guard): Just as for actions, store the `action' only, not
2217 the switch/case/break flesh.
2218 Don't parse the user action that might follow the guard, let...
2219 (readgram): do it, i.e., now, there can be an action after a
2220 guard.
2221 In other words the guard is just explicitly optional.
2222 (packgram): Adjust.
2223 * src/output.c (guards_output): New.
2224 (output_parser): Call it when needed.
2225 (output): Also free the guard and attrs obstacks.
2226 * src/files.c, src/files.h (obstack_save): Remove.
2227 (output_files): Remove.
2228 As a result, if one needs the former `.act' file, using an
2229 appropriate skeleton which requires actions and guards is now
2230 required.
2231 * src/main.c (main): Adjust.
2232 * tests/semantic.at: New.
2233 * tests/regression.at: Use `input.y' as input file name.
2234 Avoid 8+3 problems by requiring input.c when the test needs the
2235 parser.
2236
d945f5cd
AD
22372001-12-27 Akim Demaille <akim@epita.fr>
2238
2239 * src/reader.c (symbol_list_new): Be sure to initialize all the
2240 fields.
2241
d200e455
AD
22422001-12-27 Akim Demaille <akim@epita.fr>
2243
2244 All the hacks using a final pseudo state are now useless.
2245
2246 * src/LR0.c (set_state_table): state_table holds exactly nstates.
2247 * src/lalr.c (nLA): New.
2248 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
2249 instead of lookaheadsp from the pseudo state (nstate + 1).
2250
f9507c28
AD
22512001-12-27 Akim Demaille <akim@epita.fr>
2252
2253 * src/output.c (action_row, token_actions): Use a state_t instead
2254 of a integer, and nlookaheads instead of the following state's
2255 lookaheadsp.
2256
065fbd27
AD
22572001-12-27 Akim Demaille <akim@epita.fr>
2258
2259 * src/conflicts.c (log_resolution, flush_shift)
2260 (resolve_sr_conflict, set_conflicts, solve_conflicts)
2261 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
2262 (conflicts_print, print_reductions): Use a state_t instead of an
2263 integer when referring to a state.
2264 As much as possible, depend upon nlookaheads, instead of the
2265 `lookaheadsp' member of the following state (since lookaheads of
2266 successive states are successive, the difference between state n + 1
2267 and n served as the number of lookaheads for state n).
2268 * src/lalr.c (add_lookback_edge): Likewise.
2269 * src/print.c (print_core, print_actions, print_state)
2270 (print_results): Likewise.
2271 * src/print_graph.c (print_core, print_actions, print_state)
2272 (print_graph): Likewise.
2273 * src/conflicts.h: Adjust.
2274
1b177bd7
AD
22752001-12-27 Akim Demaille <akim@epita.fr>
2276
2277 * src/bison.hairy: Formatting/comment changes.
2278 ANSIfy.
2279 Remove `register' indications.
2280 Add plenty of `static'.
2281
7742ddeb
AD
22822001-12-27 Akim Demaille <akim@epita.fr>
2283
2284 * src/output.c (prepare): Drop the muscle `ntbase' which
2285 duplicates ntokens.
2286 * src/bison.simple: Formatting/comment changes.
2287 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
2288 is an undocumented synonym.
2289
1fa14068
AD
22902001-12-22 Akim Demaille <akim@epita.fr>
2291
2292 * src/output.c (output_table_data): Change the prototype to use
2293 `int' for array ranges: some invocations do pass an int, not a
2294 short.
2295 Reported by Wayne Green.
2296
b9752825
AD
22972001-12-22 Akim Demaille <akim@epita.fr>
2298
2299 Some actions of web2c.y are improperly triggered.
2300 Reported by Mike Castle.
2301
2302 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
2303 * tests/regression.at (Web2c): Rename as...
2304 (Web2c Report): this.
2305 (Web2c Actions): New.
2306
776209d6
AD
23072001-12-22 Akim Demaille <akim@epita.fr>
2308
2309 Reductions in web2c.y are improperly reported.
2310 Reported by Mike Castle.
2311
2312 * src/conflicts.c (print_reductions): Fix.
2313 * tests/regression.at (Web2c): New.
2314
275fc3ad
AD
23152001-12-18 Akim Demaille <akim@epita.fr>
2316
2317 Some host fail on `assert (!"foo")', which expands to
2318 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
2319 Reported by Nelson Beebee.
2320
2321 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
2322 `#define it_succeeded 0' and `assert (it_succeeded)'.
2323
897668ee
MA
23242001-12-17 Marc Autret <autret_m@epita.fr>
2325
2326 * src/bison.simple: Don't hard code the skeleton line and filename.
2327 * src/output.c (output_parser): Rename 'line' as 'output_line'.
2328 New line counter 'skeleton_line' (skeleton-line muscle).
2329
ab3399e0
PE
23302001-12-17 Paul Eggert <eggert@twinsun.com>
2331
2332 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
2333 YYDEBUG must be defined to a nonzero value.
2334
2335 * src/bison.simple (yytname): Do not assume that the user defines
2336 YYDEBUG to a properly parenthesized expression.
2337
3877f72b
AD
23382001-12-17 Akim Demaille <akim@epita.fr>
2339
2340 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
2341 nlookaheads is a new member.
2342 Adjust all users.
2343 * src/lalr.h (nlookaheads): Remove this orphan declaration.
2344 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
2345 state.
776209d6 2346
331dbc1b
AD
23472001-12-17 Akim Demaille <akim@epita.fr>
2348
2349 * src/files.h, src/files.c (open_files, close_files): Remove.
2350 * src/main.c (main): Don't open/close files, nor invoke lex_free,
2351 let...
2352 * src/reader.c (reader): Do it.
776209d6 2353
be750e4c
AD
23542001-12-17 Akim Demaille <akim@epita.fr>
2355
2356 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 2357
709ae8c6
AD
23582001-12-17 Akim Demaille <akim@epita.fr>
2359
2360 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
2361 (flush_reduce): New.
2362 (resolve_sr_conflict): Adjust.
776209d6 2363
f87685c3
AD
23642001-12-17 Akim Demaille <akim@epita.fr>
2365
2366 * src/output.c (output_obstack): Be static and rename as...
2367 (format_obstack): this, to avoid any confusion with files.c's
2368 output_obstack.
2369 * src/reader.h (muscle_obstack): Move to...
2370 * src/output.h: here, since it's defined in output.c.
2371
837491d8
AD
23722001-12-17 Akim Demaille <akim@epita.fr>
2373
2374 * src/output.c (action_row, save_column, default_goto)
2375 (sort_actions, matching_state, pack_vector): Better variable
2376 locality.
2377
796d61fb
AD
23782001-12-17 Akim Demaille <akim@epita.fr>
2379
2380 * src/output.c: Various formatting changes.
776209d6 2381
64d15509
AD
23822001-12-17 Akim Demaille <akim@epita.fr>
2383
2384 * src/files.c (output_files): Free the output_obstack.
2385 * src/main.c (main): Call print and print_graph conditionally.
2386 * src/print.c (print): Work unconditionally.
2387 * src/print_graph.c (print_graph): Work unconditionally.
2388 * src/conflicts.c (log_resolution): Output only if verbose_flag.
2389
fbc8ecb7
MA
23902001-12-16 Marc Autret <autret_m@epita.fr>
2391
2392 * src/output.c (actions_output): Fix. When we use %no-lines,
2393 there is one less line per action.
2394
f0440388
MA
23952001-12-16 Marc Autret <autret_m@epita.fr>
2396
2397 * src/bison.simple: Remove a useless #line directive.
2398 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
2399 * src/output.c (get_lines_number): New.
776209d6 2400 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
2401 output muscles.
2402 Fix line numbering.
2403 (actions_output): Computes the number of lines taken by actions.
2404 (output_master_parser): Insert new skeleton which is the name of
2405 the output parser file name.
2406
a79986b8
MA
24072001-12-15 Marc Autret <autret_m@epita.fr>
2408
2409 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
2410
4ec8e00f
MA
24112001-12-15 Marc Autret <autret_m@epita.fr>
2412
2413 * src/output.c (output_gram): Keep track of the hairy one.
2414
1a4648ff
AD
24152001-12-15 Akim Demaille <akim@epita.fr>
2416
2417 Make `make distcheck' work.
2418
2419 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
2420 system.h which uses libgettext.h.
2421
9c2c67e6
AD
24222001-12-15 Akim Demaille <akim@epita.fr>
2423
2424 * src/nullable.c (set_nullable): Useless rules must be skipped,
2425 otherwise, since we range over their symbols, we might look at a
2426 nonterminal which no longer ``exists'', i.e., it is not counted in
2427 `nvars', hence we overflow our arrays.
2428
93ede233
AD
24292001-12-15 Akim Demaille <akim@epita.fr>
2430
2431 The header can also be produced directly, without any obstack!
2432 Yahoo!
2433
2434 * src/files.c, src/files.h (defines_obstack): Remove.
2435 (compute_header_macro): Global.
2436 (defines_obstack_save): Remove.
2437 * src/reader.c (parse_union_decl): No longer output to
2438 defines_obstack: its content can be found in the `stype' muscle
2439 anyway.
2440 (output_token_translations): Merge into...
2441 (symbols_output): this.
2442 Rename as...
2443 (symbols_save): this.
2444 (reader): Adjust.
2445 * src/output.c (header_output): New.
2446 (output): Call it.
2447
2666f928
AD
24482001-12-15 Akim Demaille <akim@epita.fr>
2449
2450 * src/reader.c (parse_union_decl): Instead of handling two obstack
2451 simultaneously, use one to define the `stype' muscle, and use the
2452 value of the latter to fill defines_obstack.
2453 (copy_comment): Remove.
2454 (copy_comment2): Work for a single obstack.
2455 Rename as...
2456 (copy_comment): this.
2457
428046f8
AD
24582001-12-15 Akim Demaille <akim@epita.fr>
2459
2460 * src/lex.c, src/lex.h (xgetc): No longer static.
2461 * src/reader.c (parse_union_decl): Revamp.
2462
ea52d706
AD
24632001-12-15 Akim Demaille <akim@epita.fr>
2464
2465 Still making progress in separating Bison into (i) input, (ii)
2466 process, (iii) output: now we can directly output the parser file
2467 without using table_obstack at all.
2468
2469 * src/files.c, src/files.h (table_obstack): Bye bye.
2470 (parser_file_name): New.
2471 * src/files.c (compute_output_file_names): Compute it.
2472 * src/output.c (actions_output, output_parser)
2473 (output_master_parser): To a file instead of an obstack.
2474
3f96f4dc
AD
24752001-12-15 Akim Demaille <akim@epita.fr>
2476
2477 Attach actions to rules, instead of pre-outputting them to
2478 actions_obstack.
2479
2480 * src/gram.h (rule_t): action and action_line are new members.
2481 * src/reader.c (symbol_list): Likewise.
2482 (copy_action): Save the actions within the rule.
2483 (packgram): Save them in rule_table.
2484 * src/output.c (actions_output): New.
2485 (output_parser): Use it on `%%actions'.
2486 (output_rule_data): Don't free rule_table.
2487 (output): Do it.
2488 (prepare): Don't save the `action' muscle.
2489 * src/bison.simple: s/%%action/%%actions/.
2490
51576fb3
AD
24912001-12-15 Akim Demaille <akim@epita.fr>
2492
2493 * src/reader.c (copy_action): When --yacc, don't append a `;'
2494 to the user action: let it fail if lacking.
dee049eb 2495 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 2496
2648a72d
AD
24972001-12-14 Akim Demaille <akim@epita.fr>
2498
2499 * src/lex.c (literalchar): Simply return the char you decoded, non
2500 longer mess around with obstacks and int pointers.
2501 Adjust all callers.
2502
92790e5b
AD
25032001-12-14 Akim Demaille <akim@epita.fr>
2504
2505 * src/lex.c (literalchar): Don't escape the special characters,
2506 just decode them, and keep them as char (before, eol was output as
2507 the 2 char string `\n' etc.).
2508 * src/output.c (output_rule_data): Use quotearg to output the
2509 token strings.
2510
927c1557
PE
25112001-12-13 Paul Eggert <eggert@twinsun.com>
2512
2513 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
2514 Do not infringe on the global user namespace when using C++.
2515 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
2516 All uses of `fprintf' and `stderr' changed.
2517
2518 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2519
ed8e1f68
AD
25202001-12-13 Akim Demaille <akim@epita.fr>
2521
2522 The computation of nullable is broken: it doesn't handle empty
2523 RHS's properly.
2524
2525 * tests/torture.at (GNU AWK Grammar): New.
2526 * tests/sets.at (Nullable): New.
2527 * src/nullable.c (set_nullable): Instead of blindly looping over
2528 `ritems', loop over the rules, and then over their rhs's.
2529
2530 Work around Autotest bugs.
2531
2532 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2533 frame, because Autotest understand lines starting with a `+' as
2534 traces from the shell. Then, they are not processed properly.
2535 Admittedly an Autotest bug, but we don't have time to wait for
2536 Autotest to catch up.
2537 * tests/regression.at (Broken Closure): Adjust to the new table
2538 frames.
2539 Move to...
2540 * tests/sets.at: here.
2541
cb581495
AD
25422001-12-13 Akim Demaille <akim@epita.fr>
2543
2544 * src/closure.c (closure): Use nrules instead of playing tricks
2545 with BITS_PER_WORD.
2546
2e729273
AD
25472001-12-13 Akim Demaille <akim@epita.fr>
2548
2549 * src/print.c (print_actions): Output the handling of `$' as the
2550 traces do: shifting the token EOF. Before EOF was treated as a
2551 nonterminal.
2552 * tests/regression.at: Adjust some tests.
2553 * src/print_graph.c (print_core): Complete the set of items via
2554 closure. The next-to-final and final states are still unsatisfying,
2555 but that's to be addressed elsewhere.
2556 No longer output the rule numbers, but do output the state number.
2557 A single loop for the shifts + gotos is enough, but picked a
2558 distinct color for each.
2559 (print_graph): Initialize and finalize closure.
2560
107f7dfb
AD
25612001-12-13 Akim Demaille <akim@epita.fr>
2562
2563 * src/reader.c (readgram): Remove dead code, an strip useless
2564 braces.
2565 (get_type): Remove, unused.
2566
9b53a24f
AD
25672001-12-12 Akim Demaille <akim@epita.fr>
2568
2569 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
2570 on that of lib/error.c.
2571
dbfb6dcd
AD
25722001-12-12 Akim Demaille <akim@epita.fr>
2573
2574 Some hosts don't like `/' in includes.
2575
2576 * src/system.h: Include libgettext.h without qualifying the path.
2577 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
2578 $(top_srcdir).
2579
c25fb648
MA
25802001-12-11 Marc Autret <autret_m@epita.fr>
2581
2582 * src/output.c (output_parser): Remove useless muscle.
2583
710ddc4f
MA
25842001-12-11 Marc Autret <autret_m@epita.fr>
2585
2586 * src/bison.simple: Remove #line just before %%epilogue. It
2587 is now handled in ...
2588 * src/reader.c (read_additionnal_code): Add the output of a
2589 #line for the epilogue.
2590
e83d80b8
MA
25912001-12-10 Marc Autret <autret_m@epita.fr>
2592
927c1557 2593 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
2594 replace precedent remove.
2595 * src/bison.simple: Remove #line before %%prologue because
2596 %%input-line is wrong at this time.
2597
971d5158
MA
25982001-12-10 Marc Autret <autret_m@epita.fr>
2599
2600 * src/reader.c (symbols_output): Clean up.
927c1557 2601 * src/output.c (output_gram, output): Clean up.
971d5158 2602
5edafffd
AD
26032001-12-10 Akim Demaille <akim@epita.fr>
2604
2605 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2606 * src/LR0.c (set_state_table): here.
2607 * src/lalr.c (lalr): Call it.
2608
0279f8e9
AD
26092001-12-10 Akim Demaille <akim@epita.fr>
2610
2611 * src/state.h (shifts): Remove the `number' member: shifts are
2612 attached to state, hence no longer need to be labelled with a
2613 state number.
2614
190c4f5f
AD
26152001-12-10 Akim Demaille <akim@epita.fr>
2616
2617 Now that states have a complete set of members, the linked list of
2618 shifts is useless: just fill directly the state's shifts member.
2619
2620 * src/state.h (shifts): Remove the `next' member.
2621 * src/LR0.c (first_state, last_state): Remove.
2622 Adjust the callers.
2623 (augment_automaton): Don't look for the shifts that must be added
2624 a shift on EOF: it is those of the state we looked for! But now,
2625 since shifts are attached, it is no longer needed to looking
2626 merely by its id: its number.
2627
2a73b93d
AD
26282001-12-10 Akim Demaille <akim@epita.fr>
2629
2630 * src/LR0.c (augment_automaton): Better variable locality.
2631 Remove an impossible branch: if there is a state corresponding to
2632 the start symbol being shifted, then there is shift for the start
2633 symbol from the initial state.
2634
74392f6a
AD
26352001-12-10 Akim Demaille <akim@epita.fr>
2636
2637 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2638 only when appropriate: when insert_start_shifting_state' is not
2639 invoked.
2640 * tests/regression.at (Rule Line Numbers): Adjust.
2641
37c82725
AD
26422001-12-10 Akim Demaille <akim@epita.fr>
2643
2644 * src/LR0.c (augment_automaton): Now that all states have shifts,
2645 merge the two cases addition shifts to the initial state.
2646
6a164e0c
AD
26472001-12-10 Akim Demaille <akim@epita.fr>
2648
2649 * src/lalr.c (set_state_table): Move to...
2650 * src/LR0.c: here.
2651 * src/lalr.c (lalr): Don't call it...
2652 * src/LR0.c (generate_states): do it.
2653 * src/LR0.h (first_state): Remove, only the table is used.
2654
7215de24
AD
26552001-12-10 Akim Demaille <akim@epita.fr>
2656
2657 * src/LR0.h (first_shift, first_reduction): Remove.
2658 * src/lalr.c: Don't use first_shift: find shifts through the
2659 states.
2660
80e25d4d
AD
26612001-12-10 Akim Demaille <akim@epita.fr>
2662
2663 * src/LR0.c: Attach shifts to states as soon as they are
2664 computed.
2665 * src/lalr.c (set_state_table): Instead of assigning shifts to
2666 state, just assert that the mapping was properly done.
2667
0ab3728b
AD
26682001-12-10 Akim Demaille <akim@epita.fr>
2669
2670 * src/LR0.c (insert_start_shift): Rename as...
2671 (insert_start_shifting_state): this.
2672 (insert_eof_shifting_state, insert_accepting_state): New.
2673 (augment_automaton): Adjust.
2674 Better locality of the variables.
2675 When looking if the start_symbol is shifted from the initial
2676 state, using `while (... symbol != start_symbol ...)' sounds
2677 better than `while (... symbol < start_symbol ...)': If fail
2678 to see how the order between symbols could be relevant!
2679
78af9bbc
AD
26802001-12-10 Akim Demaille <akim@epita.fr>
2681
2682 * src/getargs.h: Don't declare `spec_name_prefix' and
2683 `spec_file_prefix', declared by src/files.h.
2684 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2685 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2686 * src/output.c (prepare): Adjust.
2687 * src/reader.c (symbols_output): Likewise.
2688 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2689
bdef2a41
AD
26902001-12-10 Akim Demaille <akim@epita.fr>
2691
2692 * src/muscle_tab.c (muscle_init): NULL is a better default than
2693 `"0"'.
2694
3735969c
AD
26952001-12-10 Akim Demaille <akim@epita.fr>
2696
2697 * src/reader.c (reader): Calling symbols_output once is enough.
2698
49701457
AD
26992001-12-10 Akim Demaille <akim@epita.fr>
2700
2701 Now that states have a complete set of members, the linked list of
2702 reductions is useless: just fill directly the state's reductions
2703 member.
2704
2705 * src/state.h (struct reductions): Remove member `number' and
2706 `next'.
2707 * src/LR0.c (first_reduction, last_reduction): Remove.
2708 (save_reductions): Don't link the new reductions, store them in
2709 this_state.
2710 * src/lalr.c (set_state_table): No need to attach reductions to
2711 states, it's already done.
2712 * src/output.c (output_actions): No longer free the shifts, then
2713 the reductions, then the states: free all the states and their
2714 members.
2715
0edad749
AD
27162001-12-10 Akim Demaille <akim@epita.fr>
2717
2718 * src/options.c (OPTN, DRTV, BOTH): New.
2719 (option_table): Use them.
2720
0edad749
AD
2721 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2722 the job of system.h.
2723 * src/options.c: Don't include stdio.h and xalloc.h for the same
2724 reasons.
2725
5449dd0f
AD
27262001-12-10 Akim Demaille <akim@epita.fr>
2727
2728 * src/output.c (output, prepare): Make sure the values of the
2729 muscles `action' and `prologue' are 0-terminated.
2730
a870c567
AD
27312001-12-10 Akim Demaille <akim@epita.fr>
2732
2733 Clean up GCC warnings.
2734
2735 * src/reader.c (copy_action): `buf' is not used.
2736 (parse_skel_decl): Be static.
2737 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2738 * src/options.h (create_long_option_table): Have a real prototype.
2739 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2740 (hash_delete_at): Return const void *.
2741 Adjust casts to preserve the const.
2742
80df8768
AD
27432001-12-10 Akim Demaille <akim@epita.fr>
2744
2745 * configure.in: Require 2.52g.
2746 M4 is not needed, but AUTOM4TE is.
2747 * m4/m4.m4: Remove.
2748 * tests/Makefile.am: Adjust.
2749
f693ad14
AD
27502001-12-10 Akim Demaille <akim@epita.fr>
2751
2752 One structure for states is enough, even though theoretically
2753 there are LR(0) states and LALR(1) states.
2754
2755 * src/lalr.h (state_t): Remove.
2756 (state_table): Be state_t **, not state_t *.
2757 * src/state.h (core, CORE_ALLOC): Rename as...
2758 (state_t, STATE_ALLOC): this.
2759 Add the LALR(1) members: shifts, reductions, errs.
2760 * src/LR0.c (state_table): Rename as...
2761 (state_hash): this, to avoid name clashes with the global
2762 `state_table'.
2763 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2764 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2765
74ffbcb6
AD
27662001-12-10 Akim Demaille <akim@epita.fr>
2767
2768 Bison dumps core on bash.y.
2769 Reported by Pascal Bart.
2770
2771 * src/warshall.c (bitmatrix_print): New.
2772 (TC): Use it.
2773 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2774 j must be the outer loop.
2775 * tests/regression.at (Broken Closure): New.
2776
07708e19
AD
27772001-12-05 Akim Demaille <akim@epita.fr>
2778
2779 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2780 its argument.
2781