Logo Search packages:      
Sourcecode: dealer version File versions  Download package

defs.c

#ifndef lint
/*static char yysccsid[] = "from: @(#)yaccpar   1.9 (Berkeley) 02/21/93";*/
static char yyrcsid[] = "$Id: skeleton.c,v 1.4 1993/12/21 18:45:32 jtc Exp $";
#endif
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define yyclearin (yychar=(-1))
#define yyerrok (yyerrflag=0)
#define YYRECOVERING (yyerrflag!=0)
#define YYPREFIX "yy"
#line 2 "defs.y"
#include <stdio.h>
#include <string.h>

#ifdef WIN32

/* void * _alloca( size_t ) ;*/
#define alloca _alloca

#endif /* WIN32 */

#include <stdlib.h>
#include "tree.h"
#include "dealer.h"

void  yyerror (char*);
void  setshapebit (int, int, int, int, int, int);
void  predeal (int, card);
card  make_card(char,char);
void  clearpointcount(void);
void  clearpointcount_alt(int);
void  pointcount(int,int);
void* mycalloc(int,size_t);
int   make_contract (char, char);

int predeal_compass;     /* global variable for predeal communication */

int pointcount_index;    /* global variable for pointcount communication */

int shapeno ;

struct tree *var_lookup(char *s, int mustbethere) ;
struct action *newaction(int type, struct tree * p1, char * s1, int, struct tree * ) ;
struct tree *newtree (int, struct tree*, struct tree*, int, int);
struct expr  *newexpr(struct tree* tr1, char* ch1, struct expr* ex1);
void bias_deal(int suit, int compass, int length) ;
void predeal_holding(int compass, char *holding) ;
void insertshape(char s[4], int any, int neg_shape) ;
void new_var(char *s, struct tree *t) ;
#line 43 "defs.y"
00052 typedef union {
        int     y_int;
        char    *y_str;
        struct tree *y_tree;
        struct action *y_action;
        struct expr   *y_expr;
        char    y_distr[4];
} YYSTYPE;
#line 61 "y.tab.c"
#define QUERY 257
#define COLON 258
#define OR2 259
#define AND2 260
#define CMPEQ 261
#define CMPNE 262
#define CMPLT 263
#define CMPLE 264
#define CMPGT 265
#define CMPGE 266
#define ARPLUS 267
#define ARMINUS 268
#define ARTIMES 269
#define ARDIVIDE 270
#define ARMOD 271
#define NOT 272
#define GENERATE 273
#define PRODUCE 274
#define HCP 275
#define SHAPE 276
#define ANY 277
#define EXCEPT 278
#define CONDITION 279
#define ACTION 280
#define PRINT 281
#define PRINTALL 282
#define PRINTEW 283
#define PRINTPBN 284
#define PRINTCOMPACT 285
#define PRINTONELINE 286
#define AVERAGE 287
#define HASCARD 288
#define FREQUENCY 289
#define PREDEAL 290
#define POINTCOUNT 291
#define ALTCOUNT 292
#define CONTROL 293
#define LOSER 294
#define DEALER 295
#define VULNERABLE 296
#define QUALITY 297
#define CCCC 298
#define TRICKS 299
#define NOTRUMPS 300
#define NORTHSOUTH 301
#define EASTWEST 302
#define EVALCONTRACT 303
#define ALL 304
#define NONE 305
#define SCORE 306
#define IMPS 307
#define RND 308
#define PT0 309
#define PT1 310
#define PT2 311
#define PT3 312
#define PT4 313
#define PT5 314
#define PT6 315
#define PT7 316
#define PT8 317
#define PT9 318
#define PRINTES 319
#define NUMBER 320
#define HOLDING 321
#define STRING 322
#define IDENT 323
#define COMPASS 324
#define VULN 325
#define SUIT 326
#define CARD 327
#define CONTRACT 328
#define DISTR 329
#define DISTR_OR_NUMBER 330
#define YYERRCODE 256
short yylhs[] = {                                        -1,
    0,    0,   13,   13,   13,   13,   13,   16,   13,   17,
   13,   13,   13,   13,   13,   14,   14,   20,   18,   18,
   19,   19,   15,   21,   15,    3,    7,    5,    5,    5,
    5,    6,    6,    2,    2,    2,    8,    8,   22,   23,
   23,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    1,    1,    1,    1,    1,   11,   11,   11,   11,    9,
    9,    9,   10,   10,   10,   10,   10,   10,   10,   10,
   10,   10,   10,   10,   10,   12,   12,    4,    4,
};
short yylen[] = {                                         2,
    0,    2,    2,    2,    2,    2,    2,    0,    3,    0,
    4,    2,    1,    3,    2,    1,    2,    0,    3,    6,
    1,    3,    0,    0,    3,    1,    1,    1,    1,    0,
    1,    0,    1,    1,    2,    1,    1,    1,    3,    1,
    2,    1,    1,    4,    4,    6,    4,    6,    4,    6,
    4,    6,    4,    6,    4,    6,    4,    6,    4,    6,
    4,    6,    4,    6,    4,    6,    4,    6,    4,    6,
    4,    6,    6,    6,    6,    6,    8,    4,    3,    3,
    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
    3,    3,    5,    2,    4,    1,    1,    3,    3,    1,
    3,    0,    1,    1,    4,    1,    1,    1,    4,    1,
    4,    4,    3,    9,   15,    0,    1,    1,    3,
};
short yydefred[] = {                                      1,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    8,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,   34,    0,    0,   36,    0,    0,   42,
    2,   35,   43,   94,    3,    4,    0,    0,    0,    0,
  103,  104,  108,    0,    0,    0,    0,  110,    0,   15,
    0,    0,   18,    0,    0,   16,    0,   10,    0,    0,
   26,    5,   27,    6,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,  117,    0,    0,    0,    0,    0,    0,    0,
   17,   24,    9,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,   79,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,   90,   91,   92,   45,
    0,    0,  118,    0,    0,    0,    0,    0,   97,    0,
    0,  101,    0,   21,    0,    0,    0,   11,   69,    0,
   67,    0,    0,   71,    0,    0,   78,   95,   47,    0,
   49,    0,   51,    0,   53,    0,   55,    0,   57,    0,
   59,    0,   61,    0,   63,    0,   65,    0,   44,    0,
    0,   29,   31,   28,    0,   40,    0,  105,    0,  111,
  112,    0,  109,    0,    0,    0,    0,   25,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,   46,   33,    0,   73,   41,
  119,    0,   99,    0,   74,   22,    0,   70,   68,   72,
   76,   75,    0,   48,   50,   52,   54,   56,   58,   60,
   62,   64,   66,   37,   38,   39,    0,   20,    0,    0,
   77,    0,  114,    0,    0,    0,    0,    0,    0,  115,
};
short yydgoto[] = {                                       1,
   39,   40,   72,  164,  215,  248,   74,  276,   60,   61,
  171,  114,   41,   65,  123,   67,  124,   66,  175,  119,
  177,  216,  217,
};
short yysindex[] = {                                      0,
 1640, -302, 1805, -266, -266,   -9,   34, 1805, -270,   36,
 -317,    0, -266,   47,   77, -304, -256,  108,  142,  145,
  146,  147,  148,  151,  152,  154,  155,  156,  157,  158,
  159,  160,  161,    0,  -15,  162,    0, 1805, -139,    0,
    0,    0,    0,    0,    0,    0, -304, -304, -139,  163,
    0,    0,    0,  164,  165, -116, -116,    0,  167,    0,
  166, -115,    0,  168, -317,    0, -266,    0, -304, -304,
    0,    0,    0,    0, -304, -304, -304, -114, 1805, 1805,
 -304, -304, -304, -304, -304, -304, -304, -304, -304, -304,
 1805, -304,  -41, 1805, 1805, 1805, 1805, 1805, 1805, 1805,
 1805, 1805, 1805, 1805, 1805, 1805, 1805,   -2,  169, -112,
 1805, 1805,    0, 1805,  174, 1693, -270,  171, -104,  -89,
    0,    0,    0, -266,    4,    6,  192,  211,  209,  210,
  -20, 1979,   17,   18,   19,   26,  121,  122,  123,  127,
  128,  129, -139,  214,    0, -168, -110, -157, -241, -241,
 -233, -233, -233, -233, -218, -218,    0,    0,    0,    0,
  -70,  -34,    0,  133, 1994, 2009, -139, 1805,    0, -139,
  134,    0,  -68,    0,  213,  242, -266,    0,    0,  -42,
    0,  -40,  -39,    0, -294,  -43,    0,    0,    0,  -38,
    0,  -25,    0,  -24,    0,  -23,    0,  -22,    0,  -21,
    0,   -3,    0,   -1,    0,    2,    0,    3,    0, 1805,
  249,    0,    0,    0,   29,    0,  -36,    0,   20,    0,
    0, 2048,    0, 1749,  281,    5,   69,    0,  304,  305,
  311,  312,  315,  313,  317,  318,  321,  334,  335,  336,
  337,  338,  339,  355, -126,    0,    0, -261,    0,    0,
    0, -266,    0, -139,    0,    0,   79,    0,    0,    0,
    0,    0, 1805,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,  353,    0, 2033, -266,
    0,  135,    0, 1805, 2089, -266,  356, -266,  361,    0,
};
short yyrindex[] = {                                      0,
    0,    0,    0,    0,    0,    0,    0,    0, 1002,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    1,    0,    0,    0, 1323,    0,
    0,    0,    0,    0,    0,    0,    0,    0, 1395,    0,
    0,    0,    0, 1076, 1135, 1864,  167,    0,    0,    0,
 1203,    0,    0,    0, 1463,    0, 1584,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0, 1002,    0,    0,    0,
    0,    0,    0, 1584,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0, 1524,    0,    0,    0,  799,  721,  557,  639,
  238,  320,  394,  480,   75,  149,    0,    0,    0,    0,
    0, -274,    0,    0,    0,    0, 1263,    0,    0,  139,
    0,    0,    0,    0,  942,    0, 1584,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0, -183,    0, -274,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,  876,    0,    0,    0,    0,    0,
    0,    0,    0,  140,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
};
short yygindex[] = {                                      0,
 2121,  718,   -4,    0,    0,    0,    0,    0,  286,    0,
    0,  347,    0,    0, -120,    0,    0,  354,    0,    0,
    0,  201,    0,
};
#define YYTABLESIZE 2405
short yytable[] = {                                     145,
   43,    2,   30,  178,  249,  232,   63,  214,   64,  214,
   50,   51,   52,   53,   54,   55,   56,   42,   57,   71,
  187,   99,  100,  101,  102,  103,  104,  105,  106,  107,
   47,  233,   58,  103,  104,  105,  106,  107,  160,   73,
   43,  161,  108,  109,  179,   91,  181,  180,   59,  182,
  105,  106,  107,   34,   30,   30,  228,  189,  191,  193,
  190,  192,  194,   37,  125,  126,  195,  274,  275,  196,
  127,  128,  129,   48,   88,   62,  133,  134,  135,  136,
  137,  138,  139,  140,  141,  142,   69,  144,   94,  210,
   95,   96,   97,   98,   99,  100,  101,  102,  103,  104,
  105,  106,  107,   97,   98,   99,  100,  101,  102,  103,
  104,  105,  106,  107,   88,   88,   70,   94,   88,   95,
   96,   97,   98,   99,  100,  101,  102,  103,  104,  105,
  106,  107,   95,   96,   97,   98,   99,  100,  101,  102,
  103,  104,  105,  106,  107,   32,   32,   75,   89,   96,
   97,   98,   99,  100,  101,  102,  103,  104,  105,  106,
  107,  197,  199,  201,  198,  200,  202,  203,  205,  207,
  204,  206,  208,  218,  223,  283,  219,  224,  284,   96,
   98,   76,   96,   98,   77,   78,   79,   80,   89,   89,
   81,   82,   89,   83,   84,   85,   86,   87,   88,   89,
   90,   92,  110,  111,  112,  113,  116,  120,  118,  117,
  130,  163,  162,  168,  173,   94,  174,   95,   96,   97,
   98,   99,  100,  101,  102,  103,  104,  105,  106,  107,
  212,  213,  212,  213,  176,  183,   94,   82,   95,   96,
   97,   98,   99,  100,  101,  102,  103,  104,  105,  106,
  107,  184,  185,  186,  209,  211,  226,   43,  225,   43,
   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
   43,   43,   43,   43,   43,   43,   43,   82,   82,   43,
   43,   82,  227,  229,  234,  230,  231,  235,   43,  246,
   43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
  236,  237,  238,  239,  240,  247,   43,   43,   43,   43,
   43,   43,   43,   43,   43,   43,   43,   43,   43,   83,
   43,  255,  241,   43,  242,  256,   43,  243,  244,  257,
   43,   88,   88,   88,   88,   88,   88,   88,   88,   88,
   88,   88,   88,  251,  258,  259,   88,   88,   88,   88,
   88,  260,  261,   88,   88,  262,  263,  264,  265,   83,
   83,  266,   88,   83,   88,   88,   88,   88,   88,   88,
   88,   88,   88,   88,  267,  268,  269,  270,  271,  272,
   88,   88,   88,   88,   88,   88,   88,   88,   88,   88,
   88,   88,   88,   84,   88,  273,  280,   88,  278,  288,
   88,  290,  172,  115,   88,   89,   89,   89,   89,   89,
   89,   89,   89,   89,   89,   89,   89,  250,  121,    0,
   89,   89,   89,   89,   89,    0,    0,   89,   89,    0,
    0,    0,    0,   84,   84,    0,   89,   84,   89,   89,
   89,   89,   89,   89,   89,   89,   89,   89,    0,    0,
    0,    0,    0,    0,   89,   89,   89,   89,   89,   89,
   89,   89,   89,   89,   89,   89,   89,    0,   89,    0,
    0,   89,    0,    0,   89,    0,    0,    0,   89,   85,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,   82,   82,   82,   82,   82,   82,
   82,   82,   82,   82,    0,    0,    0,    0,    0,   82,
   82,   82,   82,   82,    0,    0,   82,   82,    0,   85,
   85,    0,    0,   85,    0,   82,    0,   82,   82,   82,
   82,   82,   82,   82,   82,   82,   82,    0,    0,    0,
    0,    0,    0,   82,   82,   82,   82,   82,   82,   82,
   82,   82,   82,   82,   82,   82,   80,   82,    0,    0,
   82,    0,    0,   82,    0,    0,    0,   82,    0,    0,
    0,    0,    0,    0,    0,    0,   83,   83,   83,   83,
   83,   83,   83,   83,   83,   83,    0,    0,    0,    0,
    0,   83,   83,   83,   83,   83,   80,   80,   83,   83,
   80,    0,    0,    0,    0,    0,    0,   83,    0,   83,
   83,   83,   83,   83,   83,   83,   83,   83,   83,    0,
    0,    0,    0,    0,    0,   83,   83,   83,   83,   83,
   83,   83,   83,   83,   83,   83,   83,   83,   81,   83,
    0,    0,   83,    0,    0,   83,    0,    0,    0,   83,
   84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
    0,    0,    0,    0,    0,   84,   84,   84,   84,   84,
    0,    0,   84,   84,    0,    0,    0,    0,   81,   81,
    0,   84,   81,   84,   84,   84,   84,   84,   84,   84,
   84,   84,   84,    0,    0,    0,    0,    0,    0,   84,
   84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
   84,   84,    0,   84,    0,    0,   84,    0,    0,   84,
   86,   45,   46,   84,    0,    0,    0,    0,    0,    0,
   68,    0,    0,    0,    0,    0,   85,   85,   85,   85,
   85,   85,   85,   85,   85,   85,    0,    0,    0,    0,
    0,   85,   85,   85,   85,   85,    0,    0,   85,   85,
   86,   86,    0,    0,   86,    0,    0,   85,    0,   85,
   85,   85,   85,   85,   85,   85,   85,   85,   85,    0,
    0,    0,    0,    0,  122,   85,   85,   85,   85,   85,
   85,   85,   85,   85,   85,   85,   85,   85,   87,   85,
    0,    0,   85,    0,    0,   85,    0,    0,    0,   85,
    0,    0,    0,   80,   80,   80,   80,   80,   80,    0,
    0,    0,    0,    0,    0,    0,    0,    0,   80,   80,
   80,   80,   80,    0,    0,   80,   80,    0,   87,   87,
    0,  122,   87,    0,   80,    0,   80,   80,   80,   80,
   80,   80,   80,   80,   80,   80,    0,    0,    0,    0,
    0,    0,   80,   80,   80,   80,   80,   80,   80,   80,
   80,   80,   80,   80,   80,   93,   80,    0,    0,   80,
    0,    0,   80,    0,    0,    0,   80,    0,    0,    0,
    0,    0,    0,    0,  122,   81,   81,   81,   81,   81,
   81,    0,    0,    0,    0,    0,    0,    0,    0,    0,
   81,   81,   81,   81,   81,   93,   93,   81,   81,   93,
    0,    0,    0,    0,    0,    0,   81,    0,   81,   81,
   81,   81,   81,   81,   81,   81,   81,   81,    0,    0,
    0,   19,    0,    0,   81,   81,   81,   81,   81,   81,
   81,   81,   81,   81,   81,   81,   81,    0,   81,    0,
    0,   81,    0,    0,   81,    0,    0,    0,   81,  277,
    0,    0,    0,    0,    0,    0,    0,   86,   86,   86,
   86,   19,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,   86,   86,   86,   86,   86,  282,    0,   86,
   86,  102,    0,  287,    0,  289,    0,    0,   86,    0,
   86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
    0,    0,    0,    0,    0,    0,   86,   86,   86,   86,
   86,   86,   86,   86,   86,   86,   86,   86,   86,    0,
   86,  102,    0,   86,    0,    0,   86,    0,    0,    0,
   86,    0,    0,    0,    0,   87,   87,   87,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
   87,   87,   87,   87,   87,  106,    0,   87,   87,    0,
    0,    0,    0,    0,    0,    0,   87,    0,   87,   87,
   87,   87,   87,   87,   87,   87,   87,   87,    0,    0,
    0,    0,    0,    0,   87,   87,   87,   87,   87,   87,
   87,   87,   87,   87,   87,   87,   87,    0,   87,  106,
    0,   87,    0,    0,   87,    0,    0,    0,   87,    0,
    0,    0,   93,   93,  107,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,   93,   93,   93,
   93,   93,    0,    0,   93,   93,    0,    0,    0,    0,
    0,    0,    0,   93,    0,   93,   93,   93,   93,   93,
   93,   93,   93,   93,   93,    0,    0,    0,  107,    0,
    0,   93,   93,   93,   93,   93,   93,   93,   93,   93,
   93,   93,   93,   93,    0,   93,    0,    0,   93,    0,
    0,   93,  100,    0,    0,   93,    0,    0,    0,   19,
    0,    0,    0,   19,   19,   19,   19,   19,    0,    0,
   19,   19,    0,    0,    0,    0,    0,    0,    0,   19,
    0,   19,   19,   19,   19,   19,   19,   19,   19,   19,
   19,    0,  100,    0,    0,    0,    0,   19,   19,   19,
   19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
    0,   19,  113,    0,   19,   19,    0,   19,    0,  102,
    0,   19,    0,  102,  102,  102,  102,  102,    0,    0,
  102,  102,    0,    0,    0,    0,    0,    0,    0,  102,
    0,  102,  102,  102,  102,  102,  102,  102,  102,  102,
  102,    0,  113,    0,    0,    0,  113,  102,  102,  102,
  102,  102,  102,  102,  102,  102,  102,  102,  102,  102,
    0,  102,   13,    0,  102,    0,    0,  102,    0,    0,
    0,  102,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,  106,    0,    0,    0,  106,  106,  106,
  106,  106,    0,    0,  106,  106,    0,    0,    0,    0,
    0,    0,   13,  106,    0,  106,  106,  106,  106,  106,
  106,  106,  106,  106,  106,    0,    0,    0,    0,    0,
    0,  106,  106,  106,  106,  106,  106,  106,  106,  106,
  106,  106,  106,  106,   12,  106,    0,    0,  106,    0,
    0,  106,  107,    0,    0,  106,  107,  107,  107,  107,
  107,    0,    0,  107,  107,    0,    0,    0,    0,    0,
    0,    0,  107,    0,  107,  107,  107,  107,  107,  107,
  107,  107,  107,  107,   12,    0,    0,    0,    0,    0,
  107,  107,  107,  107,  107,  107,  107,  107,  107,  107,
  107,  107,  107,    0,  107,    0,    0,  107,    0,    0,
  107,    0,    7,    0,  107,    0,    0,    0,    0,    0,
  100,    0,    0,    0,  100,  100,  100,  100,  100,    0,
    0,  100,  100,    0,    0,    0,    0,    0,    0,    0,
  100,    0,  100,  100,  100,  100,  100,  100,  100,  100,
  100,  100,    7,    0,    0,    0,    0,    0,  100,  100,
  100,  100,  100,  100,  100,  100,  100,  100,  100,  100,
  100,    0,  100,   14,    0,  100,    0,    0,  100,    0,
    0,    0,  100,    0,  113,  113,  113,  113,  113,    0,
    0,  113,  113,    0,    0,    0,    0,    0,    0,    0,
  113,    0,  113,  113,  113,  113,  113,  113,  113,  113,
  113,  113,    0,   14,    0,    0,    0,    0,  113,  113,
  113,  113,  113,  113,  113,  113,  113,  113,  113,  113,
  113,    0,  113,   23,    0,  113,    0,    0,  113,    0,
    0,    0,  113,    0,   13,   13,   13,   13,   13,    0,
    0,   13,   13,    0,    0,    0,    0,    0,    0,    0,
   13,    0,   13,   13,   13,   13,   13,   13,   13,   13,
   13,   13,    0,   23,    0,    0,    0,    0,   13,   13,
   13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
   13,    0,   13,    0,    0,   13,    0,    0,   13,    0,
    0,    0,   13,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,   12,   12,   12,   12,
   12,    0,    0,   12,   12,    0,    0,    0,    0,   38,
    0,    0,   12,    0,   12,   12,   12,   12,   12,   12,
   12,   12,   12,   12,    0,    0,    0,    0,    0,    0,
   12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
   12,   12,   12,    0,   12,    0,    0,   12,    0,    0,
   12,    0,    0,    0,   12,    0,    0,    0,    0,    0,
    7,    0,   38,    0,    7,    7,    7,    7,    7,    0,
    0,    7,    7,    0,    0,    0,    0,    0,    0,    0,
    7,    0,    7,    7,    7,    7,    7,    7,    7,    7,
    7,    7,    0,    0,    0,    0,    0,    0,    7,    7,
    7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
    7,    0,    7,    0,    0,    7,    0,    0,   38,    0,
    0,    0,    7,    0,    0,   14,   14,   14,   14,   14,
    0,    0,   14,   14,    0,    0,    0,    0,    0,    0,
    0,   14,    0,   14,   14,   14,   14,   14,   14,   14,
   14,   14,   14,    0,    0,    0,    0,    0,    0,   14,
   14,   14,   14,   14,   14,   14,   14,   14,   14,   14,
   14,   14,    0,   14,   38,    0,   14,    0,    0,   14,
    0,    0,    0,   14,    0,   23,   23,   23,   23,   23,
    0,    0,   23,   23,    0,    0,    0,    0,    0,    0,
    0,   23,    0,   23,   23,   23,   23,   23,   23,   23,
   23,   23,   23,    0,    0,    0,    0,    0,    0,   23,
   23,   23,   23,   23,   23,   23,   23,   23,   23,   23,
   23,   23,    0,  116,    0,    0,   23,    2,    0,   23,
    0,    3,    4,    5,    6,    7,    0,    0,    8,    9,
    0,    0,    0,    0,    0,    0,    0,   10,    0,   11,
   12,   13,   14,   15,   16,   17,   18,   19,   20,    0,
    0,    0,    0,    0,    0,   21,   22,   23,   24,   25,
   26,   27,   28,   29,   30,   31,   32,   33,    0,   34,
    2,    0,   35,    0,    3,   36,    0,    6,    7,   37,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
   10,    0,    0,    0,    0,   14,   15,    0,    0,   18,
   19,   20,    0,    0,    0,    0,    0,    0,   21,   22,
   23,   24,   25,   26,   27,   28,   29,   30,   31,   32,
   33,    0,   34,    0,  169,   43,    2,    0,   36,  188,
    3,    0,   37,    6,    7,    0,    0,    0,    0,    0,
    0,    0,    0,    0,  220,    0,   10,    0,    0,    0,
    0,   14,   15,    0,    0,   18,   19,   20,    0,  221,
    0,    0,    0,    0,   21,   22,   23,   24,   25,   26,
   27,   28,   29,   30,   31,   32,   33,    0,   34,    0,
  253,   43,    2,  281,   36,    0,    3,    0,   37,    6,
    7,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,  252,   10,    0,    0,    0,    0,   14,   15,    0,
    0,   18,   19,   20,    0,    0,    0,    0,    0,    0,
   21,   22,   23,   24,   25,   26,   27,   28,   29,   30,
   31,   32,   33,   44,   34,    0,    0,   43,   49,    0,
   36,  116,  286,    0,   37,  116,    0,    0,  116,  116,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,  116,    0,    0,    0,    0,  116,  116,   93,    0,
  116,  116,  116,    0,    0,    0,    0,    0,    0,  116,
  116,  116,  116,  116,  116,  116,  116,  116,  116,  116,
  116,  116,    0,  116,    0,    0,  116,    0,    0,  116,
    0,    0,    0,  116,    0,    0,    0,    0,    0,  131,
  132,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,  143,    0,    0,  146,  147,  148,  149,  150,  151,
  152,  153,  154,  155,  156,  157,  158,  159,    0,    0,
    0,  165,  166,    0,  167,   94,  170,   95,   96,   97,
   98,   99,  100,  101,  102,  103,  104,  105,  106,  107,
   94,    0,   95,   96,   97,   98,   99,  100,  101,  102,
  103,  104,  105,  106,  107,   94,    0,   95,   96,   97,
   98,   99,  100,  101,  102,  103,  104,  105,  106,  107,
    0,    0,    0,    0,    0,    0,    0,    0,  222,   94,
    0,   95,   96,   97,   98,   99,  100,  101,  102,  103,
  104,  105,  106,  107,   94,    0,   95,   96,   97,   98,
   99,  100,  101,  102,  103,  104,  105,  106,  107,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  245,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,  254,   94,    0,   95,   96,   97,
   98,   99,  100,  101,  102,  103,  104,  105,  106,  107,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,  279,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,  285,
};
short yycheck[] = {                                      41,
    0,  268,  277,  124,   41,  300,  324,   44,  326,   44,
  281,  282,  283,  284,  285,  286,  287,  320,  289,  324,
   41,  263,  264,  265,  266,  267,  268,  269,  270,  271,
   40,  326,  303,  267,  268,  269,  270,  271,   41,  296,
   40,   44,   47,   48,   41,   61,   41,   44,  319,   44,
  269,  270,  271,  320,  329,  330,  177,   41,   41,   41,
   44,   44,   44,  330,   69,   70,   41,  329,  330,   44,
   75,   76,   77,   40,    0,   40,   81,   82,   83,   84,
   85,   86,   87,   88,   89,   90,   40,   92,  257,  258,
  259,  260,  261,  262,  263,  264,  265,  266,  267,  268,
  269,  270,  271,  261,  262,  263,  264,  265,  266,  267,
  268,  269,  270,  271,   40,   41,   40,  257,   44,  259,
  260,  261,  262,  263,  264,  265,  266,  267,  268,  269,
  270,  271,  259,  260,  261,  262,  263,  264,  265,  266,
  267,  268,  269,  270,  271,  329,  330,   40,    0,  260,
  261,  262,  263,  264,  265,  266,  267,  268,  269,  270,
  271,   41,   41,   41,   44,   44,   44,   41,   41,   41,
   44,   44,   44,   41,   41,   41,   44,   44,   44,   41,
   41,   40,   44,   44,   40,   40,   40,   40,   40,   41,
   40,   40,   44,   40,   40,   40,   40,   40,   40,   40,
   40,   40,   40,   40,   40,  322,   40,   40,  324,   44,
  325,  324,   44,   40,   44,  257,  321,  259,  260,  261,
  262,  263,  264,  265,  266,  267,  268,  269,  270,  271,
  267,  268,  267,  268,  324,   44,  257,    0,  259,  260,
  261,  262,  263,  264,  265,  266,  267,  268,  269,  270,
  271,   41,   44,   44,   41,  326,   44,  257,  327,  259,
  260,  261,  262,  263,  264,  265,  266,  267,  268,  269,
  270,  271,  272,  273,  274,  275,  276,   40,   41,  279,
  280,   44,   41,  326,  328,  326,  326,  326,  288,   41,
  290,  291,  292,  293,  294,  295,  296,  297,  298,  299,
  326,  326,  326,  326,  326,  277,  306,  307,  308,  309,
  310,  311,  312,  313,  314,  315,  316,  317,  318,    0,
  320,   41,  326,  323,  326,  321,  326,  326,  326,  261,
  330,  257,  258,  259,  260,  261,  262,  263,  264,  265,
  266,  267,  268,  324,   41,   41,  272,  273,  274,  275,
  276,   41,   41,  279,  280,   41,   44,   41,   41,   40,
   41,   41,  288,   44,  290,  291,  292,  293,  294,  295,
  296,  297,  298,  299,   41,   41,   41,   41,   41,   41,
  306,  307,  308,  309,  310,  311,  312,  313,  314,  315,
  316,  317,  318,    0,  320,   41,   44,  323,  320,   44,
  326,   41,  117,   57,  330,  257,  258,  259,  260,  261,
  262,  263,  264,  265,  266,  267,  268,  217,   65,   -1,
  272,  273,  274,  275,  276,   -1,   -1,  279,  280,   -1,
   -1,   -1,   -1,   40,   41,   -1,  288,   44,  290,  291,
  292,  293,  294,  295,  296,  297,  298,  299,   -1,   -1,
   -1,   -1,   -1,   -1,  306,  307,  308,  309,  310,  311,
  312,  313,  314,  315,  316,  317,  318,   -1,  320,   -1,
   -1,  323,   -1,   -1,  326,   -1,   -1,   -1,  330,    0,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,  257,  258,  259,  260,  261,  262,
  263,  264,  265,  266,   -1,   -1,   -1,   -1,   -1,  272,
  273,  274,  275,  276,   -1,   -1,  279,  280,   -1,   40,
   41,   -1,   -1,   44,   -1,  288,   -1,  290,  291,  292,
  293,  294,  295,  296,  297,  298,  299,   -1,   -1,   -1,
   -1,   -1,   -1,  306,  307,  308,  309,  310,  311,  312,
  313,  314,  315,  316,  317,  318,    0,  320,   -1,   -1,
  323,   -1,   -1,  326,   -1,   -1,   -1,  330,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,  257,  258,  259,  260,
  261,  262,  263,  264,  265,  266,   -1,   -1,   -1,   -1,
   -1,  272,  273,  274,  275,  276,   40,   41,  279,  280,
   44,   -1,   -1,   -1,   -1,   -1,   -1,  288,   -1,  290,
  291,  292,  293,  294,  295,  296,  297,  298,  299,   -1,
   -1,   -1,   -1,   -1,   -1,  306,  307,  308,  309,  310,
  311,  312,  313,  314,  315,  316,  317,  318,    0,  320,
   -1,   -1,  323,   -1,   -1,  326,   -1,   -1,   -1,  330,
  257,  258,  259,  260,  261,  262,  263,  264,  265,  266,
   -1,   -1,   -1,   -1,   -1,  272,  273,  274,  275,  276,
   -1,   -1,  279,  280,   -1,   -1,   -1,   -1,   40,   41,
   -1,  288,   44,  290,  291,  292,  293,  294,  295,  296,
  297,  298,  299,   -1,   -1,   -1,   -1,   -1,   -1,  306,
  307,  308,  309,  310,  311,  312,  313,  314,  315,  316,
  317,  318,   -1,  320,   -1,   -1,  323,   -1,   -1,  326,
    0,    4,    5,  330,   -1,   -1,   -1,   -1,   -1,   -1,
   13,   -1,   -1,   -1,   -1,   -1,  257,  258,  259,  260,
  261,  262,  263,  264,  265,  266,   -1,   -1,   -1,   -1,
   -1,  272,  273,  274,  275,  276,   -1,   -1,  279,  280,
   40,   41,   -1,   -1,   44,   -1,   -1,  288,   -1,  290,
  291,  292,  293,  294,  295,  296,  297,  298,  299,   -1,
   -1,   -1,   -1,   -1,   67,  306,  307,  308,  309,  310,
  311,  312,  313,  314,  315,  316,  317,  318,    0,  320,
   -1,   -1,  323,   -1,   -1,  326,   -1,   -1,   -1,  330,
   -1,   -1,   -1,  257,  258,  259,  260,  261,  262,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  272,  273,
  274,  275,  276,   -1,   -1,  279,  280,   -1,   40,   41,
   -1,  124,   44,   -1,  288,   -1,  290,  291,  292,  293,
  294,  295,  296,  297,  298,  299,   -1,   -1,   -1,   -1,
   -1,   -1,  306,  307,  308,  309,  310,  311,  312,  313,
  314,  315,  316,  317,  318,    0,  320,   -1,   -1,  323,
   -1,   -1,  326,   -1,   -1,   -1,  330,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,  177,  257,  258,  259,  260,  261,
  262,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  272,  273,  274,  275,  276,   40,   41,  279,  280,   44,
   -1,   -1,   -1,   -1,   -1,   -1,  288,   -1,  290,  291,
  292,  293,  294,  295,  296,  297,  298,  299,   -1,   -1,
   -1,    0,   -1,   -1,  306,  307,  308,  309,  310,  311,
  312,  313,  314,  315,  316,  317,  318,   -1,  320,   -1,
   -1,  323,   -1,   -1,  326,   -1,   -1,   -1,  330,  252,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,  257,  258,  259,
  260,   40,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,  272,  273,  274,  275,  276,  280,   -1,  279,
  280,    0,   -1,  286,   -1,  288,   -1,   -1,  288,   -1,
  290,  291,  292,  293,  294,  295,  296,  297,  298,  299,
   -1,   -1,   -1,   -1,   -1,   -1,  306,  307,  308,  309,
  310,  311,  312,  313,  314,  315,  316,  317,  318,   -1,
  320,   40,   -1,  323,   -1,   -1,  326,   -1,   -1,   -1,
  330,   -1,   -1,   -1,   -1,  257,  258,  259,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  272,  273,  274,  275,  276,    0,   -1,  279,  280,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,  288,   -1,  290,  291,
  292,  293,  294,  295,  296,  297,  298,  299,   -1,   -1,
   -1,   -1,   -1,   -1,  306,  307,  308,  309,  310,  311,
  312,  313,  314,  315,  316,  317,  318,   -1,  320,   44,
   -1,  323,   -1,   -1,  326,   -1,   -1,   -1,  330,   -1,
   -1,   -1,  257,  258,    0,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,  272,  273,  274,
  275,  276,   -1,   -1,  279,  280,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,  288,   -1,  290,  291,  292,  293,  294,
  295,  296,  297,  298,  299,   -1,   -1,   -1,   44,   -1,
   -1,  306,  307,  308,  309,  310,  311,  312,  313,  314,
  315,  316,  317,  318,   -1,  320,   -1,   -1,  323,   -1,
   -1,  326,    0,   -1,   -1,  330,   -1,   -1,   -1,  268,
   -1,   -1,   -1,  272,  273,  274,  275,  276,   -1,   -1,
  279,  280,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  288,
   -1,  290,  291,  292,  293,  294,  295,  296,  297,  298,
  299,   -1,   40,   -1,   -1,   -1,   -1,  306,  307,  308,
  309,  310,  311,  312,  313,  314,  315,  316,  317,  318,
   -1,  320,    0,   -1,  323,  324,   -1,  326,   -1,  268,
   -1,  330,   -1,  272,  273,  274,  275,  276,   -1,   -1,
  279,  280,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  288,
   -1,  290,  291,  292,  293,  294,  295,  296,  297,  298,
  299,   -1,   40,   -1,   -1,   -1,   44,  306,  307,  308,
  309,  310,  311,  312,  313,  314,  315,  316,  317,  318,
   -1,  320,    0,   -1,  323,   -1,   -1,  326,   -1,   -1,
   -1,  330,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,  268,   -1,   -1,   -1,  272,  273,  274,
  275,  276,   -1,   -1,  279,  280,   -1,   -1,   -1,   -1,
   -1,   -1,   40,  288,   -1,  290,  291,  292,  293,  294,
  295,  296,  297,  298,  299,   -1,   -1,   -1,   -1,   -1,
   -1,  306,  307,  308,  309,  310,  311,  312,  313,  314,
  315,  316,  317,  318,    0,  320,   -1,   -1,  323,   -1,
   -1,  326,  268,   -1,   -1,  330,  272,  273,  274,  275,
  276,   -1,   -1,  279,  280,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,  288,   -1,  290,  291,  292,  293,  294,  295,
  296,  297,  298,  299,   40,   -1,   -1,   -1,   -1,   -1,
  306,  307,  308,  309,  310,  311,  312,  313,  314,  315,
  316,  317,  318,   -1,  320,   -1,   -1,  323,   -1,   -1,
  326,   -1,    0,   -1,  330,   -1,   -1,   -1,   -1,   -1,
  268,   -1,   -1,   -1,  272,  273,  274,  275,  276,   -1,
   -1,  279,  280,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  288,   -1,  290,  291,  292,  293,  294,  295,  296,  297,
  298,  299,   40,   -1,   -1,   -1,   -1,   -1,  306,  307,
  308,  309,  310,  311,  312,  313,  314,  315,  316,  317,
  318,   -1,  320,    0,   -1,  323,   -1,   -1,  326,   -1,
   -1,   -1,  330,   -1,  272,  273,  274,  275,  276,   -1,
   -1,  279,  280,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  288,   -1,  290,  291,  292,  293,  294,  295,  296,  297,
  298,  299,   -1,   40,   -1,   -1,   -1,   -1,  306,  307,
  308,  309,  310,  311,  312,  313,  314,  315,  316,  317,
  318,   -1,  320,    0,   -1,  323,   -1,   -1,  326,   -1,
   -1,   -1,  330,   -1,  272,  273,  274,  275,  276,   -1,
   -1,  279,  280,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  288,   -1,  290,  291,  292,  293,  294,  295,  296,  297,
  298,  299,   -1,   40,   -1,   -1,   -1,   -1,  306,  307,
  308,  309,  310,  311,  312,  313,  314,  315,  316,  317,
  318,   -1,  320,   -1,   -1,  323,   -1,   -1,  326,   -1,
   -1,   -1,  330,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,  272,  273,  274,  275,
  276,   -1,   -1,  279,  280,   -1,   -1,   -1,   -1,   40,
   -1,   -1,  288,   -1,  290,  291,  292,  293,  294,  295,
  296,  297,  298,  299,   -1,   -1,   -1,   -1,   -1,   -1,
  306,  307,  308,  309,  310,  311,  312,  313,  314,  315,
  316,  317,  318,   -1,  320,   -1,   -1,  323,   -1,   -1,
  326,   -1,   -1,   -1,  330,   -1,   -1,   -1,   -1,   -1,
  268,   -1,   40,   -1,  272,  273,  274,  275,  276,   -1,
   -1,  279,  280,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  288,   -1,  290,  291,  292,  293,  294,  295,  296,  297,
  298,  299,   -1,   -1,   -1,   -1,   -1,   -1,  306,  307,
  308,  309,  310,  311,  312,  313,  314,  315,  316,  317,
  318,   -1,  320,   -1,   -1,  323,   -1,   -1,   40,   -1,
   -1,   -1,  330,   -1,   -1,  272,  273,  274,  275,  276,
   -1,   -1,  279,  280,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,  288,   -1,  290,  291,  292,  293,  294,  295,  296,
  297,  298,  299,   -1,   -1,   -1,   -1,   -1,   -1,  306,
  307,  308,  309,  310,  311,  312,  313,  314,  315,  316,
  317,  318,   -1,  320,   40,   -1,  323,   -1,   -1,  326,
   -1,   -1,   -1,  330,   -1,  272,  273,  274,  275,  276,
   -1,   -1,  279,  280,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,  288,   -1,  290,  291,  292,  293,  294,  295,  296,
  297,  298,  299,   -1,   -1,   -1,   -1,   -1,   -1,  306,
  307,  308,  309,  310,  311,  312,  313,  314,  315,  316,
  317,  318,   -1,   40,   -1,   -1,  323,  268,   -1,  326,
   -1,  272,  273,  274,  275,  276,   -1,   -1,  279,  280,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,  288,   -1,  290,
  291,  292,  293,  294,  295,  296,  297,  298,  299,   -1,
   -1,   -1,   -1,   -1,   -1,  306,  307,  308,  309,  310,
  311,  312,  313,  314,  315,  316,  317,  318,   -1,  320,
  268,   -1,  323,   -1,  272,  326,   -1,  275,  276,  330,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  288,   -1,   -1,   -1,   -1,  293,  294,   -1,   -1,  297,
  298,  299,   -1,   -1,   -1,   -1,   -1,   -1,  306,  307,
  308,  309,  310,  311,  312,  313,  314,  315,  316,  317,
  318,   -1,  320,   -1,  322,  323,  268,   -1,  326,   41,
  272,   -1,  330,  275,  276,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   41,   -1,  288,   -1,   -1,   -1,
   -1,  293,  294,   -1,   -1,  297,  298,  299,   -1,   41,
   -1,   -1,   -1,   -1,  306,  307,  308,  309,  310,  311,
  312,  313,  314,  315,  316,  317,  318,   -1,  320,   -1,
  322,  323,  268,   41,  326,   -1,  272,   -1,  330,  275,
  276,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   44,  288,   -1,   -1,   -1,   -1,  293,  294,   -1,
   -1,  297,  298,  299,   -1,   -1,   -1,   -1,   -1,   -1,
  306,  307,  308,  309,  310,  311,  312,  313,  314,  315,
  316,  317,  318,    3,  320,   -1,   -1,  323,    8,   -1,
  326,  268,   44,   -1,  330,  272,   -1,   -1,  275,  276,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,  288,   -1,   -1,   -1,   -1,  293,  294,   38,   -1,
  297,  298,  299,   -1,   -1,   -1,   -1,   -1,   -1,  306,
  307,  308,  309,  310,  311,  312,  313,  314,  315,  316,
  317,  318,   -1,  320,   -1,   -1,  323,   -1,   -1,  326,
   -1,   -1,   -1,  330,   -1,   -1,   -1,   -1,   -1,   79,
   80,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   91,   -1,   -1,   94,   95,   96,   97,   98,   99,
  100,  101,  102,  103,  104,  105,  106,  107,   -1,   -1,
   -1,  111,  112,   -1,  114,  257,  116,  259,  260,  261,
  262,  263,  264,  265,  266,  267,  268,  269,  270,  271,
  257,   -1,  259,  260,  261,  262,  263,  264,  265,  266,
  267,  268,  269,  270,  271,  257,   -1,  259,  260,  261,
  262,  263,  264,  265,  266,  267,  268,  269,  270,  271,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  168,  257,
   -1,  259,  260,  261,  262,  263,  264,  265,  266,  267,
  268,  269,  270,  271,  257,   -1,  259,  260,  261,  262,
  263,  264,  265,  266,  267,  268,  269,  270,  271,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  210,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,  224,  257,   -1,  259,  260,  261,
  262,  263,  264,  265,  266,  267,  268,  269,  270,  271,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,  263,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,  284,
};
#define YYFINAL 1
#ifndef YYDEBUG
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 330
#if YYDEBUG
char *yyname[] = {
"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,"'('","')'",0,0,"','",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'='",0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"QUERY","COLON",
"OR2","AND2","CMPEQ","CMPNE","CMPLT","CMPLE","CMPGT","CMPGE","ARPLUS","ARMINUS",
"ARTIMES","ARDIVIDE","ARMOD","NOT","GENERATE","PRODUCE","HCP","SHAPE","ANY",
"EXCEPT","CONDITION","ACTION","PRINT","PRINTALL","PRINTEW","PRINTPBN",
"PRINTCOMPACT","PRINTONELINE","AVERAGE","HASCARD","FREQUENCY","PREDEAL",
"POINTCOUNT","ALTCOUNT","CONTROL","LOSER","DEALER","VULNERABLE","QUALITY",
"CCCC","TRICKS","NOTRUMPS","NORTHSOUTH","EASTWEST","EVALCONTRACT","ALL","NONE",
"SCORE","IMPS","RND","PT0","PT1","PT2","PT3","PT4","PT5","PT6","PT7","PT8",
"PT9","PRINTES","NUMBER","HOLDING","STRING","IDENT","COMPASS","VULN","SUIT",
"CARD","CONTRACT","DISTR","DISTR_OR_NUMBER",
};
char *yyrule[] = {
"$accept : defs",
"defs :",
"defs : defs def",
"def : GENERATE number",
"def : PRODUCE number",
"def : DEALER compass",
"def : VULNERABLE vulnerable",
"def : PREDEAL predealargs",
"$$1 :",
"def : POINTCOUNT $$1 pointcountargs",
"$$2 :",
"def : ALTCOUNT number $$2 pointcountargs",
"def : CONDITION expr",
"def : expr",
"def : IDENT '=' expr",
"def : ACTION actionlist",
"predealargs : predealarg",
"predealargs : predealargs predealarg",
"$$3 :",
"predealarg : COMPASS $$3 holdings",
"predealarg : SUIT '(' COMPASS ')' CMPEQ NUMBER",
"holdings : HOLDING",
"holdings : holdings ',' HOLDING",
"pointcountargs :",
"$$4 :",
"pointcountargs : number $$4 pointcountargs",
"compass : COMPASS",
"vulnerable : VULNERABLE",
"shlprefix : ','",
"shlprefix : ARPLUS",
"shlprefix :",
"shlprefix : ARMINUS",
"any :",
"any : ANY",
"number : NUMBER",
"number : ARMINUS NUMBER",
"number : DISTR_OR_NUMBER",
"shape : DISTR",
"shape : DISTR_OR_NUMBER",
"shapelistel : shlprefix any shape",
"shapelist : shapelistel",
"shapelist : shapelist shapelistel",
"expr : number",
"expr : IDENT",
"expr : SUIT '(' compass ')'",
"expr : HCP '(' compass ')'",
"expr : HCP '(' compass ',' SUIT ')'",
"expr : PT0 '(' compass ')'",
"expr : PT0 '(' compass ',' SUIT ')'",
"expr : PT1 '(' compass ')'",
"expr : PT1 '(' compass ',' SUIT ')'",
"expr : PT2 '(' compass ')'",
"expr : PT2 '(' compass ',' SUIT ')'",
"expr : PT3 '(' compass ')'",
"expr : PT3 '(' compass ',' SUIT ')'",
"expr : PT4 '(' compass ')'",
"expr : PT4 '(' compass ',' SUIT ')'",
"expr : PT5 '(' compass ')'",
"expr : PT5 '(' compass ',' SUIT ')'",
"expr : PT6 '(' compass ')'",
"expr : PT6 '(' compass ',' SUIT ')'",
"expr : PT7 '(' compass ')'",
"expr : PT7 '(' compass ',' SUIT ')'",
"expr : PT8 '(' compass ')'",
"expr : PT8 '(' compass ',' SUIT ')'",
"expr : PT9 '(' compass ')'",
"expr : PT9 '(' compass ',' SUIT ')'",
"expr : LOSER '(' compass ')'",
"expr : LOSER '(' compass ',' SUIT ')'",
"expr : CONTROL '(' compass ')'",
"expr : CONTROL '(' compass ',' SUIT ')'",
"expr : CCCC '(' compass ')'",
"expr : QUALITY '(' compass ',' SUIT ')'",
"expr : SHAPE '(' compass ',' shapelist ')'",
"expr : HASCARD '(' COMPASS ',' CARD ')'",
"expr : TRICKS '(' compass ',' SUIT ')'",
"expr : TRICKS '(' compass ',' NOTRUMPS ')'",
"expr : SCORE '(' VULN ',' CONTRACT ',' expr ')'",
"expr : IMPS '(' expr ')'",
"expr : '(' expr ')'",
"expr : expr CMPEQ expr",
"expr : expr CMPNE expr",
"expr : expr CMPLT expr",
"expr : expr CMPLE expr",
"expr : expr CMPGT expr",
"expr : expr CMPGE expr",
"expr : expr AND2 expr",
"expr : expr OR2 expr",
"expr : expr ARPLUS expr",
"expr : expr ARMINUS expr",
"expr : expr ARTIMES expr",
"expr : expr ARDIVIDE expr",
"expr : expr ARMOD expr",
"expr : expr QUERY expr COLON expr",
"expr : NOT expr",
"expr : RND '(' expr ')'",
"exprlist : expr",
"exprlist : STRING",
"exprlist : exprlist ',' expr",
"exprlist : exprlist ',' STRING",
"actionlist : action",
"actionlist : action ',' actionlist",
"actionlist :",
"action : PRINTALL",
"action : PRINTEW",
"action : PRINT '(' printlist ')'",
"action : PRINTCOMPACT",
"action : PRINTONELINE",
"action : PRINTPBN",
"action : PRINTES '(' exprlist ')'",
"action : EVALCONTRACT",
"action : PRINTCOMPACT '(' expr ')'",
"action : PRINTONELINE '(' expr ')'",
"action : AVERAGE optstring expr",
"action : FREQUENCY optstring '(' expr ',' number ',' number ')'",
"action : FREQUENCY optstring '(' expr ',' number ',' number ',' expr ',' number ',' number ')'",
"optstring :",
"optstring : STRING",
"printlist : COMPASS",
"printlist : printlist ',' COMPASS",
};
#endif
#ifdef YYSTACKSIZE
#undef YYMAXDEPTH
#define YYMAXDEPTH YYSTACKSIZE
#else
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
#define YYSTACKSIZE 500
#define YYMAXDEPTH 500
#endif
#endif
int yydebug;
int yynerrs;
int yyerrflag;
int yychar;
short *yyssp;
YYSTYPE *yyvsp;
YYSTYPE yyval;
YYSTYPE yylval;
short yyss[YYSTACKSIZE];
YYSTYPE yyvs[YYSTACKSIZE];
#define yystacksize YYSTACKSIZE
#line 400 "defs.y"

