*** empty log message ***
[chuck-blob.git] / v2 / chuck_win32.c
blobbdbb6b7379cdbe0f98787de81b51bea8bcefe48d
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)
11 any later version.
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. */
47 #define YYBISON 1
49 /* Bison version. */
50 #define YYBISON_VERSION "2.3"
52 /* Skeleton name. */
53 #define YYSKELETON_NAME "yacc.c"
55 /* Pure parsers. */
56 #define YYPURE 0
58 /* Using locations. */
59 #define YYLSP_NEEDED 0
63 /* Tokens. */
64 #ifndef YYTOKENTYPE
65 # define YYTOKENTYPE
66 /* Put the tokens into the symbol table, so that GDB and other debuggers
67 know about them. */
68 enum yytokentype {
69 ID = 258,
70 STRING_LIT = 259,
71 NUM = 260,
72 FLOAT = 261,
73 POUND = 262,
74 COMMA = 263,
75 COLON = 264,
76 SEMICOLON = 265,
77 LPAREN = 266,
78 RPAREN = 267,
79 LBRACK = 268,
80 RBRACK = 269,
81 LBRACE = 270,
82 RBRACE = 271,
83 DOT = 272,
84 PLUS = 273,
85 MINUS = 274,
86 TIMES = 275,
87 DIVIDE = 276,
88 PERCENT = 277,
89 EQ = 278,
90 NEQ = 279,
91 LT = 280,
92 LE = 281,
93 GT = 282,
94 GE = 283,
95 AND = 284,
96 OR = 285,
97 ASSIGN = 286,
98 IF = 287,
99 THEN = 288,
100 ELSE = 289,
101 WHILE = 290,
102 FOR = 291,
103 DO = 292,
104 LOOP = 293,
105 BREAK = 294,
106 CONTINUE = 295,
107 NULL_TOK = 296,
108 FUNCTION = 297,
109 RETURN = 298,
110 QUESTION = 299,
111 EXCLAMATION = 300,
112 S_OR = 301,
113 S_AND = 302,
114 S_XOR = 303,
115 PLUSPLUS = 304,
116 MINUSMINUS = 305,
117 DOLLAR = 306,
118 POUNDPAREN = 307,
119 PERCENTPAREN = 308,
120 SIMULT = 309,
121 PATTERN = 310,
122 CODE = 311,
123 TRANSPORT = 312,
124 HOST = 313,
125 TIME = 314,
126 WHENEVER = 315,
127 NEXT = 316,
128 UNTIL = 317,
129 EVERY = 318,
130 BEFORE = 319,
131 AFTER = 320,
132 AT = 321,
133 AT_SYM = 322,
134 ATAT_SYM = 323,
135 NEW = 324,
136 SIZEOF = 325,
137 TYPEOF = 326,
138 SAME = 327,
139 PLUS_CHUCK = 328,
140 MINUS_CHUCK = 329,
141 TIMES_CHUCK = 330,
142 DIVIDE_CHUCK = 331,
143 S_AND_CHUCK = 332,
144 S_OR_CHUCK = 333,
145 S_XOR_CHUCK = 334,
146 SHIFT_RIGHT_CHUCK = 335,
147 SHIFT_LEFT_CHUCK = 336,
148 PERCENT_CHUCK = 337,
149 SHIFT_RIGHT = 338,
150 SHIFT_LEFT = 339,
151 TILDA = 340,
152 CHUCK = 341,
153 COLONCOLON = 342,
154 S_CHUCK = 343,
155 AT_CHUCK = 344,
156 LEFT_S_CHUCK = 345,
157 UNCHUCK = 346,
158 UPCHUCK = 347,
159 CLASS = 348,
160 INTERFACE = 349,
161 EXTENDS = 350,
162 IMPLEMENTS = 351,
163 PUBLIC = 352,
164 PROTECTED = 353,
165 PRIVATE = 354,
166 STATIC = 355,
167 ABSTRACT = 356,
168 CONST = 357,
169 SPORK = 358,
170 ARROW_RIGHT = 359,
171 ARROW_LEFT = 360,
172 L_HACK = 361,
173 R_HACK = 362
175 #endif
176 /* Tokens. */
177 #define ID 258
178 #define STRING_LIT 259
179 #define NUM 260
180 #define FLOAT 261
181 #define POUND 262
182 #define COMMA 263
183 #define COLON 264
184 #define SEMICOLON 265
185 #define LPAREN 266
186 #define RPAREN 267
187 #define LBRACK 268
188 #define RBRACK 269
189 #define LBRACE 270
190 #define RBRACE 271
191 #define DOT 272
192 #define PLUS 273
193 #define MINUS 274
194 #define TIMES 275
195 #define DIVIDE 276
196 #define PERCENT 277
197 #define EQ 278
198 #define NEQ 279
199 #define LT 280
200 #define LE 281
201 #define GT 282
202 #define GE 283
203 #define AND 284
204 #define OR 285
205 #define ASSIGN 286
206 #define IF 287
207 #define THEN 288
208 #define ELSE 289
209 #define WHILE 290
210 #define FOR 291
211 #define DO 292
212 #define LOOP 293
213 #define BREAK 294
214 #define CONTINUE 295
215 #define NULL_TOK 296
216 #define FUNCTION 297
217 #define RETURN 298
218 #define QUESTION 299
219 #define EXCLAMATION 300
220 #define S_OR 301
221 #define S_AND 302
222 #define S_XOR 303
223 #define PLUSPLUS 304
224 #define MINUSMINUS 305
225 #define DOLLAR 306
226 #define POUNDPAREN 307
227 #define PERCENTPAREN 308
228 #define SIMULT 309
229 #define PATTERN 310
230 #define CODE 311
231 #define TRANSPORT 312
232 #define HOST 313
233 #define TIME 314
234 #define WHENEVER 315
235 #define NEXT 316
236 #define UNTIL 317
237 #define EVERY 318
238 #define BEFORE 319
239 #define AFTER 320
240 #define AT 321
241 #define AT_SYM 322
242 #define ATAT_SYM 323
243 #define NEW 324
244 #define SIZEOF 325
245 #define TYPEOF 326
246 #define SAME 327
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
259 #define TILDA 340
260 #define CHUCK 341
261 #define COLONCOLON 342
262 #define S_CHUCK 343
263 #define AT_CHUCK 344
264 #define LEFT_S_CHUCK 345
265 #define UNCHUCK 346
266 #define UPCHUCK 347
267 #define CLASS 348
268 #define INTERFACE 349
269 #define EXTENDS 350
270 #define IMPLEMENTS 351
271 #define PUBLIC 352
272 #define PROTECTED 353
273 #define PRIVATE 354
274 #define STATIC 355
275 #define ABSTRACT 356
276 #define CONST 357
277 #define SPORK 358
278 #define ARROW_RIGHT 359
279 #define ARROW_LEFT 360
280 #define L_HACK 361
281 #define R_HACK 362
286 /* Copy the first part of user declarations. */
287 #line 1 "chuck.y"
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
311 U.S.A.
312 -----------------------------------------------------------------------------*/
314 //-----------------------------------------------------------------------------
315 // file: chuck.tab.c
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
323 // date: Summer 2002
324 //-----------------------------------------------------------------------------
325 #include <stdio.h>
326 #include <string.h>
327 #include <stdlib.h>
328 #include "chuck_utils.h"
329 #include "chuck_errmsg.h"
330 #include "chuck_absyn.h"
332 // function
333 int yylex( void );
335 void yyerror( char *s )
337 EM_error( EM_tokPos, "%s", s );
340 a_Program g_program = NULL;
344 /* Enabling traces. */
345 #ifndef YYDEBUG
346 # define YYDEBUG 0
347 #endif
349 /* Enabling verbose error messages. */
350 #ifdef YYERROR_VERBOSE
351 # undef YYERROR_VERBOSE
352 # define YYERROR_VERBOSE 1
353 #else
354 # define YYERROR_VERBOSE 0
355 #endif
357 /* Enabling the token table. */
358 #ifndef YYTOKEN_TABLE
359 # define YYTOKEN_TABLE 0
360 #endif
362 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
363 typedef union YYSTYPE
364 #line 59 "chuck.y"
366 int pos;
367 int ival;
368 double fval;
369 c_str sval;
371 a_Program program;
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;
377 a_Stmt stmt;
378 a_Exp exp;
379 a_Func_Def func_def;
380 a_Var_Decl_List var_decl_list;
381 a_Var_Decl var_decl;
382 a_Type_Decl type_decl;
383 a_Arg_List arg_list;
384 a_Id_List id_list;
385 a_Array_Sub array_sub;
386 a_Complex complex_exp;
387 a_Polar polar_exp;
389 /* Line 187 of yacc.c. */
390 #line 391 "chuck.tab.c"
391 YYSTYPE;
392 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
393 # define YYSTYPE_IS_DECLARED 1
394 # define YYSTYPE_IS_TRIVIAL 1
395 #endif
399 /* Copy the second part of user declarations. */
402 /* Line 216 of yacc.c. */
403 #line 404 "chuck.tab.c"
405 #ifdef short
406 # undef short
407 #endif
409 #ifdef YYTYPE_UINT8
410 typedef YYTYPE_UINT8 yytype_uint8;
411 #else
412 typedef unsigned char yytype_uint8;
413 #endif
415 #ifdef YYTYPE_INT8
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;
420 #else
421 typedef short int yytype_int8;
422 #endif
424 #ifdef YYTYPE_UINT16
425 typedef YYTYPE_UINT16 yytype_uint16;
426 #else
427 typedef unsigned short int yytype_uint16;
428 #endif
430 #ifdef YYTYPE_INT16
431 typedef YYTYPE_INT16 yytype_int16;
432 #else
433 typedef short int yytype_int16;
434 #endif
436 #ifndef YYSIZE_T
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
445 # else
446 # define YYSIZE_T unsigned int
447 # endif
448 #endif
450 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
452 #ifndef YY_
453 # if YYENABLE_NLS
454 # if ENABLE_NLS
455 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
456 # define YY_(msgid) dgettext ("bison-runtime", msgid)
457 # endif
458 # endif
459 # ifndef YY_
460 # define YY_(msgid) msgid
461 # endif
462 #endif
464 /* Suppress unused-variable warnings by "using" E. */
465 #if ! defined lint || defined __GNUC__
466 # define YYUSE(e) ((void) (e))
467 #else
468 # define YYUSE(e) /* empty */
469 #endif
471 /* Identity function, used to suppress warnings about constant conditions. */
472 #ifndef lint
473 # define YYID(n) (n)
474 #else
475 #if (defined __STDC__ || defined __C99__FUNC__ \
476 || defined __cplusplus || defined _MSC_VER)
477 static int
478 YYID (int i)
479 #else
480 static int
481 YYID (i)
482 int i;
483 #endif
485 return i;
487 #endif
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
495 # ifdef __GNUC__
496 # define YYSTACK_ALLOC __builtin_alloca
497 # elif defined __BUILTIN_VA_ARG_INCR
498 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
499 # elif defined _AIX
500 # define YYSTACK_ALLOC __alloca
501 # elif defined _MSC_VER
502 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
503 # define alloca _alloca
504 # else
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 */
509 # ifndef _STDLIB_H
510 # define _STDLIB_H 1
511 # endif
512 # endif
513 # endif
514 # endif
515 # endif
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 */
526 # endif
527 # else
528 # define YYSTACK_ALLOC YYMALLOC
529 # define YYSTACK_FREE YYFREE
530 # ifndef YYSTACK_ALLOC_MAXIMUM
531 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
532 # endif
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 */
537 # ifndef _STDLIB_H
538 # define _STDLIB_H 1
539 # endif
540 # endif
541 # ifndef YYMALLOC
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 */
546 # endif
547 # endif
548 # ifndef YYFREE
549 # define YYFREE free
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 */
553 # endif
554 # endif
555 # endif
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. */
564 union yyalloc
566 yytype_int16 yyss;
567 YYSTYPE yyvs;
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
574 N elements. */
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
580 not overlap. */
581 # ifndef YYCOPY
582 # if defined __GNUC__ && 1 < __GNUC__
583 # define YYCOPY(To, From, Count) \
584 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
585 # else
586 # define YYCOPY(To, From, Count) \
587 do \
589 YYSIZE_T yyi; \
590 for (yyi = 0; yyi < (Count); yyi++) \
591 (To)[yyi] = (From)[yyi]; \
593 while (YYID (0))
594 # endif
595 # endif
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
601 stack. */
602 # define YYSTACK_RELOCATE(Stack) \
603 do \
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); \
611 while (YYID (0))
613 #endif
615 /* YYFINAL -- State number of the termination state. */
616 #define YYFINAL 114
617 /* YYLAST -- Last index in YYTABLE. */
618 #define YYLAST 1082
620 /* YYNTOKENS -- Number of terminals. */
621 #define YYNTOKENS 108
622 /* YYNNTS -- Number of nonterminals. */
623 #define YYNNTS 57
624 /* YYNRULES -- Number of rules. */
625 #define YYNRULES 180
626 /* YYNRULES -- Number of states. */
627 #define YYNSTATES 309
629 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
630 #define YYUNDEFTOK 2
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,
675 105, 106, 107
678 #if YYDEBUG
679 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
680 YYRHS. */
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,
791 #endif
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
832 #endif
834 # ifdef YYPRINT
835 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
836 token YYLEX-NUM. */
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
851 # endif
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
951 STATE-NUM. */
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,
1114 0, 0, 38
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,
1227 -1, -1, 106
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)
1270 #define YYEOF 0
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) \
1286 do \
1287 if (yychar == YYEMPTY && yylen == 1) \
1289 yychar = (Token); \
1290 yylval = (Value); \
1291 yytoken = YYTRANSLATE (yychar); \
1292 YYPOPSTACK (1); \
1293 goto yybackup; \
1295 else \
1297 yyerror (YY_("syntax error: cannot back up")); \
1298 YYERROR; \
1300 while (YYID (0))
1303 #define YYTERROR 1
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) \
1314 do \
1315 if (YYID (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; \
1322 else \
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; \
1329 while (YYID (0))
1330 #endif
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)
1343 # else
1344 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1345 # endif
1346 #endif
1349 /* YYLEX -- calling `yylex' with the right arguments. */
1351 #ifdef YYLEX_PARAM
1352 # define YYLEX yylex (YYLEX_PARAM)
1353 #else
1354 # define YYLEX yylex ()
1355 #endif
1357 /* Enable debugging if requested. */
1358 #if YYDEBUG
1360 # ifndef YYFPRINTF
1361 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1362 # define YYFPRINTF fprintf
1363 # endif
1365 # define YYDPRINTF(Args) \
1366 do { \
1367 if (yydebug) \
1368 YYFPRINTF Args; \
1369 } while (YYID (0))
1371 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1372 do { \
1373 if (yydebug) \
1375 YYFPRINTF (stderr, "%s ", Title); \
1376 yy_symbol_print (stderr, \
1377 Type, Value); \
1378 YYFPRINTF (stderr, "\n"); \
1380 } while (YYID (0))
1383 /*--------------------------------.
1384 | Print this symbol on YYOUTPUT. |
1385 `--------------------------------*/
1387 /*ARGSUSED*/
1388 #if (defined __STDC__ || defined __C99__FUNC__ \
1389 || defined __cplusplus || defined _MSC_VER)
1390 static void
1391 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1392 #else
1393 static void
1394 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1395 FILE *yyoutput;
1396 int yytype;
1397 YYSTYPE const * const yyvaluep;
1398 #endif
1400 if (!yyvaluep)
1401 return;
1402 # ifdef YYPRINT
1403 if (yytype < YYNTOKENS)
1404 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1405 # else
1406 YYUSE (yyoutput);
1407 # endif
1408 switch (yytype)
1410 default:
1411 break;
1416 /*--------------------------------.
1417 | Print this symbol on YYOUTPUT. |
1418 `--------------------------------*/
1420 #if (defined __STDC__ || defined __C99__FUNC__ \
1421 || defined __cplusplus || defined _MSC_VER)
1422 static void
1423 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1424 #else
1425 static void
1426 yy_symbol_print (yyoutput, yytype, yyvaluep)
1427 FILE *yyoutput;
1428 int yytype;
1429 YYSTYPE const * const yyvaluep;
1430 #endif
1432 if (yytype < YYNTOKENS)
1433 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1434 else
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 |
1443 | TOP (included). |
1444 `------------------------------------------------------------------*/
1446 #if (defined __STDC__ || defined __C99__FUNC__ \
1447 || defined __cplusplus || defined _MSC_VER)
1448 static void
1449 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
1450 #else
1451 static void
1452 yy_stack_print (bottom, top)
1453 yytype_int16 *bottom;
1454 yytype_int16 *top;
1455 #endif
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) \
1464 do { \
1465 if (yydebug) \
1466 yy_stack_print ((Bottom), (Top)); \
1467 } while (YYID (0))
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)
1476 static void
1477 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1478 #else
1479 static void
1480 yy_reduce_print (yyvsp, yyrule)
1481 YYSTYPE *yyvsp;
1482 int yyrule;
1483 #endif
1485 int yynrhs = yyr2[yyrule];
1486 int yyi;
1487 unsigned long int yylno = yyrline[yyrule];
1488 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1489 yyrule - 1, yylno);
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) \
1502 do { \
1503 if (yydebug) \
1504 yy_reduce_print (yyvsp, Rule); \
1505 } while (YYID (0))
1507 /* Nonzero means print parse trace. It is left uninitialized so that
1508 multiple parsers can coexist. */
1509 int yydebug;
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. */
1519 #ifndef YYINITDEPTH
1520 # define YYINITDEPTH 200
1521 #endif
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. */
1530 #ifndef YYMAXDEPTH
1531 # define YYMAXDEPTH 10000
1532 #endif
1536 #if YYERROR_VERBOSE
1538 # ifndef yystrlen
1539 # if defined __GLIBC__ && defined _STRING_H
1540 # define yystrlen strlen
1541 # else
1542 /* Return the length of YYSTR. */
1543 #if (defined __STDC__ || defined __C99__FUNC__ \
1544 || defined __cplusplus || defined _MSC_VER)
1545 static YYSIZE_T
1546 yystrlen (const char *yystr)
1547 #else
1548 static YYSIZE_T
1549 yystrlen (yystr)
1550 const char *yystr;
1551 #endif
1553 YYSIZE_T yylen;
1554 for (yylen = 0; yystr[yylen]; yylen++)
1555 continue;
1556 return yylen;
1558 # endif
1559 # endif
1561 # ifndef yystpcpy
1562 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1563 # define yystpcpy stpcpy
1564 # else
1565 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1566 YYDEST. */
1567 #if (defined __STDC__ || defined __C99__FUNC__ \
1568 || defined __cplusplus || defined _MSC_VER)
1569 static char *
1570 yystpcpy (char *yydest, const char *yysrc)
1571 #else
1572 static char *
1573 yystpcpy (yydest, yysrc)
1574 char *yydest;
1575 const char *yysrc;
1576 #endif
1578 char *yyd = yydest;
1579 const char *yys = yysrc;
1581 while ((*yyd++ = *yys++) != '\0')
1582 continue;
1584 return yyd - 1;
1586 # endif
1587 # endif
1589 # ifndef yytnamerr
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
1596 would have been. */
1597 static YYSIZE_T
1598 yytnamerr (char *yyres, const char *yystr)
1600 if (*yystr == '"')
1602 YYSIZE_T yyn = 0;
1603 char const *yyp = yystr;
1605 for (;;)
1606 switch (*++yyp)
1608 case '\'':
1609 case ',':
1610 goto do_not_strip_quotes;
1612 case '\\':
1613 if (*++yyp != '\\')
1614 goto do_not_strip_quotes;
1615 /* Fall through. */
1616 default:
1617 if (yyres)
1618 yyres[yyn] = *yyp;
1619 yyn++;
1620 break;
1622 case '"':
1623 if (yyres)
1624 yyres[yyn] = '\0';
1625 return yyn;
1627 do_not_strip_quotes: ;
1630 if (! yyres)
1631 return yystrlen (yystr);
1633 return yystpcpy (yyres, yystr) - yyres;
1635 # endif
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. */
1644 static YYSIZE_T
1645 yysyntax_error (char *yyresult, int yystate, int yychar)
1647 int yyn = yypact[yystate];
1649 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1650 return 0;
1651 else
1653 int yytype = YYTRANSLATE (yychar);
1654 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1655 YYSIZE_T yysize = yysize0;
1656 YYSIZE_T yysize1;
1657 int yysize_overflow = 0;
1658 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1659 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1660 int yyx;
1662 # if 0
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");
1670 # endif
1671 char *yyfmt;
1672 char const *yyf;
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
1683 YYCHECK. */
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;
1689 int yycount = 1;
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)
1699 yycount = 1;
1700 yysize = yysize0;
1701 yyformat[sizeof yyunexpected - 1] = '\0';
1702 break;
1704 yyarg[yycount++] = yytname[yyx];
1705 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1706 yysize_overflow |= (yysize1 < yysize);
1707 yysize = yysize1;
1708 yyfmt = yystpcpy (yyfmt, yyprefix);
1709 yyprefix = yyor;
1712 yyf = YY_(yyformat);
1713 yysize1 = yysize + yystrlen (yyf);
1714 yysize_overflow |= (yysize1 < yysize);
1715 yysize = yysize1;
1717 if (yysize_overflow)
1718 return YYSIZE_MAXIMUM;
1720 if (yyresult)
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;
1726 int yyi = 0;
1727 while ((*yyp = *yyf) != '\0')
1729 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1731 yyp += yytnamerr (yyp, yyarg[yyi++]);
1732 yyf += 2;
1734 else
1736 yyp++;
1737 yyf++;
1741 return yysize;
1744 #endif /* YYERROR_VERBOSE */
1747 /*-----------------------------------------------.
1748 | Release the memory associated to this symbol. |
1749 `-----------------------------------------------*/
1751 /*ARGSUSED*/
1752 #if (defined __STDC__ || defined __C99__FUNC__ \
1753 || defined __cplusplus || defined _MSC_VER)
1754 static void
1755 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1756 #else
1757 static void
1758 yydestruct (yymsg, yytype, yyvaluep)
1759 const char *yymsg;
1760 int yytype;
1761 YYSTYPE *yyvaluep;
1762 #endif
1764 YYUSE (yyvaluep);
1766 if (!yymsg)
1767 yymsg = "Deleting";
1768 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1770 switch (yytype)
1773 default:
1774 break;
1779 /* Prevent warnings from -Wmissing-prototypes. */
1781 #ifdef YYPARSE_PARAM
1782 #if defined __STDC__ || defined __cplusplus
1783 int yyparse (void *YYPARSE_PARAM);
1784 #else
1785 int yyparse ();
1786 #endif
1787 #else /* ! YYPARSE_PARAM */
1788 #if defined __STDC__ || defined __cplusplus
1789 int yyparse (void);
1790 #else
1791 int yyparse ();
1792 #endif
1793 #endif /* ! YYPARSE_PARAM */
1797 /* The look-ahead symbol. */
1798 int yychar;
1800 /* The semantic value of the look-ahead symbol. */
1801 YYSTYPE yylval;
1803 /* Number of syntax errors so far. */
1804 int yynerrs;
1808 /*----------.
1809 | yyparse. |
1810 `----------*/
1812 #ifdef YYPARSE_PARAM
1813 #if (defined __STDC__ || defined __C99__FUNC__ \
1814 || defined __cplusplus || defined _MSC_VER)
1816 yyparse (void *YYPARSE_PARAM)
1817 #else
1819 yyparse (YYPARSE_PARAM)
1820 void *YYPARSE_PARAM;
1821 #endif
1822 #else /* ! YYPARSE_PARAM */
1823 #if (defined __STDC__ || defined __C99__FUNC__ \
1824 || defined __cplusplus || defined _MSC_VER)
1826 yyparse (void)
1827 #else
1829 yyparse ()
1831 #endif
1832 #endif
1835 int yystate;
1836 int yyn;
1837 int yyresult;
1838 /* Number of tokens to shift before error messages enabled. */
1839 int yyerrstatus;
1840 /* Look-ahead token as an internal (translated) token number. */
1841 int yytoken = 0;
1842 #if YYERROR_VERBOSE
1843 /* Buffer for error messages, and its allocated size. */
1844 char yymsgbuf[128];
1845 char *yymsg = yymsgbuf;
1846 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1847 #endif
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;
1865 YYSTYPE *yyvsp;
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
1874 action routines. */
1875 YYSTYPE yyval;
1878 /* The number of symbols on the RHS of the reduced rule.
1879 Keep to zero when no symbol should be popped. */
1880 int yylen = 0;
1882 YYDPRINTF ((stderr, "Starting parse\n"));
1884 yystate = 0;
1885 yyerrstatus = 0;
1886 yynerrs = 0;
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. */
1894 yyssp = yyss;
1895 yyvsp = yyvs;
1897 goto yysetstate;
1899 /*------------------------------------------------------------.
1900 | yynewstate -- Push a new state, which is found in yystate. |
1901 `------------------------------------------------------------*/
1902 yynewstate:
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. */
1905 yyssp++;
1907 yysetstate:
1908 *yyssp = yystate;
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;
1915 #ifdef yyoverflow
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
1919 memory. */
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),
1932 &yystacksize);
1934 yyss = yyss1;
1935 yyvs = yyvs1;
1937 #else /* no yyoverflow */
1938 # ifndef YYSTACK_RELOCATE
1939 goto yyexhaustedlab;
1940 # else
1941 /* Extend the stack our own way. */
1942 if (YYMAXDEPTH <= yystacksize)
1943 goto yyexhaustedlab;
1944 yystacksize *= 2;
1945 if (YYMAXDEPTH < yystacksize)
1946 yystacksize = YYMAXDEPTH;
1949 yytype_int16 *yyss1 = yyss;
1950 union yyalloc *yyptr =
1951 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1952 if (! yyptr)
1953 goto yyexhaustedlab;
1954 YYSTACK_RELOCATE (yyss);
1955 YYSTACK_RELOCATE (yyvs);
1957 # undef YYSTACK_RELOCATE
1958 if (yyss1 != yyssa)
1959 YYSTACK_FREE (yyss1);
1961 # endif
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)
1972 YYABORT;
1975 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1977 goto yybackup;
1979 /*-----------.
1980 | yybackup. |
1981 `-----------*/
1982 yybackup:
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)
1990 goto yydefault;
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: "));
1998 yychar = YYLEX;
2001 if (yychar <= YYEOF)
2003 yychar = yytoken = YYEOF;
2004 YYDPRINTF ((stderr, "Now at end of input.\n"));
2006 else
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. */
2014 yyn += yytoken;
2015 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2016 goto yydefault;
2017 yyn = yytable[yyn];
2018 if (yyn <= 0)
2020 if (yyn == 0 || yyn == YYTABLE_NINF)
2021 goto yyerrlab;
2022 yyn = -yyn;
2023 goto yyreduce;
2026 if (yyn == YYFINAL)
2027 YYACCEPT;
2029 /* Count tokens shifted since error; after three, turn off error
2030 status. */
2031 if (yyerrstatus)
2032 yyerrstatus--;
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)
2039 yychar = YYEMPTY;
2041 yystate = yyn;
2042 *++yyvsp = yylval;
2044 goto yynewstate;
2047 /*-----------------------------------------------------------.
2048 | yydefault -- do the default action for the current state. |
2049 `-----------------------------------------------------------*/
2050 yydefault:
2051 yyn = yydefact[yystate];
2052 if (yyn == 0)
2053 goto yyerrlab;
2054 goto yyreduce;
2057 /*-----------------------------.
2058 | yyreduce -- Do a reduction. |
2059 `-----------------------------*/
2060 yyreduce:
2061 /* yyn is the number of a rule to reduce with. */
2062 yylen = yyr2[yyn];
2064 /* If YYLEN is nonzero, implement the default value of the action:
2065 `$$ = $1'.
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);
2076 switch (yyn)
2078 case 2:
2079 #line 177 "chuck.y"
2080 { (yyval.program) = g_program = new_program( (yyvsp[(1) - (1)].program_section), EM_lineNum ); ;}
2081 break;
2083 case 3:
2084 #line 178 "chuck.y"
2085 { (yyval.program) = g_program = prepend_program( (yyvsp[(1) - (2)].program_section), (yyvsp[(2) - (2)].program), EM_lineNum ); ;}
2086 break;
2088 case 4:
2089 #line 182 "chuck.y"
2090 { (yyval.program_section) = new_section_stmt( (yyvsp[(1) - (1)].stmt_list), EM_lineNum ); ;}
2091 break;
2093 case 5:
2094 #line 183 "chuck.y"
2095 { (yyval.program_section) = new_section_func_def( (yyvsp[(1) - (1)].func_def), EM_lineNum ); ;}
2096 break;
2098 case 6:
2099 #line 184 "chuck.y"
2100 { (yyval.program_section) = new_section_class_def( (yyvsp[(1) - (1)].class_def), EM_lineNum ); ;}
2101 break;
2103 case 7:
2104 #line 189 "chuck.y"
2105 { (yyval.class_def) = new_class_def( (yyvsp[(1) - (6)].ival), (yyvsp[(3) - (6)].id_list), NULL, (yyvsp[(5) - (6)].class_body), EM_lineNum ); ;}
2106 break;
2108 case 8:
2109 #line 191 "chuck.y"
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 ); ;}
2111 break;
2113 case 9:
2114 #line 193 "chuck.y"
2115 { (yyval.class_def) = new_iface_def( (yyvsp[(1) - (6)].ival), (yyvsp[(3) - (6)].id_list), NULL, (yyvsp[(5) - (6)].class_body), EM_lineNum ); ;}
2116 break;
2118 case 10:
2119 #line 195 "chuck.y"
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 ); ;}
2121 break;
2123 case 11:
2124 #line 199 "chuck.y"
2125 { (yyval.class_ext) = new_class_ext( NULL, (yyvsp[(2) - (2)].id_list), EM_lineNum ); ;}
2126 break;
2128 case 12:
2129 #line 200 "chuck.y"
2130 { (yyval.class_ext) = new_class_ext( (yyvsp[(4) - (4)].id_list), (yyvsp[(2) - (4)].id_list), EM_lineNum ); ;}
2131 break;
2133 case 13:
2134 #line 201 "chuck.y"
2135 { (yyval.class_ext) = new_class_ext( (yyvsp[(2) - (2)].id_list), NULL, EM_lineNum ); ;}
2136 break;
2138 case 14:
2139 #line 202 "chuck.y"
2140 { (yyval.class_ext) = new_class_ext( (yyvsp[(2) - (4)].id_list), (yyvsp[(4) - (4)].id_list), EM_lineNum ); ;}
2141 break;
2143 case 15:
2144 #line 206 "chuck.y"
2145 { (yyval.class_body) = (yyvsp[(1) - (1)].class_body); ;}
2146 break;
2148 case 16:
2149 #line 207 "chuck.y"
2150 { (yyval.class_body) = NULL; ;}
2151 break;
2153 case 17:
2154 #line 211 "chuck.y"
2155 { (yyval.class_body) = new_class_body( (yyvsp[(1) - (1)].program_section), EM_lineNum ); ;}
2156 break;
2158 case 18:
2159 #line 212 "chuck.y"
2160 { (yyval.class_body) = prepend_class_body( (yyvsp[(1) - (2)].program_section), (yyvsp[(2) - (2)].class_body), EM_lineNum ); ;}
2161 break;
2163 case 19:
2164 #line 217 "chuck.y"
2165 { (yyval.program_section) = new_section_stmt( (yyvsp[(1) - (1)].stmt_list), EM_lineNum ); ;}
2166 break;
2168 case 20:
2169 #line 218 "chuck.y"
2170 { (yyval.program_section) = new_section_func_def( (yyvsp[(1) - (1)].func_def), EM_lineNum ); ;}
2171 break;
2173 case 21:
2174 #line 219 "chuck.y"
2175 { (yyval.program_section) = new_section_class_def( (yyvsp[(1) - (1)].class_def), EM_lineNum ); ;}
2176 break;
2178 case 22:
2179 #line 223 "chuck.y"
2180 { (yyval.class_ext) = new_class_ext( NULL, (yyvsp[(2) - (2)].id_list), EM_lineNum ); ;}
2181 break;
2183 case 23:
2184 #line 227 "chuck.y"
2185 { (yyval.id_list) = new_id_list( (yyvsp[(1) - (1)].sval), EM_lineNum ); ;}
2186 break;
2188 case 24:
2189 #line 228 "chuck.y"
2190 { (yyval.id_list) = prepend_id_list( (yyvsp[(1) - (3)].sval), (yyvsp[(3) - (3)].id_list), EM_lineNum ); ;}
2191 break;
2193 case 25:
2194 #line 232 "chuck.y"
2195 { (yyval.id_list) = new_id_list( (yyvsp[(1) - (1)].sval), EM_lineNum ); ;}
2196 break;
2198 case 26:
2199 #line 233 "chuck.y"
2200 { (yyval.id_list) = prepend_id_list( (yyvsp[(1) - (3)].sval), (yyvsp[(3) - (3)].id_list), EM_lineNum ); ;}
2201 break;
2203 case 27:
2204 #line 238 "chuck.y"
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 ); ;}
2206 break;
2208 case 28:
2209 #line 240 "chuck.y"
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 ); ;}
2211 break;
2213 case 29:
2214 #line 242 "chuck.y"
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 ); ;}
2216 break;
2218 case 30:
2219 #line 244 "chuck.y"
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 ); ;}
2221 break;
2223 case 31:
2224 #line 248 "chuck.y"
2225 { (yyval.ival) = ae_key_public; ;}
2226 break;
2228 case 32:
2229 #line 249 "chuck.y"
2230 { (yyval.ival) = ae_key_private; ;}
2231 break;
2233 case 33:
2234 #line 250 "chuck.y"
2235 { (yyval.ival) = ae_key_private; ;}
2236 break;
2238 case 34:
2239 #line 254 "chuck.y"
2240 { (yyval.ival) = ae_key_func; ;}
2241 break;
2243 case 35:
2244 #line 255 "chuck.y"
2245 { (yyval.ival) = ae_key_public; ;}
2246 break;
2248 case 36:
2249 #line 256 "chuck.y"
2250 { (yyval.ival) = ae_key_protected; ;}
2251 break;
2253 case 37:
2254 #line 257 "chuck.y"
2255 { (yyval.ival) = ae_key_private; ;}
2256 break;
2258 case 38:
2259 #line 261 "chuck.y"
2260 { (yyval.ival) = ae_key_static; ;}
2261 break;
2263 case 39:
2264 #line 262 "chuck.y"
2265 { (yyval.ival) = ae_key_abstract; ;}
2266 break;
2268 case 40:
2269 #line 263 "chuck.y"
2270 { (yyval.ival) = ae_key_instance; ;}
2271 break;
2273 case 41:
2274 #line 267 "chuck.y"
2275 { (yyval.type_decl) = new_type_decl( new_id_list( (yyvsp[(1) - (1)].sval), EM_lineNum ), 0, EM_lineNum ); ;}
2276 break;
2278 case 42:
2279 #line 268 "chuck.y"
2280 { (yyval.type_decl) = new_type_decl( new_id_list( (yyvsp[(1) - (2)].sval), EM_lineNum ), 1, EM_lineNum ); ;}
2281 break;
2283 case 43:
2284 #line 272 "chuck.y"
2285 { (yyval.type_decl) = new_type_decl( (yyvsp[(2) - (3)].id_list), 0, EM_lineNum ); ;}
2286 break;
2288 case 44:
2289 #line 273 "chuck.y"
2290 { (yyval.type_decl) = new_type_decl( (yyvsp[(2) - (4)].id_list), 1, EM_lineNum ); ;}
2291 break;
2293 case 45:
2294 #line 282 "chuck.y"
2295 { (yyval.type_decl) = (yyvsp[(1) - (1)].type_decl); ;}
2296 break;
2298 case 46:
2299 #line 283 "chuck.y"
2300 { (yyval.type_decl) = (yyvsp[(1) - (1)].type_decl); ;}
2301 break;
2303 case 47:
2304 #line 288 "chuck.y"
2305 { (yyval.type_decl) = (yyvsp[(1) - (1)].type_decl); ;}
2306 break;
2308 case 48:
2309 #line 289 "chuck.y"
2310 { (yyval.type_decl) = add_type_decl_array( (yyvsp[(1) - (2)].type_decl), (yyvsp[(2) - (2)].array_sub), EM_lineNum ); ;}
2311 break;
2313 case 49:
2314 #line 293 "chuck.y"
2315 { (yyval.arg_list) = new_arg_list( (yyvsp[(1) - (2)].type_decl), (yyvsp[(2) - (2)].var_decl), EM_lineNum ); ;}
2316 break;
2318 case 50:
2319 #line 294 "chuck.y"
2320 { (yyval.arg_list) = prepend_arg_list( (yyvsp[(1) - (4)].type_decl), (yyvsp[(2) - (4)].var_decl), (yyvsp[(4) - (4)].arg_list), EM_lineNum ); ;}
2321 break;
2323 case 51:
2324 #line 298 "chuck.y"
2325 { (yyval.stmt_list) = new_stmt_list( (yyvsp[(1) - (1)].stmt), EM_lineNum ); ;}
2326 break;
2328 case 52:
2329 #line 299 "chuck.y"
2330 { (yyval.stmt_list) = prepend_stmt_list( (yyvsp[(1) - (2)].stmt), (yyvsp[(2) - (2)].stmt_list), EM_lineNum ); ;}
2331 break;
2333 case 53:
2334 #line 303 "chuck.y"
2335 { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); ;}
2336 break;
2338 case 54:
2339 #line 304 "chuck.y"
2340 { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); ;}
2341 break;
2343 case 55:
2344 #line 305 "chuck.y"
2345 { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); ;}
2346 break;
2348 case 56:
2349 #line 306 "chuck.y"
2350 { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); ;}
2351 break;
2353 case 57:
2354 #line 308 "chuck.y"
2355 { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); ;}
2356 break;
2358 case 58:
2359 #line 312 "chuck.y"
2360 { (yyval.stmt) = new_stmt_from_return( NULL, EM_lineNum ); ;}
2361 break;
2363 case 59:
2364 #line 313 "chuck.y"
2365 { (yyval.stmt) = new_stmt_from_return( (yyvsp[(2) - (3)].exp), EM_lineNum ); ;}
2366 break;
2368 case 60:
2369 #line 314 "chuck.y"
2370 { (yyval.stmt) = new_stmt_from_break( EM_lineNum ); ;}
2371 break;
2373 case 61:
2374 #line 315 "chuck.y"
2375 { (yyval.stmt) = new_stmt_from_continue( EM_lineNum ); ;}
2376 break;
2378 case 62:
2379 #line 320 "chuck.y"
2380 { (yyval.stmt) = new_stmt_from_if( (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].stmt), NULL, EM_lineNum ); ;}
2381 break;
2383 case 63:
2384 #line 322 "chuck.y"
2385 { (yyval.stmt) = new_stmt_from_if( (yyvsp[(3) - (7)].exp), (yyvsp[(5) - (7)].stmt), (yyvsp[(7) - (7)].stmt), EM_lineNum ); ;}
2386 break;
2388 case 64:
2389 #line 327 "chuck.y"
2390 { (yyval.stmt) = new_stmt_from_while( (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].stmt), EM_lineNum ); ;}
2391 break;
2393 case 65:
2394 #line 329 "chuck.y"
2395 { (yyval.stmt) = new_stmt_from_do_while( (yyvsp[(5) - (7)].exp), (yyvsp[(2) - (7)].stmt), EM_lineNum ); ;}
2396 break;
2398 case 66:
2399 #line 331 "chuck.y"
2400 { (yyval.stmt) = new_stmt_from_for( (yyvsp[(3) - (6)].stmt), (yyvsp[(4) - (6)].stmt), NULL, (yyvsp[(6) - (6)].stmt), EM_lineNum ); ;}
2401 break;
2403 case 67:
2404 #line 333 "chuck.y"
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 ); ;}
2406 break;
2408 case 68:
2409 #line 335 "chuck.y"
2410 { (yyval.stmt) = new_stmt_from_until( (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].stmt), EM_lineNum ); ;}
2411 break;
2413 case 69:
2414 #line 337 "chuck.y"
2415 { (yyval.stmt) = new_stmt_from_do_until( (yyvsp[(5) - (7)].exp), (yyvsp[(2) - (7)].stmt), EM_lineNum ); ;}
2416 break;
2418 case 70:
2419 #line 339 "chuck.y"
2420 { (yyval.stmt) = new_stmt_from_loop( (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].stmt), EM_lineNum ); ;}
2421 break;
2423 case 71:
2424 #line 343 "chuck.y"
2425 { (yyval.stmt) = new_stmt_from_code( NULL, EM_lineNum ); ;}
2426 break;
2428 case 72:
2429 #line 344 "chuck.y"
2430 { (yyval.stmt) = new_stmt_from_code( (yyvsp[(2) - (3)].stmt_list), EM_lineNum ); ;}
2431 break;
2433 case 73:
2434 #line 348 "chuck.y"
2435 { (yyval.stmt) = NULL; ;}
2436 break;
2438 case 74:
2439 #line 349 "chuck.y"
2440 { (yyval.stmt) = new_stmt_from_expression( (yyvsp[(1) - (2)].exp), EM_lineNum ); ;}
2441 break;
2443 case 75:
2444 #line 353 "chuck.y"
2445 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2446 break;
2448 case 76:
2449 #line 354 "chuck.y"
2450 { (yyval.exp) = prepend_expression( (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2451 break;
2453 case 77:
2454 #line 358 "chuck.y"
2455 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2456 break;
2458 case 78:
2459 #line 360 "chuck.y"
2460 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2461 break;
2463 case 79:
2464 #line 364 "chuck.y"
2465 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2466 break;
2468 case 80:
2469 #line 366 "chuck.y"
2470 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2471 break;
2473 case 81:
2474 #line 370 "chuck.y"
2475 { (yyval.array_sub) = new_array_sub( (yyvsp[(2) - (3)].exp), EM_lineNum ); ;}
2476 break;
2478 case 82:
2479 #line 372 "chuck.y"
2480 { (yyval.array_sub) = prepend_array_sub( (yyvsp[(4) - (4)].array_sub), (yyvsp[(2) - (4)].exp), EM_lineNum ); ;}
2481 break;
2483 case 83:
2484 #line 376 "chuck.y"
2485 { (yyval.array_sub) = new_array_sub( NULL, EM_lineNum ); ;}
2486 break;
2488 case 84:
2489 #line 377 "chuck.y"
2490 { (yyval.array_sub) = prepend_array_sub( (yyvsp[(1) - (3)].array_sub), NULL, EM_lineNum ); ;}
2491 break;
2493 case 85:
2494 #line 381 "chuck.y"
2495 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2496 break;
2498 case 86:
2499 #line 382 "chuck.y"
2500 { (yyval.exp) = new_exp_decl( (yyvsp[(1) - (2)].type_decl), (yyvsp[(2) - (2)].var_decl_list), 0, EM_lineNum ); ;}
2501 break;
2503 case 87:
2504 #line 383 "chuck.y"
2505 { (yyval.exp) = new_exp_decl( (yyvsp[(2) - (3)].type_decl), (yyvsp[(3) - (3)].var_decl_list), 1, EM_lineNum ); ;}
2506 break;
2508 case 88:
2509 #line 384 "chuck.y"
2510 { (yyval.exp) = new_exp_decl( NULL, (yyvsp[(2) - (2)].var_decl_list), 0, EM_lineNum ); ;}
2511 break;
2513 case 89:
2514 #line 385 "chuck.y"
2515 { (yyval.exp) = new_exp_decl( NULL, (yyvsp[(3) - (3)].var_decl_list), 1, EM_lineNum ); ;}
2516 break;
2518 case 90:
2519 #line 389 "chuck.y"
2520 { (yyval.var_decl_list) = new_var_decl_list( (yyvsp[(1) - (1)].var_decl), EM_lineNum ); ;}
2521 break;
2523 case 91:
2524 #line 390 "chuck.y"
2525 { (yyval.var_decl_list) = prepend_var_decl_list( (yyvsp[(1) - (3)].var_decl), (yyvsp[(3) - (3)].var_decl_list), EM_lineNum ); ;}
2526 break;
2528 case 92:
2529 #line 394 "chuck.y"
2530 { (yyval.var_decl) = new_var_decl( (yyvsp[(1) - (1)].sval), NULL, EM_lineNum ); ;}
2531 break;
2533 case 93:
2534 #line 395 "chuck.y"
2535 { (yyval.var_decl) = new_var_decl( (yyvsp[(1) - (2)].sval), (yyvsp[(2) - (2)].array_sub), EM_lineNum ); ;}
2536 break;
2538 case 94:
2539 #line 396 "chuck.y"
2540 { (yyval.var_decl) = new_var_decl( (yyvsp[(1) - (2)].sval), (yyvsp[(2) - (2)].array_sub), EM_lineNum ); ;}
2541 break;
2543 case 95:
2544 #line 401 "chuck.y"
2545 { (yyval.complex_exp) = new_complex( (yyvsp[(2) - (3)].exp), EM_lineNum ); ;}
2546 break;
2548 case 96:
2549 #line 406 "chuck.y"
2550 { (yyval.polar_exp) = new_polar( (yyvsp[(2) - (3)].exp), EM_lineNum ); ;}
2551 break;
2553 case 97:
2554 #line 410 "chuck.y"
2555 { (yyval.ival) = ae_op_chuck; ;}
2556 break;
2558 case 98:
2559 #line 411 "chuck.y"
2560 { (yyval.ival) = ae_op_at_chuck; ;}
2561 break;
2563 case 99:
2564 #line 412 "chuck.y"
2565 { (yyval.ival) = ae_op_plus_chuck; ;}
2566 break;
2568 case 100:
2569 #line 413 "chuck.y"
2570 { (yyval.ival) = ae_op_minus_chuck; ;}
2571 break;
2573 case 101:
2574 #line 414 "chuck.y"
2575 { (yyval.ival) = ae_op_times_chuck; ;}
2576 break;
2578 case 102:
2579 #line 415 "chuck.y"
2580 { (yyval.ival) = ae_op_divide_chuck; ;}
2581 break;
2583 case 103:
2584 #line 416 "chuck.y"
2585 { (yyval.ival) = ae_op_shift_right_chuck; ;}
2586 break;
2588 case 104:
2589 #line 417 "chuck.y"
2590 { (yyval.ival) = ae_op_shift_left_chuck; ;}
2591 break;
2593 case 105:
2594 #line 418 "chuck.y"
2595 { (yyval.ival) = ae_op_percent_chuck; ;}
2596 break;
2598 case 106:
2599 #line 419 "chuck.y"
2600 { (yyval.ival) = ae_op_unchuck; ;}
2601 break;
2603 case 107:
2604 #line 420 "chuck.y"
2605 { (yyval.ival) = ae_op_upchuck; ;}
2606 break;
2608 case 108:
2609 #line 421 "chuck.y"
2610 { (yyval.ival) = ae_op_s_and_chuck; ;}
2611 break;
2613 case 109:
2614 #line 422 "chuck.y"
2615 { (yyval.ival) = ae_op_s_or_chuck; ;}
2616 break;
2618 case 110:
2619 #line 423 "chuck.y"
2620 { (yyval.ival) = ae_op_s_xor_chuck; ;}
2621 break;
2623 case 111:
2624 #line 427 "chuck.y"
2625 { (yyval.ival) = ae_op_arrow_left; ;}
2626 break;
2628 case 112:
2629 #line 428 "chuck.y"
2630 { (yyval.ival) = ae_op_arrow_right; ;}
2631 break;
2633 case 113:
2634 #line 432 "chuck.y"
2635 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2636 break;
2638 case 114:
2639 #line 434 "chuck.y"
2640 { (yyval.exp) = new_exp_from_if( (yyvsp[(1) - (5)].exp), (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].exp), EM_lineNum ); ;}
2641 break;
2643 case 115:
2644 #line 438 "chuck.y"
2645 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2646 break;
2648 case 116:
2649 #line 440 "chuck.y"
2650 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_or, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2651 break;
2653 case 117:
2654 #line 444 "chuck.y"
2655 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2656 break;
2658 case 118:
2659 #line 446 "chuck.y"
2660 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_and, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2661 break;
2663 case 119:
2664 #line 450 "chuck.y"
2665 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2666 break;
2668 case 120:
2669 #line 452 "chuck.y"
2670 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_s_or, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2671 break;
2673 case 121:
2674 #line 456 "chuck.y"
2675 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2676 break;
2678 case 122:
2679 #line 458 "chuck.y"
2680 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_s_xor, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2681 break;
2683 case 123:
2684 #line 462 "chuck.y"
2685 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2686 break;
2688 case 124:
2689 #line 464 "chuck.y"
2690 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_s_and, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2691 break;
2693 case 125:
2694 #line 468 "chuck.y"
2695 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2696 break;
2698 case 126:
2699 #line 470 "chuck.y"
2700 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_eq, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2701 break;
2703 case 127:
2704 #line 472 "chuck.y"
2705 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_neq, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2706 break;
2708 case 128:
2709 #line 476 "chuck.y"
2710 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2711 break;
2713 case 129:
2714 #line 478 "chuck.y"
2715 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_lt, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2716 break;
2718 case 130:
2719 #line 480 "chuck.y"
2720 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_gt, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2721 break;
2723 case 131:
2724 #line 482 "chuck.y"
2725 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_le, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2726 break;
2728 case 132:
2729 #line 484 "chuck.y"
2730 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_ge, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2731 break;
2733 case 133:
2734 #line 488 "chuck.y"
2735 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2736 break;
2738 case 134:
2739 #line 490 "chuck.y"
2740 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_shift_left, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2741 break;
2743 case 135:
2744 #line 492 "chuck.y"
2745 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_shift_right, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2746 break;
2748 case 136:
2749 #line 496 "chuck.y"
2750 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2751 break;
2753 case 137:
2754 #line 498 "chuck.y"
2755 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_plus, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2756 break;
2758 case 138:
2759 #line 500 "chuck.y"
2760 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_minus, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2761 break;
2763 case 139:
2764 #line 504 "chuck.y"
2765 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2766 break;
2768 case 140:
2769 #line 506 "chuck.y"
2770 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_times, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2771 break;
2773 case 141:
2774 #line 508 "chuck.y"
2775 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_divide, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2776 break;
2778 case 142:
2779 #line 510 "chuck.y"
2780 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_percent, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2781 break;
2783 case 143:
2784 #line 514 "chuck.y"
2785 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2786 break;
2788 case 144:
2789 #line 516 "chuck.y"
2790 { (yyval.exp) = new_exp_from_binary( (yyvsp[(1) - (3)].exp), ae_op_tilda, (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2791 break;
2793 case 145:
2794 #line 520 "chuck.y"
2795 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2796 break;
2798 case 146:
2799 #line 522 "chuck.y"
2800 { (yyval.exp) = new_exp_from_cast( (yyvsp[(3) - (3)].type_decl), (yyvsp[(1) - (3)].exp), EM_lineNum ); ;}
2801 break;
2803 case 147:
2804 #line 526 "chuck.y"
2805 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2806 break;
2808 case 148:
2809 #line 528 "chuck.y"
2810 { (yyval.exp) = new_exp_from_unary( ae_op_plusplus, (yyvsp[(2) - (2)].exp), EM_lineNum ); ;}
2811 break;
2813 case 149:
2814 #line 530 "chuck.y"
2815 { (yyval.exp) = new_exp_from_unary( ae_op_minusminus, (yyvsp[(2) - (2)].exp), EM_lineNum ); ;}
2816 break;
2818 case 150:
2819 #line 532 "chuck.y"
2820 { (yyval.exp) = new_exp_from_unary( (yyvsp[(1) - (2)].ival), (yyvsp[(2) - (2)].exp), EM_lineNum ); ;}
2821 break;
2823 case 151:
2824 #line 534 "chuck.y"
2825 { (yyval.exp) = new_exp_from_unary( ae_op_typeof, (yyvsp[(2) - (2)].exp), EM_lineNum ); ;}
2826 break;
2828 case 152:
2829 #line 536 "chuck.y"
2830 { (yyval.exp) = new_exp_from_unary( ae_op_sizeof, (yyvsp[(2) - (2)].exp), EM_lineNum ); ;}
2831 break;
2833 case 153:
2834 #line 538 "chuck.y"
2835 { (yyval.exp) = new_exp_from_unary2( ae_op_new, (yyvsp[(2) - (2)].type_decl), NULL, EM_lineNum ); ;}
2836 break;
2838 case 154:
2839 #line 540 "chuck.y"
2840 { (yyval.exp) = new_exp_from_unary2( ae_op_new, (yyvsp[(2) - (3)].type_decl), (yyvsp[(3) - (3)].array_sub), EM_lineNum ); ;}
2841 break;
2843 case 155:
2844 #line 542 "chuck.y"
2845 { (yyval.exp) = new_exp_from_unary3( ae_op_spork, (yyvsp[(3) - (3)].stmt), EM_lineNum ); ;}
2846 break;
2848 case 156:
2849 #line 546 "chuck.y"
2850 { (yyval.ival) = ae_op_plus; ;}
2851 break;
2853 case 157:
2854 #line 547 "chuck.y"
2855 { (yyval.ival) = ae_op_minus; ;}
2856 break;
2858 case 158:
2859 #line 548 "chuck.y"
2860 { (yyval.ival) = ae_op_tilda; ;}
2861 break;
2863 case 159:
2864 #line 549 "chuck.y"
2865 { (yyval.ival) = ae_op_exclamation; ;}
2866 break;
2868 case 160:
2869 #line 550 "chuck.y"
2870 { (yyval.ival) = ae_op_times; ;}
2871 break;
2873 case 161:
2874 #line 551 "chuck.y"
2875 { (yyval.ival) = ae_op_spork; ;}
2876 break;
2878 case 163:
2879 #line 558 "chuck.y"
2880 { (yyval.exp) = new_exp_from_dur( (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp), EM_lineNum ); ;}
2881 break;
2883 case 164:
2884 #line 562 "chuck.y"
2885 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
2886 break;
2888 case 165:
2889 #line 564 "chuck.y"
2890 { (yyval.exp) = new_exp_from_array( (yyvsp[(1) - (2)].exp), (yyvsp[(2) - (2)].array_sub), EM_lineNum ); ;}
2891 break;
2893 case 166:
2894 #line 566 "chuck.y"
2895 { (yyval.exp) = new_exp_from_func_call( (yyvsp[(1) - (3)].exp), NULL, EM_lineNum ); ;}
2896 break;
2898 case 167:
2899 #line 568 "chuck.y"
2900 { (yyval.exp) = new_exp_from_func_call( (yyvsp[(1) - (4)].exp), (yyvsp[(3) - (4)].exp), EM_lineNum ); ;}
2901 break;
2903 case 168:
2904 #line 570 "chuck.y"
2905 { (yyval.exp) = new_exp_from_member_dot( (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].sval), EM_lineNum ); ;}
2906 break;
2908 case 169:
2909 #line 572 "chuck.y"
2910 { (yyval.exp) = new_exp_from_postfix( (yyvsp[(1) - (2)].exp), ae_op_plusplus, EM_lineNum ); ;}
2911 break;
2913 case 170:
2914 #line 574 "chuck.y"
2915 { (yyval.exp) = new_exp_from_postfix( (yyvsp[(1) - (2)].exp), ae_op_minusminus, EM_lineNum ); ;}
2916 break;
2918 case 171:
2919 #line 578 "chuck.y"
2920 { (yyval.exp) = new_exp_from_id( (yyvsp[(1) - (1)].sval), EM_lineNum ); ;}
2921 break;
2923 case 172:
2924 #line 579 "chuck.y"
2925 { (yyval.exp) = new_exp_from_int( (yyvsp[(1) - (1)].ival), EM_lineNum ); ;}
2926 break;
2928 case 173:
2929 #line 580 "chuck.y"
2930 { (yyval.exp) = new_exp_from_float( (yyvsp[(1) - (1)].fval), EM_lineNum ); ;}
2931 break;
2933 case 174:
2934 #line 581 "chuck.y"
2935 { (yyval.exp) = new_exp_from_str( (yyvsp[(1) - (1)].sval), EM_lineNum ); ;}
2936 break;
2938 case 175:
2939 #line 582 "chuck.y"
2940 { (yyval.exp) = new_exp_from_array_lit( (yyvsp[(1) - (1)].array_sub), EM_lineNum ); ;}
2941 break;
2943 case 176:
2944 #line 583 "chuck.y"
2945 { (yyval.exp) = new_exp_from_complex( (yyvsp[(1) - (1)].complex_exp), EM_lineNum ); ;}
2946 break;
2948 case 177:
2949 #line 584 "chuck.y"
2950 { (yyval.exp) = new_exp_from_polar( (yyvsp[(1) - (1)].polar_exp), EM_lineNum ); ;}
2951 break;
2953 case 178:
2954 #line 585 "chuck.y"
2955 { (yyval.exp) = new_exp_from_hack( (yyvsp[(2) - (3)].exp), EM_lineNum ); ;}
2956 break;
2958 case 179:
2959 #line 586 "chuck.y"
2960 { (yyval.exp) = (yyvsp[(2) - (3)].exp); ;}
2961 break;
2963 case 180:
2964 #line 587 "chuck.y"
2965 { (yyval.exp) = new_exp_from_nil( EM_lineNum ); ;}
2966 break;
2969 /* Line 1267 of yacc.c. */
2970 #line 2971 "chuck.tab.c"
2971 default: break;
2973 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2975 YYPOPSTACK (yylen);
2976 yylen = 0;
2977 YY_STACK_PRINT (yyss, yyssp);
2979 *++yyvsp = yyval;
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. */
2986 yyn = yyr1[yyn];
2988 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2989 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2990 yystate = yytable[yystate];
2991 else
2992 yystate = yydefgoto[yyn - YYNTOKENS];
2994 goto yynewstate;
2997 /*------------------------------------.
2998 | yyerrlab -- here on detecting error |
2999 `------------------------------------*/
3000 yyerrlab:
3001 /* If not already recovering from an error, report this error. */
3002 if (!yyerrstatus)
3004 ++yynerrs;
3005 #if ! YYERROR_VERBOSE
3006 yyerror (YY_("syntax error"));
3007 #else
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);
3018 if (yymsg)
3019 yymsg_alloc = yyalloc;
3020 else
3022 yymsg = yymsgbuf;
3023 yymsg_alloc = sizeof yymsgbuf;
3027 if (0 < yysize && yysize <= yymsg_alloc)
3029 (void) yysyntax_error (yymsg, yystate, yychar);
3030 yyerror (yymsg);
3032 else
3034 yyerror (YY_("syntax error"));
3035 if (yysize != 0)
3036 goto yyexhaustedlab;
3039 #endif
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)
3053 YYABORT;
3055 else
3057 yydestruct ("Error: discarding",
3058 yytoken, &yylval);
3059 yychar = YYEMPTY;
3063 /* Else will try to reuse look-ahead token after shifting the error
3064 token. */
3065 goto yyerrlab1;
3068 /*---------------------------------------------------.
3069 | yyerrorlab -- error raised explicitly by YYERROR. |
3070 `---------------------------------------------------*/
3071 yyerrorlab:
3073 /* Pacify compilers like GCC when the user code never invokes
3074 YYERROR and the label yyerrorlab therefore never appears in user
3075 code. */
3076 if (/*CONSTCOND*/ 0)
3077 goto yyerrorlab;
3079 /* Do not reclaim the symbols of the rule which action triggered
3080 this YYERROR. */
3081 YYPOPSTACK (yylen);
3082 yylen = 0;
3083 YY_STACK_PRINT (yyss, yyssp);
3084 yystate = *yyssp;
3085 goto yyerrlab1;
3088 /*-------------------------------------------------------------.
3089 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3090 `-------------------------------------------------------------*/
3091 yyerrlab1:
3092 yyerrstatus = 3; /* Each real token shifted decrements this. */
3094 for (;;)
3096 yyn = yypact[yystate];
3097 if (yyn != YYPACT_NINF)
3099 yyn += YYTERROR;
3100 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3102 yyn = yytable[yyn];
3103 if (0 < yyn)
3104 break;
3108 /* Pop the current state because it cannot handle the error token. */
3109 if (yyssp == yyss)
3110 YYABORT;
3113 yydestruct ("Error: popping",
3114 yystos[yystate], yyvsp);
3115 YYPOPSTACK (1);
3116 yystate = *yyssp;
3117 YY_STACK_PRINT (yyss, yyssp);
3120 if (yyn == YYFINAL)
3121 YYACCEPT;
3123 *++yyvsp = yylval;
3126 /* Shift the error token. */
3127 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3129 yystate = yyn;
3130 goto yynewstate;
3133 /*-------------------------------------.
3134 | yyacceptlab -- YYACCEPT comes here. |
3135 `-------------------------------------*/
3136 yyacceptlab:
3137 yyresult = 0;
3138 goto yyreturn;
3140 /*-----------------------------------.
3141 | yyabortlab -- YYABORT comes here. |
3142 `-----------------------------------*/
3143 yyabortlab:
3144 yyresult = 1;
3145 goto yyreturn;
3147 #ifndef yyoverflow
3148 /*-------------------------------------------------.
3149 | yyexhaustedlab -- memory exhaustion comes here. |
3150 `-------------------------------------------------*/
3151 yyexhaustedlab:
3152 yyerror (YY_("memory exhausted"));
3153 yyresult = 2;
3154 /* Fall through. */
3155 #endif
3157 yyreturn:
3158 if (yychar != YYEOF && yychar != YYEMPTY)
3159 yydestruct ("Cleanup: discarding lookahead",
3160 yytoken, &yylval);
3161 /* Do not reclaim the symbols of the rule which action triggered
3162 this YYABORT or YYACCEPT. */
3163 YYPOPSTACK (yylen);
3164 YY_STACK_PRINT (yyss, yyssp);
3165 while (yyssp != yyss)
3167 yydestruct ("Cleanup: popping",
3168 yystos[*yyssp], yyvsp);
3169 YYPOPSTACK (1);
3171 #ifndef yyoverflow
3172 if (yyss != yyssa)
3173 YYSTACK_FREE (yyss);
3174 #endif
3175 #if YYERROR_VERBOSE
3176 if (yymsg != yymsgbuf)
3177 YYSTACK_FREE (yymsg);
3178 #endif
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
3196 #include <stdio.h>
3197 #include <errno.h>
3199 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
3200 #ifdef c_plusplus
3201 #ifndef __cplusplus
3202 #define __cplusplus
3203 #endif
3204 #endif
3207 #ifdef __cplusplus
3209 #include <stdlib.h>
3210 #ifndef _WIN32
3211 #include <unistd.h>
3212 #endif
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 */
3222 #if __STDC__
3224 #define YY_USE_PROTOS
3225 #define YY_USE_CONST
3227 #endif /* __STDC__ */
3228 #endif /* ! __cplusplus */
3230 #ifdef __TURBOC__
3231 #pragma warn -rch
3232 #pragma warn -use
3233 #include <io.h>
3234 #include <stdlib.h>
3235 #define YY_USE_CONST
3236 #define YY_USE_PROTOS
3237 #endif
3239 #ifdef YY_USE_CONST
3240 #define yyconst const
3241 #else
3242 #define yyconst
3243 #endif
3246 #ifdef YY_USE_PROTOS
3247 #define YY_PROTO(proto) proto
3248 #else
3249 #define YY_PROTO(proto) ()
3250 #endif
3253 /* Returned upon end-of-file. */
3254 #define YY_NULL 0
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
3259 * double cast.
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
3271 * compatibility.
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;
3289 extern int yyleng;
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 )
3301 * yyless( 5 );
3302 * else
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. */
3312 #define yyless(n) \
3313 do \
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 */ \
3321 while ( 0 )
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
3340 * characters.
3342 yy_size_t yy_buf_size;
3344 /* Number of characters read into yy_ch_buf, not including EOB
3345 * characters.
3347 int yy_n_chars;
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
3351 * delete it.
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
3358 * each newline.
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
3364 * not.
3366 int yy_at_bol;
3368 /* Whether to try to fill the input buffer when we reach the
3369 * end of it.
3371 int yy_fill_buffer;
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
3393 * "scanner state".
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 */
3404 int yyleng;
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; \
3470 *yy_cp = '\0'; \
3471 yy_c_buf_p = yy_cp;
3473 #define YY_NUM_RULES 100
3474 #define YY_END_OF_BUFFER 101
3475 static yyconst short int yy_accept[224] =
3476 { 0,
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,
3501 67, 65, 0
3504 static yyconst int yy_ec[256] =
3505 { 0,
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,
3533 1, 1, 1, 1, 1
3536 static yyconst int yy_meta[66] =
3537 { 0,
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,
3544 3, 1, 1, 1, 1
3547 static yyconst short int yy_base[227] =
3548 { 0,
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] =
3577 { 0,
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] =
3606 { 0,
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,
3646 223, 223
3649 static yyconst short int yy_chk[363] =
3650 { 0,
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,
3690 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
3703 char *yytext;
3704 #line 1 "chuck.lex"
3705 #define INITIAL 0
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
3728 U.S.A.
3729 -----------------------------------------------------------------------------*/
3731 //-----------------------------------------------------------------------------
3732 // file: chuck.yy.c
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 //-----------------------------------------------------------------------------
3743 #include <stdlib.h>
3744 #include <string.h>
3745 #include "chuck_utils.h"
3746 #include "chuck_absyn.h"
3747 #include "chuck_errmsg.h"
3749 #ifndef __PLATFORM_WIN32__
3750 #include "chuck.tab.h"
3751 #else
3752 #include "chuck_win32.h"
3753 #endif
3757 // globals
3758 extern YYSTYPE yylval;
3759 int char_pos = 1;
3761 // define error handling
3762 #define YY_FATAL_ERROR(msg) EM_error2( 0, msg )
3764 #if defined(_cplusplus) || defined(__cplusplus)
3765 extern "C" {
3766 #endif
3768 int yywrap(void);
3769 void adjust();
3770 c_str strip_lit( c_str str );
3771 c_str alloc_str( c_str str );
3772 long htol( c_str str );
3773 int comment();
3774 int block_comment();
3776 #if defined(_cplusplus) || defined(__cplusplus)
3778 #endif
3780 // yywrap()
3781 int yywrap( void )
3783 char_pos = 1;
3784 return 1;
3787 // adjust()
3788 void adjust()
3790 EM_tokPos = char_pos;
3791 char_pos += yyleng;
3794 // strip
3795 c_str strip_lit( c_str str )
3797 str[strlen(str)-1] = '\0';
3798 return str+1;
3801 // alloc_str()
3802 c_str alloc_str( c_str str )
3804 c_str s = (c_str)malloc( strlen(str) + 1 );
3805 strcpy( s, str );
3807 return s;
3810 // to long
3811 long htol( c_str str )
3813 char * c = str;
3814 unsigned long n = 0;
3816 // skip over 0x
3817 c += 2;
3818 while( *c )
3820 n <<= 4;
3821 switch( *c )
3823 case '1': case '2': case '3': case '4': case '5':
3824 case '6': case '7': case '8': case '9': case '0':
3825 n += *c - '0';
3826 break;
3828 case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
3829 n += *c - 'a' + 10;
3830 break;
3832 case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
3833 n += *c - 'A' + 10;
3834 break;
3836 c++;
3839 return n;
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 ) \
3849 unput(c1); \
3850 goto loop; \
3852 if( c != 0 ) adjust();
3854 // comment hack
3855 #define comment_hack \
3856 while ((c = input()) != '\n' && c != '\r' && c != 0 && c != EOF ); \
3857 if (c != 0) { \
3858 adjust(); \
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
3867 * section 1.
3870 #ifndef YY_SKIP_YYWRAP
3871 #ifdef __cplusplus
3872 extern "C" int yywrap YY_PROTO(( void ));
3873 #else
3874 extern int yywrap YY_PROTO(( void ));
3875 #endif
3876 #endif
3878 #ifndef YY_NO_UNPUT
3879 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
3880 #endif
3882 #ifndef yytext_ptr
3883 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
3884 #endif
3886 #ifdef YY_NEED_STRLEN
3887 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
3888 #endif
3890 #ifndef YY_NO_INPUT
3891 #ifdef __cplusplus
3892 static int yyinput YY_PROTO(( void ));
3893 #else
3894 static int input YY_PROTO(( void ));
3895 #endif
3896 #endif
3898 #if YY_STACK_USED
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 ));
3904 #endif
3905 #ifndef YY_NO_POP_STATE
3906 static void yy_pop_state YY_PROTO(( void ));
3907 #endif
3908 #ifndef YY_NO_TOP_STATE
3909 static int yy_top_state YY_PROTO(( void ));
3910 #endif
3912 #else
3913 #define YY_NO_PUSH_STATE 1
3914 #define YY_NO_POP_STATE 1
3915 #define YY_NO_TOP_STATE 1
3916 #endif
3918 #ifdef YY_MALLOC_DECL
3919 YY_MALLOC_DECL
3920 #else
3921 #if __STDC__
3922 #ifndef __cplusplus
3923 #include <stdlib.h>
3924 #endif
3925 #else
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).
3930 #endif
3931 #endif
3933 /* Amount of stuff to slurp up with each read. */
3934 #ifndef YY_READ_BUF_SIZE
3935 #define YY_READ_BUF_SIZE 8192
3936 #endif
3938 /* Copy whatever the last rule matched to the standard output. */
3940 #ifndef ECHO
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 )
3945 #endif
3947 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
3948 * is returned in "result".
3950 #ifndef YY_INPUT
3951 #define YY_INPUT(buf,result,max_size) \
3952 if ( yy_current_buffer->yy_is_interactive ) \
3954 int c = '*', n; \
3955 for ( n = 0; n < max_size && \
3956 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
3957 buf[n] = (char) c; \
3958 if ( c == '\n' ) \
3959 buf[n++] = (char) c; \
3960 if ( c == EOF && ferror( yyin ) ) \
3961 YY_FATAL_ERROR( "input in flex scanner failed" ); \
3962 result = n; \
3964 else \
3966 errno=0; \
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" ); \
3972 break; \
3974 errno=0; \
3975 clearerr(yyin); \
3978 #endif
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.
3984 #ifndef yyterminate
3985 #define yyterminate() return YY_NULL
3986 #endif
3988 /* Number of entries by which start-condition stack grows. */
3989 #ifndef YY_START_STACK_INCR
3990 #define YY_START_STACK_INCR 25
3991 #endif
3993 /* Report a fatal error. */
3994 #ifndef YY_FATAL_ERROR
3995 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
3996 #endif
3998 /* Default declaration of generated scanner - a define so the user can
3999 * easily add parameters.
4001 #ifndef YY_DECL
4002 #define YY_DECL int yylex YY_PROTO(( void ))
4003 #endif
4005 /* Code executed at the beginning of each rule, after yytext and yyleng
4006 * have been set up.
4008 #ifndef YY_USER_ACTION
4009 #define YY_USER_ACTION
4010 #endif
4012 /* Code executed at the end of each rule. */
4013 #ifndef YY_BREAK
4014 #define YY_BREAK break;
4015 #endif
4017 #define YY_RULE_SETUP \
4018 YY_USER_ACTION
4020 YY_DECL
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"
4031 if ( yy_init )
4033 yy_init = 0;
4035 #ifdef YY_USER_INIT
4036 YY_USER_INIT;
4037 #endif
4039 if ( ! yy_start )
4040 yy_start = 1; /* first start state */
4042 if ( ! yyin )
4043 yyin = stdin;
4045 if ( ! yyout )
4046 yyout = stdout;
4048 if ( ! yy_current_buffer )
4049 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 */
4057 yy_cp = yy_c_buf_p;
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
4063 * the current run.
4065 yy_bp = yy_cp;
4067 yy_current_state = yy_start;
4068 yy_match:
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];
4084 ++yy_cp;
4086 while ( yy_base[yy_current_state] != 297 );
4088 yy_find_action:
4089 yy_act = yy_accept[yy_current_state];
4090 if ( yy_act == 0 )
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. */
4103 switch ( yy_act )
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;
4112 case 1:
4113 YY_RULE_SETUP
4114 #line 172 "chuck.lex"
4115 { char c; adjust(); comment_hack; continue; }
4116 YY_BREAK
4117 case 2:
4118 YY_RULE_SETUP
4119 #line 173 "chuck.lex"
4120 { char c; adjust(); comment_hack; continue; }
4121 YY_BREAK
4122 case 3:
4123 YY_RULE_SETUP
4124 #line 174 "chuck.lex"
4125 { char c, c1; adjust(); block_comment_hack; continue; }
4126 YY_BREAK
4127 case 4:
4128 YY_RULE_SETUP
4129 #line 175 "chuck.lex"
4130 { adjust(); continue; }
4131 YY_BREAK
4132 case 5:
4133 YY_RULE_SETUP
4134 #line 176 "chuck.lex"
4135 { adjust(); continue; }
4136 YY_BREAK
4137 case 6:
4138 YY_RULE_SETUP
4139 #line 177 "chuck.lex"
4140 { adjust(); EM_newline(); continue; }
4141 YY_BREAK
4142 case 7:
4143 YY_RULE_SETUP
4144 #line 178 "chuck.lex"
4145 { adjust(); EM_newline(); continue; }
4146 YY_BREAK
4147 case 8:
4148 YY_RULE_SETUP
4149 #line 180 "chuck.lex"
4150 { adjust(); return PLUSPLUS; }
4151 YY_BREAK
4152 case 9:
4153 YY_RULE_SETUP
4154 #line 181 "chuck.lex"
4155 { adjust(); return MINUSMINUS; }
4156 YY_BREAK
4157 case 10:
4158 YY_RULE_SETUP
4159 #line 182 "chuck.lex"
4160 { adjust(); return POUNDPAREN; }
4161 YY_BREAK
4162 case 11:
4163 YY_RULE_SETUP
4164 #line 183 "chuck.lex"
4165 { adjust(); return PERCENTPAREN; }
4166 YY_BREAK
4167 case 12:
4168 YY_RULE_SETUP
4169 #line 185 "chuck.lex"
4170 { adjust(); return COMMA; }
4171 YY_BREAK
4172 case 13:
4173 YY_RULE_SETUP
4174 #line 186 "chuck.lex"
4175 { adjust(); return COLON; }
4176 YY_BREAK
4177 case 14:
4178 YY_RULE_SETUP
4179 #line 187 "chuck.lex"
4180 { adjust(); return DOT; }
4181 YY_BREAK
4182 case 15:
4183 YY_RULE_SETUP
4184 #line 188 "chuck.lex"
4185 { adjust(); return PLUS; }
4186 YY_BREAK
4187 case 16:
4188 YY_RULE_SETUP
4189 #line 189 "chuck.lex"
4190 { adjust(); return MINUS; }
4191 YY_BREAK
4192 case 17:
4193 YY_RULE_SETUP
4194 #line 190 "chuck.lex"
4195 { adjust(); return TIMES; }
4196 YY_BREAK
4197 case 18:
4198 YY_RULE_SETUP
4199 #line 191 "chuck.lex"
4200 { adjust(); return DIVIDE; }
4201 YY_BREAK
4202 case 19:
4203 YY_RULE_SETUP
4204 #line 192 "chuck.lex"
4205 { adjust(); return PERCENT; }
4206 YY_BREAK
4207 case 20:
4208 YY_RULE_SETUP
4209 #line 193 "chuck.lex"
4210 { adjust(); return POUND; }
4211 YY_BREAK
4212 case 21:
4213 YY_RULE_SETUP
4214 #line 194 "chuck.lex"
4215 { adjust(); return DOLLAR; }
4216 YY_BREAK
4217 case 22:
4218 YY_RULE_SETUP
4219 #line 196 "chuck.lex"
4220 { adjust(); return COLONCOLON; }
4221 YY_BREAK
4222 case 23:
4223 YY_RULE_SETUP
4224 #line 197 "chuck.lex"
4225 { adjust(); return EQ; }
4226 YY_BREAK
4227 case 24:
4228 YY_RULE_SETUP
4229 #line 198 "chuck.lex"
4230 { adjust(); return NEQ; }
4231 YY_BREAK
4232 case 25:
4233 YY_RULE_SETUP
4234 #line 199 "chuck.lex"
4235 { adjust(); return LT; }
4236 YY_BREAK
4237 case 26:
4238 YY_RULE_SETUP
4239 #line 200 "chuck.lex"
4240 { adjust(); return GT; }
4241 YY_BREAK
4242 case 27:
4243 YY_RULE_SETUP
4244 #line 201 "chuck.lex"
4245 { adjust(); return LE; }
4246 YY_BREAK
4247 case 28:
4248 YY_RULE_SETUP
4249 #line 202 "chuck.lex"
4250 { adjust(); return GE; }
4251 YY_BREAK
4252 case 29:
4253 YY_RULE_SETUP
4254 #line 203 "chuck.lex"
4255 { adjust(); return AND; }
4256 YY_BREAK
4257 case 30:
4258 YY_RULE_SETUP
4259 #line 204 "chuck.lex"
4260 { adjust(); return OR; }
4261 YY_BREAK
4262 case 31:
4263 YY_RULE_SETUP
4264 #line 205 "chuck.lex"
4265 { adjust(); return S_AND; }
4266 YY_BREAK
4267 case 32:
4268 YY_RULE_SETUP
4269 #line 206 "chuck.lex"
4270 { adjust(); return S_OR; }
4271 YY_BREAK
4272 case 33:
4273 YY_RULE_SETUP
4274 #line 207 "chuck.lex"
4275 { adjust(); return S_XOR; }
4276 YY_BREAK
4277 case 34:
4278 YY_RULE_SETUP
4279 #line 208 "chuck.lex"
4280 { adjust(); return SHIFT_RIGHT; }
4281 YY_BREAK
4282 case 35:
4283 YY_RULE_SETUP
4284 #line 209 "chuck.lex"
4285 { adjust(); return SHIFT_LEFT; }
4286 YY_BREAK
4287 case 36:
4288 YY_RULE_SETUP
4289 #line 210 "chuck.lex"
4290 { adjust(); return ASSIGN; }
4291 YY_BREAK
4292 case 37:
4293 YY_RULE_SETUP
4294 #line 211 "chuck.lex"
4295 { adjust(); return LPAREN; }
4296 YY_BREAK
4297 case 38:
4298 YY_RULE_SETUP
4299 #line 212 "chuck.lex"
4300 { adjust(); return RPAREN; }
4301 YY_BREAK
4302 case 39:
4303 YY_RULE_SETUP
4304 #line 213 "chuck.lex"
4305 { adjust(); return LBRACK; }
4306 YY_BREAK
4307 case 40:
4308 YY_RULE_SETUP
4309 #line 214 "chuck.lex"
4310 { adjust(); return RBRACK; }
4311 YY_BREAK
4312 case 41:
4313 YY_RULE_SETUP
4314 #line 215 "chuck.lex"
4315 { adjust(); return LBRACE; }
4316 YY_BREAK
4317 case 42:
4318 YY_RULE_SETUP
4319 #line 216 "chuck.lex"
4320 { adjust(); return RBRACE; }
4321 YY_BREAK
4322 case 43:
4323 YY_RULE_SETUP
4324 #line 217 "chuck.lex"
4325 { adjust(); return SEMICOLON; }
4326 YY_BREAK
4327 case 44:
4328 YY_RULE_SETUP
4329 #line 218 "chuck.lex"
4330 { adjust(); return QUESTION; }
4331 YY_BREAK
4332 case 45:
4333 YY_RULE_SETUP
4334 #line 219 "chuck.lex"
4335 { adjust(); return EXCLAMATION; }
4336 YY_BREAK
4337 case 46:
4338 YY_RULE_SETUP
4339 #line 220 "chuck.lex"
4340 { adjust(); return TILDA; }
4341 YY_BREAK
4342 case 47:
4343 YY_RULE_SETUP
4344 #line 221 "chuck.lex"
4345 { adjust(); return FOR; }
4346 YY_BREAK
4347 case 48:
4348 YY_RULE_SETUP
4349 #line 222 "chuck.lex"
4350 { adjust(); return WHILE; }
4351 YY_BREAK
4352 case 49:
4353 YY_RULE_SETUP
4354 #line 223 "chuck.lex"
4355 { adjust(); return UNTIL; }
4356 YY_BREAK
4357 case 50:
4358 YY_RULE_SETUP
4359 #line 224 "chuck.lex"
4360 { adjust(); return LOOP; }
4361 YY_BREAK
4362 case 51:
4363 YY_RULE_SETUP
4364 #line 225 "chuck.lex"
4365 { adjust(); return CONTINUE; }
4366 YY_BREAK
4367 case 52:
4368 YY_RULE_SETUP
4369 #line 226 "chuck.lex"
4370 { adjust(); return BREAK; }
4371 YY_BREAK
4372 case 53:
4373 YY_RULE_SETUP
4374 #line 227 "chuck.lex"
4375 { adjust(); return IF; }
4376 YY_BREAK
4377 case 54:
4378 YY_RULE_SETUP
4379 #line 228 "chuck.lex"
4380 { adjust(); return ELSE; }
4381 YY_BREAK
4382 case 55:
4383 YY_RULE_SETUP
4384 #line 229 "chuck.lex"
4385 { adjust(); return DO; }
4386 YY_BREAK
4387 case 56:
4388 YY_RULE_SETUP
4389 #line 230 "chuck.lex"
4390 { adjust(); return L_HACK; }
4391 YY_BREAK
4392 case 57:
4393 YY_RULE_SETUP
4394 #line 231 "chuck.lex"
4395 { adjust(); return R_HACK; }
4396 YY_BREAK
4397 case 58:
4398 YY_RULE_SETUP
4399 #line 233 "chuck.lex"
4400 { adjust(); return RETURN; }
4401 YY_BREAK
4402 case 59:
4403 YY_RULE_SETUP
4404 #line 235 "chuck.lex"
4405 { adjust(); return FUNCTION; }
4406 YY_BREAK
4407 case 60:
4408 YY_RULE_SETUP
4409 #line 236 "chuck.lex"
4410 { adjust(); return FUNCTION; }
4411 YY_BREAK
4412 case 61:
4413 YY_RULE_SETUP
4414 #line 237 "chuck.lex"
4415 { adjust(); return NEW; }
4416 YY_BREAK
4417 case 62:
4418 YY_RULE_SETUP
4419 #line 238 "chuck.lex"
4420 { adjust(); return CLASS; }
4421 YY_BREAK
4422 case 63:
4423 YY_RULE_SETUP
4424 #line 239 "chuck.lex"
4425 { adjust(); return INTERFACE; }
4426 YY_BREAK
4427 case 64:
4428 YY_RULE_SETUP
4429 #line 240 "chuck.lex"
4430 { adjust(); return EXTENDS; }
4431 YY_BREAK
4432 case 65:
4433 YY_RULE_SETUP
4434 #line 241 "chuck.lex"
4435 { adjust(); return IMPLEMENTS; }
4436 YY_BREAK
4437 case 66:
4438 YY_RULE_SETUP
4439 #line 242 "chuck.lex"
4440 { adjust(); return PUBLIC; }
4441 YY_BREAK
4442 case 67:
4443 YY_RULE_SETUP
4444 #line 243 "chuck.lex"
4445 { adjust(); return PROTECTED; }
4446 YY_BREAK
4447 case 68:
4448 YY_RULE_SETUP
4449 #line 244 "chuck.lex"
4450 { adjust(); return PRIVATE; }
4451 YY_BREAK
4452 case 69:
4453 YY_RULE_SETUP
4454 #line 245 "chuck.lex"
4455 { adjust(); return STATIC; }
4456 YY_BREAK
4457 case 70:
4458 YY_RULE_SETUP
4459 #line 246 "chuck.lex"
4460 { adjust(); return ABSTRACT; }
4461 YY_BREAK
4462 case 71:
4463 YY_RULE_SETUP
4464 #line 247 "chuck.lex"
4465 { adjust(); return CONST; }
4466 YY_BREAK
4467 case 72:
4468 YY_RULE_SETUP
4469 #line 248 "chuck.lex"
4470 { adjust(); return SPORK; }
4471 YY_BREAK
4472 case 73:
4473 YY_RULE_SETUP
4474 #line 249 "chuck.lex"
4475 { adjust(); return TYPEOF; }
4476 YY_BREAK
4477 case 74:
4478 YY_RULE_SETUP
4479 #line 251 "chuck.lex"
4480 { adjust(); return CHUCK; }
4481 YY_BREAK
4482 case 75:
4483 YY_RULE_SETUP
4484 #line 252 "chuck.lex"
4485 { adjust(); return UNCHUCK; }
4486 YY_BREAK
4487 case 76:
4488 YY_RULE_SETUP
4489 #line 253 "chuck.lex"
4490 { adjust(); return UNCHUCK; }
4491 YY_BREAK
4492 case 77:
4493 YY_RULE_SETUP
4494 #line 254 "chuck.lex"
4495 { adjust(); return UPCHUCK; }
4496 YY_BREAK
4497 case 78:
4498 YY_RULE_SETUP
4499 #line 255 "chuck.lex"
4500 { adjust(); return AT_CHUCK; }
4501 YY_BREAK
4502 case 79:
4503 YY_RULE_SETUP
4504 #line 256 "chuck.lex"
4505 { adjust(); return PLUS_CHUCK; }
4506 YY_BREAK
4507 case 80:
4508 YY_RULE_SETUP
4509 #line 257 "chuck.lex"
4510 { adjust(); return MINUS_CHUCK; }
4511 YY_BREAK
4512 case 81:
4513 YY_RULE_SETUP
4514 #line 258 "chuck.lex"
4515 { adjust(); return TIMES_CHUCK; }
4516 YY_BREAK
4517 case 82:
4518 YY_RULE_SETUP
4519 #line 259 "chuck.lex"
4520 { adjust(); return DIVIDE_CHUCK; }
4521 YY_BREAK
4522 case 83:
4523 YY_RULE_SETUP
4524 #line 260 "chuck.lex"
4525 { adjust(); return S_AND_CHUCK; }
4526 YY_BREAK
4527 case 84:
4528 YY_RULE_SETUP
4529 #line 261 "chuck.lex"
4530 { adjust(); return S_OR_CHUCK; }
4531 YY_BREAK
4532 case 85:
4533 YY_RULE_SETUP
4534 #line 262 "chuck.lex"
4535 { adjust(); return S_XOR_CHUCK; }
4536 YY_BREAK
4537 case 86:
4538 YY_RULE_SETUP
4539 #line 263 "chuck.lex"
4540 { adjust(); return SHIFT_RIGHT_CHUCK; }
4541 YY_BREAK
4542 case 87:
4543 YY_RULE_SETUP
4544 #line 264 "chuck.lex"
4545 { adjust(); return SHIFT_LEFT_CHUCK; }
4546 YY_BREAK
4547 case 88:
4548 YY_RULE_SETUP
4549 #line 265 "chuck.lex"
4550 { adjust(); return PERCENT_CHUCK; }
4551 YY_BREAK
4552 case 89:
4553 YY_RULE_SETUP
4554 #line 266 "chuck.lex"
4555 { adjust(); return AT_SYM; }
4556 YY_BREAK
4557 case 90:
4558 YY_RULE_SETUP
4559 #line 267 "chuck.lex"
4560 { adjust(); return ATAT_SYM; }
4561 YY_BREAK
4562 case 91:
4563 YY_RULE_SETUP
4564 #line 268 "chuck.lex"
4565 { adjust(); return ARROW_RIGHT; }
4566 YY_BREAK
4567 case 92:
4568 YY_RULE_SETUP
4569 #line 269 "chuck.lex"
4570 { adjust(); return ARROW_LEFT; }
4571 YY_BREAK
4572 case 93:
4573 YY_RULE_SETUP
4574 #line 271 "chuck.lex"
4575 { adjust(); yylval.ival=htol(yytext); return NUM; }
4576 YY_BREAK
4577 case 94:
4578 YY_RULE_SETUP
4579 #line 272 "chuck.lex"
4580 { adjust(); yylval.ival=atoi(yytext); return NUM; }
4581 YY_BREAK
4582 case 95:
4583 YY_RULE_SETUP
4584 #line 273 "chuck.lex"
4585 { adjust(); yylval.ival=atoi(yytext); return NUM; }
4586 YY_BREAK
4587 case 96:
4588 YY_RULE_SETUP
4589 #line 274 "chuck.lex"
4590 { adjust(); yylval.fval=atof(yytext); return FLOAT; }
4591 YY_BREAK
4592 case 97:
4593 YY_RULE_SETUP
4594 #line 275 "chuck.lex"
4595 { adjust(); yylval.sval=alloc_str(yytext); return ID; }
4596 YY_BREAK
4597 case 98:
4598 YY_RULE_SETUP
4599 #line 276 "chuck.lex"
4600 { adjust(); yylval.sval=alloc_str(strip_lit(yytext)); return STRING_LIT; }
4601 YY_BREAK
4602 case 99:
4603 YY_RULE_SETUP
4604 #line 278 "chuck.lex"
4605 { adjust(); EM_error( EM_tokPos, "illegal token" ); }
4606 YY_BREAK
4607 case 100:
4608 YY_RULE_SETUP
4609 #line 280 "chuck.lex"
4610 ECHO;
4611 YY_BREAK
4612 #line 1429 "chuck.yy.c"
4613 case YY_STATE_EOF(INITIAL):
4614 yyterminate();
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
4646 * in input().
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;
4674 goto yy_match;
4677 else
4679 yy_cp = yy_c_buf_p;
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;
4690 if ( yywrap() )
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);
4704 goto do_action;
4707 else
4709 if ( ! yy_did_buffer_switch_on_eof )
4710 YY_NEW_FILE;
4712 break;
4715 case EOB_ACT_CONTINUE_SCAN:
4716 yy_c_buf_p =
4717 yytext_ptr + yy_amount_of_matched_text;
4719 yy_current_state = yy_get_previous_state();
4721 yy_cp = yy_c_buf_p;
4722 yy_bp = yytext_ptr + YY_MORE_ADJ;
4723 goto yy_match;
4725 case EOB_ACT_LAST_MATCH:
4726 yy_c_buf_p =
4727 &yy_current_buffer->yy_ch_buf[yy_n_chars];
4729 yy_current_state = yy_get_previous_state();
4731 yy_cp = yy_c_buf_p;
4732 yy_bp = yytext_ptr + YY_MORE_ADJ;
4733 goto yy_find_action;
4735 break;
4738 default:
4739 YY_FATAL_ERROR(
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;
4759 int ret_val;
4761 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
4762 YY_FATAL_ERROR(
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;
4775 else
4777 /* We matched some text prior to the EOB, first
4778 * process it.
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,
4794 * just force an EOF
4796 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
4798 else
4800 int num_to_read =
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
4806 YY_FATAL_ERROR(
4807 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
4808 #else
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;
4822 else
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 );
4830 else
4831 /* Can't grow it, we don't own it. */
4832 b->yy_ch_buf = 0;
4834 if ( ! b->yy_ch_buf )
4835 YY_FATAL_ERROR(
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 -
4841 number_to_move - 1;
4842 #endif
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;
4860 yyrestart( yyin );
4863 else
4865 ret_val = EOB_ACT_LAST_MATCH;
4866 yy_current_buffer->yy_buffer_status =
4867 YY_BUFFER_EOF_PENDING;
4871 else
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];
4880 return ret_val;
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
4916 * synopsis
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 )
4922 #else
4923 static yy_state_type yy_try_NUL_trans( yy_current_state )
4924 yy_state_type yy_current_state;
4925 #endif
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;
4949 #ifndef YY_NO_UNPUT
4950 #ifdef YY_USE_PROTOS
4951 static void yyunput( int c, register char *yy_bp )
4952 #else
4953 static void yyunput( c, yy_bp )
4954 int c;
4955 register char *yy_bp;
4956 #endif
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;
4987 yytext_ptr = yy_bp;
4988 yy_hold_char = *yy_cp;
4989 yy_c_buf_p = yy_cp;
4991 #endif /* ifndef YY_NO_UNPUT */
4994 #ifdef __cplusplus
4995 static int yyinput()
4996 #else
4997 static int input()
4998 #endif
5000 int c;
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. */
5012 *yy_c_buf_p = '\0';
5014 else
5015 { /* need more input */
5016 int offset = yy_c_buf_p - yytext_ptr;
5017 ++yy_c_buf_p;
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. */
5033 yyrestart( yyin );
5035 /* fall through */
5037 case EOB_ACT_END_OF_FILE:
5039 if ( yywrap() )
5040 return EOF;
5042 if ( ! yy_did_buffer_switch_on_eof )
5043 YY_NEW_FILE;
5044 #ifdef __cplusplus
5045 return yyinput();
5046 #else
5047 return input();
5048 #endif
5051 case EOB_ACT_CONTINUE_SCAN:
5052 yy_c_buf_p = yytext_ptr + offset;
5053 break;
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;
5063 return c;
5067 #ifdef YY_USE_PROTOS
5068 void yyrestart( FILE *input_file )
5069 #else
5070 void yyrestart( input_file )
5071 FILE *input_file;
5072 #endif
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 )
5084 #else
5085 void yy_switch_to_buffer( new_buffer )
5086 YY_BUFFER_STATE new_buffer;
5087 #endif
5089 if ( yy_current_buffer == new_buffer )
5090 return;
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 )
5114 #else
5115 void yy_load_buffer_state()
5116 #endif
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 )
5127 #else
5128 YY_BUFFER_STATE yy_create_buffer( file, size )
5129 FILE *file;
5130 int size;
5131 #endif
5133 YY_BUFFER_STATE b;
5135 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
5136 if ( ! b )
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 );
5152 return b;
5156 #ifdef YY_USE_PROTOS
5157 void yy_delete_buffer( YY_BUFFER_STATE b )
5158 #else
5159 void yy_delete_buffer( b )
5160 YY_BUFFER_STATE b;
5161 #endif
5163 if ( ! b )
5164 return;
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 );
5176 #ifndef _WIN32
5177 #include <unistd.h>
5178 #else
5179 #ifndef YY_ALWAYS_INTERACTIVE
5180 #ifndef YY_NEVER_INTERACTIVE
5181 extern int isatty YY_PROTO(( int ));
5182 #endif
5183 #endif
5184 #endif
5186 #ifdef YY_USE_PROTOS
5187 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
5188 #else
5189 void yy_init_buffer( b, file )
5190 YY_BUFFER_STATE b;
5191 FILE *file;
5192 #endif
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;
5203 #else
5204 #if YY_NEVER_INTERACTIVE
5205 b->yy_is_interactive = 0;
5206 #else
5207 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
5208 #endif
5209 #endif
5213 #ifdef YY_USE_PROTOS
5214 void yy_flush_buffer( YY_BUFFER_STATE b )
5215 #else
5216 void yy_flush_buffer( b )
5217 YY_BUFFER_STATE b;
5218 #endif
5221 if ( ! b )
5222 return;
5224 b->yy_n_chars = 0;
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];
5235 b->yy_at_bol = 1;
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 )
5246 #else
5247 YY_BUFFER_STATE yy_scan_buffer( base, size )
5248 char *base;
5249 yy_size_t size;
5250 #endif
5252 YY_BUFFER_STATE b;
5254 if ( size < 2 ||
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. */
5258 return 0;
5260 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
5261 if ( ! b )
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;
5270 b->yy_at_bol = 1;
5271 b->yy_fill_buffer = 0;
5272 b->yy_buffer_status = YY_BUFFER_NEW;
5274 yy_switch_to_buffer( b );
5276 return b;
5278 #endif
5281 #ifndef YY_NO_SCAN_STRING
5282 #ifdef YY_USE_PROTOS
5283 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
5284 #else
5285 YY_BUFFER_STATE yy_scan_string( yy_str )
5286 yyconst char *yy_str;
5287 #endif
5289 int len;
5290 for ( len = 0; yy_str[len]; ++len )
5293 return yy_scan_bytes( yy_str, len );
5295 #endif
5298 #ifndef YY_NO_SCAN_BYTES
5299 #ifdef YY_USE_PROTOS
5300 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
5301 #else
5302 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
5303 yyconst char *bytes;
5304 int len;
5305 #endif
5307 YY_BUFFER_STATE b;
5308 char *buf;
5309 yy_size_t n;
5310 int i;
5312 /* Get memory for full buffer, including space for trailing EOB's. */
5313 n = len + 2;
5314 buf = (char *) yy_flex_alloc( n );
5315 if ( ! buf )
5316 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
5318 for ( i = 0; i < len; ++i )
5319 buf[i] = bytes[i];
5321 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
5323 b = yy_scan_buffer( buf, n );
5324 if ( ! b )
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;
5332 return b;
5334 #endif
5337 #ifndef YY_NO_PUSH_STATE
5338 #ifdef YY_USE_PROTOS
5339 static void yy_push_state( int new_state )
5340 #else
5341 static void yy_push_state( new_state )
5342 int new_state;
5343 #endif
5345 if ( yy_start_stack_ptr >= yy_start_stack_depth )
5347 yy_size_t new_size;
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 );
5355 else
5356 yy_start_stack = (int *) yy_flex_realloc(
5357 (void *) yy_start_stack, new_size );
5359 if ( ! yy_start_stack )
5360 YY_FATAL_ERROR(
5361 "out of memory expanding start-condition stack" );
5364 yy_start_stack[yy_start_stack_ptr++] = YY_START;
5366 BEGIN(new_state);
5368 #endif
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]);
5379 #endif
5382 #ifndef YY_NO_TOP_STATE
5383 static int yy_top_state()
5385 return yy_start_stack[yy_start_stack_ptr - 1];
5387 #endif
5389 #ifndef YY_EXIT_FAILURE
5390 #define YY_EXIT_FAILURE 2
5391 #endif
5393 #ifdef YY_USE_PROTOS
5394 static void yy_fatal_error( yyconst char msg[] )
5395 #else
5396 static void yy_fatal_error( msg )
5397 char msg[];
5398 #endif
5400 (void) fprintf( stderr, "%s\n", msg );
5401 exit( YY_EXIT_FAILURE );
5406 /* Redefine yyless() so it works in section 3 code. */
5408 #undef yyless
5409 #define yyless(n) \
5410 do \
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'; \
5417 yyleng = n; \
5419 while ( 0 )
5422 /* Internal utility routines. */
5424 #ifndef yytext_ptr
5425 #ifdef YY_USE_PROTOS
5426 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
5427 #else
5428 static void yy_flex_strncpy( s1, s2, n )
5429 char *s1;
5430 yyconst char *s2;
5431 int n;
5432 #endif
5434 register int i;
5435 for ( i = 0; i < n; ++i )
5436 s1[i] = s2[i];
5438 #endif
5440 #ifdef YY_NEED_STRLEN
5441 #ifdef YY_USE_PROTOS
5442 static int yy_flex_strlen( yyconst char *s )
5443 #else
5444 static int yy_flex_strlen( s )
5445 yyconst char *s;
5446 #endif
5448 register int n;
5449 for ( n = 0; s[n]; ++n )
5452 return n;
5454 #endif
5457 #ifdef YY_USE_PROTOS
5458 static void *yy_flex_alloc( yy_size_t size )
5459 #else
5460 static void *yy_flex_alloc( size )
5461 yy_size_t size;
5462 #endif
5464 return (void *) malloc( size );
5467 #ifdef YY_USE_PROTOS
5468 static void *yy_flex_realloc( void *ptr, yy_size_t size )
5469 #else
5470 static void *yy_flex_realloc( ptr, size )
5471 void *ptr;
5472 yy_size_t size;
5473 #endif
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 )
5487 #else
5488 static void yy_flex_free( ptr )
5489 void *ptr;
5490 #endif
5492 free( ptr );
5495 #if YY_MAIN
5496 int main()
5498 yylex();
5499 return 0;
5501 #endif
5502 #line 280 "chuck.lex"
5506 // comment
5507 int comment()
5509 char c;
5511 while ((c = yyinput()) != '\n' && c != '\r' && c != 0 && c != EOF );
5513 if (c != 0) {
5514 adjust();
5515 if (c == '\n') EM_newline();
5518 return 0;
5521 // block comment
5522 int block_comment()
5524 char c, c1;
5526 loop:
5527 while ((c = yyinput()) != '*' && c != 0 && c != EOF )
5528 if( c == '\n' ) EM_newline();
5530 if( c == EOF )
5532 adjust();
5533 return 1;
5536 if( (c1 = yyinput()) != '/' && c != 0 )
5538 unput(c1);
5539 goto loop;
5542 if( c != 0 ) adjust();
5544 return 0;