use the proper variable type for these unixODBC API calls, eliminating warnings on...
[asterisk-bristuff.git] / main / ast_expr2f.c
blob3693e4842153b8d1a5195c3087a32c77c1e5f329
1 #line 2 "ast_expr2f.c"
3 #line 4 "ast_expr2f.c"
5 #define YY_INT_ALIGNED short int
7 /* A lexical scanner generated by flex */
9 #define FLEX_SCANNER
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 33
13 #if YY_FLEX_SUBMINOR_VERSION > 0
14 #define FLEX_BETA
15 #endif
17 /* First, we deal with platform-specific or compiler-specific issues. */
19 /* begin standard C headers. */
20 #include <stdio.h>
21 #include <string.h>
22 #include <errno.h>
23 #include <stdlib.h>
25 /* end standard C headers. */
27 /* flex integer type definitions */
29 #ifndef FLEXINT_H
30 #define FLEXINT_H
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
34 #if __STDC_VERSION__ >= 199901L
36 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37 * if you want the limit (max/min) macros for int types.
39 #ifndef __STDC_LIMIT_MACROS
40 #define __STDC_LIMIT_MACROS 1
41 #endif
43 #include <inttypes.h>
44 typedef int8_t flex_int8_t;
45 typedef uint8_t flex_uint8_t;
46 typedef int16_t flex_int16_t;
47 typedef uint16_t flex_uint16_t;
48 typedef int32_t flex_int32_t;
49 typedef uint32_t flex_uint32_t;
50 #else
51 typedef signed char flex_int8_t;
52 typedef short int flex_int16_t;
53 typedef int flex_int32_t;
54 typedef unsigned char flex_uint8_t;
55 typedef unsigned short int flex_uint16_t;
56 typedef unsigned int flex_uint32_t;
57 #endif /* ! C99 */
59 /* Limits of integral types. */
60 #ifndef INT8_MIN
61 #define INT8_MIN (-128)
62 #endif
63 #ifndef INT16_MIN
64 #define INT16_MIN (-32767-1)
65 #endif
66 #ifndef INT32_MIN
67 #define INT32_MIN (-2147483647-1)
68 #endif
69 #ifndef INT8_MAX
70 #define INT8_MAX (127)
71 #endif
72 #ifndef INT16_MAX
73 #define INT16_MAX (32767)
74 #endif
75 #ifndef INT32_MAX
76 #define INT32_MAX (2147483647)
77 #endif
78 #ifndef UINT8_MAX
79 #define UINT8_MAX (255U)
80 #endif
81 #ifndef UINT16_MAX
82 #define UINT16_MAX (65535U)
83 #endif
84 #ifndef UINT32_MAX
85 #define UINT32_MAX (4294967295U)
86 #endif
88 #endif /* ! FLEXINT_H */
90 #ifdef __cplusplus
92 /* The "const" storage-class-modifier is valid. */
93 #define YY_USE_CONST
95 #else /* ! __cplusplus */
97 #if __STDC__
99 #define YY_USE_CONST
101 #endif /* __STDC__ */
102 #endif /* ! __cplusplus */
104 #ifdef YY_USE_CONST
105 #define yyconst const
106 #else
107 #define yyconst
108 #endif
110 /* Returned upon end-of-file. */
111 #define YY_NULL 0
113 /* Promotes a possibly negative, possibly signed char to an unsigned
114 * integer for use as an array index. If the signed char is negative,
115 * we want to instead treat it as an 8-bit unsigned char, hence the
116 * double cast.
118 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
120 /* An opaque pointer. */
121 #ifndef YY_TYPEDEF_YY_SCANNER_T
122 #define YY_TYPEDEF_YY_SCANNER_T
123 typedef void* yyscan_t;
124 #endif
126 /* For convenience, these vars (plus the bison vars far below)
127 are macros in the reentrant scanner. */
128 #define yyin yyg->yyin_r
129 #define yyout yyg->yyout_r
130 #define yyextra yyg->yyextra_r
131 #define yyleng yyg->yyleng_r
132 #define yytext yyg->yytext_r
133 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
134 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
135 #define yy_flex_debug yyg->yy_flex_debug_r
137 int ast_yylex_init (yyscan_t* scanner);
139 /* Enter a start condition. This macro really ought to take a parameter,
140 * but we do it the disgusting crufty way forced on us by the ()-less
141 * definition of BEGIN.
143 #define BEGIN yyg->yy_start = 1 + 2 *
145 /* Translate the current start state into a value that can be later handed
146 * to BEGIN to return to the state. The YYSTATE alias is for lex
147 * compatibility.
149 #define YY_START ((yyg->yy_start - 1) / 2)
150 #define YYSTATE YY_START
152 /* Action number for EOF rule of a given start state. */
153 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
155 /* Special action meaning "start processing a new file". */
156 #define YY_NEW_FILE ast_yyrestart(yyin ,yyscanner )
158 #define YY_END_OF_BUFFER_CHAR 0
160 /* Size of default input buffer. */
161 #ifndef YY_BUF_SIZE
162 #define YY_BUF_SIZE 16384
163 #endif
165 /* The state buf must be large enough to hold one state per character in the main buffer.
167 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
169 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
170 #define YY_TYPEDEF_YY_BUFFER_STATE
171 typedef struct yy_buffer_state *YY_BUFFER_STATE;
172 #endif
174 #define EOB_ACT_CONTINUE_SCAN 0
175 #define EOB_ACT_END_OF_FILE 1
176 #define EOB_ACT_LAST_MATCH 2
178 #define YY_LESS_LINENO(n)
180 /* Return all but the first "n" matched characters back to the input stream. */
181 #define yyless(n) \
182 do \
184 /* Undo effects of setting up yytext. */ \
185 int yyless_macro_arg = (n); \
186 YY_LESS_LINENO(yyless_macro_arg);\
187 *yy_cp = yyg->yy_hold_char; \
188 YY_RESTORE_YY_MORE_OFFSET \
189 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
190 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
192 while ( 0 )
194 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
196 /* The following is because we cannot portably get our hands on size_t
197 * (without autoconf's help, which isn't available because we want
198 * flex-generated scanners to compile on their own).
201 #ifndef YY_TYPEDEF_YY_SIZE_T
202 #define YY_TYPEDEF_YY_SIZE_T
203 typedef unsigned int yy_size_t;
204 #endif
206 #ifndef YY_STRUCT_YY_BUFFER_STATE
207 #define YY_STRUCT_YY_BUFFER_STATE
208 struct yy_buffer_state
210 FILE *yy_input_file;
212 char *yy_ch_buf; /* input buffer */
213 char *yy_buf_pos; /* current position in input buffer */
215 /* Size of input buffer in bytes, not including room for EOB
216 * characters.
218 yy_size_t yy_buf_size;
220 /* Number of characters read into yy_ch_buf, not including EOB
221 * characters.
223 int yy_n_chars;
225 /* Whether we "own" the buffer - i.e., we know we created it,
226 * and can realloc() it to grow it, and should free() it to
227 * delete it.
229 int yy_is_our_buffer;
231 /* Whether this is an "interactive" input source; if so, and
232 * if we're using stdio for input, then we want to use getc()
233 * instead of fread(), to make sure we stop fetching input after
234 * each newline.
236 int yy_is_interactive;
238 /* Whether we're considered to be at the beginning of a line.
239 * If so, '^' rules will be active on the next match, otherwise
240 * not.
242 int yy_at_bol;
244 int yy_bs_lineno; /**< The line count. */
245 int yy_bs_column; /**< The column count. */
247 /* Whether to try to fill the input buffer when we reach the
248 * end of it.
250 int yy_fill_buffer;
252 int yy_buffer_status;
254 #define YY_BUFFER_NEW 0
255 #define YY_BUFFER_NORMAL 1
256 /* When an EOF's been seen but there's still some text to process
257 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
258 * shouldn't try reading from the input source any more. We might
259 * still have a bunch of tokens to match, though, because of
260 * possible backing-up.
262 * When we actually see the EOF, we change the status to "new"
263 * (via ast_yyrestart()), so that the user can continue scanning by
264 * just pointing yyin at a new input file.
266 #define YY_BUFFER_EOF_PENDING 2
269 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
271 /* We provide macros for accessing buffer states in case in the
272 * future we want to put the buffer states in a more general
273 * "scanner state".
275 * Returns the top of the stack, or NULL.
277 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
278 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
279 : NULL)
281 /* Same as previous macro, but useful when we know that the buffer stack is not
282 * NULL or when we need an lvalue. For internal use only.
284 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
286 void ast_yyrestart (FILE *input_file ,yyscan_t yyscanner );
287 void ast_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
288 YY_BUFFER_STATE ast_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
289 void ast_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
290 void ast_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
291 void ast_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
292 void ast_yypop_buffer_state (yyscan_t yyscanner );
294 static void ast_yyensure_buffer_stack (yyscan_t yyscanner );
295 static void ast_yy_load_buffer_state (yyscan_t yyscanner );
296 static void ast_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
298 #define YY_FLUSH_BUFFER ast_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
300 YY_BUFFER_STATE ast_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
301 YY_BUFFER_STATE ast_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
302 YY_BUFFER_STATE ast_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
304 void *ast_yyalloc (yy_size_t ,yyscan_t yyscanner );
305 void *ast_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
306 void ast_yyfree (void * ,yyscan_t yyscanner );
308 #define yy_new_buffer ast_yy_create_buffer
310 #define yy_set_interactive(is_interactive) \
312 if ( ! YY_CURRENT_BUFFER ){ \
313 ast_yyensure_buffer_stack (yyscanner); \
314 YY_CURRENT_BUFFER_LVALUE = \
315 ast_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
317 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
320 #define yy_set_bol(at_bol) \
322 if ( ! YY_CURRENT_BUFFER ){\
323 ast_yyensure_buffer_stack (yyscanner); \
324 YY_CURRENT_BUFFER_LVALUE = \
325 ast_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
327 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
330 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
332 /* Begin user sect3 */
334 #define ast_yywrap(n) 1
335 #define YY_SKIP_YYWRAP
337 typedef char YY_CHAR;
339 typedef int yy_state_type;
341 #define yytext_ptr yytext_r
342 static yyconst flex_int16_t yy_nxt[][128] =
345 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
346 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
347 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
348 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
349 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
350 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
351 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
352 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
353 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
354 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
356 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
357 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
358 0, 0, 0, 0, 0, 0, 0, 0
362 7, 8, 8, 8, 8, 8, 8, 8, 8, 9,
363 10, 8, 8, 9, 8, 8, 8, 8, 8, 8,
364 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
365 8, 8, 9, 11, 12, 13, 14, 15, 16, 13,
366 17, 18, 19, 20, 13, 21, 13, 22, 23, 23,
367 23, 23, 23, 23, 23, 23, 23, 23, 24, 13,
368 25, 26, 27, 28, 13, 13, 13, 13, 13, 13,
370 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
371 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
372 13, 8, 13, 8, 13, 13, 8, 13, 13, 13,
373 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
374 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
375 13, 13, 13, 8, 29, 8, 8, 8
379 7, 8, 8, 8, 8, 8, 8, 8, 8, 9,
380 10, 8, 8, 9, 8, 8, 8, 8, 8, 8,
381 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
382 8, 8, 9, 11, 12, 13, 14, 15, 16, 13,
384 17, 18, 19, 20, 13, 21, 13, 22, 23, 23,
385 23, 23, 23, 23, 23, 23, 23, 23, 24, 13,
386 25, 26, 27, 28, 13, 13, 13, 13, 13, 13,
387 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
388 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
389 13, 8, 13, 8, 13, 13, 8, 13, 13, 13,
390 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
391 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
392 13, 13, 13, 8, 29, 8, 8, 8
396 7, 30, 30, 30, 30, 30, 30, 30, 30, 30,
398 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
399 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
400 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
401 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
402 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
403 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
404 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
405 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
406 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
407 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
409 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
410 30, 30, 30, 31, 30, 32, 30, 30
414 7, 30, 30, 30, 30, 30, 30, 30, 30, 30,
415 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
416 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
417 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
418 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
419 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
420 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
421 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
423 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
424 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
425 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
426 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
427 30, 30, 30, 31, 30, 32, 30, 30
431 7, 33, 33, 33, 33, 33, 33, 33, 33, 34,
432 34, 33, 33, 34, 33, 33, 33, 33, 33, 33,
433 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
434 33, 33, 34, 34, 33, 33, 35, 34, 34, 33,
435 34, 34, 34, 34, 33, 34, 33, 34, 33, 33,
437 33, 33, 33, 33, 33, 33, 33, 33, 34, 33,
438 34, 34, 34, 34, 33, 33, 33, 33, 33, 33,
439 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
440 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
441 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
442 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
443 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
444 33, 33, 33, 33, 34, 33, 33, 33
448 7, 33, 33, 33, 33, 33, 33, 33, 33, 34,
449 34, 33, 33, 34, 33, 33, 33, 33, 33, 33,
451 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
452 33, 33, 34, 34, 33, 33, 35, 34, 34, 33,
453 34, 34, 34, 34, 33, 34, 33, 34, 33, 33,
454 33, 33, 33, 33, 33, 33, 33, 33, 34, 33,
455 34, 34, 34, 34, 33, 33, 33, 33, 33, 33,
456 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
457 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
458 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
459 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
460 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
462 33, 33, 33, 33, 34, 33, 33, 33
466 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
467 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
468 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
469 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
470 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
471 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
472 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
473 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
474 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
476 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
477 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
478 -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
479 -7, -7, -7, -7, -7, -7, -7, -7
483 7, -8, -8, -8, -8, -8, -8, -8, -8, -8,
484 -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
485 -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
486 -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
487 -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
488 -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
490 -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
491 -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
492 -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
493 -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
494 -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
495 -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
496 -8, -8, -8, -8, -8, -8, -8, -8
500 7, -9, -9, -9, -9, -9, -9, -9, -9, -9,
501 -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
502 -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
504 -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
505 -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
506 -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
507 -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
508 -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
509 -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
510 -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
511 -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
512 -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
513 -9, -9, -9, -9, -9, -9, -9, -9
518 7, -10, -10, -10, -10, -10, -10, -10, -10, -10,
519 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
520 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
521 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
522 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
523 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
524 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
525 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
526 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
527 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
529 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
530 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
531 -10, -10, -10, -10, -10, -10, -10, -10
535 7, -11, -11, -11, -11, -11, -11, -11, -11, -11,
536 -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
537 -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
538 -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
539 -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
540 -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
541 -11, 36, -11, -11, -11, -11, -11, -11, -11, -11,
543 -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
544 -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
545 -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
546 -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
547 -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
548 -11, -11, -11, -11, -11, -11, -11, -11
552 7, 37, 37, 37, 37, 37, 37, 37, 37, 37,
553 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
554 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
555 37, 37, 37, 37, 38, 37, 37, 37, 37, 37,
557 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
558 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
559 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
560 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
561 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
562 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
563 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
564 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
565 37, 37, 37, 37, 37, 37, 37, 37
569 7, -13, -13, -13, -13, -13, -13, -13, -13, -13,
571 -13, -13, -13, -13, -13, -13, -13, -13, -13, -13,
572 -13, -13, -13, -13, -13, -13, -13, -13, -13, -13,
573 -13, -13, -13, -13, -13, 39, 39, -13, -13, 39,
574 -13, -13, -13, -13, 39, -13, 39, -13, 39, 39,
575 39, 39, 39, 39, 39, 39, 39, 39, -13, 39,
576 -13, -13, -13, -13, 39, 39, 39, 39, 39, 39,
577 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
578 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
579 39, -13, 39, -13, 39, 39, -13, 39, 39, 39,
580 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
582 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
583 39, 39, 39, -13, -13, -13, -13, -13
587 7, -14, -14, -14, -14, -14, -14, -14, -14, -14,
588 -14, -14, -14, -14, -14, -14, -14, -14, -14, -14,
589 -14, -14, -14, -14, -14, -14, -14, -14, -14, -14,
590 -14, -14, -14, -14, -14, 39, 39, -14, -14, 39,
591 -14, -14, -14, -14, 39, -14, 39, -14, 39, 39,
592 39, 39, 39, 39, 39, 39, 39, 39, -14, 39,
593 -14, -14, -14, -14, 39, 39, 39, 39, 39, 39,
594 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
596 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
597 39, -14, 39, -14, 39, 39, -14, 39, 39, 39,
598 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
599 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
600 39, 39, 39, 40, -14, -14, -14, -14
604 7, -15, -15, -15, -15, -15, -15, -15, -15, -15,
605 -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
606 -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
607 -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
608 -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
610 -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
611 -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
612 -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
613 -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
614 -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
615 -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
616 -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
617 -15, -15, -15, -15, -15, -15, -15, -15
621 7, -16, -16, -16, -16, -16, -16, -16, -16, -16,
622 -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
624 -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
625 -16, -16, -16, -16, -16, -16, -16, -16, 41, -16,
626 -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
627 -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
628 -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
629 -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
630 -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
631 -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
632 -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
633 -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
635 -16, -16, -16, -16, -16, -16, -16, -16
639 7, -17, -17, -17, -17, -17, -17, -17, -17, -17,
640 -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
641 -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
642 -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
643 -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
644 -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
645 -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
646 -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
647 -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
649 -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
650 -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
651 -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
652 -17, -17, -17, -17, -17, -17, -17, -17
656 7, -18, -18, -18, -18, -18, -18, -18, -18, -18,
657 -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
658 -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
659 -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
660 -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
661 -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
663 -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
664 -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
665 -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
666 -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
667 -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
668 -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
669 -18, -18, -18, -18, -18, -18, -18, -18
673 7, -19, -19, -19, -19, -19, -19, -19, -19, -19,
674 -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
675 -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
677 -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
678 -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
679 -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
680 -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
681 -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
682 -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
683 -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
684 -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
685 -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
686 -19, -19, -19, -19, -19, -19, -19, -19
691 7, -20, -20, -20, -20, -20, -20, -20, -20, -20,
692 -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
693 -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
694 -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
695 -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
696 -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
697 -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
698 -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
699 -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
700 -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
702 -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
703 -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
704 -20, -20, -20, -20, -20, -20, -20, -20
708 7, -21, -21, -21, -21, -21, -21, -21, -21, -21,
709 -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
710 -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
711 -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
712 -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
713 -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
714 -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
716 -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
717 -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
718 -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
719 -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
720 -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
721 -21, -21, -21, -21, -21, -21, -21, -21
725 7, -22, -22, -22, -22, -22, -22, -22, -22, -22,
726 -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
727 -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
728 -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
730 -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
731 -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
732 -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
733 -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
734 -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
735 -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
736 -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
737 -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
738 -22, -22, -22, -22, -22, -22, -22, -22
742 7, -23, -23, -23, -23, -23, -23, -23, -23, -23,
744 -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
745 -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
746 -23, -23, -23, -23, -23, 39, 39, -23, -23, 39,
747 -23, -23, -23, -23, 39, -23, 39, -23, 42, 42,
748 42, 42, 42, 42, 42, 42, 42, 42, -23, 39,
749 -23, -23, -23, -23, 39, 39, 39, 39, 39, 39,
750 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
751 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
752 39, -23, 39, -23, 39, 39, -23, 39, 39, 39,
753 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
755 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
756 39, 39, 39, -23, -23, -23, -23, -23
760 7, -24, -24, -24, -24, -24, -24, -24, -24, -24,
761 -24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
762 -24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
763 -24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
764 -24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
765 -24, -24, -24, -24, -24, -24, -24, -24, 43, -24,
766 -24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
767 -24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
769 -24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
770 -24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
771 -24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
772 -24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
773 -24, -24, -24, -24, -24, -24, -24, -24
777 7, -25, -25, -25, -25, -25, -25, -25, -25, -25,
778 -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
779 -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
780 -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
781 -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
783 -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
784 -25, 44, -25, -25, -25, -25, -25, -25, -25, -25,
785 -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
786 -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
787 -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
788 -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
789 -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
790 -25, -25, -25, -25, -25, -25, -25, -25
794 7, -26, -26, -26, -26, -26, -26, -26, -26, -26,
795 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
797 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
798 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
799 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
800 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
801 -26, 45, -26, -26, -26, -26, -26, -26, -26, -26,
802 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
803 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
804 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
805 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
806 -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
808 -26, -26, -26, -26, -26, -26, 46, -26
812 7, -27, -27, -27, -27, -27, -27, -27, -27, -27,
813 -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
814 -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
815 -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
816 -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
817 -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
818 -27, 47, -27, -27, -27, -27, -27, -27, -27, -27,
819 -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
820 -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
822 -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
823 -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
824 -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
825 -27, -27, -27, -27, -27, -27, -27, -27
829 7, -28, -28, -28, -28, -28, -28, -28, -28, -28,
830 -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
831 -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
832 -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
833 -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
834 -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
836 -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
837 -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
838 -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
839 -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
840 -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
841 -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
842 -28, -28, -28, -28, -28, -28, -28, -28
846 7, -29, -29, -29, -29, -29, -29, -29, -29, -29,
847 -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
848 -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
850 -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
851 -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
852 -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
853 -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
854 -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
855 -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
856 -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
857 -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
858 -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
859 -29, -29, -29, -29, 48, -29, -29, -29
864 7, 49, 49, 49, 49, 49, 49, 49, 49, 49,
865 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
866 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
867 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
868 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
869 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
870 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
871 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
872 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
873 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
875 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
876 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
877 49, 49, 49, 50, 49, 51, 49, 49
881 7, -31, -31, -31, -31, -31, -31, -31, -31, -31,
882 -31, -31, -31, -31, -31, -31, -31, -31, -31, -31,
883 -31, -31, -31, -31, -31, -31, -31, -31, -31, -31,
884 -31, -31, -31, -31, -31, -31, -31, -31, -31, -31,
885 -31, -31, -31, -31, -31, -31, -31, -31, -31, -31,
886 -31, -31, -31, -31, -31, -31, -31, -31, -31, -31,
887 -31, -31, -31, -31, -31, -31, -31, -31, -31, -31,
889 -31, -31, -31, -31, -31, -31, -31, -31, -31, -31,
890 -31, -31, -31, -31, -31, -31, -31, -31, -31, -31,
891 -31, -31, -31, -31, -31, -31, -31, -31, -31, -31,
892 -31, -31, -31, -31, -31, -31, -31, -31, -31, -31,
893 -31, -31, -31, -31, -31, -31, -31, -31, -31, -31,
894 -31, -31, -31, -31, -31, -31, -31, -31
898 7, -32, -32, -32, -32, -32, -32, -32, -32, -32,
899 -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
900 -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
901 -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
903 -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
904 -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
905 -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
906 -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
907 -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
908 -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
909 -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
910 -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
911 -32, -32, -32, -32, -32, -32, -32, -32
915 7, 52, 52, 52, 52, 52, 52, 52, 52, -33,
917 -33, 52, 52, -33, 52, 52, 52, 52, 52, 52,
918 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
919 52, 52, -33, -33, 52, 52, -33, -33, -33, 52,
920 -33, -33, -33, -33, 52, -33, 52, -33, 52, 52,
921 52, 52, 52, 52, 52, 52, 52, 52, -33, 52,
922 -33, -33, -33, -33, 52, 52, 52, 52, 52, 52,
923 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
924 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
925 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
926 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
928 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
929 52, 52, 52, 52, -33, 52, 52, 52
933 7, -34, -34, -34, -34, -34, -34, -34, -34, -34,
934 -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
935 -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
936 -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
937 -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
938 -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
939 -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
940 -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
942 -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
943 -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
944 -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
945 -34, -34, -34, -34, -34, -34, -34, -34, -34, -34,
946 -34, -34, -34, -34, -34, -34, -34, -34
950 7, -35, -35, -35, -35, -35, -35, -35, -35, -35,
951 -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
952 -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
953 -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
954 -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
956 -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
957 -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
958 -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
959 -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
960 -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
961 -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
962 -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
963 -35, -35, -35, 53, -35, -35, -35, -35
967 7, -36, -36, -36, -36, -36, -36, -36, -36, -36,
968 -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
970 -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
971 -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
972 -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
973 -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
974 -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
975 -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
976 -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
977 -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
978 -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
979 -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
981 -36, -36, -36, -36, -36, -36, -36, -36
985 7, 37, 37, 37, 37, 37, 37, 37, 37, 37,
986 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
987 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
988 37, 37, 37, 37, 38, 37, 37, 37, 37, 37,
989 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
990 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
991 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
992 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
993 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
995 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
996 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
997 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
998 37, 37, 37, 37, 37, 37, 37, 37
1002 7, -38, -38, -38, -38, -38, -38, -38, -38, -38,
1003 -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
1004 -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
1005 -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
1006 -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
1007 -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
1009 -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
1010 -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
1011 -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
1012 -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
1013 -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
1014 -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
1015 -38, -38, -38, -38, -38, -38, -38, -38
1019 7, -39, -39, -39, -39, -39, -39, -39, -39, -39,
1020 -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
1021 -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
1023 -39, -39, -39, -39, -39, 39, 39, -39, -39, 39,
1024 -39, -39, -39, -39, 39, -39, 39, -39, 39, 39,
1025 39, 39, 39, 39, 39, 39, 39, 39, -39, 39,
1026 -39, -39, -39, -39, 39, 39, 39, 39, 39, 39,
1027 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
1028 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
1029 39, -39, 39, -39, 39, 39, -39, 39, 39, 39,
1030 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
1031 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
1032 39, 39, 39, -39, -39, -39, -39, -39
1037 7, -40, -40, -40, -40, -40, -40, -40, -40, -40,
1038 -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
1039 -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
1040 -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
1041 -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
1042 -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
1043 -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
1044 -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
1045 -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
1046 -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
1048 -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
1049 -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
1050 -40, -40, -40, -40, -40, -40, -40, -40
1054 7, -41, -41, -41, -41, -41, -41, -41, -41, -41,
1055 -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
1056 -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
1057 -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
1058 -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
1059 -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
1060 -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
1062 -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
1063 -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
1064 -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
1065 -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
1066 -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
1067 -41, -41, -41, -41, -41, -41, -41, -41
1071 7, -42, -42, -42, -42, -42, -42, -42, -42, -42,
1072 -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
1073 -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
1074 -42, -42, -42, -42, -42, 39, 39, -42, -42, 39,
1076 -42, -42, -42, -42, 39, -42, 39, -42, 42, 42,
1077 42, 42, 42, 42, 42, 42, 42, 42, -42, 39,
1078 -42, -42, -42, -42, 39, 39, 39, 39, 39, 39,
1079 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
1080 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
1081 39, -42, 39, -42, 39, 39, -42, 39, 39, 39,
1082 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
1083 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
1084 39, 39, 39, -42, -42, -42, -42, -42
1088 7, -43, -43, -43, -43, -43, -43, -43, -43, -43,
1090 -43, -43, -43, -43, -43, -43, -43, -43, -43, -43,
1091 -43, -43, -43, -43, -43, -43, -43, -43, -43, -43,
1092 -43, -43, -43, -43, -43, -43, -43, -43, -43, -43,
1093 -43, -43, -43, -43, -43, -43, -43, -43, -43, -43,
1094 -43, -43, -43, -43, -43, -43, -43, -43, -43, -43,
1095 -43, -43, -43, -43, -43, -43, -43, -43, -43, -43,
1096 -43, -43, -43, -43, -43, -43, -43, -43, -43, -43,
1097 -43, -43, -43, -43, -43, -43, -43, -43, -43, -43,
1098 -43, -43, -43, -43, -43, -43, -43, -43, -43, -43,
1099 -43, -43, -43, -43, -43, -43, -43, -43, -43, -43,
1101 -43, -43, -43, -43, -43, -43, -43, -43, -43, -43,
1102 -43, -43, -43, -43, -43, -43, -43, -43
1106 7, -44, -44, -44, -44, -44, -44, -44, -44, -44,
1107 -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
1108 -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
1109 -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
1110 -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
1111 -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
1112 -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
1113 -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
1115 -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
1116 -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
1117 -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
1118 -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
1119 -44, -44, -44, -44, -44, -44, -44, -44
1123 7, -45, -45, -45, -45, -45, -45, -45, -45, -45,
1124 -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
1125 -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
1126 -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
1127 -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
1129 -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
1130 -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
1131 -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
1132 -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
1133 -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
1134 -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
1135 -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
1136 -45, -45, -45, -45, -45, -45, -45, -45
1140 7, -46, -46, -46, -46, -46, -46, -46, -46, -46,
1141 -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
1143 -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
1144 -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
1145 -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
1146 -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
1147 -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
1148 -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
1149 -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
1150 -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
1151 -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
1152 -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
1154 -46, -46, -46, -46, -46, -46, -46, -46
1158 7, -47, -47, -47, -47, -47, -47, -47, -47, -47,
1159 -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
1160 -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
1161 -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
1162 -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
1163 -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
1164 -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
1165 -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
1166 -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
1168 -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
1169 -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
1170 -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
1171 -47, -47, -47, -47, -47, -47, -47, -47
1175 7, -48, -48, -48, -48, -48, -48, -48, -48, -48,
1176 -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
1177 -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
1178 -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
1179 -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
1180 -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
1182 -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
1183 -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
1184 -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
1185 -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
1186 -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
1187 -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
1188 -48, -48, -48, -48, -48, -48, -48, -48
1192 7, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1193 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1194 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1196 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1197 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1198 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1199 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1200 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1201 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1202 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1203 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1204 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
1205 49, 49, 49, 50, 49, 51, 49, 49
1210 7, -50, -50, -50, -50, -50, -50, -50, -50, -50,
1211 -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
1212 -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
1213 -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
1214 -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
1215 -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
1216 -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
1217 -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
1218 -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
1219 -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
1221 -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
1222 -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
1223 -50, -50, -50, -50, -50, -50, -50, -50
1227 7, -51, -51, -51, -51, -51, -51, -51, -51, -51,
1228 -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
1229 -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
1230 -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
1231 -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
1232 -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
1233 -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
1235 -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
1236 -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
1237 -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
1238 -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
1239 -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
1240 -51, -51, -51, -51, -51, -51, -51, -51
1244 7, 52, 52, 52, 52, 52, 52, 52, 52, -52,
1245 -52, 52, 52, -52, 52, 52, 52, 52, 52, 52,
1246 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
1247 52, 52, -52, -52, 52, 52, -52, -52, -52, 52,
1249 -52, -52, -52, -52, 52, -52, 52, -52, 52, 52,
1250 52, 52, 52, 52, 52, 52, 52, 52, -52, 52,
1251 -52, -52, -52, -52, 52, 52, 52, 52, 52, 52,
1252 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
1253 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
1254 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
1255 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
1256 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
1257 52, 52, 52, 52, -52, 52, 52, 52
1261 7, -53, -53, -53, -53, -53, -53, -53, -53, -53,
1263 -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
1264 -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
1265 -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
1266 -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
1267 -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
1268 -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
1269 -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
1270 -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
1271 -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
1272 -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
1274 -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
1275 -53, -53, -53, -53, -53, -53, -53, -53
1280 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
1281 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
1282 static int yy_get_next_buffer (yyscan_t yyscanner );
1283 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
1285 /* Done after the current pattern has been matched and before the
1286 * corresponding action - sets up yytext.
1288 #define YY_DO_BEFORE_ACTION \
1289 yyg->yytext_ptr = yy_bp; \
1290 yyg->yytext_ptr -= yyg->yy_more_len; \
1291 yyleng = (size_t) (yy_cp - yyg->yytext_ptr); \
1292 yyg->yy_hold_char = *yy_cp; \
1293 *yy_cp = '\0'; \
1294 yyg->yy_c_buf_p = yy_cp;
1296 #define YY_NUM_RULES 35
1297 #define YY_END_OF_BUFFER 36
1298 /* This struct is not used in this scanner,
1299 but its presence is necessary. */
1300 struct yy_trans_info
1302 flex_int32_t yy_verify;
1303 flex_int32_t yy_nxt;
1305 static yyconst flex_int16_t yy_accept[54] =
1306 { 0,
1307 0, 0, 0, 0, 32, 32, 36, 35, 25, 27,
1308 19, 35, 29, 29, 17, 2, 22, 23, 15, 13,
1309 14, 16, 28, 20, 9, 3, 8, 18, 1, 35,
1310 31, 30, 32, 33, 33, 12, 0, 26, 29, 24,
1311 5, 28, 21, 11, 6, 7, 10, 4, 0, 31,
1312 30, 32, 34
1315 static yyconst yy_state_type yy_NUL_trans[54] =
1316 { 0,
1317 8, 8, 30, 30, 33, 33, 0, 0, 0, 0,
1318 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
1319 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
1320 0, 0, 52, 0, 0, 0, 37, 0, 0, 0,
1321 0, 0, 0, 0, 0, 0, 0, 0, 49, 0,
1322 0, 52, 0
1325 /* The intent behind this definition is that it'll catch
1326 * any uses of REJECT which flex missed.
1328 #define REJECT reject_used_but_not_detected
1329 #define yymore() (yyg->yy_more_flag = 1)
1330 #define YY_MORE_ADJ yyg->yy_more_len
1331 #define YY_RESTORE_YY_MORE_OFFSET
1332 #line 1 "ast_expr2.fl"
1333 #line 2 "ast_expr2.fl"
1335 * Asterisk -- An open source telephony toolkit.
1337 * Copyright (C) 1999 - 2006, Digium, Inc.
1339 * Mark Spencer <markster@digium.com>
1341 * See http://www.asterisk.org for more information about
1342 * the Asterisk project. Please do not directly contact
1343 * any of the maintainers of this project for assistance;
1344 * the project provides a web site, mailing lists and IRC
1345 * channels for your use.
1347 * This program is free software, distributed under the terms of
1348 * the GNU General Public License Version 2. See the LICENSE file
1349 * at the top of the source tree.
1352 /*! \file
1354 * \brief Dialplan Expression Lexical Scanner
1357 #include "asterisk.h"
1359 #ifndef STANDALONE
1360 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
1361 #endif
1363 #include <sys/types.h>
1364 #include <stdio.h>
1365 #include <stdlib.h>
1366 #include <string.h>
1367 #include <locale.h>
1368 #include <ctype.h>
1369 #if !defined(SOLARIS) && !defined(__CYGWIN__)
1370 #include <err.h>
1371 #else
1372 #define quad_t int64_t
1373 #endif
1374 #include <errno.h>
1375 #include <regex.h>
1376 #include <limits.h>
1378 #include "asterisk/ast_expr.h"
1379 #include "asterisk/logger.h"
1380 #include "asterisk/strings.h"
1382 enum valtype {
1383 AST_EXPR_integer, AST_EXPR_numeric_string, AST_EXPR_string
1386 struct val {
1387 enum valtype type;
1388 union {
1389 char *s;
1390 quad_t i;
1391 } u;
1394 #include "ast_expr2.h" /* the o/p of the bison on ast_expr2.y */
1396 #define SET_COLUMNS do { \
1397 yylloc_param->first_column = (int)(yyg->yytext_r - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf); \
1398 yylloc_param->last_column += yyleng - 1; \
1399 yylloc_param->first_line = yylloc_param->last_line = 1; \
1400 } while (0)
1402 #define SET_STRING do { \
1403 yylval_param->val = calloc(1, sizeof(struct val)); \
1404 yylval_param->val->type = AST_EXPR_string; \
1405 yylval_param->val->u.s = strdup(yytext); \
1406 } while (0)
1408 #define SET_NUMERIC_STRING do { \
1409 yylval_param->val = calloc(1, sizeof(struct val)); \
1410 yylval_param->val->type = AST_EXPR_numeric_string; \
1411 yylval_param->val->u.s = strdup(yytext); \
1412 } while (0)
1414 struct parse_io
1416 char *string;
1417 struct val *val;
1418 yyscan_t scanner;
1421 void ast_yyset_column(int column_no, yyscan_t yyscanner);
1422 int ast_yyget_column(yyscan_t yyscanner);
1423 static int curlycount = 0;
1424 static char *expr2_token_subst(char *mess);
1426 #line 1427 "ast_expr2f.c"
1428 #define INITIAL 0
1429 #define var 1
1430 #define trail 2
1432 #ifndef YY_NO_UNISTD_H
1433 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1434 * down here because we want the user's section 1 to have been scanned first.
1435 * The user has a chance to override it with an option.
1437 #include <unistd.h>
1438 #endif
1440 #ifndef YY_EXTRA_TYPE
1441 #define YY_EXTRA_TYPE void *
1442 #endif
1444 /* Holds the entire state of the reentrant scanner. */
1445 struct yyguts_t
1448 /* User-defined. Not touched by flex. */
1449 YY_EXTRA_TYPE yyextra_r;
1451 /* The rest are the same as the globals declared in the non-reentrant scanner. */
1452 FILE *yyin_r, *yyout_r;
1453 size_t yy_buffer_stack_top; /**< index of top of stack. */
1454 size_t yy_buffer_stack_max; /**< capacity of stack. */
1455 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
1456 char yy_hold_char;
1457 int yy_n_chars;
1458 int yyleng_r;
1459 char *yy_c_buf_p;
1460 int yy_init;
1461 int yy_start;
1462 int yy_did_buffer_switch_on_eof;
1463 int yy_start_stack_ptr;
1464 int yy_start_stack_depth;
1465 int *yy_start_stack;
1466 yy_state_type yy_last_accepting_state;
1467 char* yy_last_accepting_cpos;
1469 int yylineno_r;
1470 int yy_flex_debug_r;
1472 char *yytext_r;
1473 int yy_more_flag;
1474 int yy_more_len;
1476 YYSTYPE * yylval_r;
1478 YYLTYPE * yylloc_r;
1480 }; /* end struct yyguts_t */
1482 static int yy_init_globals (yyscan_t yyscanner );
1484 /* This must go here because YYSTYPE and YYLTYPE are included
1485 * from bison output in section 1.*/
1486 # define yylval yyg->yylval_r
1488 # define yylloc yyg->yylloc_r
1490 /* Accessor methods to globals.
1491 These are made visible to non-reentrant scanners for convenience. */
1493 int ast_yylex_destroy (yyscan_t yyscanner );
1495 int ast_yyget_debug (yyscan_t yyscanner );
1497 void ast_yyset_debug (int debug_flag ,yyscan_t yyscanner );
1499 YY_EXTRA_TYPE ast_yyget_extra (yyscan_t yyscanner );
1501 void ast_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
1503 FILE *ast_yyget_in (yyscan_t yyscanner );
1505 void ast_yyset_in (FILE * in_str ,yyscan_t yyscanner );
1507 FILE *ast_yyget_out (yyscan_t yyscanner );
1509 void ast_yyset_out (FILE * out_str ,yyscan_t yyscanner );
1511 int ast_yyget_leng (yyscan_t yyscanner );
1513 char *ast_yyget_text (yyscan_t yyscanner );
1515 int ast_yyget_lineno (yyscan_t yyscanner );
1517 void ast_yyset_lineno (int line_number ,yyscan_t yyscanner );
1519 YYSTYPE * ast_yyget_lval (yyscan_t yyscanner );
1521 void ast_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
1523 YYLTYPE *ast_yyget_lloc (yyscan_t yyscanner );
1525 void ast_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
1527 /* Macros after this point can all be overridden by user definitions in
1528 * section 1.
1531 #ifndef YY_SKIP_YYWRAP
1532 #ifdef __cplusplus
1533 extern "C" int ast_yywrap (yyscan_t yyscanner );
1534 #else
1535 extern int ast_yywrap (yyscan_t yyscanner );
1536 #endif
1537 #endif
1539 static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
1541 #ifndef yytext_ptr
1542 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
1543 #endif
1545 #ifdef YY_NEED_STRLEN
1546 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
1547 #endif
1549 #ifndef YY_NO_INPUT
1551 #ifdef __cplusplus
1552 static int yyinput (yyscan_t yyscanner );
1553 #else
1554 static int input (yyscan_t yyscanner );
1555 #endif
1557 #endif
1559 /* Amount of stuff to slurp up with each read. */
1560 #ifndef YY_READ_BUF_SIZE
1561 #define YY_READ_BUF_SIZE 8192
1562 #endif
1564 /* Copy whatever the last rule matched to the standard output. */
1565 #ifndef ECHO
1566 /* This used to be an fputs(), but since the string might contain NUL's,
1567 * we now use fwrite().
1569 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
1570 #endif
1572 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1573 * is returned in "result".
1575 #ifndef YY_INPUT
1576 #define YY_INPUT(buf,result,max_size) \
1577 errno=0; \
1578 while ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
1580 if( errno != EINTR) \
1582 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1583 break; \
1585 errno=0; \
1586 clearerr(yyin); \
1590 #endif
1592 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1593 * we don't want an extra ';' after the "return" because that will cause
1594 * some compilers to complain about unreachable statements.
1596 #ifndef yyterminate
1597 #define yyterminate() return YY_NULL
1598 #endif
1600 /* Number of entries by which start-condition stack grows. */
1601 #ifndef YY_START_STACK_INCR
1602 #define YY_START_STACK_INCR 25
1603 #endif
1605 /* Report a fatal error. */
1606 #ifndef YY_FATAL_ERROR
1607 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1608 #endif
1610 /* end tables serialization structures and prototypes */
1612 /* Default declaration of generated scanner - a define so the user can
1613 * easily add parameters.
1615 #ifndef YY_DECL
1616 #define YY_DECL_IS_OURS 1
1618 extern int ast_yylex \
1619 (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
1621 #define YY_DECL int ast_yylex \
1622 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
1623 #endif /* !YY_DECL */
1625 /* Code executed at the beginning of each rule, after yytext and yyleng
1626 * have been set up.
1628 #ifndef YY_USER_ACTION
1629 #define YY_USER_ACTION
1630 #endif
1632 /* Code executed at the end of each rule. */
1633 #ifndef YY_BREAK
1634 #define YY_BREAK break;
1635 #endif
1637 #define YY_RULE_SETUP \
1638 YY_USER_ACTION
1640 /** The main scanner function which does all the work.
1642 YY_DECL
1644 register yy_state_type yy_current_state;
1645 register char *yy_cp, *yy_bp;
1646 register int yy_act;
1647 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1649 #line 104 "ast_expr2.fl"
1652 #line 1653 "ast_expr2f.c"
1654 yylval = yylval_param;
1656 yylloc = yylloc_param;
1658 if ( !yyg->yy_init )
1660 yyg->yy_init = 1;
1662 #ifdef YY_USER_INIT
1663 YY_USER_INIT;
1664 #endif
1666 if ( ! yyg->yy_start )
1667 yyg->yy_start = 1; /* first start state */
1669 if ( ! yyin )
1670 yyin = stdin;
1672 if ( ! yyout )
1673 yyout = stdout;
1675 if ( ! YY_CURRENT_BUFFER ) {
1676 ast_yyensure_buffer_stack (yyscanner);
1677 YY_CURRENT_BUFFER_LVALUE =
1678 ast_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1681 ast_yy_load_buffer_state(yyscanner );
1684 while ( 1 ) /* loops until end-of-file is reached */
1686 yyg->yy_more_len = 0;
1687 if ( yyg->yy_more_flag )
1689 yyg->yy_more_len = yyg->yy_c_buf_p - yyg->yytext_ptr;
1690 yyg->yy_more_flag = 0;
1692 yy_cp = yyg->yy_c_buf_p;
1694 /* Support of yytext. */
1695 *yy_cp = yyg->yy_hold_char;
1697 /* yy_bp points to the position in yy_ch_buf of the start of
1698 * the current run.
1700 yy_bp = yy_cp;
1702 yy_current_state = yyg->yy_start;
1703 yy_match:
1704 while ( (yy_current_state = yy_nxt[yy_current_state][ YY_SC_TO_UI(*yy_cp) ]) > 0 )
1706 if ( yy_accept[yy_current_state] )
1708 yyg->yy_last_accepting_state = yy_current_state;
1709 yyg->yy_last_accepting_cpos = yy_cp;
1712 ++yy_cp;
1715 yy_current_state = -yy_current_state;
1717 yy_find_action:
1718 yy_act = yy_accept[yy_current_state];
1720 YY_DO_BEFORE_ACTION;
1722 do_action: /* This label is used only to access EOF actions. */
1724 switch ( yy_act )
1725 { /* beginning of action switch */
1726 case 0: /* must back up */
1727 /* undo the effects of YY_DO_BEFORE_ACTION */
1728 *yy_cp = yyg->yy_hold_char;
1729 yy_cp = yyg->yy_last_accepting_cpos + 1;
1730 yy_current_state = yyg->yy_last_accepting_state;
1731 goto yy_find_action;
1733 case 1:
1734 YY_RULE_SETUP
1735 #line 106 "ast_expr2.fl"
1736 { SET_COLUMNS; SET_STRING; return TOK_OR;}
1737 YY_BREAK
1738 case 2:
1739 YY_RULE_SETUP
1740 #line 107 "ast_expr2.fl"
1741 { SET_COLUMNS; SET_STRING; return TOK_AND;}
1742 YY_BREAK
1743 case 3:
1744 YY_RULE_SETUP
1745 #line 108 "ast_expr2.fl"
1746 { SET_COLUMNS; SET_STRING; return TOK_EQ;}
1747 YY_BREAK
1748 case 4:
1749 YY_RULE_SETUP
1750 #line 109 "ast_expr2.fl"
1751 { SET_COLUMNS; SET_STRING; return TOK_OR;}
1752 YY_BREAK
1753 case 5:
1754 YY_RULE_SETUP
1755 #line 110 "ast_expr2.fl"
1756 { SET_COLUMNS; SET_STRING; return TOK_AND;}
1757 YY_BREAK
1758 case 6:
1759 YY_RULE_SETUP
1760 #line 111 "ast_expr2.fl"
1761 { SET_COLUMNS; SET_STRING; return TOK_EQ;}
1762 YY_BREAK
1763 case 7:
1764 YY_RULE_SETUP
1765 #line 112 "ast_expr2.fl"
1766 { SET_COLUMNS; SET_STRING; return TOK_EQTILDE;}
1767 YY_BREAK
1768 case 8:
1769 YY_RULE_SETUP
1770 #line 113 "ast_expr2.fl"
1771 { SET_COLUMNS; SET_STRING; return TOK_GT;}
1772 YY_BREAK
1773 case 9:
1774 YY_RULE_SETUP
1775 #line 114 "ast_expr2.fl"
1776 { SET_COLUMNS; SET_STRING; return TOK_LT;}
1777 YY_BREAK
1778 case 10:
1779 YY_RULE_SETUP
1780 #line 115 "ast_expr2.fl"
1781 { SET_COLUMNS; SET_STRING; return TOK_GE;}
1782 YY_BREAK
1783 case 11:
1784 YY_RULE_SETUP
1785 #line 116 "ast_expr2.fl"
1786 { SET_COLUMNS; SET_STRING; return TOK_LE;}
1787 YY_BREAK
1788 case 12:
1789 YY_RULE_SETUP
1790 #line 117 "ast_expr2.fl"
1791 { SET_COLUMNS; SET_STRING; return TOK_NE;}
1792 YY_BREAK
1793 case 13:
1794 YY_RULE_SETUP
1795 #line 118 "ast_expr2.fl"
1796 { SET_COLUMNS; SET_STRING; return TOK_PLUS;}
1797 YY_BREAK
1798 case 14:
1799 YY_RULE_SETUP
1800 #line 119 "ast_expr2.fl"
1801 { SET_COLUMNS; SET_STRING; return TOK_MINUS;}
1802 YY_BREAK
1803 case 15:
1804 YY_RULE_SETUP
1805 #line 120 "ast_expr2.fl"
1806 { SET_COLUMNS; SET_STRING; return TOK_MULT;}
1807 YY_BREAK
1808 case 16:
1809 YY_RULE_SETUP
1810 #line 121 "ast_expr2.fl"
1811 { SET_COLUMNS; SET_STRING; return TOK_DIV;}
1812 YY_BREAK
1813 case 17:
1814 YY_RULE_SETUP
1815 #line 122 "ast_expr2.fl"
1816 { SET_COLUMNS; SET_STRING; return TOK_MOD;}
1817 YY_BREAK
1818 case 18:
1819 YY_RULE_SETUP
1820 #line 123 "ast_expr2.fl"
1821 { SET_COLUMNS; SET_STRING; return TOK_COND;}
1822 YY_BREAK
1823 case 19:
1824 YY_RULE_SETUP
1825 #line 124 "ast_expr2.fl"
1826 { SET_COLUMNS; SET_STRING; return TOK_COMPL;}
1827 YY_BREAK
1828 case 20:
1829 YY_RULE_SETUP
1830 #line 125 "ast_expr2.fl"
1831 { SET_COLUMNS; SET_STRING; return TOK_COLON;}
1832 YY_BREAK
1833 case 21:
1834 YY_RULE_SETUP
1835 #line 126 "ast_expr2.fl"
1836 { SET_COLUMNS; SET_STRING; return TOK_COLONCOLON;}
1837 YY_BREAK
1838 case 22:
1839 YY_RULE_SETUP
1840 #line 127 "ast_expr2.fl"
1841 { SET_COLUMNS; SET_STRING; return TOK_LP;}
1842 YY_BREAK
1843 case 23:
1844 YY_RULE_SETUP
1845 #line 128 "ast_expr2.fl"
1846 { SET_COLUMNS; SET_STRING; return TOK_RP;}
1847 YY_BREAK
1848 case 24:
1849 YY_RULE_SETUP
1850 #line 129 "ast_expr2.fl"
1852 /* gather the contents of ${} expressions, with trailing stuff,
1853 * into a single TOKEN.
1854 * They are much more complex now than they used to be
1856 curlycount = 0;
1857 BEGIN(var);
1858 yymore();
1860 YY_BREAK
1861 case 25:
1862 YY_RULE_SETUP
1863 #line 139 "ast_expr2.fl"
1865 YY_BREAK
1866 case 26:
1867 /* rule 26 can match eol */
1868 YY_RULE_SETUP
1869 #line 140 "ast_expr2.fl"
1870 {SET_COLUMNS; SET_STRING; return TOKEN;}
1871 YY_BREAK
1872 case 27:
1873 /* rule 27 can match eol */
1874 YY_RULE_SETUP
1875 #line 142 "ast_expr2.fl"
1876 {/* what to do with eol */}
1877 YY_BREAK
1878 case 28:
1879 YY_RULE_SETUP
1880 #line 143 "ast_expr2.fl"
1882 SET_COLUMNS;
1883 /* the original behavior of the expression parser was
1884 * to bring in numbers as a numeric string
1886 SET_NUMERIC_STRING;
1887 return TOKEN;
1889 YY_BREAK
1890 case 29:
1891 YY_RULE_SETUP
1892 #line 152 "ast_expr2.fl"
1894 SET_COLUMNS;
1895 SET_STRING;
1896 return TOKEN;
1898 YY_BREAK
1899 case 30:
1900 /* rule 30 can match eol */
1901 YY_RULE_SETUP
1902 #line 159 "ast_expr2.fl"
1904 curlycount--;
1905 if (curlycount < 0) {
1906 BEGIN(trail);
1907 yymore();
1908 } else {
1909 yymore();
1912 YY_BREAK
1913 case 31:
1914 /* rule 31 can match eol */
1915 YY_RULE_SETUP
1916 #line 169 "ast_expr2.fl"
1918 curlycount++;
1919 yymore();
1921 YY_BREAK
1922 case 32:
1923 YY_RULE_SETUP
1924 #line 175 "ast_expr2.fl"
1926 BEGIN(0);
1927 SET_COLUMNS;
1928 SET_STRING;
1929 return TOKEN;
1931 YY_BREAK
1932 case 33:
1933 /* rule 33 can match eol */
1934 YY_RULE_SETUP
1935 #line 182 "ast_expr2.fl"
1937 char c = yytext[yyleng-1];
1938 BEGIN(0);
1939 unput(c);
1940 SET_COLUMNS;
1941 SET_STRING;
1942 return TOKEN;
1944 YY_BREAK
1945 case 34:
1946 YY_RULE_SETUP
1947 #line 191 "ast_expr2.fl"
1949 curlycount = 0;
1950 BEGIN(var);
1951 yymore();
1953 YY_BREAK
1954 case YY_STATE_EOF(trail):
1955 #line 197 "ast_expr2.fl"
1957 BEGIN(0);
1958 SET_COLUMNS;
1959 SET_STRING;
1960 return TOKEN;
1961 /*actually, if an expr is only a variable ref, this could happen a LOT */
1963 YY_BREAK
1964 case 35:
1965 YY_RULE_SETUP
1966 #line 205 "ast_expr2.fl"
1967 ECHO;
1968 YY_BREAK
1969 #line 1970 "ast_expr2f.c"
1970 case YY_STATE_EOF(INITIAL):
1971 case YY_STATE_EOF(var):
1972 yyterminate();
1974 case YY_END_OF_BUFFER:
1976 /* Amount of text matched not including the EOB char. */
1977 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1979 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1980 *yy_cp = yyg->yy_hold_char;
1981 YY_RESTORE_YY_MORE_OFFSET
1983 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1985 /* We're scanning a new file or input source. It's
1986 * possible that this happened because the user
1987 * just pointed yyin at a new source and called
1988 * ast_yylex(). If so, then we have to assure
1989 * consistency between YY_CURRENT_BUFFER and our
1990 * globals. Here is the right place to do so, because
1991 * this is the first action (other than possibly a
1992 * back-up) that will match for the new input source.
1994 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1995 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1996 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1999 /* Note that here we test for yy_c_buf_p "<=" to the position
2000 * of the first EOB in the buffer, since yy_c_buf_p will
2001 * already have been incremented past the NUL character
2002 * (since all states make transitions on EOB to the
2003 * end-of-buffer state). Contrast this with the test
2004 * in input().
2006 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2007 { /* This was really a NUL. */
2008 yy_state_type yy_next_state;
2010 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
2012 yy_current_state = yy_get_previous_state( yyscanner );
2014 /* Okay, we're now positioned to make the NUL
2015 * transition. We couldn't have
2016 * yy_get_previous_state() go ahead and do it
2017 * for us because it doesn't know how to deal
2018 * with the possibility of jamming (and we don't
2019 * want to build jamming into it because then it
2020 * will run more slowly).
2023 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
2025 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2027 if ( yy_next_state )
2029 /* Consume the NUL. */
2030 yy_cp = ++yyg->yy_c_buf_p;
2031 yy_current_state = yy_next_state;
2032 goto yy_match;
2035 else
2037 yy_cp = yyg->yy_c_buf_p;
2038 goto yy_find_action;
2042 else switch ( yy_get_next_buffer( yyscanner ) )
2044 case EOB_ACT_END_OF_FILE:
2046 yyg->yy_did_buffer_switch_on_eof = 0;
2048 if ( ast_yywrap(yyscanner ) )
2050 /* Note: because we've taken care in
2051 * yy_get_next_buffer() to have set up
2052 * yytext, we can now set up
2053 * yy_c_buf_p so that if some total
2054 * hoser (like flex itself) wants to
2055 * call the scanner after we return the
2056 * YY_NULL, it'll still work - another
2057 * YY_NULL will get returned.
2059 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
2061 yy_act = YY_STATE_EOF(YY_START);
2062 goto do_action;
2065 else
2067 if ( ! yyg->yy_did_buffer_switch_on_eof )
2068 YY_NEW_FILE;
2070 break;
2073 case EOB_ACT_CONTINUE_SCAN:
2074 yyg->yy_c_buf_p =
2075 yyg->yytext_ptr + yy_amount_of_matched_text;
2077 yy_current_state = yy_get_previous_state( yyscanner );
2079 yy_cp = yyg->yy_c_buf_p;
2080 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2081 goto yy_match;
2083 case EOB_ACT_LAST_MATCH:
2084 yyg->yy_c_buf_p =
2085 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
2087 yy_current_state = yy_get_previous_state( yyscanner );
2089 yy_cp = yyg->yy_c_buf_p;
2090 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
2091 goto yy_find_action;
2093 break;
2096 default:
2097 YY_FATAL_ERROR(
2098 "fatal flex scanner internal error--no action found" );
2099 } /* end of action switch */
2100 } /* end of scanning one token */
2101 } /* end of ast_yylex */
2103 /* yy_get_next_buffer - try to read in a new buffer
2105 * Returns a code representing an action:
2106 * EOB_ACT_LAST_MATCH -
2107 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2108 * EOB_ACT_END_OF_FILE - end of file
2110 static int yy_get_next_buffer (yyscan_t yyscanner)
2112 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2113 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2114 register char *source = yyg->yytext_ptr;
2115 register int number_to_move, i;
2116 int ret_val;
2118 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
2119 YY_FATAL_ERROR(
2120 "fatal flex scanner internal error--end of buffer missed" );
2122 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2123 { /* Don't try to fill the buffer, so this is an EOF. */
2124 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
2126 /* We matched a single character, the EOB, so
2127 * treat this as a final EOF.
2129 return EOB_ACT_END_OF_FILE;
2132 else
2134 /* We matched some text prior to the EOB, first
2135 * process it.
2137 return EOB_ACT_LAST_MATCH;
2141 /* Try to read more data. */
2143 /* First move last chars to start of buffer. */
2144 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
2146 for ( i = 0; i < number_to_move; ++i )
2147 *(dest++) = *(source++);
2149 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2150 /* don't do the read, it's not guaranteed to return an EOF,
2151 * just force an EOF
2153 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
2155 else
2157 int num_to_read =
2158 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2160 while ( num_to_read <= 0 )
2161 { /* Not enough room in the buffer - grow it. */
2163 /* just a shorter name for the current buffer */
2164 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2166 int yy_c_buf_p_offset =
2167 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
2169 if ( b->yy_is_our_buffer )
2171 int new_size = b->yy_buf_size * 2;
2173 if ( new_size <= 0 )
2174 b->yy_buf_size += b->yy_buf_size / 8;
2175 else
2176 b->yy_buf_size *= 2;
2178 b->yy_ch_buf = (char *)
2179 /* Include room in for 2 EOB chars. */
2180 ast_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
2182 else
2183 /* Can't grow it, we don't own it. */
2184 b->yy_ch_buf = 0;
2186 if ( ! b->yy_ch_buf )
2187 YY_FATAL_ERROR(
2188 "fatal error - scanner input buffer overflow" );
2190 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2192 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2193 number_to_move - 1;
2197 if ( num_to_read > YY_READ_BUF_SIZE )
2198 num_to_read = YY_READ_BUF_SIZE;
2200 /* Read in more data. */
2201 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2202 yyg->yy_n_chars, (size_t) num_to_read );
2204 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2207 if ( yyg->yy_n_chars == 0 )
2209 if ( number_to_move == YY_MORE_ADJ )
2211 ret_val = EOB_ACT_END_OF_FILE;
2212 ast_yyrestart(yyin ,yyscanner);
2215 else
2217 ret_val = EOB_ACT_LAST_MATCH;
2218 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2219 YY_BUFFER_EOF_PENDING;
2223 else
2224 ret_val = EOB_ACT_CONTINUE_SCAN;
2226 yyg->yy_n_chars += number_to_move;
2227 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2228 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2230 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2232 return ret_val;
2235 /* yy_get_previous_state - get the state just before the EOB char was reached */
2237 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
2239 register yy_state_type yy_current_state;
2240 register char *yy_cp;
2241 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2243 yy_current_state = yyg->yy_start;
2245 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
2247 if ( *yy_cp )
2249 yy_current_state = yy_nxt[yy_current_state][YY_SC_TO_UI(*yy_cp)];
2251 else
2252 yy_current_state = yy_NUL_trans[yy_current_state];
2253 if ( yy_accept[yy_current_state] )
2255 yyg->yy_last_accepting_state = yy_current_state;
2256 yyg->yy_last_accepting_cpos = yy_cp;
2260 return yy_current_state;
2263 /* yy_try_NUL_trans - try to make a transition on the NUL character
2265 * synopsis
2266 * next_state = yy_try_NUL_trans( current_state );
2268 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
2270 register int yy_is_jam;
2271 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
2272 register char *yy_cp = yyg->yy_c_buf_p;
2274 yy_current_state = yy_NUL_trans[yy_current_state];
2275 yy_is_jam = (yy_current_state == 0);
2277 if ( ! yy_is_jam )
2279 if ( yy_accept[yy_current_state] )
2281 yyg->yy_last_accepting_state = yy_current_state;
2282 yyg->yy_last_accepting_cpos = yy_cp;
2286 return yy_is_jam ? 0 : yy_current_state;
2289 static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
2291 register char *yy_cp;
2292 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2294 yy_cp = yyg->yy_c_buf_p;
2296 /* undo effects of setting up yytext */
2297 *yy_cp = yyg->yy_hold_char;
2299 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2300 { /* need to shift things up to make room */
2301 /* +2 for EOB chars. */
2302 register int number_to_move = yyg->yy_n_chars + 2;
2303 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2304 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2305 register char *source =
2306 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2308 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2309 *--dest = *--source;
2311 yy_cp += (int) (dest - source);
2312 yy_bp += (int) (dest - source);
2313 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2314 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2316 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2317 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2320 *--yy_cp = (char) c;
2322 yyg->yytext_ptr = yy_bp;
2323 yyg->yy_hold_char = *yy_cp;
2324 yyg->yy_c_buf_p = yy_cp;
2327 #ifndef YY_NO_INPUT
2328 #ifdef __cplusplus
2329 static int yyinput (yyscan_t yyscanner)
2330 #else
2331 static int input (yyscan_t yyscanner)
2332 #endif
2335 int c;
2336 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2338 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2340 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2342 /* yy_c_buf_p now points to the character we want to return.
2343 * If this occurs *before* the EOB characters, then it's a
2344 * valid NUL; if not, then we've hit the end of the buffer.
2346 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2347 /* This was really a NUL. */
2348 *yyg->yy_c_buf_p = '\0';
2350 else
2351 { /* need more input */
2352 int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
2353 ++yyg->yy_c_buf_p;
2355 switch ( yy_get_next_buffer( yyscanner ) )
2357 case EOB_ACT_LAST_MATCH:
2358 /* This happens because yy_g_n_b()
2359 * sees that we've accumulated a
2360 * token and flags that we need to
2361 * try matching the token before
2362 * proceeding. But for input(),
2363 * there's no matching to consider.
2364 * So convert the EOB_ACT_LAST_MATCH
2365 * to EOB_ACT_END_OF_FILE.
2368 /* Reset buffer status. */
2369 ast_yyrestart(yyin ,yyscanner);
2371 /*FALLTHROUGH*/
2373 case EOB_ACT_END_OF_FILE:
2375 if ( ast_yywrap(yyscanner ) )
2376 return EOF;
2378 if ( ! yyg->yy_did_buffer_switch_on_eof )
2379 YY_NEW_FILE;
2380 #ifdef __cplusplus
2381 return yyinput(yyscanner);
2382 #else
2383 return input(yyscanner);
2384 #endif
2387 case EOB_ACT_CONTINUE_SCAN:
2388 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
2389 break;
2394 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
2395 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
2396 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
2398 return c;
2400 #endif /* ifndef YY_NO_INPUT */
2402 /** Immediately switch to a different input stream.
2403 * @param input_file A readable stream.
2404 * @param yyscanner The scanner object.
2405 * @note This function does not reset the start condition to @c INITIAL .
2407 void ast_yyrestart (FILE * input_file , yyscan_t yyscanner)
2409 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2411 if ( ! YY_CURRENT_BUFFER ){
2412 ast_yyensure_buffer_stack (yyscanner);
2413 YY_CURRENT_BUFFER_LVALUE =
2414 ast_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
2417 ast_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
2418 ast_yy_load_buffer_state(yyscanner );
2421 /** Switch to a different input buffer.
2422 * @param new_buffer The new input buffer.
2423 * @param yyscanner The scanner object.
2425 void ast_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2427 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2429 /* TODO. We should be able to replace this entire function body
2430 * with
2431 * ast_yypop_buffer_state();
2432 * ast_yypush_buffer_state(new_buffer);
2434 ast_yyensure_buffer_stack (yyscanner);
2435 if ( YY_CURRENT_BUFFER == new_buffer )
2436 return;
2438 if ( YY_CURRENT_BUFFER )
2440 /* Flush out information for old buffer. */
2441 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2442 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2443 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2446 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2447 ast_yy_load_buffer_state(yyscanner );
2449 /* We don't actually know whether we did this switch during
2450 * EOF (ast_yywrap()) processing, but the only time this flag
2451 * is looked at is after ast_yywrap() is called, so it's safe
2452 * to go ahead and always set it.
2454 yyg->yy_did_buffer_switch_on_eof = 1;
2457 static void ast_yy_load_buffer_state (yyscan_t yyscanner)
2459 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2460 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2461 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2462 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2463 yyg->yy_hold_char = *yyg->yy_c_buf_p;
2466 /** Allocate and initialize an input buffer state.
2467 * @param file A readable stream.
2468 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2469 * @param yyscanner The scanner object.
2470 * @return the allocated buffer state.
2472 YY_BUFFER_STATE ast_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
2474 YY_BUFFER_STATE b;
2476 b = (YY_BUFFER_STATE) ast_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2477 if ( ! b )
2478 YY_FATAL_ERROR( "out of dynamic memory in ast_yy_create_buffer()" );
2480 b->yy_buf_size = size;
2482 /* yy_ch_buf has to be 2 characters longer than the size given because
2483 * we need to put in 2 end-of-buffer characters.
2485 b->yy_ch_buf = (char *) ast_yyalloc(b->yy_buf_size + 2 ,yyscanner );
2486 if ( ! b->yy_ch_buf )
2487 YY_FATAL_ERROR( "out of dynamic memory in ast_yy_create_buffer()" );
2489 b->yy_is_our_buffer = 1;
2491 ast_yy_init_buffer(b,file ,yyscanner);
2493 return b;
2496 /** Destroy the buffer.
2497 * @param b a buffer created with ast_yy_create_buffer()
2498 * @param yyscanner The scanner object.
2500 void ast_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2502 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2504 if ( ! b )
2505 return;
2507 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2508 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2510 if ( b->yy_is_our_buffer )
2511 ast_yyfree((void *) b->yy_ch_buf ,yyscanner );
2513 ast_yyfree((void *) b ,yyscanner );
2516 #ifndef __cplusplus
2517 extern int isatty (int );
2518 #endif /* __cplusplus */
2520 /* Initializes or reinitializes a buffer.
2521 * This function is sometimes called more than once on the same buffer,
2522 * such as during a ast_yyrestart() or at EOF.
2524 static void ast_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
2527 int oerrno = errno;
2528 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2530 ast_yy_flush_buffer(b ,yyscanner);
2532 b->yy_input_file = file;
2533 b->yy_fill_buffer = 1;
2535 /* If b is the current buffer, then ast_yy_init_buffer was _probably_
2536 * called from ast_yyrestart() or through yy_get_next_buffer.
2537 * In that case, we don't want to reset the lineno or column.
2539 if (b != YY_CURRENT_BUFFER){
2540 b->yy_bs_lineno = 1;
2541 b->yy_bs_column = 0;
2544 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2546 errno = oerrno;
2549 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2550 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2551 * @param yyscanner The scanner object.
2553 void ast_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2555 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2556 if ( ! b )
2557 return;
2559 b->yy_n_chars = 0;
2561 /* We always need two end-of-buffer characters. The first causes
2562 * a transition to the end-of-buffer state. The second causes
2563 * a jam in that state.
2565 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2566 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2568 b->yy_buf_pos = &b->yy_ch_buf[0];
2570 b->yy_at_bol = 1;
2571 b->yy_buffer_status = YY_BUFFER_NEW;
2573 if ( b == YY_CURRENT_BUFFER )
2574 ast_yy_load_buffer_state(yyscanner );
2577 /** Pushes the new state onto the stack. The new state becomes
2578 * the current state. This function will allocate the stack
2579 * if necessary.
2580 * @param new_buffer The new state.
2581 * @param yyscanner The scanner object.
2583 void ast_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2585 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2586 if (new_buffer == NULL)
2587 return;
2589 ast_yyensure_buffer_stack(yyscanner);
2591 /* This block is copied from ast_yy_switch_to_buffer. */
2592 if ( YY_CURRENT_BUFFER )
2594 /* Flush out information for old buffer. */
2595 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2596 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2597 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2600 /* Only push if top exists. Otherwise, replace top. */
2601 if (YY_CURRENT_BUFFER)
2602 yyg->yy_buffer_stack_top++;
2603 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2605 /* copied from ast_yy_switch_to_buffer. */
2606 ast_yy_load_buffer_state(yyscanner );
2607 yyg->yy_did_buffer_switch_on_eof = 1;
2610 /** Removes and deletes the top of the stack, if present.
2611 * The next element becomes the new top.
2612 * @param yyscanner The scanner object.
2614 void ast_yypop_buffer_state (yyscan_t yyscanner)
2616 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2617 if (!YY_CURRENT_BUFFER)
2618 return;
2620 ast_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
2621 YY_CURRENT_BUFFER_LVALUE = NULL;
2622 if (yyg->yy_buffer_stack_top > 0)
2623 --yyg->yy_buffer_stack_top;
2625 if (YY_CURRENT_BUFFER) {
2626 ast_yy_load_buffer_state(yyscanner );
2627 yyg->yy_did_buffer_switch_on_eof = 1;
2631 /* Allocates the stack if it does not exist.
2632 * Guarantees space for at least one push.
2634 static void ast_yyensure_buffer_stack (yyscan_t yyscanner)
2636 int num_to_alloc;
2637 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2639 if (!yyg->yy_buffer_stack) {
2641 /* First allocation is just for 2 elements, since we don't know if this
2642 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2643 * immediate realloc on the next call.
2645 num_to_alloc = 1;
2646 yyg->yy_buffer_stack = (struct yy_buffer_state**)ast_yyalloc
2647 (num_to_alloc * sizeof(struct yy_buffer_state*)
2648 , yyscanner);
2650 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2652 yyg->yy_buffer_stack_max = num_to_alloc;
2653 yyg->yy_buffer_stack_top = 0;
2654 return;
2657 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2659 /* Increase the buffer to prepare for a possible push. */
2660 int grow_size = 8 /* arbitrary grow size */;
2662 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2663 yyg->yy_buffer_stack = (struct yy_buffer_state**)ast_yyrealloc
2664 (yyg->yy_buffer_stack,
2665 num_to_alloc * sizeof(struct yy_buffer_state*)
2666 , yyscanner);
2668 /* zero only the new slots.*/
2669 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2670 yyg->yy_buffer_stack_max = num_to_alloc;
2674 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2675 * @param base the character buffer
2676 * @param size the size in bytes of the character buffer
2677 * @param yyscanner The scanner object.
2678 * @return the newly allocated buffer state object.
2680 YY_BUFFER_STATE ast_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
2682 YY_BUFFER_STATE b;
2684 if ( size < 2 ||
2685 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2686 base[size-1] != YY_END_OF_BUFFER_CHAR )
2687 /* They forgot to leave room for the EOB's. */
2688 return 0;
2690 b = (YY_BUFFER_STATE) ast_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2691 if ( ! b )
2692 YY_FATAL_ERROR( "out of dynamic memory in ast_yy_scan_buffer()" );
2694 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2695 b->yy_buf_pos = b->yy_ch_buf = base;
2696 b->yy_is_our_buffer = 0;
2697 b->yy_input_file = 0;
2698 b->yy_n_chars = b->yy_buf_size;
2699 b->yy_is_interactive = 0;
2700 b->yy_at_bol = 1;
2701 b->yy_fill_buffer = 0;
2702 b->yy_buffer_status = YY_BUFFER_NEW;
2704 ast_yy_switch_to_buffer(b ,yyscanner );
2706 return b;
2709 /** Setup the input buffer state to scan a string. The next call to ast_yylex() will
2710 * scan from a @e copy of @a str.
2711 * @param yystr a NUL-terminated string to scan
2712 * @param yyscanner The scanner object.
2713 * @return the newly allocated buffer state object.
2714 * @note If you want to scan bytes that may contain NUL values, then use
2715 * ast_yy_scan_bytes() instead.
2717 YY_BUFFER_STATE ast_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
2720 return ast_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
2723 /** Setup the input buffer state to scan the given bytes. The next call to ast_yylex() will
2724 * scan from a @e copy of @a bytes.
2725 * @param yybytes the byte buffer to scan
2726 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2727 * @param yyscanner The scanner object.
2728 * @return the newly allocated buffer state object.
2730 YY_BUFFER_STATE ast_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
2732 YY_BUFFER_STATE b;
2733 char *buf;
2734 yy_size_t n;
2735 int i;
2737 /* Get memory for full buffer, including space for trailing EOB's. */
2738 n = _yybytes_len + 2;
2739 buf = (char *) ast_yyalloc(n ,yyscanner );
2740 if ( ! buf )
2741 YY_FATAL_ERROR( "out of dynamic memory in ast_yy_scan_bytes()" );
2743 for ( i = 0; i < _yybytes_len; ++i )
2744 buf[i] = yybytes[i];
2746 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2748 b = ast_yy_scan_buffer(buf,n ,yyscanner);
2749 if ( ! b )
2750 YY_FATAL_ERROR( "bad buffer in ast_yy_scan_bytes()" );
2752 /* It's okay to grow etc. this buffer, and we should throw it
2753 * away when we're done.
2755 b->yy_is_our_buffer = 1;
2757 return b;
2760 #ifndef YY_EXIT_FAILURE
2761 #define YY_EXIT_FAILURE 2
2762 #endif
2764 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
2766 (void) fprintf( stderr, "%s\n", msg );
2767 exit( YY_EXIT_FAILURE );
2770 /* Redefine yyless() so it works in section 3 code. */
2772 #undef yyless
2773 #define yyless(n) \
2774 do \
2776 /* Undo effects of setting up yytext. */ \
2777 int yyless_macro_arg = (n); \
2778 YY_LESS_LINENO(yyless_macro_arg);\
2779 yytext[yyleng] = yyg->yy_hold_char; \
2780 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2781 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2782 *yyg->yy_c_buf_p = '\0'; \
2783 yyleng = yyless_macro_arg; \
2785 while ( 0 )
2787 /* Accessor methods (get/set functions) to struct members. */
2789 /** Get the user-defined data for this scanner.
2790 * @param yyscanner The scanner object.
2792 YY_EXTRA_TYPE ast_yyget_extra (yyscan_t yyscanner)
2794 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2795 return yyextra;
2798 /** Get the current line number.
2799 * @param yyscanner The scanner object.
2801 int ast_yyget_lineno (yyscan_t yyscanner)
2803 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2805 if (! YY_CURRENT_BUFFER)
2806 return 0;
2808 return yylineno;
2811 /** Get the current column number.
2812 * @param yyscanner The scanner object.
2814 int ast_yyget_column (yyscan_t yyscanner)
2816 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2818 if (! YY_CURRENT_BUFFER)
2819 return 0;
2821 return yycolumn;
2824 /** Get the input stream.
2825 * @param yyscanner The scanner object.
2827 FILE *ast_yyget_in (yyscan_t yyscanner)
2829 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2830 return yyin;
2833 /** Get the output stream.
2834 * @param yyscanner The scanner object.
2836 FILE *ast_yyget_out (yyscan_t yyscanner)
2838 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2839 return yyout;
2842 /** Get the length of the current token.
2843 * @param yyscanner The scanner object.
2845 int ast_yyget_leng (yyscan_t yyscanner)
2847 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2848 return yyleng;
2851 /** Get the current token.
2852 * @param yyscanner The scanner object.
2855 char *ast_yyget_text (yyscan_t yyscanner)
2857 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2858 return yytext;
2861 /** Set the user-defined data. This data is never touched by the scanner.
2862 * @param user_defined The data to be associated with this scanner.
2863 * @param yyscanner The scanner object.
2865 void ast_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2867 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2868 yyextra = user_defined ;
2871 /** Set the current line number.
2872 * @param line_number
2873 * @param yyscanner The scanner object.
2875 void ast_yyset_lineno (int line_number , yyscan_t yyscanner)
2877 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2879 /* lineno is only valid if an input buffer exists. */
2880 if (! YY_CURRENT_BUFFER )
2881 yy_fatal_error( "ast_yyset_lineno called with no buffer" , yyscanner);
2883 yylineno = line_number;
2886 /** Set the current column.
2887 * @param column_no
2888 * @param yyscanner The scanner object.
2890 void ast_yyset_column (int column_no , yyscan_t yyscanner)
2892 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2894 /* column is only valid if an input buffer exists. */
2895 if (! YY_CURRENT_BUFFER )
2896 yy_fatal_error( "ast_yyset_column called with no buffer" , yyscanner);
2898 yycolumn = column_no;
2901 /** Set the input stream. This does not discard the current
2902 * input buffer.
2903 * @param in_str A readable stream.
2904 * @param yyscanner The scanner object.
2905 * @see ast_yy_switch_to_buffer
2907 void ast_yyset_in (FILE * in_str , yyscan_t yyscanner)
2909 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2910 yyin = in_str ;
2913 void ast_yyset_out (FILE * out_str , yyscan_t yyscanner)
2915 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2916 yyout = out_str ;
2919 int ast_yyget_debug (yyscan_t yyscanner)
2921 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2922 return yy_flex_debug;
2925 void ast_yyset_debug (int bdebug , yyscan_t yyscanner)
2927 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2928 yy_flex_debug = bdebug ;
2931 /* Accessor methods for yylval and yylloc */
2933 YYSTYPE * ast_yyget_lval (yyscan_t yyscanner)
2935 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2936 return yylval;
2939 void ast_yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
2941 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2942 yylval = yylval_param;
2945 YYLTYPE *ast_yyget_lloc (yyscan_t yyscanner)
2947 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2948 return yylloc;
2951 void ast_yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
2953 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2954 yylloc = yylloc_param;
2957 /* User-visible API */
2959 /* ast_yylex_init is special because it creates the scanner itself, so it is
2960 * the ONLY reentrant function that doesn't take the scanner as the last argument.
2961 * That's why we explicitly handle the declaration, instead of using our macros.
2964 int ast_yylex_init(yyscan_t* ptr_yy_globals)
2967 if (ptr_yy_globals == NULL){
2968 errno = EINVAL;
2969 return 1;
2972 *ptr_yy_globals = (yyscan_t) ast_yyalloc ( sizeof( struct yyguts_t ), NULL );
2974 if (*ptr_yy_globals == NULL){
2975 errno = ENOMEM;
2976 return 1;
2979 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2980 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2982 return yy_init_globals ( *ptr_yy_globals );
2985 static int yy_init_globals (yyscan_t yyscanner)
2987 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2988 /* Initialization is the same as for the non-reentrant scanner.
2989 * This function is called from ast_yylex_destroy(), so don't allocate here.
2992 yyg->yy_buffer_stack = 0;
2993 yyg->yy_buffer_stack_top = 0;
2994 yyg->yy_buffer_stack_max = 0;
2995 yyg->yy_c_buf_p = (char *) 0;
2996 yyg->yy_init = 0;
2997 yyg->yy_start = 0;
2999 yyg->yy_start_stack_ptr = 0;
3000 yyg->yy_start_stack_depth = 0;
3001 yyg->yy_start_stack = NULL;
3003 /* Defined in main.c */
3004 #ifdef YY_STDINIT
3005 yyin = stdin;
3006 yyout = stdout;
3007 #else
3008 yyin = (FILE *) 0;
3009 yyout = (FILE *) 0;
3010 #endif
3012 /* For future reference: Set errno on error, since we are called by
3013 * ast_yylex_init()
3015 return 0;
3018 /* ast_yylex_destroy is for both reentrant and non-reentrant scanners. */
3019 int ast_yylex_destroy (yyscan_t yyscanner)
3021 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3023 /* Pop the buffer stack, destroying each element. */
3024 while(YY_CURRENT_BUFFER){
3025 ast_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
3026 YY_CURRENT_BUFFER_LVALUE = NULL;
3027 ast_yypop_buffer_state(yyscanner);
3030 /* Destroy the stack itself. */
3031 ast_yyfree(yyg->yy_buffer_stack ,yyscanner);
3032 yyg->yy_buffer_stack = NULL;
3034 /* Destroy the start condition stack. */
3035 ast_yyfree(yyg->yy_start_stack ,yyscanner );
3036 yyg->yy_start_stack = NULL;
3038 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3039 * ast_yylex() is called, initialization will occur. */
3040 yy_init_globals( yyscanner);
3042 /* Destroy the main struct (reentrant only). */
3043 ast_yyfree ( yyscanner , yyscanner );
3044 yyscanner = NULL;
3045 return 0;
3049 * Internal utility routines.
3052 #ifndef yytext_ptr
3053 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
3055 register int i;
3056 for ( i = 0; i < n; ++i )
3057 s1[i] = s2[i];
3059 #endif
3061 #ifdef YY_NEED_STRLEN
3062 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
3064 register int n;
3065 for ( n = 0; s[n]; ++n )
3068 return n;
3070 #endif
3072 void *ast_yyalloc (yy_size_t size , yyscan_t yyscanner)
3074 return (void *) malloc( size );
3077 void *ast_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
3079 /* The cast to (char *) in the following accommodates both
3080 * implementations that use char* generic pointers, and those
3081 * that use void* generic pointers. It works with the latter
3082 * because both ANSI C and C++ allow castless assignment from
3083 * any pointer type to void*, and deal with argument conversions
3084 * as though doing an assignment.
3086 return (void *) realloc( (char *) ptr, size );
3089 void ast_yyfree (void * ptr , yyscan_t yyscanner)
3091 free( (char *) ptr ); /* see ast_yyrealloc() for (char *) cast */
3094 #define YYTABLES_NAME "yytables"
3096 #line 205 "ast_expr2.fl"
3100 /* I'm putting the interface routine to the whole parse here in the flexer input file
3101 mainly because of all the flexer initialization that has to be done. Shouldn't matter
3102 where it is, as long as it's somewhere. I didn't want to define a prototype for the
3103 ast_yy_scan_string in the .y file, because then, I'd have to define YY_BUFFER_STATE there...
3104 UGH! that would be inappropriate. */
3106 int ast_yyparse(void *); /* need to/should define this prototype for the call to yyparse */
3107 int ast_yyerror(const char *, YYLTYPE *, struct parse_io *); /* likewise */
3109 int ast_expr(char *expr, char *buf, int length)
3111 struct parse_io io;
3112 int return_value = 0;
3114 memset(&io, 0, sizeof(io));
3115 io.string = expr; /* to pass to the error routine */
3117 ast_yylex_init(&io.scanner);
3119 ast_yy_scan_string(expr, io.scanner);
3121 ast_yyparse ((void *) &io);
3123 ast_yylex_destroy(io.scanner);
3125 if (!io.val) {
3126 if (length > 1) {
3127 strcpy(buf, "0");
3128 return_value = 1;
3130 } else {
3131 if (io.val->type == AST_EXPR_integer) {
3132 int res_length;
3134 res_length = snprintf(buf, length, "%ld", (long int) io.val->u.i);
3135 return_value = (res_length <= length) ? res_length : length;
3136 } else {
3137 #ifdef STANDALONE
3138 strncpy(buf, io.val->u.s, length - 1);
3139 #else /* !STANDALONE */
3140 ast_copy_string(buf, io.val->u.s, length);
3141 #endif /* STANDALONE */
3142 return_value = strlen(buf);
3143 free(io.val->u.s);
3145 free(io.val);
3147 return return_value;
3151 char extra_error_message[4095];
3152 int extra_error_message_supplied = 0;
3153 void ast_expr_register_extra_error_info(char *message);
3154 void ast_expr_clear_extra_error_info(void);
3156 void ast_expr_register_extra_error_info(char *message)
3158 extra_error_message_supplied=1;
3159 strcpy(extra_error_message, message);
3162 void ast_expr_clear_extra_error_info(void)
3164 extra_error_message_supplied=0;
3165 extra_error_message[0] = 0;
3168 static char *expr2_token_equivs1[] =
3170 "TOKEN",
3171 "TOK_COND",
3172 "TOK_COLONCOLON",
3173 "TOK_OR",
3174 "TOK_AND",
3175 "TOK_EQ",
3176 "TOK_GT",
3177 "TOK_LT",
3178 "TOK_GE",
3179 "TOK_LE",
3180 "TOK_NE",
3181 "TOK_PLUS",
3182 "TOK_MINUS",
3183 "TOK_MULT",
3184 "TOK_DIV",
3185 "TOK_MOD",
3186 "TOK_COMPL",
3187 "TOK_COLON",
3188 "TOK_EQTILDE",
3189 "TOK_RP",
3190 "TOK_LP"
3193 static char *expr2_token_equivs2[] =
3195 "<token>",
3196 "?",
3197 "::",
3198 "|",
3199 "&",
3200 "=",
3201 ">",
3202 "<",
3203 ">=",
3204 "<=",
3205 "!=",
3206 "+",
3207 "-",
3208 "*",
3209 "/",
3210 "%",
3211 "!",
3212 ":",
3213 "=~",
3214 ")",
3219 static char *expr2_token_subst(char *mess)
3221 /* calc a length, malloc, fill, and return; yyerror had better free it! */
3222 int len=0,i;
3223 char *p;
3224 char *res, *s,*t;
3225 int expr2_token_equivs_entries = sizeof(expr2_token_equivs1)/sizeof(char*);
3227 for (p=mess; *p; p++) {
3228 for (i=0; i<expr2_token_equivs_entries; i++) {
3229 if ( strncmp(p,expr2_token_equivs1[i],strlen(expr2_token_equivs1[i])) == 0 )
3231 len+=strlen(expr2_token_equivs2[i])+2;
3232 p += strlen(expr2_token_equivs1[i])-1;
3233 break;
3236 len++;
3238 res = (char*)malloc(len+1);
3239 res[0] = 0;
3240 s = res;
3241 for (p=mess; *p;) {
3242 int found = 0;
3243 for (i=0; i<expr2_token_equivs_entries; i++) {
3244 if ( strncmp(p,expr2_token_equivs1[i],strlen(expr2_token_equivs1[i])) == 0 ) {
3245 *s++ = '\'';
3246 for (t=expr2_token_equivs2[i]; *t;) {
3247 *s++ = *t++;
3249 *s++ = '\'';
3250 p += strlen(expr2_token_equivs1[i]);
3251 found = 1;
3252 break;
3255 if( !found )
3256 *s++ = *p++;
3258 *s++ = 0;
3259 return res;
3262 int ast_yyerror (const char *s, yyltype *loc, struct parse_io *parseio )
3264 struct yyguts_t * yyg = (struct yyguts_t*)(parseio->scanner);
3265 char spacebuf[8000]; /* best safe than sorry */
3266 char spacebuf2[8000]; /* best safe than sorry */
3267 int i=0;
3268 char *s2 = expr2_token_subst((char *)s);
3269 spacebuf[0] = 0;
3271 for(i=0;i< (int)(yytext - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf);i++) spacebuf2[i] = ' '; /* uh... assuming yyg is defined, then I can use the yycolumn macro,
3272 which is the same thing as... get this:
3273 yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]->yy_bs_column
3274 I was tempted to just use yy_buf_pos in the STATE, but..., well:
3275 a. the yy_buf_pos is the current position in the buffer, which
3276 may not relate to the entire string/buffer because of the
3277 buffering.
3278 b. but, analysis of the situation is that when you use the
3279 ast_yy_scan_string func, it creates a single buffer the size of
3280 string, so the two would be the same...
3281 so, in the end, the yycolumn macro is available, shorter, therefore easier. */
3282 spacebuf2[i++]='^';
3283 spacebuf2[i]= 0;
3285 #ifdef STANDALONE3
3286 /* easier to read in the standalone version */
3287 printf("ast_yyerror(): %s syntax error: %s; Input:\n%s\n%s\n",
3288 (extra_error_message_supplied?extra_error_message:""), s2, parseio->string,spacebuf2);
3289 #else
3290 ast_log(LOG_WARNING,"ast_yyerror(): %s syntax error: %s; Input:\n%s\n%s\n",
3291 (extra_error_message_supplied?extra_error_message:""), s2, parseio->string,spacebuf2);
3292 #endif
3293 #ifndef STANDALONE
3294 ast_log(LOG_WARNING,"If you have questions, please refer to doc/channelvariables.txt in the asterisk source.\n");
3295 #endif
3296 free(s2);
3297 return(0);