LMMS
Loading...
Searching...
No Matches
y.tab.c
Go to the documentation of this file.
1/* A Bison parser, made by GNU Bison 2.3. */
2
3/* Skeleton implementation for Bison's Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
7
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.
12
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.
17
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. */
22
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.
32
33 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
35
36/* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
38
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. */
45
46/* Identify Bison output. */
47#define YYBISON 1
48
49/* Bison version. */
50#define YYBISON_VERSION "2.3"
51
52/* Skeleton name. */
53#define YYSKELETON_NAME "yacc.c"
54
55/* Pure parsers. */
56#define YYPURE 1
57
58/* Using locations. */
59#define YYLSP_NEEDED 1
60
61/* Substitute the variable and function names. */
62#define yyparse nseelparse
63#define yylex nseellex
64#define yyerror nseelerror
65#define yylval nseellval
66#define yychar nseelchar
67#define yydebug nseeldebug
68#define yynerrs nseelnerrs
69#define yylloc nseellloc
70
71/* Tokens. */
72#ifndef YYTOKENTYPE
73# define YYTOKENTYPE
74 /* Put the tokens into the symbol table, so that GDB and other debuggers
75 know about them. */
101#endif
102/* Tokens. */
103#define VALUE 258
104#define IDENTIFIER 259
105#define TOKEN_SHL 260
106#define TOKEN_SHR 261
107#define TOKEN_LTE 262
108#define TOKEN_GTE 263
109#define TOKEN_EQ 264
110#define TOKEN_EQ_EXACT 265
111#define TOKEN_NE 266
112#define TOKEN_NE_EXACT 267
113#define TOKEN_LOGICAL_AND 268
114#define TOKEN_LOGICAL_OR 269
115#define TOKEN_ADD_OP 270
116#define TOKEN_SUB_OP 271
117#define TOKEN_MOD_OP 272
118#define TOKEN_OR_OP 273
119#define TOKEN_AND_OP 274
120#define TOKEN_XOR_OP 275
121#define TOKEN_DIV_OP 276
122#define TOKEN_MUL_OP 277
123#define TOKEN_POW_OP 278
124#define STRING_LITERAL 279
125#define STRING_IDENTIFIER 280
126
127
128
129
130/* Copy the first part of user declarations. */
131#line 13 "eel2.y"
132
133#ifdef _WIN32
134#include <windows.h>
135#endif
136#include <stdlib.h>
137#include <stdio.h>
138#include <string.h>
139#include <math.h>
140
141#include "y.tab.h"
142#include "ns-eel-int.h"
143
144#define scanner context->scanner
145#define YY_(x) ("")
146
147
148
149/* Enabling traces. */
150#ifndef YYDEBUG
151# define YYDEBUG 0
152#endif
153
154/* Enabling verbose error messages. */
155#ifdef YYERROR_VERBOSE
156# undef YYERROR_VERBOSE
157# define YYERROR_VERBOSE 1
158#else
159# define YYERROR_VERBOSE 0
160#endif
161
162/* Enabling the token table. */
163#ifndef YYTOKEN_TABLE
164# define YYTOKEN_TABLE 0
165#endif
166
167#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
168typedef int YYSTYPE;
169# define yystype YYSTYPE /* obsolescent; will be withdrawn */
170# define YYSTYPE_IS_DECLARED 1
171# define YYSTYPE_IS_TRIVIAL 1
172#endif
173
174#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
175typedef struct YYLTYPE
176{
177 int first_line;
178 int first_column;
179 int last_line;
180 int last_column;
181} YYLTYPE;
182# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
183# define YYLTYPE_IS_DECLARED 1
184# define YYLTYPE_IS_TRIVIAL 1
185#endif
186
187
188/* Copy the second part of user declarations. */
189
190
191/* Line 216 of yacc.c. */
192#line 193 "y.tab.c"
193
194#ifdef short
195# undef short
196#endif
197
198#ifdef YYTYPE_UINT8
199typedef YYTYPE_UINT8 yytype_uint8;
200#else
201typedef unsigned char yytype_uint8;
202#endif
203
204#ifdef YYTYPE_INT8
205typedef YYTYPE_INT8 yytype_int8;
206#elif (defined __STDC__ || defined __C99__FUNC__ \
207 || defined __cplusplus || defined _MSC_VER)
208typedef signed char yytype_int8;
209#else
210typedef short int yytype_int8;
211#endif
212
213#ifdef YYTYPE_UINT16
214typedef YYTYPE_UINT16 yytype_uint16;
215#else
216typedef unsigned short int yytype_uint16;
217#endif
218
219#ifdef YYTYPE_INT16
220typedef YYTYPE_INT16 yytype_int16;
221#else
222typedef short int yytype_int16;
223#endif
224
225#ifndef YYSIZE_T
226# ifdef __SIZE_TYPE__
227# define YYSIZE_T __SIZE_TYPE__
228# elif defined size_t
229# define YYSIZE_T size_t
230# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
231 || defined __cplusplus || defined _MSC_VER)
232# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
233# define YYSIZE_T size_t
234# else
235# define YYSIZE_T unsigned int
236# endif
237#endif
238
239#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
240
241#ifndef YY_
242# if defined YYENABLE_NLS && YYENABLE_NLS
243# if ENABLE_NLS
244# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
245# define YY_(msgid) dgettext ("bison-runtime", msgid)
246# endif
247# endif
248# ifndef YY_
249# define YY_(msgid) msgid
250# endif
251#endif
252
253/* Suppress unused-variable warnings by "using" E. */
254#if ! defined lint || defined __GNUC__
255# define YYUSE(e) ((void) (e))
256#else
257# define YYUSE(e) /* empty */
258#endif
259
260/* Identity function, used to suppress warnings about constant conditions. */
261#ifndef lint
262# define YYID(n) (n)
263#else
264#if (defined __STDC__ || defined __C99__FUNC__ \
265 || defined __cplusplus || defined _MSC_VER)
266static int
267YYID (int i)
268#else
269static int
270YYID (i)
271 int i;
272#endif
273{
274 return i;
275}
276#endif
277
278#if ! defined yyoverflow || YYERROR_VERBOSE
279
280/* The parser invokes alloca or malloc; define the necessary symbols. */
281
282# ifdef YYSTACK_USE_ALLOCA
283# if YYSTACK_USE_ALLOCA
284# ifdef __GNUC__
285# define YYSTACK_ALLOC __builtin_alloca
286# elif defined __BUILTIN_VA_ARG_INCR
287# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
288# elif defined _AIX
289# define YYSTACK_ALLOC __alloca
290# elif defined _MSC_VER
291# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
292# define alloca _alloca
293# else
294# define YYSTACK_ALLOC alloca
295# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
296 || defined __cplusplus || defined _MSC_VER)
297# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
298# ifndef _STDLIB_H
299# define _STDLIB_H 1
300# endif
301# endif
302# endif
303# endif
304# endif
305
306# ifdef YYSTACK_ALLOC
307 /* Pacify GCC's `empty if-body' warning. */
308# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
309# ifndef YYSTACK_ALLOC_MAXIMUM
310 /* The OS might guarantee only one guard page at the bottom of the stack,
311 and a page size can be as small as 4096 bytes. So we cannot safely
312 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
313 to allow for a few compiler-allocated temporary stack slots. */
314# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
315# endif
316# else
317# define YYSTACK_ALLOC YYMALLOC
318# define YYSTACK_FREE YYFREE
319# ifndef YYSTACK_ALLOC_MAXIMUM
320# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
321# endif
322# if (defined __cplusplus && ! defined _STDLIB_H \
323 && ! ((defined YYMALLOC || defined malloc) \
324 && (defined YYFREE || defined free)))
325# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
326# ifndef _STDLIB_H
327# define _STDLIB_H 1
328# endif
329# endif
330# ifndef YYMALLOC
331# define YYMALLOC malloc
332# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
333 || defined __cplusplus || defined _MSC_VER)
334void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
335# endif
336# endif
337# ifndef YYFREE
338# define YYFREE free
339# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
340 || defined __cplusplus || defined _MSC_VER)
341void free (void *); /* INFRINGES ON USER NAME SPACE */
342# endif
343# endif
344# endif
345#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
346
347
348#if (! defined yyoverflow \
349 && (! defined __cplusplus \
350 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
351 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
352
353/* A type that is properly aligned for any stack member. */
360
361/* The size of the maximum gap between one aligned stack and the next. */
362# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
363
364/* The size of an array large to enough to hold all stacks, each with
365 N elements. */
366# define YYSTACK_BYTES(N) \
367 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
368 + 2 * YYSTACK_GAP_MAXIMUM)
369
370/* Copy COUNT objects from FROM to TO. The source and destination do
371 not overlap. */
372# ifndef YYCOPY
373# if defined __GNUC__ && 1 < __GNUC__
374# define YYCOPY(To, From, Count) \
375 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
376# else
377# define YYCOPY(To, From, Count) \
378 do \
379 { \
380 YYSIZE_T yyi; \
381 for (yyi = 0; yyi < (Count); yyi++) \
382 (To)[yyi] = (From)[yyi]; \
383 } \
384 while (YYID (0))
385# endif
386# endif
387
388/* Relocate STACK from its old location to the new one. The
389 local variables YYSIZE and YYSTACKSIZE give the old and new number of
390 elements in the stack, and YYPTR gives the new location of the
391 stack. Advance YYPTR to a properly aligned location for the next
392 stack. */
393# define YYSTACK_RELOCATE(Stack) \
394 do \
395 { \
396 YYSIZE_T yynewbytes; \
397 YYCOPY (&yyptr->Stack, Stack, yysize); \
398 Stack = &yyptr->Stack; \
399 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
400 yyptr += yynewbytes / sizeof (*yyptr); \
401 } \
402 while (YYID (0))
403
404#endif
405
406/* YYFINAL -- State number of the termination state. */
407#define YYFINAL 68
408/* YYLAST -- Last index in YYTABLE. */
409#define YYLAST 141
410
411/* YYNTOKENS -- Number of terminals. */
412#define YYNTOKENS 47
413/* YYNNTS -- Number of nonterminals. */
414#define YYNNTS 19
415/* YYNRULES -- Number of rules. */
416#define YYNRULES 73
417/* YYNRULES -- Number of states. */
418#define YYNSTATES 127
419
420/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
421#define YYUNDEFTOK 2
422#define YYMAXUTOK 280
423
424#define YYTRANSLATE(YYX) \
425 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
426
427/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
428static const yytype_uint8 yytranslate[] =
429{
430 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
431 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
432 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
433 2, 2, 2, 34, 2, 2, 2, 36, 39, 2,
434 27, 28, 38, 32, 26, 33, 2, 37, 2, 2,
435 2, 2, 2, 2, 2, 2, 2, 2, 45, 46,
436 42, 31, 43, 44, 2, 2, 2, 2, 2, 2,
437 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439 2, 29, 2, 30, 35, 2, 2, 2, 2, 2,
440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
442 2, 2, 2, 2, 40, 2, 41, 2, 2, 2,
443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
455 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
456 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
457 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
458 25
459};
460
461#if YYDEBUG
462/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
463 YYRHS. */
464static const yytype_uint16 yyprhs[] =
465{
466 0, 0, 3, 5, 9, 11, 14, 16, 20, 28,
467 33, 37, 44, 53, 57, 62, 64, 66, 68, 70,
468 72, 76, 80, 84, 88, 92, 96, 100, 104, 108,
469 112, 116, 120, 122, 125, 128, 131, 133, 137, 139,
470 143, 147, 151, 153, 157, 159, 163, 165, 169, 171,
471 175, 177, 181, 185, 189, 191, 195, 199, 203, 207,
472 211, 215, 219, 223, 225, 229, 233, 235, 241, 246,
473 250, 252, 256, 259
474};
475
476/* YYRHS -- A `-1'-separated list of the rules' RHS. */
477static const yytype_int8 yyrhs[] =
478{
479 65, 0, -1, 64, -1, 64, 26, 48, -1, 24,
480 -1, 24, 49, -1, 4, -1, 27, 64, 28, -1,
481 4, 27, 64, 28, 27, 64, 28, -1, 4, 27,
482 64, 28, -1, 4, 27, 28, -1, 4, 27, 64,
483 26, 64, 28, -1, 4, 27, 64, 26, 64, 26,
484 48, 28, -1, 51, 29, 30, -1, 51, 29, 64,
485 30, -1, 3, -1, 25, -1, 49, -1, 50, -1,
486 51, -1, 50, 31, 63, -1, 50, 15, 63, -1,
487 50, 16, 63, -1, 50, 17, 63, -1, 50, 18,
488 63, -1, 50, 19, 63, -1, 50, 20, 63, -1,
489 50, 21, 63, -1, 50, 22, 63, -1, 50, 23,
490 63, -1, 25, 31, 63, -1, 25, 15, 63, -1,
491 52, -1, 32, 53, -1, 33, 53, -1, 34, 53,
492 -1, 53, -1, 54, 35, 53, -1, 54, -1, 55,
493 36, 54, -1, 55, 5, 54, -1, 55, 6, 54,
494 -1, 55, -1, 56, 37, 55, -1, 56, -1, 57,
495 38, 56, -1, 57, -1, 58, 33, 57, -1, 58,
496 -1, 59, 32, 58, -1, 59, -1, 60, 39, 59,
497 -1, 60, 40, 59, -1, 60, 41, 59, -1, 60,
498 -1, 61, 42, 60, -1, 61, 43, 60, -1, 61,
499 7, 60, -1, 61, 8, 60, -1, 61, 9, 60,
500 -1, 61, 10, 60, -1, 61, 11, 60, -1, 61,
501 12, 60, -1, 61, -1, 62, 13, 61, -1, 62,
502 14, 61, -1, 62, -1, 62, 44, 63, 45, 63,
503 -1, 62, 44, 45, 63, -1, 62, 44, 63, -1,
504 63, -1, 64, 46, 63, -1, 64, 46, -1, 64,
505 -1
506};
507
508/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
509static const yytype_uint16 yyrline[] =
510{
511 0, 40, 40, 41, 48, 49, 57, 67, 71, 83,
512 93, 103, 114, 126, 130, 137, 138, 139, 143, 148,
513 149, 153, 157, 161, 165, 169, 173, 177, 181, 185,
514 189, 193, 200, 201, 205, 209, 216, 217, 224, 225,
515 229, 233, 240, 241, 249, 250, 258, 259, 266, 267,
516 274, 275, 279, 283, 290, 291, 295, 299, 303, 307,
517 311, 315, 319, 326, 327, 331, 338, 339, 343, 347,
518 355, 356, 360, 368
519};
520#endif
521
522#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
523/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
524 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
525static const char *const yytname[] =
526{
527 "$end", "error", "$undefined", "VALUE", "IDENTIFIER", "TOKEN_SHL",
528 "TOKEN_SHR", "TOKEN_LTE", "TOKEN_GTE", "TOKEN_EQ", "TOKEN_EQ_EXACT",
529 "TOKEN_NE", "TOKEN_NE_EXACT", "TOKEN_LOGICAL_AND", "TOKEN_LOGICAL_OR",
530 "TOKEN_ADD_OP", "TOKEN_SUB_OP", "TOKEN_MOD_OP", "TOKEN_OR_OP",
531 "TOKEN_AND_OP", "TOKEN_XOR_OP", "TOKEN_DIV_OP", "TOKEN_MUL_OP",
532 "TOKEN_POW_OP", "STRING_LITERAL", "STRING_IDENTIFIER", "','", "'('",
533 "')'", "'['", "']'", "'='", "'+'", "'-'", "'!'", "'^'", "'%'", "'/'",
534 "'*'", "'&'", "'|'", "'~'", "'<'", "'>'", "'?'", "':'", "';'", "$accept",
535 "more_params", "string", "assignable_value", "rvalue", "assignment",
536 "unary_expr", "pow_expr", "mod_expr", "div_expr", "mul_expr", "sub_expr",
537 "add_expr", "andor_expr", "cmp_expr", "logical_and_or_expr",
538 "if_else_expr", "expression", "program", 0
539};
540#endif
541
542# ifdef YYPRINT
543/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
544 token YYLEX-NUM. */
545static const yytype_uint16 yytoknum[] =
546{
547 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
548 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
549 275, 276, 277, 278, 279, 280, 44, 40, 41, 91,
550 93, 61, 43, 45, 33, 94, 37, 47, 42, 38,
551 124, 126, 60, 62, 63, 58, 59
552};
553# endif
554
555/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
556static const yytype_uint8 yyr1[] =
557{
558 0, 47, 48, 48, 49, 49, 50, 50, 50, 50,
559 50, 50, 50, 50, 50, 51, 51, 51, 51, 52,
560 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
561 52, 52, 53, 53, 53, 53, 54, 54, 55, 55,
562 55, 55, 56, 56, 57, 57, 58, 58, 59, 59,
563 60, 60, 60, 60, 61, 61, 61, 61, 61, 61,
564 61, 61, 61, 62, 62, 62, 63, 63, 63, 63,
565 64, 64, 64, 65
566};
567
568/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
569static const yytype_uint8 yyr2[] =
570{
571 0, 2, 1, 3, 1, 2, 1, 3, 7, 4,
572 3, 6, 8, 3, 4, 1, 1, 1, 1, 1,
573 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
574 3, 3, 1, 2, 2, 2, 1, 3, 1, 3,
575 3, 3, 1, 3, 1, 3, 1, 3, 1, 3,
576 1, 3, 3, 3, 1, 3, 3, 3, 3, 3,
577 3, 3, 3, 1, 3, 3, 1, 5, 4, 3,
578 1, 3, 2, 1
579};
580
581/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
582 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
583 means the default is an error. */
584static const yytype_uint8 yydefact[] =
585{
586 0, 15, 6, 4, 16, 0, 0, 0, 0, 17,
587 18, 19, 32, 36, 38, 42, 44, 46, 48, 50,
588 54, 63, 66, 70, 73, 0, 0, 5, 0, 0,
589 0, 33, 34, 35, 0, 0, 0, 0, 0, 0,
590 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
591 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
592 0, 0, 0, 0, 0, 0, 0, 72, 1, 10,
593 0, 31, 30, 7, 21, 22, 23, 24, 25, 26,
594 27, 28, 29, 20, 13, 0, 37, 40, 41, 39,
595 43, 45, 47, 49, 51, 52, 53, 57, 58, 59,
596 60, 61, 62, 55, 56, 64, 65, 0, 69, 71,
597 0, 9, 14, 68, 0, 0, 0, 67, 0, 11,
598 0, 0, 2, 8, 12, 0, 3
599};
600
601/* YYDEFGOTO[NTERM-NUM]. */
602static const yytype_int8 yydefgoto[] =
603{
604 -1, 121, 9, 10, 11, 12, 13, 14, 15, 16,
605 17, 18, 19, 20, 21, 22, 23, 122, 25
606};
607
608/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
609 STATE-NUM. */
610#define YYPACT_NINF -38
611static const yytype_int8 yypact[] =
612{
613 70, -38, -21, 12, -11, 70, 70, 70, 70, -38,
614 102, 6, -38, -38, 50, 19, 4, 8, 14, 25,
615 51, 22, 40, -38, 47, 96, 34, -38, 70, 70,
616 43, -38, -38, -38, 70, 70, 70, 70, 70, 70,
617 70, 70, 70, 70, 45, 70, 70, 70, 70, 70,
618 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
619 70, 70, 70, 70, 70, 70, 18, 70, -38, -38,
620 55, -38, -38, -38, -38, -38, -38, -38, -38, -38,
621 -38, -38, -38, -38, -38, 30, -38, 50, 50, 50,
622 19, 4, 8, 14, 25, 25, 25, 51, 51, 51,
623 51, 51, 51, 51, 51, 22, 22, 70, 53, -38,
624 70, 72, -38, -38, 70, 60, 70, -38, 70, -38,
625 54, 77, -23, -38, -38, 70, -38
626};
627
628/* YYPGOTO[NTERM-NUM]. */
629static const yytype_int8 yypgoto[] =
630{
631 -38, -10, 111, -38, -38, -38, 11, 61, 79, 76,
632 80, 75, 58, 78, -37, -38, -27, 0, -38
633};
634
635/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
636 positive, shift that token. If negative, reduce the rule which
637 number is the opposite. If zero, do what YYDEFACT says.
638 If YYTABLE_NINF, syntax error. */
639#define YYTABLE_NINF -1
640static const yytype_uint8 yytable[] =
641{
642 24, 71, 72, 125, 28, 30, 26, 74, 75, 76,
643 77, 78, 79, 80, 81, 82, 83, 31, 32, 33,
644 29, 1, 2, 67, 46, 47, 70, 105, 106, 56,
645 57, 58, 59, 60, 61, 44, 3, 1, 2, 108,
646 109, 49, 3, 4, 85, 5, 50, 51, 1, 2,
647 6, 7, 8, 64, 65, 48, 86, 52, 3, 4,
648 112, 5, 69, 107, 62, 63, 6, 7, 8, 3,
649 4, 73, 5, 1, 2, 84, 67, 6, 7, 8,
650 113, 110, 123, 111, 66, 45, 118, 117, 119, 67,
651 53, 54, 55, 67, 3, 4, 68, 5, 114, 116,
652 67, 67, 6, 7, 8, 124, 67, 87, 88, 89,
653 115, 94, 95, 96, 27, 126, 120, 34, 35, 36,
654 37, 38, 39, 40, 41, 42, 91, 93, 90, 0,
655 0, 92, 0, 43, 97, 98, 99, 100, 101, 102,
656 103, 104
657};
658
659static const yytype_int8 yycheck[] =
660{
661 0, 28, 29, 26, 15, 5, 27, 34, 35, 36,
662 37, 38, 39, 40, 41, 42, 43, 6, 7, 8,
663 31, 3, 4, 46, 5, 6, 26, 64, 65, 7,
664 8, 9, 10, 11, 12, 29, 24, 3, 4, 66,
665 67, 37, 24, 25, 44, 27, 38, 33, 3, 4,
666 32, 33, 34, 13, 14, 36, 45, 32, 24, 25,
667 30, 27, 28, 45, 42, 43, 32, 33, 34, 24,
668 25, 28, 27, 3, 4, 30, 46, 32, 33, 34,
669 107, 26, 28, 28, 44, 35, 26, 114, 28, 46,
670 39, 40, 41, 46, 24, 25, 0, 27, 45, 27,
671 46, 46, 32, 33, 34, 28, 46, 46, 47, 48,
672 110, 53, 54, 55, 3, 125, 116, 15, 16, 17,
673 18, 19, 20, 21, 22, 23, 50, 52, 49, -1,
674 -1, 51, -1, 31, 56, 57, 58, 59, 60, 61,
675 62, 63
676};
677
678/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
679 symbol of state STATE-NUM. */
680static const yytype_uint8 yystos[] =
681{
682 0, 3, 4, 24, 25, 27, 32, 33, 34, 49,
683 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
684 60, 61, 62, 63, 64, 65, 27, 49, 15, 31,
685 64, 53, 53, 53, 15, 16, 17, 18, 19, 20,
686 21, 22, 23, 31, 29, 35, 5, 6, 36, 37,
687 38, 33, 32, 39, 40, 41, 7, 8, 9, 10,
688 11, 12, 42, 43, 13, 14, 44, 46, 0, 28,
689 64, 63, 63, 28, 63, 63, 63, 63, 63, 63,
690 63, 63, 63, 63, 30, 64, 53, 54, 54, 54,
691 55, 56, 57, 58, 59, 59, 59, 60, 60, 60,
692 60, 60, 60, 60, 60, 61, 61, 45, 63, 63,
693 26, 28, 30, 63, 45, 64, 27, 63, 26, 28,
694 64, 48, 64, 28, 28, 26, 48
695};
696
697#define yyerrok (yyerrstatus = 0)
698#define yyclearin (yychar = YYEMPTY)
699#define YYEMPTY (-2)
700#define YYEOF 0
701
702#define YYACCEPT goto yyacceptlab
703#define YYABORT goto yyabortlab
704#define YYERROR goto yyerrorlab
705
706
707/* Like YYERROR except do call yyerror. This remains here temporarily
708 to ease the transition to the new meaning of YYERROR, for GCC.
709 Once GCC version 2 has supplanted version 1, this can go. */
710
711#define YYFAIL goto yyerrlab
712
713#define YYRECOVERING() (!!yyerrstatus)
714
715#define YYBACKUP(Token, Value) \
716do \
717 if (yychar == YYEMPTY && yylen == 1) \
718 { \
719 yychar = (Token); \
720 yylval = (Value); \
721 yytoken = YYTRANSLATE (yychar); \
722 YYPOPSTACK (1); \
723 goto yybackup; \
724 } \
725 else \
726 { \
727 yyerror (&yylloc, context, YY_("syntax error: cannot back up")); \
728 YYERROR; \
729 } \
730while (YYID (0))
731
732
733#define YYTERROR 1
734#define YYERRCODE 256
735
736
737/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
738 If N is 0, then set CURRENT to the empty location which ends
739 the previous symbol: RHS[0] (always defined). */
740
741#define YYRHSLOC(Rhs, K) ((Rhs)[K])
742#ifndef YYLLOC_DEFAULT
743# define YYLLOC_DEFAULT(Current, Rhs, N) \
744 do \
745 if (YYID (N)) \
746 { \
747 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
748 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
749 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
750 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
751 } \
752 else \
753 { \
754 (Current).first_line = (Current).last_line = \
755 YYRHSLOC (Rhs, 0).last_line; \
756 (Current).first_column = (Current).last_column = \
757 YYRHSLOC (Rhs, 0).last_column; \
758 } \
759 while (YYID (0))
760#endif
761
762
763/* YY_LOCATION_PRINT -- Print the location on the stream.
764 This macro was not mandated originally: define only if we know
765 we won't break user code: when these are the locations we know. */
766
767#ifndef YY_LOCATION_PRINT
768# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
769# define YY_LOCATION_PRINT(File, Loc) \
770 fprintf (File, "%d.%d-%d.%d", \
771 (Loc).first_line, (Loc).first_column, \
772 (Loc).last_line, (Loc).last_column)
773# else
774# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
775# endif
776#endif
777
778
779/* YYLEX -- calling `yylex' with the right arguments. */
780
781#ifdef YYLEX_PARAM
782# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
783#else
784# define YYLEX yylex (&yylval, &yylloc, scanner)
785#endif
786
787/* Enable debugging if requested. */
788#if YYDEBUG
789
790# ifndef YYFPRINTF
791# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
792# define YYFPRINTF fprintf
793# endif
794
795# define YYDPRINTF(Args) \
796do { \
797 if (yydebug) \
798 YYFPRINTF Args; \
799} while (YYID (0))
800
801# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
802do { \
803 if (yydebug) \
804 { \
805 YYFPRINTF (stderr, "%s ", Title); \
806 yy_symbol_print (stderr, \
807 Type, Value, Location, context); \
808 YYFPRINTF (stderr, "\n"); \
809 } \
810} while (YYID (0))
811
812
813/*--------------------------------.
814| Print this symbol on YYOUTPUT. |
815`--------------------------------*/
816
817/*ARGSUSED*/
818#if (defined __STDC__ || defined __C99__FUNC__ \
819 || defined __cplusplus || defined _MSC_VER)
820static void
821yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, compileContext* context)
822#else
823static void
824yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context)
825 FILE *yyoutput;
826 int yytype;
827 YYSTYPE const * const yyvaluep;
828 YYLTYPE const * const yylocationp;
829 compileContext* context;
830#endif
831{
832 if (!yyvaluep)
833 return;
834 YYUSE (yylocationp);
835 YYUSE (context);
836# ifdef YYPRINT
837 if (yytype < YYNTOKENS)
838 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
839# else
840 YYUSE (yyoutput);
841# endif
842 switch (yytype)
843 {
844 default:
845 break;
846 }
847}
848
849
850/*--------------------------------.
851| Print this symbol on YYOUTPUT. |
852`--------------------------------*/
853
854#if (defined __STDC__ || defined __C99__FUNC__ \
855 || defined __cplusplus || defined _MSC_VER)
856static void
857yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, compileContext* context)
858#else
859static void
860yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, context)
861 FILE *yyoutput;
862 int yytype;
863 YYSTYPE const * const yyvaluep;
864 YYLTYPE const * const yylocationp;
865 compileContext* context;
866#endif
867{
868 if (yytype < YYNTOKENS)
869 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
870 else
871 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
872
873 YY_LOCATION_PRINT (yyoutput, *yylocationp);
874 YYFPRINTF (yyoutput, ": ");
875 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, context);
876 YYFPRINTF (yyoutput, ")");
877}
878
879/*------------------------------------------------------------------.
880| yy_stack_print -- Print the state stack from its BOTTOM up to its |
881| TOP (included). |
882`------------------------------------------------------------------*/
883
884#if (defined __STDC__ || defined __C99__FUNC__ \
885 || defined __cplusplus || defined _MSC_VER)
886static void
887yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
888#else
889static void
890yy_stack_print (bottom, top)
891 yytype_int16 *bottom;
892 yytype_int16 *top;
893#endif
894{
895 YYFPRINTF (stderr, "Stack now");
896 for (; bottom <= top; ++bottom)
897 YYFPRINTF (stderr, " %d", *bottom);
898 YYFPRINTF (stderr, "\n");
899}
900
901# define YY_STACK_PRINT(Bottom, Top) \
902do { \
903 if (yydebug) \
904 yy_stack_print ((Bottom), (Top)); \
905} while (YYID (0))
906
907
908/*------------------------------------------------.
909| Report that the YYRULE is going to be reduced. |
910`------------------------------------------------*/
911
912#if (defined __STDC__ || defined __C99__FUNC__ \
913 || defined __cplusplus || defined _MSC_VER)
914static void
915yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, compileContext* context)
916#else
917static void
918yy_reduce_print (yyvsp, yylsp, yyrule, context)
919 YYSTYPE *yyvsp;
920 YYLTYPE *yylsp;
921 int yyrule;
922 compileContext* context;
923#endif
924{
925 int yynrhs = yyr2[yyrule];
926 int yyi;
927 unsigned long int yylno = yyrline[yyrule];
928 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
929 yyrule - 1, yylno);
930 /* The symbols being reduced. */
931 for (yyi = 0; yyi < yynrhs; yyi++)
932 {
933 fprintf (stderr, " $%d = ", yyi + 1);
934 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
935 &(yyvsp[(yyi + 1) - (yynrhs)])
936 , &(yylsp[(yyi + 1) - (yynrhs)]) , context);
937 fprintf (stderr, "\n");
938 }
939}
940
941# define YY_REDUCE_PRINT(Rule) \
942do { \
943 if (yydebug) \
944 yy_reduce_print (yyvsp, yylsp, Rule, context); \
945} while (YYID (0))
946
947/* Nonzero means print parse trace. It is left uninitialized so that
948 multiple parsers can coexist. */
949int yydebug;
950#else /* !YYDEBUG */
951# define YYDPRINTF(Args)
952# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
953# define YY_STACK_PRINT(Bottom, Top)
954# define YY_REDUCE_PRINT(Rule)
955#endif /* !YYDEBUG */
956
957
958/* YYINITDEPTH -- initial size of the parser's stacks. */
959#ifndef YYINITDEPTH
960# define YYINITDEPTH 200
961#endif
962
963/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
964 if the built-in stack extension method is used).
965
966 Do not make this value too large; the results are undefined if
967 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
968 evaluated with infinite-precision integer arithmetic. */
969
970#ifndef YYMAXDEPTH
971# define YYMAXDEPTH 10000
972#endif
973
974
975
976#if YYERROR_VERBOSE
977
978# ifndef yystrlen
979# if defined __GLIBC__ && defined _STRING_H
980# define yystrlen strlen
981# else
982/* Return the length of YYSTR. */
983#if (defined __STDC__ || defined __C99__FUNC__ \
984 || defined __cplusplus || defined _MSC_VER)
985static YYSIZE_T
986yystrlen (const char *yystr)
987#else
988static YYSIZE_T
989yystrlen (yystr)
990 const char *yystr;
991#endif
992{
993 YYSIZE_T yylen;
994 for (yylen = 0; yystr[yylen]; yylen++)
995 continue;
996 return yylen;
997}
998# endif
999# endif
1000
1001# ifndef yystpcpy
1002# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1003# define yystpcpy stpcpy
1004# else
1005/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1006 YYDEST. */
1007#if (defined __STDC__ || defined __C99__FUNC__ \
1008 || defined __cplusplus || defined _MSC_VER)
1009static char *
1010yystpcpy (char *yydest, const char *yysrc)
1011#else
1012static char *
1013yystpcpy (yydest, yysrc)
1014 char *yydest;
1015 const char *yysrc;
1016#endif
1017{
1018 char *yyd = yydest;
1019 const char *yys = yysrc;
1020
1021 while ((*yyd++ = *yys++) != '\0')
1022 continue;
1023
1024 return yyd - 1;
1025}
1026# endif
1027# endif
1028
1029# ifndef yytnamerr
1030/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1031 quotes and backslashes, so that it's suitable for yyerror. The
1032 heuristic is that double-quoting is unnecessary unless the string
1033 contains an apostrophe, a comma, or backslash (other than
1034 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1035 null, do not copy; instead, return the length of what the result
1036 would have been. */
1037static YYSIZE_T
1038yytnamerr (char *yyres, const char *yystr)
1039{
1040 if (*yystr == '"')
1041 {
1042 YYSIZE_T yyn = 0;
1043 char const *yyp = yystr;
1044
1045 for (;;)
1046 switch (*++yyp)
1047 {
1048 case '\'':
1049 case ',':
1050 goto do_not_strip_quotes;
1051
1052 case '\\':
1053 if (*++yyp != '\\')
1054 goto do_not_strip_quotes;
1055 /* Fall through. */
1056 default:
1057 if (yyres)
1058 yyres[yyn] = *yyp;
1059 yyn++;
1060 break;
1061
1062 case '"':
1063 if (yyres)
1064 yyres[yyn] = '\0';
1065 return yyn;
1066 }
1067 do_not_strip_quotes: ;
1068 }
1069
1070 if (! yyres)
1071 return yystrlen (yystr);
1072
1073 return yystpcpy (yyres, yystr) - yyres;
1074}
1075# endif
1076
1077/* Copy into YYRESULT an error message about the unexpected token
1078 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1079 including the terminating null byte. If YYRESULT is null, do not
1080 copy anything; just return the number of bytes that would be
1081 copied. As a special case, return 0 if an ordinary "syntax error"
1082 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1083 size calculation. */
1084static YYSIZE_T
1085yysyntax_error (char *yyresult, int yystate, int yychar)
1086{
1087 int yyn = yypact[yystate];
1088
1089 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1090 return 0;
1091 else
1092 {
1093 int yytype = YYTRANSLATE (yychar);
1094 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1095 YYSIZE_T yysize = yysize0;
1096 YYSIZE_T yysize1;
1097 int yysize_overflow = 0;
1098 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1099 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1100 int yyx;
1101
1102# if 0
1103 /* This is so xgettext sees the translatable formats that are
1104 constructed on the fly. */
1105 YY_("syntax error, unexpected %s");
1106 YY_("syntax error, unexpected %s, expecting %s");
1107 YY_("syntax error, unexpected %s, expecting %s or %s");
1108 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1109 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1110# endif
1111 char *yyfmt;
1112 char const *yyf;
1113 static char const yyunexpected[] = "syntax error, unexpected %s";
1114 static char const yyexpecting[] = ", expecting %s";
1115 static char const yyor[] = " or %s";
1116 char yyformat[sizeof yyunexpected
1117 + sizeof yyexpecting - 1
1118 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1119 * (sizeof yyor - 1))];
1120 char const *yyprefix = yyexpecting;
1121
1122 /* Start YYX at -YYN if negative to avoid negative indexes in
1123 YYCHECK. */
1124 int yyxbegin = yyn < 0 ? -yyn : 0;
1125
1126 /* Stay within bounds of both yycheck and yytname. */
1127 int yychecklim = YYLAST - yyn + 1;
1128 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1129 int yycount = 1;
1130
1131 yyarg[0] = yytname[yytype];
1132 yyfmt = yystpcpy (yyformat, yyunexpected);
1133
1134 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1135 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1136 {
1137 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1138 {
1139 yycount = 1;
1140 yysize = yysize0;
1141 yyformat[sizeof yyunexpected - 1] = '\0';
1142 break;
1143 }
1144 yyarg[yycount++] = yytname[yyx];
1145 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1146 yysize_overflow |= (yysize1 < yysize);
1147 yysize = yysize1;
1148 yyfmt = yystpcpy (yyfmt, yyprefix);
1149 yyprefix = yyor;
1150 }
1151
1152 yyf = YY_(yyformat);
1153 yysize1 = yysize + yystrlen (yyf);
1154 yysize_overflow |= (yysize1 < yysize);
1155 yysize = yysize1;
1156
1157 if (yysize_overflow)
1158 return YYSIZE_MAXIMUM;
1159
1160 if (yyresult)
1161 {
1162 /* Avoid sprintf, as that infringes on the user's name space.
1163 Don't have undefined behavior even if the translation
1164 produced a string with the wrong number of "%s"s. */
1165 char *yyp = yyresult;
1166 int yyi = 0;
1167 while ((*yyp = *yyf) != '\0')
1168 {
1169 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1170 {
1171 yyp += yytnamerr (yyp, yyarg[yyi++]);
1172 yyf += 2;
1173 }
1174 else
1175 {
1176 yyp++;
1177 yyf++;
1178 }
1179 }
1180 }
1181 return yysize;
1182 }
1183}
1184#endif /* YYERROR_VERBOSE */
1185
1186
1187/*-----------------------------------------------.
1188| Release the memory associated to this symbol. |
1189`-----------------------------------------------*/
1190
1191/*ARGSUSED*/
1192#if (defined __STDC__ || defined __C99__FUNC__ \
1193 || defined __cplusplus || defined _MSC_VER)
1194static void
1195yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, compileContext* context)
1196#else
1197static void
1198yydestruct (yymsg, yytype, yyvaluep, yylocationp, context)
1199 const char *yymsg;
1200 int yytype;
1201 YYSTYPE *yyvaluep;
1202 YYLTYPE *yylocationp;
1203 compileContext* context;
1204#endif
1205{
1206 YYUSE (yyvaluep);
1207 YYUSE (yylocationp);
1208 YYUSE (context);
1209
1210 if (!yymsg)
1211 yymsg = "Deleting";
1212 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1213
1214 switch (yytype)
1215 {
1216 case 3: /* "VALUE" */
1217#line 8 "eel2.y"
1218 {
1219 #define yydestruct(a,b,c,d,e)
1220};
1221#line 1222 "y.tab.c"
1222 break;
1223
1224 default:
1225 break;
1226 }
1227}
1228
1229
1230/* Prevent warnings from -Wmissing-prototypes. */
1231
1232#ifdef YYPARSE_PARAM
1233#if defined __STDC__ || defined __cplusplus
1234int yyparse (void *YYPARSE_PARAM);
1235#else
1236int yyparse ();
1237#endif
1238#else /* ! YYPARSE_PARAM */
1239#if defined __STDC__ || defined __cplusplus
1240int yyparse (compileContext* context);
1241#else
1242int yyparse ();
1243#endif
1244#endif /* ! YYPARSE_PARAM */
1245
1246
1247
1248
1249
1250
1251/*----------.
1252| yyparse. |
1253`----------*/
1254
1255#ifdef YYPARSE_PARAM
1256#if (defined __STDC__ || defined __C99__FUNC__ \
1257 || defined __cplusplus || defined _MSC_VER)
1258int
1259yyparse (void *YYPARSE_PARAM)
1260#else
1261int
1262yyparse (YYPARSE_PARAM)
1263 void *YYPARSE_PARAM;
1264#endif
1265#else /* ! YYPARSE_PARAM */
1266#if (defined __STDC__ || defined __C99__FUNC__ \
1267 || defined __cplusplus || defined _MSC_VER)
1268int
1269yyparse (compileContext* context)
1270#else
1271int
1272yyparse (context)
1273 compileContext* context;
1274#endif
1275#endif
1276{
1277 /* The look-ahead symbol. */
1278int yychar;
1279
1280/* The semantic value of the look-ahead symbol. */
1282
1283/* Number of syntax errors so far. */
1284int yynerrs;
1285/* Location data for the look-ahead symbol. */
1287
1288 int yystate;
1289 int yyn;
1290 int yyresult;
1291 /* Number of tokens to shift before error messages enabled. */
1292 int yyerrstatus;
1293 /* Look-ahead token as an internal (translated) token number. */
1294 int yytoken = 0;
1295#if YYERROR_VERBOSE
1296 /* Buffer for error messages, and its allocated size. */
1297 char yymsgbuf[128];
1298 char *yymsg = yymsgbuf;
1299 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1300#endif
1301
1302 /* Three stacks and their tools:
1303 `yyss': related to states,
1304 `yyvs': related to semantic values,
1305 `yyls': related to locations.
1306
1307 Refer to the stacks thru separate pointers, to allow yyoverflow
1308 to reallocate them elsewhere. */
1309
1310 /* The state stack. */
1312 yytype_int16 *yyss = yyssa;
1313 yytype_int16 *yyssp;
1314
1315 /* The semantic value stack. */
1316 YYSTYPE yyvsa[YYINITDEPTH];
1317 YYSTYPE *yyvs = yyvsa;
1318 YYSTYPE *yyvsp;
1319
1320 /* The location stack. */
1321 YYLTYPE yylsa[YYINITDEPTH];
1322 YYLTYPE *yyls = yylsa;
1323 YYLTYPE *yylsp;
1324 /* The locations where the error started and ended. */
1325 YYLTYPE yyerror_range[2];
1326
1327#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1328
1329 YYSIZE_T yystacksize = YYINITDEPTH;
1330
1331 /* The variables used to return semantic value and location from the
1332 action routines. */
1333 YYSTYPE yyval;
1334 YYLTYPE yyloc;
1335
1336 /* The number of symbols on the RHS of the reduced rule.
1337 Keep to zero when no symbol should be popped. */
1338 int yylen = 0;
1339
1340 YYDPRINTF ((stderr, "Starting parse\n"));
1341
1342 yystate = 0;
1343 yyerrstatus = 0;
1344 yynerrs = 0;
1345 yychar = YYEMPTY; /* Cause a token to be read. */
1346
1347 /* Initialize stack pointers.
1348 Waste one element of value and location stack
1349 so that they stay on the same level as the state stack.
1350 The wasted elements are never initialized. */
1351
1352 yyssp = yyss;
1353 yyvsp = yyvs;
1354 yylsp = yyls;
1355#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1356 /* Initialize the default location before parsing starts. */
1357 yylloc.first_line = yylloc.last_line = 1;
1358 yylloc.first_column = yylloc.last_column = 0;
1359#endif
1360
1361 goto yysetstate;
1362
1363/*------------------------------------------------------------.
1364| yynewstate -- Push a new state, which is found in yystate. |
1365`------------------------------------------------------------*/
1366 yynewstate:
1367 /* In all cases, when you get here, the value and location stacks
1368 have just been pushed. So pushing a state here evens the stacks. */
1369 yyssp++;
1370
1371 yysetstate:
1372 *yyssp = yystate;
1373
1374 if (yyss + yystacksize - 1 <= yyssp)
1375 {
1376 /* Get the current used size of the three stacks, in elements. */
1377 YYSIZE_T yysize = yyssp - yyss + 1;
1378
1379#ifdef yyoverflow
1380 {
1381 /* Give user a chance to reallocate the stack. Use copies of
1382 these so that the &'s don't force the real ones into
1383 memory. */
1384 YYSTYPE *yyvs1 = yyvs;
1385 yytype_int16 *yyss1 = yyss;
1386 YYLTYPE *yyls1 = yyls;
1387
1388 /* Each stack pointer address is followed by the size of the
1389 data in use in that stack, in bytes. This used to be a
1390 conditional around just the two extra args, but that might
1391 be undefined if yyoverflow is a macro. */
1392 yyoverflow (YY_("memory exhausted"),
1393 &yyss1, yysize * sizeof (*yyssp),
1394 &yyvs1, yysize * sizeof (*yyvsp),
1395 &yyls1, yysize * sizeof (*yylsp),
1396 &yystacksize);
1397 yyls = yyls1;
1398 yyss = yyss1;
1399 yyvs = yyvs1;
1400 }
1401#else /* no yyoverflow */
1402# ifndef YYSTACK_RELOCATE
1403 goto yyexhaustedlab;
1404# else
1405 /* Extend the stack our own way. */
1406 if (YYMAXDEPTH <= yystacksize)
1407 goto yyexhaustedlab;
1408 yystacksize *= 2;
1409 if (YYMAXDEPTH < yystacksize)
1410 yystacksize = YYMAXDEPTH;
1411
1412 {
1413 yytype_int16 *yyss1 = yyss;
1414 union yyalloc *yyptr =
1415 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1416 if (! yyptr)
1417 goto yyexhaustedlab;
1421# undef YYSTACK_RELOCATE
1422 if (yyss1 != yyssa)
1423 YYSTACK_FREE (yyss1);
1424 }
1425# endif
1426#endif /* no yyoverflow */
1427
1428 yyssp = yyss + yysize - 1;
1429 yyvsp = yyvs + yysize - 1;
1430 yylsp = yyls + yysize - 1;
1431
1432 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1433 (unsigned long int) yystacksize));
1434
1435 if (yyss + yystacksize - 1 <= yyssp)
1436 YYABORT;
1437 }
1438
1439 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1440
1441 goto yybackup;
1442
1443/*-----------.
1444| yybackup. |
1445`-----------*/
1446yybackup:
1447
1448 /* Do appropriate processing given the current state. Read a
1449 look-ahead token if we need one and don't already have one. */
1450
1451 /* First try to decide what to do without reference to look-ahead token. */
1452 yyn = yypact[yystate];
1453 if (yyn == YYPACT_NINF)
1454 goto yydefault;
1455
1456 /* Not known => get a look-ahead token if don't already have one. */
1457
1458 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1459 if (yychar == YYEMPTY)
1460 {
1461 YYDPRINTF ((stderr, "Reading a token: "));
1462 yychar = YYLEX;
1463 }
1464
1465 if (yychar <= YYEOF)
1466 {
1467 yychar = yytoken = YYEOF;
1468 YYDPRINTF ((stderr, "Now at end of input.\n"));
1469 }
1470 else
1471 {
1472 yytoken = YYTRANSLATE (yychar);
1473 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1474 }
1475
1476 /* If the proper action on seeing token YYTOKEN is to reduce or to
1477 detect an error, take that action. */
1478 yyn += yytoken;
1479 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1480 goto yydefault;
1481 yyn = yytable[yyn];
1482 if (yyn <= 0)
1483 {
1484 if (yyn == 0 || yyn == YYTABLE_NINF)
1485 goto yyerrlab;
1486 yyn = -yyn;
1487 goto yyreduce;
1488 }
1489
1490 if (yyn == YYFINAL)
1491 YYACCEPT;
1492
1493 /* Count tokens shifted since error; after three, turn off error
1494 status. */
1495 if (yyerrstatus)
1496 yyerrstatus--;
1497
1498 /* Shift the look-ahead token. */
1499 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1500
1501 /* Discard the shifted token unless it is eof. */
1502 if (yychar != YYEOF)
1503 yychar = YYEMPTY;
1504
1505 yystate = yyn;
1506 *++yyvsp = yylval;
1507 *++yylsp = yylloc;
1508 goto yynewstate;
1509
1510
1511/*-----------------------------------------------------------.
1512| yydefault -- do the default action for the current state. |
1513`-----------------------------------------------------------*/
1514yydefault:
1515 yyn = yydefact[yystate];
1516 if (yyn == 0)
1517 goto yyerrlab;
1518 goto yyreduce;
1519
1520
1521/*-----------------------------.
1522| yyreduce -- Do a reduction. |
1523`-----------------------------*/
1524yyreduce:
1525 /* yyn is the number of a rule to reduce with. */
1526 yylen = yyr2[yyn];
1527
1528 /* If YYLEN is nonzero, implement the default value of the action:
1529 `$$ = $1'.
1530
1531 Otherwise, the following line sets YYVAL to garbage.
1532 This behavior is undocumented and Bison
1533 users should not rely upon it. Assigning to YYVAL
1534 unconditionally makes the parser a bit smaller, and it avoids a
1535 GCC warning that YYVAL may be used uninitialized. */
1536 yyval = yyvsp[1-yylen];
1537
1538 /* Default location. */
1539 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1540 YY_REDUCE_PRINT (yyn);
1541 switch (yyn)
1542 {
1543 case 3:
1544#line 42 "eel2.y"
1545 {
1546 (yyval) = nseel_createMoreParametersOpcode(context,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1547 }
1548 break;
1549
1550 case 5:
1551#line 50 "eel2.y"
1552 {
1553 ((struct eelStringSegmentRec *)(yyvsp[(1) - (2)]))->_next = (struct eelStringSegmentRec *)(yyvsp[(2) - (2)]);
1554 (yyval) = (yyvsp[(1) - (2)]);
1555 }
1556 break;
1557
1558 case 6:
1559#line 58 "eel2.y"
1560 {
1561 if (!((yyval) = nseel_resolve_named_symbol(context, (yyvsp[(1) - (1)]), -1, NULL))) /* convert from purely named to namespace-relative, etc */
1562 {
1563 yyerror(&yyloc, context, "");
1564 YYERROR;
1565 }
1566 }
1567 break;
1568
1569 case 7:
1570#line 68 "eel2.y"
1571 {
1572 (yyval) = (yyvsp[(2) - (3)]);
1573 }
1574 break;
1575
1576 case 8:
1577#line 72 "eel2.y"
1578 {
1579 int err;
1580 if (!((yyval) = nseel_setCompiledFunctionCallParameters(context,(yyvsp[(1) - (7)]), (yyvsp[(3) - (7)]), 0, 0, (yyvsp[(6) - (7)]), &err)))
1581 {
1582 if (err == -1) yyerror(&yylsp[-2], context, "");
1583 else if (err == 0) yyerror(&yylsp[-6], context, "");
1584 else yyerror(&yylsp[-3], context, ""); // parameter count wrong
1585
1586 YYERROR;
1587 }
1588 }
1589 break;
1590
1591 case 9:
1592#line 84 "eel2.y"
1593 {
1594 int err;
1595 if (!((yyval) = nseel_setCompiledFunctionCallParameters(context,(yyvsp[(1) - (4)]), (yyvsp[(3) - (4)]), 0, 0, 0, &err)))
1596 {
1597 if (err == 0) yyerror(&yylsp[-3], context, "");
1598 else yyerror(&yylsp[0], context, ""); // parameter count wrong
1599 YYERROR;
1600 }
1601 }
1602 break;
1603
1604 case 10:
1605#line 94 "eel2.y"
1606 {
1607 int err;
1608 if (!((yyval) = nseel_setCompiledFunctionCallParameters(context,(yyvsp[(1) - (3)]), nseel_createCompiledValue(context,0.0), 0, 0, 0,&err)))
1609 {
1610 if (err == 0) yyerror(&yylsp[-2], context, ""); // function not found
1611 else yyerror(&yylsp[0], context, ""); // parameter count wrong
1612 YYERROR;
1613 }
1614 }
1615 break;
1616
1617 case 11:
1618#line 104 "eel2.y"
1619 {
1620 int err;
1621 if (!((yyval) = nseel_setCompiledFunctionCallParameters(context,(yyvsp[(1) - (6)]), (yyvsp[(3) - (6)]), (yyvsp[(5) - (6)]), 0, 0,&err)))
1622 {
1623 if (err == 0) yyerror(&yylsp[-5], context, "");
1624 else if (err == 2) yyerror(&yylsp[0], context, ""); // needs more than 2 parameters
1625 else yyerror(&yylsp[-2], context, ""); // less than 2
1626 YYERROR;
1627 }
1628 }
1629 break;
1630
1631 case 12:
1632#line 115 "eel2.y"
1633 {
1634 int err;
1635 if (!((yyval) = nseel_setCompiledFunctionCallParameters(context,(yyvsp[(1) - (8)]), (yyvsp[(3) - (8)]), (yyvsp[(5) - (8)]), (yyvsp[(7) - (8)]), 0, &err)))
1636 {
1637 if (err == 0) yyerror(&yylsp[-7], context, "");
1638 else if (err==2) yyerror(&yylsp[0], context, ""); // needs more parameters
1639 else if (err==4) yyerror(&yylsp[-4], context, ""); // needs single parameter
1640 else yyerror(&yylsp[-2], context, ""); // less parm
1641 YYERROR;
1642 }
1643 }
1644 break;
1645
1646 case 13:
1647#line 127 "eel2.y"
1648 {
1649 (yyval) = nseel_createMemoryAccess(context,(yyvsp[(1) - (3)]),0);
1650 }
1651 break;
1652
1653 case 14:
1654#line 131 "eel2.y"
1655 {
1656 (yyval) = nseel_createMemoryAccess(context,(yyvsp[(1) - (4)]),(yyvsp[(3) - (4)]));
1657 }
1658 break;
1659
1660 case 17:
1661#line 140 "eel2.y"
1662 {
1663 (yyval) = nseel_eelMakeOpcodeFromStringSegments(context,(struct eelStringSegmentRec *)(yyvsp[(1) - (1)]));
1664 }
1665 break;
1666
1667 case 20:
1668#line 150 "eel2.y"
1669 {
1670 (yyval) = nseel_createSimpleCompiledFunction(context,FN_ASSIGN,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1671 }
1672 break;
1673
1674 case 21:
1675#line 154 "eel2.y"
1676 {
1677 (yyval) = nseel_createSimpleCompiledFunction(context,FN_ADD_OP,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1678 }
1679 break;
1680
1681 case 22:
1682#line 158 "eel2.y"
1683 {
1684 (yyval) = nseel_createSimpleCompiledFunction(context,FN_SUB_OP,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1685 }
1686 break;
1687
1688 case 23:
1689#line 162 "eel2.y"
1690 {
1691 (yyval) = nseel_createSimpleCompiledFunction(context,FN_MOD_OP,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1692 }
1693 break;
1694
1695 case 24:
1696#line 166 "eel2.y"
1697 {
1698 (yyval) = nseel_createSimpleCompiledFunction(context,FN_OR_OP,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1699 }
1700 break;
1701
1702 case 25:
1703#line 170 "eel2.y"
1704 {
1705 (yyval) = nseel_createSimpleCompiledFunction(context,FN_AND_OP,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1706 }
1707 break;
1708
1709 case 26:
1710#line 174 "eel2.y"
1711 {
1712 (yyval) = nseel_createSimpleCompiledFunction(context,FN_XOR_OP,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1713 }
1714 break;
1715
1716 case 27:
1717#line 178 "eel2.y"
1718 {
1719 (yyval) = nseel_createSimpleCompiledFunction(context,FN_DIV_OP,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1720 }
1721 break;
1722
1723 case 28:
1724#line 182 "eel2.y"
1725 {
1726 (yyval) = nseel_createSimpleCompiledFunction(context,FN_MUL_OP,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1727 }
1728 break;
1729
1730 case 29:
1731#line 186 "eel2.y"
1732 {
1733 (yyval) = nseel_createSimpleCompiledFunction(context,FN_POW_OP,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1734 }
1735 break;
1736
1737 case 30:
1738#line 190 "eel2.y"
1739 {
1740 (yyval) = nseel_createFunctionByName(context,"strcpy",2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]),NULL);
1741 }
1742 break;
1743
1744 case 31:
1745#line 194 "eel2.y"
1746 {
1747 (yyval) = nseel_createFunctionByName(context,"strcat",2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]),NULL);
1748 }
1749 break;
1750
1751 case 33:
1752#line 202 "eel2.y"
1753 {
1754 (yyval) = (yyvsp[(2) - (2)]);
1755 }
1756 break;
1757
1758 case 34:
1759#line 206 "eel2.y"
1760 {
1761 (yyval) = nseel_createSimpleCompiledFunction(context,FN_UMINUS,1,(yyvsp[(2) - (2)]),0);
1762 }
1763 break;
1764
1765 case 35:
1766#line 210 "eel2.y"
1767 {
1768 (yyval) = nseel_createSimpleCompiledFunction(context,FN_NOT,1,(yyvsp[(2) - (2)]),0);
1769 }
1770 break;
1771
1772 case 37:
1773#line 218 "eel2.y"
1774 {
1775 (yyval) = nseel_createSimpleCompiledFunction(context,FN_POW,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1776 }
1777 break;
1778
1779 case 39:
1780#line 226 "eel2.y"
1781 {
1782 (yyval) = nseel_createSimpleCompiledFunction(context,FN_MOD,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1783 }
1784 break;
1785
1786 case 40:
1787#line 230 "eel2.y"
1788 {
1789 (yyval) = nseel_createSimpleCompiledFunction(context,FN_SHL,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1790 }
1791 break;
1792
1793 case 41:
1794#line 234 "eel2.y"
1795 {
1796 (yyval) = nseel_createSimpleCompiledFunction(context,FN_SHR,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1797 }
1798 break;
1799
1800 case 43:
1801#line 242 "eel2.y"
1802 {
1803 (yyval) = nseel_createSimpleCompiledFunction(context,FN_DIVIDE,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1804 }
1805 break;
1806
1807 case 45:
1808#line 251 "eel2.y"
1809 {
1810 (yyval) = nseel_createSimpleCompiledFunction(context,FN_MULTIPLY,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1811 }
1812 break;
1813
1814 case 47:
1815#line 260 "eel2.y"
1816 {
1817 (yyval) = nseel_createSimpleCompiledFunction(context,FN_SUB,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1818 }
1819 break;
1820
1821 case 49:
1822#line 268 "eel2.y"
1823 {
1824 (yyval) = nseel_createSimpleCompiledFunction(context,FN_ADD,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1825 }
1826 break;
1827
1828 case 51:
1829#line 276 "eel2.y"
1830 {
1831 (yyval) = nseel_createSimpleCompiledFunction(context,FN_AND,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1832 }
1833 break;
1834
1835 case 52:
1836#line 280 "eel2.y"
1837 {
1838 (yyval) = nseel_createSimpleCompiledFunction(context,FN_OR,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1839 }
1840 break;
1841
1842 case 53:
1843#line 284 "eel2.y"
1844 {
1845 (yyval) = nseel_createSimpleCompiledFunction(context,FN_XOR,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1846 }
1847 break;
1848
1849 case 55:
1850#line 292 "eel2.y"
1851 {
1852 (yyval) = nseel_createSimpleCompiledFunction(context,FN_LT,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1853 }
1854 break;
1855
1856 case 56:
1857#line 296 "eel2.y"
1858 {
1859 (yyval) = nseel_createSimpleCompiledFunction(context,FN_GT,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1860 }
1861 break;
1862
1863 case 57:
1864#line 300 "eel2.y"
1865 {
1866 (yyval) = nseel_createSimpleCompiledFunction(context,FN_LTE,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1867 }
1868 break;
1869
1870 case 58:
1871#line 304 "eel2.y"
1872 {
1873 (yyval) = nseel_createSimpleCompiledFunction(context,FN_GTE,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1874 }
1875 break;
1876
1877 case 59:
1878#line 308 "eel2.y"
1879 {
1880 (yyval) = nseel_createSimpleCompiledFunction(context,FN_EQ,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1881 }
1882 break;
1883
1884 case 60:
1885#line 312 "eel2.y"
1886 {
1887 (yyval) = nseel_createSimpleCompiledFunction(context,FN_EQ_EXACT,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1888 }
1889 break;
1890
1891 case 61:
1892#line 316 "eel2.y"
1893 {
1894 (yyval) = nseel_createSimpleCompiledFunction(context,FN_NE,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1895 }
1896 break;
1897
1898 case 62:
1899#line 320 "eel2.y"
1900 {
1901 (yyval) = nseel_createSimpleCompiledFunction(context,FN_NE_EXACT,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1902 }
1903 break;
1904
1905 case 64:
1906#line 328 "eel2.y"
1907 {
1908 (yyval) = nseel_createSimpleCompiledFunction(context,FN_LOGICAL_AND,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1909 }
1910 break;
1911
1912 case 65:
1913#line 332 "eel2.y"
1914 {
1915 (yyval) = nseel_createSimpleCompiledFunction(context,FN_LOGICAL_OR,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1916 }
1917 break;
1918
1919 case 67:
1920#line 340 "eel2.y"
1921 {
1922 (yyval) = nseel_createIfElse(context, (yyvsp[(1) - (5)]), (yyvsp[(3) - (5)]), (yyvsp[(5) - (5)]));
1923 }
1924 break;
1925
1926 case 68:
1927#line 344 "eel2.y"
1928 {
1929 (yyval) = nseel_createIfElse(context, (yyvsp[(1) - (4)]), 0, (yyvsp[(4) - (4)]));
1930 }
1931 break;
1932
1933 case 69:
1934#line 348 "eel2.y"
1935 {
1936 (yyval) = nseel_createIfElse(context, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), 0);
1937 }
1938 break;
1939
1940 case 71:
1941#line 357 "eel2.y"
1942 {
1943 (yyval) = nseel_createSimpleCompiledFunction(context,FN_JOIN_STATEMENTS,2,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));
1944 }
1945 break;
1946
1947 case 72:
1948#line 361 "eel2.y"
1949 {
1950 (yyval) = (yyvsp[(1) - (2)]);
1951 }
1952 break;
1953
1954 case 73:
1955#line 369 "eel2.y"
1956 {
1957 if ((yylsp[(1) - (1)]).first_line) { }
1958 context->result = (yyvsp[(1) - (1)]);
1959 }
1960 break;
1961
1962
1963/* Line 1267 of yacc.c. */
1964#line 1965 "y.tab.c"
1965 default: break;
1966 }
1967 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1968
1969 YYPOPSTACK (yylen);
1970 yylen = 0;
1971 YY_STACK_PRINT (yyss, yyssp);
1972
1973 *++yyvsp = yyval;
1974 *++yylsp = yyloc;
1975
1976 /* Now `shift' the result of the reduction. Determine what state
1977 that goes to, based on the state we popped back to and the rule
1978 number reduced by. */
1979
1980 yyn = yyr1[yyn];
1981
1982 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1983 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1984 yystate = yytable[yystate];
1985 else
1986 yystate = yydefgoto[yyn - YYNTOKENS];
1987
1988 goto yynewstate;
1989
1990
1991/*------------------------------------.
1992| yyerrlab -- here on detecting error |
1993`------------------------------------*/
1994yyerrlab:
1995 /* If not already recovering from an error, report this error. */
1996 if (!yyerrstatus)
1997 {
1998 ++yynerrs;
1999#if ! YYERROR_VERBOSE
2000 yyerror (&yylloc, context, YY_("syntax error"));
2001#else
2002 {
2003 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
2004 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
2005 {
2006 YYSIZE_T yyalloc = 2 * yysize;
2007 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
2009 if (yymsg != yymsgbuf)
2010 YYSTACK_FREE (yymsg);
2011 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
2012 if (yymsg)
2013 yymsg_alloc = yyalloc;
2014 else
2015 {
2016 yymsg = yymsgbuf;
2017 yymsg_alloc = sizeof yymsgbuf;
2018 }
2019 }
2020
2021 if (0 < yysize && yysize <= yymsg_alloc)
2022 {
2023 (void) yysyntax_error (yymsg, yystate, yychar);
2024 yyerror (&yylloc, context, yymsg);
2025 }
2026 else
2027 {
2028 yyerror (&yylloc, context, YY_("syntax error"));
2029 if (yysize != 0)
2030 goto yyexhaustedlab;
2031 }
2032 }
2033#endif
2034 }
2035
2036 yyerror_range[0] = yylloc;
2037
2038 if (yyerrstatus == 3)
2039 {
2040 /* If just tried and failed to reuse look-ahead token after an
2041 error, discard it. */
2042
2043 if (yychar <= YYEOF)
2044 {
2045 /* Return failure if at end of input. */
2046 if (yychar == YYEOF)
2047 YYABORT;
2048 }
2049 else
2050 {
2051 yydestruct ("Error: discarding",
2052 yytoken, &yylval, &yylloc, context);
2053 yychar = YYEMPTY;
2054 }
2055 }
2056
2057 /* Else will try to reuse look-ahead token after shifting the error
2058 token. */
2059 goto yyerrlab1;
2060
2061
2062/*---------------------------------------------------.
2063| yyerrorlab -- error raised explicitly by YYERROR. |
2064`---------------------------------------------------*/
2065yyerrorlab:
2066
2067 /* Pacify compilers like GCC when the user code never invokes
2068 YYERROR and the label yyerrorlab therefore never appears in user
2069 code. */
2070 if (/*CONSTCOND*/ 0)
2071 goto yyerrorlab;
2072
2073 yyerror_range[0] = yylsp[1-yylen];
2074 /* Do not reclaim the symbols of the rule which action triggered
2075 this YYERROR. */
2076 YYPOPSTACK (yylen);
2077 yylen = 0;
2078 YY_STACK_PRINT (yyss, yyssp);
2079 yystate = *yyssp;
2080 goto yyerrlab1;
2081
2082
2083/*-------------------------------------------------------------.
2084| yyerrlab1 -- common code for both syntax error and YYERROR. |
2085`-------------------------------------------------------------*/
2086yyerrlab1:
2087 yyerrstatus = 3; /* Each real token shifted decrements this. */
2088
2089 for (;;)
2090 {
2091 yyn = yypact[yystate];
2092 if (yyn != YYPACT_NINF)
2093 {
2094 yyn += YYTERROR;
2095 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2096 {
2097 yyn = yytable[yyn];
2098 if (0 < yyn)
2099 break;
2100 }
2101 }
2102
2103 /* Pop the current state because it cannot handle the error token. */
2104 if (yyssp == yyss)
2105 YYABORT;
2106
2107 yyerror_range[0] = *yylsp;
2108 yydestruct ("Error: popping",
2109 yystos[yystate], yyvsp, yylsp, context);
2110 YYPOPSTACK (1);
2111 yystate = *yyssp;
2112 YY_STACK_PRINT (yyss, yyssp);
2113 }
2114
2115 if (yyn == YYFINAL)
2116 YYACCEPT;
2117
2118 *++yyvsp = yylval;
2119
2120 yyerror_range[1] = yylloc;
2121 /* Using YYLLOC is tempting, but would change the location of
2122 the look-ahead. YYLOC is available though. */
2123 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
2124 *++yylsp = yyloc;
2125
2126 /* Shift the error token. */
2127 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2128
2129 yystate = yyn;
2130 goto yynewstate;
2131
2132
2133/*-------------------------------------.
2134| yyacceptlab -- YYACCEPT comes here. |
2135`-------------------------------------*/
2136yyacceptlab:
2137 yyresult = 0;
2138 goto yyreturn;
2139
2140/*-----------------------------------.
2141| yyabortlab -- YYABORT comes here. |
2142`-----------------------------------*/
2143yyabortlab:
2144 yyresult = 1;
2145 goto yyreturn;
2146
2147#ifndef yyoverflow
2148/*-------------------------------------------------.
2149| yyexhaustedlab -- memory exhaustion comes here. |
2150`-------------------------------------------------*/
2151yyexhaustedlab:
2152 yyerror (&yylloc, context, YY_("memory exhausted"));
2153 yyresult = 2;
2154 /* Fall through. */
2155#endif
2156
2157yyreturn:
2158 if (yychar != YYEOF && yychar != YYEMPTY)
2159 {
2160 yydestruct ("Cleanup: discarding lookahead",
2161 yytoken, &yylval, &yylloc, context);
2162 }
2163 /* Do not reclaim the symbols of the rule which action triggered
2164 this YYABORT or YYACCEPT. */
2165 YYPOPSTACK (yylen);
2166 YY_STACK_PRINT (yyss, yyssp);
2167 while (yyssp != yyss)
2168 {
2169 yydestruct ("Cleanup: popping",
2170 yystos[*yyssp], yyvsp, yylsp, context);
2171 YYPOPSTACK (1);
2172 }
2173#ifndef yyoverflow
2174 if (yyss != yyssa)
2175 YYSTACK_FREE (yyss);
2176#endif
2177#if YYERROR_VERBOSE
2178 if (yymsg != yymsgbuf)
2179 YYSTACK_FREE (yymsg);
2180#endif
2181 /* Make sure YYID is used. */
2182 return YYID (yyresult);
2183}
2184
2185
2186#line 376 "eel2.y"
2187
2188
#define NULL
Definition CarlaBridgeFormat.cpp:30
register unsigned i
Definition inflate.c:1575
#define YYSTYPE
Definition ns-eel-int.h:99
struct _compileContext compileContext
@ FN_NE_EXACT
Definition ns-eel-int.h:68
@ FN_GT
Definition ns-eel-int.h:62
@ FN_GTE
Definition ns-eel-int.h:64
@ FN_ADD
Definition ns-eel-int.h:49
@ FN_SHR
Definition ns-eel-int.h:58
@ FN_POW_OP
Definition ns-eel-int.h:85
@ FN_DIVIDE
Definition ns-eel-int.h:45
@ FN_MOD_OP
Definition ns-eel-int.h:79
@ FN_EQ
Definition ns-eel-int.h:65
@ FN_LT
Definition ns-eel-int.h:61
@ FN_OR_OP
Definition ns-eel-int.h:80
@ FN_UMINUS
Definition ns-eel-int.h:53
@ FN_NE
Definition ns-eel-int.h:67
@ FN_MOD
Definition ns-eel-int.h:59
@ FN_SUB
Definition ns-eel-int.h:50
@ FN_LOGICAL_AND
Definition ns-eel-int.h:69
@ FN_XOR
Definition ns-eel-int.h:56
@ FN_MUL_OP
Definition ns-eel-int.h:84
@ FN_MULTIPLY
Definition ns-eel-int.h:44
@ FN_DIV_OP
Definition ns-eel-int.h:83
@ FN_XOR_OP
Definition ns-eel-int.h:82
@ FN_SUB_OP
Definition ns-eel-int.h:78
@ FN_AND_OP
Definition ns-eel-int.h:81
@ FN_LOGICAL_OR
Definition ns-eel-int.h:70
@ FN_ADD_OP
Definition ns-eel-int.h:77
@ FN_SHL
Definition ns-eel-int.h:57
@ FN_JOIN_STATEMENTS
Definition ns-eel-int.h:46
@ FN_AND
Definition ns-eel-int.h:51
@ FN_NOT
Definition ns-eel-int.h:54
@ FN_EQ_EXACT
Definition ns-eel-int.h:66
@ FN_OR
Definition ns-eel-int.h:52
@ FN_LTE
Definition ns-eel-int.h:63
@ FN_POW
Definition ns-eel-int.h:60
@ FN_ASSIGN
Definition ns-eel-int.h:75
opcodeRec * nseel_setCompiledFunctionCallParameters(compileContext *ctx, opcodeRec *fn, opcodeRec *code1, opcodeRec *code2, opcodeRec *code3, opcodeRec *postCode, int *errOut)
Definition nseel-compiler.c:1359
opcodeRec * nseel_createMemoryAccess(compileContext *ctx, opcodeRec *code1, opcodeRec *code2)
Definition nseel-compiler.c:1459
opcodeRec * nseel_createSimpleCompiledFunction(compileContext *ctx, int fn, int np, opcodeRec *code1, opcodeRec *code2)
Definition nseel-compiler.c:1472
opcodeRec * nseel_createMoreParametersOpcode(compileContext *ctx, opcodeRec *code1, opcodeRec *code2)
Definition nseel-compiler.c:1429
opcodeRec * nseel_createCompiledValue(compileContext *ctx, EEL_F value)
Definition nseel-compiler.c:897
opcodeRec * nseel_createIfElse(compileContext *ctx, opcodeRec *code1, opcodeRec *code2, opcodeRec *code3)
Definition nseel-compiler.c:1441
opcodeRec * nseel_createFunctionByName(compileContext *ctx, const char *name, int np, opcodeRec *code1, opcodeRec *code2, opcodeRec *code3)
Definition nseel-compiler.c:5676
opcodeRec * nseel_resolve_named_symbol(compileContext *ctx, opcodeRec *rec, int parmcnt, int *errOut)
Definition nseel-compiler.c:946
opcodeRec * nseel_eelMakeOpcodeFromStringSegments(compileContext *ctx, struct eelStringSegmentRec *rec)
Definition nseel-compiler.c:1419
opcodeRec * result
Definition ns-eel-int.h:192
Definition y.tab.h:106
int last_line
Definition y.tab.h:109
int first_column
Definition y.tab.h:108
int first_line
Definition y.tab.h:107
int last_column
Definition y.tab.h:110
Definition eel_import.h:27
struct eelStringSegmentRec * _next
Definition eel_import.h:28
Definition y.tab.c:355
YYSTYPE yyvs
Definition y.tab.c:357
YYLTYPE yyls
Definition y.tab.c:358
yytype_int16 yyss
Definition y.tab.c:356
#define void
Definition unzip.h:396
char * malloc()
unsigned short int yytype_uint16
Definition y.tab.c:216
#define TOKEN_EQ_EXACT
Definition y.tab.c:110
#define YYID(n)
Definition y.tab.c:262
static const yytype_uint8 yyr1[]
Definition y.tab.c:556
#define yylloc
Definition y.tab.c:69
#define YYLEX
Definition y.tab.c:784
#define YYMAXDEPTH
Definition y.tab.c:971
yytokentype
Definition y.tab.c:76
#define yydestruct(a, b, c, d, e)
#define YYSTACK_FREE
Definition y.tab.c:318
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition y.tab.c:952
#define TOKEN_ADD_OP
Definition y.tab.c:115
#define TOKEN_XOR_OP
Definition y.tab.c:120
#define yychar
Definition y.tab.c:66
#define STRING_LITERAL
Definition y.tab.c:124
#define TOKEN_NE_EXACT
Definition y.tab.c:112
static const yytype_uint8 yytranslate[]
Definition y.tab.c:428
#define YYEOF
Definition y.tab.c:700
#define YYABORT
Definition y.tab.c:703
#define YYSTACK_BYTES(N)
Definition y.tab.c:366
static const yytype_int8 yycheck[]
Definition y.tab.c:659
#define IDENTIFIER
Definition y.tab.c:104
#define YYLLOC_DEFAULT(Current, Rhs, N)
Definition y.tab.c:743
#define YY_REDUCE_PRINT(Rule)
Definition y.tab.c:954
#define TOKEN_LOGICAL_OR
Definition y.tab.c:114
#define YYTABLE_NINF
Definition y.tab.c:639
#define TOKEN_DIV_OP
Definition y.tab.c:121
#define YY_LOCATION_PRINT(File, Loc)
Definition y.tab.c:769
#define TOKEN_OR_OP
Definition y.tab.c:118
static const yytype_int8 yypact[]
Definition y.tab.c:611
#define TOKEN_AND_OP
Definition y.tab.c:119
#define TOKEN_SUB_OP
Definition y.tab.c:116
#define YYPACT_NINF
Definition y.tab.c:610
#define YYFINAL
Definition y.tab.c:407
#define STRING_IDENTIFIER
Definition y.tab.c:125
#define TOKEN_GTE
Definition y.tab.c:108
#define yylval
Definition y.tab.c:65
#define YYNTOKENS
Definition y.tab.c:412
#define TOKEN_LOGICAL_AND
Definition y.tab.c:113
unsigned char yytype_uint8
Definition y.tab.c:201
#define YY_STACK_PRINT(Bottom, Top)
Definition y.tab.c:953
#define TOKEN_SHL
Definition y.tab.c:105
#define YYSIZE_T
Definition y.tab.c:235
#define YYSTACK_ALLOC_MAXIMUM
Definition y.tab.c:320
#define yydebug
Definition y.tab.c:67
#define yynerrs
Definition y.tab.c:68
#define VALUE
Definition y.tab.c:103
#define yyparse
Definition y.tab.c:62
#define TOKEN_LTE
Definition y.tab.c:107
static const yytype_uint8 yyr2[]
Definition y.tab.c:569
#define YYACCEPT
Definition y.tab.c:702
#define YYTRANSLATE(YYX)
Definition y.tab.c:424
#define YYSIZE_MAXIMUM
Definition y.tab.c:239
static const yytype_int8 yypgoto[]
Definition y.tab.c:629
static const yytype_uint8 yystos[]
Definition y.tab.c:680
#define YYSTACK_RELOCATE(Stack)
Definition y.tab.c:393
#define TOKEN_MOD_OP
Definition y.tab.c:117
#define YYTERROR
Definition y.tab.c:733
#define YYPOPSTACK(N)
#define YYUSE(e)
Definition y.tab.c:255
static const yytype_int8 yydefgoto[]
Definition y.tab.c:602
#define TOKEN_POW_OP
Definition y.tab.c:123
short int yytype_int16
Definition y.tab.c:222
#define TOKEN_EQ
Definition y.tab.c:109
#define YYEMPTY
Definition y.tab.c:699
#define YYLAST
Definition y.tab.c:409
#define YYINITDEPTH
Definition y.tab.c:960
static const yytype_uint8 yytable[]
Definition y.tab.c:640
#define YYERROR
Definition y.tab.c:704
#define YY_(x)
Definition y.tab.c:145
#define YYSTACK_ALLOC
Definition y.tab.c:317
#define TOKEN_MUL_OP
Definition y.tab.c:122
#define YYDPRINTF(Args)
Definition y.tab.c:951
static const yytype_uint8 yydefact[]
Definition y.tab.c:584
#define TOKEN_NE
Definition y.tab.c:111
#define yyerror
Definition y.tab.c:64
short int yytype_int8
Definition y.tab.c:210
#define TOKEN_SHR
Definition y.tab.c:106