]>
Commit | Line | Data |
---|---|---|
1 | 2001-12-10 Marc Autret <autret_m@epita.fr> | |
2 | ||
3 | * src/reader.c (copy_definition): Re-use CPP-outed code which | |
4 | replace precedent remove. | |
5 | * src/bison.simple: Remove #line before %%prologue because | |
6 | %%input-line is wrong at this time. | |
7 | ||
8 | 2001-12-10 Marc Autret <autret_m@epita.fr> | |
9 | ||
10 | * src/reader.c (symbols_output): Clean up. | |
11 | * src/output.c (output_gram, output): Clean up. | |
12 | ||
13 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
14 | ||
15 | * src/lalr.c (initialize_lookaheads): New. Extracted from... | |
16 | * src/LR0.c (set_state_table): here. | |
17 | * src/lalr.c (lalr): Call it. | |
18 | ||
19 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
20 | ||
21 | * src/state.h (shifts): Remove the `number' member: shifts are | |
22 | attached to state, hence no longer need to be labelled with a | |
23 | state number. | |
24 | ||
25 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
26 | ||
27 | Now that states have a complete set of members, the linked list of | |
28 | shifts is useless: just fill directly the state's shifts member. | |
29 | ||
30 | * src/state.h (shifts): Remove the `next' member. | |
31 | * src/LR0.c (first_state, last_state): Remove. | |
32 | Adjust the callers. | |
33 | (augment_automaton): Don't look for the shifts that must be added | |
34 | a shift on EOF: it is those of the state we looked for! But now, | |
35 | since shifts are attached, it is no longer needed to looking | |
36 | merely by its id: its number. | |
37 | ||
38 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
39 | ||
40 | * src/LR0.c (augment_automaton): Better variable locality. | |
41 | Remove an impossible branch: if there is a state corresponding to | |
42 | the start symbol being shifted, then there is shift for the start | |
43 | symbol from the initial state. | |
44 | ||
45 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
46 | ||
47 | * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state' | |
48 | only when appropriate: when insert_start_shifting_state' is not | |
49 | invoked. | |
50 | * tests/regression.at (Rule Line Numbers): Adjust. | |
51 | ||
52 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
53 | ||
54 | * src/LR0.c (augment_automaton): Now that all states have shifts, | |
55 | merge the two cases addition shifts to the initial state. | |
56 | ||
57 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
58 | ||
59 | * src/lalr.c (set_state_table): Move to... | |
60 | * src/LR0.c: here. | |
61 | * src/lalr.c (lalr): Don't call it... | |
62 | * src/LR0.c (generate_states): do it. | |
63 | * src/LR0.h (first_state): Remove, only the table is used. | |
64 | ||
65 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
66 | ||
67 | * src/LR0.h (first_shift, first_reduction): Remove. | |
68 | * src/lalr.c: Don't use first_shift: find shifts through the | |
69 | states. | |
70 | ||
71 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
72 | ||
73 | * src/LR0.c: Attach shifts to states as soon as they are | |
74 | computed. | |
75 | * src/lalr.c (set_state_table): Instead of assigning shifts to | |
76 | state, just assert that the mapping was properly done. | |
77 | ||
78 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
79 | ||
80 | * src/LR0.c (insert_start_shift): Rename as... | |
81 | (insert_start_shifting_state): this. | |
82 | (insert_eof_shifting_state, insert_accepting_state): New. | |
83 | (augment_automaton): Adjust. | |
84 | Better locality of the variables. | |
85 | When looking if the start_symbol is shifted from the initial | |
86 | state, using `while (... symbol != start_symbol ...)' sounds | |
87 | better than `while (... symbol < start_symbol ...)': If fail | |
88 | to see how the order between symbols could be relevant! | |
89 | ||
90 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
91 | ||
92 | * src/getargs.h: Don't declare `spec_name_prefix' and | |
93 | `spec_file_prefix', declared by src/files.h. | |
94 | * src/files.c, src/files.h: Default for spec_name_prefix is "yy". | |
95 | * src/muscle_tab.c (muscle_init): Default prefix to NULL. | |
96 | * src/output.c (prepare): Adjust. | |
97 | * src/reader.c (symbols_output): Likewise. | |
98 | * src/vmsgetargs.c: Vaguely adjust, but who cares? | |
99 | ||
100 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
101 | ||
102 | * src/muscle_tab.c (muscle_init): NULL is a better default than | |
103 | `"0"'. | |
104 | ||
105 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
106 | ||
107 | * src/reader.c (reader): Calling symbols_output once is enough. | |
108 | ||
109 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
110 | ||
111 | Now that states have a complete set of members, the linked list of | |
112 | reductions is useless: just fill directly the state's reductions | |
113 | member. | |
114 | ||
115 | * src/state.h (struct reductions): Remove member `number' and | |
116 | `next'. | |
117 | * src/LR0.c (first_reduction, last_reduction): Remove. | |
118 | (save_reductions): Don't link the new reductions, store them in | |
119 | this_state. | |
120 | * src/lalr.c (set_state_table): No need to attach reductions to | |
121 | states, it's already done. | |
122 | * src/output.c (output_actions): No longer free the shifts, then | |
123 | the reductions, then the states: free all the states and their | |
124 | members. | |
125 | ||
126 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
127 | ||
128 | * src/options.c (OPTN, DRTV, BOTH): New. | |
129 | (option_table): Use them. | |
130 | ||
131 | * src/muscle_tab.c: Don't include xalloc.h and string.h: that's | |
132 | the job of system.h. | |
133 | * src/options.c: Don't include stdio.h and xalloc.h for the same | |
134 | reasons. | |
135 | ||
136 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
137 | ||
138 | * src/output.c (output, prepare): Make sure the values of the | |
139 | muscles `action' and `prologue' are 0-terminated. | |
140 | ||
141 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
142 | ||
143 | Clean up GCC warnings. | |
144 | ||
145 | * src/reader.c (copy_action): `buf' is not used. | |
146 | (parse_skel_decl): Be static. | |
147 | * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'. | |
148 | * src/options.h (create_long_option_table): Have a real prototype. | |
149 | * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete) | |
150 | (hash_delete_at): Return const void *. | |
151 | Adjust casts to preserve the const. | |
152 | ||
153 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
154 | ||
155 | * configure.in: Require 2.52g. | |
156 | M4 is not needed, but AUTOM4TE is. | |
157 | * m4/m4.m4: Remove. | |
158 | * tests/Makefile.am: Adjust. | |
159 | ||
160 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
161 | ||
162 | One structure for states is enough, even though theoretically | |
163 | there are LR(0) states and LALR(1) states. | |
164 | ||
165 | * src/lalr.h (state_t): Remove. | |
166 | (state_table): Be state_t **, not state_t *. | |
167 | * src/state.h (core, CORE_ALLOC): Rename as... | |
168 | (state_t, STATE_ALLOC): this. | |
169 | Add the LALR(1) members: shifts, reductions, errs. | |
170 | * src/LR0.c (state_table): Rename as... | |
171 | (state_hash): this, to avoid name clashes with the global | |
172 | `state_table'. | |
173 | * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c | |
174 | * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust. | |
175 | ||
176 | 2001-12-10 Akim Demaille <akim@epita.fr> | |
177 | ||
178 | Bison dumps core on bash.y. | |
179 | Reported by Pascal Bart. | |
180 | ||
181 | * src/warshall.c (bitmatrix_print): New. | |
182 | (TC): Use it. | |
183 | When performing a transitive closure R(i, j) && R(j, k) => R(i, k), | |
184 | j must be the outer loop. | |
185 | * tests/regression.at (Broken Closure): New. | |
186 | ||
187 | 2001-12-05 Akim Demaille <akim@epita.fr> | |
188 | ||
189 | * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and | |
190 | its argument. | |
191 |