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