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