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