]>
Commit | Line | Data |
---|---|---|
255ef638 AD |
1 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2 | ||
3 | * src/output.c: Comment changes. | |
4 | ||
0d8a7363 AD |
5 | 2001-12-27 Paul Eggert <eggert@twinsun.com> |
6 | ||
7 | * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special | |
8 | cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and | |
9 | Sparc, as they were causing more porting problems than the | |
10 | (minor) performance improvement was worth. | |
11 | ||
12 | Also, catch up with 1.31's YYSTD. | |
13 | ||
3db472b9 AD |
14 | 2001-12-27 Akim Demaille <akim@epita.fr> |
15 | ||
16 | * src/output.c (output_gram): Rely on nritems, not the | |
17 | 0-sentinel. See below. | |
18 | Use -1 as separator, not 0. | |
19 | * src/bison.simple (yyparse): Subtract 1 to the rule numbers. | |
20 | Rely on -1 as separator in yyrhs, instead of 0. | |
21 | * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue | |
22 | twice `Now at end of input', therefore there are two lines less to | |
23 | expect. | |
24 | ||
b365aa05 AD |
25 | 2001-12-27 Akim Demaille <akim@epita.fr> |
26 | ||
27 | * tests/regression.at (Unresolved SR Conflicts): | |
28 | (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes | |
29 | below. | |
30 | ||
30171f79 AD |
31 | 2001-12-27 Akim Demaille <akim@epita.fr> |
32 | ||
33 | * src/LR0.c (new_state): Recognize the final state by the fact it | |
34 | is reached by eoftoken. | |
35 | (insert_start_shifting_state, insert_eof_shifting_state) | |
36 | (insert_accepting_state, augment_automaton): Remove, since now | |
37 | these states are automatically computed from the initial state. | |
38 | (generate_states): Adjust. | |
39 | * src/print.c: When reporting a rule number to the user, substract | |
40 | 1, so that the axiom rule is rule 0, and the first user rule is 1. | |
41 | * src/reduce.c: Likewise. | |
42 | * src/print_graph.c (print_core): For the time being, just as for | |
43 | the report, depend upon --trace-flags to dump the full set of | |
44 | items. | |
45 | * src/reader.c (readgram): Once the grammar read, insert the rule | |
46 | 0: `$axiom: START-SYMBOL $'. | |
47 | * tests/set.at: Adjust: rule 0 is now displayed, and since the | |
48 | number of the states has changed (the final state is no longer | |
49 | necessarily the last), catch up. | |
50 | ||
75142d45 AD |
51 | 2001-12-27 Akim Demaille <akim@epita.fr> |
52 | ||
53 | Try to make the use of the eoftoken valid. Given that its value | |
54 | is 0 which was also used as a sentinel in ritem, (i) make sure >= 0 | |
55 | is used instead of > 0 where appropriate, (ii), depend upon nritems | |
56 | instead of the 0-sentinel. | |
57 | ||
58 | * src/gram.h, src/gram.c (nritems): New. | |
59 | Expected to be duplication of nitems, but for the time being... | |
60 | * src/reader.c (packgram): Assert nritems and nitems are equal. | |
61 | * src/LR0.c (allocate_itemsets, new_itemsets): Adjust. | |
62 | * src/closure.c (print_closure, print_fderives): Likewise. | |
63 | * src/gram.c (ritem_print): Likewise. | |
64 | * src/print.c (print_core, print_grammar): Likewise. | |
65 | * src/print_graph.c: Likewise. | |
66 | ||
b7c49edf AD |
67 | 2001-12-27 Akim Demaille <akim@epita.fr> |
68 | ||
69 | * src/main.c (main): If there are complains after grammar | |
70 | reductions, then output the report anyway if requested, then die. | |
71 | * src/symtab.c (bucket_new): Initialize `value' to -1, not 0. | |
72 | * src/reader.c (eoftoken): New. | |
73 | (parse_token_decl): If the token being defined has value `0', it | |
74 | is the eoftoken. | |
75 | (packsymbols): No longer hack `tags' to insert `$' by hand. | |
76 | Be sure to preserve the value of the eoftoken. | |
77 | (reader): Make sure eoftoken is defined. | |
78 | Initialize nsyms to 0: now eoftoken is created just like the others. | |
79 | * src/print.c (print_grammar): Don't special case the eof token. | |
80 | * src/regression.at: Adjust: `$' has value 0, not -1, which was a | |
81 | lie anyway, albeit pleasant. | |
82 | * tests/calc.at: Exercise error messages with eoftoken. | |
83 | Change the grammar so that empty input is invalid. | |
84 | Adjust expectations. | |
85 | When yyungeting, be sure to use a valid yylloc: use last_yylloc. | |
86 | ||
ec2da99f AD |
87 | 2001-12-27 Akim Demaille <akim@epita.fr> |
88 | ||
89 | * configure.in: Check the protos of strchr ans strspn. | |
90 | Replace strchr if needed. | |
91 | * src/system.h: Provide the protos of strchr, strspn and memchr if | |
92 | missing. | |
93 | * lib/strchr.c: New. | |
94 | * src/reader.c (symbols_save): Use strchr. | |
95 | ||
8adfa272 AD |
96 | 2001-12-27 Akim Demaille <akim@epita.fr> |
97 | ||
98 | * src/print.c, src/print_graph.c (escape): New. | |
99 | Use it to quote the TAGS outputs. | |
100 | * src/print_graph.c (print_state): Now errors are in red, and | |
101 | reductions in green. | |
102 | Prefer high to wide: output the state number on a line of its own. | |
103 | ||
80dac38c AD |
104 | 2001-12-27 Akim Demaille <akim@epita.fr> |
105 | ||
106 | * src/state.h, src/state.c (reductions_new): New. | |
107 | * src/LR0.c (set_state_table): Let all the states have a | |
108 | `reductions', even if reduced to 0. | |
109 | (save_reductions): Adjust. | |
110 | * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust. | |
111 | * src/print.c (print_reductions, print_actions): Adjust. | |
112 | * src/output.c (action_row): Adjust. | |
113 | ||
2cec70b9 AD |
114 | 2001-12-27 Akim Demaille <akim@epita.fr> |
115 | ||
116 | * src/state.h, src/state.c (errs_new, errs_dup): New. | |
117 | * src/LR0.c (set_state_table): Let all the states have an errs, | |
118 | even if reduced to 0. | |
119 | * src/print.c (print_errs, print_reductions): Adjust. | |
120 | * src/output.c (output_actions, action_row): Adjust. | |
121 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
122 | ||
13ca549a AD |
123 | 2001-12-27 Akim Demaille <akim@epita.fr> |
124 | ||
125 | * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL. | |
126 | ||
5092aba5 AD |
127 | 2001-12-27 Akim Demaille <akim@epita.fr> |
128 | ||
129 | * src/conflicts.c, src/conflicts.h (print_reductions): Move to... | |
130 | * src/print.c: here. | |
131 | (lookaheadset, shiftset): New, used as additional storage by | |
132 | print_reductions. | |
133 | (print_results): Adjust. | |
134 | (print_shifts, print_gotos, print_errs): New, extracted from... | |
135 | (print_actions): here. | |
136 | * src/print_graph.c (print_actions): Remove dead code. | |
137 | ||
11e2beca AD |
138 | 2001-12-27 Akim Demaille <akim@epita.fr> |
139 | ||
140 | * src/reader.c (copy_dollar, copy_at): Better checking of `n' in | |
141 | `$n' and `@n'. | |
142 | ||
dac3c910 AD |
143 | 2001-12-27 Akim Demaille <akim@epita.fr> |
144 | ||
145 | * src/lalr.c (add_lookback_edge): Use state_t instead of ints. | |
146 | (build_relations): Adjust. | |
147 | ||
d0b0fefa AD |
148 | 2001-12-27 Akim Demaille <akim@epita.fr> |
149 | ||
150 | * src/lalr.c (set_goto_map): Remove a wrong but benign loop | |
151 | duplication. | |
152 | ||
adc8c848 AD |
153 | 2001-12-27 Akim Demaille <akim@epita.fr> |
154 | ||
155 | * src/reader.c (packgram): Catch nitems overflows. | |
156 | ||
14d293ac AD |
157 | 2001-12-27 Akim Demaille <akim@epita.fr> |
158 | ||
159 | * src/files.c, src/files.h (guard_obstack): Remove. | |
160 | * src/output.c (output): Adjust. | |
161 | * src/reader.c (parse_braces): New, factoring... | |
162 | (copy_action, copy_guard): these two which are renamed as... | |
163 | (parse_action, parse_guard): these. | |
164 | As a voluntary consequence, using braces around guards is now | |
165 | mandatory. | |
166 | ||
f499b062 AD |
167 | 2001-12-27 Akim Demaille <akim@epita.fr> |
168 | ||
169 | * src/gram.h (rule_t): `guard' and `guard_line' are new members. | |
170 | * src/reader.c (symbol_list): `guard' and `guard_line' are new | |
171 | members. | |
172 | (symbol_list_new): Adjust. | |
173 | (copy_action): action_line is the first line, not the last. | |
174 | (copy_guard): Just as for actions, store the `action' only, not | |
175 | the switch/case/break flesh. | |
176 | Don't parse the user action that might follow the guard, let... | |
177 | (readgram): do it, i.e., now, there can be an action after a | |
178 | guard. | |
179 | In other words the guard is just explicitly optional. | |
180 | (packgram): Adjust. | |
181 | * src/output.c (guards_output): New. | |
182 | (output_parser): Call it when needed. | |
183 | (output): Also free the guard and attrs obstacks. | |
184 | * src/files.c, src/files.h (obstack_save): Remove. | |
185 | (output_files): Remove. | |
186 | As a result, if one needs the former `.act' file, using an | |
187 | appropriate skeleton which requires actions and guards is now | |
188 | required. | |
189 | * src/main.c (main): Adjust. | |
190 | * tests/semantic.at: New. | |
191 | * tests/regression.at: Use `input.y' as input file name. | |
192 | Avoid 8+3 problems by requiring input.c when the test needs the | |
193 | parser. | |
194 | ||
d945f5cd AD |
195 | 2001-12-27 Akim Demaille <akim@epita.fr> |
196 | ||
197 | * src/reader.c (symbol_list_new): Be sure to initialize all the | |
198 | fields. | |
199 | ||
d200e455 AD |
200 | 2001-12-27 Akim Demaille <akim@epita.fr> |
201 | ||
202 | All the hacks using a final pseudo state are now useless. | |
203 | ||
204 | * src/LR0.c (set_state_table): state_table holds exactly nstates. | |
205 | * src/lalr.c (nLA): New. | |
206 | (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it | |
207 | instead of lookaheadsp from the pseudo state (nstate + 1). | |
208 | ||
f9507c28 AD |
209 | 2001-12-27 Akim Demaille <akim@epita.fr> |
210 | ||
211 | * src/output.c (action_row, token_actions): Use a state_t instead | |
212 | of a integer, and nlookaheads instead of the following state's | |
213 | lookaheadsp. | |
214 | ||
065fbd27 AD |
215 | 2001-12-27 Akim Demaille <akim@epita.fr> |
216 | ||
217 | * src/conflicts.c (log_resolution, flush_shift) | |
218 | (resolve_sr_conflict, set_conflicts, solve_conflicts) | |
219 | (count_sr_conflicts, count_rr_conflicts, conflicts_output) | |
220 | (conflicts_print, print_reductions): Use a state_t instead of an | |
221 | integer when referring to a state. | |
222 | As much as possible, depend upon nlookaheads, instead of the | |
223 | `lookaheadsp' member of the following state (since lookaheads of | |
224 | successive states are successive, the difference between state n + 1 | |
225 | and n served as the number of lookaheads for state n). | |
226 | * src/lalr.c (add_lookback_edge): Likewise. | |
227 | * src/print.c (print_core, print_actions, print_state) | |
228 | (print_results): Likewise. | |
229 | * src/print_graph.c (print_core, print_actions, print_state) | |
230 | (print_graph): Likewise. | |
231 | * src/conflicts.h: Adjust. | |
232 | ||
1b177bd7 AD |
233 | 2001-12-27 Akim Demaille <akim@epita.fr> |
234 | ||
235 | * src/bison.hairy: Formatting/comment changes. | |
236 | ANSIfy. | |
237 | Remove `register' indications. | |
238 | Add plenty of `static'. | |
239 | ||
7742ddeb AD |
240 | 2001-12-27 Akim Demaille <akim@epita.fr> |
241 | ||
242 | * src/output.c (prepare): Drop the muscle `ntbase' which | |
243 | duplicates ntokens. | |
244 | * src/bison.simple: Formatting/comment changes. | |
245 | Use YYNTOKENS only, which is documented, but not YYNTBASE, which | |
246 | is an undocumented synonym. | |
247 | ||
1fa14068 AD |
248 | 2001-12-22 Akim Demaille <akim@epita.fr> |
249 | ||
250 | * src/output.c (output_table_data): Change the prototype to use | |
251 | `int' for array ranges: some invocations do pass an int, not a | |
252 | short. | |
253 | Reported by Wayne Green. | |
254 | ||
b9752825 AD |
255 | 2001-12-22 Akim Demaille <akim@epita.fr> |
256 | ||
257 | Some actions of web2c.y are improperly triggered. | |
258 | Reported by Mike Castle. | |
259 | ||
260 | * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/. | |
261 | * tests/regression.at (Web2c): Rename as... | |
262 | (Web2c Report): this. | |
263 | (Web2c Actions): New. | |
264 | ||
776209d6 AD |
265 | 2001-12-22 Akim Demaille <akim@epita.fr> |
266 | ||
267 | Reductions in web2c.y are improperly reported. | |
268 | Reported by Mike Castle. | |
269 | ||
270 | * src/conflicts.c (print_reductions): Fix. | |
271 | * tests/regression.at (Web2c): New. | |
272 | ||
275fc3ad AD |
273 | 2001-12-18 Akim Demaille <akim@epita.fr> |
274 | ||
275 | Some host fail on `assert (!"foo")', which expands to | |
276 | ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__)) | |
277 | Reported by Nelson Beebee. | |
278 | ||
279 | * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with | |
280 | `#define it_succeeded 0' and `assert (it_succeeded)'. | |
281 | ||
897668ee MA |
282 | 2001-12-17 Marc Autret <autret_m@epita.fr> |
283 | ||
284 | * src/bison.simple: Don't hard code the skeleton line and filename. | |
285 | * src/output.c (output_parser): Rename 'line' as 'output_line'. | |
286 | New line counter 'skeleton_line' (skeleton-line muscle). | |
287 | ||
ab3399e0 PE |
288 | 2001-12-17 Paul Eggert <eggert@twinsun.com> |
289 | ||
290 | * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that | |
291 | YYDEBUG must be defined to a nonzero value. | |
292 | ||
293 | * src/bison.simple (yytname): Do not assume that the user defines | |
294 | YYDEBUG to a properly parenthesized expression. | |
295 | ||
3877f72b AD |
296 | 2001-12-17 Akim Demaille <akim@epita.fr> |
297 | ||
298 | * src/state.h (state_t): Rename lookaheads as lookaheadsp. | |
299 | nlookaheads is a new member. | |
300 | Adjust all users. | |
301 | * src/lalr.h (nlookaheads): Remove this orphan declaration. | |
302 | * src/lalr.c (initialize_lookaheads): Set nlookaheads for each | |
303 | state. | |
776209d6 | 304 | |
331dbc1b AD |
305 | 2001-12-17 Akim Demaille <akim@epita.fr> |
306 | ||
307 | * src/files.h, src/files.c (open_files, close_files): Remove. | |
308 | * src/main.c (main): Don't open/close files, nor invoke lex_free, | |
309 | let... | |
310 | * src/reader.c (reader): Do it. | |
776209d6 | 311 | |
be750e4c AD |
312 | 2001-12-17 Akim Demaille <akim@epita.fr> |
313 | ||
314 | * src/conflicts.c (print_reductions): Formatting changes. | |
776209d6 | 315 | |
709ae8c6 AD |
316 | 2001-12-17 Akim Demaille <akim@epita.fr> |
317 | ||
318 | * src/conflicts.c (flush_shift): Also adjust lookaheadset. | |
319 | (flush_reduce): New. | |
320 | (resolve_sr_conflict): Adjust. | |
776209d6 | 321 | |
f87685c3 AD |
322 | 2001-12-17 Akim Demaille <akim@epita.fr> |
323 | ||
324 | * src/output.c (output_obstack): Be static and rename as... | |
325 | (format_obstack): this, to avoid any confusion with files.c's | |
326 | output_obstack. | |
327 | * src/reader.h (muscle_obstack): Move to... | |
328 | * src/output.h: here, since it's defined in output.c. | |
329 | ||
837491d8 AD |
330 | 2001-12-17 Akim Demaille <akim@epita.fr> |
331 | ||
332 | * src/output.c (action_row, save_column, default_goto) | |
333 | (sort_actions, matching_state, pack_vector): Better variable | |
334 | locality. | |
335 | ||
796d61fb AD |
336 | 2001-12-17 Akim Demaille <akim@epita.fr> |
337 | ||
338 | * src/output.c: Various formatting changes. | |
776209d6 | 339 | |
64d15509 AD |
340 | 2001-12-17 Akim Demaille <akim@epita.fr> |
341 | ||
342 | * src/files.c (output_files): Free the output_obstack. | |
343 | * src/main.c (main): Call print and print_graph conditionally. | |
344 | * src/print.c (print): Work unconditionally. | |
345 | * src/print_graph.c (print_graph): Work unconditionally. | |
346 | * src/conflicts.c (log_resolution): Output only if verbose_flag. | |
347 | ||
fbc8ecb7 MA |
348 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
349 | ||
350 | * src/output.c (actions_output): Fix. When we use %no-lines, | |
351 | there is one less line per action. | |
352 | ||
f0440388 MA |
353 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
354 | ||
355 | * src/bison.simple: Remove a useless #line directive. | |
356 | s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'. | |
357 | * src/output.c (get_lines_number): New. | |
776209d6 | 358 | (output_parser): Adjust, now takes care about the lines of a |
f0440388 MA |
359 | output muscles. |
360 | Fix line numbering. | |
361 | (actions_output): Computes the number of lines taken by actions. | |
362 | (output_master_parser): Insert new skeleton which is the name of | |
363 | the output parser file name. | |
364 | ||
a79986b8 MA |
365 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
366 | ||
367 | * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility. | |
368 | ||
4ec8e00f MA |
369 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
370 | ||
371 | * src/output.c (output_gram): Keep track of the hairy one. | |
372 | ||
1a4648ff AD |
373 | 2001-12-15 Akim Demaille <akim@epita.fr> |
374 | ||
375 | Make `make distcheck' work. | |
376 | ||
377 | * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses | |
378 | system.h which uses libgettext.h. | |
379 | ||
9c2c67e6 AD |
380 | 2001-12-15 Akim Demaille <akim@epita.fr> |
381 | ||
382 | * src/nullable.c (set_nullable): Useless rules must be skipped, | |
383 | otherwise, since we range over their symbols, we might look at a | |
384 | nonterminal which no longer ``exists'', i.e., it is not counted in | |
385 | `nvars', hence we overflow our arrays. | |
386 | ||
93ede233 AD |
387 | 2001-12-15 Akim Demaille <akim@epita.fr> |
388 | ||
389 | The header can also be produced directly, without any obstack! | |
390 | Yahoo! | |
391 | ||
392 | * src/files.c, src/files.h (defines_obstack): Remove. | |
393 | (compute_header_macro): Global. | |
394 | (defines_obstack_save): Remove. | |
395 | * src/reader.c (parse_union_decl): No longer output to | |
396 | defines_obstack: its content can be found in the `stype' muscle | |
397 | anyway. | |
398 | (output_token_translations): Merge into... | |
399 | (symbols_output): this. | |
400 | Rename as... | |
401 | (symbols_save): this. | |
402 | (reader): Adjust. | |
403 | * src/output.c (header_output): New. | |
404 | (output): Call it. | |
405 | ||
2666f928 AD |
406 | 2001-12-15 Akim Demaille <akim@epita.fr> |
407 | ||
408 | * src/reader.c (parse_union_decl): Instead of handling two obstack | |
409 | simultaneously, use one to define the `stype' muscle, and use the | |
410 | value of the latter to fill defines_obstack. | |
411 | (copy_comment): Remove. | |
412 | (copy_comment2): Work for a single obstack. | |
413 | Rename as... | |
414 | (copy_comment): this. | |
415 | ||
428046f8 AD |
416 | 2001-12-15 Akim Demaille <akim@epita.fr> |
417 | ||
418 | * src/lex.c, src/lex.h (xgetc): No longer static. | |
419 | * src/reader.c (parse_union_decl): Revamp. | |
420 | ||
ea52d706 AD |
421 | 2001-12-15 Akim Demaille <akim@epita.fr> |
422 | ||
423 | Still making progress in separating Bison into (i) input, (ii) | |
424 | process, (iii) output: now we can directly output the parser file | |
425 | without using table_obstack at all. | |
426 | ||
427 | * src/files.c, src/files.h (table_obstack): Bye bye. | |
428 | (parser_file_name): New. | |
429 | * src/files.c (compute_output_file_names): Compute it. | |
430 | * src/output.c (actions_output, output_parser) | |
431 | (output_master_parser): To a file instead of an obstack. | |
432 | ||
3f96f4dc AD |
433 | 2001-12-15 Akim Demaille <akim@epita.fr> |
434 | ||
435 | Attach actions to rules, instead of pre-outputting them to | |
436 | actions_obstack. | |
437 | ||
438 | * src/gram.h (rule_t): action and action_line are new members. | |
439 | * src/reader.c (symbol_list): Likewise. | |
440 | (copy_action): Save the actions within the rule. | |
441 | (packgram): Save them in rule_table. | |
442 | * src/output.c (actions_output): New. | |
443 | (output_parser): Use it on `%%actions'. | |
444 | (output_rule_data): Don't free rule_table. | |
445 | (output): Do it. | |
446 | (prepare): Don't save the `action' muscle. | |
447 | * src/bison.simple: s/%%action/%%actions/. | |
448 | ||
51576fb3 AD |
449 | 2001-12-15 Akim Demaille <akim@epita.fr> |
450 | ||
451 | * src/reader.c (copy_action): When --yacc, don't append a `;' | |
452 | to the user action: let it fail if lacking. | |
dee049eb | 453 | Suggested by Arnold Robbins and Tom Tromey. |
51576fb3 | 454 | |
2648a72d AD |
455 | 2001-12-14 Akim Demaille <akim@epita.fr> |
456 | ||
457 | * src/lex.c (literalchar): Simply return the char you decoded, non | |
458 | longer mess around with obstacks and int pointers. | |
459 | Adjust all callers. | |
460 | ||
92790e5b AD |
461 | 2001-12-14 Akim Demaille <akim@epita.fr> |
462 | ||
463 | * src/lex.c (literalchar): Don't escape the special characters, | |
464 | just decode them, and keep them as char (before, eol was output as | |
465 | the 2 char string `\n' etc.). | |
466 | * src/output.c (output_rule_data): Use quotearg to output the | |
467 | token strings. | |
468 | ||
927c1557 PE |
469 | 2001-12-13 Paul Eggert <eggert@twinsun.com> |
470 | ||
471 | * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE): | |
472 | Do not infringe on the global user namespace when using C++. | |
473 | (YYFPRINTF, YYSTDERR): New macros, needed for the above. | |
474 | All uses of `fprintf' and `stderr' changed. | |
475 | ||
476 | * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR. | |
477 | ||
ed8e1f68 AD |
478 | 2001-12-13 Akim Demaille <akim@epita.fr> |
479 | ||
480 | The computation of nullable is broken: it doesn't handle empty | |
481 | RHS's properly. | |
482 | ||
483 | * tests/torture.at (GNU AWK Grammar): New. | |
484 | * tests/sets.at (Nullable): New. | |
485 | * src/nullable.c (set_nullable): Instead of blindly looping over | |
486 | `ritems', loop over the rules, and then over their rhs's. | |
487 | ||
488 | Work around Autotest bugs. | |
489 | ||
490 | * src/warshall.c (bitmatrix_print): Don't use `+--+' as table | |
491 | frame, because Autotest understand lines starting with a `+' as | |
492 | traces from the shell. Then, they are not processed properly. | |
493 | Admittedly an Autotest bug, but we don't have time to wait for | |
494 | Autotest to catch up. | |
495 | * tests/regression.at (Broken Closure): Adjust to the new table | |
496 | frames. | |
497 | Move to... | |
498 | * tests/sets.at: here. | |
499 | ||
cb581495 AD |
500 | 2001-12-13 Akim Demaille <akim@epita.fr> |
501 | ||
502 | * src/closure.c (closure): Use nrules instead of playing tricks | |
503 | with BITS_PER_WORD. | |
504 | ||
2e729273 AD |
505 | 2001-12-13 Akim Demaille <akim@epita.fr> |
506 | ||
507 | * src/print.c (print_actions): Output the handling of `$' as the | |
508 | traces do: shifting the token EOF. Before EOF was treated as a | |
509 | nonterminal. | |
510 | * tests/regression.at: Adjust some tests. | |
511 | * src/print_graph.c (print_core): Complete the set of items via | |
512 | closure. The next-to-final and final states are still unsatisfying, | |
513 | but that's to be addressed elsewhere. | |
514 | No longer output the rule numbers, but do output the state number. | |
515 | A single loop for the shifts + gotos is enough, but picked a | |
516 | distinct color for each. | |
517 | (print_graph): Initialize and finalize closure. | |
518 | ||
107f7dfb AD |
519 | 2001-12-13 Akim Demaille <akim@epita.fr> |
520 | ||
521 | * src/reader.c (readgram): Remove dead code, an strip useless | |
522 | braces. | |
523 | (get_type): Remove, unused. | |
524 | ||
9b53a24f AD |
525 | 2001-12-12 Akim Demaille <akim@epita.fr> |
526 | ||
527 | * src/complain.h, src/complain.c: Remove error_one_per_line, rely | |
528 | on that of lib/error.c. | |
529 | ||
dbfb6dcd AD |
530 | 2001-12-12 Akim Demaille <akim@epita.fr> |
531 | ||
532 | Some hosts don't like `/' in includes. | |
533 | ||
534 | * src/system.h: Include libgettext.h without qualifying the path. | |
535 | * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove | |
536 | $(top_srcdir). | |
537 | ||
c25fb648 MA |
538 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
539 | ||
540 | * src/output.c (output_parser): Remove useless muscle. | |
541 | ||
710ddc4f MA |
542 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
543 | ||
544 | * src/bison.simple: Remove #line just before %%epilogue. It | |
545 | is now handled in ... | |
546 | * src/reader.c (read_additionnal_code): Add the output of a | |
547 | #line for the epilogue. | |
548 | ||
e83d80b8 MA |
549 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
550 | ||
927c1557 | 551 | * src/reader.c (copy_definition): Re-use CPP-outed code which |
e83d80b8 MA |
552 | replace precedent remove. |
553 | * src/bison.simple: Remove #line before %%prologue because | |
554 | %%input-line is wrong at this time. | |
555 | ||
971d5158 MA |
556 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
557 | ||
558 | * src/reader.c (symbols_output): Clean up. | |
927c1557 | 559 | * src/output.c (output_gram, output): Clean up. |
971d5158 | 560 | |
5edafffd AD |
561 | 2001-12-10 Akim Demaille <akim@epita.fr> |
562 | ||
563 | * src/lalr.c (initialize_lookaheads): New. Extracted from... | |
564 | * src/LR0.c (set_state_table): here. | |
565 | * src/lalr.c (lalr): Call it. | |
566 | ||
0279f8e9 AD |
567 | 2001-12-10 Akim Demaille <akim@epita.fr> |
568 | ||
569 | * src/state.h (shifts): Remove the `number' member: shifts are | |
570 | attached to state, hence no longer need to be labelled with a | |
571 | state number. | |
572 | ||
190c4f5f AD |
573 | 2001-12-10 Akim Demaille <akim@epita.fr> |
574 | ||
575 | Now that states have a complete set of members, the linked list of | |
576 | shifts is useless: just fill directly the state's shifts member. | |
577 | ||
578 | * src/state.h (shifts): Remove the `next' member. | |
579 | * src/LR0.c (first_state, last_state): Remove. | |
580 | Adjust the callers. | |
581 | (augment_automaton): Don't look for the shifts that must be added | |
582 | a shift on EOF: it is those of the state we looked for! But now, | |
583 | since shifts are attached, it is no longer needed to looking | |
584 | merely by its id: its number. | |
585 | ||
2a73b93d AD |
586 | 2001-12-10 Akim Demaille <akim@epita.fr> |
587 | ||
588 | * src/LR0.c (augment_automaton): Better variable locality. | |
589 | Remove an impossible branch: if there is a state corresponding to | |
590 | the start symbol being shifted, then there is shift for the start | |
591 | symbol from the initial state. | |
592 | ||
74392f6a AD |
593 | 2001-12-10 Akim Demaille <akim@epita.fr> |
594 | ||
595 | * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state' | |
596 | only when appropriate: when insert_start_shifting_state' is not | |
597 | invoked. | |
598 | * tests/regression.at (Rule Line Numbers): Adjust. | |
599 | ||
37c82725 AD |
600 | 2001-12-10 Akim Demaille <akim@epita.fr> |
601 | ||
602 | * src/LR0.c (augment_automaton): Now that all states have shifts, | |
603 | merge the two cases addition shifts to the initial state. | |
604 | ||
6a164e0c AD |
605 | 2001-12-10 Akim Demaille <akim@epita.fr> |
606 | ||
607 | * src/lalr.c (set_state_table): Move to... | |
608 | * src/LR0.c: here. | |
609 | * src/lalr.c (lalr): Don't call it... | |
610 | * src/LR0.c (generate_states): do it. | |
611 | * src/LR0.h (first_state): Remove, only the table is used. | |
612 | ||
7215de24 AD |
613 | 2001-12-10 Akim Demaille <akim@epita.fr> |
614 | ||
615 | * src/LR0.h (first_shift, first_reduction): Remove. | |
616 | * src/lalr.c: Don't use first_shift: find shifts through the | |
617 | states. | |
618 | ||
80e25d4d AD |
619 | 2001-12-10 Akim Demaille <akim@epita.fr> |
620 | ||
621 | * src/LR0.c: Attach shifts to states as soon as they are | |
622 | computed. | |
623 | * src/lalr.c (set_state_table): Instead of assigning shifts to | |
624 | state, just assert that the mapping was properly done. | |
625 | ||
0ab3728b AD |
626 | 2001-12-10 Akim Demaille <akim@epita.fr> |
627 | ||
628 | * src/LR0.c (insert_start_shift): Rename as... | |
629 | (insert_start_shifting_state): this. | |
630 | (insert_eof_shifting_state, insert_accepting_state): New. | |
631 | (augment_automaton): Adjust. | |
632 | Better locality of the variables. | |
633 | When looking if the start_symbol is shifted from the initial | |
634 | state, using `while (... symbol != start_symbol ...)' sounds | |
635 | better than `while (... symbol < start_symbol ...)': If fail | |
636 | to see how the order between symbols could be relevant! | |
637 | ||
78af9bbc AD |
638 | 2001-12-10 Akim Demaille <akim@epita.fr> |
639 | ||
640 | * src/getargs.h: Don't declare `spec_name_prefix' and | |
641 | `spec_file_prefix', declared by src/files.h. | |
642 | * src/files.c, src/files.h: Default for spec_name_prefix is "yy". | |
643 | * src/muscle_tab.c (muscle_init): Default prefix to NULL. | |
644 | * src/output.c (prepare): Adjust. | |
645 | * src/reader.c (symbols_output): Likewise. | |
646 | * src/vmsgetargs.c: Vaguely adjust, but who cares? | |
647 | ||
bdef2a41 AD |
648 | 2001-12-10 Akim Demaille <akim@epita.fr> |
649 | ||
650 | * src/muscle_tab.c (muscle_init): NULL is a better default than | |
651 | `"0"'. | |
652 | ||
3735969c AD |
653 | 2001-12-10 Akim Demaille <akim@epita.fr> |
654 | ||
655 | * src/reader.c (reader): Calling symbols_output once is enough. | |
656 | ||
49701457 AD |
657 | 2001-12-10 Akim Demaille <akim@epita.fr> |
658 | ||
659 | Now that states have a complete set of members, the linked list of | |
660 | reductions is useless: just fill directly the state's reductions | |
661 | member. | |
662 | ||
663 | * src/state.h (struct reductions): Remove member `number' and | |
664 | `next'. | |
665 | * src/LR0.c (first_reduction, last_reduction): Remove. | |
666 | (save_reductions): Don't link the new reductions, store them in | |
667 | this_state. | |
668 | * src/lalr.c (set_state_table): No need to attach reductions to | |
669 | states, it's already done. | |
670 | * src/output.c (output_actions): No longer free the shifts, then | |
671 | the reductions, then the states: free all the states and their | |
672 | members. | |
673 | ||
0edad749 AD |
674 | 2001-12-10 Akim Demaille <akim@epita.fr> |
675 | ||
676 | * src/options.c (OPTN, DRTV, BOTH): New. | |
677 | (option_table): Use them. | |
678 | ||
0edad749 AD |
679 | * src/muscle_tab.c: Don't include xalloc.h and string.h: that's |
680 | the job of system.h. | |
681 | * src/options.c: Don't include stdio.h and xalloc.h for the same | |
682 | reasons. | |
683 | ||
5449dd0f AD |
684 | 2001-12-10 Akim Demaille <akim@epita.fr> |
685 | ||
686 | * src/output.c (output, prepare): Make sure the values of the | |
687 | muscles `action' and `prologue' are 0-terminated. | |
688 | ||
a870c567 AD |
689 | 2001-12-10 Akim Demaille <akim@epita.fr> |
690 | ||
691 | Clean up GCC warnings. | |
692 | ||
693 | * src/reader.c (copy_action): `buf' is not used. | |
694 | (parse_skel_decl): Be static. | |
695 | * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. | |
696 | * src/options.h (create_long_option_table): Have a real prototype. | |
697 | * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) | |
698 | (hash_delete_at): Return const void *. | |
699 | Adjust casts to preserve the const. | |
700 | ||
80df8768 AD |
701 | 2001-12-10 Akim Demaille <akim@epita.fr> |
702 | ||
703 | * configure.in: Require 2.52g. | |
704 | M4 is not needed, but AUTOM4TE is. | |
705 | * m4/m4.m4: Remove. | |
706 | * tests/Makefile.am: Adjust. | |
707 | ||
f693ad14 AD |
708 | 2001-12-10 Akim Demaille <akim@epita.fr> |
709 | ||
710 | One structure for states is enough, even though theoretically | |
711 | there are LR(0) states and LALR(1) states. | |
712 | ||
713 | * src/lalr.h (state_t): Remove. | |
714 | (state_table): Be state_t **, not state_t *. | |
715 | * src/state.h (core, CORE_ALLOC): Rename as... | |
716 | (state_t, STATE_ALLOC): this. | |
717 | Add the LALR(1) members: shifts, reductions, errs. | |
718 | * src/LR0.c (state_table): Rename as... | |
719 | (state_hash): this, to avoid name clashes with the global | |
720 | `state_table'. | |
721 | * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c | |
722 | * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust. | |
723 | ||
74ffbcb6 AD |
724 | 2001-12-10 Akim Demaille <akim@epita.fr> |
725 | ||
726 | Bison dumps core on bash.y. | |
727 | Reported by Pascal Bart. | |
728 | ||
729 | * src/warshall.c (bitmatrix_print): New. | |
730 | (TC): Use it. | |
731 | When performing a transitive closure R(i, j) && R(j, k) => R(i, k), | |
732 | j must be the outer loop. | |
733 | * tests/regression.at (Broken Closure): New. | |
734 | ||
07708e19 AD |
735 | 2001-12-05 Akim Demaille <akim@epita.fr> |
736 | ||
737 | * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and | |
738 | its argument. | |
739 |