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