7 |
|
|
8 |
#define yy_create_buffer typ__create_buffer |
#define yy_create_buffer typ__create_buffer |
9 |
#define yy_delete_buffer typ__delete_buffer |
#define yy_delete_buffer typ__delete_buffer |
10 |
#define yy_flex_debug typ__flex_debug |
#define yy_scan_buffer typ__scan_buffer |
11 |
|
#define yy_scan_string typ__scan_string |
12 |
|
#define yy_scan_bytes typ__scan_bytes |
13 |
#define yy_init_buffer typ__init_buffer |
#define yy_init_buffer typ__init_buffer |
14 |
#define yy_flush_buffer typ__flush_buffer |
#define yy_flush_buffer typ__flush_buffer |
15 |
#define yy_load_buffer_state typ__load_buffer_state |
#define yy_load_buffer_state typ__load_buffer_state |
16 |
#define yy_switch_to_buffer typ__switch_to_buffer |
#define yy_switch_to_buffer typ__switch_to_buffer |
17 |
|
#define yypush_buffer_state typ_push_buffer_state |
18 |
|
#define yypop_buffer_state typ_pop_buffer_state |
19 |
|
#define yyensure_buffer_stack typ_ensure_buffer_stack |
20 |
|
#define yy_flex_debug typ__flex_debug |
21 |
#define yyin typ_in |
#define yyin typ_in |
22 |
#define yyleng typ_leng |
#define yyleng typ_leng |
23 |
#define yylex typ_lex |
#define yylex typ_lex |
32 |
|
|
33 |
#define FLEX_SCANNER |
#define FLEX_SCANNER |
34 |
#define YY_FLEX_MAJOR_VERSION 2 |
#define YY_FLEX_MAJOR_VERSION 2 |
35 |
#define YY_FLEX_MINOR_VERSION 5 |
#define YY_FLEX_MINOR_VERSION 6 |
36 |
#define YY_FLEX_SUBMINOR_VERSION 33 |
#define YY_FLEX_SUBMINOR_VERSION 4 |
37 |
#if YY_FLEX_SUBMINOR_VERSION > 0 |
#if YY_FLEX_SUBMINOR_VERSION > 0 |
38 |
#define FLEX_BETA |
#define FLEX_BETA |
39 |
#endif |
#endif |
40 |
|
|
41 |
|
#ifdef yy_create_buffer |
42 |
|
#define typ__create_buffer_ALREADY_DEFINED |
43 |
|
#else |
44 |
|
#define yy_create_buffer typ__create_buffer |
45 |
|
#endif |
46 |
|
|
47 |
|
#ifdef yy_delete_buffer |
48 |
|
#define typ__delete_buffer_ALREADY_DEFINED |
49 |
|
#else |
50 |
|
#define yy_delete_buffer typ__delete_buffer |
51 |
|
#endif |
52 |
|
|
53 |
|
#ifdef yy_scan_buffer |
54 |
|
#define typ__scan_buffer_ALREADY_DEFINED |
55 |
|
#else |
56 |
|
#define yy_scan_buffer typ__scan_buffer |
57 |
|
#endif |
58 |
|
|
59 |
|
#ifdef yy_scan_string |
60 |
|
#define typ__scan_string_ALREADY_DEFINED |
61 |
|
#else |
62 |
|
#define yy_scan_string typ__scan_string |
63 |
|
#endif |
64 |
|
|
65 |
|
#ifdef yy_scan_bytes |
66 |
|
#define typ__scan_bytes_ALREADY_DEFINED |
67 |
|
#else |
68 |
|
#define yy_scan_bytes typ__scan_bytes |
69 |
|
#endif |
70 |
|
|
71 |
|
#ifdef yy_init_buffer |
72 |
|
#define typ__init_buffer_ALREADY_DEFINED |
73 |
|
#else |
74 |
|
#define yy_init_buffer typ__init_buffer |
75 |
|
#endif |
76 |
|
|
77 |
|
#ifdef yy_flush_buffer |
78 |
|
#define typ__flush_buffer_ALREADY_DEFINED |
79 |
|
#else |
80 |
|
#define yy_flush_buffer typ__flush_buffer |
81 |
|
#endif |
82 |
|
|
83 |
|
#ifdef yy_load_buffer_state |
84 |
|
#define typ__load_buffer_state_ALREADY_DEFINED |
85 |
|
#else |
86 |
|
#define yy_load_buffer_state typ__load_buffer_state |
87 |
|
#endif |
88 |
|
|
89 |
|
#ifdef yy_switch_to_buffer |
90 |
|
#define typ__switch_to_buffer_ALREADY_DEFINED |
91 |
|
#else |
92 |
|
#define yy_switch_to_buffer typ__switch_to_buffer |
93 |
|
#endif |
94 |
|
|
95 |
|
#ifdef yypush_buffer_state |
96 |
|
#define typ_push_buffer_state_ALREADY_DEFINED |
97 |
|
#else |
98 |
|
#define yypush_buffer_state typ_push_buffer_state |
99 |
|
#endif |
100 |
|
|
101 |
|
#ifdef yypop_buffer_state |
102 |
|
#define typ_pop_buffer_state_ALREADY_DEFINED |
103 |
|
#else |
104 |
|
#define yypop_buffer_state typ_pop_buffer_state |
105 |
|
#endif |
106 |
|
|
107 |
|
#ifdef yyensure_buffer_stack |
108 |
|
#define typ_ensure_buffer_stack_ALREADY_DEFINED |
109 |
|
#else |
110 |
|
#define yyensure_buffer_stack typ_ensure_buffer_stack |
111 |
|
#endif |
112 |
|
|
113 |
|
#ifdef yylex |
114 |
|
#define typ_lex_ALREADY_DEFINED |
115 |
|
#else |
116 |
|
#define yylex typ_lex |
117 |
|
#endif |
118 |
|
|
119 |
|
#ifdef yyrestart |
120 |
|
#define typ_restart_ALREADY_DEFINED |
121 |
|
#else |
122 |
|
#define yyrestart typ_restart |
123 |
|
#endif |
124 |
|
|
125 |
|
#ifdef yylex_init |
126 |
|
#define typ_lex_init_ALREADY_DEFINED |
127 |
|
#else |
128 |
|
#define yylex_init typ_lex_init |
129 |
|
#endif |
130 |
|
|
131 |
|
#ifdef yylex_init_extra |
132 |
|
#define typ_lex_init_extra_ALREADY_DEFINED |
133 |
|
#else |
134 |
|
#define yylex_init_extra typ_lex_init_extra |
135 |
|
#endif |
136 |
|
|
137 |
|
#ifdef yylex_destroy |
138 |
|
#define typ_lex_destroy_ALREADY_DEFINED |
139 |
|
#else |
140 |
|
#define yylex_destroy typ_lex_destroy |
141 |
|
#endif |
142 |
|
|
143 |
|
#ifdef yyget_debug |
144 |
|
#define typ_get_debug_ALREADY_DEFINED |
145 |
|
#else |
146 |
|
#define yyget_debug typ_get_debug |
147 |
|
#endif |
148 |
|
|
149 |
|
#ifdef yyset_debug |
150 |
|
#define typ_set_debug_ALREADY_DEFINED |
151 |
|
#else |
152 |
|
#define yyset_debug typ_set_debug |
153 |
|
#endif |
154 |
|
|
155 |
|
#ifdef yyget_extra |
156 |
|
#define typ_get_extra_ALREADY_DEFINED |
157 |
|
#else |
158 |
|
#define yyget_extra typ_get_extra |
159 |
|
#endif |
160 |
|
|
161 |
|
#ifdef yyset_extra |
162 |
|
#define typ_set_extra_ALREADY_DEFINED |
163 |
|
#else |
164 |
|
#define yyset_extra typ_set_extra |
165 |
|
#endif |
166 |
|
|
167 |
|
#ifdef yyget_in |
168 |
|
#define typ_get_in_ALREADY_DEFINED |
169 |
|
#else |
170 |
|
#define yyget_in typ_get_in |
171 |
|
#endif |
172 |
|
|
173 |
|
#ifdef yyset_in |
174 |
|
#define typ_set_in_ALREADY_DEFINED |
175 |
|
#else |
176 |
|
#define yyset_in typ_set_in |
177 |
|
#endif |
178 |
|
|
179 |
|
#ifdef yyget_out |
180 |
|
#define typ_get_out_ALREADY_DEFINED |
181 |
|
#else |
182 |
|
#define yyget_out typ_get_out |
183 |
|
#endif |
184 |
|
|
185 |
|
#ifdef yyset_out |
186 |
|
#define typ_set_out_ALREADY_DEFINED |
187 |
|
#else |
188 |
|
#define yyset_out typ_set_out |
189 |
|
#endif |
190 |
|
|
191 |
|
#ifdef yyget_leng |
192 |
|
#define typ_get_leng_ALREADY_DEFINED |
193 |
|
#else |
194 |
|
#define yyget_leng typ_get_leng |
195 |
|
#endif |
196 |
|
|
197 |
|
#ifdef yyget_text |
198 |
|
#define typ_get_text_ALREADY_DEFINED |
199 |
|
#else |
200 |
|
#define yyget_text typ_get_text |
201 |
|
#endif |
202 |
|
|
203 |
|
#ifdef yyget_lineno |
204 |
|
#define typ_get_lineno_ALREADY_DEFINED |
205 |
|
#else |
206 |
|
#define yyget_lineno typ_get_lineno |
207 |
|
#endif |
208 |
|
|
209 |
|
#ifdef yyset_lineno |
210 |
|
#define typ_set_lineno_ALREADY_DEFINED |
211 |
|
#else |
212 |
|
#define yyset_lineno typ_set_lineno |
213 |
|
#endif |
214 |
|
|
215 |
|
#ifdef yywrap |
216 |
|
#define typ_wrap_ALREADY_DEFINED |
217 |
|
#else |
218 |
|
#define yywrap typ_wrap |
219 |
|
#endif |
220 |
|
|
221 |
|
#ifdef yyalloc |
222 |
|
#define typ_alloc_ALREADY_DEFINED |
223 |
|
#else |
224 |
|
#define yyalloc typ_alloc |
225 |
|
#endif |
226 |
|
|
227 |
|
#ifdef yyrealloc |
228 |
|
#define typ_realloc_ALREADY_DEFINED |
229 |
|
#else |
230 |
|
#define yyrealloc typ_realloc |
231 |
|
#endif |
232 |
|
|
233 |
|
#ifdef yyfree |
234 |
|
#define typ_free_ALREADY_DEFINED |
235 |
|
#else |
236 |
|
#define yyfree typ_free |
237 |
|
#endif |
238 |
|
|
239 |
|
#ifdef yytext |
240 |
|
#define typ_text_ALREADY_DEFINED |
241 |
|
#else |
242 |
|
#define yytext typ_text |
243 |
|
#endif |
244 |
|
|
245 |
|
#ifdef yyleng |
246 |
|
#define typ_leng_ALREADY_DEFINED |
247 |
|
#else |
248 |
|
#define yyleng typ_leng |
249 |
|
#endif |
250 |
|
|
251 |
|
#ifdef yyin |
252 |
|
#define typ_in_ALREADY_DEFINED |
253 |
|
#else |
254 |
|
#define yyin typ_in |
255 |
|
#endif |
256 |
|
|
257 |
|
#ifdef yyout |
258 |
|
#define typ_out_ALREADY_DEFINED |
259 |
|
#else |
260 |
|
#define yyout typ_out |
261 |
|
#endif |
262 |
|
|
263 |
|
#ifdef yy_flex_debug |
264 |
|
#define typ__flex_debug_ALREADY_DEFINED |
265 |
|
#else |
266 |
|
#define yy_flex_debug typ__flex_debug |
267 |
|
#endif |
268 |
|
|
269 |
|
#ifdef yylineno |
270 |
|
#define typ_lineno_ALREADY_DEFINED |
271 |
|
#else |
272 |
|
#define yylineno typ_lineno |
273 |
|
#endif |
274 |
|
|
275 |
/* First, we deal with platform-specific or compiler-specific issues. */ |
/* First, we deal with platform-specific or compiler-specific issues. */ |
276 |
|
|
277 |
/* begin standard C headers. */ |
/* begin standard C headers. */ |
289 |
|
|
290 |
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
291 |
|
|
292 |
#if __STDC_VERSION__ >= 199901L |
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
293 |
|
|
294 |
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
295 |
* if you want the limit (max/min) macros for int types. |
* if you want the limit (max/min) macros for int types. |
296 |
*/ |
*/ |
297 |
#ifndef __STDC_LIMIT_MACROS |
#ifndef __STDC_LIMIT_MACROS |
298 |
#define __STDC_LIMIT_MACROS 1 |
#define __STDC_LIMIT_MACROS 1 |
309 |
typedef signed char flex_int8_t; |
typedef signed char flex_int8_t; |
310 |
typedef short int flex_int16_t; |
typedef short int flex_int16_t; |
311 |
typedef int flex_int32_t; |
typedef int flex_int32_t; |
312 |
typedef unsigned char flex_uint8_t; |
typedef unsigned char flex_uint8_t; |
313 |
typedef unsigned short int flex_uint16_t; |
typedef unsigned short int flex_uint16_t; |
314 |
typedef unsigned int flex_uint32_t; |
typedef unsigned int flex_uint32_t; |
|
#endif /* ! C99 */ |
|
315 |
|
|
316 |
/* Limits of integral types. */ |
/* Limits of integral types. */ |
317 |
#ifndef INT8_MIN |
#ifndef INT8_MIN |
342 |
#define UINT32_MAX (4294967295U) |
#define UINT32_MAX (4294967295U) |
343 |
#endif |
#endif |
344 |
|
|
345 |
#endif /* ! FLEXINT_H */ |
#ifndef SIZE_MAX |
346 |
|
#define SIZE_MAX (~(size_t)0) |
347 |
#ifdef __cplusplus |
#endif |
|
|
|
|
/* The "const" storage-class-modifier is valid. */ |
|
|
#define YY_USE_CONST |
|
|
|
|
|
#else /* ! __cplusplus */ |
|
348 |
|
|
349 |
#if __STDC__ |
#endif /* ! C99 */ |
350 |
|
|
351 |
#define YY_USE_CONST |
#endif /* ! FLEXINT_H */ |
352 |
|
|
353 |
#endif /* __STDC__ */ |
/* begin standard C++ headers. */ |
|
#endif /* ! __cplusplus */ |
|
354 |
|
|
355 |
#ifdef YY_USE_CONST |
/* TODO: this is always defined, so inline it */ |
356 |
#define yyconst const |
#define yyconst const |
357 |
|
|
358 |
|
#if defined(__GNUC__) && __GNUC__ >= 3 |
359 |
|
#define yynoreturn __attribute__((__noreturn__)) |
360 |
#else |
#else |
361 |
#define yyconst |
#define yynoreturn |
362 |
#endif |
#endif |
363 |
|
|
364 |
/* Returned upon end-of-file. */ |
/* Returned upon end-of-file. */ |
365 |
#define YY_NULL 0 |
#define YY_NULL 0 |
366 |
|
|
367 |
/* Promotes a possibly negative, possibly signed char to an unsigned |
/* Promotes a possibly negative, possibly signed char to an |
368 |
* integer for use as an array index. If the signed char is negative, |
* integer in range [0..255] for use as an array index. |
|
* we want to instead treat it as an 8-bit unsigned char, hence the |
|
|
* double cast. |
|
369 |
*/ |
*/ |
370 |
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) |
#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) |
371 |
|
|
372 |
/* Enter a start condition. This macro really ought to take a parameter, |
/* Enter a start condition. This macro really ought to take a parameter, |
373 |
* but we do it the disgusting crufty way forced on us by the ()-less |
* but we do it the disgusting crufty way forced on us by the ()-less |
374 |
* definition of BEGIN. |
* definition of BEGIN. |
375 |
*/ |
*/ |
376 |
#define BEGIN (yy_start) = 1 + 2 * |
#define BEGIN (yy_start) = 1 + 2 * |
|
|
|
377 |
/* Translate the current start state into a value that can be later handed |
/* Translate the current start state into a value that can be later handed |
378 |
* to BEGIN to return to the state. The YYSTATE alias is for lex |
* to BEGIN to return to the state. The YYSTATE alias is for lex |
379 |
* compatibility. |
* compatibility. |
380 |
*/ |
*/ |
381 |
#define YY_START (((yy_start) - 1) / 2) |
#define YY_START (((yy_start) - 1) / 2) |
382 |
#define YYSTATE YY_START |
#define YYSTATE YY_START |
|
|
|
383 |
/* Action number for EOF rule of a given start state. */ |
/* Action number for EOF rule of a given start state. */ |
384 |
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
|
|
|
385 |
/* Special action meaning "start processing a new file". */ |
/* Special action meaning "start processing a new file". */ |
386 |
#define YY_NEW_FILE typ_restart(typ_in ) |
#define YY_NEW_FILE yyrestart( yyin ) |
|
|
|
387 |
#define YY_END_OF_BUFFER_CHAR 0 |
#define YY_END_OF_BUFFER_CHAR 0 |
388 |
|
|
389 |
/* Size of default input buffer. */ |
/* Size of default input buffer. */ |
390 |
#ifndef YY_BUF_SIZE |
#ifndef YY_BUF_SIZE |
391 |
|
#ifdef __ia64__ |
392 |
|
/* On IA-64, the buffer size is 16k, not 8k. |
393 |
|
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. |
394 |
|
* Ditto for the __ia64__ case accordingly. |
395 |
|
*/ |
396 |
|
#define YY_BUF_SIZE 32768 |
397 |
|
#else |
398 |
#define YY_BUF_SIZE 16384 |
#define YY_BUF_SIZE 16384 |
399 |
|
#endif /* __ia64__ */ |
400 |
#endif |
#endif |
401 |
|
|
402 |
/* The state buf must be large enough to hold one state per character in the main buffer. |
/* The state buf must be large enough to hold one state per character in the main buffer. |
408 |
typedef struct yy_buffer_state *YY_BUFFER_STATE; |
typedef struct yy_buffer_state *YY_BUFFER_STATE; |
409 |
#endif |
#endif |
410 |
|
|
411 |
extern int typ_leng; |
#ifndef YY_TYPEDEF_YY_SIZE_T |
412 |
|
#define YY_TYPEDEF_YY_SIZE_T |
413 |
|
typedef size_t yy_size_t; |
414 |
|
#endif |
415 |
|
|
416 |
|
extern int yyleng; |
417 |
|
|
418 |
extern FILE *typ_in, *typ_out; |
extern FILE *yyin, *yyout; |
419 |
|
|
420 |
#define EOB_ACT_CONTINUE_SCAN 0 |
#define EOB_ACT_CONTINUE_SCAN 0 |
421 |
#define EOB_ACT_END_OF_FILE 1 |
#define EOB_ACT_END_OF_FILE 1 |
422 |
#define EOB_ACT_LAST_MATCH 2 |
#define EOB_ACT_LAST_MATCH 2 |
423 |
|
|
424 |
/* Note: We specifically omit the test for yy_rule_can_match_eol because it requires |
/* Note: We specifically omit the test for yy_rule_can_match_eol because it requires |
425 |
* access to the local variable yy_act. Since yyless() is a macro, it would break |
* access to the local variable yy_act. Since yyless() is a macro, it would break |
426 |
* existing scanners that call yyless() from OUTSIDE typ_lex. |
* existing scanners that call yyless() from OUTSIDE yylex. |
427 |
* One obvious solution it to make yy_act a global. I tried that, and saw |
* One obvious solution it to make yy_act a global. I tried that, and saw |
428 |
* a 5% performance hit in a non-typ_lineno scanner, because yy_act is |
* a 5% performance hit in a non-yylineno scanner, because yy_act is |
429 |
* normally declared as a register variable-- so it is not worth it. |
* normally declared as a register variable-- so it is not worth it. |
430 |
*/ |
*/ |
431 |
#define YY_LESS_LINENO(n) \ |
#define YY_LESS_LINENO(n) \ |
432 |
do { \ |
do { \ |
433 |
int yyl;\ |
int yyl;\ |
434 |
for ( yyl = n; yyl < typ_leng; ++yyl )\ |
for ( yyl = n; yyl < yyleng; ++yyl )\ |
435 |
if ( typ_text[yyl] == '\n' )\ |
if ( yytext[yyl] == '\n' )\ |
436 |
--typ_lineno;\ |
--yylineno;\ |
437 |
}while(0) |
}while(0) |
438 |
|
#define YY_LINENO_REWIND_TO(dst) \ |
439 |
|
do {\ |
440 |
|
const char *p;\ |
441 |
|
for ( p = yy_cp-1; p >= (dst); --p)\ |
442 |
|
if ( *p == '\n' )\ |
443 |
|
--yylineno;\ |
444 |
|
}while(0) |
445 |
|
|
446 |
/* Return all but the first "n" matched characters back to the input stream. */ |
/* Return all but the first "n" matched characters back to the input stream. */ |
447 |
#define yyless(n) \ |
#define yyless(n) \ |
448 |
do \ |
do \ |
449 |
{ \ |
{ \ |
450 |
/* Undo effects of setting up typ_text. */ \ |
/* Undo effects of setting up yytext. */ \ |
451 |
int yyless_macro_arg = (n); \ |
int yyless_macro_arg = (n); \ |
452 |
YY_LESS_LINENO(yyless_macro_arg);\ |
YY_LESS_LINENO(yyless_macro_arg);\ |
453 |
*yy_cp = (yy_hold_char); \ |
*yy_cp = (yy_hold_char); \ |
454 |
YY_RESTORE_YY_MORE_OFFSET \ |
YY_RESTORE_YY_MORE_OFFSET \ |
455 |
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
456 |
YY_DO_BEFORE_ACTION; /* set up typ_text again */ \ |
YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
457 |
} \ |
} \ |
458 |
while ( 0 ) |
while ( 0 ) |
|
|
|
459 |
#define unput(c) yyunput( c, (yytext_ptr) ) |
#define unput(c) yyunput( c, (yytext_ptr) ) |
460 |
|
|
|
/* The following is because we cannot portably get our hands on size_t |
|
|
* (without autoconf's help, which isn't available because we want |
|
|
* flex-generated scanners to compile on their own). |
|
|
*/ |
|
|
|
|
|
#ifndef YY_TYPEDEF_YY_SIZE_T |
|
|
#define YY_TYPEDEF_YY_SIZE_T |
|
|
typedef unsigned int yy_size_t; |
|
|
#endif |
|
|
|
|
461 |
#ifndef YY_STRUCT_YY_BUFFER_STATE |
#ifndef YY_STRUCT_YY_BUFFER_STATE |
462 |
#define YY_STRUCT_YY_BUFFER_STATE |
#define YY_STRUCT_YY_BUFFER_STATE |
463 |
struct yy_buffer_state |
struct yy_buffer_state |
470 |
/* Size of input buffer in bytes, not including room for EOB |
/* Size of input buffer in bytes, not including room for EOB |
471 |
* characters. |
* characters. |
472 |
*/ |
*/ |
473 |
yy_size_t yy_buf_size; |
int yy_buf_size; |
474 |
|
|
475 |
/* Number of characters read into yy_ch_buf, not including EOB |
/* Number of characters read into yy_ch_buf, not including EOB |
476 |
* characters. |
* characters. |
515 |
* possible backing-up. |
* possible backing-up. |
516 |
* |
* |
517 |
* When we actually see the EOF, we change the status to "new" |
* When we actually see the EOF, we change the status to "new" |
518 |
* (via typ_restart()), so that the user can continue scanning by |
* (via yyrestart()), so that the user can continue scanning by |
519 |
* just pointing typ_in at a new input file. |
* just pointing yyin at a new input file. |
520 |
*/ |
*/ |
521 |
#define YY_BUFFER_EOF_PENDING 2 |
#define YY_BUFFER_EOF_PENDING 2 |
522 |
|
|
526 |
/* Stack of input buffers. */ |
/* Stack of input buffers. */ |
527 |
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ |
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ |
528 |
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ |
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ |
529 |
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ |
static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ |
530 |
|
|
531 |
/* We provide macros for accessing buffer states in case in the |
/* We provide macros for accessing buffer states in case in the |
532 |
* future we want to put the buffer states in a more general |
* future we want to put the buffer states in a more general |
537 |
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ |
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ |
538 |
? (yy_buffer_stack)[(yy_buffer_stack_top)] \ |
? (yy_buffer_stack)[(yy_buffer_stack_top)] \ |
539 |
: NULL) |
: NULL) |
|
|
|
540 |
/* Same as previous macro, but useful when we know that the buffer stack is not |
/* Same as previous macro, but useful when we know that the buffer stack is not |
541 |
* NULL or when we need an lvalue. For internal use only. |
* NULL or when we need an lvalue. For internal use only. |
542 |
*/ |
*/ |
543 |
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
544 |
|
|
545 |
/* yy_hold_char holds the character lost when typ_text is formed. */ |
/* yy_hold_char holds the character lost when yytext is formed. */ |
546 |
static char yy_hold_char; |
static char yy_hold_char; |
547 |
static int yy_n_chars; /* number of characters read into yy_ch_buf */ |
static int yy_n_chars; /* number of characters read into yy_ch_buf */ |
548 |
int typ_leng; |
int yyleng; |
549 |
|
|
550 |
/* Points to current character in buffer. */ |
/* Points to current character in buffer. */ |
551 |
static char *yy_c_buf_p = (char *) 0; |
static char *yy_c_buf_p = NULL; |
552 |
static int yy_init = 0; /* whether we need to initialize */ |
static int yy_init = 0; /* whether we need to initialize */ |
553 |
static int yy_start = 0; /* start state number */ |
static int yy_start = 0; /* start state number */ |
554 |
|
|
555 |
/* Flag which is used to allow typ_wrap()'s to do buffer switches |
/* Flag which is used to allow yywrap()'s to do buffer switches |
556 |
* instead of setting up a fresh typ_in. A bit of a hack ... |
* instead of setting up a fresh yyin. A bit of a hack ... |
557 |
*/ |
*/ |
558 |
static int yy_did_buffer_switch_on_eof; |
static int yy_did_buffer_switch_on_eof; |
559 |
|
|
560 |
void typ_restart (FILE *input_file ); |
void yyrestart ( FILE *input_file ); |
561 |
void typ__switch_to_buffer (YY_BUFFER_STATE new_buffer ); |
void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); |
562 |
YY_BUFFER_STATE typ__create_buffer (FILE *file,int size ); |
YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); |
563 |
void typ__delete_buffer (YY_BUFFER_STATE b ); |
void yy_delete_buffer ( YY_BUFFER_STATE b ); |
564 |
void typ__flush_buffer (YY_BUFFER_STATE b ); |
void yy_flush_buffer ( YY_BUFFER_STATE b ); |
565 |
void typ_push_buffer_state (YY_BUFFER_STATE new_buffer ); |
void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); |
566 |
void typ_pop_buffer_state (void ); |
void yypop_buffer_state ( void ); |
567 |
|
|
568 |
static void typ_ensure_buffer_stack (void ); |
static void yyensure_buffer_stack ( void ); |
569 |
static void typ__load_buffer_state (void ); |
static void yy_load_buffer_state ( void ); |
570 |
static void typ__init_buffer (YY_BUFFER_STATE b,FILE *file ); |
static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); |
571 |
|
#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) |
572 |
#define YY_FLUSH_BUFFER typ__flush_buffer(YY_CURRENT_BUFFER ) |
|
573 |
|
YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); |
574 |
YY_BUFFER_STATE typ__scan_buffer (char *base,yy_size_t size ); |
YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); |
575 |
YY_BUFFER_STATE typ__scan_string (yyconst char *yy_str ); |
YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); |
576 |
YY_BUFFER_STATE typ__scan_bytes (yyconst char *bytes,int len ); |
|
577 |
|
void *yyalloc ( yy_size_t ); |
578 |
void *typ_alloc (yy_size_t ); |
void *yyrealloc ( void *, yy_size_t ); |
579 |
void *typ_realloc (void *,yy_size_t ); |
void yyfree ( void * ); |
|
void typ_free (void * ); |
|
|
|
|
|
#define yy_new_buffer typ__create_buffer |
|
580 |
|
|
581 |
|
#define yy_new_buffer yy_create_buffer |
582 |
#define yy_set_interactive(is_interactive) \ |
#define yy_set_interactive(is_interactive) \ |
583 |
{ \ |
{ \ |
584 |
if ( ! YY_CURRENT_BUFFER ){ \ |
if ( ! YY_CURRENT_BUFFER ){ \ |
585 |
typ_ensure_buffer_stack (); \ |
yyensure_buffer_stack (); \ |
586 |
YY_CURRENT_BUFFER_LVALUE = \ |
YY_CURRENT_BUFFER_LVALUE = \ |
587 |
typ__create_buffer(typ_in,YY_BUF_SIZE ); \ |
yy_create_buffer( yyin, YY_BUF_SIZE ); \ |
588 |
} \ |
} \ |
589 |
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
590 |
} |
} |
|
|
|
591 |
#define yy_set_bol(at_bol) \ |
#define yy_set_bol(at_bol) \ |
592 |
{ \ |
{ \ |
593 |
if ( ! YY_CURRENT_BUFFER ){\ |
if ( ! YY_CURRENT_BUFFER ){\ |
594 |
typ_ensure_buffer_stack (); \ |
yyensure_buffer_stack (); \ |
595 |
YY_CURRENT_BUFFER_LVALUE = \ |
YY_CURRENT_BUFFER_LVALUE = \ |
596 |
typ__create_buffer(typ_in,YY_BUF_SIZE ); \ |
yy_create_buffer( yyin, YY_BUF_SIZE ); \ |
597 |
} \ |
} \ |
598 |
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
599 |
} |
} |
|
|
|
600 |
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
601 |
|
|
602 |
/* Begin user sect3 */ |
/* Begin user sect3 */ |
603 |
|
typedef flex_uint8_t YY_CHAR; |
604 |
|
|
605 |
typedef unsigned char YY_CHAR; |
FILE *yyin = NULL, *yyout = NULL; |
|
|
|
|
FILE *typ_in = (FILE *) 0, *typ_out = (FILE *) 0; |
|
606 |
|
|
607 |
typedef int yy_state_type; |
typedef int yy_state_type; |
608 |
|
|
609 |
#define YY_FLEX_LEX_COMPAT |
#define YY_FLEX_LEX_COMPAT |
610 |
extern int typ_lineno; |
extern int yylineno; |
611 |
|
int yylineno = 1; |
|
int typ_lineno = 1; |
|
612 |
|
|
613 |
extern char typ_text[]; |
extern char yytext[]; |
614 |
|
|
615 |
static yy_state_type yy_get_previous_state (void ); |
static yy_state_type yy_get_previous_state ( void ); |
616 |
static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); |
static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); |
617 |
static int yy_get_next_buffer (void ); |
static int yy_get_next_buffer ( void ); |
618 |
static void yy_fatal_error (yyconst char msg[] ); |
static void yynoreturn yy_fatal_error ( const char* msg ); |
619 |
|
|
620 |
/* Done after the current pattern has been matched and before the |
/* Done after the current pattern has been matched and before the |
621 |
* corresponding action - sets up typ_text. |
* corresponding action - sets up yytext. |
622 |
*/ |
*/ |
623 |
#define YY_DO_BEFORE_ACTION \ |
#define YY_DO_BEFORE_ACTION \ |
624 |
(yytext_ptr) = yy_bp; \ |
(yytext_ptr) = yy_bp; \ |
625 |
typ_leng = (size_t) (yy_cp - yy_bp); \ |
yyleng = (int) (yy_cp - yy_bp); \ |
626 |
(yy_hold_char) = *yy_cp; \ |
(yy_hold_char) = *yy_cp; \ |
627 |
*yy_cp = '\0'; \ |
*yy_cp = '\0'; \ |
628 |
if ( typ_leng + (yy_more_offset) >= YYLMAX ) \ |
if ( yyleng + (yy_more_offset) >= YYLMAX ) \ |
629 |
YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \ |
YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \ |
630 |
yy_flex_strncpy( &typ_text[(yy_more_offset)], (yytext_ptr), typ_leng + 1 ); \ |
yy_flex_strncpy( &yytext[(yy_more_offset)], (yytext_ptr), yyleng + 1 ); \ |
631 |
typ_leng += (yy_more_offset); \ |
yyleng += (yy_more_offset); \ |
632 |
(yy_prev_more_offset) = (yy_more_offset); \ |
(yy_prev_more_offset) = (yy_more_offset); \ |
633 |
(yy_more_offset) = 0; \ |
(yy_more_offset) = 0; \ |
634 |
(yy_c_buf_p) = yy_cp; |
(yy_c_buf_p) = yy_cp; |
|
|
|
635 |
#define YY_NUM_RULES 34 |
#define YY_NUM_RULES 34 |
636 |
#define YY_END_OF_BUFFER 35 |
#define YY_END_OF_BUFFER 35 |
637 |
/* This struct is not used in this scanner, |
/* This struct is not used in this scanner, |
641 |
flex_int32_t yy_verify; |
flex_int32_t yy_verify; |
642 |
flex_int32_t yy_nxt; |
flex_int32_t yy_nxt; |
643 |
}; |
}; |
644 |
static yyconst flex_int16_t yy_acclist[156] = |
static const flex_int16_t yy_accept[124] = |
645 |
{ 0, |
{ 0, |
646 |
6, 6, 16, 16, 35, 31, 34, 32, 34, 33, |
0, 0, 6, 6, 16, 16, 0, 0, 0, 0, |
647 |
34, 33, 34, 33, 34, 33, 34, 33, 34, 33, |
0, 0, 35, 31, 32, 33, 33, 33, 33, 33, |
648 |
34, 31, 33, 34, 9, 34, 6, 34, 7, 34, |
33, 31, 9, 6, 7, 8, 16, 34, 14, 15, |
649 |
8, 34, 16, 34, 34, 14, 34, 15, 34, 20, |
20, 21, 22, 22, 20, 10, 24, 25, 23, 11, |
650 |
34, 21, 34, 22, 34, 22, 34, 20, 22, 34, |
18, 34, 17, 31, 32, 32, 1, 33, 33, 33, |
651 |
10, 34, 24, 34, 25, 34, 23, 34, 11, 34, |
33, 33, 33, 33, 33, 31, 31, 31, 6, 0, |
652 |
18, 34, 34, 17, 18, 34, 31, 32, 32, 1, |
7, 7, 4, 8, 5, 8, 16, 0, 15, 12, |
653 |
33, 33, 33, 33, 33, 33, 33, 33, 31, 33, |
13, 14, 20, 21, 21, 2, 22, 22, 22, 22, |
654 |
31, 33, 31, 33, 6, 7, 7, 4, 8, 5, |
20, 20, 20, 24, 25, 25, 3, 17, 33, 33, |
655 |
8, 16, 15, 12, 13, 14, 20, 21, 21, 2, |
33, 33, 33, 4, 22, 33, 33, 33, 33, 33, |
|
|
|
|
22, 22, 22, 22, 20, 22, 20, 22, 20, 22, |
|
|
24, 25, 25, 3, 17, 33, 33, 33, 33, 33, |
|
|
4, 22, 33, 33, 33, 33, 33, 19, 22, 28, |
|
|
33, 33, 33, 33, 33, 33, 33, 27, 33, 33, |
|
|
33, 33, 33, 33, 33, 33, 30, 33, 33, 33, |
|
|
33, 26, 33, 29, 33 |
|
|
} ; |
|
656 |
|
|
657 |
static yyconst flex_int16_t yy_accept[125] = |
19, 28, 33, 33, 33, 33, 33, 33, 27, 33, |
658 |
{ 0, |
33, 33, 33, 33, 33, 33, 30, 33, 33, 33, |
659 |
1, 1, 1, 2, 3, 4, 5, 5, 5, 5, |
26, 29, 0 |
|
5, 5, 5, 6, 8, 10, 12, 14, 16, 18, |
|
|
20, 22, 25, 27, 29, 31, 33, 35, 36, 38, |
|
|
40, 42, 44, 46, 48, 51, 53, 55, 57, 59, |
|
|
61, 63, 64, 67, 68, 69, 70, 71, 72, 73, |
|
|
74, 75, 76, 77, 78, 79, 81, 83, 85, 86, |
|
|
86, 87, 88, 89, 90, 91, 92, 93, 93, 94, |
|
|
95, 96, 97, 98, 99, 100, 101, 102, 103, 104, |
|
|
105, 107, 109, 111, 112, 113, 114, 115, 116, 117, |
|
|
118, 119, 120, 121, 122, 123, 124, 125, 126, 127, |
|
|
|
|
|
128, 130, 132, 133, 134, 135, 136, 137, 138, 140, |
|
|
141, 142, 143, 144, 145, 146, 147, 149, 150, 151, |
|
|
152, 154, 156, 156 |
|
660 |
} ; |
} ; |
661 |
|
|
662 |
static yyconst flex_int32_t yy_ec[256] = |
static const YY_CHAR yy_ec[256] = |
663 |
{ 0, |
{ 0, |
664 |
1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
665 |
2, 2, 2, 1, 1, 1, 1, 1, 1, 1, |
2, 2, 2, 1, 1, 1, 1, 1, 1, 1, |
691 |
1, 1, 1, 1, 1 |
1, 1, 1, 1, 1 |
692 |
} ; |
} ; |
693 |
|
|
694 |
static yyconst flex_int32_t yy_meta[30] = |
static const YY_CHAR yy_meta[30] = |
695 |
{ 0, |
{ 0, |
696 |
1, 2, 1, 3, 1, 4, 5, 6, 7, 7, |
1, 2, 1, 3, 1, 4, 5, 6, 7, 7, |
697 |
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
698 |
7, 7, 7, 7, 8, 9, 5, 10, 8 |
7, 7, 7, 7, 8, 9, 5, 10, 8 |
699 |
} ; |
} ; |
700 |
|
|
701 |
static yyconst flex_int16_t yy_base[143] = |
static const flex_int16_t yy_base[143] = |
702 |
{ 0, |
{ 0, |
703 |
0, 0, 26, 27, 9, 11, 40, 0, 66, 67, |
0, 0, 26, 27, 9, 11, 40, 0, 66, 67, |
704 |
95, 0, 343, 0, 72, 71, 75, 123, 78, 124, |
95, 0, 343, 0, 72, 71, 75, 123, 78, 124, |
718 |
447, 456 |
447, 456 |
719 |
} ; |
} ; |
720 |
|
|
721 |
static yyconst flex_int16_t yy_def[143] = |
static const flex_int16_t yy_def[143] = |
722 |
{ 0, |
{ 0, |
723 |
123, 1, 124, 124, 125, 125, 123, 7, 126, 126, |
123, 1, 124, 124, 125, 125, 123, 7, 126, 126, |
724 |
123, 11, 123, 127, 128, 129, 129, 129, 129, 129, |
123, 11, 123, 127, 128, 129, 129, 129, 129, 129, |
738 |
123, 123 |
123, 123 |
739 |
} ; |
} ; |
740 |
|
|
741 |
static yyconst flex_int16_t yy_nxt[497] = |
static const flex_int16_t yy_nxt[497] = |
742 |
{ 0, |
{ 0, |
743 |
14, 14, 14, 15, 14, 14, 14, 14, 16, 17, |
14, 14, 14, 15, 14, 14, 14, 14, 16, 17, |
744 |
18, 19, 17, 17, 17, 17, 20, 17, 17, 17, |
18, 19, 17, 17, 17, 17, 20, 17, 17, 17, |
797 |
|
|
798 |
} ; |
} ; |
799 |
|
|
800 |
static yyconst flex_int16_t yy_chk[497] = |
static const flex_int16_t yy_chk[497] = |
801 |
{ 0, |
{ 0, |
802 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
803 |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
857 |
} ; |
} ; |
858 |
|
|
859 |
/* Table of booleans, true if rule could match eol. */ |
/* Table of booleans, true if rule could match eol. */ |
860 |
static yyconst flex_int32_t yy_rule_can_match_eol[35] = |
static const flex_int32_t yy_rule_can_match_eol[35] = |
861 |
{ 0, |
{ 0, |
862 |
0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, |
0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, |
863 |
1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, }; |
1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, }; |
864 |
|
|
865 |
extern int typ__flex_debug; |
static yy_state_type yy_last_accepting_state; |
866 |
int typ__flex_debug = 0; |
static char *yy_last_accepting_cpos; |
867 |
|
|
868 |
static yy_state_type *yy_state_buf=0, *yy_state_ptr=0; |
extern int yy_flex_debug; |
869 |
static char *yy_full_match; |
int yy_flex_debug = 0; |
|
static int yy_lp; |
|
|
#define REJECT \ |
|
|
{ \ |
|
|
*yy_cp = (yy_hold_char); /* undo effects of setting up typ_text */ \ |
|
|
yy_cp = (yy_full_match); /* restore poss. backed-over text */ \ |
|
|
++(yy_lp); \ |
|
|
goto find_rule; \ |
|
|
} |
|
870 |
|
|
871 |
|
/* The intent behind this definition is that it'll catch |
872 |
|
* any uses of REJECT which flex missed. |
873 |
|
*/ |
874 |
|
#define REJECT reject_used_but_not_detected |
875 |
static int yy_more_offset = 0; |
static int yy_more_offset = 0; |
876 |
static int yy_prev_more_offset = 0; |
static int yy_prev_more_offset = 0; |
877 |
#define yymore() ((yy_more_offset) = yy_flex_strlen( typ_text )) |
#define yymore() ((yy_more_offset) = yy_flex_strlen( yytext )) |
878 |
#define YY_NEED_STRLEN |
#define YY_NEED_STRLEN |
879 |
#define YY_MORE_ADJ 0 |
#define YY_MORE_ADJ 0 |
880 |
#define YY_RESTORE_YY_MORE_OFFSET \ |
#define YY_RESTORE_YY_MORE_OFFSET \ |
881 |
{ \ |
{ \ |
882 |
(yy_more_offset) = (yy_prev_more_offset); \ |
(yy_more_offset) = (yy_prev_more_offset); \ |
883 |
typ_leng -= (yy_more_offset); \ |
yyleng -= (yy_more_offset); \ |
884 |
} |
} |
885 |
#ifndef YYLMAX |
#ifndef YYLMAX |
886 |
#define YYLMAX 8192 |
#define YYLMAX 8192 |
887 |
#endif |
#endif |
888 |
|
|
889 |
char typ_text[YYLMAX]; |
char yytext[YYLMAX]; |
890 |
char *yytext_ptr; |
char *yytext_ptr; |
891 |
#line 1 "tcltk/generic/interface/typelex.l" |
#line 1 "tcltk/interface/typelex.l" |
892 |
#line 2 "tcltk/generic/interface/typelex.l" |
#line 2 "tcltk/interface/typelex.l" |
893 |
/* |
/* |
894 |
* TypeExtractor.l |
* TypeExtractor.l |
895 |
* by Kirk Abbott and Ben Allan |
* by Kirk Abbott and Ben Allan |
914 |
* General Public License for more details. |
* General Public License for more details. |
915 |
* |
* |
916 |
* You should have received a copy of the GNU General Public License |
* You should have received a copy of the GNU General Public License |
917 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
* along with the program; if not, write to the Free Software Foundation, |
918 |
|
* Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check the file named |
919 |
|
* COPYING. COPYING is found in ../compiler. |
920 |
*/ |
*/ |
921 |
|
|
922 |
/* |
/* |
1028 |
#endif |
#endif |
1029 |
#endif /* TYPER_TEST */ |
#endif /* TYPER_TEST */ |
1030 |
|
|
1031 |
|
#line 1032 "<stdout>" |
1032 |
|
|
1033 |
|
#line 1034 "<stdout>" |
|
|
|
|
|
|
|
|
|
|
#line 836 "<stdout>" |
|
1034 |
|
|
1035 |
#define INITIAL 0 |
#define INITIAL 0 |
1036 |
#define Comment 1 |
#define Comment 1 |
1051 |
#define YY_EXTRA_TYPE void * |
#define YY_EXTRA_TYPE void * |
1052 |
#endif |
#endif |
1053 |
|
|
1054 |
static int yy_init_globals (void ); |
static int yy_init_globals ( void ); |
1055 |
|
|
1056 |
|
/* Accessor methods to globals. |
1057 |
|
These are made visible to non-reentrant scanners for convenience. */ |
1058 |
|
|
1059 |
|
int yylex_destroy ( void ); |
1060 |
|
|
1061 |
|
int yyget_debug ( void ); |
1062 |
|
|
1063 |
|
void yyset_debug ( int debug_flag ); |
1064 |
|
|
1065 |
|
YY_EXTRA_TYPE yyget_extra ( void ); |
1066 |
|
|
1067 |
|
void yyset_extra ( YY_EXTRA_TYPE user_defined ); |
1068 |
|
|
1069 |
|
FILE *yyget_in ( void ); |
1070 |
|
|
1071 |
|
void yyset_in ( FILE * _in_str ); |
1072 |
|
|
1073 |
|
FILE *yyget_out ( void ); |
1074 |
|
|
1075 |
|
void yyset_out ( FILE * _out_str ); |
1076 |
|
|
1077 |
|
int yyget_leng ( void ); |
1078 |
|
|
1079 |
|
char *yyget_text ( void ); |
1080 |
|
|
1081 |
|
int yyget_lineno ( void ); |
1082 |
|
|
1083 |
|
void yyset_lineno ( int _line_number ); |
1084 |
|
|
1085 |
/* Macros after this point can all be overridden by user definitions in |
/* Macros after this point can all be overridden by user definitions in |
1086 |
* section 1. |
* section 1. |
1088 |
|
|
1089 |
#ifndef YY_SKIP_YYWRAP |
#ifndef YY_SKIP_YYWRAP |
1090 |
#ifdef __cplusplus |
#ifdef __cplusplus |
1091 |
extern "C" int typ_wrap (void ); |
extern "C" int yywrap ( void ); |
1092 |
#else |
#else |
1093 |
extern int typ_wrap (void ); |
extern int yywrap ( void ); |
1094 |
#endif |
#endif |
1095 |
#endif |
#endif |
1096 |
|
|
1097 |
static void yyunput (int c,char *buf_ptr ); |
#ifndef YY_NO_UNPUT |
1098 |
|
|
1099 |
|
static void yyunput ( int c, char *buf_ptr ); |
1100 |
|
|
1101 |
|
#endif |
1102 |
|
|
1103 |
#ifndef yytext_ptr |
#ifndef yytext_ptr |
1104 |
static void yy_flex_strncpy (char *,yyconst char *,int ); |
static void yy_flex_strncpy ( char *, const char *, int ); |
1105 |
#endif |
#endif |
1106 |
|
|
1107 |
#ifdef YY_NEED_STRLEN |
#ifdef YY_NEED_STRLEN |
1108 |
static int yy_flex_strlen (yyconst char * ); |
static int yy_flex_strlen ( const char * ); |
1109 |
#endif |
#endif |
1110 |
|
|
1111 |
#ifndef YY_NO_INPUT |
#ifndef YY_NO_INPUT |
|
|
|
1112 |
#ifdef __cplusplus |
#ifdef __cplusplus |
1113 |
static int yyinput (void ); |
static int yyinput ( void ); |
1114 |
#else |
#else |
1115 |
static int input (void ); |
static int input ( void ); |
1116 |
#endif |
#endif |
1117 |
|
|
1118 |
#endif |
#endif |
1119 |
|
|
1120 |
/* Amount of stuff to slurp up with each read. */ |
/* Amount of stuff to slurp up with each read. */ |
1121 |
#ifndef YY_READ_BUF_SIZE |
#ifndef YY_READ_BUF_SIZE |
1122 |
|
#ifdef __ia64__ |
1123 |
|
/* On IA-64, the buffer size is 16k, not 8k */ |
1124 |
|
#define YY_READ_BUF_SIZE 16384 |
1125 |
|
#else |
1126 |
#define YY_READ_BUF_SIZE 8192 |
#define YY_READ_BUF_SIZE 8192 |
1127 |
|
#endif /* __ia64__ */ |
1128 |
#endif |
#endif |
1129 |
|
|
1130 |
/* Copy whatever the last rule matched to the standard output. */ |
/* Copy whatever the last rule matched to the standard output. */ |
1132 |
/* This used to be an fputs(), but since the string might contain NUL's, |
/* This used to be an fputs(), but since the string might contain NUL's, |
1133 |
* we now use fwrite(). |
* we now use fwrite(). |
1134 |
*/ |
*/ |
1135 |
#define ECHO (void) fwrite( typ_text, typ_leng, 1, typ_out ) |
#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) |
1136 |
#endif |
#endif |
1137 |
|
|
1138 |
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
1143 |
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
1144 |
{ \ |
{ \ |
1145 |
int c = '*'; \ |
int c = '*'; \ |
1146 |
size_t n; \ |
int n; \ |
1147 |
for ( n = 0; n < max_size && \ |
for ( n = 0; n < max_size && \ |
1148 |
(c = getc( typ_in )) != EOF && c != '\n'; ++n ) \ |
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
1149 |
buf[n] = (char) c; \ |
buf[n] = (char) c; \ |
1150 |
if ( c == '\n' ) \ |
if ( c == '\n' ) \ |
1151 |
buf[n++] = (char) c; \ |
buf[n++] = (char) c; \ |
1152 |
if ( c == EOF && ferror( typ_in ) ) \ |
if ( c == EOF && ferror( yyin ) ) \ |
1153 |
YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
1154 |
result = n; \ |
result = n; \ |
1155 |
} \ |
} \ |
1156 |
else \ |
else \ |
1157 |
{ \ |
{ \ |
1158 |
errno=0; \ |
errno=0; \ |
1159 |
while ( (result = fread(buf, 1, max_size, typ_in))==0 && ferror(typ_in)) \ |
while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ |
1160 |
{ \ |
{ \ |
1161 |
if( errno != EINTR) \ |
if( errno != EINTR) \ |
1162 |
{ \ |
{ \ |
1164 |
break; \ |
break; \ |
1165 |
} \ |
} \ |
1166 |
errno=0; \ |
errno=0; \ |
1167 |
clearerr(typ_in); \ |
clearerr(yyin); \ |
1168 |
} \ |
} \ |
1169 |
}\ |
}\ |
1170 |
\ |
\ |
1197 |
#ifndef YY_DECL |
#ifndef YY_DECL |
1198 |
#define YY_DECL_IS_OURS 1 |
#define YY_DECL_IS_OURS 1 |
1199 |
|
|
1200 |
extern int typ_lex (void); |
extern int yylex (void); |
1201 |
|
|
1202 |
#define YY_DECL int typ_lex (void) |
#define YY_DECL int yylex (void) |
1203 |
#endif /* !YY_DECL */ |
#endif /* !YY_DECL */ |
1204 |
|
|
1205 |
/* Code executed at the beginning of each rule, after typ_text and typ_leng |
/* Code executed at the beginning of each rule, after yytext and yyleng |
1206 |
* have been set up. |
* have been set up. |
1207 |
*/ |
*/ |
1208 |
#ifndef YY_USER_ACTION |
#ifndef YY_USER_ACTION |
1211 |
|
|
1212 |
/* Code executed at the end of each rule. */ |
/* Code executed at the end of each rule. */ |
1213 |
#ifndef YY_BREAK |
#ifndef YY_BREAK |
1214 |
#define YY_BREAK break; |
#define YY_BREAK /*LINTED*/break; |
1215 |
#endif |
#endif |
1216 |
|
|
1217 |
#define YY_RULE_SETUP \ |
#define YY_RULE_SETUP \ |
1221 |
*/ |
*/ |
1222 |
YY_DECL |
YY_DECL |
1223 |
{ |
{ |
1224 |
register yy_state_type yy_current_state; |
yy_state_type yy_current_state; |
1225 |
register char *yy_cp, *yy_bp; |
char *yy_cp, *yy_bp; |
1226 |
register int yy_act; |
int yy_act; |
1227 |
|
|
|
#line 167 "tcltk/generic/interface/typelex.l" |
|
|
|
|
|
|
|
|
/* |
|
|
* Code to handle (* Comments *) |
|
|
* |
|
|
* "(*" puts us into the Comment state. Comments nest, so in the |
|
|
* Comment state we need to look for "(*" that increases the nesting |
|
|
* level and "*)" that will lower it. |
|
|
* Do NOT try to match \(\*+ since that causes "(****)" to parse |
|
|
* incorrectly. |
|
|
*/ |
|
|
|
|
|
#line 1007 "<stdout>" |
|
|
|
|
1228 |
if ( !(yy_init) ) |
if ( !(yy_init) ) |
1229 |
{ |
{ |
1230 |
(yy_init) = 1; |
(yy_init) = 1; |
1233 |
YY_USER_INIT; |
YY_USER_INIT; |
1234 |
#endif |
#endif |
1235 |
|
|
|
/* Create the reject buffer large enough to save one state per allowed character. */ |
|
|
if ( ! (yy_state_buf) ) |
|
|
(yy_state_buf) = (yy_state_type *)typ_alloc(YY_STATE_BUF_SIZE ); |
|
|
|
|
1236 |
if ( ! (yy_start) ) |
if ( ! (yy_start) ) |
1237 |
(yy_start) = 1; /* first start state */ |
(yy_start) = 1; /* first start state */ |
1238 |
|
|
1239 |
if ( ! typ_in ) |
if ( ! yyin ) |
1240 |
typ_in = stdin; |
yyin = stdin; |
1241 |
|
|
1242 |
if ( ! typ_out ) |
if ( ! yyout ) |
1243 |
typ_out = stdout; |
yyout = stdout; |
1244 |
|
|
1245 |
if ( ! YY_CURRENT_BUFFER ) { |
if ( ! YY_CURRENT_BUFFER ) { |
1246 |
typ_ensure_buffer_stack (); |
yyensure_buffer_stack (); |
1247 |
YY_CURRENT_BUFFER_LVALUE = |
YY_CURRENT_BUFFER_LVALUE = |
1248 |
typ__create_buffer(typ_in,YY_BUF_SIZE ); |
yy_create_buffer( yyin, YY_BUF_SIZE ); |
1249 |
} |
} |
1250 |
|
|
1251 |
typ__load_buffer_state( ); |
yy_load_buffer_state( ); |
1252 |
} |
} |
1253 |
|
|
1254 |
while ( 1 ) /* loops until end-of-file is reached */ |
{ |
1255 |
|
#line 162 "tcltk/interface/typelex.l" |
1256 |
|
|
1257 |
|
|
1258 |
|
#line 165 "tcltk/interface/typelex.l" |
1259 |
|
/* |
1260 |
|
* Code to handle (* Comments *) |
1261 |
|
* |
1262 |
|
* "(*" puts us into the Comment state. Comments nest, so in the |
1263 |
|
* Comment state we need to look for "(*" that increases the nesting |
1264 |
|
* level and "*)" that will lower it. |
1265 |
|
* Do NOT try to match \(\*+ since that causes "(****)" to parse |
1266 |
|
* incorrectly. |
1267 |
|
*/ |
1268 |
|
|
1269 |
|
#line 1270 "<stdout>" |
1270 |
|
|
1271 |
|
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ |
1272 |
{ |
{ |
1273 |
yy_cp = (yy_c_buf_p); |
yy_cp = (yy_c_buf_p); |
1274 |
|
|
1275 |
/* Support of typ_text. */ |
/* Support of yytext. */ |
1276 |
*yy_cp = (yy_hold_char); |
*yy_cp = (yy_hold_char); |
1277 |
|
|
1278 |
/* yy_bp points to the position in yy_ch_buf of the start of |
/* yy_bp points to the position in yy_ch_buf of the start of |
1281 |
yy_bp = yy_cp; |
yy_bp = yy_cp; |
1282 |
|
|
1283 |
yy_current_state = (yy_start); |
yy_current_state = (yy_start); |
|
|
|
|
(yy_state_ptr) = (yy_state_buf); |
|
|
*(yy_state_ptr)++ = yy_current_state; |
|
|
|
|
1284 |
yy_match: |
yy_match: |
1285 |
do |
do |
1286 |
{ |
{ |
1287 |
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; |
YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; |
1288 |
|
if ( yy_accept[yy_current_state] ) |
1289 |
|
{ |
1290 |
|
(yy_last_accepting_state) = yy_current_state; |
1291 |
|
(yy_last_accepting_cpos) = yy_cp; |
1292 |
|
} |
1293 |
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
1294 |
{ |
{ |
1295 |
yy_current_state = (int) yy_def[yy_current_state]; |
yy_current_state = (int) yy_def[yy_current_state]; |
1296 |
if ( yy_current_state >= 124 ) |
if ( yy_current_state >= 124 ) |
1297 |
yy_c = yy_meta[(unsigned int) yy_c]; |
yy_c = yy_meta[yy_c]; |
1298 |
} |
} |
1299 |
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
|
*(yy_state_ptr)++ = yy_current_state; |
|
1300 |
++yy_cp; |
++yy_cp; |
1301 |
} |
} |
1302 |
while ( yy_base[yy_current_state] != 467 ); |
while ( yy_base[yy_current_state] != 467 ); |
1303 |
|
|
1304 |
yy_find_action: |
yy_find_action: |
1305 |
yy_current_state = *--(yy_state_ptr); |
yy_act = yy_accept[yy_current_state]; |
1306 |
(yy_lp) = yy_accept[yy_current_state]; |
if ( yy_act == 0 ) |
1307 |
find_rule: /* we branch to this label when backing up */ |
{ /* have to back up */ |
1308 |
for ( ; ; ) /* until we find what rule we matched */ |
yy_cp = (yy_last_accepting_cpos); |
1309 |
{ |
yy_current_state = (yy_last_accepting_state); |
1310 |
if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] ) |
yy_act = yy_accept[yy_current_state]; |
|
{ |
|
|
yy_act = yy_acclist[(yy_lp)]; |
|
|
{ |
|
|
(yy_full_match) = yy_cp; |
|
|
break; |
|
|
} |
|
|
} |
|
|
--yy_cp; |
|
|
yy_current_state = *--(yy_state_ptr); |
|
|
(yy_lp) = yy_accept[yy_current_state]; |
|
1311 |
} |
} |
1312 |
|
|
1313 |
YY_DO_BEFORE_ACTION; |
YY_DO_BEFORE_ACTION; |
1315 |
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) |
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) |
1316 |
{ |
{ |
1317 |
int yyl; |
int yyl; |
1318 |
for ( yyl = (yy_prev_more_offset); yyl < typ_leng; ++yyl ) |
for ( yyl = (yy_prev_more_offset); yyl < yyleng; ++yyl ) |
1319 |
if ( typ_text[yyl] == '\n' ) |
if ( yytext[yyl] == '\n' ) |
1320 |
|
|
1321 |
typ_lineno++; |
yylineno++; |
1322 |
; |
; |
1323 |
} |
} |
1324 |
|
|
1326 |
|
|
1327 |
switch ( yy_act ) |
switch ( yy_act ) |
1328 |
{ /* beginning of action switch */ |
{ /* beginning of action switch */ |
1329 |
|
case 0: /* must back up */ |
1330 |
|
/* undo the effects of YY_DO_BEFORE_ACTION */ |
1331 |
|
*yy_cp = (yy_hold_char); |
1332 |
|
yy_cp = (yy_last_accepting_cpos); |
1333 |
|
yy_current_state = (yy_last_accepting_state); |
1334 |
|
goto yy_find_action; |
1335 |
|
|
1336 |
case 1: |
case 1: |
1337 |
#line 180 "tcltk/generic/interface/typelex.l" |
#line 176 "tcltk/interface/typelex.l" |
1338 |
case 2: |
case 2: |
1339 |
#line 181 "tcltk/generic/interface/typelex.l" |
#line 177 "tcltk/interface/typelex.l" |
1340 |
case 3: |
case 3: |
1341 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1342 |
#line 181 "tcltk/generic/interface/typelex.l" |
#line 177 "tcltk/interface/typelex.l" |
1343 |
{ |
{ |
1344 |
/* Match "(" followed by "*" puts us into |
/* Match "(" followed by "*" puts us into |
1345 |
* the COMMENT state. Don't use \*+ since |
* the COMMENT state. Don't use \*+ since |
1359 |
case 4: |
case 4: |
1360 |
/* rule 4 can match eol */ |
/* rule 4 can match eol */ |
1361 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1362 |
#line 196 "tcltk/generic/interface/typelex.l" |
#line 192 "tcltk/interface/typelex.l" |
1363 |
{ |
{ |
1364 |
/* Match "(" followed "*" followed by |
/* Match "(" followed "*" followed by |
1365 |
* anything that's not "(" nor "*". |
* anything that's not "(" nor "*". |
1378 |
case 5: |
case 5: |
1379 |
/* rule 5 can match eol */ |
/* rule 5 can match eol */ |
1380 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1381 |
#line 210 "tcltk/generic/interface/typelex.l" |
#line 206 "tcltk/interface/typelex.l" |
1382 |
{ |
{ |
1383 |
/* Match anything not "*" or "(" followed |
/* Match anything not "*" or "(" followed |
1384 |
* by one or more "*"s followed by ")". |
* by one or more "*"s followed by ")". |
1416 |
YY_BREAK |
YY_BREAK |
1417 |
case 6: |
case 6: |
1418 |
/* rule 6 can match eol */ |
/* rule 6 can match eol */ |
1419 |
#line 245 "tcltk/generic/interface/typelex.l" |
#line 241 "tcltk/interface/typelex.l" |
1420 |
case 7: |
case 7: |
1421 |
/* rule 7 can match eol */ |
/* rule 7 can match eol */ |
1422 |
#line 246 "tcltk/generic/interface/typelex.l" |
#line 242 "tcltk/interface/typelex.l" |
1423 |
case 8: |
case 8: |
1424 |
/* rule 8 can match eol */ |
/* rule 8 can match eol */ |
1425 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1426 |
#line 246 "tcltk/generic/interface/typelex.l" |
#line 242 "tcltk/interface/typelex.l" |
1427 |
{ |
{ |
1428 |
/* |
/* |
1429 |
* These three rules eat: |
* These three rules eat: |
1448 |
* the nesting level and "}" that will lower it. |
* the nesting level and "}" that will lower it. |
1449 |
*/ |
*/ |
1450 |
case 9: |
case 9: |
1451 |
#line 272 "tcltk/generic/interface/typelex.l" |
#line 268 "tcltk/interface/typelex.l" |
1452 |
case 10: |
case 10: |
1453 |
#line 273 "tcltk/generic/interface/typelex.l" |
#line 269 "tcltk/interface/typelex.l" |
1454 |
case 11: |
case 11: |
1455 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1456 |
#line 273 "tcltk/generic/interface/typelex.l" |
#line 269 "tcltk/interface/typelex.l" |
1457 |
{ |
{ |
1458 |
/* A "{" puts us into the BracedText state. |
/* A "{" puts us into the BracedText state. |
1459 |
* Initialize the nesting level. |
* Initialize the nesting level. |
1471 |
case 12: |
case 12: |
1472 |
/* rule 12 can match eol */ |
/* rule 12 can match eol */ |
1473 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1474 |
#line 286 "tcltk/generic/interface/typelex.l" |
#line 282 "tcltk/interface/typelex.l" |
1475 |
{ |
{ |
1476 |
/* A backslash \ in the BracedText state |
/* A backslash \ in the BracedText state |
1477 |
* protects any character---even a |
* protects any character---even a |
1488 |
case 13: |
case 13: |
1489 |
/* rule 13 can match eol */ |
/* rule 13 can match eol */ |
1490 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1491 |
#line 298 "tcltk/generic/interface/typelex.l" |
#line 294 "tcltk/interface/typelex.l" |
1492 |
{ |
{ |
1493 |
/* A backslash \ in the BracedText state |
/* A backslash \ in the BracedText state |
1494 |
* protects any character---even a |
* protects any character---even a |
1505 |
case 14: |
case 14: |
1506 |
/* rule 14 can match eol */ |
/* rule 14 can match eol */ |
1507 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1508 |
#line 310 "tcltk/generic/interface/typelex.l" |
#line 306 "tcltk/interface/typelex.l" |
1509 |
{ |
{ |
1510 |
/* A "{" in the braces state gets added to |
/* A "{" in the braces state gets added to |
1511 |
* the text and increase the nesting level. |
* the text and increase the nesting level. |
1523 |
case 15: |
case 15: |
1524 |
/* rule 15 can match eol */ |
/* rule 15 can match eol */ |
1525 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1526 |
#line 323 "tcltk/generic/interface/typelex.l" |
#line 319 "tcltk/interface/typelex.l" |
1527 |
{ |
{ |
1528 |
/* A "}" will reduce the nesting level. |
/* A "}" will reduce the nesting level. |
1529 |
* If the nesting level is zero, go back to |
* If the nesting level is zero, go back to |
1559 |
case 16: |
case 16: |
1560 |
/* rule 16 can match eol */ |
/* rule 16 can match eol */ |
1561 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1562 |
#line 354 "tcltk/generic/interface/typelex.l" |
#line 350 "tcltk/interface/typelex.l" |
1563 |
{ |
{ |
1564 |
/* Match anything that is not "{" nor "}" |
/* Match anything that is not "{" nor "}" |
1565 |
* nor "\\"(backslash). |
* nor "\\"(backslash). |
1590 |
*/ |
*/ |
1591 |
case 17: |
case 17: |
1592 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1593 |
#line 385 "tcltk/generic/interface/typelex.l" |
#line 381 "tcltk/interface/typelex.l" |
1594 |
{ |
{ |
1595 |
/* |
/* |
1596 |
* Found an identifier. |
* Found an identifier. |
1654 |
YY_BREAK |
YY_BREAK |
1655 |
case 18: |
case 18: |
1656 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1657 |
#line 445 "tcltk/generic/interface/typelex.l" |
#line 441 "tcltk/interface/typelex.l" |
1658 |
{ |
{ |
1659 |
/* |
/* |
1660 |
* Some text other than an identifier |
* Some text other than an identifier |
1694 |
*/ |
*/ |
1695 |
case 19: |
case 19: |
1696 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1697 |
#line 485 "tcltk/generic/interface/typelex.l" |
#line 481 "tcltk/interface/typelex.l" |
1698 |
{ |
{ |
1699 |
/* |
/* |
1700 |
* Found the END keyword. Save the |
* Found the END keyword. Save the |
1711 |
YY_BREAK |
YY_BREAK |
1712 |
case 20: |
case 20: |
1713 |
/* rule 20 can match eol */ |
/* rule 20 can match eol */ |
1714 |
#line 499 "tcltk/generic/interface/typelex.l" |
#line 495 "tcltk/interface/typelex.l" |
1715 |
case 21: |
case 21: |
1716 |
/* rule 21 can match eol */ |
/* rule 21 can match eol */ |
1717 |
#line 500 "tcltk/generic/interface/typelex.l" |
#line 496 "tcltk/interface/typelex.l" |
1718 |
case 22: |
case 22: |
1719 |
/* rule 22 can match eol */ |
/* rule 22 can match eol */ |
1720 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1721 |
#line 500 "tcltk/generic/interface/typelex.l" |
#line 496 "tcltk/interface/typelex.l" |
1722 |
{ |
{ |
1723 |
/* |
/* |
1724 |
* These rules match |
* These rules match |
1741 |
*/ |
*/ |
1742 |
case 23: |
case 23: |
1743 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1744 |
#line 523 "tcltk/generic/interface/typelex.l" |
#line 519 "tcltk/interface/typelex.l" |
1745 |
{ |
{ |
1746 |
/* |
/* |
1747 |
* Found the ";" which ends the CONSTANT. |
* Found the ";" which ends the CONSTANT. |
1753 |
YY_BREAK |
YY_BREAK |
1754 |
case 24: |
case 24: |
1755 |
/* rule 24 can match eol */ |
/* rule 24 can match eol */ |
1756 |
#line 532 "tcltk/generic/interface/typelex.l" |
#line 528 "tcltk/interface/typelex.l" |
1757 |
case 25: |
case 25: |
1758 |
/* rule 25 can match eol */ |
/* rule 25 can match eol */ |
1759 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1760 |
#line 532 "tcltk/generic/interface/typelex.l" |
#line 528 "tcltk/interface/typelex.l" |
1761 |
{ |
{ |
1762 |
/* |
/* |
1763 |
* These rules match |
* These rules match |
1782 |
*/ |
*/ |
1783 |
case 26: |
case 26: |
1784 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1785 |
#line 557 "tcltk/generic/interface/typelex.l" |
#line 553 "tcltk/interface/typelex.l" |
1786 |
{ |
{ |
1787 |
/* |
/* |
1788 |
* Found the UNIVERSAL keyword. Append |
* Found the UNIVERSAL keyword. Append |
1794 |
} |
} |
1795 |
YY_BREAK |
YY_BREAK |
1796 |
case 27: |
case 27: |
1797 |
#line 567 "tcltk/generic/interface/typelex.l" |
#line 563 "tcltk/interface/typelex.l" |
1798 |
case 28: |
case 28: |
1799 |
#line 568 "tcltk/generic/interface/typelex.l" |
#line 564 "tcltk/interface/typelex.l" |
1800 |
case 29: |
case 29: |
1801 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1802 |
#line 568 "tcltk/generic/interface/typelex.l" |
#line 564 "tcltk/interface/typelex.l" |
1803 |
{ |
{ |
1804 |
/* |
/* |
1805 |
* Found an MODEL, ATOM, or DEFINITION |
* Found an MODEL, ATOM, or DEFINITION |
1818 |
YY_BREAK |
YY_BREAK |
1819 |
case 30: |
case 30: |
1820 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1821 |
#line 583 "tcltk/generic/interface/typelex.l" |
#line 579 "tcltk/interface/typelex.l" |
1822 |
{ |
{ |
1823 |
/* |
/* |
1824 |
* Found a CONSTANT keyword--perhaps |
* Found a CONSTANT keyword--perhaps |
1839 |
*/ |
*/ |
1840 |
case 31: |
case 31: |
1841 |
/* rule 31 can match eol */ |
/* rule 31 can match eol */ |
1842 |
#line 606 "tcltk/generic/interface/typelex.l" |
#line 602 "tcltk/interface/typelex.l" |
1843 |
case 32: |
case 32: |
1844 |
/* rule 32 can match eol */ |
/* rule 32 can match eol */ |
1845 |
#line 607 "tcltk/generic/interface/typelex.l" |
#line 603 "tcltk/interface/typelex.l" |
1846 |
case 33: |
case 33: |
1847 |
/* rule 33 can match eol */ |
/* rule 33 can match eol */ |
1848 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1849 |
#line 607 "tcltk/generic/interface/typelex.l" |
#line 603 "tcltk/interface/typelex.l" |
1850 |
{ |
{ |
1851 |
/* |
/* |
1852 |
* These rules match |
* These rules match |
1861 |
} |
} |
1862 |
YY_BREAK |
YY_BREAK |
1863 |
case YY_STATE_EOF(INITIAL): |
case YY_STATE_EOF(INITIAL): |
1864 |
#line 619 "tcltk/generic/interface/typelex.l" |
#line 615 "tcltk/interface/typelex.l" |
1865 |
{ |
{ |
1866 |
/* |
/* |
1867 |
* Reached End of file without a match |
* Reached End of file without a match |
1871 |
YY_BREAK |
YY_BREAK |
1872 |
case 34: |
case 34: |
1873 |
YY_RULE_SETUP |
YY_RULE_SETUP |
1874 |
#line 627 "tcltk/generic/interface/typelex.l" |
#line 623 "tcltk/interface/typelex.l" |
1875 |
ECHO; |
ECHO; |
1876 |
YY_BREAK |
YY_BREAK |
1877 |
#line 1648 "<stdout>" |
#line 1878 "<stdout>" |
1878 |
case YY_STATE_EOF(Comment): |
case YY_STATE_EOF(Comment): |
1879 |
case YY_STATE_EOF(BracedText): |
case YY_STATE_EOF(BracedText): |
1880 |
case YY_STATE_EOF(Model): |
case YY_STATE_EOF(Model): |
1881 |
case YY_STATE_EOF(Constant): |
case YY_STATE_EOF(Constant): |
1882 |
case YY_STATE_EOF(CheckID): |
case YY_STATE_EOF(CheckID): |
1883 |
yyterminate(); |
yyterminate(); |
1884 |
|
|
1885 |
case YY_END_OF_BUFFER: |
case YY_END_OF_BUFFER: |
1886 |
{ |
{ |
1895 |
{ |
{ |
1896 |
/* We're scanning a new file or input source. It's |
/* We're scanning a new file or input source. It's |
1897 |
* possible that this happened because the user |
* possible that this happened because the user |
1898 |
* just pointed typ_in at a new source and called |
* just pointed yyin at a new source and called |
1899 |
* typ_lex(). If so, then we have to assure |
* yylex(). If so, then we have to assure |
1900 |
* consistency between YY_CURRENT_BUFFER and our |
* consistency between YY_CURRENT_BUFFER and our |
1901 |
* globals. Here is the right place to do so, because |
* globals. Here is the right place to do so, because |
1902 |
* this is the first action (other than possibly a |
* this is the first action (other than possibly a |
1903 |
* back-up) that will match for the new input source. |
* back-up) that will match for the new input source. |
1904 |
*/ |
*/ |
1905 |
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
1906 |
YY_CURRENT_BUFFER_LVALUE->yy_input_file = typ_in; |
YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; |
1907 |
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; |
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; |
1908 |
} |
} |
1909 |
|
|
1956 |
{ |
{ |
1957 |
(yy_did_buffer_switch_on_eof) = 0; |
(yy_did_buffer_switch_on_eof) = 0; |
1958 |
|
|
1959 |
if ( typ_wrap( ) ) |
if ( yywrap( ) ) |
1960 |
{ |
{ |
1961 |
/* Note: because we've taken care in |
/* Note: because we've taken care in |
1962 |
* yy_get_next_buffer() to have set up |
* yy_get_next_buffer() to have set up |
1963 |
* typ_text, we can now set up |
* yytext, we can now set up |
1964 |
* yy_c_buf_p so that if some total |
* yy_c_buf_p so that if some total |
1965 |
* hoser (like flex itself) wants to |
* hoser (like flex itself) wants to |
1966 |
* call the scanner after we return the |
* call the scanner after we return the |
2009 |
"fatal flex scanner internal error--no action found" ); |
"fatal flex scanner internal error--no action found" ); |
2010 |
} /* end of action switch */ |
} /* end of action switch */ |
2011 |
} /* end of scanning one token */ |
} /* end of scanning one token */ |
2012 |
} /* end of typ_lex */ |
} /* end of user's declarations */ |
2013 |
|
} /* end of yylex */ |
2014 |
|
|
2015 |
/* yy_get_next_buffer - try to read in a new buffer |
/* yy_get_next_buffer - try to read in a new buffer |
2016 |
* |
* |
2021 |
*/ |
*/ |
2022 |
static int yy_get_next_buffer (void) |
static int yy_get_next_buffer (void) |
2023 |
{ |
{ |
2024 |
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
2025 |
register char *source = (yytext_ptr); |
char *source = (yytext_ptr); |
2026 |
register int number_to_move, i; |
int number_to_move, i; |
2027 |
int ret_val; |
int ret_val; |
2028 |
|
|
2029 |
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) |
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) |
2052 |
/* Try to read more data. */ |
/* Try to read more data. */ |
2053 |
|
|
2054 |
/* First move last chars to start of buffer. */ |
/* First move last chars to start of buffer. */ |
2055 |
number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; |
number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); |
2056 |
|
|
2057 |
for ( i = 0; i < number_to_move; ++i ) |
for ( i = 0; i < number_to_move; ++i ) |
2058 |
*(dest++) = *(source++); |
*(dest++) = *(source++); |
2071 |
while ( num_to_read <= 0 ) |
while ( num_to_read <= 0 ) |
2072 |
{ /* Not enough room in the buffer - grow it. */ |
{ /* Not enough room in the buffer - grow it. */ |
2073 |
|
|
2074 |
YY_FATAL_ERROR( |
/* just a shorter name for the current buffer */ |
2075 |
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); |
YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; |
2076 |
|
|
2077 |
|
int yy_c_buf_p_offset = |
2078 |
|
(int) ((yy_c_buf_p) - b->yy_ch_buf); |
2079 |
|
|
2080 |
|
if ( b->yy_is_our_buffer ) |
2081 |
|
{ |
2082 |
|
int new_size = b->yy_buf_size * 2; |
2083 |
|
|
2084 |
|
if ( new_size <= 0 ) |
2085 |
|
b->yy_buf_size += b->yy_buf_size / 8; |
2086 |
|
else |
2087 |
|
b->yy_buf_size *= 2; |
2088 |
|
|
2089 |
|
b->yy_ch_buf = (char *) |
2090 |
|
/* Include room in for 2 EOB chars. */ |
2091 |
|
yyrealloc( (void *) b->yy_ch_buf, |
2092 |
|
(yy_size_t) (b->yy_buf_size + 2) ); |
2093 |
|
} |
2094 |
|
else |
2095 |
|
/* Can't grow it, we don't own it. */ |
2096 |
|
b->yy_ch_buf = NULL; |
2097 |
|
|
2098 |
|
if ( ! b->yy_ch_buf ) |
2099 |
|
YY_FATAL_ERROR( |
2100 |
|
"fatal error - scanner input buffer overflow" ); |
2101 |
|
|
2102 |
|
(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; |
2103 |
|
|
2104 |
|
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - |
2105 |
|
number_to_move - 1; |
2106 |
|
|
2107 |
} |
} |
2108 |
|
|
2121 |
if ( number_to_move == YY_MORE_ADJ ) |
if ( number_to_move == YY_MORE_ADJ ) |
2122 |
{ |
{ |
2123 |
ret_val = EOB_ACT_END_OF_FILE; |
ret_val = EOB_ACT_END_OF_FILE; |
2124 |
typ_restart(typ_in ); |
yyrestart( yyin ); |
2125 |
} |
} |
2126 |
|
|
2127 |
else |
else |
2135 |
else |
else |
2136 |
ret_val = EOB_ACT_CONTINUE_SCAN; |
ret_val = EOB_ACT_CONTINUE_SCAN; |
2137 |
|
|
2138 |
|
if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { |
2139 |
|
/* Extend the array by 50%, plus the number we really need. */ |
2140 |
|
int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); |
2141 |
|
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( |
2142 |
|
(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); |
2143 |
|
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
2144 |
|
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); |
2145 |
|
/* "- 2" to take care of EOB's */ |
2146 |
|
YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); |
2147 |
|
} |
2148 |
|
|
2149 |
(yy_n_chars) += number_to_move; |
(yy_n_chars) += number_to_move; |
2150 |
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; |
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; |
2151 |
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; |
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; |
2159 |
|
|
2160 |
static yy_state_type yy_get_previous_state (void) |
static yy_state_type yy_get_previous_state (void) |
2161 |
{ |
{ |
2162 |
register yy_state_type yy_current_state; |
yy_state_type yy_current_state; |
2163 |
register char *yy_cp; |
char *yy_cp; |
2164 |
|
|
2165 |
yy_current_state = (yy_start); |
yy_current_state = (yy_start); |
2166 |
|
|
|
(yy_state_ptr) = (yy_state_buf); |
|
|
*(yy_state_ptr)++ = yy_current_state; |
|
|
|
|
2167 |
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) |
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) |
2168 |
{ |
{ |
2169 |
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
2170 |
|
if ( yy_accept[yy_current_state] ) |
2171 |
|
{ |
2172 |
|
(yy_last_accepting_state) = yy_current_state; |
2173 |
|
(yy_last_accepting_cpos) = yy_cp; |
2174 |
|
} |
2175 |
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
2176 |
{ |
{ |
2177 |
yy_current_state = (int) yy_def[yy_current_state]; |
yy_current_state = (int) yy_def[yy_current_state]; |
2178 |
if ( yy_current_state >= 124 ) |
if ( yy_current_state >= 124 ) |
2179 |
yy_c = yy_meta[(unsigned int) yy_c]; |
yy_c = yy_meta[yy_c]; |
2180 |
} |
} |
2181 |
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
|
*(yy_state_ptr)++ = yy_current_state; |
|
2182 |
} |
} |
2183 |
|
|
2184 |
return yy_current_state; |
return yy_current_state; |
2191 |
*/ |
*/ |
2192 |
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) |
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) |
2193 |
{ |
{ |
2194 |
register int yy_is_jam; |
int yy_is_jam; |
2195 |
|
char *yy_cp = (yy_c_buf_p); |
2196 |
|
|
2197 |
register YY_CHAR yy_c = 1; |
YY_CHAR yy_c = 1; |
2198 |
|
if ( yy_accept[yy_current_state] ) |
2199 |
|
{ |
2200 |
|
(yy_last_accepting_state) = yy_current_state; |
2201 |
|
(yy_last_accepting_cpos) = yy_cp; |
2202 |
|
} |
2203 |
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
2204 |
{ |
{ |
2205 |
yy_current_state = (int) yy_def[yy_current_state]; |
yy_current_state = (int) yy_def[yy_current_state]; |
2206 |
if ( yy_current_state >= 124 ) |
if ( yy_current_state >= 124 ) |
2207 |
yy_c = yy_meta[(unsigned int) yy_c]; |
yy_c = yy_meta[yy_c]; |
2208 |
} |
} |
2209 |
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
2210 |
yy_is_jam = (yy_current_state == 123); |
yy_is_jam = (yy_current_state == 123); |
|
if ( ! yy_is_jam ) |
|
|
*(yy_state_ptr)++ = yy_current_state; |
|
2211 |
|
|
2212 |
return yy_is_jam ? 0 : yy_current_state; |
return yy_is_jam ? 0 : yy_current_state; |
2213 |
} |
} |
2214 |
|
|
2215 |
static void yyunput (int c, register char * yy_bp ) |
#ifndef YY_NO_UNPUT |
|
{ |
|
|
register char *yy_cp; |
|
2216 |
|
|
2217 |
|
static void yyunput (int c, char * yy_bp ) |
2218 |
|
{ |
2219 |
|
char *yy_cp; |
2220 |
|
|
2221 |
yy_cp = (yy_c_buf_p); |
yy_cp = (yy_c_buf_p); |
2222 |
|
|
2223 |
/* undo effects of setting up typ_text */ |
/* undo effects of setting up yytext */ |
2224 |
*yy_cp = (yy_hold_char); |
*yy_cp = (yy_hold_char); |
2225 |
|
|
2226 |
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
2227 |
{ /* need to shift things up to make room */ |
{ /* need to shift things up to make room */ |
2228 |
/* +2 for EOB chars. */ |
/* +2 for EOB chars. */ |
2229 |
register int number_to_move = (yy_n_chars) + 2; |
int number_to_move = (yy_n_chars) + 2; |
2230 |
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ |
char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ |
2231 |
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; |
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; |
2232 |
register char *source = |
char *source = |
2233 |
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; |
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; |
2234 |
|
|
2235 |
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
2238 |
yy_cp += (int) (dest - source); |
yy_cp += (int) (dest - source); |
2239 |
yy_bp += (int) (dest - source); |
yy_bp += (int) (dest - source); |
2240 |
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = |
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = |
2241 |
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; |
(yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; |
2242 |
|
|
2243 |
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
2244 |
YY_FATAL_ERROR( "flex scanner push-back overflow" ); |
YY_FATAL_ERROR( "flex scanner push-back overflow" ); |
2247 |
*--yy_cp = (char) c; |
*--yy_cp = (char) c; |
2248 |
|
|
2249 |
if ( c == '\n' ){ |
if ( c == '\n' ){ |
2250 |
--typ_lineno; |
--yylineno; |
2251 |
} |
} |
2252 |
|
|
2253 |
(yytext_ptr) = yy_bp; |
(yytext_ptr) = yy_bp; |
2255 |
(yy_c_buf_p) = yy_cp; |
(yy_c_buf_p) = yy_cp; |
2256 |
} |
} |
2257 |
|
|
2258 |
|
#endif |
2259 |
|
|
2260 |
#ifndef YY_NO_INPUT |
#ifndef YY_NO_INPUT |
2261 |
#ifdef __cplusplus |
#ifdef __cplusplus |
2262 |
static int yyinput (void) |
static int yyinput (void) |
2266 |
|
|
2267 |
{ |
{ |
2268 |
int c; |
int c; |
2269 |
|
|
2270 |
*(yy_c_buf_p) = (yy_hold_char); |
*(yy_c_buf_p) = (yy_hold_char); |
2271 |
|
|
2272 |
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) |
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) |
2281 |
|
|
2282 |
else |
else |
2283 |
{ /* need more input */ |
{ /* need more input */ |
2284 |
int offset = (yy_c_buf_p) - (yytext_ptr); |
int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); |
2285 |
++(yy_c_buf_p); |
++(yy_c_buf_p); |
2286 |
|
|
2287 |
switch ( yy_get_next_buffer( ) ) |
switch ( yy_get_next_buffer( ) ) |
2298 |
*/ |
*/ |
2299 |
|
|
2300 |
/* Reset buffer status. */ |
/* Reset buffer status. */ |
2301 |
typ_restart(typ_in ); |
yyrestart( yyin ); |
2302 |
|
|
2303 |
/*FALLTHROUGH*/ |
/*FALLTHROUGH*/ |
2304 |
|
|
2305 |
case EOB_ACT_END_OF_FILE: |
case EOB_ACT_END_OF_FILE: |
2306 |
{ |
{ |
2307 |
if ( typ_wrap( ) ) |
if ( yywrap( ) ) |
2308 |
return EOF; |
return 0; |
2309 |
|
|
2310 |
if ( ! (yy_did_buffer_switch_on_eof) ) |
if ( ! (yy_did_buffer_switch_on_eof) ) |
2311 |
YY_NEW_FILE; |
YY_NEW_FILE; |
2324 |
} |
} |
2325 |
|
|
2326 |
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ |
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ |
2327 |
*(yy_c_buf_p) = '\0'; /* preserve typ_text */ |
*(yy_c_buf_p) = '\0'; /* preserve yytext */ |
2328 |
(yy_hold_char) = *++(yy_c_buf_p); |
(yy_hold_char) = *++(yy_c_buf_p); |
2329 |
|
|
2330 |
if ( c == '\n' ) |
if ( c == '\n' ) |
2331 |
|
|
2332 |
typ_lineno++; |
yylineno++; |
2333 |
; |
; |
2334 |
|
|
2335 |
return c; |
return c; |
2338 |
|
|
2339 |
/** Immediately switch to a different input stream. |
/** Immediately switch to a different input stream. |
2340 |
* @param input_file A readable stream. |
* @param input_file A readable stream. |
2341 |
* |
* |
2342 |
* @note This function does not reset the start condition to @c INITIAL . |
* @note This function does not reset the start condition to @c INITIAL . |
2343 |
*/ |
*/ |
2344 |
void typ_restart (FILE * input_file ) |
void yyrestart (FILE * input_file ) |
2345 |
{ |
{ |
2346 |
|
|
2347 |
if ( ! YY_CURRENT_BUFFER ){ |
if ( ! YY_CURRENT_BUFFER ){ |
2348 |
typ_ensure_buffer_stack (); |
yyensure_buffer_stack (); |
2349 |
YY_CURRENT_BUFFER_LVALUE = |
YY_CURRENT_BUFFER_LVALUE = |
2350 |
typ__create_buffer(typ_in,YY_BUF_SIZE ); |
yy_create_buffer( yyin, YY_BUF_SIZE ); |
2351 |
} |
} |
2352 |
|
|
2353 |
typ__init_buffer(YY_CURRENT_BUFFER,input_file ); |
yy_init_buffer( YY_CURRENT_BUFFER, input_file ); |
2354 |
typ__load_buffer_state( ); |
yy_load_buffer_state( ); |
2355 |
} |
} |
2356 |
|
|
2357 |
/** Switch to a different input buffer. |
/** Switch to a different input buffer. |
2358 |
* @param new_buffer The new input buffer. |
* @param new_buffer The new input buffer. |
2359 |
* |
* |
2360 |
*/ |
*/ |
2361 |
void typ__switch_to_buffer (YY_BUFFER_STATE new_buffer ) |
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) |
2362 |
{ |
{ |
2363 |
|
|
2364 |
/* TODO. We should be able to replace this entire function body |
/* TODO. We should be able to replace this entire function body |
2365 |
* with |
* with |
2366 |
* typ_pop_buffer_state(); |
* yypop_buffer_state(); |
2367 |
* typ_push_buffer_state(new_buffer); |
* yypush_buffer_state(new_buffer); |
2368 |
*/ |
*/ |
2369 |
typ_ensure_buffer_stack (); |
yyensure_buffer_stack (); |
2370 |
if ( YY_CURRENT_BUFFER == new_buffer ) |
if ( YY_CURRENT_BUFFER == new_buffer ) |
2371 |
return; |
return; |
2372 |
|
|
2379 |
} |
} |
2380 |
|
|
2381 |
YY_CURRENT_BUFFER_LVALUE = new_buffer; |
YY_CURRENT_BUFFER_LVALUE = new_buffer; |
2382 |
typ__load_buffer_state( ); |
yy_load_buffer_state( ); |
2383 |
|
|
2384 |
/* We don't actually know whether we did this switch during |
/* We don't actually know whether we did this switch during |
2385 |
* EOF (typ_wrap()) processing, but the only time this flag |
* EOF (yywrap()) processing, but the only time this flag |
2386 |
* is looked at is after typ_wrap() is called, so it's safe |
* is looked at is after yywrap() is called, so it's safe |
2387 |
* to go ahead and always set it. |
* to go ahead and always set it. |
2388 |
*/ |
*/ |
2389 |
(yy_did_buffer_switch_on_eof) = 1; |
(yy_did_buffer_switch_on_eof) = 1; |
2390 |
} |
} |
2391 |
|
|
2392 |
static void typ__load_buffer_state (void) |
static void yy_load_buffer_state (void) |
2393 |
{ |
{ |
2394 |
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
2395 |
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; |
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; |
2396 |
typ_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file; |
yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; |
2397 |
(yy_hold_char) = *(yy_c_buf_p); |
(yy_hold_char) = *(yy_c_buf_p); |
2398 |
} |
} |
2399 |
|
|
2400 |
/** Allocate and initialize an input buffer state. |
/** Allocate and initialize an input buffer state. |
2401 |
* @param file A readable stream. |
* @param file A readable stream. |
2402 |
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
2403 |
* |
* |
2404 |
* @return the allocated buffer state. |
* @return the allocated buffer state. |
2405 |
*/ |
*/ |
2406 |
YY_BUFFER_STATE typ__create_buffer (FILE * file, int size ) |
YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) |
2407 |
{ |
{ |
2408 |
YY_BUFFER_STATE b; |
YY_BUFFER_STATE b; |
2409 |
|
|
2410 |
b = (YY_BUFFER_STATE) typ_alloc(sizeof( struct yy_buffer_state ) ); |
b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); |
2411 |
if ( ! b ) |
if ( ! b ) |
2412 |
YY_FATAL_ERROR( "out of dynamic memory in typ__create_buffer()" ); |
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
2413 |
|
|
2414 |
b->yy_buf_size = size; |
b->yy_buf_size = size; |
2415 |
|
|
2416 |
/* yy_ch_buf has to be 2 characters longer than the size given because |
/* yy_ch_buf has to be 2 characters longer than the size given because |
2417 |
* we need to put in 2 end-of-buffer characters. |
* we need to put in 2 end-of-buffer characters. |
2418 |
*/ |
*/ |
2419 |
b->yy_ch_buf = (char *) typ_alloc(b->yy_buf_size + 2 ); |
b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); |
2420 |
if ( ! b->yy_ch_buf ) |
if ( ! b->yy_ch_buf ) |
2421 |
YY_FATAL_ERROR( "out of dynamic memory in typ__create_buffer()" ); |
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
2422 |
|
|
2423 |
b->yy_is_our_buffer = 1; |
b->yy_is_our_buffer = 1; |
2424 |
|
|
2425 |
typ__init_buffer(b,file ); |
yy_init_buffer( b, file ); |
2426 |
|
|
2427 |
return b; |
return b; |
2428 |
} |
} |
2429 |
|
|
2430 |
/** Destroy the buffer. |
/** Destroy the buffer. |
2431 |
* @param b a buffer created with typ__create_buffer() |
* @param b a buffer created with yy_create_buffer() |
2432 |
* |
* |
2433 |
*/ |
*/ |
2434 |
void typ__delete_buffer (YY_BUFFER_STATE b ) |
void yy_delete_buffer (YY_BUFFER_STATE b ) |
2435 |
{ |
{ |
2436 |
|
|
2437 |
if ( ! b ) |
if ( ! b ) |
2438 |
return; |
return; |
2439 |
|
|
2441 |
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
2442 |
|
|
2443 |
if ( b->yy_is_our_buffer ) |
if ( b->yy_is_our_buffer ) |
2444 |
typ_free((void *) b->yy_ch_buf ); |
yyfree( (void *) b->yy_ch_buf ); |
2445 |
|
|
2446 |
typ_free((void *) b ); |
yyfree( (void *) b ); |
2447 |
} |
} |
2448 |
|
|
|
#ifndef __cplusplus |
|
|
extern int isatty (int ); |
|
|
#endif /* __cplusplus */ |
|
|
|
|
2449 |
/* Initializes or reinitializes a buffer. |
/* Initializes or reinitializes a buffer. |
2450 |
* This function is sometimes called more than once on the same buffer, |
* This function is sometimes called more than once on the same buffer, |
2451 |
* such as during a typ_restart() or at EOF. |
* such as during a yyrestart() or at EOF. |
2452 |
*/ |
*/ |
2453 |
static void typ__init_buffer (YY_BUFFER_STATE b, FILE * file ) |
static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) |
2454 |
|
|
2455 |
{ |
{ |
2456 |
int oerrno = errno; |
int oerrno = errno; |
2457 |
|
|
2458 |
typ__flush_buffer(b ); |
yy_flush_buffer( b ); |
2459 |
|
|
2460 |
b->yy_input_file = file; |
b->yy_input_file = file; |
2461 |
b->yy_fill_buffer = 1; |
b->yy_fill_buffer = 1; |
2462 |
|
|
2463 |
/* If b is the current buffer, then typ__init_buffer was _probably_ |
/* If b is the current buffer, then yy_init_buffer was _probably_ |
2464 |
* called from typ_restart() or through yy_get_next_buffer. |
* called from yyrestart() or through yy_get_next_buffer. |
2465 |
* In that case, we don't want to reset the lineno or column. |
* In that case, we don't want to reset the lineno or column. |
2466 |
*/ |
*/ |
2467 |
if (b != YY_CURRENT_BUFFER){ |
if (b != YY_CURRENT_BUFFER){ |
2470 |
} |
} |
2471 |
|
|
2472 |
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
2473 |
|
|
2474 |
errno = oerrno; |
errno = oerrno; |
2475 |
} |
} |
2476 |
|
|
2477 |
/** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
/** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
2478 |
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
2479 |
* |
* |
2480 |
*/ |
*/ |
2481 |
void typ__flush_buffer (YY_BUFFER_STATE b ) |
void yy_flush_buffer (YY_BUFFER_STATE b ) |
2482 |
{ |
{ |
2483 |
if ( ! b ) |
if ( ! b ) |
2484 |
return; |
return; |
2498 |
b->yy_buffer_status = YY_BUFFER_NEW; |
b->yy_buffer_status = YY_BUFFER_NEW; |
2499 |
|
|
2500 |
if ( b == YY_CURRENT_BUFFER ) |
if ( b == YY_CURRENT_BUFFER ) |
2501 |
typ__load_buffer_state( ); |
yy_load_buffer_state( ); |
2502 |
} |
} |
2503 |
|
|
2504 |
/** Pushes the new state onto the stack. The new state becomes |
/** Pushes the new state onto the stack. The new state becomes |
2505 |
* the current state. This function will allocate the stack |
* the current state. This function will allocate the stack |
2506 |
* if necessary. |
* if necessary. |
2507 |
* @param new_buffer The new state. |
* @param new_buffer The new state. |
2508 |
* |
* |
2509 |
*/ |
*/ |
2510 |
void typ_push_buffer_state (YY_BUFFER_STATE new_buffer ) |
void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) |
2511 |
{ |
{ |
2512 |
if (new_buffer == NULL) |
if (new_buffer == NULL) |
2513 |
return; |
return; |
2514 |
|
|
2515 |
typ_ensure_buffer_stack(); |
yyensure_buffer_stack(); |
2516 |
|
|
2517 |
/* This block is copied from typ__switch_to_buffer. */ |
/* This block is copied from yy_switch_to_buffer. */ |
2518 |
if ( YY_CURRENT_BUFFER ) |
if ( YY_CURRENT_BUFFER ) |
2519 |
{ |
{ |
2520 |
/* Flush out information for old buffer. */ |
/* Flush out information for old buffer. */ |
2528 |
(yy_buffer_stack_top)++; |
(yy_buffer_stack_top)++; |
2529 |
YY_CURRENT_BUFFER_LVALUE = new_buffer; |
YY_CURRENT_BUFFER_LVALUE = new_buffer; |
2530 |
|
|
2531 |
/* copied from typ__switch_to_buffer. */ |
/* copied from yy_switch_to_buffer. */ |
2532 |
typ__load_buffer_state( ); |
yy_load_buffer_state( ); |
2533 |
(yy_did_buffer_switch_on_eof) = 1; |
(yy_did_buffer_switch_on_eof) = 1; |
2534 |
} |
} |
2535 |
|
|
2536 |
/** Removes and deletes the top of the stack, if present. |
/** Removes and deletes the top of the stack, if present. |
2537 |
* The next element becomes the new top. |
* The next element becomes the new top. |
2538 |
* |
* |
2539 |
*/ |
*/ |
2540 |
void typ_pop_buffer_state (void) |
void yypop_buffer_state (void) |
2541 |
{ |
{ |
2542 |
if (!YY_CURRENT_BUFFER) |
if (!YY_CURRENT_BUFFER) |
2543 |
return; |
return; |
2544 |
|
|
2545 |
typ__delete_buffer(YY_CURRENT_BUFFER ); |
yy_delete_buffer(YY_CURRENT_BUFFER ); |
2546 |
YY_CURRENT_BUFFER_LVALUE = NULL; |
YY_CURRENT_BUFFER_LVALUE = NULL; |
2547 |
if ((yy_buffer_stack_top) > 0) |
if ((yy_buffer_stack_top) > 0) |
2548 |
--(yy_buffer_stack_top); |
--(yy_buffer_stack_top); |
2549 |
|
|
2550 |
if (YY_CURRENT_BUFFER) { |
if (YY_CURRENT_BUFFER) { |
2551 |
typ__load_buffer_state( ); |
yy_load_buffer_state( ); |
2552 |
(yy_did_buffer_switch_on_eof) = 1; |
(yy_did_buffer_switch_on_eof) = 1; |
2553 |
} |
} |
2554 |
} |
} |
2556 |
/* Allocates the stack if it does not exist. |
/* Allocates the stack if it does not exist. |
2557 |
* Guarantees space for at least one push. |
* Guarantees space for at least one push. |
2558 |
*/ |
*/ |
2559 |
static void typ_ensure_buffer_stack (void) |
static void yyensure_buffer_stack (void) |
2560 |
{ |
{ |
2561 |
int num_to_alloc; |
yy_size_t num_to_alloc; |
2562 |
|
|
2563 |
if (!(yy_buffer_stack)) { |
if (!(yy_buffer_stack)) { |
2564 |
|
|
2565 |
/* First allocation is just for 2 elements, since we don't know if this |
/* First allocation is just for 2 elements, since we don't know if this |
2566 |
* scanner will even need a stack. We use 2 instead of 1 to avoid an |
* scanner will even need a stack. We use 2 instead of 1 to avoid an |
2567 |
* immediate realloc on the next call. |
* immediate realloc on the next call. |
2568 |
*/ |
*/ |
2569 |
num_to_alloc = 1; |
num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ |
2570 |
(yy_buffer_stack) = (struct yy_buffer_state**)typ_alloc |
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc |
2571 |
(num_to_alloc * sizeof(struct yy_buffer_state*) |
(num_to_alloc * sizeof(struct yy_buffer_state*) |
2572 |
); |
); |
2573 |
|
if ( ! (yy_buffer_stack) ) |
2574 |
|
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
2575 |
|
|
2576 |
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
2577 |
|
|
2583 |
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ |
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ |
2584 |
|
|
2585 |
/* Increase the buffer to prepare for a possible push. */ |
/* Increase the buffer to prepare for a possible push. */ |
2586 |
int grow_size = 8 /* arbitrary grow size */; |
yy_size_t grow_size = 8 /* arbitrary grow size */; |
2587 |
|
|
2588 |
num_to_alloc = (yy_buffer_stack_max) + grow_size; |
num_to_alloc = (yy_buffer_stack_max) + grow_size; |
2589 |
(yy_buffer_stack) = (struct yy_buffer_state**)typ_realloc |
(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc |
2590 |
((yy_buffer_stack), |
((yy_buffer_stack), |
2591 |
num_to_alloc * sizeof(struct yy_buffer_state*) |
num_to_alloc * sizeof(struct yy_buffer_state*) |
2592 |
); |
); |
2593 |
|
if ( ! (yy_buffer_stack) ) |
2594 |
|
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
2595 |
|
|
2596 |
/* zero only the new slots.*/ |
/* zero only the new slots.*/ |
2597 |
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); |
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); |
2602 |
/** Setup the input buffer state to scan directly from a user-specified character buffer. |
/** Setup the input buffer state to scan directly from a user-specified character buffer. |
2603 |
* @param base the character buffer |
* @param base the character buffer |
2604 |
* @param size the size in bytes of the character buffer |
* @param size the size in bytes of the character buffer |
2605 |
* |
* |
2606 |
* @return the newly allocated buffer state object. |
* @return the newly allocated buffer state object. |
2607 |
*/ |
*/ |
2608 |
YY_BUFFER_STATE typ__scan_buffer (char * base, yy_size_t size ) |
YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) |
2609 |
{ |
{ |
2610 |
YY_BUFFER_STATE b; |
YY_BUFFER_STATE b; |
2611 |
|
|
2612 |
if ( size < 2 || |
if ( size < 2 || |
2613 |
base[size-2] != YY_END_OF_BUFFER_CHAR || |
base[size-2] != YY_END_OF_BUFFER_CHAR || |
2614 |
base[size-1] != YY_END_OF_BUFFER_CHAR ) |
base[size-1] != YY_END_OF_BUFFER_CHAR ) |
2615 |
/* They forgot to leave room for the EOB's. */ |
/* They forgot to leave room for the EOB's. */ |
2616 |
return 0; |
return NULL; |
2617 |
|
|
2618 |
b = (YY_BUFFER_STATE) typ_alloc(sizeof( struct yy_buffer_state ) ); |
b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); |
2619 |
if ( ! b ) |
if ( ! b ) |
2620 |
YY_FATAL_ERROR( "out of dynamic memory in typ__scan_buffer()" ); |
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); |
2621 |
|
|
2622 |
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ |
b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ |
2623 |
b->yy_buf_pos = b->yy_ch_buf = base; |
b->yy_buf_pos = b->yy_ch_buf = base; |
2624 |
b->yy_is_our_buffer = 0; |
b->yy_is_our_buffer = 0; |
2625 |
b->yy_input_file = 0; |
b->yy_input_file = NULL; |
2626 |
b->yy_n_chars = b->yy_buf_size; |
b->yy_n_chars = b->yy_buf_size; |
2627 |
b->yy_is_interactive = 0; |
b->yy_is_interactive = 0; |
2628 |
b->yy_at_bol = 1; |
b->yy_at_bol = 1; |
2629 |
b->yy_fill_buffer = 0; |
b->yy_fill_buffer = 0; |
2630 |
b->yy_buffer_status = YY_BUFFER_NEW; |
b->yy_buffer_status = YY_BUFFER_NEW; |
2631 |
|
|
2632 |
typ__switch_to_buffer(b ); |
yy_switch_to_buffer( b ); |
2633 |
|
|
2634 |
return b; |
return b; |
2635 |
} |
} |
2636 |
|
|
2637 |
/** Setup the input buffer state to scan a string. The next call to typ_lex() will |
/** Setup the input buffer state to scan a string. The next call to yylex() will |
2638 |
* scan from a @e copy of @a str. |
* scan from a @e copy of @a str. |
2639 |
* @param str a NUL-terminated string to scan |
* @param yystr a NUL-terminated string to scan |
2640 |
* |
* |
2641 |
* @return the newly allocated buffer state object. |
* @return the newly allocated buffer state object. |
2642 |
* @note If you want to scan bytes that may contain NUL values, then use |
* @note If you want to scan bytes that may contain NUL values, then use |
2643 |
* typ__scan_bytes() instead. |
* yy_scan_bytes() instead. |
2644 |
*/ |
*/ |
2645 |
YY_BUFFER_STATE typ__scan_string (yyconst char * yystr ) |
YY_BUFFER_STATE yy_scan_string (const char * yystr ) |
2646 |
{ |
{ |
2647 |
|
|
2648 |
return typ__scan_bytes(yystr,strlen(yystr) ); |
return yy_scan_bytes( yystr, (int) strlen(yystr) ); |
2649 |
} |
} |
2650 |
|
|
2651 |
/** Setup the input buffer state to scan the given bytes. The next call to typ_lex() will |
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will |
2652 |
* scan from a @e copy of @a bytes. |
* scan from a @e copy of @a bytes. |
2653 |
* @param bytes the byte buffer to scan |
* @param yybytes the byte buffer to scan |
2654 |
* @param len the number of bytes in the buffer pointed to by @a bytes. |
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
2655 |
* |
* |
2656 |
* @return the newly allocated buffer state object. |
* @return the newly allocated buffer state object. |
2657 |
*/ |
*/ |
2658 |
YY_BUFFER_STATE typ__scan_bytes (yyconst char * yybytes, int _yybytes_len ) |
YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) |
2659 |
{ |
{ |
2660 |
YY_BUFFER_STATE b; |
YY_BUFFER_STATE b; |
2661 |
char *buf; |
char *buf; |
2662 |
yy_size_t n; |
yy_size_t n; |
2663 |
int i; |
int i; |
2664 |
|
|
2665 |
/* Get memory for full buffer, including space for trailing EOB's. */ |
/* Get memory for full buffer, including space for trailing EOB's. */ |
2666 |
n = _yybytes_len + 2; |
n = (yy_size_t) (_yybytes_len + 2); |
2667 |
buf = (char *) typ_alloc(n ); |
buf = (char *) yyalloc( n ); |
2668 |
if ( ! buf ) |
if ( ! buf ) |
2669 |
YY_FATAL_ERROR( "out of dynamic memory in typ__scan_bytes()" ); |
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); |
2670 |
|
|
2671 |
for ( i = 0; i < _yybytes_len; ++i ) |
for ( i = 0; i < _yybytes_len; ++i ) |
2672 |
buf[i] = yybytes[i]; |
buf[i] = yybytes[i]; |
2673 |
|
|
2674 |
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
2675 |
|
|
2676 |
b = typ__scan_buffer(buf,n ); |
b = yy_scan_buffer( buf, n ); |
2677 |
if ( ! b ) |
if ( ! b ) |
2678 |
YY_FATAL_ERROR( "bad buffer in typ__scan_bytes()" ); |
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); |
2679 |
|
|
2680 |
/* It's okay to grow etc. this buffer, and we should throw it |
/* It's okay to grow etc. this buffer, and we should throw it |
2681 |
* away when we're done. |
* away when we're done. |
2689 |
#define YY_EXIT_FAILURE 2 |
#define YY_EXIT_FAILURE 2 |
2690 |
#endif |
#endif |
2691 |
|
|
2692 |
static void yy_fatal_error (yyconst char* msg ) |
static void yynoreturn yy_fatal_error (const char* msg ) |
2693 |
{ |
{ |
2694 |
(void) fprintf( stderr, "%s\n", msg ); |
fprintf( stderr, "%s\n", msg ); |
2695 |
exit( YY_EXIT_FAILURE ); |
exit( YY_EXIT_FAILURE ); |
2696 |
} |
} |
2697 |
|
|
2701 |
#define yyless(n) \ |
#define yyless(n) \ |
2702 |
do \ |
do \ |
2703 |
{ \ |
{ \ |
2704 |
/* Undo effects of setting up typ_text. */ \ |
/* Undo effects of setting up yytext. */ \ |
2705 |
int yyless_macro_arg = (n); \ |
int yyless_macro_arg = (n); \ |
2706 |
YY_LESS_LINENO(yyless_macro_arg);\ |
YY_LESS_LINENO(yyless_macro_arg);\ |
2707 |
typ_text[typ_leng] = (yy_hold_char); \ |
yytext[yyleng] = (yy_hold_char); \ |
2708 |
(yy_c_buf_p) = typ_text + yyless_macro_arg; \ |
(yy_c_buf_p) = yytext + yyless_macro_arg; \ |
2709 |
(yy_hold_char) = *(yy_c_buf_p); \ |
(yy_hold_char) = *(yy_c_buf_p); \ |
2710 |
*(yy_c_buf_p) = '\0'; \ |
*(yy_c_buf_p) = '\0'; \ |
2711 |
typ_leng = yyless_macro_arg; \ |
yyleng = yyless_macro_arg; \ |
2712 |
} \ |
} \ |
2713 |
while ( 0 ) |
while ( 0 ) |
2714 |
|
|
2715 |
/* Accessor methods (get/set functions) to struct members. */ |
/* Accessor methods (get/set functions) to struct members. */ |
2716 |
|
|
2717 |
/** Get the current line number. |
/** Get the current line number. |
2718 |
* |
* |
2719 |
*/ |
*/ |
2720 |
int typ_get_lineno (void) |
int yyget_lineno (void) |
2721 |
{ |
{ |
2722 |
|
|
2723 |
return typ_lineno; |
return yylineno; |
2724 |
} |
} |
2725 |
|
|
2726 |
/** Get the input stream. |
/** Get the input stream. |
2727 |
* |
* |
2728 |
*/ |
*/ |
2729 |
FILE *typ_get_in (void) |
FILE *yyget_in (void) |
2730 |
{ |
{ |
2731 |
return typ_in; |
return yyin; |
2732 |
} |
} |
2733 |
|
|
2734 |
/** Get the output stream. |
/** Get the output stream. |
2735 |
* |
* |
2736 |
*/ |
*/ |
2737 |
FILE *typ_get_out (void) |
FILE *yyget_out (void) |
2738 |
{ |
{ |
2739 |
return typ_out; |
return yyout; |
2740 |
} |
} |
2741 |
|
|
2742 |
/** Get the length of the current token. |
/** Get the length of the current token. |
2743 |
* |
* |
2744 |
*/ |
*/ |
2745 |
int typ_get_leng (void) |
int yyget_leng (void) |
2746 |
{ |
{ |
2747 |
return typ_leng; |
return yyleng; |
2748 |
} |
} |
2749 |
|
|
2750 |
/** Get the current token. |
/** Get the current token. |
2751 |
* |
* |
2752 |
*/ |
*/ |
2753 |
|
|
2754 |
char *typ_get_text (void) |
char *yyget_text (void) |
2755 |
{ |
{ |
2756 |
return typ_text; |
return yytext; |
2757 |
} |
} |
2758 |
|
|
2759 |
/** Set the current line number. |
/** Set the current line number. |
2760 |
* @param line_number |
* @param _line_number line number |
2761 |
* |
* |
2762 |
*/ |
*/ |
2763 |
void typ_set_lineno (int line_number ) |
void yyset_lineno (int _line_number ) |
2764 |
{ |
{ |
2765 |
|
|
2766 |
typ_lineno = line_number; |
yylineno = _line_number; |
2767 |
} |
} |
2768 |
|
|
2769 |
/** Set the input stream. This does not discard the current |
/** Set the input stream. This does not discard the current |
2770 |
* input buffer. |
* input buffer. |
2771 |
* @param in_str A readable stream. |
* @param _in_str A readable stream. |
2772 |
* |
* |
2773 |
* @see typ__switch_to_buffer |
* @see yy_switch_to_buffer |
2774 |
*/ |
*/ |
2775 |
void typ_set_in (FILE * in_str ) |
void yyset_in (FILE * _in_str ) |
2776 |
{ |
{ |
2777 |
typ_in = in_str ; |
yyin = _in_str ; |
2778 |
} |
} |
2779 |
|
|
2780 |
void typ_set_out (FILE * out_str ) |
void yyset_out (FILE * _out_str ) |
2781 |
{ |
{ |
2782 |
typ_out = out_str ; |
yyout = _out_str ; |
2783 |
} |
} |
2784 |
|
|
2785 |
int typ_get_debug (void) |
int yyget_debug (void) |
2786 |
{ |
{ |
2787 |
return typ__flex_debug; |
return yy_flex_debug; |
2788 |
} |
} |
2789 |
|
|
2790 |
void typ_set_debug (int bdebug ) |
void yyset_debug (int _bdebug ) |
2791 |
{ |
{ |
2792 |
typ__flex_debug = bdebug ; |
yy_flex_debug = _bdebug ; |
2793 |
} |
} |
2794 |
|
|
2795 |
static int yy_init_globals (void) |
static int yy_init_globals (void) |
2796 |
{ |
{ |
2797 |
/* Initialization is the same as for the non-reentrant scanner. |
/* Initialization is the same as for the non-reentrant scanner. |
2798 |
* This function is called from typ_lex_destroy(), so don't allocate here. |
* This function is called from yylex_destroy(), so don't allocate here. |
2799 |
*/ |
*/ |
2800 |
|
|
2801 |
/* We do not touch typ_lineno unless the option is enabled. */ |
/* We do not touch yylineno unless the option is enabled. */ |
2802 |
typ_lineno = 1; |
yylineno = 1; |
2803 |
|
|
2804 |
(yy_buffer_stack) = 0; |
(yy_buffer_stack) = NULL; |
2805 |
(yy_buffer_stack_top) = 0; |
(yy_buffer_stack_top) = 0; |
2806 |
(yy_buffer_stack_max) = 0; |
(yy_buffer_stack_max) = 0; |
2807 |
(yy_c_buf_p) = (char *) 0; |
(yy_c_buf_p) = NULL; |
2808 |
(yy_init) = 0; |
(yy_init) = 0; |
2809 |
(yy_start) = 0; |
(yy_start) = 0; |
2810 |
|
|
|
(yy_state_buf) = 0; |
|
|
(yy_state_ptr) = 0; |
|
|
(yy_full_match) = 0; |
|
|
(yy_lp) = 0; |
|
|
|
|
2811 |
/* Defined in main.c */ |
/* Defined in main.c */ |
2812 |
#ifdef YY_STDINIT |
#ifdef YY_STDINIT |
2813 |
typ_in = stdin; |
yyin = stdin; |
2814 |
typ_out = stdout; |
yyout = stdout; |
2815 |
#else |
#else |
2816 |
typ_in = (FILE *) 0; |
yyin = NULL; |
2817 |
typ_out = (FILE *) 0; |
yyout = NULL; |
2818 |
#endif |
#endif |
2819 |
|
|
2820 |
/* For future reference: Set errno on error, since we are called by |
/* For future reference: Set errno on error, since we are called by |
2821 |
* typ_lex_init() |
* yylex_init() |
2822 |
*/ |
*/ |
2823 |
return 0; |
return 0; |
2824 |
} |
} |
2825 |
|
|
2826 |
/* typ_lex_destroy is for both reentrant and non-reentrant scanners. */ |
/* yylex_destroy is for both reentrant and non-reentrant scanners. */ |
2827 |
int typ_lex_destroy (void) |
int yylex_destroy (void) |
2828 |
{ |
{ |
2829 |
|
|
2830 |
/* Pop the buffer stack, destroying each element. */ |
/* Pop the buffer stack, destroying each element. */ |
2831 |
while(YY_CURRENT_BUFFER){ |
while(YY_CURRENT_BUFFER){ |
2832 |
typ__delete_buffer(YY_CURRENT_BUFFER ); |
yy_delete_buffer( YY_CURRENT_BUFFER ); |
2833 |
YY_CURRENT_BUFFER_LVALUE = NULL; |
YY_CURRENT_BUFFER_LVALUE = NULL; |
2834 |
typ_pop_buffer_state(); |
yypop_buffer_state(); |
2835 |
} |
} |
2836 |
|
|
2837 |
/* Destroy the stack itself. */ |
/* Destroy the stack itself. */ |
2838 |
typ_free((yy_buffer_stack) ); |
yyfree((yy_buffer_stack) ); |
2839 |
(yy_buffer_stack) = NULL; |
(yy_buffer_stack) = NULL; |
2840 |
|
|
|
typ_free ( (yy_state_buf) ); |
|
|
(yy_state_buf) = NULL; |
|
|
|
|
2841 |
/* Reset the globals. This is important in a non-reentrant scanner so the next time |
/* Reset the globals. This is important in a non-reentrant scanner so the next time |
2842 |
* typ_lex() is called, initialization will occur. */ |
* yylex() is called, initialization will occur. */ |
2843 |
yy_init_globals( ); |
yy_init_globals( ); |
2844 |
|
|
2845 |
return 0; |
return 0; |
2850 |
*/ |
*/ |
2851 |
|
|
2852 |
#ifndef yytext_ptr |
#ifndef yytext_ptr |
2853 |
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) |
static void yy_flex_strncpy (char* s1, const char * s2, int n ) |
2854 |
{ |
{ |
2855 |
register int i; |
|
2856 |
|
int i; |
2857 |
for ( i = 0; i < n; ++i ) |
for ( i = 0; i < n; ++i ) |
2858 |
s1[i] = s2[i]; |
s1[i] = s2[i]; |
2859 |
} |
} |
2860 |
#endif |
#endif |
2861 |
|
|
2862 |
#ifdef YY_NEED_STRLEN |
#ifdef YY_NEED_STRLEN |
2863 |
static int yy_flex_strlen (yyconst char * s ) |
static int yy_flex_strlen (const char * s ) |
2864 |
{ |
{ |
2865 |
register int n; |
int n; |
2866 |
for ( n = 0; s[n]; ++n ) |
for ( n = 0; s[n]; ++n ) |
2867 |
; |
; |
2868 |
|
|
2870 |
} |
} |
2871 |
#endif |
#endif |
2872 |
|
|
2873 |
void *typ_alloc (yy_size_t size ) |
void *yyalloc (yy_size_t size ) |
2874 |
{ |
{ |
2875 |
return (void *) malloc( size ); |
return malloc(size); |
2876 |
} |
} |
2877 |
|
|
2878 |
void *typ_realloc (void * ptr, yy_size_t size ) |
void *yyrealloc (void * ptr, yy_size_t size ) |
2879 |
{ |
{ |
2880 |
|
|
2881 |
/* The cast to (char *) in the following accommodates both |
/* The cast to (char *) in the following accommodates both |
2882 |
* implementations that use char* generic pointers, and those |
* implementations that use char* generic pointers, and those |
2883 |
* that use void* generic pointers. It works with the latter |
* that use void* generic pointers. It works with the latter |
2885 |
* any pointer type to void*, and deal with argument conversions |
* any pointer type to void*, and deal with argument conversions |
2886 |
* as though doing an assignment. |
* as though doing an assignment. |
2887 |
*/ |
*/ |
2888 |
return (void *) realloc( (char *) ptr, size ); |
return realloc(ptr, size); |
2889 |
} |
} |
2890 |
|
|
2891 |
void typ_free (void * ptr ) |
void yyfree (void * ptr ) |
2892 |
{ |
{ |
2893 |
free( (char *) ptr ); /* see typ_realloc() for (char *) cast */ |
free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ |
2894 |
} |
} |
2895 |
|
|
2896 |
#define YYTABLES_NAME "yytables" |
#define YYTABLES_NAME "yytables" |
2897 |
|
|
2898 |
#line 627 "tcltk/generic/interface/typelex.l" |
#line 623 "tcltk/interface/typelex.l" |
|
|
|
2899 |
|
|
2900 |
/* |
/* |
2901 |
* int typ_wrap(void); |
* int typ_wrap(void); |