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