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