00925 struct var {
        struct var *v_next;
        char *v_ident;
        struct tree *v_tree;
} *vars=0;

struct tree *var_lookup(char *s, int mustbethere)
{
        struct var *v;

        for(v=vars; v!=0; v = v->v_next)
                if (strcmp(s, v->v_ident)==0)
                        return v->v_tree;
        if (mustbethere)
                yyerror("unknown variable");
        return 0;
}

void new_var(char *s, struct tree *t)
{
        struct var *v;
        /* char *mycalloc(); */

        if (var_lookup(s, 0)!=0)
                yyerror("redefined variable");
        v = (struct var *) mycalloc(1, sizeof(*v));
        v->v_next = vars;
        v->v_ident = s;
        v->v_tree = t;
        vars = v;
}

int lino=1;

void yyerror( char *s) {
        fprintf(stderr, "line %d: %s\n", lino, s);
        exit(-1);
}

int perm[24][4] = {
        {       0,      1,      2,      3       },
        {       0,      1,      3,      2       },
        {       0,      2,      1,      3       },
        {       0,      2,      3,      1       },
        {       0,      3,      1,      2       },
        {       0,      3,      2,      1       },
        {       1,      0,      2,      3       },
        {       1,      0,      3,      2       },
        {       1,      2,      0,      3       },
        {       1,      2,      3,      0       },
        {       1,      3,      0,      2       },
        {       1,      3,      2,      0       },
        {       2,      0,      1,      3       },
        {       2,      0,      3,      1       },
        {       2,      1,      0,      3       },
        {       2,      1,      3,      0       },
        {       2,      3,      0,      1       },
        {       2,      3,      1,      0       },
        {       3,      0,      1,      2       },
        {       3,      0,      2,      1       },
        {       3,      1,      0,      2       },
        {       3,      1,      2,      0       },
        {       3,      2,      0,      1       },
        {       3,      2,      1,      0       },
};

