This page contains the following errors:

error on line 8728 at column 130: Premature end of data in tag tr line 8727

Below is a rendering of the page up to the first error.

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