Rev 5563 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5563 | Rev 7195 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | #line 2 "glcpp/glcpp-lex.c" |
- | |
Line 2... | Line 1... | ||
2 | 1 | #line 2 " |
|
Line 3... | Line 2... | ||
3 | #line 4 "glcpp/glcpp-lex.c" |
2 | |
Line 4... | Line 3... | ||
4 | 3 | #define YY_INT_ALIGNED short int |
|
Line 5... | Line 4... | ||
5 | #define YY_INT_ALIGNED short int |
4 | |
6 | 5 | /* A lexical scanner generated by flex */ |
|
7 | /* A lexical scanner generated by flex */ |
6 | |
8 | 7 | #define FLEX_SCANNER |
|
9 | #define FLEX_SCANNER |
8 | #define YY_FLEX_MAJOR_VERSION 2 |
10 | #define YY_FLEX_MAJOR_VERSION 2 |
9 | #define YY_FLEX_MINOR_VERSION 6 |
11 | #define YY_FLEX_MINOR_VERSION 5 |
10 | #define YY_FLEX_SUBMINOR_VERSION 4 |
Line -... | Line 11... | ||
- | 11 | #if YY_FLEX_SUBMINOR_VERSION > 0 |
|
- | 12 | #define FLEX_BETA |
|
- | 13 | #endif |
|
- | 14 | ||
- | 15 | #ifdef yy_create_buffer |
|
- | 16 | #define glcpp__create_buffer_ALREADY_DEFINED |
|
- | 17 | #else |
|
- | 18 | #define yy_create_buffer glcpp__create_buffer |
|
- | 19 | #endif |
|
- | 20 | ||
- | 21 | #ifdef yy_delete_buffer |
|
- | 22 | #define glcpp__delete_buffer_ALREADY_DEFINED |
|
- | 23 | #else |
|
- | 24 | #define yy_delete_buffer glcpp__delete_buffer |
|
- | 25 | #endif |
|
- | 26 | ||
- | 27 | #ifdef yy_scan_buffer |
|
- | 28 | #define glcpp__scan_buffer_ALREADY_DEFINED |
|
- | 29 | #else |
|
- | 30 | #define yy_scan_buffer glcpp__scan_buffer |
|
- | 31 | #endif |
|
- | 32 | ||
- | 33 | #ifdef yy_scan_string |
|
- | 34 | #define glcpp__scan_string_ALREADY_DEFINED |
|
- | 35 | #else |
|
- | 36 | #define yy_scan_string glcpp__scan_string |
|
- | 37 | #endif |
|
- | 38 | ||
- | 39 | #ifdef yy_scan_bytes |
|
- | 40 | #define glcpp__scan_bytes_ALREADY_DEFINED |
|
- | 41 | #else |
|
- | 42 | #define yy_scan_bytes glcpp__scan_bytes |
|
- | 43 | #endif |
|
- | 44 | ||
- | 45 | #ifdef yy_init_buffer |
|
- | 46 | #define glcpp__init_buffer_ALREADY_DEFINED |
|
- | 47 | #else |
|
- | 48 | #define yy_init_buffer glcpp__init_buffer |
|
- | 49 | #endif |
|
- | 50 | ||
- | 51 | #ifdef yy_flush_buffer |
|
- | 52 | #define glcpp__flush_buffer_ALREADY_DEFINED |
|
- | 53 | #else |
|
- | 54 | #define yy_flush_buffer glcpp__flush_buffer |
|
- | 55 | #endif |
|
- | 56 | ||
- | 57 | #ifdef yy_load_buffer_state |
|
- | 58 | #define glcpp__load_buffer_state_ALREADY_DEFINED |
|
- | 59 | #else |
|
- | 60 | #define yy_load_buffer_state glcpp__load_buffer_state |
|
- | 61 | #endif |
|
- | 62 | ||
- | 63 | #ifdef yy_switch_to_buffer |
|
- | 64 | #define glcpp__switch_to_buffer_ALREADY_DEFINED |
|
- | 65 | #else |
|
- | 66 | #define yy_switch_to_buffer glcpp__switch_to_buffer |
|
- | 67 | #endif |
|
- | 68 | ||
- | 69 | #ifdef yypush_buffer_state |
|
- | 70 | #define glcpp_push_buffer_state_ALREADY_DEFINED |
|
- | 71 | #else |
|
- | 72 | #define yypush_buffer_state glcpp_push_buffer_state |
|
- | 73 | #endif |
|
- | 74 | ||
- | 75 | #ifdef yypop_buffer_state |
|
- | 76 | #define glcpp_pop_buffer_state_ALREADY_DEFINED |
|
- | 77 | #else |
|
- | 78 | #define yypop_buffer_state glcpp_pop_buffer_state |
|
- | 79 | #endif |
|
- | 80 | ||
- | 81 | #ifdef yyensure_buffer_stack |
|
- | 82 | #define glcpp_ensure_buffer_stack_ALREADY_DEFINED |
|
- | 83 | #else |
|
- | 84 | #define yyensure_buffer_stack glcpp_ensure_buffer_stack |
|
- | 85 | #endif |
|
- | 86 | ||
- | 87 | #ifdef yylex |
|
- | 88 | #define glcpp_lex_ALREADY_DEFINED |
|
- | 89 | #else |
|
- | 90 | #define yylex glcpp_lex |
|
- | 91 | #endif |
|
- | 92 | ||
- | 93 | #ifdef yyrestart |
|
- | 94 | #define glcpp_restart_ALREADY_DEFINED |
|
- | 95 | #else |
|
- | 96 | #define yyrestart glcpp_restart |
|
- | 97 | #endif |
|
- | 98 | ||
- | 99 | #ifdef yylex_init |
|
- | 100 | #define glcpp_lex_init_ALREADY_DEFINED |
|
- | 101 | #else |
|
- | 102 | #define yylex_init glcpp_lex_init |
|
- | 103 | #endif |
|
- | 104 | ||
- | 105 | #ifdef yylex_init_extra |
|
- | 106 | #define glcpp_lex_init_extra_ALREADY_DEFINED |
|
- | 107 | #else |
|
- | 108 | #define yylex_init_extra glcpp_lex_init_extra |
|
- | 109 | #endif |
|
- | 110 | ||
- | 111 | #ifdef yylex_destroy |
|
- | 112 | #define glcpp_lex_destroy_ALREADY_DEFINED |
|
- | 113 | #else |
|
- | 114 | #define yylex_destroy glcpp_lex_destroy |
|
- | 115 | #endif |
|
- | 116 | ||
- | 117 | #ifdef yyget_debug |
|
- | 118 | #define glcpp_get_debug_ALREADY_DEFINED |
|
- | 119 | #else |
|
- | 120 | #define yyget_debug glcpp_get_debug |
|
- | 121 | #endif |
|
- | 122 | ||
- | 123 | #ifdef yyset_debug |
|
- | 124 | #define glcpp_set_debug_ALREADY_DEFINED |
|
- | 125 | #else |
|
- | 126 | #define yyset_debug glcpp_set_debug |
|
- | 127 | #endif |
|
- | 128 | ||
- | 129 | #ifdef yyget_extra |
|
- | 130 | #define glcpp_get_extra_ALREADY_DEFINED |
|
- | 131 | #else |
|
- | 132 | #define yyget_extra glcpp_get_extra |
|
- | 133 | #endif |
|
- | 134 | ||
- | 135 | #ifdef yyset_extra |
|
- | 136 | #define glcpp_set_extra_ALREADY_DEFINED |
|
- | 137 | #else |
|
- | 138 | #define yyset_extra glcpp_set_extra |
|
- | 139 | #endif |
|
- | 140 | ||
- | 141 | #ifdef yyget_in |
|
- | 142 | #define glcpp_get_in_ALREADY_DEFINED |
|
- | 143 | #else |
|
- | 144 | #define yyget_in glcpp_get_in |
|
- | 145 | #endif |
|
- | 146 | ||
- | 147 | #ifdef yyset_in |
|
- | 148 | #define glcpp_set_in_ALREADY_DEFINED |
|
- | 149 | #else |
|
- | 150 | #define yyset_in glcpp_set_in |
|
- | 151 | #endif |
|
- | 152 | ||
- | 153 | #ifdef yyget_out |
|
- | 154 | #define glcpp_get_out_ALREADY_DEFINED |
|
- | 155 | #else |
|
- | 156 | #define yyget_out glcpp_get_out |
|
- | 157 | #endif |
|
- | 158 | ||
- | 159 | #ifdef yyset_out |
|
- | 160 | #define glcpp_set_out_ALREADY_DEFINED |
|
- | 161 | #else |
|
- | 162 | #define yyset_out glcpp_set_out |
|
- | 163 | #endif |
|
- | 164 | ||
- | 165 | #ifdef yyget_leng |
|
- | 166 | #define glcpp_get_leng_ALREADY_DEFINED |
|
- | 167 | #else |
|
- | 168 | #define yyget_leng glcpp_get_leng |
|
- | 169 | #endif |
|
- | 170 | ||
- | 171 | #ifdef yyget_text |
|
- | 172 | #define glcpp_get_text_ALREADY_DEFINED |
|
- | 173 | #else |
|
- | 174 | #define yyget_text glcpp_get_text |
|
- | 175 | #endif |
|
- | 176 | ||
- | 177 | #ifdef yyget_lineno |
|
- | 178 | #define glcpp_get_lineno_ALREADY_DEFINED |
|
- | 179 | #else |
|
- | 180 | #define yyget_lineno glcpp_get_lineno |
|
- | 181 | #endif |
|
- | 182 | ||
- | 183 | #ifdef yyset_lineno |
|
- | 184 | #define glcpp_set_lineno_ALREADY_DEFINED |
|
- | 185 | #else |
|
- | 186 | #define yyset_lineno glcpp_set_lineno |
|
- | 187 | #endif |
|
- | 188 | ||
- | 189 | #ifdef yyget_column |
|
- | 190 | #define glcpp_get_column_ALREADY_DEFINED |
|
- | 191 | #else |
|
- | 192 | #define yyget_column glcpp_get_column |
|
- | 193 | #endif |
|
- | 194 | ||
- | 195 | #ifdef yyset_column |
|
- | 196 | #define glcpp_set_column_ALREADY_DEFINED |
|
- | 197 | #else |
|
- | 198 | #define yyset_column glcpp_set_column |
|
- | 199 | #endif |
|
- | 200 | ||
- | 201 | #ifdef yywrap |
|
- | 202 | #define glcpp_wrap_ALREADY_DEFINED |
|
- | 203 | #else |
|
- | 204 | #define yywrap glcpp_wrap |
|
- | 205 | #endif |
|
- | 206 | ||
- | 207 | #ifdef yyget_lval |
|
- | 208 | #define glcpp_get_lval_ALREADY_DEFINED |
|
- | 209 | #else |
|
- | 210 | #define yyget_lval glcpp_get_lval |
|
- | 211 | #endif |
|
- | 212 | ||
- | 213 | #ifdef yyset_lval |
|
- | 214 | #define glcpp_set_lval_ALREADY_DEFINED |
|
- | 215 | #else |
|
- | 216 | #define yyset_lval glcpp_set_lval |
|
- | 217 | #endif |
|
- | 218 | ||
- | 219 | #ifdef yyget_lloc |
|
- | 220 | #define glcpp_get_lloc_ALREADY_DEFINED |
|
- | 221 | #else |
|
- | 222 | #define yyget_lloc glcpp_get_lloc |
|
- | 223 | #endif |
|
- | 224 | ||
- | 225 | #ifdef yyset_lloc |
|
- | 226 | #define glcpp_set_lloc_ALREADY_DEFINED |
|
- | 227 | #else |
|
- | 228 | #define yyset_lloc glcpp_set_lloc |
|
- | 229 | #endif |
|
- | 230 | ||
- | 231 | #ifdef yyalloc |
|
- | 232 | #define glcpp_alloc_ALREADY_DEFINED |
|
- | 233 | #else |
|
- | 234 | #define yyalloc glcpp_alloc |
|
- | 235 | #endif |
|
- | 236 | ||
- | 237 | #ifdef yyrealloc |
|
- | 238 | #define glcpp_realloc_ALREADY_DEFINED |
|
- | 239 | #else |
|
- | 240 | #define yyrealloc glcpp_realloc |
|
- | 241 | #endif |
|
- | 242 | ||
- | 243 | #ifdef yyfree |
|
- | 244 | #define glcpp_free_ALREADY_DEFINED |
|
12 | #define YY_FLEX_SUBMINOR_VERSION 35 |
245 | #else |
Line 13... | Line 246... | ||
13 | #if YY_FLEX_SUBMINOR_VERSION > 0 |
246 | #define yyfree glcpp_free |
14 | #define FLEX_BETA |
247 | #endif |
15 | #endif |
248 | |
Line 82... | Line 315... | ||
82 | #endif |
315 | #ifndef UINT32_MAX |
83 | #ifndef UINT32_MAX |
316 | #define UINT32_MAX (4294967295U) |
84 | #define UINT32_MAX (4294967295U) |
317 | #endif |
85 | #endif |
318 | |
Line -... | Line 319... | ||
- | 319 | #ifndef SIZE_MAX |
|
- | 320 | #define SIZE_MAX (~(size_t)0) |
|
- | 321 | #endif |
|
- | 322 | ||
86 | 323 | #endif /* ! C99 */ |
|
Line 87... | Line 324... | ||
87 | #endif /* ! C99 */ |
324 | |
Line 88... | Line -... | ||
88 | - | ||
89 | #endif /* ! FLEXINT_H */ |
- | |
90 | 325 | #endif /* ! FLEXINT_H */ |
|
91 | #ifdef __cplusplus |
- | |
92 | - | ||
93 | /* The "const" storage-class-modifier is valid. */ |
- | |
Line 94... | Line 326... | ||
94 | #define YY_USE_CONST |
326 | |
95 | - | ||
96 | #else /* ! __cplusplus */ |
- | |
97 | - | ||
98 | /* C99 requires __STDC__ to be defined as 1. */ |
- | |
99 | #if defined (__STDC__) |
- | |
100 | - | ||
101 | #define YY_USE_CONST |
- | |
102 | - | ||
103 | #endif /* defined (__STDC__) */ |
327 | /* begin standard C++ headers. */ |
- | 328 | ||
- | 329 | /* TODO: this is always defined, so inline it */ |
|
- | 330 | #define yyconst const |
|
104 | #endif /* ! __cplusplus */ |
331 | |
105 | 332 | #if defined(__GNUC__) && __GNUC__ >= 3 |
|
106 | #ifdef YY_USE_CONST |
333 | #define yynoreturn __attribute__((__noreturn__)) |
Line 107... | Line 334... | ||
107 | #define yyconst const |
334 | #else |
108 | #else |
335 | #define yynoreturn |
Line 109... | Line 336... | ||
109 | #define yyconst |
336 | #endif |
110 | #endif |
337 | |
111 | - | ||
112 | /* Returned upon end-of-file. */ |
- | |
113 | #define YY_NULL 0 |
338 | /* Returned upon end-of-file. */ |
114 | 339 | #define YY_NULL 0 |
|
Line 115... | Line 340... | ||
115 | /* Promotes a possibly negative, possibly signed char to an unsigned |
340 | |
116 | * integer for use as an array index. If the signed char is negative, |
341 | /* Promotes a possibly negative, possibly signed char to an |
117 | * we want to instead treat it as an 8-bit unsigned char, hence the |
342 | * integer in range [0..255] for use as an array index. |
118 | * double cast. |
343 | */ |
Line 139... | Line 364... | ||
139 | /* Enter a start condition. This macro really ought to take a parameter, |
364 | * but we do it the disgusting crufty way forced on us by the ()-less |
140 | * but we do it the disgusting crufty way forced on us by the ()-less |
365 | * definition of BEGIN. |
141 | * definition of BEGIN. |
366 | */ |
142 | */ |
367 | #define BEGIN yyg->yy_start = 1 + 2 * |
143 | #define BEGIN yyg->yy_start = 1 + 2 * |
368 | /* Translate the current start state into a value that can be later handed |
144 | - | ||
145 | /* Translate the current start state into a value that can be later handed |
369 | * to BEGIN to return to the state. The YYSTATE alias is for lex |
146 | * to BEGIN to return to the state. The YYSTATE alias is for lex |
370 | * compatibility. |
147 | * compatibility. |
371 | */ |
148 | */ |
372 | #define YY_START ((yyg->yy_start - 1) / 2) |
149 | #define YY_START ((yyg->yy_start - 1) / 2) |
373 | #define YYSTATE YY_START |
150 | #define YYSTATE YY_START |
374 | /* Action number for EOF rule of a given start state. */ |
151 | - | ||
152 | /* Action number for EOF rule of a given start state. */ |
375 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
153 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
376 | /* Special action meaning "start processing a new file". */ |
154 | - | ||
155 | /* Special action meaning "start processing a new file". */ |
377 | #define YY_NEW_FILE yyrestart( yyin , yyscanner ) |
156 | #define YY_NEW_FILE glcpp_restart(yyin ,yyscanner ) |
378 | #define YY_END_OF_BUFFER_CHAR 0 |
157 | - | ||
158 | #define YY_END_OF_BUFFER_CHAR 0 |
379 | |
Line 159... | Line 380... | ||
159 | 380 | /* Size of default input buffer. */ |
|
160 | /* Size of default input buffer. */ |
381 | #ifndef YY_BUF_SIZE |
161 | #ifndef YY_BUF_SIZE |
382 | #ifdef __ia64__ |
Line 177... | Line 398... | ||
177 | #ifndef YY_TYPEDEF_YY_BUFFER_STATE |
398 | #define YY_TYPEDEF_YY_BUFFER_STATE |
178 | #define YY_TYPEDEF_YY_BUFFER_STATE |
399 | typedef struct yy_buffer_state *YY_BUFFER_STATE; |
179 | typedef struct yy_buffer_state *YY_BUFFER_STATE; |
400 | #endif |
180 | #endif |
401 | |
Line -... | Line 402... | ||
- | 402 | #ifndef YY_TYPEDEF_YY_SIZE_T |
|
- | 403 | #define YY_TYPEDEF_YY_SIZE_T |
|
- | 404 | typedef size_t yy_size_t; |
|
- | 405 | #endif |
|
- | 406 | ||
181 | 407 | #define EOB_ACT_CONTINUE_SCAN 0 |
|
182 | #define EOB_ACT_CONTINUE_SCAN 0 |
408 | #define EOB_ACT_END_OF_FILE 1 |
183 | #define EOB_ACT_END_OF_FILE 1 |
409 | #define EOB_ACT_LAST_MATCH 2 |
Line 184... | Line 410... | ||
184 | #define EOB_ACT_LAST_MATCH 2 |
410 | |
- | 411 | #define YY_LESS_LINENO(n) |
|
Line 185... | Line 412... | ||
185 | 412 | #define YY_LINENO_REWIND_TO(ptr) |
|
186 | #define YY_LESS_LINENO(n) |
413 | |
187 | 414 | /* Return all but the first "n" matched characters back to the input stream. */ |
|
188 | /* Return all but the first "n" matched characters back to the input stream. */ |
415 | #define yyless(n) \ |
Line 196... | Line 423... | ||
196 | YY_RESTORE_YY_MORE_OFFSET \ |
423 | yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
197 | yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
424 | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
198 | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
425 | } \ |
199 | } \ |
426 | while ( 0 ) |
200 | while ( 0 ) |
427 | #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) |
201 | - | ||
202 | #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) |
428 | |
Line 203... | Line -... | ||
203 | - | ||
204 | #ifndef YY_TYPEDEF_YY_SIZE_T |
- | |
205 | #define YY_TYPEDEF_YY_SIZE_T |
- | |
206 | typedef size_t yy_size_t; |
- | |
207 | #endif |
- | |
208 | 429 | #ifndef YY_STRUCT_YY_BUFFER_STATE |
|
209 | #ifndef YY_STRUCT_YY_BUFFER_STATE |
430 | #define YY_STRUCT_YY_BUFFER_STATE |
210 | #define YY_STRUCT_YY_BUFFER_STATE |
431 | struct yy_buffer_state |
211 | struct yy_buffer_state |
432 | { |
212 | { |
433 | FILE *yy_input_file; |
Line 216... | Line 437... | ||
216 | char *yy_buf_pos; /* current position in input buffer */ |
437 | |
Line 217... | Line 438... | ||
217 | 438 | /* Size of input buffer in bytes, not including room for EOB |
|
218 | /* Size of input buffer in bytes, not including room for EOB |
439 | * characters. |
219 | * characters. |
440 | */ |
220 | */ |
441 | int yy_buf_size; |
Line 221... | Line 442... | ||
221 | yy_size_t yy_buf_size; |
442 | |
222 | 443 | /* Number of characters read into yy_ch_buf, not including EOB |
|
223 | /* Number of characters read into yy_ch_buf, not including EOB |
444 | * characters. |
224 | * characters. |
445 | */ |
Line 261... | Line 482... | ||
261 | * shouldn't try reading from the input source any more. We might |
482 | * still have a bunch of tokens to match, though, because of |
262 | * still have a bunch of tokens to match, though, because of |
483 | * possible backing-up. |
263 | * possible backing-up. |
484 | * |
264 | * |
485 | * When we actually see the EOF, we change the status to "new" |
265 | * When we actually see the EOF, we change the status to "new" |
486 | * (via yyrestart()), so that the user can continue scanning by |
266 | * (via glcpp_restart()), so that the user can continue scanning by |
487 | * just pointing yyin at a new input file. |
267 | * just pointing yyin at a new input file. |
488 | */ |
268 | */ |
489 | #define YY_BUFFER_EOF_PENDING 2 |
269 | #define YY_BUFFER_EOF_PENDING 2 |
490 | |
Line 270... | Line 491... | ||
270 | 491 | }; |
|
Line 278... | Line 499... | ||
278 | * Returns the top of the stack, or NULL. |
499 | */ |
279 | */ |
500 | #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ |
280 | #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ |
501 | ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ |
281 | ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ |
502 | : NULL) |
282 | : NULL) |
503 | /* Same as previous macro, but useful when we know that the buffer stack is not |
283 | - | ||
284 | /* Same as previous macro, but useful when we know that the buffer stack is not |
504 | * NULL or when we need an lvalue. For internal use only. |
285 | * NULL or when we need an lvalue. For internal use only. |
505 | */ |
286 | */ |
506 | #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] |
287 | #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] |
507 | |
Line 288... | Line 508... | ||
288 | 508 | void yyrestart ( FILE *input_file , yyscan_t yyscanner ); |
|
289 | void glcpp_restart (FILE *input_file ,yyscan_t yyscanner ); |
509 | void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
290 | void glcpp__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); |
510 | YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); |
291 | YY_BUFFER_STATE glcpp__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); |
511 | void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
292 | void glcpp__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); |
512 | void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
293 | void glcpp__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); |
513 | void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
294 | void glcpp_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); |
514 | void yypop_buffer_state ( yyscan_t yyscanner ); |
295 | void glcpp_pop_buffer_state (yyscan_t yyscanner ); |
515 | |
296 | 516 | static void yyensure_buffer_stack ( yyscan_t yyscanner ); |
|
297 | static void glcpp_ensure_buffer_stack (yyscan_t yyscanner ); |
517 | static void yy_load_buffer_state ( yyscan_t yyscanner ); |
298 | static void glcpp__load_buffer_state (yyscan_t yyscanner ); |
518 | static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); |
299 | static void glcpp__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); |
- | |
300 | 519 | #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) |
|
301 | #define YY_FLUSH_BUFFER glcpp__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) |
520 | |
302 | 521 | YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); |
|
303 | YY_BUFFER_STATE glcpp__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); |
522 | YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); |
304 | YY_BUFFER_STATE glcpp__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); |
523 | YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); |
305 | YY_BUFFER_STATE glcpp__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); |
524 | |
306 | 525 | void *yyalloc ( yy_size_t , yyscan_t yyscanner ); |
|
307 | void *glcpp_alloc (yy_size_t ,yyscan_t yyscanner ); |
526 | void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); |
308 | void *glcpp_realloc (void *,yy_size_t ,yyscan_t yyscanner ); |
527 | void yyfree ( void * , yyscan_t yyscanner ); |
309 | void glcpp_free (void * ,yyscan_t yyscanner ); |
- | |
310 | - | ||
Line -... | Line 528... | ||
- | 528 | ||
311 | #define yy_new_buffer glcpp__create_buffer |
529 | #define yy_new_buffer yy_create_buffer |
312 | 530 | #define yy_set_interactive(is_interactive) \ |
|
313 | #define yy_set_interactive(is_interactive) \ |
531 | { \ |
314 | { \ |
532 | if ( ! YY_CURRENT_BUFFER ){ \ |
315 | if ( ! YY_CURRENT_BUFFER ){ \ |
533 | yyensure_buffer_stack (yyscanner); \ |
316 | glcpp_ensure_buffer_stack (yyscanner); \ |
534 | YY_CURRENT_BUFFER_LVALUE = \ |
317 | YY_CURRENT_BUFFER_LVALUE = \ |
535 | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ |
318 | glcpp__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ |
536 | } \ |
319 | } \ |
537 | YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
320 | YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
- | |
321 | } |
538 | } |
322 | 539 | #define yy_set_bol(at_bol) \ |
|
323 | #define yy_set_bol(at_bol) \ |
540 | { \ |
324 | { \ |
541 | if ( ! YY_CURRENT_BUFFER ){\ |
325 | if ( ! YY_CURRENT_BUFFER ){\ |
542 | yyensure_buffer_stack (yyscanner); \ |
326 | glcpp_ensure_buffer_stack (yyscanner); \ |
543 | YY_CURRENT_BUFFER_LVALUE = \ |
327 | YY_CURRENT_BUFFER_LVALUE = \ |
544 | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ |
328 | glcpp__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ |
545 | } \ |
329 | } \ |
546 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
330 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
- | |
331 | } |
547 | } |
Line 332... | Line 548... | ||
332 | 548 | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
|
Line 333... | Line 549... | ||
333 | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
549 | |
334 | 550 | /* Begin user sect3 */ |
|
335 | /* Begin user sect3 */ |
- | |
336 | 551 | ||
Line 337... | Line 552... | ||
337 | #define glcpp_wrap(n) 1 |
552 | #define glcpp_wrap(yyscanner) (/*CONSTCOND*/1) |
Line 338... | Line 553... | ||
338 | #define YY_SKIP_YYWRAP |
553 | #define YY_SKIP_YYWRAP |
Line 339... | Line 554... | ||
339 | 554 | typedef flex_uint8_t YY_CHAR; |
|
340 | typedef unsigned char YY_CHAR; |
555 | |
341 | 556 | typedef int yy_state_type; |
|
342 | typedef int yy_state_type; |
557 | |
Line 343... | Line 558... | ||
343 | 558 | #define yytext_ptr yytext_r |
|
344 | #define yytext_ptr yytext_r |
559 | |
345 | 560 | static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); |
|
346 | static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); |
561 | static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); |
347 | static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); |
562 | static int yy_get_next_buffer ( yyscan_t yyscanner ); |
348 | static int yy_get_next_buffer (yyscan_t yyscanner ); |
563 | static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); |
349 | static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); |
564 | |
350 | 565 | /* Done after the current pattern has been matched and before the |
|
351 | /* Done after the current pattern has been matched and before the |
566 | * corresponding action - sets up yytext. |
352 | * corresponding action - sets up yytext. |
- | |
353 | */ |
567 | */ |
354 | #define YY_DO_BEFORE_ACTION \ |
568 | #define YY_DO_BEFORE_ACTION \ |
355 | yyg->yytext_ptr = yy_bp; \ |
569 | yyg->yytext_ptr = yy_bp; \ |
356 | yyleng = (size_t) (yy_cp - yy_bp); \ |
570 | yyleng = (int) (yy_cp - yy_bp); \ |
357 | yyg->yy_hold_char = *yy_cp; \ |
571 | yyg->yy_hold_char = *yy_cp; \ |
358 | *yy_cp = '\0'; \ |
572 | *yy_cp = '\0'; \ |
359 | yyg->yy_c_buf_p = yy_cp; |
573 | yyg->yy_c_buf_p = yy_cp; |
360 | 574 | #define YY_NUM_RULES 43 |
|
361 | #define YY_NUM_RULES 43 |
575 | #define YY_END_OF_BUFFER 44 |
362 | #define YY_END_OF_BUFFER 44 |
576 | /* This struct is not used in this scanner, |
363 | /* This struct is not used in this scanner, |
577 | but its presence is necessary. */ |
364 | but its presence is necessary. */ |
578 | struct yy_trans_info |
365 | struct yy_trans_info |
579 | { |
366 | { |
580 | flex_int32_t yy_verify; |
367 | flex_int32_t yy_verify; |
581 | flex_int32_t yy_nxt; |
Line 385... | Line 599... | ||
385 | 0, 0, 0, 37, 0, 14, 16, 18, 0, 11, |
599 | 0, 10, 0, 22, 0, 36, 0, 18, 0, 12, |
386 | 0, 10, 0, 22, 0, 36, 0, 18, 0, 12, |
600 | 0, 0, 19, 0, 9, 0, 0, 8, 0 |
387 | 0, 0, 19, 0, 9, 0, 0, 8, 0 |
601 | } ; |
388 | } ; |
602 | |
Line 389... | Line 603... | ||
389 | 603 | static const YY_CHAR yy_ec[256] = |
|
390 | static yyconst flex_int32_t yy_ec[256] = |
604 | { 0, |
391 | { 0, |
605 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
392 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
606 | 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, |
393 | 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, |
607 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
394 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
608 | 1, 2, 5, 1, 6, 1, 7, 8, 1, 9, |
Line 417... | Line 631... | ||
417 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
631 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
418 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
632 | 1, 1, 1, 1, 1 |
419 | 1, 1, 1, 1, 1 |
633 | } ; |
420 | } ; |
634 | |
Line 421... | Line 635... | ||
421 | 635 | static const YY_CHAR yy_meta[40] = |
|
422 | static yyconst flex_int32_t yy_meta[40] = |
636 | { 0, |
423 | { 0, |
637 | 1, 1, 2, 1, 1, 1, 1, 1, 3, 4, |
424 | 1, 1, 2, 1, 1, 1, 1, 1, 3, 4, |
638 | 1, 5, 5, 5, 1, 1, 1, 5, 6, 6, |
425 | 1, 5, 5, 5, 1, 1, 1, 5, 6, 6, |
639 | 6, 5, 7, 5, 5, 6, 6, 6, 6, 8, |
426 | 6, 5, 7, 5, 5, 6, 6, 6, 6, 8, |
640 | 6, 6, 6, 6, 6, 6, 6, 6, 1 |
427 | 6, 6, 6, 6, 6, 6, 6, 6, 1 |
641 | } ; |
Line 428... | Line 642... | ||
428 | } ; |
642 | |
429 | 643 | static const flex_int16_t yy_base[164] = |
|
430 | static yyconst flex_int16_t yy_base[164] = |
644 | { 0, |
431 | { 0, |
645 | 0, 38, 0, 0, 38, 39, 321, 320, 319, 44, |
432 | 0, 38, 0, 0, 38, 39, 321, 320, 319, 44, |
646 | 50, 0, 321, 319, 317, 325, 325, 302, 311, 325, |
433 | 50, 0, 321, 319, 317, 325, 325, 302, 311, 325, |
647 | 308, 80, 80, 83, 83, 299, 88, 0, 290, 274, |
Line 447... | Line 661... | ||
447 | 0, 131, 155, 108, 0, 135, 91, 109, 325, 178, |
661 | 186, 194, 202, 206, 214, 222, 228, 236, 240, 247, |
448 | 186, 194, 202, 206, 214, 222, 228, 236, 240, 247, |
662 | 255, 259, 267 |
449 | 255, 259, 267 |
663 | } ; |
450 | } ; |
664 | |
Line 451... | Line 665... | ||
451 | 665 | static const flex_int16_t yy_def[164] = |
|
452 | static yyconst flex_int16_t yy_def[164] = |
666 | { 0, |
453 | { 0, |
667 | 149, 1, 150, 150, 151, 151, 152, 152, 153, 153, |
454 | 149, 1, 150, 150, 151, 151, 152, 152, 153, 153, |
668 | 149, 11, 149, 149, 149, 149, 149, 149, 149, 149, |
455 | 149, 11, 149, 149, 149, 149, 149, 149, 149, 149, |
669 | 149, 149, 149, 149, 149, 149, 149, 154, 154, 149, |
456 | 149, 149, 149, 149, 149, 149, 149, 154, 154, 149, |
670 | 149, 149, 155, 149, 156, 149, 149, 149, 149, 157, |
Line 469... | Line 683... | ||
469 | 163, 149, 149, 149, 163, 149, 149, 149, 0, 149, |
683 | 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, |
470 | 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, |
684 | 149, 149, 149 |
471 | 149, 149, 149 |
685 | } ; |
472 | } ; |
686 | |
Line 473... | Line 687... | ||
473 | 687 | static const flex_int16_t yy_nxt[365] = |
|
474 | static yyconst flex_int16_t yy_nxt[365] = |
688 | { 0, |
475 | { 0, |
689 | 14, 15, 16, 17, 18, 19, 20, 21, 20, 20, |
476 | 14, 15, 16, 17, 18, 19, 20, 21, 20, 20, |
690 | 22, 23, 24, 24, 25, 26, 27, 28, 28, 28, |
477 | 22, 23, 24, 24, 25, 26, 27, 28, 28, 28, |
691 | 28, 28, 29, 28, 28, 28, 28, 28, 28, 28, |
478 | 28, 28, 29, 28, 28, 28, 28, 28, 28, 28, |
692 | 28, 28, 28, 28, 28, 28, 28, 28, 30, 31, |
Line 513... | Line 727... | ||
513 | 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, |
727 | 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, |
514 | 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, |
728 | 149, 149, 149, 149 |
515 | 149, 149, 149, 149 |
729 | } ; |
516 | } ; |
730 | |
Line 517... | Line 731... | ||
517 | 731 | static const flex_int16_t yy_chk[365] = |
|
518 | static yyconst flex_int16_t yy_chk[365] = |
732 | { 0, |
519 | { 0, |
733 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
520 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
734 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
521 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
735 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
522 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
736 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, |
Line 626... | Line 840... | ||
626 | do { \ |
840 | yylineno = 1; \ |
627 | yylineno = 1; \ |
841 | yycolumn = 1; \ |
628 | yycolumn = 1; \ |
842 | yylloc->source = 0; \ |
629 | yylloc->source = 0; \ |
843 | } while(0) |
630 | } while(0) |
844 | #line 845 " |
- | 845 | ||
Line 631... | Line 846... | ||
631 | 846 | /* The OTHER class is simply a catch-all for things that the CPP |
|
632 | /* The OTHER class is simply a catch-all for things that the CPP |
847 | parser just doesn't care about. Since flex regular expressions that |
633 | parser just doesn't care about. Since flex regular expressions that |
848 | match longer strings take priority over those matching shorter |
634 | match longer strings take priority over those matching shorter |
849 | strings, we have to be careful to avoid OTHER matching and hiding |
635 | strings, we have to be careful to avoid OTHER matching and hiding |
850 | something that CPP does care about. So we simply exclude all |
636 | something that CPP does care about. So we simply exclude all |
851 | characters that appear in any other expressions. */ |
637 | characters that appear in any other expressions. */ |
852 | #line 853 " |
Line 638... | Line 853... | ||
638 | #line 639 "glcpp/glcpp-lex.c" |
853 | |
639 | 854 | #define INITIAL 0 |
|
640 | #define INITIAL 0 |
855 | #define DONE 1 |
641 | #define DONE 1 |
856 | #define COMMENT 2 |
Line 698... | Line 913... | ||
698 | * from bison output in section 1.*/ |
913 | # define yylval yyg->yylval_r |
699 | # define yylval yyg->yylval_r |
914 | |
Line 700... | Line 915... | ||
700 | 915 | # define yylloc yyg->yylloc_r |
|
Line 701... | Line 916... | ||
701 | # define yylloc yyg->yylloc_r |
916 | |
Line 702... | Line 917... | ||
702 | 917 | int yylex_init (yyscan_t* scanner); |
|
Line 703... | Line 918... | ||
703 | int glcpp_lex_init (yyscan_t* scanner); |
918 | |
704 | 919 | int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); |
|
Line 705... | Line 920... | ||
705 | int glcpp_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); |
920 | |
Line 706... | Line 921... | ||
706 | 921 | /* Accessor methods to globals. |
|
Line 707... | Line 922... | ||
707 | /* Accessor methods to globals. |
922 | These are made visible to non-reentrant scanners for convenience. */ |
Line 708... | Line 923... | ||
708 | These are made visible to non-reentrant scanners for convenience. */ |
923 | |
Line 709... | Line 924... | ||
709 | 924 | int yylex_destroy ( yyscan_t yyscanner ); |
|
Line 710... | Line 925... | ||
710 | int glcpp_lex_destroy (yyscan_t yyscanner ); |
925 | |
Line 711... | Line 926... | ||
711 | 926 | int yyget_debug ( yyscan_t yyscanner ); |
|
Line 712... | Line 927... | ||
712 | int glcpp_get_debug (yyscan_t yyscanner ); |
927 | |
Line 713... | Line 928... | ||
713 | 928 | void yyset_debug ( int debug_flag , yyscan_t yyscanner ); |
|
Line 714... | Line 929... | ||
714 | void glcpp_set_debug (int debug_flag ,yyscan_t yyscanner ); |
929 | |
Line 715... | Line 930... | ||
715 | 930 | YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); |
|
Line 716... | Line 931... | ||
716 | YY_EXTRA_TYPE glcpp_get_extra (yyscan_t yyscanner ); |
931 | |
Line 717... | Line 932... | ||
717 | 932 | void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); |
|
Line 718... | Line 933... | ||
718 | void glcpp_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); |
933 | |
Line 719... | Line 934... | ||
719 | 934 | FILE *yyget_in ( yyscan_t yyscanner ); |
|
Line 720... | Line 935... | ||
720 | FILE *glcpp_get_in (yyscan_t yyscanner ); |
935 | |
Line 721... | Line 936... | ||
721 | 936 | void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); |
|
Line 722... | Line 937... | ||
722 | void glcpp_set_in (FILE * in_str ,yyscan_t yyscanner ); |
937 | |
Line 723... | Line 938... | ||
723 | 938 | FILE *yyget_out ( yyscan_t yyscanner ); |
|
Line 724... | Line 939... | ||
724 | FILE *glcpp_get_out (yyscan_t yyscanner ); |
939 | |
725 | 940 | void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); |
|
726 | void glcpp_set_out (FILE * out_str ,yyscan_t yyscanner ); |
941 | |
Line 727... | Line 942... | ||
727 | 942 | int yyget_leng ( yyscan_t yyscanner ); |
|
728 | int glcpp_get_leng (yyscan_t yyscanner ); |
943 | |
729 | 944 | char *yyget_text ( yyscan_t yyscanner ); |
|
730 | char *glcpp_get_text (yyscan_t yyscanner ); |
945 | |
731 | 946 | int yyget_lineno ( yyscan_t yyscanner ); |
|
732 | int glcpp_get_lineno (yyscan_t yyscanner ); |
947 | |
733 | 948 | void yyset_lineno ( int _line_number , yyscan_t yyscanner ); |
|
Line -... | Line 949... | ||
- | 949 | ||
- | 950 | int yyget_column ( yyscan_t yyscanner ); |
|
734 | void glcpp_set_lineno (int line_number ,yyscan_t yyscanner ); |
951 | |
Line -... | Line 952... | ||
- | 952 | void yyset_column ( int _column_no , yyscan_t yyscanner ); |
|
- | 953 | ||
735 | 954 | YYSTYPE * yyget_lval ( yyscan_t yyscanner ); |
|
736 | int glcpp_get_column (yyscan_t yyscanner ); |
955 | |
737 | 956 | void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); |
|
Line 738... | Line 957... | ||
738 | void glcpp_set_column (int column_no ,yyscan_t yyscanner ); |
957 | |
739 | 958 | YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); |
|
740 | YYSTYPE * glcpp_get_lval (yyscan_t yyscanner ); |
959 | |
Line 741... | Line 960... | ||
741 | 960 | void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); |
|
742 | void glcpp_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); |
- | |
743 | 961 | ||
744 | YYLTYPE *glcpp_get_lloc (yyscan_t yyscanner ); |
962 | /* Macros after this point can all be overridden by user definitions in |
745 | 963 | * section 1. |
|
746 | void glcpp_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); |
964 | */ |
747 | 965 | ||
Line 748... | Line 966... | ||
748 | /* Macros after this point can all be overridden by user definitions in |
966 | #ifndef YY_SKIP_YYWRAP |
Line 749... | Line 967... | ||
749 | * section 1. |
967 | #ifdef __cplusplus |
Line 750... | Line 968... | ||
750 | */ |
968 | extern "C" int yywrap ( yyscan_t yyscanner ); |
Line 751... | Line 969... | ||
751 | 969 | #else |
|
Line 796... | Line 1014... | ||
796 | /* Copy whatever the last rule matched to the standard output. */ |
1014 | #ifndef ECHO |
797 | #ifndef ECHO |
1015 | /* This used to be an fputs(), but since the string might contain NUL's, |
798 | /* This used to be an fputs(), but since the string might contain NUL's, |
1016 | * we now use fwrite(). |
799 | * we now use fwrite(). |
1017 | */ |
800 | */ |
1018 | #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) |
801 | #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) |
1019 | #endif |
802 | #endif |
1020 | |
Line 803... | Line 1021... | ||
803 | 1021 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
|
804 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
1022 | * is returned in "result". |
805 | * is returned in "result". |
1023 | */ |
806 | */ |
1024 | #ifndef YY_INPUT |
807 | #ifndef YY_INPUT |
1025 | #define YY_INPUT(buf,result,max_size) \ |
808 | #define YY_INPUT(buf,result,max_size) \ |
1026 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
809 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
1027 | { \ |
810 | { \ |
1028 | int c = '*'; \ |
811 | int c = '*'; \ |
1029 | int n; \ |
812 | size_t n; \ |
1030 | for ( n = 0; n < max_size && \ |
813 | for ( n = 0; n < max_size && \ |
1031 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
814 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
1032 | buf[n] = (char) c; \ |
815 | buf[n] = (char) c; \ |
1033 | if ( c == '\n' ) \ |
816 | if ( c == '\n' ) \ |
1034 | buf[n++] = (char) c; \ |
Line 820... | Line 1038... | ||
820 | result = n; \ |
1038 | } \ |
821 | } \ |
1039 | else \ |
822 | else \ |
1040 | { \ |
823 | { \ |
1041 | errno=0; \ |
824 | errno=0; \ |
1042 | while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ |
825 | while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ |
1043 | { \ |
826 | { \ |
1044 | if( errno != EINTR) \ |
827 | if( errno != EINTR) \ |
1045 | { \ |
828 | { \ |
1046 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
829 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
1047 | break; \ |
830 | break; \ |
1048 | } \ |
Line 861... | Line 1079... | ||
861 | * easily add parameters. |
1079 | */ |
862 | */ |
1080 | #ifndef YY_DECL |
863 | #ifndef YY_DECL |
1081 | #define YY_DECL_IS_OURS 1 |
864 | #define YY_DECL_IS_OURS 1 |
1082 | |
Line 865... | Line 1083... | ||
865 | 1083 | extern int yylex \ |
|
866 | extern int glcpp_lex \ |
1084 | (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); |
Line 867... | Line 1085... | ||
867 | (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); |
1085 | |
868 | 1086 | #define YY_DECL int yylex \ |
|
869 | #define YY_DECL int glcpp_lex \ |
1087 | (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) |
Line 870... | Line 1088... | ||
870 | (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) |
1088 | #endif /* !YY_DECL */ |
871 | #endif /* !YY_DECL */ |
1089 | |
Line 877... | Line 1095... | ||
877 | #define YY_USER_ACTION |
1095 | #endif |
878 | #endif |
1096 | |
Line 879... | Line 1097... | ||
879 | 1097 | /* Code executed at the end of each rule. */ |
|
880 | /* Code executed at the end of each rule. */ |
1098 | #ifndef YY_BREAK |
881 | #ifndef YY_BREAK |
1099 | #define YY_BREAK /*LINTED*/break; |
882 | #define YY_BREAK break; |
1100 | #endif |
Line 883... | Line 1101... | ||
883 | #endif |
1101 | |
884 | 1102 | #define YY_RULE_SETUP \ |
|
885 | #define YY_RULE_SETUP \ |
1103 | if ( yyleng > 0 ) \ |
Line 890... | Line 1108... | ||
890 | 1108 | /** The main scanner function which does all the work. |
|
891 | /** The main scanner function which does all the work. |
1109 | */ |
892 | */ |
1110 | YY_DECL |
893 | YY_DECL |
1111 | { |
894 | { |
1112 | yy_state_type yy_current_state; |
895 | register yy_state_type yy_current_state; |
1113 | char *yy_cp, *yy_bp; |
896 | register char *yy_cp, *yy_bp; |
1114 | int yy_act; |
897 | register int yy_act; |
1115 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
Line 898... | Line -... | ||
898 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
- | |
899 | - | ||
900 | #line 94 "glcpp/glcpp-lex.l" |
- | |
901 | - | ||
902 | /* Implicitly switch between SKIP and INITIAL (non-skipping); |
- | |
903 | * don't switch if some other state was explicitly set. |
- | |
904 | */ |
- | |
905 | glcpp_parser_t *parser = yyextra; |
- | |
906 | if (YY_START == 0 || YY_START == SKIP) { |
- | |
907 | if (parser->lexing_if || parser->skip_stack == NULL || parser->skip_stack->type == SKIP_NO_SKIP) { |
- | |
908 | BEGIN 0; |
- | |
909 | } else { |
- | |
910 | BEGIN SKIP; |
- | |
911 | } |
- | |
912 | } |
- | |
913 | - | ||
914 | /* Single-line comments */ |
- | |
915 | #line 916 "glcpp/glcpp-lex.c" |
1116 | |
Line 916... | Line 1117... | ||
916 | 1117 | yylval = yylval_param; |
|
Line 917... | Line 1118... | ||
917 | yylval = yylval_param; |
1118 | |
Line 934... | Line 1135... | ||
934 | 1135 | if ( ! yyout ) |
|
935 | if ( ! yyout ) |
1136 | yyout = stdout; |
Line 936... | Line 1137... | ||
936 | yyout = stdout; |
1137 | |
937 | 1138 | if ( ! YY_CURRENT_BUFFER ) { |
|
938 | if ( ! YY_CURRENT_BUFFER ) { |
1139 | yyensure_buffer_stack (yyscanner); |
939 | glcpp_ensure_buffer_stack (yyscanner); |
1140 | YY_CURRENT_BUFFER_LVALUE = |
940 | YY_CURRENT_BUFFER_LVALUE = |
1141 | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); |
Line 941... | Line 1142... | ||
941 | glcpp__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); |
1142 | } |
942 | } |
1143 | |
Line -... | Line 1144... | ||
- | 1144 | yy_load_buffer_state( yyscanner ); |
|
- | 1145 | } |
|
- | 1146 | ||
- | 1147 | { |
|
- | 1148 | #line 94 "glcpp/glcpp-lex.l" |
|
- | 1149 | ||
- | 1150 | #line 96 "glcpp/glcpp-lex.l" |
|
- | 1151 | /* Implicitly switch between SKIP and INITIAL (non-skipping); |
|
- | 1152 | * don't switch if some other state was explicitly set. |
|
- | 1153 | */ |
|
- | 1154 | glcpp_parser_t *parser = yyextra; |
|
- | 1155 | if (YY_START == 0 || YY_START == SKIP) { |
|
- | 1156 | if (parser->lexing_if || parser->skip_stack == NULL || parser->skip_stack->type == SKIP_NO_SKIP) { |
|
- | 1157 | BEGIN 0; |
|
- | 1158 | } else { |
|
- | 1159 | BEGIN SKIP; |
|
- | 1160 | } |
|
- | 1161 | } |
|
- | 1162 | ||
943 | 1163 | /* Single-line comments */ |
|
944 | glcpp__load_buffer_state(yyscanner ); |
1164 | #line 1165 " |
945 | } |
1165 | |
Line 946... | Line 1166... | ||
946 | 1166 | while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ |
|
947 | while ( 1 ) /* loops until end-of-file is reached */ |
1167 | { |
Line 959... | Line 1179... | ||
959 | yy_current_state = yyg->yy_start; |
1179 | yy_current_state += YY_AT_BOL(); |
960 | yy_current_state += YY_AT_BOL(); |
1180 | yy_match: |
961 | yy_match: |
1181 | do |
962 | do |
1182 | { |
963 | { |
1183 | YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; |
964 | register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; |
1184 | if ( yy_accept[yy_current_state] ) |
965 | if ( yy_accept[yy_current_state] ) |
1185 | { |
966 | { |
1186 | yyg->yy_last_accepting_state = yy_current_state; |
967 | yyg->yy_last_accepting_state = yy_current_state; |
1187 | yyg->yy_last_accepting_cpos = yy_cp; |
968 | yyg->yy_last_accepting_cpos = yy_cp; |
1188 | } |
969 | } |
1189 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
970 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
1190 | { |
971 | { |
1191 | yy_current_state = (int) yy_def[yy_current_state]; |
972 | yy_current_state = (int) yy_def[yy_current_state]; |
1192 | if ( yy_current_state >= 150 ) |
973 | if ( yy_current_state >= 150 ) |
1193 | yy_c = yy_meta[yy_c]; |
974 | yy_c = yy_meta[(unsigned int) yy_c]; |
1194 | } |
975 | } |
1195 | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
976 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
1196 | ++yy_cp; |
977 | ++yy_cp; |
1197 | } |
978 | } |
1198 | while ( yy_current_state != 149 ); |
979 | while ( yy_current_state != 149 ); |
1199 | yy_cp = yyg->yy_last_accepting_cpos; |
980 | yy_cp = yyg->yy_last_accepting_cpos; |
1200 | yy_current_state = yyg->yy_last_accepting_state; |
981 | yy_current_state = yyg->yy_last_accepting_state; |
1201 | |
Line 996... | Line 1216... | ||
996 | yy_current_state = yyg->yy_last_accepting_state; |
1216 | goto yy_find_action; |
997 | goto yy_find_action; |
1217 | |
Line 998... | Line 1218... | ||
998 | 1218 | case 1: |
|
999 | case 1: |
1219 | YY_RULE_SETUP |
1000 | YY_RULE_SETUP |
1220 | #line 109 "glcpp/glcpp-lex.l" |
1001 | #line 108 "glcpp/glcpp-lex.l" |
1221 | { |
1002 | { |
1222 | } |
1003 | } |
1223 | YY_BREAK |
1004 | YY_BREAK |
1224 | /* Multi-line comments */ |
1005 | /* Multi-line comments */ |
1225 | case 2: |
1006 | case 2: |
1226 | YY_RULE_SETUP |
1007 | YY_RULE_SETUP |
1227 | #line 113 "glcpp/glcpp-lex.l" |
1008 | #line 112 "glcpp/glcpp-lex.l" |
1228 | { yy_push_state(COMMENT, yyscanner); } |
1009 | { yy_push_state(COMMENT, yyscanner); } |
1229 | YY_BREAK |
1010 | YY_BREAK |
1230 | case 3: |
1011 | case 3: |
1231 | YY_RULE_SETUP |
1012 | YY_RULE_SETUP |
1232 | #line 114 "glcpp/glcpp-lex.l" |
Line 1013... | Line 1233... | ||
1013 | #line 113 "glcpp/glcpp-lex.l" |
1233 | |
1014 | 1234 | YY_BREAK |
|
1015 | YY_BREAK |
1235 | case 4: |
1016 | case 4: |
1236 | /* rule 4 can match eol */ |
1017 | /* rule 4 can match eol */ |
1237 | YY_RULE_SETUP |
1018 | YY_RULE_SETUP |
1238 | #line 115 "glcpp/glcpp-lex.l" |
1019 | #line 114 "glcpp/glcpp-lex.l" |
1239 | { yylineno++; yycolumn = 0; return NEWLINE; } |
1020 | { yylineno++; yycolumn = 0; return NEWLINE; } |
1240 | YY_BREAK |
1021 | YY_BREAK |
1241 | case 5: |
1022 | case 5: |
1242 | YY_RULE_SETUP |
Line 1023... | Line 1243... | ||
1023 | YY_RULE_SETUP |
1243 | #line 116 "glcpp/glcpp-lex.l" |
1024 | #line 115 "glcpp/glcpp-lex.l" |
1244 | |
1025 | 1245 | YY_BREAK |
|
1026 | YY_BREAK |
1246 | case 6: |
1027 | case 6: |
1247 | /* rule 6 can match eol */ |
1028 | /* rule 6 can match eol */ |
1248 | YY_RULE_SETUP |
1029 | YY_RULE_SETUP |
1249 | #line 117 "glcpp/glcpp-lex.l" |
1030 | #line 116 "glcpp/glcpp-lex.l" |
1250 | { yylineno++; yycolumn = 0; return NEWLINE; } |
1031 | { yylineno++; yycolumn = 0; return NEWLINE; } |
1251 | YY_BREAK |
1032 | YY_BREAK |
1252 | case 7: |
1033 | case 7: |
1253 | YY_RULE_SETUP |
1034 | YY_RULE_SETUP |
1254 | #line 118 "glcpp/glcpp-lex.l" |
1035 | #line 117 "glcpp/glcpp-lex.l" |
1255 | { |
1036 | { |
1256 | yy_pop_state(yyscanner); |
1037 | yy_pop_state(yyscanner); |
1257 | if (yyextra->space_tokens) |
1038 | if (yyextra->space_tokens) |
1258 | return SPACE; |
1039 | return SPACE; |
1259 | } |
1040 | } |
1260 | YY_BREAK |
1041 | YY_BREAK |
1261 | case 8: |
1042 | case 8: |
1262 | YY_RULE_SETUP |
1043 | YY_RULE_SETUP |
1263 | #line 124 "glcpp/glcpp-lex.l" |
1044 | #line 123 "glcpp/glcpp-lex.l" |
1264 | { |
1045 | { |
1265 | yylval->str = ralloc_strdup (yyextra, yytext); |
1046 | yylval->str = ralloc_strdup (yyextra, yytext); |
1266 | yyextra->space_tokens = 0; |
1047 | yyextra->space_tokens = 0; |
1267 | return HASH_VERSION; |
1048 | return HASH_VERSION; |
1268 | } |
1049 | } |
1269 | YY_BREAK |
1050 | YY_BREAK |
1270 | /* glcpp doesn't handle #extension, #version, or #pragma directives. |
1051 | /* glcpp doesn't handle #extension, #version, or #pragma directives. |
1271 | * Simply pass them through to the main compiler's lexer/parser. */ |
1052 | * Simply pass them through to the main compiler's lexer/parser. */ |
1272 | case 9: |
1053 | case 9: |
1273 | YY_RULE_SETUP |
1054 | YY_RULE_SETUP |
1274 | #line 132 "glcpp/glcpp-lex.l" |
1055 | #line 131 "glcpp/glcpp-lex.l" |
1275 | { |
1056 | { |
1276 | yylval->str = ralloc_strdup (yyextra, yytext); |
1057 | yylval->str = ralloc_strdup (yyextra, yytext); |
1277 | yylineno++; |
1058 | yylineno++; |
1278 | yycolumn = 0; |
1059 | yycolumn = 0; |
1279 | return OTHER; |
1060 | return OTHER; |
1280 | } |
1061 | } |
1281 | YY_BREAK |
1062 | YY_BREAK |
1282 | case 10: |
1063 | case 10: |
1283 | YY_RULE_SETUP |
1064 | YY_RULE_SETUP |
1284 | #line 139 "glcpp/glcpp-lex.l" |
1065 | #line 138 "glcpp/glcpp-lex.l" |
1285 | { |
1066 | { |
1286 | return HASH_LINE; |
Line 1067... | Line 1287... | ||
1067 | return HASH_LINE; |
1287 | } |
1068 | } |
1288 | YY_BREAK |
1069 | YY_BREAK |
1289 | |
1070 | 1290 | case 11: |
|
1071 | case 11: |
1291 | YY_RULE_SETUP |
1072 | YY_RULE_SETUP |
1292 | #line 144 "glcpp/glcpp-lex.l" |
1073 | #line 143 "glcpp/glcpp-lex.l" |
1293 | { |
1074 | { |
1294 | yyextra->lexing_if = 1; |
1075 | yyextra->lexing_if = 1; |
1295 | yyextra->space_tokens = 0; |
1076 | yyextra->space_tokens = 0; |
1296 | return HASH_IFDEF; |
1077 | return HASH_IFDEF; |
1297 | } |
1078 | } |
1298 | YY_BREAK |
1079 | YY_BREAK |
1299 | case 12: |
1080 | case 12: |
1300 | YY_RULE_SETUP |
1081 | YY_RULE_SETUP |
1301 | #line 150 "glcpp/glcpp-lex.l" |
1082 | #line 149 "glcpp/glcpp-lex.l" |
1302 | { |
1083 | { |
1303 | yyextra->lexing_if = 1; |
1084 | yyextra->lexing_if = 1; |
1304 | yyextra->space_tokens = 0; |
1085 | yyextra->space_tokens = 0; |
1305 | return HASH_IFNDEF; |
1086 | return HASH_IFNDEF; |
1306 | } |
1087 | } |
1307 | YY_BREAK |
- | 1308 | case 13: |
|
1088 | YY_BREAK |
1309 | /* rule 13 can match eol */ |
1089 | case 13: |
1310 | *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ |
1090 | /* rule 13 can match eol */ |
1311 | YY_LINENO_REWIND_TO(yy_cp - 1); |
1091 | *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ |
1312 | yyg->yy_c_buf_p = yy_cp -= 1; |
1092 | yyg->yy_c_buf_p = yy_cp -= 1; |
1313 | YY_DO_BEFORE_ACTION; /* set up yytext again */ |
1093 | YY_DO_BEFORE_ACTION; /* set up yytext again */ |
1314 | YY_RULE_SETUP |
1094 | YY_RULE_SETUP |
1315 | #line 156 "glcpp/glcpp-lex.l" |
1095 | #line 155 "glcpp/glcpp-lex.l" |
1316 | { |
1096 | { |
1317 | yyextra->lexing_if = 1; |
1097 | yyextra->lexing_if = 1; |
1318 | yyextra->space_tokens = 0; |
1098 | yyextra->space_tokens = 0; |
1319 | return HASH_IF; |
1099 | return HASH_IF; |
1320 | } |
1100 | } |
1321 | YY_BREAK |
- | 1322 | case 14: |
|
1101 | YY_BREAK |
1323 | /* rule 14 can match eol */ |
1102 | case 14: |
1324 | *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ |
1103 | /* rule 14 can match eol */ |
1325 | YY_LINENO_REWIND_TO(yy_cp - 1); |
1104 | *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ |
1326 | yyg->yy_c_buf_p = yy_cp -= 1; |
1105 | yyg->yy_c_buf_p = yy_cp -= 1; |
1327 | YY_DO_BEFORE_ACTION; /* set up yytext again */ |
1106 | YY_DO_BEFORE_ACTION; /* set up yytext again */ |
1328 | YY_RULE_SETUP |
1107 | YY_RULE_SETUP |
1329 | #line 162 "glcpp/glcpp-lex.l" |
1108 | #line 161 "glcpp/glcpp-lex.l" |
1330 | { |
1109 | { |
1331 | yyextra->lexing_if = 1; |
1110 | yyextra->lexing_if = 1; |
1332 | yyextra->space_tokens = 0; |
1111 | yyextra->space_tokens = 0; |
1333 | return HASH_ELIF; |
1112 | return HASH_ELIF; |
1334 | } |
1113 | } |
1335 | YY_BREAK |
1114 | YY_BREAK |
1336 | case 15: |
1115 | case 15: |
1337 | YY_RULE_SETUP |
1116 | YY_RULE_SETUP |
1338 | #line 168 "glcpp/glcpp-lex.l" |
1117 | #line 167 "glcpp/glcpp-lex.l" |
1339 | { |
1118 | { |
1340 | yyextra->space_tokens = 0; |
1119 | yyextra->space_tokens = 0; |
1341 | return HASH_ELSE; |
1120 | return HASH_ELSE; |
1342 | } |
1121 | } |
1343 | YY_BREAK |
1122 | YY_BREAK |
1344 | case 16: |
1123 | case 16: |
1345 | YY_RULE_SETUP |
1124 | YY_RULE_SETUP |
1346 | #line 173 "glcpp/glcpp-lex.l" |
1125 | #line 172 "glcpp/glcpp-lex.l" |
1347 | { |
1126 | { |
1348 | yyextra->space_tokens = 0; |
Line 1127... | Line 1349... | ||
1127 | yyextra->space_tokens = 0; |
1349 | return HASH_ENDIF; |
1128 | return HASH_ENDIF; |
1350 | } |
1129 | } |
1351 | YY_BREAK |
1130 | YY_BREAK |
1352 | |
1131 | 1353 | case 17: |
|
1132 | case 17: |
1354 | YY_RULE_SETUP |
1133 | YY_RULE_SETUP |
1355 | #line 179 "glcpp/glcpp-lex.l" |
1134 | #line 178 "glcpp/glcpp-lex.l" |
1356 | ; |
1135 | ; |
1357 | YY_BREAK |
1136 | YY_BREAK |
1358 | case 18: |
1137 | case 18: |
1359 | YY_RULE_SETUP |
1138 | YY_RULE_SETUP |
1360 | #line 181 "glcpp/glcpp-lex.l" |
1139 | #line 180 "glcpp/glcpp-lex.l" |
1361 | { |
1140 | { |
1362 | char *p; |
1141 | char *p; |
1363 | for (p = yytext; !isalpha(p[0]); p++); /* skip " # " */ |
1142 | for (p = yytext; !isalpha(p[0]); p++); /* skip " # " */ |
1364 | p += 5; /* skip "error" */ |
1143 | p += 5; /* skip "error" */ |
1365 | glcpp_error(yylloc, yyextra, "#error%s", p); |
1144 | glcpp_error(yylloc, yyextra, "#error%s", p); |
1366 | } |
1145 | } |
1367 | YY_BREAK |
1146 | YY_BREAK |
1368 | case 19: |
1147 | case 19: |
1369 | YY_RULE_SETUP |
1148 | YY_RULE_SETUP |
1370 | #line 188 "glcpp/glcpp-lex.l" |
1149 | #line 187 "glcpp/glcpp-lex.l" |
1371 | { |
Line 1156... | Line 1378... | ||
1156 | case 20: |
1378 | *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ |
1157 | *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ |
1379 | yyg->yy_c_buf_p = yy_cp -= 1; |
1158 | yyg->yy_c_buf_p = yy_cp -= 1; |
1380 | YY_DO_BEFORE_ACTION; /* set up yytext again */ |
1159 | YY_DO_BEFORE_ACTION; /* set up yytext again */ |
1381 | YY_RULE_SETUP |
1160 | YY_RULE_SETUP |
1382 | #line 194 "glcpp/glcpp-lex.l" |
1161 | #line 193 "glcpp/glcpp-lex.l" |
1383 | { |
1162 | { |
1384 | yy_pop_state(yyscanner); |
1163 | yy_pop_state(yyscanner); |
1385 | yylval->str = ralloc_strdup (yyextra, yytext); |
1164 | yylval->str = ralloc_strdup (yyextra, yytext); |
1386 | return FUNC_IDENTIFIER; |
1165 | return FUNC_IDENTIFIER; |
1387 | } |
1166 | } |
1388 | YY_BREAK |
1167 | YY_BREAK |
1389 | case 21: |
1168 | case 21: |
1390 | YY_RULE_SETUP |
1169 | YY_RULE_SETUP |
1391 | #line 200 "glcpp/glcpp-lex.l" |
1170 | #line 199 "glcpp/glcpp-lex.l" |
1392 | { |
1171 | { |
1393 | yy_pop_state(yyscanner); |
1172 | yy_pop_state(yyscanner); |
1394 | yylval->str = ralloc_strdup (yyextra, yytext); |
1173 | yylval->str = ralloc_strdup (yyextra, yytext); |
1395 | return OBJ_IDENTIFIER; |
1174 | return OBJ_IDENTIFIER; |
1396 | } |
1175 | } |
1397 | YY_BREAK |
1176 | YY_BREAK |
1398 | case 22: |
1177 | case 22: |
1399 | YY_RULE_SETUP |
1178 | YY_RULE_SETUP |
1400 | #line 206 "glcpp/glcpp-lex.l" |
1179 | #line 205 "glcpp/glcpp-lex.l" |
1401 | { |
1180 | { |
1402 | yyextra->space_tokens = 0; |
1181 | yyextra->space_tokens = 0; |
1403 | return HASH_UNDEF; |
1182 | return HASH_UNDEF; |
1404 | } |
1183 | } |
1405 | YY_BREAK |
1184 | YY_BREAK |
1406 | case 23: |
1185 | case 23: |
1407 | YY_RULE_SETUP |
1186 | YY_RULE_SETUP |
1408 | #line 211 "glcpp/glcpp-lex.l" |
1187 | #line 210 "glcpp/glcpp-lex.l" |
1409 | { |
1188 | { |
1410 | yyextra->space_tokens = 0; |
1189 | yyextra->space_tokens = 0; |
1411 | return HASH; |
1190 | return HASH; |
1412 | } |
1191 | } |
1413 | YY_BREAK |
1192 | YY_BREAK |
1414 | case 24: |
1193 | case 24: |
1415 | YY_RULE_SETUP |
1194 | YY_RULE_SETUP |
1416 | #line 216 "glcpp/glcpp-lex.l" |
1195 | #line 215 "glcpp/glcpp-lex.l" |
1417 | { |
1196 | { |
1418 | yylval->str = ralloc_strdup (yyextra, yytext); |
1197 | yylval->str = ralloc_strdup (yyextra, yytext); |
1419 | return INTEGER_STRING; |
1198 | return INTEGER_STRING; |
1420 | } |
1199 | } |
1421 | YY_BREAK |
1200 | YY_BREAK |
1422 | case 25: |
1201 | case 25: |
1423 | YY_RULE_SETUP |
1202 | YY_RULE_SETUP |
1424 | #line 221 "glcpp/glcpp-lex.l" |
1203 | #line 220 "glcpp/glcpp-lex.l" |
1425 | { |
1204 | { |
1426 | yylval->str = ralloc_strdup (yyextra, yytext); |
1205 | yylval->str = ralloc_strdup (yyextra, yytext); |
1427 | return INTEGER_STRING; |
1206 | return INTEGER_STRING; |
1428 | } |
1207 | } |
1429 | YY_BREAK |
1208 | YY_BREAK |
1430 | case 26: |
1209 | case 26: |
1431 | YY_RULE_SETUP |
1210 | YY_RULE_SETUP |
1432 | #line 226 "glcpp/glcpp-lex.l" |
1211 | #line 225 "glcpp/glcpp-lex.l" |
1433 | { |
1212 | { |
1434 | yylval->str = ralloc_strdup (yyextra, yytext); |
1213 | yylval->str = ralloc_strdup (yyextra, yytext); |
1435 | return INTEGER_STRING; |
1214 | return INTEGER_STRING; |
1436 | } |
1215 | } |
1437 | YY_BREAK |
1216 | YY_BREAK |
1438 | case 27: |
1217 | case 27: |
1439 | YY_RULE_SETUP |
1218 | YY_RULE_SETUP |
1440 | #line 231 "glcpp/glcpp-lex.l" |
1219 | #line 230 "glcpp/glcpp-lex.l" |
1441 | { |
1220 | { |
1442 | return LEFT_SHIFT; |
1221 | return LEFT_SHIFT; |
1443 | } |
1222 | } |
1444 | YY_BREAK |
1223 | YY_BREAK |
1445 | case 28: |
1224 | case 28: |
1446 | YY_RULE_SETUP |
1225 | YY_RULE_SETUP |
1447 | #line 235 "glcpp/glcpp-lex.l" |
1226 | #line 234 "glcpp/glcpp-lex.l" |
1448 | { |
1227 | { |
1449 | return RIGHT_SHIFT; |
1228 | return RIGHT_SHIFT; |
1450 | } |
1229 | } |
1451 | YY_BREAK |
1230 | YY_BREAK |
1452 | case 29: |
1231 | case 29: |
1453 | YY_RULE_SETUP |
1232 | YY_RULE_SETUP |
1454 | #line 239 "glcpp/glcpp-lex.l" |
1233 | #line 238 "glcpp/glcpp-lex.l" |
1455 | { |
1234 | { |
1456 | return LESS_OR_EQUAL; |
1235 | return LESS_OR_EQUAL; |
1457 | } |
1236 | } |
1458 | YY_BREAK |
1237 | YY_BREAK |
1459 | case 30: |
1238 | case 30: |
1460 | YY_RULE_SETUP |
1239 | YY_RULE_SETUP |
1461 | #line 243 "glcpp/glcpp-lex.l" |
1240 | #line 242 "glcpp/glcpp-lex.l" |
1462 | { |
1241 | { |
1463 | return GREATER_OR_EQUAL; |
1242 | return GREATER_OR_EQUAL; |
1464 | } |
1243 | } |
1465 | YY_BREAK |
1244 | YY_BREAK |
1466 | case 31: |
1245 | case 31: |
1467 | YY_RULE_SETUP |
1246 | YY_RULE_SETUP |
1468 | #line 247 "glcpp/glcpp-lex.l" |
1247 | #line 246 "glcpp/glcpp-lex.l" |
1469 | { |
1248 | { |
1470 | return EQUAL; |
1249 | return EQUAL; |
1471 | } |
1250 | } |
1472 | YY_BREAK |
1251 | YY_BREAK |
1473 | case 32: |
1252 | case 32: |
1474 | YY_RULE_SETUP |
1253 | YY_RULE_SETUP |
1475 | #line 251 "glcpp/glcpp-lex.l" |
1254 | #line 250 "glcpp/glcpp-lex.l" |
1476 | { |
1255 | { |
1477 | return NOT_EQUAL; |
1256 | return NOT_EQUAL; |
1478 | } |
1257 | } |
1479 | YY_BREAK |
1258 | YY_BREAK |
1480 | case 33: |
1259 | case 33: |
1481 | YY_RULE_SETUP |
1260 | YY_RULE_SETUP |
1482 | #line 255 "glcpp/glcpp-lex.l" |
1261 | #line 254 "glcpp/glcpp-lex.l" |
1483 | { |
1262 | { |
1484 | return AND; |
1263 | return AND; |
1485 | } |
1264 | } |
1486 | YY_BREAK |
1265 | YY_BREAK |
1487 | case 34: |
1266 | case 34: |
1488 | YY_RULE_SETUP |
1267 | YY_RULE_SETUP |
1489 | #line 259 "glcpp/glcpp-lex.l" |
1268 | #line 258 "glcpp/glcpp-lex.l" |
1490 | { |
1269 | { |
1491 | return OR; |
1270 | return OR; |
1492 | } |
1271 | } |
1493 | YY_BREAK |
1272 | YY_BREAK |
1494 | case 35: |
1273 | case 35: |
1495 | YY_RULE_SETUP |
1274 | YY_RULE_SETUP |
1496 | #line 263 "glcpp/glcpp-lex.l" |
1275 | #line 262 "glcpp/glcpp-lex.l" |
1497 | { |
1276 | { |
1498 | if (parser->is_gles) |
1277 | if (parser->is_gles) |
1499 | glcpp_error(yylloc, yyextra, "Token pasting (##) is illegal in GLES"); |
1278 | glcpp_error(yylloc, yyextra, "Token pasting (##) is illegal in GLES"); |
1500 | return PASTE; |
1279 | return PASTE; |
1501 | } |
1280 | } |
1502 | YY_BREAK |
1281 | YY_BREAK |
1503 | case 36: |
1282 | case 36: |
1504 | YY_RULE_SETUP |
1283 | YY_RULE_SETUP |
1505 | #line 269 "glcpp/glcpp-lex.l" |
1284 | #line 268 "glcpp/glcpp-lex.l" |
1506 | { |
1285 | { |
1507 | return DEFINED; |
1286 | return DEFINED; |
1508 | } |
1287 | } |
1509 | YY_BREAK |
1288 | YY_BREAK |
1510 | case 37: |
1289 | case 37: |
1511 | YY_RULE_SETUP |
1290 | YY_RULE_SETUP |
1512 | #line 273 "glcpp/glcpp-lex.l" |
1291 | #line 272 "glcpp/glcpp-lex.l" |
1513 | { |
1292 | { |
1514 | yylval->str = ralloc_strdup (yyextra, yytext); |
1293 | yylval->str = ralloc_strdup (yyextra, yytext); |
1515 | return IDENTIFIER; |
1294 | return IDENTIFIER; |
1516 | } |
1295 | } |
1517 | YY_BREAK |
1296 | YY_BREAK |
1518 | case 38: |
1297 | case 38: |
1519 | YY_RULE_SETUP |
1298 | YY_RULE_SETUP |
1520 | #line 278 "glcpp/glcpp-lex.l" |
1299 | #line 277 "glcpp/glcpp-lex.l" |
1521 | { |
1300 | { |
1522 | return yytext[0]; |
1301 | return yytext[0]; |
1523 | } |
1302 | } |
1524 | YY_BREAK |
1303 | YY_BREAK |
1525 | case 39: |
1304 | case 39: |
1526 | YY_RULE_SETUP |
1305 | YY_RULE_SETUP |
1527 | #line 282 "glcpp/glcpp-lex.l" |
1306 | #line 281 "glcpp/glcpp-lex.l" |
1528 | { |
1307 | { |
1529 | yylval->str = ralloc_strdup (yyextra, yytext); |
1308 | yylval->str = ralloc_strdup (yyextra, yytext); |
1530 | return OTHER; |
1309 | return OTHER; |
1531 | } |
1310 | } |
1532 | YY_BREAK |
1311 | YY_BREAK |
1533 | case 40: |
1312 | case 40: |
1534 | YY_RULE_SETUP |
1313 | YY_RULE_SETUP |
1535 | #line 287 "glcpp/glcpp-lex.l" |
1314 | #line 286 "glcpp/glcpp-lex.l" |
1536 | { |
1315 | { |
1537 | if (yyextra->space_tokens) { |
1316 | if (yyextra->space_tokens) { |
1538 | return SPACE; |
1317 | return SPACE; |
1539 | } |
1318 | } |
1540 | } |
1319 | } |
1541 | YY_BREAK |
1320 | YY_BREAK |
1542 | case 41: |
1321 | case 41: |
1543 | /* rule 41 can match eol */ |
1322 | /* rule 41 can match eol */ |
1544 | YY_RULE_SETUP |
1323 | YY_RULE_SETUP |
1545 | #line 293 "glcpp/glcpp-lex.l" |
1324 | #line 292 "glcpp/glcpp-lex.l" |
1546 | { |
1325 | { |
1547 | yyextra->lexing_if = 0; |
1326 | yyextra->lexing_if = 0; |
1548 | yylineno++; |
1327 | yylineno++; |
1549 | yycolumn = 0; |
1328 | yycolumn = 0; |
1550 | return NEWLINE; |
1329 | return NEWLINE; |
1551 | } |
1330 | } |
1552 | YY_BREAK |
1331 | YY_BREAK |
1553 | /* Handle missing newline at EOF. */ |
1332 | /* Handle missing newline at EOF. */ |
1554 | case YY_STATE_EOF(INITIAL): |
1333 | case YY_STATE_EOF(INITIAL): |
1555 | #line 301 "glcpp/glcpp-lex.l" |
1334 | #line 300 "glcpp/glcpp-lex.l" |
1556 | { |
1335 | { |
1557 | BEGIN DONE; /* Don't keep matching this rule forever. */ |
1336 | BEGIN DONE; /* Don't keep matching this rule forever. */ |
1558 | yyextra->lexing_if = 0; |
1337 | yyextra->lexing_if = 0; |
1559 | return NEWLINE; |
1338 | return NEWLINE; |
1560 | } |
1339 | } |
1561 | YY_BREAK |
Line 1342... | Line 1564... | ||
1342 | only have this action here so that we can pretend to call some |
1564 | generated functions, (to avoid "defined but not used" |
1343 | generated functions, (to avoid "defined but not used" |
1565 | warnings. */ |
1344 | warnings. */ |
1566 | case 42: |
1345 | case 42: |
1567 | YY_RULE_SETUP |
1346 | YY_RULE_SETUP |
1568 | #line 311 "glcpp/glcpp-lex.l" |
1347 | #line 310 "glcpp/glcpp-lex.l" |
1569 | { |
1348 | { |
1570 | unput('.'); |
1349 | unput('.'); |
1571 | yy_top_state(yyextra); |
1350 | yy_top_state(yyextra); |
1572 | } |
1351 | } |
1573 | YY_BREAK |
1352 | YY_BREAK |
1574 | case 43: |
1353 | case 43: |
1575 | YY_RULE_SETUP |
1354 | YY_RULE_SETUP |
1576 | #line 316 "glcpp/glcpp-lex.l" |
1355 | #line 315 "glcpp/glcpp-lex.l" |
1577 | ECHO; |
1356 | ECHO; |
1578 | YY_BREAK |
1357 | YY_BREAK |
1579 | #line 1580 " |
1358 | #line 1359 "glcpp/glcpp-lex.c" |
1580 | case YY_STATE_EOF(DONE): |
1359 | case YY_STATE_EOF(DONE): |
1581 | case YY_STATE_EOF(COMMENT): |
1360 | case YY_STATE_EOF(COMMENT): |
1582 | case YY_STATE_EOF(UNREACHABLE): |
1361 | case YY_STATE_EOF(UNREACHABLE): |
1583 | case YY_STATE_EOF(SKIP): |
1362 | case YY_STATE_EOF(SKIP): |
1584 | case YY_STATE_EOF(DEFINE): |
1363 | case YY_STATE_EOF(DEFINE): |
1585 | yyterminate(); |
Line 1375... | Line 1597... | ||
1375 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) |
1597 | { |
1376 | { |
1598 | /* We're scanning a new file or input source. It's |
1377 | /* We're scanning a new file or input source. It's |
1599 | * possible that this happened because the user |
1378 | * possible that this happened because the user |
1600 | * just pointed yyin at a new source and called |
1379 | * just pointed yyin at a new source and called |
1601 | * yylex(). If so, then we have to assure |
1380 | * glcpp_lex(). If so, then we have to assure |
1602 | * consistency between YY_CURRENT_BUFFER and our |
1381 | * consistency between YY_CURRENT_BUFFER and our |
1603 | * globals. Here is the right place to do so, because |
1382 | * globals. Here is the right place to do so, because |
1604 | * this is the first action (other than possibly a |
1383 | * this is the first action (other than possibly a |
1605 | * back-up) that will match for the new input source. |
1384 | * back-up) that will match for the new input source. |
1606 | */ |
1385 | */ |
1607 | yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
Line 1436... | Line 1658... | ||
1436 | { |
1658 | case EOB_ACT_END_OF_FILE: |
1437 | case EOB_ACT_END_OF_FILE: |
1659 | { |
1438 | { |
1660 | yyg->yy_did_buffer_switch_on_eof = 0; |
1439 | yyg->yy_did_buffer_switch_on_eof = 0; |
1661 | |
Line 1440... | Line 1662... | ||
1440 | 1662 | if ( yywrap( yyscanner ) ) |
|
1441 | if ( glcpp_wrap(yyscanner ) ) |
1663 | { |
1442 | { |
1664 | /* Note: because we've taken care in |
1443 | /* Note: because we've taken care in |
1665 | * yy_get_next_buffer() to have set up |
1444 | * yy_get_next_buffer() to have set up |
1666 | * yytext, we can now set up |
1445 | * yytext, we can now set up |
1667 | * yy_c_buf_p so that if some total |
Line 1489... | Line 1711... | ||
1489 | default: |
1711 | YY_FATAL_ERROR( |
1490 | YY_FATAL_ERROR( |
1712 | "fatal flex scanner internal error--no action found" ); |
1491 | "fatal flex scanner internal error--no action found" ); |
1713 | } /* end of action switch */ |
1492 | } /* end of action switch */ |
1714 | } /* end of scanning one token */ |
1493 | } /* end of scanning one token */ |
1715 | } /* end of user's declarations */ |
- | 1716 | } /* end of yylex */ |
|
1494 | } /* end of glcpp_lex */ |
1717 | |
Line 1495... | Line 1718... | ||
1495 | 1718 | /* yy_get_next_buffer - try to read in a new buffer |
|
1496 | /* yy_get_next_buffer - try to read in a new buffer |
1719 | * |
1497 | * |
1720 | * Returns a code representing an action: |
1498 | * Returns a code representing an action: |
1721 | * EOB_ACT_LAST_MATCH - |
Line 1501... | Line 1724... | ||
1501 | * EOB_ACT_END_OF_FILE - end of file |
1724 | */ |
1502 | */ |
1725 | static int yy_get_next_buffer (yyscan_t yyscanner) |
1503 | static int yy_get_next_buffer (yyscan_t yyscanner) |
1726 | { |
1504 | { |
1727 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1505 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1728 | char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
1506 | register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
1729 | char *source = yyg->yytext_ptr; |
1507 | register char *source = yyg->yytext_ptr; |
1730 | int number_to_move, i; |
1508 | register int number_to_move, i; |
1731 | int ret_val; |
1509 | int ret_val; |
1732 | |
Line 1510... | Line 1733... | ||
1510 | 1733 | if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) |
|
1511 | if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) |
1734 | YY_FATAL_ERROR( |
1512 | YY_FATAL_ERROR( |
1735 | "fatal flex scanner internal error--end of buffer missed" ); |
Line 1532... | Line 1755... | ||
1532 | } |
1755 | |
Line 1533... | Line 1756... | ||
1533 | 1756 | /* Try to read more data. */ |
|
Line 1534... | Line 1757... | ||
1534 | /* Try to read more data. */ |
1757 | |
1535 | 1758 | /* First move last chars to start of buffer. */ |
|
Line 1536... | Line 1759... | ||
1536 | /* First move last chars to start of buffer. */ |
1759 | number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); |
1537 | number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; |
1760 | |
Line 1538... | Line 1761... | ||
1538 | 1761 | for ( i = 0; i < number_to_move; ++i ) |
|
Line 1552... | Line 1775... | ||
1552 | 1775 | while ( num_to_read <= 0 ) |
|
1553 | while ( num_to_read <= 0 ) |
1776 | { /* Not enough room in the buffer - grow it. */ |
Line 1554... | Line 1777... | ||
1554 | { /* Not enough room in the buffer - grow it. */ |
1777 | |
1555 | 1778 | /* just a shorter name for the current buffer */ |
|
Line 1556... | Line 1779... | ||
1556 | /* just a shorter name for the current buffer */ |
1779 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; |
1557 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER; |
1780 | |
Line 1558... | Line 1781... | ||
1558 | 1781 | int yy_c_buf_p_offset = |
|
Line 1568... | Line 1791... | ||
1568 | else |
1791 | b->yy_buf_size *= 2; |
1569 | b->yy_buf_size *= 2; |
1792 | |
Line 1570... | Line 1793... | ||
1570 | 1793 | b->yy_ch_buf = (char *) |
|
1571 | b->yy_ch_buf = (char *) |
1794 | /* Include room in for 2 EOB chars. */ |
- | 1795 | yyrealloc( (void *) b->yy_ch_buf, |
|
1572 | /* Include room in for 2 EOB chars. */ |
1796 | (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); |
1573 | glcpp_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); |
1797 | } |
1574 | } |
1798 | else |
1575 | else |
1799 | /* Can't grow it, we don't own it. */ |
1576 | /* Can't grow it, we don't own it. */ |
1800 | b->yy_ch_buf = NULL; |
Line 1577... | Line 1801... | ||
1577 | b->yy_ch_buf = 0; |
1801 | |
1578 | 1802 | if ( ! b->yy_ch_buf ) |
|
1579 | if ( ! b->yy_ch_buf ) |
1803 | YY_FATAL_ERROR( |
Line 1590... | Line 1814... | ||
1590 | if ( num_to_read > YY_READ_BUF_SIZE ) |
1814 | num_to_read = YY_READ_BUF_SIZE; |
1591 | num_to_read = YY_READ_BUF_SIZE; |
1815 | |
Line 1592... | Line 1816... | ||
1592 | 1816 | /* Read in more data. */ |
|
1593 | /* Read in more data. */ |
1817 | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
1594 | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
1818 | yyg->yy_n_chars, num_to_read ); |
Line 1595... | Line 1819... | ||
1595 | yyg->yy_n_chars, (size_t) num_to_read ); |
1819 | |
1596 | 1820 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
|
Line 1597... | Line 1821... | ||
1597 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
1821 | } |
1598 | } |
1822 | |
1599 | 1823 | if ( yyg->yy_n_chars == 0 ) |
|
1600 | if ( yyg->yy_n_chars == 0 ) |
1824 | { |
1601 | { |
1825 | if ( number_to_move == YY_MORE_ADJ ) |
1602 | if ( number_to_move == YY_MORE_ADJ ) |
1826 | { |
1603 | { |
1827 | ret_val = EOB_ACT_END_OF_FILE; |
Line 1604... | Line 1828... | ||
1604 | ret_val = EOB_ACT_END_OF_FILE; |
1828 | yyrestart( yyin , yyscanner); |
1605 | glcpp_restart(yyin ,yyscanner); |
1829 | } |
1606 | } |
1830 | |
Line 1614... | Line 1838... | ||
1614 | } |
1838 | |
Line 1615... | Line 1839... | ||
1615 | 1839 | else |
|
1616 | else |
1840 | ret_val = EOB_ACT_CONTINUE_SCAN; |
Line 1617... | Line 1841... | ||
1617 | ret_val = EOB_ACT_CONTINUE_SCAN; |
1841 | |
1618 | 1842 | if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { |
|
1619 | if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { |
1843 | /* Extend the array by 50%, plus the number we really need. */ |
- | 1844 | int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); |
|
1620 | /* Extend the array by 50%, plus the number we really need. */ |
1845 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( |
1621 | yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); |
1846 | (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); |
1622 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) glcpp_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); |
1847 | if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
- | 1848 | YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); |
|
- | 1849 | /* "- 2" to take care of EOB's */ |
|
1623 | if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
1850 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); |
Line 1624... | Line 1851... | ||
1624 | YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); |
1851 | } |
1625 | } |
1852 | |
1626 | 1853 | yyg->yy_n_chars += number_to_move; |
|
Line 1635... | Line 1862... | ||
1635 | 1862 | /* yy_get_previous_state - get the state just before the EOB char was reached */ |
|
Line 1636... | Line 1863... | ||
1636 | /* yy_get_previous_state - get the state just before the EOB char was reached */ |
1863 | |
1637 | 1864 | static yy_state_type yy_get_previous_state (yyscan_t yyscanner) |
|
1638 | static yy_state_type yy_get_previous_state (yyscan_t yyscanner) |
1865 | { |
1639 | { |
1866 | yy_state_type yy_current_state; |
1640 | register yy_state_type yy_current_state; |
1867 | char *yy_cp; |
Line 1641... | Line 1868... | ||
1641 | register char *yy_cp; |
1868 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1642 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1869 | |
Line 1643... | Line 1870... | ||
1643 | 1870 | yy_current_state = yyg->yy_start; |
|
1644 | yy_current_state = yyg->yy_start; |
1871 | yy_current_state += YY_AT_BOL(); |
1645 | yy_current_state += YY_AT_BOL(); |
1872 | |
1646 | 1873 | for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) |
|
1647 | for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) |
1874 | { |
1648 | { |
1875 | YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
1649 | register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
1876 | if ( yy_accept[yy_current_state] ) |
1650 | if ( yy_accept[yy_current_state] ) |
1877 | { |
1651 | { |
1878 | yyg->yy_last_accepting_state = yy_current_state; |
1652 | yyg->yy_last_accepting_state = yy_current_state; |
1879 | yyg->yy_last_accepting_cpos = yy_cp; |
1653 | yyg->yy_last_accepting_cpos = yy_cp; |
1880 | } |
1654 | } |
1881 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
1655 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
1882 | { |
1656 | { |
1883 | yy_current_state = (int) yy_def[yy_current_state]; |
1657 | yy_current_state = (int) yy_def[yy_current_state]; |
1884 | if ( yy_current_state >= 150 ) |
1658 | if ( yy_current_state >= 150 ) |
1885 | yy_c = yy_meta[yy_c]; |
Line 1659... | Line 1886... | ||
1659 | yy_c = yy_meta[(unsigned int) yy_c]; |
1886 | } |
1660 | } |
1887 | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
Line 1669... | Line 1896... | ||
1669 | * synopsis |
1896 | * next_state = yy_try_NUL_trans( current_state ); |
1670 | * next_state = yy_try_NUL_trans( current_state ); |
1897 | */ |
1671 | */ |
1898 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) |
1672 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) |
1899 | { |
1673 | { |
1900 | int yy_is_jam; |
1674 | register int yy_is_jam; |
1901 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ |
1675 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ |
1902 | char *yy_cp = yyg->yy_c_buf_p; |
1676 | register char *yy_cp = yyg->yy_c_buf_p; |
1903 | |
Line 1677... | Line 1904... | ||
1677 | 1904 | YY_CHAR yy_c = 1; |
|
1678 | register YY_CHAR yy_c = 1; |
1905 | if ( yy_accept[yy_current_state] ) |
1679 | if ( yy_accept[yy_current_state] ) |
1906 | { |
1680 | { |
1907 | yyg->yy_last_accepting_state = yy_current_state; |
1681 | yyg->yy_last_accepting_state = yy_current_state; |
1908 | yyg->yy_last_accepting_cpos = yy_cp; |
1682 | yyg->yy_last_accepting_cpos = yy_cp; |
1909 | } |
1683 | } |
1910 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
1684 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
1911 | { |
1685 | { |
1912 | yy_current_state = (int) yy_def[yy_current_state]; |
1686 | yy_current_state = (int) yy_def[yy_current_state]; |
1913 | if ( yy_current_state >= 150 ) |
1687 | if ( yy_current_state >= 150 ) |
1914 | yy_c = yy_meta[yy_c]; |
1688 | yy_c = yy_meta[(unsigned int) yy_c]; |
1915 | } |
1689 | } |
1916 | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
1690 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
1917 | yy_is_jam = (yy_current_state == 149); |
Line -... | Line 1918... | ||
- | 1918 | ||
1691 | yy_is_jam = (yy_current_state == 149); |
1919 | (void)yyg; |
1692 | 1920 | return yy_is_jam ? 0 : yy_current_state; |
|
Line -... | Line 1921... | ||
- | 1921 | } |
|
- | 1922 | ||
1693 | return yy_is_jam ? 0 : yy_current_state; |
1923 | #ifndef YY_NO_UNPUT |
1694 | } |
1924 | |
1695 | 1925 | static void yyunput (int c, char * yy_bp , yyscan_t yyscanner) |
|
1696 | static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner) |
1926 | { |
Line 1697... | Line 1927... | ||
1697 | { |
1927 | char *yy_cp; |
Line 1698... | Line 1928... | ||
1698 | register char *yy_cp; |
1928 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1699 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1929 | |
Line 1700... | Line 1930... | ||
1700 | 1930 | yy_cp = yyg->yy_c_buf_p; |
|
1701 | yy_cp = yyg->yy_c_buf_p; |
1931 | |
1702 | 1932 | /* undo effects of setting up yytext */ |
|
1703 | /* undo effects of setting up yytext */ |
1933 | *yy_cp = yyg->yy_hold_char; |
1704 | *yy_cp = yyg->yy_hold_char; |
1934 | |
1705 | 1935 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
|
1706 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
1936 | { /* need to shift things up to make room */ |
1707 | { /* need to shift things up to make room */ |
1937 | /* +2 for EOB chars. */ |
Line 1708... | Line 1938... | ||
1708 | /* +2 for EOB chars. */ |
1938 | int number_to_move = yyg->yy_n_chars + 2; |
1709 | register int number_to_move = yyg->yy_n_chars + 2; |
1939 | char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ |
Line 1710... | Line 1940... | ||
1710 | register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ |
1940 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; |
1711 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; |
1941 | char *source = |
1712 | register char *source = |
1942 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; |
1713 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; |
1943 | |
Line 1714... | Line 1944... | ||
1714 | 1944 | while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
|
1715 | while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
1945 | *--dest = *--source; |
1716 | *--dest = *--source; |
1946 | |
Line 1729... | Line 1959... | ||
1729 | yyg->yytext_ptr = yy_bp; |
1959 | yyg->yy_hold_char = *yy_cp; |
1730 | yyg->yy_hold_char = *yy_cp; |
1960 | yyg->yy_c_buf_p = yy_cp; |
1731 | yyg->yy_c_buf_p = yy_cp; |
1961 | } |
1732 | } |
1962 | |
Line -... | Line 1963... | ||
- | 1963 | #endif |
|
- | 1964 | ||
1733 | 1965 | #ifndef YY_NO_INPUT |
|
1734 | #ifndef YY_NO_INPUT |
1966 | #ifdef __cplusplus |
1735 | #ifdef __cplusplus |
1967 | static int yyinput (yyscan_t yyscanner) |
1736 | static int yyinput (yyscan_t yyscanner) |
1968 | #else |
1737 | #else |
1969 | static int input (yyscan_t yyscanner) |
Line 1754... | Line 1986... | ||
1754 | /* This was really a NUL. */ |
1986 | *yyg->yy_c_buf_p = '\0'; |
1755 | *yyg->yy_c_buf_p = '\0'; |
1987 | |
Line 1756... | Line 1988... | ||
1756 | 1988 | else |
|
1757 | else |
1989 | { /* need more input */ |
1758 | { /* need more input */ |
1990 | int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); |
1759 | int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; |
1991 | ++yyg->yy_c_buf_p; |
Line 1760... | Line 1992... | ||
1760 | ++yyg->yy_c_buf_p; |
1992 | |
1761 | 1993 | switch ( yy_get_next_buffer( yyscanner ) ) |
|
1762 | switch ( yy_get_next_buffer( yyscanner ) ) |
1994 | { |
Line 1771... | Line 2003... | ||
1771 | * So convert the EOB_ACT_LAST_MATCH |
2003 | * to EOB_ACT_END_OF_FILE. |
1772 | * to EOB_ACT_END_OF_FILE. |
2004 | */ |
1773 | */ |
2005 | |
Line 1774... | Line 2006... | ||
1774 | 2006 | /* Reset buffer status. */ |
|
1775 | /* Reset buffer status. */ |
2007 | yyrestart( yyin , yyscanner); |
Line 1776... | Line 2008... | ||
1776 | glcpp_restart(yyin ,yyscanner); |
2008 | |
Line 1777... | Line 2009... | ||
1777 | 2009 | /*FALLTHROUGH*/ |
|
1778 | /*FALLTHROUGH*/ |
2010 | |
1779 | 2011 | case EOB_ACT_END_OF_FILE: |
|
1780 | case EOB_ACT_END_OF_FILE: |
2012 | { |
Line 1781... | Line 2013... | ||
1781 | { |
2013 | if ( yywrap( yyscanner ) ) |
1782 | if ( glcpp_wrap(yyscanner ) ) |
2014 | return 0; |
1783 | return EOF; |
2015 | |
1784 | 2016 | if ( ! yyg->yy_did_buffer_switch_on_eof ) |
|
Line 1811... | Line 2043... | ||
1811 | /** Immediately switch to a different input stream. |
2043 | * @param input_file A readable stream. |
1812 | * @param input_file A readable stream. |
2044 | * @param yyscanner The scanner object. |
1813 | * @param yyscanner The scanner object. |
2045 | * @note This function does not reset the start condition to @c INITIAL . |
1814 | * @note This function does not reset the start condition to @c INITIAL . |
2046 | */ |
1815 | */ |
2047 | void yyrestart (FILE * input_file , yyscan_t yyscanner) |
1816 | void glcpp_restart (FILE * input_file , yyscan_t yyscanner) |
2048 | { |
1817 | { |
2049 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1818 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2050 | |
Line 1819... | Line 2051... | ||
1819 | 2051 | if ( ! YY_CURRENT_BUFFER ){ |
|
1820 | if ( ! YY_CURRENT_BUFFER ){ |
2052 | yyensure_buffer_stack (yyscanner); |
1821 | glcpp_ensure_buffer_stack (yyscanner); |
2053 | YY_CURRENT_BUFFER_LVALUE = |
1822 | YY_CURRENT_BUFFER_LVALUE = |
2054 | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); |
1823 | glcpp__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); |
2055 | } |
Line 1824... | Line 2056... | ||
1824 | } |
2056 | |
1825 | 2057 | yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); |
|
1826 | glcpp__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); |
2058 | yy_load_buffer_state( yyscanner ); |
Line 1827... | Line 2059... | ||
1827 | glcpp__load_buffer_state(yyscanner ); |
2059 | } |
1828 | } |
2060 | |
1829 | 2061 | /** Switch to a different input buffer. |
|
1830 | /** Switch to a different input buffer. |
2062 | * @param new_buffer The new input buffer. |
1831 | * @param new_buffer The new input buffer. |
2063 | * @param yyscanner The scanner object. |
1832 | * @param yyscanner The scanner object. |
2064 | */ |
1833 | */ |
2065 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
Line 1834... | Line 2066... | ||
1834 | void glcpp__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
2066 | { |
1835 | { |
2067 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1836 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2068 | |
1837 | 2069 | /* TODO. We should be able to replace this entire function body |
|
1838 | /* TODO. We should be able to replace this entire function body |
2070 | * with |
1839 | * with |
2071 | * yypop_buffer_state(); |
1840 | * glcpp_pop_buffer_state(); |
2072 | * yypush_buffer_state(new_buffer); |
1841 | * glcpp_push_buffer_state(new_buffer); |
2073 | */ |
Line 1842... | Line 2074... | ||
1842 | */ |
2074 | yyensure_buffer_stack (yyscanner); |
1843 | glcpp_ensure_buffer_stack (yyscanner); |
2075 | if ( YY_CURRENT_BUFFER == new_buffer ) |
Line 1851... | Line 2083... | ||
1851 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
2083 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
1852 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
2084 | } |
1853 | } |
2085 | |
Line 1854... | Line 2086... | ||
1854 | 2086 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
|
1855 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
2087 | yy_load_buffer_state( yyscanner ); |
Line 1856... | Line 2088... | ||
1856 | glcpp__load_buffer_state(yyscanner ); |
2088 | |
1857 | 2089 | /* We don't actually know whether we did this switch during |
|
1858 | /* We don't actually know whether we did this switch during |
2090 | * EOF (yywrap()) processing, but the only time this flag |
1859 | * EOF (glcpp_wrap()) processing, but the only time this flag |
2091 | * is looked at is after yywrap() is called, so it's safe |
1860 | * is looked at is after glcpp_wrap() is called, so it's safe |
2092 | * to go ahead and always set it. |
1861 | * to go ahead and always set it. |
2093 | */ |
1862 | */ |
2094 | yyg->yy_did_buffer_switch_on_eof = 1; |
Line 1863... | Line 2095... | ||
1863 | yyg->yy_did_buffer_switch_on_eof = 1; |
2095 | } |
1864 | } |
2096 | |
1865 | 2097 | static void yy_load_buffer_state (yyscan_t yyscanner) |
|
1866 | static void glcpp__load_buffer_state (yyscan_t yyscanner) |
2098 | { |
1867 | { |
2099 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1868 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2100 | yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
Line 1876... | Line 2108... | ||
1876 | * @param file A readable stream. |
2108 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
1877 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
2109 | * @param yyscanner The scanner object. |
1878 | * @param yyscanner The scanner object. |
2110 | * @return the allocated buffer state. |
1879 | * @return the allocated buffer state. |
2111 | */ |
1880 | */ |
2112 | YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) |
1881 | YY_BUFFER_STATE glcpp__create_buffer (FILE * file, int size , yyscan_t yyscanner) |
2113 | { |
1882 | { |
2114 | YY_BUFFER_STATE b; |
1883 | YY_BUFFER_STATE b; |
2115 | |
Line 1884... | Line 2116... | ||
1884 | 2116 | b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); |
|
1885 | b = (YY_BUFFER_STATE) glcpp_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); |
2117 | if ( ! b ) |
1886 | if ( ! b ) |
2118 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
Line 1887... | Line 2119... | ||
1887 | YY_FATAL_ERROR( "out of dynamic memory in glcpp__create_buffer()" ); |
2119 | |
Line 1888... | Line 2120... | ||
1888 | 2120 | b->yy_buf_size = size; |
|
1889 | b->yy_buf_size = size; |
2121 | |
1890 | 2122 | /* yy_ch_buf has to be 2 characters longer than the size given because |
|
1891 | /* yy_ch_buf has to be 2 characters longer than the size given because |
2123 | * we need to put in 2 end-of-buffer characters. |
1892 | * we need to put in 2 end-of-buffer characters. |
2124 | */ |
1893 | */ |
2125 | b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); |
Line 1894... | Line 2126... | ||
1894 | b->yy_ch_buf = (char *) glcpp_alloc(b->yy_buf_size + 2 ,yyscanner ); |
2126 | if ( ! b->yy_ch_buf ) |
Line 1895... | Line 2127... | ||
1895 | if ( ! b->yy_ch_buf ) |
2127 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
Line 1896... | Line 2128... | ||
1896 | YY_FATAL_ERROR( "out of dynamic memory in glcpp__create_buffer()" ); |
2128 | |
1897 | 2129 | b->yy_is_our_buffer = 1; |
|
Line 1898... | Line 2130... | ||
1898 | b->yy_is_our_buffer = 1; |
2130 | |
1899 | 2131 | yy_init_buffer( b, file , yyscanner); |
|
1900 | glcpp__init_buffer(b,file ,yyscanner); |
2132 | |
1901 | 2133 | return b; |
|
1902 | return b; |
2134 | } |
1903 | } |
2135 | |
1904 | 2136 | /** Destroy the buffer. |
|
Line 1905... | Line 2137... | ||
1905 | /** Destroy the buffer. |
2137 | * @param b a buffer created with yy_create_buffer() |
1906 | * @param b a buffer created with glcpp__create_buffer() |
2138 | * @param yyscanner The scanner object. |
Line 1907... | Line 2139... | ||
1907 | * @param yyscanner The scanner object. |
2139 | */ |
1908 | */ |
2140 | void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
Line 1909... | Line 2141... | ||
1909 | void glcpp__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
2141 | { |
1910 | { |
2142 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
Line 1911... | Line 2143... | ||
1911 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2143 | |
1912 | 2144 | if ( ! b ) |
|
Line 1913... | Line 2145... | ||
1913 | if ( ! b ) |
2145 | return; |
1914 | return; |
2146 | |
1915 | 2147 | if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ |
|
1916 | if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ |
2148 | YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
1917 | YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
2149 | |
Line 1918... | Line 2150... | ||
1918 | 2150 | if ( b->yy_is_our_buffer ) |
|
1919 | if ( b->yy_is_our_buffer ) |
2151 | yyfree( (void *) b->yy_ch_buf , yyscanner ); |
1920 | glcpp_free((void *) b->yy_ch_buf ,yyscanner ); |
2152 | |
Line 1921... | Line 2153... | ||
1921 | 2153 | yyfree( (void *) b , yyscanner ); |
|
Line 1922... | Line 2154... | ||
1922 | glcpp_free((void *) b ,yyscanner ); |
2154 | } |
1923 | } |
2155 | |
Line 1924... | Line 2156... | ||
1924 | 2156 | /* Initializes or reinitializes a buffer. |
|
1925 | /* Initializes or reinitializes a buffer. |
2157 | * This function is sometimes called more than once on the same buffer, |
1926 | * This function is sometimes called more than once on the same buffer, |
2158 | * such as during a yyrestart() or at EOF. |
1927 | * such as during a glcpp_restart() or at EOF. |
2159 | */ |
1928 | */ |
2160 | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) |
1929 | static void glcpp__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) |
2161 | |
1930 | 2162 | { |
|
Line 1953... | Line 2185... | ||
1953 | 2185 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
|
1954 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
2186 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
1955 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
2187 | * @param yyscanner The scanner object. |
1956 | * @param yyscanner The scanner object. |
2188 | */ |
1957 | */ |
2189 | void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
1958 | void glcpp__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
2190 | { |
1959 | { |
2191 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1960 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2192 | if ( ! b ) |
1961 | if ( ! b ) |
2193 | return; |
Line 1974... | Line 2206... | ||
1974 | 2206 | b->yy_at_bol = 1; |
|
1975 | b->yy_at_bol = 1; |
2207 | b->yy_buffer_status = YY_BUFFER_NEW; |
Line 1976... | Line 2208... | ||
1976 | b->yy_buffer_status = YY_BUFFER_NEW; |
2208 | |
1977 | 2209 | if ( b == YY_CURRENT_BUFFER ) |
|
1978 | if ( b == YY_CURRENT_BUFFER ) |
2210 | yy_load_buffer_state( yyscanner ); |
Line 1979... | Line 2211... | ||
1979 | glcpp__load_buffer_state(yyscanner ); |
2211 | } |
1980 | } |
2212 | |
1981 | 2213 | /** Pushes the new state onto the stack. The new state becomes |
|
1982 | /** Pushes the new state onto the stack. The new state becomes |
2214 | * the current state. This function will allocate the stack |
1983 | * the current state. This function will allocate the stack |
2215 | * if necessary. |
1984 | * if necessary. |
2216 | * @param new_buffer The new state. |
1985 | * @param new_buffer The new state. |
2217 | * @param yyscanner The scanner object. |
1986 | * @param yyscanner The scanner object. |
2218 | */ |
1987 | */ |
2219 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
1988 | void glcpp_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
2220 | { |
1989 | { |
2221 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
Line 1990... | Line 2222... | ||
1990 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2222 | if (new_buffer == NULL) |
Line 1991... | Line 2223... | ||
1991 | if (new_buffer == NULL) |
2223 | return; |
1992 | return; |
2224 | |
1993 | 2225 | yyensure_buffer_stack(yyscanner); |
|
1994 | glcpp_ensure_buffer_stack(yyscanner); |
2226 | |
1995 | 2227 | /* This block is copied from yy_switch_to_buffer. */ |
|
1996 | /* This block is copied from glcpp__switch_to_buffer. */ |
2228 | if ( YY_CURRENT_BUFFER ) |
Line 2005... | Line 2237... | ||
2005 | /* Only push if top exists. Otherwise, replace top. */ |
2237 | if (YY_CURRENT_BUFFER) |
2006 | if (YY_CURRENT_BUFFER) |
2238 | yyg->yy_buffer_stack_top++; |
2007 | yyg->yy_buffer_stack_top++; |
2239 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
2008 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
2240 | |
Line 2009... | Line 2241... | ||
2009 | 2241 | /* copied from yy_switch_to_buffer. */ |
|
2010 | /* copied from glcpp__switch_to_buffer. */ |
2242 | yy_load_buffer_state( yyscanner ); |
2011 | glcpp__load_buffer_state(yyscanner ); |
2243 | yyg->yy_did_buffer_switch_on_eof = 1; |
2012 | yyg->yy_did_buffer_switch_on_eof = 1; |
2244 | } |
Line 2013... | Line 2245... | ||
2013 | } |
2245 | |
2014 | 2246 | /** Removes and deletes the top of the stack, if present. |
|
2015 | /** Removes and deletes the top of the stack, if present. |
2247 | * The next element becomes the new top. |
2016 | * The next element becomes the new top. |
2248 | * @param yyscanner The scanner object. |
2017 | * @param yyscanner The scanner object. |
2249 | */ |
2018 | */ |
2250 | void yypop_buffer_state (yyscan_t yyscanner) |
2019 | void glcpp_pop_buffer_state (yyscan_t yyscanner) |
2251 | { |
2020 | { |
2252 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2021 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2253 | if (!YY_CURRENT_BUFFER) |
Line 2022... | Line 2254... | ||
2022 | if (!YY_CURRENT_BUFFER) |
2254 | return; |
2023 | return; |
2255 | |
2024 | 2256 | yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); |
|
2025 | glcpp__delete_buffer(YY_CURRENT_BUFFER ,yyscanner); |
2257 | YY_CURRENT_BUFFER_LVALUE = NULL; |
Line 2026... | Line 2258... | ||
2026 | YY_CURRENT_BUFFER_LVALUE = NULL; |
2258 | if (yyg->yy_buffer_stack_top > 0) |
2027 | if (yyg->yy_buffer_stack_top > 0) |
2259 | --yyg->yy_buffer_stack_top; |
2028 | --yyg->yy_buffer_stack_top; |
2260 | |
2029 | 2261 | if (YY_CURRENT_BUFFER) { |
|
2030 | if (YY_CURRENT_BUFFER) { |
2262 | yy_load_buffer_state( yyscanner ); |
Line 2031... | Line 2263... | ||
2031 | glcpp__load_buffer_state(yyscanner ); |
2263 | yyg->yy_did_buffer_switch_on_eof = 1; |
2032 | yyg->yy_did_buffer_switch_on_eof = 1; |
2264 | } |
2033 | } |
2265 | } |
2034 | } |
2266 | |
2035 | 2267 | /* Allocates the stack if it does not exist. |
|
2036 | /* Allocates the stack if it does not exist. |
2268 | * Guarantees space for at least one push. |
2037 | * Guarantees space for at least one push. |
2269 | */ |
Line 2038... | Line 2270... | ||
2038 | */ |
2270 | static void yyensure_buffer_stack (yyscan_t yyscanner) |
Line 2039... | Line 2271... | ||
2039 | static void glcpp_ensure_buffer_stack (yyscan_t yyscanner) |
2271 | { |
2040 | { |
2272 | yy_size_t num_to_alloc; |
2041 | int num_to_alloc; |
2273 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2042 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2274 | |
2043 | 2275 | if (!yyg->yy_buffer_stack) { |
|
2044 | if (!yyg->yy_buffer_stack) { |
2276 | |
2045 | 2277 | /* First allocation is just for 2 elements, since we don't know if this |
|
2046 | /* First allocation is just for 2 elements, since we don't know if this |
2278 | * scanner will even need a stack. We use 2 instead of 1 to avoid an |
2047 | * scanner will even need a stack. We use 2 instead of 1 to avoid an |
2279 | * immediate realloc on the next call. |
2048 | * immediate realloc on the next call. |
2280 | */ |
Line 2049... | Line 2281... | ||
2049 | */ |
2281 | num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ |
Line 2050... | Line 2282... | ||
2050 | num_to_alloc = 1; |
2282 | yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc |
2051 | yyg->yy_buffer_stack = (struct yy_buffer_state**)glcpp_alloc |
2283 | (num_to_alloc * sizeof(struct yy_buffer_state*) |
Line 2062... | Line 2294... | ||
2062 | } |
2294 | |
Line 2063... | Line 2295... | ||
2063 | 2295 | if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ |
|
Line 2064... | Line 2296... | ||
2064 | if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ |
2296 | |
2065 | 2297 | /* Increase the buffer to prepare for a possible push. */ |
|
Line 2066... | Line 2298... | ||
2066 | /* Increase the buffer to prepare for a possible push. */ |
2298 | yy_size_t grow_size = 8 /* arbitrary grow size */; |
2067 | int grow_size = 8 /* arbitrary grow size */; |
2299 | |
2068 | 2300 | num_to_alloc = yyg->yy_buffer_stack_max + grow_size; |
|
2069 | num_to_alloc = yyg->yy_buffer_stack_max + grow_size; |
2301 | yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc |
2070 | yyg->yy_buffer_stack = (struct yy_buffer_state**)glcpp_realloc |
2302 | (yyg->yy_buffer_stack, |
2071 | (yyg->yy_buffer_stack, |
2303 | num_to_alloc * sizeof(struct yy_buffer_state*) |
2072 | num_to_alloc * sizeof(struct yy_buffer_state*) |
2304 | , yyscanner); |
Line 2073... | Line 2305... | ||
2073 | , yyscanner); |
2305 | if ( ! yyg->yy_buffer_stack ) |
2074 | if ( ! yyg->yy_buffer_stack ) |
2306 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
2075 | YY_FATAL_ERROR( "out of dynamic memory in glcpp_ensure_buffer_stack()" ); |
2307 | |
2076 | 2308 | /* zero only the new slots.*/ |
|
Line 2084... | Line 2316... | ||
2084 | * @param base the character buffer |
2316 | * @param size the size in bytes of the character buffer |
2085 | * @param size the size in bytes of the character buffer |
2317 | * @param yyscanner The scanner object. |
2086 | * @param yyscanner The scanner object. |
2318 | * @return the newly allocated buffer state object. |
2087 | * @return the newly allocated buffer state object. |
2319 | */ |
2088 | */ |
2320 | YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) |
2089 | YY_BUFFER_STATE glcpp__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) |
2321 | { |
2090 | { |
2322 | YY_BUFFER_STATE b; |
2091 | YY_BUFFER_STATE b; |
2323 | |
Line 2092... | Line 2324... | ||
2092 | 2324 | if ( size < 2 || |
|
2093 | if ( size < 2 || |
2325 | base[size-2] != YY_END_OF_BUFFER_CHAR || |
2094 | base[size-2] != YY_END_OF_BUFFER_CHAR || |
2326 | base[size-1] != YY_END_OF_BUFFER_CHAR ) |
2095 | base[size-1] != YY_END_OF_BUFFER_CHAR ) |
2327 | /* They forgot to leave room for the EOB's. */ |
2096 | /* They forgot to leave room for the EOB's. */ |
2328 | return NULL; |
Line 2097... | Line 2329... | ||
2097 | return 0; |
2329 | |
2098 | 2330 | b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); |
|
2099 | b = (YY_BUFFER_STATE) glcpp_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); |
2331 | if ( ! b ) |
Line 2100... | Line 2332... | ||
2100 | if ( ! b ) |
2332 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); |
2101 | YY_FATAL_ERROR( "out of dynamic memory in glcpp__scan_buffer()" ); |
2333 | |
2102 | 2334 | b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ |
|
2103 | b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ |
2335 | b->yy_buf_pos = b->yy_ch_buf = base; |
2104 | b->yy_buf_pos = b->yy_ch_buf = base; |
2336 | b->yy_is_our_buffer = 0; |
2105 | b->yy_is_our_buffer = 0; |
2337 | b->yy_input_file = NULL; |
2106 | b->yy_input_file = 0; |
2338 | b->yy_n_chars = b->yy_buf_size; |
2107 | b->yy_n_chars = b->yy_buf_size; |
2339 | b->yy_is_interactive = 0; |
2108 | b->yy_is_interactive = 0; |
2340 | b->yy_at_bol = 1; |
Line 2109... | Line 2341... | ||
2109 | b->yy_at_bol = 1; |
2341 | b->yy_fill_buffer = 0; |
Line 2110... | Line 2342... | ||
2110 | b->yy_fill_buffer = 0; |
2342 | b->yy_buffer_status = YY_BUFFER_NEW; |
2111 | b->yy_buffer_status = YY_BUFFER_NEW; |
2343 | |
Line 2112... | Line 2344... | ||
2112 | 2344 | yy_switch_to_buffer( b , yyscanner ); |
|
2113 | glcpp__switch_to_buffer(b ,yyscanner ); |
2345 | |
2114 | 2346 | return b; |
|
2115 | return b; |
2347 | } |
2116 | } |
2348 | |
2117 | 2349 | /** Setup the input buffer state to scan a string. The next call to yylex() will |
|
2118 | /** Setup the input buffer state to scan a string. The next call to glcpp_lex() will |
2350 | * scan from a @e copy of @a str. |
2119 | * scan from a @e copy of @a str. |
2351 | * @param yystr a NUL-terminated string to scan |
2120 | * @param yystr a NUL-terminated string to scan |
2352 | * @param yyscanner The scanner object. |
2121 | * @param yyscanner The scanner object. |
2353 | * @return the newly allocated buffer state object. |
Line 2122... | Line 2354... | ||
2122 | * @return the newly allocated buffer state object. |
2354 | * @note If you want to scan bytes that may contain NUL values, then use |
2123 | * @note If you want to scan bytes that may contain NUL values, then use |
2355 | * yy_scan_bytes() instead. |
Line 2124... | Line 2356... | ||
2124 | * glcpp__scan_bytes() instead. |
2356 | */ |
2125 | */ |
2357 | YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) |
2126 | YY_BUFFER_STATE glcpp__scan_string (yyconst char * yystr , yyscan_t yyscanner) |
2358 | { |
2127 | { |
2359 | |
2128 | 2360 | return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); |
|
2129 | return glcpp__scan_bytes(yystr,strlen(yystr) ,yyscanner); |
2361 | } |
2130 | } |
2362 | |
2131 | 2363 | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will |
|
2132 | /** Setup the input buffer state to scan the given bytes. The next call to glcpp_lex() will |
2364 | * scan from a @e copy of @a bytes. |
2133 | * scan from a @e copy of @a bytes. |
2365 | * @param yybytes the byte buffer to scan |
2134 | * @param yybytes the byte buffer to scan |
2366 | * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
2135 | * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
2367 | * @param yyscanner The scanner object. |
2136 | * @param yyscanner The scanner object. |
2368 | * @return the newly allocated buffer state object. |
Line 2137... | Line 2369... | ||
2137 | * @return the newly allocated buffer state object. |
2369 | */ |
2138 | */ |
2370 | YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) |
2139 | YY_BUFFER_STATE glcpp__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) |
2371 | { |
2140 | { |
2372 | YY_BUFFER_STATE b; |
2141 | YY_BUFFER_STATE b; |
2373 | char *buf; |
Line 2142... | Line 2374... | ||
2142 | char *buf; |
2374 | yy_size_t n; |
2143 | yy_size_t n; |
2375 | int i; |
Line 2144... | Line 2376... | ||
2144 | int i; |
2376 | |
Line 2145... | Line 2377... | ||
2145 | 2377 | /* Get memory for full buffer, including space for trailing EOB's. */ |
|
2146 | /* Get memory for full buffer, including space for trailing EOB's. */ |
2378 | n = (yy_size_t) (_yybytes_len + 2); |
2147 | n = _yybytes_len + 2; |
2379 | buf = (char *) yyalloc( n , yyscanner ); |
Line 2148... | Line 2380... | ||
2148 | buf = (char *) glcpp_alloc(n ,yyscanner ); |
2380 | if ( ! buf ) |
2149 | if ( ! buf ) |
2381 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); |
2150 | YY_FATAL_ERROR( "out of dynamic memory in glcpp__scan_bytes()" ); |
2382 | |
2151 | 2383 | for ( i = 0; i < _yybytes_len; ++i ) |
|
Line 2152... | Line 2384... | ||
2152 | for ( i = 0; i < _yybytes_len; ++i ) |
2384 | buf[i] = yybytes[i]; |
2153 | buf[i] = yybytes[i]; |
2385 | |
Line 2154... | Line 2386... | ||
2154 | 2386 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
|
2155 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
2387 | |
2156 | 2388 | b = yy_scan_buffer( buf, n , yyscanner); |
|
2157 | b = glcpp__scan_buffer(buf,n ,yyscanner); |
2389 | if ( ! b ) |
2158 | if ( ! b ) |
2390 | YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); |
2159 | YY_FATAL_ERROR( "bad buffer in glcpp__scan_bytes()" ); |
2391 | |
Line 2160... | Line 2392... | ||
2160 | 2392 | /* It's okay to grow etc. this buffer, and we should throw it |
|
2161 | /* It's okay to grow etc. this buffer, and we should throw it |
2393 | * away when we're done. |
Line 2162... | Line 2394... | ||
2162 | * away when we're done. |
2394 | */ |
2163 | */ |
2395 | b->yy_is_our_buffer = 1; |
Line 2164... | Line 2396... | ||
2164 | b->yy_is_our_buffer = 1; |
2396 | |
- | 2397 | return b; |
|
2165 | 2398 | } |
|
Line 2166... | Line 2399... | ||
2166 | return b; |
2399 | |
2167 | } |
2400 | static void yy_push_state (int _new_state , yyscan_t yyscanner) |
2168 | 2401 | { |
|
Line 2169... | Line 2402... | ||
2169 | static void yy_push_state (int new_state , yyscan_t yyscanner) |
2402 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
Line 2170... | Line 2403... | ||
2170 | { |
2403 | if ( yyg->yy_start_stack_ptr >= yyg->yy_start_stack_depth ) |
2171 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2404 | { |
Line 2172... | Line 2405... | ||
2172 | if ( yyg->yy_start_stack_ptr >= yyg->yy_start_stack_depth ) |
2405 | yy_size_t new_size; |
2173 | { |
2406 | |
2174 | yy_size_t new_size; |
2407 | yyg->yy_start_stack_depth += YY_START_STACK_INCR; |
Line 2208... | Line 2441... | ||
2208 | 2441 | #ifndef YY_EXIT_FAILURE |
|
2209 | #ifndef YY_EXIT_FAILURE |
2442 | #define YY_EXIT_FAILURE 2 |
2210 | #define YY_EXIT_FAILURE 2 |
2443 | #endif |
Line 2211... | Line 2444... | ||
2211 | #endif |
2444 | |
2212 | 2445 | static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) |
|
- | 2446 | { |
|
- | 2447 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
|
2213 | static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) |
2448 | (void)yyg; |
2214 | { |
2449 | fprintf( stderr, "%s\n", msg ); |
2215 | (void) fprintf( stderr, "%s\n", msg ); |
2450 | exit( YY_EXIT_FAILURE ); |
Line 2216... | Line 2451... | ||
2216 | exit( YY_EXIT_FAILURE ); |
2451 | } |
Line 2236... | Line 2471... | ||
2236 | /* Accessor methods (get/set functions) to struct members. */ |
2471 | |
Line 2237... | Line 2472... | ||
2237 | 2472 | /** Get the user-defined data for this scanner. |
|
2238 | /** Get the user-defined data for this scanner. |
2473 | * @param yyscanner The scanner object. |
2239 | * @param yyscanner The scanner object. |
2474 | */ |
2240 | */ |
2475 | YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) |
2241 | YY_EXTRA_TYPE glcpp_get_extra (yyscan_t yyscanner) |
2476 | { |
2242 | { |
2477 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2243 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2478 | return yyextra; |
2244 | return yyextra; |
2479 | } |
Line 2245... | Line 2480... | ||
2245 | } |
2480 | |
2246 | 2481 | /** Get the current line number. |
|
2247 | /** Get the current line number. |
2482 | * @param yyscanner The scanner object. |
2248 | * @param yyscanner The scanner object. |
2483 | */ |
2249 | */ |
2484 | int yyget_lineno (yyscan_t yyscanner) |
2250 | int glcpp_get_lineno (yyscan_t yyscanner) |
2485 | { |
Line 2251... | Line 2486... | ||
2251 | { |
2486 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2252 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2487 | |
Line 2258... | Line 2493... | ||
2258 | } |
2493 | |
Line 2259... | Line 2494... | ||
2259 | 2494 | /** Get the current column number. |
|
2260 | /** Get the current column number. |
2495 | * @param yyscanner The scanner object. |
2261 | * @param yyscanner The scanner object. |
2496 | */ |
2262 | */ |
2497 | int yyget_column (yyscan_t yyscanner) |
2263 | int glcpp_get_column (yyscan_t yyscanner) |
2498 | { |
2264 | { |
2499 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
Line 2265... | Line 2500... | ||
2265 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2500 | |
2266 | 2501 | if (! YY_CURRENT_BUFFER) |
|
Line 2271... | Line 2506... | ||
2271 | } |
2506 | |
Line 2272... | Line 2507... | ||
2272 | 2507 | /** Get the input stream. |
|
2273 | /** Get the input stream. |
2508 | * @param yyscanner The scanner object. |
2274 | * @param yyscanner The scanner object. |
2509 | */ |
2275 | */ |
2510 | FILE *yyget_in (yyscan_t yyscanner) |
2276 | FILE *glcpp_get_in (yyscan_t yyscanner) |
2511 | { |
2277 | { |
2512 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2278 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2513 | return yyin; |
2279 | return yyin; |
2514 | } |
Line 2280... | Line 2515... | ||
2280 | } |
2515 | |
2281 | 2516 | /** Get the output stream. |
|
2282 | /** Get the output stream. |
2517 | * @param yyscanner The scanner object. |
2283 | * @param yyscanner The scanner object. |
2518 | */ |
2284 | */ |
2519 | FILE *yyget_out (yyscan_t yyscanner) |
2285 | FILE *glcpp_get_out (yyscan_t yyscanner) |
2520 | { |
2286 | { |
2521 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2287 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2522 | return yyout; |
Line 2288... | Line 2523... | ||
2288 | return yyout; |
2523 | } |
2289 | } |
2524 | |
2290 | 2525 | /** Get the length of the current token. |
|
2291 | /** Get the length of the current token. |
2526 | * @param yyscanner The scanner object. |
2292 | * @param yyscanner The scanner object. |
2527 | */ |
2293 | */ |
2528 | int yyget_leng (yyscan_t yyscanner) |
2294 | int glcpp_get_leng (yyscan_t yyscanner) |
2529 | { |
2295 | { |
2530 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
Line 2296... | Line 2531... | ||
2296 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2531 | return yyleng; |
2297 | return yyleng; |
2532 | } |
2298 | } |
2533 | |
Line 2299... | Line 2534... | ||
2299 | 2534 | /** Get the current token. |
|
2300 | /** Get the current token. |
2535 | * @param yyscanner The scanner object. |
2301 | * @param yyscanner The scanner object. |
2536 | */ |
2302 | */ |
2537 | |
2303 | 2538 | char *yyget_text (yyscan_t yyscanner) |
|
Line 2304... | Line 2539... | ||
2304 | char *glcpp_get_text (yyscan_t yyscanner) |
2539 | { |
2305 | { |
2540 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2306 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2541 | return yytext; |
2307 | return yytext; |
2542 | } |
2308 | } |
2543 | |
2309 | 2544 | /** Set the user-defined data. This data is never touched by the scanner. |
|
2310 | /** Set the user-defined data. This data is never touched by the scanner. |
2545 | * @param user_defined The data to be associated with this scanner. |
2311 | * @param user_defined The data to be associated with this scanner. |
2546 | * @param yyscanner The scanner object. |
2312 | * @param yyscanner The scanner object. |
2547 | */ |
Line 2313... | Line 2548... | ||
2313 | */ |
2548 | void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) |
2314 | void glcpp_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) |
2549 | { |
2315 | { |
2550 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2316 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2551 | yyextra = user_defined ; |
2317 | yyextra = user_defined ; |
2552 | } |
2318 | } |
2553 | |
2319 | 2554 | /** Set the current line number. |
|
Line 2320... | Line 2555... | ||
2320 | /** Set the current line number. |
2555 | * @param _line_number line number |
2321 | * @param line_number |
2556 | * @param yyscanner The scanner object. |
2322 | * @param yyscanner The scanner object. |
2557 | */ |
Line 2323... | Line 2558... | ||
2323 | */ |
2558 | void yyset_lineno (int _line_number , yyscan_t yyscanner) |
2324 | void glcpp_set_lineno (int line_number , yyscan_t yyscanner) |
2559 | { |
Line 2325... | Line 2560... | ||
2325 | { |
2560 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2326 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2561 | |
2327 | 2562 | /* lineno is only valid if an input buffer exists. */ |
|
2328 | /* lineno is only valid if an input buffer exists. */ |
2563 | if (! YY_CURRENT_BUFFER ) |
2329 | if (! YY_CURRENT_BUFFER ) |
2564 | YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); |
2330 | yy_fatal_error( "glcpp_set_lineno called with no buffer" , yyscanner); |
2565 | |
2331 | 2566 | yylineno = _line_number; |
|
Line 2332... | Line 2567... | ||
2332 | yylineno = line_number; |
2567 | } |
2333 | } |
2568 | |
2334 | 2569 | /** Set the current column. |
|
Line 2335... | Line 2570... | ||
2335 | /** Set the current column. |
2570 | * @param _column_no column number |
2336 | * @param line_number |
2571 | * @param yyscanner The scanner object. |
Line 2337... | Line 2572... | ||
2337 | * @param yyscanner The scanner object. |
2572 | */ |
2338 | */ |
2573 | void yyset_column (int _column_no , yyscan_t yyscanner) |
2339 | void glcpp_set_column (int column_no , yyscan_t yyscanner) |
2574 | { |
2340 | { |
2575 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2341 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2576 | |
2342 | 2577 | /* column is only valid if an input buffer exists. */ |
|
2343 | /* column is only valid if an input buffer exists. */ |
2578 | if (! YY_CURRENT_BUFFER ) |
2344 | if (! YY_CURRENT_BUFFER ) |
2579 | YY_FATAL_ERROR( "yyset_column called with no buffer" ); |
2345 | yy_fatal_error( "glcpp_set_column called with no buffer" , yyscanner); |
2580 | |
2346 | 2581 | yycolumn = _column_no; |
|
2347 | yycolumn = column_no; |
2582 | } |
Line 2348... | Line 2583... | ||
2348 | } |
2583 | |
2349 | 2584 | /** Set the input stream. This does not discard the current |
|
2350 | /** Set the input stream. This does not discard the current |
2585 | * input buffer. |
2351 | * input buffer. |
2586 | * @param _in_str A readable stream. |
2352 | * @param in_str A readable stream. |
2587 | * @param yyscanner The scanner object. |
Line 2353... | Line 2588... | ||
2353 | * @param yyscanner The scanner object. |
2588 | * @see yy_switch_to_buffer |
2354 | * @see glcpp__switch_to_buffer |
2589 | */ |
2355 | */ |
2590 | void yyset_in (FILE * _in_str , yyscan_t yyscanner) |
2356 | void glcpp_set_in (FILE * in_str , yyscan_t yyscanner) |
2591 | { |
2357 | { |
2592 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
Line 2358... | Line 2593... | ||
2358 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2593 | yyin = _in_str ; |
2359 | yyin = in_str ; |
2594 | } |
2360 | } |
2595 | |
2361 | 2596 | void yyset_out (FILE * _out_str , yyscan_t yyscanner) |
|
2362 | void glcpp_set_out (FILE * out_str , yyscan_t yyscanner) |
2597 | { |
Line 2363... | Line 2598... | ||
2363 | { |
2598 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
Line 2364... | Line 2599... | ||
2364 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2599 | yyout = _out_str ; |
2365 | yyout = out_str ; |
2600 | } |
2366 | } |
2601 | |
2367 | 2602 | int yyget_debug (yyscan_t yyscanner) |
|
2368 | int glcpp_get_debug (yyscan_t yyscanner) |
2603 | { |
Line 2369... | Line 2604... | ||
2369 | { |
2604 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2370 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2605 | return yy_flex_debug; |
2371 | return yy_flex_debug; |
2606 | } |
2372 | } |
2607 | |
2373 | 2608 | void yyset_debug (int _bdebug , yyscan_t yyscanner) |
|
Line 2374... | Line 2609... | ||
2374 | void glcpp_set_debug (int bdebug , yyscan_t yyscanner) |
2609 | { |
2375 | { |
2610 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2376 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2611 | yy_flex_debug = _bdebug ; |
2377 | yy_flex_debug = bdebug ; |
2612 | } |
2378 | } |
2613 | |
Line 2379... | Line 2614... | ||
2379 | 2614 | /* Accessor methods for yylval and yylloc */ |
|
2380 | /* Accessor methods for yylval and yylloc */ |
2615 | |
2381 | 2616 | YYSTYPE * yyget_lval (yyscan_t yyscanner) |
|
2382 | YYSTYPE * glcpp_get_lval (yyscan_t yyscanner) |
2617 | { |
2383 | { |
2618 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
Line 2384... | Line 2619... | ||
2384 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2619 | return yylval; |
Line 2385... | Line 2620... | ||
2385 | return yylval; |
2620 | } |
2386 | } |
2621 | |
2387 | 2622 | void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) |
|
2388 | void glcpp_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) |
2623 | { |
2389 | { |
- | |
2390 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2624 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2391 | yylval = yylval_param; |
- | |
2392 | } |
2625 | yylval = yylval_param; |
2393 | 2626 | } |
|
2394 | YYLTYPE *glcpp_get_lloc (yyscan_t yyscanner) |
2627 | |
2395 | { |
2628 | YYLTYPE *yyget_lloc (yyscan_t yyscanner) |
2396 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2629 | { |
Line 2397... | Line 2630... | ||
2397 | return yylloc; |
2630 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
Line 2398... | Line 2631... | ||
2398 | } |
2631 | return yylloc; |
2399 | 2632 | } |
|
2400 | void glcpp_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) |
2633 | |
2401 | { |
2634 | void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) |
Line 2429... | Line 2662... | ||
2429 | memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
2662 | |
Line 2430... | Line 2663... | ||
2430 | 2663 | return yy_init_globals ( *ptr_yy_globals ); |
|
2431 | return yy_init_globals ( *ptr_yy_globals ); |
2664 | } |
Line 2432... | Line 2665... | ||
2432 | } |
2665 | |
2433 | 2666 | /* yylex_init_extra has the same functionality as yylex_init, but follows the |
|
2434 | /* glcpp_lex_init_extra has the same functionality as glcpp_lex_init, but follows the |
2667 | * convention of taking the scanner as the last argument. Note however, that |
2435 | * convention of taking the scanner as the last argument. Note however, that |
2668 | * this is a *pointer* to a scanner, as it will be allocated by this call (and |
2436 | * this is a *pointer* to a scanner, as it will be allocated by this call (and |
2669 | * is the reason, too, why this function also must handle its own declaration). |
2437 | * is the reason, too, why this function also must handle its own declaration). |
2670 | * The user defined value in the first argument will be available to yyalloc in |
2438 | * The user defined value in the first argument will be available to glcpp_alloc in |
2671 | * the yyextra field. |
2439 | * the yyextra field. |
- | |
2440 | */ |
2672 | */ |
2441 | - | ||
2442 | int glcpp_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) |
2673 | int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) |
2443 | 2674 | { |
|
Line 2444... | Line 2675... | ||
2444 | { |
2675 | struct yyguts_t dummy_yyguts; |
Line 2445... | Line 2676... | ||
2445 | struct yyguts_t dummy_yyguts; |
2676 | |
2446 | 2677 | yyset_extra (yy_user_defined, &dummy_yyguts); |
|
2447 | glcpp_set_extra (yy_user_defined, &dummy_yyguts); |
2678 | |
2448 | 2679 | if (ptr_yy_globals == NULL){ |
|
Line 2449... | Line 2680... | ||
2449 | if (ptr_yy_globals == NULL){ |
2680 | errno = EINVAL; |
Line 2450... | Line 2681... | ||
2450 | errno = EINVAL; |
2681 | return 1; |
2451 | return 1; |
2682 | } |
2452 | } |
2683 | |
2453 | 2684 | *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); |
|
Line 2454... | Line 2685... | ||
2454 | *ptr_yy_globals = (yyscan_t) glcpp_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); |
2685 | |
2455 | 2686 | if (*ptr_yy_globals == NULL){ |
|
2456 | if (*ptr_yy_globals == NULL){ |
2687 | errno = ENOMEM; |
Line 2457... | Line 2688... | ||
2457 | errno = ENOMEM; |
2688 | return 1; |
Line 2458... | Line 2689... | ||
2458 | return 1; |
2689 | } |
2459 | } |
2690 | |
Line 2460... | Line 2691... | ||
2460 | 2691 | /* By setting to 0xAA, we expose bugs in |
|
2461 | /* By setting to 0xAA, we expose bugs in |
2692 | yy_init_globals. Leave at 0x00 for releases. */ |
2462 | yy_init_globals. Leave at 0x00 for releases. */ |
2693 | memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
2463 | memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
2694 | |
2464 | 2695 | yyset_extra (yy_user_defined, *ptr_yy_globals); |
|
2465 | glcpp_set_extra (yy_user_defined, *ptr_yy_globals); |
2696 | |
Line 2466... | Line 2697... | ||
2466 | 2697 | return yy_init_globals ( *ptr_yy_globals ); |
|
2467 | return yy_init_globals ( *ptr_yy_globals ); |
2698 | } |
2468 | } |
2699 | |
2469 | 2700 | static int yy_init_globals (yyscan_t yyscanner) |
|
2470 | static int yy_init_globals (yyscan_t yyscanner) |
2701 | { |
2471 | { |
2702 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
Line 2472... | Line 2703... | ||
2472 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2703 | /* Initialization is the same as for the non-reentrant scanner. |
2473 | /* Initialization is the same as for the non-reentrant scanner. |
2704 | * This function is called from yylex_destroy(), so don't allocate here. |
Line 2488... | Line 2719... | ||
2488 | /* Defined in main.c */ |
2719 | #ifdef YY_STDINIT |
2489 | #ifdef YY_STDINIT |
2720 | yyin = stdin; |
2490 | yyin = stdin; |
2721 | yyout = stdout; |
2491 | yyout = stdout; |
2722 | #else |
2492 | #else |
2723 | yyin = NULL; |
2493 | yyin = (FILE *) 0; |
2724 | yyout = NULL; |
2494 | yyout = (FILE *) 0; |
2725 | #endif |
2495 | #endif |
2726 | |
Line 2496... | Line 2727... | ||
2496 | 2727 | /* For future reference: Set errno on error, since we are called by |
|
2497 | /* For future reference: Set errno on error, since we are called by |
2728 | * yylex_init() |
2498 | * glcpp_lex_init() |
2729 | */ |
2499 | */ |
2730 | return 0; |
2500 | return 0; |
2731 | } |
Line 2501... | Line 2732... | ||
2501 | } |
2732 | |
2502 | 2733 | /* yylex_destroy is for both reentrant and non-reentrant scanners. */ |
|
2503 | /* glcpp_lex_destroy is for both reentrant and non-reentrant scanners. */ |
2734 | int yylex_destroy (yyscan_t yyscanner) |
2504 | int glcpp_lex_destroy (yyscan_t yyscanner) |
2735 | { |
Line 2505... | Line 2736... | ||
2505 | { |
2736 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2506 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2737 | |
2507 | 2738 | /* Pop the buffer stack, destroying each element. */ |
|
2508 | /* Pop the buffer stack, destroying each element. */ |
2739 | while(YY_CURRENT_BUFFER){ |
2509 | while(YY_CURRENT_BUFFER){ |
2740 | yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); |
2510 | glcpp__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); |
2741 | YY_CURRENT_BUFFER_LVALUE = NULL; |
Line 2511... | Line 2742... | ||
2511 | YY_CURRENT_BUFFER_LVALUE = NULL; |
2742 | yypop_buffer_state(yyscanner); |
2512 | glcpp_pop_buffer_state(yyscanner); |
2743 | } |
2513 | } |
2744 | |
Line 2514... | Line 2745... | ||
2514 | 2745 | /* Destroy the stack itself. */ |
|
2515 | /* Destroy the stack itself. */ |
2746 | yyfree(yyg->yy_buffer_stack , yyscanner); |
2516 | glcpp_free(yyg->yy_buffer_stack ,yyscanner); |
2747 | yyg->yy_buffer_stack = NULL; |
Line 2517... | Line 2748... | ||
2517 | yyg->yy_buffer_stack = NULL; |
2748 | |
2518 | 2749 | /* Destroy the start condition stack. */ |
|
2519 | /* Destroy the start condition stack. */ |
2750 | yyfree( yyg->yy_start_stack , yyscanner ); |
Line 2520... | Line 2751... | ||
2520 | glcpp_free(yyg->yy_start_stack ,yyscanner ); |
2751 | yyg->yy_start_stack = NULL; |
2521 | yyg->yy_start_stack = NULL; |
2752 | |
2522 | 2753 | /* Reset the globals. This is important in a non-reentrant scanner so the next time |
|
2523 | /* Reset the globals. This is important in a non-reentrant scanner so the next time |
2754 | * yylex() is called, initialization will occur. */ |
2524 | * glcpp_lex() is called, initialization will occur. */ |
2755 | yy_init_globals( yyscanner); |
Line 2525... | Line 2756... | ||
2525 | yy_init_globals( yyscanner); |
2756 | |
2526 | 2757 | /* Destroy the main struct (reentrant only). */ |
|
2527 | /* Destroy the main struct (reentrant only). */ |
2758 | yyfree ( yyscanner , yyscanner ); |
Line 2528... | Line 2759... | ||
2528 | glcpp_free ( yyscanner , yyscanner ); |
2759 | yyscanner = NULL; |
2529 | yyscanner = NULL; |
2760 | return 0; |
2530 | return 0; |
2761 | } |
- | 2762 | ||
- | 2763 | /* |
|
- | 2764 | * Internal utility routines. |
|
2531 | } |
2765 | */ |
2532 | 2766 | ||
2533 | /* |
2767 | #ifndef yytext_ptr |
2534 | * Internal utility routines. |
2768 | static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) |
2535 | */ |
2769 | { |
Line 2536... | Line 2770... | ||
2536 | 2770 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
|
2537 | #ifndef yytext_ptr |
2771 | (void)yyg; |
2538 | static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) |
2772 | |
2539 | { |
2773 | int i; |
2540 | register int i; |
2774 | for ( i = 0; i < n; ++i ) |
2541 | for ( i = 0; i < n; ++i ) |
2775 | s1[i] = s2[i]; |
Line 2542... | Line 2776... | ||
2542 | s1[i] = s2[i]; |
2776 | } |
2543 | } |
2777 | #endif |
2544 | #endif |
2778 | |
Line 2545... | Line 2779... | ||
2545 | 2779 | #ifdef YY_NEED_STRLEN |
|
2546 | #ifdef YY_NEED_STRLEN |
2780 | static int yy_flex_strlen (const char * s , yyscan_t yyscanner) |
- | 2781 | { |
|
- | 2782 | int n; |
|
2547 | static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) |
2783 | for ( n = 0; s[n]; ++n ) |
2548 | { |
2784 | ; |
Line 2549... | Line 2785... | ||
2549 | register int n; |
2785 | |
2550 | for ( n = 0; s[n]; ++n ) |
2786 | return n; |
- | 2787 | } |
|
- | 2788 | #endif |
|
- | 2789 | ||
2551 | ; |
2790 | void *yyalloc (yy_size_t size , yyscan_t yyscanner) |
2552 | 2791 | { |
|
2553 | return n; |
2792 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2554 | } |
2793 | (void)yyg; |
2555 | #endif |
2794 | return malloc(size); |
2556 | 2795 | } |
|
2557 | void *glcpp_alloc (yy_size_t size , yyscan_t yyscanner) |
2796 | |
2558 | { |
2797 | void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) |
2559 | return (void *) malloc( size ); |
2798 | { |
Line 2560... | Line 2799... | ||
2560 | } |
2799 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2561 | 2800 | (void)yyg; |
|
- | 2801 | ||
- | 2802 | /* The cast to (char *) in the following accommodates both |
|
2562 | void *glcpp_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) |
2803 | * implementations that use char* generic pointers, and those |
2563 | { |
2804 | * that use void* generic pointers. It works with the latter |
Line 2564... | Line 2805... | ||
2564 | /* The cast to (char *) in the following accommodates both |
2805 | * because both ANSI C and C++ allow castless assignment from |
Line 2565... | Line 2806... | ||
2565 | * implementations that use char* generic pointers, and those |
2806 | * any pointer type to void*, and deal with argument conversions |
2566 | * that use void* generic pointers. It works with the latter |
- | |
Line 2567... | Line 2807... | ||
2567 | * because both ANSI C and C++ allow castless assignment from |
2807 | * as though doing an assignment. |
2568 | * any pointer type to void*, and deal with argument conversions |
2808 | */ |
2569 | * as though doing an assignment. |
2809 | return realloc(ptr, size); |
2570 | */ |
2810 | } |
2571 | return (void *) realloc( (char *) ptr, size ); |
2811 |