]>
Commit | Line | Data |
---|---|---|
e9955c83 AD |
1 | #define yy_create_buffer gram__create_buffer |
2 | #define yy_delete_buffer gram__delete_buffer | |
3 | #define yy_scan_buffer gram__scan_buffer | |
4 | #define yy_scan_string gram__scan_string | |
5 | #define yy_scan_bytes gram__scan_bytes | |
6 | #define yy_flex_debug gram__flex_debug | |
7 | #define yy_init_buffer gram__init_buffer | |
8 | #define yy_flush_buffer gram__flush_buffer | |
9 | #define yy_load_buffer_state gram__load_buffer_state | |
10 | #define yy_switch_to_buffer gram__switch_to_buffer | |
11 | #define yyin gram_in | |
12 | #define yyleng gram_leng | |
13 | #define yylex gram_lex | |
14 | #define yyout gram_out | |
15 | #define yyrestart gram_restart | |
16 | #define yytext gram_text | |
17 | ||
676385e2 | 18 | #line 19 "scan-gram.c" |
e9955c83 AD |
19 | /* A lexical scanner generated by flex */ |
20 | ||
21 | /* Scanner skeleton version: | |
22 | * $Header$ | |
23 | */ | |
24 | ||
25 | #define FLEX_SCANNER | |
26 | #define YY_FLEX_MAJOR_VERSION 2 | |
27 | #define YY_FLEX_MINOR_VERSION 5 | |
28 | ||
29 | #include <stdio.h> | |
676385e2 | 30 | |
e9955c83 AD |
31 | |
32 | /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ | |
33 | #ifdef c_plusplus | |
34 | #ifndef __cplusplus | |
35 | #define __cplusplus | |
36 | #endif | |
37 | #endif | |
38 | ||
39 | ||
40 | #ifdef __cplusplus | |
41 | ||
42 | #include <stdlib.h> | |
43 | #include <unistd.h> | |
44 | ||
45 | /* Use prototypes in function declarations. */ | |
46 | #define YY_USE_PROTOS | |
47 | ||
48 | /* The "const" storage-class-modifier is valid. */ | |
49 | #define YY_USE_CONST | |
50 | ||
51 | #else /* ! __cplusplus */ | |
52 | ||
53 | #if __STDC__ | |
54 | ||
55 | #define YY_USE_PROTOS | |
56 | #define YY_USE_CONST | |
57 | ||
58 | #endif /* __STDC__ */ | |
59 | #endif /* ! __cplusplus */ | |
60 | ||
61 | #ifdef __TURBOC__ | |
62 | #pragma warn -rch | |
63 | #pragma warn -use | |
64 | #include <io.h> | |
65 | #include <stdlib.h> | |
66 | #define YY_USE_CONST | |
67 | #define YY_USE_PROTOS | |
68 | #endif | |
69 | ||
70 | #ifdef YY_USE_CONST | |
71 | #define yyconst const | |
72 | #else | |
73 | #define yyconst | |
74 | #endif | |
75 | ||
76 | ||
77 | #ifdef YY_USE_PROTOS | |
78 | #define YY_PROTO(proto) proto | |
79 | #else | |
80 | #define YY_PROTO(proto) () | |
81 | #endif | |
82 | ||
83 | /* Returned upon end-of-file. */ | |
84 | #define YY_NULL 0 | |
85 | ||
86 | /* Promotes a possibly negative, possibly signed char to an unsigned | |
87 | * integer for use as an array index. If the signed char is negative, | |
88 | * we want to instead treat it as an 8-bit unsigned char, hence the | |
89 | * double cast. | |
90 | */ | |
91 | #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) | |
92 | ||
93 | /* Enter a start condition. This macro really ought to take a parameter, | |
94 | * but we do it the disgusting crufty way forced on us by the ()-less | |
95 | * definition of BEGIN. | |
96 | */ | |
97 | #define BEGIN yy_start = 1 + 2 * | |
98 | ||
99 | /* Translate the current start state into a value that can be later handed | |
100 | * to BEGIN to return to the state. The YYSTATE alias is for lex | |
101 | * compatibility. | |
102 | */ | |
103 | #define YY_START ((yy_start - 1) / 2) | |
104 | #define YYSTATE YY_START | |
105 | ||
106 | /* Action number for EOF rule of a given start state. */ | |
107 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) | |
108 | ||
109 | /* Special action meaning "start processing a new file". */ | |
110 | #define YY_NEW_FILE yyrestart( yyin ) | |
111 | ||
112 | #define YY_END_OF_BUFFER_CHAR 0 | |
113 | ||
114 | /* Size of default input buffer. */ | |
115 | #define YY_BUF_SIZE 16384 | |
116 | ||
117 | typedef struct yy_buffer_state *YY_BUFFER_STATE; | |
118 | ||
119 | extern int yyleng; | |
120 | extern FILE *yyin, *yyout; | |
121 | ||
122 | #define EOB_ACT_CONTINUE_SCAN 0 | |
123 | #define EOB_ACT_END_OF_FILE 1 | |
124 | #define EOB_ACT_LAST_MATCH 2 | |
125 | ||
126 | /* The funky do-while in the following #define is used to turn the definition | |
127 | * int a single C statement (which needs a semi-colon terminator). This | |
128 | * avoids problems with code like: | |
129 | * | |
130 | * if ( condition_holds ) | |
131 | * yyless( 5 ); | |
132 | * else | |
133 | * do_something_else(); | |
134 | * | |
135 | * Prior to using the do-while the compiler would get upset at the | |
136 | * "else" because it interpreted the "if" statement as being all | |
137 | * done when it reached the ';' after the yyless() call. | |
138 | */ | |
139 | ||
140 | /* Return all but the first 'n' matched characters back to the input stream. */ | |
141 | ||
142 | #define yyless(n) \ | |
143 | do \ | |
144 | { \ | |
145 | /* Undo effects of setting up yytext. */ \ | |
146 | *yy_cp = yy_hold_char; \ | |
147 | YY_RESTORE_YY_MORE_OFFSET \ | |
148 | yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ | |
149 | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ | |
150 | } \ | |
151 | while ( 0 ) | |
152 | ||
153 | #define unput(c) yyunput( c, yytext_ptr ) | |
154 | ||
155 | /* The following is because we cannot portably get our hands on size_t | |
156 | * (without autoconf's help, which isn't available because we want | |
157 | * flex-generated scanners to compile on their own). | |
158 | */ | |
159 | typedef unsigned int yy_size_t; | |
160 | ||
161 | ||
162 | struct yy_buffer_state | |
163 | { | |
164 | FILE *yy_input_file; | |
165 | ||
166 | char *yy_ch_buf; /* input buffer */ | |
167 | char *yy_buf_pos; /* current position in input buffer */ | |
168 | ||
169 | /* Size of input buffer in bytes, not including room for EOB | |
170 | * characters. | |
171 | */ | |
172 | yy_size_t yy_buf_size; | |
173 | ||
174 | /* Number of characters read into yy_ch_buf, not including EOB | |
175 | * characters. | |
176 | */ | |
177 | int yy_n_chars; | |
178 | ||
179 | /* Whether we "own" the buffer - i.e., we know we created it, | |
180 | * and can realloc() it to grow it, and should free() it to | |
181 | * delete it. | |
182 | */ | |
183 | int yy_is_our_buffer; | |
184 | ||
185 | /* Whether this is an "interactive" input source; if so, and | |
186 | * if we're using stdio for input, then we want to use getc() | |
187 | * instead of fread(), to make sure we stop fetching input after | |
188 | * each newline. | |
189 | */ | |
190 | int yy_is_interactive; | |
191 | ||
192 | /* Whether we're considered to be at the beginning of a line. | |
193 | * If so, '^' rules will be active on the next match, otherwise | |
194 | * not. | |
195 | */ | |
196 | int yy_at_bol; | |
197 | ||
198 | /* Whether to try to fill the input buffer when we reach the | |
199 | * end of it. | |
200 | */ | |
201 | int yy_fill_buffer; | |
202 | ||
203 | int yy_buffer_status; | |
204 | #define YY_BUFFER_NEW 0 | |
205 | #define YY_BUFFER_NORMAL 1 | |
206 | /* When an EOF's been seen but there's still some text to process | |
207 | * then we mark the buffer as YY_EOF_PENDING, to indicate that we | |
208 | * shouldn't try reading from the input source any more. We might | |
209 | * still have a bunch of tokens to match, though, because of | |
210 | * possible backing-up. | |
211 | * | |
212 | * When we actually see the EOF, we change the status to "new" | |
213 | * (via yyrestart()), so that the user can continue scanning by | |
214 | * just pointing yyin at a new input file. | |
215 | */ | |
216 | #define YY_BUFFER_EOF_PENDING 2 | |
217 | }; | |
218 | ||
219 | static YY_BUFFER_STATE yy_current_buffer = 0; | |
220 | ||
221 | /* We provide macros for accessing buffer states in case in the | |
222 | * future we want to put the buffer states in a more general | |
223 | * "scanner state". | |
224 | */ | |
225 | #define YY_CURRENT_BUFFER yy_current_buffer | |
226 | ||
227 | ||
228 | /* yy_hold_char holds the character lost when yytext is formed. */ | |
229 | static char yy_hold_char; | |
230 | ||
231 | static int yy_n_chars; /* number of characters read into yy_ch_buf */ | |
232 | ||
233 | ||
234 | int yyleng; | |
235 | ||
236 | /* Points to current character in buffer. */ | |
237 | static char *yy_c_buf_p = (char *) 0; | |
238 | static int yy_init = 1; /* whether we need to initialize */ | |
239 | static int yy_start = 0; /* start state number */ | |
240 | ||
241 | /* Flag which is used to allow yywrap()'s to do buffer switches | |
242 | * instead of setting up a fresh yyin. A bit of a hack ... | |
243 | */ | |
244 | static int yy_did_buffer_switch_on_eof; | |
245 | ||
246 | void yyrestart YY_PROTO(( FILE *input_file )); | |
247 | ||
248 | void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); | |
249 | void yy_load_buffer_state YY_PROTO(( void )); | |
250 | YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); | |
251 | void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); | |
252 | void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); | |
253 | void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); | |
254 | #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) | |
255 | ||
256 | YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); | |
257 | YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); | |
258 | YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); | |
259 | ||
260 | static void *yy_flex_alloc YY_PROTO(( yy_size_t )); | |
261 | static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); | |
262 | static void yy_flex_free YY_PROTO(( void * )); | |
263 | ||
264 | #define yy_new_buffer yy_create_buffer | |
265 | ||
266 | #define yy_set_interactive(is_interactive) \ | |
267 | { \ | |
268 | if ( ! yy_current_buffer ) \ | |
269 | yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ | |
270 | yy_current_buffer->yy_is_interactive = is_interactive; \ | |
271 | } | |
272 | ||
273 | #define yy_set_bol(at_bol) \ | |
274 | { \ | |
275 | if ( ! yy_current_buffer ) \ | |
276 | yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ | |
277 | yy_current_buffer->yy_at_bol = at_bol; \ | |
278 | } | |
279 | ||
280 | #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) | |
281 | ||
282 | ||
283 | #define yywrap() 1 | |
284 | #define YY_SKIP_YYWRAP | |
285 | ||
286 | #define FLEX_DEBUG | |
287 | typedef unsigned char YY_CHAR; | |
288 | FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; | |
289 | typedef int yy_state_type; | |
290 | ||
291 | #define FLEX_DEBUG | |
292 | extern char *yytext; | |
293 | #define yytext_ptr yytext | |
294 | ||
295 | static yy_state_type yy_get_previous_state YY_PROTO(( void )); | |
296 | static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); | |
297 | static int yy_get_next_buffer YY_PROTO(( void )); | |
298 | static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); | |
299 | ||
300 | /* Done after the current pattern has been matched and before the | |
301 | * corresponding action - sets up yytext. | |
302 | */ | |
303 | #define YY_DO_BEFORE_ACTION \ | |
304 | yytext_ptr = yy_bp; \ | |
305 | yyleng = (int) (yy_cp - yy_bp); \ | |
306 | yy_hold_char = *yy_cp; \ | |
307 | *yy_cp = '\0'; \ | |
308 | yy_c_buf_p = yy_cp; | |
309 | ||
676385e2 PH |
310 | #define YY_NUM_RULES 101 |
311 | #define YY_END_OF_BUFFER 102 | |
312 | static yyconst short int yy_accept[380] = | |
e9955c83 AD |
313 | { 0, |
314 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
676385e2 PH |
315 | 0, 0, 0, 0, 0, 0, 0, 0, 102, 49, |
316 | 38, 37, 37, 42, 49, 41, 39, 49, 40, 34, | |
317 | 36, 49, 33, 46, 35, 53, 54, 54, 55, 50, | |
318 | 51, 80, 83, 83, 79, 50, 82, 51, 75, 78, | |
319 | 78, 74, 77, 57, 58, 58, 56, 73, 60, 61, | |
320 | 61, 59, 93, 94, 94, 85, 95, 84, 88, 95, | |
321 | 50, 51, 90, 89, 97, 99, 99, 85, 98, 84, | |
322 | 88, 100, 100, 100, 85, 84, 88, 38, 37, 37, | |
323 | 37, 37, 48, 0, 0, 0, 0, 0, 0, 0, | |
324 | ||
325 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, | |
326 | 39, 43, 44, 40, 0, 53, 54, 54, 54, 54, | |
327 | 52, 80, 83, 83, 83, 83, 81, 75, 78, 78, | |
328 | 78, 78, 76, 57, 58, 58, 58, 58, 72, 71, | |
329 | 72, 64, 65, 66, 67, 68, 69, 70, 72, 61, | |
330 | 61, 61, 61, 93, 94, 94, 94, 94, 91, 0, | |
331 | 91, 0, 86, 87, 92, 0, 92, 97, 99, 99, | |
332 | 99, 99, 96, 100, 100, 100, 100, 100, 86, 87, | |
6c35d22c | 333 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
e9955c83 AD |
334 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
335 | ||
676385e2 PH |
336 | 0, 0, 0, 0, 0, 44, 47, 0, 0, 0, |
337 | 87, 87, 87, 0, 0, 0, 0, 0, 0, 0, | |
6c35d22c | 338 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
e9955c83 | 339 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
676385e2 PH |
340 | 0, 0, 0, 62, 63, 0, 0, 0, 0, 0, |
341 | 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, | |
342 | 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, | |
343 | 26, 0, 29, 0, 0, 32, 0, 2, 0, 0, | |
344 | 6, 0, 0, 0, 0, 0, 0, 14, 0, 0, | |
345 | 0, 18, 0, 0, 0, 23, 0, 25, 27, 30, | |
346 | ||
347 | 0, 1, 3, 0, 0, 8, 0, 0, 0, 0, | |
348 | 0, 0, 0, 19, 0, 0, 0, 0, 0, 4, | |
349 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, | |
350 | 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, | |
351 | 0, 16, 17, 0, 24, 0, 0, 0, 0, 0, | |
352 | 0, 13, 0, 0, 0, 5, 0, 0, 0, 11, | |
353 | 0, 0, 0, 0, 9, 0, 15, 22, 28, 0, | |
354 | 0, 7, 0, 0, 0, 0, 0, 10, 0 | |
e9955c83 AD |
355 | } ; |
356 | ||
357 | static yyconst int yy_ec[256] = | |
358 | { 0, | |
359 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, | |
360 | 1, 2, 4, 1, 1, 1, 1, 1, 1, 1, | |
361 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
362 | 1, 2, 1, 5, 1, 6, 7, 1, 8, 1, | |
363 | 1, 9, 1, 1, 10, 11, 12, 13, 13, 13, | |
364 | 13, 13, 13, 13, 13, 14, 14, 15, 16, 17, | |
365 | 18, 19, 1, 20, 21, 21, 21, 21, 21, 21, | |
366 | 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, | |
367 | 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, | |
368 | 22, 23, 24, 1, 25, 1, 26, 27, 28, 29, | |
369 | ||
370 | 30, 31, 32, 33, 34, 11, 35, 36, 37, 38, | |
371 | 39, 40, 11, 41, 42, 43, 44, 45, 11, 46, | |
372 | 47, 11, 48, 49, 50, 1, 1, 1, 1, 1, | |
373 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
374 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
375 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
376 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
377 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
378 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
379 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
380 | ||
381 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
382 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
383 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
384 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
385 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
386 | 1, 1, 1, 1, 1 | |
387 | } ; | |
388 | ||
389 | static yyconst int yy_meta[51] = | |
390 | { 0, | |
6c35d22c | 391 | 1, 1, 2, 3, 4, 5, 6, 7, 8, 1, |
4f25ebb0 AD |
392 | 9, 10, 11, 11, 1, 1, 1, 1, 12, 5, |
393 | 11, 13, 14, 13, 9, 11, 11, 11, 11, 11, | |
394 | 11, 9, 9, 9, 9, 9, 9, 9, 9, 9, | |
6c35d22c | 395 | 9, 9, 9, 9, 9, 9, 9, 5, 1, 5 |
e9955c83 AD |
396 | } ; |
397 | ||
676385e2 | 398 | static yyconst short int yy_base[406] = |
e9955c83 AD |
399 | { 0, |
400 | 0, 0, 48, 51, 58, 61, 83, 86, 73, 94, | |
676385e2 PH |
401 | 108, 110, 131, 179, 227, 249, 116, 142, 839, 840, |
402 | 836, 55, 64, 840, 267, 840, 0, 44, 79, 840, | |
403 | 840, 0, 840, 840, 840, 0, 97, 99, 825, 840, | |
404 | 840, 0, 119, 122, 840, 840, 0, 840, 0, 126, | |
405 | 138, 840, 0, 0, 145, 153, 840, 311, 840, 155, | |
406 | 157, 840, 0, 159, 164, 840, 159, 840, 62, 164, | |
407 | 840, 840, 840, 840, 0, 185, 189, 840, 786, 840, | |
408 | 185, 192, 201, 203, 205, 207, 209, 833, 211, 213, | |
409 | 216, 219, 840, 800, 39, 86, 799, 796, 65, 801, | |
410 | ||
411 | 198, 786, 184, 795, 109, 203, 790, 797, 800, 840, | |
412 | 0, 840, 0, 230, 806, 0, 242, 244, 255, 259, | |
413 | 840, 0, 261, 263, 265, 272, 840, 0, 274, 276, | |
414 | 278, 280, 840, 0, 282, 284, 286, 288, 840, 840, | |
415 | 811, 840, 840, 840, 840, 840, 840, 840, 0, 297, | |
416 | 314, 316, 318, 0, 322, 324, 326, 328, 840, 322, | |
417 | 326, 0, 840, 0, 840, 330, 332, 0, 344, 347, | |
418 | 355, 357, 840, 359, 361, 363, 365, 367, 369, 371, | |
419 | 785, 144, 781, 780, 780, 144, 778, 787, 789, 775, | |
420 | 778, 366, 784, 770, 168, 771, 779, 780, 783, 767, | |
421 | ||
422 | 772, 766, 771, 763, 775, 0, 840, 789, 0, 782, | |
423 | 0, 374, 377, 774, 755, 764, 754, 766, 756, 764, | |
424 | 763, 762, 230, 748, 764, 757, 758, 751, 760, 744, | |
425 | 744, 755, 744, 751, 747, 743, 737, 740, 746, 745, | |
426 | 735, 746, 744, 840, 840, 373, 730, 738, 731, 727, | |
427 | 739, 725, 737, 754, 734, 722, 840, 718, 730, 372, | |
428 | 725, 716, 720, 712, 840, 712, 375, 711, 723, 709, | |
429 | 840, 713, 840, 712, 710, 840, 701, 840, 717, 702, | |
430 | 840, 378, 702, 704, 380, 717, 708, 840, 701, 702, | |
431 | 697, 840, 695, 707, 696, 840, 692, 840, 382, 840, | |
432 | ||
433 | 692, 840, 691, 704, 686, 840, 689, 690, 687, 688, | |
434 | 659, 666, 633, 840, 628, 629, 613, 606, 618, 840, | |
435 | 603, 615, 614, 597, 596, 597, 603, 590, 603, 840, | |
436 | 589, 567, 578, 840, 564, 541, 547, 534, 523, 510, | |
437 | 520, 840, 840, 506, 840, 516, 497, 510, 499, 368, | |
438 | 365, 840, 368, 359, 348, 840, 316, 307, 297, 840, | |
439 | 287, 282, 283, 260, 840, 252, 840, 840, 840, 263, | |
440 | 384, 840, 241, 236, 224, 196, 158, 840, 840, 409, | |
441 | 423, 437, 451, 465, 479, 493, 507, 227, 521, 535, | |
442 | 549, 561, 575, 587, 601, 614, 628, 642, 656, 670, | |
443 | ||
444 | 104, 684, 698, 712, 77 | |
e9955c83 AD |
445 | } ; |
446 | ||
676385e2 | 447 | static yyconst short int yy_def[406] = |
e9955c83 | 448 | { 0, |
676385e2 PH |
449 | 379, 1, 380, 380, 381, 381, 382, 382, 383, 383, |
450 | 384, 384, 385, 385, 386, 386, 387, 387, 379, 379, | |
451 | 379, 379, 379, 379, 379, 379, 388, 379, 379, 379, | |
452 | 379, 389, 379, 379, 379, 390, 379, 379, 379, 379, | |
453 | 379, 391, 379, 379, 379, 379, 392, 379, 393, 379, | |
454 | 379, 379, 394, 395, 379, 379, 379, 396, 379, 379, | |
455 | 379, 379, 397, 379, 379, 379, 379, 379, 379, 379, | |
456 | 379, 379, 379, 379, 398, 379, 379, 379, 379, 379, | |
457 | 379, 399, 399, 399, 399, 399, 399, 379, 379, 379, | |
458 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
459 | ||
460 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
461 | 388, 379, 400, 379, 389, 390, 379, 379, 379, 379, | |
462 | 379, 391, 379, 379, 379, 379, 379, 393, 379, 379, | |
463 | 379, 379, 379, 395, 379, 379, 379, 379, 379, 379, | |
464 | 379, 379, 379, 379, 379, 379, 379, 379, 401, 379, | |
465 | 379, 379, 379, 397, 379, 379, 379, 379, 379, 379, | |
466 | 379, 402, 379, 403, 379, 379, 379, 398, 379, 379, | |
467 | 379, 379, 379, 399, 399, 399, 399, 399, 399, 404, | |
468 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
469 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
470 | ||
471 | 379, 379, 379, 379, 379, 400, 379, 379, 405, 402, | |
472 | 403, 404, 404, 379, 379, 379, 379, 379, 379, 379, | |
473 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
474 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
475 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
476 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
477 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
478 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
479 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
480 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
481 | ||
482 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
483 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
484 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
485 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
486 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
487 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
488 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
489 | 379, 379, 379, 379, 379, 379, 379, 379, 0, 379, | |
490 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
491 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
492 | ||
493 | 379, 379, 379, 379, 379 | |
e9955c83 AD |
494 | } ; |
495 | ||
676385e2 | 496 | static yyconst short int yy_nxt[891] = |
e9955c83 AD |
497 | { 0, |
498 | 20, 21, 22, 23, 24, 20, 25, 26, 20, 20, | |
499 | 27, 28, 29, 29, 30, 31, 32, 33, 20, 20, | |
500 | 27, 20, 20, 20, 20, 27, 27, 27, 27, 27, | |
501 | 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, | |
502 | 27, 27, 27, 27, 27, 27, 27, 34, 35, 20, | |
676385e2 PH |
503 | 37, 38, 112, 37, 38, 113, 39, 89, 90, 39, |
504 | 43, 44, 45, 43, 44, 45, 91, 92, 182, 40, | |
505 | 163, 41, 40, 164, 41, 55, 56, 57, 183, 46, | |
506 | 47, 48, 46, 47, 48, 50, 51, 245, 50, 51, | |
507 | 52, 114, 114, 52, 188, 58, 55, 56, 57, 117, | |
508 | ||
509 | 118, 119, 120, 189, 46, 53, 48, 46, 53, 48, | |
510 | 60, 61, 60, 61, 209, 62, 58, 62, 83, 84, | |
511 | 85, 123, 124, 86, 125, 126, 184, 87, 129, 130, | |
512 | 58, 185, 58, 64, 65, 66, 67, 46, 68, 48, | |
513 | 131, 132, 69, 198, 83, 84, 85, 135, 136, 86, | |
514 | 70, 199, 71, 87, 72, 137, 138, 150, 151, 152, | |
515 | 153, 155, 156, 46, 159, 48, 157, 158, 160, 165, | |
516 | 215, 161, 161, 166, 216, 162, 167, 167, 73, 221, | |
517 | 74, 64, 65, 66, 67, 217, 68, 169, 170, 222, | |
518 | 69, 171, 172, 163, 175, 176, 164, 232, 70, 378, | |
519 | ||
520 | 71, 233, 72, 175, 177, 178, 176, 175, 176, 175, | |
521 | 176, 175, 176, 89, 90, 91, 92, 179, 89, 90, | |
522 | 180, 91, 92, 191, 195, 377, 73, 196, 74, 76, | |
523 | 77, 78, 200, 79, 80, 111, 192, 111, 81, 256, | |
524 | 193, 201, 114, 114, 117, 118, 119, 120, 46, 202, | |
525 | 48, 76, 77, 78, 256, 79, 80, 117, 118, 376, | |
526 | 81, 119, 120, 123, 124, 125, 126, 123, 124, 375, | |
527 | 46, 374, 48, 93, 125, 126, 129, 130, 131, 132, | |
528 | 129, 130, 131, 132, 135, 136, 137, 138, 135, 136, | |
529 | 137, 138, 372, 94, 371, 95, 96, 97, 98, 150, | |
530 | ||
531 | 151, 370, 99, 100, 101, 102, 103, 104, 105, 106, | |
532 | 107, 108, 369, 109, 110, 140, 152, 153, 150, 151, | |
533 | 152, 153, 368, 141, 155, 156, 157, 158, 155, 156, | |
534 | 157, 158, 367, 140, 161, 161, 142, 143, 161, 161, | |
535 | 366, 144, 167, 167, 167, 167, 169, 170, 145, 171, | |
536 | 172, 146, 365, 147, 364, 148, 149, 169, 170, 171, | |
537 | 172, 175, 176, 175, 177, 178, 176, 178, 176, 175, | |
538 | 177, 175, 176, 175, 213, 228, 175, 213, 159, 178, | |
539 | 213, 289, 160, 363, 295, 161, 161, 305, 362, 308, | |
540 | 228, 318, 211, 373, 211, 211, 289, 211, 211, 295, | |
541 | ||
542 | 211, 361, 305, 229, 308, 360, 318, 359, 373, 36, | |
543 | 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, | |
544 | 36, 36, 36, 42, 42, 42, 42, 42, 42, 42, | |
545 | 42, 42, 42, 42, 42, 42, 42, 49, 49, 49, | |
546 | 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, | |
547 | 49, 54, 54, 54, 54, 54, 54, 54, 54, 54, | |
548 | 54, 54, 54, 54, 54, 59, 59, 59, 59, 59, | |
549 | 59, 59, 59, 59, 59, 59, 59, 59, 59, 63, | |
550 | 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, | |
551 | 63, 63, 63, 75, 75, 75, 75, 75, 75, 75, | |
552 | ||
553 | 75, 75, 75, 75, 75, 75, 75, 82, 82, 82, | |
554 | 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, | |
555 | 82, 115, 115, 115, 115, 115, 115, 115, 115, 115, | |
556 | 115, 115, 358, 115, 115, 116, 357, 356, 116, 116, | |
557 | 116, 116, 355, 116, 116, 116, 116, 354, 116, 122, | |
558 | 353, 352, 351, 122, 122, 122, 122, 122, 122, 122, | |
559 | 122, 127, 127, 127, 127, 127, 127, 127, 127, 127, | |
560 | 127, 127, 127, 127, 127, 128, 350, 349, 128, 128, | |
561 | 128, 348, 128, 128, 128, 128, 128, 133, 133, 133, | |
562 | 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, | |
563 | ||
564 | 133, 134, 347, 346, 345, 134, 134, 134, 134, 134, | |
565 | 134, 134, 134, 134, 139, 139, 139, 139, 139, 139, | |
566 | 139, 139, 139, 139, 139, 139, 139, 139, 154, 344, | |
567 | 343, 342, 341, 154, 340, 154, 154, 339, 154, 154, | |
568 | 338, 154, 168, 337, 336, 335, 168, 334, 333, 168, | |
569 | 168, 332, 168, 168, 331, 168, 174, 174, 174, 174, | |
570 | 174, 174, 174, 174, 174, 174, 174, 174, 330, 174, | |
571 | 206, 329, 206, 206, 206, 206, 206, 206, 206, 206, | |
572 | 206, 206, 206, 206, 210, 210, 210, 210, 210, 210, | |
573 | 210, 210, 210, 210, 210, 328, 210, 210, 211, 327, | |
574 | ||
575 | 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, | |
576 | 211, 211, 212, 212, 212, 212, 212, 212, 212, 212, | |
577 | 212, 212, 212, 212, 212, 212, 326, 325, 324, 323, | |
578 | 322, 321, 320, 319, 317, 316, 315, 314, 313, 312, | |
579 | 311, 310, 309, 307, 306, 304, 303, 302, 301, 300, | |
580 | 299, 298, 297, 296, 294, 293, 292, 291, 290, 288, | |
581 | 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, | |
582 | 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, | |
583 | 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, | |
584 | 257, 255, 254, 253, 252, 251, 250, 249, 248, 247, | |
585 | ||
586 | 246, 244, 243, 242, 241, 240, 239, 238, 237, 236, | |
587 | 235, 234, 231, 230, 227, 226, 225, 224, 223, 220, | |
588 | 219, 218, 214, 208, 207, 205, 204, 203, 197, 194, | |
589 | 190, 187, 186, 181, 88, 173, 121, 88, 379, 19, | |
590 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
591 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
592 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
593 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
594 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379 | |
e9955c83 AD |
595 | } ; |
596 | ||
676385e2 | 597 | static yyconst short int yy_chk[891] = |
e9955c83 AD |
598 | { 0, |
599 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
600 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
601 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
602 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
603 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
604 | 3, 3, 28, 4, 4, 28, 3, 22, 22, 4, | |
676385e2 PH |
605 | 5, 5, 5, 6, 6, 6, 23, 23, 95, 3, |
606 | 69, 3, 4, 69, 4, 9, 9, 9, 95, 5, | |
607 | 5, 5, 6, 6, 6, 7, 7, 405, 8, 8, | |
608 | 7, 29, 29, 8, 99, 9, 10, 10, 10, 37, | |
e9955c83 | 609 | |
676385e2 PH |
610 | 37, 38, 38, 99, 7, 7, 7, 8, 8, 8, |
611 | 11, 11, 12, 12, 401, 11, 10, 12, 17, 17, | |
4f25ebb0 AD |
612 | 17, 43, 43, 17, 44, 44, 96, 17, 50, 50, |
613 | 11, 96, 12, 13, 13, 13, 13, 17, 13, 17, | |
676385e2 PH |
614 | 51, 51, 13, 105, 18, 18, 18, 55, 55, 18, |
615 | 13, 105, 13, 18, 13, 56, 56, 60, 60, 61, | |
e9955c83 | 616 | 61, 64, 64, 18, 67, 18, 65, 65, 67, 70, |
676385e2 PH |
617 | 182, 67, 67, 70, 182, 67, 70, 70, 13, 186, |
618 | 13, 14, 14, 14, 14, 182, 14, 76, 76, 186, | |
619 | 14, 77, 77, 81, 82, 82, 81, 195, 14, 377, | |
e9955c83 | 620 | |
676385e2 | 621 | 14, 195, 14, 83, 83, 84, 84, 85, 85, 86, |
e9955c83 | 622 | 86, 87, 87, 89, 89, 90, 90, 87, 91, 91, |
676385e2 PH |
623 | 87, 92, 92, 101, 103, 376, 14, 103, 14, 15, |
624 | 15, 15, 106, 15, 15, 388, 101, 388, 15, 223, | |
625 | 101, 106, 114, 114, 117, 117, 118, 118, 15, 106, | |
626 | 15, 16, 16, 16, 223, 16, 16, 119, 119, 375, | |
627 | 16, 120, 120, 123, 123, 124, 124, 125, 125, 374, | |
628 | 16, 373, 16, 25, 126, 126, 129, 129, 130, 130, | |
629 | 131, 131, 132, 132, 135, 135, 136, 136, 137, 137, | |
630 | 138, 138, 370, 25, 366, 25, 25, 25, 25, 150, | |
631 | ||
632 | 150, 364, 25, 25, 25, 25, 25, 25, 25, 25, | |
633 | 25, 25, 363, 25, 25, 58, 151, 151, 152, 152, | |
634 | 153, 153, 362, 58, 155, 155, 156, 156, 157, 157, | |
635 | 158, 158, 361, 58, 160, 160, 58, 58, 161, 161, | |
636 | 359, 58, 166, 166, 167, 167, 169, 169, 58, 170, | |
637 | 170, 58, 358, 58, 357, 58, 58, 171, 171, 172, | |
638 | 172, 174, 174, 175, 175, 176, 176, 177, 177, 178, | |
639 | 178, 179, 179, 180, 180, 192, 212, 212, 246, 213, | |
640 | 213, 260, 246, 355, 267, 246, 246, 282, 354, 285, | |
641 | 192, 299, 180, 371, 180, 212, 260, 212, 213, 267, | |
642 | ||
643 | 213, 353, 282, 192, 285, 351, 299, 350, 371, 380, | |
644 | 380, 380, 380, 380, 380, 380, 380, 380, 380, 380, | |
645 | 380, 380, 380, 381, 381, 381, 381, 381, 381, 381, | |
646 | 381, 381, 381, 381, 381, 381, 381, 382, 382, 382, | |
647 | 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, | |
648 | 382, 383, 383, 383, 383, 383, 383, 383, 383, 383, | |
649 | 383, 383, 383, 383, 383, 384, 384, 384, 384, 384, | |
650 | 384, 384, 384, 384, 384, 384, 384, 384, 384, 385, | |
366eea36 | 651 | 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, |
676385e2 PH |
652 | 385, 385, 385, 386, 386, 386, 386, 386, 386, 386, |
653 | ||
654 | 386, 386, 386, 386, 386, 386, 386, 387, 387, 387, | |
655 | 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, | |
656 | 387, 389, 389, 389, 389, 389, 389, 389, 389, 389, | |
657 | 389, 389, 349, 389, 389, 390, 348, 347, 390, 390, | |
658 | 390, 390, 346, 390, 390, 390, 390, 344, 390, 391, | |
659 | 341, 340, 339, 391, 391, 391, 391, 391, 391, 391, | |
660 | 391, 392, 392, 392, 392, 392, 392, 392, 392, 392, | |
661 | 392, 392, 392, 392, 392, 393, 338, 337, 393, 393, | |
662 | 393, 336, 393, 393, 393, 393, 393, 394, 394, 394, | |
663 | 394, 394, 394, 394, 394, 394, 394, 394, 394, 394, | |
664 | ||
665 | 394, 395, 335, 333, 332, 395, 395, 395, 395, 395, | |
666 | 395, 395, 395, 395, 396, 396, 396, 396, 396, 396, | |
667 | 396, 396, 396, 396, 396, 396, 396, 396, 397, 331, | |
668 | 329, 328, 327, 397, 326, 397, 397, 325, 397, 397, | |
669 | 324, 397, 398, 323, 322, 321, 398, 319, 318, 398, | |
670 | 398, 317, 398, 398, 316, 398, 399, 399, 399, 399, | |
671 | 399, 399, 399, 399, 399, 399, 399, 399, 315, 399, | |
672 | 400, 313, 400, 400, 400, 400, 400, 400, 400, 400, | |
673 | 400, 400, 400, 400, 402, 402, 402, 402, 402, 402, | |
674 | 402, 402, 402, 402, 402, 312, 402, 402, 403, 311, | |
675 | ||
676 | 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, | |
677 | 403, 403, 404, 404, 404, 404, 404, 404, 404, 404, | |
678 | 404, 404, 404, 404, 404, 404, 310, 309, 308, 307, | |
679 | 305, 304, 303, 301, 297, 295, 294, 293, 291, 290, | |
680 | 289, 287, 286, 284, 283, 280, 279, 277, 275, 274, | |
681 | 272, 270, 269, 268, 266, 264, 263, 262, 261, 259, | |
682 | 258, 256, 255, 254, 253, 252, 251, 250, 249, 248, | |
683 | 247, 243, 242, 241, 240, 239, 238, 237, 236, 235, | |
684 | 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, | |
685 | 224, 222, 221, 220, 219, 218, 217, 216, 215, 214, | |
686 | ||
687 | 210, 208, 205, 204, 203, 202, 201, 200, 199, 198, | |
688 | 197, 196, 194, 193, 191, 190, 189, 188, 187, 185, | |
689 | 184, 183, 181, 141, 115, 109, 108, 107, 104, 102, | |
690 | 100, 98, 97, 94, 88, 79, 39, 21, 19, 379, | |
691 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
692 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
693 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
694 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, | |
695 | 379, 379, 379, 379, 379, 379, 379, 379, 379, 379 | |
e9955c83 AD |
696 | } ; |
697 | ||
698 | static yy_state_type yy_last_accepting_state; | |
699 | static char *yy_last_accepting_cpos; | |
700 | ||
701 | extern int yy_flex_debug; | |
702 | int yy_flex_debug = 1; | |
703 | ||
676385e2 | 704 | static yyconst short int yy_rule_linenum[101] = |
e9955c83 | 705 | { 0, |
9280d3ef AD |
706 | 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, |
707 | 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, | |
676385e2 PH |
708 | 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, |
709 | 152, 153, 155, 156, 157, 158, 160, 161, 162, 167, | |
710 | 170, 173, 176, 177, 180, 183, 186, 194, 200, 216, | |
711 | 217, 228, 240, 241, 242, 259, 268, 270, 290, 304, | |
712 | 306, 326, 338, 342, 343, 344, 345, 346, 347, 348, | |
713 | 349, 350, 356, 367, 373, 374, 376, 378, 396, 402, | |
714 | 403, 405, 407, 425, 428, 431, 432, 435, 446, 457, | |
715 | 459, 461, 464, 465, 468, 488, 495, 496, 497, 517 | |
e9955c83 AD |
716 | |
717 | } ; | |
718 | ||
719 | /* The intent behind this definition is that it'll catch | |
720 | * any uses of REJECT which flex missed. | |
721 | */ | |
722 | #define REJECT reject_used_but_not_detected | |
723 | #define yymore() yymore_used_but_not_detected | |
724 | #define YY_MORE_ADJ 0 | |
725 | #define YY_RESTORE_YY_MORE_OFFSET | |
726 | char *yytext; | |
727 | #line 1 "scan-gram.l" | |
728 | #define INITIAL 0 | |
729 | /* Bison Grammar Scanner -*- C -*- | |
730 | Copyright (C) 2002 Free Software Foundation, Inc. | |
731 | ||
732 | This file is part of Bison, the GNU Compiler Compiler. | |
733 | ||
734 | This program is free software; you can redistribute it and/or modify | |
735 | it under the terms of the GNU General Public License as published by | |
736 | the Free Software Foundation; either version 2 of the License, or | |
737 | (at your option) any later version. | |
738 | ||
739 | This program is distributed in the hope that it will be useful, | |
740 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
741 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
742 | GNU General Public License for more details. | |
743 | ||
744 | You should have received a copy of the GNU General Public License | |
745 | along with this program; if not, write to the Free Software | |
746 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |
747 | 02111-1307 USA | |
748 | */ | |
749 | #define YY_NO_UNPUT 1 | |
750 | #define YY_NEVER_INTERACTIVE 1 | |
751 | #define YY_STACK_USED 1 | |
752 | #line 26 "scan-gram.l" | |
753 | #include "system.h" | |
754 | #include "complain.h" | |
755 | #include "quote.h" | |
756 | #include "getargs.h" | |
757 | #include "gram.h" | |
758 | #include "reader.h" | |
759 | ||
760 | /* Each time we match a string, move the end cursor to its end. */ | |
8efe435c AD |
761 | #define YY_USER_INIT \ |
762 | do { \ | |
763 | LOCATION_RESET (*yylloc); \ | |
764 | /* This is only to avoid GCC warnings. */ \ | |
765 | if (yycontrol) {;}; \ | |
766 | } while (0) | |
767 | ||
e9955c83 AD |
768 | #define YY_USER_ACTION LOCATION_COLUMNS (*yylloc, yyleng) |
769 | #define YY_LINES LOCATION_LINES (*yylloc, yyleng); lineno += yyleng; | |
770 | #define YY_STEP LOCATION_STEP (*yylloc) | |
771 | ||
44995b2e AD |
772 | |
773 | /* STRING_OBSTACK -- Used to store all the characters that we need to | |
774 | keep (to construct ID, STRINGS etc.). Use the following macros to | |
775 | use it. | |
776 | ||
1d6412ad AD |
777 | Use YY_OBS_GROW to append what has just been matched, and |
778 | YY_OBS_FINISH to end the string (it puts the ending 0). | |
779 | YY_OBS_FINISH also stores this string in LAST_STRING, which can be | |
780 | used, and which is used by YY_OBS_FREE to free the last string. */ | |
44995b2e AD |
781 | |
782 | static struct obstack string_obstack; | |
783 | char *last_string; | |
784 | ||
44995b2e AD |
785 | #define YY_OBS_GROW \ |
786 | obstack_grow (&string_obstack, yytext, yyleng) | |
787 | ||
788 | #define YY_OBS_FINISH \ | |
789 | do { \ | |
790 | obstack_1grow (&string_obstack, '\0'); \ | |
791 | last_string = obstack_finish (&string_obstack); \ | |
44995b2e AD |
792 | } while (0) |
793 | ||
794 | #define YY_OBS_FREE \ | |
795 | do { \ | |
796 | obstack_free (&string_obstack, last_string); \ | |
797 | } while (0) | |
e9955c83 | 798 | |
4cdb01db AD |
799 | void |
800 | scanner_last_string_free (void) | |
801 | { | |
802 | YY_OBS_FREE; | |
803 | } | |
804 | ||
805 | ||
e9955c83 AD |
806 | static int braces_level = 0; |
807 | static int percent_percent_count = 0; | |
808 | ||
f25bfb75 AD |
809 | static void handle_dollar PARAMS ((braced_code_t code_kind, |
810 | char *cp, location_t location)); | |
811 | static void handle_at PARAMS ((braced_code_t code_kind, | |
812 | char *cp, location_t location)); | |
e9955c83 AD |
813 | |
814 | #define SC_COMMENT 1 | |
815 | ||
816 | #define SC_STRING 2 | |
817 | #define SC_CHARACTER 3 | |
818 | ||
819 | #define SC_ESCAPED_STRING 4 | |
820 | #define SC_ESCAPED_CHARACTER 5 | |
821 | ||
822 | #define SC_BRACED_CODE 6 | |
823 | #define SC_PROLOGUE 7 | |
824 | #define SC_EPILOGUE 8 | |
825 | ||
676385e2 | 826 | #line 827 "scan-gram.c" |
e9955c83 AD |
827 | |
828 | /* Macros after this point can all be overridden by user definitions in | |
829 | * section 1. | |
830 | */ | |
831 | ||
832 | #ifndef YY_SKIP_YYWRAP | |
833 | #ifdef __cplusplus | |
834 | extern "C" int yywrap YY_PROTO(( void )); | |
835 | #else | |
836 | extern int yywrap YY_PROTO(( void )); | |
837 | #endif | |
838 | #endif | |
839 | ||
840 | #ifndef YY_NO_UNPUT | |
841 | static void yyunput YY_PROTO(( int c, char *buf_ptr )); | |
842 | #endif | |
843 | ||
844 | #ifndef yytext_ptr | |
845 | static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); | |
846 | #endif | |
847 | ||
848 | #ifdef YY_NEED_STRLEN | |
849 | static int yy_flex_strlen YY_PROTO(( yyconst char * )); | |
850 | #endif | |
851 | ||
852 | #ifndef YY_NO_INPUT | |
853 | #ifdef __cplusplus | |
854 | static int yyinput YY_PROTO(( void )); | |
855 | #else | |
856 | static int input YY_PROTO(( void )); | |
857 | #endif | |
858 | #endif | |
859 | ||
860 | #if YY_STACK_USED | |
861 | static int yy_start_stack_ptr = 0; | |
862 | static int yy_start_stack_depth = 0; | |
863 | static int *yy_start_stack = 0; | |
864 | #ifndef YY_NO_PUSH_STATE | |
865 | static void yy_push_state YY_PROTO(( int new_state )); | |
866 | #endif | |
867 | #ifndef YY_NO_POP_STATE | |
868 | static void yy_pop_state YY_PROTO(( void )); | |
869 | #endif | |
870 | #ifndef YY_NO_TOP_STATE | |
871 | static int yy_top_state YY_PROTO(( void )); | |
872 | #endif | |
873 | ||
874 | #else | |
875 | #define YY_NO_PUSH_STATE 1 | |
876 | #define YY_NO_POP_STATE 1 | |
877 | #define YY_NO_TOP_STATE 1 | |
878 | #endif | |
879 | ||
880 | #ifdef YY_MALLOC_DECL | |
881 | YY_MALLOC_DECL | |
882 | #else | |
883 | #if __STDC__ | |
884 | #ifndef __cplusplus | |
885 | #include <stdlib.h> | |
886 | #endif | |
887 | #else | |
888 | /* Just try to get by without declaring the routines. This will fail | |
889 | * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) | |
890 | * or sizeof(void*) != sizeof(int). | |
891 | */ | |
892 | #endif | |
893 | #endif | |
894 | ||
895 | /* Amount of stuff to slurp up with each read. */ | |
896 | #ifndef YY_READ_BUF_SIZE | |
897 | #define YY_READ_BUF_SIZE 8192 | |
898 | #endif | |
899 | ||
900 | /* Copy whatever the last rule matched to the standard output. */ | |
901 | ||
902 | #ifndef ECHO | |
903 | /* This used to be an fputs(), but since the string might contain NUL's, | |
904 | * we now use fwrite(). | |
905 | */ | |
906 | #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) | |
907 | #endif | |
908 | ||
909 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, | |
910 | * is returned in "result". | |
911 | */ | |
912 | #ifndef YY_INPUT | |
913 | #define YY_INPUT(buf,result,max_size) \ | |
914 | if ( yy_current_buffer->yy_is_interactive ) \ | |
915 | { \ | |
916 | int c = '*', n; \ | |
917 | for ( n = 0; n < max_size && \ | |
918 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ | |
919 | buf[n] = (char) c; \ | |
920 | if ( c == '\n' ) \ | |
921 | buf[n++] = (char) c; \ | |
922 | if ( c == EOF && ferror( yyin ) ) \ | |
923 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ | |
924 | result = n; \ | |
925 | } \ | |
676385e2 PH |
926 | else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ |
927 | && ferror( yyin ) ) \ | |
928 | YY_FATAL_ERROR( "input in flex scanner failed" ); | |
e9955c83 AD |
929 | #endif |
930 | ||
931 | /* No semi-colon after return; correct usage is to write "yyterminate();" - | |
932 | * we don't want an extra ';' after the "return" because that will cause | |
933 | * some compilers to complain about unreachable statements. | |
934 | */ | |
935 | #ifndef yyterminate | |
936 | #define yyterminate() return YY_NULL | |
937 | #endif | |
938 | ||
939 | /* Number of entries by which start-condition stack grows. */ | |
940 | #ifndef YY_START_STACK_INCR | |
941 | #define YY_START_STACK_INCR 25 | |
942 | #endif | |
943 | ||
944 | /* Report a fatal error. */ | |
945 | #ifndef YY_FATAL_ERROR | |
946 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) | |
947 | #endif | |
948 | ||
949 | /* Default declaration of generated scanner - a define so the user can | |
950 | * easily add parameters. | |
951 | */ | |
952 | #ifndef YY_DECL | |
953 | #define YY_DECL int yylex YY_PROTO(( void )) | |
954 | #endif | |
955 | ||
956 | /* Code executed at the beginning of each rule, after yytext and yyleng | |
957 | * have been set up. | |
958 | */ | |
959 | #ifndef YY_USER_ACTION | |
960 | #define YY_USER_ACTION | |
961 | #endif | |
962 | ||
963 | /* Code executed at the end of each rule. */ | |
964 | #ifndef YY_BREAK | |
965 | #define YY_BREAK break; | |
966 | #endif | |
967 | ||
968 | #define YY_RULE_SETUP \ | |
969 | YY_USER_ACTION | |
970 | ||
971 | YY_DECL | |
972 | { | |
973 | register yy_state_type yy_current_state; | |
974 | register char *yy_cp, *yy_bp; | |
975 | register int yy_act; | |
976 | ||
9280d3ef | 977 | #line 98 "scan-gram.l" |
e9955c83 AD |
978 | |
979 | ||
980 | /* At each yylex invocation, mark the current position as the | |
981 | start of the next token. */ | |
982 | #define TR_POS 0 | |
983 | #if TR_POS | |
8efe435c | 984 | fprintf (stderr, "FOO1: %p: ", yylloc); |
e9955c83 AD |
985 | LOCATION_PRINT (stderr, *yylloc); |
986 | fprintf (stderr, "\n"); | |
987 | #endif | |
988 | YY_STEP; | |
989 | #if TR_POS | |
990 | fprintf (stderr, "BAR1: "); | |
991 | LOCATION_PRINT (stderr, *yylloc); | |
992 | fprintf (stderr, "\n"); | |
993 | #endif | |
994 | ||
995 | ||
996 | ||
997 | /*----------------------------. | |
998 | | Scanning Bison directives. | | |
999 | `----------------------------*/ | |
676385e2 | 1000 | #line 1001 "scan-gram.c" |
e9955c83 AD |
1001 | |
1002 | if ( yy_init ) | |
1003 | { | |
1004 | yy_init = 0; | |
1005 | ||
1006 | #ifdef YY_USER_INIT | |
1007 | YY_USER_INIT; | |
1008 | #endif | |
1009 | ||
1010 | if ( ! yy_start ) | |
1011 | yy_start = 1; /* first start state */ | |
1012 | ||
1013 | if ( ! yyin ) | |
1014 | yyin = stdin; | |
1015 | ||
1016 | if ( ! yyout ) | |
1017 | yyout = stdout; | |
1018 | ||
1019 | if ( ! yy_current_buffer ) | |
1020 | yy_current_buffer = | |
1021 | yy_create_buffer( yyin, YY_BUF_SIZE ); | |
1022 | ||
1023 | yy_load_buffer_state(); | |
1024 | } | |
1025 | ||
1026 | while ( 1 ) /* loops until end-of-file is reached */ | |
1027 | { | |
1028 | yy_cp = yy_c_buf_p; | |
1029 | ||
1030 | /* Support of yytext. */ | |
1031 | *yy_cp = yy_hold_char; | |
1032 | ||
1033 | /* yy_bp points to the position in yy_ch_buf of the start of | |
1034 | * the current run. | |
1035 | */ | |
1036 | yy_bp = yy_cp; | |
1037 | ||
1038 | yy_current_state = yy_start; | |
1039 | yy_match: | |
1040 | do | |
1041 | { | |
1042 | register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; | |
1043 | if ( yy_accept[yy_current_state] ) | |
1044 | { | |
1045 | yy_last_accepting_state = yy_current_state; | |
1046 | yy_last_accepting_cpos = yy_cp; | |
1047 | } | |
1048 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | |
1049 | { | |
1050 | yy_current_state = (int) yy_def[yy_current_state]; | |
676385e2 | 1051 | if ( yy_current_state >= 380 ) |
e9955c83 AD |
1052 | yy_c = yy_meta[(unsigned int) yy_c]; |
1053 | } | |
1054 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | |
1055 | ++yy_cp; | |
1056 | } | |
676385e2 | 1057 | while ( yy_base[yy_current_state] != 840 ); |
e9955c83 AD |
1058 | |
1059 | yy_find_action: | |
1060 | yy_act = yy_accept[yy_current_state]; | |
1061 | if ( yy_act == 0 ) | |
1062 | { /* have to back up */ | |
1063 | yy_cp = yy_last_accepting_cpos; | |
1064 | yy_current_state = yy_last_accepting_state; | |
1065 | yy_act = yy_accept[yy_current_state]; | |
1066 | } | |
1067 | ||
1068 | YY_DO_BEFORE_ACTION; | |
1069 | ||
1070 | ||
1071 | do_action: /* This label is used only to access EOF actions. */ | |
1072 | ||
1073 | if ( yy_flex_debug ) | |
1074 | { | |
1075 | if ( yy_act == 0 ) | |
1076 | fprintf( stderr, "--scanner backing up\n" ); | |
676385e2 | 1077 | else if ( yy_act < 101 ) |
e9955c83 AD |
1078 | fprintf( stderr, "--accepting rule at line %d (\"%s\")\n", |
1079 | yy_rule_linenum[yy_act], yytext ); | |
676385e2 | 1080 | else if ( yy_act == 101 ) |
e9955c83 AD |
1081 | fprintf( stderr, "--accepting default rule (\"%s\")\n", |
1082 | yytext ); | |
676385e2 | 1083 | else if ( yy_act == 102 ) |
e9955c83 AD |
1084 | fprintf( stderr, "--(end of buffer or a NUL)\n" ); |
1085 | else | |
1086 | fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); | |
1087 | } | |
1088 | ||
1089 | switch ( yy_act ) | |
1090 | { /* beginning of action switch */ | |
1091 | case 0: /* must back up */ | |
1092 | /* undo the effects of YY_DO_BEFORE_ACTION */ | |
1093 | *yy_cp = yy_hold_char; | |
1094 | yy_cp = yy_last_accepting_cpos; | |
1095 | yy_current_state = yy_last_accepting_state; | |
1096 | goto yy_find_action; | |
1097 | ||
1098 | ||
1099 | ||
1100 | case 1: | |
1101 | YY_RULE_SETUP | |
9280d3ef | 1102 | #line 122 "scan-gram.l" |
e9955c83 AD |
1103 | return PERCENT_NONASSOC; |
1104 | YY_BREAK | |
1105 | case 2: | |
1106 | YY_RULE_SETUP | |
9280d3ef | 1107 | #line 123 "scan-gram.l" |
e9955c83 AD |
1108 | return PERCENT_DEBUG; |
1109 | YY_BREAK | |
1110 | case 3: | |
1111 | YY_RULE_SETUP | |
9280d3ef | 1112 | #line 124 "scan-gram.l" |
e9955c83 AD |
1113 | return PERCENT_DEFINE; |
1114 | YY_BREAK | |
1115 | case 4: | |
1116 | YY_RULE_SETUP | |
9280d3ef | 1117 | #line 125 "scan-gram.l" |
e9955c83 AD |
1118 | return PERCENT_DEFINES; |
1119 | YY_BREAK | |
1120 | case 5: | |
1121 | YY_RULE_SETUP | |
9280d3ef AD |
1122 | #line 126 "scan-gram.l" |
1123 | return PERCENT_DESTRUCTOR; | |
e9955c83 AD |
1124 | YY_BREAK |
1125 | case 6: | |
1126 | YY_RULE_SETUP | |
9280d3ef | 1127 | #line 127 "scan-gram.l" |
676385e2 | 1128 | return PERCENT_DPREC; |
e9955c83 AD |
1129 | YY_BREAK |
1130 | case 7: | |
1131 | YY_RULE_SETUP | |
9280d3ef | 1132 | #line 128 "scan-gram.l" |
676385e2 | 1133 | return PERCENT_ERROR_VERBOSE; |
e9955c83 AD |
1134 | YY_BREAK |
1135 | case 8: | |
1136 | YY_RULE_SETUP | |
9280d3ef | 1137 | #line 129 "scan-gram.l" |
676385e2 | 1138 | return PERCENT_EXPECT; |
e9955c83 AD |
1139 | YY_BREAK |
1140 | case 9: | |
1141 | YY_RULE_SETUP | |
9280d3ef | 1142 | #line 130 "scan-gram.l" |
676385e2 | 1143 | return PERCENT_FILE_PREFIX; |
e9955c83 AD |
1144 | YY_BREAK |
1145 | case 10: | |
1146 | YY_RULE_SETUP | |
9280d3ef | 1147 | #line 131 "scan-gram.l" |
676385e2 | 1148 | return PERCENT_YACC; |
e9955c83 AD |
1149 | YY_BREAK |
1150 | case 11: | |
1151 | YY_RULE_SETUP | |
9280d3ef | 1152 | #line 132 "scan-gram.l" |
676385e2 | 1153 | return PERCENT_GLR_PARSER; |
e9955c83 AD |
1154 | YY_BREAK |
1155 | case 12: | |
1156 | YY_RULE_SETUP | |
9280d3ef | 1157 | #line 133 "scan-gram.l" |
676385e2 | 1158 | return PERCENT_LEFT; |
e9955c83 AD |
1159 | YY_BREAK |
1160 | case 13: | |
1161 | YY_RULE_SETUP | |
9280d3ef | 1162 | #line 134 "scan-gram.l" |
676385e2 | 1163 | return PERCENT_LOCATIONS; |
e9955c83 AD |
1164 | YY_BREAK |
1165 | case 14: | |
1166 | YY_RULE_SETUP | |
9280d3ef | 1167 | #line 135 "scan-gram.l" |
676385e2 | 1168 | return PERCENT_MERGE; |
e9955c83 AD |
1169 | YY_BREAK |
1170 | case 15: | |
1171 | YY_RULE_SETUP | |
9280d3ef | 1172 | #line 136 "scan-gram.l" |
676385e2 | 1173 | return PERCENT_NAME_PREFIX; |
e9955c83 AD |
1174 | YY_BREAK |
1175 | case 16: | |
1176 | YY_RULE_SETUP | |
9280d3ef | 1177 | #line 137 "scan-gram.l" |
676385e2 | 1178 | return PERCENT_NO_LINES; |
e9955c83 AD |
1179 | YY_BREAK |
1180 | case 17: | |
1181 | YY_RULE_SETUP | |
9280d3ef | 1182 | #line 138 "scan-gram.l" |
676385e2 | 1183 | return PERCENT_NONASSOC; |
e9955c83 AD |
1184 | YY_BREAK |
1185 | case 18: | |
1186 | YY_RULE_SETUP | |
9280d3ef | 1187 | #line 139 "scan-gram.l" |
676385e2 | 1188 | return PERCENT_NTERM; |
e9955c83 AD |
1189 | YY_BREAK |
1190 | case 19: | |
1191 | YY_RULE_SETUP | |
9280d3ef | 1192 | #line 140 "scan-gram.l" |
676385e2 | 1193 | return PERCENT_OUTPUT; |
e9955c83 AD |
1194 | YY_BREAK |
1195 | case 20: | |
1196 | YY_RULE_SETUP | |
9280d3ef | 1197 | #line 141 "scan-gram.l" |
676385e2 | 1198 | return PERCENT_PREC; |
e9955c83 AD |
1199 | YY_BREAK |
1200 | case 21: | |
1201 | YY_RULE_SETUP | |
9280d3ef | 1202 | #line 142 "scan-gram.l" |
676385e2 | 1203 | return PERCENT_PRINTER; |
e9955c83 AD |
1204 | YY_BREAK |
1205 | case 22: | |
1206 | YY_RULE_SETUP | |
9280d3ef | 1207 | #line 143 "scan-gram.l" |
676385e2 | 1208 | return PERCENT_PURE_PARSER; |
e9955c83 AD |
1209 | YY_BREAK |
1210 | case 23: | |
1211 | YY_RULE_SETUP | |
9280d3ef | 1212 | #line 144 "scan-gram.l" |
676385e2 | 1213 | return PERCENT_RIGHT; |
e9955c83 AD |
1214 | YY_BREAK |
1215 | case 24: | |
1216 | YY_RULE_SETUP | |
9280d3ef | 1217 | #line 145 "scan-gram.l" |
676385e2 | 1218 | return PERCENT_SKELETON; |
e9955c83 AD |
1219 | YY_BREAK |
1220 | case 25: | |
1221 | YY_RULE_SETUP | |
9280d3ef | 1222 | #line 146 "scan-gram.l" |
676385e2 | 1223 | return PERCENT_START; |
e9955c83 AD |
1224 | YY_BREAK |
1225 | case 26: | |
1226 | YY_RULE_SETUP | |
9280d3ef | 1227 | #line 147 "scan-gram.l" |
676385e2 | 1228 | return PERCENT_TOKEN; |
e9955c83 AD |
1229 | YY_BREAK |
1230 | case 27: | |
1231 | YY_RULE_SETUP | |
9280d3ef | 1232 | #line 148 "scan-gram.l" |
676385e2 | 1233 | return PERCENT_TOKEN; |
e9955c83 AD |
1234 | YY_BREAK |
1235 | case 28: | |
1236 | YY_RULE_SETUP | |
8efe435c | 1237 | #line 149 "scan-gram.l" |
676385e2 | 1238 | return PERCENT_TOKEN_TABLE; |
e9955c83 AD |
1239 | YY_BREAK |
1240 | case 29: | |
1241 | YY_RULE_SETUP | |
366eea36 | 1242 | #line 150 "scan-gram.l" |
676385e2 | 1243 | return PERCENT_TYPE; |
e9955c83 AD |
1244 | YY_BREAK |
1245 | case 30: | |
1246 | YY_RULE_SETUP | |
676385e2 PH |
1247 | #line 151 "scan-gram.l" |
1248 | return PERCENT_UNION; | |
e9955c83 AD |
1249 | YY_BREAK |
1250 | case 31: | |
1251 | YY_RULE_SETUP | |
676385e2 PH |
1252 | #line 152 "scan-gram.l" |
1253 | return PERCENT_VERBOSE; | |
e9955c83 AD |
1254 | YY_BREAK |
1255 | case 32: | |
1256 | YY_RULE_SETUP | |
676385e2 PH |
1257 | #line 153 "scan-gram.l" |
1258 | return PERCENT_YACC; | |
e9955c83 AD |
1259 | YY_BREAK |
1260 | case 33: | |
1261 | YY_RULE_SETUP | |
366eea36 | 1262 | #line 155 "scan-gram.l" |
676385e2 | 1263 | return EQUAL; |
e9955c83 AD |
1264 | YY_BREAK |
1265 | case 34: | |
1266 | YY_RULE_SETUP | |
676385e2 PH |
1267 | #line 156 "scan-gram.l" |
1268 | return COLON; | |
9280d3ef AD |
1269 | YY_BREAK |
1270 | case 35: | |
1271 | YY_RULE_SETUP | |
676385e2 PH |
1272 | #line 157 "scan-gram.l" |
1273 | return PIPE; | |
1274 | YY_BREAK | |
1275 | case 36: | |
1276 | YY_RULE_SETUP | |
9280d3ef | 1277 | #line 158 "scan-gram.l" |
676385e2 PH |
1278 | return SEMICOLON; |
1279 | YY_BREAK | |
1280 | case 37: | |
1281 | YY_RULE_SETUP | |
1282 | #line 160 "scan-gram.l" | |
1283 | YY_LINES; YY_STEP; | |
1284 | YY_BREAK | |
1285 | case 38: | |
1286 | YY_RULE_SETUP | |
1287 | #line 161 "scan-gram.l" | |
366eea36 AD |
1288 | YY_STEP; |
1289 | YY_BREAK | |
676385e2 | 1290 | case 39: |
366eea36 | 1291 | YY_RULE_SETUP |
676385e2 | 1292 | #line 162 "scan-gram.l" |
e9955c83 | 1293 | { |
ee000ba4 | 1294 | yylval->symbol = getsym (yytext, *yylloc); |
e9955c83 AD |
1295 | return ID; |
1296 | } | |
1297 | YY_BREAK | |
676385e2 | 1298 | case 40: |
e9955c83 | 1299 | YY_RULE_SETUP |
676385e2 | 1300 | #line 167 "scan-gram.l" |
e9955c83 AD |
1301 | yylval->integer = strtol (yytext, 0, 10); return INT; |
1302 | YY_BREAK | |
1303 | /* Characters. We don't check there is only one. */ | |
676385e2 | 1304 | case 41: |
e9955c83 | 1305 | YY_RULE_SETUP |
676385e2 | 1306 | #line 170 "scan-gram.l" |
1d6412ad | 1307 | YY_OBS_GROW; yy_push_state (SC_ESCAPED_CHARACTER); |
e9955c83 AD |
1308 | YY_BREAK |
1309 | /* Strings. */ | |
676385e2 | 1310 | case 42: |
e9955c83 | 1311 | YY_RULE_SETUP |
676385e2 | 1312 | #line 173 "scan-gram.l" |
1d6412ad | 1313 | YY_OBS_GROW; yy_push_state (SC_ESCAPED_STRING); |
e9955c83 AD |
1314 | YY_BREAK |
1315 | /* Comments. */ | |
676385e2 | 1316 | case 43: |
e9955c83 | 1317 | YY_RULE_SETUP |
676385e2 | 1318 | #line 176 "scan-gram.l" |
e9955c83 AD |
1319 | yy_push_state (SC_COMMENT); |
1320 | YY_BREAK | |
676385e2 | 1321 | case 44: |
e9955c83 | 1322 | YY_RULE_SETUP |
676385e2 | 1323 | #line 177 "scan-gram.l" |
e9955c83 AD |
1324 | YY_STEP; |
1325 | YY_BREAK | |
1326 | /* Prologue. */ | |
676385e2 | 1327 | case 45: |
e9955c83 | 1328 | YY_RULE_SETUP |
676385e2 | 1329 | #line 180 "scan-gram.l" |
1d6412ad | 1330 | yy_push_state (SC_PROLOGUE); |
e9955c83 AD |
1331 | YY_BREAK |
1332 | /* Code in between braces. */ | |
676385e2 | 1333 | case 46: |
e9955c83 | 1334 | YY_RULE_SETUP |
676385e2 | 1335 | #line 183 "scan-gram.l" |
1d6412ad | 1336 | YY_OBS_GROW; ++braces_level; yy_push_state (SC_BRACED_CODE); |
e9955c83 AD |
1337 | YY_BREAK |
1338 | /* A type. */ | |
676385e2 | 1339 | case 47: |
e9955c83 | 1340 | YY_RULE_SETUP |
676385e2 | 1341 | #line 186 "scan-gram.l" |
4cdb01db | 1342 | { |
4cdb01db AD |
1343 | obstack_grow (&string_obstack, yytext + 1, yyleng - 2); |
1344 | YY_OBS_FINISH; | |
1345 | yylval->string = last_string; | |
1346 | return TYPE; | |
1347 | } | |
e9955c83 | 1348 | YY_BREAK |
676385e2 | 1349 | case 48: |
e9955c83 | 1350 | YY_RULE_SETUP |
676385e2 | 1351 | #line 194 "scan-gram.l" |
e9955c83 AD |
1352 | { |
1353 | if (++percent_percent_count == 2) | |
1354 | yy_push_state (SC_EPILOGUE); | |
1355 | return PERCENT_PERCENT; | |
1356 | } | |
1357 | YY_BREAK | |
676385e2 | 1358 | case 49: |
e9955c83 | 1359 | YY_RULE_SETUP |
676385e2 | 1360 | #line 200 "scan-gram.l" |
e9955c83 AD |
1361 | { |
1362 | LOCATION_PRINT (stderr, *yylloc); | |
1363 | fprintf (stderr, ": invalid character: `%c'\n", *yytext); | |
1364 | YY_STEP; | |
1365 | } | |
1366 | YY_BREAK | |
1367 | ||
1368 | /*------------------------------------------------------------. | |
1369 | | Whatever the start condition (but those which correspond to | | |
1370 | | entity `swallowed' by Bison: SC_ESCAPED_STRING and | | |
1371 | | SC_ESCAPED_CHARACTER), no M4 character must escape as is. | | |
1372 | `------------------------------------------------------------*/ | |
1373 | ||
1374 | ||
676385e2 | 1375 | case 50: |
e9955c83 | 1376 | YY_RULE_SETUP |
676385e2 | 1377 | #line 216 "scan-gram.l" |
1d6412ad | 1378 | if (YY_START != SC_COMMENT) obstack_sgrow (&string_obstack, "@<:@"); |
e9955c83 | 1379 | YY_BREAK |
676385e2 | 1380 | case 51: |
e9955c83 | 1381 | YY_RULE_SETUP |
676385e2 | 1382 | #line 217 "scan-gram.l" |
1d6412ad | 1383 | if (YY_START != SC_COMMENT) obstack_sgrow (&string_obstack, "@:>@"); |
e9955c83 AD |
1384 | YY_BREAK |
1385 | ||
1386 | /*-----------------------------------------------------------. | |
1387 | | Scanning a C comment. The initial `/ *' is already eaten. | | |
1388 | `-----------------------------------------------------------*/ | |
1389 | ||
1390 | ||
676385e2 | 1391 | case 52: |
e9955c83 | 1392 | YY_RULE_SETUP |
676385e2 | 1393 | #line 228 "scan-gram.l" |
e9955c83 AD |
1394 | { /* End of the comment. */ |
1395 | if (yy_top_state () == INITIAL) | |
1396 | { | |
1397 | YY_STEP; | |
1398 | } | |
1399 | else | |
1400 | { | |
44995b2e | 1401 | YY_OBS_GROW; |
e9955c83 AD |
1402 | } |
1403 | yy_pop_state (); | |
1404 | } | |
1405 | YY_BREAK | |
676385e2 | 1406 | case 53: |
e9955c83 | 1407 | YY_RULE_SETUP |
676385e2 | 1408 | #line 240 "scan-gram.l" |
366eea36 | 1409 | if (yy_top_state () != INITIAL) YY_OBS_GROW; |
e9955c83 | 1410 | YY_BREAK |
676385e2 | 1411 | case 54: |
e9955c83 | 1412 | YY_RULE_SETUP |
676385e2 | 1413 | #line 241 "scan-gram.l" |
366eea36 AD |
1414 | if (yy_top_state () != INITIAL) YY_OBS_GROW; YY_LINES; |
1415 | YY_BREAK | |
676385e2 | 1416 | case 55: |
366eea36 | 1417 | YY_RULE_SETUP |
676385e2 | 1418 | #line 242 "scan-gram.l" |
44995b2e | 1419 | /* Stray `*'. */if (yy_top_state () != INITIAL) YY_OBS_GROW; |
e9955c83 AD |
1420 | YY_BREAK |
1421 | case YY_STATE_EOF(SC_COMMENT): | |
676385e2 | 1422 | #line 244 "scan-gram.l" |
e9955c83 AD |
1423 | { |
1424 | LOCATION_PRINT (stderr, *yylloc); | |
1425 | fprintf (stderr, ": unexpected end of file in a comment\n"); | |
1426 | yy_pop_state (); | |
1427 | } | |
1428 | YY_BREAK | |
1429 | ||
1430 | /*----------------------------------------------------------------. | |
1431 | | Scanning a C string, including its escapes. The initial `"' is | | |
1432 | | already eaten. | | |
1433 | `----------------------------------------------------------------*/ | |
1434 | ||
1435 | ||
676385e2 | 1436 | case 56: |
e9955c83 | 1437 | YY_RULE_SETUP |
676385e2 | 1438 | #line 259 "scan-gram.l" |
e9955c83 AD |
1439 | { |
1440 | assert (yy_top_state () == INITIAL); | |
44995b2e AD |
1441 | YY_OBS_GROW; |
1442 | YY_OBS_FINISH; | |
4cdb01db | 1443 | yylval->string = last_string; |
e9955c83 AD |
1444 | yy_pop_state (); |
1445 | return STRING; | |
1446 | } | |
1447 | YY_BREAK | |
676385e2 | 1448 | case 57: |
e9955c83 | 1449 | YY_RULE_SETUP |
676385e2 | 1450 | #line 268 "scan-gram.l" |
44995b2e | 1451 | YY_OBS_GROW; |
e9955c83 | 1452 | YY_BREAK |
676385e2 | 1453 | case 58: |
e9955c83 | 1454 | YY_RULE_SETUP |
676385e2 | 1455 | #line 270 "scan-gram.l" |
e9955c83 AD |
1456 | obstack_1grow (&string_obstack, '\n'); YY_LINES; |
1457 | YY_BREAK | |
1458 | case YY_STATE_EOF(SC_ESCAPED_STRING): | |
676385e2 | 1459 | #line 272 "scan-gram.l" |
e9955c83 AD |
1460 | { |
1461 | LOCATION_PRINT (stderr, *yylloc); | |
1462 | fprintf (stderr, ": unexpected end of file in a string\n"); | |
1463 | assert (yy_top_state () == INITIAL); | |
44995b2e | 1464 | YY_OBS_FINISH; |
4cdb01db | 1465 | yylval->string = last_string; |
e9955c83 AD |
1466 | yy_pop_state (); |
1467 | return STRING; | |
1468 | } | |
1469 | YY_BREAK | |
1470 | ||
1471 | /*---------------------------------------------------------------. | |
1472 | | Scanning a C character, decoding its escapes. The initial "'" | | |
1473 | | is already eaten. | | |
1474 | `---------------------------------------------------------------*/ | |
1475 | ||
1476 | ||
676385e2 | 1477 | case 59: |
e9955c83 | 1478 | YY_RULE_SETUP |
676385e2 | 1479 | #line 290 "scan-gram.l" |
e9955c83 | 1480 | { |
44995b2e | 1481 | YY_OBS_GROW; |
e9955c83 AD |
1482 | assert (yy_top_state () == INITIAL); |
1483 | { | |
44995b2e | 1484 | YY_OBS_FINISH; |
ee000ba4 | 1485 | yylval->symbol = getsym (last_string, *yylloc); |
e776192e AD |
1486 | symbol_class_set (yylval->symbol, token_sym, *yylloc); |
1487 | symbol_user_token_number_set (yylval->symbol, last_string[1], *yylloc); | |
44995b2e | 1488 | YY_OBS_FREE; |
e9955c83 AD |
1489 | yy_pop_state (); |
1490 | return ID; | |
1491 | } | |
1492 | } | |
1493 | YY_BREAK | |
676385e2 | 1494 | case 60: |
e9955c83 | 1495 | YY_RULE_SETUP |
676385e2 | 1496 | #line 304 "scan-gram.l" |
44995b2e | 1497 | YY_OBS_GROW; |
e9955c83 | 1498 | YY_BREAK |
676385e2 | 1499 | case 61: |
e9955c83 | 1500 | YY_RULE_SETUP |
676385e2 | 1501 | #line 306 "scan-gram.l" |
e9955c83 AD |
1502 | obstack_1grow (&string_obstack, '\n'); YY_LINES; |
1503 | YY_BREAK | |
1504 | case YY_STATE_EOF(SC_ESCAPED_CHARACTER): | |
676385e2 | 1505 | #line 308 "scan-gram.l" |
e9955c83 AD |
1506 | { |
1507 | LOCATION_PRINT (stderr, *yylloc); | |
1508 | fprintf (stderr, ": unexpected end of file in a character\n"); | |
1509 | assert (yy_top_state () == INITIAL); | |
44995b2e | 1510 | YY_OBS_FINISH; |
4cdb01db | 1511 | yylval->string = last_string; |
e9955c83 AD |
1512 | yy_pop_state (); |
1513 | return CHARACTER; | |
1514 | } | |
1515 | YY_BREAK | |
1516 | ||
1517 | /*----------------------------. | |
1518 | | Decode escaped characters. | | |
1519 | `----------------------------*/ | |
1520 | ||
1521 | ||
676385e2 | 1522 | case 62: |
e9955c83 | 1523 | YY_RULE_SETUP |
676385e2 | 1524 | #line 326 "scan-gram.l" |
e9955c83 AD |
1525 | { |
1526 | long c = strtol (yytext + 1, 0, 8); | |
1527 | if (c > 255) | |
1528 | { | |
1529 | LOCATION_PRINT (stderr, *yylloc); | |
4f25ebb0 | 1530 | fprintf (stderr, ": invalid escape: %s\n", quote (yytext)); |
e9955c83 AD |
1531 | YY_STEP; |
1532 | } | |
1533 | else | |
1534 | obstack_1grow (&string_obstack, c); | |
1535 | } | |
1536 | YY_BREAK | |
676385e2 | 1537 | case 63: |
e9955c83 | 1538 | YY_RULE_SETUP |
676385e2 | 1539 | #line 338 "scan-gram.l" |
e9955c83 AD |
1540 | { |
1541 | obstack_1grow (&string_obstack, strtol (yytext + 2, 0, 16)); | |
1542 | } | |
1543 | YY_BREAK | |
676385e2 | 1544 | case 64: |
e9955c83 | 1545 | YY_RULE_SETUP |
676385e2 | 1546 | #line 342 "scan-gram.l" |
366eea36 | 1547 | obstack_1grow (&string_obstack, '\a'); |
e9955c83 | 1548 | YY_BREAK |
676385e2 | 1549 | case 65: |
e9955c83 | 1550 | YY_RULE_SETUP |
676385e2 | 1551 | #line 343 "scan-gram.l" |
366eea36 | 1552 | obstack_1grow (&string_obstack, '\b'); |
e9955c83 | 1553 | YY_BREAK |
676385e2 | 1554 | case 66: |
e9955c83 | 1555 | YY_RULE_SETUP |
676385e2 | 1556 | #line 344 "scan-gram.l" |
366eea36 | 1557 | obstack_1grow (&string_obstack, '\f'); |
e9955c83 | 1558 | YY_BREAK |
676385e2 | 1559 | case 67: |
e9955c83 | 1560 | YY_RULE_SETUP |
676385e2 | 1561 | #line 345 "scan-gram.l" |
366eea36 | 1562 | obstack_1grow (&string_obstack, '\n'); |
e9955c83 | 1563 | YY_BREAK |
676385e2 | 1564 | case 68: |
e9955c83 | 1565 | YY_RULE_SETUP |
676385e2 | 1566 | #line 346 "scan-gram.l" |
366eea36 | 1567 | obstack_1grow (&string_obstack, '\r'); |
e9955c83 | 1568 | YY_BREAK |
676385e2 | 1569 | case 69: |
e9955c83 | 1570 | YY_RULE_SETUP |
676385e2 | 1571 | #line 347 "scan-gram.l" |
366eea36 | 1572 | obstack_1grow (&string_obstack, '\t'); |
e9955c83 | 1573 | YY_BREAK |
676385e2 | 1574 | case 70: |
e9955c83 | 1575 | YY_RULE_SETUP |
676385e2 | 1576 | #line 348 "scan-gram.l" |
366eea36 | 1577 | obstack_1grow (&string_obstack, '\v'); |
e9955c83 | 1578 | YY_BREAK |
676385e2 | 1579 | case 71: |
e9955c83 | 1580 | YY_RULE_SETUP |
676385e2 | 1581 | #line 349 "scan-gram.l" |
366eea36 AD |
1582 | obstack_1grow (&string_obstack, yytext[1]); |
1583 | YY_BREAK | |
676385e2 | 1584 | case 72: |
366eea36 | 1585 | YY_RULE_SETUP |
676385e2 | 1586 | #line 350 "scan-gram.l" |
e9955c83 AD |
1587 | { |
1588 | LOCATION_PRINT (stderr, *yylloc); | |
4f25ebb0 | 1589 | fprintf (stderr, ": unrecognized escape: %s\n", quote (yytext)); |
44995b2e | 1590 | YY_OBS_GROW; |
e9955c83 AD |
1591 | } |
1592 | YY_BREAK | |
4f25ebb0 | 1593 | /* FLex wants this rule, in case of a `\<<EOF>>'. */ |
676385e2 | 1594 | case 73: |
4f25ebb0 | 1595 | YY_RULE_SETUP |
676385e2 | 1596 | #line 356 "scan-gram.l" |
4f25ebb0 AD |
1597 | YY_OBS_GROW; |
1598 | YY_BREAK | |
e9955c83 AD |
1599 | |
1600 | /*----------------------------------------------------------. | |
1601 | | Scanning a C character without decoding its escapes. The | | |
1602 | | initial "'" is already eaten. | | |
1603 | `----------------------------------------------------------*/ | |
1604 | ||
1605 | ||
676385e2 | 1606 | case 74: |
e9955c83 | 1607 | YY_RULE_SETUP |
676385e2 | 1608 | #line 367 "scan-gram.l" |
e9955c83 | 1609 | { |
44995b2e | 1610 | YY_OBS_GROW; |
e9955c83 AD |
1611 | assert (yy_top_state () != INITIAL); |
1612 | yy_pop_state (); | |
1613 | } | |
1614 | YY_BREAK | |
676385e2 | 1615 | case 75: |
9280d3ef | 1616 | YY_RULE_SETUP |
676385e2 | 1617 | #line 373 "scan-gram.l" |
4f25ebb0 AD |
1618 | YY_OBS_GROW; |
1619 | YY_BREAK | |
676385e2 | 1620 | case 76: |
4f25ebb0 | 1621 | YY_RULE_SETUP |
676385e2 | 1622 | #line 374 "scan-gram.l" |
4f25ebb0 AD |
1623 | YY_OBS_GROW; |
1624 | YY_BREAK | |
366eea36 | 1625 | /* FLex wants this rule, in case of a `\<<EOF>>'. */ |
676385e2 | 1626 | case 77: |
4f25ebb0 | 1627 | YY_RULE_SETUP |
676385e2 | 1628 | #line 376 "scan-gram.l" |
366eea36 AD |
1629 | YY_OBS_GROW; |
1630 | YY_BREAK | |
676385e2 | 1631 | case 78: |
366eea36 | 1632 | YY_RULE_SETUP |
676385e2 | 1633 | #line 378 "scan-gram.l" |
44995b2e | 1634 | YY_OBS_GROW; YY_LINES; |
e9955c83 AD |
1635 | YY_BREAK |
1636 | case YY_STATE_EOF(SC_CHARACTER): | |
676385e2 | 1637 | #line 380 "scan-gram.l" |
e9955c83 AD |
1638 | { |
1639 | LOCATION_PRINT (stderr, *yylloc); | |
1640 | fprintf (stderr, ": unexpected end of file in a character\n"); | |
1641 | assert (yy_top_state () != INITIAL); | |
1642 | yy_pop_state (); | |
1643 | } | |
1644 | YY_BREAK | |
1645 | ||
1646 | /*----------------------------------------------------------------. | |
1647 | | Scanning a C string, without decoding its escapes. The initial | | |
1648 | | `"' is already eaten. | | |
1649 | `----------------------------------------------------------------*/ | |
1650 | ||
1651 | ||
676385e2 | 1652 | case 79: |
e9955c83 | 1653 | YY_RULE_SETUP |
676385e2 | 1654 | #line 396 "scan-gram.l" |
e9955c83 AD |
1655 | { |
1656 | assert (yy_top_state () != INITIAL); | |
44995b2e | 1657 | YY_OBS_GROW; |
e9955c83 AD |
1658 | yy_pop_state (); |
1659 | } | |
1660 | YY_BREAK | |
676385e2 | 1661 | case 80: |
e9955c83 | 1662 | YY_RULE_SETUP |
676385e2 | 1663 | #line 402 "scan-gram.l" |
9280d3ef AD |
1664 | YY_OBS_GROW; |
1665 | YY_BREAK | |
676385e2 | 1666 | case 81: |
4f25ebb0 | 1667 | YY_RULE_SETUP |
676385e2 | 1668 | #line 403 "scan-gram.l" |
4f25ebb0 AD |
1669 | YY_OBS_GROW; |
1670 | YY_BREAK | |
366eea36 | 1671 | /* FLex wants this rule, in case of a `\<<EOF>>'. */ |
676385e2 | 1672 | case 82: |
9280d3ef | 1673 | YY_RULE_SETUP |
676385e2 | 1674 | #line 405 "scan-gram.l" |
366eea36 AD |
1675 | YY_OBS_GROW; |
1676 | YY_BREAK | |
676385e2 | 1677 | case 83: |
366eea36 | 1678 | YY_RULE_SETUP |
676385e2 | 1679 | #line 407 "scan-gram.l" |
44995b2e | 1680 | YY_OBS_GROW; YY_LINES; |
e9955c83 AD |
1681 | YY_BREAK |
1682 | case YY_STATE_EOF(SC_STRING): | |
676385e2 | 1683 | #line 409 "scan-gram.l" |
e9955c83 AD |
1684 | { |
1685 | LOCATION_PRINT (stderr, *yylloc); | |
1686 | fprintf (stderr, ": unexpected end of file in a string\n"); | |
1687 | assert (yy_top_state () != INITIAL); | |
1688 | yy_pop_state (); | |
1689 | } | |
1690 | YY_BREAK | |
1691 | ||
1692 | /*---------------------------------------------------. | |
1693 | | Strings, comments etc. can be found in user code. | | |
1694 | `---------------------------------------------------*/ | |
1695 | ||
1696 | ||
1697 | /* Characters. We don't check there is only one. */ | |
676385e2 | 1698 | case 84: |
e9955c83 | 1699 | YY_RULE_SETUP |
676385e2 | 1700 | #line 425 "scan-gram.l" |
44995b2e | 1701 | YY_OBS_GROW; yy_push_state (SC_CHARACTER); |
e9955c83 AD |
1702 | YY_BREAK |
1703 | /* Strings. */ | |
676385e2 | 1704 | case 85: |
e9955c83 | 1705 | YY_RULE_SETUP |
676385e2 | 1706 | #line 428 "scan-gram.l" |
44995b2e | 1707 | YY_OBS_GROW; yy_push_state (SC_STRING); |
e9955c83 AD |
1708 | YY_BREAK |
1709 | /* Comments. */ | |
676385e2 | 1710 | case 86: |
e9955c83 | 1711 | YY_RULE_SETUP |
676385e2 | 1712 | #line 431 "scan-gram.l" |
44995b2e | 1713 | YY_OBS_GROW; yy_push_state (SC_COMMENT); |
e9955c83 | 1714 | YY_BREAK |
676385e2 | 1715 | case 87: |
4f25ebb0 | 1716 | YY_RULE_SETUP |
676385e2 | 1717 | #line 432 "scan-gram.l" |
4f25ebb0 AD |
1718 | YY_OBS_GROW; |
1719 | YY_BREAK | |
1720 | /* Not comments. */ | |
676385e2 | 1721 | case 88: |
e9955c83 | 1722 | YY_RULE_SETUP |
676385e2 | 1723 | #line 435 "scan-gram.l" |
44995b2e | 1724 | YY_OBS_GROW; |
e9955c83 AD |
1725 | YY_BREAK |
1726 | ||
1727 | /*---------------------------------------------------------------. | |
1728 | | Scanning some code in braces (%union and actions). The initial | | |
1729 | | "{" is already eaten. | | |
1730 | `---------------------------------------------------------------*/ | |
1731 | ||
1732 | ||
676385e2 | 1733 | case 89: |
e9955c83 | 1734 | YY_RULE_SETUP |
676385e2 | 1735 | #line 446 "scan-gram.l" |
e9955c83 | 1736 | { |
44995b2e | 1737 | YY_OBS_GROW; |
e9955c83 AD |
1738 | if (--braces_level == 0) |
1739 | { | |
1740 | yy_pop_state (); | |
44995b2e | 1741 | YY_OBS_FINISH; |
4cdb01db | 1742 | yylval->string = last_string; |
e9955c83 AD |
1743 | return BRACED_CODE; |
1744 | } | |
1745 | } | |
1746 | YY_BREAK | |
676385e2 | 1747 | case 90: |
e9955c83 | 1748 | YY_RULE_SETUP |
676385e2 | 1749 | #line 457 "scan-gram.l" |
9280d3ef | 1750 | YY_OBS_GROW; braces_level++; |
e9955c83 | 1751 | YY_BREAK |
676385e2 | 1752 | case 91: |
e9955c83 | 1753 | YY_RULE_SETUP |
676385e2 | 1754 | #line 459 "scan-gram.l" |
f25bfb75 AD |
1755 | { handle_dollar (current_braced_code, |
1756 | yytext, *yylloc); } | |
e9955c83 | 1757 | YY_BREAK |
676385e2 | 1758 | case 92: |
e9955c83 | 1759 | YY_RULE_SETUP |
676385e2 | 1760 | #line 461 "scan-gram.l" |
f25bfb75 AD |
1761 | { handle_at (current_braced_code, |
1762 | yytext, *yylloc); } | |
e9955c83 | 1763 | YY_BREAK |
676385e2 | 1764 | case 93: |
e9955c83 | 1765 | YY_RULE_SETUP |
676385e2 | 1766 | #line 464 "scan-gram.l" |
9280d3ef AD |
1767 | YY_OBS_GROW; |
1768 | YY_BREAK | |
676385e2 | 1769 | case 94: |
9280d3ef | 1770 | YY_RULE_SETUP |
676385e2 | 1771 | #line 465 "scan-gram.l" |
44995b2e | 1772 | YY_OBS_GROW; YY_LINES; |
e9955c83 AD |
1773 | YY_BREAK |
1774 | /* A lose $, or /, or etc. */ | |
676385e2 | 1775 | case 95: |
e9955c83 | 1776 | YY_RULE_SETUP |
676385e2 | 1777 | #line 468 "scan-gram.l" |
44995b2e | 1778 | YY_OBS_GROW; |
e9955c83 AD |
1779 | YY_BREAK |
1780 | case YY_STATE_EOF(SC_BRACED_CODE): | |
676385e2 | 1781 | #line 470 "scan-gram.l" |
e9955c83 AD |
1782 | { |
1783 | LOCATION_PRINT (stderr, *yylloc); | |
1784 | fprintf (stderr, ": unexpected end of file in a braced code\n"); | |
1785 | yy_pop_state (); | |
44995b2e | 1786 | YY_OBS_FINISH; |
4cdb01db AD |
1787 | yylval->string = last_string; |
1788 | return BRACED_CODE; | |
e9955c83 AD |
1789 | } |
1790 | YY_BREAK | |
1791 | ||
1792 | /*--------------------------------------------------------------. | |
1793 | | Scanning some prologue: from "%{" (already scanned) to "%}". | | |
1794 | `--------------------------------------------------------------*/ | |
1795 | ||
1796 | ||
676385e2 | 1797 | case 96: |
e9955c83 | 1798 | YY_RULE_SETUP |
676385e2 | 1799 | #line 488 "scan-gram.l" |
e9955c83 AD |
1800 | { |
1801 | yy_pop_state (); | |
44995b2e | 1802 | YY_OBS_FINISH; |
4cdb01db | 1803 | yylval->string = last_string; |
e9955c83 AD |
1804 | return PROLOGUE; |
1805 | } | |
1806 | YY_BREAK | |
676385e2 | 1807 | case 97: |
e9955c83 | 1808 | YY_RULE_SETUP |
676385e2 | 1809 | #line 495 "scan-gram.l" |
44995b2e | 1810 | YY_OBS_GROW; |
e9955c83 | 1811 | YY_BREAK |
676385e2 | 1812 | case 98: |
e9955c83 | 1813 | YY_RULE_SETUP |
676385e2 | 1814 | #line 496 "scan-gram.l" |
366eea36 AD |
1815 | YY_OBS_GROW; |
1816 | YY_BREAK | |
676385e2 | 1817 | case 99: |
366eea36 | 1818 | YY_RULE_SETUP |
676385e2 | 1819 | #line 497 "scan-gram.l" |
44995b2e | 1820 | YY_OBS_GROW; YY_LINES; |
e9955c83 AD |
1821 | YY_BREAK |
1822 | case YY_STATE_EOF(SC_PROLOGUE): | |
676385e2 | 1823 | #line 499 "scan-gram.l" |
e9955c83 AD |
1824 | { |
1825 | LOCATION_PRINT (stderr, *yylloc); | |
1826 | fprintf (stderr, ": unexpected end of file in a prologue\n"); | |
1827 | yy_pop_state (); | |
44995b2e | 1828 | YY_OBS_FINISH; |
4cdb01db | 1829 | yylval->string = last_string; |
e9955c83 AD |
1830 | return PROLOGUE; |
1831 | } | |
1832 | YY_BREAK | |
1833 | ||
1834 | /*---------------------------------------------------------------. | |
1835 | | Scanning the epilogue (everything after the second "%%", which | | |
1836 | | has already been eaten. | | |
1837 | `---------------------------------------------------------------*/ | |
1838 | ||
1839 | ||
676385e2 | 1840 | case 100: |
e9955c83 | 1841 | YY_RULE_SETUP |
676385e2 | 1842 | #line 517 "scan-gram.l" |
44995b2e | 1843 | YY_OBS_GROW; |
e9955c83 AD |
1844 | YY_BREAK |
1845 | case YY_STATE_EOF(SC_EPILOGUE): | |
676385e2 | 1846 | #line 519 "scan-gram.l" |
e9955c83 AD |
1847 | { |
1848 | yy_pop_state (); | |
44995b2e | 1849 | YY_OBS_FINISH; |
4cdb01db | 1850 | yylval->string = last_string; |
e9955c83 AD |
1851 | return EPILOGUE; |
1852 | } | |
1853 | YY_BREAK | |
1854 | ||
676385e2 | 1855 | case 101: |
e9955c83 | 1856 | YY_RULE_SETUP |
676385e2 | 1857 | #line 528 "scan-gram.l" |
e9955c83 AD |
1858 | YY_FATAL_ERROR( "flex scanner jammed" ); |
1859 | YY_BREAK | |
676385e2 | 1860 | #line 1861 "scan-gram.c" |
e9955c83 AD |
1861 | case YY_STATE_EOF(INITIAL): |
1862 | yyterminate(); | |
1863 | ||
1864 | case YY_END_OF_BUFFER: | |
1865 | { | |
1866 | /* Amount of text matched not including the EOB char. */ | |
1867 | int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; | |
1868 | ||
1869 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ | |
1870 | *yy_cp = yy_hold_char; | |
1871 | YY_RESTORE_YY_MORE_OFFSET | |
1872 | ||
1873 | if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) | |
1874 | { | |
1875 | /* We're scanning a new file or input source. It's | |
1876 | * possible that this happened because the user | |
1877 | * just pointed yyin at a new source and called | |
1878 | * yylex(). If so, then we have to assure | |
1879 | * consistency between yy_current_buffer and our | |
1880 | * globals. Here is the right place to do so, because | |
1881 | * this is the first action (other than possibly a | |
1882 | * back-up) that will match for the new input source. | |
1883 | */ | |
1884 | yy_n_chars = yy_current_buffer->yy_n_chars; | |
1885 | yy_current_buffer->yy_input_file = yyin; | |
1886 | yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; | |
1887 | } | |
1888 | ||
1889 | /* Note that here we test for yy_c_buf_p "<=" to the position | |
1890 | * of the first EOB in the buffer, since yy_c_buf_p will | |
1891 | * already have been incremented past the NUL character | |
1892 | * (since all states make transitions on EOB to the | |
1893 | * end-of-buffer state). Contrast this with the test | |
1894 | * in input(). | |
1895 | */ | |
1896 | if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) | |
1897 | { /* This was really a NUL. */ | |
1898 | yy_state_type yy_next_state; | |
1899 | ||
1900 | yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; | |
1901 | ||
1902 | yy_current_state = yy_get_previous_state(); | |
1903 | ||
1904 | /* Okay, we're now positioned to make the NUL | |
1905 | * transition. We couldn't have | |
1906 | * yy_get_previous_state() go ahead and do it | |
1907 | * for us because it doesn't know how to deal | |
1908 | * with the possibility of jamming (and we don't | |
1909 | * want to build jamming into it because then it | |
1910 | * will run more slowly). | |
1911 | */ | |
1912 | ||
1913 | yy_next_state = yy_try_NUL_trans( yy_current_state ); | |
1914 | ||
1915 | yy_bp = yytext_ptr + YY_MORE_ADJ; | |
1916 | ||
1917 | if ( yy_next_state ) | |
1918 | { | |
1919 | /* Consume the NUL. */ | |
1920 | yy_cp = ++yy_c_buf_p; | |
1921 | yy_current_state = yy_next_state; | |
1922 | goto yy_match; | |
1923 | } | |
1924 | ||
1925 | else | |
1926 | { | |
1927 | yy_cp = yy_c_buf_p; | |
1928 | goto yy_find_action; | |
1929 | } | |
1930 | } | |
1931 | ||
1932 | else switch ( yy_get_next_buffer() ) | |
1933 | { | |
1934 | case EOB_ACT_END_OF_FILE: | |
1935 | { | |
1936 | yy_did_buffer_switch_on_eof = 0; | |
1937 | ||
1938 | if ( yywrap() ) | |
1939 | { | |
1940 | /* Note: because we've taken care in | |
1941 | * yy_get_next_buffer() to have set up | |
1942 | * yytext, we can now set up | |
1943 | * yy_c_buf_p so that if some total | |
1944 | * hoser (like flex itself) wants to | |
1945 | * call the scanner after we return the | |
1946 | * YY_NULL, it'll still work - another | |
1947 | * YY_NULL will get returned. | |
1948 | */ | |
1949 | yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; | |
1950 | ||
1951 | yy_act = YY_STATE_EOF(YY_START); | |
1952 | goto do_action; | |
1953 | } | |
1954 | ||
1955 | else | |
1956 | { | |
1957 | if ( ! yy_did_buffer_switch_on_eof ) | |
1958 | YY_NEW_FILE; | |
1959 | } | |
1960 | break; | |
1961 | } | |
1962 | ||
1963 | case EOB_ACT_CONTINUE_SCAN: | |
1964 | yy_c_buf_p = | |
1965 | yytext_ptr + yy_amount_of_matched_text; | |
1966 | ||
1967 | yy_current_state = yy_get_previous_state(); | |
1968 | ||
1969 | yy_cp = yy_c_buf_p; | |
1970 | yy_bp = yytext_ptr + YY_MORE_ADJ; | |
1971 | goto yy_match; | |
1972 | ||
1973 | case EOB_ACT_LAST_MATCH: | |
1974 | yy_c_buf_p = | |
1975 | &yy_current_buffer->yy_ch_buf[yy_n_chars]; | |
1976 | ||
1977 | yy_current_state = yy_get_previous_state(); | |
1978 | ||
1979 | yy_cp = yy_c_buf_p; | |
1980 | yy_bp = yytext_ptr + YY_MORE_ADJ; | |
1981 | goto yy_find_action; | |
1982 | } | |
1983 | break; | |
1984 | } | |
1985 | ||
1986 | default: | |
1987 | YY_FATAL_ERROR( | |
1988 | "fatal flex scanner internal error--no action found" ); | |
1989 | } /* end of action switch */ | |
1990 | } /* end of scanning one token */ | |
1991 | } /* end of yylex */ | |
1992 | ||
1993 | ||
1994 | /* yy_get_next_buffer - try to read in a new buffer | |
1995 | * | |
1996 | * Returns a code representing an action: | |
1997 | * EOB_ACT_LAST_MATCH - | |
1998 | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position | |
1999 | * EOB_ACT_END_OF_FILE - end of file | |
2000 | */ | |
2001 | ||
2002 | static int yy_get_next_buffer() | |
2003 | { | |
2004 | register char *dest = yy_current_buffer->yy_ch_buf; | |
2005 | register char *source = yytext_ptr; | |
2006 | register int number_to_move, i; | |
2007 | int ret_val; | |
2008 | ||
2009 | if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) | |
2010 | YY_FATAL_ERROR( | |
2011 | "fatal flex scanner internal error--end of buffer missed" ); | |
2012 | ||
2013 | if ( yy_current_buffer->yy_fill_buffer == 0 ) | |
2014 | { /* Don't try to fill the buffer, so this is an EOF. */ | |
2015 | if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) | |
2016 | { | |
2017 | /* We matched a single character, the EOB, so | |
2018 | * treat this as a final EOF. | |
2019 | */ | |
2020 | return EOB_ACT_END_OF_FILE; | |
2021 | } | |
2022 | ||
2023 | else | |
2024 | { | |
2025 | /* We matched some text prior to the EOB, first | |
2026 | * process it. | |
2027 | */ | |
2028 | return EOB_ACT_LAST_MATCH; | |
2029 | } | |
2030 | } | |
2031 | ||
2032 | /* Try to read more data. */ | |
2033 | ||
2034 | /* First move last chars to start of buffer. */ | |
2035 | number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; | |
2036 | ||
2037 | for ( i = 0; i < number_to_move; ++i ) | |
2038 | *(dest++) = *(source++); | |
2039 | ||
2040 | if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) | |
2041 | /* don't do the read, it's not guaranteed to return an EOF, | |
2042 | * just force an EOF | |
2043 | */ | |
2044 | yy_current_buffer->yy_n_chars = yy_n_chars = 0; | |
2045 | ||
2046 | else | |
2047 | { | |
2048 | int num_to_read = | |
2049 | yy_current_buffer->yy_buf_size - number_to_move - 1; | |
2050 | ||
2051 | while ( num_to_read <= 0 ) | |
2052 | { /* Not enough room in the buffer - grow it. */ | |
2053 | #ifdef YY_USES_REJECT | |
2054 | YY_FATAL_ERROR( | |
2055 | "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); | |
2056 | #else | |
2057 | ||
2058 | /* just a shorter name for the current buffer */ | |
2059 | YY_BUFFER_STATE b = yy_current_buffer; | |
2060 | ||
2061 | int yy_c_buf_p_offset = | |
2062 | (int) (yy_c_buf_p - b->yy_ch_buf); | |
2063 | ||
2064 | if ( b->yy_is_our_buffer ) | |
2065 | { | |
2066 | int new_size = b->yy_buf_size * 2; | |
2067 | ||
2068 | if ( new_size <= 0 ) | |
2069 | b->yy_buf_size += b->yy_buf_size / 8; | |
2070 | else | |
2071 | b->yy_buf_size *= 2; | |
2072 | ||
2073 | b->yy_ch_buf = (char *) | |
2074 | /* Include room in for 2 EOB chars. */ | |
2075 | yy_flex_realloc( (void *) b->yy_ch_buf, | |
2076 | b->yy_buf_size + 2 ); | |
2077 | } | |
2078 | else | |
2079 | /* Can't grow it, we don't own it. */ | |
2080 | b->yy_ch_buf = 0; | |
2081 | ||
2082 | if ( ! b->yy_ch_buf ) | |
2083 | YY_FATAL_ERROR( | |
2084 | "fatal error - scanner input buffer overflow" ); | |
2085 | ||
2086 | yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; | |
2087 | ||
2088 | num_to_read = yy_current_buffer->yy_buf_size - | |
2089 | number_to_move - 1; | |
2090 | #endif | |
2091 | } | |
2092 | ||
2093 | if ( num_to_read > YY_READ_BUF_SIZE ) | |
2094 | num_to_read = YY_READ_BUF_SIZE; | |
2095 | ||
2096 | /* Read in more data. */ | |
2097 | YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), | |
2098 | yy_n_chars, num_to_read ); | |
2099 | ||
2100 | yy_current_buffer->yy_n_chars = yy_n_chars; | |
2101 | } | |
2102 | ||
2103 | if ( yy_n_chars == 0 ) | |
2104 | { | |
2105 | if ( number_to_move == YY_MORE_ADJ ) | |
2106 | { | |
2107 | ret_val = EOB_ACT_END_OF_FILE; | |
2108 | yyrestart( yyin ); | |
2109 | } | |
2110 | ||
2111 | else | |
2112 | { | |
2113 | ret_val = EOB_ACT_LAST_MATCH; | |
2114 | yy_current_buffer->yy_buffer_status = | |
2115 | YY_BUFFER_EOF_PENDING; | |
2116 | } | |
2117 | } | |
2118 | ||
2119 | else | |
2120 | ret_val = EOB_ACT_CONTINUE_SCAN; | |
2121 | ||
2122 | yy_n_chars += number_to_move; | |
2123 | yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; | |
2124 | yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; | |
2125 | ||
2126 | yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; | |
2127 | ||
2128 | return ret_val; | |
2129 | } | |
2130 | ||
2131 | ||
2132 | /* yy_get_previous_state - get the state just before the EOB char was reached */ | |
2133 | ||
2134 | static yy_state_type yy_get_previous_state() | |
2135 | { | |
2136 | register yy_state_type yy_current_state; | |
2137 | register char *yy_cp; | |
2138 | ||
2139 | yy_current_state = yy_start; | |
2140 | ||
2141 | for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) | |
2142 | { | |
2143 | register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); | |
2144 | if ( yy_accept[yy_current_state] ) | |
2145 | { | |
2146 | yy_last_accepting_state = yy_current_state; | |
2147 | yy_last_accepting_cpos = yy_cp; | |
2148 | } | |
2149 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | |
2150 | { | |
2151 | yy_current_state = (int) yy_def[yy_current_state]; | |
676385e2 | 2152 | if ( yy_current_state >= 380 ) |
e9955c83 AD |
2153 | yy_c = yy_meta[(unsigned int) yy_c]; |
2154 | } | |
2155 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | |
2156 | } | |
2157 | ||
2158 | return yy_current_state; | |
2159 | } | |
2160 | ||
2161 | ||
2162 | /* yy_try_NUL_trans - try to make a transition on the NUL character | |
2163 | * | |
2164 | * synopsis | |
2165 | * next_state = yy_try_NUL_trans( current_state ); | |
2166 | */ | |
2167 | ||
2168 | #ifdef YY_USE_PROTOS | |
2169 | static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) | |
2170 | #else | |
2171 | static yy_state_type yy_try_NUL_trans( yy_current_state ) | |
2172 | yy_state_type yy_current_state; | |
2173 | #endif | |
2174 | { | |
2175 | register int yy_is_jam; | |
2176 | register char *yy_cp = yy_c_buf_p; | |
2177 | ||
2178 | register YY_CHAR yy_c = 1; | |
2179 | if ( yy_accept[yy_current_state] ) | |
2180 | { | |
2181 | yy_last_accepting_state = yy_current_state; | |
2182 | yy_last_accepting_cpos = yy_cp; | |
2183 | } | |
2184 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | |
2185 | { | |
2186 | yy_current_state = (int) yy_def[yy_current_state]; | |
676385e2 | 2187 | if ( yy_current_state >= 380 ) |
e9955c83 AD |
2188 | yy_c = yy_meta[(unsigned int) yy_c]; |
2189 | } | |
2190 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | |
676385e2 | 2191 | yy_is_jam = (yy_current_state == 379); |
e9955c83 AD |
2192 | |
2193 | return yy_is_jam ? 0 : yy_current_state; | |
2194 | } | |
2195 | ||
2196 | ||
2197 | #ifndef YY_NO_UNPUT | |
2198 | #ifdef YY_USE_PROTOS | |
2199 | static void yyunput( int c, register char *yy_bp ) | |
2200 | #else | |
2201 | static void yyunput( c, yy_bp ) | |
2202 | int c; | |
2203 | register char *yy_bp; | |
2204 | #endif | |
2205 | { | |
2206 | register char *yy_cp = yy_c_buf_p; | |
2207 | ||
2208 | /* undo effects of setting up yytext */ | |
2209 | *yy_cp = yy_hold_char; | |
2210 | ||
2211 | if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) | |
2212 | { /* need to shift things up to make room */ | |
2213 | /* +2 for EOB chars. */ | |
2214 | register int number_to_move = yy_n_chars + 2; | |
2215 | register char *dest = &yy_current_buffer->yy_ch_buf[ | |
2216 | yy_current_buffer->yy_buf_size + 2]; | |
2217 | register char *source = | |
2218 | &yy_current_buffer->yy_ch_buf[number_to_move]; | |
2219 | ||
2220 | while ( source > yy_current_buffer->yy_ch_buf ) | |
2221 | *--dest = *--source; | |
2222 | ||
2223 | yy_cp += (int) (dest - source); | |
2224 | yy_bp += (int) (dest - source); | |
2225 | yy_current_buffer->yy_n_chars = | |
2226 | yy_n_chars = yy_current_buffer->yy_buf_size; | |
2227 | ||
2228 | if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) | |
2229 | YY_FATAL_ERROR( "flex scanner push-back overflow" ); | |
2230 | } | |
2231 | ||
2232 | *--yy_cp = (char) c; | |
2233 | ||
2234 | ||
2235 | yytext_ptr = yy_bp; | |
2236 | yy_hold_char = *yy_cp; | |
2237 | yy_c_buf_p = yy_cp; | |
2238 | } | |
2239 | #endif /* ifndef YY_NO_UNPUT */ | |
2240 | ||
2241 | ||
2242 | #ifdef __cplusplus | |
2243 | static int yyinput() | |
2244 | #else | |
2245 | static int input() | |
2246 | #endif | |
2247 | { | |
2248 | int c; | |
2249 | ||
2250 | *yy_c_buf_p = yy_hold_char; | |
2251 | ||
2252 | if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) | |
2253 | { | |
2254 | /* yy_c_buf_p now points to the character we want to return. | |
2255 | * If this occurs *before* the EOB characters, then it's a | |
2256 | * valid NUL; if not, then we've hit the end of the buffer. | |
2257 | */ | |
2258 | if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) | |
2259 | /* This was really a NUL. */ | |
2260 | *yy_c_buf_p = '\0'; | |
2261 | ||
2262 | else | |
2263 | { /* need more input */ | |
2264 | int offset = yy_c_buf_p - yytext_ptr; | |
2265 | ++yy_c_buf_p; | |
2266 | ||
2267 | switch ( yy_get_next_buffer() ) | |
2268 | { | |
2269 | case EOB_ACT_LAST_MATCH: | |
2270 | /* This happens because yy_g_n_b() | |
2271 | * sees that we've accumulated a | |
2272 | * token and flags that we need to | |
2273 | * try matching the token before | |
2274 | * proceeding. But for input(), | |
2275 | * there's no matching to consider. | |
2276 | * So convert the EOB_ACT_LAST_MATCH | |
2277 | * to EOB_ACT_END_OF_FILE. | |
2278 | */ | |
2279 | ||
2280 | /* Reset buffer status. */ | |
2281 | yyrestart( yyin ); | |
2282 | ||
2283 | /* fall through */ | |
2284 | ||
2285 | case EOB_ACT_END_OF_FILE: | |
2286 | { | |
2287 | if ( yywrap() ) | |
2288 | return EOF; | |
2289 | ||
2290 | if ( ! yy_did_buffer_switch_on_eof ) | |
2291 | YY_NEW_FILE; | |
2292 | #ifdef __cplusplus | |
2293 | return yyinput(); | |
2294 | #else | |
2295 | return input(); | |
2296 | #endif | |
2297 | } | |
2298 | ||
2299 | case EOB_ACT_CONTINUE_SCAN: | |
2300 | yy_c_buf_p = yytext_ptr + offset; | |
2301 | break; | |
2302 | } | |
2303 | } | |
2304 | } | |
2305 | ||
2306 | c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ | |
2307 | *yy_c_buf_p = '\0'; /* preserve yytext */ | |
2308 | yy_hold_char = *++yy_c_buf_p; | |
2309 | ||
2310 | ||
2311 | return c; | |
2312 | } | |
2313 | ||
2314 | ||
2315 | #ifdef YY_USE_PROTOS | |
2316 | void yyrestart( FILE *input_file ) | |
2317 | #else | |
2318 | void yyrestart( input_file ) | |
2319 | FILE *input_file; | |
2320 | #endif | |
2321 | { | |
2322 | if ( ! yy_current_buffer ) | |
2323 | yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); | |
2324 | ||
2325 | yy_init_buffer( yy_current_buffer, input_file ); | |
2326 | yy_load_buffer_state(); | |
2327 | } | |
2328 | ||
2329 | ||
2330 | #ifdef YY_USE_PROTOS | |
2331 | void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) | |
2332 | #else | |
2333 | void yy_switch_to_buffer( new_buffer ) | |
2334 | YY_BUFFER_STATE new_buffer; | |
2335 | #endif | |
2336 | { | |
2337 | if ( yy_current_buffer == new_buffer ) | |
2338 | return; | |
2339 | ||
2340 | if ( yy_current_buffer ) | |
2341 | { | |
2342 | /* Flush out information for old buffer. */ | |
2343 | *yy_c_buf_p = yy_hold_char; | |
2344 | yy_current_buffer->yy_buf_pos = yy_c_buf_p; | |
2345 | yy_current_buffer->yy_n_chars = yy_n_chars; | |
2346 | } | |
2347 | ||
2348 | yy_current_buffer = new_buffer; | |
2349 | yy_load_buffer_state(); | |
2350 | ||
2351 | /* We don't actually know whether we did this switch during | |
2352 | * EOF (yywrap()) processing, but the only time this flag | |
2353 | * is looked at is after yywrap() is called, so it's safe | |
2354 | * to go ahead and always set it. | |
2355 | */ | |
2356 | yy_did_buffer_switch_on_eof = 1; | |
2357 | } | |
2358 | ||
2359 | ||
2360 | #ifdef YY_USE_PROTOS | |
2361 | void yy_load_buffer_state( void ) | |
2362 | #else | |
2363 | void yy_load_buffer_state() | |
2364 | #endif | |
2365 | { | |
2366 | yy_n_chars = yy_current_buffer->yy_n_chars; | |
2367 | yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; | |
2368 | yyin = yy_current_buffer->yy_input_file; | |
2369 | yy_hold_char = *yy_c_buf_p; | |
2370 | } | |
2371 | ||
2372 | ||
2373 | #ifdef YY_USE_PROTOS | |
2374 | YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) | |
2375 | #else | |
2376 | YY_BUFFER_STATE yy_create_buffer( file, size ) | |
2377 | FILE *file; | |
2378 | int size; | |
2379 | #endif | |
2380 | { | |
2381 | YY_BUFFER_STATE b; | |
2382 | ||
2383 | b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); | |
2384 | if ( ! b ) | |
2385 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); | |
2386 | ||
2387 | b->yy_buf_size = size; | |
2388 | ||
2389 | /* yy_ch_buf has to be 2 characters longer than the size given because | |
2390 | * we need to put in 2 end-of-buffer characters. | |
2391 | */ | |
2392 | b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); | |
2393 | if ( ! b->yy_ch_buf ) | |
2394 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); | |
2395 | ||
2396 | b->yy_is_our_buffer = 1; | |
2397 | ||
2398 | yy_init_buffer( b, file ); | |
2399 | ||
2400 | return b; | |
2401 | } | |
2402 | ||
2403 | ||
2404 | #ifdef YY_USE_PROTOS | |
2405 | void yy_delete_buffer( YY_BUFFER_STATE b ) | |
2406 | #else | |
2407 | void yy_delete_buffer( b ) | |
2408 | YY_BUFFER_STATE b; | |
2409 | #endif | |
2410 | { | |
2411 | if ( ! b ) | |
2412 | return; | |
2413 | ||
2414 | if ( b == yy_current_buffer ) | |
2415 | yy_current_buffer = (YY_BUFFER_STATE) 0; | |
2416 | ||
2417 | if ( b->yy_is_our_buffer ) | |
2418 | yy_flex_free( (void *) b->yy_ch_buf ); | |
2419 | ||
2420 | yy_flex_free( (void *) b ); | |
2421 | } | |
2422 | ||
2423 | ||
2424 | #ifndef YY_ALWAYS_INTERACTIVE | |
2425 | #ifndef YY_NEVER_INTERACTIVE | |
2426 | extern int isatty YY_PROTO(( int )); | |
2427 | #endif | |
2428 | #endif | |
2429 | ||
2430 | #ifdef YY_USE_PROTOS | |
2431 | void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) | |
2432 | #else | |
2433 | void yy_init_buffer( b, file ) | |
2434 | YY_BUFFER_STATE b; | |
2435 | FILE *file; | |
2436 | #endif | |
2437 | ||
2438 | ||
2439 | { | |
2440 | yy_flush_buffer( b ); | |
2441 | ||
2442 | b->yy_input_file = file; | |
2443 | b->yy_fill_buffer = 1; | |
2444 | ||
2445 | #if YY_ALWAYS_INTERACTIVE | |
2446 | b->yy_is_interactive = 1; | |
2447 | #else | |
2448 | #if YY_NEVER_INTERACTIVE | |
2449 | b->yy_is_interactive = 0; | |
2450 | #else | |
2451 | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; | |
2452 | #endif | |
2453 | #endif | |
2454 | } | |
2455 | ||
2456 | ||
2457 | #ifdef YY_USE_PROTOS | |
2458 | void yy_flush_buffer( YY_BUFFER_STATE b ) | |
2459 | #else | |
2460 | void yy_flush_buffer( b ) | |
2461 | YY_BUFFER_STATE b; | |
2462 | #endif | |
2463 | ||
2464 | { | |
2465 | if ( ! b ) | |
2466 | return; | |
2467 | ||
2468 | b->yy_n_chars = 0; | |
2469 | ||
2470 | /* We always need two end-of-buffer characters. The first causes | |
2471 | * a transition to the end-of-buffer state. The second causes | |
2472 | * a jam in that state. | |
2473 | */ | |
2474 | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; | |
2475 | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; | |
2476 | ||
2477 | b->yy_buf_pos = &b->yy_ch_buf[0]; | |
2478 | ||
2479 | b->yy_at_bol = 1; | |
2480 | b->yy_buffer_status = YY_BUFFER_NEW; | |
2481 | ||
2482 | if ( b == yy_current_buffer ) | |
2483 | yy_load_buffer_state(); | |
2484 | } | |
2485 | ||
2486 | ||
2487 | #ifndef YY_NO_SCAN_BUFFER | |
2488 | #ifdef YY_USE_PROTOS | |
2489 | YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) | |
2490 | #else | |
2491 | YY_BUFFER_STATE yy_scan_buffer( base, size ) | |
2492 | char *base; | |
2493 | yy_size_t size; | |
2494 | #endif | |
2495 | { | |
2496 | YY_BUFFER_STATE b; | |
2497 | ||
2498 | if ( size < 2 || | |
2499 | base[size-2] != YY_END_OF_BUFFER_CHAR || | |
2500 | base[size-1] != YY_END_OF_BUFFER_CHAR ) | |
2501 | /* They forgot to leave room for the EOB's. */ | |
2502 | return 0; | |
2503 | ||
2504 | b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); | |
2505 | if ( ! b ) | |
2506 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); | |
2507 | ||
2508 | b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ | |
2509 | b->yy_buf_pos = b->yy_ch_buf = base; | |
2510 | b->yy_is_our_buffer = 0; | |
2511 | b->yy_input_file = 0; | |
2512 | b->yy_n_chars = b->yy_buf_size; | |
2513 | b->yy_is_interactive = 0; | |
2514 | b->yy_at_bol = 1; | |
2515 | b->yy_fill_buffer = 0; | |
2516 | b->yy_buffer_status = YY_BUFFER_NEW; | |
2517 | ||
2518 | yy_switch_to_buffer( b ); | |
2519 | ||
2520 | return b; | |
2521 | } | |
2522 | #endif | |
2523 | ||
2524 | ||
2525 | #ifndef YY_NO_SCAN_STRING | |
2526 | #ifdef YY_USE_PROTOS | |
2527 | YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) | |
2528 | #else | |
2529 | YY_BUFFER_STATE yy_scan_string( yy_str ) | |
2530 | yyconst char *yy_str; | |
2531 | #endif | |
2532 | { | |
2533 | int len; | |
2534 | for ( len = 0; yy_str[len]; ++len ) | |
2535 | ; | |
2536 | ||
2537 | return yy_scan_bytes( yy_str, len ); | |
2538 | } | |
2539 | #endif | |
2540 | ||
2541 | ||
2542 | #ifndef YY_NO_SCAN_BYTES | |
2543 | #ifdef YY_USE_PROTOS | |
2544 | YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) | |
2545 | #else | |
2546 | YY_BUFFER_STATE yy_scan_bytes( bytes, len ) | |
2547 | yyconst char *bytes; | |
2548 | int len; | |
2549 | #endif | |
2550 | { | |
2551 | YY_BUFFER_STATE b; | |
2552 | char *buf; | |
2553 | yy_size_t n; | |
2554 | int i; | |
2555 | ||
2556 | /* Get memory for full buffer, including space for trailing EOB's. */ | |
2557 | n = len + 2; | |
2558 | buf = (char *) yy_flex_alloc( n ); | |
2559 | if ( ! buf ) | |
2560 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); | |
2561 | ||
2562 | for ( i = 0; i < len; ++i ) | |
2563 | buf[i] = bytes[i]; | |
2564 | ||
2565 | buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; | |
2566 | ||
2567 | b = yy_scan_buffer( buf, n ); | |
2568 | if ( ! b ) | |
2569 | YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); | |
2570 | ||
2571 | /* It's okay to grow etc. this buffer, and we should throw it | |
2572 | * away when we're done. | |
2573 | */ | |
2574 | b->yy_is_our_buffer = 1; | |
2575 | ||
2576 | return b; | |
2577 | } | |
2578 | #endif | |
2579 | ||
2580 | ||
2581 | #ifndef YY_NO_PUSH_STATE | |
2582 | #ifdef YY_USE_PROTOS | |
2583 | static void yy_push_state( int new_state ) | |
2584 | #else | |
2585 | static void yy_push_state( new_state ) | |
2586 | int new_state; | |
2587 | #endif | |
2588 | { | |
2589 | if ( yy_start_stack_ptr >= yy_start_stack_depth ) | |
2590 | { | |
2591 | yy_size_t new_size; | |
2592 | ||
2593 | yy_start_stack_depth += YY_START_STACK_INCR; | |
2594 | new_size = yy_start_stack_depth * sizeof( int ); | |
2595 | ||
2596 | if ( ! yy_start_stack ) | |
2597 | yy_start_stack = (int *) yy_flex_alloc( new_size ); | |
2598 | ||
2599 | else | |
2600 | yy_start_stack = (int *) yy_flex_realloc( | |
2601 | (void *) yy_start_stack, new_size ); | |
2602 | ||
2603 | if ( ! yy_start_stack ) | |
2604 | YY_FATAL_ERROR( | |
2605 | "out of memory expanding start-condition stack" ); | |
2606 | } | |
2607 | ||
2608 | yy_start_stack[yy_start_stack_ptr++] = YY_START; | |
2609 | ||
2610 | BEGIN(new_state); | |
2611 | } | |
2612 | #endif | |
2613 | ||
2614 | ||
2615 | #ifndef YY_NO_POP_STATE | |
2616 | static void yy_pop_state() | |
2617 | { | |
2618 | if ( --yy_start_stack_ptr < 0 ) | |
2619 | YY_FATAL_ERROR( "start-condition stack underflow" ); | |
2620 | ||
2621 | BEGIN(yy_start_stack[yy_start_stack_ptr]); | |
2622 | } | |
2623 | #endif | |
2624 | ||
2625 | ||
2626 | #ifndef YY_NO_TOP_STATE | |
2627 | static int yy_top_state() | |
2628 | { | |
2629 | return yy_start_stack[yy_start_stack_ptr - 1]; | |
2630 | } | |
2631 | #endif | |
2632 | ||
2633 | #ifndef YY_EXIT_FAILURE | |
2634 | #define YY_EXIT_FAILURE 2 | |
2635 | #endif | |
2636 | ||
2637 | #ifdef YY_USE_PROTOS | |
2638 | static void yy_fatal_error( yyconst char msg[] ) | |
2639 | #else | |
2640 | static void yy_fatal_error( msg ) | |
2641 | char msg[]; | |
2642 | #endif | |
2643 | { | |
2644 | (void) fprintf( stderr, "%s\n", msg ); | |
2645 | exit( YY_EXIT_FAILURE ); | |
2646 | } | |
2647 | ||
2648 | ||
2649 | ||
2650 | /* Redefine yyless() so it works in section 3 code. */ | |
2651 | ||
2652 | #undef yyless | |
2653 | #define yyless(n) \ | |
2654 | do \ | |
2655 | { \ | |
2656 | /* Undo effects of setting up yytext. */ \ | |
2657 | yytext[yyleng] = yy_hold_char; \ | |
2658 | yy_c_buf_p = yytext + n; \ | |
2659 | yy_hold_char = *yy_c_buf_p; \ | |
2660 | *yy_c_buf_p = '\0'; \ | |
2661 | yyleng = n; \ | |
2662 | } \ | |
2663 | while ( 0 ) | |
2664 | ||
2665 | ||
2666 | /* Internal utility routines. */ | |
2667 | ||
2668 | #ifndef yytext_ptr | |
2669 | #ifdef YY_USE_PROTOS | |
2670 | static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) | |
2671 | #else | |
2672 | static void yy_flex_strncpy( s1, s2, n ) | |
2673 | char *s1; | |
2674 | yyconst char *s2; | |
2675 | int n; | |
2676 | #endif | |
2677 | { | |
2678 | register int i; | |
2679 | for ( i = 0; i < n; ++i ) | |
2680 | s1[i] = s2[i]; | |
2681 | } | |
2682 | #endif | |
2683 | ||
2684 | #ifdef YY_NEED_STRLEN | |
2685 | #ifdef YY_USE_PROTOS | |
2686 | static int yy_flex_strlen( yyconst char *s ) | |
2687 | #else | |
2688 | static int yy_flex_strlen( s ) | |
2689 | yyconst char *s; | |
2690 | #endif | |
2691 | { | |
2692 | register int n; | |
2693 | for ( n = 0; s[n]; ++n ) | |
2694 | ; | |
2695 | ||
2696 | return n; | |
2697 | } | |
2698 | #endif | |
2699 | ||
2700 | ||
2701 | #ifdef YY_USE_PROTOS | |
2702 | static void *yy_flex_alloc( yy_size_t size ) | |
2703 | #else | |
2704 | static void *yy_flex_alloc( size ) | |
2705 | yy_size_t size; | |
2706 | #endif | |
2707 | { | |
2708 | return (void *) malloc( size ); | |
2709 | } | |
2710 | ||
2711 | #ifdef YY_USE_PROTOS | |
2712 | static void *yy_flex_realloc( void *ptr, yy_size_t size ) | |
2713 | #else | |
2714 | static void *yy_flex_realloc( ptr, size ) | |
2715 | void *ptr; | |
2716 | yy_size_t size; | |
2717 | #endif | |
2718 | { | |
2719 | /* The cast to (char *) in the following accommodates both | |
2720 | * implementations that use char* generic pointers, and those | |
2721 | * that use void* generic pointers. It works with the latter | |
2722 | * because both ANSI C and C++ allow castless assignment from | |
2723 | * any pointer type to void*, and deal with argument conversions | |
2724 | * as though doing an assignment. | |
2725 | */ | |
2726 | return (void *) realloc( (char *) ptr, size ); | |
2727 | } | |
2728 | ||
2729 | #ifdef YY_USE_PROTOS | |
2730 | static void yy_flex_free( void *ptr ) | |
2731 | #else | |
2732 | static void yy_flex_free( ptr ) | |
2733 | void *ptr; | |
2734 | #endif | |
2735 | { | |
2736 | free( ptr ); | |
2737 | } | |
2738 | ||
2739 | #if YY_MAIN | |
2740 | int main() | |
2741 | { | |
2742 | yylex(); | |
2743 | return 0; | |
2744 | } | |
2745 | #endif | |
676385e2 | 2746 | #line 528 "scan-gram.l" |
e9955c83 AD |
2747 | |
2748 | ||
2749 | /*------------------------------------------------------------------. | |
366eea36 | 2750 | | TEXT is pointing to a wannabee semantic value (i.e., a `$'). | |
e9955c83 AD |
2751 | | | |
2752 | | Possible inputs: $[<TYPENAME>]($|integer) | | |
2753 | | | | |
2754 | | Output to the STRING_OBSTACK a reference to this semantic value. | | |
2755 | `------------------------------------------------------------------*/ | |
2756 | ||
f25bfb75 | 2757 | static inline void |
366eea36 | 2758 | handle_action_dollar (char *text, location_t location) |
e9955c83 AD |
2759 | { |
2760 | const char *type_name = NULL; | |
366eea36 | 2761 | char *cp = text + 1; |
e9955c83 AD |
2762 | |
2763 | /* Get the type name if explicit. */ | |
2764 | if (*cp == '<') | |
2765 | { | |
2766 | type_name = ++cp; | |
2767 | while (*cp != '>') | |
2768 | ++cp; | |
2769 | *cp = '\0'; | |
2770 | ++cp; | |
2771 | } | |
2772 | ||
2773 | if (*cp == '$') | |
2774 | { | |
2775 | if (!type_name) | |
56c47203 | 2776 | type_name = symbol_list_n_type_name_get (current_rule, location, 0); |
e9955c83 | 2777 | if (!type_name && typed) |
56c47203 | 2778 | complain_at (location, _("$$ of `%s' has no declared type"), |
4f25ebb0 | 2779 | symbol_tag_get (current_rule->sym)); |
e9955c83 AD |
2780 | if (!type_name) |
2781 | type_name = ""; | |
2782 | obstack_fgrow1 (&string_obstack, | |
2783 | "]b4_lhs_value([%s])[", type_name); | |
2784 | } | |
2785 | else if (isdigit (*cp) || *cp == '-') | |
2786 | { | |
dafdc66f AD |
2787 | /* RULE_LENGTH is the number of values in the current rule so |
2788 | far, which says where to find `$0' with respect to the top of | |
2789 | the stack. It is not the same as the rule->length in the | |
2790 | case of mid rule actions. */ | |
2791 | int rule_length = symbol_list_length (current_rule->next); | |
e9955c83 AD |
2792 | int n = strtol (cp, &cp, 10); |
2793 | ||
2794 | if (n > rule_length) | |
56c47203 | 2795 | complain_at (location, _("invalid value: %s%d"), "$", n); |
e9955c83 AD |
2796 | else |
2797 | { | |
2798 | if (!type_name && n > 0) | |
56c47203 AD |
2799 | type_name = symbol_list_n_type_name_get (current_rule, location, |
2800 | n); | |
e9955c83 | 2801 | if (!type_name && typed) |
56c47203 | 2802 | complain_at (location, _("$%d of `%s' has no declared type"), |
4f25ebb0 | 2803 | n, symbol_tag_get (current_rule->sym)); |
e9955c83 AD |
2804 | if (!type_name) |
2805 | type_name = ""; | |
2806 | obstack_fgrow3 (&string_obstack, | |
2807 | "]b4_rhs_value([%d], [%d], [%s])[", | |
2808 | rule_length, n, type_name); | |
2809 | } | |
2810 | } | |
2811 | else | |
2812 | { | |
366eea36 | 2813 | complain_at (location, _("%s is invalid"), quote (text)); |
9280d3ef AD |
2814 | } |
2815 | } | |
2816 | ||
2817 | ||
366eea36 AD |
2818 | /*---------------------------------------------------------------. |
2819 | | TEXT is expexted tp be $$ in some code associated to a symbol: | | |
2820 | | destructor or printer. | | |
2821 | `---------------------------------------------------------------*/ | |
9280d3ef | 2822 | |
f25bfb75 | 2823 | static inline void |
366eea36 | 2824 | handle_symbol_code_dollar (char *text, location_t location) |
9280d3ef | 2825 | { |
366eea36 | 2826 | char *cp = text + 1; |
9280d3ef | 2827 | if (*cp == '$') |
366eea36 | 2828 | obstack_sgrow (&string_obstack, "]b4_dollar_dollar["); |
9280d3ef | 2829 | else |
366eea36 | 2830 | complain_at (location, _("%s is invalid"), quote (text)); |
e9955c83 AD |
2831 | } |
2832 | ||
f25bfb75 AD |
2833 | |
2834 | /*-----------------------------------------------------------------. | |
2835 | | Dispatch onto handle_action_dollar, or handle_destructor_dollar, | | |
2836 | | depending upon CODE_KIND. | | |
2837 | `-----------------------------------------------------------------*/ | |
e9955c83 AD |
2838 | |
2839 | static void | |
f25bfb75 AD |
2840 | handle_dollar (braced_code_t braced_code_kind, |
2841 | char *text, location_t location) | |
2842 | { | |
2843 | switch (braced_code_kind) | |
2844 | { | |
2845 | case action_braced_code: | |
2846 | handle_action_dollar (text, location); | |
2847 | break; | |
2848 | ||
2849 | case destructor_braced_code: | |
366eea36 AD |
2850 | case printer_braced_code: |
2851 | handle_symbol_code_dollar (text, location); | |
f25bfb75 AD |
2852 | break; |
2853 | } | |
2854 | } | |
2855 | ||
2856 | ||
2857 | /*------------------------------------------------------. | |
2858 | | TEXT is a location token (i.e., a `@...'). Output to | | |
2859 | | STRING_OBSTACK a reference to this location. | | |
2860 | `------------------------------------------------------*/ | |
2861 | ||
2862 | static inline void | |
2863 | handle_action_at (char *text, location_t location) | |
e9955c83 | 2864 | { |
366eea36 | 2865 | char *cp = text + 1; |
e9955c83 | 2866 | locations_flag = 1; |
e9955c83 | 2867 | |
366eea36 | 2868 | if (*cp == '$') |
e9955c83 AD |
2869 | { |
2870 | obstack_sgrow (&string_obstack, "]b4_lhs_location["); | |
2871 | } | |
366eea36 | 2872 | else if (isdigit (*cp) || *cp == '-') |
e9955c83 | 2873 | { |
dafdc66f AD |
2874 | /* RULE_LENGTH is the number of values in the current rule so |
2875 | far, which says where to find `$0' with respect to the top of | |
2876 | the stack. It is not the same as the rule->length in the | |
2877 | case of mid rule actions. */ | |
2878 | int rule_length = symbol_list_length (current_rule->next); | |
366eea36 | 2879 | int n = strtol (cp, &cp, 10); |
dafdc66f | 2880 | |
e9955c83 | 2881 | if (n > rule_length) |
f25bfb75 | 2882 | complain_at (location, _("invalid value: %s%d"), "@", n); |
e9955c83 AD |
2883 | else |
2884 | obstack_fgrow2 (&string_obstack, "]b4_rhs_location([%d], [%d])[", | |
2885 | rule_length, n); | |
2886 | } | |
2887 | else | |
2888 | { | |
366eea36 | 2889 | complain_at (location, _("%s is invalid"), quote (text)); |
f25bfb75 AD |
2890 | } |
2891 | } | |
2892 | ||
2893 | ||
366eea36 AD |
2894 | /*---------------------------------------------------------------. |
2895 | | TEXT is expexted tp be @$ in some code associated to a symbol: | | |
2896 | | destructor or printer. | | |
2897 | `---------------------------------------------------------------*/ | |
f25bfb75 AD |
2898 | |
2899 | static inline void | |
366eea36 | 2900 | handle_symbol_code_at (char *text, location_t location) |
f25bfb75 | 2901 | { |
366eea36 AD |
2902 | char *cp = text + 1; |
2903 | if (*cp == '$') | |
2904 | obstack_sgrow (&string_obstack, "]b4_at_dollar["); | |
f25bfb75 | 2905 | else |
366eea36 | 2906 | complain_at (location, _("%s is invalid"), quote (text)); |
e9955c83 | 2907 | } |
4cdb01db | 2908 | |
f25bfb75 AD |
2909 | |
2910 | /*-------------------------------------------------------------------. | |
2911 | | Dispatch onto handle_action_at, or handle_destructor_at, depending | | |
2912 | | upon CODE_KIND. | | |
2913 | `-------------------------------------------------------------------*/ | |
2914 | ||
2915 | static void | |
2916 | handle_at (braced_code_t braced_code_kind, | |
2917 | char *text, location_t location) | |
2918 | { | |
2919 | switch (braced_code_kind) | |
2920 | { | |
2921 | case action_braced_code: | |
2922 | handle_action_at (text, location); | |
2923 | break; | |
2924 | ||
2925 | case destructor_braced_code: | |
366eea36 AD |
2926 | case printer_braced_code: |
2927 | handle_symbol_code_at (text, location); | |
f25bfb75 AD |
2928 | break; |
2929 | } | |
2930 | } | |
2931 | ||
2932 | ||
2933 | /*-------------------------. | |
2934 | | Initialize the scanner. | | |
2935 | `-------------------------*/ | |
2936 | ||
1d6412ad AD |
2937 | void |
2938 | scanner_initialize (void) | |
2939 | { | |
2940 | obstack_init (&string_obstack); | |
2941 | } | |
2942 | ||
2943 | ||
f25bfb75 AD |
2944 | /*-----------------------------------------------. |
2945 | | Free all the memory allocated to the scanner. | | |
2946 | `-----------------------------------------------*/ | |
2947 | ||
4cdb01db AD |
2948 | void |
2949 | scanner_free (void) | |
2950 | { | |
2951 | obstack_free (&string_obstack, 0); | |
2952 | } |