1 /* A Bison parser, made by GNU Bison 2.3. */
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
23 /* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
33 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
36 /* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
39 /* All symbols defined below should begin with yy or YY, to avoid
40 infringing on user name space. This should be done even for local
41 variables, as they might otherwise be expanded by user macros.
42 There are some unavoidable exceptions within include files to
43 define necessary library symbols; they are noted "INFRINGES ON
44 USER NAME SPACE" below. */
46 /* Identify Bison output. */
50 #define YYBISON_VERSION "2.3"
53 #define YYSKELETON_NAME "yacc.c"
58 /* Using locations. */
59 #define YYLSP_NEEDED 0
66 /* Put the tokens into the symbol table, so that GDB and other debuggers
146 SHIFT_RIGHT_CHUCK
= 335,
147 SHIFT_LEFT_CHUCK
= 336,
178 #define STRING_LIT 259
184 #define SEMICOLON 265
219 #define EXCLAMATION 300
224 #define MINUSMINUS 305
226 #define POUNDPAREN 307
227 #define PERCENTPAREN 308
231 #define TRANSPORT 312
247 #define PLUS_CHUCK 328
248 #define MINUS_CHUCK 329
249 #define TIMES_CHUCK 330
250 #define DIVIDE_CHUCK 331
251 #define S_AND_CHUCK 332
252 #define S_OR_CHUCK 333
253 #define S_XOR_CHUCK 334
254 #define SHIFT_RIGHT_CHUCK 335
255 #define SHIFT_LEFT_CHUCK 336
256 #define PERCENT_CHUCK 337
257 #define SHIFT_RIGHT 338
258 #define SHIFT_LEFT 339
261 #define COLONCOLON 342
264 #define LEFT_S_CHUCK 345
268 #define INTERFACE 349
270 #define IMPLEMENTS 351
272 #define PROTECTED 353
278 #define ARROW_RIGHT 359
279 #define ARROW_LEFT 360
286 /* Copy the first part of user declarations. */
290 /*----------------------------------------------------------------------------
291 ChucK Concurrent, On-the-fly Audio Programming Language
292 Compiler and Virtual Machine
294 Copyright (c) 2004 Ge Wang and Perry R. Cook. All rights reserved.
295 http://chuck.cs.princeton.edu/
296 http://soundlab.cs.princeton.edu/
298 This program is free software; you can redistribute it and/or modify
299 it under the terms of the GNU General Public License as published by
300 the Free Software Foundation; either version 2 of the License, or
301 (at your option) any later version.
303 This program is distributed in the hope that it will be useful,
304 but WITHOUT ANY WARRANTY; without even the implied warranty of
305 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
306 GNU General Public License for more details.
308 You should have received a copy of the GNU General Public License
309 along with this program; if not, write to the Free Software
310 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
312 -----------------------------------------------------------------------------*/
314 //-----------------------------------------------------------------------------
316 // desc: chuck parser
318 // author: Ge Wang (gewang@cs.princeton.edu) - generated by yacc
319 // Perry R. Cook (prc@cs.princeton.edu)
321 // based in part on the ansi C grammar by Jeff Lee, maintained by Jutta Degener
324 //-----------------------------------------------------------------------------
328 #include "chuck_utils.h"
329 #include "chuck_errmsg.h"
330 #include "chuck_absyn.h"
335 void yyerror( char *s
)
337 EM_error( EM_tokPos
, "%s", s
);
340 a_Program g_program
= NULL
;
344 /* Enabling traces. */
349 /* Enabling verbose error messages. */
350 #ifdef YYERROR_VERBOSE
351 # undef YYERROR_VERBOSE
352 # define YYERROR_VERBOSE 1
354 # define YYERROR_VERBOSE 0
357 /* Enabling the token table. */
358 #ifndef YYTOKEN_TABLE
359 # define YYTOKEN_TABLE 0
362 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
363 typedef union YYSTYPE
372 a_Section program_section
;
373 a_Stmt_List stmt_list
;
374 a_Class_Def class_def
;
375 a_Class_Ext class_ext
;
376 a_Class_Body class_body
;
380 a_Var_Decl_List var_decl_list
;
382 a_Type_Decl type_decl
;
385 a_Array_Sub array_sub
;
386 a_Complex complex_exp
;
389 /* Line 187 of yacc.c. */
390 #line 391 "chuck.tab.c"
392 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
393 # define YYSTYPE_IS_DECLARED 1
394 # define YYSTYPE_IS_TRIVIAL 1
399 /* Copy the second part of user declarations. */
402 /* Line 216 of yacc.c. */
403 #line 404 "chuck.tab.c"
410 typedef YYTYPE_UINT8 yytype_uint8
;
412 typedef unsigned char yytype_uint8
;
416 typedef YYTYPE_INT8 yytype_int8
;
417 #elif (defined __STDC__ || defined __C99__FUNC__ \
418 || defined __cplusplus || defined _MSC_VER)
419 typedef signed char yytype_int8
;
421 typedef short int yytype_int8
;
425 typedef YYTYPE_UINT16 yytype_uint16
;
427 typedef unsigned short int yytype_uint16
;
431 typedef YYTYPE_INT16 yytype_int16
;
433 typedef short int yytype_int16
;
437 # ifdef __SIZE_TYPE__
438 # define YYSIZE_T __SIZE_TYPE__
439 # elif defined size_t
440 # define YYSIZE_T size_t
441 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
442 || defined __cplusplus || defined _MSC_VER)
443 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
444 # define YYSIZE_T size_t
446 # define YYSIZE_T unsigned int
450 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
455 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
456 # define YY_(msgid) dgettext ("bison-runtime", msgid)
460 # define YY_(msgid) msgid
464 /* Suppress unused-variable warnings by "using" E. */
465 #if ! defined lint || defined __GNUC__
466 # define YYUSE(e) ((void) (e))
468 # define YYUSE(e) /* empty */
471 /* Identity function, used to suppress warnings about constant conditions. */
475 #if (defined __STDC__ || defined __C99__FUNC__ \
476 || defined __cplusplus || defined _MSC_VER)
489 #if ! defined yyoverflow || YYERROR_VERBOSE
491 /* The parser invokes alloca or malloc; define the necessary symbols. */
493 # ifdef YYSTACK_USE_ALLOCA
494 # if YYSTACK_USE_ALLOCA
496 # define YYSTACK_ALLOC __builtin_alloca
497 # elif defined __BUILTIN_VA_ARG_INCR
498 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
500 # define YYSTACK_ALLOC __alloca
501 # elif defined _MSC_VER
502 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
503 # define alloca _alloca
505 # define YYSTACK_ALLOC alloca
506 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
507 || defined __cplusplus || defined _MSC_VER)
508 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
517 # ifdef YYSTACK_ALLOC
518 /* Pacify GCC's `empty if-body' warning. */
519 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
520 # ifndef YYSTACK_ALLOC_MAXIMUM
521 /* The OS might guarantee only one guard page at the bottom of the stack,
522 and a page size can be as small as 4096 bytes. So we cannot safely
523 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
524 to allow for a few compiler-allocated temporary stack slots. */
525 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
528 # define YYSTACK_ALLOC YYMALLOC
529 # define YYSTACK_FREE YYFREE
530 # ifndef YYSTACK_ALLOC_MAXIMUM
531 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
533 # if (defined __cplusplus && ! defined _STDLIB_H \
534 && ! ((defined YYMALLOC || defined malloc) \
535 && (defined YYFREE || defined free)))
536 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
542 # define YYMALLOC malloc
543 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
544 || defined __cplusplus || defined _MSC_VER)
545 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
550 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
551 || defined __cplusplus || defined _MSC_VER)
552 void free (void *); /* INFRINGES ON USER NAME SPACE */
556 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
559 #if (! defined yyoverflow \
560 && (! defined __cplusplus \
561 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
563 /* A type that is properly aligned for any stack member. */
570 /* The size of the maximum gap between one aligned stack and the next. */
571 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
573 /* The size of an array large to enough to hold all stacks, each with
575 # define YYSTACK_BYTES(N) \
576 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
577 + YYSTACK_GAP_MAXIMUM)
579 /* Copy COUNT objects from FROM to TO. The source and destination do
582 # if defined __GNUC__ && 1 < __GNUC__
583 # define YYCOPY(To, From, Count) \
584 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
586 # define YYCOPY(To, From, Count) \
590 for (yyi = 0; yyi < (Count); yyi++) \
591 (To)[yyi] = (From)[yyi]; \
597 /* Relocate STACK from its old location to the new one. The
598 local variables YYSIZE and YYSTACKSIZE give the old and new number of
599 elements in the stack, and YYPTR gives the new location of the
600 stack. Advance YYPTR to a properly aligned location for the next
602 # define YYSTACK_RELOCATE(Stack) \
605 YYSIZE_T yynewbytes; \
606 YYCOPY (&yyptr->Stack, Stack, yysize); \
607 Stack = &yyptr->Stack; \
608 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
609 yyptr += yynewbytes / sizeof (*yyptr); \
615 /* YYFINAL -- State number of the termination state. */
617 /* YYLAST -- Last index in YYTABLE. */
620 /* YYNTOKENS -- Number of terminals. */
621 #define YYNTOKENS 108
622 /* YYNNTS -- Number of nonterminals. */
624 /* YYNRULES -- Number of rules. */
626 /* YYNRULES -- Number of states. */
627 #define YYNSTATES 309
629 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
631 #define YYMAXUTOK 362
633 #define YYTRANSLATE(YYX) \
634 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
636 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
637 static const yytype_uint8 yytranslate
[] =
639 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
640 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
641 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
642 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
643 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
644 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
645 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
646 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
647 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
648 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
649 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
650 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
651 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
652 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
653 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
654 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
655 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
656 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
657 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
658 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
659 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
660 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
661 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
662 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
663 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
664 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
665 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
666 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
667 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
668 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
669 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
670 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
671 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
672 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
673 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
674 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
679 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
681 static const yytype_uint16 yyprhs
[] =
683 0, 0, 3, 5, 8, 10, 12, 14, 21, 29,
684 36, 44, 47, 52, 55, 60, 62, 63, 65, 68,
685 70, 72, 74, 77, 79, 83, 85, 89, 98, 106,
686 115, 123, 125, 127, 128, 130, 132, 134, 136, 138,
687 140, 141, 143, 146, 150, 155, 157, 159, 161, 164,
688 167, 172, 174, 177, 179, 181, 183, 185, 187, 190,
689 194, 197, 200, 206, 214, 220, 228, 235, 243, 249,
690 257, 263, 266, 270, 272, 275, 277, 281, 283, 287,
691 289, 293, 297, 302, 305, 309, 311, 314, 318, 321,
692 325, 327, 331, 333, 336, 339, 343, 347, 349, 351,
693 353, 355, 357, 359, 361, 363, 365, 367, 369, 371,
694 373, 375, 377, 379, 381, 387, 389, 393, 395, 399,
695 401, 405, 407, 411, 413, 417, 419, 423, 427, 429,
696 433, 437, 441, 445, 447, 451, 455, 457, 461, 465,
697 467, 471, 475, 479, 481, 485, 487, 491, 493, 496,
698 499, 502, 505, 508, 511, 515, 519, 521, 523, 525,
699 527, 529, 532, 534, 538, 540, 543, 547, 552, 556,
700 559, 562, 564, 566, 568, 570, 572, 574, 576, 580,
704 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
705 static const yytype_int16 yyrhs
[] =
707 109, 0, -1, 110, -1, 110, 109, -1, 128, -1,
708 119, -1, 111, -1, 120, 93, 117, 15, 113, 16,
709 -1, 120, 93, 117, 112, 15, 113, 16, -1, 120,
710 94, 117, 15, 113, 16, -1, 120, 94, 117, 116,
711 15, 113, 16, -1, 96, 117, -1, 96, 117, 95,
712 118, -1, 95, 118, -1, 95, 118, 96, 117, -1,
713 114, -1, -1, 115, -1, 115, 114, -1, 128, -1,
714 119, -1, 111, -1, 95, 117, -1, 3, -1, 3,
715 8, 117, -1, 3, -1, 3, 17, 118, -1, 121,
716 122, 126, 3, 11, 127, 12, 133, -1, 121, 122,
717 126, 3, 11, 12, 133, -1, 121, 122, 126, 3,
718 11, 127, 12, 10, -1, 121, 122, 126, 3, 11,
719 12, 10, -1, 97, -1, 99, -1, -1, 42, -1,
720 97, -1, 98, -1, 99, -1, 100, -1, 101, -1,
721 -1, 3, -1, 3, 67, -1, 25, 118, 27, -1,
722 25, 118, 27, 67, -1, 123, -1, 124, -1, 125,
723 -1, 125, 139, -1, 125, 142, -1, 125, 142, 8,
724 127, -1, 129, -1, 129, 128, -1, 134, -1, 132,
725 -1, 131, -1, 130, -1, 133, -1, 43, 10, -1,
726 43, 135, 10, -1, 39, 10, -1, 40, 10, -1,
727 32, 11, 135, 12, 129, -1, 32, 11, 135, 12,
728 129, 34, 129, -1, 35, 11, 135, 12, 129, -1,
729 37, 129, 35, 11, 135, 12, 10, -1, 36, 11,
730 134, 134, 12, 129, -1, 36, 11, 134, 134, 135,
731 12, 129, -1, 62, 11, 135, 12, 129, -1, 37,
732 129, 62, 11, 135, 12, 10, -1, 38, 11, 135,
733 12, 129, -1, 15, 16, -1, 15, 128, 16, -1,
734 10, -1, 135, 10, -1, 136, -1, 136, 8, 135,
735 -1, 137, -1, 136, 145, 137, -1, 140, -1, 137,
736 146, 140, -1, 13, 135, 14, -1, 13, 135, 14,
737 138, -1, 13, 14, -1, 139, 13, 14, -1, 147,
738 -1, 125, 141, -1, 100, 125, 141, -1, 72, 141,
739 -1, 100, 72, 141, -1, 142, -1, 142, 8, 141,
740 -1, 3, -1, 3, 138, -1, 3, 139, -1, 52,
741 135, 12, -1, 53, 135, 12, -1, 86, -1, 89,
742 -1, 73, -1, 74, -1, 75, -1, 76, -1, 80,
743 -1, 81, -1, 82, -1, 91, -1, 92, -1, 77,
744 -1, 78, -1, 79, -1, 105, -1, 104, -1, 148,
745 -1, 148, 44, 135, 9, 147, -1, 149, -1, 148,
746 30, 149, -1, 150, -1, 149, 29, 150, -1, 151,
747 -1, 150, 46, 151, -1, 152, -1, 151, 48, 152,
748 -1, 153, -1, 152, 47, 153, -1, 154, -1, 153,
749 23, 154, -1, 153, 24, 154, -1, 155, -1, 154,
750 25, 155, -1, 154, 27, 155, -1, 154, 26, 155,
751 -1, 154, 28, 155, -1, 156, -1, 155, 84, 156,
752 -1, 155, 83, 156, -1, 157, -1, 156, 18, 157,
753 -1, 156, 19, 157, -1, 158, -1, 157, 20, 158,
754 -1, 157, 21, 158, -1, 157, 22, 158, -1, 159,
755 -1, 158, 85, 159, -1, 160, -1, 159, 51, 125,
756 -1, 162, -1, 49, 160, -1, 50, 160, -1, 161,
757 160, -1, 71, 160, -1, 70, 160, -1, 69, 125,
758 -1, 69, 125, 138, -1, 103, 85, 133, -1, 18,
759 -1, 19, -1, 85, -1, 45, -1, 20, -1, 103,
760 85, -1, 163, -1, 162, 87, 163, -1, 164, -1,
761 163, 138, -1, 163, 11, 12, -1, 163, 11, 135,
762 12, -1, 163, 17, 3, -1, 163, 49, -1, 163,
763 50, -1, 3, -1, 5, -1, 6, -1, 4, -1,
764 138, -1, 143, -1, 144, -1, 106, 135, 107, -1,
765 11, 135, 12, -1, 11, 12, -1
768 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
769 static const yytype_uint16 yyrline
[] =
771 0, 177, 177, 178, 182, 183, 184, 188, 190, 192,
772 194, 199, 200, 201, 202, 206, 207, 211, 212, 217,
773 218, 219, 223, 227, 228, 232, 233, 237, 239, 241,
774 243, 248, 249, 250, 254, 255, 256, 257, 261, 262,
775 263, 267, 268, 272, 273, 282, 283, 288, 289, 293,
776 294, 298, 299, 303, 304, 305, 306, 308, 312, 313,
777 314, 315, 319, 321, 326, 328, 330, 332, 334, 336,
778 338, 343, 344, 348, 349, 353, 354, 358, 359, 364,
779 365, 370, 371, 376, 377, 381, 382, 383, 384, 385,
780 389, 390, 394, 395, 396, 400, 405, 410, 411, 412,
781 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
782 423, 427, 428, 432, 433, 438, 439, 444, 445, 450,
783 451, 456, 457, 462, 463, 468, 469, 471, 476, 477,
784 479, 481, 483, 488, 489, 491, 496, 497, 499, 504,
785 505, 507, 509, 514, 515, 520, 521, 526, 527, 529,
786 531, 533, 535, 537, 539, 541, 546, 547, 548, 549,
787 550, 551, 556, 557, 562, 563, 565, 567, 569, 571,
788 573, 578, 579, 580, 581, 582, 583, 584, 585, 586,
793 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
794 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
795 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
796 static const char *const yytname
[] =
798 "$end", "error", "$undefined", "ID", "STRING_LIT", "NUM", "FLOAT",
799 "POUND", "COMMA", "COLON", "SEMICOLON", "LPAREN", "RPAREN", "LBRACK",
800 "RBRACK", "LBRACE", "RBRACE", "DOT", "PLUS", "MINUS", "TIMES", "DIVIDE",
801 "PERCENT", "EQ", "NEQ", "LT", "LE", "GT", "GE", "AND", "OR", "ASSIGN",
802 "IF", "THEN", "ELSE", "WHILE", "FOR", "DO", "LOOP", "BREAK", "CONTINUE",
803 "NULL_TOK", "FUNCTION", "RETURN", "QUESTION", "EXCLAMATION", "S_OR",
804 "S_AND", "S_XOR", "PLUSPLUS", "MINUSMINUS", "DOLLAR", "POUNDPAREN",
805 "PERCENTPAREN", "SIMULT", "PATTERN", "CODE", "TRANSPORT", "HOST", "TIME",
806 "WHENEVER", "NEXT", "UNTIL", "EVERY", "BEFORE", "AFTER", "AT", "AT_SYM",
807 "ATAT_SYM", "NEW", "SIZEOF", "TYPEOF", "SAME", "PLUS_CHUCK",
808 "MINUS_CHUCK", "TIMES_CHUCK", "DIVIDE_CHUCK", "S_AND_CHUCK",
809 "S_OR_CHUCK", "S_XOR_CHUCK", "SHIFT_RIGHT_CHUCK", "SHIFT_LEFT_CHUCK",
810 "PERCENT_CHUCK", "SHIFT_RIGHT", "SHIFT_LEFT", "TILDA", "CHUCK",
811 "COLONCOLON", "S_CHUCK", "AT_CHUCK", "LEFT_S_CHUCK", "UNCHUCK",
812 "UPCHUCK", "CLASS", "INTERFACE", "EXTENDS", "IMPLEMENTS", "PUBLIC",
813 "PROTECTED", "PRIVATE", "STATIC", "ABSTRACT", "CONST", "SPORK",
814 "ARROW_RIGHT", "ARROW_LEFT", "L_HACK", "R_HACK", "$accept", "program",
815 "program_section", "class_definition", "class_ext", "class_body",
816 "class_body2", "class_section", "iface_ext", "id_list", "id_dot",
817 "function_definition", "class_decl", "function_decl", "static_decl",
818 "type_decl_a", "type_decl_b", "type_decl", "type_decl2", "arg_list",
819 "statement_list", "statement", "jump_statement", "selection_statement",
820 "loop_statement", "code_segment", "expression_statement", "expression",
821 "chuck_expression", "arrow_expression", "array_exp", "array_empty",
822 "decl_expression", "var_decl_list", "var_decl", "complex_exp",
823 "polar_exp", "chuck_operator", "arrow_operator",
824 "conditional_expression", "logical_or_expression",
825 "logical_and_expression", "inclusive_or_expression",
826 "exclusive_or_expression", "and_expression", "equality_expression",
827 "relational_expression", "shift_expression", "additive_expression",
828 "multiplicative_expression", "tilda_expression", "cast_expression",
829 "unary_expression", "unary_operator", "dur_expression",
830 "postfix_expression", "primary_expression", 0
835 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
837 static const yytype_uint16 yytoknum
[] =
839 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
840 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
841 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
842 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
843 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
844 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
845 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
846 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
847 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
848 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
849 355, 356, 357, 358, 359, 360, 361, 362
853 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
854 static const yytype_uint8 yyr1
[] =
856 0, 108, 109, 109, 110, 110, 110, 111, 111, 111,
857 111, 112, 112, 112, 112, 113, 113, 114, 114, 115,
858 115, 115, 116, 117, 117, 118, 118, 119, 119, 119,
859 119, 120, 120, 120, 121, 121, 121, 121, 122, 122,
860 122, 123, 123, 124, 124, 125, 125, 126, 126, 127,
861 127, 128, 128, 129, 129, 129, 129, 129, 130, 130,
862 130, 130, 131, 131, 132, 132, 132, 132, 132, 132,
863 132, 133, 133, 134, 134, 135, 135, 136, 136, 137,
864 137, 138, 138, 139, 139, 140, 140, 140, 140, 140,
865 141, 141, 142, 142, 142, 143, 144, 145, 145, 145,
866 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
867 145, 146, 146, 147, 147, 148, 148, 149, 149, 150,
868 150, 151, 151, 152, 152, 153, 153, 153, 154, 154,
869 154, 154, 154, 155, 155, 155, 156, 156, 156, 157,
870 157, 157, 157, 158, 158, 159, 159, 160, 160, 160,
871 160, 160, 160, 160, 160, 160, 161, 161, 161, 161,
872 161, 161, 162, 162, 163, 163, 163, 163, 163, 163,
873 163, 164, 164, 164, 164, 164, 164, 164, 164, 164,
877 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
878 static const yytype_uint8 yyr2
[] =
880 0, 2, 1, 2, 1, 1, 1, 6, 7, 6,
881 7, 2, 4, 2, 4, 1, 0, 1, 2, 1,
882 1, 1, 2, 1, 3, 1, 3, 8, 7, 8,
883 7, 1, 1, 0, 1, 1, 1, 1, 1, 1,
884 0, 1, 2, 3, 4, 1, 1, 1, 2, 2,
885 4, 1, 2, 1, 1, 1, 1, 1, 2, 3,
886 2, 2, 5, 7, 5, 7, 6, 7, 5, 7,
887 5, 2, 3, 1, 2, 1, 3, 1, 3, 1,
888 3, 3, 4, 2, 3, 1, 2, 3, 2, 3,
889 1, 3, 1, 2, 2, 3, 3, 1, 1, 1,
890 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
891 1, 1, 1, 1, 5, 1, 3, 1, 3, 1,
892 3, 1, 3, 1, 3, 1, 3, 3, 1, 3,
893 3, 3, 3, 1, 3, 3, 1, 3, 3, 1,
894 3, 3, 3, 1, 3, 1, 3, 1, 2, 2,
895 2, 2, 2, 2, 3, 3, 1, 1, 1, 1,
896 1, 2, 1, 3, 1, 2, 3, 4, 3, 2,
897 2, 1, 1, 1, 1, 1, 1, 1, 3, 3,
901 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
902 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
903 means the default is an error. */
904 static const yytype_uint8 yydefact
[] =
906 33, 171, 174, 172, 173, 73, 0, 0, 0, 156,
907 157, 160, 0, 0, 0, 0, 0, 0, 0, 0,
908 34, 0, 159, 0, 0, 0, 0, 0, 0, 0,
909 0, 0, 158, 35, 36, 37, 0, 0, 0, 0,
910 33, 6, 5, 0, 40, 45, 46, 0, 4, 51,
911 56, 55, 54, 57, 53, 0, 75, 77, 175, 79,
912 176, 177, 85, 113, 115, 117, 119, 121, 123, 125,
913 128, 133, 136, 139, 143, 145, 0, 147, 162, 164,
914 42, 180, 0, 0, 71, 0, 25, 0, 0, 0,
915 0, 0, 0, 60, 61, 58, 0, 171, 148, 149,
916 0, 0, 0, 41, 153, 152, 151, 92, 88, 90,
917 0, 0, 161, 0, 1, 3, 0, 0, 38, 39,
918 0, 86, 52, 74, 0, 99, 100, 101, 102, 108,
919 109, 110, 103, 104, 105, 97, 98, 106, 107, 0,
920 112, 111, 0, 0, 0, 0, 0, 0, 0, 0,
921 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
922 0, 0, 0, 0, 150, 0, 0, 0, 169, 170,
923 165, 179, 81, 72, 0, 43, 0, 0, 0, 0,
924 0, 0, 59, 95, 96, 0, 154, 0, 93, 94,
925 0, 89, 87, 155, 178, 23, 0, 0, 47, 0,
926 76, 78, 80, 116, 0, 118, 120, 122, 124, 126,
927 127, 129, 131, 130, 132, 135, 134, 137, 138, 140,
928 141, 142, 144, 146, 163, 166, 0, 168, 82, 26,
929 44, 0, 0, 0, 0, 0, 0, 0, 83, 0,
930 91, 0, 33, 0, 0, 0, 33, 0, 0, 0,
931 48, 0, 0, 167, 62, 64, 0, 0, 0, 0,
932 70, 68, 84, 24, 21, 0, 15, 33, 20, 19,
933 13, 11, 33, 0, 22, 33, 0, 114, 0, 66,
934 0, 0, 0, 7, 18, 0, 0, 0, 9, 0,
935 0, 0, 0, 63, 67, 65, 69, 14, 12, 8,
936 10, 30, 28, 49, 0, 0, 29, 27, 50
939 /* YYDEFGOTO[NTERM-NUM]. */
940 static const yytype_int16 yydefgoto
[] =
942 -1, 39, 40, 264, 245, 265, 266, 267, 248, 196,
943 87, 268, 43, 44, 120, 45, 46, 47, 199, 292,
944 269, 49, 50, 51, 52, 53, 54, 55, 56, 57,
945 58, 189, 59, 108, 109, 60, 61, 139, 142, 62,
946 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
947 73, 74, 75, 76, 77, 78, 79
950 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
952 #define YYPACT_NINF -234
953 static const yytype_int16 yypact
[] =
955 428, 9, -234, -234, -234, -234, 41, 914, 504, -234,
956 -234, -234, 11, 12, 51, 64, 577, 76, 39, 54,
957 -234, 647, -234, 976, 976, 914, 914, 114, 25, 976,
958 976, 131, -234, -12, -234, 38, 7, 69, 914, 139,
959 200, -234, -234, 44, 2, -234, -234, 131, -234, 577,
960 -234, -234, -234, -234, -234, 147, 962, 14, -234, -234,
961 -234, -234, -234, 53, 132, 117, 116, 118, 119, 81,
962 66, 127, 102, 82, 115, -234, 976, 83, 24, -234,
963 -234, -234, 156, 155, -234, 157, 154, 145, 914, 914,
964 717, -19, 914, -234, -234, -234, 165, -234, -234, -234,
965 164, 166, 914, 110, 167, -234, -234, 168, -234, 171,
966 131, 131, 169, 78, -234, -234, 183, 183, -234, -234,
967 25, -234, -234, -234, 914, -234, -234, -234, -234, -234,
968 -234, -234, -234, -234, -234, -234, -234, -234, -234, 914,
969 -234, -234, 914, 976, 914, 976, 976, 976, 976, 976,
970 976, 976, 976, 976, 976, 976, 976, 976, 976, 976,
971 976, 976, 976, 25, -234, 52, 779, 184, -234, -234,
972 -234, -234, 167, -234, 11, 121, 177, 178, 717, 180,
973 181, 182, -234, -234, -234, 185, -234, 841, -234, 186,
974 131, -234, -234, -234, -234, 187, 0, 5, 188, 190,
975 -234, 14, -234, 132, 189, 117, 116, 118, 119, 81,
976 81, 66, 66, 66, 66, 127, 127, 102, 102, 82,
977 82, 82, 115, -234, 24, -234, 195, -234, -234, -234,
978 -234, 577, 577, 903, 914, 914, 577, 577, -234, 194,
979 -234, 183, 276, 11, 183, 197, 276, 183, 199, 209,
980 186, 191, 976, -234, 175, -234, 577, 212, 214, 215,
981 -234, -234, -234, -234, -234, 217, -234, 352, -234, -234,
982 138, 133, 276, 228, -234, 276, 26, -234, 577, -234,
983 577, 236, 237, -234, -234, 183, 11, 235, -234, 238,
984 16, 131, 243, -234, -234, -234, -234, -234, -234, -234,
985 -234, -234, -234, 248, 62, 25, -234, -234, -234
988 /* YYPGOTO[NTERM-NUM]. */
989 static const yytype_int16 yypgoto
[] =
991 -234, 218, -234, 27, -234, -233, -10, -234, -234, -111,
992 -165, 30, -234, -234, -234, -234, -234, -28, -234, -46,
993 40, -15, -234, -234, -234, -108, -79, -4, -234, 122,
994 -71, 68, 125, -42, -31, -234, -234, -234, -234, 21,
995 -234, 135, 123, 128, 129, 136, 6, -37, 4, -6,
996 -32, 113, -5, -234, -234, 99, -234
999 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1000 positive, shift that token. If negative, reduce the rule which
1001 number is the opposite. If zero, do what YYDEFACT says.
1002 If YYTABLE_NINF, syntax error. */
1003 #define YYTABLE_NINF -42
1004 static const yytype_int16 yytable
[] =
1006 104, 91, 82, 83, 193, 121, 197, 170, 111, 229,
1007 103, 178, -41, 273, 86, 242, 179, 96, 98, 99,
1008 246, 100, 101, 88, 105, 106, 301, 41, 103, 103,
1009 42, 8, 12, 186, 113, 166, 188, 7, 290, 287,
1010 48, 167, 289, 180, 1, 2, 3, 4, 85, 93,
1011 12, 12, 6, 81, 7, 97, 2, 3, 4, 9,
1012 10, 11, 89, 6, 94, 7, 12, 41, 191, 192,
1013 42, 164, 306, 168, 169, 90, 80, 8, 270, 110,
1014 48, -31, -31, 143, 176, 177, 22, 92, 181, 122,
1015 23, 24, 198, 25, 26, 243, 244, 144, 185, 233,
1016 247, 228, 118, 119, 25, 26, 151, 152, 153, 154,
1017 28, 29, 30, 31, 211, 212, 213, 214, 140, 141,
1018 200, 298, 159, 160, 161, 102, 32, 219, 220, 221,
1019 263, -32, -32, 271, 107, 223, 274, 116, 117, 114,
1020 204, 36, 149, 150, 37, 157, 158, 38, 240, 155,
1021 156, 217, 218, 170, 112, 209, 210, 123, 38, 215,
1022 216, 145, 226, 146, 147, 148, 163, 162, 171, 172,
1023 165, 174, 175, 173, 297, 182, 183, 80, 184, 190,
1024 7, 187, 302, 83, 8, 194, 195, 227, 230, 231,
1025 232, 234, 235, 251, 236, 241, 307, 237, 252, 239,
1026 -2, 249, 276, 1, 2, 3, 4, 253, 262, 278,
1027 5, 6, 272, 7, 275, 8, 254, 255, 9, 10,
1028 11, 260, 261, 238, 280, 12, 281, 282, 286, 257,
1029 258, 259, 13, 283, 285, 14, 15, 16, 17, 18,
1030 19, 279, 20, 21, 288, 22, 295, 296, 291, 23,
1031 24, 299, 25, 26, 300, 304, 305, 284, 115, 308,
1032 303, 201, 27, 293, 224, 294, 250, 202, 205, 28,
1033 29, 30, 31, 277, 206, 222, 207, 291, 203, 1,
1034 2, 3, 4, 0, 208, 32, 5, 6, 0, 7,
1035 0, 8, -16, 0, 9, 10, 11, 33, 34, 35,
1036 36, 12, 0, 37, 0, 0, 38, 0, 13, 0,
1037 0, 14, 15, 16, 17, 18, 19, 0, 20, 21,
1038 0, 22, 0, 0, 0, 23, 24, 0, 25, 26,
1039 0, 0, 0, 0, 0, 0, 0, 0, 27, 0,
1040 0, 0, 0, 0, 0, 28, 29, 30, 31, 0,
1041 0, 0, 0, 0, 0, 1, 2, 3, 4, 0,
1042 0, 32, 5, 6, 0, 7, 0, 8, -17, 0,
1043 9, 10, 11, 33, 34, 35, 36, 12, 0, 37,
1044 0, 0, 38, 0, 13, 0, 0, 14, 15, 16,
1045 17, 18, 19, 0, 20, 21, 0, 22, 0, 0,
1046 0, 23, 24, 0, 25, 26, 0, 0, 0, 0,
1047 0, 0, 0, 0, 27, 0, 0, 0, 0, 0,
1048 0, 28, 29, 30, 31, 0, 0, 0, 0, 0,
1049 0, 1, 2, 3, 4, 0, 0, 32, 5, 6,
1050 0, 7, 0, 8, 0, 0, 9, 10, 11, 33,
1051 34, 35, 36, 12, 0, 37, 0, 0, 38, 0,
1052 13, 0, 0, 14, 15, 16, 17, 18, 19, 0,
1053 20, 21, 0, 22, 0, 0, 0, 23, 24, 0,
1054 25, 26, 0, 0, 0, 0, 0, 0, 0, 0,
1055 27, 0, 0, 0, 0, 0, 0, 28, 29, 30,
1056 31, 0, 0, 0, 0, 0, 0, 1, 2, 3,
1057 4, 0, 0, 32, 5, 6, 0, 7, 0, 8,
1058 84, 0, 9, 10, 11, 33, 34, 35, 36, 12,
1059 0, 37, 0, 0, 38, 0, 13, 0, 0, 14,
1060 15, 16, 17, 18, 19, 0, 0, 21, 0, 22,
1061 0, 0, 0, 23, 24, 0, 25, 26, 0, 0,
1062 0, 0, 0, 0, 0, 0, 27, 0, 0, 0,
1063 0, 0, 0, 28, 29, 30, 31, 0, 0, 0,
1064 1, 2, 3, 4, 0, 0, 0, 5, 6, 32,
1065 7, 0, 8, 0, 0, 9, 10, 11, 0, 0,
1066 0, 0, 12, 0, 36, 0, 0, 37, 0, 13,
1067 38, 0, 14, 15, 16, 17, 18, 19, 0, 0,
1068 21, 0, 22, 0, 0, 0, 23, 24, 0, 25,
1069 26, 0, 0, 0, 0, 0, 0, 0, 0, 27,
1070 0, 0, 0, 0, 0, 0, 28, 29, 30, 31,
1071 1, 2, 3, 4, 0, 0, 0, 95, 6, 0,
1072 7, 0, 32, 0, 0, 9, 10, 11, 0, 0,
1073 0, 0, 12, 0, 0, 0, 0, 36, 0, 0,
1074 37, 0, 0, 38, 0, 0, 0, 0, 0, 0,
1075 0, 0, 22, 0, 0, 0, 23, 24, 0, 25,
1076 26, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1077 0, 0, 0, 0, 0, 0, 28, 29, 30, 31,
1078 1, 2, 3, 4, 0, 0, 0, 5, 6, 0,
1079 7, 0, 32, 0, 0, 9, 10, 11, 0, 0,
1080 0, 0, 12, 0, 0, 0, 0, 36, 0, 0,
1081 37, 0, 0, 38, 0, 0, 0, 0, 0, 0,
1082 0, 0, 22, 0, 0, 0, 23, 24, 0, 25,
1083 26, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1084 0, 0, 1, 2, 3, 4, 28, 29, 30, 31,
1085 6, 225, 7, 0, 0, 0, 0, 9, 10, 11,
1086 0, 0, 32, 0, 12, 0, 0, 0, 0, 0,
1087 0, 0, 0, 0, 0, 0, 0, 36, 0, 0,
1088 37, 0, 0, 38, 22, 0, 0, 0, 23, 24,
1089 0, 25, 26, 0, 0, 0, 0, 0, 0, 0,
1090 0, 0, 0, 0, 1, 2, 3, 4, 28, 29,
1091 30, 31, 6, 0, 7, 238, 0, 0, 0, 9,
1092 10, 11, 0, 0, 32, 0, 12, 0, 0, 0,
1093 0, 0, 0, 0, 0, 0, 0, 0, 0, 36,
1094 0, 0, 37, 0, 0, 38, 22, 0, 0, 0,
1095 23, 24, 0, 25, 26, 0, 0, 0, 0, 0,
1096 0, 0, 0, 0, 0, 0, 1, 2, 3, 4,
1097 28, 29, 30, 31, 6, 256, 7, 1, 2, 3,
1098 4, 9, 10, 11, 0, 6, 32, 7, 12, 0,
1099 0, 0, 9, 10, 11, 0, 0, 0, 0, 12,
1100 0, 36, 0, 0, 37, 0, 0, 38, 22, 0,
1101 0, 0, 23, 24, 0, 25, 26, 0, 0, 22,
1102 0, 0, 0, 23, 24, 0, 25, 26, 0, 0,
1103 124, 0, 28, 29, 30, 31, 0, 0, 0, 97,
1104 2, 3, 4, 28, 29, 30, 31, 6, 32, 7,
1105 0, 0, 0, 0, 9, 10, 11, 0, 0, 32,
1106 0, 0, 0, 36, 0, 0, 37, 0, 0, 38,
1107 0, 0, 0, 0, 36, 0, 0, 37, 0, 0,
1108 38, 22, 0, 0, 0, 23, 24, 0, 25, 26,
1109 0, 0, 0, 0, 0, 125, 126, 127, 128, 129,
1110 130, 131, 132, 133, 134, 28, 29, 30, 135, 0,
1111 0, 136, 0, 137, 138, 0, 0, 0, 0, 0,
1112 0, 32, 0, 0, 0, 0, 0, 0, 0, 0,
1113 0, 0, 0, 0, 0, 0, 0, 0, 0, 37,
1117 static const yytype_int16 yycheck
[] =
1119 28, 16, 6, 7, 112, 47, 117, 78, 36, 174,
1120 3, 90, 3, 246, 3, 15, 35, 21, 23, 24,
1121 15, 25, 26, 11, 29, 30, 10, 0, 3, 3,
1122 0, 15, 25, 104, 38, 11, 107, 13, 12, 272,
1123 0, 17, 275, 62, 3, 4, 5, 6, 8, 10,
1124 25, 25, 11, 12, 13, 3, 4, 5, 6, 18,
1125 19, 20, 11, 11, 10, 13, 25, 40, 110, 111,
1126 40, 76, 10, 49, 50, 11, 67, 15, 243, 72,
1127 40, 93, 94, 30, 88, 89, 45, 11, 92, 49,
1128 49, 50, 120, 52, 53, 95, 96, 44, 102, 178,
1129 95, 172, 100, 101, 52, 53, 25, 26, 27, 28,
1130 69, 70, 71, 72, 151, 152, 153, 154, 104, 105,
1131 124, 286, 20, 21, 22, 11, 85, 159, 160, 161,
1132 241, 93, 94, 244, 3, 163, 247, 93, 94, 0,
1133 144, 100, 23, 24, 103, 18, 19, 106, 190, 83,
1134 84, 157, 158, 224, 85, 149, 150, 10, 106, 155,
1135 156, 29, 166, 46, 48, 47, 51, 85, 12, 14,
1136 87, 17, 27, 16, 285, 10, 12, 67, 12, 8,
1137 13, 13, 290, 187, 15, 107, 3, 3, 67, 12,
1138 12, 11, 11, 3, 12, 8, 304, 12, 9, 13,
1139 0, 13, 11, 3, 4, 5, 6, 12, 14, 34,
1140 10, 11, 15, 13, 15, 15, 231, 232, 18, 19,
1141 20, 236, 237, 14, 12, 25, 12, 12, 95, 233,
1142 234, 235, 32, 16, 96, 35, 36, 37, 38, 39,
1143 40, 256, 42, 43, 16, 45, 10, 10, 276, 49,
1144 50, 16, 52, 53, 16, 12, 8, 267, 40, 305,
1145 291, 139, 62, 278, 165, 280, 198, 142, 145, 69,
1146 70, 71, 72, 252, 146, 162, 147, 305, 143, 3,
1147 4, 5, 6, -1, 148, 85, 10, 11, -1, 13,
1148 -1, 15, 16, -1, 18, 19, 20, 97, 98, 99,
1149 100, 25, -1, 103, -1, -1, 106, -1, 32, -1,
1150 -1, 35, 36, 37, 38, 39, 40, -1, 42, 43,
1151 -1, 45, -1, -1, -1, 49, 50, -1, 52, 53,
1152 -1, -1, -1, -1, -1, -1, -1, -1, 62, -1,
1153 -1, -1, -1, -1, -1, 69, 70, 71, 72, -1,
1154 -1, -1, -1, -1, -1, 3, 4, 5, 6, -1,
1155 -1, 85, 10, 11, -1, 13, -1, 15, 16, -1,
1156 18, 19, 20, 97, 98, 99, 100, 25, -1, 103,
1157 -1, -1, 106, -1, 32, -1, -1, 35, 36, 37,
1158 38, 39, 40, -1, 42, 43, -1, 45, -1, -1,
1159 -1, 49, 50, -1, 52, 53, -1, -1, -1, -1,
1160 -1, -1, -1, -1, 62, -1, -1, -1, -1, -1,
1161 -1, 69, 70, 71, 72, -1, -1, -1, -1, -1,
1162 -1, 3, 4, 5, 6, -1, -1, 85, 10, 11,
1163 -1, 13, -1, 15, -1, -1, 18, 19, 20, 97,
1164 98, 99, 100, 25, -1, 103, -1, -1, 106, -1,
1165 32, -1, -1, 35, 36, 37, 38, 39, 40, -1,
1166 42, 43, -1, 45, -1, -1, -1, 49, 50, -1,
1167 52, 53, -1, -1, -1, -1, -1, -1, -1, -1,
1168 62, -1, -1, -1, -1, -1, -1, 69, 70, 71,
1169 72, -1, -1, -1, -1, -1, -1, 3, 4, 5,
1170 6, -1, -1, 85, 10, 11, -1, 13, -1, 15,
1171 16, -1, 18, 19, 20, 97, 98, 99, 100, 25,
1172 -1, 103, -1, -1, 106, -1, 32, -1, -1, 35,
1173 36, 37, 38, 39, 40, -1, -1, 43, -1, 45,
1174 -1, -1, -1, 49, 50, -1, 52, 53, -1, -1,
1175 -1, -1, -1, -1, -1, -1, 62, -1, -1, -1,
1176 -1, -1, -1, 69, 70, 71, 72, -1, -1, -1,
1177 3, 4, 5, 6, -1, -1, -1, 10, 11, 85,
1178 13, -1, 15, -1, -1, 18, 19, 20, -1, -1,
1179 -1, -1, 25, -1, 100, -1, -1, 103, -1, 32,
1180 106, -1, 35, 36, 37, 38, 39, 40, -1, -1,
1181 43, -1, 45, -1, -1, -1, 49, 50, -1, 52,
1182 53, -1, -1, -1, -1, -1, -1, -1, -1, 62,
1183 -1, -1, -1, -1, -1, -1, 69, 70, 71, 72,
1184 3, 4, 5, 6, -1, -1, -1, 10, 11, -1,
1185 13, -1, 85, -1, -1, 18, 19, 20, -1, -1,
1186 -1, -1, 25, -1, -1, -1, -1, 100, -1, -1,
1187 103, -1, -1, 106, -1, -1, -1, -1, -1, -1,
1188 -1, -1, 45, -1, -1, -1, 49, 50, -1, 52,
1189 53, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1190 -1, -1, -1, -1, -1, -1, 69, 70, 71, 72,
1191 3, 4, 5, 6, -1, -1, -1, 10, 11, -1,
1192 13, -1, 85, -1, -1, 18, 19, 20, -1, -1,
1193 -1, -1, 25, -1, -1, -1, -1, 100, -1, -1,
1194 103, -1, -1, 106, -1, -1, -1, -1, -1, -1,
1195 -1, -1, 45, -1, -1, -1, 49, 50, -1, 52,
1196 53, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1197 -1, -1, 3, 4, 5, 6, 69, 70, 71, 72,
1198 11, 12, 13, -1, -1, -1, -1, 18, 19, 20,
1199 -1, -1, 85, -1, 25, -1, -1, -1, -1, -1,
1200 -1, -1, -1, -1, -1, -1, -1, 100, -1, -1,
1201 103, -1, -1, 106, 45, -1, -1, -1, 49, 50,
1202 -1, 52, 53, -1, -1, -1, -1, -1, -1, -1,
1203 -1, -1, -1, -1, 3, 4, 5, 6, 69, 70,
1204 71, 72, 11, -1, 13, 14, -1, -1, -1, 18,
1205 19, 20, -1, -1, 85, -1, 25, -1, -1, -1,
1206 -1, -1, -1, -1, -1, -1, -1, -1, -1, 100,
1207 -1, -1, 103, -1, -1, 106, 45, -1, -1, -1,
1208 49, 50, -1, 52, 53, -1, -1, -1, -1, -1,
1209 -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
1210 69, 70, 71, 72, 11, 12, 13, 3, 4, 5,
1211 6, 18, 19, 20, -1, 11, 85, 13, 25, -1,
1212 -1, -1, 18, 19, 20, -1, -1, -1, -1, 25,
1213 -1, 100, -1, -1, 103, -1, -1, 106, 45, -1,
1214 -1, -1, 49, 50, -1, 52, 53, -1, -1, 45,
1215 -1, -1, -1, 49, 50, -1, 52, 53, -1, -1,
1216 8, -1, 69, 70, 71, 72, -1, -1, -1, 3,
1217 4, 5, 6, 69, 70, 71, 72, 11, 85, 13,
1218 -1, -1, -1, -1, 18, 19, 20, -1, -1, 85,
1219 -1, -1, -1, 100, -1, -1, 103, -1, -1, 106,
1220 -1, -1, -1, -1, 100, -1, -1, 103, -1, -1,
1221 106, 45, -1, -1, -1, 49, 50, -1, 52, 53,
1222 -1, -1, -1, -1, -1, 73, 74, 75, 76, 77,
1223 78, 79, 80, 81, 82, 69, 70, 71, 86, -1,
1224 -1, 89, -1, 91, 92, -1, -1, -1, -1, -1,
1225 -1, 85, -1, -1, -1, -1, -1, -1, -1, -1,
1226 -1, -1, -1, -1, -1, -1, -1, -1, -1, 103,
1230 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1231 symbol of state STATE-NUM. */
1232 static const yytype_uint8 yystos
[] =
1234 0, 3, 4, 5, 6, 10, 11, 13, 15, 18,
1235 19, 20, 25, 32, 35, 36, 37, 38, 39, 40,
1236 42, 43, 45, 49, 50, 52, 53, 62, 69, 70,
1237 71, 72, 85, 97, 98, 99, 100, 103, 106, 109,
1238 110, 111, 119, 120, 121, 123, 124, 125, 128, 129,
1239 130, 131, 132, 133, 134, 135, 136, 137, 138, 140,
1240 143, 144, 147, 148, 149, 150, 151, 152, 153, 154,
1241 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
1242 67, 12, 135, 135, 16, 128, 3, 118, 11, 11,
1243 11, 129, 11, 10, 10, 10, 135, 3, 160, 160,
1244 135, 135, 11, 3, 125, 160, 160, 3, 141, 142,
1245 72, 125, 85, 135, 0, 109, 93, 94, 100, 101,
1246 122, 141, 128, 10, 8, 73, 74, 75, 76, 77,
1247 78, 79, 80, 81, 82, 86, 89, 91, 92, 145,
1248 104, 105, 146, 30, 44, 29, 46, 48, 47, 23,
1249 24, 25, 26, 27, 28, 83, 84, 18, 19, 20,
1250 21, 22, 85, 51, 160, 87, 11, 17, 49, 50,
1251 138, 12, 14, 16, 17, 27, 135, 135, 134, 35,
1252 62, 135, 10, 12, 12, 135, 138, 13, 138, 139,
1253 8, 141, 141, 133, 107, 3, 117, 117, 125, 126,
1254 135, 137, 140, 149, 135, 150, 151, 152, 153, 154,
1255 154, 155, 155, 155, 155, 156, 156, 157, 157, 158,
1256 158, 158, 159, 125, 163, 12, 135, 3, 138, 118,
1257 67, 12, 12, 134, 11, 11, 12, 12, 14, 13,
1258 141, 8, 15, 95, 96, 112, 15, 95, 116, 13,
1259 139, 3, 9, 12, 129, 129, 12, 135, 135, 135,
1260 129, 129, 14, 117, 111, 113, 114, 115, 119, 128,
1261 118, 117, 15, 113, 117, 15, 11, 147, 34, 129,
1262 12, 12, 12, 16, 114, 96, 95, 113, 16, 113,
1263 12, 125, 127, 129, 129, 10, 10, 117, 118, 16,
1264 16, 10, 133, 142, 12, 8, 10, 133, 127
1267 #define yyerrok (yyerrstatus = 0)
1268 #define yyclearin (yychar = YYEMPTY)
1269 #define YYEMPTY (-2)
1272 #define YYACCEPT goto yyacceptlab
1273 #define YYABORT goto yyabortlab
1274 #define YYERROR goto yyerrorlab
1277 /* Like YYERROR except do call yyerror. This remains here temporarily
1278 to ease the transition to the new meaning of YYERROR, for GCC.
1279 Once GCC version 2 has supplanted version 1, this can go. */
1281 #define YYFAIL goto yyerrlab
1283 #define YYRECOVERING() (!!yyerrstatus)
1285 #define YYBACKUP(Token, Value) \
1287 if (yychar == YYEMPTY && yylen == 1) \
1291 yytoken = YYTRANSLATE (yychar); \
1297 yyerror (YY_("syntax error: cannot back up")); \
1304 #define YYERRCODE 256
1307 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1308 If N is 0, then set CURRENT to the empty location which ends
1309 the previous symbol: RHS[0] (always defined). */
1311 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1312 #ifndef YYLLOC_DEFAULT
1313 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1317 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1318 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1319 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1320 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1324 (Current).first_line = (Current).last_line = \
1325 YYRHSLOC (Rhs, 0).last_line; \
1326 (Current).first_column = (Current).last_column = \
1327 YYRHSLOC (Rhs, 0).last_column; \
1333 /* YY_LOCATION_PRINT -- Print the location on the stream.
1334 This macro was not mandated originally: define only if we know
1335 we won't break user code: when these are the locations we know. */
1337 #ifndef YY_LOCATION_PRINT
1338 # if YYLTYPE_IS_TRIVIAL
1339 # define YY_LOCATION_PRINT(File, Loc) \
1340 fprintf (File, "%d.%d-%d.%d", \
1341 (Loc).first_line, (Loc).first_column, \
1342 (Loc).last_line, (Loc).last_column)
1344 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1349 /* YYLEX -- calling `yylex' with the right arguments. */
1352 # define YYLEX yylex (YYLEX_PARAM)
1354 # define YYLEX yylex ()
1357 /* Enable debugging if requested. */
1361 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1362 # define YYFPRINTF fprintf
1365 # define YYDPRINTF(Args) \
1371 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1375 YYFPRINTF (stderr, "%s ", Title); \
1376 yy_symbol_print (stderr, \
1378 YYFPRINTF (stderr, "\n"); \
1383 /*--------------------------------.
1384 | Print this symbol on YYOUTPUT. |
1385 `--------------------------------*/
1388 #if (defined __STDC__ || defined __C99__FUNC__ \
1389 || defined __cplusplus || defined _MSC_VER)
1391 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
1394 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
)
1397 YYSTYPE
const * const yyvaluep
;
1403 if (yytype
< YYNTOKENS
)
1404 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
1416 /*--------------------------------.
1417 | Print this symbol on YYOUTPUT. |
1418 `--------------------------------*/
1420 #if (defined __STDC__ || defined __C99__FUNC__ \
1421 || defined __cplusplus || defined _MSC_VER)
1423 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
1426 yy_symbol_print (yyoutput
, yytype
, yyvaluep
)
1429 YYSTYPE
const * const yyvaluep
;
1432 if (yytype
< YYNTOKENS
)
1433 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
1435 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
1437 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
);
1438 YYFPRINTF (yyoutput
, ")");
1441 /*------------------------------------------------------------------.
1442 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1444 `------------------------------------------------------------------*/
1446 #if (defined __STDC__ || defined __C99__FUNC__ \
1447 || defined __cplusplus || defined _MSC_VER)
1449 yy_stack_print (yytype_int16
*bottom
, yytype_int16
*top
)
1452 yy_stack_print (bottom
, top
)
1453 yytype_int16
*bottom
;
1457 YYFPRINTF (stderr
, "Stack now");
1458 for (; bottom
<= top
; ++bottom
)
1459 YYFPRINTF (stderr
, " %d", *bottom
);
1460 YYFPRINTF (stderr
, "\n");
1463 # define YY_STACK_PRINT(Bottom, Top) \
1466 yy_stack_print ((Bottom), (Top)); \
1470 /*------------------------------------------------.
1471 | Report that the YYRULE is going to be reduced. |
1472 `------------------------------------------------*/
1474 #if (defined __STDC__ || defined __C99__FUNC__ \
1475 || defined __cplusplus || defined _MSC_VER)
1477 yy_reduce_print (YYSTYPE
*yyvsp
, int yyrule
)
1480 yy_reduce_print (yyvsp
, yyrule
)
1485 int yynrhs
= yyr2
[yyrule
];
1487 unsigned long int yylno
= yyrline
[yyrule
];
1488 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
1490 /* The symbols being reduced. */
1491 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
1493 fprintf (stderr
, " $%d = ", yyi
+ 1);
1494 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
1495 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
1497 fprintf (stderr
, "\n");
1501 # define YY_REDUCE_PRINT(Rule) \
1504 yy_reduce_print (yyvsp, Rule); \
1507 /* Nonzero means print parse trace. It is left uninitialized so that
1508 multiple parsers can coexist. */
1510 #else /* !YYDEBUG */
1511 # define YYDPRINTF(Args)
1512 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1513 # define YY_STACK_PRINT(Bottom, Top)
1514 # define YY_REDUCE_PRINT(Rule)
1515 #endif /* !YYDEBUG */
1518 /* YYINITDEPTH -- initial size of the parser's stacks. */
1520 # define YYINITDEPTH 200
1523 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1524 if the built-in stack extension method is used).
1526 Do not make this value too large; the results are undefined if
1527 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1528 evaluated with infinite-precision integer arithmetic. */
1531 # define YYMAXDEPTH 10000
1539 # if defined __GLIBC__ && defined _STRING_H
1540 # define yystrlen strlen
1542 /* Return the length of YYSTR. */
1543 #if (defined __STDC__ || defined __C99__FUNC__ \
1544 || defined __cplusplus || defined _MSC_VER)
1546 yystrlen (const char *yystr
)
1554 for (yylen
= 0; yystr
[yylen
]; yylen
++)
1562 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1563 # define yystpcpy stpcpy
1565 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1567 #if (defined __STDC__ || defined __C99__FUNC__ \
1568 || defined __cplusplus || defined _MSC_VER)
1570 yystpcpy (char *yydest
, const char *yysrc
)
1573 yystpcpy (yydest
, yysrc
)
1579 const char *yys
= yysrc
;
1581 while ((*yyd
++ = *yys
++) != '\0')
1590 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1591 quotes and backslashes, so that it's suitable for yyerror. The
1592 heuristic is that double-quoting is unnecessary unless the string
1593 contains an apostrophe, a comma, or backslash (other than
1594 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1595 null, do not copy; instead, return the length of what the result
1598 yytnamerr (char *yyres
, const char *yystr
)
1603 char const *yyp
= yystr
;
1610 goto do_not_strip_quotes
;
1614 goto do_not_strip_quotes
;
1627 do_not_strip_quotes
: ;
1631 return yystrlen (yystr
);
1633 return yystpcpy (yyres
, yystr
) - yyres
;
1637 /* Copy into YYRESULT an error message about the unexpected token
1638 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1639 including the terminating null byte. If YYRESULT is null, do not
1640 copy anything; just return the number of bytes that would be
1641 copied. As a special case, return 0 if an ordinary "syntax error"
1642 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1643 size calculation. */
1645 yysyntax_error (char *yyresult
, int yystate
, int yychar
)
1647 int yyn
= yypact
[yystate
];
1649 if (! (YYPACT_NINF
< yyn
&& yyn
<= YYLAST
))
1653 int yytype
= YYTRANSLATE (yychar
);
1654 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytype
]);
1655 YYSIZE_T yysize
= yysize0
;
1657 int yysize_overflow
= 0;
1658 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1659 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1663 /* This is so xgettext sees the translatable formats that are
1664 constructed on the fly. */
1665 YY_("syntax error, unexpected %s");
1666 YY_("syntax error, unexpected %s, expecting %s");
1667 YY_("syntax error, unexpected %s, expecting %s or %s");
1668 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1669 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1673 static char const yyunexpected
[] = "syntax error, unexpected %s";
1674 static char const yyexpecting
[] = ", expecting %s";
1675 static char const yyor
[] = " or %s";
1676 char yyformat
[sizeof yyunexpected
1677 + sizeof yyexpecting
- 1
1678 + ((YYERROR_VERBOSE_ARGS_MAXIMUM
- 2)
1679 * (sizeof yyor
- 1))];
1680 char const *yyprefix
= yyexpecting
;
1682 /* Start YYX at -YYN if negative to avoid negative indexes in
1684 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1686 /* Stay within bounds of both yycheck and yytname. */
1687 int yychecklim
= YYLAST
- yyn
+ 1;
1688 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1691 yyarg
[0] = yytname
[yytype
];
1692 yyfmt
= yystpcpy (yyformat
, yyunexpected
);
1694 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1695 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
1697 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1701 yyformat
[sizeof yyunexpected
- 1] = '\0';
1704 yyarg
[yycount
++] = yytname
[yyx
];
1705 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1706 yysize_overflow
|= (yysize1
< yysize
);
1708 yyfmt
= yystpcpy (yyfmt
, yyprefix
);
1712 yyf
= YY_(yyformat
);
1713 yysize1
= yysize
+ yystrlen (yyf
);
1714 yysize_overflow
|= (yysize1
< yysize
);
1717 if (yysize_overflow
)
1718 return YYSIZE_MAXIMUM
;
1722 /* Avoid sprintf, as that infringes on the user's name space.
1723 Don't have undefined behavior even if the translation
1724 produced a string with the wrong number of "%s"s. */
1725 char *yyp
= yyresult
;
1727 while ((*yyp
= *yyf
) != '\0')
1729 if (*yyp
== '%' && yyf
[1] == 's' && yyi
< yycount
)
1731 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1744 #endif /* YYERROR_VERBOSE */
1747 /*-----------------------------------------------.
1748 | Release the memory associated to this symbol. |
1749 `-----------------------------------------------*/
1752 #if (defined __STDC__ || defined __C99__FUNC__ \
1753 || defined __cplusplus || defined _MSC_VER)
1755 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
)
1758 yydestruct (yymsg
, yytype
, yyvaluep
)
1768 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1779 /* Prevent warnings from -Wmissing-prototypes. */
1781 #ifdef YYPARSE_PARAM
1782 #if defined __STDC__ || defined __cplusplus
1783 int yyparse (void *YYPARSE_PARAM
);
1787 #else /* ! YYPARSE_PARAM */
1788 #if defined __STDC__ || defined __cplusplus
1793 #endif /* ! YYPARSE_PARAM */
1797 /* The look-ahead symbol. */
1800 /* The semantic value of the look-ahead symbol. */
1803 /* Number of syntax errors so far. */
1812 #ifdef YYPARSE_PARAM
1813 #if (defined __STDC__ || defined __C99__FUNC__ \
1814 || defined __cplusplus || defined _MSC_VER)
1816 yyparse (void *YYPARSE_PARAM
)
1819 yyparse (YYPARSE_PARAM
)
1820 void *YYPARSE_PARAM
;
1822 #else /* ! YYPARSE_PARAM */
1823 #if (defined __STDC__ || defined __C99__FUNC__ \
1824 || defined __cplusplus || defined _MSC_VER)
1838 /* Number of tokens to shift before error messages enabled. */
1840 /* Look-ahead token as an internal (translated) token number. */
1843 /* Buffer for error messages, and its allocated size. */
1845 char *yymsg
= yymsgbuf
;
1846 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1849 /* Three stacks and their tools:
1850 `yyss': related to states,
1851 `yyvs': related to semantic values,
1852 `yyls': related to locations.
1854 Refer to the stacks thru separate pointers, to allow yyoverflow
1855 to reallocate them elsewhere. */
1857 /* The state stack. */
1858 yytype_int16 yyssa
[YYINITDEPTH
];
1859 yytype_int16
*yyss
= yyssa
;
1860 yytype_int16
*yyssp
;
1862 /* The semantic value stack. */
1863 YYSTYPE yyvsa
[YYINITDEPTH
];
1864 YYSTYPE
*yyvs
= yyvsa
;
1869 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1871 YYSIZE_T yystacksize
= YYINITDEPTH
;
1873 /* The variables used to return semantic value and location from the
1878 /* The number of symbols on the RHS of the reduced rule.
1879 Keep to zero when no symbol should be popped. */
1882 YYDPRINTF ((stderr
, "Starting parse\n"));
1887 yychar
= YYEMPTY
; /* Cause a token to be read. */
1889 /* Initialize stack pointers.
1890 Waste one element of value and location stack
1891 so that they stay on the same level as the state stack.
1892 The wasted elements are never initialized. */
1899 /*------------------------------------------------------------.
1900 | yynewstate -- Push a new state, which is found in yystate. |
1901 `------------------------------------------------------------*/
1903 /* In all cases, when you get here, the value and location stacks
1904 have just been pushed. So pushing a state here evens the stacks. */
1910 if (yyss
+ yystacksize
- 1 <= yyssp
)
1912 /* Get the current used size of the three stacks, in elements. */
1913 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1917 /* Give user a chance to reallocate the stack. Use copies of
1918 these so that the &'s don't force the real ones into
1920 YYSTYPE
*yyvs1
= yyvs
;
1921 yytype_int16
*yyss1
= yyss
;
1924 /* Each stack pointer address is followed by the size of the
1925 data in use in that stack, in bytes. This used to be a
1926 conditional around just the two extra args, but that might
1927 be undefined if yyoverflow is a macro. */
1928 yyoverflow (YY_("memory exhausted"),
1929 &yyss1
, yysize
* sizeof (*yyssp
),
1930 &yyvs1
, yysize
* sizeof (*yyvsp
),
1937 #else /* no yyoverflow */
1938 # ifndef YYSTACK_RELOCATE
1939 goto yyexhaustedlab
;
1941 /* Extend the stack our own way. */
1942 if (YYMAXDEPTH
<= yystacksize
)
1943 goto yyexhaustedlab
;
1945 if (YYMAXDEPTH
< yystacksize
)
1946 yystacksize
= YYMAXDEPTH
;
1949 yytype_int16
*yyss1
= yyss
;
1950 union yyalloc
*yyptr
=
1951 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1953 goto yyexhaustedlab
;
1954 YYSTACK_RELOCATE (yyss
);
1955 YYSTACK_RELOCATE (yyvs
);
1957 # undef YYSTACK_RELOCATE
1959 YYSTACK_FREE (yyss1
);
1962 #endif /* no yyoverflow */
1964 yyssp
= yyss
+ yysize
- 1;
1965 yyvsp
= yyvs
+ yysize
- 1;
1968 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1969 (unsigned long int) yystacksize
));
1971 if (yyss
+ yystacksize
- 1 <= yyssp
)
1975 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1984 /* Do appropriate processing given the current state. Read a
1985 look-ahead token if we need one and don't already have one. */
1987 /* First try to decide what to do without reference to look-ahead token. */
1988 yyn
= yypact
[yystate
];
1989 if (yyn
== YYPACT_NINF
)
1992 /* Not known => get a look-ahead token if don't already have one. */
1994 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1995 if (yychar
== YYEMPTY
)
1997 YYDPRINTF ((stderr
, "Reading a token: "));
2001 if (yychar
<= YYEOF
)
2003 yychar
= yytoken
= YYEOF
;
2004 YYDPRINTF ((stderr
, "Now at end of input.\n"));
2008 yytoken
= YYTRANSLATE (yychar
);
2009 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
2012 /* If the proper action on seeing token YYTOKEN is to reduce or to
2013 detect an error, take that action. */
2015 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
2020 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
2029 /* Count tokens shifted since error; after three, turn off error
2034 /* Shift the look-ahead token. */
2035 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
2037 /* Discard the shifted token unless it is eof. */
2038 if (yychar
!= YYEOF
)
2047 /*-----------------------------------------------------------.
2048 | yydefault -- do the default action for the current state. |
2049 `-----------------------------------------------------------*/
2051 yyn
= yydefact
[yystate
];
2057 /*-----------------------------.
2058 | yyreduce -- Do a reduction. |
2059 `-----------------------------*/
2061 /* yyn is the number of a rule to reduce with. */
2064 /* If YYLEN is nonzero, implement the default value of the action:
2067 Otherwise, the following line sets YYVAL to garbage.
2068 This behavior is undocumented and Bison
2069 users should not rely upon it. Assigning to YYVAL
2070 unconditionally makes the parser a bit smaller, and it avoids a
2071 GCC warning that YYVAL may be used uninitialized. */
2072 yyval
= yyvsp
[1-yylen
];
2075 YY_REDUCE_PRINT (yyn
);
2080 { (yyval
.program
) = g_program
= new_program( (yyvsp
[(1) - (1)].program_section
), EM_lineNum
); ;}
2085 { (yyval
.program
) = g_program
= prepend_program( (yyvsp
[(1) - (2)].program_section
), (yyvsp
[(2) - (2)].program
), EM_lineNum
); ;}
2090 { (yyval
.program_section
) = new_section_stmt( (yyvsp
[(1) - (1)].stmt_list
), EM_lineNum
); ;}
2095 { (yyval
.program_section
) = new_section_func_def( (yyvsp
[(1) - (1)].func_def
), EM_lineNum
); ;}
2100 { (yyval
.program_section
) = new_section_class_def( (yyvsp
[(1) - (1)].class_def
), EM_lineNum
); ;}
2105 { (yyval
.class_def
) = new_class_def( (yyvsp
[(1) - (6)].ival
), (yyvsp
[(3) - (6)].id_list
), NULL
, (yyvsp
[(5) - (6)].class_body
), EM_lineNum
); ;}
2110 { (yyval
.class_def
) = new_class_def( (yyvsp
[(1) - (7)].ival
), (yyvsp
[(3) - (7)].id_list
), (yyvsp
[(4) - (7)].class_ext
), (yyvsp
[(6) - (7)].class_body
), EM_lineNum
); ;}
2115 { (yyval
.class_def
) = new_iface_def( (yyvsp
[(1) - (6)].ival
), (yyvsp
[(3) - (6)].id_list
), NULL
, (yyvsp
[(5) - (6)].class_body
), EM_lineNum
); ;}
2120 { (yyval
.class_def
) = new_iface_def( (yyvsp
[(1) - (7)].ival
), (yyvsp
[(3) - (7)].id_list
), (yyvsp
[(4) - (7)].class_ext
), (yyvsp
[(6) - (7)].class_body
), EM_lineNum
); ;}
2125 { (yyval
.class_ext
) = new_class_ext( NULL
, (yyvsp
[(2) - (2)].id_list
), EM_lineNum
); ;}
2130 { (yyval
.class_ext
) = new_class_ext( (yyvsp
[(4) - (4)].id_list
), (yyvsp
[(2) - (4)].id_list
), EM_lineNum
); ;}
2135 { (yyval
.class_ext
) = new_class_ext( (yyvsp
[(2) - (2)].id_list
), NULL
, EM_lineNum
); ;}
2140 { (yyval
.class_ext
) = new_class_ext( (yyvsp
[(2) - (4)].id_list
), (yyvsp
[(4) - (4)].id_list
), EM_lineNum
); ;}
2145 { (yyval
.class_body
) = (yyvsp
[(1) - (1)].class_body
); ;}
2150 { (yyval
.class_body
) = NULL
; ;}
2155 { (yyval
.class_body
) = new_class_body( (yyvsp
[(1) - (1)].program_section
), EM_lineNum
); ;}
2160 { (yyval
.class_body
) = prepend_class_body( (yyvsp
[(1) - (2)].program_section
), (yyvsp
[(2) - (2)].class_body
), EM_lineNum
); ;}
2165 { (yyval
.program_section
) = new_section_stmt( (yyvsp
[(1) - (1)].stmt_list
), EM_lineNum
); ;}
2170 { (yyval
.program_section
) = new_section_func_def( (yyvsp
[(1) - (1)].func_def
), EM_lineNum
); ;}
2175 { (yyval
.program_section
) = new_section_class_def( (yyvsp
[(1) - (1)].class_def
), EM_lineNum
); ;}
2180 { (yyval
.class_ext
) = new_class_ext( NULL
, (yyvsp
[(2) - (2)].id_list
), EM_lineNum
); ;}
2185 { (yyval
.id_list
) = new_id_list( (yyvsp
[(1) - (1)].sval
), EM_lineNum
); ;}
2190 { (yyval
.id_list
) = prepend_id_list( (yyvsp
[(1) - (3)].sval
), (yyvsp
[(3) - (3)].id_list
), EM_lineNum
); ;}
2195 { (yyval
.id_list
) = new_id_list( (yyvsp
[(1) - (1)].sval
), EM_lineNum
); ;}
2200 { (yyval
.id_list
) = prepend_id_list( (yyvsp
[(1) - (3)].sval
), (yyvsp
[(3) - (3)].id_list
), EM_lineNum
); ;}
2205 { (yyval
.func_def
) = new_func_def( (yyvsp
[(1) - (8)].ival
), (yyvsp
[(2) - (8)].ival
), (yyvsp
[(3) - (8)].type_decl
), (yyvsp
[(4) - (8)].sval
), (yyvsp
[(6) - (8)].arg_list
), (yyvsp
[(8) - (8)].stmt
), EM_lineNum
); ;}
2210 { (yyval
.func_def
) = new_func_def( (yyvsp
[(1) - (7)].ival
), (yyvsp
[(2) - (7)].ival
), (yyvsp
[(3) - (7)].type_decl
), (yyvsp
[(4) - (7)].sval
), NULL
, (yyvsp
[(7) - (7)].stmt
), EM_lineNum
); ;}
2215 { (yyval
.func_def
) = new_func_def( (yyvsp
[(1) - (8)].ival
), (yyvsp
[(2) - (8)].ival
), (yyvsp
[(3) - (8)].type_decl
), (yyvsp
[(4) - (8)].sval
), (yyvsp
[(6) - (8)].arg_list
), NULL
, EM_lineNum
); ;}
2220 { (yyval
.func_def
) = new_func_def( (yyvsp
[(1) - (7)].ival
), (yyvsp
[(2) - (7)].ival
), (yyvsp
[(3) - (7)].type_decl
), (yyvsp
[(4) - (7)].sval
), NULL
, NULL
, EM_lineNum
); ;}
2225 { (yyval
.ival
) = ae_key_public
; ;}
2230 { (yyval
.ival
) = ae_key_private
; ;}
2235 { (yyval
.ival
) = ae_key_private
; ;}
2240 { (yyval
.ival
) = ae_key_func
; ;}
2245 { (yyval
.ival
) = ae_key_public
; ;}
2250 { (yyval
.ival
) = ae_key_protected
; ;}
2255 { (yyval
.ival
) = ae_key_private
; ;}
2260 { (yyval
.ival
) = ae_key_static
; ;}
2265 { (yyval
.ival
) = ae_key_abstract
; ;}
2270 { (yyval
.ival
) = ae_key_instance
; ;}
2275 { (yyval
.type_decl
) = new_type_decl( new_id_list( (yyvsp
[(1) - (1)].sval
), EM_lineNum
), 0, EM_lineNum
); ;}
2280 { (yyval
.type_decl
) = new_type_decl( new_id_list( (yyvsp
[(1) - (2)].sval
), EM_lineNum
), 1, EM_lineNum
); ;}
2285 { (yyval
.type_decl
) = new_type_decl( (yyvsp
[(2) - (3)].id_list
), 0, EM_lineNum
); ;}
2290 { (yyval
.type_decl
) = new_type_decl( (yyvsp
[(2) - (4)].id_list
), 1, EM_lineNum
); ;}
2295 { (yyval
.type_decl
) = (yyvsp
[(1) - (1)].type_decl
); ;}
2300 { (yyval
.type_decl
) = (yyvsp
[(1) - (1)].type_decl
); ;}
2305 { (yyval
.type_decl
) = (yyvsp
[(1) - (1)].type_decl
); ;}
2310 { (yyval
.type_decl
) = add_type_decl_array( (yyvsp
[(1) - (2)].type_decl
), (yyvsp
[(2) - (2)].array_sub
), EM_lineNum
); ;}
2315 { (yyval
.arg_list
) = new_arg_list( (yyvsp
[(1) - (2)].type_decl
), (yyvsp
[(2) - (2)].var_decl
), EM_lineNum
); ;}
2320 { (yyval
.arg_list
) = prepend_arg_list( (yyvsp
[(1) - (4)].type_decl
), (yyvsp
[(2) - (4)].var_decl
), (yyvsp
[(4) - (4)].arg_list
), EM_lineNum
); ;}
2325 { (yyval
.stmt_list
) = new_stmt_list( (yyvsp
[(1) - (1)].stmt
), EM_lineNum
); ;}
2330 { (yyval
.stmt_list
) = prepend_stmt_list( (yyvsp
[(1) - (2)].stmt
), (yyvsp
[(2) - (2)].stmt_list
), EM_lineNum
); ;}
2335 { (yyval
.stmt
) = (yyvsp
[(1) - (1)].stmt
); ;}
2340 { (yyval
.stmt
) = (yyvsp
[(1) - (1)].stmt
); ;}
2345 { (yyval
.stmt
) = (yyvsp
[(1) - (1)].stmt
); ;}
2350 { (yyval
.stmt
) = (yyvsp
[(1) - (1)].stmt
); ;}
2355 { (yyval
.stmt
) = (yyvsp
[(1) - (1)].stmt
); ;}
2360 { (yyval
.stmt
) = new_stmt_from_return( NULL
, EM_lineNum
); ;}
2365 { (yyval
.stmt
) = new_stmt_from_return( (yyvsp
[(2) - (3)].exp
), EM_lineNum
); ;}
2370 { (yyval
.stmt
) = new_stmt_from_break( EM_lineNum
); ;}
2375 { (yyval
.stmt
) = new_stmt_from_continue( EM_lineNum
); ;}
2380 { (yyval
.stmt
) = new_stmt_from_if( (yyvsp
[(3) - (5)].exp
), (yyvsp
[(5) - (5)].stmt
), NULL
, EM_lineNum
); ;}
2385 { (yyval
.stmt
) = new_stmt_from_if( (yyvsp
[(3) - (7)].exp
), (yyvsp
[(5) - (7)].stmt
), (yyvsp
[(7) - (7)].stmt
), EM_lineNum
); ;}
2390 { (yyval
.stmt
) = new_stmt_from_while( (yyvsp
[(3) - (5)].exp
), (yyvsp
[(5) - (5)].stmt
), EM_lineNum
); ;}
2395 { (yyval
.stmt
) = new_stmt_from_do_while( (yyvsp
[(5) - (7)].exp
), (yyvsp
[(2) - (7)].stmt
), EM_lineNum
); ;}
2400 { (yyval
.stmt
) = new_stmt_from_for( (yyvsp
[(3) - (6)].stmt
), (yyvsp
[(4) - (6)].stmt
), NULL
, (yyvsp
[(6) - (6)].stmt
), EM_lineNum
); ;}
2405 { (yyval
.stmt
) = new_stmt_from_for( (yyvsp
[(3) - (7)].stmt
), (yyvsp
[(4) - (7)].stmt
), (yyvsp
[(5) - (7)].exp
), (yyvsp
[(7) - (7)].stmt
), EM_lineNum
); ;}
2410 { (yyval
.stmt
) = new_stmt_from_until( (yyvsp
[(3) - (5)].exp
), (yyvsp
[(5) - (5)].stmt
), EM_lineNum
); ;}
2415 { (yyval
.stmt
) = new_stmt_from_do_until( (yyvsp
[(5) - (7)].exp
), (yyvsp
[(2) - (7)].stmt
), EM_lineNum
); ;}
2420 { (yyval
.stmt
) = new_stmt_from_loop( (yyvsp
[(3) - (5)].exp
), (yyvsp
[(5) - (5)].stmt
), EM_lineNum
); ;}
2425 { (yyval
.stmt
) = new_stmt_from_code( NULL
, EM_lineNum
); ;}
2430 { (yyval
.stmt
) = new_stmt_from_code( (yyvsp
[(2) - (3)].stmt_list
), EM_lineNum
); ;}
2435 { (yyval
.stmt
) = NULL
; ;}
2440 { (yyval
.stmt
) = new_stmt_from_expression( (yyvsp
[(1) - (2)].exp
), EM_lineNum
); ;}
2445 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2450 { (yyval
.exp
) = prepend_expression( (yyvsp
[(1) - (3)].exp
), (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2455 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2460 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), (yyvsp
[(2) - (3)].ival
), (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2465 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2470 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), (yyvsp
[(2) - (3)].ival
), (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2475 { (yyval
.array_sub
) = new_array_sub( (yyvsp
[(2) - (3)].exp
), EM_lineNum
); ;}
2480 { (yyval
.array_sub
) = prepend_array_sub( (yyvsp
[(4) - (4)].array_sub
), (yyvsp
[(2) - (4)].exp
), EM_lineNum
); ;}
2485 { (yyval
.array_sub
) = new_array_sub( NULL
, EM_lineNum
); ;}
2490 { (yyval
.array_sub
) = prepend_array_sub( (yyvsp
[(1) - (3)].array_sub
), NULL
, EM_lineNum
); ;}
2495 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2500 { (yyval
.exp
) = new_exp_decl( (yyvsp
[(1) - (2)].type_decl
), (yyvsp
[(2) - (2)].var_decl_list
), 0, EM_lineNum
); ;}
2505 { (yyval
.exp
) = new_exp_decl( (yyvsp
[(2) - (3)].type_decl
), (yyvsp
[(3) - (3)].var_decl_list
), 1, EM_lineNum
); ;}
2510 { (yyval
.exp
) = new_exp_decl( NULL
, (yyvsp
[(2) - (2)].var_decl_list
), 0, EM_lineNum
); ;}
2515 { (yyval
.exp
) = new_exp_decl( NULL
, (yyvsp
[(3) - (3)].var_decl_list
), 1, EM_lineNum
); ;}
2520 { (yyval
.var_decl_list
) = new_var_decl_list( (yyvsp
[(1) - (1)].var_decl
), EM_lineNum
); ;}
2525 { (yyval
.var_decl_list
) = prepend_var_decl_list( (yyvsp
[(1) - (3)].var_decl
), (yyvsp
[(3) - (3)].var_decl_list
), EM_lineNum
); ;}
2530 { (yyval
.var_decl
) = new_var_decl( (yyvsp
[(1) - (1)].sval
), NULL
, EM_lineNum
); ;}
2535 { (yyval
.var_decl
) = new_var_decl( (yyvsp
[(1) - (2)].sval
), (yyvsp
[(2) - (2)].array_sub
), EM_lineNum
); ;}
2540 { (yyval
.var_decl
) = new_var_decl( (yyvsp
[(1) - (2)].sval
), (yyvsp
[(2) - (2)].array_sub
), EM_lineNum
); ;}
2545 { (yyval
.complex_exp
) = new_complex( (yyvsp
[(2) - (3)].exp
), EM_lineNum
); ;}
2550 { (yyval
.polar_exp
) = new_polar( (yyvsp
[(2) - (3)].exp
), EM_lineNum
); ;}
2555 { (yyval
.ival
) = ae_op_chuck
; ;}
2560 { (yyval
.ival
) = ae_op_at_chuck
; ;}
2565 { (yyval
.ival
) = ae_op_plus_chuck
; ;}
2570 { (yyval
.ival
) = ae_op_minus_chuck
; ;}
2575 { (yyval
.ival
) = ae_op_times_chuck
; ;}
2580 { (yyval
.ival
) = ae_op_divide_chuck
; ;}
2585 { (yyval
.ival
) = ae_op_shift_right_chuck
; ;}
2590 { (yyval
.ival
) = ae_op_shift_left_chuck
; ;}
2595 { (yyval
.ival
) = ae_op_percent_chuck
; ;}
2600 { (yyval
.ival
) = ae_op_unchuck
; ;}
2605 { (yyval
.ival
) = ae_op_upchuck
; ;}
2610 { (yyval
.ival
) = ae_op_s_and_chuck
; ;}
2615 { (yyval
.ival
) = ae_op_s_or_chuck
; ;}
2620 { (yyval
.ival
) = ae_op_s_xor_chuck
; ;}
2625 { (yyval
.ival
) = ae_op_arrow_left
; ;}
2630 { (yyval
.ival
) = ae_op_arrow_right
; ;}
2635 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2640 { (yyval
.exp
) = new_exp_from_if( (yyvsp
[(1) - (5)].exp
), (yyvsp
[(3) - (5)].exp
), (yyvsp
[(5) - (5)].exp
), EM_lineNum
); ;}
2645 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2650 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_or
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2655 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2660 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_and
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2665 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2670 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_s_or
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2675 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2680 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_s_xor
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2685 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2690 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_s_and
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2695 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2700 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_eq
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2705 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_neq
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2710 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2715 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_lt
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2720 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_gt
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2725 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_le
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2730 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_ge
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2735 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2740 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_shift_left
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2745 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_shift_right
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2750 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2755 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_plus
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2760 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_minus
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2765 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2770 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_times
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2775 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_divide
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2780 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_percent
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2785 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2790 { (yyval
.exp
) = new_exp_from_binary( (yyvsp
[(1) - (3)].exp
), ae_op_tilda
, (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2795 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2800 { (yyval
.exp
) = new_exp_from_cast( (yyvsp
[(3) - (3)].type_decl
), (yyvsp
[(1) - (3)].exp
), EM_lineNum
); ;}
2805 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2810 { (yyval
.exp
) = new_exp_from_unary( ae_op_plusplus
, (yyvsp
[(2) - (2)].exp
), EM_lineNum
); ;}
2815 { (yyval
.exp
) = new_exp_from_unary( ae_op_minusminus
, (yyvsp
[(2) - (2)].exp
), EM_lineNum
); ;}
2820 { (yyval
.exp
) = new_exp_from_unary( (yyvsp
[(1) - (2)].ival
), (yyvsp
[(2) - (2)].exp
), EM_lineNum
); ;}
2825 { (yyval
.exp
) = new_exp_from_unary( ae_op_typeof
, (yyvsp
[(2) - (2)].exp
), EM_lineNum
); ;}
2830 { (yyval
.exp
) = new_exp_from_unary( ae_op_sizeof
, (yyvsp
[(2) - (2)].exp
), EM_lineNum
); ;}
2835 { (yyval
.exp
) = new_exp_from_unary2( ae_op_new
, (yyvsp
[(2) - (2)].type_decl
), NULL
, EM_lineNum
); ;}
2840 { (yyval
.exp
) = new_exp_from_unary2( ae_op_new
, (yyvsp
[(2) - (3)].type_decl
), (yyvsp
[(3) - (3)].array_sub
), EM_lineNum
); ;}
2845 { (yyval
.exp
) = new_exp_from_unary3( ae_op_spork
, (yyvsp
[(3) - (3)].stmt
), EM_lineNum
); ;}
2850 { (yyval
.ival
) = ae_op_plus
; ;}
2855 { (yyval
.ival
) = ae_op_minus
; ;}
2860 { (yyval
.ival
) = ae_op_tilda
; ;}
2865 { (yyval
.ival
) = ae_op_exclamation
; ;}
2870 { (yyval
.ival
) = ae_op_times
; ;}
2875 { (yyval
.ival
) = ae_op_spork
; ;}
2880 { (yyval
.exp
) = new_exp_from_dur( (yyvsp
[(1) - (3)].exp
), (yyvsp
[(3) - (3)].exp
), EM_lineNum
); ;}
2885 { (yyval
.exp
) = (yyvsp
[(1) - (1)].exp
); ;}
2890 { (yyval
.exp
) = new_exp_from_array( (yyvsp
[(1) - (2)].exp
), (yyvsp
[(2) - (2)].array_sub
), EM_lineNum
); ;}
2895 { (yyval
.exp
) = new_exp_from_func_call( (yyvsp
[(1) - (3)].exp
), NULL
, EM_lineNum
); ;}
2900 { (yyval
.exp
) = new_exp_from_func_call( (yyvsp
[(1) - (4)].exp
), (yyvsp
[(3) - (4)].exp
), EM_lineNum
); ;}
2905 { (yyval
.exp
) = new_exp_from_member_dot( (yyvsp
[(1) - (3)].exp
), (yyvsp
[(3) - (3)].sval
), EM_lineNum
); ;}
2910 { (yyval
.exp
) = new_exp_from_postfix( (yyvsp
[(1) - (2)].exp
), ae_op_plusplus
, EM_lineNum
); ;}
2915 { (yyval
.exp
) = new_exp_from_postfix( (yyvsp
[(1) - (2)].exp
), ae_op_minusminus
, EM_lineNum
); ;}
2920 { (yyval
.exp
) = new_exp_from_id( (yyvsp
[(1) - (1)].sval
), EM_lineNum
); ;}
2925 { (yyval
.exp
) = new_exp_from_int( (yyvsp
[(1) - (1)].ival
), EM_lineNum
); ;}
2930 { (yyval
.exp
) = new_exp_from_float( (yyvsp
[(1) - (1)].fval
), EM_lineNum
); ;}
2935 { (yyval
.exp
) = new_exp_from_str( (yyvsp
[(1) - (1)].sval
), EM_lineNum
); ;}
2940 { (yyval
.exp
) = new_exp_from_array_lit( (yyvsp
[(1) - (1)].array_sub
), EM_lineNum
); ;}
2945 { (yyval
.exp
) = new_exp_from_complex( (yyvsp
[(1) - (1)].complex_exp
), EM_lineNum
); ;}
2950 { (yyval
.exp
) = new_exp_from_polar( (yyvsp
[(1) - (1)].polar_exp
), EM_lineNum
); ;}
2955 { (yyval
.exp
) = new_exp_from_hack( (yyvsp
[(2) - (3)].exp
), EM_lineNum
); ;}
2960 { (yyval
.exp
) = (yyvsp
[(2) - (3)].exp
); ;}
2965 { (yyval
.exp
) = new_exp_from_nil( EM_lineNum
); ;}
2969 /* Line 1267 of yacc.c. */
2970 #line 2971 "chuck.tab.c"
2973 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
2977 YY_STACK_PRINT (yyss
, yyssp
);
2982 /* Now `shift' the result of the reduction. Determine what state
2983 that goes to, based on the state we popped back to and the rule
2984 number reduced by. */
2988 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
2989 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
2990 yystate
= yytable
[yystate
];
2992 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
2997 /*------------------------------------.
2998 | yyerrlab -- here on detecting error |
2999 `------------------------------------*/
3001 /* If not already recovering from an error, report this error. */
3005 #if ! YYERROR_VERBOSE
3006 yyerror (YY_("syntax error"));
3009 YYSIZE_T yysize
= yysyntax_error (0, yystate
, yychar
);
3010 if (yymsg_alloc
< yysize
&& yymsg_alloc
< YYSTACK_ALLOC_MAXIMUM
)
3012 YYSIZE_T yyalloc
= 2 * yysize
;
3013 if (! (yysize
<= yyalloc
&& yyalloc
<= YYSTACK_ALLOC_MAXIMUM
))
3014 yyalloc
= YYSTACK_ALLOC_MAXIMUM
;
3015 if (yymsg
!= yymsgbuf
)
3016 YYSTACK_FREE (yymsg
);
3017 yymsg
= (char *) YYSTACK_ALLOC (yyalloc
);
3019 yymsg_alloc
= yyalloc
;
3023 yymsg_alloc
= sizeof yymsgbuf
;
3027 if (0 < yysize
&& yysize
<= yymsg_alloc
)
3029 (void) yysyntax_error (yymsg
, yystate
, yychar
);
3034 yyerror (YY_("syntax error"));
3036 goto yyexhaustedlab
;
3044 if (yyerrstatus
== 3)
3046 /* If just tried and failed to reuse look-ahead token after an
3047 error, discard it. */
3049 if (yychar
<= YYEOF
)
3051 /* Return failure if at end of input. */
3052 if (yychar
== YYEOF
)
3057 yydestruct ("Error: discarding",
3063 /* Else will try to reuse look-ahead token after shifting the error
3068 /*---------------------------------------------------.
3069 | yyerrorlab -- error raised explicitly by YYERROR. |
3070 `---------------------------------------------------*/
3073 /* Pacify compilers like GCC when the user code never invokes
3074 YYERROR and the label yyerrorlab therefore never appears in user
3076 if (/*CONSTCOND*/ 0)
3079 /* Do not reclaim the symbols of the rule which action triggered
3083 YY_STACK_PRINT (yyss
, yyssp
);
3088 /*-------------------------------------------------------------.
3089 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3090 `-------------------------------------------------------------*/
3092 yyerrstatus
= 3; /* Each real token shifted decrements this. */
3096 yyn
= yypact
[yystate
];
3097 if (yyn
!= YYPACT_NINF
)
3100 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
3108 /* Pop the current state because it cannot handle the error token. */
3113 yydestruct ("Error: popping",
3114 yystos
[yystate
], yyvsp
);
3117 YY_STACK_PRINT (yyss
, yyssp
);
3126 /* Shift the error token. */
3127 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
3133 /*-------------------------------------.
3134 | yyacceptlab -- YYACCEPT comes here. |
3135 `-------------------------------------*/
3140 /*-----------------------------------.
3141 | yyabortlab -- YYABORT comes here. |
3142 `-----------------------------------*/
3148 /*-------------------------------------------------.
3149 | yyexhaustedlab -- memory exhaustion comes here. |
3150 `-------------------------------------------------*/
3152 yyerror (YY_("memory exhausted"));
3158 if (yychar
!= YYEOF
&& yychar
!= YYEMPTY
)
3159 yydestruct ("Cleanup: discarding lookahead",
3161 /* Do not reclaim the symbols of the rule which action triggered
3162 this YYABORT or YYACCEPT. */
3164 YY_STACK_PRINT (yyss
, yyssp
);
3165 while (yyssp
!= yyss
)
3167 yydestruct ("Cleanup: popping",
3168 yystos
[*yyssp
], yyvsp
);
3173 YYSTACK_FREE (yyss
);
3176 if (yymsg
!= yymsgbuf
)
3177 YYSTACK_FREE (yymsg
);
3179 /* Make sure YYID is used. */
3180 return YYID (yyresult
);
3185 #line 2 "chuck.yy.c"
3186 /* A lexical scanner generated by flex */
3188 /* Scanner skeleton version:
3189 * $Header: /cvs/chuck_dev/v2/chuck_win32.c,v 1.53 2007/08/17 04:23:12 gw-chuck Exp $
3192 #define FLEX_SCANNER
3193 #define YY_FLEX_MAJOR_VERSION 2
3194 #define YY_FLEX_MINOR_VERSION 5
3199 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
3214 /* Use prototypes in function declarations. */
3215 #define YY_USE_PROTOS
3217 /* The "const" storage-class-modifier is valid. */
3218 #define YY_USE_CONST
3220 #else /* ! __cplusplus */
3224 #define YY_USE_PROTOS
3225 #define YY_USE_CONST
3227 #endif /* __STDC__ */
3228 #endif /* ! __cplusplus */
3235 #define YY_USE_CONST
3236 #define YY_USE_PROTOS
3240 #define yyconst const
3246 #ifdef YY_USE_PROTOS
3247 #define YY_PROTO(proto) proto
3249 #define YY_PROTO(proto) ()
3253 /* Returned upon end-of-file. */
3256 /* Promotes a possibly negative, possibly signed char to an unsigned
3257 * integer for use as an array index. If the signed char is negative,
3258 * we want to instead treat it as an 8-bit unsigned char, hence the
3261 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
3263 /* Enter a start condition. This macro really ought to take a parameter,
3264 * but we do it the disgusting crufty way forced on us by the ()-less
3265 * definition of BEGIN.
3267 #define BEGIN yy_start = 1 + 2 *
3269 /* Translate the current start state into a value that can be later handed
3270 * to BEGIN to return to the state. The YYSTATE alias is for lex
3273 #define YY_START ((yy_start - 1) / 2)
3274 #define YYSTATE YY_START
3276 /* Action number for EOF rule of a given start state. */
3277 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
3279 /* Special action meaning "start processing a new file". */
3280 #define YY_NEW_FILE yyrestart( yyin )
3282 #define YY_END_OF_BUFFER_CHAR 0
3284 /* Size of default input buffer. */
3285 #define YY_BUF_SIZE 16384
3287 typedef struct yy_buffer_state
*YY_BUFFER_STATE
;
3290 extern FILE *yyin
, *yyout
;
3292 #define EOB_ACT_CONTINUE_SCAN 0
3293 #define EOB_ACT_END_OF_FILE 1
3294 #define EOB_ACT_LAST_MATCH 2
3296 /* The funky do-while in the following #define is used to turn the definition
3297 * int a single C statement (which needs a semi-colon terminator). This
3298 * avoids problems with code like:
3300 * if ( condition_holds )
3303 * do_something_else();
3305 * Prior to using the do-while the compiler would get upset at the
3306 * "else" because it interpreted the "if" statement as being all
3307 * done when it reached the ';' after the yyless() call.
3310 /* Return all but the first 'n' matched characters back to the input stream. */
3315 /* Undo effects of setting up yytext. */ \
3316 *yy_cp = yy_hold_char; \
3317 YY_RESTORE_YY_MORE_OFFSET \
3318 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
3319 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
3323 #define unput(c) yyunput( c, yytext_ptr )
3325 /* The following is because we cannot portably get our hands on size_t
3326 * (without autoconf's help, which isn't available because we want
3327 * flex-generated scanners to compile on their own).
3329 typedef unsigned int yy_size_t
;
3332 struct yy_buffer_state
3334 FILE *yy_input_file
;
3336 char *yy_ch_buf
; /* input buffer */
3337 char *yy_buf_pos
; /* current position in input buffer */
3339 /* Size of input buffer in bytes, not including room for EOB
3342 yy_size_t yy_buf_size
;
3344 /* Number of characters read into yy_ch_buf, not including EOB
3349 /* Whether we "own" the buffer - i.e., we know we created it,
3350 * and can realloc() it to grow it, and should free() it to
3353 int yy_is_our_buffer
;
3355 /* Whether this is an "interactive" input source; if so, and
3356 * if we're using stdio for input, then we want to use getc()
3357 * instead of fread(), to make sure we stop fetching input after
3360 int yy_is_interactive
;
3362 /* Whether we're considered to be at the beginning of a line.
3363 * If so, '^' rules will be active on the next match, otherwise
3368 /* Whether to try to fill the input buffer when we reach the
3373 int yy_buffer_status
;
3374 #define YY_BUFFER_NEW 0
3375 #define YY_BUFFER_NORMAL 1
3376 /* When an EOF's been seen but there's still some text to process
3377 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
3378 * shouldn't try reading from the input source any more. We might
3379 * still have a bunch of tokens to match, though, because of
3380 * possible backing-up.
3382 * When we actually see the EOF, we change the status to "new"
3383 * (via yyrestart()), so that the user can continue scanning by
3384 * just pointing yyin at a new input file.
3386 #define YY_BUFFER_EOF_PENDING 2
3389 static YY_BUFFER_STATE yy_current_buffer
= 0;
3391 /* We provide macros for accessing buffer states in case in the
3392 * future we want to put the buffer states in a more general
3395 #define YY_CURRENT_BUFFER yy_current_buffer
3398 /* yy_hold_char holds the character lost when yytext is formed. */
3399 static char yy_hold_char
;
3401 static int yy_n_chars
; /* number of characters read into yy_ch_buf */
3406 /* Points to current character in buffer. */
3407 static char *yy_c_buf_p
= (char *) 0;
3408 static int yy_init
= 1; /* whether we need to initialize */
3409 static int yy_start
= 0; /* start state number */
3411 /* Flag which is used to allow yywrap()'s to do buffer switches
3412 * instead of setting up a fresh yyin. A bit of a hack ...
3414 static int yy_did_buffer_switch_on_eof
;
3416 void yyrestart
YY_PROTO(( FILE *input_file
));
3418 void yy_switch_to_buffer
YY_PROTO(( YY_BUFFER_STATE new_buffer
));
3419 void yy_load_buffer_state
YY_PROTO(( void ));
3420 YY_BUFFER_STATE yy_create_buffer
YY_PROTO(( FILE *file
, int size
));
3421 void yy_delete_buffer
YY_PROTO(( YY_BUFFER_STATE b
));
3422 void yy_init_buffer
YY_PROTO(( YY_BUFFER_STATE b
, FILE *file
));
3423 void yy_flush_buffer
YY_PROTO(( YY_BUFFER_STATE b
));
3424 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
3426 YY_BUFFER_STATE yy_scan_buffer
YY_PROTO(( char *base
, yy_size_t size
));
3427 YY_BUFFER_STATE yy_scan_string
YY_PROTO(( yyconst
char *yy_str
));
3428 YY_BUFFER_STATE yy_scan_bytes
YY_PROTO(( yyconst
char *bytes
, int len
));
3430 static void *yy_flex_alloc
YY_PROTO(( yy_size_t
));
3431 static void *yy_flex_realloc
YY_PROTO(( void *, yy_size_t
));
3432 static void yy_flex_free
YY_PROTO(( void * ));
3434 #define yy_new_buffer yy_create_buffer
3436 #define yy_set_interactive(is_interactive) \
3438 if ( ! yy_current_buffer ) \
3439 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
3440 yy_current_buffer->yy_is_interactive = is_interactive; \
3443 #define yy_set_bol(at_bol) \
3445 if ( ! yy_current_buffer ) \
3446 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
3447 yy_current_buffer->yy_at_bol = at_bol; \
3450 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
3452 typedef unsigned char YY_CHAR
;
3453 FILE *yyin
= (FILE *) 0, *yyout
= (FILE *) 0;
3454 typedef int yy_state_type
;
3455 extern char *yytext
;
3456 #define yytext_ptr yytext
3458 static yy_state_type yy_get_previous_state
YY_PROTO(( void ));
3459 static yy_state_type yy_try_NUL_trans
YY_PROTO(( yy_state_type current_state
));
3460 static int yy_get_next_buffer
YY_PROTO(( void ));
3461 static void yy_fatal_error
YY_PROTO(( yyconst
char msg
[] ));
3463 /* Done after the current pattern has been matched and before the
3464 * corresponding action - sets up yytext.
3466 #define YY_DO_BEFORE_ACTION \
3467 yytext_ptr = yy_bp; \
3468 yyleng = (int) (yy_cp - yy_bp); \
3469 yy_hold_char = *yy_cp; \
3473 #define YY_NUM_RULES 100
3474 #define YY_END_OF_BUFFER 101
3475 static yyconst
short int yy_accept
[224] =
3477 0, 0, 101, 99, 5, 7, 99, 4, 45, 99,
3478 20, 21, 19, 31, 37, 38, 17, 15, 12, 16,
3479 14, 18, 95, 95, 13, 43, 25, 36, 26, 44,
3480 89, 97, 39, 40, 33, 97, 97, 97, 97, 97,
3481 97, 97, 97, 97, 97, 97, 97, 97, 41, 32,
3482 42, 46, 6, 24, 0, 98, 0, 10, 11, 0,
3483 29, 0, 0, 8, 0, 9, 0, 91, 96, 3,
3484 1, 0, 96, 95, 0, 95, 0, 22, 92, 35,
3485 27, 75, 23, 74, 77, 28, 34, 0, 90, 97,
3486 0, 97, 97, 97, 55, 97, 97, 97, 97, 53,
3488 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
3489 97, 0, 30, 76, 88, 83, 81, 79, 80, 82,
3490 96, 94, 93, 2, 56, 0, 0, 57, 78, 85,
3491 97, 97, 97, 97, 97, 47, 60, 97, 97, 61,
3492 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
3493 97, 84, 94, 93, 87, 86, 97, 97, 97, 97,
3494 54, 97, 97, 97, 97, 97, 97, 97, 70, 97,
3495 97, 97, 97, 97, 97, 97, 52, 62, 71, 97,
3496 97, 97, 97, 97, 97, 97, 97, 97, 97, 72,
3497 97, 97, 49, 48, 97, 97, 97, 97, 97, 97,
3499 97, 66, 50, 58, 69, 73, 97, 64, 97, 97,
3500 97, 68, 97, 51, 59, 97, 97, 97, 97, 63,
3504 static yyconst
int yy_ec
[256] =
3506 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
3507 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
3508 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3509 1, 5, 6, 7, 8, 9, 10, 11, 1, 12,
3510 13, 14, 15, 16, 17, 18, 19, 20, 21, 21,
3511 21, 21, 21, 21, 21, 22, 22, 23, 24, 25,
3512 26, 27, 28, 29, 30, 30, 31, 30, 30, 30,
3513 32, 32, 32, 32, 32, 33, 32, 32, 32, 32,
3514 32, 32, 32, 32, 34, 32, 32, 35, 32, 32,
3515 36, 37, 38, 39, 32, 1, 40, 41, 42, 43,
3517 44, 45, 32, 46, 47, 32, 48, 49, 50, 51,
3518 52, 53, 32, 54, 55, 56, 57, 58, 59, 60,
3519 61, 32, 62, 63, 64, 65, 1, 1, 1, 1,
3520 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3521 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3522 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3523 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3524 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3525 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3526 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3528 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3529 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3530 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3531 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3532 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3536 static yyconst
int yy_meta
[66] =
3538 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3539 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
3540 2, 2, 1, 1, 1, 1, 1, 1, 1, 2,
3541 2, 3, 3, 3, 3, 1, 1, 1, 1, 2,
3542 2, 2, 2, 2, 2, 3, 3, 3, 3, 3,
3543 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3547 static yyconst
short int yy_base
[227] =
3549 0, 0, 296, 297, 297, 297, 292, 297, 268, 59,
3550 281, 297, 55, 57, 297, 297, 266, 54, 297, 58,
3551 50, 60, 79, 69, 268, 297, 81, 90, 50, 297,
3552 66, 0, 297, 297, 264, 235, 56, 236, 33, 21,
3553 74, 243, 66, 242, 74, 224, 233, 237, 297, 68,
3554 297, 297, 297, 255, 97, 297, 278, 297, 297, 253,
3555 297, 252, 251, 297, 250, 297, 249, 297, 120, 297,
3556 297, 248, 123, 128, 112, 118, 0, 297, 257, 112,
3557 297, 297, 297, 297, 297, 297, 127, 246, 297, 0,
3558 245, 227, 230, 218, 0, 213, 211, 212, 214, 0,
3560 211, 207, 203, 108, 68, 103, 209, 220, 206, 202,
3561 210, 229, 297, 297, 297, 297, 297, 297, 297, 297,
3562 143, 137, 135, 297, 297, 228, 227, 297, 297, 297,
3563 213, 197, 117, 207, 206, 0, 207, 199, 203, 0,
3564 188, 189, 195, 199, 198, 184, 186, 183, 194, 190,
3565 187, 297, 146, 148, 297, 297, 187, 179, 177, 185,
3566 0, 180, 174, 185, 174, 187, 182, 178, 0, 184,
3567 169, 174, 174, 168, 170, 174, 0, 0, 0, 166,
3568 173, 168, 164, 168, 156, 169, 162, 146, 150, 0,
3569 158, 154, 0, 0, 141, 141, 141, 147, 150, 145,
3571 132, 0, 0, 0, 0, 0, 143, 0, 132, 127,
3572 134, 0, 130, 0, 0, 110, 103, 92, 56, 0,
3573 0, 0, 297, 205, 207, 86
3576 static yyconst
short int yy_def
[227] =
3578 223, 1, 223, 223, 223, 223, 223, 223, 223, 224,
3579 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
3580 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
3581 223, 225, 223, 223, 223, 225, 225, 225, 225, 225,
3582 225, 225, 225, 225, 225, 225, 225, 225, 223, 223,
3583 223, 223, 223, 223, 224, 223, 224, 223, 223, 223,
3584 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
3585 223, 223, 223, 223, 223, 223, 226, 223, 223, 223,
3586 223, 223, 223, 223, 223, 223, 223, 223, 223, 225,
3587 223, 225, 225, 225, 225, 225, 225, 225, 225, 225,
3589 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
3590 225, 223, 223, 223, 223, 223, 223, 223, 223, 223,
3591 223, 223, 226, 223, 223, 223, 223, 223, 223, 223,
3592 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
3593 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
3594 225, 223, 223, 223, 223, 223, 225, 225, 225, 225,
3595 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
3596 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
3597 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
3598 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
3600 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
3601 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
3602 225, 225, 0, 223, 223, 223
3605 static yyconst
short int yy_nxt
[363] =
3607 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
3608 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
3609 24, 24, 25, 26, 27, 28, 29, 30, 31, 32,
3610 32, 32, 32, 32, 32, 33, 4, 34, 35, 32,
3611 36, 37, 38, 39, 40, 32, 41, 32, 32, 32,
3612 42, 32, 43, 44, 45, 46, 47, 32, 48, 32,
3613 32, 49, 50, 51, 52, 56, 59, 61, 64, 69,
3614 69, 69, 98, 70, 66, 86, 87, 99, 71, 65,
3615 60, 96, 62, 67, 68, 72, 73, 123, 74, 74,
3616 74, 88, 97, 112, 89, 57, 73, 79, 74, 74,
3618 74, 76, 76, 56, 93, 80, 81, 94, 143, 75,
3619 222, 76, 76, 77, 82, 83, 84, 76, 100, 104,
3620 75, 144, 105, 101, 102, 76, 107, 76, 85, 108,
3621 113, 122, 122, 57, 221, 76, 125, 126, 77, 69,
3622 69, 69, 121, 121, 121, 73, 220, 74, 74, 74,
3623 76, 76, 127, 128, 141, 145, 122, 122, 146, 142,
3624 76, 76, 121, 121, 121, 219, 76, 154, 154, 153,
3625 153, 159, 160, 218, 76, 217, 76, 216, 153, 153,
3626 154, 154, 215, 154, 76, 153, 214, 213, 212, 211,
3627 210, 154, 209, 153, 153, 208, 154, 207, 206, 205,
3629 204, 203, 153, 202, 154, 55, 55, 55, 90, 90,
3630 201, 200, 199, 198, 197, 196, 195, 194, 193, 192,
3631 191, 190, 189, 188, 187, 186, 185, 184, 183, 182,
3632 181, 180, 179, 178, 177, 176, 175, 174, 173, 172,
3633 171, 170, 169, 168, 167, 166, 165, 164, 163, 162,
3634 161, 158, 157, 156, 155, 152, 151, 150, 149, 148,
3635 147, 140, 139, 138, 137, 136, 135, 134, 133, 132,
3636 131, 130, 129, 124, 120, 119, 118, 117, 116, 115,
3637 223, 114, 111, 110, 109, 106, 103, 95, 92, 91,
3638 78, 63, 58, 54, 53, 223, 3, 223, 223, 223,
3640 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
3641 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
3642 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
3643 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
3644 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
3645 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
3649 static yyconst
short int yy_chk
[363] =
3651 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3652 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3653 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3654 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3655 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3656 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
3657 1, 1, 1, 1, 1, 10, 13, 14, 18, 21,
3658 21, 21, 40, 22, 20, 29, 29, 40, 22, 18,
3659 13, 39, 14, 20, 20, 22, 24, 226, 24, 24,
3660 24, 31, 39, 50, 31, 10, 23, 27, 23, 23,
3662 23, 24, 24, 55, 37, 27, 27, 37, 105, 23,
3663 219, 23, 23, 23, 28, 28, 28, 24, 41, 43,
3664 23, 105, 43, 41, 41, 24, 45, 23, 28, 45,
3665 50, 75, 75, 55, 218, 23, 80, 80, 23, 69,
3666 69, 69, 73, 73, 73, 74, 217, 74, 74, 74,
3667 76, 76, 87, 87, 104, 106, 122, 122, 106, 104,
3668 74, 74, 121, 121, 121, 216, 76, 123, 123, 122,
3669 122, 133, 133, 213, 76, 211, 74, 210, 153, 153,
3670 154, 154, 209, 123, 74, 122, 207, 201, 200, 199,
3671 198, 123, 197, 122, 153, 196, 154, 195, 192, 191,
3673 189, 188, 153, 187, 154, 224, 224, 224, 225, 225,
3674 186, 185, 184, 183, 182, 181, 180, 176, 175, 174,
3675 173, 172, 171, 170, 168, 167, 166, 165, 164, 163,
3676 162, 160, 159, 158, 157, 151, 150, 149, 148, 147,
3677 146, 145, 144, 143, 142, 141, 139, 138, 137, 135,
3678 134, 132, 131, 127, 126, 112, 111, 110, 109, 108,
3679 107, 103, 102, 101, 99, 98, 97, 96, 94, 93,
3680 92, 91, 88, 79, 72, 67, 65, 63, 62, 60,
3681 57, 54, 48, 47, 46, 44, 42, 38, 36, 35,
3682 25, 17, 11, 9, 7, 3, 223, 223, 223, 223,
3684 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
3685 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
3686 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
3687 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
3688 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
3689 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
3693 static yy_state_type yy_last_accepting_state
;
3694 static char *yy_last_accepting_cpos
;
3696 /* The intent behind this definition is that it'll catch
3697 * any uses of REJECT which flex missed.
3699 #define REJECT reject_used_but_not_detected
3700 #define yymore() yymore_used_but_not_detected
3701 #define YY_MORE_ADJ 0
3702 #define YY_RESTORE_YY_MORE_OFFSET
3706 #line 11 "chuck.lex"
3707 /*----------------------------------------------------------------------------
3708 ChucK Concurrent, On-the-fly Audio Programming Language
3709 Compiler and Virtual Machine
3711 Copyright (c) 2004 Ge Wang and Perry R. Cook. All rights reserved.
3712 http://chuck.cs.princeton.edu/
3713 http://soundlab.cs.princeton.edu/
3715 This program is free software; you can redistribute it and/or modify
3716 it under the terms of the GNU General Public License as published by
3717 the Free Software Foundation; either version 2 of the License, or
3718 (at your option) any later version.
3720 This program is distributed in the hope that it will be useful,
3721 but WITHOUT ANY WARRANTY; without even the implied warranty of
3722 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3723 GNU General Public License for more details.
3725 You should have received a copy of the GNU General Public License
3726 along with this program; if not, write to the Free Software
3727 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
3729 -----------------------------------------------------------------------------*/
3731 //-----------------------------------------------------------------------------
3733 // desc: chuck lexer
3735 // author: Ge Wang (gewang.cs.princeton.edu) - generated by lex
3736 // Perry R. Cook (prc@cs.princeton.edu)
3738 // based on the ansi C grammar by Jeff Lee, maintained by Jutta Degener
3740 // date: Summer 2002
3741 //-----------------------------------------------------------------------------
3745 #include "chuck_utils.h"
3746 #include "chuck_absyn.h"
3747 #include "chuck_errmsg.h"
3749 #ifndef __PLATFORM_WIN32__
3750 #include "chuck.tab.h"
3752 #include "chuck_win32.h"
3758 extern YYSTYPE yylval
;
3761 // define error handling
3762 #define YY_FATAL_ERROR(msg) EM_error2( 0, msg )
3764 #if defined(_cplusplus) || defined(__cplusplus)
3770 c_str
strip_lit( c_str str
);
3771 c_str
alloc_str( c_str str
);
3772 long htol( c_str str
);
3774 int block_comment();
3776 #if defined(_cplusplus) || defined(__cplusplus)
3790 EM_tokPos
= char_pos
;
3795 c_str
strip_lit( c_str str
)
3797 str
[strlen(str
)-1] = '\0';
3802 c_str
alloc_str( c_str str
)
3804 c_str s
= (c_str
)malloc( strlen(str
) + 1 );
3811 long htol( c_str str
)
3814 unsigned long n
= 0;
3823 case '1': case '2': case '3': case '4': case '5':
3824 case '6': case '7': case '8': case '9': case '0':
3828 case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
3832 case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
3842 // block comment hack (thanks to unput/yytext_ptr inconsistency)
3843 #define block_comment_hack loop: \
3844 while ((c = input()) != '*' && c != 0 && c != EOF ) \
3845 if( c == '\n' ) EM_newline(); \
3846 if( c == EOF ) adjust(); \
3847 else if( (c1 = input()) != '/' && c != 0 ) \
3852 if( c != 0 ) adjust();
3855 #define comment_hack \
3856 while ((c = input()) != '\n' && c != '\r' && c != 0 && c != EOF ); \
3859 if (c == '\n') EM_newline(); \
3862 // .*\-\-> { adjust(); continue; }
3864 #line 681 "chuck.yy.c"
3866 /* Macros after this point can all be overridden by user definitions in
3870 #ifndef YY_SKIP_YYWRAP
3872 extern "C" int yywrap
YY_PROTO(( void ));
3874 extern int yywrap
YY_PROTO(( void ));
3879 static void yyunput
YY_PROTO(( int c
, char *buf_ptr
));
3883 static void yy_flex_strncpy
YY_PROTO(( char *, yyconst
char *, int ));
3886 #ifdef YY_NEED_STRLEN
3887 static int yy_flex_strlen
YY_PROTO(( yyconst
char * ));
3892 static int yyinput
YY_PROTO(( void ));
3894 static int input
YY_PROTO(( void ));
3899 static int yy_start_stack_ptr
= 0;
3900 static int yy_start_stack_depth
= 0;
3901 static int *yy_start_stack
= 0;
3902 #ifndef YY_NO_PUSH_STATE
3903 static void yy_push_state
YY_PROTO(( int new_state
));
3905 #ifndef YY_NO_POP_STATE
3906 static void yy_pop_state
YY_PROTO(( void ));
3908 #ifndef YY_NO_TOP_STATE
3909 static int yy_top_state
YY_PROTO(( void ));
3913 #define YY_NO_PUSH_STATE 1
3914 #define YY_NO_POP_STATE 1
3915 #define YY_NO_TOP_STATE 1
3918 #ifdef YY_MALLOC_DECL
3926 /* Just try to get by without declaring the routines. This will fail
3927 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
3928 * or sizeof(void*) != sizeof(int).
3933 /* Amount of stuff to slurp up with each read. */
3934 #ifndef YY_READ_BUF_SIZE
3935 #define YY_READ_BUF_SIZE 8192
3938 /* Copy whatever the last rule matched to the standard output. */
3941 /* This used to be an fputs(), but since the string might contain NUL's,
3942 * we now use fwrite().
3944 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
3947 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
3948 * is returned in "result".
3951 #define YY_INPUT(buf,result,max_size) \
3952 if ( yy_current_buffer->yy_is_interactive ) \
3955 for ( n = 0; n < max_size && \
3956 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
3957 buf[n] = (char) c; \
3959 buf[n++] = (char) c; \
3960 if ( c == EOF && ferror( yyin ) ) \
3961 YY_FATAL_ERROR( "input in flex scanner failed" ); \
3967 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
3969 if( errno != EINTR) \
3971 YY_FATAL_ERROR( "input in flex scanner failed" ); \
3980 /* No semi-colon after return; correct usage is to write "yyterminate();" -
3981 * we don't want an extra ';' after the "return" because that will cause
3982 * some compilers to complain about unreachable statements.
3985 #define yyterminate() return YY_NULL
3988 /* Number of entries by which start-condition stack grows. */
3989 #ifndef YY_START_STACK_INCR
3990 #define YY_START_STACK_INCR 25
3993 /* Report a fatal error. */
3994 #ifndef YY_FATAL_ERROR
3995 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
3998 /* Default declaration of generated scanner - a define so the user can
3999 * easily add parameters.
4002 #define YY_DECL int yylex YY_PROTO(( void ))
4005 /* Code executed at the beginning of each rule, after yytext and yyleng
4008 #ifndef YY_USER_ACTION
4009 #define YY_USER_ACTION
4012 /* Code executed at the end of each rule. */
4014 #define YY_BREAK break;
4017 #define YY_RULE_SETUP \
4022 register yy_state_type yy_current_state
;
4023 register char *yy_cp
, *yy_bp
;
4024 register int yy_act
;
4026 #line 170 "chuck.lex"
4029 #line 846 "chuck.yy.c"
4040 yy_start
= 1; /* first start state */
4048 if ( ! yy_current_buffer
)
4050 yy_create_buffer( yyin
, YY_BUF_SIZE
);
4052 yy_load_buffer_state();
4055 while ( 1 ) /* loops until end-of-file is reached */
4059 /* Support of yytext. */
4060 *yy_cp
= yy_hold_char
;
4062 /* yy_bp points to the position in yy_ch_buf of the start of
4067 yy_current_state
= yy_start
;
4071 register YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)];
4072 if ( yy_accept
[yy_current_state
] )
4074 yy_last_accepting_state
= yy_current_state
;
4075 yy_last_accepting_cpos
= yy_cp
;
4077 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
4079 yy_current_state
= (int) yy_def
[yy_current_state
];
4080 if ( yy_current_state
>= 224 )
4081 yy_c
= yy_meta
[(unsigned int) yy_c
];
4083 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
4086 while ( yy_base
[yy_current_state
] != 297 );
4089 yy_act
= yy_accept
[yy_current_state
];
4091 { /* have to back up */
4092 yy_cp
= yy_last_accepting_cpos
;
4093 yy_current_state
= yy_last_accepting_state
;
4094 yy_act
= yy_accept
[yy_current_state
];
4097 YY_DO_BEFORE_ACTION
;
4100 do_action
: /* This label is used only to access EOF actions. */
4104 { /* beginning of action switch */
4105 case 0: /* must back up */
4106 /* undo the effects of YY_DO_BEFORE_ACTION */
4107 *yy_cp
= yy_hold_char
;
4108 yy_cp
= yy_last_accepting_cpos
;
4109 yy_current_state
= yy_last_accepting_state
;
4110 goto yy_find_action
;
4114 #line 172 "chuck.lex"
4115 { char c
; adjust(); comment_hack
; continue; }
4119 #line 173 "chuck.lex"
4120 { char c
; adjust(); comment_hack
; continue; }
4124 #line 174 "chuck.lex"
4125 { char c
, c1
; adjust(); block_comment_hack
; continue; }
4129 #line 175 "chuck.lex"
4130 { adjust(); continue; }
4134 #line 176 "chuck.lex"
4135 { adjust(); continue; }
4139 #line 177 "chuck.lex"
4140 { adjust(); EM_newline(); continue; }
4144 #line 178 "chuck.lex"
4145 { adjust(); EM_newline(); continue; }
4149 #line 180 "chuck.lex"
4150 { adjust(); return PLUSPLUS
; }
4154 #line 181 "chuck.lex"
4155 { adjust(); return MINUSMINUS
; }
4159 #line 182 "chuck.lex"
4160 { adjust(); return POUNDPAREN
; }
4164 #line 183 "chuck.lex"
4165 { adjust(); return PERCENTPAREN
; }
4169 #line 185 "chuck.lex"
4170 { adjust(); return COMMA
; }
4174 #line 186 "chuck.lex"
4175 { adjust(); return COLON
; }
4179 #line 187 "chuck.lex"
4180 { adjust(); return DOT
; }
4184 #line 188 "chuck.lex"
4185 { adjust(); return PLUS
; }
4189 #line 189 "chuck.lex"
4190 { adjust(); return MINUS
; }
4194 #line 190 "chuck.lex"
4195 { adjust(); return TIMES
; }
4199 #line 191 "chuck.lex"
4200 { adjust(); return DIVIDE
; }
4204 #line 192 "chuck.lex"
4205 { adjust(); return PERCENT
; }
4209 #line 193 "chuck.lex"
4210 { adjust(); return POUND
; }
4214 #line 194 "chuck.lex"
4215 { adjust(); return DOLLAR
; }
4219 #line 196 "chuck.lex"
4220 { adjust(); return COLONCOLON
; }
4224 #line 197 "chuck.lex"
4225 { adjust(); return EQ
; }
4229 #line 198 "chuck.lex"
4230 { adjust(); return NEQ
; }
4234 #line 199 "chuck.lex"
4235 { adjust(); return LT
; }
4239 #line 200 "chuck.lex"
4240 { adjust(); return GT
; }
4244 #line 201 "chuck.lex"
4245 { adjust(); return LE
; }
4249 #line 202 "chuck.lex"
4250 { adjust(); return GE
; }
4254 #line 203 "chuck.lex"
4255 { adjust(); return AND
; }
4259 #line 204 "chuck.lex"
4260 { adjust(); return OR
; }
4264 #line 205 "chuck.lex"
4265 { adjust(); return S_AND
; }
4269 #line 206 "chuck.lex"
4270 { adjust(); return S_OR
; }
4274 #line 207 "chuck.lex"
4275 { adjust(); return S_XOR
; }
4279 #line 208 "chuck.lex"
4280 { adjust(); return SHIFT_RIGHT
; }
4284 #line 209 "chuck.lex"
4285 { adjust(); return SHIFT_LEFT
; }
4289 #line 210 "chuck.lex"
4290 { adjust(); return ASSIGN
; }
4294 #line 211 "chuck.lex"
4295 { adjust(); return LPAREN
; }
4299 #line 212 "chuck.lex"
4300 { adjust(); return RPAREN
; }
4304 #line 213 "chuck.lex"
4305 { adjust(); return LBRACK
; }
4309 #line 214 "chuck.lex"
4310 { adjust(); return RBRACK
; }
4314 #line 215 "chuck.lex"
4315 { adjust(); return LBRACE
; }
4319 #line 216 "chuck.lex"
4320 { adjust(); return RBRACE
; }
4324 #line 217 "chuck.lex"
4325 { adjust(); return SEMICOLON
; }
4329 #line 218 "chuck.lex"
4330 { adjust(); return QUESTION
; }
4334 #line 219 "chuck.lex"
4335 { adjust(); return EXCLAMATION
; }
4339 #line 220 "chuck.lex"
4340 { adjust(); return TILDA
; }
4344 #line 221 "chuck.lex"
4345 { adjust(); return FOR
; }
4349 #line 222 "chuck.lex"
4350 { adjust(); return WHILE
; }
4354 #line 223 "chuck.lex"
4355 { adjust(); return UNTIL
; }
4359 #line 224 "chuck.lex"
4360 { adjust(); return LOOP
; }
4364 #line 225 "chuck.lex"
4365 { adjust(); return CONTINUE
; }
4369 #line 226 "chuck.lex"
4370 { adjust(); return BREAK
; }
4374 #line 227 "chuck.lex"
4375 { adjust(); return IF
; }
4379 #line 228 "chuck.lex"
4380 { adjust(); return ELSE
; }
4384 #line 229 "chuck.lex"
4385 { adjust(); return DO
; }
4389 #line 230 "chuck.lex"
4390 { adjust(); return L_HACK
; }
4394 #line 231 "chuck.lex"
4395 { adjust(); return R_HACK
; }
4399 #line 233 "chuck.lex"
4400 { adjust(); return RETURN
; }
4404 #line 235 "chuck.lex"
4405 { adjust(); return FUNCTION
; }
4409 #line 236 "chuck.lex"
4410 { adjust(); return FUNCTION
; }
4414 #line 237 "chuck.lex"
4415 { adjust(); return NEW
; }
4419 #line 238 "chuck.lex"
4420 { adjust(); return CLASS
; }
4424 #line 239 "chuck.lex"
4425 { adjust(); return INTERFACE
; }
4429 #line 240 "chuck.lex"
4430 { adjust(); return EXTENDS
; }
4434 #line 241 "chuck.lex"
4435 { adjust(); return IMPLEMENTS
; }
4439 #line 242 "chuck.lex"
4440 { adjust(); return PUBLIC
; }
4444 #line 243 "chuck.lex"
4445 { adjust(); return PROTECTED
; }
4449 #line 244 "chuck.lex"
4450 { adjust(); return PRIVATE
; }
4454 #line 245 "chuck.lex"
4455 { adjust(); return STATIC
; }
4459 #line 246 "chuck.lex"
4460 { adjust(); return ABSTRACT
; }
4464 #line 247 "chuck.lex"
4465 { adjust(); return CONST
; }
4469 #line 248 "chuck.lex"
4470 { adjust(); return SPORK
; }
4474 #line 249 "chuck.lex"
4475 { adjust(); return TYPEOF
; }
4479 #line 251 "chuck.lex"
4480 { adjust(); return CHUCK
; }
4484 #line 252 "chuck.lex"
4485 { adjust(); return UNCHUCK
; }
4489 #line 253 "chuck.lex"
4490 { adjust(); return UNCHUCK
; }
4494 #line 254 "chuck.lex"
4495 { adjust(); return UPCHUCK
; }
4499 #line 255 "chuck.lex"
4500 { adjust(); return AT_CHUCK
; }
4504 #line 256 "chuck.lex"
4505 { adjust(); return PLUS_CHUCK
; }
4509 #line 257 "chuck.lex"
4510 { adjust(); return MINUS_CHUCK
; }
4514 #line 258 "chuck.lex"
4515 { adjust(); return TIMES_CHUCK
; }
4519 #line 259 "chuck.lex"
4520 { adjust(); return DIVIDE_CHUCK
; }
4524 #line 260 "chuck.lex"
4525 { adjust(); return S_AND_CHUCK
; }
4529 #line 261 "chuck.lex"
4530 { adjust(); return S_OR_CHUCK
; }
4534 #line 262 "chuck.lex"
4535 { adjust(); return S_XOR_CHUCK
; }
4539 #line 263 "chuck.lex"
4540 { adjust(); return SHIFT_RIGHT_CHUCK
; }
4544 #line 264 "chuck.lex"
4545 { adjust(); return SHIFT_LEFT_CHUCK
; }
4549 #line 265 "chuck.lex"
4550 { adjust(); return PERCENT_CHUCK
; }
4554 #line 266 "chuck.lex"
4555 { adjust(); return AT_SYM
; }
4559 #line 267 "chuck.lex"
4560 { adjust(); return ATAT_SYM
; }
4564 #line 268 "chuck.lex"
4565 { adjust(); return ARROW_RIGHT
; }
4569 #line 269 "chuck.lex"
4570 { adjust(); return ARROW_LEFT
; }
4574 #line 271 "chuck.lex"
4575 { adjust(); yylval
.ival
=htol(yytext
); return NUM
; }
4579 #line 272 "chuck.lex"
4580 { adjust(); yylval
.ival
=atoi(yytext
); return NUM
; }
4584 #line 273 "chuck.lex"
4585 { adjust(); yylval
.ival
=atoi(yytext
); return NUM
; }
4589 #line 274 "chuck.lex"
4590 { adjust(); yylval
.fval
=atof(yytext
); return FLOAT
; }
4594 #line 275 "chuck.lex"
4595 { adjust(); yylval
.sval
=alloc_str(yytext
); return ID
; }
4599 #line 276 "chuck.lex"
4600 { adjust(); yylval
.sval
=alloc_str(strip_lit(yytext
)); return STRING_LIT
; }
4604 #line 278 "chuck.lex"
4605 { adjust(); EM_error( EM_tokPos
, "illegal token" ); }
4609 #line 280 "chuck.lex"
4612 #line 1429 "chuck.yy.c"
4613 case YY_STATE_EOF(INITIAL
):
4616 case YY_END_OF_BUFFER
:
4618 /* Amount of text matched not including the EOB char. */
4619 int yy_amount_of_matched_text
= (int) (yy_cp
- yytext_ptr
) - 1;
4621 /* Undo the effects of YY_DO_BEFORE_ACTION. */
4622 *yy_cp
= yy_hold_char
;
4623 YY_RESTORE_YY_MORE_OFFSET
4625 if ( yy_current_buffer
->yy_buffer_status
== YY_BUFFER_NEW
)
4627 /* We're scanning a new file or input source. It's
4628 * possible that this happened because the user
4629 * just pointed yyin at a new source and called
4630 * yylex(). If so, then we have to assure
4631 * consistency between yy_current_buffer and our
4632 * globals. Here is the right place to do so, because
4633 * this is the first action (other than possibly a
4634 * back-up) that will match for the new input source.
4636 yy_n_chars
= yy_current_buffer
->yy_n_chars
;
4637 yy_current_buffer
->yy_input_file
= yyin
;
4638 yy_current_buffer
->yy_buffer_status
= YY_BUFFER_NORMAL
;
4641 /* Note that here we test for yy_c_buf_p "<=" to the position
4642 * of the first EOB in the buffer, since yy_c_buf_p will
4643 * already have been incremented past the NUL character
4644 * (since all states make transitions on EOB to the
4645 * end-of-buffer state). Contrast this with the test
4648 if ( yy_c_buf_p
<= &yy_current_buffer
->yy_ch_buf
[yy_n_chars
] )
4649 { /* This was really a NUL. */
4650 yy_state_type yy_next_state
;
4652 yy_c_buf_p
= yytext_ptr
+ yy_amount_of_matched_text
;
4654 yy_current_state
= yy_get_previous_state();
4656 /* Okay, we're now positioned to make the NUL
4657 * transition. We couldn't have
4658 * yy_get_previous_state() go ahead and do it
4659 * for us because it doesn't know how to deal
4660 * with the possibility of jamming (and we don't
4661 * want to build jamming into it because then it
4662 * will run more slowly).
4665 yy_next_state
= yy_try_NUL_trans( yy_current_state
);
4667 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
4669 if ( yy_next_state
)
4671 /* Consume the NUL. */
4672 yy_cp
= ++yy_c_buf_p
;
4673 yy_current_state
= yy_next_state
;
4680 goto yy_find_action
;
4684 else switch ( yy_get_next_buffer() )
4686 case EOB_ACT_END_OF_FILE
:
4688 yy_did_buffer_switch_on_eof
= 0;
4692 /* Note: because we've taken care in
4693 * yy_get_next_buffer() to have set up
4694 * yytext, we can now set up
4695 * yy_c_buf_p so that if some total
4696 * hoser (like flex itself) wants to
4697 * call the scanner after we return the
4698 * YY_NULL, it'll still work - another
4699 * YY_NULL will get returned.
4701 yy_c_buf_p
= yytext_ptr
+ YY_MORE_ADJ
;
4703 yy_act
= YY_STATE_EOF(YY_START
);
4709 if ( ! yy_did_buffer_switch_on_eof
)
4715 case EOB_ACT_CONTINUE_SCAN
:
4717 yytext_ptr
+ yy_amount_of_matched_text
;
4719 yy_current_state
= yy_get_previous_state();
4722 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
4725 case EOB_ACT_LAST_MATCH
:
4727 &yy_current_buffer
->yy_ch_buf
[yy_n_chars
];
4729 yy_current_state
= yy_get_previous_state();
4732 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
4733 goto yy_find_action
;
4740 "fatal flex scanner internal error--no action found" );
4741 } /* end of action switch */
4742 } /* end of scanning one token */
4743 } /* end of yylex */
4746 /* yy_get_next_buffer - try to read in a new buffer
4748 * Returns a code representing an action:
4749 * EOB_ACT_LAST_MATCH -
4750 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
4751 * EOB_ACT_END_OF_FILE - end of file
4754 static int yy_get_next_buffer()
4756 register char *dest
= yy_current_buffer
->yy_ch_buf
;
4757 register char *source
= yytext_ptr
;
4758 register int number_to_move
, i
;
4761 if ( yy_c_buf_p
> &yy_current_buffer
->yy_ch_buf
[yy_n_chars
+ 1] )
4763 "fatal flex scanner internal error--end of buffer missed" );
4765 if ( yy_current_buffer
->yy_fill_buffer
== 0 )
4766 { /* Don't try to fill the buffer, so this is an EOF. */
4767 if ( yy_c_buf_p
- yytext_ptr
- YY_MORE_ADJ
== 1 )
4769 /* We matched a single character, the EOB, so
4770 * treat this as a final EOF.
4772 return EOB_ACT_END_OF_FILE
;
4777 /* We matched some text prior to the EOB, first
4780 return EOB_ACT_LAST_MATCH
;
4784 /* Try to read more data. */
4786 /* First move last chars to start of buffer. */
4787 number_to_move
= (int) (yy_c_buf_p
- yytext_ptr
) - 1;
4789 for ( i
= 0; i
< number_to_move
; ++i
)
4790 *(dest
++) = *(source
++);
4792 if ( yy_current_buffer
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
)
4793 /* don't do the read, it's not guaranteed to return an EOF,
4796 yy_current_buffer
->yy_n_chars
= yy_n_chars
= 0;
4801 yy_current_buffer
->yy_buf_size
- number_to_move
- 1;
4803 while ( num_to_read
<= 0 )
4804 { /* Not enough room in the buffer - grow it. */
4805 #ifdef YY_USES_REJECT
4807 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
4810 /* just a shorter name for the current buffer */
4811 YY_BUFFER_STATE b
= yy_current_buffer
;
4813 int yy_c_buf_p_offset
=
4814 (int) (yy_c_buf_p
- b
->yy_ch_buf
);
4816 if ( b
->yy_is_our_buffer
)
4818 int new_size
= b
->yy_buf_size
* 2;
4820 if ( new_size
<= 0 )
4821 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
4823 b
->yy_buf_size
*= 2;
4825 b
->yy_ch_buf
= (char *)
4826 /* Include room in for 2 EOB chars. */
4827 yy_flex_realloc( (void *) b
->yy_ch_buf
,
4828 b
->yy_buf_size
+ 2 );
4831 /* Can't grow it, we don't own it. */
4834 if ( ! b
->yy_ch_buf
)
4836 "fatal error - scanner input buffer overflow" );
4838 yy_c_buf_p
= &b
->yy_ch_buf
[yy_c_buf_p_offset
];
4840 num_to_read
= yy_current_buffer
->yy_buf_size
-
4845 if ( num_to_read
> YY_READ_BUF_SIZE
)
4846 num_to_read
= YY_READ_BUF_SIZE
;
4848 /* Read in more data. */
4849 YY_INPUT( (&yy_current_buffer
->yy_ch_buf
[number_to_move
]),
4850 yy_n_chars
, num_to_read
);
4852 yy_current_buffer
->yy_n_chars
= yy_n_chars
;
4855 if ( yy_n_chars
== 0 )
4857 if ( number_to_move
== YY_MORE_ADJ
)
4859 ret_val
= EOB_ACT_END_OF_FILE
;
4865 ret_val
= EOB_ACT_LAST_MATCH
;
4866 yy_current_buffer
->yy_buffer_status
=
4867 YY_BUFFER_EOF_PENDING
;
4872 ret_val
= EOB_ACT_CONTINUE_SCAN
;
4874 yy_n_chars
+= number_to_move
;
4875 yy_current_buffer
->yy_ch_buf
[yy_n_chars
] = YY_END_OF_BUFFER_CHAR
;
4876 yy_current_buffer
->yy_ch_buf
[yy_n_chars
+ 1] = YY_END_OF_BUFFER_CHAR
;
4878 yytext_ptr
= &yy_current_buffer
->yy_ch_buf
[0];
4884 /* yy_get_previous_state - get the state just before the EOB char was reached */
4886 static yy_state_type
yy_get_previous_state()
4888 register yy_state_type yy_current_state
;
4889 register char *yy_cp
;
4891 yy_current_state
= yy_start
;
4893 for ( yy_cp
= yytext_ptr
+ YY_MORE_ADJ
; yy_cp
< yy_c_buf_p
; ++yy_cp
)
4895 register YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
4896 if ( yy_accept
[yy_current_state
] )
4898 yy_last_accepting_state
= yy_current_state
;
4899 yy_last_accepting_cpos
= yy_cp
;
4901 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
4903 yy_current_state
= (int) yy_def
[yy_current_state
];
4904 if ( yy_current_state
>= 224 )
4905 yy_c
= yy_meta
[(unsigned int) yy_c
];
4907 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
4910 return yy_current_state
;
4914 /* yy_try_NUL_trans - try to make a transition on the NUL character
4917 * next_state = yy_try_NUL_trans( current_state );
4920 #ifdef YY_USE_PROTOS
4921 static yy_state_type
yy_try_NUL_trans( yy_state_type yy_current_state
)
4923 static yy_state_type
yy_try_NUL_trans( yy_current_state
)
4924 yy_state_type yy_current_state
;
4927 register int yy_is_jam
;
4928 register char *yy_cp
= yy_c_buf_p
;
4930 register YY_CHAR yy_c
= 1;
4931 if ( yy_accept
[yy_current_state
] )
4933 yy_last_accepting_state
= yy_current_state
;
4934 yy_last_accepting_cpos
= yy_cp
;
4936 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
4938 yy_current_state
= (int) yy_def
[yy_current_state
];
4939 if ( yy_current_state
>= 224 )
4940 yy_c
= yy_meta
[(unsigned int) yy_c
];
4942 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
4943 yy_is_jam
= (yy_current_state
== 223);
4945 return yy_is_jam
? 0 : yy_current_state
;
4950 #ifdef YY_USE_PROTOS
4951 static void yyunput( int c
, register char *yy_bp
)
4953 static void yyunput( c
, yy_bp
)
4955 register char *yy_bp
;
4958 register char *yy_cp
= yy_c_buf_p
;
4960 /* undo effects of setting up yytext */
4961 *yy_cp
= yy_hold_char
;
4963 if ( yy_cp
< yy_current_buffer
->yy_ch_buf
+ 2 )
4964 { /* need to shift things up to make room */
4965 /* +2 for EOB chars. */
4966 register int number_to_move
= yy_n_chars
+ 2;
4967 register char *dest
= &yy_current_buffer
->yy_ch_buf
[
4968 yy_current_buffer
->yy_buf_size
+ 2];
4969 register char *source
=
4970 &yy_current_buffer
->yy_ch_buf
[number_to_move
];
4972 while ( source
> yy_current_buffer
->yy_ch_buf
)
4973 *--dest
= *--source
;
4975 yy_cp
+= (int) (dest
- source
);
4976 yy_bp
+= (int) (dest
- source
);
4977 yy_current_buffer
->yy_n_chars
=
4978 yy_n_chars
= yy_current_buffer
->yy_buf_size
;
4980 if ( yy_cp
< yy_current_buffer
->yy_ch_buf
+ 2 )
4981 YY_FATAL_ERROR( "flex scanner push-back overflow" );
4984 *--yy_cp
= (char) c
;
4988 yy_hold_char
= *yy_cp
;
4991 #endif /* ifndef YY_NO_UNPUT */
4995 static int yyinput()
5002 *yy_c_buf_p
= yy_hold_char
;
5004 if ( *yy_c_buf_p
== YY_END_OF_BUFFER_CHAR
)
5006 /* yy_c_buf_p now points to the character we want to return.
5007 * If this occurs *before* the EOB characters, then it's a
5008 * valid NUL; if not, then we've hit the end of the buffer.
5010 if ( yy_c_buf_p
< &yy_current_buffer
->yy_ch_buf
[yy_n_chars
] )
5011 /* This was really a NUL. */
5015 { /* need more input */
5016 int offset
= yy_c_buf_p
- yytext_ptr
;
5019 switch ( yy_get_next_buffer() )
5021 case EOB_ACT_LAST_MATCH
:
5022 /* This happens because yy_g_n_b()
5023 * sees that we've accumulated a
5024 * token and flags that we need to
5025 * try matching the token before
5026 * proceeding. But for input(),
5027 * there's no matching to consider.
5028 * So convert the EOB_ACT_LAST_MATCH
5029 * to EOB_ACT_END_OF_FILE.
5032 /* Reset buffer status. */
5037 case EOB_ACT_END_OF_FILE
:
5042 if ( ! yy_did_buffer_switch_on_eof
)
5051 case EOB_ACT_CONTINUE_SCAN
:
5052 yy_c_buf_p
= yytext_ptr
+ offset
;
5058 c
= *(unsigned char *) yy_c_buf_p
; /* cast for 8-bit char's */
5059 *yy_c_buf_p
= '\0'; /* preserve yytext */
5060 yy_hold_char
= *++yy_c_buf_p
;
5067 #ifdef YY_USE_PROTOS
5068 void yyrestart( FILE *input_file
)
5070 void yyrestart( input_file
)
5074 if ( ! yy_current_buffer
)
5075 yy_current_buffer
= yy_create_buffer( yyin
, YY_BUF_SIZE
);
5077 yy_init_buffer( yy_current_buffer
, input_file
);
5078 yy_load_buffer_state();
5082 #ifdef YY_USE_PROTOS
5083 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer
)
5085 void yy_switch_to_buffer( new_buffer
)
5086 YY_BUFFER_STATE new_buffer
;
5089 if ( yy_current_buffer
== new_buffer
)
5092 if ( yy_current_buffer
)
5094 /* Flush out information for old buffer. */
5095 *yy_c_buf_p
= yy_hold_char
;
5096 yy_current_buffer
->yy_buf_pos
= yy_c_buf_p
;
5097 yy_current_buffer
->yy_n_chars
= yy_n_chars
;
5100 yy_current_buffer
= new_buffer
;
5101 yy_load_buffer_state();
5103 /* We don't actually know whether we did this switch during
5104 * EOF (yywrap()) processing, but the only time this flag
5105 * is looked at is after yywrap() is called, so it's safe
5106 * to go ahead and always set it.
5108 yy_did_buffer_switch_on_eof
= 1;
5112 #ifdef YY_USE_PROTOS
5113 void yy_load_buffer_state( void )
5115 void yy_load_buffer_state()
5118 yy_n_chars
= yy_current_buffer
->yy_n_chars
;
5119 yytext_ptr
= yy_c_buf_p
= yy_current_buffer
->yy_buf_pos
;
5120 yyin
= yy_current_buffer
->yy_input_file
;
5121 yy_hold_char
= *yy_c_buf_p
;
5125 #ifdef YY_USE_PROTOS
5126 YY_BUFFER_STATE
yy_create_buffer( FILE *file
, int size
)
5128 YY_BUFFER_STATE
yy_create_buffer( file
, size
)
5135 b
= (YY_BUFFER_STATE
) yy_flex_alloc( sizeof( struct yy_buffer_state
) );
5137 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
5139 b
->yy_buf_size
= size
;
5141 /* yy_ch_buf has to be 2 characters longer than the size given because
5142 * we need to put in 2 end-of-buffer characters.
5144 b
->yy_ch_buf
= (char *) yy_flex_alloc( b
->yy_buf_size
+ 2 );
5145 if ( ! b
->yy_ch_buf
)
5146 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
5148 b
->yy_is_our_buffer
= 1;
5150 yy_init_buffer( b
, file
);
5156 #ifdef YY_USE_PROTOS
5157 void yy_delete_buffer( YY_BUFFER_STATE b
)
5159 void yy_delete_buffer( b
)
5166 if ( b
== yy_current_buffer
)
5167 yy_current_buffer
= (YY_BUFFER_STATE
) 0;
5169 if ( b
->yy_is_our_buffer
)
5170 yy_flex_free( (void *) b
->yy_ch_buf
);
5172 yy_flex_free( (void *) b
);
5179 #ifndef YY_ALWAYS_INTERACTIVE
5180 #ifndef YY_NEVER_INTERACTIVE
5181 extern int isatty
YY_PROTO(( int ));
5186 #ifdef YY_USE_PROTOS
5187 void yy_init_buffer( YY_BUFFER_STATE b
, FILE *file
)
5189 void yy_init_buffer( b
, file
)
5196 yy_flush_buffer( b
);
5198 b
->yy_input_file
= file
;
5199 b
->yy_fill_buffer
= 1;
5201 #if YY_ALWAYS_INTERACTIVE
5202 b
->yy_is_interactive
= 1;
5204 #if YY_NEVER_INTERACTIVE
5205 b
->yy_is_interactive
= 0;
5207 b
->yy_is_interactive
= file
? (isatty( fileno(file
) ) > 0) : 0;
5213 #ifdef YY_USE_PROTOS
5214 void yy_flush_buffer( YY_BUFFER_STATE b
)
5216 void yy_flush_buffer( b
)
5226 /* We always need two end-of-buffer characters. The first causes
5227 * a transition to the end-of-buffer state. The second causes
5228 * a jam in that state.
5230 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
5231 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
5233 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
5236 b
->yy_buffer_status
= YY_BUFFER_NEW
;
5238 if ( b
== yy_current_buffer
)
5239 yy_load_buffer_state();
5243 #ifndef YY_NO_SCAN_BUFFER
5244 #ifdef YY_USE_PROTOS
5245 YY_BUFFER_STATE
yy_scan_buffer( char *base
, yy_size_t size
)
5247 YY_BUFFER_STATE
yy_scan_buffer( base
, size
)
5255 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
5256 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
5257 /* They forgot to leave room for the EOB's. */
5260 b
= (YY_BUFFER_STATE
) yy_flex_alloc( sizeof( struct yy_buffer_state
) );
5262 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
5264 b
->yy_buf_size
= size
- 2; /* "- 2" to take care of EOB's */
5265 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
5266 b
->yy_is_our_buffer
= 0;
5267 b
->yy_input_file
= 0;
5268 b
->yy_n_chars
= b
->yy_buf_size
;
5269 b
->yy_is_interactive
= 0;
5271 b
->yy_fill_buffer
= 0;
5272 b
->yy_buffer_status
= YY_BUFFER_NEW
;
5274 yy_switch_to_buffer( b
);
5281 #ifndef YY_NO_SCAN_STRING
5282 #ifdef YY_USE_PROTOS
5283 YY_BUFFER_STATE
yy_scan_string( yyconst
char *yy_str
)
5285 YY_BUFFER_STATE
yy_scan_string( yy_str
)
5286 yyconst
char *yy_str
;
5290 for ( len
= 0; yy_str
[len
]; ++len
)
5293 return yy_scan_bytes( yy_str
, len
);
5298 #ifndef YY_NO_SCAN_BYTES
5299 #ifdef YY_USE_PROTOS
5300 YY_BUFFER_STATE
yy_scan_bytes( yyconst
char *bytes
, int len
)
5302 YY_BUFFER_STATE
yy_scan_bytes( bytes
, len
)
5303 yyconst
char *bytes
;
5312 /* Get memory for full buffer, including space for trailing EOB's. */
5314 buf
= (char *) yy_flex_alloc( n
);
5316 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
5318 for ( i
= 0; i
< len
; ++i
)
5321 buf
[len
] = buf
[len
+1] = YY_END_OF_BUFFER_CHAR
;
5323 b
= yy_scan_buffer( buf
, n
);
5325 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
5327 /* It's okay to grow etc. this buffer, and we should throw it
5328 * away when we're done.
5330 b
->yy_is_our_buffer
= 1;
5337 #ifndef YY_NO_PUSH_STATE
5338 #ifdef YY_USE_PROTOS
5339 static void yy_push_state( int new_state
)
5341 static void yy_push_state( new_state
)
5345 if ( yy_start_stack_ptr
>= yy_start_stack_depth
)
5349 yy_start_stack_depth
+= YY_START_STACK_INCR
;
5350 new_size
= yy_start_stack_depth
* sizeof( int );
5352 if ( ! yy_start_stack
)
5353 yy_start_stack
= (int *) yy_flex_alloc( new_size
);
5356 yy_start_stack
= (int *) yy_flex_realloc(
5357 (void *) yy_start_stack
, new_size
);
5359 if ( ! yy_start_stack
)
5361 "out of memory expanding start-condition stack" );
5364 yy_start_stack
[yy_start_stack_ptr
++] = YY_START
;
5371 #ifndef YY_NO_POP_STATE
5372 static void yy_pop_state()
5374 if ( --yy_start_stack_ptr
< 0 )
5375 YY_FATAL_ERROR( "start-condition stack underflow" );
5377 BEGIN(yy_start_stack
[yy_start_stack_ptr
]);
5382 #ifndef YY_NO_TOP_STATE
5383 static int yy_top_state()
5385 return yy_start_stack
[yy_start_stack_ptr
- 1];
5389 #ifndef YY_EXIT_FAILURE
5390 #define YY_EXIT_FAILURE 2
5393 #ifdef YY_USE_PROTOS
5394 static void yy_fatal_error( yyconst
char msg
[] )
5396 static void yy_fatal_error( msg
)
5400 (void) fprintf( stderr
, "%s\n", msg
);
5401 exit( YY_EXIT_FAILURE
);
5406 /* Redefine yyless() so it works in section 3 code. */
5412 /* Undo effects of setting up yytext. */ \
5413 yytext[yyleng] = yy_hold_char; \
5414 yy_c_buf_p = yytext + n; \
5415 yy_hold_char = *yy_c_buf_p; \
5416 *yy_c_buf_p = '\0'; \
5422 /* Internal utility routines. */
5425 #ifdef YY_USE_PROTOS
5426 static void yy_flex_strncpy( char *s1
, yyconst
char *s2
, int n
)
5428 static void yy_flex_strncpy( s1
, s2
, n
)
5435 for ( i
= 0; i
< n
; ++i
)
5440 #ifdef YY_NEED_STRLEN
5441 #ifdef YY_USE_PROTOS
5442 static int yy_flex_strlen( yyconst
char *s
)
5444 static int yy_flex_strlen( s
)
5449 for ( n
= 0; s
[n
]; ++n
)
5457 #ifdef YY_USE_PROTOS
5458 static void *yy_flex_alloc( yy_size_t size
)
5460 static void *yy_flex_alloc( size
)
5464 return (void *) malloc( size
);
5467 #ifdef YY_USE_PROTOS
5468 static void *yy_flex_realloc( void *ptr
, yy_size_t size
)
5470 static void *yy_flex_realloc( ptr
, size
)
5475 /* The cast to (char *) in the following accommodates both
5476 * implementations that use char* generic pointers, and those
5477 * that use void* generic pointers. It works with the latter
5478 * because both ANSI C and C++ allow castless assignment from
5479 * any pointer type to void*, and deal with argument conversions
5480 * as though doing an assignment.
5482 return (void *) realloc( (char *) ptr
, size
);
5485 #ifdef YY_USE_PROTOS
5486 static void yy_flex_free( void *ptr
)
5488 static void yy_flex_free( ptr
)
5502 #line 280 "chuck.lex"
5511 while ((c = yyinput()) != '\n' && c != '\r' && c != 0 && c != EOF );
5515 if (c == '\n') EM_newline();
5527 while ((c = yyinput()) != '*' && c != 0 && c != EOF )
5528 if( c == '\n' ) EM_newline();
5536 if( (c1 = yyinput()) != '/' && c != 0 )
5542 if( c != 0 ) adjust();