]>
Commit | Line | Data |
---|---|---|
c8f002c7 AD |
1 | 2002-08-02 Akim Demaille <akim@epita.fr> |
2 | ||
3 | * src/conflicts.c (conflicts_output): Don't output rules never | |
4 | reduced here, since anyway that computation doesn't work. | |
5 | * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p) | |
6 | (rule_useless_p, rule_never_reduced_p): New. | |
7 | (grammar_rules_partial_print): Use a filter instead of a range. | |
8 | Display the title only if needed. | |
9 | (grammar_rules_print): Adjust. | |
10 | (grammar_rules_never_reduced_report): New. | |
11 | * src/tables.c (action_row): Move the computation of rules never | |
12 | reduced to... | |
13 | (token_actions): here. | |
14 | * src/main.c (main): Make the parser before making the report, so | |
15 | that rules never reduced are computed. | |
16 | Call grammar_rules_never_reduced_report. | |
17 | * src/print.c (print_results): Report rules never reduced. | |
18 | * tests/conflicts.at, tests/reduce.at: Adjust. | |
19 | ||
cd08e51e AD |
20 | 2002-08-01 Akim Demaille <akim@epita.fr> |
21 | ||
22 | Instead of attaching lookaheads and duplicating the rules being | |
23 | reduced by a state, attach the lookaheads to the reductions. | |
24 | ||
25 | * src/state.h (state_t): Remove the `lookaheads', | |
26 | `lookaheads_rule' member. | |
27 | (reductions_t): Add a `lookaheads' member. | |
28 | Use a regular array for the `rules'. | |
29 | * src/state.c (reductions_new): Initialize the lookaheads member | |
30 | to 0. | |
31 | (state_rule_lookaheads_print): Adjust. | |
32 | * src/state.h, src/state.c (state_reductions_find): New. | |
33 | * src/conflicts.c (resolve_sr_conflict, set_conflicts) | |
34 | (count_rr_conflicts): Adjust. | |
35 | * src/lalr.c (LArule): Remove. | |
36 | (add_lookback_edge): Adjust. | |
37 | (state_lookaheads_count): New. | |
38 | (states_lookaheads_initialize): Merge into... | |
39 | (initialize_LA): this. | |
40 | (lalr_free): Adjust. | |
41 | * src/main.c (main): Don't free nullable and derives too early: it | |
42 | is used by --verbose. | |
43 | * src/print.c, src/print_graph.c, src/tables.c: Adjust. | |
44 | ||
bb0027a9 AD |
45 | 2002-08-01 Akim Demaille <akim@epita.fr> |
46 | ||
47 | * src/derives.h, src/derives.c (derives): A `rule_t***' instead of | |
48 | `rule_number_t**'. | |
49 | (set_derives, free_derives): Rename as... | |
50 | (derives_compute, derives_free): this. | |
51 | Adjust all dependencies. | |
52 | * src/nullable.c (set_nullable, free_nullable): Rename as... | |
53 | (nullable_compute, nullable_free): these. | |
54 | (rule_list_t): Store rule_t *, not rule_number_t. | |
55 | * src/state.c (state_rule_lookaheads_print): Directly compare rule | |
56 | pointers, instead of their numbers. | |
57 | * src/main.c (main): Call nullable_free, and derives_free earlier, | |
58 | as they were lo longer used. | |
59 | ||
3325ddc4 AD |
60 | 2002-08-01 Akim Demaille <akim@epita.fr> |
61 | ||
62 | * lib/timevar.c (get_time): Include children time. | |
63 | * src/lalr.h (LA, LArule): Don't export them: used with the | |
64 | state_t. | |
65 | * src/lalr.c (LA, LArule): Static. | |
66 | * src/lalr.h, src/lalr.c (lalr_free): New. | |
67 | * src/main.c (main): Call it. | |
68 | * src/tables.c (pack_vector): Check whether loc is >= to the | |
69 | table_size, not >. | |
70 | (pack_tables): Don't free froms, tos, conflict_tos, and pos... | |
71 | (tables_generate): do it, since that's also it which allocates | |
72 | them. | |
73 | Don't free LA and LArule, main does. | |
74 | ||
c6f1a33c AD |
75 | 2002-07-31 Akim Demaille <akim@epita.fr> |
76 | ||
77 | Separate parser tables computation and output. | |
78 | ||
79 | * src/output.c (nvectors, base_t, base, base_ninf, conflict_table) | |
80 | (conflict_list, conflict_list_cnt, table, check, table_ninf) | |
81 | (yydefgoto, yydefact, high): Move to... | |
82 | * src/tables.h, src/tables.c: here. | |
83 | * src/output.c (vector_number_t, VECTOR_NUMBER_MAX) | |
84 | (VECTOR_NUMBER_MIN, state_number_to_vector_number) | |
85 | (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN) | |
86 | (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX) | |
87 | (ACTION_MIN, actrow, order, nentries, pos, conflrow) | |
88 | (conflict_list_free, table_size, lowzero, table_grow, conflict_row) | |
89 | (action_row, save_row, token_actions, save_column, default_goto) | |
90 | (goto_actions, sort_actions, matching_state, pack_vector) | |
91 | (table_ninf_remap, pack_table, prepare_actions): Move to... | |
92 | * src/tables.c: here. | |
93 | * src/tables.h, src/tables.c(tables_generate, tables_free): New. | |
94 | * src/output.c (token_actions, output_base, output_conflicts) | |
95 | (output_check): Merge into... | |
96 | (prepare_actions): this. | |
97 | (actions_output): Rename as... | |
98 | (user_actions_output): this. | |
99 | * src/main.c (main): Call tables_generate and tables_free. | |
100 | ||
1509d42f AD |
101 | 2002-07-31 Akim Demaille <akim@epita.fr> |
102 | ||
103 | Steal GCC's --time-report support. | |
104 | ||
105 | * lib/timevar.c, lib/timevar.h, lib/timevar.def: New, | |
106 | stolen/adjusted from GCC. | |
107 | * m4/stage.m4: Remove time related checks. | |
108 | * m4/timevar.m4: New. | |
109 | * configure.in: Adjust. | |
110 | * src/system.h: Adjust to using timevar.h. | |
111 | * src/getargs.h, src/getargs.c: Support trace_time for | |
112 | --trace=time. | |
113 | * src/main.c (stage): Remove. | |
114 | (main): Replace `stage' invocations with timevar calls. | |
115 | * src/output.c: Insert pertinent timevar calls. | |
116 | ||
273a74fa AD |
117 | 2002-07-31 Akim Demaille <akim@epita.fr> |
118 | ||
119 | Let --trace have arguments. | |
120 | ||
121 | * src/getargs.h (enum trace_e): New. | |
122 | * src/getargs.c (trace_args, trace_types, trace_argmatch): New. | |
123 | (long_options, short_options): --trace/-T takes an optional | |
124 | argument. | |
125 | Change all the uses of trace_flag to reflect the new flags. | |
126 | * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets. | |
127 | ||
128 | Strengthen `stage' portability. | |
129 | ||
130 | * m4/stage.m4 (BISON_PREREQ_STAGE): New. | |
131 | * configure.in: Use it. | |
132 | Don't check for malloc.h and sys/times.h. | |
133 | * src/system.h: Include them when appropriate. | |
134 | * src/main.c (stage): Compile only when mallinfo, struct mallinfo, | |
135 | times and struct tms are available. | |
136 | ||
217598da AD |
137 | 2002-07-30 Akim Demaille <akim@epita.fr> |
138 | ||
139 | In verbose parse error message, don't report `error' as an | |
140 | expected token. | |
141 | * tests/actions.at (Printers and Destructors): Adjust. | |
142 | * tests/calc.at (Calculator $1): Adjust. | |
143 | * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose | |
144 | error message, do not report the parser accepts the error token in | |
145 | that state. | |
146 | ||
52489d44 AD |
147 | 2002-07-30 Akim Demaille <akim@epita.fr> |
148 | ||
149 | Normalize conflict related messages. | |
150 | ||
151 | * src/complain.h, src/complain.c (warn, complain): New. | |
152 | * src/conflicts.c (conflicts_print): Use them. | |
153 | (conflict_report_yacc): New, extracted from... | |
154 | (conflicts_print): here. | |
155 | * tests/conflicts.at, tests/existing.at: Adjust. | |
156 | ||
e8832397 AD |
157 | 2002-07-30 Akim Demaille <akim@epita.fr> |
158 | ||
159 | Report rules which are never reduced by the parser: those hidden | |
160 | by conflicts. | |
161 | ||
162 | * src/LR0.c (save_reductions): Don't make the final state too | |
163 | different: save its reduction (accept) instead of having a state | |
164 | without any action (no shift or goto, no reduce). | |
165 | Note: the final state is now a ``regular'' state, i.e., the | |
166 | parsers now contain `reduce 0' as default reduction. | |
167 | Nevertheless, since they decide to `accept' when yystate = | |
168 | final_state, they still will not reduce rule 0. | |
169 | * src/print.c (print_actions, print_reduction): Adjust. | |
170 | * src/output.c (action_row): Track reduced rules. | |
171 | (token_actions): Report rules never reduced. | |
172 | * tests/conflicts.at, tests/regression.at: Adjust. | |
173 | ||
caf23d24 AD |
174 | 2002-07-30 Akim Demaille <akim@epita.fr> |
175 | ||
176 | `stage' was accidently included in a previous patch. | |
177 | Initiate its autoconfiscation. | |
178 | ||
179 | * configure.in: Look for malloc.h and sys/times.h. | |
180 | * src/main.c (stage): Adjust. | |
181 | Report only when trace_flag. | |
182 | ||
640748ee AD |
183 | 2002-07-29 Akim Demaille <akim@epita.fr> |
184 | ||
185 | * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not | |
186 | state_number_t. | |
187 | (errs_t): symbol_t*, not symbol_number_t. | |
188 | (reductions_t): rule_t*, not rule_number_t. | |
189 | (FOR_EACH_SHIFT): New. | |
190 | * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c | |
191 | * src/print.c, src/print_graph.c: Adjust. | |
192 | ||
88bce5a2 AD |
193 | 2002-07-29 Akim Demaille <akim@epita.fr> |
194 | ||
195 | Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $. | |
196 | ||
197 | * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as... | |
198 | (endtoken, accept): these. | |
199 | * src/reader.c (reader): Set endtoken's default tag to "$end". | |
200 | Set undeftoken's tag to "$undefined" instead of "$undefined.". | |
201 | * doc/bison.texinfo (Table of Symbols): Mention $accept and $end. | |
202 | Adjust. | |
203 | ||
1bfb97db AD |
204 | 2002-07-29 Akim Demaille <akim@epita.fr> |
205 | ||
206 | * src/reduce.c (reduce_grammar): When the language is empty, | |
207 | complain about the start symbol, not the axiom. | |
208 | Use its location. | |
209 | * tests/reduce.at (Empty Language): New. | |
210 | ||
fc5734fe AD |
211 | 2002-07-26 Akim Demaille <akim@epita.fr> |
212 | ||
213 | * src/reader.h, src/reader.c (gram_error): ... can't get | |
214 | yycontrol without making too strong assumptions on the parser | |
215 | itself. | |
216 | * src/output.c (prepare_tokens): Use the real 0th value of | |
217 | token_translations instead of `0'. | |
218 | * src/parse-gram.y (yyerror): Don't rely on yycontrol being | |
219 | visible here. | |
220 | * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc | |
221 | for the time being: %locations ought to provide it to yyerror. | |
222 | ||
3650b4b8 AD |
223 | 2002-07-25 Akim Demaille <akim@epita.fr> |
224 | ||
225 | * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1. | |
226 | * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./. | |
227 | * tests/regression.at (Web2c Actions): Adjust. | |
228 | ||
4b3d3a8e AD |
229 | 2002-07-25 Akim Demaille <akim@epita.fr> |
230 | ||
231 | Stop storing rules from 1 to nrules + 1. | |
232 | ||
233 | * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c | |
234 | * src/nullable.c, src/output.c, src/print.c, src/reader.c | |
235 | * src/reduce.c: Allocate and free from &rules[0], not &rules[1]. | |
236 | Iterate from 0 to nrules. | |
237 | Use rule_number_as_item_number and item_number_as_rule_number. | |
238 | Adjust to `derive' now containing possibly 0. | |
239 | * src/gram.h (rule_number_as_item_number, item_number_as_rule_number): | |
240 | Handle the `- 1' part in rule numbers from/to item numbers. | |
241 | * src/conflicts.c (log_resolution): Fix the message which reversed | |
242 | shift and reduce. | |
243 | * src/output.c (action_row): Initialize default_rule to -1. | |
244 | (token_actions): Adjust. | |
245 | * tests/sets.at (Nullable, Firsts): Fix the previously bogus | |
246 | expected output. | |
247 | * tests/conflicts.at (Resolved SR Conflicts): Likewise. | |
248 | ||
4a2a22f4 AD |
249 | 2002-07-25 Akim Demaille <akim@epita.fr> |
250 | ||
251 | * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg) | |
252 | (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls) | |
253 | (b4_c_knr_arg_decl): New. | |
254 | * data/yacc.c: Use it to define yysymprint, yydestruct, and | |
255 | yyreport_parse_error. | |
256 | ||
b8df3223 AD |
257 | 2002-07-25 Akim Demaille <akim@epita.fr> |
258 | ||
259 | * data/yacc.c (yyreport_parse_error): New, extracted from... | |
260 | (yyparse): here. | |
261 | (yydestruct, yysymprint): Move above yyparse. | |
262 | Be K&R compliant. | |
263 | ||
a762e609 AD |
264 | 2002-07-25 Akim Demaille <akim@epita.fr> |
265 | ||
266 | * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New, | |
267 | replace... | |
268 | (b4_sint_type, b4_uint_type): these. | |
269 | * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for. | |
270 | * tests/regression.at (Web2c Actions): Adjust. | |
271 | ||
12b0043a AD |
272 | 2002-07-25 Akim Demaille <akim@epita.fr> |
273 | ||
274 | * src/gram.h (TIEM_NUMBER_MAX): New. | |
275 | (item_number_of_rule_number, rule_number_of_item_number): Rename | |
276 | as... | |
277 | (rule_number_as_item_number, item_number_as_rule_number): these. | |
278 | Adjust dependencies. | |
279 | * src/output.c (vector_number_t, VECTOR_NUMBER_MAX) | |
280 | (VECTOR_NUMBER_MIN, state_number_to_vector_number) | |
281 | (symbol_number_to_vector_number): New. | |
282 | (order): Of vector_number_t* type. | |
283 | (base_t, BASE_MAX, BASE_MIN): New. | |
284 | (froms, tos, width, pos, check): Of base_t type. | |
285 | (action_number_t, ACTION_MIN, ACTION_MAX): New. | |
286 | (actrow): Of action_number_t type. | |
287 | (conflrow): Of unsigned int type. | |
288 | (table_ninf, base_ninf): New. | |
289 | (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value. | |
290 | (muscle_insert_int_table, muscle_insert_base_table) | |
291 | (muscle_insert_rule_number_table): New. | |
292 | (prepare_tokens): Output `toknum' as int_table. | |
293 | (action_row): Returns a rule_number_t. | |
294 | Use ACTION_MIN, not SHRT_MIN. | |
295 | (token_actions): yydefact is rule_number_t*. | |
296 | (table_ninf_remap): New. | |
297 | (pack_table): Use it for `base' and `table'. | |
298 | * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove, | |
299 | replaced with... | |
300 | (YYPACT_NINF, YYTABLE_NINF): these. | |
301 | (yypact, yytable): Compute their types instead of hard-coded | |
302 | `short'. | |
303 | * tests/regression.at (Web2c Actions): Adjust. | |
304 | ||
5dde258a AD |
305 | 2002-07-19 Akim Demaille <akim@epita.fr> |
306 | ||
307 | * src/scan-gram.l (id): Can start with an underscore. | |
308 | ||
a945ec39 AD |
309 | 2002-07-16 Akim Demaille <akim@epita.fr> |
310 | ||
311 | * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New. | |
312 | Adjust all former `associativity' dependencies. | |
313 | * src/symtab.c (symbol_new): Default associativity is `undef', not | |
314 | `right'. | |
315 | (symbol_check_alias_consistence): Adjust. | |
316 | ||
fae437e8 AD |
317 | 2002-07-09 Akim Demaille <akim@epita.fr> |
318 | ||
319 | * doc/bison.texinfo: Properly set the ``header'' part. | |
320 | Use @dircategory ``GNU programming tools'' as per Texinfo's | |
321 | documentation. | |
322 | Use @copying. | |
323 | ||
1a715ef2 AD |
324 | 2002-07-09 Akim Demaille <akim@epita.fr> |
325 | ||
326 | * lib/quotearg.h: Protect against multiple inclusions. | |
327 | * src/location.h (location_t): Add a `file' member. | |
328 | (LOCATION_RESET, LOCATION_PRINT): Adjust. | |
329 | * src/complain.c (warn_at, complain_at, fatal_at): Drop | |
330 | `error_one_per_line' support. | |
331 | ||
a5d50994 AD |
332 | 2002-07-09 Akim Demaille <akim@epita.fr> |
333 | ||
334 | * src/complain.h, src/complain.c (warn, complain): Remove, unused. | |
335 | * src/reader.c (lineno): Remove. | |
336 | Adjust all dependencies. | |
337 | (get_merge_function): Take a location and use complain_at. | |
338 | * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise. | |
339 | * tests/regression.at (Invalid inputs, Mixing %token styles): | |
340 | Adjust. | |
341 | ||
b275314e AD |
342 | 2002-07-09 Akim Demaille <akim@epita.fr> |
343 | ||
344 | * src/parse-gram.y (rules_or_grammar_declaration): Add an error | |
345 | recovery rule, and forbid extensions when --yacc. | |
346 | (gram_error): Use complain_at. | |
347 | * src/reader.c (reader): Exit if there were parse errors. | |
348 | ||
865b9df1 AD |
349 | 2002-07-09 Akim Demaille <akim@epita.fr> |
350 | ||
351 | * tests/synclines.at (AT_SYNCLINES_COMPILE): New. | |
352 | (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs. | |
353 | Reported by R Blake <blakers@mac.com>. | |
354 | ||
c76e14da AD |
355 | 2002-07-09 Akim Demaille <akim@epita.fr> |
356 | ||
357 | * data/yacc.c: Output the copyright notive in the header. | |
358 | ||
7db2ed2d AD |
359 | 2002-07-03 Akim Demaille <akim@epita.fr> |
360 | ||
361 | * src/output.c (froms, tos): Are state_number_t. | |
362 | (save_column): sp, sp1, and sp2 are state_number_t. | |
363 | (prepare): Rename `final' as `final_state_number', `nnts' as | |
364 | `nterms_number', `nrules' as `rules_number', `nstates' as | |
365 | `states_number', and `ntokens' as `tokens_number'. Remove `nsym', | |
366 | unused. | |
367 | * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust. | |
368 | * data/lalr1.cc (nsym_): Remove, unused. | |
369 | ||
e68e0410 AD |
370 | 2002-07-03 Akim Demaille <akim@epita.fr> |
371 | ||
372 | * src/lalr.h, src/lalr.c (goto_number_t): New. | |
373 | * src/lalr.c (goto_list_t): New. | |
374 | Propagate them. | |
375 | * src/nullable.c (rule_list_t): New. | |
376 | Propagate. | |
377 | * src/types.h: Remove. | |
378 | ||
e1a4f3a4 AD |
379 | 2002-07-03 Akim Demaille <akim@epita.fr> |
380 | ||
381 | * src/closure.c (print_fderives): Use rule_rhs_print. | |
382 | * src/derives.c (print_derives): Use rule_rhs_print. | |
383 | (rule_list_t): New, replaces `shorts'. | |
384 | (set_derives): Add comments. | |
385 | * tests/sets.at (Nullable, Firsts): Adjust. | |
386 | ||
536545f3 AD |
387 | 2002-07-03 Akim Demaille <akim@epita.fr> |
388 | ||
389 | * src/output.c (prepare_actions): Free `tally' and `width'. | |
390 | (prepare_actions): Allocate and free `order'. | |
391 | * src/symtab.c (symbols_free): Free `symbols'. | |
392 | * src/scan-gram.l (scanner_free): Clear Flex's scanners memory. | |
393 | * src/output.c (m4_invoke): Move to... | |
394 | * src/scan-skel.l: here. | |
395 | (<<EOF>>): Close yyout, and free its name. | |
396 | ||
8b752b00 AD |
397 | 2002-07-03 Akim Demaille <akim@epita.fr> |
398 | ||
399 | Fix some memory leaks, and fix a bug: state 0 was examined twice. | |
400 | ||
401 | * src/LR0.c (new_state): Merge into... | |
402 | (state_list_append): this. | |
403 | (new_states): Merge into... | |
404 | (generate_states): here. | |
405 | (set_states): Don't ensure a proper `errs' state member here, do it... | |
406 | * src/conflicts.c (conflicts_solve): here. | |
407 | * src/state.h, src/state.c: Comment changes. | |
408 | (state_t): Rename member `shifts' as `transitions'. | |
409 | Adjust all dependencies. | |
410 | (errs_new): For consistency, also take the values as argument. | |
411 | (errs_dup): Remove. | |
412 | (state_errs_set): New. | |
413 | (state_reductions_set, state_transitions_set): Assert that no | |
414 | previous value was assigned. | |
415 | (state_free): New. | |
416 | (states_free): Use it. | |
417 | * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as | |
418 | temporary storage: use `errs' and `nerrs' as elsewhere. | |
419 | (set_conflicts): Allocate and free this `errs'. | |
420 | ||
613f5e1a AD |
421 | 2002-07-02 Akim Demaille <akim@epita.fr> |
422 | ||
423 | * lib/libiberty.h: New. | |
424 | * lib: Update the bitset implementation from upstream. | |
425 | * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c, | |
426 | * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE. | |
427 | * src/main.c: Adjust bitset stats calls. | |
428 | ||
26e0cadc PE |
429 | 2002-07-01 Paul Eggert <eggert@twinsun.com> |
430 | ||
431 | * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned | |
432 | char, so that negative chars don't collide with $. | |
433 | ||
1154cced AD |
434 | 2002-06-30 Akim Demaille <akim@epita.fr> |
435 | ||
436 | Have the GLR tests be `warning' checked, and fix the warnings. | |
437 | ||
438 | * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG | |
439 | (yyuserAction, yyreportAmbiguity): `Use' all the arguments. | |
440 | (yyremoveDeletes): `yyi' and `yyj' are size_t. | |
441 | Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies. | |
442 | (yyaddDeferredAction): static. | |
443 | (yyglrReduce): yyi, yyk, amd yyposn are size_t. | |
444 | (yyreportParseError): yyprefix is const. | |
445 | yytokenp is used only when verbose. | |
446 | (yy__GNUC__): Replace with __GNUC__. | |
447 | (yypdumpstack): yyi is size_t. | |
448 | (yypreference): Un-yy local variables and arguments, to avoid | |
449 | clashes with `yyr1'. Anyway, we are not in the user name space. | |
450 | (yytname_size): be an int, as is compared with ints. | |
451 | * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New. | |
452 | Use them. | |
453 | * tests/cxx-gram.at: Use quotation to protect $1. | |
454 | Use AT_COMPILE to enable warnings hunts. | |
455 | Prototype yylex and yyerror. | |
456 | `Use' argc. | |
457 | Include `string.h', not `strings.h'. | |
458 | Produce and prototype stmtMerge only when used. | |
459 | yylex takes a location. | |
460 | ||
97650f4e AD |
461 | 2002-06-30 Akim Demaille <akim@epita.fr> |
462 | ||
463 | We spend a lot of time in quotearg, in particular when --verbose. | |
464 | ||
465 | * src/symtab.c (symbol_get): Store a quoted version of the key. | |
466 | (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove. | |
467 | Adjust all callers. | |
468 | ||
d2576365 AD |
469 | 2002-06-30 Akim Demaille <akim@epita.fr> |
470 | ||
471 | * src/state.h (reductions_t): Rename member `nreds' as num. | |
472 | (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'. | |
473 | * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types. | |
474 | ||
ccaf65bc AD |
475 | 2002-06-30 Akim Demaille <akim@epita.fr> |
476 | ||
477 | * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT) | |
478 | (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED) | |
479 | (shifts_to): Rename as... | |
480 | (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION) | |
481 | (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE) | |
482 | (TRANSITION_IS_DISABLED, transitions_to): these. | |
483 | ||
87675353 AD |
484 | 2002-06-30 Akim Demaille <akim@epita.fr> |
485 | ||
486 | * src/print.c (print_shifts, print_gotos): Merge into... | |
487 | (print_transitions): this. | |
488 | (print_transitions, print_errs, print_reductions): Align the | |
489 | lookaheads columns. | |
490 | (print_core, print_transitions, print_errs, print_state, | |
491 | print_grammar): Output empty lines separator before, not after. | |
492 | (state_default_rule_compute): Rename as... | |
493 | (state_default_rule): this. | |
494 | * tests/conflicts.at (Defaulted Conflicted Reduction), | |
495 | (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust. | |
496 | * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust. | |
497 | ||
ce4ccb4b AD |
498 | 2002-06-30 Akim Demaille <akim@epita.fr> |
499 | ||
500 | Display items as we display rules. | |
501 | ||
502 | * src/gram.h, src/gram.c (rule_lhs_print): New. | |
503 | * src/gram.c (grammar_rules_partial_print): Use it. | |
504 | * src/print.c (print_core): Likewise. | |
505 | * tests/conflicts.at (Defaulted Conflicted Reduction), | |
506 | (Unresolved SR Conflicts): Adjust. | |
507 | (Unresolved SR Conflicts): Adjust and rename as... | |
508 | (Resolved SR Conflicts): this, as was meant. | |
509 | * tests/regression.at (Web2c Report): Adjust. | |
510 | ||
bc933ef1 AD |
511 | 2002-06-30 Akim Demaille <akim@epita.fr> |
512 | ||
513 | * src/print.c (state_default_rule_compute): New, extracted from... | |
514 | (print_reductions): here. | |
515 | Pessimize, but clarify the code. | |
516 | * tests/conflicts.at (Defaulted Conflicted Reduction): New. | |
517 | ||
53d4308d AD |
518 | 2002-06-30 Akim Demaille <akim@epita.fr> |
519 | ||
520 | * src/output.c (action_row): Let default_rule be always a rule | |
521 | number. | |
522 | ||
574fb2d5 AD |
523 | 2002-06-30 Akim Demaille <akim@epita.fr> |
524 | ||
525 | * src/closure.c (print_firsts, print_fderives, closure): | |
526 | Use BITSET_EXECUTE. | |
527 | * src/lalr.c (lookaheads_print): Likewise. | |
528 | * src/state.c (state_rule_lookaheads_print): Likewise. | |
529 | * src/print_graph.c (print_core): Likewise. | |
530 | * src/print.c (print_reductions): Likewise. | |
531 | * src/output.c (action_row): Likewise. | |
532 | Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL. | |
533 | ||
05811fd7 AD |
534 | 2002-06-30 Akim Demaille <akim@epita.fr> |
535 | ||
536 | * src/print_graph.c: Use report_flag. | |
537 | ||
0e4d5753 AD |
538 | 2002-06-30 Akim Demaille <akim@epita.fr> |
539 | ||
540 | * src/lalr.c (traverse, digraph, matrix_print, transpose): Move | |
541 | to... | |
542 | * src/relation.h, src/relation.c (traverse, relation_digraph) | |
543 | (relation_print, relation_transpose): New. | |
544 | ||
24c7d800 AD |
545 | 2002-06-30 Akim Demaille <akim@epita.fr> |
546 | ||
547 | * src/state.h, src/state.c (shifts_to): New. | |
548 | * src/lalr.c (build_relations): Use it. | |
549 | ||
9222837b AD |
550 | 2002-06-30 Akim Demaille <akim@epita.fr> |
551 | ||
552 | * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number) | |
553 | (item_number_of_rule_number, rule_number_of_item_number): New. | |
554 | * src/LR0.c, src/closure.c, src/derives.c, src/derives.h, | |
555 | * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c, | |
556 | * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h: | |
557 | Propagate their use. | |
558 | Much remains to be done, in particular wrt `shorts' from types.h. | |
559 | ||
260008e5 AD |
560 | 2002-06-30 Akim Demaille <akim@epita.fr> |
561 | ||
562 | * src/symtab.c (symbol_new): Initialize the `printer' member. | |
563 | ||
8a731ca8 AD |
564 | 2002-06-30 Akim Demaille <akim@epita.fr> |
565 | ||
566 | * src/LR0.c (save_reductions): Remove, replaced by... | |
567 | * src/state.h, src/state.c (state_reductions_set): New. | |
568 | (reductions, errs): Rename as... | |
569 | (reductions_t, errs_t): these. | |
570 | Adjust all dependencies. | |
571 | ||
32e1e0a4 AD |
572 | 2002-06-30 Akim Demaille <akim@epita.fr> |
573 | ||
574 | * src/LR0.c (state_list_t, state_list_append): New. | |
575 | (first_state, last_state): Now symbol_list_t. | |
576 | (this_state): Remove. | |
577 | (new_itemsets, append_states, save_reductions): Take a state_t as | |
578 | argument. | |
579 | (set_states, generate_states): Adjust. | |
580 | (save_shifts): Remove, replaced by... | |
581 | * src/state.h, src/state.c (state_shifts_set): New. | |
582 | (shifts): Rename as... | |
583 | (shifts_t): this. | |
584 | Adjust all dependencies. | |
585 | * src/state.h (state_t): Remove the `next' member. | |
586 | ||
e5fb6710 AD |
587 | 2002-06-30 Akim Demaille <akim@epita.fr> |
588 | ||
589 | * src/vcg.c (quote): Use slot 2, since we often pass symbol tag | |
590 | escaped in slot 0. | |
591 | ||
c7ca99d4 AD |
592 | 2002-06-30 Akim Demaille <akim@epita.fr> |
593 | ||
594 | Use hash.h for the state hash table. | |
595 | ||
596 | * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove. | |
597 | (allocate_storage): Use state_hash_new. | |
598 | (free_storage): Use state_hash_free. | |
599 | (new_state, get_state): Adjust. | |
600 | * src/lalr.h, src/lalr.c (states): Move to... | |
601 | * src/states.h (state_t): Remove the `link' member, no longer | |
602 | used. | |
603 | * src/states.h, src/states.c: here. | |
604 | (state_hash_new, state_hash_free, state_hash_lookup) | |
605 | (state_hash_insert, states_free): New. | |
606 | * src/states.c (state_table, state_compare, state_hash): New. | |
607 | * src/output.c (output_actions): Do not free states now, since we | |
608 | still need to know the final_state number in `prepare', called | |
609 | afterwards. Do it... | |
610 | * src/main.c (main): here: call states_free after `output'. | |
611 | ||
df0e7316 AD |
612 | 2002-06-30 Akim Demaille <akim@epita.fr> |
613 | ||
614 | * src/state.h, src/state.c (state_new): New, extracted from... | |
615 | * src/LR0.c (new_state): here. | |
616 | * src/state.h (STATE_ALLOC): Move to... | |
617 | * src/state.c: here. | |
618 | * src/LR0.h, src/LR0.c (nstates, final_state): Move to... | |
619 | * src/state.h, src/state.c: here. | |
620 | ||
39f41916 AD |
621 | 2002-06-30 Akim Demaille <akim@epita.fr> |
622 | ||
623 | * src/reader.c (gensym): Rename as... | |
624 | * src/symtab.h, src/symtab.c (dummy_symbol_get): this. | |
625 | (getsym): Rename as... | |
626 | (symbol_get): this. | |
627 | ||
d57650a5 AD |
628 | 2002-06-30 Akim Demaille <akim@epita.fr> |
629 | ||
630 | * src/state.h (state_number_t, STATE_NUMBER_MAX): New. | |
631 | * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h, | |
632 | * src/output.c, src/print.c, src/print_graph.c: Propagate. | |
633 | * src/LR0.h, src/LR0.h (final_state): Is a state_t*. | |
634 | ||
5a08f1ce AD |
635 | 2002-06-30 Akim Demaille <akim@epita.fr> |
636 | ||
637 | Make the test suite pass with warnings checked. | |
638 | ||
639 | * tests/actions.at (Printers and Destructors): Improve. | |
640 | Avoid unsigned vs. signed issues. | |
641 | * tests/calc.at: Don't exercise the scanner here, do it... | |
642 | * tests/input.at (Torturing the Scanner): here. | |
643 | ||
720623af PH |
644 | 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
645 | ||
88e7e941 | 646 | * data/glr.c: Correct typo in Emacs-mode directive. Slightly |
720623af PH |
647 | reorganize first lines parallel to yacc.c. |
648 | ||
fb8135fa AD |
649 | 2002-06-28 Akim Demaille <akim@epita.fr> |
650 | ||
651 | * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define) | |
652 | (b4_token_enum, b4_token_defines): New, factored from... | |
653 | * data/lalr1.cc, data/yacc.c, glr.c: here. | |
654 | ||
41442480 AD |
655 | 2002-06-28 Akim Demaille <akim@epita.fr> |
656 | ||
657 | * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for | |
658 | unused variables. | |
659 | * src/output.c (merger_output): static. | |
660 | ||
e0e5bf84 AD |
661 | 2002-06-28 Akim Demaille <akim@epita.fr> |
662 | ||
663 | * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../. | |
664 | * src/conflicts.c (conflicts_total_count): `i' is unsigned, to | |
665 | pacify GCC. | |
666 | * src/output.c (save_row): Initialize all the variables to pacify GCC. | |
e0e5bf84 | 667 | |
676385e2 PH |
668 | 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
669 | ||
670 | Accumulated changelog for new GLR parsing features. | |
671 | ||
e0e5bf84 | 672 | * src/conflicts.c (count_total_conflicts): Change name to |
676385e2 PH |
673 | conflicts_total_count. |
674 | * src/conflicts.h: Ditto. | |
675 | * src/output.c (token_actions): Use the new name. | |
676 | (output_conflicts): Change conflp => conflict_list_heads, and | |
677 | confl => conflict_list for better readability. | |
678 | * data/glr.c: Use the new names. | |
679 | * NEWS: Add self to GLR announcement. | |
e0e5bf84 | 680 | |
676385e2 PH |
681 | * src/reader.c (free_merger_functions): Cleanup: XFREE->free. |
682 | ||
683 | * doc/bison.texinfo (GLR Parsers): Make corrections suggested by | |
684 | Akim Demaille. | |
685 | ||
686 | * data/bison.glr: Change name to glr.c | |
687 | * data/glr.c: Renamed from bison.glr. | |
688 | * data/Makefile.am: Add glr.c | |
e0e5bf84 AD |
689 | |
690 | * src/getargs.c: | |
691 | ||
676385e2 PH |
692 | * src/symlist.h: Add dprec and merger fields to symbol_list_s. |
693 | * src/symlist.c (symbol_list_new): Initialize dprec and merger fields. | |
e0e5bf84 | 694 | |
676385e2 PH |
695 | Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
696 | ||
697 | * data/bison.glr: Be sure to restore the | |
698 | current #line when returning to the skeleton contents after having | |
699 | exposed the input file's #line. | |
700 | ||
701 | Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
702 | ||
703 | * data/bison.glr: Bring up to date with changes to bison.simple. | |
704 | ||
705 | Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
706 | ||
707 | * data/bison.glr: Correct definitions that use b4_prefix. | |
708 | Various reformatting. | |
709 | (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack. | |
710 | (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove | |
711 | yytokenp argument; now part of stack. | |
712 | (yychar): Define to behave as documented. | |
713 | (yyclearin): Ditto. | |
e0e5bf84 | 714 | |
676385e2 PH |
715 | Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
716 | ||
717 | * src/reader.h: Add declaration for free_merger_functions. | |
718 | ||
719 | * src/reader.c (merge_functions): New variable. | |
720 | (get_merge_function): New function. | |
721 | (free_merger_functions): New function. | |
722 | (readgram): Check for %prec that is not followed by a symbol. | |
723 | Handle %dprec and %merge declarations. | |
724 | (packgram): Initialize dprec and merger fields in rules array. | |
725 | ||
726 | * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list, | |
727 | conflict_list_cnt, conflict_list_free): New variables. | |
728 | (table_grow): Also grow conflict_table. | |
e0e5bf84 | 729 | (prepare_rules): Output dprec and merger tables. |
676385e2 | 730 | (conflict_row): New function. |
e0e5bf84 | 731 | (action_row): Output conflict lists for GLR parser. Don't use |
676385e2 PH |
732 | default reduction in conflicted states for GLR parser so that there |
733 | are spaces for the conflict lists. | |
734 | (save_row): Also save conflict information. | |
735 | (token_actions): Allocate conflict list. | |
736 | (merger_output): New function. | |
737 | (pack_vector): Pack conflict table, too. | |
738 | (output_conflicts): New function to output yyconflp and yyconfl. | |
739 | (output_check): Allocate conflict_tos. | |
740 | (output_actions): Output conflict tables, also. | |
741 | (output_skeleton): Output b4_mergers definition. | |
742 | (prepare): Output b4_max_rhs_length definition. | |
743 | Use 'bison.glr' as default skeleton for GLR parsers. | |
744 | ||
745 | * src/gram.c (glr_parser): New flag. | |
746 | (grammar_free): Call free_merger_functions. | |
747 | ||
748 | * src/conflicts.c (count_rr_conflicts): Augment to optionally count | |
749 | all pairs of conflicting reductions, rather than just all tokens | |
750 | causing conflicts. Needed to size conflict tables. | |
e0e5bf84 | 751 | (conflicts_output): Modify call to count_rr_conflicts for new |
676385e2 PH |
752 | interface. |
753 | (conflicts_print): Ditto. | |
754 | (count_total_conflicts): New function. | |
755 | ||
756 | * src/reader.h (merger_list): New type. | |
757 | (merge_functions): New variable. | |
758 | ||
759 | * src/lex.h (tok_dprec, tok_merge): New token types. | |
760 | ||
761 | * src/gram.h (rule_s): Add dprec and merger fields. | |
762 | (glr_parser): New flag. | |
763 | ||
764 | * src/conflicts.h (count_total_conflicts): New function. | |
765 | ||
766 | * src/options.c (option_table): Add %dprec, %merge, and %glr-parser. | |
767 | ||
768 | * doc/bison.texinfo (Generalized LR Parsing): New section. | |
769 | (GLR Parsers): New section. | |
770 | (Language and Grammar): Mention GLR parsing. | |
771 | (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR | |
772 | Correct typo ("tge" -> "the"). | |
773 | ||
774 | * data/bison.glr: New skeleton for GLR parsing. | |
775 | ||
776 | * tests/cxx-gram.at: New tests for GLR parsing. | |
777 | ||
778 | * tests/testsuite.at: Include cxx-gram.at. | |
779 | ||
780 | * tests/Makefile.am: Add cxx-gram.at. | |
e0e5bf84 | 781 | |
676385e2 PH |
782 | * src/parse-gram.y: |
783 | ||
784 | * src/scan-gram.l: Add %dprec, %glr-parser, %merge. | |
785 | ||
786 | * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser. | |
e0e5bf84 | 787 | |
b5480d74 | 788 | 2002-06-27 Akim Demaille <akim@epita.fr> |
e2aaf4c4 AD |
789 | |
790 | * src/options.h, src/options.c: Remove. | |
791 | * src/getargs.c (short_options, long_options): New. | |
792 | ||
60491a94 AD |
793 | 2002-06-27 Akim Demaille <akim@epita.fr> |
794 | ||
795 | * data/bison.simple, data/bison.c++: Rename as... | |
796 | * data/yacc.c, data/lalr1.cc: these. | |
797 | * doc/bison.texinfo (Environment Variables): Remove. | |
798 | ||
9be0c25b AD |
799 | 2002-06-25 Raja R Harinath <harinath@cs.umn.edu> |
800 | ||
801 | * src/getargs.c (report_argmatch): Initialize strtok(). | |
802 | ||
1ae72863 AD |
803 | 2002-06-20 Akim Demaille <akim@epita.fr> |
804 | ||
805 | * data/bison.simple (b4_symbol_actions): New, replaces... | |
806 | (b4_symbol_destructor, b4_symbol_printer): these. | |
807 | (yysymprint): Be sure to call YYPRINT only for tokens, and using | |
808 | user token numbers. | |
809 | ||
87542d29 AD |
810 | 2002-06-20 Akim Demaille <akim@epita.fr> |
811 | ||
812 | * data/bison.simple (yydestructor): Rename as... | |
813 | (yydestruct): this. | |
814 | ||
1a31ed21 AD |
815 | 2002-06-20 Akim Demaille <akim@epita.fr> |
816 | ||
817 | * src/symtab.h, src/symtab.c (symbol_type_set) | |
818 | (symbol_destructor_set, symbol_precedence_set): The location is | |
819 | the last argument. | |
820 | Adjust all callers. | |
821 | ||
e776192e AD |
822 | 2002-06-20 Akim Demaille <akim@epita.fr> |
823 | ||
824 | * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser | |
825 | internals. | |
826 | * src/reader.h, src/reader.c (grammar_current_rule_prec_set): | |
827 | Takes a location. | |
828 | * src/symtab.h, src/symtab.c (symbol_class_set) | |
829 | (symbol_user_token_number_set): Likewise. | |
830 | Adjust all callers. | |
831 | Promote complain_at. | |
832 | * tests/input.at (Type Clashes): Adjust. | |
833 | ||
5c1180b3 AD |
834 | 2002-06-20 Akim Demaille <akim@epita.fr> |
835 | ||
836 | * data/bison.simple (YYLEX): Fix the declaration when | |
837 | %pure-parser. | |
838 | ||
e3170060 AD |
839 | 2002-06-20 Akim Demaille <akim@epita.fr> |
840 | ||
841 | * data/bison.simple (yysymprint): Don't print the token number, | |
842 | just its name. | |
843 | * tests/actions.at (Destructors): Rename as... | |
844 | (Printers and Destructors): this. | |
845 | Also exercise %printer. | |
846 | ||
253862fd AD |
847 | 2002-06-20 Akim Demaille <akim@epita.fr> |
848 | ||
849 | * data/bison.simple (YYDSYMPRINT): New. | |
850 | Use it to remove many of the #if YYDEBUG/if (yydebug). | |
851 | ||
366eea36 AD |
852 | 2002-06-20 Akim Demaille <akim@epita.fr> |
853 | ||
854 | * src/symtab.h, src/symtab.c (symbol_t): printer and | |
855 | printer_location are new members. | |
856 | (symbol_printer_set): New. | |
857 | * src/parse-gram.y (PERCENT_PRINTER): New token. | |
858 | Handle its associated rule. | |
859 | * src/scan-gram.l: Adjust. | |
860 | (handle_destructor_at, handle_destructor_dollar): Rename as... | |
861 | (handle_symbol_code_at, handle_symbol_code_dollar): these. | |
862 | * src/output.c (symbol_printers_output): New. | |
863 | (output_skeleton): Call it. | |
864 | * data/bison.simple (yysymprint): New. Cannot be named yyprint | |
865 | since there are already many grammar files with a user `yyprint'. | |
866 | Replace the calls to YYPRINT to calls to yysymprint. | |
867 | * tests/calc.at: Adjust. | |
868 | * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was | |
869 | taking advantage of parser very internal details (stack size!). | |
870 | ||
4f25ebb0 AD |
871 | 2002-06-20 Akim Demaille <akim@epita.fr> |
872 | ||
873 | * src/scan-gram.l: Complete the scanner with the missing patterns | |
874 | to pacify Flex. | |
875 | Use `quote' and `symbol_tag_get' where appropriate. | |
876 | ||
93b68a0e AD |
877 | 2002-06-19 Akim Demaille <akim@epita.fr> |
878 | ||
879 | * tests/actions.at (Destructors): Augment to test locations. | |
880 | * data/bison.simple (yydestructor): Pass it the current location | |
881 | if locations are enabled. | |
882 | Prototype only when __STDC__ or C++. | |
883 | Change the argument names to move into the yy name space: there is | |
884 | user code here. | |
885 | ||
58612f1d AD |
886 | 2002-06-19 Akim Demaille <akim@epita.fr> |
887 | ||
74310291 AD |
888 | * data/bison.simple (b4_pure_if): New. |
889 | Use it instead of #ifdef YYPURE. | |
890 | ||
891 | 2002-06-19 Akim Demaille <akim@epita.fr> | |
892 | ||
893 | * data/bison.simple (b4_location_if): New. | |
58612f1d AD |
894 | Use it instead of #ifdef YYLSP_NEEDED. |
895 | ||
f25bfb75 AD |
896 | 2002-06-19 Akim Demaille <akim@epita.fr> |
897 | ||
898 | Prepare @$ in %destructor, but currently don't bind it in the | |
899 | skeleton, as %location use is not cleaned up yet. | |
900 | ||
901 | * src/scan-gram.l (handle_dollar, handle_destructor_at) | |
902 | (handle_action_at): New. | |
903 | (handle_at, handle_action_dollar, handle_destructor_dollar): Take | |
904 | a braced_code_t and a location as additional arguments. | |
905 | (handle_destructor_dollar): Instead of requiring `b4_eval', just | |
906 | unquote one when outputting `b4_dollar_dollar'. | |
907 | Adjust callers. | |
908 | * data/bison.simple (b4_eval): Remove. | |
909 | (b4_symbol_destructor): Adjust. | |
910 | * tests/input.at (Invalid @n): Adjust. | |
911 | ||
c732d2c6 AD |
912 | 2002-06-19 Zack Weinberg <zack@codesourcery.com> |
913 | ||
914 | * doc/bison.texinfo: Document ability to have multiple | |
915 | prologue sections. | |
916 | ||
8c165d89 AD |
917 | 2002-06-18 Akim Demaille <akim@epita.fr> |
918 | ||
919 | * src/files.c (compute_base_names): When computing the output file | |
920 | names from the input file name, strip the directory part. | |
921 | ||
ca98bf57 AD |
922 | 2002-06-18 Akim Demaille <akim@epita.fr> |
923 | ||
924 | * data/bison.simple.new: Comment changes. | |
925 | Reported by Andreas Schwab. | |
926 | ||
0bfb02ff AD |
927 | 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu> |
928 | ||
929 | * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that | |
930 | there are no `label `yyoverflowlab' defined but not used' warnings | |
931 | when yyoverflow is defined. | |
932 | ||
24c0aad7 AD |
933 | 2002-06-18 Akim Demaille <akim@epita.fr> |
934 | ||
935 | * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a | |
936 | new member. | |
937 | (symbol_destructor_set): Adjust. | |
938 | * src/output.c (symbol_destructors_output): Output the destructor | |
939 | locations. | |
940 | Output the symbol name. | |
941 | * data/bison.simple (b4_symbol_destructor): Adjust. | |
942 | ||
5719c109 AD |
943 | 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com> |
944 | and Akim Demaille <akim@epita.fr> | |
945 | ||
946 | * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy | |
947 | what's left on the stack when the error recovery hits EOF. | |
948 | * tests/actions.at (Destructors): Complete to exercise this case. | |
949 | ||
9280d3ef AD |
950 | 2002-06-17 Akim Demaille <akim@epita.fr> |
951 | ||
952 | * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of | |
953 | arguments is really empty, not only equal to `[]'. | |
954 | * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new | |
955 | member. | |
956 | (symbol_destructor_set): New. | |
957 | * src/output.c (symbol_destructors_output): New. | |
958 | * src/reader.h (brace_code_t, current_braced_code): New. | |
959 | * src/scan-gram.l (BRACED_CODE): Use it to branch on... | |
960 | (handle_dollar): Rename as... | |
961 | (handle_action_dollar): this. | |
962 | (handle_destructor_dollar): New. | |
963 | * src/parse-gram.y (PERCENT_DESTRUCTOR): New. | |
964 | (grammar_declaration): Use it. | |
965 | * data/bison.simple (yystos): Is always defined. | |
966 | (yydestructor): New. | |
967 | * tests/actions.at (Destructors): New. | |
968 | * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep. | |
969 | ||
dafdc66f AD |
970 | 2002-06-17 Akim Demaille <akim@epita.fr> |
971 | ||
972 | * src/symlist.h, src/symlist.c (symbol_list_length): New. | |
973 | * src/scan-gram.l (handle_dollar, handle_at): Compute the | |
974 | rule_length only when needed. | |
975 | * src/output.c (actions_output, token_definitions_output): Output | |
976 | the full M4 block. | |
977 | * src/symtab.c: Don't access directly to the symbol tag, use | |
978 | symbol_tag_get. | |
979 | * src/parse-gram.y: Use symbol_list_free. | |
980 | ||
56c47203 AD |
981 | 2002-06-17 Akim Demaille <akim@epita.fr> |
982 | ||
983 | * src/reader.h, src/reader.c (symbol_list, symbol_list_new) | |
984 | (symbol_list_prepend, get_type_name): Move to... | |
985 | * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new) | |
986 | (symbol_list_prepend, symbol_list_n_type_name_get): here. | |
987 | Adjust all callers. | |
988 | (symbol_list_free): New. | |
989 | * src/scan-gram.l (handle_dollar): Takes a location. | |
990 | * tests/input.at (Invalid $n): Adjust. | |
991 | ||
1e0bab92 AD |
992 | 2002-06-17 Akim Demaille <akim@epita.fr> |
993 | ||
994 | * src/reader.h, src/reader.c (symbol_list_new): Export it. | |
995 | (symbol_list_prepend): New. | |
996 | * src/parse-gram.y (%union): `list' is a new member. | |
997 | (symbols.1): New, replaces... | |
998 | (terms_to_prec.1, nterms_to_type.1): these. | |
999 | * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set) | |
1000 | Take a location as additional argument. | |
1001 | Adjust all callers. | |
1002 | ||
04e60654 AD |
1003 | 2002-06-15 Akim Demaille <akim@epita.fr> |
1004 | ||
1005 | * src/parse-gram.y: Move %token in the declaration section so that | |
1006 | we don't depend upon CVS Bison. | |
1007 | ||
10e5b8bd AD |
1008 | 2002-06-15 Akim Demaille <akim@epita.fr> |
1009 | ||
1010 | * src/state.h, src/state.c (state_rule_lookaheads_print): New. | |
1011 | * src/print.c (print_core): Use it. | |
1012 | ||
9801d40c AD |
1013 | 2002-06-15 Akim Demaille <akim@epita.fr> |
1014 | ||
1015 | * src/conflicts.c (log_resolution): Accept the rule involved in | |
1016 | the sr conflicts instead of the lookahead number that points to | |
1017 | that rule. | |
1018 | (flush_reduce): Accept the current lookahead vector as argument, | |
1019 | instead of the index in LA. | |
1020 | (resolve_sr_conflict): Accept the current number of lookahead | |
1021 | bitset to consider for the STATE, instead of the index in LA. | |
1022 | (set_conflicts): Adjust. | |
1023 | * src/lalr.c, src/lalr.h, src/state.h: Comment changes. | |
1024 | ||
c0263492 AD |
1025 | 2002-06-15 Akim Demaille <akim@epita.fr> |
1026 | ||
1027 | * src/state.h (state_t): Replace the `lookaheadsp' member, a | |
1028 | short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**). | |
1029 | Adjust all dependencies. | |
1030 | * src/lalr.c (initialize_lookaheads): Split into... | |
1031 | (states_lookaheads_count, states_lookaheads_initialize): these. | |
1032 | (lalr): Adjust. | |
1033 | ||
9757c359 AD |
1034 | 2002-06-15 Akim Demaille <akim@epita.fr> |
1035 | ||
1036 | * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved | |
1037 | out of... | |
1038 | (grammar_rules_print): here. | |
1039 | * src/reduce.c (reduce_output): Use it. | |
1040 | * tests/reduce.at (Useless Rules, Reduced Automaton) | |
1041 | (Underivable Rules): Adjust. | |
1042 | ||
6b98e4b5 AD |
1043 | 2002-06-15 Akim Demaille <akim@epita.fr> |
1044 | ||
1045 | Copy BYacc's nice way to report the grammar. | |
1046 | ||
1047 | * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print): | |
1048 | New. | |
1049 | Don't print the rules' location, it is confusing and useless. | |
1050 | (rule_print): Use grammar_rhs_print. | |
1051 | * src/print.c (print_grammar): Use grammar_rules_print. | |
1052 | ||
6b98e4b5 AD |
1053 | 2002-06-15 Akim Demaille <akim@epita.fr> |
1054 | ||
1055 | Complete and rationalize `useless thing' warnings. | |
1056 | ||
1057 | * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n) | |
1058 | (symbol_tag_print): New. | |
1059 | Use them everywhere in place of accessing directly the tag member. | |
1060 | * src/gram.h, src/gram.c (rule_print): New. | |
1061 | Use it where a rule used to be printed `by hand'. | |
1062 | * src/reduce.c (nonterminals_reduce): Report the use nonterminals. | |
1063 | (reduce_grammar_tables): Report the useless rules. | |
1064 | (reduce_print): Useless things are a warning, not an error. | |
1065 | Report it as such. | |
1066 | * tests/reduce.at (Useless Nonterminals, Useless Rules): | |
1067 | (Reduced Automaton, Underivable Rules): Adjust. | |
1068 | * tests/regression.at (Web2c Report, Web2c Report): Adjust. | |
1069 | * tests/conflicts.at (Unresolved SR Conflicts) | |
1070 | (Solved SR Conflicts): Adjust. | |
1071 | ||
ee000ba4 AD |
1072 | 2002-06-15 Akim Demaille <akim@epita.fr> |
1073 | ||
1074 | Let symbols have a location. | |
1075 | ||
1076 | * src/symtab.h, src/symtab.c (symbol_t): Location is a new member. | |
1077 | (getsym): Adjust. | |
1078 | Adjust all callers. | |
1079 | * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at): | |
1080 | Use location_t, not int. | |
1081 | * src/symtab.c (symbol_check_defined): Take advantage of the | |
1082 | location. | |
1083 | * tests/regression.at (Invalid inputs): Adjust. | |
1084 | ||
8efe435c AD |
1085 | 2002-06-15 Akim Demaille <akim@epita.fr> |
1086 | ||
1087 | * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New. | |
1088 | (input): Don't try to initialize yylloc here, do it in the | |
1089 | scanner. | |
1090 | * src/scan-gram.l (YY_USER_INIT): Initialize yylloc. | |
1091 | * src/gram.h (rule_t): Change line and action_line into location | |
1092 | and action_location, of location_t type. | |
1093 | Adjust all dependencies. | |
1094 | * src/location.h, src/location.c (empty_location): New. | |
1095 | * src/reader.h, src/reader.c (grammar_start_symbol_set) | |
1096 | (grammar_symbol_append, grammar_rule_begin, grammar_rule_end) | |
1097 | (grammar_current_rule_symbol_append) | |
1098 | (grammar_current_rule_action_append): Expect a location as argument. | |
1099 | * src/reader.c (grammar_midrule_action): Adjust to attach an | |
1100 | action's location as dummy symbol location. | |
1101 | * src/symtab.h, src/symtab.c (startsymbol_location): New. | |
1102 | * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust | |
1103 | the line numbers. | |
1104 | ||
1921f1d7 AD |
1105 | 2002-06-14 Akim Demaille <akim@epita.fr> |
1106 | ||
1107 | Grammar declarations may be found in the grammar section. | |
1108 | ||
1109 | * src/parse-gram.y (rules_or_grammar_declaration): New. | |
1110 | (declarations): Each declaration may end with a semicolon, not | |
1111 | just... | |
1112 | (grammar_declaration): `"%union"'. | |
1113 | (grammar): Branch to rules_or_grammar_declaration. | |
1114 | ||
4515534c AD |
1115 | 2002-06-14 Akim Demaille <akim@epita.fr> |
1116 | ||
1117 | * src/main.c (main): Invoke scanner_free. | |
1118 | ||
f958596b AD |
1119 | 2002-06-14 Akim Demaille <akim@epita.fr> |
1120 | ||
1121 | * src/output.c (m4_invoke): Extracted from... | |
1122 | (output_skeleton): here. | |
1123 | Free tempfile. | |
1124 | ||
2c569025 AD |
1125 | 2002-06-14 Akim Demaille <akim@epita.fr> |
1126 | ||
1127 | * src/parse-gram.y (directives, directive, gram) | |
1128 | (grammar_directives, precedence_directives, precedence_directive): | |
1129 | Rename as... | |
1130 | (declarations, declaration, grammar, grammar_declaration) | |
1131 | (precedence_declaration, precedence_declarator): these. | |
1132 | (symbol_declaration): New. | |
1133 | ||
592e8d4d AD |
1134 | 2002-06-14 Akim Demaille <akim@epita.fr> |
1135 | ||
1136 | * src/files.c (action_obstack): Remove, unused. | |
1137 | (output_obstack): Remove it, and all its dependencies, as it is no | |
1138 | longer needed. | |
1139 | * src/reader.c (epilogue_set): Build the epilogue in the | |
1140 | muscle_obstack. | |
1141 | * src/output.h, src/output.c (muscle_obstack): Move to... | |
1142 | * src/muscle_tab.h, src/muscle_tab.h: here. | |
1143 | (muscle_init): Initialize muscle_obstack. | |
1144 | (muscle_free): New. | |
1145 | * src/main.c (main): Call it. | |
1146 | ||
0c15323d AD |
1147 | 2002-06-14 Akim Demaille <akim@epita.fr> |
1148 | ||
1149 | * src/location.h: New, extracted from... | |
1150 | * src/reader.h: here. | |
1151 | * src/Makefile.am (noinst_HEADERS): Merge into | |
1152 | (bison_SOURCES): this. | |
1153 | Add location.h. | |
1154 | * src/parse-gram.y: Use location_t instead of Bison's. | |
1155 | * src/reader.h, src/reader.c (prologue_augment, epilogue_set): | |
1156 | Use location_t instead of ints. | |
1157 | ||
e96c9728 AD |
1158 | 2002-06-14 Akim Demaille <akim@epita.fr> |
1159 | ||
1160 | * data/bison.simple, data/bison.c++: Be sure to restore the | |
1161 | current #line when returning to the skeleton contents after having | |
1162 | exposed the input file's #line. | |
1163 | ||
75d1fe16 AD |
1164 | 2002-06-12 Akim Demaille <akim@epita.fr> |
1165 | ||
1166 | * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too | |
1167 | eager. | |
1168 | * tests/actions.at (Exotic Dollars): New. | |
1169 | ||
6c35d22c AD |
1170 | 2002-06-12 Akim Demaille <akim@epita.fr> |
1171 | ||
1172 | * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst | |
1173 | ['"/] too eagerly. | |
1174 | * tests/input.at (Torturing the Scanner): New. | |
1175 | ||
1d6412ad AD |
1176 | 2002-06-11 Akim Demaille <akim@epita.fr> |
1177 | ||
1178 | * src/scan-gram.l (YY_OBS_INIT): Remove, replace with... | |
1179 | [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE] | |
1180 | [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment. | |
1181 | * src/reader.h, src/scan-gram.l (scanner_initialize): this. | |
1182 | * src/reader.c (reader): Use it. | |
1183 | ||
4cdb01db AD |
1184 | 2002-06-11 Akim Demaille <akim@epita.fr> |
1185 | ||
1186 | * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval. | |
1187 | Adjust all callers. | |
1188 | (scanner_last_string_free): New. | |
1189 | ||
44995b2e AD |
1190 | 2002-06-11 Akim Demaille <akim@epita.fr> |
1191 | ||
1192 | * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as... | |
1193 | (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these. | |
1194 | (last_string, YY_OBS_FREE): New. | |
1195 | Use them when returning an ID. | |
1196 | ||
e9955c83 AD |
1197 | 2002-06-11 Akim Demaille <akim@epita.fr> |
1198 | ||
1199 | Have Bison grammars parsed by a Bison grammar. | |
1200 | ||
1201 | * src/reader.c, src/reader.h (prologue_augment): New. | |
1202 | * src/reader.c (copy_definition): Remove. | |
1203 | ||
1204 | * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment) | |
1205 | (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action) | |
1206 | (grammar_current_rule_prec_set, grammar_current_rule_check) | |
1207 | (grammar_current_rule_symbol_append) | |
1208 | (grammar_current_rule_action_append): Export. | |
1209 | * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_ | |
1210 | (symbol_list_action_append): Remove. | |
1211 | Hook the routines from reader. | |
1212 | * src/scan-gram.l: In INITIAL, characters and strings are tokens. | |
1213 | * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now. | |
1214 | ||
1215 | * src/reader.c (read_declarations): Remove, unused. | |
1216 | ||
1217 | * src/parse-gram.y: Handle the epilogue. | |
1218 | * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as... | |
1219 | (grammar_start_symbol_set): this. | |
1220 | * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet. | |
1221 | * src/reader.c (readgram): Remove, unused. | |
1222 | (reader): Adjust to insert eoftoken and axiom where appropriate. | |
1223 | ||
1224 | * src/reader.c (copy_dollar): Replace with... | |
1225 | * src/scan-gram.h (handle_dollar): this. | |
1226 | * src/parse-gram.y: Remove `%thong'. | |
1227 | ||
1228 | * src/reader.c (copy_at): Replace with... | |
1229 | * src/scan-gram.h (handle_at): this. | |
1230 | ||
1231 | * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at): | |
1232 | New. | |
1233 | ||
1234 | * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the | |
1235 | time being. | |
1236 | ||
1237 | * src/reader.h, src/reader.c (grammar_rule_end): New. | |
1238 | ||
1239 | * src/parse.y (current_type, current_class): New. | |
1240 | Implement `%nterm', `%token' support. | |
1241 | Merge `%term' into `%token'. | |
1242 | (string_as_id): New. | |
1243 | * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the | |
1244 | type name. | |
1245 | ||
1246 | * src/parse-gram.y: Be sure to handle properly the beginning of | |
1247 | rules. | |
1248 | ||
1249 | * src/parse-gram.y: Handle %type. | |
1250 | * src/reader.c (grammar_rule_end): Call grammar_current_rule_check. | |
1251 | ||
1252 | * src/parse-gram.y: More directives support. | |
1253 | * src/options.c: No longer handle source directives. | |
1254 | ||
1255 | * src/parse-gram.y: Fix %output. | |
1256 | ||
1257 | * src/parse-gram.y: Handle %union. | |
1258 | Use the prologue locations. | |
1259 | * src/reader.c (parse_union_decl): Remove. | |
1260 | ||
1261 | * src/reader.h, src/reader.c (epilogue_set): New. | |
1262 | * src/parse-gram.y: Use it. | |
1263 | ||
1264 | * data/bison.simple, data/bison.c++: b4_stype is now either not | |
1265 | defined, then default to int, or to the contents of %union, | |
1266 | without `union' itself. | |
1267 | Adjust. | |
1268 | * src/muscle_tab.c (muscle_init): Don't predefine `stype'. | |
1269 | ||
1270 | * src/output.c (actions_output): Don't output braces, as they are | |
1271 | already handled by the scanner. | |
1272 | ||
1273 | * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of | |
1274 | characters to themselves. | |
1275 | ||
1276 | * tests/reduce.at (Reduced Automaton): End the grammars with %% so | |
1277 | that the epilogue has a proper #line. | |
1278 | ||
1279 | * src/parse-gram.y: Handle precedence/associativity. | |
1280 | ||
1281 | * src/symtab.c (symbol_precedence_set): Requires the symbol to be | |
1282 | a terminal. | |
1283 | * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters. | |
1284 | * tests/calc.at: Do not use `%token "foo"' as it makes not sense | |
1285 | at all to define terminals that cannot be emitted. | |
1286 | ||
1287 | * src/scan-gram.l: Escape M4 characters. | |
1288 | ||
1289 | * src/scan-gram.l: Working properly with escapes in user | |
1290 | strings/characters. | |
1291 | ||
1292 | * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR) | |
1293 | (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING' | |
1294 | grammar. | |
1295 | Use more modest sizes, as for the time being the parser does not | |
1296 | release memory, and therefore the process swallows a huge amount | |
1297 | of memory. | |
1298 | ||
1299 | * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the | |
1300 | stricter %token grammar. | |
1301 | ||
1302 | * src/symtab.h (associativity): Add `undef_assoc'. | |
1303 | (symbol_precedence_set): Do nothing when passed an undef_assoc. | |
1304 | * src/symtab.c (symbol_check_alias_consistence): Adjust. | |
1305 | ||
1306 | * tests/regression.at (Invalid %directive): Remove, as it is now | |
1307 | meaningless. | |
1308 | (Invalid inputs): Adjust to the new error messages. | |
1309 | (Token definitions): The new grammar doesn't allow too many | |
1310 | eccentricities. | |
1311 | ||
1312 | * src/lex.h, src/lex.c: Remove. | |
1313 | * src/reader.c (lastprec, skip_to_char, read_signed_integer) | |
1314 | (copy_character, copy_string2, copy_string, copy_identifier) | |
1315 | (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl) | |
1316 | (parse_muscle_decl, parse_dquoted_param, parse_skel_decl) | |
1317 | (parse_action): Remove. | |
1318 | * po/POTFILES.in: Adjust. | |
1319 | ||
2e047461 AD |
1320 | 2002-06-11 Akim Demaille <akim@epita.fr> |
1321 | ||
1322 | * src/reader.c (parse_action): Don't store directly into the | |
1323 | rule's action member: return the action as a string. | |
1324 | Don't require `rule_length' as an argument: compute it. | |
1325 | (grammar_current_rule_symbol_append) | |
1326 | (grammar_current_rule_action_append): New, eved out from | |
1327 | (readgram): here. | |
1328 | Remove `action_flag', `rulelength', unused now. | |
1329 | ||
9af3fbce AD |
1330 | 2002-06-11 Akim Demaille <akim@epita.fr> |
1331 | ||
1332 | * src/reader.c (grammar_current_rule_prec_set). | |
1333 | (grammar_current_rule_check): New, eved out from... | |
1334 | (readgram): here. | |
1335 | Remove `xaction', `first_rhs': useless. | |
1336 | * tests/input.at (Type clashes): New. | |
1337 | * tests/existing.at (GNU Cim Grammar): Adjust. | |
1338 | ||
1485e106 AD |
1339 | 2002-06-11 Akim Demaille <akim@epita.fr> |
1340 | ||
1341 | * src/reader.c (grammar_midrule_action): New, Eved out from | |
1342 | (readgram): here. | |
1343 | ||
da4160c3 AD |
1344 | 2002-06-11 Akim Demaille <akim@epita.fr> |
1345 | ||
1346 | * src/reader.c (grammar_rule_begin, previous_rule, current_rule): | |
1347 | New. | |
1348 | (readgram): Use them as replacement of inlined code, crule and | |
1349 | crule1. | |
1350 | ||
f6d0f937 AD |
1351 | 2002-06-11 Akim Demaille <akim@epita.fr> |
1352 | ||
1353 | * src/reader.c (grammar_end, grammar_symbol_append): New. | |
1354 | (readgram): Use them. | |
1355 | Make the use of `p' as local as possible. | |
1356 | ||
69078d4b AD |
1357 | 2002-06-10 Akim Demaille <akim@epita.fr> |
1358 | ||
1359 | GCJ's parser requires the tokens to be defined before the prologue. | |
1360 | ||
1361 | * data/bison.simple: Output the token definition before the user's | |
1362 | prologue. | |
1363 | * tests/regression.at (Braces parsing, Duplicate string) | |
1364 | (Mixing %token styles): Check the output from bison. | |
1365 | (Early token definitions): New. | |
1366 | ||
5e424082 AD |
1367 | 2002-06-10 Akim Demaille <akim@epita.fr> |
1368 | ||
1369 | * src/symtab.c (symbol_user_token_number_set): Don't complain when | |
1370 | assigning twice the same user number to a token, so that we can | |
1371 | use it in... | |
1372 | * src/lex.c (lex): here. | |
1373 | Also use `symbol_class_set' instead of hand written code. | |
1374 | * src/reader.c (parse_assoc_decl): Likewise. | |
1375 | ||
44536b35 AD |
1376 | 2002-06-10 Akim Demaille <akim@epita.fr> |
1377 | ||
1378 | * src/symtab.c, src/symtab.c (symbol_class_set) | |
1379 | (symbol_user_token_number_set): New. | |
1380 | * src/reader.c (parse_token_decl): Use them. | |
1381 | Use a switch instead of ifs. | |
1382 | Use a single argument. | |
1383 | ||
8b9f2372 AD |
1384 | 2002-06-10 Akim Demaille <akim@epita.fr> |
1385 | ||
1386 | Remove `%thong' support as it is undocumented, unused, duplicates | |
1387 | `%token's job, and creates useless e-mail traffic with people who | |
1388 | want to know what it is, why it is undocumented, unused, and | |
1389 | duplicates `%token's job. | |
1390 | ||
1391 | * src/reader.c (parse_thong_decl): Remove. | |
1392 | * src/options.c (option_table): Remove "thong". | |
1393 | * src/lex.h (tok_thong): Remove. | |
1394 | ||
3ae2b51f AD |
1395 | 2002-06-10 Akim Demaille <akim@epita.fr> |
1396 | ||
1397 | * src/symtab.c, src/symtab.c (symbol_type_set) | |
1398 | (symbol_precedence_set): New. | |
1399 | * src/reader.c (parse_type_decl, parse_assoc_decl): Use them. | |
1400 | (value_components_used): Remove, unused. | |
1401 | ||
2f1afb73 AD |
1402 | 2002-06-09 Akim Demaille <akim@epita.fr> |
1403 | ||
1404 | Move symbols handling code out of the reader. | |
1405 | ||
1406 | * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken) | |
1407 | (axiom): Move to... | |
1408 | * src/symtab.h, src/symtab.c: here. | |
1409 | ||
1410 | * src/gram.c (start_symbol): Remove: use startsymbol->number. | |
1411 | * src/reader.c (startval): Rename as... | |
1412 | * src/symtab.h, src/symtab.c (startsymbol): this. | |
1413 | * src/reader.c: Adjust. | |
1414 | ||
1415 | * src/reader.c (symbol_check_defined, symbol_make_alias) | |
1416 | (symbol_check_alias_consistence, symbol_pack, symbol_translation) | |
1417 | (token_translations_init) | |
1418 | Move to... | |
1419 | * src/symtab.c: here. | |
1420 | * src/reader.c (packsymbols): Move to... | |
1421 | * src/symtab.h, src/symtab.c (symbols_pack): here. | |
1422 | * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as | |
1423 | argument. | |
1424 | ||
e9bca3ad AD |
1425 | 2002-06-03 Akim Demaille <akim@epita.fr> |
1426 | ||
1427 | * src/muscle_tab.c (muscle_insert, muscle_find): Declarations, | |
1428 | then statements. | |
1429 | ||
86eff183 AD |
1430 | 2002-06-03 Akim Demaille <akim@epita.fr> |
1431 | ||
1432 | * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize | |
1433 | structs with non literals. | |
1434 | * src/scan-skel.l: never-interactive. | |
1435 | * src/conflicts.c (enum conflict_resolution_e): No trailing | |
1436 | comma. | |
1437 | * src/getargs.c (usage): Split long literal strings. | |
1438 | Reported by Hans Aberg. | |
1439 | ||
717be197 AD |
1440 | 2002-05-28 Akim Demaille <akim@epita.fr> |
1441 | ||
1442 | * data/bison.c++: Use C++ ostreams. | |
1443 | (cdebug_): New member. | |
1444 | ||
670ddffd AD |
1445 | 2002-05-28 Akim Demaille <akim@epita.fr> |
1446 | ||
1447 | * src/output.c (output_skeleton): Be sure to allocate enough room | |
1448 | for `/' _and_ for `\0' in full_skeleton. | |
1449 | ||
769b430f AD |
1450 | 2002-05-28 Akim Demaille <akim@epita.fr> |
1451 | ||
1452 | * data/bison.c++: Catch up with bison.simple: | |
1453 | 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> | |
1454 | and Paul Eggert <eggert@twinsun.com>: `error' handing. | |
1455 | 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_, | |
1456 | and popping traces. | |
1457 | ||
7067cb36 PH |
1458 | 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
1459 | ||
1460 | * src/output.c (output_skeleton): Put an explicit path in front of | |
1461 | the skeleton file name, rather than relying on the -I directory, | |
1462 | to partially alleviate effects of having a skeleton file lying around | |
1463 | in the current directory. | |
769b430f | 1464 | |
4a713ec2 PH |
1465 | 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
1466 | ||
769b430f | 1467 | * src/conflicts.c (log_resolution): Correct typo: |
4a713ec2 PH |
1468 | obstack_printf should be obstack_fgrow1. |
1469 | ||
b408954b AD |
1470 | 2002-05-26 Akim Demaille <akim@epita.fr> |
1471 | ||
1472 | * src/state.h (state_t): `solved_conflicts' is a new member. | |
1473 | * src/LR0.c (new_state): Set it to 0. | |
1474 | * src/conflicts.h, src/conflicts.c (print_conflicts) | |
1475 | (free_conflicts, solve_conflicts): Rename as... | |
1476 | (conflicts_print, conflicts_free, conflicts_solve): these. | |
1477 | Adjust callers. | |
1478 | * src/conflicts.c (enum conflict_resolution_e) | |
1479 | (solved_conflicts_obstack): New, used by... | |
1480 | (log_resolution): this. | |
1481 | Adjust to attach the conflict resolution to each state. | |
1482 | Complete the description with the precedence/associativity | |
1483 | information. | |
1484 | (resolve_sr_conflict): Adjust. | |
1485 | * src/print.c (print_state): Output its solved_conflicts. | |
1486 | * tests/conflicts.at (Unresolved SR Conflicts) | |
1487 | (Solved SR Conflicts): Exercise --report=all. | |
1488 | ||
a49aecd5 AD |
1489 | 2002-05-26 Akim Demaille <akim@epita.fr> |
1490 | ||
1491 | * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c, | |
1492 | * src/nullable.c, src/output.c, src/print.c, src/print_graph.c, | |
1493 | * src/reader.c, src/reduce.c, src/state.h, src/symtab.h | |
1494 | (token_number_t, item_number_as_token_number) | |
1495 | (token_number_as_item_number, muscle_insert_token_number_table): | |
1496 | Rename as... | |
1497 | (symbol_number_t, item_number_as_symbol_number) | |
1498 | (symbol_number_as_item_number, muscle_insert_symbol_number_table): | |
1499 | these, since it is more appropriate. | |
1500 | ||
5504898e AD |
1501 | 2002-05-26 Akim Demaille <akim@epita.fr> |
1502 | ||
1503 | * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional | |
1504 | `Error:' lines. | |
1505 | * data/bison.simple (yystos) [YYDEBUG]: New. | |
1506 | (yyparse) [YYDEBUG]: Display the symbols which are popped during | |
1507 | error recovery. | |
1508 | * tests/regression.at (Web2c Actions): Adjust: yystos is output now. | |
1509 | ||
ec3bc396 AD |
1510 | 2002-05-25 Akim Demaille <akim@epita.fr> |
1511 | ||
1512 | * doc/bison.texinfo (Debugging): Split into... | |
1513 | (Tracing): this new section, its former contents, and... | |
1514 | (Understanding): this new section. | |
1515 | * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced | |
1516 | by... | |
1517 | (report_flag): this. | |
1518 | Adjust all dependencies. | |
1519 | (report_args, report_types, report_argmatch): New. | |
1520 | (usage, getargs): Report/support -r, --report. | |
1521 | * src/options.h | |
1522 | (struct option_table_struct): Rename as.., | |
1523 | (struct option_table_s): this. | |
1524 | Rename the `set_flag' member to `flag' to match with getopt_long's | |
1525 | struct. | |
1526 | * src/options.c (option_table): Split verbose into an entry for | |
1527 | %verbose, and another for --verbose. | |
1528 | Support --report/-r, so remove -r from the obsolete --raw. | |
1529 | * src/print.c: Attach full item sets and lookaheads reports to | |
1530 | report_flag instead of trace_flag. | |
1531 | * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1. | |
1532 | ||
78df8250 PE |
1533 | 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
1534 | and Paul Eggert <eggert@twinsun.com> | |
769b430f | 1535 | |
78df8250 PE |
1536 | * data/bison.simple (yyparse): Correct error handling to conform to |
1537 | POSIX and yacc. Specifically, after syntax error is discovered, | |
1538 | do not reduce further before shifting the error token. | |
1539 | Clean up the code a bit by removing the labels yyerrdefault, | |
1540 | yyerrhandle, yyerrpop. | |
1541 | * NEWS: Document the above. | |
1542 | ||
c0c9ea05 PH |
1543 | 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
1544 | ||
1545 | * data/bison.simple (yyr1): Don't use yy_token_number_type as element | |
1546 | type; it isn't always big enough, since it doesn't necessarily | |
1547 | include non-terminals. | |
769b430f | 1548 | (yytranslate): Expand definition of yy_token_number_type, so that |
c0c9ea05 PH |
1549 | the latter can be removed. |
1550 | (yy_token_number_type): Remove, only one use. | |
1551 | * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple--- | |
1552 | don't use TokenNumberType as element type. | |
769b430f | 1553 | |
c0c9ea05 PH |
1554 | * tests/regression.at: Modify expected output to agree with change |
1555 | to yyr1 and yytranslate. | |
769b430f | 1556 | |
6390a83f FK |
1557 | 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com> |
1558 | ||
1559 | * src/reader.c (parse_action): Use copy_character instead of | |
1560 | obstack_1grow. | |
1561 | ||
db7c8e9a AD |
1562 | 2002-05-13 Akim Demaille <akim@epita.fr> |
1563 | ||
1564 | * tests/regression.at (Token definitions): Prototype yylex and | |
1565 | yyerror. | |
1566 | ||
fcc61800 PH |
1567 | 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU> |
1568 | ||
158c687b | 1569 | * src/scan-skel.l: Correct off-by-one error in handling of __oline__. |
fcc61800 PH |
1570 | * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect |
1571 | 32-bit arithmetic. | |
1572 | * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto. | |
1573 | ||
5683e9b2 AD |
1574 | 2002-05-07 Akim Demaille <akim@epita.fr> |
1575 | ||
1576 | * tests/synclines.at: Be sure to prototype yylex and yyerror to | |
1577 | avoid GCC warnings. | |
1578 | ||
0c2d3f4c AD |
1579 | 2002-05-07 Akim Demaille <akim@epita.fr> |
1580 | ||
1581 | Kill GCC warnings. | |
1582 | ||
1583 | * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop | |
1584 | over the RHS of each rule. | |
1585 | * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int. | |
1586 | * src/state.h (state_t): Member `nitems' is unsigned short. | |
1587 | * src/LR0.c (get_state): Adjust. | |
1588 | * src/reader.c (packgram): Likewise. | |
1589 | * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type | |
1590 | `Type'. | |
1591 | (muscle_insert_int_table): Remove, unused. | |
1592 | (prepare_rules): Remove `max'. | |
1593 | ||
1565b720 AD |
1594 | 2002-05-06 Akim Demaille <akim@epita.fr> |
1595 | ||
1596 | * src/closure.c (print_firsts): Display of the symbol tags. | |
1597 | (bitmatrix_print): Move to... | |
1598 | * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump): | |
1599 | here. | |
1600 | * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust. | |
1601 | ||
cfaee611 AD |
1602 | 2002-05-06 Akim Demaille <akim@epita.fr> |
1603 | ||
1604 | * src/muscle_tab.c (muscle_m4_output): Must return TRUE for | |
1605 | hash_do_for_each. | |
1606 | ||
458be8e0 AD |
1607 | 2002-05-06 Akim Demaille <akim@epita.fr> |
1608 | ||
1609 | * src/LR0.c (new_state, get_state): Instead of using the global | |
1610 | `kernel_size' and `kernel_base', have two new arguments: | |
1611 | `core_size' and `core'. | |
1612 | Adjust callers. | |
1613 | ||
a900a624 AD |
1614 | 2002-05-06 Akim Demaille <akim@epita.fr> |
1615 | ||
1616 | * src/reader.c (packgram): No longer end `ritem' with a 0 | |
1617 | sentinel: it is not used. | |
1618 | ||
d4e7d3a1 AD |
1619 | 2002-05-05 Akim Demaille <akim@epita.fr> |
1620 | ||
1621 | New experimental feature: display the lookaheads in the report and | |
1622 | graph. | |
1623 | ||
1624 | * src/print (print_core): When --trace-flag, display the rules | |
1625 | lookaheads. | |
1626 | * src/print_graph.c (print_core): Likewise. | |
1627 | Swap the arguments. | |
1628 | Adjust caller. | |
1629 | ||
39ceb25b AD |
1630 | 2002-05-05 Akim Demaille <akim@epita.fr> |
1631 | ||
1632 | * tests/torture.at (Many lookaheads): New test. | |
1633 | ||
5372019f AD |
1634 | 2002-05-05 Akim Demaille <akim@epita.fr> |
1635 | ||
1636 | * src/output.c (GENERATE_OUTPUT_TABLE): Replace with... | |
1637 | (GENERATE_MUSCLE_INSERT_TABLE): this. | |
1638 | (output_int_table, output_unsigned_int_table, output_short_table) | |
1639 | (output_token_number_table, output_item_number_table): Replace with... | |
1640 | (muscle_insert_int_table, muscle_insert_unsigned_int_table) | |
1641 | (muscle_insert_short_table, muscle_insert_token_number_table) | |
1642 | (muscle_insert_item_number_table): these. | |
1643 | Adjust all callers. | |
1644 | (prepare_tokens): Don't free `translations', since... | |
1645 | * src/reader.h, src/reader.c (grammar_free): do it. | |
1646 | Move to... | |
1647 | * src/gram.h, src/gram.c (grammar_free): here. | |
1648 | * data/bison.simple, data/bison.c++: b4_token_number_max is now | |
1649 | b4_translate_max. | |
1650 | ||
5df5f6d5 AD |
1651 | 2002-05-05 Akim Demaille <akim@epita.fr> |
1652 | ||
1653 | * src/output.c (output_unsigned_int_table): New. | |
1654 | (prepare_rules): `i' is unsigned. | |
1655 | `prhs', `rline', `r2' are unsigned int. | |
1656 | Rename muscle `rhs_number_max' as `rhs_max'. | |
1657 | Output muscles `prhs_max', `rline_max', and `r2_max'. | |
1658 | Free rline and r1. | |
1659 | * data/bison.simple, data/bison.c++: Adjust to use these muscles | |
1660 | to compute types instead of constant types. | |
1661 | * tests/regression.at (Web2c Actions): Adjust. | |
1662 | ||
b87f8b21 AD |
1663 | 2002-05-04 Akim Demaille <akim@epita.fr> |
1664 | ||
1665 | * src/symtab.h (SALIAS, SUNDEF): Rename as... | |
1666 | (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these. | |
1667 | Adjust dependencies. | |
1668 | * src/output.c (token_definitions_output): Be sure not to output a | |
1669 | `#define 'a'' when fed with `%token 'a' "a"'. | |
1670 | * tests/regression.at (Token definitions): New. | |
1671 | ||
8bb936e4 PE |
1672 | 2002-05-03 Paul Eggert <eggert@twinsun.com> |
1673 | ||
1674 | * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE | |
1675 | for K&R C. | |
1676 | ||
1677 | 2002-05-03 gettextize <bug-gnu-gettext@gnu.org> | |
1678 | ||
1679 | * Makefile.am (SUBDIRS): Remove intl. | |
1680 | (EXTRA_DIST): Add config/config.rpath. | |
1681 | ||
53c71a12 AD |
1682 | 2002-05-03 Akim Demaille <akim@epita.fr> |
1683 | ||
1684 | * data/bison.simple (m4_if): Don't output empty enums. | |
1685 | And actually, output valid enum definitions :(. | |
1686 | ||
289dd0cf AD |
1687 | 2002-05-03 Akim Demaille <akim@epita.fr> |
1688 | ||
1689 | * configure.bat: Remove, completely obsolete. | |
1690 | * Makefile.am (EXTRA_DIST): Adjust. | |
1691 | Don't distribute config.rpath... | |
1692 | * config/Makefile.am (EXTRA_DIST): Do it. | |
1693 | ||
db85e524 AD |
1694 | 2002-05-03 Akim Demaille <akim@epita.fr> |
1695 | ||
1696 | * configure.in (GETTEXT_VERSION): New. | |
1697 | Suggested by Bruno Haible for the forthcoming Gettext 0.10.3. | |
1698 | ||
83ccf991 AD |
1699 | 2002-05-03 Akim Demaille <akim@epita.fr> |
1700 | ||
1701 | * data/bison.simple (b4_token_enum): New. | |
1702 | (b4_token_defines): Use it to output tokens both as #define and | |
1703 | enums. | |
1704 | Suggested by Paul Eggert. | |
1705 | * src/output.c (token_definitions_output): Don't output spurious | |
1706 | white spaces. | |
1707 | ||
1f418995 AD |
1708 | 2002-05-03 Akim Demaille <akim@epita.fr> |
1709 | ||
1710 | * data/m4sugar/m4sugar.m4: Update from CVS Autoconf. | |
1711 | ||
45119f04 RA |
1712 | 2002-05-02 Robert Anisko <robert@lrde.epita.fr> |
1713 | ||
1714 | * data/bison.c++: Adapt expansion of $s and @s to the C++ parser. | |
1715 | Update the stack class, give a try to deque as the default container. | |
1716 | ||
b2d52318 AD |
1717 | 2002-05-02 Akim Demaille <akim@epita.fr> |
1718 | ||
1719 | * data/bison.simple (yyparse): Do not implement @$ = @1. | |
1720 | (YYLLOC_DEFAULT): Adjust to do it. | |
1721 | * doc/bison.texinfo (Location Default Action): Fix. | |
1722 | ||
3a8b4109 AD |
1723 | 2002-05-02 Akim Demaille <akim@epita.fr> |
1724 | ||
1725 | * src/reader.c (parse_braces): Merge into... | |
1726 | (parse_action): this. | |
1727 | ||
84614e13 AD |
1728 | 2002-05-02 Akim Demaille <akim@epita.fr> |
1729 | ||
1730 | * configure.in (ALL_LINGUAS): Remove. | |
1731 | * po/LINGUAS, hr.po: New. | |
1732 | ||
fdbcd8e2 AD |
1733 | 2002-05-02 Akim Demaille <akim@epita.fr> |
1734 | ||
1735 | Remove the so called hairy (semantic) parsers. | |
1736 | ||
1737 | * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove. | |
1738 | * src/gram.h, src/gram.c (semantic_parser): Remove. | |
1739 | (rule_t): Remove the guard and guard_line members. | |
1740 | * src/lex.h (token_t): remove tok_guard. | |
1741 | * src/options.c (option_table): Remove %guard and %semantic_parser | |
1742 | support. | |
1743 | * src/output.c, src/output.h (guards_output): Remove. | |
1744 | (prepare): Adjust. | |
1745 | (token_definitions_output): Don't output the `T' | |
1746 | tokens (???). | |
1747 | (output_skeleton): Don't output the guards. | |
1748 | * src/files.c, src/files.c (attrsfile): Remove. | |
1749 | * src/reader.c (symbol_list): Remove the guard and guard_line | |
1750 | members. | |
1751 | Adjust dependencies. | |
1752 | (parse_guard): Remove. | |
1753 | * data/bison.hairy: Remove. | |
1754 | * doc/bison.texinfo (Environment Variables): Remove occurrences of | |
1755 | BISON_HAIRY. | |
1756 | ||
82b6cb3f AD |
1757 | 2002-05-02 Akim Demaille <akim@epita.fr> |
1758 | ||
1759 | * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action) | |
1760 | (parse_guard): Rename the formal argument `stack_offset' as | |
1761 | `rule_length', which is more readable. | |
1762 | Adjust callers. | |
1763 | (copy_at, copy_dollar): Instead of outputting the hard coded | |
1764 | values of $$, $n and so forth, output invocation to b4_lhs_value, | |
1765 | b4_lhs_location, b4_rhs_value, and b4_rhs_location. | |
900c877b AD |
1766 | Note: this patch partially drops `semantic-parser' support: it |
1767 | always does `rule_length - n', where semantic parsers ought to | |
1768 | always use `-n'. | |
82b6cb3f AD |
1769 | * data/bison.simple, data/bison.c++ (b4_lhs_value) |
1770 | (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New. | |
1771 | ||
6cbfbcc5 AD |
1772 | 2002-05-02 Akim Demaille <akim@epita.fr> |
1773 | ||
1774 | * configure.in (AC_INIT): Bump to 1.49b. | |
1775 | (AM_INIT_AUTOMAKE): Short invocation. | |
1776 | ||
b8548114 AD |
1777 | 2002-05-02 Akim Demaille <akim@epita.fr> |
1778 | ||
1779 | Version 1.49a. | |
1780 | ||
c20cd1fa AD |
1781 | 2002-05-01 Akim Demaille <akim@epita.fr> |
1782 | ||
1783 | * src/skeleton.h: Remove. | |
1784 | ||
8a9566d4 AD |
1785 | 2002-05-01 Akim Demaille <akim@epita.fr> |
1786 | ||
1787 | * src/skeleton.h: Fix the #endif. | |
1788 | Reported by Magnus Fromreide. | |
1789 | ||
8c6d399a PE |
1790 | 2002-04-26 Paul Eggert <eggert@twinsun.com> |
1791 | ||
1792 | * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL): | |
1793 | Define if we define YYSTYPE and YYLTYPE, respectively. | |
b756bb75 | 1794 | (YYCOPY): Fix [] quoting problem in the non-GCC case. |
8a9566d4 | 1795 | |
2b7ed18a RA |
1796 | 2002-04-25 Robert Anisko <robert@lrde.epita.fr> |
1797 | ||
1798 | * src/scan-skel.l: Postprocess quadrigraphs. | |
1799 | ||
1800 | * src/reader.c (copy_character): New function, used to output | |
1801 | single characters while replacing `[' and `]' with quadrigraphs, to | |
1802 | avoid troubles with M4 quotes. | |
1803 | (copy_comment): Output characters with copy_character. | |
1804 | (read_additionnal_code): Likewise. | |
1805 | (copy_string2): Likewise. | |
1806 | (copy_definition): Likewise. | |
1807 | ||
1808 | * tests/calc.at: Exercise M4 quoting. | |
1809 | ||
34a89c50 AD |
1810 | 2002-04-25 Akim Demaille <akim@epita.fr> |
1811 | ||
1812 | * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space | |
1813 | between `!' and the command. | |
1814 | Reported by Paul Eggert. | |
1815 | ||
0dd1580a RA |
1816 | 2002-04-24 Robert Anisko <robert@lrde.epita.fr> |
1817 | ||
1818 | * tests/calc.at: Exercise prologue splitting. | |
1819 | ||
1820 | * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and | |
1821 | `b4_post_prologue' instead of `b4_prologue'. | |
1822 | ||
1823 | * src/output.c (prepare): Add the `pre_prologue' and `post_prologue' | |
1824 | muscles. | |
1825 | (output): Free pre_prologue_obstack and post_prologue_obstack. | |
1826 | * src/files.h, src/files.c (attrs_obstack): Remove. | |
1827 | (pre_prologue_obstack, post_prologue_obstack): New. | |
1828 | * src/reader.c (copy_definition): Add a parameter to specify the | |
1829 | obstack to fill, instead of using attrs_obstack unconditionally. | |
1830 | (read_declarations): Pass pre_prologue_obstack to copy_definition if | |
1831 | `%union' has not yet been seen, pass post_prologue_obstack otherwise. | |
1832 | ||
83c1796f PE |
1833 | 2002-04-23 Paul Eggert <eggert@twinsun.com> |
1834 | ||
1835 | * data/bison.simple: Remove unnecessary commentary and white | |
1836 | space differences from 1_29-branch. | |
1837 | Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE). | |
1838 | ||
1839 | (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY, | |
1840 | YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or | |
1841 | if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial | |
1842 | constructors or destructors. | |
1843 | ||
1844 | (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack. | |
1845 | ||
1207eeac AD |
1846 | 2002-04-23 Akim Demaille <akim@epita.fr> |
1847 | ||
1848 | * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels. | |
1849 | * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's | |
1850 | location with columns. | |
1851 | * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'. | |
1852 | All reported by Paul Eggert. | |
1853 | ||
78ab8f67 AD |
1854 | 2002-04-22 Akim Demaille <akim@epita.fr> |
1855 | ||
1856 | * src/reduce.c (dump_grammar): Move to... | |
1857 | * src/gram.h, src/gram.c (grammar_dump): here. | |
1858 | Be sure to separate long item numbers. | |
1859 | Don't read the members of a rule's prec if its nil. | |
1860 | ||
133c20e2 AD |
1861 | 2002-04-22 Akim Demaille <akim@epita.fr> |
1862 | ||
1863 | * src/output.c (table_size, table_grow): New. | |
1864 | (MAXTABLE): Remove, replace uses with table_size. | |
1865 | (pack_vector): Instead of dying when the table is too big, grow it. | |
1866 | ||
9515e8a7 AD |
1867 | 2002-04-22 Akim Demaille <akim@epita.fr> |
1868 | ||
1869 | * data/bison.simple (yyr1): Its type is that of a token number. | |
1870 | * data/bison.c++ (r1_): Likewise. | |
1871 | * tests/regression.at (Web2c Actions): Adjust. | |
1872 | ||
23c5a174 AD |
1873 | 2002-04-22 Akim Demaille <akim@epita.fr> |
1874 | ||
1875 | * src/reader.c (token_translations_init): 256 is now the default | |
1876 | value for the error token, i.e., it will be assigned another | |
1877 | number if the user assigned 256 to one of her tokens. | |
1878 | (reader): Don't force 256 to error. | |
1879 | * doc/bison.texinfo (Symbols): Adjust. | |
1880 | * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR) | |
1881 | (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3 | |
1882 | etc. instead of 10, 20, 30 (which was used to `jump' over error | |
1883 | (256) and undefined (2)). | |
1884 | ||
5fbb0954 AD |
1885 | 2002-04-22 Akim Demaille <akim@epita.fr> |
1886 | ||
1887 | Propagate more token_number_t. | |
1888 | ||
1889 | * src/gram.h (token_number_as_item_number) | |
1890 | (item_number_as_token_number): New. | |
1891 | * src/output.c (GENERATE_OUTPUT_TABLE): New. | |
1892 | Use it to create output_item_number_table and | |
1893 | output_token_number_table. | |
1894 | * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c, | |
1895 | * src/lex.c, src/nullable.c, src/output.c, src/print.c, | |
1896 | * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h, | |
1897 | * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts. | |
1898 | ||
4f940944 AD |
1899 | 2002-04-22 Akim Demaille <akim@epita.fr> |
1900 | ||
1901 | * src/output.h, src/output.c (get_lines_number): Remove. | |
1902 | ||
3ded9a63 AD |
1903 | 2002-04-19 Akim Demaille <akim@epita.fr> |
1904 | ||
1905 | * doc/bison.texinfo (Actions): Make clear that `|' is not the same | |
1906 | as Lex/Flex'. | |
1907 | (Debugging): More details about enabling the debugging features. | |
1908 | (Table of Symbols): Describe $$, $n, @$, and @n. | |
1909 | Suggested by Tim Josling. | |
1910 | ||
e0c471a9 AD |
1911 | 2002-04-19 Akim Demaille <akim@epita.fr> |
1912 | ||
1913 | * doc/bison.texinfo: Remove the uses of the obsolete @refill. | |
1914 | ||
fecc10cd AD |
1915 | 2002-04-10 Akim Demaille <akim@epita.fr> |
1916 | ||
1917 | * src/system.h: Rely on HAVE_LIMITS_H. | |
1918 | Suggested by Paul Eggert. | |
1919 | ||
51dec47b AD |
1920 | 2002-04-09 Akim Demaille <akim@epita.fr> |
1921 | ||
1922 | * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the | |
1923 | full stderr, and strip it according to the bison options, instead | |
1924 | of composing the error message from different bits. | |
1925 | This makes it easier to check for several error messages. | |
1926 | Adjust all the invocations. | |
1927 | Add an invocation exercising the error token. | |
1928 | Add an invocation demonstrating a stupid error message. | |
1929 | (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0. | |
1930 | Adjust the tests. | |
1931 | Error message are for stderr, not stdout. | |
1932 | ||
007a50a4 AD |
1933 | 2002-04-09 Akim Demaille <akim@epita.fr> |
1934 | ||
1935 | * src/gram.h, src/gram.c (error_token_number): Remove, use | |
1936 | errtoken->number. | |
1937 | * src/reader.c (reader): Don't specify the user token number (2) | |
1938 | for $undefined, as it uselessly prevents using it. | |
1939 | * src/gram.h (token_number_t): Move to... | |
1940 | * src/symtab.h: here. | |
1941 | (state_t.number): Is a token_number_t. | |
1942 | * src/print.c, src/reader.c: Use undeftoken->number instead of | |
1943 | hard coded 2. | |
1944 | (Even though this 2 is not the same as above: the number of the | |
1945 | undeftoken remains being 2, it is its user token number which | |
1946 | might not be 2). | |
1947 | * src/output.c (prepare_tokens): Rename the `maxtok' muscle with | |
1948 | `user_token_number_max'. | |
1949 | Output `undef_token_number'. | |
1950 | * data/bison.simple, data/bison.c++: Use them. | |
1951 | Be sure to map invalid yylex return values to | |
1952 | `undef_token_number'. This saves us from gratuitous SEGV. | |
1953 | ||
1954 | * tests/conflicts.at (Solved SR Conflicts) | |
1955 | (Unresolved SR Conflicts): Adjust. | |
1956 | * tests/regression.at (Web2c Actions): Adjust. | |
1957 | ||
06446ccf AD |
1958 | 2002-04-08 Akim Demaille <akim@epita.fr> |
1959 | ||
1960 | * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/. | |
1961 | Adding #line. | |
1962 | Remove the duplicate `typedefs'. | |
1963 | (RhsNumberType): Fix the declaration and various other typos. | |
1964 | Use __ofile__. | |
1965 | * data/bison.simple: Use __ofile__. | |
1966 | * src/scan-skel.l: Handle __ofile__. | |
1967 | ||
62a3e4f0 AD |
1968 | 2002-04-08 Akim Demaille <akim@epita.fr> |
1969 | ||
1970 | * src/gram.h (item_number_t): New, the type of item numbers in | |
1971 | RITEM. Note that it must be able to code symbol numbers as | |
1972 | positive number, and the negation of rule numbers as negative | |
1973 | numbers. | |
1974 | Adjust all dependencies (pretty many). | |
1975 | * src/reduce.c (rule): Remove this `short *' pointer: use | |
1976 | item_number_t. | |
1977 | * src/system.h (MINSHORT, MAXSHORT): Remove. | |
1978 | Include `limits.h'. | |
1979 | Adjust dependencies to using SHRT_MAX and SHRT_MIN. | |
1980 | (shortcpy): Remove. | |
1981 | (MAXTABLE): Move to... | |
1982 | * src/output.c (MAXTABLE): here. | |
1983 | (prepare_rules): Use output_int_table to output rhs. | |
1984 | * data/bison.simple, data/bison.c++: Adjust. | |
1985 | * tests/torture.at (Big triangle): Move the limit from 254 to | |
1986 | 500. | |
1987 | * tests/regression.at (Web2c Actions): Ajust. | |
1988 | ||
1989 | Trying with bigger grammars shows various phenomena: at 3000 (28Mb | |
1990 | of grammar file) bison is killed by my system, at 2000 (12Mb) bison | |
1991 | passes, but produces negative #line number, once fixed, GCC is | |
1992 | killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of | |
1993 | C), it passes. | |
1994 | * src/state.h (state_h): Code input lines on ints, not shorts. | |
1995 | ||
bb88b0fc AD |
1996 | 2002-04-08 Akim Demaille <akim@epita.fr> |
1997 | ||
1998 | * src/reduce.c (reduce_grammar): First reduce the nonterminals, | |
1999 | and then the grammar. | |
2000 | ||
9a636f47 AD |
2001 | 2002-04-08 Akim Demaille <akim@epita.fr> |
2002 | ||
2003 | * src/system.h: No longer using strndup. | |
2004 | ||
680e8701 AD |
2005 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2006 | ||
2007 | * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New. | |
2008 | * src/output.c (output_table_data): Return the longest number. | |
2009 | (prepare_tokens): Output `token_number_max'). | |
2010 | * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type): | |
2011 | New. | |
2012 | Use them to define yy_token_number_type/TokenNumberType. | |
2013 | Use this type for yytranslate. | |
2014 | * tests/torture.at (Big triangle): Push the limit from 124 to | |
2015 | 253. | |
2016 | * tests/regression.at (Web2c Actions): Adjust. | |
2017 | ||
817e9f41 AD |
2018 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2019 | ||
2020 | * tests/torture.at (Big triangle): New. | |
2021 | (GNU AWK Grammar, GNU Cim Grammar): Move to... | |
2022 | * tests/existing.at: here. | |
2023 | ||
5123689b AD |
2024 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2025 | ||
2026 | * src/gram.h, src/gram.c (nitems): Remove, it is an alias of | |
2027 | nritems. | |
2028 | Adjust dependencies. | |
2029 | ||
f3849179 AD |
2030 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2031 | ||
2032 | * src/reader.c: Normalize increments to prefix form. | |
2033 | ||
bd02036a AD |
2034 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2035 | ||
2036 | * src/reader.c, symtab.c: Remove debugging code. | |
2037 | ||
db8837cb AD |
2038 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2039 | ||
2040 | Rename all the `bucket's as `symbol_t'. | |
2041 | ||
2042 | * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c, | |
2043 | * src/reader.c, src/reader.h, src/reduce.c, src/state.h, | |
2044 | * src/symtab.c, src/symtab.h (bucket): Rename as... | |
2045 | (symbol_t): this. | |
2046 | (symbol_list_new, bucket_check_defined, bucket_make_alias) | |
2047 | (bucket_check_alias_consistence, bucket_pack, bucket_translation) | |
2048 | (bucket_new, bucket_free, hash_compare_bucket, hash_bucket) | |
2049 | (buckets_new, buckets_free, buckets_do): Rename as... | |
2050 | (symbol_list_new, symbol_check_defined, symbol_make_alias) | |
2051 | (symbol_check_alias_consistence, symbol_pack, symbol_translation) | |
2052 | (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t) | |
2053 | (symbols_new, symbols_free, symbols_do): these. | |
2054 | ||
72a23c97 AD |
2055 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2056 | ||
2057 | Use lib/hash for the symbol table. | |
2058 | ||
2059 | * src/gram.c (ntokens): Initialize to 1, to reserve a slot for | |
2060 | EOF. | |
2061 | * src/lex.c (lex): Set the `number' member of new terminals. | |
2062 | * src/reader.c (bucket_check_defined, bucket_make_alias) | |
2063 | (bucket_check_alias_consistence, bucket_translation): New. | |
2064 | (reader, grammar_free, readgram, token_translations_init) | |
2065 | (packsymbols): Adjust. | |
2066 | (reader): Number the predefined tokens. | |
2067 | * src/reduce.c (inaccessable_symbols): Just use hard coded numbers | |
2068 | for predefined tokens. | |
2069 | * src/symtab.h (bucket): Remove all the hash table related | |
2070 | members. | |
2071 | * src/symtab.c (symtab): Replace by... | |
2072 | (bucket_table): this. | |
2073 | (bucket_new, bucket_free, hash_compare_bucket, hash_bucket) | |
2074 | (buckets_new, buckets_do): New. | |
2075 | ||
280a38c3 AD |
2076 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2077 | ||
2078 | * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems) | |
2079 | (start_symbol, max_user_token_number, semantic_parser) | |
2080 | (error_token_number): Initialize. | |
2081 | * src/reader.c (grammar, start_flag, startval, typed, lastprec): | |
2082 | Initialize. | |
2083 | (reader): Don't. | |
2084 | (errtoken, eoftoken, undeftoken, axiom): Extern. | |
2085 | ||
03b31c0c AD |
2086 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2087 | ||
2088 | * src/gram.h (rule_s): prec and precsym are now pointers | |
2089 | to the bucket giving the priority/associativity. | |
2090 | Member `associativity' removed: useless. | |
2091 | * src/reduce.c, src/conflicts.c: Adjust. | |
2092 | ||
8b3df748 AD |
2093 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2094 | ||
2095 | * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c: | |
2096 | Properly escape the symbols' TAG when outputting them. | |
2097 | ||
e601aa1d AD |
2098 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2099 | ||
2100 | * src/lalr.h (LA): Is a bitsetv, not bitset*. | |
2101 | ||
b0299a2e AD |
2102 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2103 | ||
2104 | * src/lalr.h, src/lalr.c (LAruleno): Replace with... | |
2105 | (LArule): this, which is an array to rule_t*. | |
2106 | * src/print.c, src/conflicts.c: Adjust. | |
2107 | ||
d7e1f00c AD |
2108 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2109 | ||
2110 | * src/gram.h (rule_t): Rename `number' as `user_number'. | |
2111 | `number' is a new member. | |
2112 | Adjust dependencies. | |
2113 | * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number. | |
2114 | ||
cc9305dd AD |
2115 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2116 | ||
2117 | As a result of the previous patch, it is no longer needed | |
2118 | to reorder ritem itself. | |
2119 | ||
2120 | * src/reduce.c (reduce_grammar_tables): Don't sort RITEM. | |
2121 | ||
b0940840 AD |
2122 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2123 | ||
2124 | Be sure never to walk through RITEMS, but use only data related to | |
2125 | the rules themselves. RITEMS should be banished. | |
2126 | ||
2127 | * src/output.c (output_token_translations): Rename as... | |
2128 | (prepare_tokens): this. | |
2129 | In addition to `translate', prepare the muscles `tname' and | |
2130 | `toknum', which were handled by... | |
2131 | (output_rule_data): this. | |
2132 | Remove, and move the remainder of its outputs into... | |
2133 | (prepare_rules): this new routines, which also merges content from | |
2134 | (output_gram): this. | |
2135 | (prepare_rules): Be sure never to walk through RITEMS. | |
2136 | (output_stos): Rename as... | |
2137 | (prepare_stos): this. | |
2138 | (output): Always invoke prepare_states, after all, just don't use it | |
2139 | in the output if you don't need it. | |
2140 | ||
643a5994 AD |
2141 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2142 | ||
2143 | * src/LR0.c (new_state): Display `nstates' as the name of the | |
2144 | newly created state. | |
2145 | Adjust to initialize first_state and last_state if needed. | |
2146 | Be sure to distinguish the initial from the final state. | |
2147 | (new_states): Create the itemset of the initial state, and use | |
2148 | new_state. | |
2149 | * src/closure.c (closure): Now that the initial state has its | |
2150 | items properly set, there is no need for a special case when | |
2151 | creating `ruleset'. | |
2152 | ||
2153 | As a result, now the rule 0, reducing to $axiom, is visible in the | |
2154 | outputs. Adjust the test suite. | |
2155 | ||
2156 | * tests/conflicts.at (Solved SR Conflicts) | |
2157 | (Unresolved SR Conflicts): Adjust. | |
2158 | * tests/regression.at (Web2c Report, Rule Line Numbers): Idem. | |
2159 | * tests/conflicts.at (S/R in initial): New. | |
2160 | ||
b4c4ccc2 AD |
2161 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2162 | ||
2163 | * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over | |
2164 | the RHS of the rules. | |
2165 | * src/output.c (output_gram): Likewise. | |
2166 | ||
bba97eb2 AD |
2167 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2168 | ||
2169 | * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's | |
2170 | bucket. | |
2171 | Adjust all dependencies. | |
2172 | * src/reduce.c (nonterminals_reduce): Don't forget to renumber the | |
2173 | `number' of the buckets too. | |
2174 | * src/gram.h: Include `symtab.h'. | |
2175 | (associativity): Move to... | |
2176 | * src/symtab.h: here. | |
2177 | No longer include `gram.h'. | |
2178 | ||
c3b407f4 AD |
2179 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2180 | ||
2181 | * src/gram.h, src/gram.c (rules_rhs_length): New. | |
2182 | (ritem_longest_rhs): Use it. | |
2183 | * src/gram.h (rule_t): `number' is a new member. | |
2184 | * src/reader.c (packgram): Set it. | |
2185 | * src/reduce.c (reduce_grammar_tables): Move the useless rules at | |
2186 | the end of `rules', and count them out of `nrules'. | |
2187 | (reduce_output, dump_grammar): Adjust. | |
2188 | * src/print.c (print_grammar): It is no longer needed to check for | |
2189 | the usefulness of a rule, as useless rules are beyond `nrules + 1'. | |
2190 | * tests/reduce.at (Reduced Automaton): New test. | |
2191 | ||
11652ab3 AD |
2192 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2193 | ||
2194 | * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a | |
2195 | lacking `+ 1' to nrules, Bison reported as useless a token if it | |
2196 | was used solely to set the precedence of the last rule... | |
2197 | ||
26b23c1a AD |
2198 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2199 | ||
2200 | * data/bison.c++, data/bison.simple: Don't output the current file | |
2201 | name in #line, to avoid useless diffs between two identical | |
2202 | outputs under different names. | |
2203 | ||
18bcecb0 AD |
2204 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2205 | ||
2206 | * src/closure.c, src/print.c, src/reader.c, src/reduce.c: | |
2207 | Normalize loops to using `< nrules + 1', not `<= nrules'. | |
2208 | ||
fa770c86 AD |
2209 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2210 | ||
2211 | * TODO: Update. | |
2212 | ||
d9b739c3 AD |
2213 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2214 | ||
2215 | * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename | |
2216 | bucket.value as bucket.number. | |
2217 | ||
99013900 AD |
2218 | 2002-04-07 Akim Demaille <akim@epita.fr> |
2219 | ||
2220 | * src/closure.c, src/derives.c, src/gram.h, src/lalr.c, | |
2221 | * src/nullable.c, src/output.c, src/print.c, src/print_graph.c, | |
2222 | * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the | |
2223 | RHS, instead of being an index in RITEMS. | |
2224 | ||
e966383b PE |
2225 | 2002-04-04 Paul Eggert <eggert@twinsun.com> |
2226 | ||
2227 | * doc/bison.texinfo: Update copyright date. | |
2228 | (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII. | |
2229 | (Symbols): Warn about running Bison in one character set, | |
2230 | but compiling and/or running in an incompatible one. | |
2231 | Warn about character code 256, too. | |
2232 | ||
2233 | 2002-04-03 Paul Eggert <eggert@twinsun.com> | |
2234 | ||
2235 | * src/bison.data (YYSTACK_ALLOC): Depend on whether | |
2236 | YYERROR_VERBOSE is nonzero, not whether it is defined. | |
2237 | ||
2238 | Merge changes from bison-1_29-branch. | |
c307773e | 2239 | |
8d6c48b9 PE |
2240 | 2002-03-20 Paul Eggert <eggert@twinsun.com> |
2241 | ||
2242 | Merge fixes from Debian bison_1.34-1.diff. | |
2243 | ||
2244 | * configure.in (AC_PREREQ): 2.53. | |
2245 | ||
e53c6322 AD |
2246 | 2002-03-20 Akim Demaille <akim@epita.fr> |
2247 | ||
2248 | * src/conflicts.c (log_resolution): Argument `resolution' is const. | |
2249 | ||
9ffbeca7 PE |
2250 | 2002-03-19 Paul Eggert <eggert@twinsun.com> |
2251 | ||
21db0b2a PE |
2252 | * src/bison.simple (YYCOPY): New macro. |
2253 | (YYSTACK_RELOCATE): Use it. | |
2254 | Remove Type arg; no longer needed. All callers changed. | |
2255 | (yymemcpy): Remove; no longer needed. | |
2256 | ||
9ffbeca7 PE |
2257 | * Makefile.am (AUTOMAKE_OPTIONS): 1.6. |
2258 | * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove. | |
2259 | ||
642cb8f8 AD |
2260 | 2002-03-19 Akim Demaille <akim@epita.fr> |
2261 | ||
2262 | Test and fix the #line outputs. | |
2263 | ||
2264 | * tests/atlocal.at (GCC): New. | |
2265 | * tests/synclines.at (AT_TEST_SYNCLINE): New macro. | |
2266 | (Prologue synch line, ,%union synch line, Postprologue synch line) | |
2267 | (Action synch line, Epilogue synch line): New tests. | |
2268 | * src/reader.c (parse_union_decl): Define the muscle stype_line. | |
2269 | * data/bison.simple, data/bison.c++: Use it. | |
2270 | ||
3c31a486 AD |
2271 | 2002-03-19 Akim Demaille <akim@epita.fr> |
2272 | ||
2273 | * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts) | |
2274 | (Solved SR Conflicts, %expect not enough, %expect right) | |
2275 | (%expect too much): Move to... | |
2276 | * tests/conflicts.at: this new file. | |
2277 | ||
0d8bed56 AD |
2278 | 2002-03-19 Akim Demaille <akim@epita.fr> |
2279 | ||
2280 | * data/m4sugar/m4sugar.m4: Update from CVS Autoconf. | |
2281 | * data/bison.simple, data/bison.c++: Handle the `#define' part, so | |
2282 | that we can move to enums for instance. | |
2283 | * src/output.c (token_definitions_output): Output a list of | |
2284 | `token-name, token-number' instead of the #define. | |
2285 | (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'. | |
2286 | ||
9208d17f AD |
2287 | 2002-03-14 Akim Demaille <akim@epita.fr> |
2288 | ||
2289 | Use Gettext 0.11.1. | |
2290 | ||
af27eacb RA |
2291 | 2002-03-09 Robert Anisko <robert@lrde.epita.fr> |
2292 | ||
2293 | * data/bison.c++: Make the user able to add members to the generated | |
2294 | parser by subclassing. | |
2295 | ||
9101a310 RA |
2296 | 2002-03-05 Robert Anisko <robert@lrde.epita.fr> |
2297 | ||
2298 | * src/reader.c (read_additionnal_code): `c' should be an integer, not | |
2299 | a character. | |
2300 | Reported by Nicolas Tisserand and Nicolas Burrus. | |
2301 | ||
fff9bf0b RA |
2302 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
2303 | ||
2304 | * src/reader.c: Warn about lacking semi-colons, do not complain. | |
2305 | ||
64dba31e RA |
2306 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
2307 | ||
2308 | * data/bison.c++: Remove a debug line. | |
2309 | ||
374f5a14 RA |
2310 | 2002-03-04 Robert Anisko <robert@lrde.epita.fr> |
2311 | ||
2312 | * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge | |
2313 | location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and | |
2314 | provide a default implementation. | |
2315 | ||
bfcf1f3a AD |
2316 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2317 | ||
2318 | * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'. | |
2319 | * tests/output.at (AT_CHECK_OUTPUT): Likewise. | |
2320 | * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto. | |
2321 | * tests/semantic.at (Parsing Guards): Similarly. | |
2322 | * src/reader.at (readgram): Complain if the last rule is not ended | |
2323 | with a semi-colon. | |
2324 | ||
65ccf9fc AD |
2325 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2326 | ||
2327 | * src/warshall.h, src/warshall.c (bitmatrix_print): Move to... | |
2328 | * src/closure.c: here. | |
2329 | (set_firsts): Use bitsetv_reflexive_transitive_closure instead of | |
2330 | RTC. | |
2331 | * src/warshall.h, src/warshall.c: Remove. | |
2332 | * tests/sets.at (Broken Closure): Adjust. | |
2333 | ||
d0039cbc AD |
2334 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2335 | ||
2336 | * src/output.c (output_skeleton): tempdir is const. | |
2337 | bytes_read is unused. | |
2338 | ||
345cea78 AD |
2339 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2340 | ||
2341 | * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c, | |
2342 | * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c: | |
2343 | Update. | |
2344 | From Michael Hayes. | |
2345 | ||
564801f7 AD |
2346 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2347 | ||
2348 | * src/closure.c (closure): `r' is unused. | |
2349 | ||
e5352bc7 AD |
2350 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2351 | ||
2352 | * tests/sets.at (Broken Closure): Add the ending `;'. | |
2353 | * src/reader.at (readgram): Complain if a rule is not ended with a | |
2354 | semi-colon. | |
2355 | ||
914feea9 AD |
2356 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2357 | ||
2358 | * src/conflicts.c (set_conflicts): Use bitset_disjoint_p. | |
2359 | (count_sr_conflicts): Use bitset_count. | |
2360 | * src/reduce.c (inaccessable_symbols): Ditto. | |
2361 | (bits_size): Remove. | |
2362 | * src/warshall.h, src/warshall.c: Convert to bitsetv. | |
2363 | ||
f0250de6 AD |
2364 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2365 | ||
2366 | * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c, | |
2367 | * src/reduce.c: Remove the `bitset_zero's following the | |
2368 | `bitset_create's, as now it is performed by the latter. | |
2369 | ||
ef017502 AD |
2370 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2371 | ||
2372 | * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h, | |
2373 | * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h, | |
2374 | * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the | |
2375 | latest sources from Michael. | |
2376 | ||
76514394 AD |
2377 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2378 | ||
2379 | * src/output.c (output): Don't free the grammar. | |
2380 | * src/reader.c (grammar_free): New. | |
2381 | * src/main.c (main): Call it and don't free symtab here. | |
2382 | ||
55024580 AD |
2383 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2384 | ||
2385 | * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer | |
2386 | before returning. | |
2387 | Reported by Benoit Perrot. | |
2388 | ||
f9abaa2c AD |
2389 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2390 | ||
2391 | Use bitset operations when possible, not loops over bits. | |
2392 | ||
2393 | * src/conflicts.c (set_conflicts, count_sr_conflicts): Use | |
2394 | bitset_or. | |
2395 | * src/print.c (print_reductions): Use bitset_and, bitset_andn. | |
2396 | * src/reduce.c (useless_nonterminals): Formatting changes. | |
2397 | * src/warshall.c (TC): Use bitset_or. | |
2398 | ||
0e721e75 AD |
2399 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2400 | ||
2401 | * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused. | |
2402 | * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET): | |
2403 | Ditto. | |
2404 | ||
0fb1ffb1 AD |
2405 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2406 | ||
2407 | * src/lalr.c (F): Now a bitset*. | |
2408 | Adjust all dependencies. | |
2409 | ||
b86796bf AD |
2410 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2411 | ||
2412 | * src/conflicts.c (shiftset, lookaheadset): Now bitset. | |
2413 | Adjust all dependencies. | |
2414 | ||
602bbf31 AD |
2415 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2416 | ||
2417 | * src/L0.c, src/LR0.h (nstates): Be size_t. | |
2418 | Adjust comparisons (signed vs unsigned). | |
2419 | * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a | |
2420 | bitset*. | |
2421 | Adjust all dependencies. | |
2422 | ||
d8a0245c AD |
2423 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2424 | ||
2425 | * src/closure.c (firsts): Now, also a bitset. | |
2426 | Adjust all dependencies. | |
2427 | (varsetsize): Remove, now unused. | |
2428 | * src/warshall.h, src/warshall.c: Now work on arrays of bitsets. | |
2429 | ||
34ba9743 AD |
2430 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2431 | ||
2432 | * src/print.c: Convert to use bitset.h, not hand coded iterations | |
2433 | over ints. | |
2434 | ||
ed86e78c AD |
2435 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2436 | ||
2437 | * src/reduce.c: Convert to use bitset.h, not hand coded BSet. | |
2438 | ||
dfdb1797 AD |
2439 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2440 | ||
2441 | * src/closure.c (ruleset): Be a bitset. | |
2442 | (rulesetsize): Remove. | |
2443 | ||
7086e707 AD |
2444 | 2002-03-04 Akim Demaille <akim@epita.fr> |
2445 | ||
2446 | * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c, | |
2447 | * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, | |
2448 | * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New. | |
2449 | * src/closure.c (fderives): Be an array of bitsets. | |
2450 | ||
98254360 RA |
2451 | 2002-02-28 Robert Anisko <robert@lrde.epita.fr> |
2452 | ||
2453 | * data/bison.c++: Merge the two generated headers. Insert a copyright | |
2454 | notice in each output file. | |
2455 | ||
a75c057f AD |
2456 | 2002-02-28 Akim Demaille <akim@epita.fr> |
2457 | ||
2458 | * data/bison.c++: Copy the prologue of bison.simple to fetch | |
2459 | useful M4 definitions, such as b4_header_guard. | |
2460 | ||
06b00abc AD |
2461 | 2002-02-25 Akim Demaille <akim@epita.fr> |
2462 | ||
2463 | * src/getargs.c (version): Give the name of the authors, and use a | |
a75c057f AD |
2464 | translator friendly scheme for the bgr |
2465 | copyright notice. | |
06b00abc | 2466 | |
70e7d534 AD |
2467 | 2002-02-25 Akim Demaille <akim@epita.fr> |
2468 | ||
2469 | * src/output.c (header_output): Remove, now handled completely via | |
2470 | M4. | |
2471 | ||
abe017f6 AD |
2472 | 2002-02-25 Akim Demaille <akim@epita.fr> |
2473 | ||
2474 | * m4/m4.m4: New, from CVS Autoconf. | |
2475 | * configure.in: Invoke it. | |
2476 | * src/output.c (output_skeleton): Use its result instead of the | |
2477 | hard coded name. | |
2478 | ||
381fb12e AD |
2479 | 2002-02-25 Akim Demaille <akim@epita.fr> |
2480 | ||
2481 | * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from | |
2482 | Fileutils 4.1.5. | |
2483 | * configure.in: Invoke UTILS_FUNC_MKSTEMP. | |
2484 | * src/output.c (output_skeleton): Use mkstemp to create a real | |
2485 | temporary file. | |
2486 | Move the filling of `skeleton' and its muscle to... | |
2487 | (prepare): here. | |
2488 | (output): Move the definition of the prologue muscle to... | |
2489 | (prepare): here. | |
2490 | * src/system.h (DEFAULT_TMPDIR): New. | |
2491 | ||
6f38107f PE |
2492 | 2002-02-14 Paul Eggert <eggert@twinsun.com> |
2493 | ||
2494 | Remove the support for C++ namespace cleanliness; it was | |
2495 | causing more problems than it was curing, since it didn't work | |
2496 | properly on some nonstandard C++ compilers. This can wait | |
2497 | for a proper C++ parser. | |
2498 | ||
2499 | * NEWS: Document this. | |
2500 | * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention | |
2501 | of C++, as it's treated like C now. | |
2502 | * src/bison.simple (YYSTD): Remove. | |
2503 | (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL): | |
2504 | Treat C++ just like Standard C instead of trying to support | |
2505 | namespace cleanliness. | |
2506 | ||
80cce3da AD |
2507 | 2002-02-14 Akim Demaille <akim@epita.fr> |
2508 | ||
2509 | * tests/regression.at (else): Adjust to Andreas' change. | |
2510 | ||
842e8679 AD |
2511 | 2002-02-14 Akim Demaille <akim@epita.fr> |
2512 | ||
2513 | * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c. | |
2514 | ||
4bda3f10 AD |
2515 | 2002-02-13 Andreas Schwab <schwab@suse.de> |
2516 | ||
2517 | * src/output.c (output_rule_data): Don't output NULL, it might | |
2518 | not be defined yet. | |
2519 | ||
4162fa07 | 2520 | 2002-02-11 Robert Anisko <robert@lrde.epita.fr> |
b418ecd8 | 2521 | |
4162fa07 RA |
2522 | * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue. |
2523 | (Copyright notice): Update. | |
b418ecd8 | 2524 | |
bd16a5dc AD |
2525 | 2002-02-11 Akim Demaille <akim@epita.fr> |
2526 | ||
2527 | * tests/regression.at (%nonassoc and eof): Don't include | |
2528 | nonportable headers. | |
2529 | ||
8d69a1a3 RA |
2530 | 2002-02-08 Robert Anisko <robert@lrde.epita.fr> |
2531 | ||
2532 | * data/bison.c++: Correct error recovery. Make the user able to | |
2533 | initialize the starting location. | |
2534 | ||
9b2d0677 AD |
2535 | 2002-02-07 Akim Demaille <akim@epita.fr> |
2536 | ||
2537 | * tests/input.at: New. | |
2538 | ||
69e2658b RA |
2539 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
2540 | ||
2541 | * data/bison.c++: Replace some direct m4 expansions by constants. Be | |
9b2d0677 | 2542 | more consistent when naming methods and variables. Put preprocessor |
69e2658b RA |
2543 | directives around tables only needed for debugging. |
2544 | ||
4aacc3a7 RA |
2545 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
2546 | ||
2547 | * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in | |
2548 | C++ parsers. | |
2549 | (yy::b4_name::parse): Use print_. | |
2550 | ||
762a801e RA |
2551 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
2552 | ||
2553 | * data/bison.c++ (yy::b4_name::parse): Error recovery is back. | |
2554 | ||
4bb2bc3f RA |
2555 | 2002-02-07 Robert Anisko <robert@lrde.epita.fr> |
2556 | ||
2557 | * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in | |
2558 | C++ parsers. | |
2559 | (yy::b4_name::parse): Build verbose error messages, and use error_. | |
2560 | ||
6b45a3ca RA |
2561 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> |
2562 | ||
2563 | * data/bison.c++: Fix m4 quoting in comments. | |
2564 | ||
50997c6e RA |
2565 | 2002-02-06 Robert Anisko <robert@lrde.epita.fr> |
2566 | ||
2567 | * data/bison.c++: Adjust the parser code. Fix some muscles that were | |
2568 | not expanded by m4. | |
2569 | ||
3f3eed27 AD |
2570 | 2002-02-05 Akim Demaille <akim@epita.fr> |
2571 | ||
2572 | * data/bison.c++: Adjust to the M4 back end. | |
2573 | More is certainly needed. | |
2574 | ||
be2a1a68 AD |
2575 | 2002-02-05 Akim Demaille <akim@epita.fr> |
2576 | ||
2577 | Give a try to M4 as a back end. | |
2578 | ||
2579 | * lib/readpipe.c: New, from wdiff. | |
2580 | * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and | |
2581 | BISON_HAIRY. | |
2582 | * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS | |
2583 | specific values. Now it is m4 that performs the lookup. | |
2584 | * src/parse-skel.y: Remove. | |
2585 | * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New. | |
2586 | * src/output.c (actions_output, guards_output) | |
2587 | (token_definitions_output): No longer keeps track of the output | |
2588 | line number, hence remove the second argument. | |
2589 | (guards_output): Check against the guard member of a rule, not the | |
2590 | action member. | |
2591 | Adjust callers. | |
2592 | (output_skeleton): Don't look for the skeleton location, let m4 do | |
2593 | that. | |
2594 | Create `/tmp/muscles.m4'. This is temporary, a proper temporary | |
2595 | file will be used. | |
2596 | Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton. | |
2597 | (prepare): Given that for the time being changesyntax is not | |
2598 | usable in M4, rename the muscles using `-' to `_'. | |
2599 | Define `defines_flag', `output_parser_name' and `output_header_name'. | |
2600 | * src/output.h (actions_output, guards_output) | |
2601 | (token_definitions_output): Adjust prototypes. | |
2602 | * src/scan-skel.l: Instead of scanning the skeletons, it now | |
2603 | processes the output of m4: `__oline__' and `#output'. | |
2604 | * data/bison.simple: Adjust to be used by M4(sugar). | |
2605 | * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up | |
2606 | to date. | |
2607 | * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR' | |
2608 | instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'. | |
2609 | * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New, | |
2610 | shamelessly stolen from CVS Autoconf. | |
2611 | ||
beda758b AD |
2612 | 2002-02-05 Akim Demaille <akim@epita.fr> |
2613 | ||
2614 | * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version. | |
2615 | * configure.in: Check for the declarations of free and malloc. | |
2616 | * src/muscle_tab.c: Adjust. | |
2617 | ||
5ece6d43 AD |
2618 | 2002-02-05 Akim Demaille <akim@epita.fr> |
2619 | ||
2620 | * src/muscle_tab.c (muscle_init): Don't default to NULL muscle | |
2621 | which have no values. | |
2622 | ||
5bb18f9a AD |
2623 | 2002-02-05 Akim Demaille <akim@epita.fr> |
2624 | ||
2625 | * src/bison.simple, src/bison.hairy, src/bison.c++: Move to... | |
2626 | * data/: here. | |
2627 | ||
894dd62e PE |
2628 | 2002-01-29 Paul Eggert <eggert@twinsun.com> |
2629 | ||
2630 | * src/bison.simple (YYSIZE_T): Do not define merely because | |
2631 | YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined. | |
2632 | On some platforms, <alloca.h> does not declare YYSTD (size_t). | |
2633 | ||
82841af7 AD |
2634 | 2002-01-27 Akim Demaille <akim@epita.fr> |
2635 | ||
2636 | Fix `%nonassoc and eof'. | |
2637 | ||
2638 | * src/state.c (errs_dup): Aaaah! The failure was due to bytes | |
2639 | which were not properly copied! Replace | |
2640 | memcpy (res->errs, src->errs, src->nerrs); | |
2641 | with | |
2642 | memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0])); | |
2643 | !!! | |
2644 | * tests/regression.at (%nonassoc and eof): Adjust to newest | |
2645 | Autotest: `.' is not in the PATH. | |
2646 | ||
318b76e9 AD |
2647 | 2002-01-27 Akim Demaille <akim@epita.fr> |
2648 | ||
2649 | * tests/sets.at (AT_EXTRACT_SETS): New. | |
2650 | (Nullable): Use it. | |
2651 | (Firsts): New. | |
2652 | ||
30d2f3d5 AD |
2653 | 2002-01-26 Akim Demaille <akim@epita.fr> |
2654 | ||
2655 | * tests/actions.at, tests/calc.at, tests/headers.at, | |
2656 | * tests/torture.at: Adjust to the newest Autotest which no longer | |
2657 | forces `.' in the PATH. | |
2658 | ||
30f8c395 AD |
2659 | 2002-01-25 Akim Demaille <akim@epita.fr> |
2660 | ||
2661 | * tests/regression.at (%nonassoc and eof): New. | |
2662 | Suggested by Robert Anisko. | |
2663 | ||
29ae55f1 AD |
2664 | 2002-01-24 Akim Demaille <akim@epita.fr> |
2665 | ||
2666 | Bison dumps core when trying to complain about broken input files. | |
2667 | Reported by Cris van Pelt. | |
2668 | ||
2669 | * src/lex.c (parse_percent_token): Be sure to set token_buffer. | |
2670 | * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge | |
2671 | into... | |
2672 | (Invalid inputs): Strengthen: exercise parse_percent_token. | |
2673 | ||
2b548aa6 RA |
2674 | 2002-01-24 Robert Anisko <robert.anisko@epita.fr> |
2675 | ||
2676 | * src/Makefile.am: Add bison.c++. | |
2677 | * src/bison.c++: New skeleton. | |
2678 | ||
bb0146c2 AD |
2679 | 2002-01-21 Paolo Bonzini <bonzini@gnu.org> |
2680 | ||
2681 | * po/it.po: New. | |
2682 | ||
bec30531 AD |
2683 | 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net> |
2684 | ||
2685 | * src/files.c (skeleton_find) [MSDOS]: Fix cp definition. | |
2686 | ||
fc6edc45 MA |
2687 | 2002-01-20 Marc Autret <marc@gnu.org> |
2688 | ||
2689 | * src/files.c (compute_output_file_names): Fix | |
2690 | ||
5e5d5415 MA |
2691 | 2002-01-20 Marc Autret <marc@gnu.org> |
2692 | ||
2693 | * tests/output.at: New test. | |
2694 | * src/files.c (compute_base_names): Don't map extensions when | |
2695 | the YACC flag is set, use defaults. | |
2696 | Reported by Evgeny Stambulchik. | |
2697 | ||
44ea3fbd MA |
2698 | 2002-01-20 Marc Autret <marc@gnu.org> |
2699 | ||
bb0146c2 | 2700 | * src/system.h: Need to define __attribute__ away for non-GCC |
44ea3fbd MA |
2701 | compilers as well (i.e. the vendor C compiler). |
2702 | Suggested by Albert Chin-A-Young. | |
2703 | ||
338963d1 TVH |
2704 | 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be> |
2705 | ||
2706 | * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the | |
2707 | canonical definition. | |
2708 | * src/system.h: Use the canonical definition for PARAMS (avoids | |
2709 | a conflict with the macro from lib/hash.h). | |
2710 | ||
c57b2479 AD |
2711 | 2002-01-11 Akim Demaille <akim@epita.fr> |
2712 | ||
2713 | * configure.in: Use AC_FUNC_STRNLEN. | |
d9e9746c | 2714 | Fixes the failures observed on AIX 4.3 by H.Merijn Brand. |
c57b2479 | 2715 | |
b85810ae AD |
2716 | 2002-01-09 Akim Demaille <akim@epita.fr> |
2717 | ||
2718 | * src/files.c, src/files.h (output_infix): New. | |
2719 | (tab_extension): Remove. | |
2720 | (compute_base_names): Compute the former, drop the latter. | |
2721 | * src/output.c (prepare): Insert the muscles `output-infix', and | |
2722 | `output-suffix'. | |
2723 | * src/parse-skel.y (string, string.1): New. | |
2724 | (section.header): Use it. | |
2725 | (section.yacc): Remove. | |
2726 | (prefix): Remove too. | |
2727 | * src/scan-skel.l: Adjust. | |
2728 | * src/bison.simple, src/bison.hairy: Adjust. | |
2729 | ||
cae60122 AD |
2730 | 2002-01-09 Akim Demaille <akim@epita.fr> |
2731 | ||
2732 | * configure.in (WERROR_CFLAGS): Compute it. | |
2733 | * src/Makefile.am (CFLAGS): Pass it. | |
2734 | * tests/atlocal.in (CFLAGS): Idem. | |
2735 | * src/files.c: Fix a few warnings. | |
2736 | (get_extension_index): Remove, unused. | |
2737 | ||
ae404801 AD |
2738 | 2002-01-08 Akim Demaille <akim@epita.fr> |
2739 | ||
2740 | * src/getargs.c (AS_FILE_NAME): New. | |
2741 | (getargs): Use it to convert DOSish file names. | |
2742 | * src/files.c (base_name): Rename as full_base_name to avoid | |
2743 | clashes with `base_name ()'. | |
2744 | (filename_split): New. | |
2745 | (compute_base_names): N-th rewrite, using filename_split. | |
2746 | ||
22312b71 AD |
2747 | 2002-01-08 Akim Demaille <akim@epita.fr> |
2748 | ||
2749 | * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c: | |
2750 | New, stolen from the Fileutils 4.1. | |
2751 | * lib/Makefile.am (libbison_a_SOURCES): Adjust. | |
2752 | * configure.in: Check for the presence of memrchr, and of its | |
2753 | prototype. | |
2754 | ||
a67cef01 TVH |
2755 | 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be> |
2756 | ||
2757 | * lib/hash.h (__P): Added definition for this macro. | |
2758 | * src/Makefile.am: Add parse-skel.c and scan-skel.c to | |
2759 | BUILT_SOURCES, to ensure they are generated first. | |
2760 | * src/parse-skel.y: Use YYERROR_VERBOSE instead of | |
2761 | %error-verbose to allow bootstrapping with bison 1.30x. | |
2762 | ||
2b25d624 AD |
2763 | 2002-01-06 Akim Demaille <akim@epita.fr> |
2764 | ||
2765 | * src/reader.c (parse_braces): Don't fetch the next char, the | |
2766 | convention is to fetch on entry. | |
2767 | * tests/torture.at (GNU Cim Grammar): Reintroduce their weird | |
2768 | 'switch' without a following semicolon. | |
2769 | * tests/regression.at (braces parsing): New. | |
2770 | ||
3460813b AD |
2771 | 2002-01-06 Akim Demaille <akim@epita.fr> |
2772 | ||
2773 | Bison is dead wrong in its RR conflict reports. | |
2774 | ||
2775 | * tests/torture.at (GNU Cim Grammar): New. | |
2776 | * src/conflicts.c (count_rr_conflicts): Fix. | |
2777 | ||
73784c64 AD |
2778 | 2002-01-06 Akim Demaille <akim@epita.fr> |
2779 | ||
2780 | Creating package.m4 from configure.ac causes too many problems. | |
2781 | ||
2782 | * tests/Makefile.am (package.m4): Create it by hand, | |
2783 | AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf. | |
2784 | ||
25d81090 AD |
2785 | 2002-01-06 Akim Demaille <akim@epita.fr> |
2786 | ||
2787 | * src/Makefile.am (bison_SOURCES): Add parse-skel.h and | |
2788 | skeleton.h. | |
2789 | ||
a9b8959e PE |
2790 | 2002-01-04 Paul Eggert <eggert@twinsun.com> |
2791 | ||
2792 | * doc/bison.texinfo (Debugging): | |
2793 | Remove YYSTDERR; it's no longer defined or used. | |
2794 | Also, s/cstdio.h/cstdio/. | |
2795 | ||
25d81090 AD |
2796 | 2002-01-03 Akim Demaille <akim@epita.fr> |
2797 | ||
2798 | * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf. | |
2799 | ||
1109455c AD |
2800 | 2002-01-03 Akim Demaille <akim@epita.fr> |
2801 | ||
2802 | * src/parse-skel.y (process_skeleton): Don't bind the parser's | |
2803 | tracing code to --trace, wait for a better --trace option, with | |
2804 | args. | |
2805 | ||
7ea5e977 AD |
2806 | 2002-01-03 Akim Demaille <akim@epita.fr> |
2807 | ||
2808 | * src/bison.simple (YYSTDERR): Remove, replace `stderr'. | |
2809 | The ISO C++ standard is extremely clear about it: stderr is | |
2810 | considered a macro, not a regular symbol (see table 94 `Header | |
2811 | <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files). | |
2812 | Therefore std:: does not apply to it. It still does with fprintf. | |
2813 | Also, s/cstdio.h/cstdio/. | |
2814 | ||
fab5b110 AD |
2815 | 2002-01-03 Akim Demaille <akim@epita.fr> |
2816 | ||
2817 | * lib/quotearg.c: Use `#include "..."' instead of `#include <...>' | |
2818 | for non system headers. | |
2819 | ||
aed7fd9b AD |
2820 | 2002-01-02 Akim Demaille <akim@epita.fr> |
2821 | ||
2822 | Equip the skeleton chain with location tracking, runtime trace, | |
2823 | pure parser and scanner. | |
2824 | ||
2825 | * src/parse-skel.y: Request a pure parser, locations, and prefix | |
2826 | renaming. | |
2827 | (%union): Having several members with the same type does not help | |
2828 | type mismatches, simplify. | |
2829 | (YYPRINT, yyprint): New. | |
2830 | (yyerror): ``Rename'' (there is a #define yyerror skel_error) as... | |
2831 | (skel_error): this. | |
2832 | Handle locations. | |
2833 | * src/scan-skel.l: Adjust to these changes. | |
2834 | * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP) | |
2835 | (LOCATION_PRINT, skel_control_t): New. | |
2836 | ||
24fad99e AD |
2837 | 2001-12-30 Akim Demaille <akim@epita.fr> |
2838 | ||
2839 | * src/parse-skel.y: Get rid of the shift/reduce conflict: | |
2840 | replace `gb' with BLANKS. | |
2841 | * src/scan-skel.l: Adjust. | |
2842 | ||
a4b36db4 AD |
2843 | 2001-12-30 Akim Demaille <akim@epita.fr> |
2844 | ||
2845 | * src/system.h: We don't need nor want bcopy. | |
2846 | Throw away MS-DOS crap: we don't need getpid. | |
2847 | * configure.in: We don't need strndup. It was even causing | |
2848 | problems: because Flex includes the headers *before* us, | |
2849 | _GNU_SOURCE is not defined by config.h, and therefore strndup was | |
2850 | not visible. | |
2851 | * lib/xstrndup.c: New. | |
2852 | * src/scan-skel.l: Use it. | |
2853 | Be sure to initialize yylval.muscle member when scanning a MUSCLE. | |
2854 | * src/parse-skel.y: Use %directives instead of #defines. | |
2855 | ||
1239777d AD |
2856 | 2001-12-30 Akim Demaille <akim@epita.fr> |
2857 | ||
2858 | * src/skeleton.h: New. | |
2859 | * src/output.c (output_parser, output_master_parser): Remove, dead | |
2860 | code. | |
2861 | * src/output.h (get_lines_number, actions_output, guards_output) | |
2862 | (token_definitions_output): Prototype them. | |
2863 | * src/parse-skel.y: Add the license notice. | |
2864 | Include output.h and skeleton.h. | |
2865 | (process_skeleton): Returns void, and takes a single parameter. | |
2866 | * src/scan-skel.l: Add the license notice. | |
2867 | Include skeleton.h. | |
2868 | Don't use %option yylineno: it seems that then Flex imagines | |
2869 | REJECT has been used, and therefore it won't reallocate its | |
2870 | buffers (which makes no other sense to me than a bug). It results | |
2871 | in warnings for `unused: yy_flex_realloc'. | |
2872 | ||
9b3add5b RA |
2873 | 2001-12-30 Robert Anisko <robert.anisko@epita.fr> |
2874 | ||
2875 | * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
2876 | (MUSCLE_INSERT_PREFIX): ...to there. | |
2877 | * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING) | |
2878 | (MUSCLE_INSERT_PREFIX): Move from here... | |
2879 | ||
2880 | * src/bison.hairy: Add a section directive. Put braces around muscle | |
2881 | names. This parser skeleton is still broken, but Bison should not | |
2882 | choke on a bad muscle 'syntax'. | |
2883 | * src/bison.simple: Add a section directive. Put braces around muscle | |
2884 | names. | |
2885 | ||
2886 | * src/files.h (strsuffix, stringappend): Add declarations. | |
2887 | (tab_extension): Add declaration. | |
2888 | (short_base_name): Add declaration. | |
2889 | ||
2890 | * src/files.c (strsuffix, stringappend): No longer static. These | |
2891 | functions are used in the skeleton parser. | |
2892 | (tab_extension): New. | |
2893 | (compute_base_names): Use the computations done in this function | |
fab5b110 | 2894 | to guess if the generated parsers should have '.tab' in their |
9b3add5b RA |
2895 | names. |
2896 | (short_base_name): No longer static. | |
2897 | ||
2898 | * src/output.c (output_skeleton): New. | |
2899 | (output): Disable call to output_master_parser, and give a try to | |
2900 | a new skeleton handling system. | |
2901 | (guards_output, actions_output): No longer static. | |
2902 | (token_definitions_output, get_lines_number): No longer static. | |
2903 | ||
2904 | * configure.in: Use AM_PROG_LEX and AC_PROG_YACC. | |
2905 | ||
fab5b110 | 2906 | * src/Makefile.am (bison_SOURCES): Add scan-skel.l and |
9b3add5b RA |
2907 | parse-skel.y. |
2908 | ||
2909 | * src/parse-skel.y: New file. | |
2910 | * src/scan-skel.l: New file. | |
2911 | ||
b5b61c61 AD |
2912 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2913 | ||
2914 | %name-prefix is broken. | |
2915 | ||
2916 | * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy". | |
2917 | Adjust all dependencies. | |
2918 | * tests/headers.at (export YYLTYPE): Strengthen this test: use | |
2919 | %name-prefix. | |
2920 | ||
2921 | Renaming yylval but not yylloc is not consistent. Now we do. | |
2922 | ||
2923 | * src/bison.simple: Prefix yylloc if used. | |
2924 | * doc/bison.texinfo (Decl Summary): Document that. | |
2925 | ||
8c9a50be AD |
2926 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2927 | ||
2928 | * doc/bison.texinfo: Promote `%long-directive' over | |
2929 | `%long_directive'. | |
2930 | Remove all references to fixed-output-files, yacc is enough. | |
2931 | ||
d99361e6 AD |
2932 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2933 | ||
2934 | * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the | |
2935 | user prologue. These are defaults. | |
2936 | * tests/actions.at (Mid-rule actions): Make sure the user can | |
2937 | define YYDEBUG and YYERROR_VERBOSE. | |
2938 | ||
b9cecb91 AD |
2939 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2940 | ||
2941 | * src/output.c (header_output): Don't forget to export YYLTYPE and | |
2942 | yylloc. | |
2943 | * tests/headers.at (export YYLTYPE): New, make sure it does. | |
2944 | * tests/regression.at (%union and --defines, Invalid CPP headers): | |
2945 | Move to... | |
2946 | * tests/headers.at: here. | |
2947 | ||
aea13e97 AD |
2948 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2949 | ||
2950 | * src/gram.h (rule_s): Member `assoc' is of type `associativity'. | |
2951 | ||
931394cb AD |
2952 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2953 | ||
2954 | * tests/actions.at (Mid-rule actions): Output on a single line | |
2955 | instead of several. | |
2956 | ||
704a47c4 AD |
2957 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2958 | ||
2959 | * doc/bison.texinfo: Formatting changes. | |
2960 | ||
091e20bb AD |
2961 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2962 | ||
2963 | Don't store the token defs in a muscle, just be ready to output it | |
2964 | on command. Now possible via `symbols'. Fixes a memory leak. | |
2965 | ||
2966 | * src/output.c (token_definitions_output): New. | |
2967 | (output_parser, header_output): Use it. | |
2968 | * src/reader.c (symbols_save): Remove. | |
2969 | ||
cce71710 AD |
2970 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2971 | ||
2972 | * src/bison.simple: Do not provide a default for YYSTYPE and | |
2973 | YYLTYPE before the user's prologue. Otherwise it's hardly... a | |
2974 | default. | |
2975 | ||
82c035a8 AD |
2976 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2977 | ||
2978 | Mid-rule actions are simply... ignored! | |
2979 | ||
2980 | * src/reader.c (readgram): Be sure to attach mid-rule actions to | |
2981 | the empty-rule associated to the dummy symbol, not to the host | |
2982 | rule. | |
2983 | * tests/actions.at (Mid-rule actions): New. | |
2984 | ||
8419d367 AD |
2985 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2986 | ||
2987 | Memory leak. | |
2988 | ||
2989 | * src/reader.c (reader): Free grammar. | |
2990 | ||
375d5806 AD |
2991 | 2001-12-29 Akim Demaille <akim@epita.fr> |
2992 | ||
2993 | Memory leak. | |
2994 | ||
2995 | * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here, | |
2996 | since it allocates it for each state, although only one is needed. | |
2997 | (allocate_storage): Do it here. | |
2998 | ||
f51cb8ff AD |
2999 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3000 | ||
3001 | * src/options.h, src/options.c (create_long_option_table): Rename | |
3002 | as... | |
3003 | (long_option_table_new): this, with a clearer prototype. | |
3004 | (percent_table): Remove, unused, | |
3005 | * src/getargs.c (getargs): Adjust. | |
3006 | ||
29e88316 AD |
3007 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3008 | ||
3009 | * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c | |
3010 | * src/print.c, src/print_graph.c, src/state.h: Rename state_table | |
3011 | as states. | |
3012 | ||
b9f71f19 AD |
3013 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3014 | ||
3015 | * src/lalr.c (build_relations): Rename `states' as `states1'. | |
3016 | Sorry, I don't understand exactly what it is, no better name... | |
3017 | ||
1a2b5d37 AD |
3018 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3019 | ||
3020 | * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c | |
3021 | * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c | |
3022 | * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table | |
3023 | as rules. | |
3024 | ||
1cca533e AD |
3025 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3026 | ||
3027 | * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long | |
3028 | ago. | |
3029 | ||
c03ae966 AD |
3030 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3031 | ||
3032 | * src/reader.c, src/reader.h (user_toknums): Remove. | |
3033 | Adjust all users to use symbols[i]->user_token_number. | |
3034 | ||
5a670b1e AD |
3035 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3036 | ||
3037 | * src/gram.c, src/gram.h (sprec, sassoc): Remove. | |
3038 | Adjust all users to use symbols[i]->prec or ->assoc. | |
3039 | ||
ad949da9 AD |
3040 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3041 | ||
3042 | * src/reader.c, src/reader.h (tags): Remove. | |
3043 | Adjust all users to use symbols[i]->tag. | |
3044 | ||
0e78e603 AD |
3045 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3046 | ||
3047 | * src/gram.h, src/gram.c (symbols): New, similar to state_table | |
3048 | and rule_table. | |
3049 | * src/reader.c (packsymbols): Fill this table. | |
3050 | Drop sprec. | |
3051 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
3052 | * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a | |
3053 | single table. | |
3054 | Use symbols[i]->tag instead of tags[i]. | |
3055 | ||
213e640e AD |
3056 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3057 | ||
3058 | * tests/calc.at (_AT_DATA_CALC_Y): Also use %union. | |
3059 | In addition, put a comment in there, to replace... | |
3060 | * tests/regression.at (%union and C comments): Remove. | |
3061 | ||
e7b8bef1 AD |
3062 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3063 | ||
3064 | * tests/regression.at (Web2c Actions): Blindly move the actual | |
3065 | output as expected output. The contents *seem* right to me, but I | |
3066 | can't pretend reading perfectly parser tables... Nonetheless, all | |
3067 | the other tests pass correctly, the table look OK, even though the | |
3068 | presence of `$axiom' is to be noted: AFAICS it is useless (but | |
3069 | harmless). | |
3070 | ||
b68e7744 AD |
3071 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3072 | ||
3073 | * src/reader.c (readgram): Don't add the rule 0 if there were no | |
3074 | rules read. In other words, add it _after_ having performed | |
3075 | grammar sanity checks. | |
3076 | Fixes the `tests/regression.at (Invalid input: 1)' Failure. | |
3077 | ||
78d5bae9 AD |
3078 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3079 | ||
3080 | * tests/regression.at (Web2c Report): Catch up: the rule 0 is now | |
3081 | visible, and some states have now a different number. | |
3082 | ||
ff442794 AD |
3083 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3084 | ||
3085 | * src/reader.c (readgram): Bind the initial rule's lineno to that | |
3086 | of the first rule. | |
3087 | * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts): | |
3088 | (Solved SR Conflicts): Adjust rule 0's line number. | |
3089 | ||
610ab194 AD |
3090 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3091 | ||
3092 | Fix the `GAWK Grammar' failure. | |
3093 | ||
3094 | * src/LR0.c (final_state): Initialize to -1 so that we do compute | |
3095 | the reductions of the first state which was mistakenly confused | |
3096 | with the final state because precisely final_state was initialized | |
3097 | to 0. | |
3098 | * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads, | |
3099 | now noticed by Bison. | |
3100 | * tests/regression.at (Rule Line Numbers): Adjust: state 0 does | |
3101 | have a reduction on $default. | |
3102 | ||
29d29c8f AD |
3103 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3104 | ||
3105 | * src/gram.c (ritem_print): Be sure to subtract 1 when displaying | |
3106 | rule line numbers. | |
3107 | * src/closure.c (print_closure): Likewise. | |
3108 | * src/derives.c (print_derives): Likewise. | |
3109 | * tests/sets.at (Nullable): Adjust: the rule numbers are correct | |
3110 | now. | |
3111 | ||
7c6b64d0 AD |
3112 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3113 | ||
3114 | * src/lalr.c (lookaheads_print): New. | |
3115 | (lalr): Call it when --trace-flag. | |
3116 | * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads | |
3117 | are dumped. | |
3118 | ||
3d4daee3 AD |
3119 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3120 | ||
3121 | * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0', | |
3122 | when walking through ritem, even via rule->rhs. | |
3123 | * src/reduce.c (dump_grammar, useful_production, reduce_output) | |
3124 | (useful_production, useless_nonterminals): Likewise. | |
3125 | (reduce_grammar_tables): Likewise, plus update nritems. | |
3126 | * src/nullable.c (set_nullable): Likewise. | |
3127 | * src/lalr.c (build_relations): Likewise. | |
3128 | * tests/sets.at (Nullable): Adjust. | |
3129 | Fortunately, now, the $axiom is no longer nullable. | |
3130 | ||
9e7f6bbd AD |
3131 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3132 | ||
3133 | * src/LR0.c (generate_states): Use nritems, not nitems, nor using | |
3134 | the 0-sentinel. | |
3135 | * src/gram.c (ritem_longest_rhs): Likewise. | |
3136 | * src/reduce.c (nonterminals_reduce): Likewise. | |
3137 | * src/print_graph.c (print_graph): Likewise. | |
3138 | * src/output.c (output_rule_data): Likewise. | |
3139 | * src/nullable.c (set_nullable): Likewise. | |
3140 | ||
255ef638 AD |
3141 | 2001-12-29 Akim Demaille <akim@epita.fr> |
3142 | ||
3143 | * src/output.c: Comment changes. | |
3144 | ||
0d8a7363 AD |
3145 | 2001-12-27 Paul Eggert <eggert@twinsun.com> |
3146 | ||
3147 | * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special | |
3148 | cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and | |
3149 | Sparc, as they were causing more porting problems than the | |
3150 | (minor) performance improvement was worth. | |
3151 | ||
3152 | Also, catch up with 1.31's YYSTD. | |
3153 | ||
3db472b9 AD |
3154 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3155 | ||
3156 | * src/output.c (output_gram): Rely on nritems, not the | |
3157 | 0-sentinel. See below. | |
3158 | Use -1 as separator, not 0. | |
3159 | * src/bison.simple (yyparse): Subtract 1 to the rule numbers. | |
3160 | Rely on -1 as separator in yyrhs, instead of 0. | |
3161 | * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue | |
3162 | twice `Now at end of input', therefore there are two lines less to | |
3163 | expect. | |
3164 | ||
b365aa05 AD |
3165 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3166 | ||
3167 | * tests/regression.at (Unresolved SR Conflicts): | |
3168 | (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes | |
3169 | below. | |
3170 | ||
30171f79 AD |
3171 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3172 | ||
3173 | * src/LR0.c (new_state): Recognize the final state by the fact it | |
3174 | is reached by eoftoken. | |
3175 | (insert_start_shifting_state, insert_eof_shifting_state) | |
3176 | (insert_accepting_state, augment_automaton): Remove, since now | |
3177 | these states are automatically computed from the initial state. | |
3178 | (generate_states): Adjust. | |
3179 | * src/print.c: When reporting a rule number to the user, substract | |
3180 | 1, so that the axiom rule is rule 0, and the first user rule is 1. | |
3181 | * src/reduce.c: Likewise. | |
3182 | * src/print_graph.c (print_core): For the time being, just as for | |
3183 | the report, depend upon --trace-flags to dump the full set of | |
3184 | items. | |
3185 | * src/reader.c (readgram): Once the grammar read, insert the rule | |
3186 | 0: `$axiom: START-SYMBOL $'. | |
3187 | * tests/set.at: Adjust: rule 0 is now displayed, and since the | |
3188 | number of the states has changed (the final state is no longer | |
3189 | necessarily the last), catch up. | |
3190 | ||
75142d45 AD |
3191 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3192 | ||
3193 | Try to make the use of the eoftoken valid. Given that its value | |
3194 | is 0 which was also used as a sentinel in ritem, (i) make sure >= 0 | |
3195 | is used instead of > 0 where appropriate, (ii), depend upon nritems | |
3196 | instead of the 0-sentinel. | |
3197 | ||
3198 | * src/gram.h, src/gram.c (nritems): New. | |
3199 | Expected to be duplication of nitems, but for the time being... | |
3200 | * src/reader.c (packgram): Assert nritems and nitems are equal. | |
3201 | * src/LR0.c (allocate_itemsets, new_itemsets): Adjust. | |
3202 | * src/closure.c (print_closure, print_fderives): Likewise. | |
3203 | * src/gram.c (ritem_print): Likewise. | |
3204 | * src/print.c (print_core, print_grammar): Likewise. | |
3205 | * src/print_graph.c: Likewise. | |
3206 | ||
b7c49edf AD |
3207 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3208 | ||
3209 | * src/main.c (main): If there are complains after grammar | |
3210 | reductions, then output the report anyway if requested, then die. | |
3211 | * src/symtab.c (bucket_new): Initialize `value' to -1, not 0. | |
3212 | * src/reader.c (eoftoken): New. | |
3213 | (parse_token_decl): If the token being defined has value `0', it | |
3214 | is the eoftoken. | |
3215 | (packsymbols): No longer hack `tags' to insert `$' by hand. | |
3216 | Be sure to preserve the value of the eoftoken. | |
3217 | (reader): Make sure eoftoken is defined. | |
3218 | Initialize nsyms to 0: now eoftoken is created just like the others. | |
3219 | * src/print.c (print_grammar): Don't special case the eof token. | |
3220 | * src/regression.at: Adjust: `$' has value 0, not -1, which was a | |
3221 | lie anyway, albeit pleasant. | |
3222 | * tests/calc.at: Exercise error messages with eoftoken. | |
3223 | Change the grammar so that empty input is invalid. | |
3224 | Adjust expectations. | |
3225 | When yyungeting, be sure to use a valid yylloc: use last_yylloc. | |
3226 | ||
ec2da99f AD |
3227 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3228 | ||
3229 | * configure.in: Check the protos of strchr ans strspn. | |
3230 | Replace strchr if needed. | |
3231 | * src/system.h: Provide the protos of strchr, strspn and memchr if | |
3232 | missing. | |
3233 | * lib/strchr.c: New. | |
3234 | * src/reader.c (symbols_save): Use strchr. | |
3235 | ||
8adfa272 AD |
3236 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3237 | ||
3238 | * src/print.c, src/print_graph.c (escape): New. | |
3239 | Use it to quote the TAGS outputs. | |
3240 | * src/print_graph.c (print_state): Now errors are in red, and | |
3241 | reductions in green. | |
3242 | Prefer high to wide: output the state number on a line of its own. | |
3243 | ||
80dac38c AD |
3244 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3245 | ||
3246 | * src/state.h, src/state.c (reductions_new): New. | |
3247 | * src/LR0.c (set_state_table): Let all the states have a | |
3248 | `reductions', even if reduced to 0. | |
3249 | (save_reductions): Adjust. | |
3250 | * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust. | |
3251 | * src/print.c (print_reductions, print_actions): Adjust. | |
3252 | * src/output.c (action_row): Adjust. | |
3253 | ||
2cec70b9 AD |
3254 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3255 | ||
3256 | * src/state.h, src/state.c (errs_new, errs_dup): New. | |
3257 | * src/LR0.c (set_state_table): Let all the states have an errs, | |
3258 | even if reduced to 0. | |
3259 | * src/print.c (print_errs, print_reductions): Adjust. | |
3260 | * src/output.c (output_actions, action_row): Adjust. | |
3261 | * src/conflicts.c (resolve_sr_conflict): Adjust. | |
3262 | ||
13ca549a AD |
3263 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3264 | ||
3265 | * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL. | |
3266 | ||
5092aba5 AD |
3267 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3268 | ||
3269 | * src/conflicts.c, src/conflicts.h (print_reductions): Move to... | |
3270 | * src/print.c: here. | |
3271 | (lookaheadset, shiftset): New, used as additional storage by | |
3272 | print_reductions. | |
3273 | (print_results): Adjust. | |
3274 | (print_shifts, print_gotos, print_errs): New, extracted from... | |
3275 | (print_actions): here. | |
3276 | * src/print_graph.c (print_actions): Remove dead code. | |
3277 | ||
11e2beca AD |
3278 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3279 | ||
3280 | * src/reader.c (copy_dollar, copy_at): Better checking of `n' in | |
3281 | `$n' and `@n'. | |
3282 | ||
dac3c910 AD |
3283 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3284 | ||
3285 | * src/lalr.c (add_lookback_edge): Use state_t instead of ints. | |
3286 | (build_relations): Adjust. | |
3287 | ||
d0b0fefa AD |
3288 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3289 | ||
3290 | * src/lalr.c (set_goto_map): Remove a wrong but benign loop | |
3291 | duplication. | |
3292 | ||
adc8c848 AD |
3293 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3294 | ||
3295 | * src/reader.c (packgram): Catch nitems overflows. | |
3296 | ||
14d293ac AD |
3297 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3298 | ||
3299 | * src/files.c, src/files.h (guard_obstack): Remove. | |
3300 | * src/output.c (output): Adjust. | |
3301 | * src/reader.c (parse_braces): New, factoring... | |
3302 | (copy_action, copy_guard): these two which are renamed as... | |
3303 | (parse_action, parse_guard): these. | |
3304 | As a voluntary consequence, using braces around guards is now | |
3305 | mandatory. | |
3306 | ||
f499b062 AD |
3307 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3308 | ||
3309 | * src/gram.h (rule_t): `guard' and `guard_line' are new members. | |
3310 | * src/reader.c (symbol_list): `guard' and `guard_line' are new | |
3311 | members. | |
3312 | (symbol_list_new): Adjust. | |
3313 | (copy_action): action_line is the first line, not the last. | |
3314 | (copy_guard): Just as for actions, store the `action' only, not | |
3315 | the switch/case/break flesh. | |
3316 | Don't parse the user action that might follow the guard, let... | |
3317 | (readgram): do it, i.e., now, there can be an action after a | |
3318 | guard. | |
3319 | In other words the guard is just explicitly optional. | |
3320 | (packgram): Adjust. | |
3321 | * src/output.c (guards_output): New. | |
3322 | (output_parser): Call it when needed. | |
3323 | (output): Also free the guard and attrs obstacks. | |
3324 | * src/files.c, src/files.h (obstack_save): Remove. | |
3325 | (output_files): Remove. | |
3326 | As a result, if one needs the former `.act' file, using an | |
3327 | appropriate skeleton which requires actions and guards is now | |
3328 | required. | |
3329 | * src/main.c (main): Adjust. | |
3330 | * tests/semantic.at: New. | |
3331 | * tests/regression.at: Use `input.y' as input file name. | |
3332 | Avoid 8+3 problems by requiring input.c when the test needs the | |
3333 | parser. | |
3334 | ||
d945f5cd AD |
3335 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3336 | ||
3337 | * src/reader.c (symbol_list_new): Be sure to initialize all the | |
3338 | fields. | |
3339 | ||
d200e455 AD |
3340 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3341 | ||
3342 | All the hacks using a final pseudo state are now useless. | |
3343 | ||
3344 | * src/LR0.c (set_state_table): state_table holds exactly nstates. | |
3345 | * src/lalr.c (nLA): New. | |
3346 | (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it | |
3347 | instead of lookaheadsp from the pseudo state (nstate + 1). | |
3348 | ||
f9507c28 AD |
3349 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3350 | ||
3351 | * src/output.c (action_row, token_actions): Use a state_t instead | |
3352 | of a integer, and nlookaheads instead of the following state's | |
3353 | lookaheadsp. | |
3354 | ||
065fbd27 AD |
3355 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3356 | ||
3357 | * src/conflicts.c (log_resolution, flush_shift) | |
3358 | (resolve_sr_conflict, set_conflicts, solve_conflicts) | |
3359 | (count_sr_conflicts, count_rr_conflicts, conflicts_output) | |
3360 | (conflicts_print, print_reductions): Use a state_t instead of an | |
3361 | integer when referring to a state. | |
3362 | As much as possible, depend upon nlookaheads, instead of the | |
3363 | `lookaheadsp' member of the following state (since lookaheads of | |
3364 | successive states are successive, the difference between state n + 1 | |
3365 | and n served as the number of lookaheads for state n). | |
3366 | * src/lalr.c (add_lookback_edge): Likewise. | |
3367 | * src/print.c (print_core, print_actions, print_state) | |
3368 | (print_results): Likewise. | |
3369 | * src/print_graph.c (print_core, print_actions, print_state) | |
3370 | (print_graph): Likewise. | |
3371 | * src/conflicts.h: Adjust. | |
3372 | ||
1b177bd7 AD |
3373 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3374 | ||
3375 | * src/bison.hairy: Formatting/comment changes. | |
3376 | ANSIfy. | |
3377 | Remove `register' indications. | |
3378 | Add plenty of `static'. | |
3379 | ||
7742ddeb AD |
3380 | 2001-12-27 Akim Demaille <akim@epita.fr> |
3381 | ||
3382 | * src/output.c (prepare): Drop the muscle `ntbase' which | |
3383 | duplicates ntokens. | |
3384 | * src/bison.simple: Formatting/comment changes. | |
3385 | Use YYNTOKENS only, which is documented, but not YYNTBASE, which | |
3386 | is an undocumented synonym. | |
3387 | ||
1fa14068 AD |
3388 | 2001-12-22 Akim Demaille <akim@epita.fr> |
3389 | ||
3390 | * src/output.c (output_table_data): Change the prototype to use | |
3391 | `int' for array ranges: some invocations do pass an int, not a | |
3392 | short. | |
3393 | Reported by Wayne Green. | |
3394 | ||
b9752825 AD |
3395 | 2001-12-22 Akim Demaille <akim@epita.fr> |
3396 | ||
3397 | Some actions of web2c.y are improperly triggered. | |
3398 | Reported by Mike Castle. | |
3399 | ||
3400 | * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/. | |
3401 | * tests/regression.at (Web2c): Rename as... | |
3402 | (Web2c Report): this. | |
3403 | (Web2c Actions): New. | |
3404 | ||
776209d6 AD |
3405 | 2001-12-22 Akim Demaille <akim@epita.fr> |
3406 | ||
3407 | Reductions in web2c.y are improperly reported. | |
3408 | Reported by Mike Castle. | |
3409 | ||
3410 | * src/conflicts.c (print_reductions): Fix. | |
3411 | * tests/regression.at (Web2c): New. | |
3412 | ||
275fc3ad AD |
3413 | 2001-12-18 Akim Demaille <akim@epita.fr> |
3414 | ||
3415 | Some host fail on `assert (!"foo")', which expands to | |
3416 | ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__)) | |
3417 | Reported by Nelson Beebee. | |
3418 | ||
3419 | * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with | |
3420 | `#define it_succeeded 0' and `assert (it_succeeded)'. | |
3421 | ||
897668ee MA |
3422 | 2001-12-17 Marc Autret <autret_m@epita.fr> |
3423 | ||
3424 | * src/bison.simple: Don't hard code the skeleton line and filename. | |
3425 | * src/output.c (output_parser): Rename 'line' as 'output_line'. | |
3426 | New line counter 'skeleton_line' (skeleton-line muscle). | |
3427 | ||
ab3399e0 PE |
3428 | 2001-12-17 Paul Eggert <eggert@twinsun.com> |
3429 | ||
3430 | * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that | |
3431 | YYDEBUG must be defined to a nonzero value. | |
3432 | ||
3433 | * src/bison.simple (yytname): Do not assume that the user defines | |
3434 | YYDEBUG to a properly parenthesized expression. | |
3435 | ||
3877f72b AD |
3436 | 2001-12-17 Akim Demaille <akim@epita.fr> |
3437 | ||
3438 | * src/state.h (state_t): Rename lookaheads as lookaheadsp. | |
3439 | nlookaheads is a new member. | |
3440 | Adjust all users. | |
3441 | * src/lalr.h (nlookaheads): Remove this orphan declaration. | |
3442 | * src/lalr.c (initialize_lookaheads): Set nlookaheads for each | |
3443 | state. | |
776209d6 | 3444 | |
331dbc1b AD |
3445 | 2001-12-17 Akim Demaille <akim@epita.fr> |
3446 | ||
3447 | * src/files.h, src/files.c (open_files, close_files): Remove. | |
3448 | * src/main.c (main): Don't open/close files, nor invoke lex_free, | |
3449 | let... | |
3450 | * src/reader.c (reader): Do it. | |
776209d6 | 3451 | |
be750e4c AD |
3452 | 2001-12-17 Akim Demaille <akim@epita.fr> |
3453 | ||
3454 | * src/conflicts.c (print_reductions): Formatting changes. | |
776209d6 | 3455 | |
709ae8c6 AD |
3456 | 2001-12-17 Akim Demaille <akim@epita.fr> |
3457 | ||
3458 | * src/conflicts.c (flush_shift): Also adjust lookaheadset. | |
3459 | (flush_reduce): New. | |
3460 | (resolve_sr_conflict): Adjust. | |
776209d6 | 3461 | |
f87685c3 AD |
3462 | 2001-12-17 Akim Demaille <akim@epita.fr> |
3463 | ||
3464 | * src/output.c (output_obstack): Be static and rename as... | |
3465 | (format_obstack): this, to avoid any confusion with files.c's | |
3466 | output_obstack. | |
3467 | * src/reader.h (muscle_obstack): Move to... | |
3468 | * src/output.h: here, since it's defined in output.c. | |
3469 | ||
837491d8 AD |
3470 | 2001-12-17 Akim Demaille <akim@epita.fr> |
3471 | ||
3472 | * src/output.c (action_row, save_column, default_goto) | |
3473 | (sort_actions, matching_state, pack_vector): Better variable | |
3474 | locality. | |
3475 | ||
796d61fb AD |
3476 | 2001-12-17 Akim Demaille <akim@epita.fr> |
3477 | ||
3478 | * src/output.c: Various formatting changes. | |
776209d6 | 3479 | |
64d15509 AD |
3480 | 2001-12-17 Akim Demaille <akim@epita.fr> |
3481 | ||
3482 | * src/files.c (output_files): Free the output_obstack. | |
3483 | * src/main.c (main): Call print and print_graph conditionally. | |
3484 | * src/print.c (print): Work unconditionally. | |
3485 | * src/print_graph.c (print_graph): Work unconditionally. | |
3486 | * src/conflicts.c (log_resolution): Output only if verbose_flag. | |
3487 | ||
fbc8ecb7 MA |
3488 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
3489 | ||
3490 | * src/output.c (actions_output): Fix. When we use %no-lines, | |
3491 | there is one less line per action. | |
3492 | ||
f0440388 MA |
3493 | 2001-12-16 Marc Autret <autret_m@epita.fr> |
3494 | ||
3495 | * src/bison.simple: Remove a useless #line directive. | |
3496 | s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'. | |
3497 | * src/output.c (get_lines_number): New. | |
776209d6 | 3498 | (output_parser): Adjust, now takes care about the lines of a |
f0440388 MA |
3499 | output muscles. |
3500 | Fix line numbering. | |
3501 | (actions_output): Computes the number of lines taken by actions. | |
3502 | (output_master_parser): Insert new skeleton which is the name of | |
3503 | the output parser file name. | |
3504 | ||
a79986b8 MA |
3505 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
3506 | ||
3507 | * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility. | |
3508 | ||
4ec8e00f MA |
3509 | 2001-12-15 Marc Autret <autret_m@epita.fr> |
3510 | ||
3511 | * src/output.c (output_gram): Keep track of the hairy one. | |
3512 | ||
1a4648ff AD |
3513 | 2001-12-15 Akim Demaille <akim@epita.fr> |
3514 | ||
3515 | Make `make distcheck' work. | |
3516 | ||
3517 | * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses | |
3518 | system.h which uses libgettext.h. | |
3519 | ||
9c2c67e6 AD |
3520 | 2001-12-15 Akim Demaille <akim@epita.fr> |
3521 | ||
3522 | * src/nullable.c (set_nullable): Useless rules must be skipped, | |
3523 | otherwise, since we range over their symbols, we might look at a | |
3524 | nonterminal which no longer ``exists'', i.e., it is not counted in | |
3525 | `nvars', hence we overflow our arrays. | |
3526 | ||
93ede233 AD |
3527 | 2001-12-15 Akim Demaille <akim@epita.fr> |
3528 | ||
3529 | The header can also be produced directly, without any obstack! | |
3530 | Yahoo! | |
3531 | ||
3532 | * src/files.c, src/files.h (defines_obstack): Remove. | |
3533 | (compute_header_macro): Global. | |
3534 | (defines_obstack_save): Remove. | |
3535 | * src/reader.c (parse_union_decl): No longer output to | |
3536 | defines_obstack: its content can be found in the `stype' muscle | |
3537 | anyway. | |
3538 | (output_token_translations): Merge into... | |
3539 | (symbols_output): this. | |
3540 | Rename as... | |
3541 | (symbols_save): this. | |
3542 | (reader): Adjust. | |
3543 | * src/output.c (header_output): New. | |
3544 | (output): Call it. | |
3545 | ||
2666f928 AD |
3546 | 2001-12-15 Akim Demaille <akim@epita.fr> |
3547 | ||
3548 | * src/reader.c (parse_union_decl): Instead of handling two obstack | |
3549 | simultaneously, use one to define the `stype' muscle, and use the | |
3550 | value of the latter to fill defines_obstack. | |
3551 | (copy_comment): Remove. | |
3552 | (copy_comment2): Work for a single obstack. | |
3553 | Rename as... | |
3554 | (copy_comment): this. | |
3555 | ||
428046f8 AD |
3556 | 2001-12-15 Akim Demaille <akim@epita.fr> |
3557 | ||
3558 | * src/lex.c, src/lex.h (xgetc): No longer static. | |
3559 | * src/reader.c (parse_union_decl): Revamp. | |
3560 | ||
ea52d706 AD |
3561 | 2001-12-15 Akim Demaille <akim@epita.fr> |
3562 | ||
3563 | Still making progress in separating Bison into (i) input, (ii) | |
3564 | process, (iii) output: now we can directly output the parser file | |
3565 | without using table_obstack at all. | |
3566 | ||
3567 | * src/files.c, src/files.h (table_obstack): Bye bye. | |
3568 | (parser_file_name): New. | |
3569 | * src/files.c (compute_output_file_names): Compute it. | |
3570 | * src/output.c (actions_output, output_parser) | |
3571 | (output_master_parser): To a file instead of an obstack. | |
3572 | ||
3f96f4dc AD |
3573 | 2001-12-15 Akim Demaille <akim@epita.fr> |
3574 | ||
3575 | Attach actions to rules, instead of pre-outputting them to | |
3576 | actions_obstack. | |
3577 | ||
3578 | * src/gram.h (rule_t): action and action_line are new members. | |
3579 | * src/reader.c (symbol_list): Likewise. | |
3580 | (copy_action): Save the actions within the rule. | |
3581 | (packgram): Save them in rule_table. | |
3582 | * src/output.c (actions_output): New. | |
3583 | (output_parser): Use it on `%%actions'. | |
3584 | (output_rule_data): Don't free rule_table. | |
3585 | (output): Do it. | |
3586 | (prepare): Don't save the `action' muscle. | |
3587 | * src/bison.simple: s/%%action/%%actions/. | |
3588 | ||
51576fb3 AD |
3589 | 2001-12-15 Akim Demaille <akim@epita.fr> |
3590 | ||
3591 | * src/reader.c (copy_action): When --yacc, don't append a `;' | |
3592 | to the user action: let it fail if lacking. | |
dee049eb | 3593 | Suggested by Arnold Robbins and Tom Tromey. |
51576fb3 | 3594 | |
2648a72d AD |
3595 | 2001-12-14 Akim Demaille <akim@epita.fr> |
3596 | ||
3597 | * src/lex.c (literalchar): Simply return the char you decoded, non | |
3598 | longer mess around with obstacks and int pointers. | |
3599 | Adjust all callers. | |
3600 | ||
92790e5b AD |
3601 | 2001-12-14 Akim Demaille <akim@epita.fr> |
3602 | ||
3603 | * src/lex.c (literalchar): Don't escape the special characters, | |
3604 | just decode them, and keep them as char (before, eol was output as | |
3605 | the 2 char string `\n' etc.). | |
3606 | * src/output.c (output_rule_data): Use quotearg to output the | |
3607 | token strings. | |
3608 | ||
927c1557 PE |
3609 | 2001-12-13 Paul Eggert <eggert@twinsun.com> |
3610 | ||
3611 | * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE): | |
3612 | Do not infringe on the global user namespace when using C++. | |
3613 | (YYFPRINTF, YYSTDERR): New macros, needed for the above. | |
3614 | All uses of `fprintf' and `stderr' changed. | |
3615 | ||
3616 | * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR. | |
3617 | ||
ed8e1f68 AD |
3618 | 2001-12-13 Akim Demaille <akim@epita.fr> |
3619 | ||
3620 | The computation of nullable is broken: it doesn't handle empty | |
3621 | RHS's properly. | |
3622 | ||
3623 | * tests/torture.at (GNU AWK Grammar): New. | |
3624 | * tests/sets.at (Nullable): New. | |
3625 | * src/nullable.c (set_nullable): Instead of blindly looping over | |
3626 | `ritems', loop over the rules, and then over their rhs's. | |
3627 | ||
3628 | Work around Autotest bugs. | |
3629 | ||
3630 | * src/warshall.c (bitmatrix_print): Don't use `+--+' as table | |
3631 | frame, because Autotest understand lines starting with a `+' as | |
3632 | traces from the shell. Then, they are not processed properly. | |
3633 | Admittedly an Autotest bug, but we don't have time to wait for | |
3634 | Autotest to catch up. | |
3635 | * tests/regression.at (Broken Closure): Adjust to the new table | |
3636 | frames. | |
3637 | Move to... | |
3638 | * tests/sets.at: here. | |
3639 | ||
cb581495 AD |
3640 | 2001-12-13 Akim Demaille <akim@epita.fr> |
3641 | ||
3642 | * src/closure.c (closure): Use nrules instead of playing tricks | |
3643 | with BITS_PER_WORD. | |
3644 | ||
2e729273 AD |
3645 | 2001-12-13 Akim Demaille <akim@epita.fr> |
3646 | ||
3647 | * src/print.c (print_actions): Output the handling of `$' as the | |
3648 | traces do: shifting the token EOF. Before EOF was treated as a | |
3649 | nonterminal. | |
3650 | * tests/regression.at: Adjust some tests. | |
3651 | * src/print_graph.c (print_core): Complete the set of items via | |
3652 | closure. The next-to-final and final states are still unsatisfying, | |
3653 | but that's to be addressed elsewhere. | |
3654 | No longer output the rule numbers, but do output the state number. | |
3655 | A single loop for the shifts + gotos is enough, but picked a | |
3656 | distinct color for each. | |
3657 | (print_graph): Initialize and finalize closure. | |
3658 | ||
107f7dfb AD |
3659 | 2001-12-13 Akim Demaille <akim@epita.fr> |
3660 | ||
3661 | * src/reader.c (readgram): Remove dead code, an strip useless | |
3662 | braces. | |
3663 | (get_type): Remove, unused. | |
3664 | ||
9b53a24f AD |
3665 | 2001-12-12 Akim Demaille <akim@epita.fr> |
3666 | ||
3667 | * src/complain.h, src/complain.c: Remove error_one_per_line, rely | |
3668 | on that of lib/error.c. | |
3669 | ||
dbfb6dcd AD |
3670 | 2001-12-12 Akim Demaille <akim@epita.fr> |
3671 | ||
3672 | Some hosts don't like `/' in includes. | |
3673 | ||
3674 | * src/system.h: Include libgettext.h without qualifying the path. | |
3675 | * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove | |
3676 | $(top_srcdir). | |
3677 | ||
c25fb648 MA |
3678 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
3679 | ||
3680 | * src/output.c (output_parser): Remove useless muscle. | |
3681 | ||
710ddc4f MA |
3682 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
3683 | ||
3684 | * src/bison.simple: Remove #line just before %%epilogue. It | |
3685 | is now handled in ... | |
3686 | * src/reader.c (read_additionnal_code): Add the output of a | |
3687 | #line for the epilogue. | |
3688 | ||
e83d80b8 MA |
3689 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
3690 | ||
927c1557 | 3691 | * src/reader.c (copy_definition): Re-use CPP-outed code which |
e83d80b8 MA |
3692 | replace precedent remove. |
3693 | * src/bison.simple: Remove #line before %%prologue because | |
3694 | %%input-line is wrong at this time. | |
3695 | ||
971d5158 MA |
3696 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
3697 | ||
3698 | * src/reader.c (symbols_output): Clean up. | |
927c1557 | 3699 | * src/output.c (output_gram, output): Clean up. |
971d5158 | 3700 | |
5edafffd AD |
3701 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3702 | ||
3703 | * src/lalr.c (initialize_lookaheads): New. Extracted from... | |
3704 | * src/LR0.c (set_state_table): here. | |
3705 | * src/lalr.c (lalr): Call it. | |
3706 | ||
0279f8e9 AD |
3707 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3708 | ||
3709 | * src/state.h (shifts): Remove the `number' member: shifts are | |
3710 | attached to state, hence no longer need to be labelled with a | |
3711 | state number. | |
3712 | ||
190c4f5f AD |
3713 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3714 | ||
3715 | Now that states have a complete set of members, the linked list of | |
3716 | shifts is useless: just fill directly the state's shifts member. | |
3717 | ||
3718 | * src/state.h (shifts): Remove the `next' member. | |
3719 | * src/LR0.c (first_state, last_state): Remove. | |
3720 | Adjust the callers. | |
3721 | (augment_automaton): Don't look for the shifts that must be added | |
3722 | a shift on EOF: it is those of the state we looked for! But now, | |
3723 | since shifts are attached, it is no longer needed to looking | |
3724 | merely by its id: its number. | |
3725 | ||
2a73b93d AD |
3726 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3727 | ||
3728 | * src/LR0.c (augment_automaton): Better variable locality. | |
3729 | Remove an impossible branch: if there is a state corresponding to | |
3730 | the start symbol being shifted, then there is shift for the start | |
3731 | symbol from the initial state. | |
3732 | ||
74392f6a AD |
3733 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3734 | ||
3735 | * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state' | |
3736 | only when appropriate: when insert_start_shifting_state' is not | |
3737 | invoked. | |
3738 | * tests/regression.at (Rule Line Numbers): Adjust. | |
3739 | ||
37c82725 AD |
3740 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3741 | ||
3742 | * src/LR0.c (augment_automaton): Now that all states have shifts, | |
3743 | merge the two cases addition shifts to the initial state. | |
3744 | ||
6a164e0c AD |
3745 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3746 | ||
3747 | * src/lalr.c (set_state_table): Move to... | |
3748 | * src/LR0.c: here. | |
3749 | * src/lalr.c (lalr): Don't call it... | |
3750 | * src/LR0.c (generate_states): do it. | |
3751 | * src/LR0.h (first_state): Remove, only the table is used. | |
3752 | ||
7215de24 AD |
3753 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3754 | ||
3755 | * src/LR0.h (first_shift, first_reduction): Remove. | |
3756 | * src/lalr.c: Don't use first_shift: find shifts through the | |
3757 | states. | |
3758 | ||
80e25d4d AD |
3759 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3760 | ||
3761 | * src/LR0.c: Attach shifts to states as soon as they are | |
3762 | computed. | |
3763 | * src/lalr.c (set_state_table): Instead of assigning shifts to | |
3764 | state, just assert that the mapping was properly done. | |
3765 | ||
0ab3728b AD |
3766 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3767 | ||
3768 | * src/LR0.c (insert_start_shift): Rename as... | |
3769 | (insert_start_shifting_state): this. | |
3770 | (insert_eof_shifting_state, insert_accepting_state): New. | |
3771 | (augment_automaton): Adjust. | |
3772 | Better locality of the variables. | |
3773 | When looking if the start_symbol is shifted from the initial | |
3774 | state, using `while (... symbol != start_symbol ...)' sounds | |
3775 | better than `while (... symbol < start_symbol ...)': If fail | |
3776 | to see how the order between symbols could be relevant! | |
3777 | ||
78af9bbc AD |
3778 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3779 | ||
3780 | * src/getargs.h: Don't declare `spec_name_prefix' and | |
3781 | `spec_file_prefix', declared by src/files.h. | |
3782 | * src/files.c, src/files.h: Default for spec_name_prefix is "yy". | |
3783 | * src/muscle_tab.c (muscle_init): Default prefix to NULL. | |
3784 | * src/output.c (prepare): Adjust. | |
3785 | * src/reader.c (symbols_output): Likewise. | |
3786 | * src/vmsgetargs.c: Vaguely adjust, but who cares? | |
3787 | ||
bdef2a41 AD |
3788 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3789 | ||
3790 | * src/muscle_tab.c (muscle_init): NULL is a better default than | |
3791 | `"0"'. | |
3792 | ||
3735969c AD |
3793 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3794 | ||
3795 | * src/reader.c (reader): Calling symbols_output once is enough. | |
3796 | ||
49701457 AD |
3797 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3798 | ||
3799 | Now that states have a complete set of members, the linked list of | |
3800 | reductions is useless: just fill directly the state's reductions | |
3801 | member. | |
3802 | ||
3803 | * src/state.h (struct reductions): Remove member `number' and | |
3804 | `next'. | |
3805 | * src/LR0.c (first_reduction, last_reduction): Remove. | |
3806 | (save_reductions): Don't link the new reductions, store them in | |
3807 | this_state. | |
3808 | * src/lalr.c (set_state_table): No need to attach reductions to | |
3809 | states, it's already done. | |
3810 | * src/output.c (output_actions): No longer free the shifts, then | |
3811 | the reductions, then the states: free all the states and their | |
3812 | members. | |
3813 | ||
0edad749 AD |
3814 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3815 | ||
3816 | * src/options.c (OPTN, DRTV, BOTH): New. | |
3817 | (option_table): Use them. | |
3818 | ||
0edad749 AD |
3819 | * src/muscle_tab.c: Don't include xalloc.h and string.h: that's |
3820 | the job of system.h. | |
3821 | * src/options.c: Don't include stdio.h and xalloc.h for the same | |
3822 | reasons. | |
3823 | ||
5449dd0f AD |
3824 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3825 | ||
3826 | * src/output.c (output, prepare): Make sure the values of the | |
3827 | muscles `action' and `prologue' are 0-terminated. | |
3828 | ||
a870c567 AD |
3829 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3830 | ||
3831 | Clean up GCC warnings. | |
3832 | ||
3833 | * src/reader.c (copy_action): `buf' is not used. | |
3834 | (parse_skel_decl): Be static. | |
3835 | * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. | |
3836 | * src/options.h (create_long_option_table): Have a real prototype. | |
3837 | * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) | |
3838 | (hash_delete_at): Return const void *. | |
3839 | Adjust casts to preserve the const. | |
3840 | ||
80df8768 AD |
3841 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3842 | ||
3843 | * configure.in: Require 2.52g. | |
3844 | M4 is not needed, but AUTOM4TE is. | |
3845 | * m4/m4.m4: Remove. | |
3846 | * tests/Makefile.am: Adjust. | |
3847 | ||
f693ad14 AD |
3848 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3849 | ||
3850 | One structure for states is enough, even though theoretically | |
3851 | there are LR(0) states and LALR(1) states. | |
3852 | ||
3853 | * src/lalr.h (state_t): Remove. | |
3854 | (state_table): Be state_t **, not state_t *. | |
3855 | * src/state.h (core, CORE_ALLOC): Rename as... | |
3856 | (state_t, STATE_ALLOC): this. | |
3857 | Add the LALR(1) members: shifts, reductions, errs. | |
3858 | * src/LR0.c (state_table): Rename as... | |
3859 | (state_hash): this, to avoid name clashes with the global | |
3860 | `state_table'. | |
3861 | * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c | |
3862 | * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust. | |
3863 | ||
74ffbcb6 AD |
3864 | 2001-12-10 Akim Demaille <akim@epita.fr> |
3865 | ||
3866 | Bison dumps core on bash.y. | |
3867 | Reported by Pascal Bart. | |
3868 | ||
3869 | * src/warshall.c (bitmatrix_print): New. | |
3870 | (TC): Use it. | |
3871 | When performing a transitive closure R(i, j) && R(j, k) => R(i, k), | |
3872 | j must be the outer loop. | |
3873 | * tests/regression.at (Broken Closure): New. | |
3874 | ||
07708e19 AD |
3875 | 2001-12-05 Akim Demaille <akim@epita.fr> |
3876 | ||
3877 | * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and | |
3878 | its argument. | |
3879 |