diff options
author | tnn <tnn@pkgsrc.org> | 2010-01-03 01:37:59 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2010-01-03 01:37:59 +0000 |
commit | b77ff10886bfd49b1fa8c642b0d22669dc31a735 (patch) | |
tree | 7f92ada2b066420a3692f84643ce0141b6d15df3 /lang | |
parent | 9cf61bf12946885ff9e1de4280a83cfd3daed291 (diff) | |
download | pkgsrc-b77ff10886bfd49b1fa8c642b0d22669dc31a735.tar.gz |
Pregenerate the parser (gram.c) and disable implicit regeneration.
Drop yacc(1) dependency.
This solves the circular dependency f2c->bison->libiconv->libtool-base->f2c
Diffstat (limited to 'lang')
-rw-r--r-- | lang/f2c/Makefile | 6 | ||||
-rw-r--r-- | lang/f2c/files/f2c.mk | 6 | ||||
-rw-r--r-- | lang/f2c/files/gram.c | 2768 |
3 files changed, 2776 insertions, 4 deletions
diff --git a/lang/f2c/Makefile b/lang/f2c/Makefile index f1dcb0f638d..1cf3c2a4bfb 100644 --- a/lang/f2c/Makefile +++ b/lang/f2c/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.52 2009/12/28 11:42:19 tnn Exp $ +# $NetBSD: Makefile,v 1.53 2010/01/03 01:37:59 tnn Exp $ DISTNAME= f2c-20090411 # see notes below -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= lang MASTER_SITES= ${MASTER_SITE_LOCAL} @@ -18,7 +18,6 @@ WRKSRC= ${WRKDIR}/f2c BUILD_DIRS= src USE_BSD_MAKEFILE= yes MAKE_ENV+= MKCATPAGES=no -USE_TOOLS+= yacc INSTALLATION_DIRS= bin share/doc/f2c ${PKGMANDIR}/man1 .include "../../mk/bsd.prefs.mk" @@ -33,6 +32,7 @@ F2C_F77_CPP= ${CPP} post-extract: @${CP} ${FILESDIR:Q}/f2c.mk ${WRKSRC}/src/Makefile + @${CP} ${FILESDIR:Q}/gram.c ${WRKSRC}/src/gram.c @mv ${WRKSRC}/src/.depend ${WRKSRC}/src/depend.orig @mv ${WRKSRC}/src/f2c.1 ${WRKSRC}/src/f2c.1.orig diff --git a/lang/f2c/files/f2c.mk b/lang/f2c/files/f2c.mk index aa020d39bcf..f09e5b503be 100644 --- a/lang/f2c/files/f2c.mk +++ b/lang/f2c/files/f2c.mk @@ -1,7 +1,7 @@ # Makefile for f2c, a Fortran 77 to C converter PROG= f2c -SRCS= main.c init.c gram.y lex.c proc.c equiv.c data.c format.c \ +SRCS= main.c init.c gram.c lex.c proc.c equiv.c data.c format.c \ expr.c exec.c intr.c io.c misc.c error.c mem.c names.c \ output.c p1output.c pread.c put.c putpcc.c vax.c formatdata.c \ parse_args.c niceprintf.c cds.c sysdep.c version.c $(MALLOC) @@ -21,6 +21,7 @@ MALLOC= # empty # (derived with a Unix variant of the yacc from plan9). # There should be 4 shift/reduce conflicts: +.if make(gram.c) gram.y: gram.head gram.dcl gram.expr gram.exec gram.io tokdefs.h ( sed "s/#define/%token/" < $(.ALLSRC:M*tokdefs.h) ; \ cat $(.ALLSRC:M*gram.head) \ @@ -29,6 +30,9 @@ gram.y: gram.head gram.dcl gram.expr gram.exec gram.io tokdefs.h $(.ALLSRC:M*gram.exec) \ $(.ALLSRC:M*gram.io) ) > $@ CLEANFILES+= gram.y +.else +gram.c: +.endif DPADD= defs.h ftypes.h defines.h machdefs.h sysdep.h diff --git a/lang/f2c/files/gram.c b/lang/f2c/files/gram.c new file mode 100644 index 00000000000..5b9ca05005a --- /dev/null +++ b/lang/f2c/files/gram.c @@ -0,0 +1,2768 @@ +#ifndef lint +static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; +#endif + +#ifdef _LIBC +#include "namespace.h" +#endif +#include <stdlib.h> +#include <string.h> + +#define YYBYACC 1 +#define YYMAJOR 1 +#define YYMINOR 9 + +#define YYEMPTY (-1) +#define yyclearin (yychar = YYEMPTY) +#define yyerrok (yyerrflag = 0) +#define YYRECOVERING() (yyerrflag != 0) + +/* compatibility with bison */ +#ifdef YYPARSE_PARAM +/* compatibility with FreeBSD */ +# ifdef YYPARSE_PARAM_TYPE +# define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM) +# else +# define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM) +# endif +#else +# define YYPARSE_DECL() yyparse(void) +#endif + +/* Pure parsers. */ +#define YYPURE 0 +#ifdef YYLEX_PARAM +# define YYLEX yylex(YYLEX_PARAM) +#else +# define YYLEX yylex() +#endif + +#define YYPREFIX "yy" +#line 125 "gram.y" +#include "defs.h" +#include "p1defs.h" + +static int nstars; /* Number of labels in an + alternate return CALL */ +static int datagripe; +static int ndim; +static int vartype; +int new_dcl; +static ftnint varleng; +static struct Dims dims[MAXDIM+1]; +extern struct Labelblock **labarray; /* Labels in an alternate + return CALL */ +extern int maxlablist; + +/* The next two variables are used to verify that each statement might be reached + during runtime. lastwasbranch is tested only in the defintion of the + stat: nonterminal. */ + +int lastwasbranch = NO; +static int thiswasbranch = NO; +extern ftnint yystno; +extern flag intonly; +static chainp datastack; +extern long laststfcn, thisstno; +extern int can_include; /* for netlib */ +extern void endcheck Argdcl((void)); +extern struct Primblock *primchk Argdcl((expptr)); + +#define ESNULL (Extsym *)0 +#define NPNULL (Namep)0 +#define LBNULL (struct Listblock *)0 + + static void +pop_datastack(Void) { + chainp d0 = datastack; + if (d0->datap) + curdtp = (chainp)d0->datap; + datastack = d0->nextp; + d0->nextp = 0; + frchain(&d0); + } + +#line 172 "gram.y" +typedef union YYSTYPE { + int ival; + ftnint lval; + char *charpval; + chainp chval; + tagptr tagval; + expptr expval; + struct Labelblock *labval; + struct Nameblock *namval; + struct Eqvchain *eqvval; + Extsym *extval; + } YYSTYPE; +#line 98 "gram.c" +#define SEOS 1 +#define SCOMMENT 2 +#define SLABEL 3 +#define SUNKNOWN 4 +#define SHOLLERITH 5 +#define SICON 6 +#define SRCON 7 +#define SDCON 8 +#define SBITCON 9 +#define SOCTCON 10 +#define SHEXCON 11 +#define STRUE 12 +#define SFALSE 13 +#define SNAME 14 +#define SNAMEEQ 15 +#define SFIELD 16 +#define SSCALE 17 +#define SINCLUDE 18 +#define SLET 19 +#define SASSIGN 20 +#define SAUTOMATIC 21 +#define SBACKSPACE 22 +#define SBLOCK 23 +#define SCALL 24 +#define SCHARACTER 25 +#define SCLOSE 26 +#define SCOMMON 27 +#define SCOMPLEX 28 +#define SCONTINUE 29 +#define SDATA 30 +#define SDCOMPLEX 31 +#define SDIMENSION 32 +#define SDO 33 +#define SDOUBLE 34 +#define SELSE 35 +#define SELSEIF 36 +#define SEND 37 +#define SENDFILE 38 +#define SENDIF 39 +#define SENTRY 40 +#define SEQUIV 41 +#define SEXTERNAL 42 +#define SFORMAT 43 +#define SFUNCTION 44 +#define SGOTO 45 +#define SASGOTO 46 +#define SCOMPGOTO 47 +#define SARITHIF 48 +#define SLOGIF 49 +#define SIMPLICIT 50 +#define SINQUIRE 51 +#define SINTEGER 52 +#define SINTRINSIC 53 +#define SLOGICAL 54 +#define SNAMELIST 55 +#define SOPEN 56 +#define SPARAM 57 +#define SPAUSE 58 +#define SPRINT 59 +#define SPROGRAM 60 +#define SPUNCH 61 +#define SREAD 62 +#define SREAL 63 +#define SRETURN 64 +#define SREWIND 65 +#define SSAVE 66 +#define SSTATIC 67 +#define SSTOP 68 +#define SSUBROUTINE 69 +#define STHEN 70 +#define STO 71 +#define SUNDEFINED 72 +#define SWRITE 73 +#define SLPAR 74 +#define SRPAR 75 +#define SEQUALS 76 +#define SCOLON 77 +#define SCOMMA 78 +#define SCURRENCY 79 +#define SPLUS 80 +#define SMINUS 81 +#define SSTAR 82 +#define SSLASH 83 +#define SPOWER 84 +#define SCONCAT 85 +#define SAND 86 +#define SOR 87 +#define SNEQV 88 +#define SEQV 89 +#define SNOT 90 +#define SEQ 91 +#define SLT 92 +#define SGT 93 +#define SLE 94 +#define SGE 95 +#define SNE 96 +#define SENDDO 97 +#define SWHILE 98 +#define SSLASHD 99 +#define SBYTE 100 +#define YYERRCODE 256 +static const short yylhs[] = { -1, + 0, 0, 54, 54, 54, 54, 54, 54, 54, 1, + 55, 55, 55, 55, 55, 55, 55, 59, 51, 32, + 52, 52, 60, 60, 61, 61, 62, 62, 25, 25, + 25, 26, 26, 33, 33, 16, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 9, 9, + 9, 73, 6, 7, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 15, 15, 15, 49, + 49, 49, 49, 50, 50, 63, 63, 64, 64, 65, + 65, 79, 53, 53, 66, 66, 80, 81, 75, 82, + 84, 76, 76, 83, 83, 44, 44, 44, 69, 69, + 85, 85, 71, 71, 86, 35, 17, 17, 18, 18, + 74, 74, 89, 87, 87, 88, 88, 42, 42, 90, + 90, 2, 67, 67, 91, 91, 94, 92, 93, 93, + 95, 95, 10, 68, 68, 96, 19, 19, 70, 20, + 20, 21, 21, 37, 37, 37, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, + 11, 11, 12, 12, 12, 12, 12, 12, 36, 36, + 36, 36, 31, 39, 39, 43, 43, 47, 47, 47, + 47, 47, 47, 47, 46, 48, 48, 48, 40, 40, + 41, 41, 41, 41, 41, 41, 41, 41, 57, 57, + 57, 57, 57, 57, 99, 57, 57, 57, 98, 22, + 23, 100, 23, 97, 97, 97, 97, 97, 97, 97, + 97, 97, 97, 97, 3, 101, 102, 102, 102, 102, + 72, 72, 34, 24, 24, 45, 45, 13, 13, 27, + 27, 58, 77, 78, 103, 104, 104, 104, 104, 104, + 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, + 105, 112, 112, 112, 107, 114, 114, 114, 109, 109, + 106, 106, 115, 115, 116, 116, 116, 116, 116, 116, + 14, 108, 110, 111, 111, 28, 28, 5, 5, 29, + 29, 29, 30, 30, 30, 30, 30, 30, 4, 4, + 4, 4, 4, 113, +}; +static const short yylen[] = { 2, + 0, 3, 2, 2, 2, 3, 3, 2, 1, 1, + 3, 4, 3, 4, 4, 5, 3, 0, 1, 1, + 0, 1, 2, 3, 1, 3, 1, 3, 0, 2, + 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 1, 5, 7, 5, + 5, 0, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 4, 6, 3, + 4, 5, 3, 1, 3, 3, 3, 3, 3, 3, + 3, 3, 1, 3, 3, 3, 0, 6, 0, 0, + 0, 2, 3, 1, 3, 1, 2, 1, 1, 3, + 1, 1, 1, 3, 3, 2, 1, 5, 1, 3, + 0, 3, 0, 2, 3, 1, 3, 1, 1, 1, + 3, 1, 3, 3, 4, 1, 0, 2, 1, 3, + 1, 3, 1, 1, 2, 4, 1, 3, 0, 0, + 1, 1, 3, 1, 3, 1, 1, 1, 3, 3, + 3, 3, 2, 3, 3, 3, 3, 3, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 4, 5, 5, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 5, 1, 1, 1, 1, 3, + 1, 1, 3, 3, 3, 3, 2, 3, 1, 5, + 4, 1, 2, 2, 0, 7, 2, 2, 5, 3, + 1, 0, 5, 4, 5, 2, 1, 1, 10, 1, + 3, 4, 3, 3, 1, 1, 3, 3, 7, 7, + 0, 1, 3, 1, 3, 1, 2, 1, 1, 1, + 3, 0, 0, 0, 1, 2, 2, 2, 2, 2, + 2, 2, 3, 4, 4, 2, 3, 4, 1, 3, + 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, + 3, 3, 1, 3, 1, 1, 1, 2, 2, 2, + 1, 3, 3, 4, 4, 1, 3, 1, 5, 1, + 1, 1, 3, 3, 3, 3, 3, 3, 1, 3, + 5, 5, 5, 0, +}; +static const short yydefred[] = { 1, + 0, 9, 10, 0, 0, 8, 0, 226, 242, 64, + 262, 18, 242, 61, 268, 139, 57, 242, 87, 59, + 63, 242, 58, 242, 242, 242, 264, 242, 0, 139, + 139, 47, 18, 242, 242, 242, 242, 242, 139, 266, + 55, 139, 60, 134, 267, 139, 238, 242, 18, 242, + 56, 242, 263, 0, 65, 239, 18, 62, 242, 202, + 66, 0, 0, 54, 0, 242, 0, 0, 3, 4, + 5, 0, 0, 0, 0, 0, 0, 199, 0, 0, + 217, 218, 245, 0, 0, 0, 0, 0, 242, 242, + 2, 36, 6, 0, 0, 0, 0, 216, 89, 0, + 207, 0, 7, 208, 20, 19, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 127, 0, 0, 0, 0, + 304, 0, 0, 74, 101, 102, 0, 99, 0, 304, + 18, 232, 0, 243, 53, 0, 89, 0, 0, 0, + 0, 0, 0, 0, 89, 127, 0, 135, 204, 203, + 0, 0, 180, 181, 182, 183, 188, 187, 186, 178, + 179, 0, 161, 162, 248, 249, 0, 191, 0, 0, + 192, 184, 246, 0, 250, 270, 0, 0, 0, 0, + 0, 304, 304, 225, 0, 22, 13, 233, 0, 70, + 0, 0, 85, 122, 0, 0, 205, 0, 17, 0, + 80, 76, 0, 227, 0, 0, 0, 0, 123, 0, + 0, 78, 0, 0, 304, 0, 189, 0, 282, 0, + 0, 0, 147, 0, 144, 223, 146, 148, 0, 0, + 0, 283, 0, 139, 0, 0, 91, 224, 221, 0, + 0, 0, 234, 73, 0, 77, 79, 81, 86, 124, + 0, 0, 170, 0, 281, 276, 277, 0, 0, 0, + 273, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 286, 0, 288, 0, 0, 0, 0, 257, 0, 0, + 0, 0, 260, 261, 265, 0, 113, 106, 71, 0, + 109, 0, 107, 0, 212, 211, 201, 0, 0, 30, + 35, 0, 34, 32, 83, 0, 15, 0, 120, 0, + 0, 0, 0, 128, 0, 0, 103, 0, 285, 284, + 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 163, 165, 164, 167, 166, 168, + 0, 0, 75, 100, 14, 0, 52, 0, 0, 0, + 0, 0, 237, 222, 0, 0, 0, 0, 0, 0, + 0, 0, 279, 280, 0, 0, 272, 0, 0, 0, + 0, 0, 0, 271, 0, 0, 0, 0, 0, 0, + 0, 0, 258, 0, 0, 0, 215, 0, 0, 0, + 0, 90, 200, 0, 0, 0, 31, 0, 82, 0, + 0, 0, 0, 0, 209, 133, 0, 0, 129, 0, + 48, 0, 190, 0, 23, 0, 25, 145, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, + 0, 0, 68, 50, 0, 51, 0, 0, 176, 0, + 94, 98, 177, 92, 235, 72, 0, 137, 0, 0, + 0, 0, 274, 0, 287, 0, 0, 0, 0, 296, + 0, 298, 0, 294, 0, 112, 0, 118, 0, 116, + 114, 0, 110, 91, 0, 0, 0, 0, 33, 84, + 0, 0, 121, 0, 0, 125, 0, 0, 104, 0, + 24, 0, 0, 0, 244, 93, 97, 0, 0, 0, + 172, 0, 0, 0, 0, 0, 0, 0, 0, 115, + 0, 0, 0, 0, 0, 206, 229, 0, 0, 132, + 130, 28, 26, 185, 49, 69, 96, 95, 138, 173, + 289, 302, 303, 301, 0, 117, 108, 88, 213, 0, + 0, 0, 219, +}; +static const short yydgoto[] = { 1, + 4, 309, 185, 277, 271, 62, 63, 64, 65, 407, + 222, 342, 66, 258, 135, 93, 291, 292, 447, 358, + 359, 296, 297, 241, 199, 302, 476, 272, 278, 279, + 253, 151, 304, 67, 190, 223, 280, 225, 361, 169, + 217, 470, 440, 441, 243, 227, 228, 172, 68, 126, + 186, 187, 306, 5, 69, 70, 71, 94, 95, 322, + 416, 417, 72, 73, 74, 75, 76, 77, 127, 97, + 316, 133, 431, 288, 192, 351, 235, 433, 201, 99, + 193, 474, 444, 352, 128, 317, 388, 471, 389, 310, + 209, 210, 408, 211, 409, 148, 78, 79, 299, 394, + 80, 81, 82, 83, 84, 173, 85, 86, 179, 87, + 88, 89, 219, 90, 260, 261, +}; +static const short yysindex[] = { 0, + -1, 0, 0, 1086, 25, 0, 47, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 171, 0, 0, 0, 0, 0, 0, + 0, -25, -8, 0, -28, 0, 3, 78, 0, 0, + 0, 87, 88, 100, 110, 125, -5, 0, 1714, 34, + 0, 0, 0, 1484, 165, 1627, 165, 193, 0, 0, + 0, 0, 0, 278, 34, 34, 171, 0, 0, 149, + 0, 227, 0, 0, 0, 0, 233, 239, 34, 34, + 308, 34, 251, 252, 272, 0, 34, 282, 1638, 34, + 0, 1354, 306, 0, 0, 0, 294, 0, 34, 0, + 0, 0, 34, 0, 0, 34, 0, 1354, 428, 34, + -49, 34, 34, 239, 0, 0, 34, 0, 0, 0, + 300, 315, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1473, 0, 0, 0, 0, 1651, 0, 397, 0, + 0, 0, 0, 1473, 0, 0, 0, 207, 333, 1310, + 1440, 0, 0, 0, 341, 0, 0, 0, 350, 0, + 34, 198, 0, 0, 110, 19, 0, 176, 0, 34, + 0, 0, 233, 0, 110, 308, 1354, 1354, 0, 387, + 1542, 0, 34, 1651, 0, 397, 0, 393, 0, 1354, + 1354, 1354, 0, 1808, 0, 0, 0, 0, 334, 171, + 233, 0, 34, 0, 1451, 350, 0, 0, 0, 308, + 195, 1808, 0, 0, 110, 0, 0, 0, 0, 0, + 373, 1354, 0, 1354, 0, 0, 0, 1299, 464, 244, + 0, 378, 1651, 1651, 1651, 1651, 1651, 488, 255, 255, + 0, 408, 0, 255, 1440, 1440, 416, 0, 417, 1808, + 421, 0, 0, 0, 0, 34, 0, 0, 0, 198, + 0, 104, 0, 19, 0, 0, 0, 399, 1354, 0, + 0, 246, 0, 0, 0, 270, 0, 426, 0, 288, + 822, 928, 491, 0, 437, 289, 0, 501, 0, 0, + 4, 0, 1118, 436, 1876, 432, 1354, 1354, 1354, 1354, + 1354, 1354, 1354, 1354, 0, 0, 0, 0, 0, 0, + 1354, 1354, 0, 0, 0, 233, 0, 1321, 1808, -8, + 82, 1661, 0, 0, 1332, 34, 34, 442, 441, 1808, + 443, 1808, 0, 0, 1808, 0, 0, 1473, 378, 378, + 378, 539, -22, 0, 445, 408, 255, 408, 446, 447, + 1601, 449, 0, 1440, 1440, 1440, 0, 310, 1343, 451, + 198, 0, 0, 457, 1354, 1708, 0, 186, 0, 34, + 308, 110, 308, 308, 0, 0, 440, 312, 0, 1354, + 0, 34, 0, 456, 0, 324, 0, 0, 1354, 432, + 432, 432, 600, 1876, 1859, 1842, 1842, 112, 563, 0, + 350, 458, 0, 0, 1661, 0, 1354, 761, 0, 453, + 0, 0, 0, 0, 0, 0, 459, 0, 462, 1354, + 1354, 397, 0, 255, 0, 1440, 1440, 0, 1440, 0, + 0, 0, 0, 0, 0, 0, 1343, 0, 1772, 0, + 0, 198, 0, 0, 1354, 463, 1808, 470, 0, 0, + 326, 1354, 0, 465, 491, 0, 491, 1808, 0, 538, + 0, 540, 478, -8, 0, 0, 0, 1661, 34, 1354, + 0, 1808, 481, 482, 219, 485, 486, 490, 478, 0, + 1343, 492, 119, 1730, 1354, 0, 0, 1808, 308, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1808, 0, 0, 0, 0, 1808, + 496, 308, 0, +}; +static const short yyrindex[] = { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 576, 0, 0, 0, 0, 0, 0, + 0, 564, 163, 0, 578, 0, 589, 62, 0, 0, + 0, 590, 592, 597, 27, 610, 611, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 613, 0, 0, + 0, 0, 0, 0, 614, 0, 0, 0, 0, 31, + 0, 0, 0, 0, 0, 0, 615, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, + 0, 624, 0, 0, 0, 0, 626, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 624, 0, 285, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 612, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 162, + 0, 0, 0, 0, 0, 0, 407, 627, 628, 632, + 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, + 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, + 0, 0, 615, 0, 160, 0, 0, 0, 0, 53, + 0, 0, 0, 0, 0, 64, 0, 633, 0, 0, + 0, 0, 0, 93, 0, 0, 0, 0, 0, 0, + 615, 0, 0, 0, 0, 21, 0, 0, 0, 0, + 0, 332, 0, 0, 564, 0, 0, 0, 0, 0, + 0, 396, 0, 0, 0, 0, 0, 0, 523, 0, + 0, 135, 0, 0, 0, 0, 0, 523, 0, 0, + 0, 640, 0, 0, 0, 0, 649, 0, 658, 0, + 1207, 958, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1752, 586, 740, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 615, 0, 0, 45, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 591, 231, + 0, 666, 0, 0, 338, 297, 0, 0, 514, 557, + 667, 63, 12, 0, 0, 668, 0, 669, 0, 0, + 0, 1752, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1462, 0, 0, 0, 0, 343, 0, 0, 0, + 0, 0, 0, 344, 0, 0, 0, 0, 0, 763, + 852, 875, 266, 635, 175, 987, 1004, 898, 981, 0, + 21, 0, 0, 0, 0, 0, 0, 0, 0, -41, + 0, 0, 0, 0, 0, 0, 15, 0, 717, 0, + 601, 348, 0, 0, 0, 0, 0, 1082, 0, 0, + 1146, 0, 1171, 0, 1190, 0, 0, 0, 354, 0, + 0, 0, 0, 0, 0, 108, 136, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 380, 0, 0, + 0, 0, 1825, 7, 0, 0, 0, 0, 0, 625, + 0, 382, 0, 0, 799, 0, 0, 0, 1791, 0, + 0, 0, 0, 0, 0, 0, 0, 676, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 354, 0, 0, 0, 0, 158, + 0, 0, 0, +}; +static const short yygindex[] = { 0, + 0, -88, 0, -251, -308, 480, 0, 0, 0, 229, + 24, 0, 0, 0, -341, 0, -376, 425, 0, 0, + 0, -154, 422, 0, -192, 0, 0, 8, -174, 444, + 268, -29, 322, 0, -134, 388, 276, -125, -121, -92, + 420, 214, -159, 230, 374, -160, -35, 0, 0, -68, + -24, 616, 0, 0, 0, 0, 0, 1565, -19, 0, + 0, 238, 0, 0, 0, 0, 0, 0, 0, 1, + 0, -65, 0, -232, 595, 259, 0, 240, 593, 0, + 594, 0, 303, 0, 510, 345, 0, 277, 0, 352, + 609, 0, 0, 0, 273, 0, 680, 0, 0, 0, + 0, 0, 0, 0, 0, 379, 0, 0, 0, 0, + 0, 0, -58, 0, 0, 394, +}; +#define YYTABLESIZE 1972 +static const short yytable[] = { 106, + 226, 3, 141, 350, 107, 244, 283, 67, 434, 145, + 307, 195, 193, 110, 473, 136, 238, 414, 131, 282, + 282, 111, 204, 379, 125, 91, 216, 42, 191, 120, + 108, 109, 105, 123, 196, 124, 96, 129, 345, 116, + 231, 96, 117, 111, 231, 244, 118, 105, 171, 136, + 171, 92, 132, 126, 281, 281, 289, 96, 244, 263, + 264, 265, 38, 198, 304, 106, 188, 189, 455, 259, + 137, 232, 245, 134, 262, 21, 139, 147, 415, 202, + 106, 268, 205, 171, 67, 203, 193, 212, 244, 193, + 106, 193, 193, 175, 324, 473, 193, 136, 111, 106, + 231, 383, 111, 234, 231, 67, 236, 167, 210, 167, + 189, 233, 246, 247, 282, 282, 295, 251, 244, 111, + 111, 318, 244, 284, 285, 111, 171, 111, 231, 294, + 126, 171, 460, 462, 464, 197, 240, 198, 171, 308, + 198, 304, 167, 244, 231, 455, 231, 198, 21, 382, + 281, 353, 525, 430, 194, 140, 319, 320, 241, 435, + 228, 189, 247, 67, 142, 143, 298, 175, 303, 175, + 369, 370, 371, 372, 373, 157, 67, 144, 171, 356, + 436, 391, 210, 315, 105, 167, 392, 132, 157, 105, + 167, 442, 267, 327, 328, 329, 435, 167, 494, 105, + 125, 538, 146, 106, 460, 462, 67, 464, 346, 197, + 240, 105, 197, 240, 197, 197, 197, 197, 157, 197, + 105, 446, 324, 282, 282, 282, 132, 171, 171, 171, + 171, 171, 241, 231, 347, 241, 67, 167, 174, 267, + 67, 189, 189, 189, 189, 189, 189, 341, 157, 157, + 300, 157, 157, 123, 2, 124, 387, 301, 461, 463, + 465, 157, 157, 157, 298, 341, 160, 301, 105, 354, + 181, 290, 355, 157, 442, 452, 375, 376, 497, 160, + 269, 378, 267, 184, 270, 267, 167, 167, 167, 167, + 167, 267, 252, 493, 395, 282, 282, 271, 282, 504, + 197, 506, 507, 341, 508, 142, 198, 175, 142, 160, + 271, 324, 200, 194, 483, 484, 443, 512, 367, 229, + 397, 368, 439, 398, 206, 207, 189, 448, 269, 503, + 461, 463, 171, 509, 341, 341, 482, 442, 527, 160, + 160, 267, 160, 160, 399, 208, 341, 400, 341, 341, + 160, 160, 160, 160, 160, 213, 160, 160, 160, 160, + 160, 160, 402, 411, 160, 403, 412, 232, 303, 232, + 271, 230, 341, 252, 271, 438, 190, 190, 190, 190, + 190, 190, 315, 341, 466, 341, 486, 467, 341, 487, + 254, 167, 267, 267, 267, 267, 267, 224, 491, 443, + 517, 492, 443, 403, 341, 439, 236, 269, 439, 236, + 274, 286, 278, 224, 242, 278, 343, 131, 27, 341, + 131, 27, 275, 287, 505, 275, 505, 505, 119, 505, + 541, 119, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 105, 505, 341, 341, 341, 341, 341, 341, 341, + 341, 341, 341, 543, 105, 357, 143, 105, 438, 143, + 313, 265, 443, 175, 178, 180, 321, 152, 439, 529, + 140, 168, 174, 168, 395, 267, 163, 164, 263, 264, + 265, 266, 311, 312, 269, 377, 189, 189, 189, 189, + 189, 189, 341, 384, 385, 323, 325, 326, 386, 401, + 341, 220, 239, 170, 406, 177, 168, 163, 164, 240, + 349, 341, 410, 419, 194, 329, 449, 221, 450, 451, + 485, 438, 454, 456, 457, 341, 459, 360, 472, 362, + 475, 490, 495, 365, 498, 500, 499, 341, 366, 516, + 515, 341, 519, 163, 164, 263, 264, 265, 266, 168, + 381, 522, 524, 414, 168, 530, 531, 195, 341, 532, + 533, 168, 374, 341, 534, 273, 537, 163, 164, 263, + 264, 265, 266, 542, 396, 413, 45, 231, 37, 293, + 163, 164, 263, 264, 265, 266, 159, 305, 194, 220, + 39, 194, 40, 194, 194, 194, 194, 41, 194, 159, + 275, 168, 420, 421, 422, 423, 424, 425, 426, 427, + 43, 44, 169, 259, 21, 29, 428, 429, 163, 164, + 263, 264, 265, 323, 174, 169, 46, 251, 252, 159, + 242, 195, 256, 11, 195, 158, 195, 195, 195, 195, + 253, 195, 163, 164, 327, 328, 329, 330, 158, 291, + 168, 168, 168, 168, 168, 169, 273, 273, 292, 159, + 159, 273, 159, 159, 469, 141, 214, 196, 255, 254, + 477, 159, 159, 159, 159, 174, 230, 293, 158, 163, + 164, 327, 328, 329, 159, 488, 169, 169, 169, 169, + 314, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 174, 169, 169, 169, 169, 169, 169, 158, 158, + 169, 158, 158, 520, 390, 393, 501, 171, 380, 479, + 158, 158, 158, 158, 536, 502, 224, 528, 445, 523, + 171, 237, 513, 158, 526, 218, 248, 496, 249, 344, + 153, 196, 469, 510, 196, 0, 196, 196, 196, 196, + 514, 196, 481, 153, 250, 168, 489, 518, 150, 521, + 171, 453, 0, 150, 273, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 105, 224, 150, 0, 293, 0, + 0, 0, 0, 153, 0, 0, 535, 480, 0, 0, + 540, 171, 171, 171, 171, 0, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 150, 171, 171, 171, + 171, 171, 171, 153, 153, 171, 153, 153, 0, 153, + 153, 153, 153, 0, 153, 153, 153, 153, 153, 0, + 153, 153, 153, 153, 153, 153, 150, 150, 153, 150, + 150, 273, 150, 150, 150, 150, 0, 150, 150, 150, + 150, 150, 151, 150, 150, 150, 150, 150, 150, 293, + 0, 150, 0, 0, 0, 151, 0, 0, 0, 0, + 0, 0, 0, 169, 0, 152, 169, 0, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 152, 169, + 169, 169, 169, 169, 169, 151, 404, 0, 149, 0, + 0, 163, 164, 327, 328, 329, 330, 331, 332, 333, + 334, 149, 335, 336, 337, 338, 339, 340, 152, 0, + 0, 0, 0, 0, 0, 151, 151, 0, 151, 151, + 0, 151, 151, 151, 151, 0, 151, 151, 151, 151, + 151, 149, 151, 151, 151, 151, 151, 151, 152, 152, + 151, 152, 152, 0, 152, 152, 152, 152, 299, 152, + 152, 152, 152, 152, 0, 152, 152, 152, 152, 152, + 152, 149, 149, 152, 149, 149, 0, 149, 149, 0, + 0, 154, 149, 149, 149, 149, 149, 156, 149, 149, + 149, 149, 149, 149, 154, 0, 149, 0, 0, 0, + 156, 0, 405, 0, 155, 0, 0, 163, 164, 327, + 328, 329, 330, 331, 332, 333, 334, 155, 335, 336, + 337, 338, 339, 340, 154, 0, 0, 0, 0, 0, + 156, 0, 146, 0, 0, 299, 0, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 155, 146, 146, + 146, 146, 146, 146, 154, 154, 0, 154, 154, 0, + 156, 156, 0, 156, 156, 0, 154, 154, 154, 154, + 0, 0, 0, 0, 156, 156, 0, 155, 155, 154, + 155, 155, 300, 0, 0, 156, 0, 0, 0, 6, + 0, 155, 155, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 155, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 295, 50, 51, 52, + 53, 54, 55, 56, 57, 0, 145, 58, 59, 300, + 0, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 145, 297, 145, 145, 145, 145, 145, 145, 0, 0, + 0, 0, 60, 0, 0, 61, 0, 0, 0, 0, + 293, 0, 418, 0, 0, 0, 0, 163, 164, 327, + 328, 329, 330, 331, 332, 333, 334, 290, 335, 336, + 337, 338, 339, 340, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 295, 0, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 0, 144, 144, 144, 144, + 144, 144, 0, 0, 0, 0, 0, 0, 297, 0, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 0, 144, 144, 144, 144, 144, 144, 293, 0, 144, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 0, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 144, 144, 0, 144, 144, 144, + 144, 144, 144, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 105, 0, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 105, 0, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 105, 0, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 105, 0, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 105, 0, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 105, 0, 0, + 0, 0, 220, 0, 0, 0, 0, 0, 163, 164, + 363, 0, 364, 275, 0, 0, 0, 276, 221, 163, + 164, 0, 0, 0, 220, 0, 0, 0, 0, 221, + 163, 164, 432, 0, 0, 220, 0, 0, 0, 0, + 221, 163, 164, 240, 0, 0, 220, 0, 0, 0, + 0, 221, 163, 164, 468, 0, 0, 220, 0, 0, + 0, 0, 221, 163, 164, 0, 0, 0, 0, 0, + 0, 0, 0, 221, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 105, 0, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 105, 0, 231, 231, 231, 231, + 231, 231, 231, 231, 231, 231, 0, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 105, 255, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 105, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 275, 0, 0, 0, 0, 0, 163, + 164, 0, 0, 0, 348, 0, 0, 0, 0, 221, + 163, 164, 0, 0, 0, 231, 0, 0, 0, 0, + 221, 231, 231, 0, 0, 0, 214, 0, 0, 0, + 0, 231, 163, 164, 256, 0, 257, 162, 0, 0, + 0, 0, 10, 163, 164, 165, 14, 166, 0, 17, + 0, 0, 20, 21, 0, 23, 0, 96, 0, 0, + 0, 0, 98, 0, 0, 0, 100, 0, 101, 102, + 103, 0, 104, 41, 0, 43, 0, 0, 111, 112, + 113, 114, 115, 0, 51, 0, 0, 0, 55, 0, + 0, 0, 119, 58, 121, 0, 122, 0, 0, 0, + 0, 0, 0, 130, 0, 0, 0, 0, 0, 0, + 138, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 105, 61, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 105, 0, 182, 183, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 105, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 105, 458, 0, 0, 0, 0, + 163, 164, 327, 328, 329, 330, 331, 332, 333, 334, + 0, 335, 336, 337, 338, 339, 340, 0, 0, 0, + 162, 0, 0, 0, 0, 0, 163, 164, 176, 0, + 0, 214, 0, 0, 0, 0, 0, 163, 164, 215, + 0, 0, 0, 0, 214, 0, 0, 0, 0, 0, + 163, 164, 8, 9, 437, 11, 0, 13, 0, 15, + 163, 164, 18, 0, 0, 0, 0, 0, 0, 0, + 0, 27, 0, 0, 0, 0, 0, 0, 34, 35, + 36, 37, 0, 0, 40, 0, 0, 0, 0, 45, + 0, 47, 48, 0, 0, 50, 0, 52, 53, 0, + 0, 56, 478, 149, 0, 0, 59, 163, 164, 327, + 328, 329, 330, 331, 332, 333, 334, 0, 335, 336, + 337, 338, 339, 340, 539, 0, 0, 0, 0, 163, + 164, 327, 328, 329, 330, 331, 332, 333, 334, 0, + 335, 336, 337, 338, 339, 340, 144, 0, 0, 0, + 0, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 144, 0, 144, 144, 144, 144, 144, 144, 511, 0, + 0, 163, 164, 327, 328, 329, 330, 331, 332, 333, + 334, 0, 335, 336, 337, 338, 339, 340, 293, 0, + 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, + 0, 144, 144, 144, 144, 144, 144, 163, 164, 327, + 328, 329, 330, 331, 332, 333, 334, 0, 335, 336, + 337, 338, 339, 340, 144, 144, 144, 144, 144, 144, + 144, 144, 144, 144, 0, 144, 144, 144, 144, 144, + 144, 163, 164, 327, 328, 329, 330, 331, 332, 0, + 0, 0, 335, 336, 337, 338, 339, 340, 163, 164, + 327, 328, 329, 330, 331, 0, 0, 0, 0, 335, + 336, 337, 338, 339, 340, 163, 164, 327, 328, 329, + 330, 0, 0, 0, 0, 0, 335, 336, 337, 338, + 339, 340, +}; +static const short yycheck[] = { 29, + 122, 3, 68, 236, 29, 140, 181, 1, 350, 75, + 203, 100, 1, 33, 391, 1, 138, 14, 44, 180, + 181, 1, 111, 275, 54, 1, 119, 1, 97, 49, + 30, 31, 14, 83, 100, 85, 78, 57, 231, 39, + 14, 83, 42, 1, 14, 1, 46, 14, 84, 78, + 86, 5, 78, 1, 180, 181, 191, 99, 14, 82, + 83, 84, 1, 1, 1, 95, 96, 97, 377, 162, + 99, 130, 141, 82, 167, 1, 74, 83, 75, 109, + 110, 174, 112, 119, 78, 110, 75, 117, 44, 78, + 120, 80, 81, 1, 220, 472, 85, 83, 78, 129, + 74, 276, 82, 133, 129, 99, 136, 84, 1, 86, + 140, 131, 142, 143, 275, 276, 98, 147, 74, 99, + 78, 214, 78, 182, 183, 83, 162, 85, 98, 195, + 78, 167, 384, 385, 386, 1, 1, 75, 174, 205, + 78, 78, 119, 99, 83, 454, 85, 85, 74, 275, + 276, 240, 494, 346, 6, 78, 215, 216, 1, 78, + 1, 191, 1, 1, 78, 78, 196, 75, 198, 77, + 263, 264, 265, 266, 267, 1, 14, 78, 214, 245, + 99, 78, 75, 213, 14, 162, 83, 78, 14, 14, + 167, 352, 169, 82, 83, 84, 78, 174, 431, 14, + 230, 83, 78, 233, 456, 457, 44, 459, 233, 75, + 75, 14, 78, 78, 80, 81, 82, 83, 44, 85, + 14, 356, 348, 384, 385, 386, 78, 263, 264, 265, + 266, 267, 75, 74, 234, 78, 74, 214, 74, 216, + 78, 80, 81, 82, 83, 84, 85, 224, 74, 75, + 75, 77, 78, 83, 256, 85, 286, 82, 384, 385, + 386, 87, 88, 89, 294, 242, 1, 82, 14, 75, + 78, 74, 78, 99, 435, 368, 269, 270, 438, 14, + 74, 274, 259, 6, 78, 262, 263, 264, 265, 266, + 267, 268, 74, 419, 76, 456, 457, 1, 459, 454, + 74, 456, 457, 280, 459, 75, 74, 77, 78, 44, + 14, 437, 74, 6, 403, 404, 352, 472, 75, 14, + 75, 78, 352, 78, 74, 74, 356, 357, 74, 451, + 456, 457, 368, 459, 311, 312, 402, 498, 498, 74, + 75, 318, 77, 78, 75, 74, 323, 78, 325, 326, + 85, 86, 87, 88, 89, 74, 91, 92, 93, 94, + 95, 96, 75, 75, 99, 78, 78, 83, 398, 85, + 74, 78, 349, 74, 78, 352, 80, 81, 82, 83, + 84, 85, 412, 360, 75, 362, 75, 78, 365, 78, + 76, 368, 369, 370, 371, 372, 373, 122, 75, 435, + 75, 78, 438, 78, 381, 435, 75, 1, 438, 78, + 78, 71, 75, 138, 139, 78, 83, 75, 75, 396, + 78, 78, 75, 74, 454, 78, 456, 457, 75, 459, + 519, 78, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 472, 420, 421, 422, 423, 424, 425, 426, + 427, 428, 429, 542, 75, 83, 75, 78, 435, 78, + 74, 84, 498, 85, 86, 87, 74, 80, 498, 499, + 75, 84, 77, 86, 76, 452, 80, 81, 82, 83, + 84, 85, 207, 208, 78, 78, 80, 81, 82, 83, + 84, 85, 469, 78, 78, 220, 221, 222, 78, 74, + 477, 74, 75, 84, 14, 86, 119, 80, 81, 82, + 235, 488, 76, 78, 1, 84, 75, 90, 78, 77, + 81, 498, 78, 78, 78, 502, 78, 252, 78, 254, + 74, 76, 75, 258, 82, 74, 78, 514, 75, 70, + 78, 518, 78, 80, 81, 82, 83, 84, 85, 162, + 275, 14, 75, 14, 167, 75, 75, 1, 535, 75, + 75, 174, 75, 540, 75, 178, 75, 80, 81, 82, + 83, 84, 85, 78, 299, 75, 1, 14, 1, 192, + 80, 81, 82, 83, 84, 85, 1, 200, 75, 1, + 1, 78, 1, 80, 81, 82, 83, 1, 85, 14, + 78, 214, 327, 328, 329, 330, 331, 332, 333, 334, + 1, 1, 1, 1, 1, 1, 341, 342, 80, 81, + 82, 83, 84, 348, 1, 14, 1, 1, 1, 44, + 355, 75, 1, 1, 78, 1, 80, 81, 82, 83, + 1, 85, 80, 81, 82, 83, 84, 85, 14, 1, + 263, 264, 265, 266, 267, 44, 269, 270, 1, 74, + 75, 274, 77, 78, 389, 75, 1, 1, 1, 1, + 395, 86, 87, 88, 89, 75, 1, 290, 44, 80, + 81, 82, 83, 84, 99, 410, 75, 76, 77, 78, + 211, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 77, 91, 92, 93, 94, 95, 96, 74, 75, + 99, 77, 78, 485, 290, 294, 449, 1, 275, 398, + 86, 87, 88, 89, 511, 450, 451, 498, 355, 492, + 14, 137, 474, 99, 495, 120, 144, 435, 145, 230, + 1, 75, 467, 467, 78, -1, 80, 81, 82, 83, + 475, 85, 401, 14, 146, 368, 412, 482, 79, 487, + 44, 368, -1, 1, 377, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 500, 14, -1, 391, -1, + -1, -1, -1, 44, -1, -1, 511, 400, -1, -1, + 515, 75, 76, 77, 78, -1, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 44, 91, 92, 93, + 94, 95, 96, 74, 75, 99, 77, 78, -1, 80, + 81, 82, 83, -1, 85, 86, 87, 88, 89, -1, + 91, 92, 93, 94, 95, 96, 74, 75, 99, 77, + 78, 454, 80, 81, 82, 83, -1, 85, 86, 87, + 88, 89, 1, 91, 92, 93, 94, 95, 96, 472, + -1, 99, -1, -1, -1, 14, -1, -1, -1, -1, + -1, -1, -1, 75, -1, 1, 78, -1, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 14, 91, + 92, 93, 94, 95, 96, 44, 75, -1, 1, -1, + -1, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 14, 91, 92, 93, 94, 95, 96, 44, -1, + -1, -1, -1, -1, -1, 74, 75, -1, 77, 78, + -1, 80, 81, 82, 83, -1, 85, 86, 87, 88, + 89, 44, 91, 92, 93, 94, 95, 96, 74, 75, + 99, 77, 78, -1, 80, 81, 82, 83, 1, 85, + 86, 87, 88, 89, -1, 91, 92, 93, 94, 95, + 96, 74, 75, 99, 77, 78, -1, 80, 81, -1, + -1, 1, 85, 86, 87, 88, 89, 1, 91, 92, + 93, 94, 95, 96, 14, -1, 99, -1, -1, -1, + 14, -1, 75, -1, 1, -1, -1, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 14, 91, 92, + 93, 94, 95, 96, 44, -1, -1, -1, -1, -1, + 44, -1, 75, -1, -1, 78, -1, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 44, 91, 92, + 93, 94, 95, 96, 74, 75, -1, 77, 78, -1, + 74, 75, -1, 77, 78, -1, 86, 87, 88, 89, + -1, -1, -1, -1, 88, 89, -1, 74, 75, 99, + 77, 78, 1, -1, -1, 99, -1, -1, -1, 4, + -1, 88, 89, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 99, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 1, 62, 63, 64, + 65, 66, 67, 68, 69, -1, 75, 72, 73, 78, + -1, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 1, 91, 92, 93, 94, 95, 96, -1, -1, + -1, -1, 97, -1, -1, 100, -1, -1, -1, -1, + 1, -1, 75, -1, -1, -1, -1, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 1, 91, 92, + 93, 94, 95, 96, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 78, -1, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, -1, 91, 92, 93, 94, + 95, 96, -1, -1, -1, -1, -1, -1, 78, -1, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + -1, 91, 92, 93, 94, 95, 96, 78, -1, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, + 91, 92, 93, 94, 95, 96, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, -1, 91, 92, 93, + 94, 95, 96, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, -1, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, -1, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, -1, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, -1, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, -1, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, -1, -1, + -1, -1, 74, -1, -1, -1, -1, -1, 80, 81, + 82, -1, 84, 74, -1, -1, -1, 78, 90, 80, + 81, -1, -1, -1, 74, -1, -1, -1, -1, 90, + 80, 81, 82, -1, -1, 74, -1, -1, -1, -1, + 90, 80, 81, 82, -1, -1, 74, -1, -1, -1, + -1, 90, 80, 81, 82, -1, -1, 74, -1, -1, + -1, -1, 90, 80, 81, -1, -1, -1, -1, -1, + -1, -1, -1, 90, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, -1, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, -1, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, -1, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 74, -1, -1, -1, -1, -1, 80, + 81, -1, -1, -1, 74, -1, -1, -1, -1, 90, + 80, 81, -1, -1, -1, 74, -1, -1, -1, -1, + 90, 80, 81, -1, -1, -1, 74, -1, -1, -1, + -1, 90, 80, 81, 82, -1, 84, 74, -1, -1, + -1, -1, 21, 80, 81, 82, 25, 84, -1, 28, + -1, -1, 31, 32, -1, 34, -1, 13, -1, -1, + -1, -1, 18, -1, -1, -1, 22, -1, 24, 25, + 26, -1, 28, 52, -1, 54, -1, -1, 34, 35, + 36, 37, 38, -1, 63, -1, -1, -1, 67, -1, + -1, -1, 48, 72, 50, -1, 52, -1, -1, -1, + -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, + 66, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 100, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, -1, 89, 90, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 75, -1, -1, -1, -1, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + -1, 91, 92, 93, 94, 95, 96, -1, -1, -1, + 74, -1, -1, -1, -1, -1, 80, 81, 82, -1, + -1, 74, -1, -1, -1, -1, -1, 80, 81, 82, + -1, -1, -1, -1, 74, -1, -1, -1, -1, -1, + 80, 81, 19, 20, 74, 22, -1, 24, -1, 26, + 80, 81, 29, -1, -1, -1, -1, -1, -1, -1, + -1, 38, -1, -1, -1, -1, -1, -1, 45, 46, + 47, 48, -1, -1, 51, -1, -1, -1, -1, 56, + -1, 58, 59, -1, -1, 62, -1, 64, 65, -1, + -1, 68, 75, 70, -1, -1, 73, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, -1, 91, 92, + 93, 94, 95, 96, 75, -1, -1, -1, -1, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, -1, + 91, 92, 93, 94, 95, 96, 75, -1, -1, -1, + -1, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, -1, 91, 92, 93, 94, 95, 96, 77, -1, + -1, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, -1, 91, 92, 93, 94, 95, 96, 78, -1, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + -1, 91, 92, 93, 94, 95, 96, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, -1, 91, 92, + 93, 94, 95, 96, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, -1, 91, 92, 93, 94, 95, + 96, 80, 81, 82, 83, 84, 85, 86, 87, -1, + -1, -1, 91, 92, 93, 94, 95, 96, 80, 81, + 82, 83, 84, 85, 86, -1, -1, -1, -1, 91, + 92, 93, 94, 95, 96, 80, 81, 82, 83, 84, + 85, -1, -1, -1, -1, -1, 91, 92, 93, 94, + 95, 96, +}; +#define YYFINAL 1 +#ifndef YYDEBUG +#define YYDEBUG 0 +#endif +#define YYMAXTOKEN 100 +#if YYDEBUG +static const char *yyname[] = { + +"end-of-file","SEOS","SCOMMENT","SLABEL","SUNKNOWN","SHOLLERITH","SICON", +"SRCON","SDCON","SBITCON","SOCTCON","SHEXCON","STRUE","SFALSE","SNAME", +"SNAMEEQ","SFIELD","SSCALE","SINCLUDE","SLET","SASSIGN","SAUTOMATIC", +"SBACKSPACE","SBLOCK","SCALL","SCHARACTER","SCLOSE","SCOMMON","SCOMPLEX", +"SCONTINUE","SDATA","SDCOMPLEX","SDIMENSION","SDO","SDOUBLE","SELSE","SELSEIF", +"SEND","SENDFILE","SENDIF","SENTRY","SEQUIV","SEXTERNAL","SFORMAT","SFUNCTION", +"SGOTO","SASGOTO","SCOMPGOTO","SARITHIF","SLOGIF","SIMPLICIT","SINQUIRE", +"SINTEGER","SINTRINSIC","SLOGICAL","SNAMELIST","SOPEN","SPARAM","SPAUSE", +"SPRINT","SPROGRAM","SPUNCH","SREAD","SREAL","SRETURN","SREWIND","SSAVE", +"SSTATIC","SSTOP","SSUBROUTINE","STHEN","STO","SUNDEFINED","SWRITE","SLPAR", +"SRPAR","SEQUALS","SCOLON","SCOMMA","SCURRENCY","SPLUS","SMINUS","SSTAR", +"SSLASH","SPOWER","SCONCAT","SAND","SOR","SNEQV","SEQV","SNOT","SEQ","SLT", +"SGT","SLE","SGE","SNE","SENDDO","SWHILE","SSLASHD","SBYTE", +}; +static const char *yyrule[] = { +"$accept : program", +"program :", +"program : program stat SEOS", +"stat : thislabel entry", +"stat : thislabel spec", +"stat : thislabel exec", +"stat : thislabel SINCLUDE filename", +"stat : thislabel SEND end_spec", +"stat : thislabel SUNKNOWN", +"stat : error", +"thislabel : SLABEL", +"entry : SPROGRAM new_proc progname", +"entry : SPROGRAM new_proc progname progarglist", +"entry : SBLOCK new_proc progname", +"entry : SSUBROUTINE new_proc entryname arglist", +"entry : SFUNCTION new_proc entryname arglist", +"entry : type SFUNCTION new_proc entryname arglist", +"entry : SENTRY entryname arglist", +"new_proc :", +"entryname : name", +"name : SNAME", +"progname :", +"progname : entryname", +"progarglist : SLPAR SRPAR", +"progarglist : SLPAR progargs SRPAR", +"progargs : progarg", +"progargs : progargs SCOMMA progarg", +"progarg : SNAME", +"progarg : SNAME SEQUALS SNAME", +"arglist :", +"arglist : SLPAR SRPAR", +"arglist : SLPAR args SRPAR", +"args : arg", +"args : args SCOMMA arg", +"arg : name", +"arg : SSTAR", +"filename : SHOLLERITH", +"spec : dcl", +"spec : common", +"spec : external", +"spec : intrinsic", +"spec : equivalence", +"spec : data", +"spec : implicit", +"spec : namelist", +"spec : SSAVE", +"spec : SSAVE savelist", +"spec : SFORMAT", +"spec : SPARAM in_dcl SLPAR paramlist SRPAR", +"dcl : type opt_comma name in_dcl new_dcl dims lengspec", +"dcl : dcl SCOMMA name dims lengspec", +"dcl : dcl SSLASHD datainit vallist SSLASHD", +"new_dcl :", +"type : typespec lengspec", +"typespec : typename", +"typename : SINTEGER", +"typename : SREAL", +"typename : SCOMPLEX", +"typename : SDOUBLE", +"typename : SDCOMPLEX", +"typename : SLOGICAL", +"typename : SCHARACTER", +"typename : SUNDEFINED", +"typename : SDIMENSION", +"typename : SAUTOMATIC", +"typename : SSTATIC", +"typename : SBYTE", +"lengspec :", +"lengspec : SSTAR intonlyon expr intonlyoff", +"lengspec : SSTAR intonlyon SLPAR SSTAR SRPAR intonlyoff", +"common : SCOMMON in_dcl var", +"common : SCOMMON in_dcl comblock var", +"common : common opt_comma comblock opt_comma var", +"common : common SCOMMA var", +"comblock : SCONCAT", +"comblock : SSLASH SNAME SSLASH", +"external : SEXTERNAL in_dcl name", +"external : external SCOMMA name", +"intrinsic : SINTRINSIC in_dcl name", +"intrinsic : intrinsic SCOMMA name", +"equivalence : SEQUIV in_dcl equivset", +"equivalence : equivalence SCOMMA equivset", +"equivset : SLPAR equivlist SRPAR", +"equivlist : lhs", +"equivlist : equivlist SCOMMA lhs", +"data : SDATA in_data datalist", +"data : data opt_comma datalist", +"in_data :", +"datalist : datainit datavarlist SSLASH datapop vallist SSLASH", +"datainit :", +"datapop :", +"$$1 :", +"vallist : $$1 val", +"vallist : vallist SCOMMA val", +"val : value", +"val : simple SSTAR value", +"value : simple", +"value : addop simple", +"value : complex_const", +"savelist : saveitem", +"savelist : savelist SCOMMA saveitem", +"saveitem : name", +"saveitem : comblock", +"paramlist : paramitem", +"paramlist : paramlist SCOMMA paramitem", +"paramitem : name SEQUALS expr", +"var : name dims", +"datavar : lhs", +"datavar : SLPAR datavarlist SCOMMA dospec SRPAR", +"datavarlist : datavar", +"datavarlist : datavarlist SCOMMA datavar", +"dims :", +"dims : SLPAR dimlist SRPAR", +"$$2 :", +"dimlist : $$2 dim", +"dimlist : dimlist SCOMMA dim", +"dim : ubound", +"dim : expr SCOLON ubound", +"ubound : SSTAR", +"ubound : expr", +"labellist : label", +"labellist : labellist SCOMMA label", +"label : SICON", +"implicit : SIMPLICIT in_dcl implist", +"implicit : implicit SCOMMA implist", +"implist : imptype SLPAR letgroups SRPAR", +"implist : imptype", +"$$3 :", +"imptype : $$3 type", +"letgroups : letgroup", +"letgroups : letgroups SCOMMA letgroup", +"letgroup : letter", +"letgroup : letter SMINUS letter", +"letter : SNAME", +"namelist : SNAMELIST", +"namelist : namelist namelistentry", +"namelistentry : SSLASH name SSLASH namelistlist", +"namelistlist : name", +"namelistlist : namelistlist SCOMMA name", +"in_dcl :", +"funarglist :", +"funarglist : funargs", +"funargs : expr", +"funargs : funargs SCOMMA expr", +"expr : uexpr", +"expr : SLPAR expr SRPAR", +"expr : complex_const", +"uexpr : lhs", +"uexpr : simple_const", +"uexpr : expr addop expr", +"uexpr : expr SSTAR expr", +"uexpr : expr SSLASH expr", +"uexpr : expr SPOWER expr", +"uexpr : addop expr", +"uexpr : expr relop expr", +"uexpr : expr SEQV expr", +"uexpr : expr SNEQV expr", +"uexpr : expr SOR expr", +"uexpr : expr SAND expr", +"uexpr : SNOT expr", +"uexpr : expr SCONCAT expr", +"addop : SPLUS", +"addop : SMINUS", +"relop : SEQ", +"relop : SGT", +"relop : SLT", +"relop : SGE", +"relop : SLE", +"relop : SNE", +"lhs : name", +"lhs : name substring", +"lhs : name SLPAR funarglist SRPAR", +"lhs : name SLPAR funarglist SRPAR substring", +"substring : SLPAR opt_expr SCOLON opt_expr SRPAR", +"opt_expr :", +"opt_expr : expr", +"simple : name", +"simple : simple_const", +"simple_const : STRUE", +"simple_const : SFALSE", +"simple_const : SHOLLERITH", +"simple_const : SICON", +"simple_const : SRCON", +"simple_const : SDCON", +"simple_const : bit_const", +"complex_const : SLPAR uexpr SCOMMA uexpr SRPAR", +"bit_const : SHEXCON", +"bit_const : SOCTCON", +"bit_const : SBITCON", +"fexpr : unpar_fexpr", +"fexpr : SLPAR fexpr SRPAR", +"unpar_fexpr : lhs", +"unpar_fexpr : simple_const", +"unpar_fexpr : fexpr addop fexpr", +"unpar_fexpr : fexpr SSTAR fexpr", +"unpar_fexpr : fexpr SSLASH fexpr", +"unpar_fexpr : fexpr SPOWER fexpr", +"unpar_fexpr : addop fexpr", +"unpar_fexpr : fexpr SCONCAT fexpr", +"exec : iffable", +"exec : SDO end_spec label opt_comma dospecw", +"exec : SDO end_spec opt_comma dospecw", +"exec : SENDDO", +"exec : logif iffable", +"exec : logif STHEN", +"$$4 :", +"exec : SELSEIF end_spec SLPAR $$4 expr SRPAR STHEN", +"exec : SELSE end_spec", +"exec : SENDIF end_spec", +"logif : SLOGIF end_spec SLPAR expr SRPAR", +"dospec : name SEQUALS exprlist", +"dospecw : dospec", +"$$5 :", +"dospecw : SWHILE $$5 SLPAR expr SRPAR", +"iffable : let lhs SEQUALS expr", +"iffable : SASSIGN end_spec assignlabel STO name", +"iffable : SCONTINUE end_spec", +"iffable : goto", +"iffable : io", +"iffable : SARITHIF end_spec SLPAR expr SRPAR label SCOMMA label SCOMMA label", +"iffable : call", +"iffable : call SLPAR SRPAR", +"iffable : call SLPAR callarglist SRPAR", +"iffable : SRETURN end_spec opt_expr", +"iffable : stop end_spec opt_expr", +"assignlabel : SICON", +"let : SLET", +"goto : SGOTO end_spec label", +"goto : SASGOTO end_spec name", +"goto : SASGOTO end_spec name opt_comma SLPAR labellist SRPAR", +"goto : SCOMPGOTO end_spec SLPAR labellist SRPAR opt_comma expr", +"opt_comma :", +"opt_comma : SCOMMA", +"call : SCALL end_spec name", +"callarglist : callarg", +"callarglist : callarglist SCOMMA callarg", +"callarg : expr", +"callarg : SSTAR label", +"stop : SPAUSE", +"stop : SSTOP", +"exprlist : expr", +"exprlist : exprlist SCOMMA expr", +"end_spec :", +"intonlyon :", +"intonlyoff :", +"io : io1", +"io1 : iofmove ioctl", +"io1 : iofmove unpar_fexpr", +"io1 : iofmove SSTAR", +"io1 : iofmove SPOWER", +"io1 : iofctl ioctl", +"io1 : read ioctl", +"io1 : read infmt", +"io1 : read ioctl inlist", +"io1 : read infmt SCOMMA inlist", +"io1 : read ioctl SCOMMA inlist", +"io1 : write ioctl", +"io1 : write ioctl outlist", +"io1 : write ioctl SCOMMA outlist", +"io1 : print", +"io1 : print SCOMMA outlist", +"iofmove : fmkwd end_spec in_ioctl", +"fmkwd : SBACKSPACE", +"fmkwd : SREWIND", +"fmkwd : SENDFILE", +"iofctl : ctlkwd end_spec in_ioctl", +"ctlkwd : SINQUIRE", +"ctlkwd : SOPEN", +"ctlkwd : SCLOSE", +"infmt : unpar_fexpr", +"infmt : SSTAR", +"ioctl : SLPAR fexpr SRPAR", +"ioctl : SLPAR ctllist SRPAR", +"ctllist : ioclause", +"ctllist : ctllist SCOMMA ioclause", +"ioclause : fexpr", +"ioclause : SSTAR", +"ioclause : SPOWER", +"ioclause : nameeq expr", +"ioclause : nameeq SSTAR", +"ioclause : nameeq SPOWER", +"nameeq : SNAMEEQ", +"read : SREAD end_spec in_ioctl", +"write : SWRITE end_spec in_ioctl", +"print : SPRINT end_spec fexpr in_ioctl", +"print : SPRINT end_spec SSTAR in_ioctl", +"inlist : inelt", +"inlist : inlist SCOMMA inelt", +"inelt : lhs", +"inelt : SLPAR inlist SCOMMA dospec SRPAR", +"outlist : uexpr", +"outlist : other", +"outlist : out2", +"out2 : uexpr SCOMMA uexpr", +"out2 : uexpr SCOMMA other", +"out2 : other SCOMMA uexpr", +"out2 : other SCOMMA other", +"out2 : out2 SCOMMA uexpr", +"out2 : out2 SCOMMA other", +"other : complex_const", +"other : SLPAR expr SRPAR", +"other : SLPAR uexpr SCOMMA dospec SRPAR", +"other : SLPAR other SCOMMA dospec SRPAR", +"other : SLPAR out2 SCOMMA dospec SRPAR", +"in_ioctl :", + +}; +#endif +#if YYDEBUG +#include <stdio.h> +#endif + +extern int YYPARSE_DECL(); +static int yygrowstack(short **, short **, short **, + YYSTYPE **, YYSTYPE **, unsigned *); + +/* define the initial stack-sizes */ +#ifdef YYSTACKSIZE +#undef YYMAXDEPTH +#define YYMAXDEPTH YYSTACKSIZE +#else +#ifdef YYMAXDEPTH +#define YYSTACKSIZE YYMAXDEPTH +#else +#define YYSTACKSIZE 500 +#define YYMAXDEPTH 500 +#endif +#endif + +#define YYINITSTACKSIZE 500 + +int yydebug; +int yyerrflag; + int yynerrs; + int yychar; + YYSTYPE yylval; + +/* allocate initial stack or double stack size, up to YYMAXDEPTH */ +static int yygrowstack(short **yyss, short **yyssp, short **yysslim, + YYSTYPE **yyvs, YYSTYPE **yyvsp, unsigned *yystacksize) +{ + int i; + unsigned newsize; + short *newss; + YYSTYPE *newvs; + + if ((newsize = *yystacksize) == 0) + newsize = YYINITSTACKSIZE; + else if (newsize >= YYMAXDEPTH) + return -1; + else if ((newsize *= 2) > YYMAXDEPTH) + newsize = YYMAXDEPTH; + + i = *yyssp - *yyss; + newss = (short *)realloc(*yyss, newsize * sizeof(*newss)); + if (newss == 0) + return -1; + + *yyss = newss; + *yyssp = newss + i; + newvs = (YYSTYPE *)realloc(*yyvs, newsize * sizeof(*newvs)); + if (newvs == 0) + return -1; + + *yyvs = newvs; + *yyvsp = newvs + i; + *yystacksize = newsize; + *yysslim = *yyss + newsize - 1; + return 0; +} + +#define YYABORT goto yyabort +#define YYREJECT goto yyabort +#define YYACCEPT goto yyaccept +#define YYERROR goto yyerrlab + +int +YYPARSE_DECL() +{ + int yym, yyn, yystate; + + YYSTYPE yyval; + /* variables for the parser stack */ + short *yyssp; + short *yyss; + short *yysslim; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + unsigned yystacksize; +#if YYDEBUG + const char *yys; + + if ((yys = getenv("YYDEBUG")) != 0) + { + yyn = *yys; + if (yyn >= '0' && yyn <= '9') + yydebug = yyn - '0'; + } +#endif + + yynerrs = 0; + yyerrflag = 0; + yychar = YYEMPTY; + yystate = 0; + + yystacksize = 0; + yyvs = yyvsp = NULL; + yyss = yyssp = NULL; + if (yygrowstack(&yyss, &yyssp, &yysslim, &yyvs, &yyvsp, &yystacksize)) + goto yyoverflow; + yystate = 0; + *yyssp = 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 >= yysslim && yygrowstack(&yyss, &yyssp, &yysslim, + &yyvs, &yyvsp, &yystacksize)) + { + goto yyoverflow; + } + yystate = yytable[yyn]; + *++yyssp = yytable[yyn]; + *++yyvsp = yylval; + yychar = YYEMPTY; + 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"); + + goto yyerrlab; + +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 >= yysslim && yygrowstack(&yyss, &yyssp, + &yysslim, &yyvs, &yyvsp, &yystacksize)) + { + goto yyoverflow; + } + yystate = yytable[yyn]; + *++yyssp = 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 = YYEMPTY; + 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]; + if (yym) + yyval = yyvsp[1-yym]; + else + memset(&yyval, 0, sizeof yyval); + switch (yyn) + { +case 3: +#line 220 "gram.y" + { +/* stat: is the nonterminal for Fortran statements */ + + lastwasbranch = NO; } +break; +case 5: +#line 226 "gram.y" + { /* forbid further statement function definitions... */ + if (parstate == INDATA && laststfcn != thisstno) + parstate = INEXEC; + thisstno++; + if(yyvsp[-1].labval && (yyvsp[-1].labval->labelno==dorange)) + enddo(yyvsp[-1].labval->labelno); + if(lastwasbranch && thislabel==NULL) + warn("statement cannot be reached"); + lastwasbranch = thiswasbranch; + thiswasbranch = NO; + if(yyvsp[-1].labval) + { + if(yyvsp[-1].labval->labtype == LABFORMAT) + err("label already that of a format"); + else + yyvsp[-1].labval->labtype = LABEXEC; + } + freetemps(); + } +break; +case 6: +#line 246 "gram.y" + { if (can_include) + doinclude( yyvsp[0].charpval ); + else { + fprintf(diagfile, "Cannot open file %s\n", yyvsp[0].charpval); + done(1); + } + } +break; +case 7: +#line 254 "gram.y" + { if (yyvsp[-2].labval) + lastwasbranch = NO; + endcheck(); + endproc(); /* lastwasbranch = NO; -- set in endproc() */ + } +break; +case 8: +#line 260 "gram.y" + { unclassifiable(); + +/* flline flushes the current line, ignoring the rest of the text there */ + + flline(); } +break; +case 9: +#line 266 "gram.y" + { flline(); needkwd = NO; inioctl = NO; + yyerrok; yyclearin; } +break; +case 10: +#line 271 "gram.y" + { + if(yystno != 0) + { + yyval.labval = thislabel = mklabel(yystno); + if( ! headerdone ) { + if (procclass == CLUNKNOWN) + procclass = CLMAIN; + puthead(CNULL, procclass); + } + if(thislabel->labdefined) + execerr("label %s already defined", + convic(thislabel->stateno) ); + else { + if(thislabel->blklevel!=0 && thislabel->blklevel<blklevel + && thislabel->labtype!=LABFORMAT) + warn1("there is a branch to label %s from outside block", + convic( (ftnint) (thislabel->stateno) ) ); + thislabel->blklevel = blklevel; + thislabel->labdefined = YES; + if(thislabel->labtype != LABFORMAT) + p1_label((long)(thislabel - labeltab)); + } + } + else yyval.labval = thislabel = NULL; + } +break; +case 11: +#line 299 "gram.y" + {startproc(yyvsp[0].extval, CLMAIN); } +break; +case 12: +#line 301 "gram.y" + { warn("ignoring arguments to main program"); + /* hashclear(); */ + startproc(yyvsp[-1].extval, CLMAIN); } +break; +case 13: +#line 305 "gram.y" + { if(yyvsp[0].extval) NO66("named BLOCKDATA"); + startproc(yyvsp[0].extval, CLBLOCK); } +break; +case 14: +#line 308 "gram.y" + { entrypt(CLPROC, TYSUBR, (ftnint) 0, yyvsp[-1].extval, yyvsp[0].chval); } +break; +case 15: +#line 310 "gram.y" + { entrypt(CLPROC, TYUNKNOWN, (ftnint) 0, yyvsp[-1].extval, yyvsp[0].chval); } +break; +case 16: +#line 312 "gram.y" + { entrypt(CLPROC, yyvsp[-4].ival, varleng, yyvsp[-1].extval, yyvsp[0].chval); } +break; +case 17: +#line 314 "gram.y" + { if(parstate==OUTSIDE || procclass==CLMAIN + || procclass==CLBLOCK) + execerr("misplaced entry statement", CNULL); + entrypt(CLENTRY, 0, (ftnint) 0, yyvsp[-1].extval, yyvsp[0].chval); + } +break; +case 18: +#line 322 "gram.y" + { newproc(); } +break; +case 19: +#line 326 "gram.y" + { yyval.extval = newentry(yyvsp[0].namval, 1); } +break; +case 20: +#line 330 "gram.y" + { yyval.namval = mkname(token); } +break; +case 21: +#line 333 "gram.y" + { yyval.extval = NULL; } +break; +case 29: +#line 351 "gram.y" + { yyval.chval = 0; } +break; +case 30: +#line 353 "gram.y" + { NO66(" () argument list"); + yyval.chval = 0; } +break; +case 31: +#line 356 "gram.y" + {yyval.chval = yyvsp[-1].chval; } +break; +case 32: +#line 360 "gram.y" + { yyval.chval = (yyvsp[0].namval ? mkchain((char *)yyvsp[0].namval,CHNULL) : CHNULL ); } +break; +case 33: +#line 362 "gram.y" + { if(yyvsp[0].namval) yyvsp[-2].chval = yyval.chval = mkchain((char *)yyvsp[0].namval, yyvsp[-2].chval); } +break; +case 34: +#line 366 "gram.y" + { if(yyvsp[0].namval->vstg!=STGUNKNOWN && yyvsp[0].namval->vstg!=STGARG) + dclerr("name declared as argument after use", yyvsp[0].namval); + yyvsp[0].namval->vstg = STGARG; + } +break; +case 35: +#line 371 "gram.y" + { NO66("altenate return argument"); + +/* substars means that '*'ed formal parameters should be replaced. + This is used to specify alternate return labels; in theory, only + parameter slots which have '*' should accept the statement labels. + This compiler chooses to ignore the '*'s in the formal declaration, and + always return the proper value anyway. + + This variable is only referred to in proc.c */ + + yyval.namval = 0; substars = YES; } +break; +case 36: +#line 387 "gram.y" + { + char *s; + s = copyn(toklen+1, token); + s[toklen] = '\0'; + yyval.charpval = s; + } +break; +case 45: +#line 403 "gram.y" + { NO66("SAVE statement"); + saveall = YES; } +break; +case 46: +#line 406 "gram.y" + { NO66("SAVE statement"); } +break; +case 47: +#line 408 "gram.y" + { fmtstmt(thislabel); setfmt(thislabel); } +break; +case 48: +#line 410 "gram.y" + { NO66("PARAMETER statement"); } +break; +case 49: +#line 414 "gram.y" + { settype(yyvsp[-4].namval, yyvsp[-6].ival, yyvsp[0].lval); + if(ndim>0) setbound(yyvsp[-4].namval,ndim,dims); + } +break; +case 50: +#line 418 "gram.y" + { settype(yyvsp[-2].namval, yyvsp[-4].ival, yyvsp[0].lval); + if(ndim>0) setbound(yyvsp[-2].namval,ndim,dims); + } +break; +case 51: +#line 422 "gram.y" + { if (new_dcl == 2) { + err("attempt to give DATA in type-declaration"); + new_dcl = 1; + } + } +break; +case 52: +#line 429 "gram.y" + { new_dcl = 2; } +break; +case 53: +#line 432 "gram.y" + { varleng = yyvsp[0].lval; } +break; +case 54: +#line 436 "gram.y" + { varleng = (yyvsp[0].ival<0 || ONEOF(yyvsp[0].ival,M(TYLOGICAL)|M(TYLONG)) + ? 0 : typesize[yyvsp[0].ival]); + vartype = yyvsp[0].ival; } +break; +case 55: +#line 441 "gram.y" + { yyval.ival = TYLONG; } +break; +case 56: +#line 442 "gram.y" + { yyval.ival = tyreal; } +break; +case 57: +#line 443 "gram.y" + { ++complex_seen; yyval.ival = tycomplex; } +break; +case 58: +#line 444 "gram.y" + { yyval.ival = TYDREAL; } +break; +case 59: +#line 445 "gram.y" + { ++dcomplex_seen; NOEXT("DOUBLE COMPLEX statement"); yyval.ival = TYDCOMPLEX; } +break; +case 60: +#line 446 "gram.y" + { yyval.ival = TYLOGICAL; } +break; +case 61: +#line 447 "gram.y" + { NO66("CHARACTER statement"); yyval.ival = TYCHAR; } +break; +case 62: +#line 448 "gram.y" + { yyval.ival = TYUNKNOWN; } +break; +case 63: +#line 449 "gram.y" + { yyval.ival = TYUNKNOWN; } +break; +case 64: +#line 450 "gram.y" + { NOEXT("AUTOMATIC statement"); yyval.ival = - STGAUTO; } +break; +case 65: +#line 451 "gram.y" + { NOEXT("STATIC statement"); yyval.ival = - STGBSS; } +break; +case 66: +#line 452 "gram.y" + { yyval.ival = TYINT1; } +break; +case 67: +#line 456 "gram.y" + { yyval.lval = varleng; } +break; +case 68: +#line 458 "gram.y" + { + expptr p; + p = yyvsp[-1].expval; + NO66("length specification *n"); + if( ! ISICON(p) || p->constblock.Const.ci <= 0 ) + { + yyval.lval = 0; + dclerr("length must be a positive integer constant", + NPNULL); + } + else { + if (vartype == TYCHAR) + yyval.lval = p->constblock.Const.ci; + else switch((int)p->constblock.Const.ci) { + case 1: yyval.lval = 1; break; + case 2: yyval.lval = typesize[TYSHORT]; break; + case 4: yyval.lval = typesize[TYLONG]; break; + case 8: yyval.lval = typesize[TYDREAL]; break; + case 16: yyval.lval = typesize[TYDCOMPLEX]; break; + default: + dclerr("invalid length",NPNULL); + yyval.lval = varleng; + } + } + } +break; +case 69: +#line 484 "gram.y" + { NO66("length specification *(*)"); yyval.lval = -1; } +break; +case 70: +#line 488 "gram.y" + { incomm( yyval.extval = comblock("") , yyvsp[0].namval ); } +break; +case 71: +#line 490 "gram.y" + { yyval.extval = yyvsp[-1].extval; incomm(yyvsp[-1].extval, yyvsp[0].namval); } +break; +case 72: +#line 492 "gram.y" + { yyval.extval = yyvsp[-2].extval; incomm(yyvsp[-2].extval, yyvsp[0].namval); } +break; +case 73: +#line 494 "gram.y" + { incomm(yyvsp[-2].extval, yyvsp[0].namval); } +break; +case 74: +#line 498 "gram.y" + { yyval.extval = comblock(""); } +break; +case 75: +#line 500 "gram.y" + { yyval.extval = comblock(token); } +break; +case 76: +#line 504 "gram.y" + { setext(yyvsp[0].namval); } +break; +case 77: +#line 506 "gram.y" + { setext(yyvsp[0].namval); } +break; +case 78: +#line 510 "gram.y" + { NO66("INTRINSIC statement"); setintr(yyvsp[0].namval); } +break; +case 79: +#line 512 "gram.y" + { setintr(yyvsp[0].namval); } +break; +case 82: +#line 520 "gram.y" + { + struct Equivblock *p; + if(nequiv >= maxequiv) + many("equivalences", 'q', maxequiv); + p = & eqvclass[nequiv++]; + p->eqvinit = NO; + p->eqvbottom = 0; + p->eqvtop = 0; + p->equivs = yyvsp[-1].eqvval; + } +break; +case 83: +#line 533 "gram.y" + { yyval.eqvval=ALLOC(Eqvchain); + yyval.eqvval->eqvitem.eqvlhs = primchk(yyvsp[0].expval); + } +break; +case 84: +#line 537 "gram.y" + { yyval.eqvval=ALLOC(Eqvchain); + yyval.eqvval->eqvitem.eqvlhs = primchk(yyvsp[0].expval); + yyval.eqvval->eqvnextp = yyvsp[-2].eqvval; + } +break; +case 87: +#line 548 "gram.y" + { if(parstate == OUTSIDE) + { + newproc(); + startproc(ESNULL, CLMAIN); + } + if(parstate < INDATA) + { + enddcl(); + parstate = INDATA; + datagripe = 1; + } + } +break; +case 88: +#line 563 "gram.y" + { ftnint junk; + if(nextdata(&junk) != NULL) + err("too few initializers"); + frdata(yyvsp[-4].chval); + frrpl(); + } +break; +case 89: +#line 571 "gram.y" + { frchain(&datastack); curdtp = 0; } +break; +case 90: +#line 573 "gram.y" + { pop_datastack(); } +break; +case 91: +#line 575 "gram.y" + { toomanyinit = NO; } +break; +case 94: +#line 580 "gram.y" + { dataval(ENULL, yyvsp[0].expval); } +break; +case 95: +#line 582 "gram.y" + { dataval(yyvsp[-2].expval, yyvsp[0].expval); } +break; +case 97: +#line 587 "gram.y" + { if( yyvsp[-1].ival==OPMINUS && ISCONST(yyvsp[0].expval) ) + consnegop((Constp)yyvsp[0].expval); + yyval.expval = yyvsp[0].expval; + } +break; +case 101: +#line 599 "gram.y" + { int k; + yyvsp[0].namval->vsave = YES; + k = yyvsp[0].namval->vstg; + if( ! ONEOF(k, M(STGUNKNOWN)|M(STGBSS)|M(STGINIT)) ) + dclerr("can only save static variables", yyvsp[0].namval); + } +break; +case 105: +#line 613 "gram.y" + { if(yyvsp[-2].namval->vclass == CLUNKNOWN) + make_param((struct Paramblock *)yyvsp[-2].namval, yyvsp[0].expval); + else dclerr("cannot make into parameter", yyvsp[-2].namval); + } +break; +case 106: +#line 620 "gram.y" + { if(ndim>0) setbound(yyvsp[-1].namval, ndim, dims); } +break; +case 107: +#line 624 "gram.y" + { Namep np; + struct Primblock *pp = (struct Primblock *)yyvsp[0].expval; + int tt = yyvsp[0].expval->tag; + if (tt != TPRIM) { + if (tt == TCONST) + err("parameter in data statement"); + else + erri("tag %d in data statement",tt); + yyval.chval = 0; + err_lineno = lineno; + break; + } + np = pp -> namep; + vardcl(np); + if ((pp->fcharp || pp->lcharp) + && (np->vtype != TYCHAR || np->vdim && !pp->argsp)) + sserr(np); + if(np->vstg == STGCOMMON) + extsymtab[np->vardesc.varno].extinit = YES; + else if(np->vstg==STGEQUIV) + eqvclass[np->vardesc.varno].eqvinit = YES; + else if(np->vstg!=STGINIT && np->vstg!=STGBSS) { + errstr(np->vstg == STGARG + ? "Dummy argument \"%.60s\" in data statement." + : "Cannot give data to \"%.75s\"", + np->fvarname); + yyval.chval = 0; + err_lineno = lineno; + break; + } + yyval.chval = mkchain((char *)yyvsp[0].expval, CHNULL); + } +break; +case 108: +#line 657 "gram.y" + { chainp p; struct Impldoblock *q; + pop_datastack(); + q = ALLOC(Impldoblock); + q->tag = TIMPLDO; + (q->varnp = (Namep) (yyvsp[-1].chval->datap))->vimpldovar = 1; + p = yyvsp[-1].chval->nextp; + if(p) { q->implb = (expptr)(p->datap); p = p->nextp; } + if(p) { q->impub = (expptr)(p->datap); p = p->nextp; } + if(p) { q->impstep = (expptr)(p->datap); } + frchain( & (yyvsp[-1].chval) ); + yyval.chval = mkchain((char *)q, CHNULL); + q->datalist = hookup(yyvsp[-3].chval, yyval.chval); + } +break; +case 109: +#line 673 "gram.y" + { if (!datastack) + curdtp = 0; + datastack = mkchain((char *)curdtp, datastack); + curdtp = yyvsp[0].chval; curdtelt = 0; + } +break; +case 110: +#line 679 "gram.y" + { yyval.chval = hookup(yyvsp[-2].chval, yyvsp[0].chval); } +break; +case 111: +#line 683 "gram.y" + { ndim = 0; } +break; +case 113: +#line 687 "gram.y" + { ndim = 0; } +break; +case 116: +#line 692 "gram.y" + { + if(ndim == maxdim) + err("too many dimensions"); + else if(ndim < maxdim) + { dims[ndim].lb = 0; + dims[ndim].ub = yyvsp[0].expval; + } + ++ndim; + } +break; +case 117: +#line 702 "gram.y" + { + if(ndim == maxdim) + err("too many dimensions"); + else if(ndim < maxdim) + { dims[ndim].lb = yyvsp[-2].expval; + dims[ndim].ub = yyvsp[0].expval; + } + ++ndim; + } +break; +case 118: +#line 714 "gram.y" + { yyval.expval = 0; } +break; +case 120: +#line 719 "gram.y" + { nstars = 1; labarray[0] = yyvsp[0].labval; } +break; +case 121: +#line 721 "gram.y" + { if(nstars < maxlablist) labarray[nstars++] = yyvsp[0].labval; } +break; +case 122: +#line 725 "gram.y" + { yyval.labval = execlab( convci(toklen, token) ); } +break; +case 123: +#line 729 "gram.y" + { NO66("IMPLICIT statement"); } +break; +case 126: +#line 735 "gram.y" + { if (vartype != TYUNKNOWN) + dclerr("-- expected letter range",NPNULL); + setimpl(vartype, varleng, 'a', 'z'); } +break; +case 127: +#line 740 "gram.y" + { needkwd = 1; } +break; +case 131: +#line 749 "gram.y" + { setimpl(vartype, varleng, yyvsp[0].ival, yyvsp[0].ival); } +break; +case 132: +#line 751 "gram.y" + { setimpl(vartype, varleng, yyvsp[-2].ival, yyvsp[0].ival); } +break; +case 133: +#line 755 "gram.y" + { if(toklen!=1 || token[0]<'a' || token[0]>'z') + { + dclerr("implicit item must be single letter", NPNULL); + yyval.ival = 0; + } + else yyval.ival = token[0]; + } +break; +case 136: +#line 769 "gram.y" + { + if(yyvsp[-2].namval->vclass == CLUNKNOWN) + { + yyvsp[-2].namval->vclass = CLNAMELIST; + yyvsp[-2].namval->vtype = TYINT; + yyvsp[-2].namval->vstg = STGBSS; + yyvsp[-2].namval->varxptr.namelist = yyvsp[0].chval; + yyvsp[-2].namval->vardesc.varno = ++lastvarno; + } + else dclerr("cannot be a namelist name", yyvsp[-2].namval); + } +break; +case 137: +#line 783 "gram.y" + { yyval.chval = mkchain((char *)yyvsp[0].namval, CHNULL); } +break; +case 138: +#line 785 "gram.y" + { yyval.chval = hookup(yyvsp[-2].chval, mkchain((char *)yyvsp[0].namval, CHNULL)); } +break; +case 139: +#line 789 "gram.y" + { switch(parstate) + { + case OUTSIDE: newproc(); + startproc(ESNULL, CLMAIN); + case INSIDE: parstate = INDCL; + case INDCL: break; + + case INDATA: + if (datagripe) { + errstr( + "Statement order error: declaration after DATA", + CNULL); + datagripe = 0; + } + break; + + default: + dclerr("declaration among executables", NPNULL); + } + } +break; +case 140: +#line 811 "gram.y" + { yyval.chval = 0; } +break; +case 141: +#line 813 "gram.y" + { yyval.chval = revchain(yyvsp[0].chval); } +break; +case 142: +#line 817 "gram.y" + { yyval.chval = mkchain((char *)yyvsp[0].expval, CHNULL); } +break; +case 143: +#line 819 "gram.y" + { yyval.chval = mkchain((char *)yyvsp[0].expval, yyvsp[-2].chval); } +break; +case 145: +#line 824 "gram.y" + { yyval.expval = yyvsp[-1].expval; if (yyval.expval->tag == TPRIM) + paren_used(&yyval.expval->primblock); } +break; +case 149: +#line 832 "gram.y" + { yyval.expval = mkexpr(yyvsp[-1].ival, yyvsp[-2].expval, yyvsp[0].expval); } +break; +case 150: +#line 834 "gram.y" + { yyval.expval = mkexpr(OPSTAR, yyvsp[-2].expval, yyvsp[0].expval); } +break; +case 151: +#line 836 "gram.y" + { yyval.expval = mkexpr(OPSLASH, yyvsp[-2].expval, yyvsp[0].expval); } +break; +case 152: +#line 838 "gram.y" + { yyval.expval = mkexpr(OPPOWER, yyvsp[-2].expval, yyvsp[0].expval); } +break; +case 153: +#line 840 "gram.y" + { if(yyvsp[-1].ival == OPMINUS) + yyval.expval = mkexpr(OPNEG, yyvsp[0].expval, ENULL); + else { + yyval.expval = yyvsp[0].expval; + if (yyval.expval->tag == TPRIM) + paren_used(&yyval.expval->primblock); + } + } +break; +case 154: +#line 849 "gram.y" + { yyval.expval = mkexpr(yyvsp[-1].ival, yyvsp[-2].expval, yyvsp[0].expval); } +break; +case 155: +#line 851 "gram.y" + { NO66(".EQV. operator"); + yyval.expval = mkexpr(OPEQV, yyvsp[-2].expval,yyvsp[0].expval); } +break; +case 156: +#line 854 "gram.y" + { NO66(".NEQV. operator"); + yyval.expval = mkexpr(OPNEQV, yyvsp[-2].expval, yyvsp[0].expval); } +break; +case 157: +#line 857 "gram.y" + { yyval.expval = mkexpr(OPOR, yyvsp[-2].expval, yyvsp[0].expval); } +break; +case 158: +#line 859 "gram.y" + { yyval.expval = mkexpr(OPAND, yyvsp[-2].expval, yyvsp[0].expval); } +break; +case 159: +#line 861 "gram.y" + { yyval.expval = mkexpr(OPNOT, yyvsp[0].expval, ENULL); } +break; +case 160: +#line 863 "gram.y" + { NO66("concatenation operator //"); + yyval.expval = mkexpr(OPCONCAT, yyvsp[-2].expval, yyvsp[0].expval); } +break; +case 161: +#line 867 "gram.y" + { yyval.ival = OPPLUS; } +break; +case 162: +#line 868 "gram.y" + { yyval.ival = OPMINUS; } +break; +case 163: +#line 871 "gram.y" + { yyval.ival = OPEQ; } +break; +case 164: +#line 872 "gram.y" + { yyval.ival = OPGT; } +break; +case 165: +#line 873 "gram.y" + { yyval.ival = OPLT; } +break; +case 166: +#line 874 "gram.y" + { yyval.ival = OPGE; } +break; +case 167: +#line 875 "gram.y" + { yyval.ival = OPLE; } +break; +case 168: +#line 876 "gram.y" + { yyval.ival = OPNE; } +break; +case 169: +#line 880 "gram.y" + { yyval.expval = mkprim(yyvsp[0].namval, LBNULL, CHNULL); } +break; +case 170: +#line 882 "gram.y" + { NO66("substring operator :"); + yyval.expval = mkprim(yyvsp[-1].namval, LBNULL, yyvsp[0].chval); } +break; +case 171: +#line 885 "gram.y" + { yyval.expval = mkprim(yyvsp[-3].namval, mklist(yyvsp[-1].chval), CHNULL); } +break; +case 172: +#line 887 "gram.y" + { NO66("substring operator :"); + yyval.expval = mkprim(yyvsp[-4].namval, mklist(yyvsp[-2].chval), yyvsp[0].chval); } +break; +case 173: +#line 892 "gram.y" + { yyval.chval = mkchain((char *)yyvsp[-3].expval, mkchain((char *)yyvsp[-1].expval,CHNULL)); } +break; +case 174: +#line 896 "gram.y" + { yyval.expval = 0; } +break; +case 176: +#line 901 "gram.y" + { if(yyvsp[0].namval->vclass == CLPARAM) + yyval.expval = (expptr) cpexpr( + ( (struct Paramblock *) (yyvsp[0].namval) ) -> paramval); + } +break; +case 178: +#line 908 "gram.y" + { yyval.expval = mklogcon(1); } +break; +case 179: +#line 909 "gram.y" + { yyval.expval = mklogcon(0); } +break; +case 180: +#line 910 "gram.y" + { yyval.expval = mkstrcon(toklen, token); } +break; +case 181: +#line 911 "gram.y" + { yyval.expval = mkintqcon(toklen, token); } +break; +case 182: +#line 912 "gram.y" + { yyval.expval = mkrealcon(tyreal, token); } +break; +case 183: +#line 913 "gram.y" + { yyval.expval = mkrealcon(TYDREAL, token); } +break; +case 185: +#line 918 "gram.y" + { yyval.expval = mkcxcon(yyvsp[-3].expval,yyvsp[-1].expval); } +break; +case 186: +#line 922 "gram.y" + { NOEXT("hex constant"); + yyval.expval = mkbitcon(4, toklen, token); } +break; +case 187: +#line 925 "gram.y" + { NOEXT("octal constant"); + yyval.expval = mkbitcon(3, toklen, token); } +break; +case 188: +#line 928 "gram.y" + { NOEXT("binary constant"); + yyval.expval = mkbitcon(1, toklen, token); } +break; +case 190: +#line 934 "gram.y" + { yyval.expval = yyvsp[-1].expval; } +break; +case 193: +#line 940 "gram.y" + { yyval.expval = mkexpr(yyvsp[-1].ival, yyvsp[-2].expval, yyvsp[0].expval); } +break; +case 194: +#line 942 "gram.y" + { yyval.expval = mkexpr(OPSTAR, yyvsp[-2].expval, yyvsp[0].expval); } +break; +case 195: +#line 944 "gram.y" + { yyval.expval = mkexpr(OPSLASH, yyvsp[-2].expval, yyvsp[0].expval); } +break; +case 196: +#line 946 "gram.y" + { yyval.expval = mkexpr(OPPOWER, yyvsp[-2].expval, yyvsp[0].expval); } +break; +case 197: +#line 948 "gram.y" + { if(yyvsp[-1].ival == OPMINUS) + yyval.expval = mkexpr(OPNEG, yyvsp[0].expval, ENULL); + else yyval.expval = yyvsp[0].expval; + } +break; +case 198: +#line 953 "gram.y" + { NO66("concatenation operator //"); + yyval.expval = mkexpr(OPCONCAT, yyvsp[-2].expval, yyvsp[0].expval); } +break; +case 200: +#line 958 "gram.y" + { + if(yyvsp[-2].labval->labdefined) + execerr("no backward DO loops", CNULL); + yyvsp[-2].labval->blklevel = blklevel+1; + exdo(yyvsp[-2].labval->labelno, NPNULL, yyvsp[0].chval); + } +break; +case 201: +#line 965 "gram.y" + { + exdo((int)(ctls - ctlstack - 2), NPNULL, yyvsp[0].chval); + NOEXT("DO without label"); + } +break; +case 202: +#line 970 "gram.y" + { exenddo(NPNULL); } +break; +case 203: +#line 972 "gram.y" + { exendif(); thiswasbranch = NO; } +break; +case 205: +#line 974 "gram.y" + {westart(1);} +break; +case 206: +#line 975 "gram.y" + { exelif(yyvsp[-2].expval); lastwasbranch = NO; } +break; +case 207: +#line 977 "gram.y" + { exelse(); lastwasbranch = NO; } +break; +case 208: +#line 979 "gram.y" + { exendif(); lastwasbranch = NO; } +break; +case 209: +#line 983 "gram.y" + { exif(yyvsp[-1].expval); } +break; +case 210: +#line 987 "gram.y" + { yyval.chval = mkchain((char *)yyvsp[-2].namval, yyvsp[0].chval); } +break; +case 212: +#line 991 "gram.y" + {westart(0);} +break; +case 213: +#line 992 "gram.y" + { yyval.chval = mkchain(CNULL, (chainp)yyvsp[-1].expval); } +break; +case 214: +#line 996 "gram.y" + { exequals((struct Primblock *)yyvsp[-2].expval, yyvsp[0].expval); } +break; +case 215: +#line 998 "gram.y" + { exassign(yyvsp[0].namval, yyvsp[-2].labval); } +break; +case 218: +#line 1002 "gram.y" + { inioctl = NO; } +break; +case 219: +#line 1004 "gram.y" + { exarif(yyvsp[-6].expval, yyvsp[-4].labval, yyvsp[-2].labval, yyvsp[0].labval); thiswasbranch = YES; } +break; +case 220: +#line 1006 "gram.y" + { excall(yyvsp[0].namval, LBNULL, 0, labarray); } +break; +case 221: +#line 1008 "gram.y" + { excall(yyvsp[-2].namval, LBNULL, 0, labarray); } +break; +case 222: +#line 1010 "gram.y" + { if(nstars < maxlablist) + excall(yyvsp[-3].namval, mklist(revchain(yyvsp[-1].chval)), nstars, labarray); + else + many("alternate returns", 'l', maxlablist); + } +break; +case 223: +#line 1016 "gram.y" + { exreturn(yyvsp[0].expval); thiswasbranch = YES; } +break; +case 224: +#line 1018 "gram.y" + { exstop(yyvsp[-2].ival, yyvsp[0].expval); thiswasbranch = yyvsp[-2].ival; } +break; +case 225: +#line 1022 "gram.y" + { yyval.labval = mklabel( convci(toklen, token) ); } +break; +case 226: +#line 1026 "gram.y" + { if(parstate == OUTSIDE) + { + newproc(); + startproc(ESNULL, CLMAIN); + } + } +break; +case 227: +#line 1035 "gram.y" + { exgoto(yyvsp[0].labval); thiswasbranch = YES; } +break; +case 228: +#line 1037 "gram.y" + { exasgoto(yyvsp[0].namval); thiswasbranch = YES; } +break; +case 229: +#line 1039 "gram.y" + { exasgoto(yyvsp[-4].namval); thiswasbranch = YES; } +break; +case 230: +#line 1041 "gram.y" + { if(nstars < maxlablist) + putcmgo(putx(fixtype(yyvsp[0].expval)), nstars, labarray); + else + many("labels in computed GOTO list", 'l', maxlablist); + } +break; +case 233: +#line 1053 "gram.y" + { nstars = 0; yyval.namval = yyvsp[0].namval; } +break; +case 234: +#line 1057 "gram.y" + { yyval.chval = yyvsp[0].expval ? mkchain((char *)yyvsp[0].expval,CHNULL) : CHNULL; } +break; +case 235: +#line 1059 "gram.y" + { yyval.chval = yyvsp[0].expval ? mkchain((char *)yyvsp[0].expval, yyvsp[-2].chval) : yyvsp[-2].chval; } +break; +case 237: +#line 1064 "gram.y" + { if(nstars < maxlablist) labarray[nstars++] = yyvsp[0].labval; yyval.expval = 0; } +break; +case 238: +#line 1068 "gram.y" + { yyval.ival = 0; } +break; +case 239: +#line 1070 "gram.y" + { yyval.ival = 2; } +break; +case 240: +#line 1074 "gram.y" + { yyval.chval = mkchain((char *)yyvsp[0].expval, CHNULL); } +break; +case 241: +#line 1076 "gram.y" + { yyval.chval = hookup(yyvsp[-2].chval, mkchain((char *)yyvsp[0].expval,CHNULL) ); } +break; +case 242: +#line 1080 "gram.y" + { if(parstate == OUTSIDE) + { + newproc(); + startproc(ESNULL, CLMAIN); + } + +/* This next statement depends on the ordering of the state table encoding */ + + if(parstate < INDATA) enddcl(); + } +break; +case 243: +#line 1093 "gram.y" + { intonly = YES; } +break; +case 244: +#line 1097 "gram.y" + { intonly = NO; } +break; +case 245: +#line 1102 "gram.y" + { endio(); } +break; +case 247: +#line 1107 "gram.y" + { ioclause(IOSUNIT, yyvsp[0].expval); endioctl(); } +break; +case 248: +#line 1109 "gram.y" + { ioclause(IOSUNIT, ENULL); endioctl(); } +break; +case 249: +#line 1111 "gram.y" + { ioclause(IOSUNIT, IOSTDERR); endioctl(); } +break; +case 251: +#line 1114 "gram.y" + { doio(CHNULL); } +break; +case 252: +#line 1116 "gram.y" + { doio(CHNULL); } +break; +case 253: +#line 1118 "gram.y" + { doio(revchain(yyvsp[0].chval)); } +break; +case 254: +#line 1120 "gram.y" + { doio(revchain(yyvsp[0].chval)); } +break; +case 255: +#line 1122 "gram.y" + { doio(revchain(yyvsp[0].chval)); } +break; +case 256: +#line 1124 "gram.y" + { doio(CHNULL); } +break; +case 257: +#line 1126 "gram.y" + { doio(revchain(yyvsp[0].chval)); } +break; +case 258: +#line 1128 "gram.y" + { doio(revchain(yyvsp[0].chval)); } +break; +case 259: +#line 1130 "gram.y" + { doio(CHNULL); } +break; +case 260: +#line 1132 "gram.y" + { doio(revchain(yyvsp[0].chval)); } +break; +case 262: +#line 1139 "gram.y" + { iostmt = IOBACKSPACE; } +break; +case 263: +#line 1141 "gram.y" + { iostmt = IOREWIND; } +break; +case 264: +#line 1143 "gram.y" + { iostmt = IOENDFILE; } +break; +case 266: +#line 1150 "gram.y" + { iostmt = IOINQUIRE; } +break; +case 267: +#line 1152 "gram.y" + { iostmt = IOOPEN; } +break; +case 268: +#line 1154 "gram.y" + { iostmt = IOCLOSE; } +break; +case 269: +#line 1158 "gram.y" + { + ioclause(IOSUNIT, ENULL); + ioclause(IOSFMT, yyvsp[0].expval); + endioctl(); + } +break; +case 270: +#line 1164 "gram.y" + { + ioclause(IOSUNIT, ENULL); + ioclause(IOSFMT, ENULL); + endioctl(); + } +break; +case 271: +#line 1172 "gram.y" + { + ioclause(IOSUNIT, yyvsp[-1].expval); + endioctl(); + } +break; +case 272: +#line 1177 "gram.y" + { endioctl(); } +break; +case 275: +#line 1185 "gram.y" + { ioclause(IOSPOSITIONAL, yyvsp[0].expval); } +break; +case 276: +#line 1187 "gram.y" + { ioclause(IOSPOSITIONAL, ENULL); } +break; +case 277: +#line 1189 "gram.y" + { ioclause(IOSPOSITIONAL, IOSTDERR); } +break; +case 278: +#line 1191 "gram.y" + { ioclause(yyvsp[-1].ival, yyvsp[0].expval); } +break; +case 279: +#line 1193 "gram.y" + { ioclause(yyvsp[-1].ival, ENULL); } +break; +case 280: +#line 1195 "gram.y" + { ioclause(yyvsp[-1].ival, IOSTDERR); } +break; +case 281: +#line 1199 "gram.y" + { yyval.ival = iocname(); } +break; +case 282: +#line 1203 "gram.y" + { iostmt = IOREAD; } +break; +case 283: +#line 1207 "gram.y" + { iostmt = IOWRITE; } +break; +case 284: +#line 1211 "gram.y" + { + iostmt = IOWRITE; + ioclause(IOSUNIT, ENULL); + ioclause(IOSFMT, yyvsp[-1].expval); + endioctl(); + } +break; +case 285: +#line 1218 "gram.y" + { + iostmt = IOWRITE; + ioclause(IOSUNIT, ENULL); + ioclause(IOSFMT, ENULL); + endioctl(); + } +break; +case 286: +#line 1227 "gram.y" + { yyval.chval = mkchain((char *)yyvsp[0].tagval, CHNULL); } +break; +case 287: +#line 1229 "gram.y" + { yyval.chval = mkchain((char *)yyvsp[0].tagval, yyvsp[-2].chval); } +break; +case 288: +#line 1233 "gram.y" + { yyval.tagval = (tagptr) yyvsp[0].expval; } +break; +case 289: +#line 1235 "gram.y" + { yyval.tagval = (tagptr) mkiodo(yyvsp[-1].chval,revchain(yyvsp[-3].chval)); } +break; +case 290: +#line 1239 "gram.y" + { yyval.chval = mkchain((char *)yyvsp[0].expval, CHNULL); } +break; +case 291: +#line 1241 "gram.y" + { yyval.chval = mkchain((char *)yyvsp[0].tagval, CHNULL); } +break; +case 293: +#line 1246 "gram.y" + { yyval.chval = mkchain((char *)yyvsp[0].expval, mkchain((char *)yyvsp[-2].expval, CHNULL) ); } +break; +case 294: +#line 1248 "gram.y" + { yyval.chval = mkchain((char *)yyvsp[0].tagval, mkchain((char *)yyvsp[-2].expval, CHNULL) ); } +break; +case 295: +#line 1250 "gram.y" + { yyval.chval = mkchain((char *)yyvsp[0].expval, mkchain((char *)yyvsp[-2].tagval, CHNULL) ); } +break; +case 296: +#line 1252 "gram.y" + { yyval.chval = mkchain((char *)yyvsp[0].tagval, mkchain((char *)yyvsp[-2].tagval, CHNULL) ); } +break; +case 297: +#line 1254 "gram.y" + { yyval.chval = mkchain((char *)yyvsp[0].expval, yyvsp[-2].chval); } +break; +case 298: +#line 1256 "gram.y" + { yyval.chval = mkchain((char *)yyvsp[0].tagval, yyvsp[-2].chval); } +break; +case 299: +#line 1260 "gram.y" + { yyval.tagval = (tagptr) yyvsp[0].expval; } +break; +case 300: +#line 1262 "gram.y" + { yyval.tagval = (tagptr) yyvsp[-1].expval; } +break; +case 301: +#line 1264 "gram.y" + { yyval.tagval = (tagptr) mkiodo(yyvsp[-1].chval, mkchain((char *)yyvsp[-3].expval, CHNULL) ); } +break; +case 302: +#line 1266 "gram.y" + { yyval.tagval = (tagptr) mkiodo(yyvsp[-1].chval, mkchain((char *)yyvsp[-3].tagval, CHNULL) ); } +break; +case 303: +#line 1268 "gram.y" + { yyval.tagval = (tagptr) mkiodo(yyvsp[-1].chval, revchain(yyvsp[-3].chval)); } +break; +case 304: +#line 1272 "gram.y" + { startioctl(); } +break; +#line 2702 "gram.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 >= yysslim && yygrowstack(&yyss, &yyssp, + &yysslim, &yyvs, &yyvsp, &yystacksize)) + { + goto yyoverflow; + } + *++yyssp = (short) yystate; + *++yyvsp = yyval; + goto yyloop; + +yyoverflow: + yyerror("yacc stack overflow"); + +yyabort: + free(yyss); + free(yyvs); + return (1); + +yyaccept: + free(yyss); + free(yyvs); + return (0); +} |