torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
XdlScanner.cpp
Go to the documentation of this file.
1 #line 2 "XdlScanner.cpp"
2 
3 #line 4 "XdlScanner.cpp"
4 
5 #define YY_INT_ALIGNED short int
6 
7 /* A lexical scanner generated by flex */
8 
9 #define FLEX_SCANNER
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 35
13 #if YY_FLEX_SUBMINOR_VERSION > 0
14 #define FLEX_BETA
15 #endif
16 
17  /* The c++ scanner is a mess. The FlexLexer.h header file relies on the
18  * following macro. This is required in order to pass the c++-multiple-scanners
19  * test in the regression suite. We get reports that it breaks inheritance.
20  * We will address this in a future release of flex, or omit the C++ scanner
21  * altogether.
22  */
23  #define yyFlexLexer XdlFlexLexer
24 
25 /* First, we deal with platform-specific or compiler-specific issues. */
26 
27 /* begin standard C headers. */
28 
29 /* end standard C headers. */
30 
31 /* flex integer type definitions */
32 
33 #ifndef FLEXINT_H
34 #define FLEXINT_H
35 
36 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
37 
38 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
39 
40 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
41  * if you want the limit (max/min) macros for int types.
42  */
43 #ifndef __STDC_LIMIT_MACROS
44 #define __STDC_LIMIT_MACROS 1
45 #endif
46 
47 #include <inttypes.h>
48 typedef int8_t flex_int8_t;
49 typedef uint8_t flex_uint8_t;
50 typedef int16_t flex_int16_t;
51 typedef uint16_t flex_uint16_t;
52 typedef int32_t flex_int32_t;
53 typedef uint32_t flex_uint32_t;
54 #else
55 typedef signed char flex_int8_t;
56 typedef short int flex_int16_t;
57 typedef int flex_int32_t;
58 typedef unsigned char flex_uint8_t;
59 typedef unsigned short int flex_uint16_t;
60 typedef unsigned int flex_uint32_t;
61 #endif /* ! C99 */
62 
63 /* Limits of integral types. */
64 #ifndef INT8_MIN
65 #define INT8_MIN (-128)
66 #endif
67 #ifndef INT16_MIN
68 #define INT16_MIN (-32767-1)
69 #endif
70 #ifndef INT32_MIN
71 #define INT32_MIN (-2147483647-1)
72 #endif
73 #ifndef INT8_MAX
74 #define INT8_MAX (127)
75 #endif
76 #ifndef INT16_MAX
77 #define INT16_MAX (32767)
78 #endif
79 #ifndef INT32_MAX
80 #define INT32_MAX (2147483647)
81 #endif
82 #ifndef UINT8_MAX
83 #define UINT8_MAX (255U)
84 #endif
85 #ifndef UINT16_MAX
86 #define UINT16_MAX (65535U)
87 #endif
88 #ifndef UINT32_MAX
89 #define UINT32_MAX (4294967295U)
90 #endif
91 
92 #endif /* ! FLEXINT_H */
93 
94 /* begin standard C++ headers. */
95 #include <iostream>
96 #include <errno.h>
97 #include <cstdlib>
98 #include <cstring>
99 /* end standard C++ headers. */
100 
101 #ifdef __cplusplus
102 
103 /* The "const" storage-class-modifier is valid. */
104 #define YY_USE_CONST
105 
106 #else /* ! __cplusplus */
107 
108 /* C99 requires __STDC__ to be defined as 1. */
109 #if defined (__STDC__)
110 
111 #define YY_USE_CONST
112 
113 #endif /* defined (__STDC__) */
114 #endif /* ! __cplusplus */
115 
116 #ifdef YY_USE_CONST
117 #define yyconst const
118 #else
119 #define yyconst
120 #endif
121 
122 /* Returned upon end-of-file. */
123 #define YY_NULL 0
124 
125 /* Promotes a possibly negative, possibly signed char to an unsigned
126  * integer for use as an array index. If the signed char is negative,
127  * we want to instead treat it as an 8-bit unsigned char, hence the
128  * double cast.
129  */
130 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
131 
132 /* Enter a start condition. This macro really ought to take a parameter,
133  * but we do it the disgusting crufty way forced on us by the ()-less
134  * definition of BEGIN.
135  */
136 #define BEGIN (yy_start) = 1 + 2 *
137 
138 /* Translate the current start state into a value that can be later handed
139  * to BEGIN to return to the state. The YYSTATE alias is for lex
140  * compatibility.
141  */
142 #define YY_START (((yy_start) - 1) / 2)
143 #define YYSTATE YY_START
144 
145 /* Action number for EOF rule of a given start state. */
146 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
147 
148 /* Special action meaning "start processing a new file". */
149 #define YY_NEW_FILE yyrestart( yyin )
150 
151 #define YY_END_OF_BUFFER_CHAR 0
152 
153 /* Size of default input buffer. */
154 #ifndef YY_BUF_SIZE
155 #define YY_BUF_SIZE 16384
156 #endif
157 
158 /* The state buf must be large enough to hold one state per character in the main buffer.
159  */
160 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
161 
162 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
163 #define YY_TYPEDEF_YY_BUFFER_STATE
165 #endif
166 
167 extern int yyleng;
168 
169 #define EOB_ACT_CONTINUE_SCAN 0
170 #define EOB_ACT_END_OF_FILE 1
171 #define EOB_ACT_LAST_MATCH 2
172 
173  #define YY_LESS_LINENO(n)
174 
175 /* Return all but the first "n" matched characters back to the input stream. */
176 #define yyless(n) \
177  do \
178  { \
179  /* Undo effects of setting up yytext. */ \
180  int yyless_macro_arg = (n); \
181  YY_LESS_LINENO(yyless_macro_arg);\
182  *yy_cp = (yy_hold_char); \
183  YY_RESTORE_YY_MORE_OFFSET \
184  (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
185  YY_DO_BEFORE_ACTION; /* set up yytext again */ \
186  } \
187  while ( 0 )
188 
189 #define unput(c) yyunput( c, (yytext_ptr) )
190 
191 #ifndef YY_TYPEDEF_YY_SIZE_T
192 #define YY_TYPEDEF_YY_SIZE_T
193 typedef size_t yy_size_t;
194 #endif
195 
196 #ifndef YY_STRUCT_YY_BUFFER_STATE
197 #define YY_STRUCT_YY_BUFFER_STATE
198 struct yy_buffer_state
199  {
200 
201  std::istream* yy_input_file;
202 
203  char *yy_ch_buf; /* input buffer */
204  char *yy_buf_pos; /* current position in input buffer */
205 
206  /* Size of input buffer in bytes, not including room for EOB
207  * characters.
208  */
210 
211  /* Number of characters read into yy_ch_buf, not including EOB
212  * characters.
213  */
214  int yy_n_chars;
215 
216  /* Whether we "own" the buffer - i.e., we know we created it,
217  * and can realloc() it to grow it, and should free() it to
218  * delete it.
219  */
220  int yy_is_our_buffer;
221 
222  /* Whether this is an "interactive" input source; if so, and
223  * if we're using stdio for input, then we want to use getc()
224  * instead of fread(), to make sure we stop fetching input after
225  * each newline.
226  */
227  int yy_is_interactive;
228 
229  /* Whether we're considered to be at the beginning of a line.
230  * If so, '^' rules will be active on the next match, otherwise
231  * not.
232  */
233  int yy_at_bol;
234 
235  int yy_bs_lineno; /**< The line count. */
236  int yy_bs_column; /**< The column count. */
237 
238  /* Whether to try to fill the input buffer when we reach the
239  * end of it.
240  */
241  int yy_fill_buffer;
242 
243  int yy_buffer_status;
244 
245 #define YY_BUFFER_NEW 0
246 #define YY_BUFFER_NORMAL 1
247  /* When an EOF's been seen but there's still some text to process
248  * then we mark the buffer as YY_EOF_PENDING, to indicate that we
249  * shouldn't try reading from the input source any more. We might
250  * still have a bunch of tokens to match, though, because of
251  * possible backing-up.
252  *
253  * When we actually see the EOF, we change the status to "new"
254  * (via yyrestart()), so that the user can continue scanning by
255  * just pointing yyin at a new input file.
256  */
257 #define YY_BUFFER_EOF_PENDING 2
258 
259  };
260 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
261 
262 /* We provide macros for accessing buffer states in case in the
263  * future we want to put the buffer states in a more general
264  * "scanner state".
265  *
266  * Returns the top of the stack, or NULL.
267  */
268 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
269  ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
270  : NULL)
271 
272 /* Same as previous macro, but useful when we know that the buffer stack is not
273  * NULL or when we need an lvalue. For internal use only.
274  */
275 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
276 
277 void *Xdlalloc (yy_size_t );
278 void *Xdlrealloc (void *,yy_size_t );
279 void Xdlfree (void * );
280 
281 #define yy_new_buffer yy_create_buffer
282 
283 #define yy_set_interactive(is_interactive) \
284  { \
285  if ( ! YY_CURRENT_BUFFER ){ \
286  yyensure_buffer_stack (); \
287  YY_CURRENT_BUFFER_LVALUE = \
288  yy_create_buffer( yyin, YY_BUF_SIZE ); \
289  } \
290  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
291  }
292 
293 #define yy_set_bol(at_bol) \
294  { \
295  if ( ! YY_CURRENT_BUFFER ){\
296  yyensure_buffer_stack (); \
297  YY_CURRENT_BUFFER_LVALUE = \
298  yy_create_buffer( yyin, YY_BUF_SIZE ); \
299  } \
300  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
301  }
302 
303 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
304 
305 /* Begin user sect3 */
306 
307 typedef unsigned char YY_CHAR;
308 
309 #define yytext_ptr yytext
310 
311 #include <FlexLexer.h>
312 
313 /* Done after the current pattern has been matched and before the
314  * corresponding action - sets up yytext.
315  */
316 #define YY_DO_BEFORE_ACTION \
317  (yytext_ptr) = yy_bp; \
318  yyleng = (size_t) (yy_cp - yy_bp); \
319  (yy_hold_char) = *yy_cp; \
320  *yy_cp = '\0'; \
321  (yy_c_buf_p) = yy_cp;
322 
323 #define YY_NUM_RULES 45
324 #define YY_END_OF_BUFFER 46
325 /* This struct is not used in this scanner,
326  but its presence is necessary. */
327 struct yy_trans_info
328  {
331  };
333  { 0,
334  40, 40, 46, 44, 45, 43, 44, 45, 42, 45,
335  44, 45, 37, 44, 45, 36, 44, 45, 44, 45,
336  44, 45, 32, 44, 45, 32, 44, 45, 32, 44,
337  45, 32, 44, 45, 32, 44, 45, 32, 44, 45,
338  32, 44, 45, 32, 44, 45, 32, 44, 45, 32,
339  44, 45, 32, 44, 45, 32, 44, 45, 32, 44,
340  45, 33, 44, 45, 34, 44, 45, 16, 45, 13,
341  45, 14, 45, 45, 12, 45, 15, 45, 17, 45,
342  19, 45, 20, 45, 45, 18, 45, 17, 45, 40,
343  45, 39, 45, 45, 41, 45, 45, 43, 42, 36,
344 
345  36, 30, 4, 3, 1, 2, 32, 32, 32, 32,
346  32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
347  32, 32, 32, 32, 16, 13, 14, 17, 17, 19,
348  18, 20, 17, 17, 40, 39, 38, 36, 32, 32,
349  32, 32, 26, 32, 32, 32, 32, 32, 10, 32,
350  32, 29, 32, 32, 32, 32, 32, 32, 32, 25,
351  32, 36, 32, 32, 32, 32, 32, 9, 32, 32,
352  32, 32, 8, 32, 32, 32, 32, 31, 32, 36,
353  32, 11, 32, 32, 32, 27, 32, 32, 32, 32,
354  32, 32, 32, 36, 23, 32, 5, 32, 32, 32,
355 
356  6, 32, 28, 32, 21, 32, 32, 32, 36, 32,
357  32, 32, 32, 36, 32, 9, 32, 24, 32, 22,
358  32, 36, 7, 32, 36, 36, 36, 36, 36, 35,
359  36
360  } ;
361 
363  { 0,
364  1, 1, 1, 1, 1, 1, 1, 2, 3, 4,
365  6, 9, 11, 13, 16, 19, 21, 23, 26, 29,
366  32, 35, 38, 41, 44, 47, 50, 53, 56, 59,
367  62, 65, 68, 70, 72, 74, 75, 77, 79, 81,
368  83, 85, 86, 88, 90, 92, 94, 95, 97, 98,
369  99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
370  109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
371  119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
372  129, 130, 131, 131, 132, 133, 134, 135, 136, 137,
373  138, 139, 140, 141, 142, 143, 145, 146, 147, 148,
374 
375  149, 151, 152, 154, 155, 156, 157, 158, 159, 160,
376  162, 163, 164, 164, 165, 166, 167, 168, 170, 171,
377  172, 173, 175, 176, 177, 178, 180, 181, 182, 183,
378  184, 185, 186, 188, 189, 190, 191, 192, 193, 194,
379  195, 197, 199, 200, 201, 203, 205, 207, 208, 209,
380  210, 211, 212, 213, 214, 215, 216, 218, 220, 222,
381  223, 225, 226, 227, 228, 229, 230, 232, 232
382  } ;
383 
385  { 0,
386  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
387  1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
388  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
389  1, 2, 1, 5, 6, 1, 1, 1, 1, 1,
390  1, 1, 1, 1, 7, 8, 1, 9, 9, 9,
391  9, 9, 9, 9, 9, 9, 9, 10, 1, 1,
392  11, 12, 1, 1, 13, 13, 13, 13, 14, 13,
393  15, 16, 13, 13, 13, 13, 13, 13, 17, 13,
394  13, 18, 13, 19, 20, 13, 13, 13, 13, 13,
395  1, 21, 1, 1, 22, 1, 23, 24, 25, 26,
396 
397  27, 28, 29, 13, 30, 13, 13, 31, 32, 33,
398  34, 35, 13, 36, 37, 38, 39, 40, 41, 13,
399  13, 13, 42, 1, 43, 1, 1, 1, 1, 1,
400  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
402  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
403  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
404  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
405  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 
408  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
409  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
410  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
411  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
412  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
413  1, 1, 1, 1, 1
414  } ;
415 
417  { 0,
418  1, 2, 3, 4, 4, 1, 1, 5, 5, 6,
419  1, 1, 5, 5, 5, 5, 5, 5, 5, 5,
420  7, 5, 5, 5, 5, 5, 5, 5, 5, 5,
421  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
422  5, 1, 1
423  } ;
424 
426  { 0,
427  0, 0, 42, 46, 55, 59, 50, 62, 277, 278,
428  274, 278, 272, 278, 272, 60, 63, 0, 239, 244,
429  244, 237, 45, 236, 234, 240, 227, 54, 232, 64,
430  278, 278, 0, 262, 278, 260, 278, 278, 241, 89,
431  93, 97, 278, 101, 0, 278, 258, 278, 0, 258,
432  278, 0, 85, 250, 278, 278, 278, 278, 0, 225,
433  228, 219, 229, 228, 219, 42, 226, 213, 212, 214,
434  225, 68, 84, 102, 222, 220, 0, 243, 278, 223,
435  110, 121, 125, 278, 130, 222, 116, 0, 278, 278,
436  224, 215, 238, 209, 206, 0, 198, 206, 197, 195,
437 
438  0, 198, 0, 207, 193, 203, 195, 197, 218, 0,
439  209, 198, 111, 195, 189, 189, 188, 197, 188, 188,
440  190, 0, 180, 182, 191, 204, 192, 185, 278, 177,
441  183, 182, 0, 174, 179, 172, 178, 177, 177, 182,
442  0, 0, 161, 170, 0, 0, 0, 163, 162, 168,
443  145, 148, 148, 145, 150, 141, 0, 0, 0, 151,
444  0, 143, 119, 97, 71, 66, 0, 278, 137, 144,
445  151, 158, 63, 165, 172, 179, 186, 192
446  } ;
447 
449  { 0,
450  168, 1, 169, 169, 170, 170, 171, 171, 168, 168,
451  168, 168, 168, 168, 172, 168, 168, 173, 173, 173,
452  173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
453  168, 168, 174, 168, 168, 168, 168, 168, 175, 168,
454  168, 168, 168, 176, 177, 168, 168, 168, 178, 168,
455  168, 172, 172, 168, 168, 168, 168, 168, 173, 173,
456  173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
457  173, 173, 173, 173, 173, 173, 174, 168, 168, 175,
458  176, 168, 168, 168, 168, 175, 176, 177, 168, 168,
459  172, 173, 173, 173, 173, 173, 173, 173, 173, 173,
460 
461  173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
462  172, 173, 168, 173, 173, 173, 173, 173, 173, 173,
463  173, 173, 173, 173, 173, 173, 172, 173, 168, 173,
464  173, 173, 173, 173, 173, 173, 173, 173, 173, 172,
465  173, 173, 173, 173, 173, 173, 173, 173, 173, 172,
466  173, 173, 173, 173, 172, 173, 173, 173, 173, 172,
467  173, 172, 172, 172, 172, 172, 172, 0, 168, 168,
468  168, 168, 168, 168, 168, 168, 168, 168
469  } ;
470 
472  { 0,
473  10, 11, 12, 13, 14, 15, 16, 10, 10, 10,
474  17, 10, 18, 18, 18, 18, 18, 18, 18, 18,
475  10, 10, 18, 19, 20, 21, 22, 18, 23, 24,
476  18, 25, 26, 27, 28, 18, 18, 18, 29, 30,
477  18, 31, 32, 34, 35, 36, 37, 34, 35, 36,
478  37, 38, 46, 47, 48, 38, 40, 41, 42, 43,
479  40, 41, 42, 43, 46, 47, 48, 59, 54, 56,
480  49, 55, 74, 57, 58, 44, 98, 64, 99, 44,
481  65, 167, 49, 70, 71, 166, 53, 72, 75, 76,
482  82, 83, 83, 84, 83, 83, 83, 84, 83, 85,
483 
484  83, 84, 80, 105, 80, 80, 91, 107, 106, 109,
485  74, 80, 113, 80, 80, 129, 165, 80, 108, 80,
486  80, 87, 82, 83, 83, 84, 83, 83, 83, 84,
487  87, 83, 83, 83, 84, 164, 87, 33, 33, 33,
488  33, 33, 33, 33, 39, 39, 39, 39, 39, 39,
489  39, 45, 45, 45, 45, 45, 45, 45, 52, 52,
490  163, 52, 52, 52, 52, 77, 162, 161, 160, 77,
491  159, 77, 80, 158, 157, 156, 80, 80, 80, 86,
492  86, 155, 86, 86, 86, 86, 88, 88, 154, 153,
493  88, 88, 90, 90, 152, 90, 90, 90, 90, 151,
494 
495  150, 149, 148, 147, 146, 145, 144, 96, 143, 142,
496  141, 140, 126, 139, 138, 110, 137, 136, 135, 134,
497  133, 132, 131, 130, 128, 127, 126, 125, 124, 123,
498  122, 121, 120, 119, 118, 117, 116, 115, 114, 113,
499  112, 111, 81, 81, 78, 110, 110, 104, 103, 102,
500  101, 100, 97, 96, 95, 94, 93, 92, 54, 50,
501  89, 81, 79, 78, 73, 69, 68, 67, 66, 63,
502  62, 61, 60, 53, 51, 50, 168, 9, 168, 168,
503  168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
504  168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
505 
506  168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
507  168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
508  168
509  } ;
510 
512  { 0,
513  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
514  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
515  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
516  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
517  1, 1, 1, 3, 3, 3, 3, 4, 4, 4,
518  4, 3, 7, 7, 7, 4, 5, 5, 5, 5,
519  6, 6, 6, 6, 8, 8, 8, 173, 16, 17,
520  7, 16, 30, 17, 17, 5, 66, 23, 66, 6,
521  23, 166, 8, 28, 28, 165, 53, 28, 30, 30,
522  40, 40, 40, 40, 41, 41, 41, 41, 42, 42,
523 
524  42, 42, 44, 72, 44, 44, 53, 73, 72, 74,
525  74, 81, 113, 81, 81, 113, 164, 87, 73, 87,
526  87, 44, 82, 82, 82, 82, 83, 83, 83, 83,
527  81, 85, 85, 85, 85, 163, 87, 169, 169, 169,
528  169, 169, 169, 169, 170, 170, 170, 170, 170, 170,
529  170, 171, 171, 171, 171, 171, 171, 171, 172, 172,
530  162, 172, 172, 172, 172, 174, 160, 156, 155, 174,
531  154, 174, 175, 153, 152, 151, 175, 175, 175, 176,
532  176, 150, 176, 176, 176, 176, 177, 177, 149, 148,
533  177, 177, 178, 178, 144, 178, 178, 178, 178, 143,
534 
535  140, 139, 138, 137, 136, 135, 134, 132, 131, 130,
536  128, 127, 126, 125, 124, 123, 121, 120, 119, 118,
537  117, 116, 115, 114, 112, 111, 109, 108, 107, 106,
538  105, 104, 102, 100, 99, 98, 97, 95, 94, 93,
539  92, 91, 86, 80, 78, 76, 75, 71, 70, 69,
540  68, 67, 65, 64, 63, 62, 61, 60, 54, 50,
541  47, 39, 36, 34, 29, 27, 26, 25, 24, 22,
542  21, 20, 19, 15, 13, 11, 9, 168, 168, 168,
543  168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
544  168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
545 
546  168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
547  168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
548  168
549  } ;
550 
551 #define REJECT \
552 { \
553 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
554 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
555 ++(yy_lp); \
556 goto find_rule; \
557 }
558 
559 #define yymore() yymore_used_but_not_detected
560 #define YY_MORE_ADJ 0
561 #define YY_RESTORE_YY_MORE_OFFSET
562 #line 1 "scanner.ll"
563 /*
564 // Torc - Copyright 2011-2013 University of Southern California. All Rights Reserved.
565 // $HeadURL$
566 // $Id$
567 
568 // This program is free software: you can redistribute it and/or modify it under the terms of the
569 // GNU General Public License as published by the Free Software Foundation, either version 3 of the
570 // License, or (at your option) any later version.
571 //
572 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
573 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
574 // the GNU General Public License for more details.
575 //
576 // You should have received a copy of the GNU General Public License along with this program. If
577 // not, see <http://www.gnu.org/licenses/>.
578 */
579 #line 20 "scanner.ll"
580 
581 
582 // ------------------------------------------------------------------------------------------------
583 // -------------------------------------- C/C++ declarations --------------------------------------
584 // ------------------------------------------------------------------------------------------------
585 
586 
587 // disable GCC warnings that Bison gives us little control over
588 //#pragma GCC diagnostic ignored "-Wshorten-64-to-32"
589 //#pragma GCC diagnostic ignored "-Werror"
590 //#pragma GCC diagnostic ignored "-Wall"
591 
592 #include <string>
594 
595 namespace torc { namespace physical {} }
596 using namespace torc::physical;
597 
598 /// \brief Import the parser's token types into a local typedef
601 
602 /// \details By default, yylex() returns int, but we want token_type instead. Unfortunately,
603 /// yyterminate returns 0 by default, which is not of token_type.
604 #define yyterminate() return token::END
605 
606 /// \brief Disable the inclusion of unistd.h, which is not available under Visual C++ on Win32.
607 /// \details The C++ scanner uses STL streams instead.
608 #define YY_NO_UNISTD_H
609 
610 //#define DEBUG(a) printf a
611 #define DEBUG(a)
612 #define DEBUG1(a) printf a
613 
614 
615 /* ---------------------------------------------------------------------------------------------- */
616 /* -------------------------------- Flex declarations and options ------------------------------- */
617 /* ---------------------------------------------------------------------------------------------- */
618 /** \brief Enable C++ generation for the scanner class. **/
619 /** \brief Change the name of the scanner class to "XdlFlexLexer". **/
620 /** \brief The manual says batch is "somewhat more optimized". **/
621 /** \brief Enable debug output from the scanner. **/
622 /*%option debug*/
623 /** \brief We anticipate no included XDL files. **/
624 /** \brief Enable the use of start condition stacks. **/
625 /** \brief Track location information. Each time yylex is invoked, begin is moved to end. **/
626 #line 83 "scanner.ll"
627 #define YY_USER_ACTION yylloc->columns(yyleng);
628 /** \brief Special lexing state for config strings. **/
629 
630 /** \brief Special second lexing state for config strings. **/
631 
632 /** \brief Special lexing state for double-quoted strings. **/
633 
634 #line 635 "XdlScanner.cpp"
635 
636 #define INITIAL 0
637 #define CONFIGSTRING 1
638 #define CONFIGSTRING2 2
639 #define DOUBLEQUOTE 3
640 
641 #ifndef YY_NO_UNISTD_H
642 /* Special case for "unistd.h", since it is non-ANSI. We include it way
643  * down here because we want the user's section 1 to have been scanned first.
644  * The user has a chance to override it with an option.
645  */
646 #include <unistd.h>
647 #endif
648 
649 #ifndef YY_EXTRA_TYPE
650 #define YY_EXTRA_TYPE void *
651 #endif
652 
653 #ifndef yytext_ptr
654 static void yy_flex_strncpy (char *,yyconst char *,int );
655 #endif
656 
657 #ifdef YY_NEED_STRLEN
658 static int yy_flex_strlen (yyconst char * );
659 #endif
660 
661 #ifndef YY_NO_INPUT
662 
663 #endif
664 
665 /* Amount of stuff to slurp up with each read. */
666 #ifndef YY_READ_BUF_SIZE
667 #define YY_READ_BUF_SIZE 8192
668 #endif
669 
670 /* Copy whatever the last rule matched to the standard output. */
671 #ifndef ECHO
672 #define ECHO LexerOutput( yytext, yyleng )
673 #endif
674 
675 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
676  * is returned in "result".
677  */
678 #ifndef YY_INPUT
679 #define YY_INPUT(buf,result,max_size) \
680 \
681  if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
682  YY_FATAL_ERROR( "input in flex scanner failed" );
683 
684 #endif
685 
686 /* No semi-colon after return; correct usage is to write "yyterminate();" -
687  * we don't want an extra ';' after the "return" because that will cause
688  * some compilers to complain about unreachable statements.
689  */
690 #ifndef yyterminate
691 #define yyterminate() return YY_NULL
692 #endif
693 
694 /* Number of entries by which start-condition stack grows. */
695 #ifndef YY_START_STACK_INCR
696 #define YY_START_STACK_INCR 25
697 #endif
698 
699 /* Report a fatal error. */
700 #ifndef YY_FATAL_ERROR
701 #define YY_FATAL_ERROR(msg) LexerError( msg )
702 #endif
703 
704 /* end tables serialization structures and prototypes */
705 
706 /* Default declaration of generated scanner - a define so the user can
707  * easily add parameters.
708  */
709 #ifndef YY_DECL
710 #define YY_DECL_IS_OURS 1
711 #define YY_DECL int yyFlexLexer::yylex()
712 #endif /* !YY_DECL */
713 
714 /* Code executed at the beginning of each rule, after yytext and yyleng
715  * have been set up.
716  */
717 #ifndef YY_USER_ACTION
718 #define YY_USER_ACTION
719 #endif
720 
721 /* Code executed at the end of each rule. */
722 #ifndef YY_BREAK
723 #define YY_BREAK break;
724 #endif
725 
726 #define YY_RULE_SETUP \
727  YY_USER_ACTION
728 
729 /** The main scanner function which does all the work.
730  */
731 YY_DECL
732 {
734  register char *yy_cp, *yy_bp;
735  register int yy_act;
736 
737 #line 94 "scanner.ll"
738 
739 
740 
741  /* --------------------------------------------------------------------------------------------- */
742  /* --------------------------------- scanner regular expressions ------------------------------- */
743  /* --------------------------------------------------------------------------------------------- */
744 
745 
746  /** \brief Code belonging at the beginning of yylex(). **/
747 
748  yylloc->step();
749 
750 
751 
752  /* --------------------------------------------------------------------------------------------- */
753  /* ------------------------------------ Begin XDL lexer rules ---------------------------------- */
754  /* --------------------------------------------------------------------------------------------- */
755 
756 
757  // Symbol Description
758  // ====== ==========================================
759  // == Bidirectional, unbuffered
760  // => Bidirectional, buffered in one direction
761  // =- Bidirectional, buffered in both directions
762  // -> Directional, buffered
763 #line 764 "XdlScanner.cpp"
764 
765  if ( !(yy_init) )
766  {
767  (yy_init) = 1;
768 
769 #ifdef YY_USER_INIT
770  YY_USER_INIT;
771 #endif
772 
773  /* Create the reject buffer large enough to save one state per allowed character. */
774  if ( ! (yy_state_buf) )
775  (yy_state_buf) = (yy_state_type *)Xdlalloc(YY_STATE_BUF_SIZE );
776  if ( ! (yy_state_buf) )
777  YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
778 
779  if ( ! (yy_start) )
780  (yy_start) = 1; /* first start state */
781 
782  if ( ! yyin )
783  yyin = & std::cin;
784 
785  if ( ! yyout )
786  yyout = & std::cout;
787 
788  if ( ! YY_CURRENT_BUFFER ) {
789  yyensure_buffer_stack ();
791  yy_create_buffer( yyin, YY_BUF_SIZE );
792  }
793 
794  yy_load_buffer_state( );
795  }
796 
797  while ( 1 ) /* loops until end-of-file is reached */
798  {
799  yy_cp = (yy_c_buf_p);
800 
801  /* Support of yytext. */
802  *yy_cp = (yy_hold_char);
803 
804  /* yy_bp points to the position in yy_ch_buf of the start of
805  * the current run.
806  */
807  yy_bp = yy_cp;
808 
809  yy_current_state = (yy_start);
810 
811  (yy_state_ptr) = (yy_state_buf);
812  *(yy_state_ptr)++ = yy_current_state;
813 
814 yy_match:
815  do
816  {
817  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
818  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
819  {
820  yy_current_state = (int) yy_def[yy_current_state];
821  if ( yy_current_state >= 169 )
822  yy_c = yy_meta[(unsigned int) yy_c];
823  }
824  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
825  *(yy_state_ptr)++ = yy_current_state;
826  ++yy_cp;
827  }
828  while ( yy_current_state != 168 );
829 
830 yy_find_action:
831  yy_current_state = *--(yy_state_ptr);
832  (yy_lp) = yy_accept[yy_current_state];
833 find_rule: /* we branch to this label when backing up */
834  for ( ; ; ) /* until we find what rule we matched */
835  {
836  if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
837  {
838  yy_act = yy_acclist[(yy_lp)];
839  {
840  (yy_full_match) = yy_cp;
841  break;
842  }
843  }
844  --yy_cp;
845  yy_current_state = *--(yy_state_ptr);
846  (yy_lp) = yy_accept[yy_current_state];
847  }
848 
850 
851 do_action: /* This label is used only to access EOF actions. */
852 
853  switch ( yy_act )
854  { /* beginning of action switch */
855 case 1:
857 #line 119 "scanner.ll"
858 { return token::BIDIRUNBUF; } // == Bidirectional, unbuffered
859  YY_BREAK
860 case 2:
862 #line 120 "scanner.ll"
863 { return token::BIDIRUNIBUF; } // => Bidirectional, buf in one direction
864  YY_BREAK
865 case 3:
867 #line 121 "scanner.ll"
868 { return token::BIDIRBIBUF; } // =- Bidirectional, buf in both directions
869  YY_BREAK
870 case 4:
872 #line 122 "scanner.ll"
873 { return token::UNIDIRBUF; } // -> Directional, buffered
874  YY_BREAK
875 case 5:
877 #line 124 "scanner.ll"
878 { return token::DESIGN; }
879  YY_BREAK
880 case 6:
882 #line 125 "scanner.ll"
883 { return token::MODULE; }
884  YY_BREAK
885 case 7:
887 #line 126 "scanner.ll"
888 { return token::ENDMODULE; }
889  YY_BREAK
890 case 8:
892 #line 127 "scanner.ll"
893 { return token::PORT; }
894  YY_BREAK
895 case 9:
897 #line 128 "scanner.ll"
898 { return token::INST; }
899  YY_BREAK
900 case 10:
902 #line 129 "scanner.ll"
903 { return token::NET; }
904  YY_BREAK
905 case 11:
907 #line 131 "scanner.ll"
908 {
909 ; BEGIN CONFIGSTRING; quote = colon = 0; yyless(yyleng-1);
910 ; return token::CFG;
911 ; }
912  YY_BREAK
913 case 12:
915 #line 135 "scanner.ll"
916 {
917 ; quote++; if(quote == 2) BEGIN INITIAL; /* must have been an empty config*/
918 ; return static_cast<token_type>('"');
919 ; }
920  YY_BREAK
921 case 13:
923 #line 139 "scanner.ll"
924 { /* discard whitespace */ }
925  YY_BREAK
926 case 14:
927 /* rule 14 can match eol */
929 #line 140 "scanner.ll"
930 { yylloc->lines(); /* discard whitespace */ }
931  YY_BREAK
932 case 15:
934 #line 141 "scanner.ll"
935 {
936 ; colon++; if(colon == 2) BEGIN CONFIGSTRING2;
937 ; return static_cast<token_type>(':');
938 ; }
939  YY_BREAK
940 case 16:
942 #line 145 "scanner.ll"
943 {
944 ; *yylval = yytext; return colon == 0 ? token::CFGSETTING : token::CFGNAME;
945 ; }
946  YY_BREAK
947 case 17:
949 #line 148 "scanner.ll"
950 { *yylval = yytext; return token::CFGVALUE; }
951  YY_BREAK
952 case 18:
953 /* rule 18 can match eol */
955 #line 149 "scanner.ll"
956 {
957 ; /* account for newlines embedded within trailing whitespace */
958 ; for(char* ptr = yytext; *ptr != 0; ptr++) {
959 ; if(*ptr == 0) break;
960 ; if(false && *ptr == '\n') yylloc->lines();
961 ; }
962 ; colon = 0; BEGIN INITIAL; return static_cast<token_type>('"');
963 ; }
964  YY_BREAK
965 case 19:
967 #line 157 "scanner.ll"
968 { colon = 0; BEGIN CONFIGSTRING; }
969  YY_BREAK
970 case 20:
971 /* rule 20 can match eol */
973 #line 158 "scanner.ll"
974 { yylloc->lines(); /* discard whitespace */ }
975  YY_BREAK
976 case 21:
978 #line 160 "scanner.ll"
979 { return token::PLACED; }
980  YY_BREAK
981 case 22:
983 #line 161 "scanner.ll"
984 { return token::UNPLACED; }
985  YY_BREAK
986 case 23:
988 #line 162 "scanner.ll"
989 { return token::BONDED; }
990  YY_BREAK
991 case 24:
993 #line 163 "scanner.ll"
994 { return token::UNBONDED; }
995  YY_BREAK
996 case 25:
998 #line 164 "scanner.ll"
999 { return token::POWER; }
1000  YY_BREAK
1001 case 26:
1003 #line 165 "scanner.ll"
1004 { return token::GROUND; }
1005  YY_BREAK
1006 case 27:
1008 #line 166 "scanner.ll"
1009 { return token::INPIN; }
1010  YY_BREAK
1011 case 28:
1013 #line 167 "scanner.ll"
1014 { return token::OUTPIN; }
1015  YY_BREAK
1016 case 29:
1018 #line 168 "scanner.ll"
1019 { return token::PIP; }
1020  YY_BREAK
1021 case 30:
1023 #line 169 "scanner.ll"
1024 { *yylval = yytext; return token::SPEEDGRADE; }
1025  YY_BREAK
1026 case 31:
1028 #line 170 "scanner.ll"
1029 { *yylval = yytext; return token::XDLVERSION;
1030  /** \todo Need to avoid obscuring IDENTIFIER. */ }
1031  YY_BREAK
1032 case 32:
1034 #line 172 "scanner.ll"
1035 { *yylval = yytext; return token::IDENTIFIER; }
1036  YY_BREAK
1037 case 33:
1039 #line 173 "scanner.ll"
1040 { return token::OBRACE; }
1041  YY_BREAK
1042 case 34:
1044 #line 174 "scanner.ll"
1045 { return token::EBRACE; }
1046  YY_BREAK
1047 case 35:
1049 #line 176 "scanner.ll"
1050 {
1051 ; DEBUG(("ROUTETHROUGH "));
1052 ; // be sure to strip the leading hash and spaces from the token
1053 ; char* ptr = yytext + 1;
1054 ; char* end = ptr + yyleng;
1055 ; while(*ptr == ' ' && ptr < end) ptr++;
1056 ; *yylval = ptr;
1057 ; return token::ROUTETHROUGH;
1058 ; }
1059  YY_BREAK
1060 case 36:
1062 #line 185 "scanner.ll"
1063 { // be careful not to let _ROUTETHROUGH expressions pass for comments
1064 ; char* ptr = yytext + 1;
1065 ; char* end = ptr + yyleng;
1066 ; while((*ptr == ' ' || *ptr == '\t') && ptr < end) ptr++;
1067 ; if((end - ptr > 13) && strncmp(ptr, "_ROUTETHROUGH", 13) == 0) REJECT;
1068 ; // okay, this really is a comment
1069 ; DEBUG(("COMMENT "));
1070 ; }
1071  YY_BREAK
1072 case 37:
1074 #line 194 "scanner.ll"
1075 {
1076 ; BEGIN DOUBLEQUOTE; in_double_quote = true; last_string = "";
1077 ; /* enter exclusive quoted string state */
1078 ; return static_cast<token_type>(yytext[0]);
1079 ; }
1080  YY_BREAK
1081 case 38:
1083 #line 199 "scanner.ll"
1084 {
1085 ; last_string += yytext;
1086 ; return token::STRING; /* append escaped characters to the input */
1087 ; }
1088  YY_BREAK
1089 case 39:
1090 /* rule 39 can match eol */
1092 #line 203 "scanner.ll"
1093 { yylloc->lines(); /* ignore unescaped line breaks */ }
1094  YY_BREAK
1095 case 40:
1097 #line 204 "scanner.ll"
1098 {
1099 ; last_string += yytext;
1100 ; return token::STRING; /* append characters other than \, ", \n, \r */
1101 ; }
1102  YY_BREAK
1103 case 41:
1105 #line 208 "scanner.ll"
1106 { if(!in_double_quote) {
1107 ; BEGIN INITIAL; /* exit the exclusive quoted string state */
1108 ; DEBUG(("\" "));
1109 ; return static_cast<token_type>('"');
1110 ; }
1111 ; in_double_quote = false; /* we're no longer in double-quote mode */
1112 ; yylloc->end.columns(-1);
1113 ; yyless(yyleng-1); /* push back the trailing double quote */
1114 ; //DEBUG(("[%s: length %d]\n", last_string.c_str(), last_string.length()));
1115 ; return token::STRING; /* and return the STRING token */
1116 ; }
1117  YY_BREAK
1118 case 42:
1119 /* rule 42 can match eol */
1121 #line 220 "scanner.ll"
1122 { yylloc->lines(); }
1123  YY_BREAK
1124 case 43:
1126 #line 221 "scanner.ll"
1127 { }
1128  YY_BREAK
1129 case 44:
1131 #line 222 "scanner.ll"
1132 { return static_cast<token_type>(*yytext); }
1133  YY_BREAK
1134 /* --------------------------------------------------------------------------------------------- */
1135 /* ------------------------------------- End XDL lexer rules ----------------------------------- */
1136 /* --------------------------------------------------------------------------------------------- */
1137 case 45:
1139 #line 231 "scanner.ll"
1140 ECHO;
1141  YY_BREAK
1142 #line 1143 "XdlScanner.cpp"
1143  case YY_STATE_EOF(INITIAL):
1144  case YY_STATE_EOF(CONFIGSTRING):
1146  case YY_STATE_EOF(DOUBLEQUOTE):
1147  yyterminate();
1148 
1149  case YY_END_OF_BUFFER:
1150  {
1151  /* Amount of text matched not including the EOB char. */
1152  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1153 
1154  /* Undo the effects of YY_DO_BEFORE_ACTION. */
1155  *yy_cp = (yy_hold_char);
1157 
1158  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1159  {
1160  /* We're scanning a new file or input source. It's
1161  * possible that this happened because the user
1162  * just pointed yyin at a new source and called
1163  * yylex(). If so, then we have to assure
1164  * consistency between YY_CURRENT_BUFFER and our
1165  * globals. Here is the right place to do so, because
1166  * this is the first action (other than possibly a
1167  * back-up) that will match for the new input source.
1168  */
1169  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1170  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1171  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1172  }
1173 
1174  /* Note that here we test for yy_c_buf_p "<=" to the position
1175  * of the first EOB in the buffer, since yy_c_buf_p will
1176  * already have been incremented past the NUL character
1177  * (since all states make transitions on EOB to the
1178  * end-of-buffer state). Contrast this with the test
1179  * in input().
1180  */
1181  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1182  { /* This was really a NUL. */
1183  yy_state_type yy_next_state;
1184 
1185  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1186 
1187  yy_current_state = yy_get_previous_state( );
1188 
1189  /* Okay, we're now positioned to make the NUL
1190  * transition. We couldn't have
1191  * yy_get_previous_state() go ahead and do it
1192  * for us because it doesn't know how to deal
1193  * with the possibility of jamming (and we don't
1194  * want to build jamming into it because then it
1195  * will run more slowly).
1196  */
1197 
1198  yy_next_state = yy_try_NUL_trans( yy_current_state );
1199 
1200  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1201 
1202  if ( yy_next_state )
1203  {
1204  /* Consume the NUL. */
1205  yy_cp = ++(yy_c_buf_p);
1206  yy_current_state = yy_next_state;
1207  goto yy_match;
1208  }
1209 
1210  else
1211  {
1212  yy_cp = (yy_c_buf_p);
1213  goto yy_find_action;
1214  }
1215  }
1216 
1217  else switch ( yy_get_next_buffer( ) )
1218  {
1219  case EOB_ACT_END_OF_FILE:
1220  {
1221  (yy_did_buffer_switch_on_eof) = 0;
1222 
1223  if ( yywrap( ) )
1224  {
1225  /* Note: because we've taken care in
1226  * yy_get_next_buffer() to have set up
1227  * yytext, we can now set up
1228  * yy_c_buf_p so that if some total
1229  * hoser (like flex itself) wants to
1230  * call the scanner after we return the
1231  * YY_NULL, it'll still work - another
1232  * YY_NULL will get returned.
1233  */
1234  (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1235 
1236  yy_act = YY_STATE_EOF(YY_START);
1237  goto do_action;
1238  }
1239 
1240  else
1241  {
1242  if ( ! (yy_did_buffer_switch_on_eof) )
1243  YY_NEW_FILE;
1244  }
1245  break;
1246  }
1247 
1248  case EOB_ACT_CONTINUE_SCAN:
1249  (yy_c_buf_p) =
1250  (yytext_ptr) + yy_amount_of_matched_text;
1251 
1252  yy_current_state = yy_get_previous_state( );
1253 
1254  yy_cp = (yy_c_buf_p);
1255  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1256  goto yy_match;
1257 
1258  case EOB_ACT_LAST_MATCH:
1259  (yy_c_buf_p) =
1260  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1261 
1262  yy_current_state = yy_get_previous_state( );
1263 
1264  yy_cp = (yy_c_buf_p);
1265  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1266  goto yy_find_action;
1267  }
1268  break;
1269  }
1270 
1271  default:
1273  "fatal flex scanner internal error--no action found" );
1274  } /* end of action switch */
1275  } /* end of scanning one token */
1276 } /* end of yylex */
1277 
1278 /* The contents of this function are C++ specific, so the () macro is not used.
1279  */
1280 yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
1281 {
1282  yyin = arg_yyin;
1283  yyout = arg_yyout;
1284  yy_c_buf_p = 0;
1285  yy_init = 0;
1286  yy_start = 0;
1287  yy_flex_debug = 0;
1288  yylineno = 1; // this will only get updated if %option yylineno
1289 
1290  yy_did_buffer_switch_on_eof = 0;
1291 
1292  yy_looking_for_trail_begin = 0;
1293  yy_more_flag = 0;
1294  yy_more_len = 0;
1295  yy_more_offset = yy_prev_more_offset = 0;
1296 
1297  yy_start_stack_ptr = yy_start_stack_depth = 0;
1298  yy_start_stack = NULL;
1299 
1300  yy_buffer_stack = 0;
1301  yy_buffer_stack_top = 0;
1302  yy_buffer_stack_max = 0;
1303 
1304  yy_state_buf = new yy_state_type[YY_STATE_BUF_SIZE];
1305 
1306 }
1307 
1308 /* The contents of this function are C++ specific, so the () macro is not used.
1309  */
1311 {
1312  delete [] yy_state_buf;
1313  Xdlfree(yy_start_stack );
1314  yy_delete_buffer( YY_CURRENT_BUFFER );
1315  Xdlfree(yy_buffer_stack );
1316 }
1317 
1318 /* The contents of this function are C++ specific, so the () macro is not used.
1319  */
1320 void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
1321 {
1322  if ( new_in )
1323  {
1324  yy_delete_buffer( YY_CURRENT_BUFFER );
1325  yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );
1326  }
1327 
1328  if ( new_out )
1329  yyout = new_out;
1330 }
1331 
1332 #ifdef YY_INTERACTIVE
1333 int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
1334 #else
1335 int yyFlexLexer::LexerInput( char* buf, int max_size )
1336 #endif
1337 {
1338  if ( yyin->eof() || yyin->fail() )
1339  return 0;
1340 
1341 #ifdef YY_INTERACTIVE
1342  yyin->get( buf[0] );
1343 
1344  if ( yyin->eof() )
1345  return 0;
1346 
1347  if ( yyin->bad() )
1348  return -1;
1349 
1350  return 1;
1351 
1352 #else
1353  (void) yyin->read( buf, max_size );
1354 
1355  if ( yyin->bad() )
1356  return -1;
1357  else
1358  return yyin->gcount();
1359 #endif
1360 }
1361 
1362 void yyFlexLexer::LexerOutput( const char* buf, int size )
1363 {
1364  (void) yyout->write( buf, size );
1365 }
1366 
1367 /* yy_get_next_buffer - try to read in a new buffer
1368  *
1369  * Returns a code representing an action:
1370  * EOB_ACT_LAST_MATCH -
1371  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1372  * EOB_ACT_END_OF_FILE - end of file
1373  */
1375 {
1376  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1377  register char *source = (yytext_ptr);
1378  register int number_to_move, i;
1379  int ret_val;
1380 
1381  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1383  "fatal flex scanner internal error--end of buffer missed" );
1384 
1385  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1386  { /* Don't try to fill the buffer, so this is an EOF. */
1387  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1388  {
1389  /* We matched a single character, the EOB, so
1390  * treat this as a final EOF.
1391  */
1392  return EOB_ACT_END_OF_FILE;
1393  }
1394 
1395  else
1396  {
1397  /* We matched some text prior to the EOB, first
1398  * process it.
1399  */
1400  return EOB_ACT_LAST_MATCH;
1401  }
1402  }
1403 
1404  /* Try to read more data. */
1405 
1406  /* First move last chars to start of buffer. */
1407  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1408 
1409  for ( i = 0; i < number_to_move; ++i )
1410  *(dest++) = *(source++);
1411 
1412  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1413  /* don't do the read, it's not guaranteed to return an EOF,
1414  * just force an EOF
1415  */
1416  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1417 
1418  else
1419  {
1420  int num_to_read =
1421  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1422 
1423  while ( num_to_read <= 0 )
1424  { /* Not enough room in the buffer - grow it. */
1425 
1427 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1428 
1429  }
1430 
1431  if ( num_to_read > YY_READ_BUF_SIZE )
1432  num_to_read = YY_READ_BUF_SIZE;
1433 
1434  /* Read in more data. */
1435  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1436  (yy_n_chars), (size_t) num_to_read );
1437 
1438  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1439  }
1440 
1441  if ( (yy_n_chars) == 0 )
1442  {
1443  if ( number_to_move == YY_MORE_ADJ )
1444  {
1445  ret_val = EOB_ACT_END_OF_FILE;
1446  yyrestart( yyin );
1447  }
1448 
1449  else
1450  {
1451  ret_val = EOB_ACT_LAST_MATCH;
1452  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1454  }
1455  }
1456 
1457  else
1458  ret_val = EOB_ACT_CONTINUE_SCAN;
1459 
1460  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1461  /* Extend the array by 50%, plus the number we really need. */
1462  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1463  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) Xdlrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1464  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1465  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1466  }
1467 
1468  (yy_n_chars) += number_to_move;
1469  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1470  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1471 
1472  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1473 
1474  return ret_val;
1475 }
1476 
1477 /* yy_get_previous_state - get the state just before the EOB char was reached */
1478 
1480 {
1482  register char *yy_cp;
1483 
1484  yy_current_state = (yy_start);
1485 
1486  (yy_state_ptr) = (yy_state_buf);
1487  *(yy_state_ptr)++ = yy_current_state;
1488 
1489  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1490  {
1491  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1492  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1493  {
1494  yy_current_state = (int) yy_def[yy_current_state];
1495  if ( yy_current_state >= 169 )
1496  yy_c = yy_meta[(unsigned int) yy_c];
1497  }
1498  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1499  *(yy_state_ptr)++ = yy_current_state;
1500  }
1501 
1502  return yy_current_state;
1503 }
1504 
1505 /* yy_try_NUL_trans - try to make a transition on the NUL character
1506  *
1507  * synopsis
1508  * next_state = yy_try_NUL_trans( current_state );
1509  */
1511 {
1512  register int yy_is_jam;
1513 
1514  register YY_CHAR yy_c = 1;
1515  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1516  {
1517  yy_current_state = (int) yy_def[yy_current_state];
1518  if ( yy_current_state >= 169 )
1519  yy_c = yy_meta[(unsigned int) yy_c];
1520  }
1521  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1522  yy_is_jam = (yy_current_state == 168);
1523  if ( ! yy_is_jam )
1524  *(yy_state_ptr)++ = yy_current_state;
1525 
1526  return yy_is_jam ? 0 : yy_current_state;
1527 }
1528 
1529  void yyFlexLexer::yyunput( int c, register char* yy_bp)
1530 {
1531  register char *yy_cp;
1532 
1533  yy_cp = (yy_c_buf_p);
1534 
1535  /* undo effects of setting up yytext */
1536  *yy_cp = (yy_hold_char);
1537 
1538  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1539  { /* need to shift things up to make room */
1540  /* +2 for EOB chars. */
1541  register int number_to_move = (yy_n_chars) + 2;
1542  register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1543  YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1544  register char *source =
1545  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1546 
1547  while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1548  *--dest = *--source;
1549 
1550  yy_cp += (int) (dest - source);
1551  yy_bp += (int) (dest - source);
1552  YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1553  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1554 
1555  if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1556  YY_FATAL_ERROR( "flex scanner push-back overflow" );
1557  }
1558 
1559  *--yy_cp = (char) c;
1560 
1561  (yytext_ptr) = yy_bp;
1562  (yy_hold_char) = *yy_cp;
1563  (yy_c_buf_p) = yy_cp;
1564 }
1565 
1566  int yyFlexLexer::yyinput()
1567 {
1568  int c;
1569 
1570  *(yy_c_buf_p) = (yy_hold_char);
1571 
1572  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1573  {
1574  /* yy_c_buf_p now points to the character we want to return.
1575  * If this occurs *before* the EOB characters, then it's a
1576  * valid NUL; if not, then we've hit the end of the buffer.
1577  */
1578  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1579  /* This was really a NUL. */
1580  *(yy_c_buf_p) = '\0';
1581 
1582  else
1583  { /* need more input */
1584  int offset = (yy_c_buf_p) - (yytext_ptr);
1585  ++(yy_c_buf_p);
1586 
1587  switch ( yy_get_next_buffer( ) )
1588  {
1589  case EOB_ACT_LAST_MATCH:
1590  /* This happens because yy_g_n_b()
1591  * sees that we've accumulated a
1592  * token and flags that we need to
1593  * try matching the token before
1594  * proceeding. But for input(),
1595  * there's no matching to consider.
1596  * So convert the EOB_ACT_LAST_MATCH
1597  * to EOB_ACT_END_OF_FILE.
1598  */
1599 
1600  /* Reset buffer status. */
1601  yyrestart( yyin );
1602 
1603  /*FALLTHROUGH*/
1604 
1605  case EOB_ACT_END_OF_FILE:
1606  {
1607  if ( yywrap( ) )
1608  return EOF;
1609 
1610  if ( ! (yy_did_buffer_switch_on_eof) )
1611  YY_NEW_FILE;
1612 #ifdef __cplusplus
1613  return yyinput();
1614 #else
1615  return input();
1616 #endif
1617  }
1618 
1619  case EOB_ACT_CONTINUE_SCAN:
1620  (yy_c_buf_p) = (yytext_ptr) + offset;
1621  break;
1622  }
1623  }
1624  }
1625 
1626  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1627  *(yy_c_buf_p) = '\0'; /* preserve yytext */
1628  (yy_hold_char) = *++(yy_c_buf_p);
1629 
1630  return c;
1631 }
1632 
1633 /** Immediately switch to a different input stream.
1634  * @param input_file A readable stream.
1635  *
1636  * @note This function does not reset the start condition to @c INITIAL .
1637  */
1638  void yyFlexLexer::yyrestart( std::istream* input_file )
1639 {
1640 
1641  if ( ! YY_CURRENT_BUFFER ){
1642  yyensure_buffer_stack ();
1644  yy_create_buffer( yyin, YY_BUF_SIZE );
1645  }
1646 
1647  yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1648  yy_load_buffer_state( );
1649 }
1650 
1651 /** Switch to a different input buffer.
1652  * @param new_buffer The new input buffer.
1653  *
1654  */
1655  void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1656 {
1657 
1658  /* TODO. We should be able to replace this entire function body
1659  * with
1660  * yypop_buffer_state();
1661  * yypush_buffer_state(new_buffer);
1662  */
1663  yyensure_buffer_stack ();
1664  if ( YY_CURRENT_BUFFER == new_buffer )
1665  return;
1666 
1667  if ( YY_CURRENT_BUFFER )
1668  {
1669  /* Flush out information for old buffer. */
1670  *(yy_c_buf_p) = (yy_hold_char);
1671  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1672  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1673  }
1674 
1675  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1676  yy_load_buffer_state( );
1677 
1678  /* We don't actually know whether we did this switch during
1679  * EOF (yywrap()) processing, but the only time this flag
1680  * is looked at is after yywrap() is called, so it's safe
1681  * to go ahead and always set it.
1682  */
1683  (yy_did_buffer_switch_on_eof) = 1;
1684 }
1685 
1687 {
1688  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1689  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1690  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1691  (yy_hold_char) = *(yy_c_buf_p);
1692 }
1693 
1694 /** Allocate and initialize an input buffer state.
1695  * @param file A readable stream.
1696  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1697  *
1698  * @return the allocated buffer state.
1699  */
1700  YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
1701 {
1702  YY_BUFFER_STATE b;
1703 
1704  b = (YY_BUFFER_STATE) Xdlalloc(sizeof( struct yy_buffer_state ) );
1705  if ( ! b )
1706  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1707 
1708  b->yy_buf_size = size;
1709 
1710  /* yy_ch_buf has to be 2 characters longer than the size given because
1711  * we need to put in 2 end-of-buffer characters.
1712  */
1713  b->yy_ch_buf = (char *) Xdlalloc(b->yy_buf_size + 2 );
1714  if ( ! b->yy_ch_buf )
1715  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1716 
1717  b->yy_is_our_buffer = 1;
1718 
1719  yy_init_buffer( b, file );
1720 
1721  return b;
1722 }
1723 
1724 /** Destroy the buffer.
1725  * @param b a buffer created with yy_create_buffer()
1726  *
1727  */
1728  void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
1729 {
1730 
1731  if ( ! b )
1732  return;
1733 
1734  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1736 
1737  if ( b->yy_is_our_buffer )
1738  Xdlfree((void *) b->yy_ch_buf );
1739 
1740  Xdlfree((void *) b );
1741 }
1742 
1743 extern "C" int isatty (int );
1744 
1745 /* Initializes or reinitializes a buffer.
1746  * This function is sometimes called more than once on the same buffer,
1747  * such as during a yyrestart() or at EOF.
1748  */
1749  void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )
1750 
1751 {
1752  int oerrno = errno;
1753 
1754  yy_flush_buffer( b );
1755 
1756  b->yy_input_file = file;
1757  b->yy_fill_buffer = 1;
1758 
1759  /* If b is the current buffer, then yy_init_buffer was _probably_
1760  * called from yyrestart() or through yy_get_next_buffer.
1761  * In that case, we don't want to reset the lineno or column.
1762  */
1763  if (b != YY_CURRENT_BUFFER){
1764  b->yy_bs_lineno = 1;
1765  b->yy_bs_column = 0;
1766  }
1767 
1768  b->yy_is_interactive = 0;
1769  errno = oerrno;
1770 }
1771 
1772 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1773  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1774  *
1775  */
1776  void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
1777 {
1778  if ( ! b )
1779  return;
1780 
1781  b->yy_n_chars = 0;
1782 
1783  /* We always need two end-of-buffer characters. The first causes
1784  * a transition to the end-of-buffer state. The second causes
1785  * a jam in that state.
1786  */
1789 
1790  b->yy_buf_pos = &b->yy_ch_buf[0];
1791 
1792  b->yy_at_bol = 1;
1794 
1795  if ( b == YY_CURRENT_BUFFER )
1796  yy_load_buffer_state( );
1797 }
1798 
1799 /** Pushes the new state onto the stack. The new state becomes
1800  * the current state. This function will allocate the stack
1801  * if necessary.
1802  * @param new_buffer The new state.
1803  *
1804  */
1805 void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer)
1806 {
1807  if (new_buffer == NULL)
1808  return;
1809 
1810  yyensure_buffer_stack();
1811 
1812  /* This block is copied from yy_switch_to_buffer. */
1813  if ( YY_CURRENT_BUFFER )
1814  {
1815  /* Flush out information for old buffer. */
1816  *(yy_c_buf_p) = (yy_hold_char);
1817  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1818  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1819  }
1820 
1821  /* Only push if top exists. Otherwise, replace top. */
1822  if (YY_CURRENT_BUFFER)
1823  (yy_buffer_stack_top)++;
1824  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1825 
1826  /* copied from yy_switch_to_buffer. */
1827  yy_load_buffer_state( );
1828  (yy_did_buffer_switch_on_eof) = 1;
1829 }
1830 
1831 /** Removes and deletes the top of the stack, if present.
1832  * The next element becomes the new top.
1833  *
1834  */
1836 {
1837  if (!YY_CURRENT_BUFFER)
1838  return;
1839 
1840  yy_delete_buffer(YY_CURRENT_BUFFER );
1841  YY_CURRENT_BUFFER_LVALUE = NULL;
1842  if ((yy_buffer_stack_top) > 0)
1843  --(yy_buffer_stack_top);
1844 
1845  if (YY_CURRENT_BUFFER) {
1846  yy_load_buffer_state( );
1847  (yy_did_buffer_switch_on_eof) = 1;
1848  }
1849 }
1850 
1851 /* Allocates the stack if it does not exist.
1852  * Guarantees space for at least one push.
1853  */
1855 {
1856  int num_to_alloc;
1857 
1858  if (!(yy_buffer_stack)) {
1859 
1860  /* First allocation is just for 2 elements, since we don't know if this
1861  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1862  * immediate realloc on the next call.
1863  */
1864  num_to_alloc = 1;
1865  (yy_buffer_stack) = (struct yy_buffer_state**)Xdlalloc
1866  (num_to_alloc * sizeof(struct yy_buffer_state*)
1867  );
1868  if ( ! (yy_buffer_stack) )
1869  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1870 
1871  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1872 
1873  (yy_buffer_stack_max) = num_to_alloc;
1874  (yy_buffer_stack_top) = 0;
1875  return;
1876  }
1877 
1878  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1879 
1880  /* Increase the buffer to prepare for a possible push. */
1881  int grow_size = 8 /* arbitrary grow size */;
1882 
1883  num_to_alloc = (yy_buffer_stack_max) + grow_size;
1884  (yy_buffer_stack) = (struct yy_buffer_state**)Xdlrealloc
1885  ((yy_buffer_stack),
1886  num_to_alloc * sizeof(struct yy_buffer_state*)
1887  );
1888  if ( ! (yy_buffer_stack) )
1889  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1890 
1891  /* zero only the new slots.*/
1892  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1893  (yy_buffer_stack_max) = num_to_alloc;
1894  }
1895 }
1896 
1897  void yyFlexLexer::yy_push_state( int new_state )
1898 {
1899  if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
1900  {
1901  yy_size_t new_size;
1902 
1903  (yy_start_stack_depth) += YY_START_STACK_INCR;
1904  new_size = (yy_start_stack_depth) * sizeof( int );
1905 
1906  if ( ! (yy_start_stack) )
1907  (yy_start_stack) = (int *) Xdlalloc(new_size );
1908 
1909  else
1910  (yy_start_stack) = (int *) Xdlrealloc((void *) (yy_start_stack),new_size );
1911 
1912  if ( ! (yy_start_stack) )
1913  YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
1914  }
1915 
1916  (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
1917 
1918  BEGIN(new_state);
1919 }
1920 
1922 {
1923  if ( --(yy_start_stack_ptr) < 0 )
1924  YY_FATAL_ERROR( "start-condition stack underflow" );
1925 
1926  BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
1927 }
1928 
1930 {
1931  return (yy_start_stack)[(yy_start_stack_ptr) - 1];
1932 }
1933 
1934 #ifndef YY_EXIT_FAILURE
1935 #define YY_EXIT_FAILURE 2
1936 #endif
1937 
1938 void yyFlexLexer::LexerError( yyconst char msg[] )
1939 {
1940  std::cerr << msg << std::endl;
1941  exit( YY_EXIT_FAILURE );
1942 }
1943 
1944 /* Redefine yyless() so it works in section 3 code. */
1945 
1946 #undef yyless
1947 #define yyless(n) \
1948  do \
1949  { \
1950  /* Undo effects of setting up yytext. */ \
1951  int yyless_macro_arg = (n); \
1952  YY_LESS_LINENO(yyless_macro_arg);\
1953  yytext[yyleng] = (yy_hold_char); \
1954  (yy_c_buf_p) = yytext + yyless_macro_arg; \
1955  (yy_hold_char) = *(yy_c_buf_p); \
1956  *(yy_c_buf_p) = '\0'; \
1957  yyleng = yyless_macro_arg; \
1958  } \
1959  while ( 0 )
1960 
1961 /* Accessor methods (get/set functions) to struct members. */
1962 
1963 /*
1964  * Internal utility routines.
1965  */
1966 
1967 #ifndef yytext_ptr
1968 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1969 {
1970  register int i;
1971  for ( i = 0; i < n; ++i )
1972  s1[i] = s2[i];
1973 }
1974 #endif
1975 
1976 #ifdef YY_NEED_STRLEN
1977 static int yy_flex_strlen (yyconst char * s )
1978 {
1979  register int n;
1980  for ( n = 0; s[n]; ++n )
1981  ;
1982 
1983  return n;
1984 }
1985 #endif
1986 
1987 void *Xdlalloc (yy_size_t size )
1988 {
1989  return (void *) malloc( size );
1990 }
1991 
1992 void *Xdlrealloc (void * ptr, yy_size_t size )
1993 {
1994  /* The cast to (char *) in the following accommodates both
1995  * implementations that use char* generic pointers, and those
1996  * that use void* generic pointers. It works with the latter
1997  * because both ANSI C and C++ allow castless assignment from
1998  * any pointer type to void*, and deal with argument conversions
1999  * as though doing an assignment.
2000  */
2001  return (void *) realloc( (char *) ptr, size );
2002 }
2003 
2004 void Xdlfree (void * ptr )
2005 {
2006  free( (char *) ptr ); /* see Xdlrealloc() for (char *) cast */
2007 }
2008 
2009 #define YYTABLES_NAME "yytables"
2010 
2011 #line 231 "scanner.ll"
2012 
2013 
2014 
2015 
2016 // ------------------------------------------------------------------------------------------------
2017 // ---------------------------------------- Additional code ---------------------------------------
2018 // ------------------------------------------------------------------------------------------------
2019 
2020 
2021 namespace torc {
2022 
2023  XdlScanner::XdlScanner(std::istream* in, std::ostream* out) : XdlFlexLexer(in, out) {}
2024 
2026 
2027  void XdlScanner::set_debug(bool b) {
2028  yy_flex_debug = b;
2029  }
2030 
2031 } // namespace torc
2032 
2033 
2034 /// \details This implementation of XdlFlexLexer::yylex() is necessary to fill the vtable of class
2035 /// XdlFlexLexer. We define the scanner's main yylex() function via YY_DECL to reside in class
2036 /// XdlScanner instead.
2037 #ifdef yylex
2038 #undef yylex
2039 #endif
2040 
2041 int XdlFlexLexer::yylex() {
2042  std::cerr << "in XdlFlexLexer::yylex() !" << std::endl;
2043  return 0;
2044 }
2045 
2046 /// \details When the scanner receives an End-Of-File result from YY_INPUT, it checks yywrap() for
2047 /// permission to proceed. If yywrap() returns false (zero), we assume that the function has
2048 /// set up yyin to point to the next input file, and the scanning continues. If yywrap()
2049 /// instead returns true (non-zero), the scanner terminates and returns 0 to the caller.
2050 int XdlFlexLexer::yywrap() {
2051  return 1;
2052 }
2053 
2054 //namespace {
2055 // /// \brief Suppress GCC warnings about unused boost global variables.
2056 // void suppress_boost_gcc_warnings(void);
2057 // void suppress_boost_gcc_warnings(void) {
2058 // (void) boost::system::system_category;
2059 // (void) boost::system::generic_category;
2060 // (void) boost::system::posix_category;
2061 // (void) boost::system::errno_ecat;
2062 // (void) boost::system::native_ecat;
2063 // }
2064 //}
2065 
#define yyterminate()
Definition: XdlScanner.cpp:604
if(!(yy_init))
Definition: XdlScanner.cpp:765
void yy_switch_to_buffer(struct yy_buffer_state *new_buffer)
void * Xdlalloc(yy_size_t)
Bison lexer internals.
void yypush_buffer_state(struct yy_buffer_state *new_buffer)
#define EOB_ACT_END_OF_FILE
Definition: XdlScanner.cpp:170
char * yy_buf_pos
Bison lexer internals.
Definition: LutScanner.cpp:204
#define YY_INPUT(buf, result, max_size)
Definition: XdlScanner.cpp:679
#define yylex
Definition: LutParser.cpp:36
#define YY_SC_TO_UI(c)
Definition: XdlScanner.cpp:130
int yy_n_chars
Bison lexer internals.
Definition: LutScanner.cpp:214
#define YY_STATE_EOF(state)
Definition: XdlScanner.cpp:146
int flex_int32_t
Definition: XdlScanner.cpp:57
#define YY_FATAL_ERROR(msg)
Definition: XdlScanner.cpp:701
int isatty(int)
void yy_push_state(int new_state)
yy_state_type yy_try_NUL_trans(yy_state_type current_state)
int yy_fill_buffer
Bison lexer internals.
Definition: LutScanner.cpp:241
#define YY_BUFFER_NEW
Definition: XdlScanner.cpp:245
#define BEGIN
Definition: XdlScanner.cpp:136
unsigned short int flex_uint16_t
Definition: XdlScanner.cpp:59
register char * yy_cp
Definition: XdlScanner.cpp:734
#define DOUBLEQUOTE
Bison lexer internals.
Definition: XdlScanner.cpp:639
void Xdlfree(void *)
Bison lexer internals.
unsigned int flex_uint32_t
Definition: XdlScanner.cpp:60
size_t yy_size_t
Bison lexer internals.
Definition: LutScanner.cpp:193
register char * yy_bp
Definition: XdlScanner.cpp:734
void * Xdlrealloc(void *, yy_size_t)
Bison lexer internals.
void yy_flush_buffer(struct yy_buffer_state *b)
#define YY_BREAK
Definition: XdlScanner.cpp:723
static yyconst flex_int16_t yy_def[179]
Definition: XdlScanner.cpp:448
int yy_bs_lineno
Bison lexer internals.
Definition: LutScanner.cpp:235
#define YY_START_STACK_INCR
Definition: XdlScanner.cpp:696
#define YY_EXIT_FAILURE
#define YY_MORE_ADJ
Definition: XdlScanner.cpp:560
YY_DECL register yy_state_type yy_current_state
Definition: XdlScanner.cpp:733
struct yy_buffer_state * yy_create_buffer(FLEX_STD istream *s, int size)
virtual ~XdlScanner()
Virtual destructor.
yy_size_t yy_buf_size
Bison lexer internals.
Definition: LutScanner.cpp:209
#define YY_CURRENT_BUFFER
Definition: XdlScanner.cpp:268
#define yyconst
Definition: XdlScanner.cpp:119
#define YY_STATE_BUF_SIZE
Definition: XdlScanner.cpp:160
void yyunput(int c, char *buf_ptr)
void yypop_buffer_state()
virtual void LexerError(const char *msg)
#define yyless(n)
int yy_at_bol
Bison lexer internals.
Definition: LutScanner.cpp:233
static yyconst flex_int16_t yy_chk[322]
Definition: XdlScanner.cpp:511
void yy_load_buffer_state()
yyFlexLexer(FLEX_STD istream *arg_yyin=0, FLEX_STD ostream *arg_yyout=0)
int yy_bs_column
Bison lexer internals.
Definition: LutScanner.cpp:236
#define YY_BUFFER_NORMAL
Definition: XdlScanner.cpp:246
short int flex_int16_t
Bison lexer internals.
Definition: LutScanner.cpp:56
#define CONFIGSTRING2
Bison lexer internals.
Definition: XdlScanner.cpp:638
virtual int LexerInput(char *buf, int max_size)
Definition: LutScanner.cpp:930
#define YY_READ_BUF_SIZE
Definition: XdlScanner.cpp:667
void set_debug(bool b)
Enables or disables debugging output.
#define DEBUG(a)
Definition: XdlScanner.cpp:611
std::istream * yy_input_file
Bison lexer internals.
Definition: LutScanner.cpp:201
#define YY_NEW_FILE
Definition: XdlScanner.cpp:149
char * yy_ch_buf
Bison lexer internals.
Definition: LutScanner.cpp:203
virtual void LexerOutput(const char *buf, int size)
Definition: LutScanner.cpp:957
Bison parser internals.
Definition: LutScanner.cpp:198
int yy_get_next_buffer()
Definition: LutScanner.cpp:969
#define EOB_ACT_LAST_MATCH
Definition: XdlScanner.cpp:171
int yy_is_our_buffer
Bison lexer internals.
Definition: LutScanner.cpp:220
XdlScanner(std::istream *arg_yyin=0, std::ostream *arg_yyout=0)
Public constructor.
void yyensure_buffer_stack(void)
#define INITIAL
Special lexing state for config strings.
Definition: XdlScanner.cpp:636
static yyconst flex_int16_t yy_base[179]
Definition: XdlScanner.cpp:425
#define CONFIGSTRING
Bison lexer internals.
Definition: XdlScanner.cpp:637
#define YY_RESTORE_YY_MORE_OFFSET
Definition: XdlScanner.cpp:561
static yyconst flex_int32_t yy_ec[256]
Definition: XdlScanner.cpp:384
#define YY_RULE_SETUP
Definition: XdlScanner.cpp:726
torc::XdlParser::token token
Import the parser's token types into a local typedef.
Definition: XdlScanner.cpp:599
void yyrestart(FLEX_STD istream *s)
flex_int32_t yy_verify
Bison lexer internals.
Definition: LutScanner.cpp:329
static yyconst flex_int16_t yy_acclist[232]
Definition: XdlScanner.cpp:332
static yyconst flex_int16_t yy_accept[170]
Definition: XdlScanner.cpp:362
void yy_delete_buffer(struct yy_buffer_state *b)
int yy_top_state()
virtual void switch_streams(FLEX_STD istream *new_in, FLEX_STD ostream *new_out)
Header for the XdlScanner class.
torc::XdlParser::token_type token_type
Definition: XdlScanner.cpp:600
#define REJECT
Definition: XdlScanner.cpp:551
register int yy_act
Definition: XdlScanner.cpp:735
static yyconst flex_int16_t yy_nxt[322]
Definition: XdlScanner.cpp:471
#define YY_CURRENT_BUFFER_LVALUE
Definition: XdlScanner.cpp:275
int yyleng
#define YY_DECL
Definition: XdlScanner.cpp:711
flex_int32_t yy_nxt
Bison lexer internals.
Definition: LutScanner.cpp:330
short int flex_int16_t
Definition: XdlScanner.cpp:56
void yy_pop_state()
void yy_init_buffer(struct yy_buffer_state *b, FLEX_STD istream *s)
#define YY_BUF_SIZE
Definition: XdlScanner.cpp:155
int yy_is_interactive
Bison lexer internals.
Definition: LutScanner.cpp:227
size_t yy_size_t
Definition: XdlScanner.cpp:193
#define YY_START
Definition: XdlScanner.cpp:142
yy_state_type yy_get_previous_state()
int flex_int32_t
Bison lexer internals.
Definition: LutScanner.cpp:57
#define YY_END_OF_BUFFER
Definition: XdlScanner.cpp:324
#define yytext_ptr
Definition: XdlScanner.cpp:309
signed char flex_int8_t
Definition: XdlScanner.cpp:55
unsigned char YY_CHAR
Bison lexer internals.
Definition: LutScanner.cpp:307
unsigned char YY_CHAR
Definition: XdlScanner.cpp:307
unsigned char flex_uint8_t
Definition: XdlScanner.cpp:58
Bison parser internals.
Definition: LutScanner.cpp:327
int yy_buffer_status
Bison lexer internals.
Definition: LutScanner.cpp:243
#define YY_END_OF_BUFFER_CHAR
Definition: XdlScanner.cpp:151
#define YY_BUFFER_EOF_PENDING
Definition: XdlScanner.cpp:257
#define YY_DO_BEFORE_ACTION
Definition: XdlScanner.cpp:316
#define ECHO
Definition: XdlScanner.cpp:672
virtual ~yyFlexLexer()
Definition: LutScanner.cpp:905
struct yy_buffer_state * YY_BUFFER_STATE
Definition: XdlScanner.cpp:164
#define EOB_ACT_CONTINUE_SCAN
Definition: XdlScanner.cpp:169
static yyconst flex_int32_t yy_meta[44]
Definition: XdlScanner.cpp:416