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