1 /* Driver template for the LEMON parser generator.
2 ** The author disclaims copyright to this source code.
3 */
4 /* First off, code is included that follows the "include" declaration
5 ** in the input grammar file. */
6 #include <stdio.h>
7 #line 2 "expparse.y"
8 
9 #include <assert.h>
10 #include "token_type.h"
11 #include "parse_data.h"
12 
13 int yyerrstatus = 0;
14 #define yyerrok (yyerrstatus = 0)
15 
16 YYSTYPE yylval;
17 
18     /*
19      * YACC grammar for Express parser.
20      *
21      * This software was developed by U.S. Government employees as part of
22      * their official duties and is not subject to copyright.
23      *
24      * $Log: expparse.y,v $
25      * Revision 1.23  1997/11/14 17:09:04  libes
26      * allow multiple group references
27      *
28      * ** 22 older revision log records removed 3 January 2014 **
29      */
30 
31 #include "express/symbol.h"
32 #include "express/linklist.h"
33 #include "stack.h"
34 #include "express/express.h"
35 #include "express/schema.h"
36 #include "express/entity.h"
37 #include "express/resolve.h"
38 #include "expscan.h"
39 #include <float.h>
40 
41     extern int print_objects_while_running;
42 
43     int tag_count;    /**< use this to count tagged GENERIC types in the formal
44                          * argument lists.  Gross, but much easier to do it this
45                          * way then with the 'help' of yacc. Set it to -1 to
46                          * indicate that tags cannot be defined, only used
47                          * (outside of formal parameter list, i.e. for return
48                          * types). Hey, as long as there's a gross hack sitting
49                          * around, we might as well milk it for all it's worth!
50                          *   - snc
51                          */
52 
53     int local_var_count; /**< used to keep LOCAL variables in order
54                             * used in combination with Variable.offset
55                             */
56 
57     Express yyexpresult;    /* hook to everything built by parser */
58 
59     Symbol *interface_schema;    /* schema of interest in use/ref clauses */
60     void (*interface_func)();    /* func to attach rename clauses */
61 
62     /* record schemas found in a single parse here, allowing them to be */
63     /* differentiated from other schemas parsed earlier */
64     Linked_List PARSEnew_schemas;
65 
66     void SCANskip_to_end_schema(perplex_t scanner);
67 
68     int yylineno;
69 
70     bool yyeof = false;
71 
72 #define MAX_SCOPE_DEPTH    20    /* max number of scopes that can be nested */
73 
74     static struct scope {
75         struct Scope_ *this_;
76         char type;    /* one of OBJ_XXX */
77         struct scope *pscope;    /* pointer back to most recent scope */
78         /* that has a printable name - for better */
79         /* error messages */
80     } scopes[MAX_SCOPE_DEPTH], *scope;
81 #define CURRENT_SCOPE (scope->this_)
82 #define PREVIOUS_SCOPE ((scope-1)->this_)
83 #define CURRENT_SCHEMA (scope->this_->u.schema)
84 #define CURRENT_SCOPE_NAME        (OBJget_symbol(scope->pscope->this_,scope->pscope->type)->name)
85 #define CURRENT_SCOPE_TYPE_PRINTABLE    (OBJget_type(scope->pscope->type))
86 
87     /* ths = new scope to enter */
88     /* sym = name of scope to enter into parent.  Some scopes (i.e., increment) */
89     /*       are not named, in which case sym should be 0 */
90     /*     This is useful for when a diagnostic is printed, an earlier named */
91     /*      scoped can be used */
92     /* typ = type of scope */
93 #define PUSH_SCOPE(ths,sym,typ) \
94     if (sym) DICTdefine(scope->this_->symbol_table,(sym)->name,(Generic)ths,sym,typ);\
95     ths->superscope = scope->this_; \
96     scope++;        \
97     scope->type = typ;    \
98     scope->pscope = (sym?scope:(scope-1)->pscope); \
99     scope->this_ = ths; \
100     if (sym) { \
101         ths->symbol = *(sym); \
102     }
103 #define POP_SCOPE() scope--
104 
105     /* PUSH_SCOPE_DUMMY just pushes the scope stack with nothing actually on it */
106     /* Necessary for situations when a POP_SCOPE is unnecessary but inevitable */
107 #define PUSH_SCOPE_DUMMY() scope++
108 
109     /* normally the superscope is added by PUSH_SCOPE, but some things (types) */
110     /* bother to get pushed so fix them this way */
111 #define SCOPEadd_super(ths) ths->superscope = scope->this_;
112 
113 #define ERROR(code)    ERRORreport(code, yylineno)
114 
parserInitState()115 void parserInitState()
116 {
117     scope = scopes;
118     /* no need to define scope->this */
119     scope->this_ = yyexpresult;
120     scope->pscope = scope;
121     scope->type = OBJ_EXPRESS;
122     yyexpresult->symbol.name = yyexpresult->u.express->filename;
123     yyexpresult->symbol.filename = yyexpresult->u.express->filename;
124     yyexpresult->symbol.line = 1;
125 }
126 #line 127 "expparse.c"
127 /* Next is all token values, in a form suitable for use by makeheaders.
128 ** This section will be null unless lemon is run with the -m switch.
129 */
130 /*
131 ** These constants (all generated automatically by the parser generator)
132 ** specify the various kinds of tokens (terminals) that the parser
133 ** understands.
134 **
135 ** Each symbol here is a terminal symbol in the grammar.
136 */
137 /* Make sure the INTERFACE macro is defined.
138 */
139 #ifndef INTERFACE
140 # define INTERFACE 1
141 #endif
142 /* The next thing included is series of defines which control
143 ** various aspects of the generated parser.
144 **    YYCODETYPE         is the data type used for storing terminal
145 **                       and nonterminal numbers.  "unsigned char" is
146 **                       used if there are fewer than 250 terminals
147 **                       and nonterminals.  "int" is used otherwise.
148 **    YYNOCODE           is a number of type YYCODETYPE which corresponds
149 **                       to no legal terminal or nonterminal number.  This
150 **                       number is used to fill in empty slots of the hash
151 **                       table.
152 **    YYFALLBACK         If defined, this indicates that one or more tokens
153 **                       have fall-back values which should be used if the
154 **                       original value of the token will not parse.
155 **    YYACTIONTYPE       is the data type used for storing terminal
156 **                       and nonterminal numbers.  "unsigned char" is
157 **                       used if there are fewer than 250 rules and
158 **                       states combined.  "int" is used otherwise.
159 **    ParseTOKENTYPE     is the data type used for minor tokens given
160 **                       directly to the parser from the tokenizer.
161 **    YYMINORTYPE        is the data type used for all minor tokens.
162 **                       This is typically a union of many types, one of
163 **                       which is ParseTOKENTYPE.  The entry in the union
164 **                       for base tokens is called "yy0".
165 **    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
166 **                       zero the stack is dynamically sized using realloc()
167 **    ParseARG_SDECL     A static variable declaration for the %extra_argument
168 **    ParseARG_PDECL     A parameter declaration for the %extra_argument
169 **    ParseARG_STORE     Code to store %extra_argument into yypParser
170 **    ParseARG_FETCH     Code to extract %extra_argument from yypParser
171 **    YYNSTATE           the combined number of states.
172 **    YYNRULE            the number of rules in the grammar
173 **    YYERRORSYMBOL      is the code number of the error symbol.  If not
174 **                       defined, then do no error processing.
175 */
176 #define YYCODETYPE unsigned short int
177 #define YYNOCODE 280
178 #define YYACTIONTYPE unsigned short int
179 #define ParseTOKENTYPE  YYSTYPE
180 typedef union {
181   int yyinit;
182   ParseTOKENTYPE yy0;
183   struct qualifier yy46;
184   Variable yy91;
185   Op_Code yy126;
186   struct entity_body yy176;
187   Where yy234;
188   struct subsuper_decl yy242;
189   struct type_flags yy252;
190   struct upper_lower yy253;
191   Symbol* yy275;
192   Type yy297;
193   Case_Item yy321;
194   Statement yy332;
195   Linked_List yy371;
196   struct type_either yy378;
197   struct subtypes yy385;
198   Expression yy401;
199   TypeBody yy477;
200   Integer yy507;
201 } YYMINORTYPE;
202 #ifndef YYSTACKDEPTH
203 #define YYSTACKDEPTH 0
204 #endif
205 #define ParseARG_SDECL  parse_data_t parseData ;
206 #define ParseARG_PDECL , parse_data_t parseData
207 #define ParseARG_FETCH  parse_data_t parseData  = yypParser->parseData
208 #define ParseARG_STORE yypParser->parseData  = parseData
209 #define YYNSTATE 645
210 #define YYNRULE 332
211 #define YY_NO_ACTION      (YYNSTATE+YYNRULE+2)
212 #define YY_ACCEPT_ACTION  (YYNSTATE+YYNRULE+1)
213 #define YY_ERROR_ACTION   (YYNSTATE+YYNRULE)
214 
215 /* The yyzerominor constant is used to initialize instances of
216 ** YYMINORTYPE objects to zero. */
217 static const YYMINORTYPE yyzerominor = { 0 };
218 
219 /* Define the yytestcase() macro to be a no-op if is not already defined
220 ** otherwise.
221 **
222 ** Applications can choose to define yytestcase() in the %include section
223 ** to a macro that can assist in verifying code coverage.  For production
224 ** code the yytestcase() macro should be turned off.  But it is useful
225 ** for testing.
226 */
227 #ifndef yytestcase
228 # define yytestcase(X)
229 #endif
230 
231 
232 /* Next are the tables used to determine what action to take based on the
233 ** current state and lookahead token.  These tables are used to implement
234 ** functions that take a state number and lookahead value and return an
235 ** action integer.
236 **
237 ** Suppose the action integer is N.  Then the action is determined as
238 ** follows
239 **
240 **   0 <= N < YYNSTATE                  Shift N.  That is, push the lookahead
241 **                                      token onto the stack and goto state N.
242 **
243 **   YYNSTATE <= N < YYNSTATE+YYNRULE   Reduce by rule N-YYNSTATE.
244 **
245 **   N == YYNSTATE+YYNRULE              A syntax error has occurred.
246 **
247 **   N == YYNSTATE+YYNRULE+1            The parser accepts its input.
248 **
249 **   N == YYNSTATE+YYNRULE+2            No such action.  Denotes unused
250 **                                      slots in the yy_action[] table.
251 **
252 ** The action table is constructed as a single large table named yy_action[].
253 ** Given state S and lookahead X, the action is computed as
254 **
255 **      yy_action[ yy_shift_ofst[S] + X ]
256 **
257 ** If the index value yy_shift_ofst[S]+X is out of range or if the value
258 ** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
259 ** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
260 ** and that yy_default[S] should be used instead.
261 **
262 ** The formula above is for computing the action when the lookahead is
263 ** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
264 ** a reduce action) then the yy_reduce_ofst[] array is used in place of
265 ** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
266 ** YY_SHIFT_USE_DFLT.
267 **
268 ** The following are the tables generated in this section:
269 **
270 **  yy_action[]        A single table containing all actions.
271 **  yy_lookahead[]     A table containing the lookahead for each entry in
272 **                     yy_action.  Used to detect hash collisions.
273 **  yy_shift_ofst[]    For each state, the offset into yy_action for
274 **                     shifting terminals.
275 **  yy_reduce_ofst[]   For each state, the offset into yy_action for
276 **                     shifting non-terminals after a reduce.
277 **  yy_default[]       Default action for each state.
278 */
279 #define YY_ACTTAB_COUNT (2659)
280 static const YYACTIONTYPE yy_action[] = {
281  /*     0 */    77,   78,  614,   67,   68,   45,  380,   71,   69,   70,
282  /*    10 */    72,  248,   79,   74,   73,   16,   42,  583,  396,  395,
283  /*    20 */    75,  483,  482,  388,  368,  599,   57,   56,  450,  602,
284  /*    30 */   268,  597,   60,   35,  596,  379,  594,  598,   66,   89,
285  /*    40 */   593,   44,  153,  158,  559,  619,  618,  113,  112,  569,
286  /*    50 */    77,   78,  203,  550,  612,  168,  523,  249,  110,  613,
287  /*    60 */   306,   15,   79,  611,  108,   16,   42,  175,  621,  606,
288  /*    70 */   449,  525,  159,  388,  301,  378,  608,  607,  605,  604,
289  /*    80 */   603,  405,  408,  183,  409,  179,  407,  169,   66,  387,
290  /*    90 */    87,  978,  118,  403,  203,  619,  618,  113,  112,  401,
291  /*   100 */    77,   78,  612,  544,  612,   60,  518,  244,  535,  613,
292  /*   110 */   170,  611,   79,  611,  144,   16,   42,  549,   39,  606,
293  /*   120 */   396,  395,   75,  388,  301,   82,  608,  607,  605,  604,
294  /*   130 */   603,  524,  467,  454,  466,  469,  864,  465,   66,  387,
295  /*   140 */   350,  468,  526,  234,  633,  619,  618,  396,  348,   75,
296  /*   150 */    77,   78,   73,  132,  612,  467,  470,  466,  469,  613,
297  /*   160 */   465,  311,   79,  611,  468,   16,   42,  346,  616,  606,
298  /*   170 */   447,  122,  333,  388,  247,  224,  608,  607,  605,  604,
299  /*   180 */   603,  467,  464,  466,  469,  550,  465,  550,   66,  387,
300  /*   190 */   468,  227,  167,  113,  112,  619,  618,  113,  112,  557,
301  /*   200 */    77,   78,  516,  346,  612,  467,  463,  466,  469,  613,
302  /*   210 */   465,   39,   79,  611,  468,   16,   42,  359,  237,  606,
303  /*   220 */   864,  122,  442,  312,  445,  615,  608,  607,  605,  604,
304  /*   230 */   603,  367,  365,  361,  402,  731,  111,  545,   66,  387,
305  /*   240 */   405,  209,  171,  373,  170,  619,  618,  337,  154,  549,
306  /*   250 */   102,  549,  644,  251,  612,  777,  510,  334,   36,  613,
307  /*   260 */    67,   68,  250,  611,   71,   69,   70,   72,  479,  606,
308  /*   270 */    74,   73,  137,  144,  114,  344,  608,  607,  605,  604,
309  /*   280 */   603,  589,  587,  590,  131,  585,  584,  588,  591,  387,
310  /*   290 */   586,   67,   68,  514,  130,   71,   69,   70,   72,  609,
311  /*   300 */   125,   74,   73,  777,  115,  154,  222,  620,  510,   23,
312  /*   310 */   114,  473,  386,  510,  402,  496,  495,  494,  493,  492,
313  /*   320 */   491,  490,  489,  488,  487,    2,  302,  512,  569,  322,
314  /*   330 */   129,  318,  165,  373,  163,  623,  245,  243,  576,  575,
315  /*   340 */   242,  240,  543,  527,  315,  451,  223,   29,  154,  215,
316  /*   350 */   356,  236,  625,   19,   26,  626,  510,    3,  627,  632,
317  /*   360 */   631,  521,  630,  629,  642,  162,  161,  343,  218,    5,
318  /*   370 */   385,  286,  496,  495,  494,  493,  492,  491,  490,  489,
319  /*   380 */   488,  487,    2,   71,   69,   70,   72,  129,   43,   74,
320  /*   390 */    73,  431,  154,  355,  432,  430,  525,  433,  632,  631,
321  /*   400 */   510,  630,  629,   41,  428,   39,   14,  204,   12,  134,
322  /*   410 */   517,   13,   84,  107,    3,  496,  495,  494,  493,  492,
323  /*   420 */   491,  490,  489,  488,  487,    2,  550,  612,  642,  429,
324  /*   430 */   129,  642,  542,  520,   67,   68,  611,  304,   71,   69,
325  /*   440 */    70,   72,  154,  298,   74,   73,  103,  335,  521,   40,
326  /*   450 */   510,   39,  581,   63,  190,  521,  216,    3,  232,  496,
327  /*   460 */   495,  494,  493,  492,  491,  490,  489,  488,  487,    2,
328  /*   470 */   435,   67,   68,  335,  129,   71,   69,   70,   72,   91,
329  /*   480 */   335,   74,   73,  434,   90,  154,  223,  354,  421,  580,
330  /*   490 */   548,  640,  316,  510,  563,  559,  362,  641,  639,  638,
331  /*   500 */    39,    3,  637,  636,  635,  634,  117,  229,  238,  496,
332  /*   510 */   495,  494,  493,  492,  491,  490,  489,  488,  487,    2,
333  /*   520 */   522,  121,   85,  521,  129,  185,  378,  519,  186,  154,
334  /*   530 */   352,  401,   39,  309,  569,  331,  503,  510,  246,  164,
335  /*   540 */   174,  623,  245,  243,  576,  575,  242,  240,   10,  349,
336  /*   550 */   562,    3,  496,  495,  494,  493,  492,  491,  490,  489,
337  /*   560 */   488,  487,    2,  330,  308,  551,  556,  129,   39,  628,
338  /*   570 */   625,  173,  172,  626,  486,  100,  627,  632,  631,  154,
339  /*   580 */   630,  629,  413,  362,   39,  182,   39,  510,  551,  425,
340  /*   590 */   362,  202,  310,   98,    3,  520,  496,  495,  494,  493,
341  /*   600 */   492,  491,  490,  489,  488,  487,    2,  135,   76,  377,
342  /*   610 */   329,  129,  467,  462,  466,  469,  299,  465,  415,  297,
343  /*   620 */   199,  468,  154,  376,  485,  375,   21,  558,  624,  625,
344  /*   630 */   510,  560,  626,  529,  374,  627,  632,  631,    3,  630,
345  /*   640 */   629,  120,   24,  126,  369,  140,  496,  495,  494,  493,
346  /*   650 */   492,  491,  490,  489,  488,  487,    2,  529,  362,   14,
347  /*   660 */   204,  129,  228,  353,   13,  378,  327,  351,  231,   53,
348  /*   670 */    51,   54,   47,   49,   48,   52,   55,   46,   50,   14,
349  /*   680 */   204,   57,   56,  230,   13,  402,  332,   60,    3,  496,
350  /*   690 */   495,  494,  493,  492,  491,  490,  489,  488,  487,    2,
351  /*   700 */   467,  461,  466,  469,  129,  465,   14,  204,  225,  468,
352  /*   710 */   642,   13,  366,  188,  642,  315,  363,  444,  617,  364,
353  /*   720 */    53,   51,   54,   47,   49,   48,   52,   55,   46,   50,
354  /*   730 */   109,    3,   57,   56,  104,  360,  541,  106,   60,  515,
355  /*   740 */   357,  221,    9,   20,  478,  477,  476,  601,  370,   27,
356  /*   750 */   116,  220,  217,  212,   32,  637,  636,  635,  634,  117,
357  /*   760 */   207,   18,    9,   20,  478,  477,  476,  347,  866,  206,
358  /*   770 */    80,   25,  205,  342,   97,  637,  636,  635,  634,  117,
359  /*   780 */   460,  201,   95,  160,   92,  336,   93,  198,  331,    9,
360  /*   790 */    20,  478,  477,  476,  453,  197,  193,  192,  136,  426,
361  /*   800 */   324,  187,  637,  636,  635,  634,  117,  189,  331,  323,
362  /*   810 */    53,   51,   54,   47,   49,   48,   52,   55,   46,   50,
363  /*   820 */   418,  321,   57,   56,  467,  459,  466,  469,   60,  465,
364  /*   830 */   184,  416,  177,  468,  319,  331,  180,  176,  123,   58,
365  /*   840 */   317,   53,   51,   54,   47,   49,   48,   52,   55,   46,
366  /*   850 */    50,  441,    8,   57,   56,  196,   11,  643,  642,   60,
367  /*   860 */   143,   53,   51,   54,   47,   49,   48,   52,   55,   46,
368  /*   870 */    50,  325,  400,   57,   56,   39,   67,   68,   61,   60,
369  /*   880 */    71,   69,   70,   72,  582,  622,   74,   73,  595,   21,
370  /*   890 */    53,   51,   54,   47,   49,   48,   52,   55,   46,   50,
371  /*   900 */   577,  574,   57,   56,  467,  458,  466,  469,   60,  465,
372  /*   910 */   241,  573,  572,  468,   59,  239,  566,  578,  235,   53,
373  /*   920 */    51,   54,   47,   49,   48,   52,   55,   46,   50,   37,
374  /*   930 */    86,   57,   56,  119,   83,  569,  561,   60,  467,  457,
375  /*   940 */   466,  469,  600,  465,  233,  141,  540,  468,   38,  105,
376  /*   950 */    53,   51,   54,   47,   49,   48,   52,   55,   46,   50,
377  /*   960 */    81,  533,   57,   56,  530,  115,  536,  539,   60,  359,
378  /*   970 */   467,  456,  466,  469,  538,  465,  445,  537,  571,  468,
379  /*   980 */    53,   51,   54,   47,   49,   48,   52,   55,   46,   50,
380  /*   990 */   384,  599,   57,   56,  532,  602,  278,  597,   60,  253,
381  /*  1000 */   596,  367,  594,  598,  531,  251,  593,   44,  153,  158,
382  /*  1010 */    28,  528,  142,  254,   53,   51,   54,   47,   49,   48,
383  /*  1020 */    52,   55,   46,   50,  137,  513,   57,   56,  508,  507,
384  /*  1030 */   214,  506,   60,   27,   53,   51,   54,   47,   49,   48,
385  /*  1040 */    52,   55,   46,   50,  505,  504,   57,   56,    4,  213,
386  /*  1050 */   500,  498,   60,  497,   53,   51,   54,   47,   49,   48,
387  /*  1060 */    52,   55,   46,   50,  208,    1,   57,   56,  484,   14,
388  /*  1070 */   204,  480,   60,  244,   13,  467,  455,  466,  469,  472,
389  /*  1080 */   465,  211,  446,  139,  468,  303,  452,  448,   99,    6,
390  /*  1090 */    96,   53,   51,   54,   47,   49,   48,   52,   55,   46,
391  /*  1100 */    50,  438,  195,   57,   56,  443,  252,  440,  194,   60,
392  /*  1110 */   124,  439,  437,  436,   31,  191,   53,   51,   54,   47,
393  /*  1120 */    49,   48,   52,   55,   46,   50,  599,  300,   57,   56,
394  /*  1130 */   602,  427,  597,  326,   60,  596,  424,  594,  598,   17,
395  /*  1140 */   423,  593,   44,  154,  157,  422,  420,  419,  417,  133,
396  /*  1150 */   181,  510,  475,   20,  478,  477,  476,  414,  320,  412,
397  /*  1160 */   411,  410,  406,   30,  154,  637,  636,  635,  634,  117,
398  /*  1170 */   599,  178,  510,  521,  602,  151,  597,   88,  399,  596,
399  /*  1180 */   404,  594,  598,  285,  547,  593,   44,  153,  158,  382,
400  /*  1190 */   381,  546,  372,  371,  467,  200,  466,  469,  331,  465,
401  /*  1200 */   534,  642,  338,  468,  499,  101,   22,  339,  244,   94,
402  /*  1210 */   496,  495,  494,  493,  492,  491,  490,  489,  488,  487,
403  /*  1220 */   509,  467,  127,  466,  469,  129,  465,  340,  341,  138,
404  /*  1230 */   468,  496,  495,  494,  493,  492,  491,  490,  489,  488,
405  /*  1240 */   487,  481,   62,  383,  599,  520,  129,  610,  602,  278,
406  /*  1250 */   597,  592,  244,  596,  512,  594,  598,  501,  471,  593,
407  /*  1260 */    44,  153,  158,  555,   53,   51,   54,   47,   49,   48,
408  /*  1270 */    52,   55,   46,   50,  553,  314,   57,   56,  554,  599,
409  /*  1280 */    65,  511,   60,  602,  151,  597,  474,   64,  596,  328,
410  /*  1290 */   594,  598,  979,  979,  593,   44,  153,  158,  599,  305,
411  /*  1300 */   358,  521,  602,  276,  597,  979,  979,  596,  362,  594,
412  /*  1310 */   598,  307,  979,  593,   44,  153,  158,   34,  979,    7,
413  /*  1320 */   979,  979,  979,  979,  979,  979,  244,  979,  979,  219,
414  /*  1330 */   612,  979,  979,  979,  570,  625,  979,  313,  626,  611,
415  /*  1340 */    33,  627,  632,  631,  569,  630,  629,  979,  246,  979,
416  /*  1350 */   174,  623,  245,  243,  576,  575,  242,  240,  979,  979,
417  /*  1360 */   979,  244,  979,  979,  502,  979,  979,  979,  128,  979,
418  /*  1370 */   166,  979,  979,  520,  979,  979,  642,  210,  979,  979,
419  /*  1380 */   244,  173,  172,  552,  599,  979,  979,  979,  602,  261,
420  /*  1390 */   597,  979,  979,  596,  979,  594,  598,  979,  979,  593,
421  /*  1400 */    44,  153,  158,  599,  979,  979,  521,  602,  579,  597,
422  /*  1410 */   979,  979,  596,  979,  594,  598,  284,  979,  593,   44,
423  /*  1420 */   153,  158,  599,  979,  979,  979,  602,  266,  597,  979,
424  /*  1430 */   979,  596,  979,  594,  598,  979,  362,  593,   44,  153,
425  /*  1440 */   158,  599,  979,  979,  979,  602,  265,  597,  979,  979,
426  /*  1450 */   596,  979,  594,  598,  979,  979,  593,   44,  153,  158,
427  /*  1460 */   979,  979,  979,  979,  979,  599,  244,  979,  979,  602,
428  /*  1470 */   398,  597,  979,  979,  596,  979,  594,  598,  520,  979,
429  /*  1480 */   593,   44,  153,  158,  599,  244,  979,  979,  602,  397,
430  /*  1490 */   597,  979,  979,  596,  979,  594,  598,  979,  979,  593,
431  /*  1500 */    44,  153,  158,  979,  244,  979,  979,  979,  979,  599,
432  /*  1510 */   979,  979,  979,  602,  296,  597,  979,  979,  596,  979,
433  /*  1520 */   594,  598,  979,  244,  593,   44,  153,  158,  599,  979,
434  /*  1530 */   979,  979,  602,  295,  597,  979,  979,  596,  979,  594,
435  /*  1540 */   598,  362,  979,  593,   44,  153,  158,  244,  979,  979,
436  /*  1550 */   979,  979,  979,  979,  979,  979,  599,  979,  979,  979,
437  /*  1560 */   602,  294,  597,  979,  979,  596,  244,  594,  598,  979,
438  /*  1570 */   979,  593,   44,  153,  158,  979,  979,  979,  599,  979,
439  /*  1580 */   979,  979,  602,  293,  597,  979,  979,  596,  979,  594,
440  /*  1590 */   598,  244,  979,  593,   44,  153,  158,  599,  979,  979,
441  /*  1600 */   979,  602,  292,  597,  979,  979,  596,  979,  594,  598,
442  /*  1610 */   244,  979,  593,   44,  153,  158,  599,  979,  979,  979,
443  /*  1620 */   602,  291,  597,  979,  979,  596,  979,  594,  598,  979,
444  /*  1630 */   979,  593,   44,  153,  158,  979,  979,  599,  244,  979,
445  /*  1640 */   979,  602,  290,  597,  979,  979,  596,  979,  594,  598,
446  /*  1650 */   979,  979,  593,   44,  153,  158,  979,  979,  979,  979,
447  /*  1660 */   244,  979,  979,  979,  979,  599,  979,  979,  979,  602,
448  /*  1670 */   289,  597,  979,  979,  596,  979,  594,  598,  979,  244,
449  /*  1680 */   593,   44,  153,  158,  599,  979,  979,  979,  602,  288,
450  /*  1690 */   597,  979,  979,  596,  979,  594,  598,  979,  244,  593,
451  /*  1700 */    44,  153,  158,  979,  979,  979,  599,  979,  979,  979,
452  /*  1710 */   602,  287,  597,  979,  979,  596,  979,  594,  598,  244,
453  /*  1720 */   979,  593,   44,  153,  158,  599,  979,  979,  979,  602,
454  /*  1730 */   277,  597,  979,  979,  596,  979,  594,  598,  979,  979,
455  /*  1740 */   593,   44,  153,  158,  599,  979,  979,  244,  602,  264,
456  /*  1750 */   597,  979,  979,  596,  979,  594,  598,  979,  979,  593,
457  /*  1760 */    44,  153,  158,  979,  979,  599,  244,  979,  979,  602,
458  /*  1770 */   263,  597,  979,  979,  596,  979,  594,  598,  979,  979,
459  /*  1780 */   593,   44,  153,  158,  979,  979,  979,  979,  244,  979,
460  /*  1790 */   979,  979,  979,  599,  979,  979,  979,  602,  262,  597,
461  /*  1800 */   979,  979,  596,  979,  594,  598,  979,  244,  593,   44,
462  /*  1810 */   153,  158,  599,  979,  979,  979,  602,  275,  597,  979,
463  /*  1820 */   979,  596,  979,  594,  598,  979,  244,  593,   44,  153,
464  /*  1830 */   158,  979,  979,  979,  599,  979,  979,  979,  602,  274,
465  /*  1840 */   597,  979,  979,  596,  979,  594,  598,  244,  979,  593,
466  /*  1850 */    44,  153,  158,  599,  979,  979,  979,  602,  260,  597,
467  /*  1860 */   979,  979,  596,  979,  594,  598,  979,  979,  593,   44,
468  /*  1870 */   153,  158,  599,  979,  979,  244,  602,  259,  597,  979,
469  /*  1880 */   979,  596,  979,  594,  598,  979,  979,  593,   44,  153,
470  /*  1890 */   158,  979,  979,  599,  244,  979,  979,  602,  273,  597,
471  /*  1900 */   979,  979,  596,  979,  594,  598,  979,  979,  593,   44,
472  /*  1910 */   153,  158,  979,  979,  979,  979,  244,  979,  979,  979,
473  /*  1920 */   979,  599,  979,  979,  979,  602,  150,  597,  979,  979,
474  /*  1930 */   596,  979,  594,  598,  979,  244,  593,   44,  153,  158,
475  /*  1940 */   599,  979,  979,  979,  602,  149,  597,  979,  979,  596,
476  /*  1950 */   979,  594,  598,  979,  244,  593,   44,  153,  158,  979,
477  /*  1960 */   979,  979,  599,  979,  979,  979,  602,  258,  597,  979,
478  /*  1970 */   979,  596,  979,  594,  598,  244,  979,  593,   44,  153,
479  /*  1980 */   158,  599,  979,  979,  979,  602,  257,  597,  979,  979,
480  /*  1990 */   596,  979,  594,  598,  979,  979,  593,   44,  153,  158,
481  /*  2000 */   599,  979,  979,  244,  602,  256,  597,  979,  979,  596,
482  /*  2010 */   979,  594,  598,  979,  979,  593,   44,  153,  158,  979,
483  /*  2020 */   979,  599,  244,  979,  979,  602,  148,  597,  979,  979,
484  /*  2030 */   596,  979,  594,  598,  979,  979,  593,   44,  153,  158,
485  /*  2040 */   979,  979,  979,  979,  244,  979,  979,  979,  979,  599,
486  /*  2050 */   979,  979,  979,  602,  272,  597,  979,  979,  596,  979,
487  /*  2060 */   594,  598,  979,  244,  593,   44,  153,  158,  599,  979,
488  /*  2070 */   979,  979,  602,  255,  597,  979,  979,  596,  979,  594,
489  /*  2080 */   598,  979,  244,  593,   44,  153,  158,  979,  979,  979,
490  /*  2090 */   599,  979,  979,  979,  602,  271,  597,  979,  979,  596,
491  /*  2100 */   979,  594,  598,  244,  979,  593,   44,  153,  158,  599,
492  /*  2110 */   979,  979,  979,  602,  270,  597,  979,  979,  596,  979,
493  /*  2120 */   594,  598,  979,  979,  593,   44,  153,  158,  599,  979,
494  /*  2130 */   979,  244,  602,  269,  597,  979,  979,  596,  979,  594,
495  /*  2140 */   598,  979,  979,  593,   44,  153,  158,  979,  979,  599,
496  /*  2150 */   244,  979,  979,  602,  147,  597,  979,  979,  596,  979,
497  /*  2160 */   594,  598,  979,  979,  593,   44,  153,  158,  979,  979,
498  /*  2170 */   979,  979,  244,  979,  979,  979,  979,  599,  305,  358,
499  /*  2180 */   979,  602,  267,  597,  979,  979,  596,  979,  594,  598,
500  /*  2190 */   979,  244,  593,   44,  153,  158,   34,  979,    7,  979,
501  /*  2200 */   979,  979,  979,  979,  979,  979,  979,  979,  219,  612,
502  /*  2210 */   244,  599,  979,  979,  979,  602,  979,  597,  611,   33,
503  /*  2220 */   596,  979,  594,  598,  979,  979,  593,   44,  279,  158,
504  /*  2230 */   979,  244,  979,  979,  979,  979,  979,  979,  979,  979,
505  /*  2240 */   979,  979,  979,  502,  979,  979,  599,  128,  979,  166,
506  /*  2250 */   602,  979,  597,  979,  979,  596,  210,  594,  598,  244,
507  /*  2260 */   979,  593,   44,  394,  158,  599,  979,  979,  979,  602,
508  /*  2270 */   979,  597,  979,  979,  596,  979,  594,  598,  979,  979,
509  /*  2280 */   593,   44,  393,  158,  979,  979,  599,  979,  979,  979,
510  /*  2290 */   602,  979,  597,  244,  979,  596,  979,  594,  598,  979,
511  /*  2300 */   979,  593,   44,  392,  158,  599,  979,  979,  979,  602,
512  /*  2310 */   979,  597,  979,  979,  596,  979,  594,  598,  979,  979,
513  /*  2320 */   593,   44,  391,  158,  979,  979,  599,  979,  244,  979,
514  /*  2330 */   602,  979,  597,  979,  979,  596,  979,  594,  598,  979,
515  /*  2340 */   979,  593,   44,  390,  158,  599,  979,  244,  979,  602,
516  /*  2350 */   979,  597,  979,  979,  596,  979,  594,  598,  979,  979,
517  /*  2360 */   593,   44,  389,  158,  979,  979,  979,  979,  244,  979,
518  /*  2370 */   979,  979,  979,  979,  599,  979,  979,  979,  602,  979,
519  /*  2380 */   597,  979,  979,  596,  979,  594,  598,  244,  979,  593,
520  /*  2390 */    44,  283,  158,  979,  979,  568,  625,  979,  979,  626,
521  /*  2400 */   979,  979,  627,  632,  631,  599,  630,  629,  244,  602,
522  /*  2410 */   979,  597,  979,  979,  596,  979,  594,  598,  979,  979,
523  /*  2420 */   593,   44,  282,  158,  979,  599,  979,  244,  979,  602,
524  /*  2430 */   979,  597,  979,  979,  596,  979,  594,  598,  979,  979,
525  /*  2440 */   593,   44,  146,  158,  979,  979,  979,  979,  599,  979,
526  /*  2450 */   979,  979,  602,  979,  597,  979,  244,  596,  979,  594,
527  /*  2460 */   598,  979,  979,  593,   44,  145,  158,  979,  979,  979,
528  /*  2470 */   979,  979,  979,  599,  979,  979,  979,  602,  979,  597,
529  /*  2480 */   979,  979,  596,  979,  594,  598,  979,  244,  593,   44,
530  /*  2490 */   152,  158,  567,  625,  979,  979,  626,  979,  979,  627,
531  /*  2500 */   632,  631,  599,  630,  629,  979,  602,  244,  597,  979,
532  /*  2510 */   979,  596,  979,  594,  598,  979,  979,  593,   44,  280,
533  /*  2520 */   158,  979,  979,  979,  979,  979,  979,  979,  979,  979,
534  /*  2530 */   244,  979,  979,  599,  979,  979,  979,  602,  979,  597,
535  /*  2540 */   979,  979,  596,  979,  594,  598,  979,  979,  593,   44,
536  /*  2550 */   281,  158,  979,  599,  979,  244,  979,  602,  979,  597,
537  /*  2560 */   979,  979,  596,  979,  594,  598,  979,  979,  593,   44,
538  /*  2570 */   599,  156,  979,  979,  602,  979,  597,  979,  979,  596,
539  /*  2580 */   979,  594,  598,  979,  244,  593,   44,  979,  155,  979,
540  /*  2590 */   565,  625,  979,  979,  626,  979,  979,  627,  632,  631,
541  /*  2600 */   979,  630,  629,  979,  979,  979,  979,  979,  979,  979,
542  /*  2610 */   979,  979,  979,  979,  979,  244,  564,  625,  979,  979,
543  /*  2620 */   626,  979,  979,  627,  632,  631,  979,  630,  629,  226,
544  /*  2630 */   625,  979,  979,  626,  979,  244,  627,  632,  631,  979,
545  /*  2640 */   630,  629,  979,  979,  979,  979,  345,  625,  979,  979,
546  /*  2650 */   626,  979,  244,  627,  632,  631,  979,  630,  629,
547 };
548 static const YYCODETYPE yy_lookahead[] = {
549  /*     0 */    11,   12,   28,   11,   12,   31,   66,   15,   16,   17,
550  /*    10 */    18,   80,   23,   21,   22,   26,   27,   28,   24,   25,
551  /*    20 */    26,  123,  124,   34,  125,  127,   13,   14,  167,  131,
552  /*    30 */   132,  133,   19,   39,  136,   95,  138,  139,   49,   30,
553  /*    40 */   142,  143,  144,  145,   34,   56,   57,   19,   20,   34,
554  /*    50 */    11,   12,  191,  129,   65,   40,   28,  235,  159,   70,
555  /*    60 */   162,  239,   23,   74,   27,   26,   27,   33,   29,   80,
556  /*    70 */   167,   34,  169,   34,  170,   65,   87,   88,   89,   90,
557  /*    80 */    91,  241,  260,  261,  262,  263,  264,   72,   49,  100,
558  /*    90 */    33,  251,  252,  253,  191,   56,   57,   19,   20,  129,
559  /*   100 */    11,   12,   65,  179,   65,   19,   28,  209,  129,   70,
560  /*   110 */   186,   74,   23,   74,  274,   26,   27,  193,   26,   80,
561  /*   120 */    24,   25,   26,   34,  170,   33,   87,   88,   89,   90,
562  /*   130 */    91,   94,  212,  213,  214,  215,   27,  217,   49,  100,
563  /*   140 */    51,  221,  174,  164,  165,   56,   57,   24,   25,   26,
564  /*   150 */    11,   12,   22,  183,   65,  212,  213,  214,  215,   70,
565  /*   160 */   217,  182,   23,   74,  221,   26,   27,  136,   34,   80,
566  /*   170 */   168,  267,  268,   34,  206,  207,   87,   88,   89,   90,
567  /*   180 */    91,  212,  213,  214,  215,  129,  217,  129,   49,  100,
568  /*   190 */   221,   30,   31,   19,   20,   56,   57,   19,   20,  229,
569  /*   200 */    11,   12,   28,  136,   65,  212,  213,  214,  215,   70,
570  /*   210 */   217,   26,   23,   74,  221,   26,   27,   62,   33,   80,
571  /*   220 */   111,  267,  268,   34,   69,   34,   87,   88,   89,   90,
572  /*   230 */    91,  113,  114,  115,   79,    0,  178,  179,   49,  100,
573  /*   240 */   241,  148,  186,  129,  186,   56,   57,   30,  128,  193,
574  /*   250 */    33,  193,  253,   98,   65,   27,  136,  255,   30,   70,
575  /*   260 */    11,   12,  107,   74,   15,   16,   17,   18,  135,   80,
576  /*   270 */    21,   22,  117,  274,  243,  244,   87,   88,   89,   90,
577  /*   280 */    91,    1,    2,    3,   31,    5,    6,    7,    8,  100,
578  /*   290 */    10,   11,   12,  173,  180,   15,   16,   17,   18,   50,
579  /*   300 */   128,   21,   22,   27,   58,  128,  134,   29,  136,   31,
580  /*   310 */   243,  244,   27,  136,   79,  195,  196,  197,  198,  199,
581  /*   320 */   200,  201,  202,  203,  204,  205,   32,  194,   34,   83,
582  /*   330 */   210,   85,   38,  129,   40,   41,   42,   43,   44,   45,
583  /*   340 */    46,   47,  228,   28,  109,   28,   31,   27,  128,  256,
584  /*   350 */   173,  211,  212,   30,   31,  215,  136,  237,  218,  219,
585  /*   360 */   220,  136,  222,  223,  111,   71,   72,   73,   77,   78,
586  /*   370 */    34,  146,  195,  196,  197,  198,  199,  200,  201,  202,
587  /*   380 */   203,  204,  205,   15,   16,   17,   18,  210,  101,   21,
588  /*   390 */    22,  212,  128,  173,  215,  216,   34,  218,  219,  220,
589  /*   400 */   136,  222,  223,   30,  225,   26,  149,  150,  151,  152,
590  /*   410 */    28,  154,   33,   31,  237,  195,  196,  197,  198,  199,
591  /*   420 */   200,  201,  202,  203,  204,  205,  129,   65,  111,  250,
592  /*   430 */   210,  111,  228,  208,   11,   12,   74,  173,   15,   16,
593  /*   440 */    17,   18,  128,  185,   21,   22,   30,   31,  136,   30,
594  /*   450 */   136,   26,   29,   30,  275,  136,  157,  237,   33,  195,
595  /*   460 */   196,  197,  198,  199,  200,  201,  202,  203,  204,  205,
596  /*   470 */    28,   11,   12,   31,  210,   15,   16,   17,   18,   30,
597  /*   480 */    31,   21,   22,   28,  265,  128,   31,  173,  230,   29,
598  /*   490 */   193,  234,  273,  136,   95,   34,  271,  240,  241,  242,
599  /*   500 */    26,  237,  245,  246,  247,  248,  249,   33,   33,  195,
600  /*   510 */   196,  197,  198,  199,  200,  201,  202,  203,  204,  205,
601  /*   520 */   208,   60,   33,  136,  210,   28,   65,  208,   31,  128,
602  /*   530 */   173,  129,   26,  146,   34,  278,  237,  136,   38,   33,
603  /*   540 */    40,   41,   42,   43,   44,   45,   46,   47,  160,  161,
604  /*   550 */    66,  237,  195,  196,  197,  198,  199,  200,  201,  202,
605  /*   560 */   203,  204,  205,   63,  177,  175,  176,  210,   26,  211,
606  /*   570 */   212,   71,   72,  215,  173,   33,  218,  219,  220,  128,
607  /*   580 */   222,  223,   28,  271,   26,   31,   26,  136,  175,  176,
608  /*   590 */   271,   33,  171,   33,  237,  208,  195,  196,  197,  198,
609  /*   600 */   199,  200,  201,  202,  203,  204,  205,  276,  277,   25,
610  /*   610 */   110,  210,  212,  213,  214,  215,  171,  217,  257,  258,
611  /*   620 */   140,  221,  128,   34,  173,   24,   27,   34,  211,  212,
612  /*   630 */   136,  229,  215,  212,   34,  218,  219,  220,  237,  222,
613  /*   640 */   223,   30,   39,   30,   36,   27,  195,  196,  197,  198,
614  /*   650 */   199,  200,  201,  202,  203,  204,  205,  212,  271,  149,
615  /*   660 */   150,  210,   34,   34,  154,   65,  156,  173,   33,    1,
616  /*   670 */     2,    3,    4,    5,    6,    7,    8,    9,   10,  149,
617  /*   680 */   150,   13,   14,   33,  154,   79,  156,   19,  237,  195,
618  /*   690 */   196,  197,  198,  199,  200,  201,  202,  203,  204,  205,
619  /*   700 */   212,  213,  214,  215,  210,  217,  149,  150,   61,  221,
620  /*   710 */   111,  154,   33,  156,  111,  109,   33,  237,   50,  115,
621  /*   720 */     1,    2,    3,    4,    5,    6,    7,    8,    9,   10,
622  /*   730 */    27,  237,   13,   14,   27,   33,  212,   27,   19,   34,
623  /*   740 */    34,   37,  232,  233,  234,  235,  236,   28,  224,  120,
624  /*   750 */    36,   55,   77,  104,   39,  245,  246,  247,  248,  249,
625  /*   760 */   104,   30,  232,  233,  234,  235,  236,   34,  111,   53,
626  /*   770 */    30,   39,   59,   30,   33,  245,  246,  247,  248,  249,
627  /*   780 */    34,   33,   33,   33,   30,   34,   33,   93,  278,  232,
628  /*   790 */   233,  234,  235,  236,   34,   97,  116,   33,   27,    1,
629  /*   800 */    34,  106,  245,  246,  247,  248,  249,   68,  278,   36,
630  /*   810 */     1,    2,    3,    4,    5,    6,    7,    8,    9,   10,
631  /*   820 */    27,   84,   13,   14,  212,  213,  214,  215,   19,  217,
632  /*   830 */    34,   34,  108,  221,   82,  278,   34,   34,  269,   30,
633  /*   840 */    84,    1,    2,    3,    4,    5,    6,    7,    8,    9,
634  /*   850 */    10,  270,  238,   13,   14,  155,  239,  237,  111,   19,
635  /*   860 */   237,    1,    2,    3,    4,    5,    6,    7,    8,    9,
636  /*   870 */    10,  153,  227,   13,   14,   26,   11,   12,   27,   19,
637  /*   880 */    15,   16,   17,   18,  157,  141,   21,   22,   28,   27,
638  /*   890 */     1,    2,    3,    4,    5,    6,    7,    8,    9,   10,
639  /*   900 */   141,  189,   13,   14,  212,  213,  214,  215,   19,  217,
640  /*   910 */   141,   96,  189,  221,   49,  141,   95,   28,  137,    1,
641  /*   920 */     2,    3,    4,    5,    6,    7,    8,    9,   10,   39,
642  /*   930 */   192,   13,   14,   86,  192,   34,  237,   19,  212,  213,
643  /*   940 */   214,  215,  102,  217,  181,  184,  212,  221,   30,   95,
644  /*   950 */     1,    2,    3,    4,    5,    6,    7,    8,    9,   10,
645  /*   960 */   190,   66,   13,   14,  174,   58,  237,  212,   19,   62,
646  /*   970 */   212,  213,  214,  215,  212,  217,   69,  212,   29,  221,
647  /*   980 */     1,    2,    3,    4,    5,    6,    7,    8,    9,   10,
648  /*   990 */   126,  127,   13,   14,  237,  131,  132,  133,   19,   92,
649  /*  1000 */   136,  113,  138,  139,  237,   98,  142,  143,  144,  145,
650  /*  1010 */   118,  212,   33,  237,    1,    2,    3,    4,    5,    6,
651  /*  1020 */     7,    8,    9,   10,  117,  237,   13,   14,  237,  237,
652  /*  1030 */   148,  237,   19,  120,    1,    2,    3,    4,    5,    6,
653  /*  1040 */     7,    8,    9,   10,  237,  237,   13,   14,  237,  147,
654  /*  1050 */   237,  237,   19,  237,    1,    2,    3,    4,    5,    6,
655  /*  1060 */     7,    8,    9,   10,  147,  237,   13,   14,  237,  149,
656  /*  1070 */   150,  237,   19,  209,  154,  212,  213,  214,  215,  237,
657  /*  1080 */   217,   28,   34,  254,  221,  170,   34,  237,  192,   76,
658  /*  1090 */   192,    1,    2,    3,    4,    5,    6,    7,    8,    9,
659  /*  1100 */    10,   34,  272,   13,   14,  237,  237,  237,  168,   19,
660  /*  1110 */    27,  237,  237,  172,   81,   27,    1,    2,    3,    4,
661  /*  1120 */     5,    6,    7,    8,    9,   10,  127,  170,   13,   14,
662  /*  1130 */   131,  237,  133,  175,   19,  136,  237,  138,  139,  119,
663  /*  1140 */   237,  142,  143,  128,  145,   34,  230,  237,  237,   27,
664  /*  1150 */   259,  136,  232,  233,  234,  235,  236,  257,   34,  237,
665  /*  1160 */   237,  237,  237,   48,  128,  245,  246,  247,  248,  249,
666  /*  1170 */   127,  259,  136,  136,  131,  132,  133,  188,  227,  136,
667  /*  1180 */   237,  138,  139,  146,  237,  142,  143,  144,  145,  227,
668  /*  1190 */   227,  237,  227,  227,  212,  213,  214,  215,  278,  217,
669  /*  1200 */   129,  111,  227,  221,  237,  188,  163,  227,  209,  188,
670  /*  1210 */   195,  196,  197,  198,  199,  200,  201,  202,  203,  204,
671  /*  1220 */   205,  212,  213,  214,  215,  210,  217,  227,  227,  237,
672  /*  1230 */   221,  195,  196,  197,  198,  199,  200,  201,  202,  203,
673  /*  1240 */   204,  205,  226,  126,  127,  208,  210,  266,  131,  132,
674  /*  1250 */   133,  194,  209,  136,  194,  138,  139,  130,   67,  142,
675  /*  1260 */   143,  144,  145,  237,    1,    2,    3,    4,    5,    6,
676  /*  1270 */     7,    8,    9,   10,  231,  158,   13,   14,  237,  127,
677  /*  1280 */   187,  237,   19,  131,  132,  133,  237,  187,  136,   34,
678  /*  1290 */   138,  139,  279,  279,  142,  143,  144,  145,  127,   34,
679  /*  1300 */    35,  136,  131,  132,  133,  279,  279,  136,  271,  138,
680  /*  1310 */   139,  146,  279,  142,  143,  144,  145,   52,  279,   54,
681  /*  1320 */   279,  279,  279,  279,  279,  279,  209,  279,  279,   64,
682  /*  1330 */    65,  279,  279,  279,  211,  212,  279,  166,  215,   74,
683  /*  1340 */    75,  218,  219,  220,   34,  222,  223,  279,   38,  279,
684  /*  1350 */    40,   41,   42,   43,   44,   45,   46,   47,  279,  279,
685  /*  1360 */   279,  209,  279,  279,   99,  279,  279,  279,  103,  279,
686  /*  1370 */   105,  279,  279,  208,  279,  279,  111,  112,  279,  279,
687  /*  1380 */   209,   71,   72,  231,  127,  279,  279,  279,  131,  132,
688  /*  1390 */   133,  279,  279,  136,  279,  138,  139,  279,  279,  142,
689  /*  1400 */   143,  144,  145,  127,  279,  279,  136,  131,  132,  133,
690  /*  1410 */   279,  279,  136,  279,  138,  139,  146,  279,  142,  143,
691  /*  1420 */   144,  145,  127,  279,  279,  279,  131,  132,  133,  279,
692  /*  1430 */   279,  136,  279,  138,  139,  279,  271,  142,  143,  144,
693  /*  1440 */   145,  127,  279,  279,  279,  131,  132,  133,  279,  279,
694  /*  1450 */   136,  279,  138,  139,  279,  279,  142,  143,  144,  145,
695  /*  1460 */   279,  279,  279,  279,  279,  127,  209,  279,  279,  131,
696  /*  1470 */   132,  133,  279,  279,  136,  279,  138,  139,  208,  279,
697  /*  1480 */   142,  143,  144,  145,  127,  209,  279,  279,  131,  132,
698  /*  1490 */   133,  279,  279,  136,  279,  138,  139,  279,  279,  142,
699  /*  1500 */   143,  144,  145,  279,  209,  279,  279,  279,  279,  127,
700  /*  1510 */   279,  279,  279,  131,  132,  133,  279,  279,  136,  279,
701  /*  1520 */   138,  139,  279,  209,  142,  143,  144,  145,  127,  279,
702  /*  1530 */   279,  279,  131,  132,  133,  279,  279,  136,  279,  138,
703  /*  1540 */   139,  271,  279,  142,  143,  144,  145,  209,  279,  279,
704  /*  1550 */   279,  279,  279,  279,  279,  279,  127,  279,  279,  279,
705  /*  1560 */   131,  132,  133,  279,  279,  136,  209,  138,  139,  279,
706  /*  1570 */   279,  142,  143,  144,  145,  279,  279,  279,  127,  279,
707  /*  1580 */   279,  279,  131,  132,  133,  279,  279,  136,  279,  138,
708  /*  1590 */   139,  209,  279,  142,  143,  144,  145,  127,  279,  279,
709  /*  1600 */   279,  131,  132,  133,  279,  279,  136,  279,  138,  139,
710  /*  1610 */   209,  279,  142,  143,  144,  145,  127,  279,  279,  279,
711  /*  1620 */   131,  132,  133,  279,  279,  136,  279,  138,  139,  279,
712  /*  1630 */   279,  142,  143,  144,  145,  279,  279,  127,  209,  279,
713  /*  1640 */   279,  131,  132,  133,  279,  279,  136,  279,  138,  139,
714  /*  1650 */   279,  279,  142,  143,  144,  145,  279,  279,  279,  279,
715  /*  1660 */   209,  279,  279,  279,  279,  127,  279,  279,  279,  131,
716  /*  1670 */   132,  133,  279,  279,  136,  279,  138,  139,  279,  209,
717  /*  1680 */   142,  143,  144,  145,  127,  279,  279,  279,  131,  132,
718  /*  1690 */   133,  279,  279,  136,  279,  138,  139,  279,  209,  142,
719  /*  1700 */   143,  144,  145,  279,  279,  279,  127,  279,  279,  279,
720  /*  1710 */   131,  132,  133,  279,  279,  136,  279,  138,  139,  209,
721  /*  1720 */   279,  142,  143,  144,  145,  127,  279,  279,  279,  131,
722  /*  1730 */   132,  133,  279,  279,  136,  279,  138,  139,  279,  279,
723  /*  1740 */   142,  143,  144,  145,  127,  279,  279,  209,  131,  132,
724  /*  1750 */   133,  279,  279,  136,  279,  138,  139,  279,  279,  142,
725  /*  1760 */   143,  144,  145,  279,  279,  127,  209,  279,  279,  131,
726  /*  1770 */   132,  133,  279,  279,  136,  279,  138,  139,  279,  279,
727  /*  1780 */   142,  143,  144,  145,  279,  279,  279,  279,  209,  279,
728  /*  1790 */   279,  279,  279,  127,  279,  279,  279,  131,  132,  133,
729  /*  1800 */   279,  279,  136,  279,  138,  139,  279,  209,  142,  143,
730  /*  1810 */   144,  145,  127,  279,  279,  279,  131,  132,  133,  279,
731  /*  1820 */   279,  136,  279,  138,  139,  279,  209,  142,  143,  144,
732  /*  1830 */   145,  279,  279,  279,  127,  279,  279,  279,  131,  132,
733  /*  1840 */   133,  279,  279,  136,  279,  138,  139,  209,  279,  142,
734  /*  1850 */   143,  144,  145,  127,  279,  279,  279,  131,  132,  133,
735  /*  1860 */   279,  279,  136,  279,  138,  139,  279,  279,  142,  143,
736  /*  1870 */   144,  145,  127,  279,  279,  209,  131,  132,  133,  279,
737  /*  1880 */   279,  136,  279,  138,  139,  279,  279,  142,  143,  144,
738  /*  1890 */   145,  279,  279,  127,  209,  279,  279,  131,  132,  133,
739  /*  1900 */   279,  279,  136,  279,  138,  139,  279,  279,  142,  143,
740  /*  1910 */   144,  145,  279,  279,  279,  279,  209,  279,  279,  279,
741  /*  1920 */   279,  127,  279,  279,  279,  131,  132,  133,  279,  279,
742  /*  1930 */   136,  279,  138,  139,  279,  209,  142,  143,  144,  145,
743  /*  1940 */   127,  279,  279,  279,  131,  132,  133,  279,  279,  136,
744  /*  1950 */   279,  138,  139,  279,  209,  142,  143,  144,  145,  279,
745  /*  1960 */   279,  279,  127,  279,  279,  279,  131,  132,  133,  279,
746  /*  1970 */   279,  136,  279,  138,  139,  209,  279,  142,  143,  144,
747  /*  1980 */   145,  127,  279,  279,  279,  131,  132,  133,  279,  279,
748  /*  1990 */   136,  279,  138,  139,  279,  279,  142,  143,  144,  145,
749  /*  2000 */   127,  279,  279,  209,  131,  132,  133,  279,  279,  136,
750  /*  2010 */   279,  138,  139,  279,  279,  142,  143,  144,  145,  279,
751  /*  2020 */   279,  127,  209,  279,  279,  131,  132,  133,  279,  279,
752  /*  2030 */   136,  279,  138,  139,  279,  279,  142,  143,  144,  145,
753  /*  2040 */   279,  279,  279,  279,  209,  279,  279,  279,  279,  127,
754  /*  2050 */   279,  279,  279,  131,  132,  133,  279,  279,  136,  279,
755  /*  2060 */   138,  139,  279,  209,  142,  143,  144,  145,  127,  279,
756  /*  2070 */   279,  279,  131,  132,  133,  279,  279,  136,  279,  138,
757  /*  2080 */   139,  279,  209,  142,  143,  144,  145,  279,  279,  279,
758  /*  2090 */   127,  279,  279,  279,  131,  132,  133,  279,  279,  136,
759  /*  2100 */   279,  138,  139,  209,  279,  142,  143,  144,  145,  127,
760  /*  2110 */   279,  279,  279,  131,  132,  133,  279,  279,  136,  279,
761  /*  2120 */   138,  139,  279,  279,  142,  143,  144,  145,  127,  279,
762  /*  2130 */   279,  209,  131,  132,  133,  279,  279,  136,  279,  138,
763  /*  2140 */   139,  279,  279,  142,  143,  144,  145,  279,  279,  127,
764  /*  2150 */   209,  279,  279,  131,  132,  133,  279,  279,  136,  279,
765  /*  2160 */   138,  139,  279,  279,  142,  143,  144,  145,  279,  279,
766  /*  2170 */   279,  279,  209,  279,  279,  279,  279,  127,   34,   35,
767  /*  2180 */   279,  131,  132,  133,  279,  279,  136,  279,  138,  139,
768  /*  2190 */   279,  209,  142,  143,  144,  145,   52,  279,   54,  279,
769  /*  2200 */   279,  279,  279,  279,  279,  279,  279,  279,   64,   65,
770  /*  2210 */   209,  127,  279,  279,  279,  131,  279,  133,   74,   75,
771  /*  2220 */   136,  279,  138,  139,  279,  279,  142,  143,  144,  145,
772  /*  2230 */   279,  209,  279,  279,  279,  279,  279,  279,  279,  279,
773  /*  2240 */   279,  279,  279,   99,  279,  279,  127,  103,  279,  105,
774  /*  2250 */   131,  279,  133,  279,  279,  136,  112,  138,  139,  209,
775  /*  2260 */   279,  142,  143,  144,  145,  127,  279,  279,  279,  131,
776  /*  2270 */   279,  133,  279,  279,  136,  279,  138,  139,  279,  279,
777  /*  2280 */   142,  143,  144,  145,  279,  279,  127,  279,  279,  279,
778  /*  2290 */   131,  279,  133,  209,  279,  136,  279,  138,  139,  279,
779  /*  2300 */   279,  142,  143,  144,  145,  127,  279,  279,  279,  131,
780  /*  2310 */   279,  133,  279,  279,  136,  279,  138,  139,  279,  279,
781  /*  2320 */   142,  143,  144,  145,  279,  279,  127,  279,  209,  279,
782  /*  2330 */   131,  279,  133,  279,  279,  136,  279,  138,  139,  279,
783  /*  2340 */   279,  142,  143,  144,  145,  127,  279,  209,  279,  131,
784  /*  2350 */   279,  133,  279,  279,  136,  279,  138,  139,  279,  279,
785  /*  2360 */   142,  143,  144,  145,  279,  279,  279,  279,  209,  279,
786  /*  2370 */   279,  279,  279,  279,  127,  279,  279,  279,  131,  279,
787  /*  2380 */   133,  279,  279,  136,  279,  138,  139,  209,  279,  142,
788  /*  2390 */   143,  144,  145,  279,  279,  211,  212,  279,  279,  215,
789  /*  2400 */   279,  279,  218,  219,  220,  127,  222,  223,  209,  131,
790  /*  2410 */   279,  133,  279,  279,  136,  279,  138,  139,  279,  279,
791  /*  2420 */   142,  143,  144,  145,  279,  127,  279,  209,  279,  131,
792  /*  2430 */   279,  133,  279,  279,  136,  279,  138,  139,  279,  279,
793  /*  2440 */   142,  143,  144,  145,  279,  279,  279,  279,  127,  279,
794  /*  2450 */   279,  279,  131,  279,  133,  279,  209,  136,  279,  138,
795  /*  2460 */   139,  279,  279,  142,  143,  144,  145,  279,  279,  279,
796  /*  2470 */   279,  279,  279,  127,  279,  279,  279,  131,  279,  133,
797  /*  2480 */   279,  279,  136,  279,  138,  139,  279,  209,  142,  143,
798  /*  2490 */   144,  145,  211,  212,  279,  279,  215,  279,  279,  218,
799  /*  2500 */   219,  220,  127,  222,  223,  279,  131,  209,  133,  279,
800  /*  2510 */   279,  136,  279,  138,  139,  279,  279,  142,  143,  144,
801  /*  2520 */   145,  279,  279,  279,  279,  279,  279,  279,  279,  279,
802  /*  2530 */   209,  279,  279,  127,  279,  279,  279,  131,  279,  133,
803  /*  2540 */   279,  279,  136,  279,  138,  139,  279,  279,  142,  143,
804  /*  2550 */   144,  145,  279,  127,  279,  209,  279,  131,  279,  133,
805  /*  2560 */   279,  279,  136,  279,  138,  139,  279,  279,  142,  143,
806  /*  2570 */   127,  145,  279,  279,  131,  279,  133,  279,  279,  136,
807  /*  2580 */   279,  138,  139,  279,  209,  142,  143,  279,  145,  279,
808  /*  2590 */   211,  212,  279,  279,  215,  279,  279,  218,  219,  220,
809  /*  2600 */   279,  222,  223,  279,  279,  279,  279,  279,  279,  279,
810  /*  2610 */   279,  279,  279,  279,  279,  209,  211,  212,  279,  279,
811  /*  2620 */   215,  279,  279,  218,  219,  220,  279,  222,  223,  211,
812  /*  2630 */   212,  279,  279,  215,  279,  209,  218,  219,  220,  279,
813  /*  2640 */   222,  223,  279,  279,  279,  279,  211,  212,  279,  279,
814  /*  2650 */   215,  279,  209,  218,  219,  220,  279,  222,  223,
815 };
816 #define YY_SHIFT_USE_DFLT (-70)
817 #define YY_SHIFT_COUNT (402)
818 #define YY_SHIFT_MIN   (-69)
819 #define YY_SHIFT_MAX   (2144)
820 static const short yy_shift_ofst[] = {
821  /*     0 */   606, 1265, 1265, 1265, 1265, 1265, 1265, 1265, 1265, 1265,
822  /*    10 */    89,  155,  907,  907,  907,  155,   39,  189, 2144, 2144,
823  /*    20 */   907,  -11,  189,  139,  139,  139,  139,  139,  139,  139,
824  /*    30 */   139,  139,  139,  139,  139,  139,  139,  139,  139,  139,
825  /*    40 */   139,  139,  139,  139,  139,  139,  139,  139,  139,  139,
826  /*    50 */   139,  139,  139,  139,  139,  139,  139,  139,  139,  139,
827  /*    60 */   139,  139,  139,  139,  139,  139,  139,  139,  139,  139,
828  /*    70 */   139,  139,  139,  139,  139,  139,  500,  139,  139,  139,
829  /*    80 */  1310, 1310, 1310, 1310, 1310, 1310, 1310, 1310, 1310, 1310,
830  /*    90 */   246,  294,  294,  294,  294,  294,  294,  294,  294,  294,
831  /*   100 */   294,  294,  294,  294,   37,  600,   37,   37,   37,   37,
832  /*   110 */   461,  600,   37,   37,  362,  362,  362,  118,  235,   10,
833  /*   120 */    10,   10, 1052, 1052, 1191,  123,   15,  603,  629,  599,
834  /*   130 */    10,   10,   10, 1124, 1111, 1020,  901, 1255, 1191, 1083,
835  /*   140 */   901, 1020,  -70,  -70,  -70,  280,  280, 1090, 1115, 1090,
836  /*   150 */  1090, 1090,  249,  865,   -6,   96,   96,   96,   96,  317,
837  /*   160 */   -60,  560,  558,  542,  -60,  506,  320,   10,  474,  425,
838  /*   170 */   253,  253,  379,  185,   92,  -60,  747,  747,  747, 1122,
839  /*   180 */   747,  747, 1124, 1122,  747,  747, 1111,  747, 1020,  747,
840  /*   190 */   747, 1052, 1088,  747,  747, 1083, 1067,  747,  747,  747,
841  /*   200 */   747,  821,  821, 1052, 1048,  747,  747,  747,  747,  892,
842  /*   210 */   747,  747,  747,  747,  892,  913,  747,  747,  747,  747,
843  /*   220 */   747,  747,  747,  901,  888,  747,  747,  895,  747,  901,
844  /*   230 */   901,  901,  901,  854,  847,  747,  890,  821,  821,  815,
845  /*   240 */   851,  815,  851,  851,  862,  851,  849,  747,  747,  -70,
846  /*   250 */   -70,  -70,  -70,  -70,  -70, 1053, 1033, 1013,  979,  949,
847  /*   260 */   918,  889,  860,  840,  719,  668,  809, 1263, 1263, 1263,
848  /*   270 */  1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,  423,
849  /*   280 */   460,   -8,  368,  368,  174,   78,   28,   13,   13,   13,
850  /*   290 */    13,   13,   13,   13,   13,   13,   13,  554,  497,  455,
851  /*   300 */   442,  449,  217,  416,  291,  109,  323,  178,  382,  178,
852  /*   310 */   315,  161,  228,  -26,  278,  803,  724,  802,  756,  797,
853  /*   320 */   752,  796,  737,  793,  773,  766,  695,  739,  798,  771,
854  /*   330 */   764,  680,  698,  694,  754,  760,  753,  751,  750,  749,
855  /*   340 */   748,  741,  746,  743,  713,  732,  740,  657,  733,  716,
856  /*   350 */   731,  656,  649,  715,  675,  696,  704,  714,  706,  705,
857  /*   360 */   710,  702,  707,  703,  683,  604,  618,  679,  647,  628,
858  /*   370 */   608,  650,  635,  613,  611,  593,  601,  589,  584,  484,
859  /*   380 */   399,  489,  475,  419,  373,  287,  336,  285,  276,  130,
860  /*   390 */   130,  130,  130,  130,  130,  191,  134,   86,   86,   57,
861  /*   400 */    34,    9,  -69,
862 };
863 #define YY_REDUCE_USE_DFLT (-179)
864 #define YY_REDUCE_COUNT (254)
865 #define YY_REDUCE_MIN   (-178)
866 #define YY_REDUCE_MAX   (2443)
867 static const short yy_reduce_ofst[] = {
868  /*     0 */  -160,  494,  451,  401,  357,  314,  264,  220,  177,  120,
869  /*    10 */  -102,  257,  557,  530,  510,  257, 1117, 1043, 1036, 1015,
870  /*    20 */   920, 1171, 1152,  864, 2050, 2022, 2001, 1982, 1963, 1941,
871  /*    30 */  1922, 1894, 1873, 1854, 1835, 1813, 1794, 1766, 1745, 1726,
872  /*    40 */  1707, 1685, 1666, 1638, 1617, 1598, 1579, 1557, 1538, 1510,
873  /*    50 */  1489, 1470, 1451, 1429, 1401, 1382, 1357, 1338, 1314, 1295,
874  /*    60 */  1276, 1257, 2406, 2375, 2346, 2321, 2298, 2278, 2247, 2218,
875  /*    70 */  2199, 2178, 2159, 2138, 2119, 2084,  179, 2443, 2426,  999,
876  /*    80 */  2435, 2418, 2405, 2379, 2281, 2184, 1123,  417,  358,  140,
877  /*    90 */  -178, 1009,  982,  863,  758,  726,  692,  612,  488,  400,
878  /*   100 */    -7,  -31,  -57,  -80,  387,   58, 1270, 1165, 1037,  225,
879  /*   110 */   -21,  -76,  319,  312,   67,   31,  172,  -32,   -1,  114,
880  /*   120 */    56,  -30,  -46,  -96,  -97,  133,  524,  480,   93,  299,
881  /*   130 */   204,  297,  402,  361,  258,  413,  445,  331, -139,    2,
882  /*   140 */   421,  390,  388, -101,  219, 1100, 1093, 1049, 1127, 1044,
883  /*   150 */  1041, 1026,  981, 1016, 1060, 1057, 1057, 1057, 1057,  992,
884  /*   160 */  1021, 1001, 1000,  980, 1017,  975,  967, 1071,  966,  965,
885  /*   170 */   954,  947,  963,  962,  951,  989,  943,  925,  924,  912,
886  /*   180 */   923,  922,  900,  891,  911,  910,  916,  903,  958,  899,
887  /*   190 */   894,  957,  941,  875,  874,  940,  830,  870,  869,  868,
888  /*   200 */   850,  898,  896,  915,  829,  842,  834,  831,  828,  917,
889  /*   210 */   816,  814,  813,  811,  902,  882,  808,  807,  794,  792,
890  /*   220 */   791,  788,  776,  799,  790,  767,  757,  770,  729,  765,
891  /*   230 */   762,  755,  734,  761,  763,  699,  781,  742,  738,  723,
892  /*   240 */   774,  712,  769,  759,  727,  744,  645,  623,  620,  617,
893  /*   250 */   718,  700,  581,  569,  614,
894 };
895 static const YYACTIONTYPE yy_default[] = {
896  /*     0 */   977,  913,  913,  913,  913,  913,  913,  913,  913,  913,
897  /*    10 */   700,  894,  649,  649,  649,  893,  977,  977,  977,  977,
898  /*    20 */   649,  977,  972,  977,  977,  977,  977,  977,  977,  977,
899  /*    30 */   977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
900  /*    40 */   977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
901  /*    50 */   977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
902  /*    60 */   977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
903  /*    70 */   977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
904  /*    80 */   977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
905  /*    90 */   686,  977,  977,  977,  977,  977,  977,  977,  977,  977,
906  /*   100 */   977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
907  /*   110 */   714,  965,  977,  977,  707,  707,  977,  916,  977,  977,
908  /*   120 */   977,  977,  839,  839,  760,  943,  977,  977,  975,  977,
909  /*   130 */   825,  977,  715,  977,  977,  973,  977,  977,  760,  763,
910  /*   140 */   977,  973,  695,  675,  813,  977,  977,  977,  691,  977,
911  /*   150 */   977,  977,  977,  734,  977,  954,  953,  952,  749,  977,
912  /*   160 */   849,  977,  977,  977,  849,  977,  977,  977,  977,  977,
913  /*   170 */   977,  977,  977,  977,  977,  849,  977,  977,  977,  977,
914  /*   180 */   810,  977,  977,  977,  807,  977,  977,  977,  977,  977,
915  /*   190 */   977,  977,  977,  977,  977,  763,  977,  977,  977,  977,
916  /*   200 */   977,  955,  955,  977,  977,  977,  977,  977,  977,  966,
917  /*   210 */   977,  977,  977,  977,  966,  975,  977,  977,  977,  977,
918  /*   220 */   977,  977,  977,  977,  917,  977,  977,  728,  977,  977,
919  /*   230 */   977,  977,  977,  964,  824,  977,  977,  955,  955,  854,
920  /*   240 */   856,  854,  856,  856,  977,  856,  977,  977,  977,  686,
921  /*   250 */   892,  863,  843,  842,  667,  977,  977,  977,  977,  977,
922  /*   260 */   977,  977,  977,  977,  977,  977,  977,  836,  698,  699,
923  /*   270 */   976,  967,  692,  799,  657,  659,  758,  759,  655,  977,
924  /*   280 */   977,  748,  757,  756,  977,  977,  977,  747,  746,  745,
925  /*   290 */   744,  743,  742,  741,  740,  739,  738,  977,  977,  977,
926  /*   300 */   977,  977,  977,  977,  977,  794,  977,  928,  977,  927,
927  /*   310 */   977,  977,  794,  977,  977,  977,  977,  977,  977,  977,
928  /*   320 */   800,  977,  977,  977,  977,  977,  977,  977,  977,  977,
929  /*   330 */   977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
930  /*   340 */   977,  977,  977,  788,  977,  977,  977,  868,  977,  977,
931  /*   350 */   977,  977,  977,  977,  977,  977,  977,  977,  977,  977,
932  /*   360 */   977,  977,  977,  977,  921,  977,  977,  977,  977,  977,
933  /*   370 */   977,  977,  977,  977,  724,  977,  977,  977,  977,  851,
934  /*   380 */   850,  977,  977,  656,  658,  977,  977,  977,  794,  755,
935  /*   390 */   754,  753,  752,  751,  750,  977,  977,  737,  736,  977,
936  /*   400 */   977,  977,  977,  732,  897,  896,  895,  814,  812,  811,
937  /*   410 */   809,  808,  806,  804,  803,  802,  801,  805,  891,  890,
938  /*   420 */   889,  888,  887,  886,  772,  941,  939,  938,  937,  936,
939  /*   430 */   935,  934,  933,  932,  898,  847,  722,  940,  862,  861,
940  /*   440 */   860,  841,  840,  838,  837,  774,  775,  776,  773,  765,
941  /*   450 */   766,  764,  790,  791,  762,  661,  781,  783,  785,  787,
942  /*   460 */   789,  786,  784,  782,  780,  779,  770,  769,  768,  767,
943  /*   470 */   660,  761,  709,  708,  706,  650,  648,  647,  646,  942,
944  /*   480 */   702,  701,  697,  696,  882,  915,  914,  912,  911,  910,
945  /*   490 */   909,  908,  907,  906,  905,  904,  903,  902,  884,  883,
946  /*   500 */   881,  798,  865,  859,  858,  796,  795,  723,  703,  694,
947  /*   510 */   670,  671,  669,  666,  645,  721,  922,  930,  931,  926,
948  /*   520 */   924,  929,  925,  923,  848,  794,  918,  920,  846,  845,
949  /*   530 */   919,  720,  730,  729,  727,  726,  823,  820,  819,  818,
950  /*   540 */   817,  816,  822,  821,  963,  962,  960,  961,  959,  958,
951  /*   550 */   957,  974,  971,  970,  969,  968,  719,  717,  725,  724,
952  /*   560 */   718,  716,  853,  852,  678,  828,  956,  901,  900,  844,
953  /*   570 */   827,  826,  685,  855,  684,  683,  682,  681,  857,  735,
954  /*   580 */   870,  869,  771,  652,  880,  879,  878,  877,  876,  875,
955  /*   590 */   874,  873,  945,  951,  950,  949,  948,  947,  946,  944,
956  /*   600 */   872,  871,  835,  834,  833,  832,  831,  830,  829,  885,
957  /*   610 */   815,  793,  792,  778,  651,  868,  867,  693,  705,  704,
958  /*   620 */   654,  653,  680,  679,  677,  674,  673,  672,  668,  665,
959  /*   630 */   664,  663,  662,  676,  713,  712,  711,  710,  690,  689,
960  /*   640 */   688,  687,  899,  797,  733,
961 };
962 
963 /* The next table maps tokens into fallback tokens.  If a construct
964 ** like the following:
965 **
966 **      %fallback ID X Y Z.
967 **
968 ** appears in the grammar, then ID becomes a fallback token for X, Y,
969 ** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
970 ** but it does not parse, the type of the token is changed to ID and
971 ** the parse is retried before an error is thrown.
972 */
973 #ifdef YYFALLBACK
974 static const YYCODETYPE yyFallback[] = {
975 };
976 #endif /* YYFALLBACK */
977 
978 /* The following structure represents a single element of the
979 ** parser's stack.  Information stored includes:
980 **
981 **   +  The state number for the parser at this level of the stack.
982 **
983 **   +  The value of the token stored at this level of the stack.
984 **      (In other words, the "major" token.)
985 **
986 **   +  The semantic value stored at this level of the stack.  This is
987 **      the information used by the action routines in the grammar.
988 **      It is sometimes called the "minor" token.
989 */
990 struct yyStackEntry {
991   YYACTIONTYPE stateno;  /* The state-number */
992   YYCODETYPE major;      /* The major token value.  This is the code
993                          ** number for the token at this stack level */
994   YYMINORTYPE minor;     /* The user-supplied minor token value.  This
995                          ** is the value of the token  */
996 };
997 typedef struct yyStackEntry yyStackEntry;
998 
999 /* The state of the parser is completely contained in an instance of
1000 ** the following structure */
1001 struct yyParser {
1002   int yyidx;                    /* Index of top element in stack */
1003 #ifdef YYTRACKMAXSTACKDEPTH
1004   int yyidxMax;                 /* Maximum value of yyidx */
1005 #endif
1006   int yyerrcnt;                 /* Shifts left before out of the error */
1007   ParseARG_SDECL                /* A place to hold %extra_argument */
1008 #if YYSTACKDEPTH<=0
1009   int yystksz;                  /* Current side of the stack */
1010   yyStackEntry *yystack;        /* The parser's stack */
1011 #else
1012   yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
1013 #endif
1014 };
1015 typedef struct yyParser yyParser;
1016 
1017 #ifndef NDEBUG
1018 #include <stdio.h>
1019 static FILE *yyTraceFILE = 0;
1020 static char *yyTracePrompt = 0;
1021 #endif /* NDEBUG */
1022 
1023 #ifndef NDEBUG
1024 /*
1025 ** Turn parser tracing on by giving a stream to which to write the trace
1026 ** and a prompt to preface each trace message.  Tracing is turned off
1027 ** by making either argument NULL
1028 **
1029 ** Inputs:
1030 ** <ul>
1031 ** <li> A FILE* to which trace output should be written.
1032 **      If NULL, then tracing is turned off.
1033 ** <li> A prefix string written at the beginning of every
1034 **      line of trace output.  If NULL, then tracing is
1035 **      turned off.
1036 ** </ul>
1037 **
1038 ** Outputs:
1039 ** None.
1040 */
ParseTrace(FILE * TraceFILE,char * zTracePrompt)1041 void ParseTrace(FILE *TraceFILE, char *zTracePrompt){
1042   yyTraceFILE = TraceFILE;
1043   yyTracePrompt = zTracePrompt;
1044   if( yyTraceFILE==0 ) yyTracePrompt = 0;
1045   else if( yyTracePrompt==0 ) yyTraceFILE = 0;
1046 }
1047 #endif /* NDEBUG */
1048 
1049 #ifndef NDEBUG
1050 /* For tracing shifts, the names of all terminals and nonterminals
1051 ** are required.  The following table supplies these names */
1052 static const char *const yyTokenName[] = {
1053   "$",             "TOK_EQUAL",     "TOK_GREATER_EQUAL",  "TOK_GREATER_THAN",
1054   "TOK_IN",        "TOK_INST_EQUAL",  "TOK_INST_NOT_EQUAL",  "TOK_LESS_EQUAL",
1055   "TOK_LESS_THAN",  "TOK_LIKE",      "TOK_NOT_EQUAL",  "TOK_MINUS",
1056   "TOK_PLUS",      "TOK_OR",        "TOK_XOR",       "TOK_DIV",
1057   "TOK_MOD",       "TOK_REAL_DIV",  "TOK_TIMES",     "TOK_AND",
1058   "TOK_ANDOR",     "TOK_CONCAT_OP",  "TOK_EXP",       "TOK_NOT",
1059   "TOK_DOT",       "TOK_BACKSLASH",  "TOK_LEFT_BRACKET",  "TOK_LEFT_PAREN",
1060   "TOK_RIGHT_PAREN",  "TOK_RIGHT_BRACKET",  "TOK_COLON",     "TOK_COMMA",
1061   "TOK_AGGREGATE",  "TOK_OF",        "TOK_IDENTIFIER",  "TOK_ALIAS",
1062   "TOK_FOR",       "TOK_END_ALIAS",  "TOK_ARRAY",     "TOK_ASSIGNMENT",
1063   "TOK_BAG",       "TOK_BOOLEAN",   "TOK_INTEGER",   "TOK_REAL",
1064   "TOK_NUMBER",    "TOK_LOGICAL",   "TOK_BINARY",    "TOK_STRING",
1065   "TOK_BY",        "TOK_LEFT_CURL",  "TOK_RIGHT_CURL",  "TOK_OTHERWISE",
1066   "TOK_CASE",      "TOK_END_CASE",  "TOK_BEGIN",     "TOK_END",
1067   "TOK_PI",        "TOK_E",         "TOK_CONSTANT",  "TOK_END_CONSTANT",
1068   "TOK_DERIVE",    "TOK_END_ENTITY",  "TOK_ENTITY",    "TOK_ENUMERATION",
1069   "TOK_ESCAPE",    "TOK_SELF",      "TOK_OPTIONAL",  "TOK_VAR",
1070   "TOK_END_FUNCTION",  "TOK_FUNCTION",  "TOK_BUILTIN_FUNCTION",  "TOK_LIST",
1071   "TOK_SET",       "TOK_GENERIC",   "TOK_QUESTION_MARK",  "TOK_IF",
1072   "TOK_THEN",      "TOK_END_IF",    "TOK_ELSE",      "TOK_INCLUDE",
1073   "TOK_STRING_LITERAL",  "TOK_TO",        "TOK_AS",        "TOK_REFERENCE",
1074   "TOK_FROM",      "TOK_USE",       "TOK_INVERSE",   "TOK_INTEGER_LITERAL",
1075   "TOK_REAL_LITERAL",  "TOK_STRING_LITERAL_ENCODED",  "TOK_LOGICAL_LITERAL",  "TOK_BINARY_LITERAL",
1076   "TOK_LOCAL",     "TOK_END_LOCAL",  "TOK_ONEOF",     "TOK_UNIQUE",
1077   "TOK_FIXED",     "TOK_END_PROCEDURE",  "TOK_PROCEDURE",  "TOK_BUILTIN_PROCEDURE",
1078   "TOK_QUERY",     "TOK_ALL_IN",    "TOK_SUCH_THAT",  "TOK_REPEAT",
1079   "TOK_END_REPEAT",  "TOK_RETURN",    "TOK_END_RULE",  "TOK_RULE",
1080   "TOK_END_SCHEMA",  "TOK_SCHEMA",    "TOK_SELECT",    "TOK_SEMICOLON",
1081   "TOK_SKIP",      "TOK_SUBTYPE",   "TOK_ABSTRACT",  "TOK_SUPERTYPE",
1082   "TOK_END_TYPE",  "TOK_TYPE",      "TOK_UNTIL",     "TOK_WHERE",
1083   "TOK_WHILE",     "error",         "statement_list",  "case_action",
1084   "case_otherwise",  "entity_body",   "aggregate_init_element",  "aggregate_initializer",
1085   "assignable",    "attribute_decl",  "by_expression",  "constant",
1086   "expression",    "function_call",  "general_ref",   "group_ref",
1087   "identifier",    "initializer",   "interval",      "literal",
1088   "local_initializer",  "precision_spec",  "query_expression",  "query_start",
1089   "simple_expression",  "unary_expression",  "supertype_expression",  "until_control",
1090   "while_control",  "function_header",  "fh_lineno",     "rule_header",
1091   "rh_start",      "rh_get_line",   "procedure_header",  "ph_get_line",
1092   "action_body",   "actual_parameters",  "aggregate_init_body",  "explicit_attr_list",
1093   "case_action_list",  "case_block",    "case_labels",   "where_clause_list",
1094   "derive_decl",   "explicit_attribute",  "expression_list",  "formal_parameter",
1095   "formal_parameter_list",  "formal_parameter_rep",  "id_list",       "defined_type_list",
1096   "nested_id_list",  "statement_rep",  "subtype_decl",  "where_rule",
1097   "where_rule_OPT",  "supertype_expression_list",  "labelled_attrib_list_list",  "labelled_attrib_list",
1098   "inverse_attr_list",  "inverse_clause",  "attribute_decl_list",  "derived_attribute_rep",
1099   "unique_clause",  "rule_formal_parameter_list",  "qualified_attr_list",  "rel_op",
1100   "optional_or_unique",  "optional_fixed",  "optional",      "var",
1101   "unique",        "qualified_attr",  "qualifier",     "alias_statement",
1102   "assignment_statement",  "case_statement",  "compound_statement",  "escape_statement",
1103   "if_statement",  "proc_call_statement",  "repeat_statement",  "return_statement",
1104   "skip_statement",  "statement",     "subsuper_decl",  "supertype_decl",
1105   "supertype_factor",  "function_id",   "procedure_id",  "attribute_type",
1106   "defined_type",  "parameter_type",  "generic_type",  "basic_type",
1107   "select_type",   "aggregate_type",  "aggregation_type",  "array_type",
1108   "bag_type",      "conformant_aggregation",  "list_type",     "set_type",
1109   "set_or_bag_of_entity",  "type",          "cardinality_op",  "bound_spec",
1110   "inverse_attr",  "derived_attribute",  "rule_formal_parameter",  "where_clause",
1111   "action_body_item_rep",  "action_body_item",  "declaration",   "constant_decl",
1112   "local_decl",    "semicolon",     "alias_push_scope",  "block_list",
1113   "block_member",  "include_directive",  "rule_decl",     "constant_body",
1114   "constant_body_list",  "entity_decl",   "function_decl",  "procedure_decl",
1115   "type_decl",     "entity_header",  "enumeration_type",  "express_file",
1116   "schema_decl_list",  "schema_decl",   "fh_push_scope",  "fh_plist",
1117   "increment_control",  "rename",        "rename_list",   "parened_rename_list",
1118   "reference_clause",  "reference_head",  "use_clause",    "use_head",
1119   "interface_specification",  "interface_specification_list",  "right_curl",    "local_variable",
1120   "local_body",    "local_decl_rules_on",  "local_decl_rules_off",  "oneof_op",
1121   "ph_push_scope",  "schema_body",   "schema_header",  "type_item_body",
1122   "type_item",     "ti_start",      "td_start",
1123 };
1124 #endif /* NDEBUG */
1125 
1126 #ifndef NDEBUG
1127 /* For tracing reduce actions, the names of all rules are required.
1128 */
1129 static const char *const yyRuleName[] = {
1130  /*   0 */ "action_body ::= action_body_item_rep statement_rep",
1131  /*   1 */ "action_body_item ::= declaration",
1132  /*   2 */ "action_body_item ::= constant_decl",
1133  /*   3 */ "action_body_item ::= local_decl",
1134  /*   4 */ "action_body_item_rep ::=",
1135  /*   5 */ "action_body_item_rep ::= action_body_item action_body_item_rep",
1136  /*   6 */ "actual_parameters ::= TOK_LEFT_PAREN expression_list TOK_RIGHT_PAREN",
1137  /*   7 */ "actual_parameters ::= TOK_LEFT_PAREN TOK_RIGHT_PAREN",
1138  /*   8 */ "aggregate_initializer ::= TOK_LEFT_BRACKET TOK_RIGHT_BRACKET",
1139  /*   9 */ "aggregate_initializer ::= TOK_LEFT_BRACKET aggregate_init_body TOK_RIGHT_BRACKET",
1140  /*  10 */ "aggregate_init_element ::= expression",
1141  /*  11 */ "aggregate_init_body ::= aggregate_init_element",
1142  /*  12 */ "aggregate_init_body ::= aggregate_init_element TOK_COLON expression",
1143  /*  13 */ "aggregate_init_body ::= aggregate_init_body TOK_COMMA aggregate_init_element",
1144  /*  14 */ "aggregate_init_body ::= aggregate_init_body TOK_COMMA aggregate_init_element TOK_COLON expression",
1145  /*  15 */ "aggregate_type ::= TOK_AGGREGATE TOK_OF parameter_type",
1146  /*  16 */ "aggregate_type ::= TOK_AGGREGATE TOK_COLON TOK_IDENTIFIER TOK_OF parameter_type",
1147  /*  17 */ "aggregation_type ::= array_type",
1148  /*  18 */ "aggregation_type ::= bag_type",
1149  /*  19 */ "aggregation_type ::= list_type",
1150  /*  20 */ "aggregation_type ::= set_type",
1151  /*  21 */ "alias_statement ::= TOK_ALIAS TOK_IDENTIFIER TOK_FOR general_ref semicolon alias_push_scope statement_rep TOK_END_ALIAS semicolon",
1152  /*  22 */ "alias_push_scope ::=",
1153  /*  23 */ "array_type ::= TOK_ARRAY bound_spec TOK_OF optional_or_unique attribute_type",
1154  /*  24 */ "assignable ::= assignable qualifier",
1155  /*  25 */ "assignable ::= identifier",
1156  /*  26 */ "assignment_statement ::= assignable TOK_ASSIGNMENT expression semicolon",
1157  /*  27 */ "attribute_type ::= aggregation_type",
1158  /*  28 */ "attribute_type ::= basic_type",
1159  /*  29 */ "attribute_type ::= defined_type",
1160  /*  30 */ "explicit_attr_list ::=",
1161  /*  31 */ "explicit_attr_list ::= explicit_attr_list explicit_attribute",
1162  /*  32 */ "bag_type ::= TOK_BAG bound_spec TOK_OF attribute_type",
1163  /*  33 */ "bag_type ::= TOK_BAG TOK_OF attribute_type",
1164  /*  34 */ "basic_type ::= TOK_BOOLEAN",
1165  /*  35 */ "basic_type ::= TOK_INTEGER precision_spec",
1166  /*  36 */ "basic_type ::= TOK_REAL precision_spec",
1167  /*  37 */ "basic_type ::= TOK_NUMBER",
1168  /*  38 */ "basic_type ::= TOK_LOGICAL",
1169  /*  39 */ "basic_type ::= TOK_BINARY precision_spec optional_fixed",
1170  /*  40 */ "basic_type ::= TOK_STRING precision_spec optional_fixed",
1171  /*  41 */ "block_list ::=",
1172  /*  42 */ "block_list ::= block_list block_member",
1173  /*  43 */ "block_member ::= declaration",
1174  /*  44 */ "block_member ::= include_directive",
1175  /*  45 */ "block_member ::= rule_decl",
1176  /*  46 */ "by_expression ::=",
1177  /*  47 */ "by_expression ::= TOK_BY expression",
1178  /*  48 */ "cardinality_op ::= TOK_LEFT_CURL expression TOK_COLON expression TOK_RIGHT_CURL",
1179  /*  49 */ "case_action ::= case_labels TOK_COLON statement",
1180  /*  50 */ "case_action_list ::=",
1181  /*  51 */ "case_action_list ::= case_action_list case_action",
1182  /*  52 */ "case_block ::= case_action_list case_otherwise",
1183  /*  53 */ "case_labels ::= expression",
1184  /*  54 */ "case_labels ::= case_labels TOK_COMMA expression",
1185  /*  55 */ "case_otherwise ::=",
1186  /*  56 */ "case_otherwise ::= TOK_OTHERWISE TOK_COLON statement",
1187  /*  57 */ "case_statement ::= TOK_CASE expression TOK_OF case_block TOK_END_CASE semicolon",
1188  /*  58 */ "compound_statement ::= TOK_BEGIN statement_rep TOK_END semicolon",
1189  /*  59 */ "constant ::= TOK_PI",
1190  /*  60 */ "constant ::= TOK_E",
1191  /*  61 */ "constant_body ::= identifier TOK_COLON attribute_type TOK_ASSIGNMENT expression semicolon",
1192  /*  62 */ "constant_body_list ::=",
1193  /*  63 */ "constant_body_list ::= constant_body constant_body_list",
1194  /*  64 */ "constant_decl ::= TOK_CONSTANT constant_body_list TOK_END_CONSTANT semicolon",
1195  /*  65 */ "declaration ::= entity_decl",
1196  /*  66 */ "declaration ::= function_decl",
1197  /*  67 */ "declaration ::= procedure_decl",
1198  /*  68 */ "declaration ::= type_decl",
1199  /*  69 */ "derive_decl ::=",
1200  /*  70 */ "derive_decl ::= TOK_DERIVE derived_attribute_rep",
1201  /*  71 */ "derived_attribute ::= attribute_decl TOK_COLON attribute_type initializer semicolon",
1202  /*  72 */ "derived_attribute_rep ::= derived_attribute",
1203  /*  73 */ "derived_attribute_rep ::= derived_attribute_rep derived_attribute",
1204  /*  74 */ "entity_body ::= explicit_attr_list derive_decl inverse_clause unique_clause where_rule_OPT",
1205  /*  75 */ "entity_decl ::= entity_header subsuper_decl semicolon entity_body TOK_END_ENTITY semicolon",
1206  /*  76 */ "entity_header ::= TOK_ENTITY TOK_IDENTIFIER",
1207  /*  77 */ "enumeration_type ::= TOK_ENUMERATION TOK_OF nested_id_list",
1208  /*  78 */ "escape_statement ::= TOK_ESCAPE semicolon",
1209  /*  79 */ "attribute_decl ::= TOK_IDENTIFIER",
1210  /*  80 */ "attribute_decl ::= TOK_SELF TOK_BACKSLASH TOK_IDENTIFIER TOK_DOT TOK_IDENTIFIER",
1211  /*  81 */ "attribute_decl_list ::= attribute_decl",
1212  /*  82 */ "attribute_decl_list ::= attribute_decl_list TOK_COMMA attribute_decl",
1213  /*  83 */ "optional ::=",
1214  /*  84 */ "optional ::= TOK_OPTIONAL",
1215  /*  85 */ "explicit_attribute ::= attribute_decl_list TOK_COLON optional attribute_type semicolon",
1216  /*  86 */ "express_file ::= schema_decl_list",
1217  /*  87 */ "schema_decl_list ::= schema_decl",
1218  /*  88 */ "schema_decl_list ::= schema_decl_list schema_decl",
1219  /*  89 */ "expression ::= simple_expression",
1220  /*  90 */ "expression ::= expression TOK_AND expression",
1221  /*  91 */ "expression ::= expression TOK_OR expression",
1222  /*  92 */ "expression ::= expression TOK_XOR expression",
1223  /*  93 */ "expression ::= expression TOK_LESS_THAN expression",
1224  /*  94 */ "expression ::= expression TOK_GREATER_THAN expression",
1225  /*  95 */ "expression ::= expression TOK_EQUAL expression",
1226  /*  96 */ "expression ::= expression TOK_LESS_EQUAL expression",
1227  /*  97 */ "expression ::= expression TOK_GREATER_EQUAL expression",
1228  /*  98 */ "expression ::= expression TOK_NOT_EQUAL expression",
1229  /*  99 */ "expression ::= expression TOK_INST_EQUAL expression",
1230  /* 100 */ "expression ::= expression TOK_INST_NOT_EQUAL expression",
1231  /* 101 */ "expression ::= expression TOK_IN expression",
1232  /* 102 */ "expression ::= expression TOK_LIKE expression",
1233  /* 103 */ "expression ::= simple_expression cardinality_op simple_expression",
1234  /* 104 */ "simple_expression ::= unary_expression",
1235  /* 105 */ "simple_expression ::= simple_expression TOK_CONCAT_OP simple_expression",
1236  /* 106 */ "simple_expression ::= simple_expression TOK_EXP simple_expression",
1237  /* 107 */ "simple_expression ::= simple_expression TOK_TIMES simple_expression",
1238  /* 108 */ "simple_expression ::= simple_expression TOK_DIV simple_expression",
1239  /* 109 */ "simple_expression ::= simple_expression TOK_REAL_DIV simple_expression",
1240  /* 110 */ "simple_expression ::= simple_expression TOK_MOD simple_expression",
1241  /* 111 */ "simple_expression ::= simple_expression TOK_PLUS simple_expression",
1242  /* 112 */ "simple_expression ::= simple_expression TOK_MINUS simple_expression",
1243  /* 113 */ "expression_list ::= expression",
1244  /* 114 */ "expression_list ::= expression_list TOK_COMMA expression",
1245  /* 115 */ "var ::=",
1246  /* 116 */ "var ::= TOK_VAR",
1247  /* 117 */ "formal_parameter ::= var id_list TOK_COLON parameter_type",
1248  /* 118 */ "formal_parameter_list ::=",
1249  /* 119 */ "formal_parameter_list ::= TOK_LEFT_PAREN formal_parameter_rep TOK_RIGHT_PAREN",
1250  /* 120 */ "formal_parameter_rep ::= formal_parameter",
1251  /* 121 */ "formal_parameter_rep ::= formal_parameter_rep semicolon formal_parameter",
1252  /* 122 */ "parameter_type ::= basic_type",
1253  /* 123 */ "parameter_type ::= conformant_aggregation",
1254  /* 124 */ "parameter_type ::= defined_type",
1255  /* 125 */ "parameter_type ::= generic_type",
1256  /* 126 */ "function_call ::= function_id actual_parameters",
1257  /* 127 */ "function_decl ::= function_header action_body TOK_END_FUNCTION semicolon",
1258  /* 128 */ "function_header ::= fh_lineno fh_push_scope fh_plist TOK_COLON parameter_type semicolon",
1259  /* 129 */ "fh_lineno ::= TOK_FUNCTION",
1260  /* 130 */ "fh_push_scope ::= TOK_IDENTIFIER",
1261  /* 131 */ "fh_plist ::= formal_parameter_list",
1262  /* 132 */ "function_id ::= TOK_IDENTIFIER",
1263  /* 133 */ "function_id ::= TOK_BUILTIN_FUNCTION",
1264  /* 134 */ "conformant_aggregation ::= aggregate_type",
1265  /* 135 */ "conformant_aggregation ::= TOK_ARRAY TOK_OF optional_or_unique parameter_type",
1266  /* 136 */ "conformant_aggregation ::= TOK_ARRAY bound_spec TOK_OF optional_or_unique parameter_type",
1267  /* 137 */ "conformant_aggregation ::= TOK_BAG TOK_OF parameter_type",
1268  /* 138 */ "conformant_aggregation ::= TOK_BAG bound_spec TOK_OF parameter_type",
1269  /* 139 */ "conformant_aggregation ::= TOK_LIST TOK_OF unique parameter_type",
1270  /* 140 */ "conformant_aggregation ::= TOK_LIST bound_spec TOK_OF unique parameter_type",
1271  /* 141 */ "conformant_aggregation ::= TOK_SET TOK_OF parameter_type",
1272  /* 142 */ "conformant_aggregation ::= TOK_SET bound_spec TOK_OF parameter_type",
1273  /* 143 */ "generic_type ::= TOK_GENERIC",
1274  /* 144 */ "generic_type ::= TOK_GENERIC TOK_COLON TOK_IDENTIFIER",
1275  /* 145 */ "id_list ::= TOK_IDENTIFIER",
1276  /* 146 */ "id_list ::= id_list TOK_COMMA TOK_IDENTIFIER",
1277  /* 147 */ "identifier ::= TOK_SELF",
1278  /* 148 */ "identifier ::= TOK_QUESTION_MARK",
1279  /* 149 */ "identifier ::= TOK_IDENTIFIER",
1280  /* 150 */ "if_statement ::= TOK_IF expression TOK_THEN statement_rep TOK_END_IF semicolon",
1281  /* 151 */ "if_statement ::= TOK_IF expression TOK_THEN statement_rep TOK_ELSE statement_rep TOK_END_IF semicolon",
1282  /* 152 */ "include_directive ::= TOK_INCLUDE TOK_STRING_LITERAL semicolon",
1283  /* 153 */ "increment_control ::= TOK_IDENTIFIER TOK_ASSIGNMENT expression TOK_TO expression by_expression",
1284  /* 154 */ "initializer ::= TOK_ASSIGNMENT expression",
1285  /* 155 */ "rename ::= TOK_IDENTIFIER",
1286  /* 156 */ "rename ::= TOK_IDENTIFIER TOK_AS TOK_IDENTIFIER",
1287  /* 157 */ "rename_list ::= rename",
1288  /* 158 */ "rename_list ::= rename_list TOK_COMMA rename",
1289  /* 159 */ "parened_rename_list ::= TOK_LEFT_PAREN rename_list TOK_RIGHT_PAREN",
1290  /* 160 */ "reference_clause ::= TOK_REFERENCE TOK_FROM TOK_IDENTIFIER semicolon",
1291  /* 161 */ "reference_clause ::= reference_head parened_rename_list semicolon",
1292  /* 162 */ "reference_head ::= TOK_REFERENCE TOK_FROM TOK_IDENTIFIER",
1293  /* 163 */ "use_clause ::= TOK_USE TOK_FROM TOK_IDENTIFIER semicolon",
1294  /* 164 */ "use_clause ::= use_head parened_rename_list semicolon",
1295  /* 165 */ "use_head ::= TOK_USE TOK_FROM TOK_IDENTIFIER",
1296  /* 166 */ "interface_specification ::= use_clause",
1297  /* 167 */ "interface_specification ::= reference_clause",
1298  /* 168 */ "interface_specification_list ::=",
1299  /* 169 */ "interface_specification_list ::= interface_specification_list interface_specification",
1300  /* 170 */ "interval ::= TOK_LEFT_CURL simple_expression rel_op simple_expression rel_op simple_expression right_curl",
1301  /* 171 */ "set_or_bag_of_entity ::= defined_type",
1302  /* 172 */ "set_or_bag_of_entity ::= TOK_SET TOK_OF defined_type",
1303  /* 173 */ "set_or_bag_of_entity ::= TOK_SET bound_spec TOK_OF defined_type",
1304  /* 174 */ "set_or_bag_of_entity ::= TOK_BAG bound_spec TOK_OF defined_type",
1305  /* 175 */ "set_or_bag_of_entity ::= TOK_BAG TOK_OF defined_type",
1306  /* 176 */ "inverse_attr_list ::= inverse_attr",
1307  /* 177 */ "inverse_attr_list ::= inverse_attr_list inverse_attr",
1308  /* 178 */ "inverse_attr ::= attribute_decl TOK_COLON set_or_bag_of_entity TOK_FOR TOK_IDENTIFIER semicolon",
1309  /* 179 */ "inverse_clause ::=",
1310  /* 180 */ "inverse_clause ::= TOK_INVERSE inverse_attr_list",
1311  /* 181 */ "bound_spec ::= TOK_LEFT_BRACKET expression TOK_COLON expression TOK_RIGHT_BRACKET",
1312  /* 182 */ "list_type ::= TOK_LIST bound_spec TOK_OF unique attribute_type",
1313  /* 183 */ "list_type ::= TOK_LIST TOK_OF unique attribute_type",
1314  /* 184 */ "literal ::= TOK_INTEGER_LITERAL",
1315  /* 185 */ "literal ::= TOK_REAL_LITERAL",
1316  /* 186 */ "literal ::= TOK_STRING_LITERAL",
1317  /* 187 */ "literal ::= TOK_STRING_LITERAL_ENCODED",
1318  /* 188 */ "literal ::= TOK_LOGICAL_LITERAL",
1319  /* 189 */ "literal ::= TOK_BINARY_LITERAL",
1320  /* 190 */ "literal ::= constant",
1321  /* 191 */ "local_initializer ::= TOK_ASSIGNMENT expression",
1322  /* 192 */ "local_variable ::= id_list TOK_COLON parameter_type semicolon",
1323  /* 193 */ "local_variable ::= id_list TOK_COLON parameter_type local_initializer semicolon",
1324  /* 194 */ "local_body ::=",
1325  /* 195 */ "local_body ::= local_variable local_body",
1326  /* 196 */ "local_decl ::= TOK_LOCAL local_decl_rules_on local_body TOK_END_LOCAL semicolon local_decl_rules_off",
1327  /* 197 */ "local_decl_rules_on ::=",
1328  /* 198 */ "local_decl_rules_off ::=",
1329  /* 199 */ "defined_type ::= TOK_IDENTIFIER",
1330  /* 200 */ "defined_type_list ::= defined_type",
1331  /* 201 */ "defined_type_list ::= defined_type_list TOK_COMMA defined_type",
1332  /* 202 */ "nested_id_list ::= TOK_LEFT_PAREN id_list TOK_RIGHT_PAREN",
1333  /* 203 */ "oneof_op ::= TOK_ONEOF",
1334  /* 204 */ "optional_or_unique ::=",
1335  /* 205 */ "optional_or_unique ::= TOK_OPTIONAL",
1336  /* 206 */ "optional_or_unique ::= TOK_UNIQUE",
1337  /* 207 */ "optional_or_unique ::= TOK_OPTIONAL TOK_UNIQUE",
1338  /* 208 */ "optional_or_unique ::= TOK_UNIQUE TOK_OPTIONAL",
1339  /* 209 */ "optional_fixed ::=",
1340  /* 210 */ "optional_fixed ::= TOK_FIXED",
1341  /* 211 */ "precision_spec ::=",
1342  /* 212 */ "precision_spec ::= TOK_LEFT_PAREN expression TOK_RIGHT_PAREN",
1343  /* 213 */ "proc_call_statement ::= procedure_id actual_parameters semicolon",
1344  /* 214 */ "proc_call_statement ::= procedure_id semicolon",
1345  /* 215 */ "procedure_decl ::= procedure_header action_body TOK_END_PROCEDURE semicolon",
1346  /* 216 */ "procedure_header ::= TOK_PROCEDURE ph_get_line ph_push_scope formal_parameter_list semicolon",
1347  /* 217 */ "ph_push_scope ::= TOK_IDENTIFIER",
1348  /* 218 */ "ph_get_line ::=",
1349  /* 219 */ "procedure_id ::= TOK_IDENTIFIER",
1350  /* 220 */ "procedure_id ::= TOK_BUILTIN_PROCEDURE",
1351  /* 221 */ "group_ref ::= TOK_BACKSLASH TOK_IDENTIFIER",
1352  /* 222 */ "qualifier ::= TOK_DOT TOK_IDENTIFIER",
1353  /* 223 */ "qualifier ::= TOK_BACKSLASH TOK_IDENTIFIER",
1354  /* 224 */ "qualifier ::= TOK_LEFT_BRACKET simple_expression TOK_RIGHT_BRACKET",
1355  /* 225 */ "qualifier ::= TOK_LEFT_BRACKET simple_expression TOK_COLON simple_expression TOK_RIGHT_BRACKET",
1356  /* 226 */ "query_expression ::= query_start expression TOK_RIGHT_PAREN",
1357  /* 227 */ "query_start ::= TOK_QUERY TOK_LEFT_PAREN TOK_IDENTIFIER TOK_ALL_IN expression TOK_SUCH_THAT",
1358  /* 228 */ "rel_op ::= TOK_LESS_THAN",
1359  /* 229 */ "rel_op ::= TOK_GREATER_THAN",
1360  /* 230 */ "rel_op ::= TOK_EQUAL",
1361  /* 231 */ "rel_op ::= TOK_LESS_EQUAL",
1362  /* 232 */ "rel_op ::= TOK_GREATER_EQUAL",
1363  /* 233 */ "rel_op ::= TOK_NOT_EQUAL",
1364  /* 234 */ "rel_op ::= TOK_INST_EQUAL",
1365  /* 235 */ "rel_op ::= TOK_INST_NOT_EQUAL",
1366  /* 236 */ "repeat_statement ::= TOK_REPEAT increment_control while_control until_control semicolon statement_rep TOK_END_REPEAT semicolon",
1367  /* 237 */ "repeat_statement ::= TOK_REPEAT while_control until_control semicolon statement_rep TOK_END_REPEAT semicolon",
1368  /* 238 */ "return_statement ::= TOK_RETURN semicolon",
1369  /* 239 */ "return_statement ::= TOK_RETURN TOK_LEFT_PAREN expression TOK_RIGHT_PAREN semicolon",
1370  /* 240 */ "right_curl ::= TOK_RIGHT_CURL",
1371  /* 241 */ "rule_decl ::= rule_header action_body where_rule TOK_END_RULE semicolon",
1372  /* 242 */ "rule_formal_parameter ::= TOK_IDENTIFIER",
1373  /* 243 */ "rule_formal_parameter_list ::= rule_formal_parameter",
1374  /* 244 */ "rule_formal_parameter_list ::= rule_formal_parameter_list TOK_COMMA rule_formal_parameter",
1375  /* 245 */ "rule_header ::= rh_start rule_formal_parameter_list TOK_RIGHT_PAREN semicolon",
1376  /* 246 */ "rh_start ::= TOK_RULE rh_get_line TOK_IDENTIFIER TOK_FOR TOK_LEFT_PAREN",
1377  /* 247 */ "rh_get_line ::=",
1378  /* 248 */ "schema_body ::= interface_specification_list block_list",
1379  /* 249 */ "schema_body ::= interface_specification_list constant_decl block_list",
1380  /* 250 */ "schema_decl ::= schema_header schema_body TOK_END_SCHEMA semicolon",
1381  /* 251 */ "schema_decl ::= include_directive",
1382  /* 252 */ "schema_header ::= TOK_SCHEMA TOK_IDENTIFIER semicolon",
1383  /* 253 */ "select_type ::= TOK_SELECT TOK_LEFT_PAREN defined_type_list TOK_RIGHT_PAREN",
1384  /* 254 */ "semicolon ::= TOK_SEMICOLON",
1385  /* 255 */ "set_type ::= TOK_SET bound_spec TOK_OF attribute_type",
1386  /* 256 */ "set_type ::= TOK_SET TOK_OF attribute_type",
1387  /* 257 */ "skip_statement ::= TOK_SKIP semicolon",
1388  /* 258 */ "statement ::= alias_statement",
1389  /* 259 */ "statement ::= assignment_statement",
1390  /* 260 */ "statement ::= case_statement",
1391  /* 261 */ "statement ::= compound_statement",
1392  /* 262 */ "statement ::= escape_statement",
1393  /* 263 */ "statement ::= if_statement",
1394  /* 264 */ "statement ::= proc_call_statement",
1395  /* 265 */ "statement ::= repeat_statement",
1396  /* 266 */ "statement ::= return_statement",
1397  /* 267 */ "statement ::= skip_statement",
1398  /* 268 */ "statement_rep ::=",
1399  /* 269 */ "statement_rep ::= semicolon statement_rep",
1400  /* 270 */ "statement_rep ::= statement statement_rep",
1401  /* 271 */ "subsuper_decl ::=",
1402  /* 272 */ "subsuper_decl ::= supertype_decl",
1403  /* 273 */ "subsuper_decl ::= subtype_decl",
1404  /* 274 */ "subsuper_decl ::= supertype_decl subtype_decl",
1405  /* 275 */ "subtype_decl ::= TOK_SUBTYPE TOK_OF TOK_LEFT_PAREN defined_type_list TOK_RIGHT_PAREN",
1406  /* 276 */ "supertype_decl ::= TOK_ABSTRACT TOK_SUPERTYPE",
1407  /* 277 */ "supertype_decl ::= TOK_SUPERTYPE TOK_OF TOK_LEFT_PAREN supertype_expression TOK_RIGHT_PAREN",
1408  /* 278 */ "supertype_decl ::= TOK_ABSTRACT TOK_SUPERTYPE TOK_OF TOK_LEFT_PAREN supertype_expression TOK_RIGHT_PAREN",
1409  /* 279 */ "supertype_expression ::= supertype_factor",
1410  /* 280 */ "supertype_expression ::= supertype_expression TOK_AND supertype_factor",
1411  /* 281 */ "supertype_expression ::= supertype_expression TOK_ANDOR supertype_factor",
1412  /* 282 */ "supertype_expression_list ::= supertype_expression",
1413  /* 283 */ "supertype_expression_list ::= supertype_expression_list TOK_COMMA supertype_expression",
1414  /* 284 */ "supertype_factor ::= identifier",
1415  /* 285 */ "supertype_factor ::= oneof_op TOK_LEFT_PAREN supertype_expression_list TOK_RIGHT_PAREN",
1416  /* 286 */ "supertype_factor ::= TOK_LEFT_PAREN supertype_expression TOK_RIGHT_PAREN",
1417  /* 287 */ "type ::= aggregation_type",
1418  /* 288 */ "type ::= basic_type",
1419  /* 289 */ "type ::= defined_type",
1420  /* 290 */ "type ::= select_type",
1421  /* 291 */ "type_item_body ::= enumeration_type",
1422  /* 292 */ "type_item_body ::= type",
1423  /* 293 */ "type_item ::= ti_start type_item_body semicolon",
1424  /* 294 */ "ti_start ::= TOK_IDENTIFIER TOK_EQUAL",
1425  /* 295 */ "type_decl ::= td_start TOK_END_TYPE semicolon",
1426  /* 296 */ "td_start ::= TOK_TYPE type_item where_rule_OPT",
1427  /* 297 */ "general_ref ::= assignable group_ref",
1428  /* 298 */ "general_ref ::= assignable",
1429  /* 299 */ "unary_expression ::= aggregate_initializer",
1430  /* 300 */ "unary_expression ::= unary_expression qualifier",
1431  /* 301 */ "unary_expression ::= literal",
1432  /* 302 */ "unary_expression ::= function_call",
1433  /* 303 */ "unary_expression ::= identifier",
1434  /* 304 */ "unary_expression ::= TOK_LEFT_PAREN expression TOK_RIGHT_PAREN",
1435  /* 305 */ "unary_expression ::= interval",
1436  /* 306 */ "unary_expression ::= query_expression",
1437  /* 307 */ "unary_expression ::= TOK_NOT unary_expression",
1438  /* 308 */ "unary_expression ::= TOK_PLUS unary_expression",
1439  /* 309 */ "unary_expression ::= TOK_MINUS unary_expression",
1440  /* 310 */ "unique ::=",
1441  /* 311 */ "unique ::= TOK_UNIQUE",
1442  /* 312 */ "qualified_attr ::= attribute_decl",
1443  /* 313 */ "qualified_attr_list ::= qualified_attr",
1444  /* 314 */ "qualified_attr_list ::= qualified_attr_list TOK_COMMA qualified_attr",
1445  /* 315 */ "labelled_attrib_list ::= qualified_attr_list semicolon",
1446  /* 316 */ "labelled_attrib_list ::= TOK_IDENTIFIER TOK_COLON qualified_attr_list semicolon",
1447  /* 317 */ "labelled_attrib_list_list ::= labelled_attrib_list",
1448  /* 318 */ "labelled_attrib_list_list ::= labelled_attrib_list_list labelled_attrib_list",
1449  /* 319 */ "unique_clause ::=",
1450  /* 320 */ "unique_clause ::= TOK_UNIQUE labelled_attrib_list_list",
1451  /* 321 */ "until_control ::=",
1452  /* 322 */ "until_control ::= TOK_UNTIL expression",
1453  /* 323 */ "where_clause ::= expression semicolon",
1454  /* 324 */ "where_clause ::= TOK_IDENTIFIER TOK_COLON expression semicolon",
1455  /* 325 */ "where_clause_list ::= where_clause",
1456  /* 326 */ "where_clause_list ::= where_clause_list where_clause",
1457  /* 327 */ "where_rule ::= TOK_WHERE where_clause_list",
1458  /* 328 */ "where_rule_OPT ::=",
1459  /* 329 */ "where_rule_OPT ::= where_rule",
1460  /* 330 */ "while_control ::=",
1461  /* 331 */ "while_control ::= TOK_WHILE expression",
1462 };
1463 #endif /* NDEBUG */
1464 
1465 
1466 #if YYSTACKDEPTH<=0
1467 /*
1468 ** Try to increase the size of the parser stack.
1469 */
yyGrowStack(yyParser * p)1470 static void yyGrowStack(yyParser *p){
1471   int newSize;
1472   yyStackEntry *pNew;
1473 
1474   newSize = p->yystksz*2 + 256;
1475   pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
1476   if( pNew ){
1477     p->yystack = pNew;
1478     p->yystksz = newSize;
1479 #ifndef NDEBUG
1480     if( yyTraceFILE ){
1481       fprintf(yyTraceFILE,"%sStack grows to %d entries!\n",
1482               yyTracePrompt, p->yystksz);
1483     }
1484 #endif
1485   }
1486 }
1487 #endif
1488 
1489 /*
1490 ** This function allocates a new parser.
1491 ** The only argument is a pointer to a function which works like
1492 ** malloc.
1493 **
1494 ** Inputs:
1495 ** A pointer to the function used to allocate memory.
1496 **
1497 ** Outputs:
1498 ** A pointer to a parser.  This pointer is used in subsequent calls
1499 ** to Parse and ParseFree.
1500 */
ParseAlloc(void * (* mallocProc)(size_t))1501 void *ParseAlloc(void *(*mallocProc)(size_t)){
1502   yyParser *pParser;
1503   pParser = (yyParser*)(*mallocProc)( (size_t)sizeof(yyParser) );
1504   if( pParser ){
1505     pParser->yyidx = -1;
1506 #ifdef YYTRACKMAXSTACKDEPTH
1507     pParser->yyidxMax = 0;
1508 #endif
1509 #if YYSTACKDEPTH<=0
1510     pParser->yystack = NULL;
1511     pParser->yystksz = 0;
1512     yyGrowStack(pParser);
1513 #endif
1514   }
1515   return pParser;
1516 }
1517 
1518 /* The following function deletes the value associated with a
1519 ** symbol.  The symbol can be either a terminal or nonterminal.
1520 ** "yymajor" is the symbol code, and "yypminor" is a pointer to
1521 ** the value.
1522 */
yy_destructor(yyParser * yypParser,YYCODETYPE yymajor,YYMINORTYPE * yypminor)1523 static void yy_destructor(
1524   yyParser *yypParser,    /* The parser */
1525   YYCODETYPE yymajor,     /* Type code for object to destroy */
1526   YYMINORTYPE *yypminor   /* The object to be destroyed */
1527 ){
1528   ParseARG_FETCH;
1529   switch( yymajor ){
1530     /* Here is inserted the actions which take place when a
1531     ** terminal or non-terminal is destroyed.  This can happen
1532     ** when the symbol is popped from the stack during a
1533     ** reduce or during error processing or when a parser is
1534     ** being destroyed before it is finished parsing.
1535     **
1536     ** Note: during a reduce, the only symbols destroyed are those
1537     ** which appear on the RHS of the rule, but which are not used
1538     ** inside the C code.
1539     */
1540     case 122: /* statement_list */
1541 {
1542 #line 124 "expparse.y"
1543 
1544     if (parseData.scanner == NULL) {
1545     (yypminor->yy0).string = (char*)NULL;
1546     }
1547 
1548 #line 1549 "expparse.c"
1549 }
1550       break;
1551     default:  break;   /* If no destructor action specified: do nothing */
1552   }
1553 }
1554 
1555 /*
1556 ** Pop the parser's stack once.
1557 **
1558 ** If there is a destructor routine associated with the token which
1559 ** is popped from the stack, then call it.
1560 **
1561 ** Return the major token number for the symbol popped.
1562 */
yy_pop_parser_stack(yyParser * pParser)1563 static int yy_pop_parser_stack(yyParser *pParser){
1564   YYCODETYPE yymajor;
1565   yyStackEntry *yytos;
1566 
1567   if( pParser->yyidx<0 ) return 0;
1568 
1569   yytos = &pParser->yystack[pParser->yyidx];
1570 
1571 #ifndef NDEBUG
1572   if( yyTraceFILE && pParser->yyidx>=0 ){
1573     fprintf(yyTraceFILE,"%sPopping %s\n",
1574       yyTracePrompt,
1575       yyTokenName[yytos->major]);
1576   }
1577 #endif
1578   yymajor = yytos->major;
1579   yy_destructor(pParser, yymajor, &yytos->minor);
1580   pParser->yyidx--;
1581   return yymajor;
1582 }
1583 
1584 /*
1585 ** Deallocate and destroy a parser.  Destructors are all called for
1586 ** all stack elements before shutting the parser down.
1587 **
1588 ** Inputs:
1589 ** <ul>
1590 ** <li>  A pointer to the parser.  This should be a pointer
1591 **       obtained from ParseAlloc.
1592 ** <li>  A pointer to a function used to reclaim memory obtained
1593 **       from malloc.
1594 ** </ul>
1595 */
ParseFree(void * p,void (* freeProc)(void *))1596 void ParseFree(
1597   void *p,                    /* The parser to be deleted */
1598   void (*freeProc)(void*)     /* Function used to reclaim memory */
1599 ){
1600   yyParser *pParser = (yyParser*)p;
1601   if( pParser==0 ) return;
1602   while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser);
1603 #if YYSTACKDEPTH<=0
1604   free(pParser->yystack);
1605 #endif
1606   (*freeProc)((void*)pParser);
1607 }
1608 
1609 /*
1610 ** Return the peak depth of the stack for a parser.
1611 */
1612 #ifdef YYTRACKMAXSTACKDEPTH
ParseStackPeak(void * p)1613 int ParseStackPeak(void *p){
1614   yyParser *pParser = (yyParser*)p;
1615   return pParser->yyidxMax;
1616 }
1617 #endif
1618 
1619 /*
1620 ** Find the appropriate action for a parser given the terminal
1621 ** look-ahead token iLookAhead.
1622 **
1623 ** If the look-ahead token is YYNOCODE, then check to see if the action is
1624 ** independent of the look-ahead.  If it is, return the action, otherwise
1625 ** return YY_NO_ACTION.
1626 */
yy_find_shift_action(yyParser * pParser,YYCODETYPE iLookAhead)1627 static int yy_find_shift_action(
1628   yyParser *pParser,        /* The parser */
1629   YYCODETYPE iLookAhead     /* The look-ahead token */
1630 ){
1631   int i;
1632   int stateno = pParser->yystack[pParser->yyidx].stateno;
1633 
1634   if( stateno>YY_SHIFT_COUNT
1635    || (i = yy_shift_ofst[stateno])==YY_SHIFT_USE_DFLT ){
1636     return yy_default[stateno];
1637   }
1638   assert( iLookAhead!=YYNOCODE );
1639   i += iLookAhead;
1640   if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
1641     if( iLookAhead>0 ){
1642 #ifdef YYFALLBACK
1643       YYCODETYPE iFallback;            /* Fallback token */
1644       if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
1645              && (iFallback = yyFallback[iLookAhead])!=0 ){
1646 #ifndef NDEBUG
1647         if( yyTraceFILE ){
1648           fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
1649              yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
1650         }
1651 #endif
1652         return yy_find_shift_action(pParser, iFallback);
1653       }
1654 #endif
1655 #ifdef YYWILDCARD
1656       {
1657         int j = i - iLookAhead + YYWILDCARD;
1658         if(
1659 #if YY_SHIFT_MIN+YYWILDCARD<0
1660           j>=0 &&
1661 #endif
1662 #if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
1663           j<YY_ACTTAB_COUNT &&
1664 #endif
1665           yy_lookahead[j]==YYWILDCARD
1666         ){
1667 #ifndef NDEBUG
1668           if( yyTraceFILE ){
1669             fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
1670                yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[YYWILDCARD]);
1671           }
1672 #endif /* NDEBUG */
1673           return yy_action[j];
1674         }
1675       }
1676 #endif /* YYWILDCARD */
1677     }
1678     return yy_default[stateno];
1679   }else{
1680     return yy_action[i];
1681   }
1682 }
1683 
1684 /*
1685 ** Find the appropriate action for a parser given the non-terminal
1686 ** look-ahead token iLookAhead.
1687 **
1688 ** If the look-ahead token is YYNOCODE, then check to see if the action is
1689 ** independent of the look-ahead.  If it is, return the action, otherwise
1690 ** return YY_NO_ACTION.
1691 */
yy_find_reduce_action(int stateno,YYCODETYPE iLookAhead)1692 static int yy_find_reduce_action(
1693   int stateno,              /* Current state number */
1694   YYCODETYPE iLookAhead     /* The look-ahead token */
1695 ){
1696   int i;
1697 #ifdef YYERRORSYMBOL
1698   if( stateno>YY_REDUCE_COUNT ){
1699     return yy_default[stateno];
1700   }
1701 #else
1702   assert( stateno<=YY_REDUCE_COUNT );
1703 #endif
1704   i = yy_reduce_ofst[stateno];
1705   assert( i!=YY_REDUCE_USE_DFLT );
1706   assert( iLookAhead!=YYNOCODE );
1707   i += iLookAhead;
1708 #ifdef YYERRORSYMBOL
1709   if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
1710     return yy_default[stateno];
1711   }
1712 #else
1713   assert( i>=0 && i<YY_ACTTAB_COUNT );
1714   assert( yy_lookahead[i]==iLookAhead );
1715 #endif
1716   return yy_action[i];
1717 }
1718 
1719 /*
1720 ** The following routine is called if the stack overflows.
1721 */
yyStackOverflow(yyParser * yypParser,YYMINORTYPE * yypMinor)1722 static void yyStackOverflow(yyParser *yypParser, YYMINORTYPE *yypMinor){
1723    ParseARG_FETCH;
1724    yypParser->yyidx--;
1725 #ifndef NDEBUG
1726    if( yyTraceFILE ){
1727      fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
1728    }
1729 #endif
1730    while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
1731    /* Here code is inserted which will execute if the parser
1732    ** stack every overflows */
1733 #line 2440 "expparse.y"
1734 
1735     fprintf(stderr, "Express parser experienced stack overflow.\n");
1736     fprintf(stderr, "Last token had value %x\n", yypMinor->yy0.val);
1737 #line 1738 "expparse.c"
1738    ParseARG_STORE; /* Suppress warning about unused %extra_argument var */
1739 }
1740 
1741 /*
1742 ** Perform a shift action.
1743 */
yy_shift(yyParser * yypParser,int yyNewState,int yyMajor,YYMINORTYPE * yypMinor)1744 static void yy_shift(
1745   yyParser *yypParser,          /* The parser to be shifted */
1746   int yyNewState,               /* The new state to shift in */
1747   int yyMajor,                  /* The major token to shift in */
1748   YYMINORTYPE *yypMinor         /* Pointer to the minor token to shift in */
1749 ){
1750   yyStackEntry *yytos;
1751   yypParser->yyidx++;
1752 #ifdef YYTRACKMAXSTACKDEPTH
1753   if( yypParser->yyidx>yypParser->yyidxMax ){
1754     yypParser->yyidxMax = yypParser->yyidx;
1755   }
1756 #endif
1757 #if YYSTACKDEPTH>0
1758   if( yypParser->yyidx>=YYSTACKDEPTH ){
1759     yyStackOverflow(yypParser, yypMinor);
1760     return;
1761   }
1762 #else
1763   if( yypParser->yyidx>=yypParser->yystksz ){
1764     yyGrowStack(yypParser);
1765     if( yypParser->yyidx>=yypParser->yystksz ){
1766       yyStackOverflow(yypParser, yypMinor);
1767       return;
1768     }
1769   }
1770 #endif
1771   yytos = &yypParser->yystack[yypParser->yyidx];
1772   yytos->stateno = (YYACTIONTYPE)yyNewState;
1773   yytos->major = (YYCODETYPE)yyMajor;
1774   yytos->minor = *yypMinor;
1775 #ifndef NDEBUG
1776   if( yyTraceFILE && yypParser->yyidx>0 ){
1777     int i;
1778     fprintf(yyTraceFILE,"%sShift %d\n",yyTracePrompt,yyNewState);
1779     fprintf(yyTraceFILE,"%sStack:",yyTracePrompt);
1780     for(i=1; i<=yypParser->yyidx; i++)
1781       fprintf(yyTraceFILE," %s",yyTokenName[yypParser->yystack[i].major]);
1782     fprintf(yyTraceFILE,"\n");
1783   }
1784 #endif
1785 }
1786 
1787 /* The following table contains information about every rule that
1788 ** is used during the reduce.
1789 */
1790 static const struct {
1791   YYCODETYPE lhs;         /* Symbol on the left-hand side of the rule */
1792   unsigned char nrhs;     /* Number of right-hand side symbols in the rule */
1793 } yyRuleInfo[] = {
1794   { 156, 2 },
1795   { 233, 1 },
1796   { 233, 1 },
1797   { 233, 1 },
1798   { 232, 0 },
1799   { 232, 2 },
1800   { 157, 3 },
1801   { 157, 2 },
1802   { 127, 2 },
1803   { 127, 3 },
1804   { 126, 1 },
1805   { 158, 1 },
1806   { 158, 3 },
1807   { 158, 3 },
1808   { 158, 5 },
1809   { 217, 3 },
1810   { 217, 5 },
1811   { 218, 1 },
1812   { 218, 1 },
1813   { 218, 1 },
1814   { 218, 1 },
1815   { 195, 9 },
1816   { 238, 0 },
1817   { 219, 5 },
1818   { 128, 2 },
1819   { 128, 1 },
1820   { 196, 4 },
1821   { 211, 1 },
1822   { 211, 1 },
1823   { 211, 1 },
1824   { 159, 0 },
1825   { 159, 2 },
1826   { 220, 4 },
1827   { 220, 3 },
1828   { 215, 1 },
1829   { 215, 2 },
1830   { 215, 2 },
1831   { 215, 1 },
1832   { 215, 1 },
1833   { 215, 3 },
1834   { 215, 3 },
1835   { 239, 0 },
1836   { 239, 2 },
1837   { 240, 1 },
1838   { 240, 1 },
1839   { 240, 1 },
1840   { 130, 0 },
1841   { 130, 2 },
1842   { 226, 5 },
1843   { 123, 3 },
1844   { 160, 0 },
1845   { 160, 2 },
1846   { 161, 2 },
1847   { 162, 1 },
1848   { 162, 3 },
1849   { 124, 0 },
1850   { 124, 3 },
1851   { 197, 6 },
1852   { 198, 4 },
1853   { 131, 1 },
1854   { 131, 1 },
1855   { 243, 6 },
1856   { 244, 0 },
1857   { 244, 2 },
1858   { 235, 4 },
1859   { 234, 1 },
1860   { 234, 1 },
1861   { 234, 1 },
1862   { 234, 1 },
1863   { 164, 0 },
1864   { 164, 2 },
1865   { 229, 5 },
1866   { 183, 1 },
1867   { 183, 2 },
1868   { 125, 5 },
1869   { 245, 6 },
1870   { 249, 2 },
1871   { 250, 3 },
1872   { 199, 2 },
1873   { 129, 1 },
1874   { 129, 5 },
1875   { 182, 1 },
1876   { 182, 3 },
1877   { 190, 0 },
1878   { 190, 1 },
1879   { 165, 5 },
1880   { 251, 1 },
1881   { 252, 1 },
1882   { 252, 2 },
1883   { 132, 1 },
1884   { 132, 3 },
1885   { 132, 3 },
1886   { 132, 3 },
1887   { 132, 3 },
1888   { 132, 3 },
1889   { 132, 3 },
1890   { 132, 3 },
1891   { 132, 3 },
1892   { 132, 3 },
1893   { 132, 3 },
1894   { 132, 3 },
1895   { 132, 3 },
1896   { 132, 3 },
1897   { 132, 3 },
1898   { 144, 1 },
1899   { 144, 3 },
1900   { 144, 3 },
1901   { 144, 3 },
1902   { 144, 3 },
1903   { 144, 3 },
1904   { 144, 3 },
1905   { 144, 3 },
1906   { 144, 3 },
1907   { 166, 1 },
1908   { 166, 3 },
1909   { 191, 0 },
1910   { 191, 1 },
1911   { 167, 4 },
1912   { 168, 0 },
1913   { 168, 3 },
1914   { 169, 1 },
1915   { 169, 3 },
1916   { 213, 1 },
1917   { 213, 1 },
1918   { 213, 1 },
1919   { 213, 1 },
1920   { 133, 2 },
1921   { 246, 4 },
1922   { 149, 6 },
1923   { 150, 1 },
1924   { 254, 1 },
1925   { 255, 1 },
1926   { 209, 1 },
1927   { 209, 1 },
1928   { 221, 1 },
1929   { 221, 4 },
1930   { 221, 5 },
1931   { 221, 3 },
1932   { 221, 4 },
1933   { 221, 4 },
1934   { 221, 5 },
1935   { 221, 3 },
1936   { 221, 4 },
1937   { 214, 1 },
1938   { 214, 3 },
1939   { 170, 1 },
1940   { 170, 3 },
1941   { 136, 1 },
1942   { 136, 1 },
1943   { 136, 1 },
1944   { 200, 6 },
1945   { 200, 8 },
1946   { 241, 3 },
1947   { 256, 6 },
1948   { 137, 2 },
1949   { 257, 1 },
1950   { 257, 3 },
1951   { 258, 1 },
1952   { 258, 3 },
1953   { 259, 3 },
1954   { 260, 4 },
1955   { 260, 3 },
1956   { 261, 3 },
1957   { 262, 4 },
1958   { 262, 3 },
1959   { 263, 3 },
1960   { 264, 1 },
1961   { 264, 1 },
1962   { 265, 0 },
1963   { 265, 2 },
1964   { 138, 7 },
1965   { 224, 1 },
1966   { 224, 3 },
1967   { 224, 4 },
1968   { 224, 4 },
1969   { 224, 3 },
1970   { 180, 1 },
1971   { 180, 2 },
1972   { 228, 6 },
1973   { 181, 0 },
1974   { 181, 2 },
1975   { 227, 5 },
1976   { 222, 5 },
1977   { 222, 4 },
1978   { 139, 1 },
1979   { 139, 1 },
1980   { 139, 1 },
1981   { 139, 1 },
1982   { 139, 1 },
1983   { 139, 1 },
1984   { 139, 1 },
1985   { 140, 2 },
1986   { 267, 4 },
1987   { 267, 5 },
1988   { 268, 0 },
1989   { 268, 2 },
1990   { 236, 6 },
1991   { 269, 0 },
1992   { 270, 0 },
1993   { 212, 1 },
1994   { 171, 1 },
1995   { 171, 3 },
1996   { 172, 3 },
1997   { 271, 1 },
1998   { 188, 0 },
1999   { 188, 1 },
2000   { 188, 1 },
2001   { 188, 2 },
2002   { 188, 2 },
2003   { 189, 0 },
2004   { 189, 1 },
2005   { 141, 0 },
2006   { 141, 3 },
2007   { 201, 3 },
2008   { 201, 2 },
2009   { 247, 4 },
2010   { 154, 5 },
2011   { 272, 1 },
2012   { 155, 0 },
2013   { 210, 1 },
2014   { 210, 1 },
2015   { 135, 2 },
2016   { 194, 2 },
2017   { 194, 2 },
2018   { 194, 3 },
2019   { 194, 5 },
2020   { 142, 3 },
2021   { 143, 6 },
2022   { 187, 1 },
2023   { 187, 1 },
2024   { 187, 1 },
2025   { 187, 1 },
2026   { 187, 1 },
2027   { 187, 1 },
2028   { 187, 1 },
2029   { 187, 1 },
2030   { 202, 8 },
2031   { 202, 7 },
2032   { 203, 2 },
2033   { 203, 5 },
2034   { 266, 1 },
2035   { 242, 5 },
2036   { 230, 1 },
2037   { 185, 1 },
2038   { 185, 3 },
2039   { 151, 4 },
2040   { 152, 5 },
2041   { 153, 0 },
2042   { 273, 2 },
2043   { 273, 3 },
2044   { 253, 4 },
2045   { 253, 1 },
2046   { 274, 3 },
2047   { 216, 4 },
2048   { 237, 1 },
2049   { 223, 4 },
2050   { 223, 3 },
2051   { 204, 2 },
2052   { 205, 1 },
2053   { 205, 1 },
2054   { 205, 1 },
2055   { 205, 1 },
2056   { 205, 1 },
2057   { 205, 1 },
2058   { 205, 1 },
2059   { 205, 1 },
2060   { 205, 1 },
2061   { 205, 1 },
2062   { 173, 0 },
2063   { 173, 2 },
2064   { 173, 2 },
2065   { 206, 0 },
2066   { 206, 1 },
2067   { 206, 1 },
2068   { 206, 2 },
2069   { 174, 5 },
2070   { 207, 2 },
2071   { 207, 5 },
2072   { 207, 6 },
2073   { 146, 1 },
2074   { 146, 3 },
2075   { 146, 3 },
2076   { 177, 1 },
2077   { 177, 3 },
2078   { 208, 1 },
2079   { 208, 4 },
2080   { 208, 3 },
2081   { 225, 1 },
2082   { 225, 1 },
2083   { 225, 1 },
2084   { 225, 1 },
2085   { 275, 1 },
2086   { 275, 1 },
2087   { 276, 3 },
2088   { 277, 2 },
2089   { 248, 3 },
2090   { 278, 3 },
2091   { 134, 2 },
2092   { 134, 1 },
2093   { 145, 1 },
2094   { 145, 2 },
2095   { 145, 1 },
2096   { 145, 1 },
2097   { 145, 1 },
2098   { 145, 3 },
2099   { 145, 1 },
2100   { 145, 1 },
2101   { 145, 2 },
2102   { 145, 2 },
2103   { 145, 2 },
2104   { 192, 0 },
2105   { 192, 1 },
2106   { 193, 1 },
2107   { 186, 1 },
2108   { 186, 3 },
2109   { 179, 2 },
2110   { 179, 4 },
2111   { 178, 1 },
2112   { 178, 2 },
2113   { 184, 0 },
2114   { 184, 2 },
2115   { 147, 0 },
2116   { 147, 2 },
2117   { 231, 2 },
2118   { 231, 4 },
2119   { 163, 1 },
2120   { 163, 2 },
2121   { 175, 2 },
2122   { 176, 0 },
2123   { 176, 1 },
2124   { 148, 0 },
2125   { 148, 2 },
2126 };
2127 
2128 static void yy_accept(yyParser*);  /* Forward Declaration */
2129 
2130 /*
2131 ** Perform a reduce action and the shift that must immediately
2132 ** follow the reduce.
2133 */
yy_reduce(yyParser * yypParser,int yyruleno)2134 static void yy_reduce(
2135   yyParser *yypParser,         /* The parser */
2136   int yyruleno                 /* Number of the rule by which to reduce */
2137 ){
2138   int yygoto;                     /* The next state */
2139   int yyact;                      /* The next action */
2140   YYMINORTYPE yygotominor;        /* The LHS of the rule reduced */
2141   yyStackEntry *yymsp;            /* The top of the parser's stack */
2142   int yysize;                     /* Amount to pop the stack */
2143   ParseARG_FETCH;
2144 
2145   yymsp = &yypParser->yystack[yypParser->yyidx];
2146 
2147   if( yyruleno>=0 ) {
2148 #ifndef NDEBUG
2149       if ( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0]))) {
2150          if (yyTraceFILE) {
2151       fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
2152               yyRuleName[yyruleno]);
2153     }
2154    }
2155 #endif /* NDEBUG */
2156   } else {
2157     /* invalid rule number range */
2158     return;
2159   }
2160 
2161 
2162   /* Silence complaints from purify about yygotominor being uninitialized
2163   ** in some cases when it is copied into the stack after the following
2164   ** switch.  yygotominor is uninitialized when a rule reduces that does
2165   ** not set the value of its left-hand side nonterminal.  Leaving the
2166   ** value of the nonterminal uninitialized is utterly harmless as long
2167   ** as the value is never used.  So really the only thing this code
2168   ** accomplishes is to quieten purify.
2169   **
2170   ** 2007-01-16:  The wireshark project (www.wireshark.org) reports that
2171   ** without this code, their parser segfaults.  I'm not sure what there
2172   ** parser is doing to make this happen.  This is the second bug report
2173   ** from wireshark this week.  Clearly they are stressing Lemon in ways
2174   ** that it has not been previously stressed...  (SQLite ticket #2172)
2175   */
2176   /*memset(&yygotominor, 0, sizeof(yygotominor));*/
2177   yygotominor = yyzerominor;
2178 
2179 
2180   switch( yyruleno ){
2181   /* Beginning here are the reduction cases.  A typical example
2182   ** follows:
2183   **   case 0:
2184   **  #line <lineno> <grammarfile>
2185   **     { ... }           // User supplied code
2186   **  #line <lineno> <thisfile>
2187   **     break;
2188   */
2189       case 0: /* action_body ::= action_body_item_rep statement_rep */
2190       case 70: /* derive_decl ::= TOK_DERIVE derived_attribute_rep */ yytestcase(yyruleno==70);
2191       case 180: /* inverse_clause ::= TOK_INVERSE inverse_attr_list */ yytestcase(yyruleno==180);
2192       case 269: /* statement_rep ::= semicolon statement_rep */ yytestcase(yyruleno==269);
2193       case 320: /* unique_clause ::= TOK_UNIQUE labelled_attrib_list_list */ yytestcase(yyruleno==320);
2194       case 327: /* where_rule ::= TOK_WHERE where_clause_list */ yytestcase(yyruleno==327);
2195       case 329: /* where_rule_OPT ::= where_rule */ yytestcase(yyruleno==329);
2196 #line 297 "expparse.y"
2197 {
2198     yygotominor.yy371 = yymsp[0].minor.yy371;
2199 }
2200 #line 2201 "expparse.c"
2201         break;
2202       case 1: /* action_body_item ::= declaration */
2203       case 2: /* action_body_item ::= constant_decl */ yytestcase(yyruleno==2);
2204       case 3: /* action_body_item ::= local_decl */ yytestcase(yyruleno==3);
2205       case 43: /* block_member ::= declaration */ yytestcase(yyruleno==43);
2206       case 44: /* block_member ::= include_directive */ yytestcase(yyruleno==44);
2207       case 45: /* block_member ::= rule_decl */ yytestcase(yyruleno==45);
2208       case 65: /* declaration ::= entity_decl */ yytestcase(yyruleno==65);
2209       case 66: /* declaration ::= function_decl */ yytestcase(yyruleno==66);
2210       case 67: /* declaration ::= procedure_decl */ yytestcase(yyruleno==67);
2211       case 68: /* declaration ::= type_decl */ yytestcase(yyruleno==68);
2212       case 87: /* schema_decl_list ::= schema_decl */ yytestcase(yyruleno==87);
2213       case 157: /* rename_list ::= rename */ yytestcase(yyruleno==157);
2214       case 166: /* interface_specification ::= use_clause */ yytestcase(yyruleno==166);
2215       case 167: /* interface_specification ::= reference_clause */ yytestcase(yyruleno==167);
2216       case 203: /* oneof_op ::= TOK_ONEOF */ yytestcase(yyruleno==203);
2217       case 251: /* schema_decl ::= include_directive */ yytestcase(yyruleno==251);
2218       case 291: /* type_item_body ::= enumeration_type */ yytestcase(yyruleno==291);
2219 #line 303 "expparse.y"
2220 {
2221     yygotominor.yy0 = yymsp[0].minor.yy0;
2222 }
2223 #line 2224 "expparse.c"
2224         break;
2225       case 5: /* action_body_item_rep ::= action_body_item action_body_item_rep */
2226       case 42: /* block_list ::= block_list block_member */ yytestcase(yyruleno==42);
2227       case 63: /* constant_body_list ::= constant_body constant_body_list */ yytestcase(yyruleno==63);
2228       case 88: /* schema_decl_list ::= schema_decl_list schema_decl */ yytestcase(yyruleno==88);
2229       case 169: /* interface_specification_list ::= interface_specification_list interface_specification */ yytestcase(yyruleno==169);
2230       case 195: /* local_body ::= local_variable local_body */ yytestcase(yyruleno==195);
2231       case 248: /* schema_body ::= interface_specification_list block_list */ yytestcase(yyruleno==248);
2232 #line 320 "expparse.y"
2233 {
2234     yygotominor.yy0 = yymsp[-1].minor.yy0;
2235 }
2236 #line 2237 "expparse.c"
2237         break;
2238       case 6: /* actual_parameters ::= TOK_LEFT_PAREN expression_list TOK_RIGHT_PAREN */
2239       case 202: /* nested_id_list ::= TOK_LEFT_PAREN id_list TOK_RIGHT_PAREN */ yytestcase(yyruleno==202);
2240       case 275: /* subtype_decl ::= TOK_SUBTYPE TOK_OF TOK_LEFT_PAREN defined_type_list TOK_RIGHT_PAREN */ yytestcase(yyruleno==275);
2241 #line 337 "expparse.y"
2242 {
2243     yygotominor.yy371 = yymsp[-1].minor.yy371;
2244 }
2245 #line 2246 "expparse.c"
2246         break;
2247       case 7: /* actual_parameters ::= TOK_LEFT_PAREN TOK_RIGHT_PAREN */
2248       case 319: /* unique_clause ::= */ yytestcase(yyruleno==319);
2249 #line 341 "expparse.y"
2250 {
2251     yygotominor.yy371 = 0;
2252 }
2253 #line 2254 "expparse.c"
2254         break;
2255       case 8: /* aggregate_initializer ::= TOK_LEFT_BRACKET TOK_RIGHT_BRACKET */
2256 #line 347 "expparse.y"
2257 {
2258     yygotominor.yy401 = EXPcreate(Type_Aggregate);
2259     yygotominor.yy401->u.list = LISTcreate();
2260 }
2261 #line 2262 "expparse.c"
2262         break;
2263       case 9: /* aggregate_initializer ::= TOK_LEFT_BRACKET aggregate_init_body TOK_RIGHT_BRACKET */
2264 #line 353 "expparse.y"
2265 {
2266     yygotominor.yy401 = EXPcreate(Type_Aggregate);
2267     yygotominor.yy401->u.list = yymsp[-1].minor.yy371;
2268 }
2269 #line 2270 "expparse.c"
2270         break;
2271       case 10: /* aggregate_init_element ::= expression */
2272       case 25: /* assignable ::= identifier */ yytestcase(yyruleno==25);
2273       case 47: /* by_expression ::= TOK_BY expression */ yytestcase(yyruleno==47);
2274       case 89: /* expression ::= simple_expression */ yytestcase(yyruleno==89);
2275       case 104: /* simple_expression ::= unary_expression */ yytestcase(yyruleno==104);
2276       case 154: /* initializer ::= TOK_ASSIGNMENT expression */ yytestcase(yyruleno==154);
2277       case 190: /* literal ::= constant */ yytestcase(yyruleno==190);
2278       case 191: /* local_initializer ::= TOK_ASSIGNMENT expression */ yytestcase(yyruleno==191);
2279       case 298: /* general_ref ::= assignable */ yytestcase(yyruleno==298);
2280       case 299: /* unary_expression ::= aggregate_initializer */ yytestcase(yyruleno==299);
2281       case 301: /* unary_expression ::= literal */ yytestcase(yyruleno==301);
2282       case 302: /* unary_expression ::= function_call */ yytestcase(yyruleno==302);
2283       case 303: /* unary_expression ::= identifier */ yytestcase(yyruleno==303);
2284       case 305: /* unary_expression ::= interval */ yytestcase(yyruleno==305);
2285       case 306: /* unary_expression ::= query_expression */ yytestcase(yyruleno==306);
2286       case 308: /* unary_expression ::= TOK_PLUS unary_expression */ yytestcase(yyruleno==308);
2287       case 312: /* qualified_attr ::= attribute_decl */ yytestcase(yyruleno==312);
2288       case 322: /* until_control ::= TOK_UNTIL expression */ yytestcase(yyruleno==322);
2289       case 331: /* while_control ::= TOK_WHILE expression */ yytestcase(yyruleno==331);
2290 #line 359 "expparse.y"
2291 {
2292     yygotominor.yy401 = yymsp[0].minor.yy401;
2293 }
2294 #line 2295 "expparse.c"
2295         break;
2296       case 11: /* aggregate_init_body ::= aggregate_init_element */
2297       case 113: /* expression_list ::= expression */ yytestcase(yyruleno==113);
2298       case 282: /* supertype_expression_list ::= supertype_expression */ yytestcase(yyruleno==282);
2299       case 313: /* qualified_attr_list ::= qualified_attr */ yytestcase(yyruleno==313);
2300 #line 364 "expparse.y"
2301 {
2302     yygotominor.yy371 = LISTcreate();
2303     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy401);
2304 }
2305 #line 2306 "expparse.c"
2306         break;
2307       case 12: /* aggregate_init_body ::= aggregate_init_element TOK_COLON expression */
2308 #line 369 "expparse.y"
2309 {
2310     yygotominor.yy371 = LISTcreate();
2311     LISTadd_last(yygotominor.yy371, (Generic)yymsp[-2].minor.yy401);
2312 
2313     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy401);
2314 
2315     yymsp[0].minor.yy401->type = Type_Repeat;
2316 }
2317 #line 2318 "expparse.c"
2318         break;
2319       case 13: /* aggregate_init_body ::= aggregate_init_body TOK_COMMA aggregate_init_element */
2320 #line 379 "expparse.y"
2321 {
2322     yygotominor.yy371 = yymsp[-2].minor.yy371;
2323 
2324     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy401);
2325 
2326 }
2327 #line 2328 "expparse.c"
2328         break;
2329       case 14: /* aggregate_init_body ::= aggregate_init_body TOK_COMMA aggregate_init_element TOK_COLON expression */
2330 #line 387 "expparse.y"
2331 {
2332     yygotominor.yy371 = yymsp[-4].minor.yy371;
2333 
2334     LISTadd_last(yygotominor.yy371, (Generic)yymsp[-2].minor.yy401);
2335     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy401);
2336 
2337     yymsp[0].minor.yy401->type = Type_Repeat;
2338 }
2339 #line 2340 "expparse.c"
2340         break;
2341       case 15: /* aggregate_type ::= TOK_AGGREGATE TOK_OF parameter_type */
2342 #line 397 "expparse.y"
2343 {
2344     yygotominor.yy477 = TYPEBODYcreate(aggregate_);
2345     yygotominor.yy477->base = yymsp[0].minor.yy297;
2346 
2347     if (tag_count < 0) {
2348         Symbol sym;
2349         sym.line = yylineno;
2350         sym.filename = current_filename;
2351         ERRORreport_with_symbol(ERROR_unlabelled_param_type, &sym,
2352         CURRENT_SCOPE_NAME);
2353     }
2354 }
2355 #line 2356 "expparse.c"
2356         break;
2357       case 16: /* aggregate_type ::= TOK_AGGREGATE TOK_COLON TOK_IDENTIFIER TOK_OF parameter_type */
2358 #line 411 "expparse.y"
2359 {
2360     Type t = TYPEcreate_user_defined_tag(yymsp[0].minor.yy297, CURRENT_SCOPE, yymsp[-2].minor.yy0.symbol);
2361 
2362     if (t) {
2363         SCOPEadd_super(t);
2364         yygotominor.yy477 = TYPEBODYcreate(aggregate_);
2365         yygotominor.yy477->tag = t;
2366         yygotominor.yy477->base = yymsp[0].minor.yy297;
2367     }
2368 }
2369 #line 2370 "expparse.c"
2370         break;
2371       case 17: /* aggregation_type ::= array_type */
2372       case 18: /* aggregation_type ::= bag_type */ yytestcase(yyruleno==18);
2373       case 19: /* aggregation_type ::= list_type */ yytestcase(yyruleno==19);
2374       case 20: /* aggregation_type ::= set_type */ yytestcase(yyruleno==20);
2375 #line 423 "expparse.y"
2376 {
2377     yygotominor.yy477 = yymsp[0].minor.yy477;
2378 }
2379 #line 2380 "expparse.c"
2380         break;
2381       case 21: /* alias_statement ::= TOK_ALIAS TOK_IDENTIFIER TOK_FOR general_ref semicolon alias_push_scope statement_rep TOK_END_ALIAS semicolon */
2382 #line 442 "expparse.y"
2383 {
2384     Expression e = EXPcreate_from_symbol(Type_Attribute, yymsp[-7].minor.yy0.symbol);
2385     Variable v = VARcreate(e, Type_Unknown);
2386 
2387     v->initializer = yymsp[-5].minor.yy401;
2388 
2389     DICTdefine(CURRENT_SCOPE->symbol_table, yymsp[-7].minor.yy0.symbol->name, (Generic)v,
2390         yymsp[-7].minor.yy0.symbol, OBJ_VARIABLE);
2391     yygotominor.yy332 = ALIAScreate(CURRENT_SCOPE, v, yymsp[-2].minor.yy371);
2392 
2393     POP_SCOPE();
2394 }
2395 #line 2396 "expparse.c"
2396         break;
2397       case 22: /* alias_push_scope ::= */
2398 #line 456 "expparse.y"
2399 {
2400     struct Scope_ *s = SCOPEcreate_tiny(OBJ_ALIAS);
2401     PUSH_SCOPE(s, (Symbol *)0, OBJ_ALIAS);
2402 }
2403 #line 2404 "expparse.c"
2404         break;
2405       case 23: /* array_type ::= TOK_ARRAY bound_spec TOK_OF optional_or_unique attribute_type */
2406 #line 463 "expparse.y"
2407 {
2408     yygotominor.yy477 = TYPEBODYcreate(array_);
2409 
2410     yygotominor.yy477->flags.optional = yymsp[-1].minor.yy252.optional;
2411     yygotominor.yy477->flags.unique = yymsp[-1].minor.yy252.unique;
2412     yygotominor.yy477->upper = yymsp[-3].minor.yy253.upper_limit;
2413     yygotominor.yy477->lower = yymsp[-3].minor.yy253.lower_limit;
2414     yygotominor.yy477->base = yymsp[0].minor.yy297;
2415 }
2416 #line 2417 "expparse.c"
2417         break;
2418       case 24: /* assignable ::= assignable qualifier */
2419       case 300: /* unary_expression ::= unary_expression qualifier */ yytestcase(yyruleno==300);
2420 #line 475 "expparse.y"
2421 {
2422     yymsp[0].minor.yy46.first->e.op1 = yymsp[-1].minor.yy401;
2423     yygotominor.yy401 = yymsp[0].minor.yy46.expr;
2424 }
2425 #line 2426 "expparse.c"
2426         break;
2427       case 26: /* assignment_statement ::= assignable TOK_ASSIGNMENT expression semicolon */
2428 #line 486 "expparse.y"
2429 {
2430     yygotominor.yy332 = ASSIGNcreate(yymsp[-3].minor.yy401, yymsp[-1].minor.yy401);
2431 }
2432 #line 2433 "expparse.c"
2433         break;
2434       case 27: /* attribute_type ::= aggregation_type */
2435       case 28: /* attribute_type ::= basic_type */ yytestcase(yyruleno==28);
2436       case 122: /* parameter_type ::= basic_type */ yytestcase(yyruleno==122);
2437       case 123: /* parameter_type ::= conformant_aggregation */ yytestcase(yyruleno==123);
2438 #line 491 "expparse.y"
2439 {
2440     yygotominor.yy297 = TYPEcreate_from_body_anonymously(yymsp[0].minor.yy477);
2441     SCOPEadd_super(yygotominor.yy297);
2442 }
2443 #line 2444 "expparse.c"
2444         break;
2445       case 29: /* attribute_type ::= defined_type */
2446       case 124: /* parameter_type ::= defined_type */ yytestcase(yyruleno==124);
2447       case 125: /* parameter_type ::= generic_type */ yytestcase(yyruleno==125);
2448 #line 501 "expparse.y"
2449 {
2450     yygotominor.yy297 = yymsp[0].minor.yy297;
2451 }
2452 #line 2453 "expparse.c"
2453         break;
2454       case 30: /* explicit_attr_list ::= */
2455       case 50: /* case_action_list ::= */ yytestcase(yyruleno==50);
2456       case 69: /* derive_decl ::= */ yytestcase(yyruleno==69);
2457       case 268: /* statement_rep ::= */ yytestcase(yyruleno==268);
2458 #line 506 "expparse.y"
2459 {
2460     yygotominor.yy371 = LISTcreate();
2461 }
2462 #line 2463 "expparse.c"
2463         break;
2464       case 31: /* explicit_attr_list ::= explicit_attr_list explicit_attribute */
2465 #line 510 "expparse.y"
2466 {
2467     yygotominor.yy371 = yymsp[-1].minor.yy371;
2468     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy371);
2469 }
2470 #line 2471 "expparse.c"
2471         break;
2472       case 32: /* bag_type ::= TOK_BAG bound_spec TOK_OF attribute_type */
2473       case 138: /* conformant_aggregation ::= TOK_BAG bound_spec TOK_OF parameter_type */ yytestcase(yyruleno==138);
2474 #line 516 "expparse.y"
2475 {
2476     yygotominor.yy477 = TYPEBODYcreate(bag_);
2477     yygotominor.yy477->base = yymsp[0].minor.yy297;
2478     yygotominor.yy477->upper = yymsp[-2].minor.yy253.upper_limit;
2479     yygotominor.yy477->lower = yymsp[-2].minor.yy253.lower_limit;
2480 }
2481 #line 2482 "expparse.c"
2482         break;
2483       case 33: /* bag_type ::= TOK_BAG TOK_OF attribute_type */
2484 #line 523 "expparse.y"
2485 {
2486     yygotominor.yy477 = TYPEBODYcreate(bag_);
2487     yygotominor.yy477->base = yymsp[0].minor.yy297;
2488 }
2489 #line 2490 "expparse.c"
2490         break;
2491       case 34: /* basic_type ::= TOK_BOOLEAN */
2492 #line 529 "expparse.y"
2493 {
2494     yygotominor.yy477 = TYPEBODYcreate(boolean_);
2495 }
2496 #line 2497 "expparse.c"
2497         break;
2498       case 35: /* basic_type ::= TOK_INTEGER precision_spec */
2499 #line 533 "expparse.y"
2500 {
2501     yygotominor.yy477 = TYPEBODYcreate(integer_);
2502     yygotominor.yy477->precision = yymsp[0].minor.yy401;
2503 }
2504 #line 2505 "expparse.c"
2505         break;
2506       case 36: /* basic_type ::= TOK_REAL precision_spec */
2507 #line 538 "expparse.y"
2508 {
2509     yygotominor.yy477 = TYPEBODYcreate(real_);
2510     yygotominor.yy477->precision = yymsp[0].minor.yy401;
2511 }
2512 #line 2513 "expparse.c"
2513         break;
2514       case 37: /* basic_type ::= TOK_NUMBER */
2515 #line 543 "expparse.y"
2516 {
2517     yygotominor.yy477 = TYPEBODYcreate(number_);
2518 }
2519 #line 2520 "expparse.c"
2520         break;
2521       case 38: /* basic_type ::= TOK_LOGICAL */
2522 #line 547 "expparse.y"
2523 {
2524     yygotominor.yy477 = TYPEBODYcreate(logical_);
2525 }
2526 #line 2527 "expparse.c"
2527         break;
2528       case 39: /* basic_type ::= TOK_BINARY precision_spec optional_fixed */
2529 #line 551 "expparse.y"
2530 {
2531     yygotominor.yy477 = TYPEBODYcreate(binary_);
2532     yygotominor.yy477->precision = yymsp[-1].minor.yy401;
2533     yygotominor.yy477->flags.fixed = yymsp[0].minor.yy252.fixed;
2534 }
2535 #line 2536 "expparse.c"
2536         break;
2537       case 40: /* basic_type ::= TOK_STRING precision_spec optional_fixed */
2538 #line 557 "expparse.y"
2539 {
2540     yygotominor.yy477 = TYPEBODYcreate(string_);
2541     yygotominor.yy477->precision = yymsp[-1].minor.yy401;
2542     yygotominor.yy477->flags.fixed = yymsp[0].minor.yy252.fixed;
2543 }
2544 #line 2545 "expparse.c"
2545         break;
2546       case 46: /* by_expression ::= */
2547 #line 583 "expparse.y"
2548 {
2549     yygotominor.yy401 = LITERAL_ONE;
2550 }
2551 #line 2552 "expparse.c"
2552         break;
2553       case 48: /* cardinality_op ::= TOK_LEFT_CURL expression TOK_COLON expression TOK_RIGHT_CURL */
2554       case 181: /* bound_spec ::= TOK_LEFT_BRACKET expression TOK_COLON expression TOK_RIGHT_BRACKET */ yytestcase(yyruleno==181);
2555 #line 593 "expparse.y"
2556 {
2557     yygotominor.yy253.lower_limit = yymsp[-3].minor.yy401;
2558     yygotominor.yy253.upper_limit = yymsp[-1].minor.yy401;
2559 }
2560 #line 2561 "expparse.c"
2561         break;
2562       case 49: /* case_action ::= case_labels TOK_COLON statement */
2563 #line 599 "expparse.y"
2564 {
2565     yygotominor.yy321 = CASE_ITcreate(yymsp[-2].minor.yy371, yymsp[0].minor.yy332);
2566     SYMBOLset(yygotominor.yy321);
2567 }
2568 #line 2569 "expparse.c"
2569         break;
2570       case 51: /* case_action_list ::= case_action_list case_action */
2571 #line 609 "expparse.y"
2572 {
2573     yyerrok;
2574 
2575     yygotominor.yy371 = yymsp[-1].minor.yy371;
2576 
2577     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy321);
2578 }
2579 #line 2580 "expparse.c"
2580         break;
2581       case 52: /* case_block ::= case_action_list case_otherwise */
2582 #line 618 "expparse.y"
2583 {
2584     yygotominor.yy371 = yymsp[-1].minor.yy371;
2585 
2586     if (yymsp[0].minor.yy321) {
2587         LISTadd_last(yygotominor.yy371,
2588         (Generic)yymsp[0].minor.yy321);
2589     }
2590 }
2591 #line 2592 "expparse.c"
2592         break;
2593       case 53: /* case_labels ::= expression */
2594 #line 628 "expparse.y"
2595 {
2596     yygotominor.yy371 = LISTcreate();
2597 
2598     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy401);
2599 }
2600 #line 2601 "expparse.c"
2601         break;
2602       case 54: /* case_labels ::= case_labels TOK_COMMA expression */
2603 #line 634 "expparse.y"
2604 {
2605     yyerrok;
2606 
2607     yygotominor.yy371 = yymsp[-2].minor.yy371;
2608     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy401);
2609 }
2610 #line 2611 "expparse.c"
2611         break;
2612       case 55: /* case_otherwise ::= */
2613 #line 642 "expparse.y"
2614 {
2615     yygotominor.yy321 = (Case_Item)0;
2616 }
2617 #line 2618 "expparse.c"
2618         break;
2619       case 56: /* case_otherwise ::= TOK_OTHERWISE TOK_COLON statement */
2620 #line 646 "expparse.y"
2621 {
2622     yygotominor.yy321 = CASE_ITcreate(LIST_NULL, yymsp[0].minor.yy332);
2623     SYMBOLset(yygotominor.yy321);
2624 }
2625 #line 2626 "expparse.c"
2626         break;
2627       case 57: /* case_statement ::= TOK_CASE expression TOK_OF case_block TOK_END_CASE semicolon */
2628 #line 653 "expparse.y"
2629 {
2630     yygotominor.yy332 = CASEcreate(yymsp[-4].minor.yy401, yymsp[-2].minor.yy371);
2631 }
2632 #line 2633 "expparse.c"
2633         break;
2634       case 58: /* compound_statement ::= TOK_BEGIN statement_rep TOK_END semicolon */
2635 #line 658 "expparse.y"
2636 {
2637     yygotominor.yy332 = COMP_STMTcreate(yymsp[-2].minor.yy371);
2638 }
2639 #line 2640 "expparse.c"
2640         break;
2641       case 59: /* constant ::= TOK_PI */
2642 #line 663 "expparse.y"
2643 {
2644     yygotominor.yy401 = LITERAL_PI;
2645 }
2646 #line 2647 "expparse.c"
2647         break;
2648       case 60: /* constant ::= TOK_E */
2649 #line 668 "expparse.y"
2650 {
2651     yygotominor.yy401 = LITERAL_E;
2652 }
2653 #line 2654 "expparse.c"
2654         break;
2655       case 61: /* constant_body ::= identifier TOK_COLON attribute_type TOK_ASSIGNMENT expression semicolon */
2656 #line 675 "expparse.y"
2657 {
2658     Variable v;
2659 
2660     yymsp[-5].minor.yy401->type = yymsp[-3].minor.yy297;
2661     v = VARcreate(yymsp[-5].minor.yy401, yymsp[-3].minor.yy297);
2662     v->initializer = yymsp[-1].minor.yy401;
2663     v->flags.constant = 1;
2664     DICTdefine(CURRENT_SCOPE->symbol_table, yymsp[-5].minor.yy401->symbol.name, (Generic)v,
2665     &yymsp[-5].minor.yy401->symbol, OBJ_VARIABLE);
2666 }
2667 #line 2668 "expparse.c"
2668         break;
2669       case 64: /* constant_decl ::= TOK_CONSTANT constant_body_list TOK_END_CONSTANT semicolon */
2670 #line 694 "expparse.y"
2671 {
2672     yygotominor.yy0 = yymsp[-3].minor.yy0;
2673 }
2674 #line 2675 "expparse.c"
2675         break;
2676       case 71: /* derived_attribute ::= attribute_decl TOK_COLON attribute_type initializer semicolon */
2677 #line 726 "expparse.y"
2678 {
2679     yygotominor.yy91 = VARcreate(yymsp[-4].minor.yy401, yymsp[-2].minor.yy297);
2680     yygotominor.yy91->initializer = yymsp[-1].minor.yy401;
2681     yygotominor.yy91->flags.attribute = true;
2682 }
2683 #line 2684 "expparse.c"
2684         break;
2685       case 72: /* derived_attribute_rep ::= derived_attribute */
2686       case 176: /* inverse_attr_list ::= inverse_attr */ yytestcase(yyruleno==176);
2687 #line 733 "expparse.y"
2688 {
2689     yygotominor.yy371 = LISTcreate();
2690     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy91);
2691 }
2692 #line 2693 "expparse.c"
2693         break;
2694       case 73: /* derived_attribute_rep ::= derived_attribute_rep derived_attribute */
2695       case 177: /* inverse_attr_list ::= inverse_attr_list inverse_attr */ yytestcase(yyruleno==177);
2696 #line 738 "expparse.y"
2697 {
2698     yygotominor.yy371 = yymsp[-1].minor.yy371;
2699     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy91);
2700 }
2701 #line 2702 "expparse.c"
2702         break;
2703       case 74: /* entity_body ::= explicit_attr_list derive_decl inverse_clause unique_clause where_rule_OPT */
2704 #line 745 "expparse.y"
2705 {
2706     yygotominor.yy176.attributes = yymsp[-4].minor.yy371;
2707     /* this is flattened out in entity_decl - DEL */
2708     LISTadd_last(yygotominor.yy176.attributes, (Generic)yymsp[-3].minor.yy371);
2709 
2710     if (yymsp[-2].minor.yy371 != LIST_NULL) {
2711     LISTadd_last(yygotominor.yy176.attributes, (Generic)yymsp[-2].minor.yy371);
2712     }
2713 
2714     yygotominor.yy176.unique = yymsp[-1].minor.yy371;
2715     yygotominor.yy176.where = yymsp[0].minor.yy371;
2716 }
2717 #line 2718 "expparse.c"
2718         break;
2719       case 75: /* entity_decl ::= entity_header subsuper_decl semicolon entity_body TOK_END_ENTITY semicolon */
2720 #line 760 "expparse.y"
2721 {
2722     CURRENT_SCOPE->u.entity->subtype_expression = yymsp[-4].minor.yy242.subtypes;
2723     CURRENT_SCOPE->u.entity->supertype_symbols = yymsp[-4].minor.yy242.supertypes;
2724     LISTdo( yymsp[-2].minor.yy176.attributes, l, Linked_List ) {
2725         LISTdo_n( l, a, Variable, b ) {
2726             ENTITYadd_attribute(CURRENT_SCOPE, a);
2727         } LISTod;
2728     } LISTod;
2729     CURRENT_SCOPE->u.entity->abstract = yymsp[-4].minor.yy242.abstract;
2730     CURRENT_SCOPE->u.entity->unique = yymsp[-2].minor.yy176.unique;
2731     CURRENT_SCOPE->where = yymsp[-2].minor.yy176.where;
2732     POP_SCOPE();
2733 }
2734 #line 2735 "expparse.c"
2735         break;
2736       case 76: /* entity_header ::= TOK_ENTITY TOK_IDENTIFIER */
2737 #line 775 "expparse.y"
2738 {
2739     Entity e = ENTITYcreate(yymsp[0].minor.yy0.symbol);
2740 
2741     if (print_objects_while_running & OBJ_ENTITY_BITS) {
2742     fprintf( stderr, "parse: %s (entity)\n", yymsp[0].minor.yy0.symbol->name);
2743     }
2744 
2745     PUSH_SCOPE(e, yymsp[0].minor.yy0.symbol, OBJ_ENTITY);
2746 }
2747 #line 2748 "expparse.c"
2748         break;
2749       case 77: /* enumeration_type ::= TOK_ENUMERATION TOK_OF nested_id_list */
2750 #line 786 "expparse.y"
2751 {
2752     int value = 0;
2753     Expression x;
2754     Symbol *tmp;
2755     TypeBody tb;
2756     tb = TYPEBODYcreate(enumeration_);
2757     CURRENT_SCOPE->u.type->head = 0;
2758     CURRENT_SCOPE->u.type->body = tb;
2759     tb->list = yymsp[0].minor.yy371;
2760 
2761     if (!CURRENT_SCOPE->symbol_table) {
2762         CURRENT_SCOPE->symbol_table = DICTcreate(25);
2763     }
2764     if (!PREVIOUS_SCOPE->enum_table) {
2765         PREVIOUS_SCOPE->enum_table = DICTcreate(25);
2766     }
2767     LISTdo_links(yymsp[0].minor.yy371, id) {
2768         tmp = (Symbol *)id->data;
2769         id->data = (Generic)(x = EXPcreate(CURRENT_SCOPE));
2770         x->symbol = *(tmp);
2771         x->u.integer = ++value;
2772 
2773         /* define both in enum scope and scope of */
2774         /* 1st visibility */
2775         DICT_define(CURRENT_SCOPE->symbol_table, x->symbol.name,
2776             (Generic)x, &x->symbol, OBJ_EXPRESSION);
2777         DICTdefine(PREVIOUS_SCOPE->enum_table, x->symbol.name,
2778             (Generic)x, &x->symbol, OBJ_EXPRESSION);
2779         SYMBOL_destroy(tmp);
2780     } LISTod;
2781 }
2782 #line 2783 "expparse.c"
2783         break;
2784       case 78: /* escape_statement ::= TOK_ESCAPE semicolon */
2785 #line 819 "expparse.y"
2786 {
2787     yygotominor.yy332 = STATEMENT_ESCAPE;
2788 }
2789 #line 2790 "expparse.c"
2790         break;
2791       case 79: /* attribute_decl ::= TOK_IDENTIFIER */
2792 #line 834 "expparse.y"
2793 {
2794     yygotominor.yy401 = EXPcreate(Type_Attribute);
2795     yygotominor.yy401->symbol = *yymsp[0].minor.yy0.symbol;
2796     SYMBOL_destroy(yymsp[0].minor.yy0.symbol);
2797 }
2798 #line 2799 "expparse.c"
2799         break;
2800       case 80: /* attribute_decl ::= TOK_SELF TOK_BACKSLASH TOK_IDENTIFIER TOK_DOT TOK_IDENTIFIER */
2801 #line 841 "expparse.y"
2802 {
2803     yygotominor.yy401 = EXPcreate(Type_Expression);
2804     yygotominor.yy401->e.op1 = EXPcreate(Type_Expression);
2805     yygotominor.yy401->e.op1->e.op_code = OP_GROUP;
2806     yygotominor.yy401->e.op1->e.op1 = EXPcreate(Type_Self);
2807     yygotominor.yy401->e.op1->e.op2 = EXPcreate_from_symbol(Type_Entity, yymsp[-2].minor.yy0.symbol);
2808     SYMBOL_destroy(yymsp[-2].minor.yy0.symbol);
2809 
2810     yygotominor.yy401->e.op_code = OP_DOT;
2811     yygotominor.yy401->e.op2 = EXPcreate_from_symbol(Type_Attribute, yymsp[0].minor.yy0.symbol);
2812     SYMBOL_destroy(yymsp[0].minor.yy0.symbol);
2813 }
2814 #line 2815 "expparse.c"
2815         break;
2816       case 81: /* attribute_decl_list ::= attribute_decl */
2817 #line 855 "expparse.y"
2818 {
2819     yygotominor.yy371 = LISTcreate();
2820     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy401);
2821 
2822 }
2823 #line 2824 "expparse.c"
2824         break;
2825       case 82: /* attribute_decl_list ::= attribute_decl_list TOK_COMMA attribute_decl */
2826       case 114: /* expression_list ::= expression_list TOK_COMMA expression */ yytestcase(yyruleno==114);
2827       case 314: /* qualified_attr_list ::= qualified_attr_list TOK_COMMA qualified_attr */ yytestcase(yyruleno==314);
2828 #line 862 "expparse.y"
2829 {
2830     yygotominor.yy371 = yymsp[-2].minor.yy371;
2831     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy401);
2832 }
2833 #line 2834 "expparse.c"
2834         break;
2835       case 83: /* optional ::= */
2836 #line 868 "expparse.y"
2837 {
2838     yygotominor.yy252.optional = 0;
2839 }
2840 #line 2841 "expparse.c"
2841         break;
2842       case 84: /* optional ::= TOK_OPTIONAL */
2843 #line 872 "expparse.y"
2844 {
2845     yygotominor.yy252.optional = 1;
2846 }
2847 #line 2848 "expparse.c"
2848         break;
2849       case 85: /* explicit_attribute ::= attribute_decl_list TOK_COLON optional attribute_type semicolon */
2850 #line 878 "expparse.y"
2851 {
2852     Variable v;
2853 
2854     LISTdo_links (yymsp[-4].minor.yy371, attr)
2855     v = VARcreate((Expression)attr->data, yymsp[-1].minor.yy297);
2856     v->flags.optional = yymsp[-2].minor.yy252.optional;
2857     v->flags.attribute = true;
2858     attr->data = (Generic)v;
2859     LISTod;
2860 
2861     yygotominor.yy371 = yymsp[-4].minor.yy371;
2862 }
2863 #line 2864 "expparse.c"
2864         break;
2865       case 90: /* expression ::= expression TOK_AND expression */
2866 #line 907 "expparse.y"
2867 {
2868     yyerrok;
2869 
2870     yygotominor.yy401 = BIN_EXPcreate(OP_AND, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
2871 }
2872 #line 2873 "expparse.c"
2873         break;
2874       case 91: /* expression ::= expression TOK_OR expression */
2875 #line 913 "expparse.y"
2876 {
2877     yyerrok;
2878 
2879     yygotominor.yy401 = BIN_EXPcreate(OP_OR, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
2880 }
2881 #line 2882 "expparse.c"
2882         break;
2883       case 92: /* expression ::= expression TOK_XOR expression */
2884 #line 919 "expparse.y"
2885 {
2886     yyerrok;
2887 
2888     yygotominor.yy401 = BIN_EXPcreate(OP_XOR, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
2889 }
2890 #line 2891 "expparse.c"
2891         break;
2892       case 93: /* expression ::= expression TOK_LESS_THAN expression */
2893 #line 925 "expparse.y"
2894 {
2895     yyerrok;
2896 
2897     yygotominor.yy401 = BIN_EXPcreate(OP_LESS_THAN, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
2898 }
2899 #line 2900 "expparse.c"
2900         break;
2901       case 94: /* expression ::= expression TOK_GREATER_THAN expression */
2902 #line 931 "expparse.y"
2903 {
2904     yyerrok;
2905 
2906     yygotominor.yy401 = BIN_EXPcreate(OP_GREATER_THAN, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
2907 }
2908 #line 2909 "expparse.c"
2909         break;
2910       case 95: /* expression ::= expression TOK_EQUAL expression */
2911 #line 937 "expparse.y"
2912 {
2913     yyerrok;
2914 
2915     yygotominor.yy401 = BIN_EXPcreate(OP_EQUAL, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
2916 }
2917 #line 2918 "expparse.c"
2918         break;
2919       case 96: /* expression ::= expression TOK_LESS_EQUAL expression */
2920 #line 943 "expparse.y"
2921 {
2922     yyerrok;
2923 
2924     yygotominor.yy401 = BIN_EXPcreate(OP_LESS_EQUAL, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
2925 }
2926 #line 2927 "expparse.c"
2927         break;
2928       case 97: /* expression ::= expression TOK_GREATER_EQUAL expression */
2929 #line 949 "expparse.y"
2930 {
2931     yyerrok;
2932 
2933     yygotominor.yy401 = BIN_EXPcreate(OP_GREATER_EQUAL, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
2934 }
2935 #line 2936 "expparse.c"
2936         break;
2937       case 98: /* expression ::= expression TOK_NOT_EQUAL expression */
2938 #line 955 "expparse.y"
2939 {
2940     yyerrok;
2941 
2942     yygotominor.yy401 = BIN_EXPcreate(OP_NOT_EQUAL, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
2943 }
2944 #line 2945 "expparse.c"
2945         break;
2946       case 99: /* expression ::= expression TOK_INST_EQUAL expression */
2947 #line 961 "expparse.y"
2948 {
2949     yyerrok;
2950 
2951     yygotominor.yy401 = BIN_EXPcreate(OP_INST_EQUAL, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
2952 }
2953 #line 2954 "expparse.c"
2954         break;
2955       case 100: /* expression ::= expression TOK_INST_NOT_EQUAL expression */
2956 #line 967 "expparse.y"
2957 {
2958     yyerrok;
2959 
2960     yygotominor.yy401 = BIN_EXPcreate(OP_INST_NOT_EQUAL, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
2961 }
2962 #line 2963 "expparse.c"
2963         break;
2964       case 101: /* expression ::= expression TOK_IN expression */
2965 #line 973 "expparse.y"
2966 {
2967     yyerrok;
2968 
2969     yygotominor.yy401 = BIN_EXPcreate(OP_IN, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
2970 }
2971 #line 2972 "expparse.c"
2972         break;
2973       case 102: /* expression ::= expression TOK_LIKE expression */
2974 #line 979 "expparse.y"
2975 {
2976     yyerrok;
2977 
2978     yygotominor.yy401 = BIN_EXPcreate(OP_LIKE, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
2979 }
2980 #line 2981 "expparse.c"
2981         break;
2982       case 103: /* expression ::= simple_expression cardinality_op simple_expression */
2983       case 240: /* right_curl ::= TOK_RIGHT_CURL */ yytestcase(yyruleno==240);
2984       case 254: /* semicolon ::= TOK_SEMICOLON */ yytestcase(yyruleno==254);
2985 #line 985 "expparse.y"
2986 {
2987     yyerrok;
2988 }
2989 #line 2990 "expparse.c"
2990         break;
2991       case 105: /* simple_expression ::= simple_expression TOK_CONCAT_OP simple_expression */
2992 #line 995 "expparse.y"
2993 {
2994     yyerrok;
2995 
2996     yygotominor.yy401 = BIN_EXPcreate(OP_CONCAT, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
2997 }
2998 #line 2999 "expparse.c"
2999         break;
3000       case 106: /* simple_expression ::= simple_expression TOK_EXP simple_expression */
3001 #line 1001 "expparse.y"
3002 {
3003     yyerrok;
3004 
3005     yygotominor.yy401 = BIN_EXPcreate(OP_EXP, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
3006 }
3007 #line 3008 "expparse.c"
3008         break;
3009       case 107: /* simple_expression ::= simple_expression TOK_TIMES simple_expression */
3010 #line 1007 "expparse.y"
3011 {
3012     yyerrok;
3013 
3014     yygotominor.yy401 = BIN_EXPcreate(OP_TIMES, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
3015 }
3016 #line 3017 "expparse.c"
3017         break;
3018       case 108: /* simple_expression ::= simple_expression TOK_DIV simple_expression */
3019 #line 1013 "expparse.y"
3020 {
3021     yyerrok;
3022 
3023     yygotominor.yy401 = BIN_EXPcreate(OP_DIV, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
3024 }
3025 #line 3026 "expparse.c"
3026         break;
3027       case 109: /* simple_expression ::= simple_expression TOK_REAL_DIV simple_expression */
3028 #line 1019 "expparse.y"
3029 {
3030     yyerrok;
3031 
3032     yygotominor.yy401 = BIN_EXPcreate(OP_REAL_DIV, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
3033 }
3034 #line 3035 "expparse.c"
3035         break;
3036       case 110: /* simple_expression ::= simple_expression TOK_MOD simple_expression */
3037 #line 1025 "expparse.y"
3038 {
3039     yyerrok;
3040 
3041     yygotominor.yy401 = BIN_EXPcreate(OP_MOD, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
3042 }
3043 #line 3044 "expparse.c"
3044         break;
3045       case 111: /* simple_expression ::= simple_expression TOK_PLUS simple_expression */
3046 #line 1031 "expparse.y"
3047 {
3048     yyerrok;
3049 
3050     yygotominor.yy401 = BIN_EXPcreate(OP_PLUS, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
3051 }
3052 #line 3053 "expparse.c"
3053         break;
3054       case 112: /* simple_expression ::= simple_expression TOK_MINUS simple_expression */
3055 #line 1037 "expparse.y"
3056 {
3057     yyerrok;
3058 
3059     yygotominor.yy401 = BIN_EXPcreate(OP_MINUS, yymsp[-2].minor.yy401, yymsp[0].minor.yy401);
3060 }
3061 #line 3062 "expparse.c"
3062         break;
3063       case 115: /* var ::= */
3064 #line 1055 "expparse.y"
3065 {
3066     yygotominor.yy252.var = 0;
3067 }
3068 #line 3069 "expparse.c"
3069         break;
3070       case 116: /* var ::= TOK_VAR */
3071 #line 1059 "expparse.y"
3072 {
3073     yygotominor.yy252.var = 1;
3074 }
3075 #line 3076 "expparse.c"
3076         break;
3077       case 117: /* formal_parameter ::= var id_list TOK_COLON parameter_type */
3078 #line 1064 "expparse.y"
3079 {
3080     Symbol *tmp;
3081     Expression e;
3082     Variable v;
3083 
3084     yygotominor.yy371 = yymsp[-2].minor.yy371;
3085     LISTdo_links(yygotominor.yy371, param)
3086     tmp = (Symbol*)param->data;
3087 
3088     e = EXPcreate_from_symbol(Type_Attribute, tmp);
3089     v = VARcreate(e, yymsp[0].minor.yy297);
3090     v->flags.var = yymsp[-3].minor.yy252.var; /* NOTE this was flags.optional... ?! */
3091     v->flags.parameter = true;
3092     param->data = (Generic)v;
3093 
3094     /* link it in to the current scope's dict */
3095     DICTdefine(CURRENT_SCOPE->symbol_table,
3096     tmp->name, (Generic)v, tmp, OBJ_VARIABLE);
3097 
3098     LISTod;
3099 }
3100 #line 3101 "expparse.c"
3101         break;
3102       case 118: /* formal_parameter_list ::= */
3103       case 179: /* inverse_clause ::= */ yytestcase(yyruleno==179);
3104       case 328: /* where_rule_OPT ::= */ yytestcase(yyruleno==328);
3105 #line 1087 "expparse.y"
3106 {
3107     yygotominor.yy371 = LIST_NULL;
3108 }
3109 #line 3110 "expparse.c"
3110         break;
3111       case 119: /* formal_parameter_list ::= TOK_LEFT_PAREN formal_parameter_rep TOK_RIGHT_PAREN */
3112 #line 1092 "expparse.y"
3113 {
3114     yygotominor.yy371 = yymsp[-1].minor.yy371;
3115 
3116 }
3117 #line 3118 "expparse.c"
3118         break;
3119       case 120: /* formal_parameter_rep ::= formal_parameter */
3120 #line 1098 "expparse.y"
3121 {
3122     yygotominor.yy371 = yymsp[0].minor.yy371;
3123 
3124 }
3125 #line 3126 "expparse.c"
3126         break;
3127       case 121: /* formal_parameter_rep ::= formal_parameter_rep semicolon formal_parameter */
3128 #line 1104 "expparse.y"
3129 {
3130     yygotominor.yy371 = yymsp[-2].minor.yy371;
3131     LISTadd_all(yygotominor.yy371, yymsp[0].minor.yy371);
3132 }
3133 #line 3134 "expparse.c"
3134         break;
3135       case 126: /* function_call ::= function_id actual_parameters */
3136 #line 1129 "expparse.y"
3137 {
3138     yygotominor.yy401 = EXPcreate(Type_Funcall);
3139     yygotominor.yy401->symbol = *yymsp[-1].minor.yy275;
3140     SYMBOL_destroy(yymsp[-1].minor.yy275);
3141     yygotominor.yy401->u.funcall.list = yymsp[0].minor.yy371;
3142 }
3143 #line 3144 "expparse.c"
3144         break;
3145       case 127: /* function_decl ::= function_header action_body TOK_END_FUNCTION semicolon */
3146 #line 1138 "expparse.y"
3147 {
3148     FUNCput_body(CURRENT_SCOPE, yymsp[-2].minor.yy371);
3149     ALGput_full_text(CURRENT_SCOPE, yymsp[-3].minor.yy507, SCANtell());
3150     POP_SCOPE();
3151 }
3152 #line 3153 "expparse.c"
3153         break;
3154       case 128: /* function_header ::= fh_lineno fh_push_scope fh_plist TOK_COLON parameter_type semicolon */
3155 #line 1146 "expparse.y"
3156 {
3157     Function f = CURRENT_SCOPE;
3158 
3159     f->u.func->return_type = yymsp[-1].minor.yy297;
3160     yygotominor.yy507 = yymsp[-5].minor.yy507;
3161 }
3162 #line 3163 "expparse.c"
3163         break;
3164       case 129: /* fh_lineno ::= TOK_FUNCTION */
3165       case 218: /* ph_get_line ::= */ yytestcase(yyruleno==218);
3166       case 247: /* rh_get_line ::= */ yytestcase(yyruleno==247);
3167 #line 1154 "expparse.y"
3168 {
3169     yygotominor.yy507 = SCANtell();
3170 }
3171 #line 3172 "expparse.c"
3172         break;
3173       case 130: /* fh_push_scope ::= TOK_IDENTIFIER */
3174 #line 1159 "expparse.y"
3175 {
3176     Function f = ALGcreate(OBJ_FUNCTION);
3177     tag_count = 0;
3178     if (print_objects_while_running & OBJ_FUNCTION_BITS) {
3179         fprintf( stderr, "parse: %s (function)\n", yymsp[0].minor.yy0.symbol->name);
3180     }
3181     PUSH_SCOPE(f, yymsp[0].minor.yy0.symbol, OBJ_FUNCTION);
3182 }
3183 #line 3184 "expparse.c"
3184         break;
3185       case 131: /* fh_plist ::= formal_parameter_list */
3186 #line 1169 "expparse.y"
3187 {
3188     Function f = CURRENT_SCOPE;
3189     f->u.func->parameters = yymsp[0].minor.yy371;
3190     f->u.func->pcount = LISTget_length(yymsp[0].minor.yy371);
3191     f->u.func->tag_count = tag_count;
3192     tag_count = -1;     /* done with parameters, no new tags can be defined */
3193 }
3194 #line 3195 "expparse.c"
3195         break;
3196       case 132: /* function_id ::= TOK_IDENTIFIER */
3197       case 219: /* procedure_id ::= TOK_IDENTIFIER */ yytestcase(yyruleno==219);
3198       case 220: /* procedure_id ::= TOK_BUILTIN_PROCEDURE */ yytestcase(yyruleno==220);
3199 #line 1178 "expparse.y"
3200 {
3201     yygotominor.yy275 = yymsp[0].minor.yy0.symbol;
3202 }
3203 #line 3204 "expparse.c"
3204         break;
3205       case 133: /* function_id ::= TOK_BUILTIN_FUNCTION */
3206 #line 1182 "expparse.y"
3207 {
3208     yygotominor.yy275 = yymsp[0].minor.yy0.symbol;
3209 
3210 }
3211 #line 3212 "expparse.c"
3212         break;
3213       case 134: /* conformant_aggregation ::= aggregate_type */
3214 #line 1188 "expparse.y"
3215 {
3216     yygotominor.yy477 = yymsp[0].minor.yy477;
3217 
3218 }
3219 #line 3220 "expparse.c"
3220         break;
3221       case 135: /* conformant_aggregation ::= TOK_ARRAY TOK_OF optional_or_unique parameter_type */
3222 #line 1194 "expparse.y"
3223 {
3224     yygotominor.yy477 = TYPEBODYcreate(array_);
3225     yygotominor.yy477->flags.optional = yymsp[-1].minor.yy252.optional;
3226     yygotominor.yy477->flags.unique = yymsp[-1].minor.yy252.unique;
3227     yygotominor.yy477->base = yymsp[0].minor.yy297;
3228 }
3229 #line 3230 "expparse.c"
3230         break;
3231       case 136: /* conformant_aggregation ::= TOK_ARRAY bound_spec TOK_OF optional_or_unique parameter_type */
3232 #line 1202 "expparse.y"
3233 {
3234     yygotominor.yy477 = TYPEBODYcreate(array_);
3235     yygotominor.yy477->flags.optional = yymsp[-1].minor.yy252.optional;
3236     yygotominor.yy477->flags.unique = yymsp[-1].minor.yy252.unique;
3237     yygotominor.yy477->base = yymsp[0].minor.yy297;
3238     yygotominor.yy477->upper = yymsp[-3].minor.yy253.upper_limit;
3239     yygotominor.yy477->lower = yymsp[-3].minor.yy253.lower_limit;
3240 }
3241 #line 3242 "expparse.c"
3242         break;
3243       case 137: /* conformant_aggregation ::= TOK_BAG TOK_OF parameter_type */
3244 #line 1211 "expparse.y"
3245 {
3246     yygotominor.yy477 = TYPEBODYcreate(bag_);
3247     yygotominor.yy477->base = yymsp[0].minor.yy297;
3248 
3249 }
3250 #line 3251 "expparse.c"
3251         break;
3252       case 139: /* conformant_aggregation ::= TOK_LIST TOK_OF unique parameter_type */
3253 #line 1224 "expparse.y"
3254 {
3255     yygotominor.yy477 = TYPEBODYcreate(list_);
3256     yygotominor.yy477->flags.unique = yymsp[-1].minor.yy252.unique;
3257     yygotominor.yy477->base = yymsp[0].minor.yy297;
3258 
3259 }
3260 #line 3261 "expparse.c"
3261         break;
3262       case 140: /* conformant_aggregation ::= TOK_LIST bound_spec TOK_OF unique parameter_type */
3263 #line 1232 "expparse.y"
3264 {
3265     yygotominor.yy477 = TYPEBODYcreate(list_);
3266     yygotominor.yy477->base = yymsp[0].minor.yy297;
3267     yygotominor.yy477->flags.unique = yymsp[-1].minor.yy252.unique;
3268     yygotominor.yy477->upper = yymsp[-3].minor.yy253.upper_limit;
3269     yygotominor.yy477->lower = yymsp[-3].minor.yy253.lower_limit;
3270 }
3271 #line 3272 "expparse.c"
3272         break;
3273       case 141: /* conformant_aggregation ::= TOK_SET TOK_OF parameter_type */
3274       case 256: /* set_type ::= TOK_SET TOK_OF attribute_type */ yytestcase(yyruleno==256);
3275 #line 1240 "expparse.y"
3276 {
3277     yygotominor.yy477 = TYPEBODYcreate(set_);
3278     yygotominor.yy477->base = yymsp[0].minor.yy297;
3279 }
3280 #line 3281 "expparse.c"
3281         break;
3282       case 142: /* conformant_aggregation ::= TOK_SET bound_spec TOK_OF parameter_type */
3283 #line 1245 "expparse.y"
3284 {
3285     yygotominor.yy477 = TYPEBODYcreate(set_);
3286     yygotominor.yy477->base = yymsp[0].minor.yy297;
3287     yygotominor.yy477->upper = yymsp[-2].minor.yy253.upper_limit;
3288     yygotominor.yy477->lower = yymsp[-2].minor.yy253.lower_limit;
3289 }
3290 #line 3291 "expparse.c"
3291         break;
3292       case 143: /* generic_type ::= TOK_GENERIC */
3293 #line 1253 "expparse.y"
3294 {
3295     yygotominor.yy297 = Type_Generic;
3296 
3297     if (tag_count < 0) {
3298         Symbol sym;
3299         sym.line = yylineno;
3300         sym.filename = current_filename;
3301         ERRORreport_with_symbol(ERROR_unlabelled_param_type, &sym,
3302         CURRENT_SCOPE_NAME);
3303     }
3304 }
3305 #line 3306 "expparse.c"
3306         break;
3307       case 144: /* generic_type ::= TOK_GENERIC TOK_COLON TOK_IDENTIFIER */
3308 #line 1265 "expparse.y"
3309 {
3310     TypeBody g = TYPEBODYcreate(generic_);
3311     yygotominor.yy297 = TYPEcreate_from_body_anonymously(g);
3312 
3313     SCOPEadd_super(yygotominor.yy297);
3314 
3315     g->tag = TYPEcreate_user_defined_tag(yygotominor.yy297, CURRENT_SCOPE, yymsp[0].minor.yy0.symbol);
3316     if (g->tag) {
3317         SCOPEadd_super(g->tag);
3318     }
3319 }
3320 #line 3321 "expparse.c"
3321         break;
3322       case 145: /* id_list ::= TOK_IDENTIFIER */
3323 #line 1278 "expparse.y"
3324 {
3325     yygotominor.yy371 = LISTcreate();
3326     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy0.symbol);
3327 
3328 }
3329 #line 3330 "expparse.c"
3330         break;
3331       case 146: /* id_list ::= id_list TOK_COMMA TOK_IDENTIFIER */
3332 #line 1284 "expparse.y"
3333 {
3334     yyerrok;
3335 
3336     yygotominor.yy371 = yymsp[-2].minor.yy371;
3337     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy0.symbol);
3338 }
3339 #line 3340 "expparse.c"
3340         break;
3341       case 147: /* identifier ::= TOK_SELF */
3342 #line 1292 "expparse.y"
3343 {
3344     yygotominor.yy401 = EXPcreate(Type_Self);
3345 }
3346 #line 3347 "expparse.c"
3347         break;
3348       case 148: /* identifier ::= TOK_QUESTION_MARK */
3349 #line 1296 "expparse.y"
3350 {
3351     yygotominor.yy401 = LITERAL_INFINITY;
3352 }
3353 #line 3354 "expparse.c"
3354         break;
3355       case 149: /* identifier ::= TOK_IDENTIFIER */
3356 #line 1300 "expparse.y"
3357 {
3358     yygotominor.yy401 = EXPcreate(Type_Identifier);
3359     yygotominor.yy401->symbol = *(yymsp[0].minor.yy0.symbol);
3360     SYMBOL_destroy(yymsp[0].minor.yy0.symbol);
3361 }
3362 #line 3363 "expparse.c"
3363         break;
3364       case 150: /* if_statement ::= TOK_IF expression TOK_THEN statement_rep TOK_END_IF semicolon */
3365 #line 1308 "expparse.y"
3366 {
3367     yygotominor.yy332 = CONDcreate(yymsp[-4].minor.yy401, yymsp[-2].minor.yy371, STATEMENT_LIST_NULL);
3368 }
3369 #line 3370 "expparse.c"
3370         break;
3371       case 151: /* if_statement ::= TOK_IF expression TOK_THEN statement_rep TOK_ELSE statement_rep TOK_END_IF semicolon */
3372 #line 1313 "expparse.y"
3373 {
3374     yygotominor.yy332 = CONDcreate(yymsp[-6].minor.yy401, yymsp[-4].minor.yy371, yymsp[-2].minor.yy371);
3375 }
3376 #line 3377 "expparse.c"
3377         break;
3378       case 152: /* include_directive ::= TOK_INCLUDE TOK_STRING_LITERAL semicolon */
3379 #line 1318 "expparse.y"
3380 {
3381     SCANinclude_file(yymsp[-1].minor.yy0.string);
3382 }
3383 #line 3384 "expparse.c"
3384         break;
3385       case 153: /* increment_control ::= TOK_IDENTIFIER TOK_ASSIGNMENT expression TOK_TO expression by_expression */
3386 #line 1324 "expparse.y"
3387 {
3388     Increment i = INCR_CTLcreate(yymsp[-5].minor.yy0.symbol, yymsp[-3].minor.yy401, yymsp[-1].minor.yy401, yymsp[0].minor.yy401);
3389 
3390     /* scope doesn't really have/need a name, I suppose */
3391     /* naming it by the iterator variable is fine */
3392 
3393     PUSH_SCOPE(i, (Symbol *)0, OBJ_INCREMENT);
3394 }
3395 #line 3396 "expparse.c"
3396         break;
3397       case 155: /* rename ::= TOK_IDENTIFIER */
3398 #line 1342 "expparse.y"
3399 {
3400     (*interface_func)(CURRENT_SCOPE, interface_schema, yymsp[0].minor.yy0, yymsp[0].minor.yy0);
3401 }
3402 #line 3403 "expparse.c"
3403         break;
3404       case 156: /* rename ::= TOK_IDENTIFIER TOK_AS TOK_IDENTIFIER */
3405 #line 1346 "expparse.y"
3406 {
3407     (*interface_func)(CURRENT_SCOPE, interface_schema, yymsp[-2].minor.yy0, yymsp[0].minor.yy0);
3408 }
3409 #line 3410 "expparse.c"
3410         break;
3411       case 158: /* rename_list ::= rename_list TOK_COMMA rename */
3412       case 161: /* reference_clause ::= reference_head parened_rename_list semicolon */ yytestcase(yyruleno==161);
3413       case 164: /* use_clause ::= use_head parened_rename_list semicolon */ yytestcase(yyruleno==164);
3414       case 249: /* schema_body ::= interface_specification_list constant_decl block_list */ yytestcase(yyruleno==249);
3415       case 295: /* type_decl ::= td_start TOK_END_TYPE semicolon */ yytestcase(yyruleno==295);
3416 #line 1355 "expparse.y"
3417 {
3418     yygotominor.yy0 = yymsp[-2].minor.yy0;
3419 }
3420 #line 3421 "expparse.c"
3421         break;
3422       case 160: /* reference_clause ::= TOK_REFERENCE TOK_FROM TOK_IDENTIFIER semicolon */
3423 #line 1365 "expparse.y"
3424 {
3425     if (!CURRENT_SCHEMA->ref_schemas) {
3426         CURRENT_SCHEMA->ref_schemas = LISTcreate();
3427     }
3428 
3429     LISTadd_last(CURRENT_SCHEMA->ref_schemas, (Generic)yymsp[-1].minor.yy0.symbol);
3430 }
3431 #line 3432 "expparse.c"
3432         break;
3433       case 162: /* reference_head ::= TOK_REFERENCE TOK_FROM TOK_IDENTIFIER */
3434 #line 1378 "expparse.y"
3435 {
3436     interface_schema = yymsp[0].minor.yy0.symbol;
3437     interface_func = SCHEMAadd_reference;
3438 }
3439 #line 3440 "expparse.c"
3440         break;
3441       case 163: /* use_clause ::= TOK_USE TOK_FROM TOK_IDENTIFIER semicolon */
3442 #line 1384 "expparse.y"
3443 {
3444     if (!CURRENT_SCHEMA->use_schemas) {
3445         CURRENT_SCHEMA->use_schemas = LISTcreate();
3446     }
3447 
3448     LISTadd_last(CURRENT_SCHEMA->use_schemas, (Generic)yymsp[-1].minor.yy0.symbol);
3449 }
3450 #line 3451 "expparse.c"
3451         break;
3452       case 165: /* use_head ::= TOK_USE TOK_FROM TOK_IDENTIFIER */
3453 #line 1397 "expparse.y"
3454 {
3455     interface_schema = yymsp[0].minor.yy0.symbol;
3456     interface_func = SCHEMAadd_use;
3457 }
3458 #line 3459 "expparse.c"
3459         break;
3460       case 170: /* interval ::= TOK_LEFT_CURL simple_expression rel_op simple_expression rel_op simple_expression right_curl */
3461 #line 1420 "expparse.y"
3462 {
3463     Expression    tmp1, tmp2;
3464 
3465     yygotominor.yy401 = (Expression)0;
3466     tmp1 = BIN_EXPcreate(yymsp[-4].minor.yy126, yymsp[-5].minor.yy401, yymsp[-3].minor.yy401);
3467     tmp2 = BIN_EXPcreate(yymsp[-2].minor.yy126, yymsp[-3].minor.yy401, yymsp[-1].minor.yy401);
3468     yygotominor.yy401 = BIN_EXPcreate(OP_AND, tmp1, tmp2);
3469 }
3470 #line 3471 "expparse.c"
3471         break;
3472       case 171: /* set_or_bag_of_entity ::= defined_type */
3473       case 289: /* type ::= defined_type */ yytestcase(yyruleno==289);
3474 #line 1432 "expparse.y"
3475 {
3476     yygotominor.yy378.type = yymsp[0].minor.yy297;
3477     yygotominor.yy378.body = 0;
3478 }
3479 #line 3480 "expparse.c"
3480         break;
3481       case 172: /* set_or_bag_of_entity ::= TOK_SET TOK_OF defined_type */
3482 #line 1437 "expparse.y"
3483 {
3484     yygotominor.yy378.type = 0;
3485     yygotominor.yy378.body = TYPEBODYcreate(set_);
3486     yygotominor.yy378.body->base = yymsp[0].minor.yy297;
3487 
3488 }
3489 #line 3490 "expparse.c"
3490         break;
3491       case 173: /* set_or_bag_of_entity ::= TOK_SET bound_spec TOK_OF defined_type */
3492 #line 1444 "expparse.y"
3493 {
3494     yygotominor.yy378.type = 0;
3495     yygotominor.yy378.body = TYPEBODYcreate(set_);
3496     yygotominor.yy378.body->base = yymsp[0].minor.yy297;
3497     yygotominor.yy378.body->upper = yymsp[-2].minor.yy253.upper_limit;
3498     yygotominor.yy378.body->lower = yymsp[-2].minor.yy253.lower_limit;
3499 }
3500 #line 3501 "expparse.c"
3501         break;
3502       case 174: /* set_or_bag_of_entity ::= TOK_BAG bound_spec TOK_OF defined_type */
3503 #line 1452 "expparse.y"
3504 {
3505     yygotominor.yy378.type = 0;
3506     yygotominor.yy378.body = TYPEBODYcreate(bag_);
3507     yygotominor.yy378.body->base = yymsp[0].minor.yy297;
3508     yygotominor.yy378.body->upper = yymsp[-2].minor.yy253.upper_limit;
3509     yygotominor.yy378.body->lower = yymsp[-2].minor.yy253.lower_limit;
3510 }
3511 #line 3512 "expparse.c"
3512         break;
3513       case 175: /* set_or_bag_of_entity ::= TOK_BAG TOK_OF defined_type */
3514 #line 1460 "expparse.y"
3515 {
3516     yygotominor.yy378.type = 0;
3517     yygotominor.yy378.body = TYPEBODYcreate(bag_);
3518     yygotominor.yy378.body->base = yymsp[0].minor.yy297;
3519 }
3520 #line 3521 "expparse.c"
3521         break;
3522       case 178: /* inverse_attr ::= attribute_decl TOK_COLON set_or_bag_of_entity TOK_FOR TOK_IDENTIFIER semicolon */
3523 #line 1487 "expparse.y"
3524 {
3525     if (yymsp[-3].minor.yy378.type) {
3526         yygotominor.yy91 = VARcreate(yymsp[-5].minor.yy401, yymsp[-3].minor.yy378.type);
3527     } else {
3528         Type t = TYPEcreate_from_body_anonymously(yymsp[-3].minor.yy378.body);
3529         SCOPEadd_super(t);
3530         yygotominor.yy91 = VARcreate(yymsp[-5].minor.yy401, t);
3531     }
3532 
3533     yygotominor.yy91->flags.attribute = true;
3534     yygotominor.yy91->inverse_symbol = yymsp[-1].minor.yy0.symbol;
3535 }
3536 #line 3537 "expparse.c"
3537         break;
3538       case 182: /* list_type ::= TOK_LIST bound_spec TOK_OF unique attribute_type */
3539 #line 1521 "expparse.y"
3540 {
3541     yygotominor.yy477 = TYPEBODYcreate(list_);
3542     yygotominor.yy477->base = yymsp[0].minor.yy297;
3543     yygotominor.yy477->flags.unique = yymsp[-1].minor.yy252.unique;
3544     yygotominor.yy477->lower = yymsp[-3].minor.yy253.lower_limit;
3545     yygotominor.yy477->upper = yymsp[-3].minor.yy253.upper_limit;
3546 }
3547 #line 3548 "expparse.c"
3548         break;
3549       case 183: /* list_type ::= TOK_LIST TOK_OF unique attribute_type */
3550 #line 1529 "expparse.y"
3551 {
3552     yygotominor.yy477 = TYPEBODYcreate(list_);
3553     yygotominor.yy477->base = yymsp[0].minor.yy297;
3554     yygotominor.yy477->flags.unique = yymsp[-1].minor.yy252.unique;
3555 }
3556 #line 3557 "expparse.c"
3557         break;
3558       case 184: /* literal ::= TOK_INTEGER_LITERAL */
3559 #line 1536 "expparse.y"
3560 {
3561     if (yymsp[0].minor.yy0.iVal == 0) {
3562         yygotominor.yy401 = LITERAL_ZERO;
3563     } else if (yymsp[0].minor.yy0.iVal == 1) {
3564     yygotominor.yy401 = LITERAL_ONE;
3565     } else {
3566     yygotominor.yy401 = EXPcreate_simple(Type_Integer);
3567     yygotominor.yy401->u.integer = (int)yymsp[0].minor.yy0.iVal;
3568     resolved_all(yygotominor.yy401);
3569     }
3570 }
3571 #line 3572 "expparse.c"
3572         break;
3573       case 185: /* literal ::= TOK_REAL_LITERAL */
3574 #line 1548 "expparse.y"
3575 {
3576     /* if rVal (a double) is nonzero and has magnitude <= the smallest non-denormal float, print a warning */
3577     if( ( fabs( yymsp[0].minor.yy0.rVal ) <= FLT_MIN ) && ( fabs( yymsp[0].minor.yy0.rVal ) > 0 ) ) {
3578         Symbol sym;
3579         sym.line = yylineno;
3580         sym.filename = current_filename;
3581         ERRORreport_with_symbol(ERROR_warn_small_real, &sym, yymsp[0].minor.yy0.rVal );
3582     }
3583     if( fabs( yymsp[0].minor.yy0.rVal ) < DBL_MIN ) {
3584         yygotominor.yy401 = LITERAL_ZERO;
3585     } else {
3586         yygotominor.yy401 = EXPcreate_simple(Type_Real);
3587         yygotominor.yy401->u.real = yymsp[0].minor.yy0.rVal;
3588         resolved_all(yygotominor.yy401);
3589     }
3590 }
3591 #line 3592 "expparse.c"
3592         break;
3593       case 186: /* literal ::= TOK_STRING_LITERAL */
3594 #line 1565 "expparse.y"
3595 {
3596     yygotominor.yy401 = EXPcreate_simple(Type_String);
3597     yygotominor.yy401->symbol.name = yymsp[0].minor.yy0.string;
3598     resolved_all(yygotominor.yy401);
3599 }
3600 #line 3601 "expparse.c"
3601         break;
3602       case 187: /* literal ::= TOK_STRING_LITERAL_ENCODED */
3603 #line 1571 "expparse.y"
3604 {
3605     yygotominor.yy401 = EXPcreate_simple(Type_String_Encoded);
3606     yygotominor.yy401->symbol.name = yymsp[0].minor.yy0.string;
3607     resolved_all(yygotominor.yy401);
3608 }
3609 #line 3610 "expparse.c"
3610         break;
3611       case 188: /* literal ::= TOK_LOGICAL_LITERAL */
3612 #line 1577 "expparse.y"
3613 {
3614     yygotominor.yy401 = EXPcreate_simple(Type_Logical);
3615     yygotominor.yy401->u.logical = yymsp[0].minor.yy0.logical;
3616     resolved_all(yygotominor.yy401);
3617 }
3618 #line 3619 "expparse.c"
3619         break;
3620       case 189: /* literal ::= TOK_BINARY_LITERAL */
3621 #line 1583 "expparse.y"
3622 {
3623     yygotominor.yy401 = EXPcreate_simple(Type_Binary);
3624     yygotominor.yy401->symbol.name = yymsp[0].minor.yy0.binary;
3625     resolved_all(yygotominor.yy401);
3626 }
3627 #line 3628 "expparse.c"
3628         break;
3629       case 192: /* local_variable ::= id_list TOK_COLON parameter_type semicolon */
3630 #line 1599 "expparse.y"
3631 {
3632     Expression e;
3633     Variable v;
3634     LISTdo(yymsp[-3].minor.yy371, sym, Symbol *)
3635 
3636     /* convert symbol to name-expression */
3637 
3638     e = EXPcreate(Type_Attribute);
3639     e->symbol = *sym; SYMBOL_destroy(sym);
3640     v = VARcreate(e, yymsp[-1].minor.yy297);
3641     v->offset = local_var_count++;
3642     DICTdefine(CURRENT_SCOPE->symbol_table, e->symbol.name, (Generic)v, &e->symbol, OBJ_VARIABLE);
3643     LISTod;
3644     LISTfree(yymsp[-3].minor.yy371);
3645 }
3646 #line 3647 "expparse.c"
3647         break;
3648       case 193: /* local_variable ::= id_list TOK_COLON parameter_type local_initializer semicolon */
3649 #line 1616 "expparse.y"
3650 {
3651     Expression e;
3652     Variable v;
3653     LISTdo(yymsp[-4].minor.yy371, sym, Symbol *)
3654     e = EXPcreate(Type_Attribute);
3655     e->symbol = *sym; SYMBOL_destroy(sym);
3656     v = VARcreate(e, yymsp[-2].minor.yy297);
3657     v->offset = local_var_count++;
3658     v->initializer = yymsp[-1].minor.yy401;
3659     DICTdefine(CURRENT_SCOPE->symbol_table, e->symbol.name, (Generic)v,
3660     &e->symbol, OBJ_VARIABLE);
3661     LISTod;
3662     LISTfree(yymsp[-4].minor.yy371);
3663 }
3664 #line 3665 "expparse.c"
3665         break;
3666       case 197: /* local_decl_rules_on ::= */
3667 #line 1640 "expparse.y"
3668 {
3669     tag_count = 0; /* don't signal an error if we find a generic_type */
3670     local_var_count = 0; /* used to keep local var decl's in the same order */
3671 }
3672 #line 3673 "expparse.c"
3673         break;
3674       case 198: /* local_decl_rules_off ::= */
3675 #line 1646 "expparse.y"
3676 {
3677     tag_count = -1; /* signal an error if we find a generic_type */
3678 }
3679 #line 3680 "expparse.c"
3680         break;
3681       case 199: /* defined_type ::= TOK_IDENTIFIER */
3682 #line 1651 "expparse.y"
3683 {
3684     yygotominor.yy297 = TYPEcreate_name(yymsp[0].minor.yy0.symbol);
3685     SCOPEadd_super(yygotominor.yy297);
3686     SYMBOL_destroy(yymsp[0].minor.yy0.symbol);
3687 }
3688 #line 3689 "expparse.c"
3689         break;
3690       case 200: /* defined_type_list ::= defined_type */
3691 #line 1658 "expparse.y"
3692 {
3693     yygotominor.yy371 = LISTcreate();
3694     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy297);
3695 
3696 }
3697 #line 3698 "expparse.c"
3698         break;
3699       case 201: /* defined_type_list ::= defined_type_list TOK_COMMA defined_type */
3700 #line 1664 "expparse.y"
3701 {
3702     yygotominor.yy371 = yymsp[-2].minor.yy371;
3703     LISTadd_last(yygotominor.yy371,
3704     (Generic)yymsp[0].minor.yy297);
3705 }
3706 #line 3707 "expparse.c"
3707         break;
3708       case 204: /* optional_or_unique ::= */
3709 #line 1681 "expparse.y"
3710 {
3711     yygotominor.yy252.unique = 0;
3712     yygotominor.yy252.optional = 0;
3713 }
3714 #line 3715 "expparse.c"
3715         break;
3716       case 205: /* optional_or_unique ::= TOK_OPTIONAL */
3717 #line 1686 "expparse.y"
3718 {
3719     yygotominor.yy252.unique = 0;
3720     yygotominor.yy252.optional = 1;
3721 }
3722 #line 3723 "expparse.c"
3723         break;
3724       case 206: /* optional_or_unique ::= TOK_UNIQUE */
3725 #line 1691 "expparse.y"
3726 {
3727     yygotominor.yy252.unique = 1;
3728     yygotominor.yy252.optional = 0;
3729 }
3730 #line 3731 "expparse.c"
3731         break;
3732       case 207: /* optional_or_unique ::= TOK_OPTIONAL TOK_UNIQUE */
3733       case 208: /* optional_or_unique ::= TOK_UNIQUE TOK_OPTIONAL */ yytestcase(yyruleno==208);
3734 #line 1696 "expparse.y"
3735 {
3736     yygotominor.yy252.unique = 1;
3737     yygotominor.yy252.optional = 1;
3738 }
3739 #line 3740 "expparse.c"
3740         break;
3741       case 209: /* optional_fixed ::= */
3742 #line 1707 "expparse.y"
3743 {
3744     yygotominor.yy252.fixed = 0;
3745 }
3746 #line 3747 "expparse.c"
3747         break;
3748       case 210: /* optional_fixed ::= TOK_FIXED */
3749 #line 1711 "expparse.y"
3750 {
3751     yygotominor.yy252.fixed = 1;
3752 }
3753 #line 3754 "expparse.c"
3754         break;
3755       case 211: /* precision_spec ::= */
3756 #line 1716 "expparse.y"
3757 {
3758     yygotominor.yy401 = (Expression)0;
3759 }
3760 #line 3761 "expparse.c"
3761         break;
3762       case 212: /* precision_spec ::= TOK_LEFT_PAREN expression TOK_RIGHT_PAREN */
3763       case 304: /* unary_expression ::= TOK_LEFT_PAREN expression TOK_RIGHT_PAREN */ yytestcase(yyruleno==304);
3764 #line 1720 "expparse.y"
3765 {
3766     yygotominor.yy401 = yymsp[-1].minor.yy401;
3767 }
3768 #line 3769 "expparse.c"
3769         break;
3770       case 213: /* proc_call_statement ::= procedure_id actual_parameters semicolon */
3771 #line 1730 "expparse.y"
3772 {
3773     yygotominor.yy332 = PCALLcreate(yymsp[-1].minor.yy371);
3774     yygotominor.yy332->symbol = *(yymsp[-2].minor.yy275);
3775 }
3776 #line 3777 "expparse.c"
3777         break;
3778       case 214: /* proc_call_statement ::= procedure_id semicolon */
3779 #line 1735 "expparse.y"
3780 {
3781     yygotominor.yy332 = PCALLcreate((Linked_List)0);
3782     yygotominor.yy332->symbol = *(yymsp[-1].minor.yy275);
3783 }
3784 #line 3785 "expparse.c"
3785         break;
3786       case 215: /* procedure_decl ::= procedure_header action_body TOK_END_PROCEDURE semicolon */
3787 #line 1742 "expparse.y"
3788 {
3789     PROCput_body(CURRENT_SCOPE, yymsp[-2].minor.yy371);
3790     ALGput_full_text(CURRENT_SCOPE, yymsp[-3].minor.yy507, SCANtell());
3791     POP_SCOPE();
3792 }
3793 #line 3794 "expparse.c"
3794         break;
3795       case 216: /* procedure_header ::= TOK_PROCEDURE ph_get_line ph_push_scope formal_parameter_list semicolon */
3796 #line 1750 "expparse.y"
3797 {
3798     Procedure p = CURRENT_SCOPE;
3799     p->u.proc->parameters = yymsp[-1].minor.yy371;
3800     p->u.proc->pcount = LISTget_length(yymsp[-1].minor.yy371);
3801     p->u.proc->tag_count = tag_count;
3802     tag_count = -1;    /* done with parameters, no new tags can be defined */
3803     yygotominor.yy507 = yymsp[-3].minor.yy507;
3804 }
3805 #line 3806 "expparse.c"
3806         break;
3807       case 217: /* ph_push_scope ::= TOK_IDENTIFIER */
3808 #line 1760 "expparse.y"
3809 {
3810     Procedure p = ALGcreate(OBJ_PROCEDURE);
3811     tag_count = 0;
3812 
3813     if (print_objects_while_running & OBJ_PROCEDURE_BITS) {
3814     fprintf( stderr, "parse: %s (procedure)\n", yymsp[0].minor.yy0.symbol->name);
3815     }
3816 
3817     PUSH_SCOPE(p, yymsp[0].minor.yy0.symbol, OBJ_PROCEDURE);
3818 }
3819 #line 3820 "expparse.c"
3820         break;
3821       case 221: /* group_ref ::= TOK_BACKSLASH TOK_IDENTIFIER */
3822 #line 1786 "expparse.y"
3823 {
3824     yygotominor.yy401 = BIN_EXPcreate(OP_GROUP, (Expression)0, (Expression)0);
3825     yygotominor.yy401->e.op2 = EXPcreate(Type_Identifier);
3826     yygotominor.yy401->e.op2->symbol = *yymsp[0].minor.yy0.symbol;
3827     SYMBOL_destroy(yymsp[0].minor.yy0.symbol);
3828 }
3829 #line 3830 "expparse.c"
3830         break;
3831       case 222: /* qualifier ::= TOK_DOT TOK_IDENTIFIER */
3832 #line 1794 "expparse.y"
3833 {
3834     yygotominor.yy46.expr = yygotominor.yy46.first = BIN_EXPcreate(OP_DOT, (Expression)0, (Expression)0);
3835     yygotominor.yy46.expr->e.op2 = EXPcreate(Type_Identifier);
3836     yygotominor.yy46.expr->e.op2->symbol = *yymsp[0].minor.yy0.symbol;
3837     SYMBOL_destroy(yymsp[0].minor.yy0.symbol);
3838 }
3839 #line 3840 "expparse.c"
3840         break;
3841       case 223: /* qualifier ::= TOK_BACKSLASH TOK_IDENTIFIER */
3842 #line 1801 "expparse.y"
3843 {
3844     yygotominor.yy46.expr = yygotominor.yy46.first = BIN_EXPcreate(OP_GROUP, (Expression)0, (Expression)0);
3845     yygotominor.yy46.expr->e.op2 = EXPcreate(Type_Identifier);
3846     yygotominor.yy46.expr->e.op2->symbol = *yymsp[0].minor.yy0.symbol;
3847     SYMBOL_destroy(yymsp[0].minor.yy0.symbol);
3848 }
3849 #line 3850 "expparse.c"
3850         break;
3851       case 224: /* qualifier ::= TOK_LEFT_BRACKET simple_expression TOK_RIGHT_BRACKET */
3852 #line 1810 "expparse.y"
3853 {
3854     yygotominor.yy46.expr = yygotominor.yy46.first = BIN_EXPcreate(OP_ARRAY_ELEMENT, (Expression)0,
3855     (Expression)0);
3856     yygotominor.yy46.expr->e.op2 = yymsp[-1].minor.yy401;
3857 }
3858 #line 3859 "expparse.c"
3859         break;
3860       case 225: /* qualifier ::= TOK_LEFT_BRACKET simple_expression TOK_COLON simple_expression TOK_RIGHT_BRACKET */
3861 #line 1819 "expparse.y"
3862 {
3863     yygotominor.yy46.expr = yygotominor.yy46.first = TERN_EXPcreate(OP_SUBCOMPONENT, (Expression)0,
3864     (Expression)0, (Expression)0);
3865     yygotominor.yy46.expr->e.op2 = yymsp[-3].minor.yy401;
3866     yygotominor.yy46.expr->e.op3 = yymsp[-1].minor.yy401;
3867 }
3868 #line 3869 "expparse.c"
3869         break;
3870       case 226: /* query_expression ::= query_start expression TOK_RIGHT_PAREN */
3871 #line 1827 "expparse.y"
3872 {
3873     yygotominor.yy401 = yymsp[-2].minor.yy401;
3874     yygotominor.yy401->u.query->expression = yymsp[-1].minor.yy401;
3875     POP_SCOPE();
3876 }
3877 #line 3878 "expparse.c"
3878         break;
3879       case 227: /* query_start ::= TOK_QUERY TOK_LEFT_PAREN TOK_IDENTIFIER TOK_ALL_IN expression TOK_SUCH_THAT */
3880 #line 1835 "expparse.y"
3881 {
3882     yygotominor.yy401 = QUERYcreate(yymsp[-3].minor.yy0.symbol, yymsp[-1].minor.yy401);
3883     SYMBOL_destroy(yymsp[-3].minor.yy0.symbol);
3884     PUSH_SCOPE(yygotominor.yy401->u.query->scope, (Symbol *)0, OBJ_QUERY);
3885 }
3886 #line 3887 "expparse.c"
3887         break;
3888       case 228: /* rel_op ::= TOK_LESS_THAN */
3889 #line 1842 "expparse.y"
3890 {
3891     yygotominor.yy126 = OP_LESS_THAN;
3892 }
3893 #line 3894 "expparse.c"
3894         break;
3895       case 229: /* rel_op ::= TOK_GREATER_THAN */
3896 #line 1846 "expparse.y"
3897 {
3898     yygotominor.yy126 = OP_GREATER_THAN;
3899 }
3900 #line 3901 "expparse.c"
3901         break;
3902       case 230: /* rel_op ::= TOK_EQUAL */
3903 #line 1850 "expparse.y"
3904 {
3905     yygotominor.yy126 = OP_EQUAL;
3906 }
3907 #line 3908 "expparse.c"
3908         break;
3909       case 231: /* rel_op ::= TOK_LESS_EQUAL */
3910 #line 1854 "expparse.y"
3911 {
3912     yygotominor.yy126 = OP_LESS_EQUAL;
3913 }
3914 #line 3915 "expparse.c"
3915         break;
3916       case 232: /* rel_op ::= TOK_GREATER_EQUAL */
3917 #line 1858 "expparse.y"
3918 {
3919     yygotominor.yy126 = OP_GREATER_EQUAL;
3920 }
3921 #line 3922 "expparse.c"
3922         break;
3923       case 233: /* rel_op ::= TOK_NOT_EQUAL */
3924 #line 1862 "expparse.y"
3925 {
3926     yygotominor.yy126 = OP_NOT_EQUAL;
3927 }
3928 #line 3929 "expparse.c"
3929         break;
3930       case 234: /* rel_op ::= TOK_INST_EQUAL */
3931 #line 1866 "expparse.y"
3932 {
3933     yygotominor.yy126 = OP_INST_EQUAL;
3934 }
3935 #line 3936 "expparse.c"
3936         break;
3937       case 235: /* rel_op ::= TOK_INST_NOT_EQUAL */
3938 #line 1870 "expparse.y"
3939 {
3940     yygotominor.yy126 = OP_INST_NOT_EQUAL;
3941 }
3942 #line 3943 "expparse.c"
3943         break;
3944       case 236: /* repeat_statement ::= TOK_REPEAT increment_control while_control until_control semicolon statement_rep TOK_END_REPEAT semicolon */
3945 #line 1878 "expparse.y"
3946 {
3947     yygotominor.yy332 = LOOPcreate(CURRENT_SCOPE, yymsp[-5].minor.yy401, yymsp[-4].minor.yy401, yymsp[-2].minor.yy371);
3948 
3949     /* matching PUSH_SCOPE is in increment_control */
3950     POP_SCOPE();
3951 }
3952 #line 3953 "expparse.c"
3953         break;
3954       case 237: /* repeat_statement ::= TOK_REPEAT while_control until_control semicolon statement_rep TOK_END_REPEAT semicolon */
3955 #line 1886 "expparse.y"
3956 {
3957     yygotominor.yy332 = LOOPcreate((struct Scope_ *)0, yymsp[-5].minor.yy401, yymsp[-4].minor.yy401, yymsp[-2].minor.yy371);
3958 }
3959 #line 3960 "expparse.c"
3960         break;
3961       case 238: /* return_statement ::= TOK_RETURN semicolon */
3962 #line 1891 "expparse.y"
3963 {
3964     yygotominor.yy332 = RETcreate((Expression)0);
3965 }
3966 #line 3967 "expparse.c"
3967         break;
3968       case 239: /* return_statement ::= TOK_RETURN TOK_LEFT_PAREN expression TOK_RIGHT_PAREN semicolon */
3969 #line 1896 "expparse.y"
3970 {
3971     yygotominor.yy332 = RETcreate(yymsp[-2].minor.yy401);
3972 }
3973 #line 3974 "expparse.c"
3974         break;
3975       case 241: /* rule_decl ::= rule_header action_body where_rule TOK_END_RULE semicolon */
3976 #line 1907 "expparse.y"
3977 {
3978     RULEput_body(CURRENT_SCOPE, yymsp[-3].minor.yy371);
3979     RULEput_where(CURRENT_SCOPE, yymsp[-2].minor.yy371);
3980     ALGput_full_text(CURRENT_SCOPE, yymsp[-4].minor.yy507, SCANtell());
3981     POP_SCOPE();
3982 }
3983 #line 3984 "expparse.c"
3984         break;
3985       case 242: /* rule_formal_parameter ::= TOK_IDENTIFIER */
3986 #line 1915 "expparse.y"
3987 {
3988     Expression e;
3989     Type t;
3990 
3991     /* it's true that we know it will be an entity_ type later */
3992     TypeBody tb = TYPEBODYcreate(set_);
3993     tb->base = TYPEcreate_name(yymsp[0].minor.yy0.symbol);
3994     SCOPEadd_super(tb->base);
3995     t = TYPEcreate_from_body_anonymously(tb);
3996     SCOPEadd_super(t);
3997     e = EXPcreate_from_symbol(t, yymsp[0].minor.yy0.symbol);
3998     yygotominor.yy91 = VARcreate(e, t);
3999     yygotominor.yy91->flags.attribute = true;
4000     yygotominor.yy91->flags.parameter = true;
4001 
4002     /* link it in to the current scope's dict */
4003     DICTdefine(CURRENT_SCOPE->symbol_table, yymsp[0].minor.yy0.symbol->name, (Generic)yygotominor.yy91,
4004     yymsp[0].minor.yy0.symbol, OBJ_VARIABLE);
4005 }
4006 #line 4007 "expparse.c"
4007         break;
4008       case 243: /* rule_formal_parameter_list ::= rule_formal_parameter */
4009 #line 1936 "expparse.y"
4010 {
4011     yygotominor.yy371 = LISTcreate();
4012     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy91);
4013 }
4014 #line 4015 "expparse.c"
4015         break;
4016       case 244: /* rule_formal_parameter_list ::= rule_formal_parameter_list TOK_COMMA rule_formal_parameter */
4017 #line 1942 "expparse.y"
4018 {
4019     yygotominor.yy371 = yymsp[-2].minor.yy371;
4020     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy91);
4021 }
4022 #line 4023 "expparse.c"
4023         break;
4024       case 245: /* rule_header ::= rh_start rule_formal_parameter_list TOK_RIGHT_PAREN semicolon */
4025 #line 1949 "expparse.y"
4026 {
4027     CURRENT_SCOPE->u.rule->parameters = yymsp[-2].minor.yy371;
4028 
4029     yygotominor.yy507 = yymsp[-3].minor.yy507;
4030 }
4031 #line 4032 "expparse.c"
4032         break;
4033       case 246: /* rh_start ::= TOK_RULE rh_get_line TOK_IDENTIFIER TOK_FOR TOK_LEFT_PAREN */
4034 #line 1957 "expparse.y"
4035 {
4036     Rule r = ALGcreate(OBJ_RULE);
4037 
4038     if (print_objects_while_running & OBJ_RULE_BITS) {
4039     fprintf( stderr, "parse: %s (rule)\n", yymsp[-2].minor.yy0.symbol->name);
4040     }
4041 
4042     PUSH_SCOPE(r, yymsp[-2].minor.yy0.symbol, OBJ_RULE);
4043 
4044     yygotominor.yy507 = yymsp[-3].minor.yy507;
4045 }
4046 #line 4047 "expparse.c"
4047         break;
4048       case 250: /* schema_decl ::= schema_header schema_body TOK_END_SCHEMA semicolon */
4049 #line 1984 "expparse.y"
4050 {
4051     POP_SCOPE();
4052 }
4053 #line 4054 "expparse.c"
4054         break;
4055       case 252: /* schema_header ::= TOK_SCHEMA TOK_IDENTIFIER semicolon */
4056 #line 1993 "expparse.y"
4057 {
4058     Schema schema = ( Schema ) DICTlookup(CURRENT_SCOPE->symbol_table, yymsp[-1].minor.yy0.symbol->name);
4059 
4060     if (print_objects_while_running & OBJ_SCHEMA_BITS) {
4061     fprintf( stderr, "parse: %s (schema)\n", yymsp[-1].minor.yy0.symbol->name);
4062     }
4063 
4064     if (EXPRESSignore_duplicate_schemas && schema) {
4065     SCANskip_to_end_schema(parseData.scanner);
4066     PUSH_SCOPE_DUMMY();
4067     } else {
4068     schema = SCHEMAcreate();
4069     LISTadd_last(PARSEnew_schemas, (Generic)schema);
4070     PUSH_SCOPE(schema, yymsp[-1].minor.yy0.symbol, OBJ_SCHEMA);
4071     }
4072 }
4073 #line 4074 "expparse.c"
4074         break;
4075       case 253: /* select_type ::= TOK_SELECT TOK_LEFT_PAREN defined_type_list TOK_RIGHT_PAREN */
4076 #line 2012 "expparse.y"
4077 {
4078     yygotominor.yy477 = TYPEBODYcreate(select_);
4079     yygotominor.yy477->list = yymsp[-1].minor.yy371;
4080 }
4081 #line 4082 "expparse.c"
4082         break;
4083       case 255: /* set_type ::= TOK_SET bound_spec TOK_OF attribute_type */
4084 #line 2023 "expparse.y"
4085 {
4086     yygotominor.yy477 = TYPEBODYcreate(set_);
4087     yygotominor.yy477->base = yymsp[0].minor.yy297;
4088     yygotominor.yy477->lower = yymsp[-2].minor.yy253.lower_limit;
4089     yygotominor.yy477->upper = yymsp[-2].minor.yy253.upper_limit;
4090 }
4091 #line 4092 "expparse.c"
4092         break;
4093       case 257: /* skip_statement ::= TOK_SKIP semicolon */
4094 #line 2036 "expparse.y"
4095 {
4096     yygotominor.yy332 = STATEMENT_SKIP;
4097 }
4098 #line 4099 "expparse.c"
4099         break;
4100       case 258: /* statement ::= alias_statement */
4101       case 259: /* statement ::= assignment_statement */ yytestcase(yyruleno==259);
4102       case 260: /* statement ::= case_statement */ yytestcase(yyruleno==260);
4103       case 261: /* statement ::= compound_statement */ yytestcase(yyruleno==261);
4104       case 262: /* statement ::= escape_statement */ yytestcase(yyruleno==262);
4105       case 263: /* statement ::= if_statement */ yytestcase(yyruleno==263);
4106       case 264: /* statement ::= proc_call_statement */ yytestcase(yyruleno==264);
4107       case 265: /* statement ::= repeat_statement */ yytestcase(yyruleno==265);
4108       case 266: /* statement ::= return_statement */ yytestcase(yyruleno==266);
4109       case 267: /* statement ::= skip_statement */ yytestcase(yyruleno==267);
4110 #line 2041 "expparse.y"
4111 {
4112     yygotominor.yy332 = yymsp[0].minor.yy332;
4113 }
4114 #line 4115 "expparse.c"
4115         break;
4116       case 270: /* statement_rep ::= statement statement_rep */
4117 #line 2090 "expparse.y"
4118 {
4119     yygotominor.yy371 = yymsp[0].minor.yy371;
4120     LISTadd_first(yygotominor.yy371, (Generic)yymsp[-1].minor.yy332);
4121 }
4122 #line 4123 "expparse.c"
4123         break;
4124       case 271: /* subsuper_decl ::= */
4125 #line 2100 "expparse.y"
4126 {
4127     yygotominor.yy242.subtypes = EXPRESSION_NULL;
4128     yygotominor.yy242.abstract = false;
4129     yygotominor.yy242.supertypes = LIST_NULL;
4130 }
4131 #line 4132 "expparse.c"
4132         break;
4133       case 272: /* subsuper_decl ::= supertype_decl */
4134 #line 2106 "expparse.y"
4135 {
4136     yygotominor.yy242.subtypes = yymsp[0].minor.yy385.subtypes;
4137     yygotominor.yy242.abstract = yymsp[0].minor.yy385.abstract;
4138     yygotominor.yy242.supertypes = LIST_NULL;
4139 }
4140 #line 4141 "expparse.c"
4141         break;
4142       case 273: /* subsuper_decl ::= subtype_decl */
4143 #line 2112 "expparse.y"
4144 {
4145     yygotominor.yy242.supertypes = yymsp[0].minor.yy371;
4146     yygotominor.yy242.abstract = false;
4147     yygotominor.yy242.subtypes = EXPRESSION_NULL;
4148 }
4149 #line 4150 "expparse.c"
4150         break;
4151       case 274: /* subsuper_decl ::= supertype_decl subtype_decl */
4152 #line 2118 "expparse.y"
4153 {
4154     yygotominor.yy242.subtypes = yymsp[-1].minor.yy385.subtypes;
4155     yygotominor.yy242.abstract = yymsp[-1].minor.yy385.abstract;
4156     yygotominor.yy242.supertypes = yymsp[0].minor.yy371;
4157 }
4158 #line 4159 "expparse.c"
4159         break;
4160       case 276: /* supertype_decl ::= TOK_ABSTRACT TOK_SUPERTYPE */
4161 #line 2131 "expparse.y"
4162 {
4163     yygotominor.yy385.subtypes = (Expression)0;
4164     yygotominor.yy385.abstract = true;
4165 }
4166 #line 4167 "expparse.c"
4167         break;
4168       case 277: /* supertype_decl ::= TOK_SUPERTYPE TOK_OF TOK_LEFT_PAREN supertype_expression TOK_RIGHT_PAREN */
4169 #line 2137 "expparse.y"
4170 {
4171     yygotominor.yy385.subtypes = yymsp[-1].minor.yy401;
4172     yygotominor.yy385.abstract = false;
4173 }
4174 #line 4175 "expparse.c"
4175         break;
4176       case 278: /* supertype_decl ::= TOK_ABSTRACT TOK_SUPERTYPE TOK_OF TOK_LEFT_PAREN supertype_expression TOK_RIGHT_PAREN */
4177 #line 2143 "expparse.y"
4178 {
4179     yygotominor.yy385.subtypes = yymsp[-1].minor.yy401;
4180     yygotominor.yy385.abstract = true;
4181 }
4182 #line 4183 "expparse.c"
4183         break;
4184       case 279: /* supertype_expression ::= supertype_factor */
4185 #line 2149 "expparse.y"
4186 {
4187     yygotominor.yy401 = yymsp[0].minor.yy385.subtypes;
4188 }
4189 #line 4190 "expparse.c"
4190         break;
4191       case 280: /* supertype_expression ::= supertype_expression TOK_AND supertype_factor */
4192 #line 2153 "expparse.y"
4193 {
4194     yygotominor.yy401 = BIN_EXPcreate(OP_AND, yymsp[-2].minor.yy401, yymsp[0].minor.yy385.subtypes);
4195 }
4196 #line 4197 "expparse.c"
4197         break;
4198       case 281: /* supertype_expression ::= supertype_expression TOK_ANDOR supertype_factor */
4199 #line 2158 "expparse.y"
4200 {
4201     yygotominor.yy401 = BIN_EXPcreate(OP_ANDOR, yymsp[-2].minor.yy401, yymsp[0].minor.yy385.subtypes);
4202 }
4203 #line 4204 "expparse.c"
4204         break;
4205       case 283: /* supertype_expression_list ::= supertype_expression_list TOK_COMMA supertype_expression */
4206 #line 2169 "expparse.y"
4207 {
4208     LISTadd_last(yymsp[-2].minor.yy371, (Generic)yymsp[0].minor.yy401);
4209     yygotominor.yy371 = yymsp[-2].minor.yy371;
4210 }
4211 #line 4212 "expparse.c"
4212         break;
4213       case 284: /* supertype_factor ::= identifier */
4214 #line 2175 "expparse.y"
4215 {
4216     yygotominor.yy385.subtypes = yymsp[0].minor.yy401;
4217 }
4218 #line 4219 "expparse.c"
4219         break;
4220       case 285: /* supertype_factor ::= oneof_op TOK_LEFT_PAREN supertype_expression_list TOK_RIGHT_PAREN */
4221 #line 2180 "expparse.y"
4222 {
4223     yygotominor.yy385.subtypes = EXPcreate(Type_Oneof);
4224     yygotominor.yy385.subtypes->u.list = yymsp[-1].minor.yy371;
4225 }
4226 #line 4227 "expparse.c"
4227         break;
4228       case 286: /* supertype_factor ::= TOK_LEFT_PAREN supertype_expression TOK_RIGHT_PAREN */
4229 #line 2185 "expparse.y"
4230 {
4231     yygotominor.yy385.subtypes = yymsp[-1].minor.yy401;
4232 }
4233 #line 4234 "expparse.c"
4234         break;
4235       case 287: /* type ::= aggregation_type */
4236       case 288: /* type ::= basic_type */ yytestcase(yyruleno==288);
4237       case 290: /* type ::= select_type */ yytestcase(yyruleno==290);
4238 #line 2190 "expparse.y"
4239 {
4240     yygotominor.yy378.type = 0;
4241     yygotominor.yy378.body = yymsp[0].minor.yy477;
4242 }
4243 #line 4244 "expparse.c"
4244         break;
4245       case 292: /* type_item_body ::= type */
4246 #line 2215 "expparse.y"
4247 {
4248     CURRENT_SCOPE->u.type->head = yymsp[0].minor.yy378.type;
4249     CURRENT_SCOPE->u.type->body = yymsp[0].minor.yy378.body;
4250 }
4251 #line 4252 "expparse.c"
4252         break;
4253       case 294: /* ti_start ::= TOK_IDENTIFIER TOK_EQUAL */
4254 #line 2223 "expparse.y"
4255 {
4256     Type t = TYPEcreate_name(yymsp[-1].minor.yy0.symbol);
4257     PUSH_SCOPE(t, yymsp[-1].minor.yy0.symbol, OBJ_TYPE);
4258 }
4259 #line 4260 "expparse.c"
4260         break;
4261       case 296: /* td_start ::= TOK_TYPE type_item where_rule_OPT */
4262 #line 2234 "expparse.y"
4263 {
4264     CURRENT_SCOPE->where = yymsp[0].minor.yy371;
4265     POP_SCOPE();
4266     yygotominor.yy0 = yymsp[-2].minor.yy0;
4267 }
4268 #line 4269 "expparse.c"
4269         break;
4270       case 297: /* general_ref ::= assignable group_ref */
4271 #line 2241 "expparse.y"
4272 {
4273     yymsp[0].minor.yy401->e.op1 = yymsp[-1].minor.yy401;
4274     yygotominor.yy401 = yymsp[0].minor.yy401;
4275 }
4276 #line 4277 "expparse.c"
4277         break;
4278       case 307: /* unary_expression ::= TOK_NOT unary_expression */
4279 #line 2284 "expparse.y"
4280 {
4281     yygotominor.yy401 = UN_EXPcreate(OP_NOT, yymsp[0].minor.yy401);
4282 }
4283 #line 4284 "expparse.c"
4284         break;
4285       case 309: /* unary_expression ::= TOK_MINUS unary_expression */
4286 #line 2292 "expparse.y"
4287 {
4288     yygotominor.yy401 = UN_EXPcreate(OP_NEGATE, yymsp[0].minor.yy401);
4289 }
4290 #line 4291 "expparse.c"
4291         break;
4292       case 310: /* unique ::= */
4293 #line 2297 "expparse.y"
4294 {
4295     yygotominor.yy252.unique = 0;
4296 }
4297 #line 4298 "expparse.c"
4298         break;
4299       case 311: /* unique ::= TOK_UNIQUE */
4300 #line 2301 "expparse.y"
4301 {
4302     yygotominor.yy252.unique = 1;
4303 }
4304 #line 4305 "expparse.c"
4305         break;
4306       case 315: /* labelled_attrib_list ::= qualified_attr_list semicolon */
4307 #line 2328 "expparse.y"
4308 {
4309     LISTadd_first(yymsp[-1].minor.yy371, (Generic)EXPRESSION_NULL);
4310     yygotominor.yy371 = yymsp[-1].minor.yy371;
4311 }
4312 #line 4313 "expparse.c"
4313         break;
4314       case 316: /* labelled_attrib_list ::= TOK_IDENTIFIER TOK_COLON qualified_attr_list semicolon */
4315 #line 2334 "expparse.y"
4316 {
4317     LISTadd_first(yymsp[-1].minor.yy371, (Generic)yymsp[-3].minor.yy0.symbol);
4318     yygotominor.yy371 = yymsp[-1].minor.yy371;
4319 }
4320 #line 4321 "expparse.c"
4321         break;
4322       case 317: /* labelled_attrib_list_list ::= labelled_attrib_list */
4323 #line 2341 "expparse.y"
4324 {
4325     yygotominor.yy371 = LISTcreate();
4326     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy371);
4327 }
4328 #line 4329 "expparse.c"
4329         break;
4330       case 318: /* labelled_attrib_list_list ::= labelled_attrib_list_list labelled_attrib_list */
4331 #line 2347 "expparse.y"
4332 {
4333     LISTadd_last(yymsp[-1].minor.yy371, (Generic)yymsp[0].minor.yy371);
4334     yygotominor.yy371 = yymsp[-1].minor.yy371;
4335 }
4336 #line 4337 "expparse.c"
4337         break;
4338       case 321: /* until_control ::= */
4339       case 330: /* while_control ::= */ yytestcase(yyruleno==330);
4340 #line 2362 "expparse.y"
4341 {
4342     yygotominor.yy401 = 0;
4343 }
4344 #line 4345 "expparse.c"
4345         break;
4346       case 323: /* where_clause ::= expression semicolon */
4347 #line 2371 "expparse.y"
4348 {
4349     yygotominor.yy234 = WHERE_new();
4350     yygotominor.yy234->label = SYMBOLcreate("<unnamed>", yylineno, current_filename);
4351     yygotominor.yy234->expr = yymsp[-1].minor.yy401;
4352 }
4353 #line 4354 "expparse.c"
4354         break;
4355       case 324: /* where_clause ::= TOK_IDENTIFIER TOK_COLON expression semicolon */
4356 #line 2377 "expparse.y"
4357 {
4358     yygotominor.yy234 = WHERE_new();
4359     yygotominor.yy234->label = yymsp[-3].minor.yy0.symbol;
4360     yygotominor.yy234->expr = yymsp[-1].minor.yy401;
4361 
4362     if (!CURRENT_SCOPE->symbol_table) {
4363     CURRENT_SCOPE->symbol_table = DICTcreate(25);
4364     }
4365 
4366     DICTdefine(CURRENT_SCOPE->symbol_table, yymsp[-3].minor.yy0.symbol->name, (Generic)yygotominor.yy234,
4367     yymsp[-3].minor.yy0.symbol, OBJ_WHERE);
4368 }
4369 #line 4370 "expparse.c"
4370         break;
4371       case 325: /* where_clause_list ::= where_clause */
4372 #line 2391 "expparse.y"
4373 {
4374     yygotominor.yy371 = LISTcreate();
4375     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy234);
4376 }
4377 #line 4378 "expparse.c"
4378         break;
4379       case 326: /* where_clause_list ::= where_clause_list where_clause */
4380 #line 2396 "expparse.y"
4381 {
4382     yygotominor.yy371 = yymsp[-1].minor.yy371;
4383     LISTadd_last(yygotominor.yy371, (Generic)yymsp[0].minor.yy234);
4384 }
4385 #line 4386 "expparse.c"
4386         break;
4387       default:
4388       /* (4) action_body_item_rep ::= */ yytestcase(yyruleno==4);
4389       /* (41) block_list ::= */ yytestcase(yyruleno==41);
4390       /* (62) constant_body_list ::= */ yytestcase(yyruleno==62);
4391       /* (86) express_file ::= schema_decl_list */ yytestcase(yyruleno==86);
4392       /* (159) parened_rename_list ::= TOK_LEFT_PAREN rename_list TOK_RIGHT_PAREN */ yytestcase(yyruleno==159);
4393       /* (168) interface_specification_list ::= */ yytestcase(yyruleno==168);
4394       /* (194) local_body ::= */ yytestcase(yyruleno==194);
4395       /* (196) local_decl ::= TOK_LOCAL local_decl_rules_on local_body TOK_END_LOCAL semicolon local_decl_rules_off */ yytestcase(yyruleno==196);
4396       /* (293) type_item ::= ti_start type_item_body semicolon */ yytestcase(yyruleno==293);
4397         break;
4398   };
4399   yygoto = yyRuleInfo[yyruleno].lhs;
4400   yysize = yyRuleInfo[yyruleno].nrhs;
4401   yypParser->yyidx -= yysize;
4402   yyact = yy_find_reduce_action(yymsp[-yysize].stateno,(YYCODETYPE)yygoto);
4403   if( yyact < YYNSTATE ){
4404 #ifdef NDEBUG
4405     /* If we are not debugging and the reduce action popped at least
4406     ** one element off the stack, then we can push the new element back
4407     ** onto the stack here, and skip the stack overflow test in yy_shift().
4408     ** That gives a significant speed improvement. */
4409     if( yysize ){
4410       yypParser->yyidx++;
4411       yymsp -= yysize-1;
4412       yymsp->stateno = (YYACTIONTYPE)yyact;
4413       yymsp->major = (YYCODETYPE)yygoto;
4414       yymsp->minor = yygotominor;
4415     }else
4416 #endif
4417     {
4418       yy_shift(yypParser,yyact,yygoto,&yygotominor);
4419     }
4420   }else{
4421     assert( yyact == YYNSTATE + YYNRULE + 1 );
4422     yy_accept(yypParser);
4423   }
4424 }
4425 
4426 /*
4427 ** The following code executes when the parse fails
4428 */
4429 #ifndef YYNOERRORRECOVERY
yy_parse_failed(yyParser * yypParser)4430 static void yy_parse_failed(
4431   yyParser *yypParser           /* The parser */
4432 ){
4433   ParseARG_FETCH;
4434 #ifndef NDEBUG
4435   if( yyTraceFILE ){
4436     fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
4437   }
4438 #endif
4439   while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
4440   /* Here code is inserted which will be executed whenever the
4441   ** parser fails */
4442   ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
4443 }
4444 #endif /* YYNOERRORRECOVERY */
4445 
4446 /*
4447 ** The following code executes when a syntax error first occurs.
4448 */
yy_syntax_error(yyParser * yypParser,int yymajor,YYMINORTYPE yyminor)4449 static void yy_syntax_error(
4450   yyParser *yypParser,           /* The parser */
4451   int yymajor,                   /* The major type of the error token */
4452   YYMINORTYPE yyminor            /* The minor type of the error token */
4453 ){
4454   ParseARG_FETCH;
4455 #define TOKEN (yyminor.yy0)
4456 #line 2424 "expparse.y"
4457 
4458     Symbol sym;
4459 
4460     (void) yymajor; /* quell unused param warning */
4461     (void) yyminor;
4462     yyerrstatus++;
4463 
4464     sym.line = yylineno;
4465     sym.filename = current_filename;
4466 
4467     ERRORreport_with_symbol(ERROR_syntax, &sym, "Syntax error",
4468     CURRENT_SCOPE_TYPE_PRINTABLE, CURRENT_SCOPE_NAME);
4469 #line 4470 "expparse.c"
4470   ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
4471 }
4472 
4473 /*
4474 ** The following is executed when the parser accepts
4475 */
yy_accept(yyParser * yypParser)4476 static void yy_accept(
4477   yyParser *yypParser           /* The parser */
4478 ){
4479   ParseARG_FETCH;
4480 #ifndef NDEBUG
4481   if( yyTraceFILE ){
4482     fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
4483   }
4484 #endif
4485   while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
4486   /* Here code is inserted which will be executed whenever the
4487   ** parser accepts */
4488   ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
4489 }
4490 
4491 /* The main parser program.
4492 ** The first argument is a pointer to a structure obtained from
4493 ** "ParseAlloc" which describes the current state of the parser.
4494 ** The second argument is the major token number.  The third is
4495 ** the minor token.  The fourth optional argument is whatever the
4496 ** user wants (and specified in the grammar) and is available for
4497 ** use by the action routines.
4498 **
4499 ** Inputs:
4500 ** <ul>
4501 ** <li> A pointer to the parser (an opaque structure.)
4502 ** <li> The major token number.
4503 ** <li> The minor token number.
4504 ** <li> An option argument of a grammar-specified type.
4505 ** </ul>
4506 **
4507 ** Outputs:
4508 ** None.
4509 */
Parse(void * yyp,int yymajor,ParseTOKENTYPE yyminor ParseARG_PDECL)4510 void Parse(
4511   void *yyp,                   /* The parser */
4512   int yymajor,                 /* The major token code number */
4513   ParseTOKENTYPE yyminor       /* The value for the token */
4514   ParseARG_PDECL               /* Optional %extra_argument parameter */
4515 ){
4516   YYMINORTYPE yyminorunion;
4517   int yyact;            /* The parser action. */
4518   int yyendofinput;     /* True if we are at the end of input */
4519 #ifdef YYERRORSYMBOL
4520   int yyerrorhit = 0;   /* True if yymajor has invoked an error */
4521 #endif
4522   yyParser *yypParser;  /* The parser */
4523 
4524   /* (re)initialize the parser, if necessary */
4525   yypParser = (yyParser*)yyp;
4526   if( yypParser->yyidx<0 ){
4527 #if YYSTACKDEPTH<=0
4528     if( yypParser->yystksz <=0 ){
4529       /*memset(&yyminorunion, 0, sizeof(yyminorunion));*/
4530       yyminorunion = yyzerominor;
4531       yyStackOverflow(yypParser, &yyminorunion);
4532       return;
4533     }
4534 #endif
4535     yypParser->yyidx = 0;
4536     yypParser->yyerrcnt = -1;
4537     yypParser->yystack[0].stateno = 0;
4538     yypParser->yystack[0].major = 0;
4539   }
4540   yyminorunion.yy0 = yyminor;
4541   yyendofinput = (yymajor==0);
4542   ParseARG_STORE;
4543 
4544 #ifndef NDEBUG
4545   if( yyTraceFILE ){
4546     fprintf(yyTraceFILE,"%sInput %s\n",yyTracePrompt,yyTokenName[yymajor]);
4547   }
4548 #endif
4549 
4550   do{
4551     yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
4552     if( yyact<YYNSTATE ){
4553       assert( !yyendofinput );  /* Impossible to shift the $ token */
4554       yy_shift(yypParser,yyact,yymajor,&yyminorunion);
4555       yypParser->yyerrcnt--;
4556       yymajor = YYNOCODE;
4557     }else if( yyact < YYNSTATE + YYNRULE ){
4558       yy_reduce(yypParser,yyact-YYNSTATE);
4559     }else{
4560       assert( yyact == YY_ERROR_ACTION );
4561 #ifdef YYERRORSYMBOL
4562       int yymx;
4563 #endif
4564 #ifndef NDEBUG
4565       if( yyTraceFILE ){
4566         fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
4567       }
4568 #endif
4569 #ifdef YYERRORSYMBOL
4570       /* A syntax error has occurred.
4571       ** The response to an error depends upon whether or not the
4572       ** grammar defines an error token "ERROR".
4573       **
4574       ** This is what we do if the grammar does define ERROR:
4575       **
4576       **  * Call the %syntax_error function.
4577       **
4578       **  * Begin popping the stack until we enter a state where
4579       **    it is legal to shift the error symbol, then shift
4580       **    the error symbol.
4581       **
4582       **  * Set the error count to three.
4583       **
4584       **  * Begin accepting and shifting new tokens.  No new error
4585       **    processing will occur until three tokens have been
4586       **    shifted successfully.
4587       **
4588       */
4589       if( yypParser->yyerrcnt<0 ){
4590         yy_syntax_error(yypParser,yymajor,yyminorunion);
4591       }
4592       yymx = yypParser->yystack[yypParser->yyidx].major;
4593       if( yymx==YYERRORSYMBOL || yyerrorhit ){
4594 #ifndef NDEBUG
4595         if( yyTraceFILE ){
4596           fprintf(yyTraceFILE,"%sDiscard input token %s\n",
4597              yyTracePrompt,yyTokenName[yymajor]);
4598         }
4599 #endif
4600         yy_destructor(yypParser, (YYCODETYPE)yymajor,&yyminorunion);
4601         yymajor = YYNOCODE;
4602       }else{
4603          while(
4604           yypParser->yyidx >= 0 &&
4605           yymx != YYERRORSYMBOL &&
4606           (yyact = yy_find_reduce_action(
4607                         yypParser->yystack[yypParser->yyidx].stateno,
4608                         YYERRORSYMBOL)) >= YYNSTATE
4609         ){
4610           yy_pop_parser_stack(yypParser);
4611         }
4612         if( yypParser->yyidx < 0 || yymajor==0 ){
4613           yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
4614           yy_parse_failed(yypParser);
4615           yymajor = YYNOCODE;
4616         }else if( yymx!=YYERRORSYMBOL ){
4617           YYMINORTYPE u2;
4618           u2.YYERRSYMDT = 0;
4619           yy_shift(yypParser,yyact,YYERRORSYMBOL,&u2);
4620         }
4621       }
4622       yypParser->yyerrcnt = 3;
4623       yyerrorhit = 1;
4624 #elif defined(YYNOERRORRECOVERY)
4625       /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
4626       ** do any kind of error recovery.  Instead, simply invoke the syntax
4627       ** error routine and continue going as if nothing had happened.
4628       **
4629       ** Applications can set this macro (for example inside %include) if
4630       ** they intend to abandon the parse upon the first syntax error seen.
4631       */
4632       yy_syntax_error(yypParser,yymajor,yyminorunion);
4633       yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
4634       yymajor = YYNOCODE;
4635 
4636 #else  /* YYERRORSYMBOL is not defined */
4637       /* This is what we do if the grammar does not define ERROR:
4638       **
4639       **  * Report an error message, and throw away the input token.
4640       **
4641       **  * If the input token is $, then fail the parse.
4642       **
4643       ** As before, subsequent error messages are suppressed until
4644       ** three input tokens have been successfully shifted.
4645       */
4646       if( yypParser->yyerrcnt<=0 ){
4647         yy_syntax_error(yypParser,yymajor,yyminorunion);
4648       }
4649       yypParser->yyerrcnt = 3;
4650       yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
4651       if( yyendofinput ){
4652         yy_parse_failed(yypParser);
4653       }
4654       yymajor = YYNOCODE;
4655 #endif
4656     }
4657   }while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );
4658   return;
4659 }
4660