int shapeno;
void insertshape(s, any, neg_shape)
char s[4];
{
        int i,j,p;
        int xcount=0, ccount=0;
        char copy_s[4];

        for (i=0;i<4;i++) {
            if (s[i]=='x')
                        xcount++;
                else
                        ccount += s[i]-'0';
        }
        switch(xcount) {
        case 0:
                if (ccount!=13)
                        yyerror("wrong number of cards in shape");
                for (p=0; p<(any? 24 : 1); p++)
                        setshapebit(s[perm[p][3]]-'0', s[perm[p][2]]-'0',
                                s[perm[p][1]]-'0', s[perm[p][0]]-'0',
                                1<<shapeno, neg_shape);
                break;
        default:
                if (ccount>13)
                        yyerror("too many cards in ambiguous shape");
                bcopy(s, copy_s, 4);
                for(i=0; copy_s[i] != 'x'; i++)
                        ;
                if (xcount==1) {
                        copy_s[i] = 13-ccount+'0';      /* could go above '9' */
                        insertshape(copy_s, any, neg_shape);
                } else {
                        for (j=0; j<=13-ccount; j++) {
                                copy_s[i] = j+'0';
                                insertshape(copy_s, any, neg_shape);
                        }
                }
                break;
        }
}

int d2n(char s[4]) {
        static char copys[5];

        strncpy(copys, s, 4);
        return atoi(copys);
}

