]> git.saurik.com Git - bison.git/blame - ChangeLog
* src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
[bison.git] / ChangeLog
CommitLineData
86eff183
AD
12002-06-03 Akim Demaille <akim@epita.fr>
2
3 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
4 structs with non literals.
5 * src/scan-skel.l: never-interactive.
6 * src/conflicts.c (enum conflict_resolution_e): No trailing
7 comma.
8 * src/getargs.c (usage): Split long literal strings.
9 Reported by Hans Aberg.
10
717be197
AD
112002-05-28 Akim Demaille <akim@epita.fr>
12
13 * data/bison.c++: Use C++ ostreams.
14 (cdebug_): New member.
15
670ddffd
AD
162002-05-28 Akim Demaille <akim@epita.fr>
17
18 * src/output.c (output_skeleton): Be sure to allocate enough room
19 for `/' _and_ for `\0' in full_skeleton.
20
769b430f
AD
212002-05-28 Akim Demaille <akim@epita.fr>
22
23 * data/bison.c++: Catch up with bison.simple:
24 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
25 and Paul Eggert <eggert@twinsun.com>: `error' handing.
26 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
27 and popping traces.
28
7067cb36
PH
292002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
30
31 * src/output.c (output_skeleton): Put an explicit path in front of
32 the skeleton file name, rather than relying on the -I directory,
33 to partially alleviate effects of having a skeleton file lying around
34 in the current directory.
769b430f 35
4a713ec2
PH
362002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
37
769b430f 38 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
39 obstack_printf should be obstack_fgrow1.
40
b408954b
AD
412002-05-26 Akim Demaille <akim@epita.fr>
42
43 * src/state.h (state_t): `solved_conflicts' is a new member.
44 * src/LR0.c (new_state): Set it to 0.
45 * src/conflicts.h, src/conflicts.c (print_conflicts)
46 (free_conflicts, solve_conflicts): Rename as...
47 (conflicts_print, conflicts_free, conflicts_solve): these.
48 Adjust callers.
49 * src/conflicts.c (enum conflict_resolution_e)
50 (solved_conflicts_obstack): New, used by...
51 (log_resolution): this.
52 Adjust to attach the conflict resolution to each state.
53 Complete the description with the precedence/associativity
54 information.
55 (resolve_sr_conflict): Adjust.
56 * src/print.c (print_state): Output its solved_conflicts.
57 * tests/conflicts.at (Unresolved SR Conflicts)
58 (Solved SR Conflicts): Exercise --report=all.
59
a49aecd5
AD
602002-05-26 Akim Demaille <akim@epita.fr>
61
62 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
63 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
64 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
65 (token_number_t, item_number_as_token_number)
66 (token_number_as_item_number, muscle_insert_token_number_table):
67 Rename as...
68 (symbol_number_t, item_number_as_symbol_number)
69 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
70 these, since it is more appropriate.
71
5504898e
AD
722002-05-26 Akim Demaille <akim@epita.fr>
73
74 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
75 `Error:' lines.
76 * data/bison.simple (yystos) [YYDEBUG]: New.
77 (yyparse) [YYDEBUG]: Display the symbols which are popped during
78 error recovery.
79 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
80
ec3bc396
AD
812002-05-25 Akim Demaille <akim@epita.fr>
82
83 * doc/bison.texinfo (Debugging): Split into...
84 (Tracing): this new section, its former contents, and...
85 (Understanding): this new section.
86 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
87 by...
88 (report_flag): this.
89 Adjust all dependencies.
90 (report_args, report_types, report_argmatch): New.
91 (usage, getargs): Report/support -r, --report.
92 * src/options.h
93 (struct option_table_struct): Rename as..,
94 (struct option_table_s): this.
95 Rename the `set_flag' member to `flag' to match with getopt_long's
96 struct.
97 * src/options.c (option_table): Split verbose into an entry for
98 %verbose, and another for --verbose.
99 Support --report/-r, so remove -r from the obsolete --raw.
100 * src/print.c: Attach full item sets and lookaheads reports to
101 report_flag instead of trace_flag.
102 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
103
78df8250
PE
1042002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
105 and Paul Eggert <eggert@twinsun.com>
769b430f 106
78df8250
PE
107 * data/bison.simple (yyparse): Correct error handling to conform to
108 POSIX and yacc. Specifically, after syntax error is discovered,
109 do not reduce further before shifting the error token.
110 Clean up the code a bit by removing the labels yyerrdefault,
111 yyerrhandle, yyerrpop.
112 * NEWS: Document the above.
113
c0c9ea05
PH
1142002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
115
116 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
117 type; it isn't always big enough, since it doesn't necessarily
118 include non-terminals.
769b430f 119 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
120 the latter can be removed.
121 (yy_token_number_type): Remove, only one use.
122 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
123 don't use TokenNumberType as element type.
769b430f 124
c0c9ea05
PH
125 * tests/regression.at: Modify expected output to agree with change
126 to yyr1 and yytranslate.
769b430f 127
6390a83f
FK
1282002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
129
130 * src/reader.c (parse_action): Use copy_character instead of
131 obstack_1grow.
132
db7c8e9a
AD
1332002-05-13 Akim Demaille <akim@epita.fr>
134
135 * tests/regression.at (Token definitions): Prototype yylex and
136 yyerror.
137
fcc61800
PH
1382002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
139
158c687b 140 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
141 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
142 32-bit arithmetic.
143 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
144
5683e9b2
AD
1452002-05-07 Akim Demaille <akim@epita.fr>
146
147 * tests/synclines.at: Be sure to prototype yylex and yyerror to
148 avoid GCC warnings.
149
0c2d3f4c
AD
1502002-05-07 Akim Demaille <akim@epita.fr>
151
152 Kill GCC warnings.
153
154 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
155 over the RHS of each rule.
156 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
157 * src/state.h (state_t): Member `nitems' is unsigned short.
158 * src/LR0.c (get_state): Adjust.
159 * src/reader.c (packgram): Likewise.
160 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
161 `Type'.
162 (muscle_insert_int_table): Remove, unused.
163 (prepare_rules): Remove `max'.
164
1565b720
AD
1652002-05-06 Akim Demaille <akim@epita.fr>
166
167 * src/closure.c (print_firsts): Display of the symbol tags.
168 (bitmatrix_print): Move to...
169 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
170 here.
171 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
172
cfaee611
AD
1732002-05-06 Akim Demaille <akim@epita.fr>
174
175 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
176 hash_do_for_each.
177
458be8e0
AD
1782002-05-06 Akim Demaille <akim@epita.fr>
179
180 * src/LR0.c (new_state, get_state): Instead of using the global
181 `kernel_size' and `kernel_base', have two new arguments:
182 `core_size' and `core'.
183 Adjust callers.
184
a900a624
AD
1852002-05-06 Akim Demaille <akim@epita.fr>
186
187 * src/reader.c (packgram): No longer end `ritem' with a 0
188 sentinel: it is not used.
189
d4e7d3a1
AD
1902002-05-05 Akim Demaille <akim@epita.fr>
191
192 New experimental feature: display the lookaheads in the report and
193 graph.
194
195 * src/print (print_core): When --trace-flag, display the rules
196 lookaheads.
197 * src/print_graph.c (print_core): Likewise.
198 Swap the arguments.
199 Adjust caller.
200
39ceb25b
AD
2012002-05-05 Akim Demaille <akim@epita.fr>
202
203 * tests/torture.at (Many lookaheads): New test.
204
5372019f
AD
2052002-05-05 Akim Demaille <akim@epita.fr>
206
207 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
208 (GENERATE_MUSCLE_INSERT_TABLE): this.
209 (output_int_table, output_unsigned_int_table, output_short_table)
210 (output_token_number_table, output_item_number_table): Replace with...
211 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
212 (muscle_insert_short_table, muscle_insert_token_number_table)
213 (muscle_insert_item_number_table): these.
214 Adjust all callers.
215 (prepare_tokens): Don't free `translations', since...
216 * src/reader.h, src/reader.c (grammar_free): do it.
217 Move to...
218 * src/gram.h, src/gram.c (grammar_free): here.
219 * data/bison.simple, data/bison.c++: b4_token_number_max is now
220 b4_translate_max.
221
5df5f6d5
AD
2222002-05-05 Akim Demaille <akim@epita.fr>
223
224 * src/output.c (output_unsigned_int_table): New.
225 (prepare_rules): `i' is unsigned.
226 `prhs', `rline', `r2' are unsigned int.
227 Rename muscle `rhs_number_max' as `rhs_max'.
228 Output muscles `prhs_max', `rline_max', and `r2_max'.
229 Free rline and r1.
230 * data/bison.simple, data/bison.c++: Adjust to use these muscles
231 to compute types instead of constant types.
232 * tests/regression.at (Web2c Actions): Adjust.
233
b87f8b21
AD
2342002-05-04 Akim Demaille <akim@epita.fr>
235
236 * src/symtab.h (SALIAS, SUNDEF): Rename as...
237 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
238 Adjust dependencies.
239 * src/output.c (token_definitions_output): Be sure not to output a
240 `#define 'a'' when fed with `%token 'a' "a"'.
241 * tests/regression.at (Token definitions): New.
242
8bb936e4
PE
2432002-05-03 Paul Eggert <eggert@twinsun.com>
244
245 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
246 for K&R C.
247
2482002-05-03 gettextize <bug-gnu-gettext@gnu.org>
249
250 * Makefile.am (SUBDIRS): Remove intl.
251 (EXTRA_DIST): Add config/config.rpath.
252
53c71a12
AD
2532002-05-03 Akim Demaille <akim@epita.fr>
254
255 * data/bison.simple (m4_if): Don't output empty enums.
256 And actually, output valid enum definitions :(.
257
289dd0cf
AD
2582002-05-03 Akim Demaille <akim@epita.fr>
259
260 * configure.bat: Remove, completely obsolete.
261 * Makefile.am (EXTRA_DIST): Adjust.
262 Don't distribute config.rpath...
263 * config/Makefile.am (EXTRA_DIST): Do it.
264
db85e524
AD
2652002-05-03 Akim Demaille <akim@epita.fr>
266
267 * configure.in (GETTEXT_VERSION): New.
268 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
269
83ccf991
AD
2702002-05-03 Akim Demaille <akim@epita.fr>
271
272 * data/bison.simple (b4_token_enum): New.
273 (b4_token_defines): Use it to output tokens both as #define and
274 enums.
275 Suggested by Paul Eggert.
276 * src/output.c (token_definitions_output): Don't output spurious
277 white spaces.
278
1f418995
AD
2792002-05-03 Akim Demaille <akim@epita.fr>
280
281 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
282
45119f04
RA
2832002-05-02 Robert Anisko <robert@lrde.epita.fr>
284
285 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
286 Update the stack class, give a try to deque as the default container.
287
b2d52318
AD
2882002-05-02 Akim Demaille <akim@epita.fr>
289
290 * data/bison.simple (yyparse): Do not implement @$ = @1.
291 (YYLLOC_DEFAULT): Adjust to do it.
292 * doc/bison.texinfo (Location Default Action): Fix.
293
3a8b4109
AD
2942002-05-02 Akim Demaille <akim@epita.fr>
295
296 * src/reader.c (parse_braces): Merge into...
297 (parse_action): this.
298
84614e13
AD
2992002-05-02 Akim Demaille <akim@epita.fr>
300
301 * configure.in (ALL_LINGUAS): Remove.
302 * po/LINGUAS, hr.po: New.
303
fdbcd8e2
AD
3042002-05-02 Akim Demaille <akim@epita.fr>
305
306 Remove the so called hairy (semantic) parsers.
307
308 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
309 * src/gram.h, src/gram.c (semantic_parser): Remove.
310 (rule_t): Remove the guard and guard_line members.
311 * src/lex.h (token_t): remove tok_guard.
312 * src/options.c (option_table): Remove %guard and %semantic_parser
313 support.
314 * src/output.c, src/output.h (guards_output): Remove.
315 (prepare): Adjust.
316 (token_definitions_output): Don't output the `T'
317 tokens (???).
318 (output_skeleton): Don't output the guards.
319 * src/files.c, src/files.c (attrsfile): Remove.
320 * src/reader.c (symbol_list): Remove the guard and guard_line
321 members.
322 Adjust dependencies.
323 (parse_guard): Remove.
324 * data/bison.hairy: Remove.
325 * doc/bison.texinfo (Environment Variables): Remove occurrences of
326 BISON_HAIRY.
327
82b6cb3f
AD
3282002-05-02 Akim Demaille <akim@epita.fr>
329
330 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
331 (parse_guard): Rename the formal argument `stack_offset' as
332 `rule_length', which is more readable.
333 Adjust callers.
334 (copy_at, copy_dollar): Instead of outputting the hard coded
335 values of $$, $n and so forth, output invocation to b4_lhs_value,
336 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
337 Note: this patch partially drops `semantic-parser' support: it
338 always does `rule_length - n', where semantic parsers ought to
339 always use `-n'.
82b6cb3f
AD
340 * data/bison.simple, data/bison.c++ (b4_lhs_value)
341 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
342
6cbfbcc5
AD
3432002-05-02 Akim Demaille <akim@epita.fr>
344
345 * configure.in (AC_INIT): Bump to 1.49b.
346 (AM_INIT_AUTOMAKE): Short invocation.
347
b8548114
AD
3482002-05-02 Akim Demaille <akim@epita.fr>
349
350 Version 1.49a.
351
c20cd1fa
AD
3522002-05-01 Akim Demaille <akim@epita.fr>
353
354 * src/skeleton.h: Remove.
355
8a9566d4
AD
3562002-05-01 Akim Demaille <akim@epita.fr>
357
358 * src/skeleton.h: Fix the #endif.
359 Reported by Magnus Fromreide.
360
8c6d399a
PE
3612002-04-26 Paul Eggert <eggert@twinsun.com>
362
363 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
364 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 365 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 366
2b7ed18a
RA
3672002-04-25 Robert Anisko <robert@lrde.epita.fr>
368
369 * src/scan-skel.l: Postprocess quadrigraphs.
370
371 * src/reader.c (copy_character): New function, used to output
372 single characters while replacing `[' and `]' with quadrigraphs, to
373 avoid troubles with M4 quotes.
374 (copy_comment): Output characters with copy_character.
375 (read_additionnal_code): Likewise.
376 (copy_string2): Likewise.
377 (copy_definition): Likewise.
378
379 * tests/calc.at: Exercise M4 quoting.
380
34a89c50
AD
3812002-04-25 Akim Demaille <akim@epita.fr>
382
383 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
384 between `!' and the command.
385 Reported by Paul Eggert.
386
0dd1580a
RA
3872002-04-24 Robert Anisko <robert@lrde.epita.fr>
388
389 * tests/calc.at: Exercise prologue splitting.
390
391 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
392 `b4_post_prologue' instead of `b4_prologue'.
393
394 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
395 muscles.
396 (output): Free pre_prologue_obstack and post_prologue_obstack.
397 * src/files.h, src/files.c (attrs_obstack): Remove.
398 (pre_prologue_obstack, post_prologue_obstack): New.
399 * src/reader.c (copy_definition): Add a parameter to specify the
400 obstack to fill, instead of using attrs_obstack unconditionally.
401 (read_declarations): Pass pre_prologue_obstack to copy_definition if
402 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
403
83c1796f
PE
4042002-04-23 Paul Eggert <eggert@twinsun.com>
405
406 * data/bison.simple: Remove unnecessary commentary and white
407 space differences from 1_29-branch.
408 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
409
410 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
411 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
412 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
413 constructors or destructors.
414
415 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
416
1207eeac
AD
4172002-04-23 Akim Demaille <akim@epita.fr>
418
419 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
420 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
421 location with columns.
422 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
423 All reported by Paul Eggert.
424
78ab8f67
AD
4252002-04-22 Akim Demaille <akim@epita.fr>
426
427 * src/reduce.c (dump_grammar): Move to...
428 * src/gram.h, src/gram.c (grammar_dump): here.
429 Be sure to separate long item numbers.
430 Don't read the members of a rule's prec if its nil.
431
133c20e2
AD
4322002-04-22 Akim Demaille <akim@epita.fr>
433
434 * src/output.c (table_size, table_grow): New.
435 (MAXTABLE): Remove, replace uses with table_size.
436 (pack_vector): Instead of dying when the table is too big, grow it.
437
9515e8a7
AD
4382002-04-22 Akim Demaille <akim@epita.fr>
439
440 * data/bison.simple (yyr1): Its type is that of a token number.
441 * data/bison.c++ (r1_): Likewise.
442 * tests/regression.at (Web2c Actions): Adjust.
443
23c5a174
AD
4442002-04-22 Akim Demaille <akim@epita.fr>
445
446 * src/reader.c (token_translations_init): 256 is now the default
447 value for the error token, i.e., it will be assigned another
448 number if the user assigned 256 to one of her tokens.
449 (reader): Don't force 256 to error.
450 * doc/bison.texinfo (Symbols): Adjust.
451 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
452 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
453 etc. instead of 10, 20, 30 (which was used to `jump' over error
454 (256) and undefined (2)).
455
5fbb0954
AD
4562002-04-22 Akim Demaille <akim@epita.fr>
457
458 Propagate more token_number_t.
459
460 * src/gram.h (token_number_as_item_number)
461 (item_number_as_token_number): New.
462 * src/output.c (GENERATE_OUTPUT_TABLE): New.
463 Use it to create output_item_number_table and
464 output_token_number_table.
465 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
466 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
467 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
468 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
469
4f940944
AD
4702002-04-22 Akim Demaille <akim@epita.fr>
471
472 * src/output.h, src/output.c (get_lines_number): Remove.
473
3ded9a63
AD
4742002-04-19 Akim Demaille <akim@epita.fr>
475
476 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
477 as Lex/Flex'.
478 (Debugging): More details about enabling the debugging features.
479 (Table of Symbols): Describe $$, $n, @$, and @n.
480 Suggested by Tim Josling.
481
e0c471a9
AD
4822002-04-19 Akim Demaille <akim@epita.fr>
483
484 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
485
fecc10cd
AD
4862002-04-10 Akim Demaille <akim@epita.fr>
487
488 * src/system.h: Rely on HAVE_LIMITS_H.
489 Suggested by Paul Eggert.
490
51dec47b
AD
4912002-04-09 Akim Demaille <akim@epita.fr>
492
493 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
494 full stderr, and strip it according to the bison options, instead
495 of composing the error message from different bits.
496 This makes it easier to check for several error messages.
497 Adjust all the invocations.
498 Add an invocation exercising the error token.
499 Add an invocation demonstrating a stupid error message.
500 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
501 Adjust the tests.
502 Error message are for stderr, not stdout.
503
007a50a4
AD
5042002-04-09 Akim Demaille <akim@epita.fr>
505
506 * src/gram.h, src/gram.c (error_token_number): Remove, use
507 errtoken->number.
508 * src/reader.c (reader): Don't specify the user token number (2)
509 for $undefined, as it uselessly prevents using it.
510 * src/gram.h (token_number_t): Move to...
511 * src/symtab.h: here.
512 (state_t.number): Is a token_number_t.
513 * src/print.c, src/reader.c: Use undeftoken->number instead of
514 hard coded 2.
515 (Even though this 2 is not the same as above: the number of the
516 undeftoken remains being 2, it is its user token number which
517 might not be 2).
518 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
519 `user_token_number_max'.
520 Output `undef_token_number'.
521 * data/bison.simple, data/bison.c++: Use them.
522 Be sure to map invalid yylex return values to
523 `undef_token_number'. This saves us from gratuitous SEGV.
524
525 * tests/conflicts.at (Solved SR Conflicts)
526 (Unresolved SR Conflicts): Adjust.
527 * tests/regression.at (Web2c Actions): Adjust.
528
06446ccf
AD
5292002-04-08 Akim Demaille <akim@epita.fr>
530
531 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
532 Adding #line.
533 Remove the duplicate `typedefs'.
534 (RhsNumberType): Fix the declaration and various other typos.
535 Use __ofile__.
536 * data/bison.simple: Use __ofile__.
537 * src/scan-skel.l: Handle __ofile__.
538
62a3e4f0
AD
5392002-04-08 Akim Demaille <akim@epita.fr>
540
541 * src/gram.h (item_number_t): New, the type of item numbers in
542 RITEM. Note that it must be able to code symbol numbers as
543 positive number, and the negation of rule numbers as negative
544 numbers.
545 Adjust all dependencies (pretty many).
546 * src/reduce.c (rule): Remove this `short *' pointer: use
547 item_number_t.
548 * src/system.h (MINSHORT, MAXSHORT): Remove.
549 Include `limits.h'.
550 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
551 (shortcpy): Remove.
552 (MAXTABLE): Move to...
553 * src/output.c (MAXTABLE): here.
554 (prepare_rules): Use output_int_table to output rhs.
555 * data/bison.simple, data/bison.c++: Adjust.
556 * tests/torture.at (Big triangle): Move the limit from 254 to
557 500.
558 * tests/regression.at (Web2c Actions): Ajust.
559
560 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
561 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
562 passes, but produces negative #line number, once fixed, GCC is
563 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
564 C), it passes.
565 * src/state.h (state_h): Code input lines on ints, not shorts.
566
bb88b0fc
AD
5672002-04-08 Akim Demaille <akim@epita.fr>
568
569 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
570 and then the grammar.
571
9a636f47
AD
5722002-04-08 Akim Demaille <akim@epita.fr>
573
574 * src/system.h: No longer using strndup.
575
680e8701
AD
5762002-04-07 Akim Demaille <akim@epita.fr>
577
578 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
579 * src/output.c (output_table_data): Return the longest number.
580 (prepare_tokens): Output `token_number_max').
581 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
582 New.
583 Use them to define yy_token_number_type/TokenNumberType.
584 Use this type for yytranslate.
585 * tests/torture.at (Big triangle): Push the limit from 124 to
586 253.
587 * tests/regression.at (Web2c Actions): Adjust.
588
817e9f41
AD
5892002-04-07 Akim Demaille <akim@epita.fr>
590
591 * tests/torture.at (Big triangle): New.
592 (GNU AWK Grammar, GNU Cim Grammar): Move to...
593 * tests/existing.at: here.
594
5123689b
AD
5952002-04-07 Akim Demaille <akim@epita.fr>
596
597 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
598 nritems.
599 Adjust dependencies.
600
f3849179
AD
6012002-04-07 Akim Demaille <akim@epita.fr>
602
603 * src/reader.c: Normalize increments to prefix form.
604
bd02036a
AD
6052002-04-07 Akim Demaille <akim@epita.fr>
606
607 * src/reader.c, symtab.c: Remove debugging code.
608
db8837cb
AD
6092002-04-07 Akim Demaille <akim@epita.fr>
610
611 Rename all the `bucket's as `symbol_t'.
612
613 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
614 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
615 * src/symtab.c, src/symtab.h (bucket): Rename as...
616 (symbol_t): this.
617 (symbol_list_new, bucket_check_defined, bucket_make_alias)
618 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
619 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
620 (buckets_new, buckets_free, buckets_do): Rename as...
621 (symbol_list_new, symbol_check_defined, symbol_make_alias)
622 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
623 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
624 (symbols_new, symbols_free, symbols_do): these.
625
72a23c97
AD
6262002-04-07 Akim Demaille <akim@epita.fr>
627
628 Use lib/hash for the symbol table.
629
630 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
631 EOF.
632 * src/lex.c (lex): Set the `number' member of new terminals.
633 * src/reader.c (bucket_check_defined, bucket_make_alias)
634 (bucket_check_alias_consistence, bucket_translation): New.
635 (reader, grammar_free, readgram, token_translations_init)
636 (packsymbols): Adjust.
637 (reader): Number the predefined tokens.
638 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
639 for predefined tokens.
640 * src/symtab.h (bucket): Remove all the hash table related
641 members.
642 * src/symtab.c (symtab): Replace by...
643 (bucket_table): this.
644 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
645 (buckets_new, buckets_do): New.
646
280a38c3
AD
6472002-04-07 Akim Demaille <akim@epita.fr>
648
649 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
650 (start_symbol, max_user_token_number, semantic_parser)
651 (error_token_number): Initialize.
652 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
653 Initialize.
654 (reader): Don't.
655 (errtoken, eoftoken, undeftoken, axiom): Extern.
656
03b31c0c
AD
6572002-04-07 Akim Demaille <akim@epita.fr>
658
659 * src/gram.h (rule_s): prec and precsym are now pointers
660 to the bucket giving the priority/associativity.
661 Member `associativity' removed: useless.
662 * src/reduce.c, src/conflicts.c: Adjust.
663
8b3df748
AD
6642002-04-07 Akim Demaille <akim@epita.fr>
665
666 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
667 Properly escape the symbols' TAG when outputting them.
668
e601aa1d
AD
6692002-04-07 Akim Demaille <akim@epita.fr>
670
671 * src/lalr.h (LA): Is a bitsetv, not bitset*.
672
b0299a2e
AD
6732002-04-07 Akim Demaille <akim@epita.fr>
674
675 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
676 (LArule): this, which is an array to rule_t*.
677 * src/print.c, src/conflicts.c: Adjust.
678
d7e1f00c
AD
6792002-04-07 Akim Demaille <akim@epita.fr>
680
681 * src/gram.h (rule_t): Rename `number' as `user_number'.
682 `number' is a new member.
683 Adjust dependencies.
684 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
685
cc9305dd
AD
6862002-04-07 Akim Demaille <akim@epita.fr>
687
688 As a result of the previous patch, it is no longer needed
689 to reorder ritem itself.
690
691 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
692
b0940840
AD
6932002-04-07 Akim Demaille <akim@epita.fr>
694
695 Be sure never to walk through RITEMS, but use only data related to
696 the rules themselves. RITEMS should be banished.
697
698 * src/output.c (output_token_translations): Rename as...
699 (prepare_tokens): this.
700 In addition to `translate', prepare the muscles `tname' and
701 `toknum', which were handled by...
702 (output_rule_data): this.
703 Remove, and move the remainder of its outputs into...
704 (prepare_rules): this new routines, which also merges content from
705 (output_gram): this.
706 (prepare_rules): Be sure never to walk through RITEMS.
707 (output_stos): Rename as...
708 (prepare_stos): this.
709 (output): Always invoke prepare_states, after all, just don't use it
710 in the output if you don't need it.
711
643a5994
AD
7122002-04-07 Akim Demaille <akim@epita.fr>
713
714 * src/LR0.c (new_state): Display `nstates' as the name of the
715 newly created state.
716 Adjust to initialize first_state and last_state if needed.
717 Be sure to distinguish the initial from the final state.
718 (new_states): Create the itemset of the initial state, and use
719 new_state.
720 * src/closure.c (closure): Now that the initial state has its
721 items properly set, there is no need for a special case when
722 creating `ruleset'.
723
724 As a result, now the rule 0, reducing to $axiom, is visible in the
725 outputs. Adjust the test suite.
726
727 * tests/conflicts.at (Solved SR Conflicts)
728 (Unresolved SR Conflicts): Adjust.
729 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
730 * tests/conflicts.at (S/R in initial): New.
731
b4c4ccc2
AD
7322002-04-07 Akim Demaille <akim@epita.fr>
733
734 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
735 the RHS of the rules.
736 * src/output.c (output_gram): Likewise.
737
bba97eb2
AD
7382002-04-07 Akim Demaille <akim@epita.fr>
739
740 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
741 bucket.
742 Adjust all dependencies.
743 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
744 `number' of the buckets too.
745 * src/gram.h: Include `symtab.h'.
746 (associativity): Move to...
747 * src/symtab.h: here.
748 No longer include `gram.h'.
749
c3b407f4
AD
7502002-04-07 Akim Demaille <akim@epita.fr>
751
752 * src/gram.h, src/gram.c (rules_rhs_length): New.
753 (ritem_longest_rhs): Use it.
754 * src/gram.h (rule_t): `number' is a new member.
755 * src/reader.c (packgram): Set it.
756 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
757 the end of `rules', and count them out of `nrules'.
758 (reduce_output, dump_grammar): Adjust.
759 * src/print.c (print_grammar): It is no longer needed to check for
760 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
761 * tests/reduce.at (Reduced Automaton): New test.
762
11652ab3
AD
7632002-04-07 Akim Demaille <akim@epita.fr>
764
765 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
766 lacking `+ 1' to nrules, Bison reported as useless a token if it
767 was used solely to set the precedence of the last rule...
768
26b23c1a
AD
7692002-04-07 Akim Demaille <akim@epita.fr>
770
771 * data/bison.c++, data/bison.simple: Don't output the current file
772 name in #line, to avoid useless diffs between two identical
773 outputs under different names.
774
18bcecb0
AD
7752002-04-07 Akim Demaille <akim@epita.fr>
776
777 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
778 Normalize loops to using `< nrules + 1', not `<= nrules'.
779
fa770c86
AD
7802002-04-07 Akim Demaille <akim@epita.fr>
781
782 * TODO: Update.
783
d9b739c3
AD
7842002-04-07 Akim Demaille <akim@epita.fr>
785
786 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
787 bucket.value as bucket.number.
788
99013900
AD
7892002-04-07 Akim Demaille <akim@epita.fr>
790
791 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
792 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
793 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
794 RHS, instead of being an index in RITEMS.
795
e966383b
PE
7962002-04-04 Paul Eggert <eggert@twinsun.com>
797
798 * doc/bison.texinfo: Update copyright date.
799 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
800 (Symbols): Warn about running Bison in one character set,
801 but compiling and/or running in an incompatible one.
802 Warn about character code 256, too.
803
8042002-04-03 Paul Eggert <eggert@twinsun.com>
805
806 * src/bison.data (YYSTACK_ALLOC): Depend on whether
807 YYERROR_VERBOSE is nonzero, not whether it is defined.
808
809 Merge changes from bison-1_29-branch.
c307773e 810
8d6c48b9
PE
8112002-03-20 Paul Eggert <eggert@twinsun.com>
812
813 Merge fixes from Debian bison_1.34-1.diff.
814
815 * configure.in (AC_PREREQ): 2.53.
816
e53c6322
AD
8172002-03-20 Akim Demaille <akim@epita.fr>
818
819 * src/conflicts.c (log_resolution): Argument `resolution' is const.
820
9ffbeca7
PE
8212002-03-19 Paul Eggert <eggert@twinsun.com>
822
21db0b2a
PE
823 * src/bison.simple (YYCOPY): New macro.
824 (YYSTACK_RELOCATE): Use it.
825 Remove Type arg; no longer needed. All callers changed.
826 (yymemcpy): Remove; no longer needed.
827
9ffbeca7
PE
828 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
829 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
830
642cb8f8
AD
8312002-03-19 Akim Demaille <akim@epita.fr>
832
833 Test and fix the #line outputs.
834
835 * tests/atlocal.at (GCC): New.
836 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
837 (Prologue synch line, ,%union synch line, Postprologue synch line)
838 (Action synch line, Epilogue synch line): New tests.
839 * src/reader.c (parse_union_decl): Define the muscle stype_line.
840 * data/bison.simple, data/bison.c++: Use it.
841
3c31a486
AD
8422002-03-19 Akim Demaille <akim@epita.fr>
843
844 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
845 (Solved SR Conflicts, %expect not enough, %expect right)
846 (%expect too much): Move to...
847 * tests/conflicts.at: this new file.
848
0d8bed56
AD
8492002-03-19 Akim Demaille <akim@epita.fr>
850
851 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
852 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
853 that we can move to enums for instance.
854 * src/output.c (token_definitions_output): Output a list of
855 `token-name, token-number' instead of the #define.
856 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
857
9208d17f
AD
8582002-03-14 Akim Demaille <akim@epita.fr>
859
860 Use Gettext 0.11.1.
861
af27eacb
RA
8622002-03-09 Robert Anisko <robert@lrde.epita.fr>
863
864 * data/bison.c++: Make the user able to add members to the generated
865 parser by subclassing.
866
9101a310
RA
8672002-03-05 Robert Anisko <robert@lrde.epita.fr>
868
869 * src/reader.c (read_additionnal_code): `c' should be an integer, not
870 a character.
871 Reported by Nicolas Tisserand and Nicolas Burrus.
872
fff9bf0b
RA
8732002-03-04 Robert Anisko <robert@lrde.epita.fr>
874
875 * src/reader.c: Warn about lacking semi-colons, do not complain.
876
64dba31e
RA
8772002-03-04 Robert Anisko <robert@lrde.epita.fr>
878
879 * data/bison.c++: Remove a debug line.
880
374f5a14
RA
8812002-03-04 Robert Anisko <robert@lrde.epita.fr>
882
883 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
884 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
885 provide a default implementation.
886
bfcf1f3a
AD
8872002-03-04 Akim Demaille <akim@epita.fr>
888
889 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
890 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
891 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
892 * tests/semantic.at (Parsing Guards): Similarly.
893 * src/reader.at (readgram): Complain if the last rule is not ended
894 with a semi-colon.
895
65ccf9fc
AD
8962002-03-04 Akim Demaille <akim@epita.fr>
897
898 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
899 * src/closure.c: here.
900 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
901 RTC.
902 * src/warshall.h, src/warshall.c: Remove.
903 * tests/sets.at (Broken Closure): Adjust.
904
d0039cbc
AD
9052002-03-04 Akim Demaille <akim@epita.fr>
906
907 * src/output.c (output_skeleton): tempdir is const.
908 bytes_read is unused.
909
345cea78
AD
9102002-03-04 Akim Demaille <akim@epita.fr>
911
912 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
913 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
914 Update.
915 From Michael Hayes.
916
564801f7
AD
9172002-03-04 Akim Demaille <akim@epita.fr>
918
919 * src/closure.c (closure): `r' is unused.
920
e5352bc7
AD
9212002-03-04 Akim Demaille <akim@epita.fr>
922
923 * tests/sets.at (Broken Closure): Add the ending `;'.
924 * src/reader.at (readgram): Complain if a rule is not ended with a
925 semi-colon.
926
914feea9
AD
9272002-03-04 Akim Demaille <akim@epita.fr>
928
929 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
930 (count_sr_conflicts): Use bitset_count.
931 * src/reduce.c (inaccessable_symbols): Ditto.
932 (bits_size): Remove.
933 * src/warshall.h, src/warshall.c: Convert to bitsetv.
934
f0250de6
AD
9352002-03-04 Akim Demaille <akim@epita.fr>
936
937 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
938 * src/reduce.c: Remove the `bitset_zero's following the
939 `bitset_create's, as now it is performed by the latter.
940
ef017502
AD
9412002-03-04 Akim Demaille <akim@epita.fr>
942
943 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
944 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
945 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
946 latest sources from Michael.
947
76514394
AD
9482002-03-04 Akim Demaille <akim@epita.fr>
949
950 * src/output.c (output): Don't free the grammar.
951 * src/reader.c (grammar_free): New.
952 * src/main.c (main): Call it and don't free symtab here.
953
55024580
AD
9542002-03-04 Akim Demaille <akim@epita.fr>
955
956 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
957 before returning.
958 Reported by Benoit Perrot.
959
f9abaa2c
AD
9602002-03-04 Akim Demaille <akim@epita.fr>
961
962 Use bitset operations when possible, not loops over bits.
963
964 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
965 bitset_or.
966 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
967 * src/reduce.c (useless_nonterminals): Formatting changes.
968 * src/warshall.c (TC): Use bitset_or.
969
0e721e75
AD
9702002-03-04 Akim Demaille <akim@epita.fr>
971
972 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
973 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
974 Ditto.
975
0fb1ffb1
AD
9762002-03-04 Akim Demaille <akim@epita.fr>
977
978 * src/lalr.c (F): Now a bitset*.
979 Adjust all dependencies.
980
b86796bf
AD
9812002-03-04 Akim Demaille <akim@epita.fr>
982
983 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
984 Adjust all dependencies.
985
602bbf31
AD
9862002-03-04 Akim Demaille <akim@epita.fr>
987
988 * src/L0.c, src/LR0.h (nstates): Be size_t.
989 Adjust comparisons (signed vs unsigned).
990 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
991 bitset*.
992 Adjust all dependencies.
993
d8a0245c
AD
9942002-03-04 Akim Demaille <akim@epita.fr>
995
996 * src/closure.c (firsts): Now, also a bitset.
997 Adjust all dependencies.
998 (varsetsize): Remove, now unused.
999 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
1000
34ba9743
AD
10012002-03-04 Akim Demaille <akim@epita.fr>
1002
1003 * src/print.c: Convert to use bitset.h, not hand coded iterations
1004 over ints.
1005
ed86e78c
AD
10062002-03-04 Akim Demaille <akim@epita.fr>
1007
1008 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
1009
dfdb1797
AD
10102002-03-04 Akim Demaille <akim@epita.fr>
1011
1012 * src/closure.c (ruleset): Be a bitset.
1013 (rulesetsize): Remove.
1014
7086e707
AD
10152002-03-04 Akim Demaille <akim@epita.fr>
1016
1017 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
1018 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
1019 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
1020 * src/closure.c (fderives): Be an array of bitsets.
1021
98254360
RA
10222002-02-28 Robert Anisko <robert@lrde.epita.fr>
1023
1024 * data/bison.c++: Merge the two generated headers. Insert a copyright
1025 notice in each output file.
1026
a75c057f
AD
10272002-02-28 Akim Demaille <akim@epita.fr>
1028
1029 * data/bison.c++: Copy the prologue of bison.simple to fetch
1030 useful M4 definitions, such as b4_header_guard.
1031
06b00abc
AD
10322002-02-25 Akim Demaille <akim@epita.fr>
1033
1034 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
1035 translator friendly scheme for the bgr
1036 copyright notice.
06b00abc 1037
70e7d534
AD
10382002-02-25 Akim Demaille <akim@epita.fr>
1039
1040 * src/output.c (header_output): Remove, now handled completely via
1041 M4.
1042
abe017f6
AD
10432002-02-25 Akim Demaille <akim@epita.fr>
1044
1045 * m4/m4.m4: New, from CVS Autoconf.
1046 * configure.in: Invoke it.
1047 * src/output.c (output_skeleton): Use its result instead of the
1048 hard coded name.
1049
381fb12e
AD
10502002-02-25 Akim Demaille <akim@epita.fr>
1051
1052 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
1053 Fileutils 4.1.5.
1054 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
1055 * src/output.c (output_skeleton): Use mkstemp to create a real
1056 temporary file.
1057 Move the filling of `skeleton' and its muscle to...
1058 (prepare): here.
1059 (output): Move the definition of the prologue muscle to...
1060 (prepare): here.
1061 * src/system.h (DEFAULT_TMPDIR): New.
1062
6f38107f
PE
10632002-02-14 Paul Eggert <eggert@twinsun.com>
1064
1065 Remove the support for C++ namespace cleanliness; it was
1066 causing more problems than it was curing, since it didn't work
1067 properly on some nonstandard C++ compilers. This can wait
1068 for a proper C++ parser.
1069
1070 * NEWS: Document this.
1071 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
1072 of C++, as it's treated like C now.
1073 * src/bison.simple (YYSTD): Remove.
1074 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
1075 Treat C++ just like Standard C instead of trying to support
1076 namespace cleanliness.
1077
80cce3da
AD
10782002-02-14 Akim Demaille <akim@epita.fr>
1079
1080 * tests/regression.at (else): Adjust to Andreas' change.
1081
842e8679
AD
10822002-02-14 Akim Demaille <akim@epita.fr>
1083
1084 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
1085
4bda3f10
AD
10862002-02-13 Andreas Schwab <schwab@suse.de>
1087
1088 * src/output.c (output_rule_data): Don't output NULL, it might
1089 not be defined yet.
1090
4162fa07 10912002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 1092
4162fa07
RA
1093 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
1094 (Copyright notice): Update.
b418ecd8 1095
bd16a5dc
AD
10962002-02-11 Akim Demaille <akim@epita.fr>
1097
1098 * tests/regression.at (%nonassoc and eof): Don't include
1099 nonportable headers.
1100
8d69a1a3
RA
11012002-02-08 Robert Anisko <robert@lrde.epita.fr>
1102
1103 * data/bison.c++: Correct error recovery. Make the user able to
1104 initialize the starting location.
1105
9b2d0677
AD
11062002-02-07 Akim Demaille <akim@epita.fr>
1107
1108 * tests/input.at: New.
1109
69e2658b
RA
11102002-02-07 Robert Anisko <robert@lrde.epita.fr>
1111
1112 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 1113 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
1114 directives around tables only needed for debugging.
1115
4aacc3a7
RA
11162002-02-07 Robert Anisko <robert@lrde.epita.fr>
1117
1118 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
1119 C++ parsers.
1120 (yy::b4_name::parse): Use print_.
1121
762a801e
RA
11222002-02-07 Robert Anisko <robert@lrde.epita.fr>
1123
1124 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
1125
4bb2bc3f
RA
11262002-02-07 Robert Anisko <robert@lrde.epita.fr>
1127
1128 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
1129 C++ parsers.
1130 (yy::b4_name::parse): Build verbose error messages, and use error_.
1131
6b45a3ca
RA
11322002-02-06 Robert Anisko <robert@lrde.epita.fr>
1133
1134 * data/bison.c++: Fix m4 quoting in comments.
1135
50997c6e
RA
11362002-02-06 Robert Anisko <robert@lrde.epita.fr>
1137
1138 * data/bison.c++: Adjust the parser code. Fix some muscles that were
1139 not expanded by m4.
1140
3f3eed27
AD
11412002-02-05 Akim Demaille <akim@epita.fr>
1142
1143 * data/bison.c++: Adjust to the M4 back end.
1144 More is certainly needed.
1145
be2a1a68
AD
11462002-02-05 Akim Demaille <akim@epita.fr>
1147
1148 Give a try to M4 as a back end.
1149
1150 * lib/readpipe.c: New, from wdiff.
1151 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
1152 BISON_HAIRY.
1153 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
1154 specific values. Now it is m4 that performs the lookup.
1155 * src/parse-skel.y: Remove.
1156 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
1157 * src/output.c (actions_output, guards_output)
1158 (token_definitions_output): No longer keeps track of the output
1159 line number, hence remove the second argument.
1160 (guards_output): Check against the guard member of a rule, not the
1161 action member.
1162 Adjust callers.
1163 (output_skeleton): Don't look for the skeleton location, let m4 do
1164 that.
1165 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
1166 file will be used.
1167 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
1168 (prepare): Given that for the time being changesyntax is not
1169 usable in M4, rename the muscles using `-' to `_'.
1170 Define `defines_flag', `output_parser_name' and `output_header_name'.
1171 * src/output.h (actions_output, guards_output)
1172 (token_definitions_output): Adjust prototypes.
1173 * src/scan-skel.l: Instead of scanning the skeletons, it now
1174 processes the output of m4: `__oline__' and `#output'.
1175 * data/bison.simple: Adjust to be used by M4(sugar).
1176 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
1177 to date.
1178 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
1179 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
1180 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
1181 shamelessly stolen from CVS Autoconf.
1182
beda758b
AD
11832002-02-05 Akim Demaille <akim@epita.fr>
1184
1185 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
1186 * configure.in: Check for the declarations of free and malloc.
1187 * src/muscle_tab.c: Adjust.
1188
5ece6d43
AD
11892002-02-05 Akim Demaille <akim@epita.fr>
1190
1191 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
1192 which have no values.
1193
5bb18f9a
AD
11942002-02-05 Akim Demaille <akim@epita.fr>
1195
1196 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
1197 * data/: here.
1198
894dd62e
PE
11992002-01-29 Paul Eggert <eggert@twinsun.com>
1200
1201 * src/bison.simple (YYSIZE_T): Do not define merely because
1202 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
1203 On some platforms, <alloca.h> does not declare YYSTD (size_t).
1204
82841af7
AD
12052002-01-27 Akim Demaille <akim@epita.fr>
1206
1207 Fix `%nonassoc and eof'.
1208
1209 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
1210 which were not properly copied! Replace
1211 memcpy (res->errs, src->errs, src->nerrs);
1212 with
1213 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
1214 !!!
1215 * tests/regression.at (%nonassoc and eof): Adjust to newest
1216 Autotest: `.' is not in the PATH.
1217
318b76e9
AD
12182002-01-27 Akim Demaille <akim@epita.fr>
1219
1220 * tests/sets.at (AT_EXTRACT_SETS): New.
1221 (Nullable): Use it.
1222 (Firsts): New.
1223
30d2f3d5
AD
12242002-01-26 Akim Demaille <akim@epita.fr>
1225
1226 * tests/actions.at, tests/calc.at, tests/headers.at,
1227 * tests/torture.at: Adjust to the newest Autotest which no longer
1228 forces `.' in the PATH.
1229
30f8c395
AD
12302002-01-25 Akim Demaille <akim@epita.fr>
1231
1232 * tests/regression.at (%nonassoc and eof): New.
1233 Suggested by Robert Anisko.
1234
29ae55f1
AD
12352002-01-24 Akim Demaille <akim@epita.fr>
1236
1237 Bison dumps core when trying to complain about broken input files.
1238 Reported by Cris van Pelt.
1239
1240 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
1241 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
1242 into...
1243 (Invalid inputs): Strengthen: exercise parse_percent_token.
1244
2b548aa6
RA
12452002-01-24 Robert Anisko <robert.anisko@epita.fr>
1246
1247 * src/Makefile.am: Add bison.c++.
1248 * src/bison.c++: New skeleton.
1249
bb0146c2
AD
12502002-01-21 Paolo Bonzini <bonzini@gnu.org>
1251
1252 * po/it.po: New.
1253
bec30531
AD
12542002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
1255
1256 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
1257
fc6edc45
MA
12582002-01-20 Marc Autret <marc@gnu.org>
1259
1260 * src/files.c (compute_output_file_names): Fix
1261
5e5d5415
MA
12622002-01-20 Marc Autret <marc@gnu.org>
1263
1264 * tests/output.at: New test.
1265 * src/files.c (compute_base_names): Don't map extensions when
1266 the YACC flag is set, use defaults.
1267 Reported by Evgeny Stambulchik.
1268
44ea3fbd
MA
12692002-01-20 Marc Autret <marc@gnu.org>
1270
bb0146c2 1271 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
1272 compilers as well (i.e. the vendor C compiler).
1273 Suggested by Albert Chin-A-Young.
1274
338963d1
TVH
12752002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
1276
1277 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
1278 canonical definition.
1279 * src/system.h: Use the canonical definition for PARAMS (avoids
1280 a conflict with the macro from lib/hash.h).
1281
c57b2479
AD
12822002-01-11 Akim Demaille <akim@epita.fr>
1283
1284 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 1285 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 1286
b85810ae
AD
12872002-01-09 Akim Demaille <akim@epita.fr>
1288
1289 * src/files.c, src/files.h (output_infix): New.
1290 (tab_extension): Remove.
1291 (compute_base_names): Compute the former, drop the latter.
1292 * src/output.c (prepare): Insert the muscles `output-infix', and
1293 `output-suffix'.
1294 * src/parse-skel.y (string, string.1): New.
1295 (section.header): Use it.
1296 (section.yacc): Remove.
1297 (prefix): Remove too.
1298 * src/scan-skel.l: Adjust.
1299 * src/bison.simple, src/bison.hairy: Adjust.
1300
cae60122
AD
13012002-01-09 Akim Demaille <akim@epita.fr>
1302
1303 * configure.in (WERROR_CFLAGS): Compute it.
1304 * src/Makefile.am (CFLAGS): Pass it.
1305 * tests/atlocal.in (CFLAGS): Idem.
1306 * src/files.c: Fix a few warnings.
1307 (get_extension_index): Remove, unused.
1308
ae404801
AD
13092002-01-08 Akim Demaille <akim@epita.fr>
1310
1311 * src/getargs.c (AS_FILE_NAME): New.
1312 (getargs): Use it to convert DOSish file names.
1313 * src/files.c (base_name): Rename as full_base_name to avoid
1314 clashes with `base_name ()'.
1315 (filename_split): New.
1316 (compute_base_names): N-th rewrite, using filename_split.
1317
22312b71
AD
13182002-01-08 Akim Demaille <akim@epita.fr>
1319
1320 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
1321 New, stolen from the Fileutils 4.1.
1322 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
1323 * configure.in: Check for the presence of memrchr, and of its
1324 prototype.
1325
a67cef01
TVH
13262002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
1327
1328 * lib/hash.h (__P): Added definition for this macro.
1329 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
1330 BUILT_SOURCES, to ensure they are generated first.
1331 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
1332 %error-verbose to allow bootstrapping with bison 1.30x.
1333
2b25d624
AD
13342002-01-06 Akim Demaille <akim@epita.fr>
1335
1336 * src/reader.c (parse_braces): Don't fetch the next char, the
1337 convention is to fetch on entry.
1338 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
1339 'switch' without a following semicolon.
1340 * tests/regression.at (braces parsing): New.
1341
3460813b
AD
13422002-01-06 Akim Demaille <akim@epita.fr>
1343
1344 Bison is dead wrong in its RR conflict reports.
1345
1346 * tests/torture.at (GNU Cim Grammar): New.
1347 * src/conflicts.c (count_rr_conflicts): Fix.
1348
73784c64
AD
13492002-01-06 Akim Demaille <akim@epita.fr>
1350
1351 Creating package.m4 from configure.ac causes too many problems.
1352
1353 * tests/Makefile.am (package.m4): Create it by hand,
1354 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
1355
25d81090
AD
13562002-01-06 Akim Demaille <akim@epita.fr>
1357
1358 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
1359 skeleton.h.
1360
a9b8959e
PE
13612002-01-04 Paul Eggert <eggert@twinsun.com>
1362
1363 * doc/bison.texinfo (Debugging):
1364 Remove YYSTDERR; it's no longer defined or used.
1365 Also, s/cstdio.h/cstdio/.
1366
25d81090
AD
13672002-01-03 Akim Demaille <akim@epita.fr>
1368
1369 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
1370
1109455c
AD
13712002-01-03 Akim Demaille <akim@epita.fr>
1372
1373 * src/parse-skel.y (process_skeleton): Don't bind the parser's
1374 tracing code to --trace, wait for a better --trace option, with
1375 args.
1376
7ea5e977
AD
13772002-01-03 Akim Demaille <akim@epita.fr>
1378
1379 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
1380 The ISO C++ standard is extremely clear about it: stderr is
1381 considered a macro, not a regular symbol (see table 94 `Header
1382 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
1383 Therefore std:: does not apply to it. It still does with fprintf.
1384 Also, s/cstdio.h/cstdio/.
1385
fab5b110
AD
13862002-01-03 Akim Demaille <akim@epita.fr>
1387
1388 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
1389 for non system headers.
1390
aed7fd9b
AD
13912002-01-02 Akim Demaille <akim@epita.fr>
1392
1393 Equip the skeleton chain with location tracking, runtime trace,
1394 pure parser and scanner.
1395
1396 * src/parse-skel.y: Request a pure parser, locations, and prefix
1397 renaming.
1398 (%union): Having several members with the same type does not help
1399 type mismatches, simplify.
1400 (YYPRINT, yyprint): New.
1401 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
1402 (skel_error): this.
1403 Handle locations.
1404 * src/scan-skel.l: Adjust to these changes.
1405 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
1406 (LOCATION_PRINT, skel_control_t): New.
1407
24fad99e
AD
14082001-12-30 Akim Demaille <akim@epita.fr>
1409
1410 * src/parse-skel.y: Get rid of the shift/reduce conflict:
1411 replace `gb' with BLANKS.
1412 * src/scan-skel.l: Adjust.
1413
a4b36db4
AD
14142001-12-30 Akim Demaille <akim@epita.fr>
1415
1416 * src/system.h: We don't need nor want bcopy.
1417 Throw away MS-DOS crap: we don't need getpid.
1418 * configure.in: We don't need strndup. It was even causing
1419 problems: because Flex includes the headers *before* us,
1420 _GNU_SOURCE is not defined by config.h, and therefore strndup was
1421 not visible.
1422 * lib/xstrndup.c: New.
1423 * src/scan-skel.l: Use it.
1424 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
1425 * src/parse-skel.y: Use %directives instead of #defines.
1426
1239777d
AD
14272001-12-30 Akim Demaille <akim@epita.fr>
1428
1429 * src/skeleton.h: New.
1430 * src/output.c (output_parser, output_master_parser): Remove, dead
1431 code.
1432 * src/output.h (get_lines_number, actions_output, guards_output)
1433 (token_definitions_output): Prototype them.
1434 * src/parse-skel.y: Add the license notice.
1435 Include output.h and skeleton.h.
1436 (process_skeleton): Returns void, and takes a single parameter.
1437 * src/scan-skel.l: Add the license notice.
1438 Include skeleton.h.
1439 Don't use %option yylineno: it seems that then Flex imagines
1440 REJECT has been used, and therefore it won't reallocate its
1441 buffers (which makes no other sense to me than a bug). It results
1442 in warnings for `unused: yy_flex_realloc'.
1443
9b3add5b
RA
14442001-12-30 Robert Anisko <robert.anisko@epita.fr>
1445
1446 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1447 (MUSCLE_INSERT_PREFIX): ...to there.
1448 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
1449 (MUSCLE_INSERT_PREFIX): Move from here...
1450
1451 * src/bison.hairy: Add a section directive. Put braces around muscle
1452 names. This parser skeleton is still broken, but Bison should not
1453 choke on a bad muscle 'syntax'.
1454 * src/bison.simple: Add a section directive. Put braces around muscle
1455 names.
1456
1457 * src/files.h (strsuffix, stringappend): Add declarations.
1458 (tab_extension): Add declaration.
1459 (short_base_name): Add declaration.
1460
1461 * src/files.c (strsuffix, stringappend): No longer static. These
1462 functions are used in the skeleton parser.
1463 (tab_extension): New.
1464 (compute_base_names): Use the computations done in this function
fab5b110 1465 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
1466 names.
1467 (short_base_name): No longer static.
1468
1469 * src/output.c (output_skeleton): New.
1470 (output): Disable call to output_master_parser, and give a try to
1471 a new skeleton handling system.
1472 (guards_output, actions_output): No longer static.
1473 (token_definitions_output, get_lines_number): No longer static.
1474
1475 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
1476
fab5b110 1477 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
1478 parse-skel.y.
1479
1480 * src/parse-skel.y: New file.
1481 * src/scan-skel.l: New file.
1482
b5b61c61
AD
14832001-12-29 Akim Demaille <akim@epita.fr>
1484
1485 %name-prefix is broken.
1486
1487 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
1488 Adjust all dependencies.
1489 * tests/headers.at (export YYLTYPE): Strengthen this test: use
1490 %name-prefix.
1491
1492 Renaming yylval but not yylloc is not consistent. Now we do.
1493
1494 * src/bison.simple: Prefix yylloc if used.
1495 * doc/bison.texinfo (Decl Summary): Document that.
1496
8c9a50be
AD
14972001-12-29 Akim Demaille <akim@epita.fr>
1498
1499 * doc/bison.texinfo: Promote `%long-directive' over
1500 `%long_directive'.
1501 Remove all references to fixed-output-files, yacc is enough.
1502
d99361e6
AD
15032001-12-29 Akim Demaille <akim@epita.fr>
1504
1505 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
1506 user prologue. These are defaults.
1507 * tests/actions.at (Mid-rule actions): Make sure the user can
1508 define YYDEBUG and YYERROR_VERBOSE.
1509
b9cecb91
AD
15102001-12-29 Akim Demaille <akim@epita.fr>
1511
1512 * src/output.c (header_output): Don't forget to export YYLTYPE and
1513 yylloc.
1514 * tests/headers.at (export YYLTYPE): New, make sure it does.
1515 * tests/regression.at (%union and --defines, Invalid CPP headers):
1516 Move to...
1517 * tests/headers.at: here.
1518
aea13e97
AD
15192001-12-29 Akim Demaille <akim@epita.fr>
1520
1521 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
1522
931394cb
AD
15232001-12-29 Akim Demaille <akim@epita.fr>
1524
1525 * tests/actions.at (Mid-rule actions): Output on a single line
1526 instead of several.
1527
704a47c4
AD
15282001-12-29 Akim Demaille <akim@epita.fr>
1529
1530 * doc/bison.texinfo: Formatting changes.
1531
091e20bb
AD
15322001-12-29 Akim Demaille <akim@epita.fr>
1533
1534 Don't store the token defs in a muscle, just be ready to output it
1535 on command. Now possible via `symbols'. Fixes a memory leak.
1536
1537 * src/output.c (token_definitions_output): New.
1538 (output_parser, header_output): Use it.
1539 * src/reader.c (symbols_save): Remove.
1540
cce71710
AD
15412001-12-29 Akim Demaille <akim@epita.fr>
1542
1543 * src/bison.simple: Do not provide a default for YYSTYPE and
1544 YYLTYPE before the user's prologue. Otherwise it's hardly... a
1545 default.
1546
82c035a8
AD
15472001-12-29 Akim Demaille <akim@epita.fr>
1548
1549 Mid-rule actions are simply... ignored!
1550
1551 * src/reader.c (readgram): Be sure to attach mid-rule actions to
1552 the empty-rule associated to the dummy symbol, not to the host
1553 rule.
1554 * tests/actions.at (Mid-rule actions): New.
1555
8419d367
AD
15562001-12-29 Akim Demaille <akim@epita.fr>
1557
1558 Memory leak.
1559
1560 * src/reader.c (reader): Free grammar.
1561
375d5806
AD
15622001-12-29 Akim Demaille <akim@epita.fr>
1563
1564 Memory leak.
1565
1566 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
1567 since it allocates it for each state, although only one is needed.
1568 (allocate_storage): Do it here.
1569
f51cb8ff
AD
15702001-12-29 Akim Demaille <akim@epita.fr>
1571
1572 * src/options.h, src/options.c (create_long_option_table): Rename
1573 as...
1574 (long_option_table_new): this, with a clearer prototype.
1575 (percent_table): Remove, unused,
1576 * src/getargs.c (getargs): Adjust.
1577
29e88316
AD
15782001-12-29 Akim Demaille <akim@epita.fr>
1579
1580 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
1581 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
1582 as states.
1583
b9f71f19
AD
15842001-12-29 Akim Demaille <akim@epita.fr>
1585
1586 * src/lalr.c (build_relations): Rename `states' as `states1'.
1587 Sorry, I don't understand exactly what it is, no better name...
1588
1a2b5d37
AD
15892001-12-29 Akim Demaille <akim@epita.fr>
1590
1591 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
1592 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
1593 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
1594 as rules.
1595
1cca533e
AD
15962001-12-29 Akim Demaille <akim@epita.fr>
1597
1598 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
1599 ago.
1600
c03ae966
AD
16012001-12-29 Akim Demaille <akim@epita.fr>
1602
1603 * src/reader.c, src/reader.h (user_toknums): Remove.
1604 Adjust all users to use symbols[i]->user_token_number.
1605
5a670b1e
AD
16062001-12-29 Akim Demaille <akim@epita.fr>
1607
1608 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
1609 Adjust all users to use symbols[i]->prec or ->assoc.
1610
ad949da9
AD
16112001-12-29 Akim Demaille <akim@epita.fr>
1612
1613 * src/reader.c, src/reader.h (tags): Remove.
1614 Adjust all users to use symbols[i]->tag.
1615
0e78e603
AD
16162001-12-29 Akim Demaille <akim@epita.fr>
1617
1618 * src/gram.h, src/gram.c (symbols): New, similar to state_table
1619 and rule_table.
1620 * src/reader.c (packsymbols): Fill this table.
1621 Drop sprec.
1622 * src/conflicts.c (resolve_sr_conflict): Adjust.
1623 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
1624 single table.
1625 Use symbols[i]->tag instead of tags[i].
1626
213e640e
AD
16272001-12-29 Akim Demaille <akim@epita.fr>
1628
1629 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
1630 In addition, put a comment in there, to replace...
1631 * tests/regression.at (%union and C comments): Remove.
1632
e7b8bef1
AD
16332001-12-29 Akim Demaille <akim@epita.fr>
1634
1635 * tests/regression.at (Web2c Actions): Blindly move the actual
1636 output as expected output. The contents *seem* right to me, but I
1637 can't pretend reading perfectly parser tables... Nonetheless, all
1638 the other tests pass correctly, the table look OK, even though the
1639 presence of `$axiom' is to be noted: AFAICS it is useless (but
1640 harmless).
1641
b68e7744
AD
16422001-12-29 Akim Demaille <akim@epita.fr>
1643
1644 * src/reader.c (readgram): Don't add the rule 0 if there were no
1645 rules read. In other words, add it _after_ having performed
1646 grammar sanity checks.
1647 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
1648
78d5bae9
AD
16492001-12-29 Akim Demaille <akim@epita.fr>
1650
1651 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
1652 visible, and some states have now a different number.
1653
ff442794
AD
16542001-12-29 Akim Demaille <akim@epita.fr>
1655
1656 * src/reader.c (readgram): Bind the initial rule's lineno to that
1657 of the first rule.
1658 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
1659 (Solved SR Conflicts): Adjust rule 0's line number.
1660
610ab194
AD
16612001-12-29 Akim Demaille <akim@epita.fr>
1662
1663 Fix the `GAWK Grammar' failure.
1664
1665 * src/LR0.c (final_state): Initialize to -1 so that we do compute
1666 the reductions of the first state which was mistakenly confused
1667 with the final state because precisely final_state was initialized
1668 to 0.
1669 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
1670 now noticed by Bison.
1671 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
1672 have a reduction on $default.
1673
29d29c8f
AD
16742001-12-29 Akim Demaille <akim@epita.fr>
1675
1676 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
1677 rule line numbers.
1678 * src/closure.c (print_closure): Likewise.
1679 * src/derives.c (print_derives): Likewise.
1680 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
1681 now.
1682
7c6b64d0
AD
16832001-12-29 Akim Demaille <akim@epita.fr>
1684
1685 * src/lalr.c (lookaheads_print): New.
1686 (lalr): Call it when --trace-flag.
1687 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
1688 are dumped.
1689
3d4daee3
AD
16902001-12-29 Akim Demaille <akim@epita.fr>
1691
1692 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
1693 when walking through ritem, even via rule->rhs.
1694 * src/reduce.c (dump_grammar, useful_production, reduce_output)
1695 (useful_production, useless_nonterminals): Likewise.
1696 (reduce_grammar_tables): Likewise, plus update nritems.
1697 * src/nullable.c (set_nullable): Likewise.
1698 * src/lalr.c (build_relations): Likewise.
1699 * tests/sets.at (Nullable): Adjust.
1700 Fortunately, now, the $axiom is no longer nullable.
1701
9e7f6bbd
AD
17022001-12-29 Akim Demaille <akim@epita.fr>
1703
1704 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
1705 the 0-sentinel.
1706 * src/gram.c (ritem_longest_rhs): Likewise.
1707 * src/reduce.c (nonterminals_reduce): Likewise.
1708 * src/print_graph.c (print_graph): Likewise.
1709 * src/output.c (output_rule_data): Likewise.
1710 * src/nullable.c (set_nullable): Likewise.
1711
255ef638
AD
17122001-12-29 Akim Demaille <akim@epita.fr>
1713
1714 * src/output.c: Comment changes.
1715
0d8a7363
AD
17162001-12-27 Paul Eggert <eggert@twinsun.com>
1717
1718 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
1719 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
1720 Sparc, as they were causing more porting problems than the
1721 (minor) performance improvement was worth.
1722
1723 Also, catch up with 1.31's YYSTD.
1724
3db472b9
AD
17252001-12-27 Akim Demaille <akim@epita.fr>
1726
1727 * src/output.c (output_gram): Rely on nritems, not the
1728 0-sentinel. See below.
1729 Use -1 as separator, not 0.
1730 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
1731 Rely on -1 as separator in yyrhs, instead of 0.
1732 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
1733 twice `Now at end of input', therefore there are two lines less to
1734 expect.
1735
b365aa05
AD
17362001-12-27 Akim Demaille <akim@epita.fr>
1737
1738 * tests/regression.at (Unresolved SR Conflicts):
1739 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
1740 below.
1741
30171f79
AD
17422001-12-27 Akim Demaille <akim@epita.fr>
1743
1744 * src/LR0.c (new_state): Recognize the final state by the fact it
1745 is reached by eoftoken.
1746 (insert_start_shifting_state, insert_eof_shifting_state)
1747 (insert_accepting_state, augment_automaton): Remove, since now
1748 these states are automatically computed from the initial state.
1749 (generate_states): Adjust.
1750 * src/print.c: When reporting a rule number to the user, substract
1751 1, so that the axiom rule is rule 0, and the first user rule is 1.
1752 * src/reduce.c: Likewise.
1753 * src/print_graph.c (print_core): For the time being, just as for
1754 the report, depend upon --trace-flags to dump the full set of
1755 items.
1756 * src/reader.c (readgram): Once the grammar read, insert the rule
1757 0: `$axiom: START-SYMBOL $'.
1758 * tests/set.at: Adjust: rule 0 is now displayed, and since the
1759 number of the states has changed (the final state is no longer
1760 necessarily the last), catch up.
1761
75142d45
AD
17622001-12-27 Akim Demaille <akim@epita.fr>
1763
1764 Try to make the use of the eoftoken valid. Given that its value
1765 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1766 is used instead of > 0 where appropriate, (ii), depend upon nritems
1767 instead of the 0-sentinel.
1768
1769 * src/gram.h, src/gram.c (nritems): New.
1770 Expected to be duplication of nitems, but for the time being...
1771 * src/reader.c (packgram): Assert nritems and nitems are equal.
1772 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1773 * src/closure.c (print_closure, print_fderives): Likewise.
1774 * src/gram.c (ritem_print): Likewise.
1775 * src/print.c (print_core, print_grammar): Likewise.
1776 * src/print_graph.c: Likewise.
1777
b7c49edf
AD
17782001-12-27 Akim Demaille <akim@epita.fr>
1779
1780 * src/main.c (main): If there are complains after grammar
1781 reductions, then output the report anyway if requested, then die.
1782 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1783 * src/reader.c (eoftoken): New.
1784 (parse_token_decl): If the token being defined has value `0', it
1785 is the eoftoken.
1786 (packsymbols): No longer hack `tags' to insert `$' by hand.
1787 Be sure to preserve the value of the eoftoken.
1788 (reader): Make sure eoftoken is defined.
1789 Initialize nsyms to 0: now eoftoken is created just like the others.
1790 * src/print.c (print_grammar): Don't special case the eof token.
1791 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1792 lie anyway, albeit pleasant.
1793 * tests/calc.at: Exercise error messages with eoftoken.
1794 Change the grammar so that empty input is invalid.
1795 Adjust expectations.
1796 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1797
ec2da99f
AD
17982001-12-27 Akim Demaille <akim@epita.fr>
1799
1800 * configure.in: Check the protos of strchr ans strspn.
1801 Replace strchr if needed.
1802 * src/system.h: Provide the protos of strchr, strspn and memchr if
1803 missing.
1804 * lib/strchr.c: New.
1805 * src/reader.c (symbols_save): Use strchr.
1806
8adfa272
AD
18072001-12-27 Akim Demaille <akim@epita.fr>
1808
1809 * src/print.c, src/print_graph.c (escape): New.
1810 Use it to quote the TAGS outputs.
1811 * src/print_graph.c (print_state): Now errors are in red, and
1812 reductions in green.
1813 Prefer high to wide: output the state number on a line of its own.
1814
80dac38c
AD
18152001-12-27 Akim Demaille <akim@epita.fr>
1816
1817 * src/state.h, src/state.c (reductions_new): New.
1818 * src/LR0.c (set_state_table): Let all the states have a
1819 `reductions', even if reduced to 0.
1820 (save_reductions): Adjust.
1821 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1822 * src/print.c (print_reductions, print_actions): Adjust.
1823 * src/output.c (action_row): Adjust.
1824
2cec70b9
AD
18252001-12-27 Akim Demaille <akim@epita.fr>
1826
1827 * src/state.h, src/state.c (errs_new, errs_dup): New.
1828 * src/LR0.c (set_state_table): Let all the states have an errs,
1829 even if reduced to 0.
1830 * src/print.c (print_errs, print_reductions): Adjust.
1831 * src/output.c (output_actions, action_row): Adjust.
1832 * src/conflicts.c (resolve_sr_conflict): Adjust.
1833
13ca549a
AD
18342001-12-27 Akim Demaille <akim@epita.fr>
1835
1836 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1837
5092aba5
AD
18382001-12-27 Akim Demaille <akim@epita.fr>
1839
1840 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1841 * src/print.c: here.
1842 (lookaheadset, shiftset): New, used as additional storage by
1843 print_reductions.
1844 (print_results): Adjust.
1845 (print_shifts, print_gotos, print_errs): New, extracted from...
1846 (print_actions): here.
1847 * src/print_graph.c (print_actions): Remove dead code.
1848
11e2beca
AD
18492001-12-27 Akim Demaille <akim@epita.fr>
1850
1851 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1852 `$n' and `@n'.
1853
dac3c910
AD
18542001-12-27 Akim Demaille <akim@epita.fr>
1855
1856 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1857 (build_relations): Adjust.
1858
d0b0fefa
AD
18592001-12-27 Akim Demaille <akim@epita.fr>
1860
1861 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1862 duplication.
1863
adc8c848
AD
18642001-12-27 Akim Demaille <akim@epita.fr>
1865
1866 * src/reader.c (packgram): Catch nitems overflows.
1867
14d293ac
AD
18682001-12-27 Akim Demaille <akim@epita.fr>
1869
1870 * src/files.c, src/files.h (guard_obstack): Remove.
1871 * src/output.c (output): Adjust.
1872 * src/reader.c (parse_braces): New, factoring...
1873 (copy_action, copy_guard): these two which are renamed as...
1874 (parse_action, parse_guard): these.
1875 As a voluntary consequence, using braces around guards is now
1876 mandatory.
1877
f499b062
AD
18782001-12-27 Akim Demaille <akim@epita.fr>
1879
1880 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1881 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1882 members.
1883 (symbol_list_new): Adjust.
1884 (copy_action): action_line is the first line, not the last.
1885 (copy_guard): Just as for actions, store the `action' only, not
1886 the switch/case/break flesh.
1887 Don't parse the user action that might follow the guard, let...
1888 (readgram): do it, i.e., now, there can be an action after a
1889 guard.
1890 In other words the guard is just explicitly optional.
1891 (packgram): Adjust.
1892 * src/output.c (guards_output): New.
1893 (output_parser): Call it when needed.
1894 (output): Also free the guard and attrs obstacks.
1895 * src/files.c, src/files.h (obstack_save): Remove.
1896 (output_files): Remove.
1897 As a result, if one needs the former `.act' file, using an
1898 appropriate skeleton which requires actions and guards is now
1899 required.
1900 * src/main.c (main): Adjust.
1901 * tests/semantic.at: New.
1902 * tests/regression.at: Use `input.y' as input file name.
1903 Avoid 8+3 problems by requiring input.c when the test needs the
1904 parser.
1905
d945f5cd
AD
19062001-12-27 Akim Demaille <akim@epita.fr>
1907
1908 * src/reader.c (symbol_list_new): Be sure to initialize all the
1909 fields.
1910
d200e455
AD
19112001-12-27 Akim Demaille <akim@epita.fr>
1912
1913 All the hacks using a final pseudo state are now useless.
1914
1915 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1916 * src/lalr.c (nLA): New.
1917 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1918 instead of lookaheadsp from the pseudo state (nstate + 1).
1919
f9507c28
AD
19202001-12-27 Akim Demaille <akim@epita.fr>
1921
1922 * src/output.c (action_row, token_actions): Use a state_t instead
1923 of a integer, and nlookaheads instead of the following state's
1924 lookaheadsp.
1925
065fbd27
AD
19262001-12-27 Akim Demaille <akim@epita.fr>
1927
1928 * src/conflicts.c (log_resolution, flush_shift)
1929 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1930 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1931 (conflicts_print, print_reductions): Use a state_t instead of an
1932 integer when referring to a state.
1933 As much as possible, depend upon nlookaheads, instead of the
1934 `lookaheadsp' member of the following state (since lookaheads of
1935 successive states are successive, the difference between state n + 1
1936 and n served as the number of lookaheads for state n).
1937 * src/lalr.c (add_lookback_edge): Likewise.
1938 * src/print.c (print_core, print_actions, print_state)
1939 (print_results): Likewise.
1940 * src/print_graph.c (print_core, print_actions, print_state)
1941 (print_graph): Likewise.
1942 * src/conflicts.h: Adjust.
1943
1b177bd7
AD
19442001-12-27 Akim Demaille <akim@epita.fr>
1945
1946 * src/bison.hairy: Formatting/comment changes.
1947 ANSIfy.
1948 Remove `register' indications.
1949 Add plenty of `static'.
1950
7742ddeb
AD
19512001-12-27 Akim Demaille <akim@epita.fr>
1952
1953 * src/output.c (prepare): Drop the muscle `ntbase' which
1954 duplicates ntokens.
1955 * src/bison.simple: Formatting/comment changes.
1956 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1957 is an undocumented synonym.
1958
1fa14068
AD
19592001-12-22 Akim Demaille <akim@epita.fr>
1960
1961 * src/output.c (output_table_data): Change the prototype to use
1962 `int' for array ranges: some invocations do pass an int, not a
1963 short.
1964 Reported by Wayne Green.
1965
b9752825
AD
19662001-12-22 Akim Demaille <akim@epita.fr>
1967
1968 Some actions of web2c.y are improperly triggered.
1969 Reported by Mike Castle.
1970
1971 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1972 * tests/regression.at (Web2c): Rename as...
1973 (Web2c Report): this.
1974 (Web2c Actions): New.
1975
776209d6
AD
19762001-12-22 Akim Demaille <akim@epita.fr>
1977
1978 Reductions in web2c.y are improperly reported.
1979 Reported by Mike Castle.
1980
1981 * src/conflicts.c (print_reductions): Fix.
1982 * tests/regression.at (Web2c): New.
1983
275fc3ad
AD
19842001-12-18 Akim Demaille <akim@epita.fr>
1985
1986 Some host fail on `assert (!"foo")', which expands to
1987 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1988 Reported by Nelson Beebee.
1989
1990 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1991 `#define it_succeeded 0' and `assert (it_succeeded)'.
1992
897668ee
MA
19932001-12-17 Marc Autret <autret_m@epita.fr>
1994
1995 * src/bison.simple: Don't hard code the skeleton line and filename.
1996 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1997 New line counter 'skeleton_line' (skeleton-line muscle).
1998
ab3399e0
PE
19992001-12-17 Paul Eggert <eggert@twinsun.com>
2000
2001 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
2002 YYDEBUG must be defined to a nonzero value.
2003
2004 * src/bison.simple (yytname): Do not assume that the user defines
2005 YYDEBUG to a properly parenthesized expression.
2006
3877f72b
AD
20072001-12-17 Akim Demaille <akim@epita.fr>
2008
2009 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
2010 nlookaheads is a new member.
2011 Adjust all users.
2012 * src/lalr.h (nlookaheads): Remove this orphan declaration.
2013 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
2014 state.
776209d6 2015
331dbc1b
AD
20162001-12-17 Akim Demaille <akim@epita.fr>
2017
2018 * src/files.h, src/files.c (open_files, close_files): Remove.
2019 * src/main.c (main): Don't open/close files, nor invoke lex_free,
2020 let...
2021 * src/reader.c (reader): Do it.
776209d6 2022
be750e4c
AD
20232001-12-17 Akim Demaille <akim@epita.fr>
2024
2025 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 2026
709ae8c6
AD
20272001-12-17 Akim Demaille <akim@epita.fr>
2028
2029 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
2030 (flush_reduce): New.
2031 (resolve_sr_conflict): Adjust.
776209d6 2032
f87685c3
AD
20332001-12-17 Akim Demaille <akim@epita.fr>
2034
2035 * src/output.c (output_obstack): Be static and rename as...
2036 (format_obstack): this, to avoid any confusion with files.c's
2037 output_obstack.
2038 * src/reader.h (muscle_obstack): Move to...
2039 * src/output.h: here, since it's defined in output.c.
2040
837491d8
AD
20412001-12-17 Akim Demaille <akim@epita.fr>
2042
2043 * src/output.c (action_row, save_column, default_goto)
2044 (sort_actions, matching_state, pack_vector): Better variable
2045 locality.
2046
796d61fb
AD
20472001-12-17 Akim Demaille <akim@epita.fr>
2048
2049 * src/output.c: Various formatting changes.
776209d6 2050
64d15509
AD
20512001-12-17 Akim Demaille <akim@epita.fr>
2052
2053 * src/files.c (output_files): Free the output_obstack.
2054 * src/main.c (main): Call print and print_graph conditionally.
2055 * src/print.c (print): Work unconditionally.
2056 * src/print_graph.c (print_graph): Work unconditionally.
2057 * src/conflicts.c (log_resolution): Output only if verbose_flag.
2058
fbc8ecb7
MA
20592001-12-16 Marc Autret <autret_m@epita.fr>
2060
2061 * src/output.c (actions_output): Fix. When we use %no-lines,
2062 there is one less line per action.
2063
f0440388
MA
20642001-12-16 Marc Autret <autret_m@epita.fr>
2065
2066 * src/bison.simple: Remove a useless #line directive.
2067 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
2068 * src/output.c (get_lines_number): New.
776209d6 2069 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
2070 output muscles.
2071 Fix line numbering.
2072 (actions_output): Computes the number of lines taken by actions.
2073 (output_master_parser): Insert new skeleton which is the name of
2074 the output parser file name.
2075
a79986b8
MA
20762001-12-15 Marc Autret <autret_m@epita.fr>
2077
2078 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
2079
4ec8e00f
MA
20802001-12-15 Marc Autret <autret_m@epita.fr>
2081
2082 * src/output.c (output_gram): Keep track of the hairy one.
2083
1a4648ff
AD
20842001-12-15 Akim Demaille <akim@epita.fr>
2085
2086 Make `make distcheck' work.
2087
2088 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
2089 system.h which uses libgettext.h.
2090
9c2c67e6
AD
20912001-12-15 Akim Demaille <akim@epita.fr>
2092
2093 * src/nullable.c (set_nullable): Useless rules must be skipped,
2094 otherwise, since we range over their symbols, we might look at a
2095 nonterminal which no longer ``exists'', i.e., it is not counted in
2096 `nvars', hence we overflow our arrays.
2097
93ede233
AD
20982001-12-15 Akim Demaille <akim@epita.fr>
2099
2100 The header can also be produced directly, without any obstack!
2101 Yahoo!
2102
2103 * src/files.c, src/files.h (defines_obstack): Remove.
2104 (compute_header_macro): Global.
2105 (defines_obstack_save): Remove.
2106 * src/reader.c (parse_union_decl): No longer output to
2107 defines_obstack: its content can be found in the `stype' muscle
2108 anyway.
2109 (output_token_translations): Merge into...
2110 (symbols_output): this.
2111 Rename as...
2112 (symbols_save): this.
2113 (reader): Adjust.
2114 * src/output.c (header_output): New.
2115 (output): Call it.
2116
2666f928
AD
21172001-12-15 Akim Demaille <akim@epita.fr>
2118
2119 * src/reader.c (parse_union_decl): Instead of handling two obstack
2120 simultaneously, use one to define the `stype' muscle, and use the
2121 value of the latter to fill defines_obstack.
2122 (copy_comment): Remove.
2123 (copy_comment2): Work for a single obstack.
2124 Rename as...
2125 (copy_comment): this.
2126
428046f8
AD
21272001-12-15 Akim Demaille <akim@epita.fr>
2128
2129 * src/lex.c, src/lex.h (xgetc): No longer static.
2130 * src/reader.c (parse_union_decl): Revamp.
2131
ea52d706
AD
21322001-12-15 Akim Demaille <akim@epita.fr>
2133
2134 Still making progress in separating Bison into (i) input, (ii)
2135 process, (iii) output: now we can directly output the parser file
2136 without using table_obstack at all.
2137
2138 * src/files.c, src/files.h (table_obstack): Bye bye.
2139 (parser_file_name): New.
2140 * src/files.c (compute_output_file_names): Compute it.
2141 * src/output.c (actions_output, output_parser)
2142 (output_master_parser): To a file instead of an obstack.
2143
3f96f4dc
AD
21442001-12-15 Akim Demaille <akim@epita.fr>
2145
2146 Attach actions to rules, instead of pre-outputting them to
2147 actions_obstack.
2148
2149 * src/gram.h (rule_t): action and action_line are new members.
2150 * src/reader.c (symbol_list): Likewise.
2151 (copy_action): Save the actions within the rule.
2152 (packgram): Save them in rule_table.
2153 * src/output.c (actions_output): New.
2154 (output_parser): Use it on `%%actions'.
2155 (output_rule_data): Don't free rule_table.
2156 (output): Do it.
2157 (prepare): Don't save the `action' muscle.
2158 * src/bison.simple: s/%%action/%%actions/.
2159
51576fb3
AD
21602001-12-15 Akim Demaille <akim@epita.fr>
2161
2162 * src/reader.c (copy_action): When --yacc, don't append a `;'
2163 to the user action: let it fail if lacking.
dee049eb 2164 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 2165
2648a72d
AD
21662001-12-14 Akim Demaille <akim@epita.fr>
2167
2168 * src/lex.c (literalchar): Simply return the char you decoded, non
2169 longer mess around with obstacks and int pointers.
2170 Adjust all callers.
2171
92790e5b
AD
21722001-12-14 Akim Demaille <akim@epita.fr>
2173
2174 * src/lex.c (literalchar): Don't escape the special characters,
2175 just decode them, and keep them as char (before, eol was output as
2176 the 2 char string `\n' etc.).
2177 * src/output.c (output_rule_data): Use quotearg to output the
2178 token strings.
2179
927c1557
PE
21802001-12-13 Paul Eggert <eggert@twinsun.com>
2181
2182 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
2183 Do not infringe on the global user namespace when using C++.
2184 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
2185 All uses of `fprintf' and `stderr' changed.
2186
2187 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
2188
ed8e1f68
AD
21892001-12-13 Akim Demaille <akim@epita.fr>
2190
2191 The computation of nullable is broken: it doesn't handle empty
2192 RHS's properly.
2193
2194 * tests/torture.at (GNU AWK Grammar): New.
2195 * tests/sets.at (Nullable): New.
2196 * src/nullable.c (set_nullable): Instead of blindly looping over
2197 `ritems', loop over the rules, and then over their rhs's.
2198
2199 Work around Autotest bugs.
2200
2201 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
2202 frame, because Autotest understand lines starting with a `+' as
2203 traces from the shell. Then, they are not processed properly.
2204 Admittedly an Autotest bug, but we don't have time to wait for
2205 Autotest to catch up.
2206 * tests/regression.at (Broken Closure): Adjust to the new table
2207 frames.
2208 Move to...
2209 * tests/sets.at: here.
2210
cb581495
AD
22112001-12-13 Akim Demaille <akim@epita.fr>
2212
2213 * src/closure.c (closure): Use nrules instead of playing tricks
2214 with BITS_PER_WORD.
2215
2e729273
AD
22162001-12-13 Akim Demaille <akim@epita.fr>
2217
2218 * src/print.c (print_actions): Output the handling of `$' as the
2219 traces do: shifting the token EOF. Before EOF was treated as a
2220 nonterminal.
2221 * tests/regression.at: Adjust some tests.
2222 * src/print_graph.c (print_core): Complete the set of items via
2223 closure. The next-to-final and final states are still unsatisfying,
2224 but that's to be addressed elsewhere.
2225 No longer output the rule numbers, but do output the state number.
2226 A single loop for the shifts + gotos is enough, but picked a
2227 distinct color for each.
2228 (print_graph): Initialize and finalize closure.
2229
107f7dfb
AD
22302001-12-13 Akim Demaille <akim@epita.fr>
2231
2232 * src/reader.c (readgram): Remove dead code, an strip useless
2233 braces.
2234 (get_type): Remove, unused.
2235
9b53a24f
AD
22362001-12-12 Akim Demaille <akim@epita.fr>
2237
2238 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
2239 on that of lib/error.c.
2240
dbfb6dcd
AD
22412001-12-12 Akim Demaille <akim@epita.fr>
2242
2243 Some hosts don't like `/' in includes.
2244
2245 * src/system.h: Include libgettext.h without qualifying the path.
2246 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
2247 $(top_srcdir).
2248
c25fb648
MA
22492001-12-11 Marc Autret <autret_m@epita.fr>
2250
2251 * src/output.c (output_parser): Remove useless muscle.
2252
710ddc4f
MA
22532001-12-11 Marc Autret <autret_m@epita.fr>
2254
2255 * src/bison.simple: Remove #line just before %%epilogue. It
2256 is now handled in ...
2257 * src/reader.c (read_additionnal_code): Add the output of a
2258 #line for the epilogue.
2259
e83d80b8
MA
22602001-12-10 Marc Autret <autret_m@epita.fr>
2261
927c1557 2262 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
2263 replace precedent remove.
2264 * src/bison.simple: Remove #line before %%prologue because
2265 %%input-line is wrong at this time.
2266
971d5158
MA
22672001-12-10 Marc Autret <autret_m@epita.fr>
2268
2269 * src/reader.c (symbols_output): Clean up.
927c1557 2270 * src/output.c (output_gram, output): Clean up.
971d5158 2271
5edafffd
AD
22722001-12-10 Akim Demaille <akim@epita.fr>
2273
2274 * src/lalr.c (initialize_lookaheads): New. Extracted from...
2275 * src/LR0.c (set_state_table): here.
2276 * src/lalr.c (lalr): Call it.
2277
0279f8e9
AD
22782001-12-10 Akim Demaille <akim@epita.fr>
2279
2280 * src/state.h (shifts): Remove the `number' member: shifts are
2281 attached to state, hence no longer need to be labelled with a
2282 state number.
2283
190c4f5f
AD
22842001-12-10 Akim Demaille <akim@epita.fr>
2285
2286 Now that states have a complete set of members, the linked list of
2287 shifts is useless: just fill directly the state's shifts member.
2288
2289 * src/state.h (shifts): Remove the `next' member.
2290 * src/LR0.c (first_state, last_state): Remove.
2291 Adjust the callers.
2292 (augment_automaton): Don't look for the shifts that must be added
2293 a shift on EOF: it is those of the state we looked for! But now,
2294 since shifts are attached, it is no longer needed to looking
2295 merely by its id: its number.
2296
2a73b93d
AD
22972001-12-10 Akim Demaille <akim@epita.fr>
2298
2299 * src/LR0.c (augment_automaton): Better variable locality.
2300 Remove an impossible branch: if there is a state corresponding to
2301 the start symbol being shifted, then there is shift for the start
2302 symbol from the initial state.
2303
74392f6a
AD
23042001-12-10 Akim Demaille <akim@epita.fr>
2305
2306 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
2307 only when appropriate: when insert_start_shifting_state' is not
2308 invoked.
2309 * tests/regression.at (Rule Line Numbers): Adjust.
2310
37c82725
AD
23112001-12-10 Akim Demaille <akim@epita.fr>
2312
2313 * src/LR0.c (augment_automaton): Now that all states have shifts,
2314 merge the two cases addition shifts to the initial state.
2315
6a164e0c
AD
23162001-12-10 Akim Demaille <akim@epita.fr>
2317
2318 * src/lalr.c (set_state_table): Move to...
2319 * src/LR0.c: here.
2320 * src/lalr.c (lalr): Don't call it...
2321 * src/LR0.c (generate_states): do it.
2322 * src/LR0.h (first_state): Remove, only the table is used.
2323
7215de24
AD
23242001-12-10 Akim Demaille <akim@epita.fr>
2325
2326 * src/LR0.h (first_shift, first_reduction): Remove.
2327 * src/lalr.c: Don't use first_shift: find shifts through the
2328 states.
2329
80e25d4d
AD
23302001-12-10 Akim Demaille <akim@epita.fr>
2331
2332 * src/LR0.c: Attach shifts to states as soon as they are
2333 computed.
2334 * src/lalr.c (set_state_table): Instead of assigning shifts to
2335 state, just assert that the mapping was properly done.
2336
0ab3728b
AD
23372001-12-10 Akim Demaille <akim@epita.fr>
2338
2339 * src/LR0.c (insert_start_shift): Rename as...
2340 (insert_start_shifting_state): this.
2341 (insert_eof_shifting_state, insert_accepting_state): New.
2342 (augment_automaton): Adjust.
2343 Better locality of the variables.
2344 When looking if the start_symbol is shifted from the initial
2345 state, using `while (... symbol != start_symbol ...)' sounds
2346 better than `while (... symbol < start_symbol ...)': If fail
2347 to see how the order between symbols could be relevant!
2348
78af9bbc
AD
23492001-12-10 Akim Demaille <akim@epita.fr>
2350
2351 * src/getargs.h: Don't declare `spec_name_prefix' and
2352 `spec_file_prefix', declared by src/files.h.
2353 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
2354 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
2355 * src/output.c (prepare): Adjust.
2356 * src/reader.c (symbols_output): Likewise.
2357 * src/vmsgetargs.c: Vaguely adjust, but who cares?
2358
bdef2a41
AD
23592001-12-10 Akim Demaille <akim@epita.fr>
2360
2361 * src/muscle_tab.c (muscle_init): NULL is a better default than
2362 `"0"'.
2363
3735969c
AD
23642001-12-10 Akim Demaille <akim@epita.fr>
2365
2366 * src/reader.c (reader): Calling symbols_output once is enough.
2367
49701457
AD
23682001-12-10 Akim Demaille <akim@epita.fr>
2369
2370 Now that states have a complete set of members, the linked list of
2371 reductions is useless: just fill directly the state's reductions
2372 member.
2373
2374 * src/state.h (struct reductions): Remove member `number' and
2375 `next'.
2376 * src/LR0.c (first_reduction, last_reduction): Remove.
2377 (save_reductions): Don't link the new reductions, store them in
2378 this_state.
2379 * src/lalr.c (set_state_table): No need to attach reductions to
2380 states, it's already done.
2381 * src/output.c (output_actions): No longer free the shifts, then
2382 the reductions, then the states: free all the states and their
2383 members.
2384
0edad749
AD
23852001-12-10 Akim Demaille <akim@epita.fr>
2386
2387 * src/options.c (OPTN, DRTV, BOTH): New.
2388 (option_table): Use them.
2389
0edad749
AD
2390 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
2391 the job of system.h.
2392 * src/options.c: Don't include stdio.h and xalloc.h for the same
2393 reasons.
2394
5449dd0f
AD
23952001-12-10 Akim Demaille <akim@epita.fr>
2396
2397 * src/output.c (output, prepare): Make sure the values of the
2398 muscles `action' and `prologue' are 0-terminated.
2399
a870c567
AD
24002001-12-10 Akim Demaille <akim@epita.fr>
2401
2402 Clean up GCC warnings.
2403
2404 * src/reader.c (copy_action): `buf' is not used.
2405 (parse_skel_decl): Be static.
2406 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
2407 * src/options.h (create_long_option_table): Have a real prototype.
2408 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
2409 (hash_delete_at): Return const void *.
2410 Adjust casts to preserve the const.
2411
80df8768
AD
24122001-12-10 Akim Demaille <akim@epita.fr>
2413
2414 * configure.in: Require 2.52g.
2415 M4 is not needed, but AUTOM4TE is.
2416 * m4/m4.m4: Remove.
2417 * tests/Makefile.am: Adjust.
2418
f693ad14
AD
24192001-12-10 Akim Demaille <akim@epita.fr>
2420
2421 One structure for states is enough, even though theoretically
2422 there are LR(0) states and LALR(1) states.
2423
2424 * src/lalr.h (state_t): Remove.
2425 (state_table): Be state_t **, not state_t *.
2426 * src/state.h (core, CORE_ALLOC): Rename as...
2427 (state_t, STATE_ALLOC): this.
2428 Add the LALR(1) members: shifts, reductions, errs.
2429 * src/LR0.c (state_table): Rename as...
2430 (state_hash): this, to avoid name clashes with the global
2431 `state_table'.
2432 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
2433 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
2434
74ffbcb6
AD
24352001-12-10 Akim Demaille <akim@epita.fr>
2436
2437 Bison dumps core on bash.y.
2438 Reported by Pascal Bart.
2439
2440 * src/warshall.c (bitmatrix_print): New.
2441 (TC): Use it.
2442 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
2443 j must be the outer loop.
2444 * tests/regression.at (Broken Closure): New.
2445
07708e19
AD
24462001-12-05 Akim Demaille <akim@epita.fr>
2447
2448 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
2449 its argument.
2450