this repo has no description
at develop 100 kB view raw
1 2#define YY_INT_ALIGNED short int 3 4/* A lexical scanner generated by flex */ 5 6#define FLEX_SCANNER 7#define YY_FLEX_MAJOR_VERSION 2 8#define YY_FLEX_MINOR_VERSION 6 9#define YY_FLEX_SUBMINOR_VERSION 4 10#if YY_FLEX_SUBMINOR_VERSION > 0 11#define FLEX_BETA 12#endif 13 14#ifdef yy_create_buffer 15#define mzn_yy_create_buffer_ALREADY_DEFINED 16#else 17#define yy_create_buffer mzn_yy_create_buffer 18#endif 19 20#ifdef yy_delete_buffer 21#define mzn_yy_delete_buffer_ALREADY_DEFINED 22#else 23#define yy_delete_buffer mzn_yy_delete_buffer 24#endif 25 26#ifdef yy_scan_buffer 27#define mzn_yy_scan_buffer_ALREADY_DEFINED 28#else 29#define yy_scan_buffer mzn_yy_scan_buffer 30#endif 31 32#ifdef yy_scan_string 33#define mzn_yy_scan_string_ALREADY_DEFINED 34#else 35#define yy_scan_string mzn_yy_scan_string 36#endif 37 38#ifdef yy_scan_bytes 39#define mzn_yy_scan_bytes_ALREADY_DEFINED 40#else 41#define yy_scan_bytes mzn_yy_scan_bytes 42#endif 43 44#ifdef yy_init_buffer 45#define mzn_yy_init_buffer_ALREADY_DEFINED 46#else 47#define yy_init_buffer mzn_yy_init_buffer 48#endif 49 50#ifdef yy_flush_buffer 51#define mzn_yy_flush_buffer_ALREADY_DEFINED 52#else 53#define yy_flush_buffer mzn_yy_flush_buffer 54#endif 55 56#ifdef yy_load_buffer_state 57#define mzn_yy_load_buffer_state_ALREADY_DEFINED 58#else 59#define yy_load_buffer_state mzn_yy_load_buffer_state 60#endif 61 62#ifdef yy_switch_to_buffer 63#define mzn_yy_switch_to_buffer_ALREADY_DEFINED 64#else 65#define yy_switch_to_buffer mzn_yy_switch_to_buffer 66#endif 67 68#ifdef yypush_buffer_state 69#define mzn_yypush_buffer_state_ALREADY_DEFINED 70#else 71#define yypush_buffer_state mzn_yypush_buffer_state 72#endif 73 74#ifdef yypop_buffer_state 75#define mzn_yypop_buffer_state_ALREADY_DEFINED 76#else 77#define yypop_buffer_state mzn_yypop_buffer_state 78#endif 79 80#ifdef yyensure_buffer_stack 81#define mzn_yyensure_buffer_stack_ALREADY_DEFINED 82#else 83#define yyensure_buffer_stack mzn_yyensure_buffer_stack 84#endif 85 86#ifdef yylex 87#define mzn_yylex_ALREADY_DEFINED 88#else 89#define yylex mzn_yylex 90#endif 91 92#ifdef yyrestart 93#define mzn_yyrestart_ALREADY_DEFINED 94#else 95#define yyrestart mzn_yyrestart 96#endif 97 98#ifdef yylex_init 99#define mzn_yylex_init_ALREADY_DEFINED 100#else 101#define yylex_init mzn_yylex_init 102#endif 103 104#ifdef yylex_init_extra 105#define mzn_yylex_init_extra_ALREADY_DEFINED 106#else 107#define yylex_init_extra mzn_yylex_init_extra 108#endif 109 110#ifdef yylex_destroy 111#define mzn_yylex_destroy_ALREADY_DEFINED 112#else 113#define yylex_destroy mzn_yylex_destroy 114#endif 115 116#ifdef yyget_debug 117#define mzn_yyget_debug_ALREADY_DEFINED 118#else 119#define yyget_debug mzn_yyget_debug 120#endif 121 122#ifdef yyset_debug 123#define mzn_yyset_debug_ALREADY_DEFINED 124#else 125#define yyset_debug mzn_yyset_debug 126#endif 127 128#ifdef yyget_extra 129#define mzn_yyget_extra_ALREADY_DEFINED 130#else 131#define yyget_extra mzn_yyget_extra 132#endif 133 134#ifdef yyset_extra 135#define mzn_yyset_extra_ALREADY_DEFINED 136#else 137#define yyset_extra mzn_yyset_extra 138#endif 139 140#ifdef yyget_in 141#define mzn_yyget_in_ALREADY_DEFINED 142#else 143#define yyget_in mzn_yyget_in 144#endif 145 146#ifdef yyset_in 147#define mzn_yyset_in_ALREADY_DEFINED 148#else 149#define yyset_in mzn_yyset_in 150#endif 151 152#ifdef yyget_out 153#define mzn_yyget_out_ALREADY_DEFINED 154#else 155#define yyget_out mzn_yyget_out 156#endif 157 158#ifdef yyset_out 159#define mzn_yyset_out_ALREADY_DEFINED 160#else 161#define yyset_out mzn_yyset_out 162#endif 163 164#ifdef yyget_leng 165#define mzn_yyget_leng_ALREADY_DEFINED 166#else 167#define yyget_leng mzn_yyget_leng 168#endif 169 170#ifdef yyget_text 171#define mzn_yyget_text_ALREADY_DEFINED 172#else 173#define yyget_text mzn_yyget_text 174#endif 175 176#ifdef yyget_lineno 177#define mzn_yyget_lineno_ALREADY_DEFINED 178#else 179#define yyget_lineno mzn_yyget_lineno 180#endif 181 182#ifdef yyset_lineno 183#define mzn_yyset_lineno_ALREADY_DEFINED 184#else 185#define yyset_lineno mzn_yyset_lineno 186#endif 187 188#ifdef yyget_column 189#define mzn_yyget_column_ALREADY_DEFINED 190#else 191#define yyget_column mzn_yyget_column 192#endif 193 194#ifdef yyset_column 195#define mzn_yyset_column_ALREADY_DEFINED 196#else 197#define yyset_column mzn_yyset_column 198#endif 199 200#ifdef yywrap 201#define mzn_yywrap_ALREADY_DEFINED 202#else 203#define yywrap mzn_yywrap 204#endif 205 206#ifdef yyget_lval 207#define mzn_yyget_lval_ALREADY_DEFINED 208#else 209#define yyget_lval mzn_yyget_lval 210#endif 211 212#ifdef yyset_lval 213#define mzn_yyset_lval_ALREADY_DEFINED 214#else 215#define yyset_lval mzn_yyset_lval 216#endif 217 218#ifdef yyget_lloc 219#define mzn_yyget_lloc_ALREADY_DEFINED 220#else 221#define yyget_lloc mzn_yyget_lloc 222#endif 223 224#ifdef yyset_lloc 225#define mzn_yyset_lloc_ALREADY_DEFINED 226#else 227#define yyset_lloc mzn_yyset_lloc 228#endif 229 230#ifdef yyalloc 231#define mzn_yyalloc_ALREADY_DEFINED 232#else 233#define yyalloc mzn_yyalloc 234#endif 235 236#ifdef yyrealloc 237#define mzn_yyrealloc_ALREADY_DEFINED 238#else 239#define yyrealloc mzn_yyrealloc 240#endif 241 242#ifdef yyfree 243#define mzn_yyfree_ALREADY_DEFINED 244#else 245#define yyfree mzn_yyfree 246#endif 247 248/* First, we deal with platform-specific or compiler-specific issues. */ 249 250/* begin standard C headers. */ 251#include <stdio.h> 252#include <string.h> 253#include <errno.h> 254#include <stdlib.h> 255 256/* end standard C headers. */ 257 258/* flex integer type definitions */ 259 260#ifndef FLEXINT_H 261#define FLEXINT_H 262 263/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ 264 265#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 266 267/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, 268 * if you want the limit (max/min) macros for int types. 269 */ 270#ifndef __STDC_LIMIT_MACROS 271#define __STDC_LIMIT_MACROS 1 272#endif 273 274#include <inttypes.h> 275typedef int8_t flex_int8_t; 276typedef uint8_t flex_uint8_t; 277typedef int16_t flex_int16_t; 278typedef uint16_t flex_uint16_t; 279typedef int32_t flex_int32_t; 280typedef uint32_t flex_uint32_t; 281#else 282typedef signed char flex_int8_t; 283typedef short int flex_int16_t; 284typedef int flex_int32_t; 285typedef unsigned char flex_uint8_t; 286typedef unsigned short int flex_uint16_t; 287typedef unsigned int flex_uint32_t; 288 289/* Limits of integral types. */ 290#ifndef INT8_MIN 291#define INT8_MIN (-128) 292#endif 293#ifndef INT16_MIN 294#define INT16_MIN (-32767-1) 295#endif 296#ifndef INT32_MIN 297#define INT32_MIN (-2147483647-1) 298#endif 299#ifndef INT8_MAX 300#define INT8_MAX (127) 301#endif 302#ifndef INT16_MAX 303#define INT16_MAX (32767) 304#endif 305#ifndef INT32_MAX 306#define INT32_MAX (2147483647) 307#endif 308#ifndef UINT8_MAX 309#define UINT8_MAX (255U) 310#endif 311#ifndef UINT16_MAX 312#define UINT16_MAX (65535U) 313#endif 314#ifndef UINT32_MAX 315#define UINT32_MAX (4294967295U) 316#endif 317 318#ifndef SIZE_MAX 319#define SIZE_MAX (~(size_t)0) 320#endif 321 322#endif /* ! C99 */ 323 324#endif /* ! FLEXINT_H */ 325 326/* begin standard C++ headers. */ 327 328/* TODO: this is always defined, so inline it */ 329#define yyconst const 330 331#if defined(__GNUC__) && __GNUC__ >= 3 332#define yynoreturn __attribute__((__noreturn__)) 333#else 334#define yynoreturn 335#endif 336 337/* Returned upon end-of-file. */ 338#define YY_NULL 0 339 340/* Promotes a possibly negative, possibly signed char to an 341 * integer in range [0..255] for use as an array index. 342 */ 343#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) 344 345/* An opaque pointer. */ 346#ifndef YY_TYPEDEF_YY_SCANNER_T 347#define YY_TYPEDEF_YY_SCANNER_T 348typedef void* yyscan_t; 349#endif 350 351/* For convenience, these vars (plus the bison vars far below) 352 are macros in the reentrant scanner. */ 353#define yyin yyg->yyin_r 354#define yyout yyg->yyout_r 355#define yyextra yyg->yyextra_r 356#define yyleng yyg->yyleng_r 357#define yytext yyg->yytext_r 358#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) 359#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) 360#define yy_flex_debug yyg->yy_flex_debug_r 361 362/* Enter a start condition. This macro really ought to take a parameter, 363 * but we do it the disgusting crufty way forced on us by the ()-less 364 * definition of BEGIN. 365 */ 366#define BEGIN yyg->yy_start = 1 + 2 * 367/* Translate the current start state into a value that can be later handed 368 * to BEGIN to return to the state. The YYSTATE alias is for lex 369 * compatibility. 370 */ 371#define YY_START ((yyg->yy_start - 1) / 2) 372#define YYSTATE YY_START 373/* Action number for EOF rule of a given start state. */ 374#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 375/* Special action meaning "start processing a new file". */ 376#define YY_NEW_FILE yyrestart( yyin , yyscanner ) 377#define YY_END_OF_BUFFER_CHAR 0 378 379/* Size of default input buffer. */ 380#ifndef YY_BUF_SIZE 381#ifdef __ia64__ 382/* On IA-64, the buffer size is 16k, not 8k. 383 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. 384 * Ditto for the __ia64__ case accordingly. 385 */ 386#define YY_BUF_SIZE 32768 387#else 388#define YY_BUF_SIZE 16384 389#endif /* __ia64__ */ 390#endif 391 392/* The state buf must be large enough to hold one state per character in the main buffer. 393 */ 394#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) 395 396#ifndef YY_TYPEDEF_YY_BUFFER_STATE 397#define YY_TYPEDEF_YY_BUFFER_STATE 398typedef struct yy_buffer_state *YY_BUFFER_STATE; 399#endif 400 401#ifndef YY_TYPEDEF_YY_SIZE_T 402#define YY_TYPEDEF_YY_SIZE_T 403typedef size_t yy_size_t; 404#endif 405 406#define EOB_ACT_CONTINUE_SCAN 0 407#define EOB_ACT_END_OF_FILE 1 408#define EOB_ACT_LAST_MATCH 2 409 410 #define YY_LESS_LINENO(n) 411 #define YY_LINENO_REWIND_TO(ptr) 412 413/* Return all but the first "n" matched characters back to the input stream. */ 414#define yyless(n) \ 415 do \ 416 { \ 417 /* Undo effects of setting up yytext. */ \ 418 int yyless_macro_arg = (n); \ 419 YY_LESS_LINENO(yyless_macro_arg);\ 420 *yy_cp = yyg->yy_hold_char; \ 421 YY_RESTORE_YY_MORE_OFFSET \ 422 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ 423 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 424 } \ 425 while ( 0 ) 426#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) 427 428#ifndef YY_STRUCT_YY_BUFFER_STATE 429#define YY_STRUCT_YY_BUFFER_STATE 430struct yy_buffer_state 431 { 432 FILE *yy_input_file; 433 434 char *yy_ch_buf; /* input buffer */ 435 char *yy_buf_pos; /* current position in input buffer */ 436 437 /* Size of input buffer in bytes, not including room for EOB 438 * characters. 439 */ 440 int yy_buf_size; 441 442 /* Number of characters read into yy_ch_buf, not including EOB 443 * characters. 444 */ 445 int yy_n_chars; 446 447 /* Whether we "own" the buffer - i.e., we know we created it, 448 * and can realloc() it to grow it, and should free() it to 449 * delete it. 450 */ 451 int yy_is_our_buffer; 452 453 /* Whether this is an "interactive" input source; if so, and 454 * if we're using stdio for input, then we want to use getc() 455 * instead of fread(), to make sure we stop fetching input after 456 * each newline. 457 */ 458 int yy_is_interactive; 459 460 /* Whether we're considered to be at the beginning of a line. 461 * If so, '^' rules will be active on the next match, otherwise 462 * not. 463 */ 464 int yy_at_bol; 465 466 int yy_bs_lineno; /**< The line count. */ 467 int yy_bs_column; /**< The column count. */ 468 469 /* Whether to try to fill the input buffer when we reach the 470 * end of it. 471 */ 472 int yy_fill_buffer; 473 474 int yy_buffer_status; 475 476#define YY_BUFFER_NEW 0 477#define YY_BUFFER_NORMAL 1 478 /* When an EOF's been seen but there's still some text to process 479 * then we mark the buffer as YY_EOF_PENDING, to indicate that we 480 * shouldn't try reading from the input source any more. We might 481 * still have a bunch of tokens to match, though, because of 482 * possible backing-up. 483 * 484 * When we actually see the EOF, we change the status to "new" 485 * (via yyrestart()), so that the user can continue scanning by 486 * just pointing yyin at a new input file. 487 */ 488#define YY_BUFFER_EOF_PENDING 2 489 490 }; 491#endif /* !YY_STRUCT_YY_BUFFER_STATE */ 492 493/* We provide macros for accessing buffer states in case in the 494 * future we want to put the buffer states in a more general 495 * "scanner state". 496 * 497 * Returns the top of the stack, or NULL. 498 */ 499#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ 500 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ 501 : NULL) 502/* Same as previous macro, but useful when we know that the buffer stack is not 503 * NULL or when we need an lvalue. For internal use only. 504 */ 505#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] 506 507void yyrestart ( FILE *input_file , yyscan_t yyscanner ); 508void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); 509YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); 510void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); 511void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); 512void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); 513void yypop_buffer_state ( yyscan_t yyscanner ); 514 515static void yyensure_buffer_stack ( yyscan_t yyscanner ); 516static void yy_load_buffer_state ( yyscan_t yyscanner ); 517static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); 518#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) 519 520YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); 521YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); 522YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); 523 524void *yyalloc ( yy_size_t , yyscan_t yyscanner ); 525void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); 526void yyfree ( void * , yyscan_t yyscanner ); 527 528#define yy_new_buffer yy_create_buffer 529#define yy_set_interactive(is_interactive) \ 530 { \ 531 if ( ! YY_CURRENT_BUFFER ){ \ 532 yyensure_buffer_stack (yyscanner); \ 533 YY_CURRENT_BUFFER_LVALUE = \ 534 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ 535 } \ 536 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 537 } 538#define yy_set_bol(at_bol) \ 539 { \ 540 if ( ! YY_CURRENT_BUFFER ){\ 541 yyensure_buffer_stack (yyscanner); \ 542 YY_CURRENT_BUFFER_LVALUE = \ 543 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ 544 } \ 545 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 546 } 547#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 548 549/* Begin user sect3 */ 550 551#define mzn_yywrap(yyscanner) (/*CONSTCOND*/1) 552#define YY_SKIP_YYWRAP 553typedef flex_uint8_t YY_CHAR; 554 555typedef int yy_state_type; 556 557#define yytext_ptr yytext_r 558 559static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); 560static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); 561static int yy_get_next_buffer ( yyscan_t yyscanner ); 562static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); 563 564/* Done after the current pattern has been matched and before the 565 * corresponding action - sets up yytext. 566 */ 567#define YY_DO_BEFORE_ACTION \ 568 yyg->yytext_ptr = yy_bp; \ 569 yyleng = (int) (yy_cp - yy_bp); \ 570 yyg->yy_hold_char = *yy_cp; \ 571 *yy_cp = '\0'; \ 572 yyg->yy_c_buf_p = yy_cp; 573#define YY_NUM_RULES 181 574#define YY_END_OF_BUFFER 182 575/* This struct is not used in this scanner, 576 but its presence is necessary. */ 577struct yy_trans_info 578 { 579 flex_int32_t yy_verify; 580 flex_int32_t yy_nxt; 581 }; 582static const flex_int16_t yy_accept[500] = 583 { 0, 584 0, 0, 168, 168, 168, 168, 0, 0, 0, 0, 585 0, 0, 0, 0, 0, 0, 182, 180, 3, 2, 586 180, 167, 180, 23, 180, 164, 103, 99, 33, 101, 587 33, 105, 29, 29, 33, 112, 122, 116, 142, 19, 588 180, 21, 107, 37, 180, 142, 142, 142, 142, 142, 589 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 590 142, 142, 142, 142, 33, 180, 180, 180, 1, 168, 591 178, 177, 175, 177, 1, 176, 177, 16, 18, 17, 592 1, 6, 8, 7, 1, 11, 13, 12, 1, 165, 593 166, 124, 0, 163, 23, 0, 0, 143, 0, 0, 594 595 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 596 0, 0, 0, 0, 0, 0, 109, 126, 34, 14, 597 134, 0, 29, 0, 0, 0, 36, 128, 114, 111, 598 120, 118, 142, 20, 132, 144, 144, 0, 142, 142, 599 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 600 56, 61, 142, 142, 142, 142, 142, 142, 72, 142, 601 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 602 142, 142, 142, 142, 142, 142, 142, 142, 142, 22, 603 137, 136, 139, 138, 151, 0, 0, 0, 0, 168, 604 172, 171, 173, 171, 169, 170, 174, 16, 15, 6, 605 606 5, 11, 10, 162, 163, 0, 104, 100, 0, 102, 607 0, 0, 106, 0, 113, 0, 0, 123, 0, 117, 608 0, 0, 108, 0, 0, 0, 0, 0, 0, 0, 609 0, 0, 4, 30, 0, 32, 0, 27, 28, 130, 610 144, 144, 0, 179, 38, 40, 142, 142, 142, 142, 611 142, 142, 46, 142, 142, 142, 142, 142, 142, 142, 612 142, 63, 64, 142, 142, 142, 68, 70, 74, 142, 613 75, 142, 142, 142, 79, 142, 142, 142, 142, 142, 614 142, 142, 142, 142, 142, 142, 94, 142, 97, 152, 615 153, 154, 145, 146, 147, 150, 155, 156, 161, 160, 616 617 157, 158, 159, 148, 149, 162, 125, 110, 127, 35, 618 135, 129, 0, 115, 121, 119, 133, 0, 0, 62, 619 0, 0, 0, 0, 0, 0, 0, 0, 140, 9, 620 0, 0, 0, 0, 144, 142, 142, 42, 43, 142, 621 142, 48, 50, 142, 53, 142, 142, 142, 142, 142, 622 142, 65, 142, 142, 142, 142, 142, 142, 142, 142, 623 142, 142, 142, 88, 89, 24, 142, 91, 142, 142, 624 142, 131, 0, 47, 0, 69, 71, 0, 0, 0, 625 0, 98, 0, 31, 0, 0, 26, 144, 142, 41, 626 142, 142, 142, 52, 25, 54, 142, 142, 142, 142, 627 628 142, 142, 142, 142, 142, 142, 80, 142, 142, 142, 629 142, 90, 92, 142, 96, 49, 0, 0, 0, 0, 630 0, 0, 26, 144, 142, 142, 142, 51, 142, 142, 631 142, 142, 142, 142, 73, 142, 77, 142, 81, 82, 632 142, 142, 142, 0, 0, 0, 0, 93, 144, 142, 633 142, 45, 142, 57, 142, 142, 142, 142, 142, 78, 634 142, 86, 142, 0, 83, 0, 0, 144, 142, 142, 635 55, 58, 142, 66, 67, 142, 84, 142, 0, 0, 636 87, 144, 142, 142, 59, 76, 142, 0, 85, 141, 637 39, 44, 142, 60, 142, 142, 142, 95, 0 638 639 } ; 640 641static const YY_CHAR yy_ec[256] = 642 { 0, 643 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 644 1, 2, 4, 1, 1, 1, 1, 1, 1, 1, 645 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 646 1, 2, 5, 6, 1, 7, 8, 1, 9, 10, 647 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, 648 19, 19, 19, 19, 19, 20, 20, 21, 14, 22, 649 23, 24, 1, 1, 25, 25, 25, 25, 26, 25, 650 27, 27, 27, 27, 27, 27, 27, 27, 27, 28, 651 27, 27, 27, 27, 27, 27, 27, 29, 27, 27, 652 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 653 654 40, 41, 42, 43, 44, 45, 27, 46, 47, 48, 655 49, 50, 27, 51, 52, 53, 54, 55, 56, 57, 656 58, 59, 14, 60, 14, 61, 1, 62, 1, 1, 657 63, 1, 1, 64, 65, 66, 67, 68, 1, 1, 658 1, 1, 1, 69, 1, 70, 1, 71, 1, 1, 659 1, 1, 1, 1, 1, 1, 1, 72, 1, 73, 660 1, 1, 1, 74, 75, 1, 76, 77, 78, 79, 661 1, 80, 1, 1, 1, 1, 1, 1, 1, 1, 662 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 663 1, 1, 1, 81, 1, 1, 1, 1, 1, 1, 664 665 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 666 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 667 1, 1, 1, 1, 1, 82, 1, 1, 1, 1, 668 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 669 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 670 1, 1, 1, 1, 1 671 } ; 672 673static const YY_CHAR yy_meta[84] = 674 { 0, 675 1, 1, 2, 3, 1, 4, 5, 1, 1, 1, 676 1, 6, 1, 1, 1, 7, 1, 8, 8, 8, 677 1, 1, 1, 1, 9, 9, 10, 9, 10, 1, 678 4, 1, 1, 11, 12, 9, 9, 9, 9, 9, 679 9, 10, 10, 10, 10, 10, 10, 10, 10, 9, 680 10, 10, 10, 10, 10, 10, 10, 10, 10, 1, 681 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 682 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 683 1, 1, 3 684 } ; 685 686static const flex_int16_t yy_base[521] = 687 { 0, 688 0, 0, 81, 85, 89, 93, 91, 95, 97, 98, 689 99, 101, 850, 849, 848, 847, 857, 862, 862, 862, 690 833, 862, 848, 0, 180, 862, 862, 841, 862, 829, 691 836, 74, 99, 111, 830, 99, 827, 826, 0, 788, 692 830, 862, 862, 797, 0, 84, 796, 72, 94, 94, 693 90, 102, 101, 110, 795, 108, 116, 803, 117, 147, 694 794, 805, 797, 790, 806, 194, 757, 148, 862, 0, 695 862, 862, 862, 212, 862, 862, 220, 0, 862, 819, 696 0, 0, 862, 818, 0, 0, 862, 817, 0, 862, 697 862, 862, 0, 0, 0, 124, 138, 862, 168, 222, 698 699 214, 224, 177, 227, 216, 239, 816, 179, 235, 240, 700 243, 245, 247, 250, 254, 284, 862, 862, 862, 820, 701 862, 264, 290, 299, 306, 268, 862, 807, 862, 862, 702 862, 862, 0, 862, 862, 0, 793, 794, 115, 777, 703 778, 774, 777, 783, 124, 771, 207, 776, 772, 772, 704 0, 282, 766, 766, 760, 768, 776, 761, 0, 760, 705 759, 760, 770, 771, 755, 754, 760, 754, 227, 757, 706 751, 762, 747, 750, 749, 754, 746, 756, 744, 862, 707 862, 862, 862, 862, 862, 220, 286, 254, 269, 0, 708 862, 862, 862, 862, 862, 862, 862, 0, 862, 0, 709 710 862, 0, 862, 0, 0, 271, 862, 862, 328, 862, 711 329, 330, 862, 785, 862, 342, 341, 862, 344, 862, 712 345, 784, 862, 346, 347, 358, 359, 348, 360, 361, 713 362, 365, 780, 362, 390, 396, 399, 378, 322, 862, 714 0, 746, 755, 862, 740, 0, 752, 741, 746, 733, 715 748, 742, 0, 742, 737, 733, 727, 742, 739, 730, 716 731, 734, 0, 720, 728, 727, 0, 0, 0, 720, 717 0, 730, 719, 723, 0, 711, 721, 712, 723, 723, 718 708, 712, 719, 712, 717, 707, 711, 703, 0, 862, 719 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 720 721 862, 862, 862, 862, 862, 0, 862, 862, 862, 862, 722 862, 862, 390, 862, 862, 862, 862, 402, 395, 862, 723 411, 413, 414, 418, 421, 423, 422, 425, 862, 862, 724 445, 418, 419, 459, 713, 699, 693, 0, 0, 697, 725 695, 0, 704, 706, 0, 706, 692, 691, 689, 694, 726 690, 0, 663, 659, 644, 650, 635, 630, 632, 623, 727 630, 600, 606, 0, 0, 0, 598, 0, 586, 597, 728 592, 862, 450, 862, 457, 862, 862, 458, 464, 466, 729 471, 862, 464, 467, 481, 472, 485, 543, 544, 0, 730 528, 532, 536, 0, 0, 0, 532, 536, 530, 521, 731 732 528, 527, 517, 530, 528, 525, 0, 523, 511, 511, 733 517, 0, 0, 509, 0, 862, 497, 498, 500, 502, 734 503, 498, 502, 500, 497, 506, 488, 0, 483, 490, 735 474, 453, 417, 398, 0, 419, 0, 392, 0, 0, 736 408, 400, 376, 504, 505, 514, 515, 862, 359, 351, 737 342, 0, 336, 0, 325, 298, 281, 273, 258, 0, 738 251, 0, 266, 517, 862, 516, 528, 240, 226, 224, 739 0, 0, 216, 0, 0, 227, 0, 206, 529, 530, 740 862, 180, 152, 141, 0, 0, 151, 531, 862, 0, 741 0, 0, 145, 862, 111, 55, 51, 0, 862, 582, 742 743 594, 606, 618, 626, 636, 648, 653, 656, 658, 668, 744 680, 692, 704, 708, 711, 715, 719, 724, 729, 731 745 } ; 746 747static const flex_int16_t yy_def[521] = 748 { 0, 749 499, 1, 500, 500, 500, 500, 501, 501, 502, 502, 750 503, 503, 1, 1, 1, 1, 499, 499, 499, 499, 751 499, 499, 504, 505, 506, 499, 499, 499, 499, 499, 752 499, 499, 499, 499, 499, 499, 499, 499, 507, 499, 753 499, 499, 499, 508, 509, 507, 507, 507, 507, 507, 754 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 755 507, 507, 507, 507, 499, 499, 499, 499, 499, 510, 756 499, 499, 499, 499, 499, 499, 499, 511, 499, 499, 757 511, 512, 499, 499, 512, 513, 499, 499, 513, 499, 758 499, 499, 514, 515, 505, 506, 506, 499, 506, 506, 759 760 506, 506, 506, 506, 506, 506, 499, 506, 506, 506, 761 506, 506, 506, 506, 506, 506, 499, 499, 499, 499, 762 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 763 499, 499, 507, 499, 499, 516, 516, 517, 507, 507, 764 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 765 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 766 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 767 507, 507, 507, 507, 507, 507, 507, 507, 507, 499, 768 499, 499, 499, 499, 499, 499, 499, 499, 499, 510, 769 499, 499, 499, 499, 499, 499, 499, 511, 499, 512, 770 771 499, 513, 499, 518, 515, 506, 499, 499, 506, 499, 772 506, 506, 499, 499, 499, 506, 506, 499, 506, 499, 773 506, 499, 499, 506, 506, 506, 506, 506, 506, 506, 774 506, 506, 499, 499, 499, 499, 499, 519, 499, 499, 775 516, 516, 517, 499, 507, 507, 507, 507, 507, 507, 776 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 777 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 778 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 779 507, 507, 507, 507, 507, 507, 507, 507, 507, 499, 780 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 781 782 499, 499, 499, 499, 499, 518, 499, 499, 499, 499, 783 499, 499, 506, 499, 499, 499, 499, 506, 506, 499, 784 506, 506, 506, 506, 506, 506, 506, 506, 499, 499, 785 499, 520, 520, 499, 516, 507, 507, 507, 507, 507, 786 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 787 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 788 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 789 507, 499, 506, 499, 506, 499, 499, 506, 506, 506, 790 506, 499, 499, 499, 499, 499, 499, 516, 507, 507, 791 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 792 793 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 794 507, 507, 507, 507, 507, 499, 506, 506, 506, 506, 795 506, 499, 499, 516, 507, 507, 507, 507, 507, 507, 796 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 797 507, 507, 507, 506, 506, 506, 506, 499, 516, 507, 798 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 799 507, 507, 507, 506, 499, 506, 506, 516, 507, 507, 800 507, 507, 507, 507, 507, 507, 507, 507, 506, 506, 801 499, 516, 507, 507, 507, 507, 507, 506, 499, 516, 802 507, 507, 507, 499, 507, 507, 507, 507, 0, 499, 803 804 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 805 499, 499, 499, 499, 499, 499, 499, 499, 499, 499 806 } ; 807 808static const flex_int16_t yy_nxt[946] = 809 { 0, 810 18, 19, 20, 19, 21, 22, 23, 24, 25, 26, 811 18, 27, 28, 29, 30, 31, 32, 33, 34, 34, 812 35, 36, 37, 38, 39, 39, 39, 39, 39, 40, 813 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 814 51, 39, 39, 52, 39, 53, 54, 55, 56, 57, 815 58, 59, 60, 61, 62, 63, 64, 39, 39, 65, 816 66, 18, 18, 18, 18, 18, 18, 18, 18, 18, 817 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 818 67, 68, 69, 71, 72, 120, 73, 71, 72, 498, 819 73, 71, 72, 79, 76, 71, 72, 79, 76, 83, 820 821 83, 87, 80, 87, 121, 497, 80, 142, 84, 84, 822 88, 74, 88, 128, 122, 74, 123, 123, 123, 77, 823 143, 129, 130, 77, 124, 148, 122, 125, 123, 123, 824 123, 139, 98, 144, 140, 149, 124, 145, 124, 146, 825 153, 147, 151, 150, 154, 155, 98, 126, 159, 152, 826 124, 162, 165, 156, 499, 125, 166, 160, 157, 496, 827 206, 161, 245, 75, 252, 167, 163, 75, 499, 168, 828 169, 75, 246, 81, 170, 75, 207, 81, 253, 85, 829 85, 89, 495, 89, 97, 213, 171, 223, 98, 172, 830 493, 99, 100, 492, 101, 102, 103, 173, 499, 491, 831 832 174, 104, 105, 106, 175, 181, 182, 214, 183, 499, 833 107, 186, 108, 187, 188, 189, 184, 191, 109, 490, 834 192, 193, 210, 110, 218, 191, 111, 112, 192, 197, 835 208, 113, 98, 114, 209, 215, 115, 211, 219, 212, 836 116, 216, 194, 98, 499, 255, 499, 220, 98, 217, 837 194, 98, 499, 98, 499, 98, 487, 499, 98, 195, 838 256, 221, 98, 278, 196, 499, 486, 195, 485, 499, 839 499, 484, 196, 499, 483, 499, 279, 499, 224, 307, 840 499, 234, 234, 234, 499, 239, 239, 225, 290, 291, 841 292, 226, 98, 227, 482, 232, 232, 230, 232, 478, 842 843 228, 499, 231, 477, 229, 122, 232, 123, 123, 123, 844 476, 235, 475, 235, 499, 124, 236, 236, 236, 260, 845 474, 237, 261, 238, 238, 238, 301, 302, 303, 124, 846 238, 238, 304, 305, 262, 473, 308, 309, 310, 239, 847 239, 238, 238, 238, 238, 238, 238, 293, 294, 314, 848 312, 295, 315, 316, 98, 320, 98, 296, 499, 499, 849 499, 297, 298, 299, 300, 313, 98, 98, 98, 98, 850 98, 499, 499, 329, 499, 499, 499, 499, 499, 234, 851 234, 234, 472, 471, 324, 470, 318, 331, 499, 499, 852 499, 499, 499, 333, 469, 499, 322, 325, 372, 321, 853 854 319, 331, 468, 374, 327, 334, 326, 236, 236, 236, 855 98, 323, 328, 236, 236, 236, 332, 332, 332, 98, 856 499, 376, 377, 332, 332, 499, 98, 334, 463, 98, 857 98, 98, 499, 382, 332, 332, 332, 332, 332, 332, 858 462, 499, 373, 499, 499, 385, 385, 461, 499, 460, 859 375, 499, 499, 499, 459, 499, 458, 383, 416, 383, 860 379, 380, 384, 384, 384, 98, 98, 385, 385, 378, 861 381, 386, 98, 386, 98, 457, 387, 387, 387, 98, 862 499, 384, 384, 384, 384, 384, 384, 499, 499, 387, 863 387, 387, 456, 422, 499, 422, 499, 418, 423, 423, 864 865 423, 499, 387, 387, 387, 98, 98, 417, 98, 420, 866 98, 448, 98, 465, 419, 423, 423, 423, 421, 423, 867 423, 423, 98, 98, 98, 98, 455, 499, 499, 454, 868 499, 453, 499, 499, 499, 499, 481, 98, 489, 494, 869 452, 451, 447, 464, 499, 499, 499, 499, 444, 450, 870 445, 446, 449, 466, 479, 467, 443, 442, 499, 499, 871 499, 499, 441, 440, 439, 438, 437, 436, 480, 435, 872 434, 433, 432, 431, 430, 429, 428, 427, 426, 425, 873 424, 488, 70, 70, 70, 70, 70, 70, 70, 70, 874 70, 70, 70, 70, 78, 78, 78, 78, 78, 78, 875 876 78, 78, 78, 78, 78, 78, 82, 82, 82, 82, 877 82, 82, 82, 82, 82, 82, 82, 82, 86, 86, 878 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 879 94, 415, 414, 413, 94, 94, 95, 412, 95, 95, 880 95, 95, 95, 95, 95, 95, 95, 95, 96, 411, 881 410, 96, 96, 96, 96, 96, 96, 96, 96, 96, 882 133, 133, 133, 133, 136, 136, 138, 138, 190, 409, 883 408, 407, 190, 190, 190, 190, 190, 190, 190, 190, 884 198, 406, 198, 198, 198, 405, 198, 198, 198, 198, 885 198, 198, 200, 404, 200, 200, 200, 403, 200, 200, 886 887 200, 200, 200, 200, 202, 402, 202, 202, 202, 401, 888 202, 202, 202, 202, 202, 202, 204, 204, 205, 205, 889 205, 205, 241, 241, 241, 241, 243, 243, 243, 243, 890 243, 306, 306, 306, 306, 238, 238, 238, 332, 332, 891 400, 399, 398, 397, 396, 395, 394, 393, 392, 391, 892 390, 389, 388, 371, 370, 369, 368, 367, 366, 365, 893 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, 894 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, 895 344, 343, 342, 341, 340, 339, 338, 337, 336, 244, 896 335, 330, 317, 311, 289, 288, 287, 286, 285, 284, 897 898 283, 282, 281, 280, 277, 276, 275, 274, 273, 272, 899 271, 270, 269, 268, 267, 266, 265, 264, 263, 259, 900 258, 257, 254, 251, 250, 249, 248, 247, 244, 242, 901 240, 233, 222, 203, 201, 199, 185, 180, 179, 178, 902 177, 176, 164, 158, 141, 137, 135, 134, 132, 131, 903 127, 119, 118, 117, 93, 92, 499, 91, 91, 90, 904 90, 17, 499, 499, 499, 499, 499, 499, 499, 499, 905 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 906 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 907 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 908 909 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 910 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 911 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 912 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 913 499, 499, 499, 499, 499 914 } ; 915 916static const flex_int16_t yy_chk[946] = 917 { 0, 918 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 919 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 920 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 921 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 922 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 923 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 924 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 925 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 926 1, 1, 1, 3, 3, 32, 3, 4, 4, 497, 927 4, 5, 5, 7, 5, 6, 6, 8, 6, 9, 928 929 10, 11, 7, 12, 32, 496, 8, 48, 9, 10, 930 11, 3, 12, 36, 33, 4, 33, 33, 33, 5, 931 48, 36, 36, 6, 33, 51, 34, 33, 34, 34, 932 34, 46, 96, 49, 46, 51, 34, 49, 33, 50, 933 53, 50, 52, 51, 53, 54, 97, 33, 56, 52, 934 34, 57, 59, 54, 96, 33, 59, 56, 54, 495, 935 97, 56, 139, 3, 145, 59, 57, 4, 97, 59, 936 59, 5, 139, 7, 59, 6, 99, 8, 145, 9, 937 10, 11, 493, 12, 25, 103, 60, 108, 25, 60, 938 487, 25, 25, 484, 25, 25, 25, 60, 99, 483, 939 940 60, 25, 25, 25, 60, 66, 66, 103, 66, 108, 941 25, 68, 25, 68, 68, 68, 66, 74, 25, 482, 942 74, 74, 101, 25, 105, 77, 25, 25, 77, 77, 943 100, 25, 102, 25, 100, 104, 25, 101, 105, 102, 944 25, 104, 74, 109, 101, 147, 105, 106, 110, 104, 945 77, 111, 100, 112, 102, 113, 478, 104, 114, 74, 946 147, 106, 115, 169, 74, 109, 476, 77, 473, 106, 947 110, 470, 77, 111, 469, 112, 169, 113, 109, 206, 948 114, 122, 122, 122, 115, 126, 126, 110, 186, 186, 949 186, 111, 116, 112, 468, 116, 116, 114, 116, 463, 950 951 113, 206, 115, 461, 113, 123, 116, 123, 123, 123, 952 459, 124, 458, 124, 116, 123, 124, 124, 124, 152, 953 457, 125, 152, 125, 125, 125, 188, 188, 188, 123, 954 125, 125, 189, 189, 152, 456, 209, 211, 212, 239, 955 239, 125, 125, 125, 125, 125, 125, 187, 187, 217, 956 216, 187, 219, 221, 224, 225, 228, 187, 209, 211, 957 212, 187, 187, 187, 187, 216, 226, 227, 229, 230, 958 231, 217, 216, 232, 219, 221, 224, 225, 228, 234, 959 234, 234, 455, 453, 228, 451, 224, 234, 226, 227, 960 229, 230, 231, 238, 450, 232, 226, 228, 313, 225, 961 962 224, 234, 449, 319, 230, 238, 229, 235, 235, 235, 963 318, 227, 231, 236, 236, 236, 237, 237, 237, 321, 964 313, 322, 323, 237, 237, 319, 324, 238, 443, 325, 965 327, 326, 318, 328, 237, 237, 237, 237, 237, 237, 966 442, 321, 318, 322, 323, 332, 333, 441, 324, 438, 967 321, 325, 327, 326, 436, 328, 434, 331, 373, 331, 968 325, 326, 331, 331, 331, 375, 378, 332, 333, 324, 969 327, 334, 379, 334, 380, 433, 334, 334, 334, 381, 970 373, 383, 383, 383, 384, 384, 384, 375, 378, 386, 971 386, 386, 432, 385, 379, 385, 380, 378, 385, 385, 972 973 385, 381, 387, 387, 387, 417, 418, 375, 419, 380, 974 420, 421, 444, 445, 379, 422, 422, 422, 381, 423, 975 423, 423, 446, 447, 466, 464, 431, 417, 418, 430, 976 419, 429, 420, 421, 444, 445, 467, 479, 480, 488, 977 427, 426, 420, 444, 446, 447, 466, 464, 417, 425, 978 418, 419, 424, 446, 464, 447, 414, 411, 467, 479, 979 480, 488, 410, 409, 408, 406, 405, 404, 466, 403, 980 402, 401, 400, 399, 398, 397, 393, 392, 391, 389, 981 388, 479, 500, 500, 500, 500, 500, 500, 500, 500, 982 500, 500, 500, 500, 501, 501, 501, 501, 501, 501, 983 984 501, 501, 501, 501, 501, 501, 502, 502, 502, 502, 985 502, 502, 502, 502, 502, 502, 502, 502, 503, 503, 986 503, 503, 503, 503, 503, 503, 503, 503, 503, 503, 987 504, 371, 370, 369, 504, 504, 505, 367, 505, 505, 988 505, 505, 505, 505, 505, 505, 505, 505, 506, 363, 989 362, 506, 506, 506, 506, 506, 506, 506, 506, 506, 990 507, 507, 507, 507, 508, 508, 509, 509, 510, 361, 991 360, 359, 510, 510, 510, 510, 510, 510, 510, 510, 992 511, 358, 511, 511, 511, 357, 511, 511, 511, 511, 993 511, 511, 512, 356, 512, 512, 512, 355, 512, 512, 994 995 512, 512, 512, 512, 513, 354, 513, 513, 513, 353, 996 513, 513, 513, 513, 513, 513, 514, 514, 515, 515, 997 515, 515, 516, 516, 516, 516, 517, 517, 517, 517, 998 517, 518, 518, 518, 518, 519, 519, 519, 520, 520, 999 351, 350, 349, 348, 347, 346, 344, 343, 341, 340, 1000 337, 336, 335, 288, 287, 286, 285, 284, 283, 282, 1001 281, 280, 279, 278, 277, 276, 274, 273, 272, 270, 1002 266, 265, 264, 262, 261, 260, 259, 258, 257, 256, 1003 255, 254, 252, 251, 250, 249, 248, 247, 245, 243, 1004 242, 233, 222, 214, 179, 178, 177, 176, 175, 174, 1005 1006 173, 172, 171, 170, 168, 167, 166, 165, 164, 163, 1007 162, 161, 160, 158, 157, 156, 155, 154, 153, 150, 1008 149, 148, 146, 144, 143, 142, 141, 140, 138, 137, 1009 128, 120, 107, 88, 84, 80, 67, 65, 64, 63, 1010 62, 61, 58, 55, 47, 44, 41, 40, 38, 37, 1011 35, 31, 30, 28, 23, 21, 17, 16, 15, 14, 1012 13, 499, 499, 499, 499, 499, 499, 499, 499, 499, 1013 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 1014 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 1015 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 1016 1017 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 1018 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 1019 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 1020 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 1021 499, 499, 499, 499, 499 1022 } ; 1023 1024/* The intent behind this definition is that it'll catch 1025 * any uses of REJECT which flex missed. 1026 */ 1027#define REJECT reject_used_but_not_detected 1028#define yymore() yymore_used_but_not_detected 1029#define YY_MORE_ADJ 0 1030#define YY_RESTORE_YY_MORE_OFFSET 1031/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 1032/* 1033 * Main authors: 1034 * Guido Tack <guido.tack@monash.edu> 1035 */ 1036/* This Source Code Form is subject to the terms of the Mozilla Public 1037 * License, v. 2.0. If a copy of the MPL was not distributed with this 1038 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1039#if defined __GNUC__ 1040#pragma GCC diagnostic ignored "-Wunused-function" 1041#pragma GCC diagnostic ignored "-Wunused-parameter" 1042#pragma GCC diagnostic ignored "-Wsign-compare" 1043#pragma GCC diagnostic ignored "-Wdeprecated" 1044#elif defined _MSC_VER 1045#pragma warning(push, 1) 1046#endif 1047 1048namespace MiniZinc{ class ParserLocation; } 1049#define YYLTYPE MiniZinc::ParserLocation 1050#define YYLTYPE_IS_DECLARED 1 1051#define YYLTYPE_IS_TRIVIAL 0 1052 1053#include <minizinc/parser.hh> 1054 1055int utf8len(const char* s) { 1056 int l=0; 1057 for (int i=0; s[i] != '\0'; i++) 1058 if ((s[i] & 0xc0) != 0x80) 1059 l++; 1060 return l; 1061} 1062 1063int yy_input_proc(char* buf, int size, yyscan_t yyscanner); 1064#define YY_INPUT(buf, result, max_size) \ 1065 result = yy_input_proc(buf, max_size, yyscanner); 1066 1067#define YY_USER_ACTION \ 1068 { MiniZinc::ParserState* parm = \ 1069 static_cast<MiniZinc::ParserState*>(yyget_extra(yyscanner)); \ 1070 yylloc->first_line(yylloc->last_line()); \ 1071 yylloc->first_column(yylloc->last_column()+1); \ 1072 if(parm->hadNewline) { \ 1073 parm->hadNewline=false; \ 1074 parm->lineStartPos += parm->nTokenNextStart; \ 1075 parm->nTokenNextStart=1; \ 1076 yylloc->last_line(yylloc->last_line()+1); \ 1077 yylloc->first_line(yylloc->last_line()); \ 1078 yylloc->first_column(1); \ 1079 } \ 1080 if(yytext[0] == '\n') { \ 1081 parm->hadNewline=true; \ 1082 parm->nTokenNextStart+=0; \ 1083 } else { \ 1084 parm->nTokenNextStart+=yyleng; \ 1085 } \ 1086 yylloc->last_column(yylloc->first_column()+utf8len(yytext)-1); \ 1087 } 1088 1089bool hexstrtointval(const char* s, long long int& v) { 1090 std::istringstream iss(s); 1091 iss >> std::hex >> v; 1092 return !iss.fail(); 1093} 1094 1095bool octstrtointval(const char* s, long long int& v) { 1096 std::istringstream iss(s); 1097 iss >> std::oct >> v; 1098 return !iss.fail(); 1099} 1100 1101bool fast_strtointval(const char* s, long long int& v) { 1102 MiniZinc::IntVal x = 0; 1103 try { 1104 for (; *s != '\0'; ++s) { 1105 x = (x*10) + (*s - '0'); 1106 } 1107 } catch (MiniZinc::ArithmeticError&) { 1108 return false; 1109 } 1110 v = x.toInt(); 1111 return true; 1112} 1113 1114bool strtofloatval(const char* s, double& v) { 1115 std::istringstream iss(s); 1116 iss >> v; 1117 return !iss.fail(); 1118} 1119 1120void clearBuffer(void* parm) { 1121 MiniZinc::ParserState* pp = 1122 static_cast<MiniZinc::ParserState*>(parm); 1123 pp->stringBuffer = ""; 1124} 1125 1126void appendBufferString(void* parm, const char* s) { 1127 MiniZinc::ParserState* pp = 1128 static_cast<MiniZinc::ParserState*>(parm); 1129 pp->stringBuffer += s; 1130} 1131 1132void appendBufferChar(void* parm, char s) { 1133 MiniZinc::ParserState* pp = 1134 static_cast<MiniZinc::ParserState*>(parm); 1135 pp->stringBuffer += s; 1136} 1137 1138char* bufferData(void* parm) { 1139 MiniZinc::ParserState* pp = 1140 static_cast<MiniZinc::ParserState*>(parm); 1141 return strdup(pp->stringBuffer.c_str()); 1142} 1143 1144#define INITIAL 0 1145#define string 1 1146#define string_quote 2 1147#define multilinecomment 3 1148#define doccomment 4 1149#define doccomment_file 5 1150#define bracket_exp 6 1151#define quoted_exp 7 1152 1153#ifndef YY_NO_UNISTD_H 1154/* Special case for "unistd.h", since it is non-ANSI. We include it way 1155 * down here because we want the user's section 1 to have been scanned first. 1156 * The user has a chance to override it with an option. 1157 */ 1158#include <unistd.h> 1159#endif 1160 1161#ifndef YY_EXTRA_TYPE 1162#define YY_EXTRA_TYPE void * 1163#endif 1164 1165/* Holds the entire state of the reentrant scanner. */ 1166struct yyguts_t 1167 { 1168 1169 /* User-defined. Not touched by flex. */ 1170 YY_EXTRA_TYPE yyextra_r; 1171 1172 /* The rest are the same as the globals declared in the non-reentrant scanner. */ 1173 FILE *yyin_r, *yyout_r; 1174 size_t yy_buffer_stack_top; /**< index of top of stack. */ 1175 size_t yy_buffer_stack_max; /**< capacity of stack. */ 1176 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ 1177 char yy_hold_char; 1178 int yy_n_chars; 1179 int yyleng_r; 1180 char *yy_c_buf_p; 1181 int yy_init; 1182 int yy_start; 1183 int yy_did_buffer_switch_on_eof; 1184 int yy_start_stack_ptr; 1185 int yy_start_stack_depth; 1186 int *yy_start_stack; 1187 yy_state_type yy_last_accepting_state; 1188 char* yy_last_accepting_cpos; 1189 1190 int yylineno_r; 1191 int yy_flex_debug_r; 1192 1193 char *yytext_r; 1194 int yy_more_flag; 1195 int yy_more_len; 1196 1197 YYSTYPE * yylval_r; 1198 1199 YYLTYPE * yylloc_r; 1200 1201 }; /* end struct yyguts_t */ 1202 1203static int yy_init_globals ( yyscan_t yyscanner ); 1204 1205 /* This must go here because YYSTYPE and YYLTYPE are included 1206 * from bison output in section 1.*/ 1207 # define yylval yyg->yylval_r 1208 1209 # define yylloc yyg->yylloc_r 1210 1211int yylex_init (yyscan_t* scanner); 1212 1213int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); 1214 1215/* Accessor methods to globals. 1216 These are made visible to non-reentrant scanners for convenience. */ 1217 1218int yylex_destroy ( yyscan_t yyscanner ); 1219 1220int yyget_debug ( yyscan_t yyscanner ); 1221 1222void yyset_debug ( int debug_flag , yyscan_t yyscanner ); 1223 1224YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); 1225 1226void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); 1227 1228FILE *yyget_in ( yyscan_t yyscanner ); 1229 1230void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); 1231 1232FILE *yyget_out ( yyscan_t yyscanner ); 1233 1234void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); 1235 1236 int yyget_leng ( yyscan_t yyscanner ); 1237 1238char *yyget_text ( yyscan_t yyscanner ); 1239 1240int yyget_lineno ( yyscan_t yyscanner ); 1241 1242void yyset_lineno ( int _line_number , yyscan_t yyscanner ); 1243 1244int yyget_column ( yyscan_t yyscanner ); 1245 1246void yyset_column ( int _column_no , yyscan_t yyscanner ); 1247 1248YYSTYPE * yyget_lval ( yyscan_t yyscanner ); 1249 1250void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); 1251 1252 YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); 1253 1254 void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); 1255 1256/* Macros after this point can all be overridden by user definitions in 1257 * section 1. 1258 */ 1259 1260#ifndef YY_SKIP_YYWRAP 1261#ifdef __cplusplus 1262extern "C" int yywrap ( yyscan_t yyscanner ); 1263#else 1264extern int yywrap ( yyscan_t yyscanner ); 1265#endif 1266#endif 1267 1268#ifndef YY_NO_UNPUT 1269 1270 static void yyunput ( int c, char *buf_ptr , yyscan_t yyscanner); 1271 1272#endif 1273 1274#ifndef yytext_ptr 1275static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); 1276#endif 1277 1278#ifdef YY_NEED_STRLEN 1279static int yy_flex_strlen ( const char * , yyscan_t yyscanner); 1280#endif 1281 1282#ifndef YY_NO_INPUT 1283#ifdef __cplusplus 1284static int yyinput ( yyscan_t yyscanner ); 1285#else 1286static int input ( yyscan_t yyscanner ); 1287#endif 1288 1289#endif 1290 1291 static void yy_push_state ( int _new_state , yyscan_t yyscanner); 1292 1293 static void yy_pop_state ( yyscan_t yyscanner ); 1294 1295 static int yy_top_state ( yyscan_t yyscanner ); 1296 1297/* Amount of stuff to slurp up with each read. */ 1298#ifndef YY_READ_BUF_SIZE 1299#ifdef __ia64__ 1300/* On IA-64, the buffer size is 16k, not 8k */ 1301#define YY_READ_BUF_SIZE 16384 1302#else 1303#define YY_READ_BUF_SIZE 8192 1304#endif /* __ia64__ */ 1305#endif 1306 1307/* Copy whatever the last rule matched to the standard output. */ 1308#ifndef ECHO 1309/* This used to be an fputs(), but since the string might contain NUL's, 1310 * we now use fwrite(). 1311 */ 1312#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) 1313#endif 1314 1315/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, 1316 * is returned in "result". 1317 */ 1318#ifndef YY_INPUT 1319#define YY_INPUT(buf,result,max_size) \ 1320 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 1321 { \ 1322 int c = '*'; \ 1323 int n; \ 1324 for ( n = 0; n < max_size && \ 1325 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 1326 buf[n] = (char) c; \ 1327 if ( c == '\n' ) \ 1328 buf[n++] = (char) c; \ 1329 if ( c == EOF && ferror( yyin ) ) \ 1330 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 1331 result = n; \ 1332 } \ 1333 else \ 1334 { \ 1335 errno=0; \ 1336 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ 1337 { \ 1338 if( errno != EINTR) \ 1339 { \ 1340 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 1341 break; \ 1342 } \ 1343 errno=0; \ 1344 clearerr(yyin); \ 1345 } \ 1346 }\ 1347\ 1348 1349#endif 1350 1351/* No semi-colon after return; correct usage is to write "yyterminate();" - 1352 * we don't want an extra ';' after the "return" because that will cause 1353 * some compilers to complain about unreachable statements. 1354 */ 1355#ifndef yyterminate 1356#define yyterminate() return YY_NULL 1357#endif 1358 1359/* Number of entries by which start-condition stack grows. */ 1360#ifndef YY_START_STACK_INCR 1361#define YY_START_STACK_INCR 25 1362#endif 1363 1364/* Report a fatal error. */ 1365#ifndef YY_FATAL_ERROR 1366#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) 1367#endif 1368 1369/* end tables serialization structures and prototypes */ 1370 1371/* Default declaration of generated scanner - a define so the user can 1372 * easily add parameters. 1373 */ 1374#ifndef YY_DECL 1375#define YY_DECL_IS_OURS 1 1376 1377extern int yylex \ 1378 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); 1379 1380#define YY_DECL int yylex \ 1381 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) 1382#endif /* !YY_DECL */ 1383 1384/* Code executed at the beginning of each rule, after yytext and yyleng 1385 * have been set up. 1386 */ 1387#ifndef YY_USER_ACTION 1388#define YY_USER_ACTION 1389#endif 1390 1391/* Code executed at the end of each rule. */ 1392#ifndef YY_BREAK 1393#define YY_BREAK /*LINTED*/break; 1394#endif 1395 1396#define YY_RULE_SETUP \ 1397 YY_USER_ACTION 1398 1399/** The main scanner function which does all the work. 1400 */ 1401YY_DECL 1402{ 1403 yy_state_type yy_current_state; 1404 char *yy_cp, *yy_bp; 1405 int yy_act; 1406 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 1407 1408 yylval = yylval_param; 1409 1410 yylloc = yylloc_param; 1411 1412 if ( !yyg->yy_init ) 1413 { 1414 yyg->yy_init = 1; 1415 1416#ifdef YY_USER_INIT 1417 YY_USER_INIT; 1418#endif 1419 1420 if ( ! yyg->yy_start ) 1421 yyg->yy_start = 1; /* first start state */ 1422 1423 if ( ! yyin ) 1424 yyin = stdin; 1425 1426 if ( ! yyout ) 1427 yyout = stdout; 1428 1429 if ( ! YY_CURRENT_BUFFER ) { 1430 yyensure_buffer_stack (yyscanner); 1431 YY_CURRENT_BUFFER_LVALUE = 1432 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); 1433 } 1434 1435 yy_load_buffer_state( yyscanner ); 1436 } 1437 1438 { 1439 1440 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ 1441 { 1442 yy_cp = yyg->yy_c_buf_p; 1443 1444 /* Support of yytext. */ 1445 *yy_cp = yyg->yy_hold_char; 1446 1447 /* yy_bp points to the position in yy_ch_buf of the start of 1448 * the current run. 1449 */ 1450 yy_bp = yy_cp; 1451 1452 yy_current_state = yyg->yy_start; 1453yy_match: 1454 do 1455 { 1456 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; 1457 if ( yy_accept[yy_current_state] ) 1458 { 1459 yyg->yy_last_accepting_state = yy_current_state; 1460 yyg->yy_last_accepting_cpos = yy_cp; 1461 } 1462 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1463 { 1464 yy_current_state = (int) yy_def[yy_current_state]; 1465 if ( yy_current_state >= 500 ) 1466 yy_c = yy_meta[yy_c]; 1467 } 1468 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; 1469 ++yy_cp; 1470 } 1471 while ( yy_base[yy_current_state] != 862 ); 1472 1473yy_find_action: 1474 yy_act = yy_accept[yy_current_state]; 1475 if ( yy_act == 0 ) 1476 { /* have to back up */ 1477 yy_cp = yyg->yy_last_accepting_cpos; 1478 yy_current_state = yyg->yy_last_accepting_state; 1479 yy_act = yy_accept[yy_current_state]; 1480 } 1481 1482 YY_DO_BEFORE_ACTION; 1483 1484do_action: /* This label is used only to access EOF actions. */ 1485 1486 switch ( yy_act ) 1487 { /* beginning of action switch */ 1488 case 0: /* must back up */ 1489 /* undo the effects of YY_DO_BEFORE_ACTION */ 1490 *yy_cp = yyg->yy_hold_char; 1491 yy_cp = yyg->yy_last_accepting_cpos; 1492 yy_current_state = yyg->yy_last_accepting_state; 1493 goto yy_find_action; 1494 1495case 1: 1496YY_RULE_SETUP 1497{ return MZN_INVALID_NULL; } 1498 YY_BREAK 1499case 2: 1500/* rule 2 can match eol */ 1501YY_RULE_SETUP 1502{ } 1503 YY_BREAK 1504case 3: 1505YY_RULE_SETUP 1506{ /* ignore whitespace */ } 1507 YY_BREAK 1508case 4: 1509YY_RULE_SETUP 1510{ yy_push_state(doccomment,yyscanner); clearBuffer(yyget_extra(yyscanner)); } 1511 YY_BREAK 1512 1513case 5: 1514YY_RULE_SETUP 1515{ yylval->sValue = bufferData(yyget_extra(yyscanner)); 1516 yy_pop_state(yyscanner); return MZN_DOC_COMMENT; } 1517 YY_BREAK 1518case 6: 1519YY_RULE_SETUP 1520{ appendBufferString(yyget_extra(yyscanner), yytext); } 1521 YY_BREAK 1522case 7: 1523YY_RULE_SETUP 1524{ appendBufferString(yyget_extra(yyscanner), yytext); } 1525 YY_BREAK 1526case 8: 1527/* rule 8 can match eol */ 1528YY_RULE_SETUP 1529{ appendBufferString(yyget_extra(yyscanner), yytext); } 1530 YY_BREAK 1531 1532case 9: 1533YY_RULE_SETUP 1534{ yy_push_state(doccomment_file,yyscanner); clearBuffer(yyget_extra(yyscanner)); } 1535 YY_BREAK 1536 1537case 10: 1538YY_RULE_SETUP 1539{ yylval->sValue = bufferData(yyget_extra(yyscanner)); 1540 yy_pop_state(yyscanner); return MZN_DOC_FILE_COMMENT; } 1541 YY_BREAK 1542case 11: 1543YY_RULE_SETUP 1544{ appendBufferString(yyget_extra(yyscanner), yytext); } 1545 YY_BREAK 1546case 12: 1547YY_RULE_SETUP 1548{ appendBufferString(yyget_extra(yyscanner), yytext); } 1549 YY_BREAK 1550case 13: 1551/* rule 13 can match eol */ 1552YY_RULE_SETUP 1553{ appendBufferString(yyget_extra(yyscanner), yytext); } 1554 YY_BREAK 1555 1556case 14: 1557YY_RULE_SETUP 1558{ yy_push_state(multilinecomment,yyscanner); } 1559 YY_BREAK 1560 1561case 15: 1562YY_RULE_SETUP 1563{ yy_pop_state(yyscanner); } 1564 YY_BREAK 1565case 16: 1566YY_RULE_SETUP 1567{ } 1568 YY_BREAK 1569case 17: 1570YY_RULE_SETUP 1571{ } 1572 YY_BREAK 1573case 18: 1574/* rule 18 can match eol */ 1575YY_RULE_SETUP 1576{ } 1577 YY_BREAK 1578 1579case 19: 1580YY_RULE_SETUP 1581{ return MZN_LEFT_BRACKET; } 1582 YY_BREAK 1583case 20: 1584YY_RULE_SETUP 1585{ return MZN_LEFT_2D_BRACKET; } 1586 YY_BREAK 1587case 21: 1588YY_RULE_SETUP 1589{ return MZN_RIGHT_BRACKET; } 1590 YY_BREAK 1591case 22: 1592YY_RULE_SETUP 1593{ return MZN_RIGHT_2D_BRACKET; } 1594 YY_BREAK 1595case 23: 1596YY_RULE_SETUP 1597{ /* ignore comments */ } 1598 YY_BREAK 1599case 24: 1600YY_RULE_SETUP 1601{ yylval->iValue = 1; return MZN_BOOL_LITERAL; } 1602 YY_BREAK 1603case 25: 1604YY_RULE_SETUP 1605{ yylval->iValue = 0; return MZN_BOOL_LITERAL; } 1606 YY_BREAK 1607case 26: 1608YY_RULE_SETUP 1609{ 1610 if (strtofloatval(yytext, yylval->dValue)) 1611 return MZN_FLOAT_LITERAL; 1612 else 1613 return MZN_INVALID_FLOAT_LITERAL; 1614 } 1615 YY_BREAK 1616case 27: 1617YY_RULE_SETUP 1618{ 1619 if (hexstrtointval(yytext+2, yylval->iValue)) 1620 return MZN_INTEGER_LITERAL; 1621 else 1622 return MZN_INVALID_INTEGER_LITERAL; 1623 } 1624 YY_BREAK 1625case 28: 1626YY_RULE_SETUP 1627{ 1628 if (octstrtointval(yytext+2, yylval->iValue)) 1629 return MZN_INTEGER_LITERAL; 1630 else 1631 return MZN_INVALID_INTEGER_LITERAL; 1632 } 1633 YY_BREAK 1634case 29: 1635YY_RULE_SETUP 1636{ 1637 if (fast_strtointval(yytext, yylval->iValue)) 1638 return MZN_INTEGER_LITERAL; 1639 else 1640 return MZN_INVALID_INTEGER_LITERAL; 1641 } 1642 YY_BREAK 1643case 30: 1644YY_RULE_SETUP 1645{ 1646 if (strtofloatval(yytext, yylval->dValue)) 1647 return MZN_FLOAT_LITERAL; 1648 else 1649 return MZN_INVALID_FLOAT_LITERAL; 1650 } 1651 YY_BREAK 1652case 31: 1653YY_RULE_SETUP 1654{ 1655 if (strtofloatval(yytext, yylval->dValue)) 1656 return MZN_FLOAT_LITERAL; 1657 else 1658 return MZN_INVALID_FLOAT_LITERAL; 1659 } 1660 YY_BREAK 1661case 32: 1662YY_RULE_SETUP 1663{ 1664 if (strtofloatval(yytext, yylval->dValue)) 1665 return MZN_FLOAT_LITERAL; 1666 else 1667 return MZN_INVALID_FLOAT_LITERAL; 1668 } 1669 YY_BREAK 1670case 33: 1671YY_RULE_SETUP 1672{ 1673 return *yytext; } 1674 YY_BREAK 1675case 34: 1676YY_RULE_SETUP 1677{ return MZN_DOTDOT; } 1678 YY_BREAK 1679case 35: 1680YY_RULE_SETUP 1681{ return MZN_DOTDOT_QUOTED; } 1682 YY_BREAK 1683case 36: 1684YY_RULE_SETUP 1685{ return MZN_COLONCOLON; } 1686 YY_BREAK 1687case 37: 1688YY_RULE_SETUP 1689{ return MZN_UNDERSCORE; } 1690 YY_BREAK 1691case 38: 1692YY_RULE_SETUP 1693{ return MZN_ANN; } 1694 YY_BREAK 1695case 39: 1696YY_RULE_SETUP 1697{ return MZN_ANNOTATION; } 1698 YY_BREAK 1699case 40: 1700YY_RULE_SETUP 1701{ return MZN_ANY; } 1702 YY_BREAK 1703case 41: 1704YY_RULE_SETUP 1705{ return MZN_ARRAY; } 1706 YY_BREAK 1707case 42: 1708YY_RULE_SETUP 1709{ return MZN_BOOL; } 1710 YY_BREAK 1711case 43: 1712YY_RULE_SETUP 1713{ return MZN_CASE; } 1714 YY_BREAK 1715case 44: 1716YY_RULE_SETUP 1717{ return MZN_CONSTRAINT; } 1718 YY_BREAK 1719case 45: 1720YY_RULE_SETUP 1721{ return MZN_DEFAULT; } 1722 YY_BREAK 1723case 46: 1724YY_RULE_SETUP 1725{ return MZN_IDIV; } 1726 YY_BREAK 1727case 47: 1728YY_RULE_SETUP 1729{ return MZN_IDIV_QUOTED; } 1730 YY_BREAK 1731case 48: 1732YY_RULE_SETUP 1733{ return MZN_DIFF; } 1734 YY_BREAK 1735case 49: 1736YY_RULE_SETUP 1737{ return MZN_DIFF_QUOTED; } 1738 YY_BREAK 1739case 50: 1740YY_RULE_SETUP 1741{ return MZN_ELSE; } 1742 YY_BREAK 1743case 51: 1744YY_RULE_SETUP 1745{ return MZN_ELSEIF; } 1746 YY_BREAK 1747case 52: 1748YY_RULE_SETUP 1749{ return MZN_ENDIF; } 1750 YY_BREAK 1751case 53: 1752YY_RULE_SETUP 1753{ return MZN_ENUM; } 1754 YY_BREAK 1755case 54: 1756YY_RULE_SETUP 1757{ return MZN_FLOAT; } 1758 YY_BREAK 1759case 55: 1760YY_RULE_SETUP 1761{ return MZN_FUNCTION; } 1762 YY_BREAK 1763case 56: 1764YY_RULE_SETUP 1765{ return MZN_IF; } 1766 YY_BREAK 1767case 57: 1768YY_RULE_SETUP 1769{ return MZN_INCLUDE; } 1770 YY_BREAK 1771case 58: 1772YY_RULE_SETUP 1773{ return MZN_INFINITY; } 1774 YY_BREAK 1775case 59: 1776YY_RULE_SETUP 1777{ return MZN_INTERSECT; } 1778 YY_BREAK 1779case 60: 1780YY_RULE_SETUP 1781{ return MZN_INTERSECT_QUOTED; } 1782 YY_BREAK 1783case 61: 1784YY_RULE_SETUP 1785{ return MZN_IN; } 1786 YY_BREAK 1787case 62: 1788YY_RULE_SETUP 1789{ return MZN_IN_QUOTED; } 1790 YY_BREAK 1791case 63: 1792YY_RULE_SETUP 1793{ return MZN_INT; } 1794 YY_BREAK 1795case 64: 1796YY_RULE_SETUP 1797{ return MZN_LET; } 1798 YY_BREAK 1799case 65: 1800YY_RULE_SETUP 1801{ return MZN_LIST; } 1802 YY_BREAK 1803case 66: 1804YY_RULE_SETUP 1805{ yylval->bValue = false; return MZN_MAXIMIZE; } 1806 YY_BREAK 1807case 67: 1808YY_RULE_SETUP 1809{ yylval->bValue = true; return MZN_MINIMIZE; } 1810 YY_BREAK 1811case 68: 1812YY_RULE_SETUP 1813{ return MZN_MOD; } 1814 YY_BREAK 1815case 69: 1816YY_RULE_SETUP 1817{ return MZN_MOD_QUOTED; } 1818 YY_BREAK 1819case 70: 1820YY_RULE_SETUP 1821{ return MZN_NOT; } 1822 YY_BREAK 1823case 71: 1824YY_RULE_SETUP 1825{ return MZN_NOT_QUOTED; } 1826 YY_BREAK 1827case 72: 1828YY_RULE_SETUP 1829{ return MZN_OF; } 1830 YY_BREAK 1831case 73: 1832YY_RULE_SETUP 1833{ return MZN_OUTPUT; } 1834 YY_BREAK 1835case 74: 1836YY_RULE_SETUP 1837{ return MZN_OPT; } 1838 YY_BREAK 1839case 75: 1840YY_RULE_SETUP 1841{ return MZN_PAR; } 1842 YY_BREAK 1843case 76: 1844YY_RULE_SETUP 1845{ return MZN_PREDICATE; } 1846 YY_BREAK 1847case 77: 1848YY_RULE_SETUP 1849{ return MZN_RECORD; } 1850 YY_BREAK 1851case 78: 1852YY_RULE_SETUP 1853{ return MZN_SATISFY; } 1854 YY_BREAK 1855case 79: 1856YY_RULE_SETUP 1857{ return MZN_SET; } 1858 YY_BREAK 1859case 80: 1860YY_RULE_SETUP 1861{ return MZN_SOLVE; } 1862 YY_BREAK 1863case 81: 1864YY_RULE_SETUP 1865{ return MZN_STRING; } 1866 YY_BREAK 1867case 82: 1868YY_RULE_SETUP 1869{ return MZN_SUBSET; } 1870 YY_BREAK 1871case 83: 1872YY_RULE_SETUP 1873{ return MZN_SUBSET_QUOTED; } 1874 YY_BREAK 1875case 84: 1876YY_RULE_SETUP 1877{ return MZN_SUPERSET; } 1878 YY_BREAK 1879case 85: 1880YY_RULE_SETUP 1881{ return MZN_SUPERSET_QUOTED; } 1882 YY_BREAK 1883case 86: 1884YY_RULE_SETUP 1885{ return MZN_SYMDIFF; } 1886 YY_BREAK 1887case 87: 1888YY_RULE_SETUP 1889{ return MZN_SYMDIFF_QUOTED; } 1890 YY_BREAK 1891case 88: 1892YY_RULE_SETUP 1893{ return MZN_TEST; } 1894 YY_BREAK 1895case 89: 1896YY_RULE_SETUP 1897{ return MZN_THEN; } 1898 YY_BREAK 1899case 90: 1900YY_RULE_SETUP 1901{ return MZN_TUPLE; } 1902 YY_BREAK 1903case 91: 1904YY_RULE_SETUP 1905{ return MZN_TYPE; } 1906 YY_BREAK 1907case 92: 1908YY_RULE_SETUP 1909{ return MZN_UNION; } 1910 YY_BREAK 1911case 93: 1912YY_RULE_SETUP 1913{ return MZN_UNION_QUOTED; } 1914 YY_BREAK 1915case 94: 1916YY_RULE_SETUP 1917{ return MZN_VAR; } 1918 YY_BREAK 1919case 95: 1920YY_RULE_SETUP 1921{ return MZN_VARIANT_RECORD; } 1922 YY_BREAK 1923case 96: 1924YY_RULE_SETUP 1925{ return MZN_WHERE; } 1926 YY_BREAK 1927case 97: 1928YY_RULE_SETUP 1929{ return MZN_XOR; } 1930 YY_BREAK 1931case 98: 1932YY_RULE_SETUP 1933{ return MZN_XOR_QUOTED; } 1934 YY_BREAK 1935case 99: 1936YY_RULE_SETUP 1937{ return MZN_PLUS; } 1938 YY_BREAK 1939case 100: 1940YY_RULE_SETUP 1941{ return MZN_PLUS_QUOTED; } 1942 YY_BREAK 1943case 101: 1944YY_RULE_SETUP 1945{ return MZN_MINUS; } 1946 YY_BREAK 1947case 102: 1948YY_RULE_SETUP 1949{ return MZN_MINUS_QUOTED; } 1950 YY_BREAK 1951case 103: 1952YY_RULE_SETUP 1953{ return MZN_MULT; } 1954 YY_BREAK 1955case 104: 1956YY_RULE_SETUP 1957{ return MZN_MULT_QUOTED; } 1958 YY_BREAK 1959case 105: 1960YY_RULE_SETUP 1961{ return MZN_DIV; } 1962 YY_BREAK 1963case 106: 1964YY_RULE_SETUP 1965{ return MZN_DIV_QUOTED; } 1966 YY_BREAK 1967case 107: 1968YY_RULE_SETUP 1969{ return MZN_POW; } 1970 YY_BREAK 1971case 108: 1972YY_RULE_SETUP 1973{ return MZN_POW_QUOTED; } 1974 YY_BREAK 1975case 109: 1976YY_RULE_SETUP 1977{ return MZN_PLUSPLUS; } 1978 YY_BREAK 1979case 110: 1980YY_RULE_SETUP 1981{ return MZN_PLUSPLUS_QUOTED; } 1982 YY_BREAK 1983case 111: 1984YY_RULE_SETUP 1985{ return MZN_ABSENT; } 1986 YY_BREAK 1987case 112: 1988YY_RULE_SETUP 1989{ return MZN_LE; } 1990 YY_BREAK 1991case 113: 1992YY_RULE_SETUP 1993{ return MZN_LE_QUOTED; } 1994 YY_BREAK 1995case 114: 1996YY_RULE_SETUP 1997{ return MZN_LQ; } 1998 YY_BREAK 1999case 115: 2000YY_RULE_SETUP 2001{ return MZN_LQ_QUOTED; } 2002 YY_BREAK 2003case 116: 2004YY_RULE_SETUP 2005{ return MZN_GR; } 2006 YY_BREAK 2007case 117: 2008YY_RULE_SETUP 2009{ return MZN_GR_QUOTED; } 2010 YY_BREAK 2011case 118: 2012YY_RULE_SETUP 2013{ return MZN_GQ; } 2014 YY_BREAK 2015case 119: 2016YY_RULE_SETUP 2017{ return MZN_GQ_QUOTED; } 2018 YY_BREAK 2019case 120: 2020YY_RULE_SETUP 2021{ return MZN_EQ; } 2022 YY_BREAK 2023case 121: 2024YY_RULE_SETUP 2025{ return MZN_EQ_QUOTED; } 2026 YY_BREAK 2027case 122: 2028YY_RULE_SETUP 2029{ return MZN_EQ; } 2030 YY_BREAK 2031case 123: 2032YY_RULE_SETUP 2033{ return MZN_EQ_QUOTED; } 2034 YY_BREAK 2035case 124: 2036YY_RULE_SETUP 2037{ return MZN_NQ; } 2038 YY_BREAK 2039case 125: 2040YY_RULE_SETUP 2041{ return MZN_NQ_QUOTED; } 2042 YY_BREAK 2043case 126: 2044YY_RULE_SETUP 2045{ return MZN_IMPL; } 2046 YY_BREAK 2047case 127: 2048YY_RULE_SETUP 2049{ return MZN_IMPL_QUOTED; } 2050 YY_BREAK 2051case 128: 2052YY_RULE_SETUP 2053{ return MZN_RIMPL; } 2054 YY_BREAK 2055case 129: 2056YY_RULE_SETUP 2057{ return MZN_RIMPL_QUOTED; } 2058 YY_BREAK 2059case 130: 2060YY_RULE_SETUP 2061{ return MZN_EQUIV; } 2062 YY_BREAK 2063case 131: 2064YY_RULE_SETUP 2065{ return MZN_EQUIV_QUOTED; } 2066 YY_BREAK 2067case 132: 2068YY_RULE_SETUP 2069{ return MZN_OR; } 2070 YY_BREAK 2071case 133: 2072YY_RULE_SETUP 2073{ return MZN_OR_QUOTED; } 2074 YY_BREAK 2075case 134: 2076YY_RULE_SETUP 2077{ return MZN_AND; } 2078 YY_BREAK 2079case 135: 2080YY_RULE_SETUP 2081{ return MZN_AND_QUOTED; } 2082 YY_BREAK 2083case 136: 2084YY_RULE_SETUP 2085{ return MZN_WEAK_PLUS; } 2086 YY_BREAK 2087case 137: 2088YY_RULE_SETUP 2089{ return MZN_WEAK_MULT; } 2090 YY_BREAK 2091case 138: 2092YY_RULE_SETUP 2093{ return MZN_WEAK_EQ; } 2094 YY_BREAK 2095case 139: 2096YY_RULE_SETUP 2097{ return MZN_WEAK_MINUS; } 2098 YY_BREAK 2099case 140: 2100YY_RULE_SETUP 2101{ 2102 yylval->sValue = strdup(yytext+1); 2103 yylval->sValue[strlen(yytext)-2] = 0; 2104 return MZN_IDENTIFIER; } 2105 YY_BREAK 2106case 141: 2107YY_RULE_SETUP 2108{ yylval->sValue = strdup(yytext); return MZN_IDENTIFIER; } 2109 YY_BREAK 2110case 142: 2111YY_RULE_SETUP 2112{ 2113 yylval->sValue = strdup(yytext); return MZN_IDENTIFIER; } 2114 YY_BREAK 2115case 143: 2116YY_RULE_SETUP 2117{ 2118 yylval->sValue = strdup(yytext); return MZN_IDENTIFIER; } 2119 YY_BREAK 2120case 144: 2121YY_RULE_SETUP 2122{ 2123 MiniZinc::ParserState* parm = 2124 static_cast<MiniZinc::ParserState*>(yyget_extra(yyscanner)); 2125 if (parm->isFlatZinc) { 2126 yylval->sValue = strdup(yytext); return MZN_IDENTIFIER; 2127 } else { 2128 return FLATZINC_IDENTIFIER; 2129 } 2130 } 2131 YY_BREAK 2132case 145: 2133YY_RULE_SETUP 2134{ yylval->sValue = strdup("forall"); return MZN_IDENTIFIER; } 2135 YY_BREAK 2136case 146: 2137YY_RULE_SETUP 2138{ yylval->sValue = strdup("exists"); return MZN_IDENTIFIER; } 2139 YY_BREAK 2140case 147: 2141YY_RULE_SETUP 2142{ return MZN_IN; } 2143 YY_BREAK 2144case 148: 2145YY_RULE_SETUP 2146{ return MZN_SUBSET; } 2147 YY_BREAK 2148case 149: 2149YY_RULE_SETUP 2150{ return MZN_SUPERSET; } 2151 YY_BREAK 2152case 150: 2153YY_RULE_SETUP 2154{ return MZN_INFINITY; } 2155 YY_BREAK 2156case 151: 2157YY_RULE_SETUP 2158{ return MZN_NOT; } 2159 YY_BREAK 2160case 152: 2161YY_RULE_SETUP 2162{ return MZN_RIMPL; } 2163 YY_BREAK 2164case 153: 2165YY_RULE_SETUP 2166{ return MZN_IMPL; } 2167 YY_BREAK 2168case 154: 2169YY_RULE_SETUP 2170{ return MZN_EQUIV; } 2171 YY_BREAK 2172case 155: 2173YY_RULE_SETUP 2174{ return MZN_AND; } 2175 YY_BREAK 2176case 156: 2177YY_RULE_SETUP 2178{ return MZN_OR; } 2179 YY_BREAK 2180case 157: 2181YY_RULE_SETUP 2182{ return MZN_NQ; } 2183 YY_BREAK 2184case 158: 2185YY_RULE_SETUP 2186{ return MZN_LQ; } 2187 YY_BREAK 2188case 159: 2189YY_RULE_SETUP 2190{ return MZN_GQ; } 2191 YY_BREAK 2192case 160: 2193YY_RULE_SETUP 2194{ return MZN_UNION; } 2195 YY_BREAK 2196case 161: 2197YY_RULE_SETUP 2198{ return MZN_INTERSECT; } 2199 YY_BREAK 2200case 162: 2201YY_RULE_SETUP 2202{ 2203 yylval->sValue = strdup(yytext+1); return MZN_TI_ENUM_IDENTIFIER; } 2204 YY_BREAK 2205case 163: 2206YY_RULE_SETUP 2207{ 2208 yylval->sValue = strdup(yytext+1); return MZN_TI_IDENTIFIER; } 2209 YY_BREAK 2210case 164: 2211YY_RULE_SETUP 2212{ yy_push_state(bracket_exp,yyscanner); return *yytext; } 2213 YY_BREAK 2214case 165: 2215YY_RULE_SETUP 2216{ yy_pop_state(yyscanner); return *yytext; } 2217 YY_BREAK 2218case 166: 2219YY_RULE_SETUP 2220{ yy_pop_state(yyscanner); yy_pop_state(yyscanner); yy_push_state(string_quote,yyscanner); 2221 clearBuffer(yyget_extra(yyscanner)); } 2222 YY_BREAK 2223case 167: 2224YY_RULE_SETUP 2225{ yy_push_state(string,yyscanner); clearBuffer(yyget_extra(yyscanner)); } 2226 YY_BREAK 2227case 168: 2228YY_RULE_SETUP 2229{ appendBufferString(yyget_extra(yyscanner), yytext); } 2230 YY_BREAK 2231case 169: 2232YY_RULE_SETUP 2233{ appendBufferChar(yyget_extra(yyscanner), '\n'); } 2234 YY_BREAK 2235case 170: 2236YY_RULE_SETUP 2237{ appendBufferChar(yyget_extra(yyscanner), '\t'); } 2238 YY_BREAK 2239case 171: 2240YY_RULE_SETUP 2241{ appendBufferChar(yyget_extra(yyscanner), yytext[1]); } 2242 YY_BREAK 2243case 172: 2244YY_RULE_SETUP 2245{ appendBufferChar(yyget_extra(yyscanner), yytext[1]); } 2246 YY_BREAK 2247case 173: 2248YY_RULE_SETUP 2249{ yylval->sValue = bufferData(yyget_extra(yyscanner)); 2250 yy_push_state(quoted_exp,yyscanner); return MZN_STRING_QUOTE_START; } 2251 YY_BREAK 2252case 174: 2253YY_RULE_SETUP 2254{ yylval->sValue = bufferData(yyget_extra(yyscanner)); 2255 yy_push_state(quoted_exp,yyscanner); return MZN_STRING_QUOTE_MID; } 2256 YY_BREAK 2257case 175: 2258YY_RULE_SETUP 2259{ yylval->sValue = bufferData(yyget_extra(yyscanner)); 2260 yy_pop_state(yyscanner); return MZN_STRING_LITERAL; } 2261 YY_BREAK 2262case 176: 2263YY_RULE_SETUP 2264{ yylval->sValue = bufferData(yyget_extra(yyscanner)); 2265 yy_pop_state(yyscanner); return MZN_STRING_QUOTE_END; } 2266 YY_BREAK 2267case 177: 2268YY_RULE_SETUP 2269{ return (unsigned char)yytext[0]; } 2270 YY_BREAK 2271case 178: 2272/* rule 178 can match eol */ 2273YY_RULE_SETUP 2274{ return MZN_END_OF_LINE_IN_STRING; } 2275 YY_BREAK 2276case YY_STATE_EOF(string): 2277case YY_STATE_EOF(string_quote): 2278{ yy_pop_state(yyscanner); return MZN_UNTERMINATED_STRING; } 2279 YY_BREAK 2280case 179: 2281YY_RULE_SETUP 2282{ 2283 yylval->sValue = strdup(yytext+1); 2284 yylval->sValue[strlen(yytext)-2] = 0; 2285 return MZN_QUOTED_IDENTIFIER; } 2286 YY_BREAK 2287case 180: 2288YY_RULE_SETUP 2289{ return (unsigned char)yytext[0]; } 2290 YY_BREAK 2291case 181: 2292YY_RULE_SETUP 2293ECHO; 2294 YY_BREAK 2295case YY_STATE_EOF(INITIAL): 2296case YY_STATE_EOF(multilinecomment): 2297case YY_STATE_EOF(doccomment): 2298case YY_STATE_EOF(doccomment_file): 2299case YY_STATE_EOF(bracket_exp): 2300case YY_STATE_EOF(quoted_exp): 2301 yyterminate(); 2302 2303 case YY_END_OF_BUFFER: 2304 { 2305 /* Amount of text matched not including the EOB char. */ 2306 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; 2307 2308 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 2309 *yy_cp = yyg->yy_hold_char; 2310 YY_RESTORE_YY_MORE_OFFSET 2311 2312 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) 2313 { 2314 /* We're scanning a new file or input source. It's 2315 * possible that this happened because the user 2316 * just pointed yyin at a new source and called 2317 * yylex(). If so, then we have to assure 2318 * consistency between YY_CURRENT_BUFFER and our 2319 * globals. Here is the right place to do so, because 2320 * this is the first action (other than possibly a 2321 * back-up) that will match for the new input source. 2322 */ 2323 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 2324 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; 2325 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; 2326 } 2327 2328 /* Note that here we test for yy_c_buf_p "<=" to the position 2329 * of the first EOB in the buffer, since yy_c_buf_p will 2330 * already have been incremented past the NUL character 2331 * (since all states make transitions on EOB to the 2332 * end-of-buffer state). Contrast this with the test 2333 * in input(). 2334 */ 2335 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) 2336 { /* This was really a NUL. */ 2337 yy_state_type yy_next_state; 2338 2339 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; 2340 2341 yy_current_state = yy_get_previous_state( yyscanner ); 2342 2343 /* Okay, we're now positioned to make the NUL 2344 * transition. We couldn't have 2345 * yy_get_previous_state() go ahead and do it 2346 * for us because it doesn't know how to deal 2347 * with the possibility of jamming (and we don't 2348 * want to build jamming into it because then it 2349 * will run more slowly). 2350 */ 2351 2352 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); 2353 2354 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; 2355 2356 if ( yy_next_state ) 2357 { 2358 /* Consume the NUL. */ 2359 yy_cp = ++yyg->yy_c_buf_p; 2360 yy_current_state = yy_next_state; 2361 goto yy_match; 2362 } 2363 2364 else 2365 { 2366 yy_cp = yyg->yy_c_buf_p; 2367 goto yy_find_action; 2368 } 2369 } 2370 2371 else switch ( yy_get_next_buffer( yyscanner ) ) 2372 { 2373 case EOB_ACT_END_OF_FILE: 2374 { 2375 yyg->yy_did_buffer_switch_on_eof = 0; 2376 2377 if ( yywrap( yyscanner ) ) 2378 { 2379 /* Note: because we've taken care in 2380 * yy_get_next_buffer() to have set up 2381 * yytext, we can now set up 2382 * yy_c_buf_p so that if some total 2383 * hoser (like flex itself) wants to 2384 * call the scanner after we return the 2385 * YY_NULL, it'll still work - another 2386 * YY_NULL will get returned. 2387 */ 2388 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; 2389 2390 yy_act = YY_STATE_EOF(YY_START); 2391 goto do_action; 2392 } 2393 2394 else 2395 { 2396 if ( ! yyg->yy_did_buffer_switch_on_eof ) 2397 YY_NEW_FILE; 2398 } 2399 break; 2400 } 2401 2402 case EOB_ACT_CONTINUE_SCAN: 2403 yyg->yy_c_buf_p = 2404 yyg->yytext_ptr + yy_amount_of_matched_text; 2405 2406 yy_current_state = yy_get_previous_state( yyscanner ); 2407 2408 yy_cp = yyg->yy_c_buf_p; 2409 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; 2410 goto yy_match; 2411 2412 case EOB_ACT_LAST_MATCH: 2413 yyg->yy_c_buf_p = 2414 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; 2415 2416 yy_current_state = yy_get_previous_state( yyscanner ); 2417 2418 yy_cp = yyg->yy_c_buf_p; 2419 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; 2420 goto yy_find_action; 2421 } 2422 break; 2423 } 2424 2425 default: 2426 YY_FATAL_ERROR( 2427 "fatal flex scanner internal error--no action found" ); 2428 } /* end of action switch */ 2429 } /* end of scanning one token */ 2430 } /* end of user's declarations */ 2431} /* end of yylex */ 2432 2433/* yy_get_next_buffer - try to read in a new buffer 2434 * 2435 * Returns a code representing an action: 2436 * EOB_ACT_LAST_MATCH - 2437 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 2438 * EOB_ACT_END_OF_FILE - end of file 2439 */ 2440static int yy_get_next_buffer (yyscan_t yyscanner) 2441{ 2442 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2443 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 2444 char *source = yyg->yytext_ptr; 2445 int number_to_move, i; 2446 int ret_val; 2447 2448 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) 2449 YY_FATAL_ERROR( 2450 "fatal flex scanner internal error--end of buffer missed" ); 2451 2452 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) 2453 { /* Don't try to fill the buffer, so this is an EOF. */ 2454 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) 2455 { 2456 /* We matched a single character, the EOB, so 2457 * treat this as a final EOF. 2458 */ 2459 return EOB_ACT_END_OF_FILE; 2460 } 2461 2462 else 2463 { 2464 /* We matched some text prior to the EOB, first 2465 * process it. 2466 */ 2467 return EOB_ACT_LAST_MATCH; 2468 } 2469 } 2470 2471 /* Try to read more data. */ 2472 2473 /* First move last chars to start of buffer. */ 2474 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); 2475 2476 for ( i = 0; i < number_to_move; ++i ) 2477 *(dest++) = *(source++); 2478 2479 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 2480 /* don't do the read, it's not guaranteed to return an EOF, 2481 * just force an EOF 2482 */ 2483 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; 2484 2485 else 2486 { 2487 int num_to_read = 2488 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; 2489 2490 while ( num_to_read <= 0 ) 2491 { /* Not enough room in the buffer - grow it. */ 2492 2493 /* just a shorter name for the current buffer */ 2494 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; 2495 2496 int yy_c_buf_p_offset = 2497 (int) (yyg->yy_c_buf_p - b->yy_ch_buf); 2498 2499 if ( b->yy_is_our_buffer ) 2500 { 2501 int new_size = b->yy_buf_size * 2; 2502 2503 if ( new_size <= 0 ) 2504 b->yy_buf_size += b->yy_buf_size / 8; 2505 else 2506 b->yy_buf_size *= 2; 2507 2508 b->yy_ch_buf = (char *) 2509 /* Include room in for 2 EOB chars. */ 2510 yyrealloc( (void *) b->yy_ch_buf, 2511 (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); 2512 } 2513 else 2514 /* Can't grow it, we don't own it. */ 2515 b->yy_ch_buf = NULL; 2516 2517 if ( ! b->yy_ch_buf ) 2518 YY_FATAL_ERROR( 2519 "fatal error - scanner input buffer overflow" ); 2520 2521 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; 2522 2523 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - 2524 number_to_move - 1; 2525 2526 } 2527 2528 if ( num_to_read > YY_READ_BUF_SIZE ) 2529 num_to_read = YY_READ_BUF_SIZE; 2530 2531 /* Read in more data. */ 2532 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), 2533 yyg->yy_n_chars, num_to_read ); 2534 2535 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; 2536 } 2537 2538 if ( yyg->yy_n_chars == 0 ) 2539 { 2540 if ( number_to_move == YY_MORE_ADJ ) 2541 { 2542 ret_val = EOB_ACT_END_OF_FILE; 2543 yyrestart( yyin , yyscanner); 2544 } 2545 2546 else 2547 { 2548 ret_val = EOB_ACT_LAST_MATCH; 2549 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = 2550 YY_BUFFER_EOF_PENDING; 2551 } 2552 } 2553 2554 else 2555 ret_val = EOB_ACT_CONTINUE_SCAN; 2556 2557 if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { 2558 /* Extend the array by 50%, plus the number we really need. */ 2559 int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); 2560 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( 2561 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); 2562 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 2563 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); 2564 /* "- 2" to take care of EOB's */ 2565 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); 2566 } 2567 2568 yyg->yy_n_chars += number_to_move; 2569 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; 2570 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; 2571 2572 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; 2573 2574 return ret_val; 2575} 2576 2577/* yy_get_previous_state - get the state just before the EOB char was reached */ 2578 2579 static yy_state_type yy_get_previous_state (yyscan_t yyscanner) 2580{ 2581 yy_state_type yy_current_state; 2582 char *yy_cp; 2583 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2584 2585 yy_current_state = yyg->yy_start; 2586 2587 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) 2588 { 2589 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 83); 2590 if ( yy_accept[yy_current_state] ) 2591 { 2592 yyg->yy_last_accepting_state = yy_current_state; 2593 yyg->yy_last_accepting_cpos = yy_cp; 2594 } 2595 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 2596 { 2597 yy_current_state = (int) yy_def[yy_current_state]; 2598 if ( yy_current_state >= 500 ) 2599 yy_c = yy_meta[yy_c]; 2600 } 2601 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; 2602 } 2603 2604 return yy_current_state; 2605} 2606 2607/* yy_try_NUL_trans - try to make a transition on the NUL character 2608 * 2609 * synopsis 2610 * next_state = yy_try_NUL_trans( current_state ); 2611 */ 2612 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) 2613{ 2614 int yy_is_jam; 2615 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ 2616 char *yy_cp = yyg->yy_c_buf_p; 2617 2618 YY_CHAR yy_c = 83; 2619 if ( yy_accept[yy_current_state] ) 2620 { 2621 yyg->yy_last_accepting_state = yy_current_state; 2622 yyg->yy_last_accepting_cpos = yy_cp; 2623 } 2624 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 2625 { 2626 yy_current_state = (int) yy_def[yy_current_state]; 2627 if ( yy_current_state >= 500 ) 2628 yy_c = yy_meta[yy_c]; 2629 } 2630 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; 2631 yy_is_jam = (yy_current_state == 499); 2632 2633 (void)yyg; 2634 return yy_is_jam ? 0 : yy_current_state; 2635} 2636 2637#ifndef YY_NO_UNPUT 2638 2639 static void yyunput (int c, char * yy_bp , yyscan_t yyscanner) 2640{ 2641 char *yy_cp; 2642 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2643 2644 yy_cp = yyg->yy_c_buf_p; 2645 2646 /* undo effects of setting up yytext */ 2647 *yy_cp = yyg->yy_hold_char; 2648 2649 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 2650 { /* need to shift things up to make room */ 2651 /* +2 for EOB chars. */ 2652 int number_to_move = yyg->yy_n_chars + 2; 2653 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ 2654 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; 2655 char *source = 2656 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; 2657 2658 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 2659 *--dest = *--source; 2660 2661 yy_cp += (int) (dest - source); 2662 yy_bp += (int) (dest - source); 2663 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = 2664 yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; 2665 2666 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 2667 YY_FATAL_ERROR( "flex scanner push-back overflow" ); 2668 } 2669 2670 *--yy_cp = (char) c; 2671 2672 yyg->yytext_ptr = yy_bp; 2673 yyg->yy_hold_char = *yy_cp; 2674 yyg->yy_c_buf_p = yy_cp; 2675} 2676 2677#endif 2678 2679#ifndef YY_NO_INPUT 2680#ifdef __cplusplus 2681 static int yyinput (yyscan_t yyscanner) 2682#else 2683 static int input (yyscan_t yyscanner) 2684#endif 2685 2686{ 2687 int c; 2688 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2689 2690 *yyg->yy_c_buf_p = yyg->yy_hold_char; 2691 2692 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) 2693 { 2694 /* yy_c_buf_p now points to the character we want to return. 2695 * If this occurs *before* the EOB characters, then it's a 2696 * valid NUL; if not, then we've hit the end of the buffer. 2697 */ 2698 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) 2699 /* This was really a NUL. */ 2700 *yyg->yy_c_buf_p = '\0'; 2701 2702 else 2703 { /* need more input */ 2704 int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); 2705 ++yyg->yy_c_buf_p; 2706 2707 switch ( yy_get_next_buffer( yyscanner ) ) 2708 { 2709 case EOB_ACT_LAST_MATCH: 2710 /* This happens because yy_g_n_b() 2711 * sees that we've accumulated a 2712 * token and flags that we need to 2713 * try matching the token before 2714 * proceeding. But for input(), 2715 * there's no matching to consider. 2716 * So convert the EOB_ACT_LAST_MATCH 2717 * to EOB_ACT_END_OF_FILE. 2718 */ 2719 2720 /* Reset buffer status. */ 2721 yyrestart( yyin , yyscanner); 2722 2723 /*FALLTHROUGH*/ 2724 2725 case EOB_ACT_END_OF_FILE: 2726 { 2727 if ( yywrap( yyscanner ) ) 2728 return 0; 2729 2730 if ( ! yyg->yy_did_buffer_switch_on_eof ) 2731 YY_NEW_FILE; 2732#ifdef __cplusplus 2733 return yyinput(yyscanner); 2734#else 2735 return input(yyscanner); 2736#endif 2737 } 2738 2739 case EOB_ACT_CONTINUE_SCAN: 2740 yyg->yy_c_buf_p = yyg->yytext_ptr + offset; 2741 break; 2742 } 2743 } 2744 } 2745 2746 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ 2747 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ 2748 yyg->yy_hold_char = *++yyg->yy_c_buf_p; 2749 2750 return c; 2751} 2752#endif /* ifndef YY_NO_INPUT */ 2753 2754/** Immediately switch to a different input stream. 2755 * @param input_file A readable stream. 2756 * @param yyscanner The scanner object. 2757 * @note This function does not reset the start condition to @c INITIAL . 2758 */ 2759 void yyrestart (FILE * input_file , yyscan_t yyscanner) 2760{ 2761 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2762 2763 if ( ! YY_CURRENT_BUFFER ){ 2764 yyensure_buffer_stack (yyscanner); 2765 YY_CURRENT_BUFFER_LVALUE = 2766 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); 2767 } 2768 2769 yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); 2770 yy_load_buffer_state( yyscanner ); 2771} 2772 2773/** Switch to a different input buffer. 2774 * @param new_buffer The new input buffer. 2775 * @param yyscanner The scanner object. 2776 */ 2777 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) 2778{ 2779 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2780 2781 /* TODO. We should be able to replace this entire function body 2782 * with 2783 * yypop_buffer_state(); 2784 * yypush_buffer_state(new_buffer); 2785 */ 2786 yyensure_buffer_stack (yyscanner); 2787 if ( YY_CURRENT_BUFFER == new_buffer ) 2788 return; 2789 2790 if ( YY_CURRENT_BUFFER ) 2791 { 2792 /* Flush out information for old buffer. */ 2793 *yyg->yy_c_buf_p = yyg->yy_hold_char; 2794 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; 2795 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; 2796 } 2797 2798 YY_CURRENT_BUFFER_LVALUE = new_buffer; 2799 yy_load_buffer_state( yyscanner ); 2800 2801 /* We don't actually know whether we did this switch during 2802 * EOF (yywrap()) processing, but the only time this flag 2803 * is looked at is after yywrap() is called, so it's safe 2804 * to go ahead and always set it. 2805 */ 2806 yyg->yy_did_buffer_switch_on_eof = 1; 2807} 2808 2809static void yy_load_buffer_state (yyscan_t yyscanner) 2810{ 2811 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2812 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 2813 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 2814 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 2815 yyg->yy_hold_char = *yyg->yy_c_buf_p; 2816} 2817 2818/** Allocate and initialize an input buffer state. 2819 * @param file A readable stream. 2820 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. 2821 * @param yyscanner The scanner object. 2822 * @return the allocated buffer state. 2823 */ 2824 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) 2825{ 2826 YY_BUFFER_STATE b; 2827 2828 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); 2829 if ( ! b ) 2830 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 2831 2832 b->yy_buf_size = size; 2833 2834 /* yy_ch_buf has to be 2 characters longer than the size given because 2835 * we need to put in 2 end-of-buffer characters. 2836 */ 2837 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); 2838 if ( ! b->yy_ch_buf ) 2839 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 2840 2841 b->yy_is_our_buffer = 1; 2842 2843 yy_init_buffer( b, file , yyscanner); 2844 2845 return b; 2846} 2847 2848/** Destroy the buffer. 2849 * @param b a buffer created with yy_create_buffer() 2850 * @param yyscanner The scanner object. 2851 */ 2852 void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) 2853{ 2854 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2855 2856 if ( ! b ) 2857 return; 2858 2859 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ 2860 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; 2861 2862 if ( b->yy_is_our_buffer ) 2863 yyfree( (void *) b->yy_ch_buf , yyscanner ); 2864 2865 yyfree( (void *) b , yyscanner ); 2866} 2867 2868/* Initializes or reinitializes a buffer. 2869 * This function is sometimes called more than once on the same buffer, 2870 * such as during a yyrestart() or at EOF. 2871 */ 2872 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) 2873 2874{ 2875 int oerrno = errno; 2876 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2877 2878 yy_flush_buffer( b , yyscanner); 2879 2880 b->yy_input_file = file; 2881 b->yy_fill_buffer = 1; 2882 2883 /* If b is the current buffer, then yy_init_buffer was _probably_ 2884 * called from yyrestart() or through yy_get_next_buffer. 2885 * In that case, we don't want to reset the lineno or column. 2886 */ 2887 if (b != YY_CURRENT_BUFFER){ 2888 b->yy_bs_lineno = 1; 2889 b->yy_bs_column = 0; 2890 } 2891 2892 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 2893 2894 errno = oerrno; 2895} 2896 2897/** Discard all buffered characters. On the next scan, YY_INPUT will be called. 2898 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. 2899 * @param yyscanner The scanner object. 2900 */ 2901 void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) 2902{ 2903 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2904 if ( ! b ) 2905 return; 2906 2907 b->yy_n_chars = 0; 2908 2909 /* We always need two end-of-buffer characters. The first causes 2910 * a transition to the end-of-buffer state. The second causes 2911 * a jam in that state. 2912 */ 2913 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; 2914 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; 2915 2916 b->yy_buf_pos = &b->yy_ch_buf[0]; 2917 2918 b->yy_at_bol = 1; 2919 b->yy_buffer_status = YY_BUFFER_NEW; 2920 2921 if ( b == YY_CURRENT_BUFFER ) 2922 yy_load_buffer_state( yyscanner ); 2923} 2924 2925/** Pushes the new state onto the stack. The new state becomes 2926 * the current state. This function will allocate the stack 2927 * if necessary. 2928 * @param new_buffer The new state. 2929 * @param yyscanner The scanner object. 2930 */ 2931void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) 2932{ 2933 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2934 if (new_buffer == NULL) 2935 return; 2936 2937 yyensure_buffer_stack(yyscanner); 2938 2939 /* This block is copied from yy_switch_to_buffer. */ 2940 if ( YY_CURRENT_BUFFER ) 2941 { 2942 /* Flush out information for old buffer. */ 2943 *yyg->yy_c_buf_p = yyg->yy_hold_char; 2944 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; 2945 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; 2946 } 2947 2948 /* Only push if top exists. Otherwise, replace top. */ 2949 if (YY_CURRENT_BUFFER) 2950 yyg->yy_buffer_stack_top++; 2951 YY_CURRENT_BUFFER_LVALUE = new_buffer; 2952 2953 /* copied from yy_switch_to_buffer. */ 2954 yy_load_buffer_state( yyscanner ); 2955 yyg->yy_did_buffer_switch_on_eof = 1; 2956} 2957 2958/** Removes and deletes the top of the stack, if present. 2959 * The next element becomes the new top. 2960 * @param yyscanner The scanner object. 2961 */ 2962void yypop_buffer_state (yyscan_t yyscanner) 2963{ 2964 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2965 if (!YY_CURRENT_BUFFER) 2966 return; 2967 2968 yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); 2969 YY_CURRENT_BUFFER_LVALUE = NULL; 2970 if (yyg->yy_buffer_stack_top > 0) 2971 --yyg->yy_buffer_stack_top; 2972 2973 if (YY_CURRENT_BUFFER) { 2974 yy_load_buffer_state( yyscanner ); 2975 yyg->yy_did_buffer_switch_on_eof = 1; 2976 } 2977} 2978 2979/* Allocates the stack if it does not exist. 2980 * Guarantees space for at least one push. 2981 */ 2982static void yyensure_buffer_stack (yyscan_t yyscanner) 2983{ 2984 yy_size_t num_to_alloc; 2985 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 2986 2987 if (!yyg->yy_buffer_stack) { 2988 2989 /* First allocation is just for 2 elements, since we don't know if this 2990 * scanner will even need a stack. We use 2 instead of 1 to avoid an 2991 * immediate realloc on the next call. 2992 */ 2993 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ 2994 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc 2995 (num_to_alloc * sizeof(struct yy_buffer_state*) 2996 , yyscanner); 2997 if ( ! yyg->yy_buffer_stack ) 2998 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); 2999 3000 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); 3001 3002 yyg->yy_buffer_stack_max = num_to_alloc; 3003 yyg->yy_buffer_stack_top = 0; 3004 return; 3005 } 3006 3007 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ 3008 3009 /* Increase the buffer to prepare for a possible push. */ 3010 yy_size_t grow_size = 8 /* arbitrary grow size */; 3011 3012 num_to_alloc = yyg->yy_buffer_stack_max + grow_size; 3013 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc 3014 (yyg->yy_buffer_stack, 3015 num_to_alloc * sizeof(struct yy_buffer_state*) 3016 , yyscanner); 3017 if ( ! yyg->yy_buffer_stack ) 3018 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); 3019 3020 /* zero only the new slots.*/ 3021 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); 3022 yyg->yy_buffer_stack_max = num_to_alloc; 3023 } 3024} 3025 3026/** Setup the input buffer state to scan directly from a user-specified character buffer. 3027 * @param base the character buffer 3028 * @param size the size in bytes of the character buffer 3029 * @param yyscanner The scanner object. 3030 * @return the newly allocated buffer state object. 3031 */ 3032YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) 3033{ 3034 YY_BUFFER_STATE b; 3035 3036 if ( size < 2 || 3037 base[size-2] != YY_END_OF_BUFFER_CHAR || 3038 base[size-1] != YY_END_OF_BUFFER_CHAR ) 3039 /* They forgot to leave room for the EOB's. */ 3040 return NULL; 3041 3042 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); 3043 if ( ! b ) 3044 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); 3045 3046 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ 3047 b->yy_buf_pos = b->yy_ch_buf = base; 3048 b->yy_is_our_buffer = 0; 3049 b->yy_input_file = NULL; 3050 b->yy_n_chars = b->yy_buf_size; 3051 b->yy_is_interactive = 0; 3052 b->yy_at_bol = 1; 3053 b->yy_fill_buffer = 0; 3054 b->yy_buffer_status = YY_BUFFER_NEW; 3055 3056 yy_switch_to_buffer( b , yyscanner ); 3057 3058 return b; 3059} 3060 3061/** Setup the input buffer state to scan a string. The next call to yylex() will 3062 * scan from a @e copy of @a str. 3063 * @param yystr a NUL-terminated string to scan 3064 * @param yyscanner The scanner object. 3065 * @return the newly allocated buffer state object. 3066 * @note If you want to scan bytes that may contain NUL values, then use 3067 * yy_scan_bytes() instead. 3068 */ 3069YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) 3070{ 3071 3072 return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); 3073} 3074 3075/** Setup the input buffer state to scan the given bytes. The next call to yylex() will 3076 * scan from a @e copy of @a bytes. 3077 * @param yybytes the byte buffer to scan 3078 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. 3079 * @param yyscanner The scanner object. 3080 * @return the newly allocated buffer state object. 3081 */ 3082YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) 3083{ 3084 YY_BUFFER_STATE b; 3085 char *buf; 3086 yy_size_t n; 3087 int i; 3088 3089 /* Get memory for full buffer, including space for trailing EOB's. */ 3090 n = (yy_size_t) (_yybytes_len + 2); 3091 buf = (char *) yyalloc( n , yyscanner ); 3092 if ( ! buf ) 3093 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 3094 3095 for ( i = 0; i < _yybytes_len; ++i ) 3096 buf[i] = yybytes[i]; 3097 3098 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; 3099 3100 b = yy_scan_buffer( buf, n , yyscanner); 3101 if ( ! b ) 3102 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); 3103 3104 /* It's okay to grow etc. this buffer, and we should throw it 3105 * away when we're done. 3106 */ 3107 b->yy_is_our_buffer = 1; 3108 3109 return b; 3110} 3111 3112 static void yy_push_state (int _new_state , yyscan_t yyscanner) 3113{ 3114 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3115 if ( yyg->yy_start_stack_ptr >= yyg->yy_start_stack_depth ) 3116 { 3117 yy_size_t new_size; 3118 3119 yyg->yy_start_stack_depth += YY_START_STACK_INCR; 3120 new_size = (yy_size_t) yyg->yy_start_stack_depth * sizeof( int ); 3121 3122 if ( ! yyg->yy_start_stack ) 3123 yyg->yy_start_stack = (int *) yyalloc( new_size , yyscanner ); 3124 3125 else 3126 yyg->yy_start_stack = (int *) yyrealloc( 3127 (void *) yyg->yy_start_stack, new_size , yyscanner ); 3128 3129 if ( ! yyg->yy_start_stack ) 3130 YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); 3131 } 3132 3133 yyg->yy_start_stack[yyg->yy_start_stack_ptr++] = YY_START; 3134 3135 BEGIN(_new_state); 3136} 3137 3138 static void yy_pop_state (yyscan_t yyscanner) 3139{ 3140 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3141 if ( --yyg->yy_start_stack_ptr < 0 ) 3142 YY_FATAL_ERROR( "start-condition stack underflow" ); 3143 3144 BEGIN(yyg->yy_start_stack[yyg->yy_start_stack_ptr]); 3145} 3146 3147 static int yy_top_state (yyscan_t yyscanner) 3148{ 3149 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3150 return yyg->yy_start_stack[yyg->yy_start_stack_ptr - 1]; 3151} 3152 3153#ifndef YY_EXIT_FAILURE 3154#define YY_EXIT_FAILURE 2 3155#endif 3156 3157static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) 3158{ 3159 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3160 (void)yyg; 3161 fprintf( stderr, "%s\n", msg ); 3162 exit( YY_EXIT_FAILURE ); 3163} 3164 3165/* Redefine yyless() so it works in section 3 code. */ 3166 3167#undef yyless 3168#define yyless(n) \ 3169 do \ 3170 { \ 3171 /* Undo effects of setting up yytext. */ \ 3172 int yyless_macro_arg = (n); \ 3173 YY_LESS_LINENO(yyless_macro_arg);\ 3174 yytext[yyleng] = yyg->yy_hold_char; \ 3175 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ 3176 yyg->yy_hold_char = *yyg->yy_c_buf_p; \ 3177 *yyg->yy_c_buf_p = '\0'; \ 3178 yyleng = yyless_macro_arg; \ 3179 } \ 3180 while ( 0 ) 3181 3182/* Accessor methods (get/set functions) to struct members. */ 3183 3184/** Get the user-defined data for this scanner. 3185 * @param yyscanner The scanner object. 3186 */ 3187YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) 3188{ 3189 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3190 return yyextra; 3191} 3192 3193/** Get the current line number. 3194 * @param yyscanner The scanner object. 3195 */ 3196int yyget_lineno (yyscan_t yyscanner) 3197{ 3198 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3199 3200 if (! YY_CURRENT_BUFFER) 3201 return 0; 3202 3203 return yylineno; 3204} 3205 3206/** Get the current column number. 3207 * @param yyscanner The scanner object. 3208 */ 3209int yyget_column (yyscan_t yyscanner) 3210{ 3211 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3212 3213 if (! YY_CURRENT_BUFFER) 3214 return 0; 3215 3216 return yycolumn; 3217} 3218 3219/** Get the input stream. 3220 * @param yyscanner The scanner object. 3221 */ 3222FILE *yyget_in (yyscan_t yyscanner) 3223{ 3224 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3225 return yyin; 3226} 3227 3228/** Get the output stream. 3229 * @param yyscanner The scanner object. 3230 */ 3231FILE *yyget_out (yyscan_t yyscanner) 3232{ 3233 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3234 return yyout; 3235} 3236 3237/** Get the length of the current token. 3238 * @param yyscanner The scanner object. 3239 */ 3240int yyget_leng (yyscan_t yyscanner) 3241{ 3242 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3243 return yyleng; 3244} 3245 3246/** Get the current token. 3247 * @param yyscanner The scanner object. 3248 */ 3249 3250char *yyget_text (yyscan_t yyscanner) 3251{ 3252 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3253 return yytext; 3254} 3255 3256/** Set the user-defined data. This data is never touched by the scanner. 3257 * @param user_defined The data to be associated with this scanner. 3258 * @param yyscanner The scanner object. 3259 */ 3260void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) 3261{ 3262 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3263 yyextra = user_defined ; 3264} 3265 3266/** Set the current line number. 3267 * @param _line_number line number 3268 * @param yyscanner The scanner object. 3269 */ 3270void yyset_lineno (int _line_number , yyscan_t yyscanner) 3271{ 3272 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3273 3274 /* lineno is only valid if an input buffer exists. */ 3275 if (! YY_CURRENT_BUFFER ) 3276 YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); 3277 3278 yylineno = _line_number; 3279} 3280 3281/** Set the current column. 3282 * @param _column_no column number 3283 * @param yyscanner The scanner object. 3284 */ 3285void yyset_column (int _column_no , yyscan_t yyscanner) 3286{ 3287 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3288 3289 /* column is only valid if an input buffer exists. */ 3290 if (! YY_CURRENT_BUFFER ) 3291 YY_FATAL_ERROR( "yyset_column called with no buffer" ); 3292 3293 yycolumn = _column_no; 3294} 3295 3296/** Set the input stream. This does not discard the current 3297 * input buffer. 3298 * @param _in_str A readable stream. 3299 * @param yyscanner The scanner object. 3300 * @see yy_switch_to_buffer 3301 */ 3302void yyset_in (FILE * _in_str , yyscan_t yyscanner) 3303{ 3304 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3305 yyin = _in_str ; 3306} 3307 3308void yyset_out (FILE * _out_str , yyscan_t yyscanner) 3309{ 3310 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3311 yyout = _out_str ; 3312} 3313 3314int yyget_debug (yyscan_t yyscanner) 3315{ 3316 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3317 return yy_flex_debug; 3318} 3319 3320void yyset_debug (int _bdebug , yyscan_t yyscanner) 3321{ 3322 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3323 yy_flex_debug = _bdebug ; 3324} 3325 3326/* Accessor methods for yylval and yylloc */ 3327 3328YYSTYPE * yyget_lval (yyscan_t yyscanner) 3329{ 3330 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3331 return yylval; 3332} 3333 3334void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) 3335{ 3336 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3337 yylval = yylval_param; 3338} 3339 3340YYLTYPE *yyget_lloc (yyscan_t yyscanner) 3341{ 3342 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3343 return yylloc; 3344} 3345 3346void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) 3347{ 3348 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3349 yylloc = yylloc_param; 3350} 3351 3352/* User-visible API */ 3353 3354/* yylex_init is special because it creates the scanner itself, so it is 3355 * the ONLY reentrant function that doesn't take the scanner as the last argument. 3356 * That's why we explicitly handle the declaration, instead of using our macros. 3357 */ 3358int yylex_init(yyscan_t* ptr_yy_globals) 3359{ 3360 if (ptr_yy_globals == NULL){ 3361 errno = EINVAL; 3362 return 1; 3363 } 3364 3365 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); 3366 3367 if (*ptr_yy_globals == NULL){ 3368 errno = ENOMEM; 3369 return 1; 3370 } 3371 3372 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ 3373 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); 3374 3375 return yy_init_globals ( *ptr_yy_globals ); 3376} 3377 3378/* yylex_init_extra has the same functionality as yylex_init, but follows the 3379 * convention of taking the scanner as the last argument. Note however, that 3380 * this is a *pointer* to a scanner, as it will be allocated by this call (and 3381 * is the reason, too, why this function also must handle its own declaration). 3382 * The user defined value in the first argument will be available to yyalloc in 3383 * the yyextra field. 3384 */ 3385int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) 3386{ 3387 struct yyguts_t dummy_yyguts; 3388 3389 yyset_extra (yy_user_defined, &dummy_yyguts); 3390 3391 if (ptr_yy_globals == NULL){ 3392 errno = EINVAL; 3393 return 1; 3394 } 3395 3396 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); 3397 3398 if (*ptr_yy_globals == NULL){ 3399 errno = ENOMEM; 3400 return 1; 3401 } 3402 3403 /* By setting to 0xAA, we expose bugs in 3404 yy_init_globals. Leave at 0x00 for releases. */ 3405 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); 3406 3407 yyset_extra (yy_user_defined, *ptr_yy_globals); 3408 3409 return yy_init_globals ( *ptr_yy_globals ); 3410} 3411 3412static int yy_init_globals (yyscan_t yyscanner) 3413{ 3414 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3415 /* Initialization is the same as for the non-reentrant scanner. 3416 * This function is called from yylex_destroy(), so don't allocate here. 3417 */ 3418 3419 yyg->yy_buffer_stack = NULL; 3420 yyg->yy_buffer_stack_top = 0; 3421 yyg->yy_buffer_stack_max = 0; 3422 yyg->yy_c_buf_p = NULL; 3423 yyg->yy_init = 0; 3424 yyg->yy_start = 0; 3425 3426 yyg->yy_start_stack_ptr = 0; 3427 yyg->yy_start_stack_depth = 0; 3428 yyg->yy_start_stack = NULL; 3429 3430/* Defined in main.c */ 3431#ifdef YY_STDINIT 3432 yyin = stdin; 3433 yyout = stdout; 3434#else 3435 yyin = NULL; 3436 yyout = NULL; 3437#endif 3438 3439 /* For future reference: Set errno on error, since we are called by 3440 * yylex_init() 3441 */ 3442 return 0; 3443} 3444 3445/* yylex_destroy is for both reentrant and non-reentrant scanners. */ 3446int yylex_destroy (yyscan_t yyscanner) 3447{ 3448 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3449 3450 /* Pop the buffer stack, destroying each element. */ 3451 while(YY_CURRENT_BUFFER){ 3452 yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); 3453 YY_CURRENT_BUFFER_LVALUE = NULL; 3454 yypop_buffer_state(yyscanner); 3455 } 3456 3457 /* Destroy the stack itself. */ 3458 yyfree(yyg->yy_buffer_stack , yyscanner); 3459 yyg->yy_buffer_stack = NULL; 3460 3461 /* Destroy the start condition stack. */ 3462 yyfree( yyg->yy_start_stack , yyscanner ); 3463 yyg->yy_start_stack = NULL; 3464 3465 /* Reset the globals. This is important in a non-reentrant scanner so the next time 3466 * yylex() is called, initialization will occur. */ 3467 yy_init_globals( yyscanner); 3468 3469 /* Destroy the main struct (reentrant only). */ 3470 yyfree ( yyscanner , yyscanner ); 3471 yyscanner = NULL; 3472 return 0; 3473} 3474 3475/* 3476 * Internal utility routines. 3477 */ 3478 3479#ifndef yytext_ptr 3480static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) 3481{ 3482 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3483 (void)yyg; 3484 3485 int i; 3486 for ( i = 0; i < n; ++i ) 3487 s1[i] = s2[i]; 3488} 3489#endif 3490 3491#ifdef YY_NEED_STRLEN 3492static int yy_flex_strlen (const char * s , yyscan_t yyscanner) 3493{ 3494 int n; 3495 for ( n = 0; s[n]; ++n ) 3496 ; 3497 3498 return n; 3499} 3500#endif 3501 3502void *yyalloc (yy_size_t size , yyscan_t yyscanner) 3503{ 3504 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3505 (void)yyg; 3506 return malloc(size); 3507} 3508 3509void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) 3510{ 3511 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3512 (void)yyg; 3513 3514 /* The cast to (char *) in the following accommodates both 3515 * implementations that use char* generic pointers, and those 3516 * that use void* generic pointers. It works with the latter 3517 * because both ANSI C and C++ allow castless assignment from 3518 * any pointer type to void*, and deal with argument conversions 3519 * as though doing an assignment. 3520 */ 3521 return realloc(ptr, size); 3522} 3523 3524void yyfree (void * ptr , yyscan_t yyscanner) 3525{ 3526 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; 3527 (void)yyg; 3528 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ 3529} 3530 3531#define YYTABLES_NAME "yytables" 3532 3533int yy_input_proc(char* buf, int size, yyscan_t yyscanner) { 3534 MiniZinc::ParserState* parm = 3535 static_cast<MiniZinc::ParserState*>(yyget_extra(yyscanner)); 3536 return parm->fillBuffer(buf, size); 3537 // work around warning that yyunput is unused 3538 yyunput (0,buf,yyscanner); 3539} 3540