struct tree *newtree(type, p1, p2, i1, i2)
int type;
struct tree *p1, *p2;
int i1,i2;
{
        /* char *mycalloc(); */
        struct tree *p;

        p = (struct tree *) mycalloc(1, sizeof(*p));
        p->tr_type = type;
        p->tr_leaf1 = p1;
        p->tr_leaf2 = p2;
        p->tr_int1 = i1;
        p->tr_int2 = i2;
        return p;
}

struct action *newaction(type, p1, s1, i1, p2)
int type;
struct tree *p1;
char *s1;
int i1;
struct tree *p2;
{
        /* char *mycalloc(); */
        struct action *a;

        a = (struct action *) mycalloc(1, sizeof(*a));
        a->ac_type = type;
        a->ac_expr1 = p1;
        a->ac_str1 = s1;
        a->ac_int1 = i1;
        a->ac_expr2 = p2;
        return a;
}

struct expr *newexpr(struct tree* tr1, char* ch1, struct expr* ex1)
{
    struct expr* e;
    e=(struct expr*) mycalloc(1, sizeof(*e));
    e->ex_tr = tr1;
    e->ex_ch = ch1;
    e->next  = 0;
    if(ex1) {
        struct expr* exau = ex1;
            /* AM990705: the while's body had mysteriously disappeared, reinserted it */
            while(exau->next)
              exau = exau->next;
            exau->next = e;
            return ex1;
    } else {
        return e;
    }
}

