Cleanup #1489: Delete GPU dummy mempool
[charm.git] / src / xlat-i / xi-scan.C
blobfaf3f2712767db4c9f062c5996dcf07dd2be81e7
2 #line 2 "lex.yy.c"
4 #define  YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
8 #define FLEX_SCANNER
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 6
11 #define YY_FLEX_SUBMINOR_VERSION 4
12 #if YY_FLEX_SUBMINOR_VERSION > 0
13 #define FLEX_BETA
14 #endif
16 /* First, we deal with  platform-specific or compiler-specific issues. */
18 /* begin standard C headers. */
19 #include <stdio.h>
20 #include <string.h>
21 #include <errno.h>
22 #include <stdlib.h>
24 /* end standard C headers. */
26 /* flex integer type definitions */
28 #ifndef FLEXINT_H
29 #define FLEXINT_H
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36  * if you want the limit (max/min) macros for int types.
37  */
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
40 #endif
42 #include <inttypes.h>
43 typedef int8_t flex_int8_t;
44 typedef uint8_t flex_uint8_t;
45 typedef int16_t flex_int16_t;
46 typedef uint16_t flex_uint16_t;
47 typedef int32_t flex_int32_t;
48 typedef uint32_t flex_uint32_t;
49 #else
50 typedef signed char flex_int8_t;
51 typedef short int flex_int16_t;
52 typedef int flex_int32_t;
53 typedef unsigned char flex_uint8_t;
54 typedef unsigned short int flex_uint16_t;
55 typedef unsigned int flex_uint32_t;
57 /* Limits of integral types. */
58 #ifndef INT8_MIN
59 #define INT8_MIN               (-128)
60 #endif
61 #ifndef INT16_MIN
62 #define INT16_MIN              (-32767-1)
63 #endif
64 #ifndef INT32_MIN
65 #define INT32_MIN              (-2147483647-1)
66 #endif
67 #ifndef INT8_MAX
68 #define INT8_MAX               (127)
69 #endif
70 #ifndef INT16_MAX
71 #define INT16_MAX              (32767)
72 #endif
73 #ifndef INT32_MAX
74 #define INT32_MAX              (2147483647)
75 #endif
76 #ifndef UINT8_MAX
77 #define UINT8_MAX              (255U)
78 #endif
79 #ifndef UINT16_MAX
80 #define UINT16_MAX             (65535U)
81 #endif
82 #ifndef UINT32_MAX
83 #define UINT32_MAX             (4294967295U)
84 #endif
86 #ifndef SIZE_MAX
87 #define SIZE_MAX               (~(size_t)0)
88 #endif
90 #endif /* ! C99 */
92 #endif /* ! FLEXINT_H */
94 /* begin standard C++ headers. */
96 /* TODO: this is always defined, so inline it */
97 #define yyconst const
99 #if defined(__GNUC__) && __GNUC__ >= 3
100 #define yynoreturn __attribute__((__noreturn__))
101 #else
102 #define yynoreturn
103 #endif
105 /* Returned upon end-of-file. */
106 #define YY_NULL 0
108 /* Promotes a possibly negative, possibly signed char to an
109  *   integer in range [0..255] for use as an array index.
110  */
111 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
113 /* Enter a start condition.  This macro really ought to take a parameter,
114  * but we do it the disgusting crufty way forced on us by the ()-less
115  * definition of BEGIN.
116  */
117 #define BEGIN (yy_start) = 1 + 2 *
118 /* Translate the current start state into a value that can be later handed
119  * to BEGIN to return to the state.  The YYSTATE alias is for lex
120  * compatibility.
121  */
122 #define YY_START (((yy_start) - 1) / 2)
123 #define YYSTATE YY_START
124 /* Action number for EOF rule of a given start state. */
125 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
126 /* Special action meaning "start processing a new file". */
127 #define YY_NEW_FILE yyrestart( yyin  )
128 #define YY_END_OF_BUFFER_CHAR 0
130 /* Size of default input buffer. */
131 #ifndef YY_BUF_SIZE
132 #ifdef __ia64__
133 /* On IA-64, the buffer size is 16k, not 8k.
134  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
135  * Ditto for the __ia64__ case accordingly.
136  */
137 #define YY_BUF_SIZE 32768
138 #else
139 #define YY_BUF_SIZE 16384
140 #endif /* __ia64__ */
141 #endif
143 /* The state buf must be large enough to hold one state per character in the main buffer.
144  */
145 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
147 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
148 #define YY_TYPEDEF_YY_BUFFER_STATE
149 typedef struct yy_buffer_state *YY_BUFFER_STATE;
150 #endif
152 #ifndef YY_TYPEDEF_YY_SIZE_T
153 #define YY_TYPEDEF_YY_SIZE_T
154 typedef size_t yy_size_t;
155 #endif
157 extern int yyleng;
159 extern FILE *yyin, *yyout;
161 #define EOB_ACT_CONTINUE_SCAN 0
162 #define EOB_ACT_END_OF_FILE 1
163 #define EOB_ACT_LAST_MATCH 2
165     #define YY_LESS_LINENO(n)
166     #define YY_LINENO_REWIND_TO(ptr)
168 /* Return all but the first "n" matched characters back to the input stream. */
169 #define yyless(n) \
170         do \
171                 { \
172                 /* Undo effects of setting up yytext. */ \
173         int yyless_macro_arg = (n); \
174         YY_LESS_LINENO(yyless_macro_arg);\
175                 *yy_cp = (yy_hold_char); \
176                 YY_RESTORE_YY_MORE_OFFSET \
177                 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
178                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
179                 } \
180         while ( 0 )
181 #define unput(c) yyunput( c, (yytext_ptr)  )
183 #ifndef YY_STRUCT_YY_BUFFER_STATE
184 #define YY_STRUCT_YY_BUFFER_STATE
185 struct yy_buffer_state
186         {
187         FILE *yy_input_file;
189         char *yy_ch_buf;                /* input buffer */
190         char *yy_buf_pos;               /* current position in input buffer */
192         /* Size of input buffer in bytes, not including room for EOB
193          * characters.
194          */
195         int yy_buf_size;
197         /* Number of characters read into yy_ch_buf, not including EOB
198          * characters.
199          */
200         int yy_n_chars;
202         /* Whether we "own" the buffer - i.e., we know we created it,
203          * and can realloc() it to grow it, and should free() it to
204          * delete it.
205          */
206         int yy_is_our_buffer;
208         /* Whether this is an "interactive" input source; if so, and
209          * if we're using stdio for input, then we want to use getc()
210          * instead of fread(), to make sure we stop fetching input after
211          * each newline.
212          */
213         int yy_is_interactive;
215         /* Whether we're considered to be at the beginning of a line.
216          * If so, '^' rules will be active on the next match, otherwise
217          * not.
218          */
219         int yy_at_bol;
221     int yy_bs_lineno; /**< The line count. */
222     int yy_bs_column; /**< The column count. */
224         /* Whether to try to fill the input buffer when we reach the
225          * end of it.
226          */
227         int yy_fill_buffer;
229         int yy_buffer_status;
231 #define YY_BUFFER_NEW 0
232 #define YY_BUFFER_NORMAL 1
233         /* When an EOF's been seen but there's still some text to process
234          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
235          * shouldn't try reading from the input source any more.  We might
236          * still have a bunch of tokens to match, though, because of
237          * possible backing-up.
238          *
239          * When we actually see the EOF, we change the status to "new"
240          * (via yyrestart()), so that the user can continue scanning by
241          * just pointing yyin at a new input file.
242          */
243 #define YY_BUFFER_EOF_PENDING 2
245         };
246 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
248 /* Stack of input buffers. */
249 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
250 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
251 static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
253 /* We provide macros for accessing buffer states in case in the
254  * future we want to put the buffer states in a more general
255  * "scanner state".
257  * Returns the top of the stack, or NULL.
258  */
259 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
260                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
261                           : NULL)
262 /* Same as previous macro, but useful when we know that the buffer stack is not
263  * NULL or when we need an lvalue. For internal use only.
264  */
265 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
267 /* yy_hold_char holds the character lost when yytext is formed. */
268 static char yy_hold_char;
269 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
270 int yyleng;
272 /* Points to current character in buffer. */
273 static char *yy_c_buf_p = NULL;
274 static int yy_init = 0;         /* whether we need to initialize */
275 static int yy_start = 0;        /* start state number */
277 /* Flag which is used to allow yywrap()'s to do buffer switches
278  * instead of setting up a fresh yyin.  A bit of a hack ...
279  */
280 static int yy_did_buffer_switch_on_eof;
282 void yyrestart ( FILE *input_file  );
283 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer  );
284 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size  );
285 void yy_delete_buffer ( YY_BUFFER_STATE b  );
286 void yy_flush_buffer ( YY_BUFFER_STATE b  );
287 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer  );
288 void yypop_buffer_state ( void );
290 static void yyensure_buffer_stack ( void );
291 static void yy_load_buffer_state ( void );
292 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file  );
293 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
295 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size  );
296 YY_BUFFER_STATE yy_scan_string ( const char *yy_str  );
297 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len  );
299 void *yyalloc ( yy_size_t  );
300 void *yyrealloc ( void *, yy_size_t  );
301 void yyfree ( void *  );
303 #define yy_new_buffer yy_create_buffer
304 #define yy_set_interactive(is_interactive) \
305         { \
306         if ( ! YY_CURRENT_BUFFER ){ \
307         yyensure_buffer_stack (); \
308                 YY_CURRENT_BUFFER_LVALUE =    \
309             yy_create_buffer( yyin, YY_BUF_SIZE ); \
310         } \
311         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
312         }
313 #define yy_set_bol(at_bol) \
314         { \
315         if ( ! YY_CURRENT_BUFFER ){\
316         yyensure_buffer_stack (); \
317                 YY_CURRENT_BUFFER_LVALUE =    \
318             yy_create_buffer( yyin, YY_BUF_SIZE ); \
319         } \
320         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
321         }
322 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
324 /* Begin user sect3 */
325 typedef flex_uint8_t YY_CHAR;
327 FILE *yyin = NULL, *yyout = NULL;
329 typedef int yy_state_type;
331 extern int yylineno;
332 int yylineno = 1;
334 extern char *yytext;
335 #ifdef yytext_ptr
336 #undef yytext_ptr
337 #endif
338 #define yytext_ptr yytext
340 static yy_state_type yy_get_previous_state ( void );
341 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state  );
342 static int yy_get_next_buffer ( void );
343 static void yynoreturn yy_fatal_error ( const char* msg  );
345 /* Done after the current pattern has been matched and before the
346  * corresponding action - sets up yytext.
347  */
348 #define YY_DO_BEFORE_ACTION \
349         (yytext_ptr) = yy_bp; \
350         yyleng = (int) (yy_cp - yy_bp); \
351         (yy_hold_char) = *yy_cp; \
352         *yy_cp = '\0'; \
353         (yy_c_buf_p) = yy_cp;
354 #define YY_NUM_RULES 17
355 #define YY_END_OF_BUFFER 18
356 /* This struct is not used in this scanner,
357    but its presence is necessary. */
358 struct yy_trans_info
359         {
360         flex_int32_t yy_verify;
361         flex_int32_t yy_nxt;
362         };
363 static const flex_int16_t yy_acclist[376] =
364     {   0,
365         1,    2,    3,    1,    2,    3,   18,    1,    2,    3,
366        16,   17,    1,    2,    3,   11,   16,   17,    1,    2,
367         3,   12,   17,    1,    2,    3,    5,   16,   17,    1,
368         2,    3,   16,   17,    1,    2,    3,   16,   17,    1,
369         2,    3,   16,   17,    1,    2,   16,   17,    1,    2,
370         3,   16,   17,    1,    2,    3,   16,   17,    1,    2,
371         3,   16,   17,    1,    2,    3,   16,   17,    1,    2,
372         3,   13,   14,   16,   17,    1,    2,    3,   15,   16,
373        17,    2,    3,   16,   17,    1,    3,   16,   17,    1,
374         2,    3,    1,    2,    2,    3,    1,    3,    1,    2,
376         3,   11,    1,    2,    3,    1,    2,    3,   14,    1,
377         2,    2,    3,    1,    3,    1,    2,    3,    1,    2,
378         3,    1,    2,    3,    1,    2,    3,   14,    1,    2,
379         2,    3,    1,    3,    2,    1,    1,    2,    3,    7,
380         1,    2,    3,    1,    2,    3,   13,   14,    1,    2,
381         3,   14,    1,    2,    3,    6,    1,    2,    3,    4,
382         1,    2,    3,   14,    1,    2,    3,    1,    2,    3,
383        13,   14,    1,    2,    3,   15,    3,    1,    2,    3,
384         1,    2,    3,    1,    2,    3,    1,    2,   14,    2,
385         1,    2,    3,   14,    3,    1,    3,   14,    1,    2,
387         3,    1,    2,    3,    8,    1,    2,    3,    1,    2,
388         3,    1,    2,    3,    1,    2,   14,    2,    1,    2,
389         3,   14,    3,    1,    3,   14,    1,    2,    3,    1,
390         2,    3,    4,    1,    2,    4,    2,    3,    4,    1,
391         3,    4,    1,    2,    3,    1,    2,    3,   14,    1,
392         2,    3,    1,    2,    2,    3,    1,    3,    1,    2,
393         1,    2,    1,    2,    2,   14,    1,   14,    2,    3,
394         2,    3,    2,    3,    3,   14,    1,    3,    1,    3,
395         1,    3,    1,    2,    3,    1,    2,    3,    1,    2,
396         3,    1,    2,    2,    3,    1,    3,    1,    2,    1,
398         2,    1,    2,    2,   14,    1,   14,    2,    3,    2,
399         3,    2,    3,    3,   14,    1,    3,    1,    3,    1,
400         3,    1,    2,    3,    1,    2,    3,   14,    2,    4,
401         1,    4,    3,    4,    2,    1,    3,    2,    2,    2,
402        14,    1,    1,    1,    3,    3,    3,    1,    2,    3,
403         1,    2,    3,    2,    1,    3,    2,    2,    2,   14,
404         1,    1,    1,    3,    3,    3,    4,    1,    2,    3,
405        10,    1,    2,    3,    9
406     } ;
408 static const flex_int16_t yy_accept[159] =
409     {   0,
410         1,    4,    7,    8,   13,   19,   24,   30,   35,   40,
411        45,   49,   54,   59,   64,   69,   76,   82,   86,   90,
412        93,   95,   97,   99,  103,  106,  110,  112,  114,  116,
413       119,  122,  125,  129,  131,  133,  135,  136,  137,  141,
414       144,  149,  153,  157,  161,  165,  168,  173,  177,  178,
415       181,  184,  187,  190,  191,  192,  195,  196,  199,  202,
416       206,  209,  212,  215,  218,  219,  220,  223,  224,  227,
417       230,  234,  237,  240,  243,  246,  250,  253,  255,  257,
418       259,  261,  263,  265,  267,  267,  269,  271,  273,  275,
419       277,  279,  281,  283,  286,  289,  292,  294,  296,  298,
421       300,  302,  304,  306,  306,  308,  310,  312,  314,  316,
422       318,  320,  322,  325,  329,  331,  333,  335,  336,  337,
423       338,  339,  340,  341,  342,  343,  344,  345,  346,  347,
424       348,  351,  354,  355,  356,  357,  358,  359,  360,  361,
425       362,  363,  364,  365,  366,  367,  368,  368,  368,  368,
426       368,  372,  376,  376,  376,  376,  376,  376
427     } ;
429 static const YY_CHAR yy_ec[256] =
430     {   0,
431         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
432         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
433         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
434         1,    2,    1,    5,    6,    1,    1,    1,    7,    8,
435         8,    9,   10,    8,   10,   11,   12,   13,   13,   13,
436        13,   13,   13,   13,   13,   13,   13,    8,    8,    1,
437         1,    1,    1,    1,   14,   14,   14,   14,   15,   14,
438        14,   14,   14,   14,   16,   14,   16,   14,   14,   14,
439        14,   14,   14,   14,   14,   14,   14,   14,   14,   14,
440        17,    1,   17,    1,   18,    1,   14,   14,   14,   19,
442        20,   21,   14,   14,   22,   14,   16,   14,   16,   23,
443        14,   14,   14,   14,   14,   14,   14,   14,   14,   14,
444        14,   14,   24,    1,   24,    1,    1,    1,    1,    1,
445         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
446         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
447         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
448         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
449         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
450         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
451         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
453         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
454         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
455         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
456         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
457         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
458         1,    1,    1,    1,    1
459     } ;
461 static const YY_CHAR yy_meta[25] =
462     {   0,
463         1,    1,    2,    1,    1,    1,    1,    3,    1,    1,
464         1,    1,    1,    1,    1,    1,    4,    1,    1,    1,
465         1,    1,    1,    5
466     } ;
468 static const flex_int16_t yy_base[205] =
469     {   0,
470         0,    0,  139,   17,   40,   19,   20,   62,   79,  101,
471         9,   18,  115,   32,  129,  141,  151,   23,   38,   29,
472        15,   42,   45,   54,  172,  195,  215,  237,  259,   38,
473        51,  274,  297,  302,  324,  346,    0,    0,   55,   68,
474         0,  351,   58,  371,   78,  386,   62,    0,    0,    0,
475         0,  406,  429,   90,   80,  452,   97,  475,   91,   97,
476       491,  497,  502,  525,  120,  117,  531,  139,  537,  535,
477       555,  112,  152,  104,  165,  166,  577,  599,  621,  643,
478         0,    0,  658,  128,  117,  179,    0,    0,  680,  188,
479         0,    0,  702,  123,  128,  717,  739,  761,  783,  799,
481       805,  810,  192,   91,  199,  833,  839,  844,  201,  867,
482       873,  878,  192,  203,  129,   89,   60,  204,  216,  219,
483       208,  232,  226,  241,  246,  250,  251,  255,  267,  233,
484       253,  258,  223,  280,  281,  283,  304,  289,  313,  315,
485       321,  318,  327,  334,  335,    0,   64,  342,  353,   54,
486       243,  273,   28,  358,  365,   22, 1130,  895,  900,  905,
487       910,  915,  920,  925,  930,  935,  940,  945,  950,  955,
488       959,  964,  969,  974,  979,  984,  989,  994,  999, 1004,
489      1009, 1014, 1019, 1024, 1029, 1034, 1039, 1044, 1049, 1054,
490      1059, 1064, 1069, 1074, 1079, 1084, 1089, 1094, 1099, 1104,
492      1109, 1114, 1119, 1124
493     } ;
495 static const flex_int16_t yy_def[205] =
496     {   0,
497       157,    1,  157,  158,  158,  158,  158,  159,  158,  160,
498       161,    9,    9,    9,    9,    9,    9,  162,  163,    9,
499       161,  162,  163,    9,  159,    9,  164,  165,  166,    9,
500         9,  160,   26,  167,  168,  169,  170,  171,    9,    9,
501        16,    9,    9,  172,   16,    9,    9,   17,  173,   26,
502        26,  174,  161,  175,  176,  162,  177,  163,    9,    9,
503        26,   26,  178,   53,  179,  180,   56,  181,   58,    9,
504       172,  182,  183,  184,    9,    9,  174,  185,  186,  187,
505        53,   53,  185,  170,  188,  171,   56,   56,  186,  173,
506        58,   58,  187,    9,    9,  178,  189,  190,  191,   53,
508        53,  189,  170,  192,  171,   56,   56,  190,  173,   58,
509        58,  191,    9,    9,  193,  194,  195,  196,  197,  198,
510       170,  170,  196,  157,  171,  171,  197,  173,  173,  198,
511         9,    9,  199,  200,  201,  170,  170,  199,  157,  171,
512       171,  200,  173,  173,  201,  202,  203,  157,  157,  203,
513         9,    9,  204,  157,  157,  204,    0,  157,  157,  157,
514       157,  157,  157,  157,  157,  157,  157,  157,  157,  157,
515       157,  157,  157,  157,  157,  157,  157,  157,  157,  157,
516       157,  157,  157,  157,  157,  157,  157,  157,  157,  157,
517       157,  157,  157,  157,  157,  157,  157,  157,  157,  157,
519       157,  157,  157,  157
520     } ;
522 static const flex_int16_t yy_nxt[1155] =
523     {   0,
524         4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
525        14,   15,   16,   17,   17,   17,   18,   17,   17,   17,
526        17,   17,   17,   19,   21,   37,   21,   21,  139,   39,
527        37,   37,   38,   22,  139,   22,   22,   20,   38,   20,
528        23,   24,   23,   23,   42,   38,   49,   21,   20,   37,
529        20,   20,   38,   20,   49,   24,   22,   20,  124,   20,
530        59,   49,   49,   23,   20,   49,   26,  146,  124,   27,
531        20,   60,   20,   20,   20,   20,   20,   20,   28,   20,
532        42,   20,   38,   20,   86,   29,   21,   20,   20,   20,
533        42,   38,   37,   20,   84,   22,   85,  139,   30,   49,
535        31,   90,   23,   20,   85,  146,   23,   33,   34,   94,
536        20,  116,   20,   85,   21,   95,   20,   35,   20,   38,
537       117,  124,   37,  105,   36,   40,  103,   41,  115,  121,
538       122,   37,  123,  104,   20,  116,   20,   43,  157,  157,
539        44,   49,   20,  104,  131,  109,  104,  132,   20,   20,
540        20,   45,  146,   41,   22,   46,   47,  157,  157,  115,
541        46,  157,   20,   48,   48,   48,   48,  157,   48,   48,
542        48,   48,   48,   48,   20,  117,   26,   76,   76,   27,
543       125,  126,  157,  127,   20,   20,   20,   20,   28,  128,
544       129,  157,  130,  136,  137,   29,   50,   51,  138,   52,
546       140,  141,  143,  144,  114,  142,   37,  145,   84,  121,
547       122,   20,  123,   20,   20,  114,   20,   21,   38,   53,
548        86,   49,   20,   90,   20,   37,  147,  147,   37,  103,
549        84,   54,  147,  121,  122,   49,  123,   90,   55,   22,
550       147,   56,  148,  149,   54,  150,  153,  125,  126,  147,
551       127,  125,  126,   38,  127,   86,  128,  129,  157,  130,
552        57,   23,   20,   58,   20,  157,   55,  147,  128,  129,
553       157,  130,   20,  151,   20,   57,   20,   20,  152,   20,
554        33,   34,   38,   49,  136,  137,  105,  109,  153,  138,
555        35,   37,   20,  157,   20,  103,  153,   36,   61,   62,
557       157,   20,  157,   63,   21,  136,  137,  157,   64,  157,
558       138,  157,  153,  157,  154,  155,  140,  141,   65,  156,
559        38,  142,  140,  141,  105,   66,   22,  142,  143,  144,
560        67,   65,  157,  145,  153,  143,  144,   49,  157,  157,
561       145,  109,  153,  148,  149,  157,  150,   68,   23,  157,
562       157,  157,   69,   66,  148,  149,  157,  150,  157,  154,
563       155,  157,   68,   42,  156,   70,  154,  155,  157,  157,
564        70,  156,   20,   20,  157,  157,  157,  157,   72,  157,
565       157,  157,  157,  157,  157,  157,  157,   73,  157,  157,
566       157,  157,  157,  157,   74,   75,  157,  157,   76,  157,
568       157,  157,  157,  157,  157,   20,  157,   20,   20,  157,
569        26,  157,  157,   78,  157,  157,  157,  157,  157,  157,
570       157,  157,   79,  157,  157,  157,  157,  157,  157,   80,
571        81,   82,  157,   83,  157,  157,  157,  157,  157,  157,
572       157,  157,  157,  157,  157,   37,  157,  157,  157,  157,
573       157,  157,   38,   87,   88,  157,   89,  157,  157,   37,
574       157,  157,  157,  157,  157,  157,  157,  157,  157,  157,
575       157,  157,  157,  157,  157,   49,   91,   92,  157,   93,
576       157,  157,   38,  157,  157,  157,  157,  157,  157,  157,
577       157,   49,   61,   62,  157,   20,  157,   63,   61,   62,
579       157,   20,  157,   63,   20,  157,  157,  157,   33,   97,
580       157,  157,  157,  157,  157,  157,  157,  157,   98,  157,
581       157,  157,  157,  157,  157,   99,  100,  101,  157,   21,
582       157,  102,  106,  107,  157,   22,  157,  108,  110,  111,
583       157,   23,  157,  112,  113,  157,  157,  114,  157,  157,
584       157,  157,  157,  157,   20,  157,   20,   20,  157,  157,
585       157,  157,   72,  157,  157,  157,  157,  157,  157,  157,
586       157,   73,  157,  157,  157,  157,  157,  157,   74,   20,
587       157,   26,  157,  157,   78,  157,  157,  157,  157,  157,
588       157,  157,  157,   79,  157,  157,  157,  157,  157,  157,
590        80,   21,  157,   53,  157,  157,  157,  157,  157,  157,
591       157,  157,  157,  157,  157,  118,  157,  157,  157,  157,
592       157,  157,  119,   22,  157,   56,  157,  157,  118,  157,
593       157,  157,  157,  157,  157,  157,  157,  157,  157,  157,
594       157,  157,  157,  157,  120,   23,  157,   58,  157,  157,
595       119,  157,  157,  157,  157,  157,  157,  157,  157,  120,
596        21,  157,   53,  157,  157,  157,  157,  157,  157,  157,
597       157,  157,  157,  157,  118,  157,  157,  157,  157,  157,
598       157,  119,   22,  157,   56,  157,  157,  118,  157,  157,
599       157,  157,  157,  157,  157,  157,  157,  157,  157,  157,
601       157,  157,  157,  120,   23,  157,   58,  157,  157,  119,
602       157,  157,  157,  157,  157,  157,  157,  157,  120,   20,
603       157,  157,  157,   33,   97,  157,  157,  157,  157,  157,
604       157,  157,  157,   98,  157,  157,  157,  157,  157,  157,
605        99,   21,  157,  157,  157,   64,  157,  157,  157,  157,
606       157,  157,  157,  157,  157,  133,  157,  157,  157,  157,
607       157,  157,  134,   22,  157,  157,  157,   67,  133,  157,
608       157,  157,  157,  157,  157,  157,  157,  157,  157,  157,
609       157,  157,  157,  157,  135,   23,  157,  157,  157,   69,
610       134,  157,  157,  157,  157,  157,  157,  157,  157,  135,
612       100,  101,  157,   21,  157,  102,  100,  101,  157,   21,
613       157,  102,   21,  157,  157,  157,   64,  157,  157,  157,
614       157,  157,  157,  157,  157,  157,  133,  157,  157,  157,
615       157,  157,  157,  134,  106,  107,  157,   22,  157,  108,
616       106,  107,  157,   22,  157,  108,   22,  157,  157,  157,
617        67,  133,  157,  157,  157,  157,  157,  157,  157,  157,
618       157,  157,  157,  157,  157,  157,  157,  135,  110,  111,
619       157,   23,  157,  112,  110,  111,  157,   23,  157,  112,
620        23,  157,  157,  157,   69,  134,  157,  157,  157,  157,
621       157,  157,  157,  157,  135,   20,   20,   20,   20,   20,
623        25,   25,   25,   25,   25,   32,   32,   32,   32,   32,
624        21,   21,   21,   21,   21,   22,   22,   22,   22,   22,
625        23,   23,   23,   23,   23,   27,   27,   27,   27,   27,
626        28,   28,   28,   28,   28,   29,   29,   29,   29,   29,
627        34,   34,   34,   34,   34,   35,   35,   35,   35,   35,
628        36,   36,   36,   36,   36,   37,   37,   37,   37,   38,
629        38,   38,  157,   38,   71,   71,   71,   71,   71,   49,
630        49,  157,   49,   49,   77,   77,   77,   77,   77,   54,
631        54,   54,   54,   54,   55,   55,   55,   55,   55,   57,
632        57,   57,   57,   57,   96,   96,   96,   96,   96,   65,
634        65,   65,   65,   65,   66,   66,   66,   66,   66,   68,
635        68,   68,   68,   68,   72,   72,   72,   72,   72,   73,
636        73,   73,   73,   73,   74,   74,   74,   74,   74,   78,
637        78,   78,   78,   78,   79,   79,   79,   79,   79,   80,
638        80,   80,   80,   80,   85,  157,   85,   85,   85,   97,
639        97,   97,   97,   97,   98,   98,   98,   98,   98,   99,
640        99,   99,   99,   99,  104,  157,  104,  104,  104,  115,
641       115,  115,  115,  115,  116,  116,  116,  116,  116,  117,
642       117,  117,  117,  117,  118,  118,  118,  118,  118,  119,
643       119,  119,  119,  119,  120,  120,  120,  120,  120,  133,
645       133,  133,  133,  133,  134,  134,  134,  134,  134,  135,
646       135,  135,  135,  135,  146,  157,  146,  146,  146,  147,
647       157,  147,  147,  147,  153,  157,  153,  153,  153,    3,
648       157,  157,  157,  157,  157,  157,  157,  157,  157,  157,
649       157,  157,  157,  157,  157,  157,  157,  157,  157,  157,
650       157,  157,  157,  157
651     } ;
653 static const flex_int16_t yy_chk[1155] =
654     {   0,
655         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
656         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
657         1,    1,    1,    1,    4,   11,    6,    7,  156,   12,
658        18,   21,   11,    4,  153,    6,    7,   12,   21,   12,
659         4,    5,    6,    7,   14,   19,   18,    5,   20,   22,
660        20,   14,   23,   14,   19,   24,    5,   30,  150,   30,
661        30,   23,  117,    5,    8,   22,    8,  117,  147,    8,
662        31,   31,   31,   24,   39,   24,   39,   43,    8,   43,
663        40,   47,   55,   47,   55,    8,    9,   40,   45,   40,
664        45,  116,   54,   45,   54,    9,   55,  104,    9,   57,
666         9,   57,    9,   10,   57,  116,   74,   10,   10,   59,
667        59,   74,   59,   54,   72,   60,   60,   10,   60,   66,
668        74,   85,   65,   66,   10,   13,   65,   13,   72,   84,
669        84,  115,   84,   66,   13,   72,   13,   15,    3,    0,
670        15,   68,   94,   65,   94,   68,   68,   95,   15,   95,
671        15,   16,  115,   16,   73,   16,   16,    0,    0,   73,
672        16,    0,   16,   17,   17,   17,   17,    0,   17,   17,
673        17,   17,   17,   17,   25,   73,   25,   75,   76,   25,
674        86,   86,    0,   86,   75,   76,   75,   76,   25,   90,
675        90,    0,   90,  103,  103,   25,   26,   26,  103,   26,
677       105,  105,  109,  109,  113,  105,  118,  109,  118,  121,
678       121,  113,  121,  113,   26,  114,   26,   27,  119,   27,
679       119,  120,  114,  120,  114,  133,  120,  118,  123,  133,
680       123,   27,  119,  122,  122,  130,  122,  130,   27,   28,
681       130,   28,  124,  124,   28,  124,  133,  125,  125,  123,
682       125,  126,  126,  127,  126,  127,  128,  128,    0,  128,
683        28,   29,  151,   29,  151,    0,   29,  127,  129,  129,
684         0,  129,  131,  131,  131,   29,   32,  132,  132,  132,
685        32,   32,  134,  135,  136,  136,  134,  135,  135,  136,
686        32,  138,  152,    0,  152,  138,  134,   32,   33,   33,
688         0,   33,    0,   33,   34,  137,  137,    0,   34,    0,
689       137,    0,  138,    0,  139,  139,  140,  140,   34,  139,
690       142,  140,  141,  141,  142,   34,   35,  141,  143,  143,
691        35,   35,    0,  143,  142,  144,  144,  145,    0,    0,
692       144,  145,  145,  148,  148,    0,  148,   35,   36,    0,
693         0,    0,   36,   36,  149,  149,    0,  149,    0,  154,
694       154,    0,   36,   42,  154,   42,  155,  155,    0,    0,
695        42,  155,   42,   44,    0,    0,    0,    0,   44,    0,
696         0,    0,    0,    0,    0,    0,    0,   44,    0,    0,
697         0,    0,    0,    0,   44,   46,    0,    0,   46,    0,
699         0,    0,    0,    0,    0,   46,    0,   46,   52,    0,
700        52,    0,    0,   52,    0,    0,    0,    0,    0,    0,
701         0,    0,   52,    0,    0,    0,    0,    0,    0,   52,
702        53,   53,    0,   53,    0,    0,    0,    0,    0,    0,
703         0,    0,    0,    0,    0,   53,    0,    0,    0,    0,
704         0,    0,   53,   56,   56,    0,   56,    0,    0,   56,
705         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
706         0,    0,    0,    0,    0,   56,   58,   58,    0,   58,
707         0,    0,   58,    0,    0,    0,    0,    0,    0,    0,
708         0,   58,   61,   61,    0,   61,    0,   61,   62,   62,
710         0,   62,    0,   62,   63,    0,    0,    0,   63,   63,
711         0,    0,    0,    0,    0,    0,    0,    0,   63,    0,
712         0,    0,    0,    0,    0,   63,   64,   64,    0,   64,
713         0,   64,   67,   67,    0,   67,    0,   67,   69,   69,
714         0,   69,    0,   69,   70,    0,    0,   70,    0,    0,
715         0,    0,    0,    0,   70,    0,   70,   71,    0,    0,
716         0,    0,   71,    0,    0,    0,    0,    0,    0,    0,
717         0,   71,    0,    0,    0,    0,    0,    0,   71,   77,
718         0,   77,    0,    0,   77,    0,    0,    0,    0,    0,
719         0,    0,    0,   77,    0,    0,    0,    0,    0,    0,
721        77,   78,    0,   78,    0,    0,    0,    0,    0,    0,
722         0,    0,    0,    0,    0,   78,    0,    0,    0,    0,
723         0,    0,   78,   79,    0,   79,    0,    0,   79,    0,
724         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
725         0,    0,    0,    0,   79,   80,    0,   80,    0,    0,
726        80,    0,    0,    0,    0,    0,    0,    0,    0,   80,
727        83,    0,   83,    0,    0,    0,    0,    0,    0,    0,
728         0,    0,    0,    0,   83,    0,    0,    0,    0,    0,
729         0,   83,   89,    0,   89,    0,    0,   89,    0,    0,
730         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
732         0,    0,    0,   89,   93,    0,   93,    0,    0,   93,
733         0,    0,    0,    0,    0,    0,    0,    0,   93,   96,
734         0,    0,    0,   96,   96,    0,    0,    0,    0,    0,
735         0,    0,    0,   96,    0,    0,    0,    0,    0,    0,
736        96,   97,    0,    0,    0,   97,    0,    0,    0,    0,
737         0,    0,    0,    0,    0,   97,    0,    0,    0,    0,
738         0,    0,   97,   98,    0,    0,    0,   98,   98,    0,
739         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
740         0,    0,    0,    0,   98,   99,    0,    0,    0,   99,
741        99,    0,    0,    0,    0,    0,    0,    0,    0,   99,
743       100,  100,    0,  100,    0,  100,  101,  101,    0,  101,
744         0,  101,  102,    0,    0,    0,  102,    0,    0,    0,
745         0,    0,    0,    0,    0,    0,  102,    0,    0,    0,
746         0,    0,    0,  102,  106,  106,    0,  106,    0,  106,
747       107,  107,    0,  107,    0,  107,  108,    0,    0,    0,
748       108,  108,    0,    0,    0,    0,    0,    0,    0,    0,
749         0,    0,    0,    0,    0,    0,    0,  108,  110,  110,
750         0,  110,    0,  110,  111,  111,    0,  111,    0,  111,
751       112,    0,    0,    0,  112,  112,    0,    0,    0,    0,
752         0,    0,    0,    0,  112,  158,  158,  158,  158,  158,
754       159,  159,  159,  159,  159,  160,  160,  160,  160,  160,
755       161,  161,  161,  161,  161,  162,  162,  162,  162,  162,
756       163,  163,  163,  163,  163,  164,  164,  164,  164,  164,
757       165,  165,  165,  165,  165,  166,  166,  166,  166,  166,
758       167,  167,  167,  167,  167,  168,  168,  168,  168,  168,
759       169,  169,  169,  169,  169,  170,  170,  170,  170,  171,
760       171,  171,    0,  171,  172,  172,  172,  172,  172,  173,
761       173,    0,  173,  173,  174,  174,  174,  174,  174,  175,
762       175,  175,  175,  175,  176,  176,  176,  176,  176,  177,
763       177,  177,  177,  177,  178,  178,  178,  178,  178,  179,
765       179,  179,  179,  179,  180,  180,  180,  180,  180,  181,
766       181,  181,  181,  181,  182,  182,  182,  182,  182,  183,
767       183,  183,  183,  183,  184,  184,  184,  184,  184,  185,
768       185,  185,  185,  185,  186,  186,  186,  186,  186,  187,
769       187,  187,  187,  187,  188,    0,  188,  188,  188,  189,
770       189,  189,  189,  189,  190,  190,  190,  190,  190,  191,
771       191,  191,  191,  191,  192,    0,  192,  192,  192,  193,
772       193,  193,  193,  193,  194,  194,  194,  194,  194,  195,
773       195,  195,  195,  195,  196,  196,  196,  196,  196,  197,
774       197,  197,  197,  197,  198,  198,  198,  198,  198,  199,
776       199,  199,  199,  199,  200,  200,  200,  200,  200,  201,
777       201,  201,  201,  201,  202,    0,  202,  202,  202,  203,
778         0,  203,  203,  203,  204,    0,  204,  204,  204,  157,
779       157,  157,  157,  157,  157,  157,  157,  157,  157,  157,
780       157,  157,  157,  157,  157,  157,  157,  157,  157,  157,
781       157,  157,  157,  157
782     } ;
784 extern int yy_flex_debug;
785 int yy_flex_debug = 0;
787 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
788 static char *yy_full_match;
789 static int yy_lp;
790 #define REJECT \
791 { \
792 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
793 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
794 ++(yy_lp); \
795 goto find_rule; \
798 #define yymore() yymore_used_but_not_detected
799 #define YY_MORE_ADJ 0
800 #define YY_RESTORE_YY_MORE_OFFSET
801 char *yytext;
802 #line 1 "xi-scan.l"
803 #line 2 "xi-scan.l"
804 #include <string.h>
805 #include "sdag/constructs/Constructs.h"
806 #include "xi-symbol.h"
807 #include <ctype.h>
808 using namespace xi;
809 #include "xi-grammar.tab.h"
810 #include <list>
812 /* Global Variables and Functions - used in grammar.y */
813 unsigned int yycolumn = 1;
814 unsigned int lineno = 1;
815 int in_bracket=0; /*Horrific hack to get "array length" code snippets (between []'s)*/
816 int in_braces=0; /*Horrific hack to get SDAG entry code snippets (between {}'s)*/
817 int in_int_expr=0;
818 std::list<Entry *> connectEntries;
819 /* Local to file */
820 unsigned char in_comment=0;
821 int search(char *s);
822 void update_position();
823 int count_newlines(const char *s);
825 /* We return Tokens only when not in a comment. */
826 #define Return if (!in_comment) return
827 #define Token(x) x
828 #define Yval yylval.strval = strcpy(new char[yyleng+1], yytext)
830 #ifdef yywrap
831 #undef yywrap
832 #endif
834 #line 834 "lex.yy.c"
835 #line 835 "lex.yy.c"
837 #define INITIAL 0
839 #ifndef YY_NO_UNISTD_H
840 /* Special case for "unistd.h", since it is non-ANSI. We include it way
841  * down here because we want the user's section 1 to have been scanned first.
842  * The user has a chance to override it with an option.
843  */
844 #include <unistd.h>
845 #endif
847 #ifndef YY_EXTRA_TYPE
848 #define YY_EXTRA_TYPE void *
849 #endif
851 static int yy_init_globals ( void );
853 /* Accessor methods to globals.
854    These are made visible to non-reentrant scanners for convenience. */
856 int yylex_destroy ( void );
858 int yyget_debug ( void );
860 void yyset_debug ( int debug_flag  );
862 YY_EXTRA_TYPE yyget_extra ( void );
864 void yyset_extra ( YY_EXTRA_TYPE user_defined  );
866 FILE *yyget_in ( void );
868 void yyset_in  ( FILE * _in_str  );
870 FILE *yyget_out ( void );
872 void yyset_out  ( FILE * _out_str  );
874                         int yyget_leng ( void );
876 char *yyget_text ( void );
878 int yyget_lineno ( void );
880 void yyset_lineno ( int _line_number  );
882 /* Macros after this point can all be overridden by user definitions in
883  * section 1.
884  */
886 #ifndef YY_SKIP_YYWRAP
887 #ifdef __cplusplus
888 extern "C" int yywrap ( void );
889 #else
890 extern int yywrap ( void );
891 #endif
892 #endif
894 #ifndef YY_NO_UNPUT
896     static void yyunput ( int c, char *buf_ptr  );
898 #endif
900 #ifndef yytext_ptr
901 static void yy_flex_strncpy ( char *, const char *, int );
902 #endif
904 #ifdef YY_NEED_STRLEN
905 static int yy_flex_strlen ( const char * );
906 #endif
908 #ifndef YY_NO_INPUT
909 #ifdef __cplusplus
910 static int yyinput ( void );
911 #else
912 static int input ( void );
913 #endif
915 #endif
917 /* Amount of stuff to slurp up with each read. */
918 #ifndef YY_READ_BUF_SIZE
919 #ifdef __ia64__
920 /* On IA-64, the buffer size is 16k, not 8k */
921 #define YY_READ_BUF_SIZE 16384
922 #else
923 #define YY_READ_BUF_SIZE 8192
924 #endif /* __ia64__ */
925 #endif
927 /* Copy whatever the last rule matched to the standard output. */
928 #ifndef ECHO
929 /* This used to be an fputs(), but since the string might contain NUL's,
930  * we now use fwrite().
931  */
932 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
933 #endif
935 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
936  * is returned in "result".
937  */
938 #ifndef YY_INPUT
939 #define YY_INPUT(buf,result,max_size) \
940         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
941                 { \
942                 int c = '*'; \
943                 int n; \
944                 for ( n = 0; n < max_size && \
945                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
946                         buf[n] = (char) c; \
947                 if ( c == '\n' ) \
948                         buf[n++] = (char) c; \
949                 if ( c == EOF && ferror( yyin ) ) \
950                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
951                 result = n; \
952                 } \
953         else \
954                 { \
955                 errno=0; \
956                 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
957                         { \
958                         if( errno != EINTR) \
959                                 { \
960                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
961                                 break; \
962                                 } \
963                         errno=0; \
964                         clearerr(yyin); \
965                         } \
966                 }\
969 #endif
971 /* No semi-colon after return; correct usage is to write "yyterminate();" -
972  * we don't want an extra ';' after the "return" because that will cause
973  * some compilers to complain about unreachable statements.
974  */
975 #ifndef yyterminate
976 #define yyterminate() return YY_NULL
977 #endif
979 /* Number of entries by which start-condition stack grows. */
980 #ifndef YY_START_STACK_INCR
981 #define YY_START_STACK_INCR 25
982 #endif
984 /* Report a fatal error. */
985 #ifndef YY_FATAL_ERROR
986 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
987 #endif
989 /* end tables serialization structures and prototypes */
991 /* Default declaration of generated scanner - a define so the user can
992  * easily add parameters.
993  */
994 #ifndef YY_DECL
995 #define YY_DECL_IS_OURS 1
997 extern int yylex (void);
999 #define YY_DECL int yylex (void)
1000 #endif /* !YY_DECL */
1002 /* Code executed at the beginning of each rule, after yytext and yyleng
1003  * have been set up.
1004  */
1005 #ifndef YY_USER_ACTION
1006 #define YY_USER_ACTION
1007 #endif
1009 /* Code executed at the end of each rule. */
1010 #ifndef YY_BREAK
1011 #define YY_BREAK /*LINTED*/break;
1012 #endif
1014 #define YY_RULE_SETUP \
1015         YY_USER_ACTION
1017 /** The main scanner function which does all the work.
1018  */
1019 YY_DECL
1021         yy_state_type yy_current_state;
1022         char *yy_cp, *yy_bp;
1023         int yy_act;
1025         if ( !(yy_init) )
1026                 {
1027                 (yy_init) = 1;
1029 #ifdef YY_USER_INIT
1030                 YY_USER_INIT;
1031 #endif
1033         /* Create the reject buffer large enough to save one state per allowed character. */
1034         if ( ! (yy_state_buf) )
1035             (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE  );
1036             if ( ! (yy_state_buf) )
1037                 YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
1039                 if ( ! (yy_start) )
1040                         (yy_start) = 1; /* first start state */
1042                 if ( ! yyin )
1043                         yyin = stdin;
1045                 if ( ! yyout )
1046                         yyout = stdout;
1048                 if ( ! YY_CURRENT_BUFFER ) {
1049                         yyensure_buffer_stack ();
1050                         YY_CURRENT_BUFFER_LVALUE =
1051                                 yy_create_buffer( yyin, YY_BUF_SIZE );
1052                 }
1054                 yy_load_buffer_state(  );
1055                 }
1057         {
1058 #line 61 "xi-scan.l"
1060 #line 1060 "lex.yy.c"
1062         while ( /*CONSTCOND*/1 )                /* loops until end-of-file is reached */
1063                 {
1064                 yy_cp = (yy_c_buf_p);
1066                 /* Support of yytext. */
1067                 *yy_cp = (yy_hold_char);
1069                 /* yy_bp points to the position in yy_ch_buf of the start of
1070                  * the current run.
1071                  */
1072                 yy_bp = yy_cp;
1074                 yy_current_state = (yy_start);
1076                 (yy_state_ptr) = (yy_state_buf);
1077                 *(yy_state_ptr)++ = yy_current_state;
1079 yy_match:
1080                 do
1081                         {
1082                         YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1083                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1084                                 {
1085                                 yy_current_state = (int) yy_def[yy_current_state];
1086                                 if ( yy_current_state >= 158 )
1087                                         yy_c = yy_meta[yy_c];
1088                                 }
1089                         yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1090                         *(yy_state_ptr)++ = yy_current_state;
1091                         ++yy_cp;
1092                         }
1093                 while ( yy_base[yy_current_state] != 1130 );
1095 yy_find_action:
1096                 yy_current_state = *--(yy_state_ptr);
1097                 (yy_lp) = yy_accept[yy_current_state];
1099 find_rule: /* we branch to this label when backing up */
1101                 for ( ; ; ) /* until we find what rule we matched */
1102                         {
1103                         if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
1104                                 {
1105                                 yy_act = yy_acclist[(yy_lp)];
1106                                         {
1107                                         (yy_full_match) = yy_cp;
1108                                         break;
1109                                         }
1110                                 }
1111                         --yy_cp;
1112                         yy_current_state = *--(yy_state_ptr);
1113                         (yy_lp) = yy_accept[yy_current_state];
1114                         }
1116                 YY_DO_BEFORE_ACTION;
1118 do_action:      /* This label is used only to access EOF actions. */
1120                 switch ( yy_act )
1121         { /* beginning of action switch */
1122 case 1:
1123 /* rule 1 can match eol */
1124 YY_RULE_SETUP
1125 #line 62 "xi-scan.l"
1126 { if (in_bracket)  {Yval; update_position(); return Token(CPROGRAM);} else REJECT;}
1127         YY_BREAK
1128 case 2:
1129 /* rule 2 can match eol */
1130 YY_RULE_SETUP
1131 #line 63 "xi-scan.l"
1132 { if (in_braces)   {Yval; lineno += count_newlines(yytext); update_position(); return Token(CPROGRAM);} else REJECT;}
1133         YY_BREAK
1134 case 3:
1135 /* rule 3 can match eol */
1136 YY_RULE_SETUP
1137 #line 64 "xi-scan.l"
1138 { if (in_int_expr) {Yval; update_position(); return Token(CPROGRAM);} else REJECT;}
1139         YY_BREAK
1140 case 4:
1141 YY_RULE_SETUP
1142 #line 65 "xi-scan.l"
1143 { update_position(); /* ignore single line comments */ }
1144         YY_BREAK
1145 case 5:
1146 YY_RULE_SETUP
1147 #line 66 "xi-scan.l"
1148 { update_position(); /* ignore ^M characters for dos-unix compat */ }
1149         YY_BREAK
1150 case 6:
1151 YY_RULE_SETUP
1152 #line 67 "xi-scan.l"
1153 { update_position(); in_comment = 1; /* Single line C-style comments */ }
1154         YY_BREAK
1155 case 7:
1156 YY_RULE_SETUP
1157 #line 68 "xi-scan.l"
1158 { update_position(); in_comment = 0; }
1159         YY_BREAK
1160 case 8:
1161 YY_RULE_SETUP
1162 #line 69 "xi-scan.l"
1163 { update_position(); Return Token(HASHIF); }
1164         YY_BREAK
1165 case 9:
1166 YY_RULE_SETUP
1167 #line 70 "xi-scan.l"
1168 { update_position(); Return Token(HASHIFDEF); }
1169         YY_BREAK
1170 case 10:
1171 YY_RULE_SETUP
1172 #line 71 "xi-scan.l"
1173 { update_position(); in_comment = 0; /* comments */ }
1174         YY_BREAK
1175 case 11:
1176 YY_RULE_SETUP
1177 #line 72 "xi-scan.l"
1178 { update_position(); /* ignore white space */ }
1179         YY_BREAK
1180 case 12:
1181 /* rule 12 can match eol */
1182 YY_RULE_SETUP
1183 #line 73 "xi-scan.l"
1184 { yycolumn = 1; lineno++;}
1185         YY_BREAK
1186 case 13:
1187 YY_RULE_SETUP
1188 #line 74 "xi-scan.l"
1189 { update_position(); Yval; Return Token(NUMBER); }
1190         YY_BREAK
1191 case 14:
1192 /* rule 14 can match eol */
1193 YY_RULE_SETUP
1194 #line 75 "xi-scan.l"
1195 { update_position(); Yval; Return Token(LITERAL); }
1196         YY_BREAK
1197 case 15:
1198 YY_RULE_SETUP
1199 #line 76 "xi-scan.l"
1200 { update_position(); Return Token(search(yytext)); }
1201         YY_BREAK
1202 case 16:
1203 YY_RULE_SETUP
1204 #line 77 "xi-scan.l"
1205 { update_position(); Return Token(yytext[0]); }
1206         YY_BREAK
1207 case 17:
1208 YY_RULE_SETUP
1209 #line 78 "xi-scan.l"
1210 ECHO;
1211         YY_BREAK
1212 #line 1212 "lex.yy.c"
1213                         case YY_STATE_EOF(INITIAL):
1214                                 yyterminate();
1216         case YY_END_OF_BUFFER:
1217                 {
1218                 /* Amount of text matched not including the EOB char. */
1219                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1221                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1222                 *yy_cp = (yy_hold_char);
1223                 YY_RESTORE_YY_MORE_OFFSET
1225                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1226                         {
1227                         /* We're scanning a new file or input source.  It's
1228                          * possible that this happened because the user
1229                          * just pointed yyin at a new source and called
1230                          * yylex().  If so, then we have to assure
1231                          * consistency between YY_CURRENT_BUFFER and our
1232                          * globals.  Here is the right place to do so, because
1233                          * this is the first action (other than possibly a
1234                          * back-up) that will match for the new input source.
1235                          */
1236                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1237                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1238                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1239                         }
1241                 /* Note that here we test for yy_c_buf_p "<=" to the position
1242                  * of the first EOB in the buffer, since yy_c_buf_p will
1243                  * already have been incremented past the NUL character
1244                  * (since all states make transitions on EOB to the
1245                  * end-of-buffer state).  Contrast this with the test
1246                  * in input().
1247                  */
1248                 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1249                         { /* This was really a NUL. */
1250                         yy_state_type yy_next_state;
1252                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1254                         yy_current_state = yy_get_previous_state(  );
1256                         /* Okay, we're now positioned to make the NUL
1257                          * transition.  We couldn't have
1258                          * yy_get_previous_state() go ahead and do it
1259                          * for us because it doesn't know how to deal
1260                          * with the possibility of jamming (and we don't
1261                          * want to build jamming into it because then it
1262                          * will run more slowly).
1263                          */
1265                         yy_next_state = yy_try_NUL_trans( yy_current_state );
1267                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1269                         if ( yy_next_state )
1270                                 {
1271                                 /* Consume the NUL. */
1272                                 yy_cp = ++(yy_c_buf_p);
1273                                 yy_current_state = yy_next_state;
1274                                 goto yy_match;
1275                                 }
1277                         else
1278                                 {
1279                                 yy_cp = (yy_c_buf_p);
1280                                 goto yy_find_action;
1281                                 }
1282                         }
1284                 else switch ( yy_get_next_buffer(  ) )
1285                         {
1286                         case EOB_ACT_END_OF_FILE:
1287                                 {
1288                                 (yy_did_buffer_switch_on_eof) = 0;
1290                                 if ( yywrap(  ) )
1291                                         {
1292                                         /* Note: because we've taken care in
1293                                          * yy_get_next_buffer() to have set up
1294                                          * yytext, we can now set up
1295                                          * yy_c_buf_p so that if some total
1296                                          * hoser (like flex itself) wants to
1297                                          * call the scanner after we return the
1298                                          * YY_NULL, it'll still work - another
1299                                          * YY_NULL will get returned.
1300                                          */
1301                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1303                                         yy_act = YY_STATE_EOF(YY_START);
1304                                         goto do_action;
1305                                         }
1307                                 else
1308                                         {
1309                                         if ( ! (yy_did_buffer_switch_on_eof) )
1310                                                 YY_NEW_FILE;
1311                                         }
1312                                 break;
1313                                 }
1315                         case EOB_ACT_CONTINUE_SCAN:
1316                                 (yy_c_buf_p) =
1317                                         (yytext_ptr) + yy_amount_of_matched_text;
1319                                 yy_current_state = yy_get_previous_state(  );
1321                                 yy_cp = (yy_c_buf_p);
1322                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1323                                 goto yy_match;
1325                         case EOB_ACT_LAST_MATCH:
1326                                 (yy_c_buf_p) =
1327                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1329                                 yy_current_state = yy_get_previous_state(  );
1331                                 yy_cp = (yy_c_buf_p);
1332                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1333                                 goto yy_find_action;
1334                         }
1335                 break;
1336                 }
1338         default:
1339                 YY_FATAL_ERROR(
1340                         "fatal flex scanner internal error--no action found" );
1341         } /* end of action switch */
1342                 } /* end of scanning one token */
1343         } /* end of user's declarations */
1344 } /* end of yylex */
1346 /* yy_get_next_buffer - try to read in a new buffer
1348  * Returns a code representing an action:
1349  *      EOB_ACT_LAST_MATCH -
1350  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1351  *      EOB_ACT_END_OF_FILE - end of file
1352  */
1353 static int yy_get_next_buffer (void)
1355         char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1356         char *source = (yytext_ptr);
1357         int number_to_move, i;
1358         int ret_val;
1360         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1361                 YY_FATAL_ERROR(
1362                 "fatal flex scanner internal error--end of buffer missed" );
1364         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1365                 { /* Don't try to fill the buffer, so this is an EOF. */
1366                 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1367                         {
1368                         /* We matched a single character, the EOB, so
1369                          * treat this as a final EOF.
1370                          */
1371                         return EOB_ACT_END_OF_FILE;
1372                         }
1374                 else
1375                         {
1376                         /* We matched some text prior to the EOB, first
1377                          * process it.
1378                          */
1379                         return EOB_ACT_LAST_MATCH;
1380                         }
1381                 }
1383         /* Try to read more data. */
1385         /* First move last chars to start of buffer. */
1386         number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
1388         for ( i = 0; i < number_to_move; ++i )
1389                 *(dest++) = *(source++);
1391         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1392                 /* don't do the read, it's not guaranteed to return an EOF,
1393                  * just force an EOF
1394                  */
1395                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1397         else
1398                 {
1399                         int num_to_read =
1400                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1402                 while ( num_to_read <= 0 )
1403                         { /* Not enough room in the buffer - grow it. */
1405                         YY_FATAL_ERROR(
1406 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1408                         }
1410                 if ( num_to_read > YY_READ_BUF_SIZE )
1411                         num_to_read = YY_READ_BUF_SIZE;
1413                 /* Read in more data. */
1414                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1415                         (yy_n_chars), num_to_read );
1417                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1418                 }
1420         if ( (yy_n_chars) == 0 )
1421                 {
1422                 if ( number_to_move == YY_MORE_ADJ )
1423                         {
1424                         ret_val = EOB_ACT_END_OF_FILE;
1425                         yyrestart( yyin  );
1426                         }
1428                 else
1429                         {
1430                         ret_val = EOB_ACT_LAST_MATCH;
1431                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1432                                 YY_BUFFER_EOF_PENDING;
1433                         }
1434                 }
1436         else
1437                 ret_val = EOB_ACT_CONTINUE_SCAN;
1439         if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1440                 /* Extend the array by 50%, plus the number we really need. */
1441                 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1442                 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1443                         (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size  );
1444                 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1445                         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1446                 /* "- 2" to take care of EOB's */
1447                 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1448         }
1450         (yy_n_chars) += number_to_move;
1451         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1452         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1454         (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1456         return ret_val;
1459 /* yy_get_previous_state - get the state just before the EOB char was reached */
1461     static yy_state_type yy_get_previous_state (void)
1463         yy_state_type yy_current_state;
1464         char *yy_cp;
1466         yy_current_state = (yy_start);
1468         (yy_state_ptr) = (yy_state_buf);
1469         *(yy_state_ptr)++ = yy_current_state;
1471         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1472                 {
1473                 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1474                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1475                         {
1476                         yy_current_state = (int) yy_def[yy_current_state];
1477                         if ( yy_current_state >= 158 )
1478                                 yy_c = yy_meta[yy_c];
1479                         }
1480                 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1481                 *(yy_state_ptr)++ = yy_current_state;
1482                 }
1484         return yy_current_state;
1487 /* yy_try_NUL_trans - try to make a transition on the NUL character
1489  * synopsis
1490  *      next_state = yy_try_NUL_trans( current_state );
1491  */
1492     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
1494         int yy_is_jam;
1496         YY_CHAR yy_c = 1;
1497         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1498                 {
1499                 yy_current_state = (int) yy_def[yy_current_state];
1500                 if ( yy_current_state >= 158 )
1501                         yy_c = yy_meta[yy_c];
1502                 }
1503         yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1504         yy_is_jam = (yy_current_state == 157);
1505         if ( ! yy_is_jam )
1506                 *(yy_state_ptr)++ = yy_current_state;
1508                 return yy_is_jam ? 0 : yy_current_state;
1511 #ifndef YY_NO_UNPUT
1513     static void yyunput (int c, char * yy_bp )
1515         char *yy_cp;
1517     yy_cp = (yy_c_buf_p);
1519         /* undo effects of setting up yytext */
1520         *yy_cp = (yy_hold_char);
1522         if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1523                 { /* need to shift things up to make room */
1524                 /* +2 for EOB chars. */
1525                 int number_to_move = (yy_n_chars) + 2;
1526                 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1527                                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1528                 char *source =
1529                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1531                 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1532                         *--dest = *--source;
1534                 yy_cp += (int) (dest - source);
1535                 yy_bp += (int) (dest - source);
1536                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1537                         (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1539                 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1540                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
1541                 }
1543         *--yy_cp = (char) c;
1545         (yytext_ptr) = yy_bp;
1546         (yy_hold_char) = *yy_cp;
1547         (yy_c_buf_p) = yy_cp;
1550 #endif
1552 #ifndef YY_NO_INPUT
1553 #ifdef __cplusplus
1554     static int yyinput (void)
1555 #else
1556     static int input  (void)
1557 #endif
1560         int c;
1562         *(yy_c_buf_p) = (yy_hold_char);
1564         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1565                 {
1566                 /* yy_c_buf_p now points to the character we want to return.
1567                  * If this occurs *before* the EOB characters, then it's a
1568                  * valid NUL; if not, then we've hit the end of the buffer.
1569                  */
1570                 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1571                         /* This was really a NUL. */
1572                         *(yy_c_buf_p) = '\0';
1574                 else
1575                         { /* need more input */
1576                         int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1577                         ++(yy_c_buf_p);
1579                         switch ( yy_get_next_buffer(  ) )
1580                                 {
1581                                 case EOB_ACT_LAST_MATCH:
1582                                         /* This happens because yy_g_n_b()
1583                                          * sees that we've accumulated a
1584                                          * token and flags that we need to
1585                                          * try matching the token before
1586                                          * proceeding.  But for input(),
1587                                          * there's no matching to consider.
1588                                          * So convert the EOB_ACT_LAST_MATCH
1589                                          * to EOB_ACT_END_OF_FILE.
1590                                          */
1592                                         /* Reset buffer status. */
1593                                         yyrestart( yyin );
1595                                         /*FALLTHROUGH*/
1597                                 case EOB_ACT_END_OF_FILE:
1598                                         {
1599                                         if ( yywrap(  ) )
1600                                                 return 0;
1602                                         if ( ! (yy_did_buffer_switch_on_eof) )
1603                                                 YY_NEW_FILE;
1604 #ifdef __cplusplus
1605                                         return yyinput();
1606 #else
1607                                         return input();
1608 #endif
1609                                         }
1611                                 case EOB_ACT_CONTINUE_SCAN:
1612                                         (yy_c_buf_p) = (yytext_ptr) + offset;
1613                                         break;
1614                                 }
1615                         }
1616                 }
1618         c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
1619         *(yy_c_buf_p) = '\0';   /* preserve yytext */
1620         (yy_hold_char) = *++(yy_c_buf_p);
1622         return c;
1624 #endif  /* ifndef YY_NO_INPUT */
1626 /** Immediately switch to a different input stream.
1627  * @param input_file A readable stream.
1629  * @note This function does not reset the start condition to @c INITIAL .
1630  */
1631     void yyrestart  (FILE * input_file )
1634         if ( ! YY_CURRENT_BUFFER ){
1635         yyensure_buffer_stack ();
1636                 YY_CURRENT_BUFFER_LVALUE =
1637             yy_create_buffer( yyin, YY_BUF_SIZE );
1638         }
1640         yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1641         yy_load_buffer_state(  );
1644 /** Switch to a different input buffer.
1645  * @param new_buffer The new input buffer.
1647  */
1648     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
1651         /* TODO. We should be able to replace this entire function body
1652          * with
1653          *              yypop_buffer_state();
1654          *              yypush_buffer_state(new_buffer);
1655      */
1656         yyensure_buffer_stack ();
1657         if ( YY_CURRENT_BUFFER == new_buffer )
1658                 return;
1660         if ( YY_CURRENT_BUFFER )
1661                 {
1662                 /* Flush out information for old buffer. */
1663                 *(yy_c_buf_p) = (yy_hold_char);
1664                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1665                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1666                 }
1668         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1669         yy_load_buffer_state(  );
1671         /* We don't actually know whether we did this switch during
1672          * EOF (yywrap()) processing, but the only time this flag
1673          * is looked at is after yywrap() is called, so it's safe
1674          * to go ahead and always set it.
1675          */
1676         (yy_did_buffer_switch_on_eof) = 1;
1679 static void yy_load_buffer_state  (void)
1681         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1682         (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1683         yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1684         (yy_hold_char) = *(yy_c_buf_p);
1687 /** Allocate and initialize an input buffer state.
1688  * @param file A readable stream.
1689  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1691  * @return the allocated buffer state.
1692  */
1693     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
1695         YY_BUFFER_STATE b;
1697         b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
1698         if ( ! b )
1699                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1701         b->yy_buf_size = size;
1703         /* yy_ch_buf has to be 2 characters longer than the size given because
1704          * we need to put in 2 end-of-buffer characters.
1705          */
1706         b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
1707         if ( ! b->yy_ch_buf )
1708                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1710         b->yy_is_our_buffer = 1;
1712         yy_init_buffer( b, file );
1714         return b;
1717 /** Destroy the buffer.
1718  * @param b a buffer created with yy_create_buffer()
1720  */
1721     void yy_delete_buffer (YY_BUFFER_STATE  b )
1724         if ( ! b )
1725                 return;
1727         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1728                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1730         if ( b->yy_is_our_buffer )
1731                 yyfree( (void *) b->yy_ch_buf  );
1733         yyfree( (void *) b  );
1736 /* Initializes or reinitializes a buffer.
1737  * This function is sometimes called more than once on the same buffer,
1738  * such as during a yyrestart() or at EOF.
1739  */
1740     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
1743         int oerrno = errno;
1745         yy_flush_buffer( b );
1747         b->yy_input_file = file;
1748         b->yy_fill_buffer = 1;
1750     /* If b is the current buffer, then yy_init_buffer was _probably_
1751      * called from yyrestart() or through yy_get_next_buffer.
1752      * In that case, we don't want to reset the lineno or column.
1753      */
1754     if (b != YY_CURRENT_BUFFER){
1755         b->yy_bs_lineno = 1;
1756         b->yy_bs_column = 0;
1757     }
1759         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1761         errno = oerrno;
1764 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1765  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1767  */
1768     void yy_flush_buffer (YY_BUFFER_STATE  b )
1770         if ( ! b )
1771                 return;
1773         b->yy_n_chars = 0;
1775         /* We always need two end-of-buffer characters.  The first causes
1776          * a transition to the end-of-buffer state.  The second causes
1777          * a jam in that state.
1778          */
1779         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1780         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1782         b->yy_buf_pos = &b->yy_ch_buf[0];
1784         b->yy_at_bol = 1;
1785         b->yy_buffer_status = YY_BUFFER_NEW;
1787         if ( b == YY_CURRENT_BUFFER )
1788                 yy_load_buffer_state(  );
1791 /** Pushes the new state onto the stack. The new state becomes
1792  *  the current state. This function will allocate the stack
1793  *  if necessary.
1794  *  @param new_buffer The new state.
1796  */
1797 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1799         if (new_buffer == NULL)
1800                 return;
1802         yyensure_buffer_stack();
1804         /* This block is copied from yy_switch_to_buffer. */
1805         if ( YY_CURRENT_BUFFER )
1806                 {
1807                 /* Flush out information for old buffer. */
1808                 *(yy_c_buf_p) = (yy_hold_char);
1809                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1810                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1811                 }
1813         /* Only push if top exists. Otherwise, replace top. */
1814         if (YY_CURRENT_BUFFER)
1815                 (yy_buffer_stack_top)++;
1816         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1818         /* copied from yy_switch_to_buffer. */
1819         yy_load_buffer_state(  );
1820         (yy_did_buffer_switch_on_eof) = 1;
1823 /** Removes and deletes the top of the stack, if present.
1824  *  The next element becomes the new top.
1826  */
1827 void yypop_buffer_state (void)
1829         if (!YY_CURRENT_BUFFER)
1830                 return;
1832         yy_delete_buffer(YY_CURRENT_BUFFER );
1833         YY_CURRENT_BUFFER_LVALUE = NULL;
1834         if ((yy_buffer_stack_top) > 0)
1835                 --(yy_buffer_stack_top);
1837         if (YY_CURRENT_BUFFER) {
1838                 yy_load_buffer_state(  );
1839                 (yy_did_buffer_switch_on_eof) = 1;
1840         }
1843 /* Allocates the stack if it does not exist.
1844  *  Guarantees space for at least one push.
1845  */
1846 static void yyensure_buffer_stack (void)
1848         yy_size_t num_to_alloc;
1850         if (!(yy_buffer_stack)) {
1852                 /* First allocation is just for 2 elements, since we don't know if this
1853                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1854                  * immediate realloc on the next call.
1855          */
1856       num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
1857                 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1858                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
1859                                                                 );
1860                 if ( ! (yy_buffer_stack) )
1861                         YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1863                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1865                 (yy_buffer_stack_max) = num_to_alloc;
1866                 (yy_buffer_stack_top) = 0;
1867                 return;
1868         }
1870         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1872                 /* Increase the buffer to prepare for a possible push. */
1873                 yy_size_t grow_size = 8 /* arbitrary grow size */;
1875                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1876                 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1877                                                                 ((yy_buffer_stack),
1878                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
1879                                                                 );
1880                 if ( ! (yy_buffer_stack) )
1881                         YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1883                 /* zero only the new slots.*/
1884                 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1885                 (yy_buffer_stack_max) = num_to_alloc;
1886         }
1889 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1890  * @param base the character buffer
1891  * @param size the size in bytes of the character buffer
1893  * @return the newly allocated buffer state object.
1894  */
1895 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
1897         YY_BUFFER_STATE b;
1899         if ( size < 2 ||
1900              base[size-2] != YY_END_OF_BUFFER_CHAR ||
1901              base[size-1] != YY_END_OF_BUFFER_CHAR )
1902                 /* They forgot to leave room for the EOB's. */
1903                 return NULL;
1905         b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
1906         if ( ! b )
1907                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1909         b->yy_buf_size = (int) (size - 2);      /* "- 2" to take care of EOB's */
1910         b->yy_buf_pos = b->yy_ch_buf = base;
1911         b->yy_is_our_buffer = 0;
1912         b->yy_input_file = NULL;
1913         b->yy_n_chars = b->yy_buf_size;
1914         b->yy_is_interactive = 0;
1915         b->yy_at_bol = 1;
1916         b->yy_fill_buffer = 0;
1917         b->yy_buffer_status = YY_BUFFER_NEW;
1919         yy_switch_to_buffer( b  );
1921         return b;
1924 /** Setup the input buffer state to scan a string. The next call to yylex() will
1925  * scan from a @e copy of @a str.
1926  * @param yystr a NUL-terminated string to scan
1928  * @return the newly allocated buffer state object.
1929  * @note If you want to scan bytes that may contain NUL values, then use
1930  *       yy_scan_bytes() instead.
1931  */
1932 YY_BUFFER_STATE yy_scan_string (const char * yystr )
1935         return yy_scan_bytes( yystr, (int) strlen(yystr) );
1938 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1939  * scan from a @e copy of @a bytes.
1940  * @param yybytes the byte buffer to scan
1941  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1943  * @return the newly allocated buffer state object.
1944  */
1945 YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len )
1947         YY_BUFFER_STATE b;
1948         char *buf;
1949         yy_size_t n;
1950         int i;
1952         /* Get memory for full buffer, including space for trailing EOB's. */
1953         n = (yy_size_t) (_yybytes_len + 2);
1954         buf = (char *) yyalloc( n  );
1955         if ( ! buf )
1956                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1958         for ( i = 0; i < _yybytes_len; ++i )
1959                 buf[i] = yybytes[i];
1961         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1963         b = yy_scan_buffer( buf, n );
1964         if ( ! b )
1965                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1967         /* It's okay to grow etc. this buffer, and we should throw it
1968          * away when we're done.
1969          */
1970         b->yy_is_our_buffer = 1;
1972         return b;
1975 #ifndef YY_EXIT_FAILURE
1976 #define YY_EXIT_FAILURE 2
1977 #endif
1979 static void yynoreturn yy_fatal_error (const char* msg )
1981                         fprintf( stderr, "%s\n", msg );
1982         exit( YY_EXIT_FAILURE );
1985 /* Redefine yyless() so it works in section 3 code. */
1987 #undef yyless
1988 #define yyless(n) \
1989         do \
1990                 { \
1991                 /* Undo effects of setting up yytext. */ \
1992         int yyless_macro_arg = (n); \
1993         YY_LESS_LINENO(yyless_macro_arg);\
1994                 yytext[yyleng] = (yy_hold_char); \
1995                 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1996                 (yy_hold_char) = *(yy_c_buf_p); \
1997                 *(yy_c_buf_p) = '\0'; \
1998                 yyleng = yyless_macro_arg; \
1999                 } \
2000         while ( 0 )
2002 /* Accessor  methods (get/set functions) to struct members. */
2004 /** Get the current line number.
2006  */
2007 int yyget_lineno  (void)
2010     return yylineno;
2013 /** Get the input stream.
2015  */
2016 FILE *yyget_in  (void)
2018         return yyin;
2021 /** Get the output stream.
2023  */
2024 FILE *yyget_out  (void)
2026         return yyout;
2029 /** Get the length of the current token.
2031  */
2032 int yyget_leng  (void)
2034         return yyleng;
2037 /** Get the current token.
2039  */
2041 char *yyget_text  (void)
2043         return yytext;
2046 /** Set the current line number.
2047  * @param _line_number line number
2049  */
2050 void yyset_lineno (int  _line_number )
2053     yylineno = _line_number;
2056 /** Set the input stream. This does not discard the current
2057  * input buffer.
2058  * @param _in_str A readable stream.
2060  * @see yy_switch_to_buffer
2061  */
2062 void yyset_in (FILE *  _in_str )
2064         yyin = _in_str ;
2067 void yyset_out (FILE *  _out_str )
2069         yyout = _out_str ;
2072 int yyget_debug  (void)
2074         return yy_flex_debug;
2077 void yyset_debug (int  _bdebug )
2079         yy_flex_debug = _bdebug ;
2082 static int yy_init_globals (void)
2084         /* Initialization is the same as for the non-reentrant scanner.
2085      * This function is called from yylex_destroy(), so don't allocate here.
2086      */
2088     (yy_buffer_stack) = NULL;
2089     (yy_buffer_stack_top) = 0;
2090     (yy_buffer_stack_max) = 0;
2091     (yy_c_buf_p) = NULL;
2092     (yy_init) = 0;
2093     (yy_start) = 0;
2095     (yy_state_buf) = 0;
2096     (yy_state_ptr) = 0;
2097     (yy_full_match) = 0;
2098     (yy_lp) = 0;
2100 /* Defined in main.c */
2101 #ifdef YY_STDINIT
2102     yyin = stdin;
2103     yyout = stdout;
2104 #else
2105     yyin = NULL;
2106     yyout = NULL;
2107 #endif
2109     /* For future reference: Set errno on error, since we are called by
2110      * yylex_init()
2111      */
2112     return 0;
2115 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2116 int yylex_destroy  (void)
2119     /* Pop the buffer stack, destroying each element. */
2120         while(YY_CURRENT_BUFFER){
2121                 yy_delete_buffer( YY_CURRENT_BUFFER  );
2122                 YY_CURRENT_BUFFER_LVALUE = NULL;
2123                 yypop_buffer_state();
2124         }
2126         /* Destroy the stack itself. */
2127         yyfree((yy_buffer_stack) );
2128         (yy_buffer_stack) = NULL;
2130     yyfree ( (yy_state_buf) );
2131     (yy_state_buf)  = NULL;
2133     /* Reset the globals. This is important in a non-reentrant scanner so the next time
2134      * yylex() is called, initialization will occur. */
2135     yy_init_globals( );
2137     return 0;
2141  * Internal utility routines.
2142  */
2144 #ifndef yytext_ptr
2145 static void yy_flex_strncpy (char* s1, const char * s2, int n )
2148         int i;
2149         for ( i = 0; i < n; ++i )
2150                 s1[i] = s2[i];
2152 #endif
2154 #ifdef YY_NEED_STRLEN
2155 static int yy_flex_strlen (const char * s )
2157         int n;
2158         for ( n = 0; s[n]; ++n )
2159                 ;
2161         return n;
2163 #endif
2165 void *yyalloc (yy_size_t  size )
2167                         return malloc(size);
2170 void *yyrealloc  (void * ptr, yy_size_t  size )
2173         /* The cast to (char *) in the following accommodates both
2174          * implementations that use char* generic pointers, and those
2175          * that use void* generic pointers.  It works with the latter
2176          * because both ANSI C and C++ allow castless assignment from
2177          * any pointer type to void*, and deal with argument conversions
2178          * as though doing an assignment.
2179          */
2180         return realloc(ptr, size);
2183 void yyfree (void * ptr )
2185                         free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
2188 #define YYTABLES_NAME "yytables"
2190 #line 78 "xi-scan.l"
2193 /* Reserved word table */
2194 struct rwentry rwtable[] = {
2195 {  "module",    MODULE },
2196 {  "mainmodule",        MAINMODULE },
2197 {  "chare",     CHARE },
2198 {  "group",     GROUP },
2199 {  "nodegroup",  NODEGROUP },
2200 {  "array",     ARRAY },
2201 {  "message",   MESSAGE },
2202 {  "conditional",CONDITIONAL },
2203 {  "extern",    EXTERN },
2204 {  "initcall",  INITCALL },
2205 {  "initnode",  INITNODE },
2206 {  "initproc",  INITPROC },
2207 {  "readonly",  READONLY },
2208 {  "stacksize", STACKSIZE },
2209 {  "threaded",  THREADED },
2210 {  "migratable",        MIGRATABLE },
2211 {  "PUPable",   PUPABLE },
2212 {  "pupable",   PUPABLE },
2213 {  "createhere",        CREATEHERE },
2214 {  "createhome",        CREATEHOME },
2215 {  "nokeep",    NOKEEP },
2216 {  "notrace",   NOTRACE },
2217 {  "appwork",   APPWORK},
2218 {  "template",  TEMPLATE },
2219 {  "class",     CLASS },
2220 {  "include",   INCLUDE },
2221 {  "sync",      SYNC },
2222 {  "iget",       IGET },
2223 {  "exclusive", EXCLUSIVE },
2224 {  "immediate",  IMMEDIATE },
2225 {  "expedited",  SKIPSCHED },
2226 {  "aggregate", AGGREGATE },
2227 {  "nocopy",  NOCOPY },
2228 {  "inline",    INLINE },
2229 {  "local",      LOCAL },
2230 {  "virtual",    VIRTUAL },
2231 {  "mainchare", MAINCHARE },
2232 {  "packed",     PACKED },
2233 {  "varsize",    VARSIZE },
2234 {  "entry",      ENTRY },
2235 {  "int",        INT },
2236 {  "short",      SHORT },
2237 {  "long",       LONG },
2238 {  "char",       CHAR },
2239 {  "float",      FLOAT },
2240 {  "double",     DOUBLE },
2241 {  "unsigned",   UNSIGNED },
2242 {  "void",      VOID },
2243 {  "const",     CONST },
2244 {  "atomic",    SERIAL },
2245 {  "serial",    SERIAL },
2246 {  "when",      WHEN },
2247 {  "while",     WHILE },
2248 {  "for",       FOR },
2249 {  "forall",    FORALL },
2250 {  "if",        IF },
2251 {  "else",      ELSE },
2252 {  "overlap",   OVERLAP },
2253 {  "python",     PYTHON },
2254 {  "namespace",  NAMESPACE },
2255 {  "using",      USING },
2256 {  "accel",      ACCEL },
2257 {  "readwrite",  READWRITE },
2258 {  "writeonly",  WRITEONLY },
2259 {  "accelblock", ACCELBLOCK },
2260 {  "memcritical", MEMCRITICAL },
2261 {  "reductiontarget", REDUCTIONTARGET },
2262 {  "case",       CASE },
2263 {  "typename", TYPENAME },
2264 {  "",          0 }
2267 int search(char *s)
2269   int i;
2270   for(i=0; rwtable[i].tok != 0; i++) {
2271     if(strcmp(rwtable[i].res, s) == 0)
2272       return(rwtable[i].tok);
2273   }
2274   yylval.strval = strcpy(new char[yyleng+1], s);
2275   return IDENT;
2278 void update_position()
2280   yylloc.first_line = yylloc.last_line = lineno;
2281   yylloc.first_column = yycolumn;
2282   yylloc.last_column = yycolumn + yyleng-1;
2283   yycolumn += yyleng;
2286 int count_newlines(const char *s)
2288   int count = 0;
2290   while (*s != '\0') {
2291     if (*s == '\n')
2292       count++;
2293     s++;
2294   }
2296   return count;
2299 void scan_string(const char *str)
2301   yy_scan_string(str);
2304 int yywrap() { return 1; }