]>
Commit | Line | Data |
---|---|---|
2648a72d AD |
1 | 2001-12-14 Akim Demaille <akim@epita.fr> |
2 | ||
3 | * src/lex.c (literalchar): Simply return the char you decoded, non | |
4 | longer mess around with obstacks and int pointers. | |
5 | Adjust all callers. | |
6 | ||
92790e5b AD |
7 | 2001-12-14 Akim Demaille <akim@epita.fr> |
8 | ||
9 | * src/lex.c (literalchar): Don't escape the special characters, | |
10 | just decode them, and keep them as char (before, eol was output as | |
11 | the 2 char string `\n' etc.). | |
12 | * src/output.c (output_rule_data): Use quotearg to output the | |
13 | token strings. | |
14 | ||
927c1557 PE |
15 | 2001-12-13 Paul Eggert <eggert@twinsun.com> |
16 | ||
17 | * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE): | |
18 | Do not infringe on the global user namespace when using C++. | |
19 | (YYFPRINTF, YYSTDERR): New macros, needed for the above. | |
20 | All uses of `fprintf' and `stderr' changed. | |
21 | ||
22 | * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR. | |
23 | ||
ed8e1f68 AD |
24 | 2001-12-13 Akim Demaille <akim@epita.fr> |
25 | ||
26 | The computation of nullable is broken: it doesn't handle empty | |
27 | RHS's properly. | |
28 | ||
29 | * tests/torture.at (GNU AWK Grammar): New. | |
30 | * tests/sets.at (Nullable): New. | |
31 | * src/nullable.c (set_nullable): Instead of blindly looping over | |
32 | `ritems', loop over the rules, and then over their rhs's. | |
33 | ||
34 | Work around Autotest bugs. | |
35 | ||
36 | * src/warshall.c (bitmatrix_print): Don't use `+--+' as table | |
37 | frame, because Autotest understand lines starting with a `+' as | |
38 | traces from the shell. Then, they are not processed properly. | |
39 | Admittedly an Autotest bug, but we don't have time to wait for | |
40 | Autotest to catch up. | |
41 | * tests/regression.at (Broken Closure): Adjust to the new table | |
42 | frames. | |
43 | Move to... | |
44 | * tests/sets.at: here. | |
45 | ||
cb581495 AD |
46 | 2001-12-13 Akim Demaille <akim@epita.fr> |
47 | ||
48 | * src/closure.c (closure): Use nrules instead of playing tricks | |
49 | with BITS_PER_WORD. | |
50 | ||
2e729273 AD |
51 | 2001-12-13 Akim Demaille <akim@epita.fr> |
52 | ||
53 | * src/print.c (print_actions): Output the handling of `$' as the | |
54 | traces do: shifting the token EOF. Before EOF was treated as a | |
55 | nonterminal. | |
56 | * tests/regression.at: Adjust some tests. | |
57 | * src/print_graph.c (print_core): Complete the set of items via | |
58 | closure. The next-to-final and final states are still unsatisfying, | |
59 | but that's to be addressed elsewhere. | |
60 | No longer output the rule numbers, but do output the state number. | |
61 | A single loop for the shifts + gotos is enough, but picked a | |
62 | distinct color for each. | |
63 | (print_graph): Initialize and finalize closure. | |
64 | ||
107f7dfb AD |
65 | 2001-12-13 Akim Demaille <akim@epita.fr> |
66 | ||
67 | * src/reader.c (readgram): Remove dead code, an strip useless | |
68 | braces. | |
69 | (get_type): Remove, unused. | |
70 | ||
9b53a24f AD |
71 | 2001-12-12 Akim Demaille <akim@epita.fr> |
72 | ||
73 | * src/complain.h, src/complain.c: Remove error_one_per_line, rely | |
74 | on that of lib/error.c. | |
75 | ||
dbfb6dcd AD |
76 | 2001-12-12 Akim Demaille <akim@epita.fr> |
77 | ||
78 | Some hosts don't like `/' in includes. | |
79 | ||
80 | * src/system.h: Include libgettext.h without qualifying the path. | |
81 | * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove | |
82 | $(top_srcdir). | |
83 | ||
c25fb648 MA |
84 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
85 | ||
86 | * src/output.c (output_parser): Remove useless muscle. | |
87 | ||
710ddc4f MA |
88 | 2001-12-11 Marc Autret <autret_m@epita.fr> |
89 | ||
90 | * src/bison.simple: Remove #line just before %%epilogue. It | |
91 | is now handled in ... | |
92 | * src/reader.c (read_additionnal_code): Add the output of a | |
93 | #line for the epilogue. | |
94 | ||
e83d80b8 MA |
95 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
96 | ||
927c1557 | 97 | * src/reader.c (copy_definition): Re-use CPP-outed code which |
e83d80b8 MA |
98 | replace precedent remove. |
99 | * src/bison.simple: Remove #line before %%prologue because | |
100 | %%input-line is wrong at this time. | |
101 | ||
971d5158 MA |
102 | 2001-12-10 Marc Autret <autret_m@epita.fr> |
103 | ||
104 | * src/reader.c (symbols_output): Clean up. | |
927c1557 | 105 | * src/output.c (output_gram, output): Clean up. |
971d5158 | 106 | |
5edafffd AD |
107 | 2001-12-10 Akim Demaille <akim@epita.fr> |
108 | ||
109 | * src/lalr.c (initialize_lookaheads): New. Extracted from... | |
110 | * src/LR0.c (set_state_table): here. | |
111 | * src/lalr.c (lalr): Call it. | |
112 | ||
0279f8e9 AD |
113 | 2001-12-10 Akim Demaille <akim@epita.fr> |
114 | ||
115 | * src/state.h (shifts): Remove the `number' member: shifts are | |
116 | attached to state, hence no longer need to be labelled with a | |
117 | state number. | |
118 | ||
190c4f5f AD |
119 | 2001-12-10 Akim Demaille <akim@epita.fr> |
120 | ||
121 | Now that states have a complete set of members, the linked list of | |
122 | shifts is useless: just fill directly the state's shifts member. | |
123 | ||
124 | * src/state.h (shifts): Remove the `next' member. | |
125 | * src/LR0.c (first_state, last_state): Remove. | |
126 | Adjust the callers. | |
127 | (augment_automaton): Don't look for the shifts that must be added | |
128 | a shift on EOF: it is those of the state we looked for! But now, | |
129 | since shifts are attached, it is no longer needed to looking | |
130 | merely by its id: its number. | |
131 | ||
2a73b93d AD |
132 | 2001-12-10 Akim Demaille <akim@epita.fr> |
133 | ||
134 | * src/LR0.c (augment_automaton): Better variable locality. | |
135 | Remove an impossible branch: if there is a state corresponding to | |
136 | the start symbol being shifted, then there is shift for the start | |
137 | symbol from the initial state. | |
138 | ||
74392f6a AD |
139 | 2001-12-10 Akim Demaille <akim@epita.fr> |
140 | ||
141 | * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state' | |
142 | only when appropriate: when insert_start_shifting_state' is not | |
143 | invoked. | |
144 | * tests/regression.at (Rule Line Numbers): Adjust. | |
145 | ||
37c82725 AD |
146 | 2001-12-10 Akim Demaille <akim@epita.fr> |
147 | ||
148 | * src/LR0.c (augment_automaton): Now that all states have shifts, | |
149 | merge the two cases addition shifts to the initial state. | |
150 | ||
6a164e0c AD |
151 | 2001-12-10 Akim Demaille <akim@epita.fr> |
152 | ||
153 | * src/lalr.c (set_state_table): Move to... | |
154 | * src/LR0.c: here. | |
155 | * src/lalr.c (lalr): Don't call it... | |
156 | * src/LR0.c (generate_states): do it. | |
157 | * src/LR0.h (first_state): Remove, only the table is used. | |
158 | ||
7215de24 AD |
159 | 2001-12-10 Akim Demaille <akim@epita.fr> |
160 | ||
161 | * src/LR0.h (first_shift, first_reduction): Remove. | |
162 | * src/lalr.c: Don't use first_shift: find shifts through the | |
163 | states. | |
164 | ||
80e25d4d AD |
165 | 2001-12-10 Akim Demaille <akim@epita.fr> |
166 | ||
167 | * src/LR0.c: Attach shifts to states as soon as they are | |
168 | computed. | |
169 | * src/lalr.c (set_state_table): Instead of assigning shifts to | |
170 | state, just assert that the mapping was properly done. | |
171 | ||
0ab3728b AD |
172 | 2001-12-10 Akim Demaille <akim@epita.fr> |
173 | ||
174 | * src/LR0.c (insert_start_shift): Rename as... | |
175 | (insert_start_shifting_state): this. | |
176 | (insert_eof_shifting_state, insert_accepting_state): New. | |
177 | (augment_automaton): Adjust. | |
178 | Better locality of the variables. | |
179 | When looking if the start_symbol is shifted from the initial | |
180 | state, using `while (... symbol != start_symbol ...)' sounds | |
181 | better than `while (... symbol < start_symbol ...)': If fail | |
182 | to see how the order between symbols could be relevant! | |
183 | ||
78af9bbc AD |
184 | 2001-12-10 Akim Demaille <akim@epita.fr> |
185 | ||
186 | * src/getargs.h: Don't declare `spec_name_prefix' and | |
187 | `spec_file_prefix', declared by src/files.h. | |
188 | * src/files.c, src/files.h: Default for spec_name_prefix is "yy". | |
189 | * src/muscle_tab.c (muscle_init): Default prefix to NULL. | |
190 | * src/output.c (prepare): Adjust. | |
191 | * src/reader.c (symbols_output): Likewise. | |
192 | * src/vmsgetargs.c: Vaguely adjust, but who cares? | |
193 | ||
bdef2a41 AD |
194 | 2001-12-10 Akim Demaille <akim@epita.fr> |
195 | ||
196 | * src/muscle_tab.c (muscle_init): NULL is a better default than | |
197 | `"0"'. | |
198 | ||
3735969c AD |
199 | 2001-12-10 Akim Demaille <akim@epita.fr> |
200 | ||
201 | * src/reader.c (reader): Calling symbols_output once is enough. | |
202 | ||
49701457 AD |
203 | 2001-12-10 Akim Demaille <akim@epita.fr> |
204 | ||
205 | Now that states have a complete set of members, the linked list of | |
206 | reductions is useless: just fill directly the state's reductions | |
207 | member. | |
208 | ||
209 | * src/state.h (struct reductions): Remove member `number' and | |
210 | `next'. | |
211 | * src/LR0.c (first_reduction, last_reduction): Remove. | |
212 | (save_reductions): Don't link the new reductions, store them in | |
213 | this_state. | |
214 | * src/lalr.c (set_state_table): No need to attach reductions to | |
215 | states, it's already done. | |
216 | * src/output.c (output_actions): No longer free the shifts, then | |
217 | the reductions, then the states: free all the states and their | |
218 | members. | |
219 | ||
0edad749 AD |
220 | 2001-12-10 Akim Demaille <akim@epita.fr> |
221 | ||
222 | * src/options.c (OPTN, DRTV, BOTH): New. | |
223 | (option_table): Use them. | |
224 | ||
0edad749 AD |
225 | * src/muscle_tab.c: Don't include xalloc.h and string.h: that's |
226 | the job of system.h. | |
227 | * src/options.c: Don't include stdio.h and xalloc.h for the same | |
228 | reasons. | |
229 | ||
5449dd0f AD |
230 | 2001-12-10 Akim Demaille <akim@epita.fr> |
231 | ||
232 | * src/output.c (output, prepare): Make sure the values of the | |
233 | muscles `action' and `prologue' are 0-terminated. | |
234 | ||
a870c567 AD |
235 | 2001-12-10 Akim Demaille <akim@epita.fr> |
236 | ||
237 | Clean up GCC warnings. | |
238 | ||
239 | * src/reader.c (copy_action): `buf' is not used. | |
240 | (parse_skel_decl): Be static. | |
241 | * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. | |
242 | * src/options.h (create_long_option_table): Have a real prototype. | |
243 | * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) | |
244 | (hash_delete_at): Return const void *. | |
245 | Adjust casts to preserve the const. | |
246 | ||
80df8768 AD |
247 | 2001-12-10 Akim Demaille <akim@epita.fr> |
248 | ||
249 | * configure.in: Require 2.52g. | |
250 | M4 is not needed, but AUTOM4TE is. | |
251 | * m4/m4.m4: Remove. | |
252 | * tests/Makefile.am: Adjust. | |
253 | ||
f693ad14 AD |
254 | 2001-12-10 Akim Demaille <akim@epita.fr> |
255 | ||
256 | One structure for states is enough, even though theoretically | |
257 | there are LR(0) states and LALR(1) states. | |
258 | ||
259 | * src/lalr.h (state_t): Remove. | |
260 | (state_table): Be state_t **, not state_t *. | |
261 | * src/state.h (core, CORE_ALLOC): Rename as... | |
262 | (state_t, STATE_ALLOC): this. | |
263 | Add the LALR(1) members: shifts, reductions, errs. | |
264 | * src/LR0.c (state_table): Rename as... | |
265 | (state_hash): this, to avoid name clashes with the global | |
266 | `state_table'. | |
267 | * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c | |
268 | * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust. | |
269 | ||
74ffbcb6 AD |
270 | 2001-12-10 Akim Demaille <akim@epita.fr> |
271 | ||
272 | Bison dumps core on bash.y. | |
273 | Reported by Pascal Bart. | |
274 | ||
275 | * src/warshall.c (bitmatrix_print): New. | |
276 | (TC): Use it. | |
277 | When performing a transitive closure R(i, j) && R(j, k) => R(i, k), | |
278 | j must be the outer loop. | |
279 | * tests/regression.at (Broken Closure): New. | |
280 | ||
07708e19 AD |
281 | 2001-12-05 Akim Demaille <akim@epita.fr> |
282 | ||
283 | * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and | |
284 | its argument. | |
285 |