char *mystrcpy(s)
char *s;
{
        char *cs;
        /* char *mycalloc(); */

        cs = mycalloc(strlen(s)+1, sizeof(char));
        strcpy(cs, s);
        return cs;
}

void predeal_holding(compass, holding)
char *holding;
{
        char suit;

        suit = *holding++;
        while (*holding) {
                predeal(compass, make_card(*holding, suit));
                holding++;
        }
}


#define TRUNCZ(x) ((x)<0?0:(x))

extern int biasdeal[4][4];
extern char*player_name[4];
static char *suit_name[] = {"Club", "Diamond", "Heart", "Spade"};


int bias_len(int compass){
  return
    TRUNCZ(biasdeal[compass][0])+
    TRUNCZ(biasdeal[compass][1])+
    TRUNCZ(biasdeal[compass][2])+
    TRUNCZ(biasdeal[compass][3]);
}

int bias_totsuit(int suit){
  return
    TRUNCZ(biasdeal[0][suit])+
    TRUNCZ(biasdeal[1][suit])+
    TRUNCZ(biasdeal[2][suit])+
    TRUNCZ(biasdeal[3][suit]);
}

void bias_deal(int suit, int compass, int length){
  if(biasdeal[compass][suit]!=-1){
    char s[256];
    sprintf(s,"%s's %s suit has length already set to %d",
      player_name[compass],suit_name[suit],
      biasdeal[compass][suit]);
    yyerror(s);
  }
  biasdeal[compass][suit]=length;
  if(bias_len(compass)>13){
      char s[256];
    sprintf(s,"Suit lengths too long for %s",
      player_name[compass]);
    yyerror(s);
  }
  if(bias_totsuit(suit)>13){
    char s[256];
    sprintf(s,"Too many %ss",suit_name[suit]);
    yyerror(s);
  }
}


