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