Better support cross-compiling. Patch #19003.
[pspp-builds.git] / src / language / lexer / ChangeLog
1 Fri Feb 16 11:14:42 2007  Ben Pfaff  <blp@gnu.org>
2
3         Better support cross-compiling by using CC_FOR_BUILD and
4         EXEEXT_FOR_BUILD for q2c.
5         
6         * automake.mk: Use EXEEXT_FOR_BUILD and CC_FOR_BUILD to build and
7         clean q2c.
8
9         * q2c.c: Avoid external dependencies, besides the standard C
10         library.
11
12 Sun Feb 11 20:31:51 2007  Ben Pfaff  <blp@gnu.org>
13
14         * q2c.c: Make q2c link under mingw32, by eliminating the
15         dependency on localtime.  Gnulib replaces localtime by a fixed
16         version, but we don't link q2c against gnulib.  q2c only uses
17         localtime to put the time of processing into the output file,
18         which I've never in practice found to be useful, so the patch just
19         drops this feature.
20
21 Wed Dec 13 21:00:24 2006  Ben Pfaff  <blp@gnu.org>
22
23         * variable-parser.c (parse_variables): If not successful, set
24         output pointer to NULL and output count to 0.
25
26 Sat Dec  9 18:46:11 2006  Ben Pfaff  <blp@gnu.org>
27
28         * variable-parser.h: New PV_SAME_WIDTH variable parsing option.
29
30         * variable-parser.c (add_variable): Implement new PV_SAME_WIDTH
31         option.
32         (parse_var_set_vars) Ditto.
33         (array_var_set_lookup_var_idx) Use new var_create, var_destroy
34         functions.
35
36 Sat Dec  2 21:19:50 2006  Ben Pfaff  <blp@gnu.org>
37
38         General clean-up.
39         
40         * lexer.c: (lex_token_name) Don't use a static buffer or, rather,
41         use a separate static buffer for each possible answer.
42         (lex_token_representation) Now use lex_token_name as building
43         block.  Previously this broke lex_force_match because it uses
44         lex_token_name in a call to lex_error, which in turn uses
45         lex_token_representation.
46         (lex_force_match_id) Use lex_match_id as building block, to
47         simplify.
48         (parse_id) Rewrite to work with modified lex_id_to_token and
49         lex_id_get_length.  The computation of rest_of_line is a bit of an
50         abomination but it will get fixed later.
51         
52 Sat Dec  2 20:16:50 2006  Ben Pfaff  <blp@gnu.org>
53
54         * lexer.c (struct lexer): Change function signature for
55         `read_line' to take an "enum getl_syntax *" instead of "bool *".
56         (lex_create) Ditto, for argument.
57         (lex_preprocess_line) New function.
58         (lex_get_line_raw) New arg, to allow caller to obtain getl_syntax
59         of the line read.
60         (lex_get_line) Use lex_get_line_raw and lex_preprocess_line to
61         simplify.
62
63 Sun Nov 19 09:20:42 2006  Ben Pfaff  <blp@gnu.org>
64
65         * range-parser.c (parse_num_range): Because data_in takes an enum
66         fmt_type now, not a struct fmt_spec, change the type of the
67         corresponding argument.  Updated all callers.
68         (parse_number) Ditto.
69
70 Sun Nov 12 06:34:06 WST 2006 John Darrrington <john@darrington.wattle.id.au>
71
72         * format-parser.c format-parser.h lexer.c lexer.h q2c.c range-parser.c
73           range-parser.h subcommand-list.c variable-parser.c
74           variable-parser.h:
75
76         Encapsulated the lexer into an object, and updated everything
77         accordingly.
78
79 Tue Oct 31 18:09:32 2006  Ben Pfaff  <blp@gnu.org>
80
81         * range-parser.c (parse_number): Fix error message.
82
83 Sat Oct 28 16:17:18 WST 2006 John Darrington <john@darrington.wattle.id.au>
84
85         * lexer.c lexer.h: Added a line_buffer (previously an external
86         reference called getl_buf). 
87
88 Thu Oct 26 20:18:03 2006  Ben Pfaff  <blp@gnu.org>
89
90         * lexer.c (parse_string): Make lexing of binary, hex, and octal
91         strings work (fixes bug #17948).  Allow null bytes in strings, now
92         that there's a use for them (see tests/formats/float-format.sh).
93
94 Sun Jul 16 21:03:34 2006  Ben Pfaff  <blp@gnu.org>
95
96         * format-parser.h: New file.  Moved prototypes of format-parser.c
97         functions here, from lexer.h.
98
99         * format-parser.c: (parse_format_specifier_name) Rewrote and
100         changed semantics.
101         (parse_abstract_format_specifier) New function.
102         (parse_format_specifier) Rewrote in terms of
103         parse_abstract_format_specifier.  Removed "options" parameter, so
104         callers had to be updated.  Callers that didn't want messages
105         emitted were changed to use the new msg_disable/msg_enable
106         functions.
107
108         * variables-parser.c: (parse_variables_pool) New function.
109         (register_vars_pool) New function.
110         (parse_DATA_LIST_vars_pool) New function.
111         (parse_mixed_vars_pool) Use register_vars_pool.  Assert that
112         PV_APPEND is not in the options.
113         
114 Sat Jul  1 17:40:38 2006  Ben Pfaff  <blp@gnu.org>
115
116         Fix bug #11612, "q2c documentation does not agree with code".
117         
118         * q2c.c (parse_subcommand): Make "+" mean ARITY_MANY, absence
119         mean ARITY_ONCE_ONLY.
120
121 Tue Jul  4 09:45:12 2006  Ben Pfaff  <blp@gnu.org>
122
123         Fix bug #15766 (/KEEP subcommand on SAVE doesn't fully support
124         ALL) and additional underlying system file issues.
125         
126         * variable-parser.c (add_variable): Move test earlier for clarity
127         and efficiency.
128         (parse_var_set_vars) Accept ALL within a variable list, not just
129         at the beginning of one.
130
131 Tue Jun 27 22:54:30 2006  Ben Pfaff  <blp@gnu.org>
132
133         * automake.mk (src_language_lexer_liblexer_a_SOURCES): Add
134         variable-parser.h.
135
136 Tue Jun 27 19:15:33 2006  Ben Pfaff  <blp@gnu.org>
137
138         Add auxiliary data pointer to q2c parse_<command> function, and
139         pass it along to the custom parser functions.
140
141         Updated all uses of custom functions in all the existing .q files.
142         
143         * q2c.c (dump_declarations): Include auxiliary parameter in
144         function prototypes.
145         (dump_subcommand) Include aux arg in calls to custom functions.
146         (dump_parser) Include aux param in parse_<command> function
147         definition.  Include aux arg in calls to custom functions.
148
149 Tue Jun 27 12:07:34 2006  Ben Pfaff  <blp@gnu.org>
150
151         * variable-parser.h: New header.  Moved the var_set and variable
152         parsing declarations here.
153
154         * q2c.c (main): Emit include for new variable-parser.h header.
155
156 Sun Jun 25 22:41:00 2006  Ben Pfaff  <blp@gnu.org>
157
158         * q2c.c (dump_free): For SBC_DBL_LIST, enclose the output code in
159         curly braces, because it contains a variable declaration and might
160         not be at the beginning of a block.
161
162 Fri Jun  9 14:02:19 2006  Ben Pfaff  <blp@gnu.org>
163
164         Reform string library.
165         
166         * q2c.c (dump_subcommand): ds_c_str() became ds_cstr(), in
167         generated code.
168
169 Wed Apr 26 13:30:41 2006  Ben Pfaff  <blp@gnu.org>
170
171         * lexer.c: (lex_discard_rest_of_command) New function.
172
173 Mon Apr 24 14:12:08 2006  Ben Pfaff  <blp@gnu.org>
174
175         * q2c.c: Use exit.h from gnulib instead of checking for and
176         defining EXIT_SUCCESS and EXIT_FAILURE by hand.
177
178 Sat Apr 15 14:30:35 2006  Ben Pfaff  <blp@gnu.org>
179
180         * q2c.c: Change DEBUGGING macro to DUMP_TOKENS for clarity and to
181         avoid dumping all the tokens to stdout when --enable-debug is
182         passed to configure.
183
184 Fri Mar 10 08:29:25 2006  Ben Pfaff  <blp@gnu.org>
185
186         * q2c.c: (dump_free) Free proper member for var list, instead of
187         hard-coding to v_variables.  Thanks to Jason Stover for reporting
188         this bug.
189
190 Thu Mar  2 08:40:33 WST 2006 John Darrington <john@darrington.wattle.id.au>
191         
192         * Moved files from src directory