#define YY_USE_PROTOS

#ifdef WIN32
#pragma warning( disable : 4127 )
#endif

#include "scan.c"

#ifdef WIN32
#pragma warning( default : 4127 )
#endif


#line 1179 "y.tab.c"
#define YYABORT goto yyabort
#define YYREJECT goto yyabort
#define YYACCEPT goto yyaccept
#define YYERROR goto yyerrlab
int
#if defined(__STDC__)
yyparse(void)
#else
yyparse()
#endif
{
    register int yym, yyn, yystate;
#if YYDEBUG
    register char *yys;
    extern char *getenv();

    if (yys = getenv("YYDEBUG"))
    {
        yyn = *yys;
        if (yyn >= '0' && yyn <= '9')
            yydebug = yyn - '0';
    }
#endif

    yynerrs = 0;
    yyerrflag = 0;
    yychar = (-1);

    yyssp = yyss;
    yyvsp = yyvs;
    *yyssp = yystate = 0;

yyloop:
    if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
    if (yychar < 0)
    {
        if ((yychar = yylex()) < 0) yychar = 0;
#if YYDEBUG
        if (yydebug)
        {
            yys = 0;
            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
            if (!yys) yys = "illegal-symbol";
            printf("%sdebug: state %d, reading %d (%s)\n",
                    YYPREFIX, yystate, yychar, yys);
        }
#endif
    }
    if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
            yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
    {
#if YYDEBUG
        if (yydebug)
            printf("%sdebug: state %d, shifting to state %d\n",
                    YYPREFIX, yystate, yytable[yyn]);
#endif
        if (yyssp >= yyss + yystacksize - 1)
        {
            goto yyoverflow;
        }
        *++yyssp = yystate = yytable[yyn];
        *++yyvsp = yylval;
        yychar = (-1);
        if (yyerrflag > 0)  --yyerrflag;
        goto yyloop;
    }
    if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
            yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
    {
        yyn = yytable[yyn];
        goto yyreduce;
    }
    if (yyerrflag) goto yyinrecovery;
    yyerror("syntax error");
#ifdef lint
    goto yyerrlab;
#endif
yyerrlab:
    ++yynerrs;
yyinrecovery:
    if (yyerrflag < 3)
    {
        yyerrflag = 3;
        for (;;)
        {
            if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
                    yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
            {
#if YYDEBUG
                if (yydebug)
                    printf("%sdebug: state %d, error recovery shifting\
 to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
#endif
                if (yyssp >= yyss + yystacksize - 1)
                {
                    goto yyoverflow;
                }
                *++yyssp = yystate = yytable[yyn];
                *++yyvsp = yylval;
                goto yyloop;
            }
            else
            {
#if YYDEBUG
                if (yydebug)
                    printf("%sdebug: error recovery discarding state %d\n",
                            YYPREFIX, *yyssp);
#endif
                if (yyssp <= yyss) goto yyabort;
                --yyssp;
                --yyvsp;
            }
        }
    }
    else
    {
        if (yychar == 0) goto yyabort;
#if YYDEBUG
        if (yydebug)
        {
            yys = 0;
            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
            if (!yys) yys = "illegal-symbol";
            printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
                    YYPREFIX, yystate, yychar, yys);
        }
#endif
        yychar = (-1);
        goto yyloop;
    }
yyreduce:
#if YYDEBUG
    if (yydebug)
        printf("%sdebug: state %d, reducing by rule %d (%s)\n",
                YYPREFIX, yystate, yyn, yyrule[yyn]);
#endif
    yym = yylen[yyn];
    yyval = yyvsp[1-yym];
    switch (yyn)
    {
case 3:
#line 100 "defs.y"
{ extern int maxgenerate; if(!maxgenerate) maxgenerate = yyvsp[0].y_int; }
break;
case 4:
#line 102 "defs.y"
{ extern int maxproduce; if(!maxproduce) maxproduce = yyvsp[0].y_int; }
break;
case 5:
#line 104 "defs.y"
{ extern int maxdealer;
                  maxdealer = yyvsp[0].y_int;
                }
break;
case 6:
#line 108 "defs.y"
{ extern int maxvuln;
                  maxvuln = yyvsp[0].y_int;
                }
break;
case 8:
#line 112 "defs.y"
{ clearpointcount(); pointcount_index=12;}
break;
case 10:
#line 114 "defs.y"
{ clearpointcount_alt(yyvsp[0].y_int); pointcount_index=12;}
break;
case 12:
#line 116 "defs.y"
{ extern struct tree *decisiontree; decisiontree = yyvsp[0].y_tree; }
break;
case 13:
#line 118 "defs.y"
{ extern struct tree *decisiontree; decisiontree = yyvsp[0].y_tree; }
break;
case 14:
#line 120 "defs.y"
{ new_var(yyvsp[-2].y_str, yyvsp[0].y_tree); }
break;
case 15:
#line 122 "defs.y"
{ extern struct action *actionlist; actionlist = yyvsp[0].y_action; }
break;
case 18:
#line 131 "defs.y"
{ predeal_compass = yyvsp[0].y_int;}
break;
case 20:
#line 132 "defs.y"
{bias_deal(yyvsp[-5].y_int,yyvsp[-3].y_int,yyvsp[0].y_int);}
break;
case 21:
#line 137 "defs.y"
{ predeal_holding(predeal_compass, yyvsp[0].y_str); }
break;
case 22:
#line 139 "defs.y"
{ predeal_holding(predeal_compass, yyvsp[0].y_str); }
break;
case 24:
#line 145 "defs.y"
{ pointcount(pointcount_index, yyvsp[0].y_int);
                  pointcount_index--;
                }
break;
case 26:
#line 153 "defs.y"
{ extern int use_compass[NSUITS]; use_compass[yyvsp[0].y_int] = 1; yyval.y_int= yyvsp[0].y_int; }
break;
case 27:
#line 158 "defs.y"
{ extern int use_vulnerable[NSUITS]; use_vulnerable[yyvsp[0].y_int] = 1; yyval.y_int= yyvsp[0].y_int; }
break;
case 28:
#line 163 "defs.y"
{ yyval.y_int = 0; }
break;
case 29:
#line 165 "defs.y"
{ yyval.y_int = 0; }
break;
case 30:
#line 167 "defs.y"
{ yyval.y_int = 0; }
break;
case 31:
#line 169 "defs.y"
{ yyval.y_int = 1; }
break;
case 32:
#line 174 "defs.y"
{ yyval.y_int = 0; }
break;
case 33:
#line 176 "defs.y"
{ yyval.y_int = 1; }
break;
case 35:
#line 183 "defs.y"
{ yyval.y_int = - yyvsp[0].y_int; }
break;
case 36:
#line 185 "defs.y"
{ yyval.y_int = d2n(yyvsp[0].y_distr); }
break;
case 39:
#line 194 "defs.y"
{ insertshape(yyvsp[0].y_distr, yyvsp[-1].y_int, yyvsp[-2].y_int); }
break;
case 42:
#line 204 "defs.y"
{ yyval.y_tree = newtree(TRT_NUMBER, NIL, NIL, yyvsp[0].y_int, 0); }
break;
case 43:
#line 206 "defs.y"
{ yyval.y_tree = var_lookup(yyvsp[0].y_str, 1); }
break;
case 44:
#line 208 "defs.y"
{ yyval.y_tree = newtree(TRT_LENGTH, NIL, NIL, yyvsp[-3].y_int, yyvsp[-1].y_int); }
break;
case 45:
#line 210 "defs.y"
{ yyval.y_tree = newtree(TRT_HCPTOTAL, NIL, NIL, yyvsp[-1].y_int, 0); }
break;
case 46:
#line 212 "defs.y"
{ yyval.y_tree = newtree(TRT_HCP, NIL, NIL, yyvsp[-3].y_int, yyvsp[-1].y_int); }
break;
case 47:
#line 214 "defs.y"
{ yyval.y_tree = newtree(TRT_PT0TOTAL, NIL, NIL, yyvsp[-1].y_int, 0); }
break;
case 48:
#line 216 "defs.y"
{ yyval.y_tree = newtree(TRT_PT0, NIL, NIL, yyvsp[-3].y_int, yyvsp[-1].y_int); }
break;
case 49:
#line 218 "defs.y"
{ yyval.y_tree = newtree(TRT_PT1TOTAL, NIL, NIL, yyvsp[-1].y_int, 0); }
break;
case 50:
#line 220 "defs.y"
{ yyval.y_tree = newtree(TRT_PT1, NIL, NIL, yyvsp[-3].y_int, yyvsp[-1].y_int); }
break;
case 51:
#line 222 "defs.y"
{ yyval.y_tree = newtree(TRT_PT2TOTAL, NIL, NIL, yyvsp[-1].y_int, 0); }
break;
case 52:
#line 224 "defs.y"
{ yyval.y_tree = newtree(TRT_PT2, NIL, NIL, yyvsp[-3].y_int, yyvsp[-1].y_int); }
break;
case 53:
#line 226 "defs.y"
{ yyval.y_tree = newtree(TRT_PT3TOTAL, NIL, NIL, yyvsp[-1].y_int, 0); }
break;
case 54:
#line 228 "defs.y"
{ yyval.y_tree = newtree(TRT_PT3, NIL, NIL, yyvsp[-3].y_int, yyvsp[-1].y_int); }
break;
case 55:
#line 230 "defs.y"
{ yyval.y_tree = newtree(TRT_PT4TOTAL, NIL, NIL, yyvsp[-1].y_int, 0); }
break;
case 56:
#line 232 "defs.y"
{ yyval.y_tree = newtree(TRT_PT4, NIL, NIL, yyvsp[-3].y_int, yyvsp[-1].y_int); }
break;
case 57:
#line 234 "defs.y"
{ yyval.y_tree = newtree(TRT_PT5TOTAL, NIL, NIL, yyvsp[-1].y_int, 0); }
break;
case 58:
#line 236 "defs.y"
{ yyval.y_tree = newtree(TRT_PT5, NIL, NIL, yyvsp[-3].y_int, yyvsp[-1].y_int); }
break;
case 59:
#line 238 "defs.y"
{ yyval.y_tree = newtree(TRT_PT6TOTAL, NIL, NIL, yyvsp[-1].y_int, 0); }
break;
case 60:
#line 240 "defs.y"
{ yyval.y_tree = newtree(TRT_PT6, NIL, NIL, yyvsp[-3].y_int, yyvsp[-1].y_int); }
break;
case 61:
#line 242 "defs.y"
{ yyval.y_tree = newtree(TRT_PT7TOTAL, NIL, NIL, yyvsp[-1].y_int, 0); }
break;
case 62:
#line 244 "defs.y"
{ yyval.y_tree = newtree(TRT_PT7, NIL, NIL, yyvsp[-3].y_int, yyvsp[-1].y_int); }
break;
case 63:
#line 246 "defs.y"
{ yyval.y_tree = newtree(TRT_PT8TOTAL, NIL, NIL, yyvsp[-1].y_int, 0); }
break;
case 64:
#line 248 "defs.y"
{ yyval.y_tree = newtree(TRT_PT8, NIL, NIL, yyvsp[-3].y_int, yyvsp[-1].y_int); }
break;
case 65:
#line 250 "defs.y"
{ yyval.y_tree = newtree(TRT_PT9TOTAL, NIL, NIL, yyvsp[-1].y_int, 0); }
break;
case 66:
#line 252 "defs.y"
{ yyval.y_tree = newtree(TRT_PT9, NIL, NIL, yyvsp[-3].y_int, yyvsp[-1].y_int); }
break;
case 67:
#line 254 "defs.y"
{ yyval.y_tree = newtree(TRT_LOSERTOTAL, NIL, NIL, yyvsp[-1].y_int, 0); }
break;
case 68:
#line 256 "defs.y"
{ yyval.y_tree = newtree(TRT_LOSER, NIL, NIL, yyvsp[-3].y_int, yyvsp[-1].y_int); }
break;
case 69:
#line 258 "defs.y"
{ yyval.y_tree = newtree(TRT_CONTROLTOTAL, NIL, NIL, yyvsp[-1].y_int, 0); }
break;
case 70:
#line 260 "defs.y"
{ yyval.y_tree = newtree(TRT_CONTROL, NIL, NIL, yyvsp[-3].y_int, yyvsp[-1].y_int); }
break;
case 71:
#line 262 "defs.y"
{ yyval.y_tree = newtree(TRT_CCCC, NIL, NIL, yyvsp[-1].y_int, 0); }
break;
case 72:
#line 264 "defs.y"
{ yyval.y_tree = newtree(TRT_QUALITY, NIL, NIL, yyvsp[-3].y_int, yyvsp[-1].y_int); }
break;
case 73:
#line 266 "defs.y"
{
              yyval.y_tree = newtree(TRT_SHAPE, NIL, NIL, yyvsp[-3].y_int, 1<<(shapeno++));
              if (shapeno >= 32) {
                yyerror("Too many shapes -- only 32 allowed!\n");
                YYERROR;
              }
            }
break;
case 74:
#line 274 "defs.y"
{ yyval.y_tree = newtree(TRT_HASCARD, NIL, NIL, yyvsp[-3].y_int, yyvsp[-1].y_int); }
break;
case 75:
#line 276 "defs.y"
{ yyval.y_tree = newtree(TRT_TRICKS, NIL, NIL, yyvsp[-3].y_int, yyvsp[-1].y_int); }
break;
case 76:
#line 278 "defs.y"
{ yyval.y_tree = newtree(TRT_TRICKS, NIL, NIL, yyvsp[-3].y_int, 4); }
break;
case 77:
#line 280 "defs.y"
{ yyval.y_tree = newtree(TRT_SCORE, yyvsp[-1].y_tree, NIL, yyvsp[-5].y_int, yyvsp[-3].y_int); }
break;
case 78:
#line 282 "defs.y"
{ yyval.y_tree = newtree(TRT_IMPS, yyvsp[-1].y_tree, NIL, 0, 0); }
break;
case 79:
#line 284 "defs.y"
{ yyval.y_tree = yyvsp[-1].y_tree; }
break;
case 80:
#line 286 "defs.y"
{ yyval.y_tree = newtree(TRT_CMPEQ, yyvsp[-2].y_tree, yyvsp[0].y_tree, 0, 0); }
break;
case 81:
#line 288 "defs.y"
{ yyval.y_tree = newtree(TRT_CMPNE, yyvsp[-2].y_tree, yyvsp[0].y_tree, 0, 0); }
break;
case 82:
#line 290 "defs.y"
{ yyval.y_tree = newtree(TRT_CMPLT, yyvsp[-2].y_tree, yyvsp[0].y_tree, 0, 0); }
break;
case 83:
#line 292 "defs.y"
{ yyval.y_tree = newtree(TRT_CMPLE, yyvsp[-2].y_tree, yyvsp[0].y_tree, 0, 0); }
break;
case 84:
#line 294 "defs.y"
{ yyval.y_tree = newtree(TRT_CMPGT, yyvsp[-2].y_tree, yyvsp[0].y_tree, 0, 0); }
break;
case 85:
#line 296 "defs.y"
{ yyval.y_tree = newtree(TRT_CMPGE, yyvsp[-2].y_tree, yyvsp[0].y_tree, 0, 0); }
break;
case 86:
#line 298 "defs.y"
{ yyval.y_tree = newtree(TRT_AND2, yyvsp[-2].y_tree, yyvsp[0].y_tree, 0, 0); }
break;
case 87:
#line 300 "defs.y"
{ yyval.y_tree = newtree(TRT_OR2, yyvsp[-2].y_tree, yyvsp[0].y_tree, 0, 0); }
break;
case 88:
#line 302 "defs.y"
{ yyval.y_tree = newtree(TRT_ARPLUS, yyvsp[-2].y_tree, yyvsp[0].y_tree, 0, 0); }
break;
case 89:
#line 304 "defs.y"
{ yyval.y_tree = newtree(TRT_ARMINUS, yyvsp[-2].y_tree, yyvsp[0].y_tree, 0, 0); }
break;
case 90:
#line 306 "defs.y"
{ yyval.y_tree = newtree(TRT_ARTIMES, yyvsp[-2].y_tree, yyvsp[0].y_tree, 0, 0); }
break;
case 91:
#line 308 "defs.y"
{ yyval.y_tree = newtree(TRT_ARDIVIDE, yyvsp[-2].y_tree, yyvsp[0].y_tree, 0, 0); }
break;
case 92:
#line 310 "defs.y"
{ yyval.y_tree = newtree(TRT_ARMOD, yyvsp[-2].y_tree, yyvsp[0].y_tree, 0, 0); }
break;
case 93:
#line 312 "defs.y"
{ yyval.y_tree = newtree(TRT_IF, yyvsp[-4].y_tree, newtree(TRT_THENELSE, yyvsp[-2].y_tree, yyvsp[0].y_tree, 0, 0), 0, 0); }
break;
case 94:
#line 314 "defs.y"
{ yyval.y_tree = newtree(TRT_NOT, yyvsp[0].y_tree, NIL, 0, 0); }
break;
case 95:
#line 316 "defs.y"
{ yyval.y_tree = newtree(TRT_RND, yyvsp[-1].y_tree, NIL, 0, 0); }
break;
case 96:
#line 321 "defs.y"
{ yyval.y_expr = newexpr(yyvsp[0].y_tree, 0, 0); }
break;
case 97:
#line 323 "defs.y"
{ yyval.y_expr = newexpr(0, yyvsp[0].y_str, 0); }
break;
case 98:
#line 325 "defs.y"
{ yyval.y_expr = newexpr(yyvsp[0].y_tree, 0, yyvsp[-2].y_expr); }
break;
case 99:
#line 327 "defs.y"
{ yyval.y_expr = newexpr(0, yyvsp[0].y_str, yyvsp[-2].y_expr); }
break;
case 100:
#line 332 "defs.y"
{ yyval.y_action = yyvsp[0].y_action; }
break;
case 101:
#line 334 "defs.y"
{ yyval.y_action = yyvsp[-2].y_action; yyval.y_action->ac_next = yyvsp[0].y_action; }
break;
case 102:
#line 336 "defs.y"
{ yyval.y_action = 0; }
break;
case 103:
#line 340 "defs.y"
{ will_print++;
                  yyval.y_action = newaction(ACT_PRINTALL, NIL, (char *) 0, 0, NIL);
                }
break;
case 104:
#line 344 "defs.y"
{ will_print++;
                  yyval.y_action = newaction(ACT_PRINTEW, NIL, (char *) 0, 0, NIL);
                }
break;
case 105:
#line 348 "defs.y"
{ will_print++;
                  yyval.y_action = newaction(ACT_PRINT, NIL, (char *) 0, yyvsp[-1].y_int, NIL);
                }
break;
case 106:
#line 352 "defs.y"
{ will_print++;
                  yyval.y_action=newaction(ACT_PRINTCOMPACT,NIL,0,0, NIL);}
break;
case 107:
#line 355 "defs.y"
{ will_print++;
                  yyval.y_action = newaction(ACT_PRINTONELINE, NIL, 0, 0, NIL);}
break;
case 108:
#line 358 "defs.y"
{ will_print++;
                  yyval.y_action=newaction(ACT_PRINTPBN,NIL,0,0, NIL);}
break;
case 109:
#line 361 "defs.y"
{ will_print++;
                  yyval.y_action=newaction(ACT_PRINTES,(struct tree*)yyvsp[-1].y_expr,0,0, NIL); }
break;
case 110:
#line 364 "defs.y"
{ will_print++;
                  yyval.y_action=newaction(ACT_EVALCONTRACT,0,0,0, NIL);}
break;
case 111:
#line 367 "defs.y"
{ will_print++; 
                  yyval.y_action=newaction(ACT_PRINTCOMPACT,yyvsp[-1].y_tree,0,0, NIL);}
break;
case 112:
#line 370 "defs.y"
{ will_print++;
                  yyval.y_action=newaction(ACT_PRINTONELINE,yyvsp[-1].y_tree,0,0, NIL);}
break;
case 113:
#line 373 "defs.y"
{ yyval.y_action = newaction(ACT_AVERAGE, yyvsp[0].y_tree, yyvsp[-1].y_str, 0, NIL); }
break;
case 114:
#line 375 "defs.y"
{ yyval.y_action = newaction(ACT_FREQUENCY, yyvsp[-5].y_tree, yyvsp[-7].y_str, 0, NIL);
                  yyval.y_action->ac_u.acu_f.acuf_lowbnd = yyvsp[-3].y_int;
                  yyval.y_action->ac_u.acu_f.acuf_highbnd = yyvsp[-1].y_int;}
break;
case 115:
#line 379 "defs.y"
{
             yyval.y_action = newaction(ACT_FREQUENCY2D, yyvsp[-11].y_tree, yyvsp[-13].y_str, 0, yyvsp[-5].y_tree);
             yyval.y_action->ac_u.acu_f2d.acuf_lowbnd_expr1 = yyvsp[-9].y_int;
             yyval.y_action->ac_u.acu_f2d.acuf_highbnd_expr1 = yyvsp[-7].y_int;
             yyval.y_action->ac_u.acu_f2d.acuf_lowbnd_expr2 = yyvsp[-3].y_int;
             yyval.y_action->ac_u.acu_f2d.acuf_highbnd_expr2 = yyvsp[-1].y_int;
                }
break;
case 116:
#line 389 "defs.y"
{ yyval.y_str = (char *) 0; }
break;
case 117:
#line 391 "defs.y"
{ yyval.y_str = yyvsp[0].y_str; }
break;
case 118:
#line 395 "defs.y"
{ yyval.y_int = (1<<yyvsp[0].y_int); }
break;
case 119:
#line 397 "defs.y"
{ yyval.y_int = yyvsp[-2].y_int|(1<<yyvsp[0].y_int); }
break;
#line 1769 "y.tab.c"
    }
    yyssp -= yym;
    yystate = *yyssp;
    yyvsp -= yym;
    yym = yylhs[yyn];
    if (yystate == 0 && yym == 0)
    {
#if YYDEBUG
        if (yydebug)
            printf("%sdebug: after reduction, shifting from state 0 to\
 state %d\n", YYPREFIX, YYFINAL);
#endif
        yystate = YYFINAL;
        *++yyssp = YYFINAL;
        *++yyvsp = yyval;
        if (yychar < 0)
        {
            if ((yychar = yylex()) < 0) yychar = 0;
#if YYDEBUG
            if (yydebug)
            {
                yys = 0;
                if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
                if (!yys) yys = "illegal-symbol";
                printf("%sdebug: state %d, reading %d (%s)\n",
                        YYPREFIX, YYFINAL, yychar, yys);
            }
#endif
        }
        if (yychar == 0) goto yyaccept;
        goto yyloop;
    }
    if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
            yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
        yystate = yytable[yyn];
    else
        yystate = yydgoto[yym];
#if YYDEBUG
    if (yydebug)
        printf("%sdebug: after reduction, shifting from state %d \
to state %d\n", YYPREFIX, *yyssp, yystate);
#endif
    if (yyssp >= yyss + yystacksize - 1)
    {
        goto yyoverflow;
    }
    *++yyssp = yystate;
    *++yyvsp = yyval;
    goto yyloop;
yyoverflow:
    yyerror("yacc stack overflow");
yyabort:
    return (1);
yyaccept:
    return (0);
}

Generated by  Doxygen 1.6.0   Back to index