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