]> git.saurik.com Git - bison.git/blame - ChangeLog
* src/reader.c (grammar_midrule_action): New, Eved out from
[bison.git] / ChangeLog
CommitLineData
1485e106
AD
12002-06-11 Akim Demaille <akim@epita.fr>
2
3 * src/reader.c (grammar_midrule_action): New, Eved out from
4 (readgram): here.
5
da4160c3
AD
62002-06-11 Akim Demaille <akim@epita.fr>
7
8 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
9 New.
10 (readgram): Use them as replacement of inlined code, crule and
11 crule1.
12
f6d0f937
AD
132002-06-11 Akim Demaille <akim@epita.fr>
14
15 * src/reader.c (grammar_end, grammar_symbol_append): New.
16 (readgram): Use them.
17 Make the use of `p' as local as possible.
18
69078d4b
AD
192002-06-10 Akim Demaille <akim@epita.fr>
20
21 GCJ's parser requires the tokens to be defined before the prologue.
22
23 * data/bison.simple: Output the token definition before the user's
24 prologue.
25 * tests/regression.at (Braces parsing, Duplicate string)
26 (Mixing %token styles): Check the output from bison.
27 (Early token definitions): New.
28
5e424082
AD
292002-06-10 Akim Demaille <akim@epita.fr>
30
31 * src/symtab.c (symbol_user_token_number_set): Don't complain when
32 assigning twice the same user number to a token, so that we can
33 use it in...
34 * src/lex.c (lex): here.
35 Also use `symbol_class_set' instead of hand written code.
36 * src/reader.c (parse_assoc_decl): Likewise.
37
44536b35
AD
382002-06-10 Akim Demaille <akim@epita.fr>
39
40 * src/symtab.c, src/symtab.c (symbol_class_set)
41 (symbol_user_token_number_set): New.
42 * src/reader.c (parse_token_decl): Use them.
43 Use a switch instead of ifs.
44 Use a single argument.
45
8b9f2372
AD
462002-06-10 Akim Demaille <akim@epita.fr>
47
48 Remove `%thong' support as it is undocumented, unused, duplicates
49 `%token's job, and creates useless e-mail traffic with people who
50 want to know what it is, why it is undocumented, unused, and
51 duplicates `%token's job.
52
53 * src/reader.c (parse_thong_decl): Remove.
54 * src/options.c (option_table): Remove "thong".
55 * src/lex.h (tok_thong): Remove.
56
3ae2b51f
AD
572002-06-10 Akim Demaille <akim@epita.fr>
58
59 * src/symtab.c, src/symtab.c (symbol_type_set)
60 (symbol_precedence_set): New.
61 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
62 (value_components_used): Remove, unused.
63
2f1afb73
AD
642002-06-09 Akim Demaille <akim@epita.fr>
65
66 Move symbols handling code out of the reader.
67
68 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
69 (axiom): Move to...
70 * src/symtab.h, src/symtab.c: here.
71
72 * src/gram.c (start_symbol): Remove: use startsymbol->number.
73 * src/reader.c (startval): Rename as...
74 * src/symtab.h, src/symtab.c (startsymbol): this.
75 * src/reader.c: Adjust.
76
77 * src/reader.c (symbol_check_defined, symbol_make_alias)
78 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
79 (token_translations_init)
80 Move to...
81 * src/symtab.c: here.
82 * src/reader.c (packsymbols): Move to...
83 * src/symtab.h, src/symtab.c (symbols_pack): here.
84 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
85 argument.
86
e9bca3ad
AD
872002-06-03 Akim Demaille <akim@epita.fr>
88
89 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
90 then statements.
91
86eff183
AD
922002-06-03 Akim Demaille <akim@epita.fr>
93
94 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
95 structs with non literals.
96 * src/scan-skel.l: never-interactive.
97 * src/conflicts.c (enum conflict_resolution_e): No trailing
98 comma.
99 * src/getargs.c (usage): Split long literal strings.
100 Reported by Hans Aberg.
101
717be197
AD
1022002-05-28 Akim Demaille <akim@epita.fr>
103
104 * data/bison.c++: Use C++ ostreams.
105 (cdebug_): New member.
106
670ddffd
AD
1072002-05-28 Akim Demaille <akim@epita.fr>
108
109 * src/output.c (output_skeleton): Be sure to allocate enough room
110 for `/' _and_ for `\0' in full_skeleton.
111
769b430f
AD
1122002-05-28 Akim Demaille <akim@epita.fr>
113
114 * data/bison.c++: Catch up with bison.simple:
115 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
116 and Paul Eggert <eggert@twinsun.com>: `error' handing.
117 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
118 and popping traces.
119
7067cb36
PH
1202002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
121
122 * src/output.c (output_skeleton): Put an explicit path in front of
123 the skeleton file name, rather than relying on the -I directory,
124 to partially alleviate effects of having a skeleton file lying around
125 in the current directory.
769b430f 126
4a713ec2
PH
1272002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
128
769b430f 129 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
130 obstack_printf should be obstack_fgrow1.
131
b408954b
AD
1322002-05-26 Akim Demaille <akim@epita.fr>
133
134 * src/state.h (state_t): `solved_conflicts' is a new member.
135 * src/LR0.c (new_state): Set it to 0.
136 * src/conflicts.h, src/conflicts.c (print_conflicts)
137 (free_conflicts, solve_conflicts): Rename as...
138 (conflicts_print, conflicts_free, conflicts_solve): these.
139 Adjust callers.
140 * src/conflicts.c (enum conflict_resolution_e)
141 (solved_conflicts_obstack): New, used by...
142 (log_resolution): this.
143 Adjust to attach the conflict resolution to each state.
144 Complete the description with the precedence/associativity
145 information.
146 (resolve_sr_conflict): Adjust.
147 * src/print.c (print_state): Output its solved_conflicts.
148 * tests/conflicts.at (Unresolved SR Conflicts)
149 (Solved SR Conflicts): Exercise --report=all.
150
a49aecd5
AD
1512002-05-26 Akim Demaille <akim@epita.fr>
152
153 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
154 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
155 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
156 (token_number_t, item_number_as_token_number)
157 (token_number_as_item_number, muscle_insert_token_number_table):
158 Rename as...
159 (symbol_number_t, item_number_as_symbol_number)
160 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
161 these, since it is more appropriate.
162
5504898e
AD
1632002-05-26 Akim Demaille <akim@epita.fr>
164
165 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
166 `Error:' lines.
167 * data/bison.simple (yystos) [YYDEBUG]: New.
168 (yyparse) [YYDEBUG]: Display the symbols which are popped during
169 error recovery.
170 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
171
ec3bc396
AD
1722002-05-25 Akim Demaille <akim@epita.fr>
173
174 * doc/bison.texinfo (Debugging): Split into...
175 (Tracing): this new section, its former contents, and...
176 (Understanding): this new section.
177 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
178 by...
179 (report_flag): this.
180 Adjust all dependencies.
181 (report_args, report_types, report_argmatch): New.
182 (usage, getargs): Report/support -r, --report.
183 * src/options.h
184 (struct option_table_struct): Rename as..,
185 (struct option_table_s): this.
186 Rename the `set_flag' member to `flag' to match with getopt_long's
187 struct.
188 * src/options.c (option_table): Split verbose into an entry for
189 %verbose, and another for --verbose.
190 Support --report/-r, so remove -r from the obsolete --raw.
191 * src/print.c: Attach full item sets and lookaheads reports to
192 report_flag instead of trace_flag.
193 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
194
78df8250
PE
1952002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
196 and Paul Eggert <eggert@twinsun.com>
769b430f 197
78df8250
PE
198 * data/bison.simple (yyparse): Correct error handling to conform to
199 POSIX and yacc. Specifically, after syntax error is discovered,
200 do not reduce further before shifting the error token.
201 Clean up the code a bit by removing the labels yyerrdefault,
202 yyerrhandle, yyerrpop.
203 * NEWS: Document the above.
204
c0c9ea05
PH
2052002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
206
207 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
208 type; it isn't always big enough, since it doesn't necessarily
209 include non-terminals.
769b430f 210 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
211 the latter can be removed.
212 (yy_token_number_type): Remove, only one use.
213 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
214 don't use TokenNumberType as element type.
769b430f 215
c0c9ea05
PH
216 * tests/regression.at: Modify expected output to agree with change
217 to yyr1 and yytranslate.
769b430f 218
6390a83f
FK
2192002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
220
221 * src/reader.c (parse_action): Use copy_character instead of
222 obstack_1grow.
223
db7c8e9a
AD
2242002-05-13 Akim Demaille <akim@epita.fr>
225
226 * tests/regression.at (Token definitions): Prototype yylex and
227 yyerror.
228
fcc61800
PH
2292002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
230
158c687b 231 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
232 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
233 32-bit arithmetic.
234 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
235
5683e9b2
AD
2362002-05-07 Akim Demaille <akim@epita.fr>
237
238 * tests/synclines.at: Be sure to prototype yylex and yyerror to
239 avoid GCC warnings.
240
0c2d3f4c
AD
2412002-05-07 Akim Demaille <akim@epita.fr>
242
243 Kill GCC warnings.
244
245 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
246 over the RHS of each rule.
247 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
248 * src/state.h (state_t): Member `nitems' is unsigned short.
249 * src/LR0.c (get_state): Adjust.
250 * src/reader.c (packgram): Likewise.
251 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
252 `Type'.
253 (muscle_insert_int_table): Remove, unused.
254 (prepare_rules): Remove `max'.
255
1565b720
AD
2562002-05-06 Akim Demaille <akim@epita.fr>
257
258 * src/closure.c (print_firsts): Display of the symbol tags.
259 (bitmatrix_print): Move to...
260 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
261 here.
262 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
263
cfaee611
AD
2642002-05-06 Akim Demaille <akim@epita.fr>
265
266 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
267 hash_do_for_each.
268
458be8e0
AD
2692002-05-06 Akim Demaille <akim@epita.fr>
270
271 * src/LR0.c (new_state, get_state): Instead of using the global
272 `kernel_size' and `kernel_base', have two new arguments:
273 `core_size' and `core'.
274 Adjust callers.
275
a900a624
AD
2762002-05-06 Akim Demaille <akim@epita.fr>
277
278 * src/reader.c (packgram): No longer end `ritem' with a 0
279 sentinel: it is not used.
280
d4e7d3a1
AD
2812002-05-05 Akim Demaille <akim@epita.fr>
282
283 New experimental feature: display the lookaheads in the report and
284 graph.
285
286 * src/print (print_core): When --trace-flag, display the rules
287 lookaheads.
288 * src/print_graph.c (print_core): Likewise.
289 Swap the arguments.
290 Adjust caller.
291
39ceb25b
AD
2922002-05-05 Akim Demaille <akim@epita.fr>
293
294 * tests/torture.at (Many lookaheads): New test.
295
5372019f
AD
2962002-05-05 Akim Demaille <akim@epita.fr>
297
298 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
299 (GENERATE_MUSCLE_INSERT_TABLE): this.
300 (output_int_table, output_unsigned_int_table, output_short_table)
301 (output_token_number_table, output_item_number_table): Replace with...
302 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
303 (muscle_insert_short_table, muscle_insert_token_number_table)
304 (muscle_insert_item_number_table): these.
305 Adjust all callers.
306 (prepare_tokens): Don't free `translations', since...
307 * src/reader.h, src/reader.c (grammar_free): do it.
308 Move to...
309 * src/gram.h, src/gram.c (grammar_free): here.
310 * data/bison.simple, data/bison.c++: b4_token_number_max is now
311 b4_translate_max.
312
5df5f6d5
AD
3132002-05-05 Akim Demaille <akim@epita.fr>
314
315 * src/output.c (output_unsigned_int_table): New.
316 (prepare_rules): `i' is unsigned.
317 `prhs', `rline', `r2' are unsigned int.
318 Rename muscle `rhs_number_max' as `rhs_max'.
319 Output muscles `prhs_max', `rline_max', and `r2_max'.
320 Free rline and r1.
321 * data/bison.simple, data/bison.c++: Adjust to use these muscles
322 to compute types instead of constant types.
323 * tests/regression.at (Web2c Actions): Adjust.
324
b87f8b21
AD
3252002-05-04 Akim Demaille <akim@epita.fr>
326
327 * src/symtab.h (SALIAS, SUNDEF): Rename as...
328 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
329 Adjust dependencies.
330 * src/output.c (token_definitions_output): Be sure not to output a
331 `#define 'a'' when fed with `%token 'a' "a"'.
332 * tests/regression.at (Token definitions): New.
333
8bb936e4
PE
3342002-05-03 Paul Eggert <eggert@twinsun.com>
335
336 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
337 for K&R C.
338
3392002-05-03 gettextize <bug-gnu-gettext@gnu.org>
340
341 * Makefile.am (SUBDIRS): Remove intl.
342 (EXTRA_DIST): Add config/config.rpath.
343
53c71a12
AD
3442002-05-03 Akim Demaille <akim@epita.fr>
345
346 * data/bison.simple (m4_if): Don't output empty enums.
347 And actually, output valid enum definitions :(.
348
289dd0cf
AD
3492002-05-03 Akim Demaille <akim@epita.fr>
350
351 * configure.bat: Remove, completely obsolete.
352 * Makefile.am (EXTRA_DIST): Adjust.
353 Don't distribute config.rpath...
354 * config/Makefile.am (EXTRA_DIST): Do it.
355
db85e524
AD
3562002-05-03 Akim Demaille <akim@epita.fr>
357
358 * configure.in (GETTEXT_VERSION): New.
359 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
360
83ccf991
AD
3612002-05-03 Akim Demaille <akim@epita.fr>
362
363 * data/bison.simple (b4_token_enum): New.
364 (b4_token_defines): Use it to output tokens both as #define and
365 enums.
366 Suggested by Paul Eggert.
367 * src/output.c (token_definitions_output): Don't output spurious
368 white spaces.
369
1f418995
AD
3702002-05-03 Akim Demaille <akim@epita.fr>
371
372 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
373
45119f04
RA
3742002-05-02 Robert Anisko <robert@lrde.epita.fr>
375
376 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
377 Update the stack class, give a try to deque as the default container.
378
b2d52318
AD
3792002-05-02 Akim Demaille <akim@epita.fr>
380
381 * data/bison.simple (yyparse): Do not implement @$ = @1.
382 (YYLLOC_DEFAULT): Adjust to do it.
383 * doc/bison.texinfo (Location Default Action): Fix.
384
3a8b4109
AD
3852002-05-02 Akim Demaille <akim@epita.fr>
386
387 * src/reader.c (parse_braces): Merge into...
388 (parse_action): this.
389
84614e13
AD
3902002-05-02 Akim Demaille <akim@epita.fr>
391
392 * configure.in (ALL_LINGUAS): Remove.
393 * po/LINGUAS, hr.po: New.
394
fdbcd8e2
AD
3952002-05-02 Akim Demaille <akim@epita.fr>
396
397 Remove the so called hairy (semantic) parsers.
398
399 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
400 * src/gram.h, src/gram.c (semantic_parser): Remove.
401 (rule_t): Remove the guard and guard_line members.
402 * src/lex.h (token_t): remove tok_guard.
403 * src/options.c (option_table): Remove %guard and %semantic_parser
404 support.
405 * src/output.c, src/output.h (guards_output): Remove.
406 (prepare): Adjust.
407 (token_definitions_output): Don't output the `T'
408 tokens (???).
409 (output_skeleton): Don't output the guards.
410 * src/files.c, src/files.c (attrsfile): Remove.
411 * src/reader.c (symbol_list): Remove the guard and guard_line
412 members.
413 Adjust dependencies.
414 (parse_guard): Remove.
415 * data/bison.hairy: Remove.
416 * doc/bison.texinfo (Environment Variables): Remove occurrences of
417 BISON_HAIRY.
418
82b6cb3f
AD
4192002-05-02 Akim Demaille <akim@epita.fr>
420
421 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
422 (parse_guard): Rename the formal argument `stack_offset' as
423 `rule_length', which is more readable.
424 Adjust callers.
425 (copy_at, copy_dollar): Instead of outputting the hard coded
426 values of $$, $n and so forth, output invocation to b4_lhs_value,
427 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
428 Note: this patch partially drops `semantic-parser' support: it
429 always does `rule_length - n', where semantic parsers ought to
430 always use `-n'.
82b6cb3f
AD
431 * data/bison.simple, data/bison.c++ (b4_lhs_value)
432 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
433
6cbfbcc5
AD
4342002-05-02 Akim Demaille <akim@epita.fr>
435
436 * configure.in (AC_INIT): Bump to 1.49b.
437 (AM_INIT_AUTOMAKE): Short invocation.
438
b8548114
AD
4392002-05-02 Akim Demaille <akim@epita.fr>
440
441 Version 1.49a.
442
c20cd1fa
AD
4432002-05-01 Akim Demaille <akim@epita.fr>
444
445 * src/skeleton.h: Remove.
446
8a9566d4
AD
4472002-05-01 Akim Demaille <akim@epita.fr>
448
449 * src/skeleton.h: Fix the #endif.
450 Reported by Magnus Fromreide.
451
8c6d399a
PE
4522002-04-26 Paul Eggert <eggert@twinsun.com>
453
454 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
455 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 456 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 457
2b7ed18a
RA
4582002-04-25 Robert Anisko <robert@lrde.epita.fr>
459
460 * src/scan-skel.l: Postprocess quadrigraphs.
461
462 * src/reader.c (copy_character): New function, used to output
463 single characters while replacing `[' and `]' with quadrigraphs, to
464 avoid troubles with M4 quotes.
465 (copy_comment): Output characters with copy_character.
466 (read_additionnal_code): Likewise.
467 (copy_string2): Likewise.
468 (copy_definition): Likewise.
469
470 * tests/calc.at: Exercise M4 quoting.
471
34a89c50
AD
4722002-04-25 Akim Demaille <akim@epita.fr>
473
474 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
475 between `!' and the command.
476 Reported by Paul Eggert.
477
0dd1580a
RA
4782002-04-24 Robert Anisko <robert@lrde.epita.fr>
479
480 * tests/calc.at: Exercise prologue splitting.
481
482 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
483 `b4_post_prologue' instead of `b4_prologue'.
484
485 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
486 muscles.
487 (output): Free pre_prologue_obstack and post_prologue_obstack.
488 * src/files.h, src/files.c (attrs_obstack): Remove.
489 (pre_prologue_obstack, post_prologue_obstack): New.
490 * src/reader.c (copy_definition): Add a parameter to specify the
491 obstack to fill, instead of using attrs_obstack unconditionally.
492 (read_declarations): Pass pre_prologue_obstack to copy_definition if
493 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
494
83c1796f
PE
4952002-04-23 Paul Eggert <eggert@twinsun.com>
496
497 * data/bison.simple: Remove unnecessary commentary and white
498 space differences from 1_29-branch.
499 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
500
501 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
502 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
503 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
504 constructors or destructors.
505
506 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
507
1207eeac
AD
5082002-04-23 Akim Demaille <akim@epita.fr>
509
510 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
511 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
512 location with columns.
513 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
514 All reported by Paul Eggert.
515
78ab8f67
AD
5162002-04-22 Akim Demaille <akim@epita.fr>
517
518 * src/reduce.c (dump_grammar): Move to...
519 * src/gram.h, src/gram.c (grammar_dump): here.
520 Be sure to separate long item numbers.
521 Don't read the members of a rule's prec if its nil.
522
133c20e2
AD
5232002-04-22 Akim Demaille <akim@epita.fr>
524
525 * src/output.c (table_size, table_grow): New.
526 (MAXTABLE): Remove, replace uses with table_size.
527 (pack_vector): Instead of dying when the table is too big, grow it.
528
9515e8a7
AD
5292002-04-22 Akim Demaille <akim@epita.fr>
530
531 * data/bison.simple (yyr1): Its type is that of a token number.
532 * data/bison.c++ (r1_): Likewise.
533 * tests/regression.at (Web2c Actions): Adjust.
534
23c5a174
AD
5352002-04-22 Akim Demaille <akim@epita.fr>
536
537 * src/reader.c (token_translations_init): 256 is now the default
538 value for the error token, i.e., it will be assigned another
539 number if the user assigned 256 to one of her tokens.
540 (reader): Don't force 256 to error.
541 * doc/bison.texinfo (Symbols): Adjust.
542 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
543 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
544 etc. instead of 10, 20, 30 (which was used to `jump' over error
545 (256) and undefined (2)).
546
5fbb0954
AD
5472002-04-22 Akim Demaille <akim@epita.fr>
548
549 Propagate more token_number_t.
550
551 * src/gram.h (token_number_as_item_number)
552 (item_number_as_token_number): New.
553 * src/output.c (GENERATE_OUTPUT_TABLE): New.
554 Use it to create output_item_number_table and
555 output_token_number_table.
556 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
557 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
558 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
559 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
560
4f940944
AD
5612002-04-22 Akim Demaille <akim@epita.fr>
562
563 * src/output.h, src/output.c (get_lines_number): Remove.
564
3ded9a63
AD
5652002-04-19 Akim Demaille <akim@epita.fr>
566
567 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
568 as Lex/Flex'.
569 (Debugging): More details about enabling the debugging features.
570 (Table of Symbols): Describe $$, $n, @$, and @n.
571 Suggested by Tim Josling.
572
e0c471a9
AD
5732002-04-19 Akim Demaille <akim@epita.fr>
574
575 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
576
fecc10cd
AD
5772002-04-10 Akim Demaille <akim@epita.fr>
578
579 * src/system.h: Rely on HAVE_LIMITS_H.
580 Suggested by Paul Eggert.
581
51dec47b
AD
5822002-04-09 Akim Demaille <akim@epita.fr>
583
584 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
585 full stderr, and strip it according to the bison options, instead
586 of composing the error message from different bits.
587 This makes it easier to check for several error messages.
588 Adjust all the invocations.
589 Add an invocation exercising the error token.
590 Add an invocation demonstrating a stupid error message.
591 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
592 Adjust the tests.
593 Error message are for stderr, not stdout.
594
007a50a4
AD
5952002-04-09 Akim Demaille <akim@epita.fr>
596
597 * src/gram.h, src/gram.c (error_token_number): Remove, use
598 errtoken->number.
599 * src/reader.c (reader): Don't specify the user token number (2)
600 for $undefined, as it uselessly prevents using it.
601 * src/gram.h (token_number_t): Move to...
602 * src/symtab.h: here.
603 (state_t.number): Is a token_number_t.
604 * src/print.c, src/reader.c: Use undeftoken->number instead of
605 hard coded 2.
606 (Even though this 2 is not the same as above: the number of the
607 undeftoken remains being 2, it is its user token number which
608 might not be 2).
609 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
610 `user_token_number_max'.
611 Output `undef_token_number'.
612 * data/bison.simple, data/bison.c++: Use them.
613 Be sure to map invalid yylex return values to
614 `undef_token_number'. This saves us from gratuitous SEGV.
615
616 * tests/conflicts.at (Solved SR Conflicts)
617 (Unresolved SR Conflicts): Adjust.
618 * tests/regression.at (Web2c Actions): Adjust.
619
06446ccf
AD
6202002-04-08 Akim Demaille <akim@epita.fr>
621
622 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
623 Adding #line.
624 Remove the duplicate `typedefs'.
625 (RhsNumberType): Fix the declaration and various other typos.
626 Use __ofile__.
627 * data/bison.simple: Use __ofile__.
628 * src/scan-skel.l: Handle __ofile__.
629
62a3e4f0
AD
6302002-04-08 Akim Demaille <akim@epita.fr>
631
632 * src/gram.h (item_number_t): New, the type of item numbers in
633 RITEM. Note that it must be able to code symbol numbers as
634 positive number, and the negation of rule numbers as negative
635 numbers.
636 Adjust all dependencies (pretty many).
637 * src/reduce.c (rule): Remove this `short *' pointer: use
638 item_number_t.
639 * src/system.h (MINSHORT, MAXSHORT): Remove.
640 Include `limits.h'.
641 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
642 (shortcpy): Remove.
643 (MAXTABLE): Move to...
644 * src/output.c (MAXTABLE): here.
645 (prepare_rules): Use output_int_table to output rhs.
646 * data/bison.simple, data/bison.c++: Adjust.
647 * tests/torture.at (Big triangle): Move the limit from 254 to
648 500.
649 * tests/regression.at (Web2c Actions): Ajust.
650
651 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
652 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
653 passes, but produces negative #line number, once fixed, GCC is
654 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
655 C), it passes.
656 * src/state.h (state_h): Code input lines on ints, not shorts.
657
bb88b0fc
AD
6582002-04-08 Akim Demaille <akim@epita.fr>
659
660 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
661 and then the grammar.
662
9a636f47
AD
6632002-04-08 Akim Demaille <akim@epita.fr>
664
665 * src/system.h: No longer using strndup.
666
680e8701
AD
6672002-04-07 Akim Demaille <akim@epita.fr>
668
669 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
670 * src/output.c (output_table_data): Return the longest number.
671 (prepare_tokens): Output `token_number_max').
672 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
673 New.
674 Use them to define yy_token_number_type/TokenNumberType.
675 Use this type for yytranslate.
676 * tests/torture.at (Big triangle): Push the limit from 124 to
677 253.
678 * tests/regression.at (Web2c Actions): Adjust.
679
817e9f41
AD
6802002-04-07 Akim Demaille <akim@epita.fr>
681
682 * tests/torture.at (Big triangle): New.
683 (GNU AWK Grammar, GNU Cim Grammar): Move to...
684 * tests/existing.at: here.
685
5123689b
AD
6862002-04-07 Akim Demaille <akim@epita.fr>
687
688 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
689 nritems.
690 Adjust dependencies.
691
f3849179
AD
6922002-04-07 Akim Demaille <akim@epita.fr>
693
694 * src/reader.c: Normalize increments to prefix form.
695
bd02036a
AD
6962002-04-07 Akim Demaille <akim@epita.fr>
697
698 * src/reader.c, symtab.c: Remove debugging code.
699
db8837cb
AD
7002002-04-07 Akim Demaille <akim@epita.fr>
701
702 Rename all the `bucket's as `symbol_t'.
703
704 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
705 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
706 * src/symtab.c, src/symtab.h (bucket): Rename as...
707 (symbol_t): this.
708 (symbol_list_new, bucket_check_defined, bucket_make_alias)
709 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
710 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
711 (buckets_new, buckets_free, buckets_do): Rename as...
712 (symbol_list_new, symbol_check_defined, symbol_make_alias)
713 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
714 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
715 (symbols_new, symbols_free, symbols_do): these.
716
72a23c97
AD
7172002-04-07 Akim Demaille <akim@epita.fr>
718
719 Use lib/hash for the symbol table.
720
721 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
722 EOF.
723 * src/lex.c (lex): Set the `number' member of new terminals.
724 * src/reader.c (bucket_check_defined, bucket_make_alias)
725 (bucket_check_alias_consistence, bucket_translation): New.
726 (reader, grammar_free, readgram, token_translations_init)
727 (packsymbols): Adjust.
728 (reader): Number the predefined tokens.
729 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
730 for predefined tokens.
731 * src/symtab.h (bucket): Remove all the hash table related
732 members.
733 * src/symtab.c (symtab): Replace by...
734 (bucket_table): this.
735 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
736 (buckets_new, buckets_do): New.
737
280a38c3
AD
7382002-04-07 Akim Demaille <akim@epita.fr>
739
740 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
741 (start_symbol, max_user_token_number, semantic_parser)
742 (error_token_number): Initialize.
743 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
744 Initialize.
745 (reader): Don't.
746 (errtoken, eoftoken, undeftoken, axiom): Extern.
747
03b31c0c
AD
7482002-04-07 Akim Demaille <akim@epita.fr>
749
750 * src/gram.h (rule_s): prec and precsym are now pointers
751 to the bucket giving the priority/associativity.
752 Member `associativity' removed: useless.
753 * src/reduce.c, src/conflicts.c: Adjust.
754
8b3df748
AD
7552002-04-07 Akim Demaille <akim@epita.fr>
756
757 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
758 Properly escape the symbols' TAG when outputting them.
759
e601aa1d
AD
7602002-04-07 Akim Demaille <akim@epita.fr>
761
762 * src/lalr.h (LA): Is a bitsetv, not bitset*.
763
b0299a2e
AD
7642002-04-07 Akim Demaille <akim@epita.fr>
765
766 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
767 (LArule): this, which is an array to rule_t*.
768 * src/print.c, src/conflicts.c: Adjust.
769
d7e1f00c
AD
7702002-04-07 Akim Demaille <akim@epita.fr>
771
772 * src/gram.h (rule_t): Rename `number' as `user_number'.
773 `number' is a new member.
774 Adjust dependencies.
775 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
776
cc9305dd
AD
7772002-04-07 Akim Demaille <akim@epita.fr>
778
779 As a result of the previous patch, it is no longer needed
780 to reorder ritem itself.
781
782 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
783
b0940840
AD
7842002-04-07 Akim Demaille <akim@epita.fr>
785
786 Be sure never to walk through RITEMS, but use only data related to
787 the rules themselves. RITEMS should be banished.
788
789 * src/output.c (output_token_translations): Rename as...
790 (prepare_tokens): this.
791 In addition to `translate', prepare the muscles `tname' and
792 `toknum', which were handled by...
793 (output_rule_data): this.
794 Remove, and move the remainder of its outputs into...
795 (prepare_rules): this new routines, which also merges content from
796 (output_gram): this.
797 (prepare_rules): Be sure never to walk through RITEMS.
798 (output_stos): Rename as...
799 (prepare_stos): this.
800 (output): Always invoke prepare_states, after all, just don't use it
801 in the output if you don't need it.
802
643a5994
AD
8032002-04-07 Akim Demaille <akim@epita.fr>
804
805 * src/LR0.c (new_state): Display `nstates' as the name of the
806 newly created state.
807 Adjust to initialize first_state and last_state if needed.
808 Be sure to distinguish the initial from the final state.
809 (new_states): Create the itemset of the initial state, and use
810 new_state.
811 * src/closure.c (closure): Now that the initial state has its
812 items properly set, there is no need for a special case when
813 creating `ruleset'.
814
815 As a result, now the rule 0, reducing to $axiom, is visible in the
816 outputs. Adjust the test suite.
817
818 * tests/conflicts.at (Solved SR Conflicts)
819 (Unresolved SR Conflicts): Adjust.
820 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
821 * tests/conflicts.at (S/R in initial): New.
822
b4c4ccc2
AD
8232002-04-07 Akim Demaille <akim@epita.fr>
824
825 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
826 the RHS of the rules.
827 * src/output.c (output_gram): Likewise.
828
bba97eb2
AD
8292002-04-07 Akim Demaille <akim@epita.fr>
830
831 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
832 bucket.
833 Adjust all dependencies.
834 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
835 `number' of the buckets too.
836 * src/gram.h: Include `symtab.h'.
837 (associativity): Move to...
838 * src/symtab.h: here.
839 No longer include `gram.h'.
840
c3b407f4
AD
8412002-04-07 Akim Demaille <akim@epita.fr>
842
843 * src/gram.h, src/gram.c (rules_rhs_length): New.
844 (ritem_longest_rhs): Use it.
845 * src/gram.h (rule_t): `number' is a new member.
846 * src/reader.c (packgram): Set it.
847 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
848 the end of `rules', and count them out of `nrules'.
849 (reduce_output, dump_grammar): Adjust.
850 * src/print.c (print_grammar): It is no longer needed to check for
851 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
852 * tests/reduce.at (Reduced Automaton): New test.
853
11652ab3
AD
8542002-04-07 Akim Demaille <akim@epita.fr>
855
856 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
857 lacking `+ 1' to nrules, Bison reported as useless a token if it
858 was used solely to set the precedence of the last rule...
859
26b23c1a
AD
8602002-04-07 Akim Demaille <akim@epita.fr>
861
862 * data/bison.c++, data/bison.simple: Don't output the current file
863 name in #line, to avoid useless diffs between two identical
864 outputs under different names.
865
18bcecb0
AD
8662002-04-07 Akim Demaille <akim@epita.fr>
867
868 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
869 Normalize loops to using `< nrules + 1', not `<= nrules'.
870
fa770c86
AD
8712002-04-07 Akim Demaille <akim@epita.fr>
872
873 * TODO: Update.
874
d9b739c3
AD
8752002-04-07 Akim Demaille <akim@epita.fr>
876
877 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
878 bucket.value as bucket.number.
879
99013900
AD
8802002-04-07 Akim Demaille <akim@epita.fr>
881
882 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
883 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
884 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
885 RHS, instead of being an index in RITEMS.
886
e966383b
PE
8872002-04-04 Paul Eggert <eggert@twinsun.com>
888
889 * doc/bison.texinfo: Update copyright date.
890 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
891 (Symbols): Warn about running Bison in one character set,
892 but compiling and/or running in an incompatible one.
893 Warn about character code 256, too.
894
8952002-04-03 Paul Eggert <eggert@twinsun.com>
896
897 * src/bison.data (YYSTACK_ALLOC): Depend on whether
898 YYERROR_VERBOSE is nonzero, not whether it is defined.
899
900 Merge changes from bison-1_29-branch.
c307773e 901
8d6c48b9
PE
9022002-03-20 Paul Eggert <eggert@twinsun.com>
903
904 Merge fixes from Debian bison_1.34-1.diff.
905
906 * configure.in (AC_PREREQ): 2.53.
907
e53c6322
AD
9082002-03-20 Akim Demaille <akim@epita.fr>
909
910 * src/conflicts.c (log_resolution): Argument `resolution' is const.
911
9ffbeca7
PE
9122002-03-19 Paul Eggert <eggert@twinsun.com>
913
21db0b2a
PE
914 * src/bison.simple (YYCOPY): New macro.
915 (YYSTACK_RELOCATE): Use it.
916 Remove Type arg; no longer needed. All callers changed.
917 (yymemcpy): Remove; no longer needed.
918
9ffbeca7
PE
919 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
920 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
921
642cb8f8
AD
9222002-03-19 Akim Demaille <akim@epita.fr>
923
924 Test and fix the #line outputs.
925
926 * tests/atlocal.at (GCC): New.
927 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
928 (Prologue synch line, ,%union synch line, Postprologue synch line)
929 (Action synch line, Epilogue synch line): New tests.
930 * src/reader.c (parse_union_decl): Define the muscle stype_line.
931 * data/bison.simple, data/bison.c++: Use it.
932
3c31a486
AD
9332002-03-19 Akim Demaille <akim@epita.fr>
934
935 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
936 (Solved SR Conflicts, %expect not enough, %expect right)
937 (%expect too much): Move to...
938 * tests/conflicts.at: this new file.
939
0d8bed56
AD
9402002-03-19 Akim Demaille <akim@epita.fr>
941
942 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
943 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
944 that we can move to enums for instance.
945 * src/output.c (token_definitions_output): Output a list of
946 `token-name, token-number' instead of the #define.
947 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
948
9208d17f
AD
9492002-03-14 Akim Demaille <akim@epita.fr>
950
951 Use Gettext 0.11.1.
952
af27eacb
RA
9532002-03-09 Robert Anisko <robert@lrde.epita.fr>
954
955 * data/bison.c++: Make the user able to add members to the generated
956 parser by subclassing.
957
9101a310
RA
9582002-03-05 Robert Anisko <robert@lrde.epita.fr>
959
960 * src/reader.c (read_additionnal_code): `c' should be an integer, not
961 a character.
962 Reported by Nicolas Tisserand and Nicolas Burrus.
963
fff9bf0b
RA
9642002-03-04 Robert Anisko <robert@lrde.epita.fr>
965
966 * src/reader.c: Warn about lacking semi-colons, do not complain.
967
64dba31e
RA
9682002-03-04 Robert Anisko <robert@lrde.epita.fr>
969
970 * data/bison.c++: Remove a debug line.
971
374f5a14
RA
9722002-03-04 Robert Anisko <robert@lrde.epita.fr>
973
974 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
975 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
976 provide a default implementation.
977
bfcf1f3a
AD
9782002-03-04 Akim Demaille <akim@epita.fr>
979
980 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
981 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
982 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
983 * tests/semantic.at (Parsing Guards): Similarly.
984 * src/reader.at (readgram): Complain if the last rule is not ended
985 with a semi-colon.
986
65ccf9fc
AD
9872002-03-04 Akim Demaille <akim@epita.fr>
988
989 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
990 * src/closure.c: here.
991 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
992 RTC.
993 * src/warshall.h, src/warshall.c: Remove.
994 * tests/sets.at (Broken Closure): Adjust.
995
d0039cbc
AD
9962002-03-04 Akim Demaille <akim@epita.fr>
997
998 * src/output.c (output_skeleton): tempdir is const.
999 bytes_read is unused.
1000
345cea78
AD
10012002-03-04 Akim Demaille <akim@epita.fr>
1002
1003 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
1004 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
1005 Update.
1006 From Michael Hayes.
1007
564801f7
AD
10082002-03-04 Akim Demaille <akim@epita.fr>
1009
1010 * src/closure.c (closure): `r' is unused.
1011
e5352bc7
AD
10122002-03-04 Akim Demaille <akim@epita.fr>
1013
1014 * tests/sets.at (Broken Closure): Add the ending `;'.
1015 * src/reader.at (readgram): Complain if a rule is not ended with a
1016 semi-colon.
1017
914feea9
AD
10182002-03-04 Akim Demaille <akim@epita.fr>
1019
1020 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
1021 (count_sr_conflicts): Use bitset_count.
1022 * src/reduce.c (inaccessable_symbols): Ditto.
1023 (bits_size): Remove.
1024 * src/warshall.h, src/warshall.c: Convert to bitsetv.
1025
f0250de6
AD
10262002-03-04 Akim Demaille <akim@epita.fr>
1027
1028 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
1029 * src/reduce.c: Remove the `bitset_zero's following the
1030 `bitset_create's, as now it is performed by the latter.
1031
ef017502
AD
10322002-03-04 Akim Demaille <akim@epita.fr>
1033
1034 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
1035 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
1036 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
1037 latest sources from Michael.
1038
76514394
AD
10392002-03-04 Akim Demaille <akim@epita.fr>
1040
1041 * src/output.c (output): Don't free the grammar.
1042 * src/reader.c (grammar_free): New.
1043 * src/main.c (main): Call it and don't free symtab here.
1044
55024580
AD
10452002-03-04 Akim Demaille <akim@epita.fr>
1046
1047 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
1048 before returning.
1049 Reported by Benoit Perrot.
1050
f9abaa2c
AD
10512002-03-04 Akim Demaille <akim@epita.fr>
1052
1053 Use bitset operations when possible, not loops over bits.
1054
1055 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
1056 bitset_or.
1057 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
1058 * src/reduce.c (useless_nonterminals): Formatting changes.
1059 * src/warshall.c (TC): Use bitset_or.
1060
0e721e75
AD
10612002-03-04 Akim Demaille <akim@epita.fr>
1062
1063 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
1064 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
1065 Ditto.
1066
0fb1ffb1
AD
10672002-03-04 Akim Demaille <akim@epita.fr>
1068
1069 * src/lalr.c (F): Now a bitset*.
1070 Adjust all dependencies.
1071
b86796bf
AD
10722002-03-04 Akim Demaille <akim@epita.fr>
1073
1074 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
1075 Adjust all dependencies.
1076
602bbf31
AD
10772002-03-04 Akim Demaille <akim@epita.fr>
1078
1079 * src/L0.c, src/LR0.h (nstates): Be size_t.
1080 Adjust comparisons (signed vs unsigned).
1081 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
1082 bitset*.
1083 Adjust all dependencies.
1084
d8a0245c
AD
10852002-03-04 Akim Demaille <akim@epita.fr>
1086
1087 * src/closure.c (firsts): Now, also a bitset.
1088 Adjust all dependencies.
1089 (varsetsize): Remove, now unused.
1090 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
1091
34ba9743
AD
10922002-03-04 Akim Demaille <akim@epita.fr>
1093
1094 * src/print.c: Convert to use bitset.h, not hand coded iterations
1095 over ints.
1096
ed86e78c
AD
10972002-03-04 Akim Demaille <akim@epita.fr>
1098
1099 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
1100
dfdb1797
AD
11012002-03-04 Akim Demaille <akim@epita.fr>
1102
1103 * src/closure.c (ruleset): Be a bitset.
1104 (rulesetsize): Remove.
1105
7086e707
AD
11062002-03-04 Akim Demaille <akim@epita.fr>
1107
1108 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
1109 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
1110 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
1111 * src/closure.c (fderives): Be an array of bitsets.
1112
98254360
RA
11132002-02-28 Robert Anisko <robert@lrde.epita.fr>
1114
1115 * data/bison.c++: Merge the two generated headers. Insert a copyright
1116 notice in each output file.
1117
a75c057f
AD
11182002-02-28 Akim Demaille <akim@epita.fr>
1119
1120 * data/bison.c++: Copy the prologue of bison.simple to fetch
1121 useful M4 definitions, such as b4_header_guard.
1122
06b00abc
AD
11232002-02-25 Akim Demaille <akim@epita.fr>
1124
1125 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
1126 translator friendly scheme for the bgr
1127 copyright notice.
06b00abc 1128
70e7d534
AD
11292002-02-25 Akim Demaille <akim@epita.fr>
1130
1131 * src/output.c (header_output): Remove, now handled completely via
1132 M4.
1133
abe017f6
AD
11342002-02-25 Akim Demaille <akim@epita.fr>
1135
1136 * m4/m4.m4: New, from CVS Autoconf.
1137 * configure.in: Invoke it.
1138 * src/output.c (output_skeleton): Use its result instead of the
1139 hard coded name.
1140
381fb12e
AD
11412002-02-25 Akim Demaille <akim@epita.fr>
1142
1143 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
1144 Fileutils 4.1.5.
1145 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
1146 * src/output.c (output_skeleton): Use mkstemp to create a real
1147 temporary file.
1148 Move the filling of `skeleton' and its muscle to...
1149 (prepare): here.
1150 (output): Move the definition of the prologue muscle to...
1151 (prepare): here.
1152 * src/system.h (DEFAULT_TMPDIR): New.
1153
6f38107f
PE
11542002-02-14 Paul Eggert <eggert@twinsun.com>
1155
1156 Remove the support for C++ namespace cleanliness; it was
1157 causing more problems than it was curing, since it didn't work
1158 properly on some nonstandard C++ compilers. This can wait
1159 for a proper C++ parser.
1160
1161 * NEWS: Document this.
1162 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
1163 of C++, as it's treated like C now.
1164 * src/bison.simple (YYSTD): Remove.
1165 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
1166 Treat C++ just like Standard C instead of trying to support
1167 namespace cleanliness.
1168
80cce3da
AD
11692002-02-14 Akim Demaille <akim@epita.fr>
1170
1171 * tests/regression.at (else): Adjust to Andreas' change.
1172
842e8679
AD
11732002-02-14 Akim Demaille <akim@epita.fr>
1174
1175 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
1176
4bda3f10
AD
11772002-02-13 Andreas Schwab <schwab@suse.de>
1178
1179 * src/output.c (output_rule_data): Don't output NULL, it might
1180 not be defined yet.
1181
4162fa07 11822002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 1183
4162fa07
RA
1184 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
1185 (Copyright notice): Update.
b418ecd8 1186
bd16a5dc
AD
11872002-02-11 Akim Demaille <akim@epita.fr>
1188
1189 * tests/regression.at (%nonassoc and eof): Don't include
1190 nonportable headers.
1191
8d69a1a3
RA
11922002-02-08 Robert Anisko <robert@lrde.epita.fr>
1193
1194 * data/bison.c++: Correct error recovery. Make the user able to
1195 initialize the starting location.
1196
9b2d0677
AD
11972002-02-07 Akim Demaille <akim@epita.fr>
1198
1199 * tests/input.at: New.
1200
69e2658b
RA
12012002-02-07 Robert Anisko <robert@lrde.epita.fr>
1202
1203 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 1204 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
1205 directives around tables only needed for debugging.
1206
4aacc3a7
RA
12072002-02-07 Robert Anisko <robert@lrde.epita.fr>
1208
1209 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
1210 C++ parsers.
1211 (yy::b4_name::parse): Use print_.
1212
762a801e
RA
12132002-02-07 Robert Anisko <robert@lrde.epita.fr>
1214
1215 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
1216
4bb2bc3f
RA
12172002-02-07 Robert Anisko <robert@lrde.epita.fr>
1218
1219 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
1220 C++ parsers.
1221 (yy::b4_name::parse): Build verbose error messages, and use error_.
1222
6b45a3ca
RA
12232002-02-06 Robert Anisko <robert@lrde.epita.fr>
1224
1225 * data/bison.c++: Fix m4 quoting in comments.
1226
50997c6e
RA
12272002-02-06 Robert Anisko <robert@lrde.epita.fr>
1228
1229 * data/bison.c++: Adjust the parser code. Fix some muscles that were
1230 not expanded by m4.
1231
3f3eed27
AD
12322002-02-05 Akim Demaille <akim@epita.fr>
1233
1234 * data/bison.c++: Adjust to the M4 back end.
1235 More is certainly needed.
1236
be2a1a68
AD
12372002-02-05 Akim Demaille <akim@epita.fr>
1238
1239 Give a try to M4 as a back end.
1240
1241 * lib/readpipe.c: New, from wdiff.
1242 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
1243 BISON_HAIRY.
1244 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
1245 specific values. Now it is m4 that performs the lookup.
1246 * src/parse-skel.y: Remove.
1247 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
1248 * src/output.c (actions_output, guards_output)
1249 (token_definitions_output): No longer keeps track of the output
1250 line number, hence remove the second argument.
1251 (guards_output): Check against the guard member of a rule, not the
1252 action member.
1253 Adjust callers.
1254 (output_skeleton): Don't look for the skeleton location, let m4 do
1255 that.
1256 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
1257 file will be used.
1258 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
1259 (prepare): Given that for the time being changesyntax is not
1260 usable in M4, rename the muscles using `-' to `_'.
1261 Define `defines_flag', `output_parser_name' and `output_header_name'.
1262 * src/output.h (actions_output, guards_output)
1263 (token_definitions_output): Adjust prototypes.
1264 * src/scan-skel.l: Instead of scanning the skeletons, it now
1265 processes the output of m4: `__oline__' and `#output'.
1266 * data/bison.simple: Adjust to be used by M4(sugar).
1267 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
1268 to date.
1269 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
1270 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
1271 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
1272 shamelessly stolen from CVS Autoconf.
1273
beda758b
AD
12742002-02-05 Akim Demaille <akim@epita.fr>
1275
1276 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
1277 * configure.in: Check for the declarations of free and malloc.
1278 * src/muscle_tab.c: Adjust.
1279
5ece6d43
AD
12802002-02-05 Akim Demaille <akim@epita.fr>
1281
1282 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
1283 which have no values.
1284
5bb18f9a
AD
12852002-02-05 Akim Demaille <akim@epita.fr>
1286
1287 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
1288 * data/: here.
1289
894dd62e
PE
12902002-01-29 Paul Eggert <eggert@twinsun.com>
1291
1292 * src/bison.simple (YYSIZE_T): Do not define merely because
1293 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1294 On some platforms, <alloca.h> does not declare YYSTD (size_t).
1295
82841af7
AD
12962002-01-27 Akim Demaille <akim@epita.fr>
1297
1298 Fix `%nonassoc and eof'.
1299
1300 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
1301 which were not properly copied! Replace
1302 memcpy (res->errs, src->errs, src->nerrs);
1303 with
1304 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1305 !!!
1306 * tests/regression.at (%nonassoc and eof): Adjust to newest
1307 Autotest: `.' is not in the PATH.
1308
318b76e9
AD
13092002-01-27 Akim Demaille <akim@epita.fr>
1310
1311 * tests/sets.at (AT_EXTRACT_SETS): New.
1312 (Nullable): Use it.
1313 (Firsts): New.
1314
30d2f3d5
AD
13152002-01-26 Akim Demaille <akim@epita.fr>
1316
1317 * tests/actions.at, tests/calc.at, tests/headers.at,
1318 * tests/torture.at: Adjust to the newest Autotest which no longer
1319 forces `.' in the PATH.
1320
30f8c395
AD
13212002-01-25 Akim Demaille <akim@epita.fr>
1322
1323 * tests/regression.at (%nonassoc and eof): New.
1324 Suggested by Robert Anisko.
1325
29ae55f1
AD
13262002-01-24 Akim Demaille <akim@epita.fr>
1327
1328 Bison dumps core when trying to complain about broken input files.
1329 Reported by Cris van Pelt.
1330
1331 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
1332 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
1333 into...
1334 (Invalid inputs): Strengthen: exercise parse_percent_token.
1335
2b548aa6
RA
13362002-01-24 Robert Anisko <robert.anisko@epita.fr>
1337
1338 * src/Makefile.am: Add bison.c++.
1339 * src/bison.c++: New skeleton.
1340
bb0146c2
AD
13412002-01-21 Paolo Bonzini <bonzini@gnu.org>
1342
1343 * po/it.po: New.
1344
bec30531
AD
13452002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1346
1347 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1348
fc6edc45
MA
13492002-01-20 Marc Autret <marc@gnu.org>
1350
1351 * src/files.c (compute_output_file_names): Fix
1352
5e5d5415
MA
13532002-01-20 Marc Autret <marc@gnu.org>
1354
1355 * tests/output.at: New test.
1356 * src/files.c (compute_base_names): Don't map extensions when
1357 the YACC flag is set, use defaults.
1358 Reported by Evgeny Stambulchik.
1359
44ea3fbd
MA
13602002-01-20 Marc Autret <marc@gnu.org>
1361
bb0146c2 1362 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
1363 compilers as well (i.e. the vendor C compiler).
1364 Suggested by Albert Chin-A-Young.
1365
338963d1
TVH
13662002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1367
1368 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1369 canonical definition.
1370 * src/system.h: Use the canonical definition for PARAMS (avoids
1371 a conflict with the macro from lib/hash.h).
1372
c57b2479
AD
13732002-01-11 Akim Demaille <akim@epita.fr>
1374
1375 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 1376 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 1377
b85810ae
AD
13782002-01-09 Akim Demaille <akim@epita.fr>
1379
1380 * src/files.c, src/files.h (output_infix): New.
1381 (tab_extension): Remove.
1382 (compute_base_names): Compute the former, drop the latter.
1383 * src/output.c (prepare): Insert the muscles `output-infix', and
1384 `output-suffix'.
1385 * src/parse-skel.y (string, string.1): New.
1386 (section.header): Use it.
1387 (section.yacc): Remove.
1388 (prefix): Remove too.
1389 * src/scan-skel.l: Adjust.
1390 * src/bison.simple, src/bison.hairy: Adjust.
1391
cae60122
AD
13922002-01-09 Akim Demaille <akim@epita.fr>
1393
1394 * configure.in (WERROR_CFLAGS): Compute it.
1395 * src/Makefile.am (CFLAGS): Pass it.
1396 * tests/atlocal.in (CFLAGS): Idem.
1397 * src/files.c: Fix a few warnings.
1398 (get_extension_index): Remove, unused.
1399
ae404801
AD
14002002-01-08 Akim Demaille <akim@epita.fr>
1401
1402 * src/getargs.c (AS_FILE_NAME): New.
1403 (getargs): Use it to convert DOSish file names.
1404 * src/files.c (base_name): Rename as full_base_name to avoid
1405 clashes with `base_name ()'.
1406 (filename_split): New.
1407 (compute_base_names): N-th rewrite, using filename_split.
1408
22312b71
AD
14092002-01-08 Akim Demaille <akim@epita.fr>
1410
1411 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1412 New, stolen from the Fileutils 4.1.
1413 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1414 * configure.in: Check for the presence of memrchr, and of its
1415 prototype.
1416
a67cef01
TVH
14172002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1418
1419 * lib/hash.h (__P): Added definition for this macro.
1420 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1421 BUILT_SOURCES, to ensure they are generated first.
1422 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1423 %error-verbose to allow bootstrapping with bison 1.30x.
1424
2b25d624
AD
14252002-01-06 Akim Demaille <akim@epita.fr>
1426
1427 * src/reader.c (parse_braces): Don't fetch the next char, the
1428 convention is to fetch on entry.
1429 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1430 'switch' without a following semicolon.
1431 * tests/regression.at (braces parsing): New.
1432
3460813b
AD
14332002-01-06 Akim Demaille <akim@epita.fr>
1434
1435 Bison is dead wrong in its RR conflict reports.
1436
1437 * tests/torture.at (GNU Cim Grammar): New.
1438 * src/conflicts.c (count_rr_conflicts): Fix.
1439
73784c64
AD
14402002-01-06 Akim Demaille <akim@epita.fr>
1441
1442 Creating package.m4 from configure.ac causes too many problems.
1443
1444 * tests/Makefile.am (package.m4): Create it by hand,
1445 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1446
25d81090
AD
14472002-01-06 Akim Demaille <akim@epita.fr>
1448
1449 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1450 skeleton.h.
1451
a9b8959e
PE
14522002-01-04 Paul Eggert <eggert@twinsun.com>
1453
1454 * doc/bison.texinfo (Debugging):
1455 Remove YYSTDERR; it's no longer defined or used.
1456 Also, s/cstdio.h/cstdio/.
1457
25d81090
AD
14582002-01-03 Akim Demaille <akim@epita.fr>
1459
1460 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1461
1109455c
AD
14622002-01-03 Akim Demaille <akim@epita.fr>
1463
1464 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1465 tracing code to --trace, wait for a better --trace option, with
1466 args.
1467
7ea5e977
AD
14682002-01-03 Akim Demaille <akim@epita.fr>
1469
1470 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1471 The ISO C++ standard is extremely clear about it: stderr is
1472 considered a macro, not a regular symbol (see table 94 `Header
1473 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1474 Therefore std:: does not apply to it. It still does with fprintf.
1475 Also, s/cstdio.h/cstdio/.
1476
fab5b110
AD
14772002-01-03 Akim Demaille <akim@epita.fr>
1478
1479 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1480 for non system headers.
1481
aed7fd9b
AD
14822002-01-02 Akim Demaille <akim@epita.fr>
1483
1484 Equip the skeleton chain with location tracking, runtime trace,
1485 pure parser and scanner.
1486
1487 * src/parse-skel.y: Request a pure parser, locations, and prefix
1488 renaming.
1489 (%union): Having several members with the same type does not help
1490 type mismatches, simplify.
1491 (YYPRINT, yyprint): New.
1492 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1493 (skel_error): this.
1494 Handle locations.
1495 * src/scan-skel.l: Adjust to these changes.
1496 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1497 (LOCATION_PRINT, skel_control_t): New.
1498
24fad99e
AD
14992001-12-30 Akim Demaille <akim@epita.fr>
1500
1501 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1502 replace `gb' with BLANKS.
1503 * src/scan-skel.l: Adjust.
1504
a4b36db4
AD
15052001-12-30 Akim Demaille <akim@epita.fr>
1506
1507 * src/system.h: We don't need nor want bcopy.
1508 Throw away MS-DOS crap: we don't need getpid.
1509 * configure.in: We don't need strndup. It was even causing
1510 problems: because Flex includes the headers *before* us,
1511 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1512 not visible.
1513 * lib/xstrndup.c: New.
1514 * src/scan-skel.l: Use it.
1515 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1516 * src/parse-skel.y: Use %directives instead of #defines.
1517
1239777d
AD
15182001-12-30 Akim Demaille <akim@epita.fr>
1519
1520 * src/skeleton.h: New.
1521 * src/output.c (output_parser, output_master_parser): Remove, dead
1522 code.
1523 * src/output.h (get_lines_number, actions_output, guards_output)
1524 (token_definitions_output): Prototype them.
1525 * src/parse-skel.y: Add the license notice.
1526 Include output.h and skeleton.h.
1527 (process_skeleton): Returns void, and takes a single parameter.
1528 * src/scan-skel.l: Add the license notice.
1529 Include skeleton.h.
1530 Don't use %option yylineno: it seems that then Flex imagines
1531 REJECT has been used, and therefore it won't reallocate its
1532 buffers (which makes no other sense to me than a bug). It results
1533 in warnings for `unused: yy_flex_realloc'.
1534
9b3add5b
RA
15352001-12-30 Robert Anisko <robert.anisko@epita.fr>
1536
1537 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1538 (MUSCLE_INSERT_PREFIX): ...to there.
1539 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1540 (MUSCLE_INSERT_PREFIX): Move from here...
1541
1542 * src/bison.hairy: Add a section directive. Put braces around muscle
1543 names. This parser skeleton is still broken, but Bison should not
1544 choke on a bad muscle 'syntax'.
1545 * src/bison.simple: Add a section directive. Put braces around muscle
1546 names.
1547
1548 * src/files.h (strsuffix, stringappend): Add declarations.
1549 (tab_extension): Add declaration.
1550 (short_base_name): Add declaration.
1551
1552 * src/files.c (strsuffix, stringappend): No longer static. These
1553 functions are used in the skeleton parser.
1554 (tab_extension): New.
1555 (compute_base_names): Use the computations done in this function
fab5b110 1556 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
1557 names.
1558 (short_base_name): No longer static.
1559
1560 * src/output.c (output_skeleton): New.
1561 (output): Disable call to output_master_parser, and give a try to
1562 a new skeleton handling system.
1563 (guards_output, actions_output): No longer static.
1564 (token_definitions_output, get_lines_number): No longer static.
1565
1566 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1567
fab5b110 1568 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
1569 parse-skel.y.
1570
1571 * src/parse-skel.y: New file.
1572 * src/scan-skel.l: New file.
1573
b5b61c61
AD
15742001-12-29 Akim Demaille <akim@epita.fr>
1575
1576 %name-prefix is broken.
1577
1578 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1579 Adjust all dependencies.
1580 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1581 %name-prefix.
1582
1583 Renaming yylval but not yylloc is not consistent. Now we do.
1584
1585 * src/bison.simple: Prefix yylloc if used.
1586 * doc/bison.texinfo (Decl Summary): Document that.
1587
8c9a50be
AD
15882001-12-29 Akim Demaille <akim@epita.fr>
1589
1590 * doc/bison.texinfo: Promote `%long-directive' over
1591 `%long_directive'.
1592 Remove all references to fixed-output-files, yacc is enough.
1593
d99361e6
AD
15942001-12-29 Akim Demaille <akim@epita.fr>
1595
1596 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1597 user prologue. These are defaults.
1598 * tests/actions.at (Mid-rule actions): Make sure the user can
1599 define YYDEBUG and YYERROR_VERBOSE.
1600
b9cecb91
AD
16012001-12-29 Akim Demaille <akim@epita.fr>
1602
1603 * src/output.c (header_output): Don't forget to export YYLTYPE and
1604 yylloc.
1605 * tests/headers.at (export YYLTYPE): New, make sure it does.
1606 * tests/regression.at (%union and --defines, Invalid CPP headers):
1607 Move to...
1608 * tests/headers.at: here.
1609
aea13e97
AD
16102001-12-29 Akim Demaille <akim@epita.fr>
1611
1612 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1613
931394cb
AD
16142001-12-29 Akim Demaille <akim@epita.fr>
1615
1616 * tests/actions.at (Mid-rule actions): Output on a single line
1617 instead of several.
1618
704a47c4
AD
16192001-12-29 Akim Demaille <akim@epita.fr>
1620
1621 * doc/bison.texinfo: Formatting changes.
1622
091e20bb
AD
16232001-12-29 Akim Demaille <akim@epita.fr>
1624
1625 Don't store the token defs in a muscle, just be ready to output it
1626 on command. Now possible via `symbols'. Fixes a memory leak.
1627
1628 * src/output.c (token_definitions_output): New.
1629 (output_parser, header_output): Use it.
1630 * src/reader.c (symbols_save): Remove.
1631
cce71710
AD
16322001-12-29 Akim Demaille <akim@epita.fr>
1633
1634 * src/bison.simple: Do not provide a default for YYSTYPE and
1635 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1636 default.
1637
82c035a8
AD
16382001-12-29 Akim Demaille <akim@epita.fr>
1639
1640 Mid-rule actions are simply... ignored!
1641
1642 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1643 the empty-rule associated to the dummy symbol, not to the host
1644 rule.
1645 * tests/actions.at (Mid-rule actions): New.
1646
8419d367
AD
16472001-12-29 Akim Demaille <akim@epita.fr>
1648
1649 Memory leak.
1650
1651 * src/reader.c (reader): Free grammar.
1652
375d5806
AD
16532001-12-29 Akim Demaille <akim@epita.fr>
1654
1655 Memory leak.
1656
1657 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1658 since it allocates it for each state, although only one is needed.
1659 (allocate_storage): Do it here.
1660
f51cb8ff
AD
16612001-12-29 Akim Demaille <akim@epita.fr>
1662
1663 * src/options.h, src/options.c (create_long_option_table): Rename
1664 as...
1665 (long_option_table_new): this, with a clearer prototype.
1666 (percent_table): Remove, unused,
1667 * src/getargs.c (getargs): Adjust.
1668
29e88316
AD
16692001-12-29 Akim Demaille <akim@epita.fr>
1670
1671 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1672 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1673 as states.
1674
b9f71f19
AD
16752001-12-29 Akim Demaille <akim@epita.fr>
1676
1677 * src/lalr.c (build_relations): Rename `states' as `states1'.
1678 Sorry, I don't understand exactly what it is, no better name...
1679
1a2b5d37
AD
16802001-12-29 Akim Demaille <akim@epita.fr>
1681
1682 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1683 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1684 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1685 as rules.
1686
1cca533e
AD
16872001-12-29 Akim Demaille <akim@epita.fr>
1688
1689 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1690 ago.
1691
c03ae966
AD
16922001-12-29 Akim Demaille <akim@epita.fr>
1693
1694 * src/reader.c, src/reader.h (user_toknums): Remove.
1695 Adjust all users to use symbols[i]->user_token_number.
1696
5a670b1e
AD
16972001-12-29 Akim Demaille <akim@epita.fr>
1698
1699 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1700 Adjust all users to use symbols[i]->prec or ->assoc.
1701
ad949da9
AD
17022001-12-29 Akim Demaille <akim@epita.fr>
1703
1704 * src/reader.c, src/reader.h (tags): Remove.
1705 Adjust all users to use symbols[i]->tag.
1706
0e78e603
AD
17072001-12-29 Akim Demaille <akim@epita.fr>
1708
1709 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1710 and rule_table.
1711 * src/reader.c (packsymbols): Fill this table.
1712 Drop sprec.
1713 * src/conflicts.c (resolve_sr_conflict): Adjust.
1714 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1715 single table.
1716 Use symbols[i]->tag instead of tags[i].
1717
213e640e
AD
17182001-12-29 Akim Demaille <akim@epita.fr>
1719
1720 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1721 In addition, put a comment in there, to replace...
1722 * tests/regression.at (%union and C comments): Remove.
1723
e7b8bef1
AD
17242001-12-29 Akim Demaille <akim@epita.fr>
1725
1726 * tests/regression.at (Web2c Actions): Blindly move the actual
1727 output as expected output. The contents *seem* right to me, but I
1728 can't pretend reading perfectly parser tables... Nonetheless, all
1729 the other tests pass correctly, the table look OK, even though the
1730 presence of `$axiom' is to be noted: AFAICS it is useless (but
1731 harmless).
1732
b68e7744
AD
17332001-12-29 Akim Demaille <akim@epita.fr>
1734
1735 * src/reader.c (readgram): Don't add the rule 0 if there were no
1736 rules read. In other words, add it _after_ having performed
1737 grammar sanity checks.
1738 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1739
78d5bae9
AD
17402001-12-29 Akim Demaille <akim@epita.fr>
1741
1742 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1743 visible, and some states have now a different number.
1744
ff442794
AD
17452001-12-29 Akim Demaille <akim@epita.fr>
1746
1747 * src/reader.c (readgram): Bind the initial rule's lineno to that
1748 of the first rule.
1749 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1750 (Solved SR Conflicts): Adjust rule 0's line number.
1751
610ab194
AD
17522001-12-29 Akim Demaille <akim@epita.fr>
1753
1754 Fix the `GAWK Grammar' failure.
1755
1756 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1757 the reductions of the first state which was mistakenly confused
1758 with the final state because precisely final_state was initialized
1759 to 0.
1760 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1761 now noticed by Bison.
1762 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1763 have a reduction on $default.
1764
29d29c8f
AD
17652001-12-29 Akim Demaille <akim@epita.fr>
1766
1767 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1768 rule line numbers.
1769 * src/closure.c (print_closure): Likewise.
1770 * src/derives.c (print_derives): Likewise.
1771 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1772 now.
1773
7c6b64d0
AD
17742001-12-29 Akim Demaille <akim@epita.fr>
1775
1776 * src/lalr.c (lookaheads_print): New.
1777 (lalr): Call it when --trace-flag.
1778 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1779 are dumped.
1780
3d4daee3
AD
17812001-12-29 Akim Demaille <akim@epita.fr>
1782
1783 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1784 when walking through ritem, even via rule->rhs.
1785 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1786 (useful_production, useless_nonterminals): Likewise.
1787 (reduce_grammar_tables): Likewise, plus update nritems.
1788 * src/nullable.c (set_nullable): Likewise.
1789 * src/lalr.c (build_relations): Likewise.
1790 * tests/sets.at (Nullable): Adjust.
1791 Fortunately, now, the $axiom is no longer nullable.
1792
9e7f6bbd
AD
17932001-12-29 Akim Demaille <akim@epita.fr>
1794
1795 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1796 the 0-sentinel.
1797 * src/gram.c (ritem_longest_rhs): Likewise.
1798 * src/reduce.c (nonterminals_reduce): Likewise.
1799 * src/print_graph.c (print_graph): Likewise.
1800 * src/output.c (output_rule_data): Likewise.
1801 * src/nullable.c (set_nullable): Likewise.
1802
255ef638
AD
18032001-12-29 Akim Demaille <akim@epita.fr>
1804
1805 * src/output.c: Comment changes.
1806
0d8a7363
AD
18072001-12-27 Paul Eggert <eggert@twinsun.com>
1808
1809 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1810 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1811 Sparc, as they were causing more porting problems than the
1812 (minor) performance improvement was worth.
1813
1814 Also, catch up with 1.31's YYSTD.
1815
3db472b9
AD
18162001-12-27 Akim Demaille <akim@epita.fr>
1817
1818 * src/output.c (output_gram): Rely on nritems, not the
1819 0-sentinel. See below.
1820 Use -1 as separator, not 0.
1821 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1822 Rely on -1 as separator in yyrhs, instead of 0.
1823 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1824 twice `Now at end of input', therefore there are two lines less to
1825 expect.
1826
b365aa05
AD
18272001-12-27 Akim Demaille <akim@epita.fr>
1828
1829 * tests/regression.at (Unresolved SR Conflicts):
1830 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1831 below.
1832
30171f79
AD
18332001-12-27 Akim Demaille <akim@epita.fr>
1834
1835 * src/LR0.c (new_state): Recognize the final state by the fact it
1836 is reached by eoftoken.
1837 (insert_start_shifting_state, insert_eof_shifting_state)
1838 (insert_accepting_state, augment_automaton): Remove, since now
1839 these states are automatically computed from the initial state.
1840 (generate_states): Adjust.
1841 * src/print.c: When reporting a rule number to the user, substract
1842 1, so that the axiom rule is rule 0, and the first user rule is 1.
1843 * src/reduce.c: Likewise.
1844 * src/print_graph.c (print_core): For the time being, just as for
1845 the report, depend upon --trace-flags to dump the full set of
1846 items.
1847 * src/reader.c (readgram): Once the grammar read, insert the rule
1848 0: `$axiom: START-SYMBOL $'.
1849 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1850 number of the states has changed (the final state is no longer
1851 necessarily the last), catch up.
1852
75142d45
AD
18532001-12-27 Akim Demaille <akim@epita.fr>
1854
1855 Try to make the use of the eoftoken valid. Given that its value
1856 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1857 is used instead of > 0 where appropriate, (ii), depend upon nritems
1858 instead of the 0-sentinel.
1859
1860 * src/gram.h, src/gram.c (nritems): New.
1861 Expected to be duplication of nitems, but for the time being...
1862 * src/reader.c (packgram): Assert nritems and nitems are equal.
1863 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1864 * src/closure.c (print_closure, print_fderives): Likewise.
1865 * src/gram.c (ritem_print): Likewise.
1866 * src/print.c (print_core, print_grammar): Likewise.
1867 * src/print_graph.c: Likewise.
1868
b7c49edf
AD
18692001-12-27 Akim Demaille <akim@epita.fr>
1870
1871 * src/main.c (main): If there are complains after grammar
1872 reductions, then output the report anyway if requested, then die.
1873 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1874 * src/reader.c (eoftoken): New.
1875 (parse_token_decl): If the token being defined has value `0', it
1876 is the eoftoken.
1877 (packsymbols): No longer hack `tags' to insert `$' by hand.
1878 Be sure to preserve the value of the eoftoken.
1879 (reader): Make sure eoftoken is defined.
1880 Initialize nsyms to 0: now eoftoken is created just like the others.
1881 * src/print.c (print_grammar): Don't special case the eof token.
1882 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1883 lie anyway, albeit pleasant.
1884 * tests/calc.at: Exercise error messages with eoftoken.
1885 Change the grammar so that empty input is invalid.
1886 Adjust expectations.
1887 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1888
ec2da99f
AD
18892001-12-27 Akim Demaille <akim@epita.fr>
1890
1891 * configure.in: Check the protos of strchr ans strspn.
1892 Replace strchr if needed.
1893 * src/system.h: Provide the protos of strchr, strspn and memchr if
1894 missing.
1895 * lib/strchr.c: New.
1896 * src/reader.c (symbols_save): Use strchr.
1897
8adfa272
AD
18982001-12-27 Akim Demaille <akim@epita.fr>
1899
1900 * src/print.c, src/print_graph.c (escape): New.
1901 Use it to quote the TAGS outputs.
1902 * src/print_graph.c (print_state): Now errors are in red, and
1903 reductions in green.
1904 Prefer high to wide: output the state number on a line of its own.
1905
80dac38c
AD
19062001-12-27 Akim Demaille <akim@epita.fr>
1907
1908 * src/state.h, src/state.c (reductions_new): New.
1909 * src/LR0.c (set_state_table): Let all the states have a
1910 `reductions', even if reduced to 0.
1911 (save_reductions): Adjust.
1912 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1913 * src/print.c (print_reductions, print_actions): Adjust.
1914 * src/output.c (action_row): Adjust.
1915
2cec70b9
AD
19162001-12-27 Akim Demaille <akim@epita.fr>
1917
1918 * src/state.h, src/state.c (errs_new, errs_dup): New.
1919 * src/LR0.c (set_state_table): Let all the states have an errs,
1920 even if reduced to 0.
1921 * src/print.c (print_errs, print_reductions): Adjust.
1922 * src/output.c (output_actions, action_row): Adjust.
1923 * src/conflicts.c (resolve_sr_conflict): Adjust.
1924
13ca549a
AD
19252001-12-27 Akim Demaille <akim@epita.fr>
1926
1927 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1928
5092aba5
AD
19292001-12-27 Akim Demaille <akim@epita.fr>
1930
1931 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1932 * src/print.c: here.
1933 (lookaheadset, shiftset): New, used as additional storage by
1934 print_reductions.
1935 (print_results): Adjust.
1936 (print_shifts, print_gotos, print_errs): New, extracted from...
1937 (print_actions): here.
1938 * src/print_graph.c (print_actions): Remove dead code.
1939
11e2beca
AD
19402001-12-27 Akim Demaille <akim@epita.fr>
1941
1942 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1943 `$n' and `@n'.
1944
dac3c910
AD
19452001-12-27 Akim Demaille <akim@epita.fr>
1946
1947 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1948 (build_relations): Adjust.
1949
d0b0fefa
AD
19502001-12-27 Akim Demaille <akim@epita.fr>
1951
1952 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1953 duplication.
1954
adc8c848
AD
19552001-12-27 Akim Demaille <akim@epita.fr>
1956
1957 * src/reader.c (packgram): Catch nitems overflows.
1958
14d293ac
AD
19592001-12-27 Akim Demaille <akim@epita.fr>
1960
1961 * src/files.c, src/files.h (guard_obstack): Remove.
1962 * src/output.c (output): Adjust.
1963 * src/reader.c (parse_braces): New, factoring...
1964 (copy_action, copy_guard): these two which are renamed as...
1965 (parse_action, parse_guard): these.
1966 As a voluntary consequence, using braces around guards is now
1967 mandatory.
1968
f499b062
AD
19692001-12-27 Akim Demaille <akim@epita.fr>
1970
1971 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1972 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1973 members.
1974 (symbol_list_new): Adjust.
1975 (copy_action): action_line is the first line, not the last.
1976 (copy_guard): Just as for actions, store the `action' only, not
1977 the switch/case/break flesh.
1978 Don't parse the user action that might follow the guard, let...
1979 (readgram): do it, i.e., now, there can be an action after a
1980 guard.
1981 In other words the guard is just explicitly optional.
1982 (packgram): Adjust.
1983 * src/output.c (guards_output): New.
1984 (output_parser): Call it when needed.
1985 (output): Also free the guard and attrs obstacks.
1986 * src/files.c, src/files.h (obstack_save): Remove.
1987 (output_files): Remove.
1988 As a result, if one needs the former `.act' file, using an
1989 appropriate skeleton which requires actions and guards is now
1990 required.
1991 * src/main.c (main): Adjust.
1992 * tests/semantic.at: New.
1993 * tests/regression.at: Use `input.y' as input file name.
1994 Avoid 8+3 problems by requiring input.c when the test needs the
1995 parser.
1996
d945f5cd
AD
19972001-12-27 Akim Demaille <akim@epita.fr>
1998
1999 * src/reader.c (symbol_list_new): Be sure to initialize all the
2000 fields.
2001
d200e455
AD
20022001-12-27 Akim Demaille <akim@epita.fr>
2003
2004 All the hacks using a final pseudo state are now useless.
2005
2006 * src/LR0.c (set_state_table): state_table holds exactly nstates.
2007 * src/lalr.c (nLA): New.
2008 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
2009 instead of lookaheadsp from the pseudo state (nstate + 1).
2010
f9507c28
AD
20112001-12-27 Akim Demaille <akim@epita.fr>
2012
2013 * src/output.c (action_row, token_actions): Use a state_t instead
2014 of a integer, and nlookaheads instead of the following state's
2015 lookaheadsp.
2016
065fbd27
AD
20172001-12-27 Akim Demaille <akim@epita.fr>
2018
2019 * src/conflicts.c (log_resolution, flush_shift)
2020 (resolve_sr_conflict, set_conflicts, solve_conflicts)
2021 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
2022 (conflicts_print, print_reductions): Use a state_t instead of an
2023 integer when referring to a state.
2024 As much as possible, depend upon nlookaheads, instead of the
2025 `lookaheadsp' member of the following state (since lookaheads of
2026 successive states are successive, the difference between state n + 1
2027 and n served as the number of lookaheads for state n).
2028 * src/lalr.c (add_lookback_edge): Likewise.
2029 * src/print.c (print_core, print_actions, print_state)
2030 (print_results): Likewise.
2031 * src/print_graph.c (print_core, print_actions, print_state)
2032 (print_graph): Likewise.
2033 * src/conflicts.h: Adjust.
2034
1b177bd7
AD
20352001-12-27 Akim Demaille <akim@epita.fr>
2036
2037 * src/bison.hairy: Formatting/comment changes.
2038 ANSIfy.
2039 Remove `register' indications.
2040 Add plenty of `static'.
2041
7742ddeb
AD
20422001-12-27 Akim Demaille <akim@epita.fr>
2043
2044 * src/output.c (prepare): Drop the muscle `ntbase' which
2045 duplicates ntokens.
2046 * src/bison.simple: Formatting/comment changes.
2047 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
2048 is an undocumented synonym.
2049
1fa14068
AD
20502001-12-22 Akim Demaille <akim@epita.fr>
2051
2052 * src/output.c (output_table_data): Change the prototype to use
2053 `int' for array ranges: some invocations do pass an int, not a
2054 short.
2055 Reported by Wayne Green.
2056
b9752825
AD
20572001-12-22 Akim Demaille <akim@epita.fr>
2058
2059 Some actions of web2c.y are improperly triggered.
2060 Reported by Mike Castle.
2061
2062 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
2063 * tests/regression.at (Web2c): Rename as...
2064 (Web2c Report): this.
2065 (Web2c Actions): New.
2066
776209d6
AD
20672001-12-22 Akim Demaille <akim@epita.fr>
2068
2069 Reductions in web2c.y are improperly reported.
2070 Reported by Mike Castle.
2071
2072 * src/conflicts.c (print_reductions): Fix.
2073 * tests/regression.at (Web2c): New.
2074
275fc3ad
AD
20752001-12-18 Akim Demaille <akim@epita.fr>
2076
2077 Some host fail on `assert (!"foo")', which expands to
2078 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
2079 Reported by Nelson Beebee.
2080
2081 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
2082 `#define it_succeeded 0' and `assert (it_succeeded)'.
2083
897668ee
MA
20842001-12-17 Marc Autret <autret_m@epita.fr>
2085
2086 * src/bison.simple: Don't hard code the skeleton line and filename.
2087 * src/output.c (output_parser): Rename 'line' as 'output_line'.
2088 New line counter 'skeleton_line' (skeleton-line muscle).
2089
ab3399e0
PE
20902001-12-17 Paul Eggert <eggert@twinsun.com>
2091
2092 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
2093 YYDEBUG must be defined to a nonzero value.
2094
2095 * src/bison.simple (yytname): Do not assume that the user defines
2096 YYDEBUG to a properly parenthesized expression.
2097
3877f72b
AD
20982001-12-17 Akim Demaille <akim@epita.fr>
2099
2100 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
2101 nlookaheads is a new member.
2102 Adjust all users.
2103 * src/lalr.h (nlookaheads): Remove this orphan declaration.
2104 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
2105 state.
776209d6 2106
331dbc1b
AD
21072001-12-17 Akim Demaille <akim@epita.fr>
2108
2109 * src/files.h, src/files.c (open_files, close_files): Remove.
2110 * src/main.c (main): Don't open/close files, nor invoke lex_free,
2111 let...
2112 * src/reader.c (reader): Do it.
776209d6 2113
be750e4c
AD
21142001-12-17 Akim Demaille <akim@epita.fr>
2115
2116 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 2117
709ae8c6
AD
21182001-12-17 Akim Demaille <akim@epita.fr>
2119
2120 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
2121 (flush_reduce): New.
2122 (resolve_sr_conflict): Adjust.
776209d6 2123
f87685c3
AD
21242001-12-17 Akim Demaille <akim@epita.fr>
2125
2126 * src/output.c (output_obstack): Be static and rename as...
2127 (format_obstack): this, to avoid any confusion with files.c's
2128 output_obstack.
2129 * src/reader.h (muscle_obstack): Move to...
2130 * src/output.h: here, since it's defined in output.c.
2131
837491d8
AD
21322001-12-17 Akim Demaille <akim@epita.fr>
2133
2134 * src/output.c (action_row, save_column, default_goto)
2135 (sort_actions, matching_state, pack_vector): Better variable
2136 locality.
2137
796d61fb
AD
21382001-12-17 Akim Demaille <akim@epita.fr>
2139
2140 * src/output.c: Various formatting changes.
776209d6 2141
64d15509
AD
21422001-12-17 Akim Demaille <akim@epita.fr>
2143
2144 * src/files.c (output_files): Free the output_obstack.
2145 * src/main.c (main): Call print and print_graph conditionally.
2146 * src/print.c (print): Work unconditionally.
2147 * src/print_graph.c (print_graph): Work unconditionally.
2148 * src/conflicts.c (log_resolution): Output only if verbose_flag.
2149
fbc8ecb7
MA
21502001-12-16 Marc Autret <autret_m@epita.fr>
2151
2152 * src/output.c (actions_output): Fix. When we use %no-lines,
2153 there is one less line per action.
2154
f0440388
MA
21552001-12-16 Marc Autret <autret_m@epita.fr>
2156
2157 * src/bison.simple: Remove a useless #line directive.
2158 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
2159 * src/output.c (get_lines_number): New.
776209d6 2160 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
2161 output muscles.
2162 Fix line numbering.
2163 (actions_output): Computes the number of lines taken by actions.
2164 (output_master_parser): Insert new skeleton which is the name of
2165 the output parser file name.
2166
a79986b8
MA
21672001-12-15 Marc Autret <autret_m@epita.fr>
2168
2169 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
2170
4ec8e00f
MA
21712001-12-15 Marc Autret <autret_m@epita.fr>
2172
2173 * src/output.c (output_gram): Keep track of the hairy one.
2174
1a4648ff
AD
21752001-12-15 Akim Demaille <akim@epita.fr>
2176
2177 Make `make distcheck' work.
2178
2179 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
2180 system.h which uses libgettext.h.
2181
9c2c67e6
AD
21822001-12-15 Akim Demaille <akim@epita.fr>
2183
2184 * src/nullable.c (set_nullable): Useless rules must be skipped,
2185 otherwise, since we range over their symbols, we might look at a
2186 nonterminal which no longer ``exists'', i.e., it is not counted in
2187 `nvars', hence we overflow our arrays.
2188
93ede233
AD
21892001-12-15 Akim Demaille <akim@epita.fr>
2190
2191 The header can also be produced directly, without any obstack!
2192 Yahoo!
2193
2194 * src/files.c, src/files.h (defines_obstack): Remove.
2195 (compute_header_macro): Global.
2196 (defines_obstack_save): Remove.
2197 * src/reader.c (parse_union_decl): No longer output to
2198 defines_obstack: its content can be found in the `stype' muscle
2199 anyway.
2200 (output_token_translations): Merge into...
2201 (symbols_output): this.
2202 Rename as...
2203 (symbols_save): this.
2204 (reader): Adjust.
2205 * src/output.c (header_output): New.
2206 (output): Call it.
2207
2666f928
AD
22082001-12-15 Akim Demaille <akim@epita.fr>
2209
2210 * src/reader.c (parse_union_decl): Instead of handling two obstack
2211 simultaneously, use one to define the `stype' muscle, and use the
2212 value of the latter to fill defines_obstack.
2213 (copy_comment): Remove.
2214 (copy_comment2): Work for a single obstack.
2215 Rename as...
2216 (copy_comment): this.
2217
428046f8
AD
22182001-12-15 Akim Demaille <akim@epita.fr>
2219
2220 * src/lex.c, src/lex.h (xgetc): No longer static.
2221 * src/reader.c (parse_union_decl): Revamp.
2222
ea52d706
AD
22232001-12-15 Akim Demaille <akim@epita.fr>
2224
2225 Still making progress in separating Bison into (i) input, (ii)
2226 process, (iii) output: now we can directly output the parser file
2227 without using table_obstack at all.
2228
2229 * src/files.c, src/files.h (table_obstack): Bye bye.
2230 (parser_file_name): New.
2231 * src/files.c (compute_output_file_names): Compute it.
2232 * src/output.c (actions_output, output_parser)
2233 (output_master_parser): To a file instead of an obstack.
2234
3f96f4dc
AD
22352001-12-15 Akim Demaille <akim@epita.fr>
2236
2237 Attach actions to rules, instead of pre-outputting them to
2238 actions_obstack.
2239
2240 * src/gram.h (rule_t): action and action_line are new members.
2241 * src/reader.c (symbol_list): Likewise.
2242 (copy_action): Save the actions within the rule.
2243 (packgram): Save them in rule_table.
2244 * src/output.c (actions_output): New.
2245 (output_parser): Use it on `%%actions'.
2246 (output_rule_data): Don't free rule_table.
2247 (output): Do it.
2248 (prepare): Don't save the `action' muscle.
2249 * src/bison.simple: s/%%action/%%actions/.
2250
51576fb3
AD
22512001-12-15 Akim Demaille <akim@epita.fr>
2252
2253 * src/reader.c (copy_action): When --yacc, don't append a `;'
2254 to the user action: let it fail if lacking.
dee049eb 2255 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 2256
2648a72d
AD
22572001-12-14 Akim Demaille <akim@epita.fr>
2258
2259 * src/lex.c (literalchar): Simply return the char you decoded, non
2260 longer mess around with obstacks and int pointers.
2261 Adjust all callers.
2262
92790e5b
AD
22632001-12-14 Akim Demaille <akim@epita.fr>
2264
2265 * src/lex.c (literalchar): Don't escape the special characters,
2266 just decode them, and keep them as char (before, eol was output as
2267 the 2 char string `\n' etc.).
2268 * src/output.c (output_rule_data): Use quotearg to output the
2269 token strings.
2270
927c1557
PE
22712001-12-13 Paul Eggert <eggert@twinsun.com>
2272
2273 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
2274 Do not infringe on the global user namespace when using C++.
2275 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
2276 All uses of `fprintf' and `stderr' changed.
2277
2278 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2279
ed8e1f68
AD
22802001-12-13 Akim Demaille <akim@epita.fr>
2281
2282 The computation of nullable is broken: it doesn't handle empty
2283 RHS's properly.
2284
2285 * tests/torture.at (GNU AWK Grammar): New.
2286 * tests/sets.at (Nullable): New.
2287 * src/nullable.c (set_nullable): Instead of blindly looping over
2288 `ritems', loop over the rules, and then over their rhs's.
2289
2290 Work around Autotest bugs.
2291
2292 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2293 frame, because Autotest understand lines starting with a `+' as
2294 traces from the shell. Then, they are not processed properly.
2295 Admittedly an Autotest bug, but we don't have time to wait for
2296 Autotest to catch up.
2297 * tests/regression.at (Broken Closure): Adjust to the new table
2298 frames.
2299 Move to...
2300 * tests/sets.at: here.
2301
cb581495
AD
23022001-12-13 Akim Demaille <akim@epita.fr>
2303
2304 * src/closure.c (closure): Use nrules instead of playing tricks
2305 with BITS_PER_WORD.
2306
2e729273
AD
23072001-12-13 Akim Demaille <akim@epita.fr>
2308
2309 * src/print.c (print_actions): Output the handling of `$' as the
2310 traces do: shifting the token EOF. Before EOF was treated as a
2311 nonterminal.
2312 * tests/regression.at: Adjust some tests.
2313 * src/print_graph.c (print_core): Complete the set of items via
2314 closure. The next-to-final and final states are still unsatisfying,
2315 but that's to be addressed elsewhere.
2316 No longer output the rule numbers, but do output the state number.
2317 A single loop for the shifts + gotos is enough, but picked a
2318 distinct color for each.
2319 (print_graph): Initialize and finalize closure.
2320
107f7dfb
AD
23212001-12-13 Akim Demaille <akim@epita.fr>
2322
2323 * src/reader.c (readgram): Remove dead code, an strip useless
2324 braces.
2325 (get_type): Remove, unused.
2326
9b53a24f
AD
23272001-12-12 Akim Demaille <akim@epita.fr>
2328
2329 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
2330 on that of lib/error.c.
2331
dbfb6dcd
AD
23322001-12-12 Akim Demaille <akim@epita.fr>
2333
2334 Some hosts don't like `/' in includes.
2335
2336 * src/system.h: Include libgettext.h without qualifying the path.
2337 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
2338 $(top_srcdir).
2339
c25fb648
MA
23402001-12-11 Marc Autret <autret_m@epita.fr>
2341
2342 * src/output.c (output_parser): Remove useless muscle.
2343
710ddc4f
MA
23442001-12-11 Marc Autret <autret_m@epita.fr>
2345
2346 * src/bison.simple: Remove #line just before %%epilogue. It
2347 is now handled in ...
2348 * src/reader.c (read_additionnal_code): Add the output of a
2349 #line for the epilogue.
2350
e83d80b8
MA
23512001-12-10 Marc Autret <autret_m@epita.fr>
2352
927c1557 2353 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
2354 replace precedent remove.
2355 * src/bison.simple: Remove #line before %%prologue because
2356 %%input-line is wrong at this time.
2357
971d5158
MA
23582001-12-10 Marc Autret <autret_m@epita.fr>
2359
2360 * src/reader.c (symbols_output): Clean up.
927c1557 2361 * src/output.c (output_gram, output): Clean up.
971d5158 2362
5edafffd
AD
23632001-12-10 Akim Demaille <akim@epita.fr>
2364
2365 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2366 * src/LR0.c (set_state_table): here.
2367 * src/lalr.c (lalr): Call it.
2368
0279f8e9
AD
23692001-12-10 Akim Demaille <akim@epita.fr>
2370
2371 * src/state.h (shifts): Remove the `number' member: shifts are
2372 attached to state, hence no longer need to be labelled with a
2373 state number.
2374
190c4f5f
AD
23752001-12-10 Akim Demaille <akim@epita.fr>
2376
2377 Now that states have a complete set of members, the linked list of
2378 shifts is useless: just fill directly the state's shifts member.
2379
2380 * src/state.h (shifts): Remove the `next' member.
2381 * src/LR0.c (first_state, last_state): Remove.
2382 Adjust the callers.
2383 (augment_automaton): Don't look for the shifts that must be added
2384 a shift on EOF: it is those of the state we looked for! But now,
2385 since shifts are attached, it is no longer needed to looking
2386 merely by its id: its number.
2387
2a73b93d
AD
23882001-12-10 Akim Demaille <akim@epita.fr>
2389
2390 * src/LR0.c (augment_automaton): Better variable locality.
2391 Remove an impossible branch: if there is a state corresponding to
2392 the start symbol being shifted, then there is shift for the start
2393 symbol from the initial state.
2394
74392f6a
AD
23952001-12-10 Akim Demaille <akim@epita.fr>
2396
2397 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2398 only when appropriate: when insert_start_shifting_state' is not
2399 invoked.
2400 * tests/regression.at (Rule Line Numbers): Adjust.
2401
37c82725
AD
24022001-12-10 Akim Demaille <akim@epita.fr>
2403
2404 * src/LR0.c (augment_automaton): Now that all states have shifts,
2405 merge the two cases addition shifts to the initial state.
2406
6a164e0c
AD
24072001-12-10 Akim Demaille <akim@epita.fr>
2408
2409 * src/lalr.c (set_state_table): Move to...
2410 * src/LR0.c: here.
2411 * src/lalr.c (lalr): Don't call it...
2412 * src/LR0.c (generate_states): do it.
2413 * src/LR0.h (first_state): Remove, only the table is used.
2414
7215de24
AD
24152001-12-10 Akim Demaille <akim@epita.fr>
2416
2417 * src/LR0.h (first_shift, first_reduction): Remove.
2418 * src/lalr.c: Don't use first_shift: find shifts through the
2419 states.
2420
80e25d4d
AD
24212001-12-10 Akim Demaille <akim@epita.fr>
2422
2423 * src/LR0.c: Attach shifts to states as soon as they are
2424 computed.
2425 * src/lalr.c (set_state_table): Instead of assigning shifts to
2426 state, just assert that the mapping was properly done.
2427
0ab3728b
AD
24282001-12-10 Akim Demaille <akim@epita.fr>
2429
2430 * src/LR0.c (insert_start_shift): Rename as...
2431 (insert_start_shifting_state): this.
2432 (insert_eof_shifting_state, insert_accepting_state): New.
2433 (augment_automaton): Adjust.
2434 Better locality of the variables.
2435 When looking if the start_symbol is shifted from the initial
2436 state, using `while (... symbol != start_symbol ...)' sounds
2437 better than `while (... symbol < start_symbol ...)': If fail
2438 to see how the order between symbols could be relevant!
2439
78af9bbc
AD
24402001-12-10 Akim Demaille <akim@epita.fr>
2441
2442 * src/getargs.h: Don't declare `spec_name_prefix' and
2443 `spec_file_prefix', declared by src/files.h.
2444 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2445 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2446 * src/output.c (prepare): Adjust.
2447 * src/reader.c (symbols_output): Likewise.
2448 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2449
bdef2a41
AD
24502001-12-10 Akim Demaille <akim@epita.fr>
2451
2452 * src/muscle_tab.c (muscle_init): NULL is a better default than
2453 `"0"'.
2454
3735969c
AD
24552001-12-10 Akim Demaille <akim@epita.fr>
2456
2457 * src/reader.c (reader): Calling symbols_output once is enough.
2458
49701457
AD
24592001-12-10 Akim Demaille <akim@epita.fr>
2460
2461 Now that states have a complete set of members, the linked list of
2462 reductions is useless: just fill directly the state's reductions
2463 member.
2464
2465 * src/state.h (struct reductions): Remove member `number' and
2466 `next'.
2467 * src/LR0.c (first_reduction, last_reduction): Remove.
2468 (save_reductions): Don't link the new reductions, store them in
2469 this_state.
2470 * src/lalr.c (set_state_table): No need to attach reductions to
2471 states, it's already done.
2472 * src/output.c (output_actions): No longer free the shifts, then
2473 the reductions, then the states: free all the states and their
2474 members.
2475
0edad749
AD
24762001-12-10 Akim Demaille <akim@epita.fr>
2477
2478 * src/options.c (OPTN, DRTV, BOTH): New.
2479 (option_table): Use them.
2480
0edad749
AD
2481 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2482 the job of system.h.
2483 * src/options.c: Don't include stdio.h and xalloc.h for the same
2484 reasons.
2485
5449dd0f
AD
24862001-12-10 Akim Demaille <akim@epita.fr>
2487
2488 * src/output.c (output, prepare): Make sure the values of the
2489 muscles `action' and `prologue' are 0-terminated.
2490
a870c567
AD
24912001-12-10 Akim Demaille <akim@epita.fr>
2492
2493 Clean up GCC warnings.
2494
2495 * src/reader.c (copy_action): `buf' is not used.
2496 (parse_skel_decl): Be static.
2497 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2498 * src/options.h (create_long_option_table): Have a real prototype.
2499 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2500 (hash_delete_at): Return const void *.
2501 Adjust casts to preserve the const.
2502
80df8768
AD
25032001-12-10 Akim Demaille <akim@epita.fr>
2504
2505 * configure.in: Require 2.52g.
2506 M4 is not needed, but AUTOM4TE is.
2507 * m4/m4.m4: Remove.
2508 * tests/Makefile.am: Adjust.
2509
f693ad14
AD
25102001-12-10 Akim Demaille <akim@epita.fr>
2511
2512 One structure for states is enough, even though theoretically
2513 there are LR(0) states and LALR(1) states.
2514
2515 * src/lalr.h (state_t): Remove.
2516 (state_table): Be state_t **, not state_t *.
2517 * src/state.h (core, CORE_ALLOC): Rename as...
2518 (state_t, STATE_ALLOC): this.
2519 Add the LALR(1) members: shifts, reductions, errs.
2520 * src/LR0.c (state_table): Rename as...
2521 (state_hash): this, to avoid name clashes with the global
2522 `state_table'.
2523 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2524 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2525
74ffbcb6
AD
25262001-12-10 Akim Demaille <akim@epita.fr>
2527
2528 Bison dumps core on bash.y.
2529 Reported by Pascal Bart.
2530
2531 * src/warshall.c (bitmatrix_print): New.
2532 (TC): Use it.
2533 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2534 j must be the outer loop.
2535 * tests/regression.at (Broken Closure): New.
2536
07708e19
AD
25372001-12-05 Akim Demaille <akim@epita.fr>
2538
2539 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2540 its argument.
2541