diff --git a/usr.bin/awk/Makefile b/usr.bin/awk/Makefile new file mode 100644 index 0000000..40cabcc --- /dev/null +++ b/usr.bin/awk/Makefile @@ -0,0 +1,64 @@ +# +# This makefile is intended for use with dmake(1) on Apple IIGS +# $Id: Makefile,v 1.1 1998/04/07 16:13:04 tribby Exp $ +# +# Created by Dave Tribby, January 1998 + +# -------------------------------------------------------------------- +# NOTE: the original Bell Labs package uses yacc (or bison) to compile +# awkgram.y into ytab.c and ytab.h. It compiles maketab.c into +# the program maketab, and produces proctab.c using maketab and +# ytab.h. I chose to create ytab.c, ytab.h, and proctab.c on a +# Unix system and bring them to the Apple IIGS, since I don't +# use yacc or bison on my GS. This makefile could be modified +# to include these additional steps. If necessary, remove the +# "#" from the beginning of the following lines and move them +# to the end of this Makefile. +#OBJS += maketab maketab.o +#YFLAGS += -d +#ytab.h: awk.h proto.h awkgram.y +# $(YACC) $(YFLAGS) awkgram.y +# mv y.tab.c ytab.c +# mv y.tab.h ytab.h +# +#proctab.c: maketab +# $(OBJ_DIR)maketab >proctab.c +# +#maketab.o: ytab.h maketab.c +# $(CC) -o $@ $(CFLAGS:s/ -r / /) -a0 -c maketab.c +# +#maketab: maketab.o +# $(CC) -o $(OBJ_DIR)$@ $(LDFLAGS) $< $(LDLIBS) +# -------------------------------------------------------------------- + +# Default stack size (can be overridden by cmd line) +# This value have been tested and certified as working, although +# even more may be required for deeply recursive awk programs +STACK *= 4096 + +# Program name +PROG= awk +MAIN= main + +# Source files +# Compile main program first, then in size order since ORCA/C +# can run out of memory if run.c is compiled last +SRCS= main.c run.c ytab.c b.c lib.c lex.c tran.c parse.c proctab.c + +# Deliver to /usr/bin +BINDIR = /usr/bin + +.INCLUDE : /src/gno/prog.mk + +# +# Additional dependancies +# +main.o: awk.h proto.h ytab.h +b.o: awk.h proto.h ytab.h +parse.o: awk.h proto.h ytab.h +lib.o: awk.h proto.h ytab.h +run.o: awk.h proto.h ytab.h +tran.o: awk.h proto.h ytab.h +ytab.o: awk.h proto.h +lex.o: awk.h proto.h +proctab.o: awk.h proto.h diff --git a/usr.bin/awk/README.gno b/usr.bin/awk/README.gno new file mode 100644 index 0000000..0bd5d04 --- /dev/null +++ b/usr.bin/awk/README.gno @@ -0,0 +1,139 @@ + ========================================================== + AWK Version 2.0: Updated for GNO/ME 2.0.6 + $Id: README.gno,v 1.1 1998/04/07 16:13:08 tribby Exp $ + ========================================================== + +AWK is a powerful string processing language that is widely used in the Unix +world. Jawaid Bazyar, the "father" of GNO/ME, created version 1.00 in +December 1994 by porting scource code available to the public from Bell Labs +(then part of AT&T; now part of Lucent Technologies). The code remains +available on Brian W. Kernighan's Web page at URL + http://plan9.bell-labs.com/who/bwk/awk.tar.gz + +In addition to adding GNO/ME 2.0.6 compatibility, version 2.0 +picks up the latest enhancements and defect fixes from Bell Labs. +(AWK 1.0 was based upon July 1993 code; 2.0 is based upon code +completed in February 1998.) + +While this version of AWK has been tested against dozens of sample +AWK programs, its extensive feature set makes exhaustive testing very +difficult. It is certainly conceivable that bugs were introduced by the +porting process; if you find one, please let me know. + + +========== +Compiling +========= +This package requires the GNO/ME 2.0.6, ORCA/C 2.1, dmake, and occ. +The Makefile uses the standard GNO/ME 2.0.6 declaration files. + +The Bell Labs package uses yacc (or bison) to compile awkgram.y to ytab.c +and ytab.h. The program maketab then uses ytab.h to produce proctab.c +For the 2.0 delivery of GNO, I did not compile awkgram.y or proctab.c +on the Apple IIGS but instead produced these on an HP-UX workstation. +Note: the ytab.c shipped with the Bell Labs code uses integers starting at +57346 to represent the symbol definitions, which causes problems for ORCA/C. +The version generated under HP-UX starts with 257. + +================================== +Changes To Make AWK Work Under GNO +================================== +The majority of original changes required to make AWK work on the +Apple IIGS involved replacing large procedure-local (stack-based) +arrays and data structures with a call to malloc() at the beginning +of the function and a call to free() at the end. Between 1993 and 1998, +the Bell Labs source code evolved to remove many of the local arrays, +and fewer changes were needed to port the latest version. + +In all cases, the original C code was left in place in parallel to the +new code, with #ifdef directives selecting the appropriate version. + +The version 1.00 changes were: + (1) Reduce the size of the data structure (in the case of an array + of possible open file pointers; reduce the system's FOPEN_MAX + from 32768 to 40 by redefining it (in "run.c"). + (2) Allocate all large local structures via malloc() and free. + (in "run.c") + (3) Set the IIGS OMF load segment names, since AWK is bigger than + 64K and the code must therefore be segmented. + (4) In main.c, signal(SIGFPE,fpecatch) was removed, because the + IIGS floating point libraries don't send signals on floating + point exceptions. + +Version 2.0 changes fall into several categories -- + +Due to changes in the way AWK allocates buffers, and the ORCA/C math.h +header files, several of the changes Jawaid Bazyar introduced were no +longer needed: + + - Most of the buffer allocation/deallocation code was already in + the latest Bell Labs code. [run.c] + + - Due to declaration in math.h of modf(double, double*), in + several declarations int variables changed back to double, and + type casting "(extended)" was removed. [tran.c, run.c] + +There were a few changes for compatibility with GNO/ME 2.0.6. These +were marked with "#ifdef __GNO__" to differentiate GNO changes from +ORCA/C changes (see below). + + - Declaration of initenv() was removed and the call to initenv() + was changed to environInit(). [main.c] + + - Removed unnecessary unprototyped declarations. [ytab.c] + + - Added code to check for stack space when __STACK_CHECK__ + is definef [main.c] + + - Hash function required unsigned long (rather than unsigned) + intermediate value [tran.c] + + - One module had to be broken into two segments, in order to + accomodate generated code under full debug mode [run.c] + + - External nodestat is declared but never defined or used; this + caused a link error when using full debug mode [awk.h] + + - Added ID of 2.0 when printing version [main.c] + + - A make file compatible with dmake and the GNO development + environment was created [Makefile]. + + - Resources for version information and descriptive comment were + added [awk.rez]. + + - Database entry for desc utility was added. [rez.desc] + +C code translated to assembly language for performance improvement +is marked with "#if defined(__NOASM__) || !defined(__ORCAC__)". If +necessary to test with the C code rather than assembly, define the +macro __NOASM__. + + - The routine hash() was recoded, resulting in a 10% performance + boost [tran.c]. + +Instances of defects in the ORCA/C compiler that required code +modification for successful compilation (marked with #ifndef __ORCAC__) + + - ORCA/C 2.1.0 reports a type conflict for the code segment + fp = strcmp(s, "-") == 0 ? stdin : fopen(s, "r"); + so different, equivalent code was used. [run.c] + + - ORCA/C 2.1.0 could not parse string.h after macro declarations, + so #include was moved before declarations. [lex.c] + +When required to pass lint, headers were modified to be prototyped +(marked with #ifndef __STDC__) [lex.c, ytab.c] + +Due to the way the C source code debuggers work, it was necessary to +comment out all "#line" directives in ytab.c. + +================== +Author Information +================== +Version 1.00, December 1994: + Jawaid Bazyar + +Version 2.0, March 1998: + Dave Tribby + tribby@cup.hp.com diff --git a/usr.bin/awk/awk.1 b/usr.bin/awk/awk.1 index 6119613..a86fde3 100644 --- a/usr.bin/awk/awk.1 +++ b/usr.bin/awk/awk.1 @@ -1,15 +1,9 @@ -.de EX -.nf -.ft CW -.. -.de EE -.br -.fi -.ft 1 -.. -awk -.TH AWK 1 -.CT 1 files prog_other +.\" awk man page, taken from the download available on Brian Kernighan's +.\" Web page at Bell Labs (Lucent Technologies); February 1998 version. +.\" +.\" Modified for GNO/ME 2.0.6 by Dave Tribby +.\" $Id: awk.1,v 1.3 1998/04/07 16:13:11 tribby Exp $ +.TH AWK 1 "March 1998" "GNO" "Commands and Applications" .SH NAME awk \- pattern-directed scanning and processing language .SH SYNOPSIS @@ -101,10 +95,8 @@ An action is a sequence of statements. A statement can be one of the following: .PP .EX -.ta \w'\f(CWdelete array[expression]'u .RS .nf -.ft CW if(\fI expression \fP)\fI statement \fP\fR[ \fPelse\fI statement \fP\fR]\fP while(\fI expression \fP)\fI statement\fP for(\fI expression \fP;\fI expression \fP;\fI expression \fP)\fI statement\fP @@ -124,8 +116,6 @@ delete\fI array\fP #\fR delete all elements of array\fP exit\fR [ \fP\fIexpression \fP\fR]\fP #\fR exit immediately; status is \fP\fIexpression\fP .fi .RE -.EE -.DT .PP Statements are terminated by semicolons, newlines or right braces. @@ -133,7 +123,7 @@ An empty .I expression-list stands for .BR $0 . -String constants are quoted \&\f(CW"\ "\fR, +String constants are quoted \&\fB"\fR\ \fB"\fR, with the usual C escapes recognized within. Expressions take on string or numeric values as appropriate, and are built using the operators @@ -198,7 +188,6 @@ and .BR atan2 are built in. Other built-in functions: -.TF length .TP .B length the length of its argument @@ -313,7 +302,6 @@ returns a copy of .I str with all lower-case characters translated to their corresponding upper-case equivalents. -.PD .PP The ``function'' .B getline @@ -375,13 +363,13 @@ though an occurrence of the second. .PP A relational expression is one of the following: .IP -.I expression matchop regular-expression +.IR expression " " matchop " " regular-expression .br -.I expression relop expression +.IR expression " " relop " " expression .br -.IB expression " in " array-name +.IR expression " in " array-name .br -.BI ( expr , expr,... ") in " array-name +.RI ( expr , expr,... ") in " array-name .PP where a relop is any of the six relational operators in C, and a matchop is either @@ -407,7 +395,6 @@ and do not combine with other patterns. .PP Variable names with special meanings: -.TF FILENAME .TP .B CONVFMT conversion format used when converting numbers @@ -456,7 +443,6 @@ non-null members are taken as filenames .TP .B ENVIRON array of environment variables; subscripts are names. -.PD .PP Functions may be defined (at the position of a pattern-action statement) thus: .IP @@ -472,35 +458,28 @@ the function definition. .TP .EX length($0) > 72 -.EE +.PP Print lines longer than 72 characters. .TP .EX { print $2, $1 } -.EE +.IP Print first two fields in opposite order. .PP .EX BEGIN { FS = ",[ \et]*|[ \et]+" } { print $2, $1 } -.EE -.ns .IP Same, with input fields separated by comma and/or blanks and tabs. .PP .EX -.nf { s += $1 } END { print "sum is", s, " average is", s/NR } -.fi -.EE -.ns .IP Add up first column, print sum and average. .TP .EX /start/, /stop/ -.EE Print all lines between start/stop pairs. .PP .EX @@ -510,7 +489,6 @@ BEGIN { # Simulate echo(1) printf "\en" exit } .fi -.EE .SH SEE ALSO .IR lex (1), .IR sed (1) @@ -519,11 +497,28 @@ A. V. Aho, B. W. Kernighan, P. J. Weinberger, .I The AWK Programming Language, Addison-Wesley, 1988. ISBN 0-201-07981-X +.SH VERSION +This manual page documents GNO/ME +.BR awk +version 2.0, based upon Lucent Technologies version 980211. +.SH ATTRIBUTIONS +This command was ported for distribution with GNO/ME 2.0.6 +from source code made available via the Web page of Brian +Kernighan at Bell Labs (Lucent Technologies). +.SH HISTORY +GNO/ME version 1.0 (December 1994) of +.BR awk +was translated from Bell Labs source code +(version July 23, 1993) by Jawaid Bazyar +and distributed as a separate archive. .SH BUGS There are no explicit conversions between numbers and strings. To force an expression to be treated as a number add 0 to it; -to force it to be treated as a string concatenate -\&\f(CW""\fP to it. +to force it to be treated as a string concatenate \fB""\fP to it. .br The scope rules for variables in functions are a botch; the syntax is worse. +.br +This GNO version has 4096 bytes of stack space allocated. This should +be enough for most cases, but extreme recursion in an awk script can cause +heavy stack usage and progam failure. diff --git a/usr.bin/awk/awk.desc b/usr.bin/awk/awk.desc new file mode 100644 index 0000000..de90a3b --- /dev/null +++ b/usr.bin/awk/awk.desc @@ -0,0 +1,10 @@ +Name: awk +Version: 2.0 (March 1998) +Shell: GNO +Author: Jawaid Bazyar (from Bell Labs code; updated by Dave Tribby) +Contact: tribby@cup.hp.com +Where: /usr/bin +FTP: ground.isca.uiowa.edu apple2.caltech.edu trenco.myrias.com + + Pattern-directed scanning and processing language. + diff --git a/usr.bin/awk/awk.h b/usr.bin/awk/awk.h index 97c5ad3..80c05c9 100644 --- a/usr.bin/awk/awk.h +++ b/usr.bin/awk/awk.h @@ -22,6 +22,8 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ +/* $Id: awk.h,v 1.2 1998/04/07 16:13:18 tribby Exp $ */ + typedef double Awkfloat; /* unsigned char is more trouble than it's worth */ @@ -142,7 +144,9 @@ typedef struct Node { #define NIL ((Node *) 0) extern Node *winner; +#ifndef __GNO__ /* nullstat not used/defined; causes debugger problems */ extern Node *nullstat; +#endif extern Node *nullnode; /* ctypes */ diff --git a/usr.bin/awk/awk.rez b/usr.bin/awk/awk.rez new file mode 100644 index 0000000..57662a0 --- /dev/null +++ b/usr.bin/awk/awk.rez @@ -0,0 +1,30 @@ +/* + * Resources for version and comment + * $Id: awk.rez,v 1.1 1998/04/07 16:13:21 tribby Exp $ + */ +#define PROG "awk" +#define DESC "Pattern-directed scanning and processing language." + +#include "Types.rez" + +/* + * Version + */ +resource rVersion (1, purgeable3) { + { 2, 0, 0, /* Version 2.0.0 */ + release, /* development|alpha|beta|final|release */ + 0 }, /* non-final release number */ + verUS, /* Country */ + PROG, /* Program name */ + DESC +}; + + +/* + * Comment + */ +resource rComment (1, purgeable3) { + PROG " v2.0 (March 1998)\n" + "GNO utility: " DESC "\n" + "Ported from Bell Labs code by Jawaid Bazyar; updated by Dave Tribby" +}; diff --git a/usr.bin/awk/awkgram.y b/usr.bin/awk/awkgram.y index 158a25d..c1c2ef9 100644 --- a/usr.bin/awk/awkgram.y +++ b/usr.bin/awk/awkgram.y @@ -22,6 +22,8 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ +/* $Id: awkgram.y,v 1.2 1998/04/07 16:13:23 tribby Exp $ */ + %{ #include #include diff --git a/usr.bin/awk/b.c b/usr.bin/awk/b.c index e4e2152..ab422de 100644 --- a/usr.bin/awk/b.c +++ b/usr.bin/awk/b.c @@ -24,6 +24,12 @@ THIS SOFTWARE. /* lasciate ogne speranza, voi ch'entrate. */ +/* $Id: b.c,v 1.2 1998/04/07 16:13:27 tribby Exp $ */ + +#ifdef __GNO__ +segment "b"; +#endif + #define DEBUG #include diff --git a/usr.bin/awk/lex.c b/usr.bin/awk/lex.c index a942fe0..2028d10 100644 --- a/usr.bin/awk/lex.c +++ b/usr.bin/awk/lex.c @@ -22,6 +22,12 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ +/* $Id: lex.c,v 1.3 1998/04/07 16:13:31 tribby Exp $ */ + +#ifdef __GNO__ +segment "lex"; +#endif + #include #include #include @@ -96,7 +102,11 @@ Keyword keywords[] ={ /* keep sorted: binary searched */ #define RET(x) return(x) #endif +#ifndef __STDC__ int peek() +#else +int peek(void) +#endif { int c = input(); unput(c); @@ -163,7 +173,11 @@ int regexpr(void); int sc = 0; /* 1 => return a } right now */ int reg = 0; /* 1 => return a REGEXPR now */ +#ifndef __STDC__ int yylex() +#else +int yylex(void) +#endif { int c, n; static char *buf = 0; @@ -348,7 +362,11 @@ int yylex() } } +#ifndef __STDC__ int string() +#else +int string(void) +#endif { int c, n; char *s, *bp; @@ -492,7 +510,11 @@ void startreg(void) /* next call to yyles will return a regular expression */ reg = 1; } +#ifndef __STDC__ int regexpr() +#else +int regexpr(void) +#endif { int c; static char *buf = 0; diff --git a/usr.bin/awk/lib.c b/usr.bin/awk/lib.c index 42c450f..6cc0fa4 100644 --- a/usr.bin/awk/lib.c +++ b/usr.bin/awk/lib.c @@ -22,6 +22,12 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ +/* $Id: lib.c,v 1.2 1998/04/07 16:13:35 tribby Exp $ */ + +#ifdef __GNO__ +segment "lib"; +#endif + #define DEBUG #include #include diff --git a/usr.bin/awk/main.c b/usr.bin/awk/main.c index 0eed1af..257bfeb 100644 --- a/usr.bin/awk/main.c +++ b/usr.bin/awk/main.c @@ -22,6 +22,8 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ +/* $Id: main.c,v 1.3 1998/04/07 16:13:39 tribby Exp $ */ + char *version = "version 980211"; #define DEBUG @@ -32,6 +34,9 @@ char *version = "version 980211"; #include #include "awk.h" #include "ytab.h" +#if defined(__GNO__) && defined(__STACK_CHECK__) +#include +#endif extern char **environ; extern int nfields; @@ -50,17 +55,26 @@ int curpfile = 0; /* current filename */ int safe = 0; /* 1 => "safe" mode */ + int main(int argc, char *argv[]) { char *fs = NULL, *marg; int temp; +#ifdef __GNO__ +#ifdef __STACK_CHECK__ + __REPORT_STACK(); +#endif + environInit(); +#endif cmdname = argv[0]; if (argc == 1) { fprintf(stderr, "Usage: %s [-f programfile | 'program'] [-Ffieldsep] [-v var=value] [files]\n", cmdname); exit(1); } +#ifndef __GNO__ signal(SIGFPE, fpecatch); +#endif yyin = NULL; symtab = makesymtab(NSYMTAB); while (argc > 1 && argv[1][0] == '-' && argv[1][1] != '\0') { @@ -120,7 +134,11 @@ int main(int argc, char *argv[]) dbg = atoi(&argv[1][2]); if (dbg == 0) dbg = 1; +#ifndef __GNO__ printf("awk %s\n", version); +#else + printf("awk 2.0 for GNO/ME; based on %s\n", version); +#endif break; default: ERROR "unknown option %s ignored", argv[1] WARNING; @@ -158,6 +176,9 @@ int main(int argc, char *argv[]) run(winner); } else bracecheck(); +#if defined(__GNO__) && defined(__STACK_CHECK__) + printf("=> stack usage: %d bytes\n", _endStackCheck()); +#endif return(errorflag); } diff --git a/usr.bin/awk/makefile b/usr.bin/awk/makefile.ux similarity index 100% rename from usr.bin/awk/makefile rename to usr.bin/awk/makefile.ux diff --git a/usr.bin/awk/maketab.c b/usr.bin/awk/maketab.c index 20e4a0b..b85867f 100644 --- a/usr.bin/awk/maketab.c +++ b/usr.bin/awk/maketab.c @@ -22,6 +22,8 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ +/* $Id: maketab.c,v 1.3 1998/04/07 16:13:46 tribby Exp $ */ + /* * this program makes the table to link function names * and type indices that is used by execute() in run.c. diff --git a/usr.bin/awk/parse.c b/usr.bin/awk/parse.c index 66a94cc..c23cc8d 100644 --- a/usr.bin/awk/parse.c +++ b/usr.bin/awk/parse.c @@ -22,6 +22,8 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ +/* $Id: parse.c,v 1.2 1998/04/07 16:13:49 tribby Exp $ */ + #define DEBUG #include #include diff --git a/usr.bin/awk/proto.h b/usr.bin/awk/proto.h index 6439b04..ce05016 100644 --- a/usr.bin/awk/proto.h +++ b/usr.bin/awk/proto.h @@ -22,6 +22,8 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ +/* $Id: proto.h,v 1.3 1998/04/07 16:13:52 tribby Exp $ */ + extern int yywrap(void); extern void setfname(Cell *); extern int constnode(Node *); diff --git a/usr.bin/awk/run.c b/usr.bin/awk/run.c index 6427848..4a2606d 100644 --- a/usr.bin/awk/run.c +++ b/usr.bin/awk/run.c @@ -22,6 +22,12 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ +/* $Id: run.c,v 1.3 1998/04/07 16:13:55 tribby Exp $ */ + +#ifdef __GNO__ +segment "run"; +#endif + #define DEBUG #include #include @@ -32,9 +38,19 @@ THIS SOFTWARE. #include #include "awk.h" #include "ytab.h" +#if defined(__GNO__) && defined(__STACK_CHECK__) +#include +#undef true +#undef false +#endif #define tempfree(x) if (istemp(x)) tfree(x); else +#ifdef __GNO__ +#undef FOPEN_MAX +#define FOPEN_MAX 40 +#endif + /* #undef tempfree @@ -196,6 +212,9 @@ Cell *program(Node **a, int n) /* execute an awk program */ tempfree(x); } ex1: +#if defined(__GNO__) && defined(__STACK_CHECK__) + printf("=> stack usage: %d bytes\n", _endStackCheck()); +#endif return(true); } @@ -217,10 +236,18 @@ Cell *call(Node **a, int n) /* function call. very kludgy and fragile */ static Cell newcopycell = { OCELL, CCOPY, 0, "", 0.0, NUM|STR|DONTFREE }; int i, ncall, ndef; Node *x; +#ifdef __GNO__ + Cell **args, **oargs; +#else Cell *args[NARGS], *oargs[NARGS]; /* BUG: fixed size arrays */ +#endif Cell *y, *z, *fcn; char *s; +#ifdef __GNO__ + args = malloc(sizeof(Cell *) * NARGS); + oargs = malloc(sizeof(Cell *) * NARGS); +#endif fcn = execute(a[0]); /* the function itself */ s = fcn->nval; if (!isfcn(fcn)) @@ -295,12 +322,22 @@ Cell *call(Node **a, int n) /* function call. very kludgy and fragile */ } } tempfree(fcn); +#ifdef __GNO__ + if (isexit(y) || isnext(y) || isnextfile(y)) { + free(args); free(oargs); return y; + } +#else if (isexit(y) || isnext(y) || isnextfile(y)) return y; +#endif tempfree(y); /* this can free twice! */ z = fp->retval; /* return value */ dprintf( ("%s returns %g |%s| %o\n", s, getfval(z), getsval(z), z->tval) ); fp--; +#ifdef __GNO__ + free(args); + free(oargs); +#endif return(z); } @@ -1114,6 +1151,11 @@ Cell *assign(Node **a, int n) /* a[0] = a[1], a[0] += a[1], etc. */ return(x); } +#ifdef __GNO__ +/* In full debug mode, there is too much code for one segment */ +segment "run2"; +#endif + Cell *cat(Node **a, int q) /* a[0] cat a[1] */ { Cell *x, *y, *z; @@ -1615,7 +1657,15 @@ FILE *openfile(int a, char *us) } else if (a == LE) { /* input pipe */ fp = popen(s, "r"); } else if (a == LT) { /* getline $1 } diff --git a/usr.bin/awk/tests/out2/ch1p11a.out b/usr.bin/awk/tests/out2/ch1p11a.out new file mode 100644 index 0000000..4c4dcf1 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p11a.out @@ -0,0 +1,6 @@ +Beth $ 0.00 +Dan $ 0.00 +Kathy $ 40.00 +Mark $100.00 +Mary $121.00 +Susie $ 76.50 diff --git a/usr.bin/awk/tests/out2/ch1p12.out b/usr.bin/awk/tests/out2/ch1p12.out new file mode 100644 index 0000000..5797884 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p12.out @@ -0,0 +1,2 @@ +Mark 5.00 20 +Mary 5.50 22 diff --git a/usr.bin/awk/tests/out2/ch1p13.out b/usr.bin/awk/tests/out2/ch1p13.out new file mode 100644 index 0000000..38492d4 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p13.out @@ -0,0 +1,3 @@ +$100.00 for Mark +$121.00 for Mary +$76.50 for Susie diff --git a/usr.bin/awk/tests/out2/ch1p22.out b/usr.bin/awk/tests/out2/ch1p22.out new file mode 100644 index 0000000..b642ef5 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p22.out @@ -0,0 +1,5 @@ +Beth 4.00 0 +Kathy 4.00 10 +Mark 5.00 20 +Mary 5.50 22 +Susie 4.25 18 diff --git a/usr.bin/awk/tests/out2/ch1p28.out b/usr.bin/awk/tests/out2/ch1p28.out new file mode 100644 index 0000000..2e0d8ad --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p28.out @@ -0,0 +1,6 @@ +3 Beth 0 +3 Dan 0 +3 Kathy 10 +3 Mark 20 +3 Mary 22 +3 Susie 18 diff --git a/usr.bin/awk/tests/out2/ch1p30.out b/usr.bin/awk/tests/out2/ch1p30.out new file mode 100644 index 0000000..4e06c40 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p30.out @@ -0,0 +1,8 @@ +NAME RATE HOURS + +Beth 4.00 0 +Dan 3.75 0 +Kathy 4.00 10 +Mark 5.00 20 +Mary 5.50 22 +Susie 4.25 18 diff --git a/usr.bin/awk/tests/out2/ch1p31.out b/usr.bin/awk/tests/out2/ch1p31.out new file mode 100644 index 0000000..9269897 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p31.out @@ -0,0 +1 @@ +3 employees worked more than 15 hours diff --git a/usr.bin/awk/tests/out2/ch1p32.out b/usr.bin/awk/tests/out2/ch1p32.out new file mode 100644 index 0000000..df3b526 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p32.out @@ -0,0 +1,3 @@ +6 employees +total pay is 337.5 +average pay is 56.25 diff --git a/usr.bin/awk/tests/out2/ch1p33.out b/usr.bin/awk/tests/out2/ch1p33.out new file mode 100644 index 0000000..6b3a119 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p33.out @@ -0,0 +1 @@ +highest hourly rate: 5.50 for Mary diff --git a/usr.bin/awk/tests/out2/ch1p33a.out b/usr.bin/awk/tests/out2/ch1p33a.out new file mode 100644 index 0000000..9a2563d --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p33a.out @@ -0,0 +1 @@ +Susie 4.25 18 diff --git a/usr.bin/awk/tests/out2/ch1p34.out b/usr.bin/awk/tests/out2/ch1p34.out new file mode 100644 index 0000000..5b20ea0 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p34.out @@ -0,0 +1 @@ +Beth Dan Kathy Mark Mary Susie diff --git a/usr.bin/awk/tests/out2/ch1p40a.out b/usr.bin/awk/tests/out2/ch1p40a.out new file mode 100644 index 0000000..d59d68f --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p40a.out @@ -0,0 +1 @@ +6 lines, 18 words, 77 characters diff --git a/usr.bin/awk/tests/out2/ch1p41.out b/usr.bin/awk/tests/out2/ch1p41.out new file mode 100644 index 0000000..9105be6 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p41.out @@ -0,0 +1 @@ +no employees are paid more than $6/hour diff --git a/usr.bin/awk/tests/out2/ch1p51.out b/usr.bin/awk/tests/out2/ch1p51.out new file mode 100644 index 0000000..afdc899 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p51.out @@ -0,0 +1,6 @@ +Susie 4.25 18 +Mary 5.50 22 +Mark 5.00 20 +Kathy 4.00 10 +Dan 3.75 0 +Beth 4.00 0 diff --git a/usr.bin/awk/tests/out2/ch1p63.out b/usr.bin/awk/tests/out2/ch1p63.out new file mode 100644 index 0000000..3c03207 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p63.out @@ -0,0 +1 @@ +18 diff --git a/usr.bin/awk/tests/out2/ch1p67.out b/usr.bin/awk/tests/out2/ch1p67.out new file mode 100644 index 0000000..3c03207 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p67.out @@ -0,0 +1 @@ +18 diff --git a/usr.bin/awk/tests/out2/ch1p69.out b/usr.bin/awk/tests/out2/ch1p69.out new file mode 100644 index 0000000..423c1d4 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p69.out @@ -0,0 +1 @@ +Susie Susie 4.25 18 diff --git a/usr.bin/awk/tests/out2/ch1p78.out b/usr.bin/awk/tests/out2/ch1p78.out new file mode 100644 index 0000000..6ce8b3a --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p78.out @@ -0,0 +1,6 @@ +4 +3.75 +14 +25 +27.5 +22.25 diff --git a/usr.bin/awk/tests/out2/ch1p79.out b/usr.bin/awk/tests/out2/ch1p79.out new file mode 100644 index 0000000..d8674f6 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch1p79.out @@ -0,0 +1 @@ +96.5 diff --git a/usr.bin/awk/tests/out2/ch2p11.out b/usr.bin/awk/tests/out2/ch2p11.out new file mode 100644 index 0000000..16f090d --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p11.out @@ -0,0 +1,15 @@ + COUNTRY AREA POP CONTINENT + + USSR 8649 275 Asia + Canada 3852 25 North America + China 3705 1032 Asia + USA 3615 237 North America + Brazil 3286 134 South America + India 1267 746 Asia + Mexico 762 78 North America + France 211 55 Europe + Japan 144 120 Asia + Germany 96 61 Europe + England 94 56 Europe + + TOTAL 25681 2819 diff --git a/usr.bin/awk/tests/out2/ch2p20.out b/usr.bin/awk/tests/out2/ch2p20.out new file mode 100644 index 0000000..a0ca0b7 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p20.out @@ -0,0 +1,7 @@ +USSR 8649 275 Asia +China 3705 1032 Asia +India 1267 746 Asia +France 211 55 Europe +Japan 144 120 Asia +Germany 96 61 Europe +England 94 56 Europe diff --git a/usr.bin/awk/tests/out2/ch2p21.out b/usr.bin/awk/tests/out2/ch2p21.out new file mode 100644 index 0000000..086e843 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p21.out @@ -0,0 +1,4 @@ +France 211 55 Europe +Japan 144 120 Asia +Germany 96 61 Europe +England 94 56 Europe diff --git a/usr.bin/awk/tests/out2/ch2p22.out b/usr.bin/awk/tests/out2/ch2p22.out new file mode 100644 index 0000000..ae4b8d2 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p22.out @@ -0,0 +1,5 @@ +countries: USSR 8649 275 Asia +countries: Canada 3852 25 North America +countries: China 3705 1032 Asia +countries: USA 3615 237 North America +countries: Brazil 3286 134 South America diff --git a/usr.bin/awk/tests/out2/ch2p32.out b/usr.bin/awk/tests/out2/ch2p32.out new file mode 100644 index 0000000..64937dd --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p32.out @@ -0,0 +1 @@ +Total population of the 4 Asian countries is 2173 million. diff --git a/usr.bin/awk/tests/out2/ch2p34.out b/usr.bin/awk/tests/out2/ch2p34.out new file mode 100644 index 0000000..9c4395e --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p34.out @@ -0,0 +1 @@ +country with largest population: China 1032 diff --git a/usr.bin/awk/tests/out2/ch2p35.out b/usr.bin/awk/tests/out2/ch2p35.out new file mode 100644 index 0000000..067332e --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p35.out @@ -0,0 +1,11 @@ +1:USSR 8649 275 Asia +2:Canada 3852 25 North America +3:China 3705 1032 Asia +4:USA 3615 237 North America +5:Brazil 3286 134 South America +6:India 1267 746 Asia +7:Mexico 762 78 North America +8:France 211 55 Europe +9:Japan 144 120 Asia +10:Germany 96 61 Europe +11:England 94 56 Europe diff --git a/usr.bin/awk/tests/out2/ch2p36.out b/usr.bin/awk/tests/out2/ch2p36.out new file mode 100644 index 0000000..b3d2a7a --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p36.out @@ -0,0 +1,11 @@ +USSR 8649 275 Asia +Canada 3852 25 North America +China 3705 1032 Asia +United States 3615 237 North America +Brazil 3286 134 South America +India 1267 746 Asia +Mexico 762 78 North America +France 211 55 Europe +Japan 144 120 Asia +Germany 96 61 Europe +England 94 56 Europe diff --git a/usr.bin/awk/tests/out2/ch2p39.out b/usr.bin/awk/tests/out2/ch2p39.out new file mode 100644 index 0000000..50da72a --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p39.out @@ -0,0 +1,11 @@ +USS 8649 275 Asia +Can 3852 25 North America +Chi 3705 1032 Asia +USA 3615 237 North America +Bra 3286 134 South America +Ind 1267 746 Asia +Mex 762 78 North America +Fra 211 55 Europe +Jap 144 120 Asia +Ger 96 61 Europe +Eng 94 56 Europe diff --git a/usr.bin/awk/tests/out2/ch2p40.out b/usr.bin/awk/tests/out2/ch2p40.out new file mode 100644 index 0000000..6936ce4 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p40.out @@ -0,0 +1 @@ +USS Can Chi USA Bra Ind Mex Fra Jap Ger Eng diff --git a/usr.bin/awk/tests/out2/ch2p42.out b/usr.bin/awk/tests/out2/ch2p42.out new file mode 100644 index 0000000..3fa01c1 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p42.out @@ -0,0 +1,11 @@ +USSR 8649 275 Asia +Canada 3852 25 NA +China 3705 1032 Asia +USA 3615 237 NA +Brazil 3286 134 SA +India 1267 746 Asia +Mexico 762 78 NA +France 211 55 Europe +Japan 144 120 Asia +Germany 96 61 Europe +England 94 56 Europe diff --git a/usr.bin/awk/tests/out2/ch2p44.out b/usr.bin/awk/tests/out2/ch2p44.out new file mode 100644 index 0000000..dbc0034 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p44.out @@ -0,0 +1,6 @@ +0 +10 +20 +30 +40 +50 diff --git a/usr.bin/awk/tests/out2/ch2p45.out b/usr.bin/awk/tests/out2/ch2p45.out new file mode 100644 index 0000000..f9bf551 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p45.out @@ -0,0 +1,48 @@ +USSR +8649 +275 +Asia +Canada +3852 +25 +North +America +China +3705 +1032 +Asia +USA +3615 +237 +North +America +Brazil +3286 +134 +South +America +India +1267 +746 +Asia +Mexico +762 +78 +North +America +France +211 +55 +Europe +Japan +144 +120 +Asia +Germany +96 +61 +Europe +England +94 +56 +Europe diff --git a/usr.bin/awk/tests/out2/ch2p46.out b/usr.bin/awk/tests/out2/ch2p46.out new file mode 100644 index 0000000..f9bf551 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p46.out @@ -0,0 +1,48 @@ +USSR +8649 +275 +Asia +Canada +3852 +25 +North +America +China +3705 +1032 +Asia +USA +3615 +237 +North +America +Brazil +3286 +134 +South +America +India +1267 +746 +Asia +Mexico +762 +78 +North +America +France +211 +55 +Europe +Japan +144 +120 +Asia +Germany +96 +61 +Europe +England +94 +56 +Europe diff --git a/usr.bin/awk/tests/out2/ch2p47.out b/usr.bin/awk/tests/out2/ch2p47.out new file mode 100644 index 0000000..dc2c5ff --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p47.out @@ -0,0 +1,2 @@ +Asian population is 2173 million. +European population is 172 million. diff --git a/usr.bin/awk/tests/out2/ch2p48.out b/usr.bin/awk/tests/out2/ch2p48.out new file mode 100644 index 0000000..d1b7bfc --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p48.out @@ -0,0 +1,4 @@ +South America 134 +North America 340 +Asia 2173 +Europe 172 diff --git a/usr.bin/awk/tests/out2/ch2p52.out b/usr.bin/awk/tests/out2/ch2p52.out new file mode 100644 index 0000000..46fb7e1 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p52.out @@ -0,0 +1,22 @@ +USSR:8649 + +Canada:3852 + +China:3705 + +USA:3615 + +Brazil:3286 + +India:1267 + +Mexico:762 + +France:211 + +Japan:144 + +Germany:96 + +England:94 + diff --git a/usr.bin/awk/tests/out2/ch2p54.out b/usr.bin/awk/tests/out2/ch2p54.out new file mode 100644 index 0000000..56ef76f --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p54.out @@ -0,0 +1,4 @@ + Asia 2173 + North America 340 + Europe 172 + South America 134 diff --git a/usr.bin/awk/tests/out2/ch2p60.out b/usr.bin/awk/tests/out2/ch2p60.out new file mode 100644 index 0000000..38f54d3 --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p60.out @@ -0,0 +1,13 @@ +This is a testfile for the awk test ch2p62.awk + +USSR 275 +China 1032 +USA 237 +Brazil 134 +India 746 +Japan 120 +Canada 25 +Mexico 78 +France 55 +Germany 61 +England 56 diff --git a/usr.bin/awk/tests/out2/ch2p61.out b/usr.bin/awk/tests/out2/ch2p61.out new file mode 100644 index 0000000..f81e27c --- /dev/null +++ b/usr.bin/awk/tests/out2/ch2p61.out @@ -0,0 +1 @@ +p1 p2 param 3 p4 diff --git a/usr.bin/awk/tests/out2/check1.out b/usr.bin/awk/tests/out2/check1.out new file mode 100644 index 0000000..314c5ae --- /dev/null +++ b/usr.bin/awk/tests/out2/check1.out @@ -0,0 +1 @@ +deposits $500.00, checks $418.95 diff --git a/usr.bin/awk/tests/out2/checkfix.out b/usr.bin/awk/tests/out2/checkfix.out new file mode 100644 index 0000000..972342d --- /dev/null +++ b/usr.bin/awk/tests/out2/checkfix.out @@ -0,0 +1,40 @@ + + 1021 + Mar. 7, 1998 +Pay to Champagne Unlimited-------------------------- $123.10 +the sum of one hundred twenty three dollars and 10 cents exactly + + + + + 1022 + Mar. 7, 1998 +Pay to Getwell Drug Store--------------------------- $45.10 +the sum of forty five dollars and 10 cents exactly + + + + + 1023 + Mar. 7, 1998 +Pay to International Travel------------------------- $125.00 +the sum of one hundred twenty five dollars and 00 cents exactly + + + + + 1024 + Mar. 7, 1998 +Pay to Carnegie Hall-------------------------------- $50.00 +the sum of fifty dollars and 00 cents exactly + + + + + 1025 + Mar. 7, 1998 +Pay to American Express----------------------------- $75.75 +the sum of seventy five dollars and 75 cents exactly + + + diff --git a/usr.bin/awk/tests/out2/codesize.out b/usr.bin/awk/tests/out2/codesize.out new file mode 100644 index 0000000..7cae27c --- /dev/null +++ b/usr.bin/awk/tests/out2/codesize.out @@ -0,0 +1,12 @@ +"getsval" in file ../tran.o uses 122 stack bytes +"string" in file ../lex.o uses 128 stack bytes +"split" in file ../run.o uses 101 stack bytes +Code file Code bytes +../main.o 4254 +../b.o 21244 +../lex.o 10704 +../parse.o 3253 +../run.o 43971 +../lib.o 19039 +../proctab.o 1569 +../tran.o 8450 diff --git a/usr.bin/awk/tests/out2/comb.out b/usr.bin/awk/tests/out2/comb.out new file mode 100644 index 0000000..104190d --- /dev/null +++ b/usr.bin/awk/tests/out2/comb.out @@ -0,0 +1,5 @@ +7 +8 +9 +10 +1 diff --git a/usr.bin/awk/tests/out2/datecvt.out b/usr.bin/awk/tests/out2/datecvt.out new file mode 100644 index 0000000..cb51d63 --- /dev/null +++ b/usr.bin/awk/tests/out2/datecvt.out @@ -0,0 +1,5 @@ +420130 mary's birthday +720327 mark's birthday +700524 anniversary +090612 mother's birthday +751101 elizabeth's birthday diff --git a/usr.bin/awk/tests/out2/extra1.err b/usr.bin/awk/tests/out2/extra1.err new file mode 100644 index 0000000..686e0a7 --- /dev/null +++ b/usr.bin/awk/tests/out2/extra1.err @@ -0,0 +1,6 @@ +/obj/gno/usr.bin/awk/awk: extra } at source line 1 + context is + >>> {}} <<< +/obj/gno/usr.bin/awk/awk: syntax error at source line 1 + extra } +/obj/gno/usr.bin/awk/awk: bailing out at source line 1 diff --git a/usr.bin/awk/tests/out2/extra2.err b/usr.bin/awk/tests/out2/extra2.err new file mode 100644 index 0000000..25403c8 --- /dev/null +++ b/usr.bin/awk/tests/out2/extra2.err @@ -0,0 +1,6 @@ +/obj/gno/usr.bin/awk/awk: extra ) at source line 1 + context is + >>> {) <<< +/obj/gno/usr.bin/awk/awk: syntax error at source line 1 +/obj/gno/usr.bin/awk/awk: illegal statement at source line 1 + extra ) diff --git a/usr.bin/awk/tests/out2/extra3.err b/usr.bin/awk/tests/out2/extra3.err new file mode 100644 index 0000000..3d15190 --- /dev/null +++ b/usr.bin/awk/tests/out2/extra3.err @@ -0,0 +1,6 @@ +/obj/gno/usr.bin/awk/awk: extra ] at source line 1 + context is + >>> {] <<< +/obj/gno/usr.bin/awk/awk: syntax error at source line 1 +/obj/gno/usr.bin/awk/awk: illegal statement at source line 1 + extra ] diff --git a/usr.bin/awk/tests/out2/factorial.out b/usr.bin/awk/tests/out2/factorial.out new file mode 100644 index 0000000..b5053a6 --- /dev/null +++ b/usr.bin/awk/tests/out2/factorial.out @@ -0,0 +1,2 @@ +Calculating 10 factorial +Result: 3628800 diff --git a/usr.bin/awk/tests/out2/form.gen.out b/usr.bin/awk/tests/out2/form.gen.out new file mode 100644 index 0000000..18c4e8d --- /dev/null +++ b/usr.bin/awk/tests/out2/form.gen.out @@ -0,0 +1,8 @@ +Subject: Demographic Information About England +From: AWK Demographics, Inc. + +In response to your request for information about England, +our latest research has revealed that its population is 94 +million people and its area is 56 million square miles. +This gives England a population density of 1.67857 people per +square mile. diff --git a/usr.bin/awk/tests/out2/form1.out b/usr.bin/awk/tests/out2/form1.out new file mode 100644 index 0000000..314361f --- /dev/null +++ b/usr.bin/awk/tests/out2/form1.out @@ -0,0 +1,12 @@ +CONTINENT COUNTRY POPULATION AREA POP. DEN. +Asia Japan 120 144 833.3 +Asia India 746 1267 588.8 +Asia China 1032 3705 278.5 +Asia USSR 275 8649 31.8 +Europe Germany 61 96 635.4 +Europe England 56 94 595.7 +Europe France 55 211 260.7 +North America Mexico 78 762 102.4 +North America USA 237 3615 65.6 +North America Canada 25 3852 6.5 +South America Brazil 134 3286 40.8 diff --git a/usr.bin/awk/tests/out2/form2.out b/usr.bin/awk/tests/out2/form2.out new file mode 100644 index 0000000..c99e903 --- /dev/null +++ b/usr.bin/awk/tests/out2/form2.out @@ -0,0 +1,16 @@ +CONTINENT COUNTRY POPULATION AREA POP. DEN. + +Asia 0.00120000 0 120 144.0 + 0.00169839 0 746 1267.0 + 0.00359012 0 1032 3705.0 + 0.03145091 0 275 8649.0 + +Europe 0.00157377 0 61 96.0 + 0.00167857 0 56 94.0 + 0.00383636 0 55 211.0 + +North America 0.00976923 0 78 762.0 + 0.01525316 0 237 3615.0 + 0.15408000 0 25 3852.0 + +South America 0.02452239 0 134 3286.0 diff --git a/usr.bin/awk/tests/out2/histo.out b/usr.bin/awk/tests/out2/histo.out new file mode 100644 index 0000000..47bbe1e --- /dev/null +++ b/usr.bin/awk/tests/out2/histo.out @@ -0,0 +1,11 @@ + 0 - 9: 22 ********************** + 10 - 19: 22 ********************** + 20 - 29: 20 ******************** + 30 - 39: 19 ******************* + 40 - 49: 15 *************** + 50 - 59: 22 ********************** + 60 - 69: 20 ******************** + 70 - 79: 15 *************** + 80 - 89: 24 ************************ + 90 - 99: 19 ******************* +100: 2 ** diff --git a/usr.bin/awk/tests/out2/infoG.out b/usr.bin/awk/tests/out2/infoG.out new file mode 100644 index 0000000..d60ae60 --- /dev/null +++ b/usr.bin/awk/tests/out2/infoG.out @@ -0,0 +1,4 @@ +Germany: + 61 million people + 0.096 million sq. mi. + 635.4 people per sq. mi. diff --git a/usr.bin/awk/tests/out2/infoUS.out b/usr.bin/awk/tests/out2/infoUS.out new file mode 100644 index 0000000..18ab244 --- /dev/null +++ b/usr.bin/awk/tests/out2/infoUS.out @@ -0,0 +1,8 @@ +USSR: + 275 million people + 8.649 million sq. mi. + 31.8 people per sq. mi. +USA: + 237 million people + 3.615 million sq. mi. + 65.6 people per sq. mi. diff --git a/usr.bin/awk/tests/out2/join.out b/usr.bin/awk/tests/out2/join.out new file mode 100644 index 0000000..0da222a --- /dev/null +++ b/usr.bin/awk/tests/out2/join.out @@ -0,0 +1,11 @@ +Brazil 3286 134 South America Brasilia +Canada 3852 25 North America Ottawa +China 3705 1032 Asia Beijing +England 94 56 Europe London +France 211 55 Europe Paris +Germany 96 61 Europe Bonn +India 1267 746 Asia New Delhi +Japan 144 120 Asia Tokyo +Mexico 762 78 North America Mexico City +USA 3615 237 North America Washington +USSR 8649 275 Asia Moscow diff --git a/usr.bin/awk/tests/out2/list.out b/usr.bin/awk/tests/out2/list.out new file mode 100644 index 0000000..65f1c04 --- /dev/null +++ b/usr.bin/awk/tests/out2/list.out @@ -0,0 +1,42 @@ +-n Testing command beginning at +Tue Feb 17 13:06:25 PST 1998 +Testing prep1 and form1 + Completion status = 0 +Checking results against control file form1.out (no differences expected) + Completion status = 0 +Testing prep2 and form2 + Completion status = 0 +Checking results against control file form2.out (no differences expected) + Completion status = 0 +Testing info.awk (Germany) + Completion status = 0 +Checking results against control file infoG.out (no differences expected) + Completion status = 0 +Testing info.awk (US) + Completion status = 0 +Checking results against control file infoUS.out (no differences expected) + Completion status = 0 +Testing form.gen (England) + Completion status = 0 +Checking results against control file form.gen.out (no differences expected) + Completion status = 0 +Testing table + Completion status = 0 +Checking results against control file table.out (no differences expected) + Completion status = 0 +Testing table1 + Completion status = 0 +Checking results against control file table1.out (no differences expected) + Completion status = 0 +Testing avgarea.awk (from command line) + Completion status = 0 +Checking results against control file avgarea.out (no differences expected) + Completion status = 0 +Testing join.awk + Completion status = 0 +Checking results against control file join.out (no differences expected) + Completion status = 0 +Testing merge.awk + Completion status = 0 +Checking results against control file merge.out (no differences expected) + Completion status = 0 diff --git a/usr.bin/awk/tests/out2/merge.out b/usr.bin/awk/tests/out2/merge.out new file mode 100644 index 0000000..1dd58b3 --- /dev/null +++ b/usr.bin/awk/tests/out2/merge.out @@ -0,0 +1,4 @@ +USSR 275 Moscow +China 1032 Beijing +India 746 New Delhi +Japan 120 Tokyo diff --git a/usr.bin/awk/tests/out2/ny2.out b/usr.bin/awk/tests/out2/ny2.out new file mode 100644 index 0000000..88bec83 --- /dev/null +++ b/usr.bin/awk/tests/out2/ny2.out @@ -0,0 +1,10 @@ +Adam Smith +1234 Wall St., Apt. 5C +New York, NY 10021 +212 555-4321 + +Canadian Consulate +555 Fifth Ave +New York, NY +212 586-2400 + diff --git a/usr.bin/awk/tests/out2/parser.out b/usr.bin/awk/tests/out2/parser.out new file mode 100644 index 0000000..b07d40e --- /dev/null +++ b/usr.bin/awk/tests/out2/parser.out @@ -0,0 +1,16 @@ +assign(x, num((float)0)); +assign(y, num((float)1)); +while (getrec()) { + if (eval(">", field(num((float)1)), x)) { + if (eval("==", x, eval("+", y, num((float)1)))) { + assign(x, num((float)1)); + assign(y, eval("*", x, num((float)2))); + } else { + print(x, array(z, x)); + } + } + if (eval(">", NR, num((float)1))) { + print(field(num((float)1))); + } +} +print(NR); diff --git a/usr.bin/awk/tests/out2/percent.out b/usr.bin/awk/tests/out2/percent.out new file mode 100644 index 0000000..b386143 --- /dev/null +++ b/usr.bin/awk/tests/out2/percent.out @@ -0,0 +1,23 @@ + 605.00 0.8 + 502.00 0.7 + 1868.00 2.6 + 456.00 0.6 + 1279.00 1.8 + 1265.00 1.8 + 1541.00 2.1 + 4593.00 6.4 + 1429.00 2.0 + 4284.00 6.0 + 14795.00 20.6 + 145.00 0.2 + 14954.00 20.8 + 3371.00 4.7 + 1334.00 1.9 + 15805.00 22.0 + 157.00 0.2 + 1925.00 2.7 + 225.00 0.3 + 181.00 0.3 + 178.00 0.2 + 169.00 0.2 + 790.00 1.1 diff --git a/usr.bin/awk/tests/out2/printenv.out b/usr.bin/awk/tests/out2/printenv.out new file mode 100644 index 0000000..95c5b67 --- /dev/null +++ b/usr.bin/awk/tests/out2/printenv.out @@ -0,0 +1,2 @@ +TestVal = ''; TESTVAL = ''; testval = 'loweronly' +badname = ''; BADNAME = '' diff --git a/usr.bin/awk/tests/out2/return.err b/usr.bin/awk/tests/out2/return.err new file mode 100644 index 0000000..57706e4 --- /dev/null +++ b/usr.bin/awk/tests/out2/return.err @@ -0,0 +1,5 @@ +/obj/gno/usr.bin/awk/awk: return not in function at source line 1 + context is + >>> {return <<< } +/obj/gno/usr.bin/awk/awk: syntax error at source line 1 +/obj/gno/usr.bin/awk/awk: illegal statement at source line 1 diff --git a/usr.bin/awk/tests/out2/sentgen.out b/usr.bin/awk/tests/out2/sentgen.out new file mode 100644 index 0000000..a25577e --- /dev/null +++ b/usr.bin/awk/tests/out2/sentgen.out @@ -0,0 +1,7 @@ +the boy runs quickly +the boy walks very very very quickly +the boy +walks +quickly +unknown nonterminal: BadElement +the girl runs slowly diff --git a/usr.bin/awk/tests/out2/sortgen.out b/usr.bin/awk/tests/out2/sortgen.out new file mode 100644 index 0000000..36f01ec --- /dev/null +++ b/usr.bin/awk/tests/out2/sortgen.out @@ -0,0 +1 @@ +sort -t':' +0 -1 +4rn -5 diff --git a/usr.bin/awk/tests/out2/split1.out b/usr.bin/awk/tests/out2/split1.out new file mode 100644 index 0000000..66467cc --- /dev/null +++ b/usr.bin/awk/tests/out2/split1.out @@ -0,0 +1 @@ +f1:f2 f3:f4 diff --git a/usr.bin/awk/tests/out2/split2.out b/usr.bin/awk/tests/out2/split2.out new file mode 100644 index 0000000..0ddf589 --- /dev/null +++ b/usr.bin/awk/tests/out2/split2.out @@ -0,0 +1 @@ +f1 f2 f3 diff --git a/usr.bin/awk/tests/out2/sum.list.out b/usr.bin/awk/tests/out2/sum.list.out new file mode 100644 index 0000000..aa39cb0 --- /dev/null +++ b/usr.bin/awk/tests/out2/sum.list.out @@ -0,0 +1,12 @@ + 0: 03010 ld zero # initialize sum to zero + 1: 04011 st sum + 2: 01000 loop get # read a number + 3: 08007 jz done # no more input if number is zero + 4: 05011 add sum # add in accumulated sum + 5: 04011 st sum # store new value back in sum + 6: 09002 j loop # go back and read another number + 7: 03011 done ld sum # print sum + 8: 02000 put + 9: 10000 halt + 10: 00000 zero const 0 + 11: 00000 sum const diff --git a/usr.bin/awk/tests/out2/sum.out b/usr.bin/awk/tests/out2/sum.out new file mode 100644 index 0000000..f96ac06 --- /dev/null +++ b/usr.bin/awk/tests/out2/sum.out @@ -0,0 +1 @@ +105 diff --git a/usr.bin/awk/tests/out2/sum3.out b/usr.bin/awk/tests/out2/sum3.out new file mode 100644 index 0000000..689390f --- /dev/null +++ b/usr.bin/awk/tests/out2/sum3.out @@ -0,0 +1 @@ +71851 88866 151565 77474 105122 96169 172828 129732 -- diff --git a/usr.bin/awk/tests/out2/table.out b/usr.bin/awk/tests/out2/table.out new file mode 100644 index 0000000..5265630 --- /dev/null +++ b/usr.bin/awk/tests/out2/table.out @@ -0,0 +1,96 @@ + 605 506 + 156 3292 + 133 1054 + 608 6605 + 502 31296 + 1926 672 + 933 2167 + 1706 168 + 1868 186 + 737 197 + 1308 856 + 4637 71392 + 456 1038 + 6380 1089 + 1800 588 + 2206 232 + 1279 3008 + 678 163 + 1517 450 + 207 432 + 1265 4853 + 3288 2335 + 847 3817 + 224 4204 + 1541 6431 + 2635 1904 + 1295 4830 + 1658 2615 + 4593 1933 + 545 2269 + 4247 8784 + 1354 2341 + 1429 12451 + 711 661 + 6757 9831 + 702 15964 + 4284 10646 + 2082 2254 + 2066 2386 + 216 2148 +14795 264 + 3200 476 + 6383 791 + 739 929 + 145 1165 + 1985 385 + 336 3263 + 3900 268 +14954 268 + 131 2863 + 784 20472 + 579 2340 + 3371 1092 + 163 882 + 6248 3124 +14806 3695 + 1334 557 + 3984 8215 +12075 6579 + 2648 167 +15805 4533 +33468 16518 + 9353 141 + 2936 3459 + 157 1715 + 2155 1508 + 8735 149 + 167 1343 + 1925 1807 +65901 16015 +36833 20737 +35547 2166 + 225 574 +14016 11902 + 181 181 + 4761 1619 + 181 186 + 186 196 + 272 261 + 1129 3164 + 178 3740 + 368 3335 + 1564 1506 +78880 142 + 169 176 + 6619 176 + 181 408 + 9510 207 + 790 441 + 251 167 + 1274 3794 + 3708 4132 + 2376 4659 + 654 8094 + 3399 168 + 1907 914864 diff --git a/usr.bin/awk/tests/out2/table1.out b/usr.bin/awk/tests/out2/table1.out new file mode 100644 index 0000000..01d402c --- /dev/null +++ b/usr.bin/awk/tests/out2/table1.out @@ -0,0 +1,96 @@ + 605 + 156 + 133 + 608 + 502 + 1926 + 933 + 1706 + 1868 + 737 + 1308 + 4637 + 456 + 6380 + 1800 + 2206 + 1279 + 678 + 1517 + 207 + 1265 + 3288 + 847 + 224 + 1541 + 2635 + 1295 + 1658 + 4593 + 545 + 4247 + 1354 + 1429 + 711 + 6757 + 702 + 4284 + 2082 + 2066 + 216 +14795 + 3200 + 6383 + 739 + 145 + 1985 + 336 + 3900 +14954 + 131 + 784 + 579 + 3371 + 163 + 6248 +14806 + 1334 + 3984 +12075 + 2648 +15805 +33468 + 9353 + 2936 + 157 + 2155 + 8735 + 167 + 1925 +65901 +36833 +35547 + 225 +14016 + 181 + 4761 + 181 + 186 + 272 + 1129 + 178 + 368 + 1564 +78880 + 169 + 6619 + 181 + 9510 + 790 + 251 + 1274 + 3708 + 2376 + 654 + 3399 + 1907 diff --git a/usr.bin/awk/tran.c b/usr.bin/awk/tran.c index 56db23b..3d12e0e 100644 --- a/usr.bin/awk/tran.c +++ b/usr.bin/awk/tran.c @@ -22,6 +22,12 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ +/* $Id: tran.c,v 1.2 1998/04/07 16:14:02 tribby Exp $ */ + +#ifdef __GNO__ +segment "tran"; +#endif + #define DEBUG #include #include @@ -230,10 +236,72 @@ Cell *setsymtab(char *n, char *s, Awkfloat f, unsigned t, Array *tp) int hash(char *s, int n) /* form hash value for string s */ { +#ifndef __GNO__ unsigned hashval; +#else /* Need 32 bits; int on Apple IIGS is only 16 */ + unsigned long hashval; +#endif +#if defined(__NOASM__) || !defined(__ORCAC__) for (hashval = 0; *s != '\0'; s++) hashval = (*s + 31 * hashval); +#else + /* Use equivalent 65816 code to speed up Apple IIGS execution */ + unsigned long newhash; + asm{ + stz hashval ; hashval = 0 + stz hashval+2 + ldy #0x0000 ; index into s = 0 + + forloop: + lda [s],y ; Get next character of s + and #0x00FF ; (one byte only) + beq done ; Done if '\0' + + tax ; Hold character in X-reg + ; Calculate hasval, but instead of multiplying old value + ; by 31, shift it left by 5 (mult by 32) and subtract. + ; This is equivalent to + ; hashval = (hashval << 5) - hashval + *s + lda hashval ; Use newhash to accumulate + sta newhash ; shifted hash value. + lda hashval+2 + sta newhash+2 + asl newhash ; First shift (*2) + rol newhash+2 + asl newhash ; Second (*4) + rol newhash+2 + asl newhash ; Third (*8) + rol newhash+2 + asl newhash ; Fourth (*16) + rol newhash+2 + asl newhash ; Fifth (*32) + rol newhash+2 ; (newhash = hashval*32) + + sec ; newhash -= hashval + lda newhash + sbc hashval + sta newhash + lda newhash+2 + sbc hashval+2 + sta newhash+2 + + clc ; newhash += s[y] + txa ; (Restore s[y] from x-register) + adc newhash + bcc nocarry + inc newhash+2 + nocarry: + sta hashval ; hashval = newhash + lda newhash+2 + sta hashval+2 + + iny ; Bump index into s + bra forloop ; and continue in loop. + + done: ; When done, return hashval % n + } +#endif return hashval % n; } diff --git a/usr.bin/awk/ytab.c b/usr.bin/awk/ytab.c index b1ce520..2239b0a 100644 --- a/usr.bin/awk/ytab.c +++ b/usr.bin/awk/ytab.c @@ -1,5 +1,12 @@ -#line 26 "awkgram.y" +/* $Id: ytab.c,v 1.2 1998/04/07 16:14:07 tribby Exp $ */ + +#ifdef __ORCAC__ +segment "lex"; +#endif + +/* NOTE: line directives commented-out in GNO version, for debugger */ +/* # line 26 "awkgram.y" */ #include #include #include "awk.h" @@ -14,115 +21,133 @@ int inloop = 0; /* = 1 if in while, for, do */ char *curfname = 0; /* current function name */ Node *arglist = 0; /* list of args for current function */ -#line 41 "awkgram.y" +/* # line 41 "awkgram.y" */ typedef union { Node *p; Cell *cp; int i; char *s; } YYSTYPE; -extern int yyerrflag; -#ifndef YYMAXDEPTH -#define YYMAXDEPTH 150 +#ifdef __cplusplus +# include +# include +#endif /* __cplusplus */ +# define FIRSTTOKEN 257 +# define PROGRAM 258 +# define PASTAT 259 +# define PASTAT2 260 +# define XBEGIN 261 +# define XEND 262 +# define NL 263 +# define ARRAY 264 +# define MATCH 265 +# define NOTMATCH 266 +# define MATCHOP 267 +# define FINAL 268 +# define DOT 269 +# define ALL 270 +# define CCL 271 +# define NCCL 272 +# define CHAR 273 +# define OR 274 +# define STAR 275 +# define QUEST 276 +# define PLUS 277 +# define AND 278 +# define BOR 279 +# define APPEND 280 +# define EQ 281 +# define GE 282 +# define GT 283 +# define LE 284 +# define LT 285 +# define NE 286 +# define IN 287 +# define ARG 288 +# define BLTIN 289 +# define BREAK 290 +# define CLOSE 291 +# define CONTINUE 292 +# define DELETE 293 +# define DO 294 +# define EXIT 295 +# define FOR 296 +# define FUNC 297 +# define SUB 298 +# define GSUB 299 +# define IF 300 +# define INDEX 301 +# define LSUBSTR 302 +# define MATCHFCN 303 +# define NEXT 304 +# define NEXTFILE 305 +# define ADD 306 +# define MINUS 307 +# define MULT 308 +# define DIVIDE 309 +# define MOD 310 +# define ASSIGN 311 +# define ASGNOP 312 +# define ADDEQ 313 +# define SUBEQ 314 +# define MULTEQ 315 +# define DIVEQ 316 +# define MODEQ 317 +# define POWEQ 318 +# define PRINT 319 +# define PRINTF 320 +# define SPRINTF 321 +# define ELSE 322 +# define INTEST 323 +# define CONDEXPR 324 +# define POSTINCR 325 +# define PREINCR 326 +# define POSTDECR 327 +# define PREDECR 328 +# define VAR 329 +# define IVAR 330 +# define VARNF 331 +# define CALL 332 +# define NUMBER 333 +# define STRING 334 +# define REGEXPR 335 +# define GETLINE 336 +# define RETURN 337 +# define SPLIT 338 +# define SUBSTR 339 +# define WHILE 340 +# define CAT 341 +# define NOT 342 +# define UMINUS 343 +# define POWER 344 +# define DECR 345 +# define INCR 346 +# define INDIRECT 347 +# define LASTTOKEN 348 +#define yyclearin yychar = -1 +#define yyerrok yyerrflag = 0 +extern int yychar; +#ifndef YYMAXDEPTH +#define YYMAXDEPTH 150 #endif -YYSTYPE yylval; -YYSTYPE yyval; -#define FIRSTTOKEN 57346 -#define PROGRAM 57347 -#define PASTAT 57348 -#define PASTAT2 57349 -#define XBEGIN 57350 -#define XEND 57351 -#define NL 57352 -#define ARRAY 57353 -#define MATCH 57354 -#define NOTMATCH 57355 -#define MATCHOP 57356 -#define FINAL 57357 -#define DOT 57358 -#define ALL 57359 -#define CCL 57360 -#define NCCL 57361 -#define CHAR 57362 -#define OR 57363 -#define STAR 57364 -#define QUEST 57365 -#define PLUS 57366 -#define AND 57367 -#define BOR 57368 -#define APPEND 57369 -#define EQ 57370 -#define GE 57371 -#define GT 57372 -#define LE 57373 -#define LT 57374 -#define NE 57375 -#define IN 57376 -#define ARG 57377 -#define BLTIN 57378 -#define BREAK 57379 -#define CLOSE 57380 -#define CONTINUE 57381 -#define DELETE 57382 -#define DO 57383 -#define EXIT 57384 -#define FOR 57385 -#define FUNC 57386 -#define SUB 57387 -#define GSUB 57388 -#define IF 57389 -#define INDEX 57390 -#define LSUBSTR 57391 -#define MATCHFCN 57392 -#define NEXT 57393 -#define NEXTFILE 57394 -#define ADD 57395 -#define MINUS 57396 -#define MULT 57397 -#define DIVIDE 57398 -#define MOD 57399 -#define ASSIGN 57400 -#define ASGNOP 57401 -#define ADDEQ 57402 -#define SUBEQ 57403 -#define MULTEQ 57404 -#define DIVEQ 57405 -#define MODEQ 57406 -#define POWEQ 57407 -#define PRINT 57408 -#define PRINTF 57409 -#define SPRINTF 57410 -#define ELSE 57411 -#define INTEST 57412 -#define CONDEXPR 57413 -#define POSTINCR 57414 -#define PREINCR 57415 -#define POSTDECR 57416 -#define PREDECR 57417 -#define VAR 57418 -#define IVAR 57419 -#define VARNF 57420 -#define CALL 57421 -#define NUMBER 57422 -#define STRING 57423 -#define REGEXPR 57424 -#define GETLINE 57425 -#define RETURN 57426 -#define SPLIT 57427 -#define SUBSTR 57428 -#define WHILE 57429 -#define CAT 57430 -#define NOT 57431 -#define UMINUS 57432 -#define POWER 57433 -#define DECR 57434 -#define INCR 57435 -#define INDIRECT 57436 -#define LASTTOKEN 57437 -#define YYEOFCODE 1 -#define YYERRCODE 2 -#line 444 "awkgram.y" +/* __YYSCLASS defines the scoping/storage class for global objects + * that are NOT renamed by the -p option. By default these names + * are going to be 'static' so that multi-definition errors + * will not occur with multiple parsers. + * If you want (unsupported) access to internal names you need + * to define this to be null so it implies 'extern' scope. + * This should not be used in conjunction with -p. + */ +#ifndef __YYSCLASS +# define __YYSCLASS static +#endif +YYSTYPE yylval; +__YYSCLASS YYSTYPE yyval; +typedef int yytabelem; +# define YYERRCODE 256 + +/* # line 444 "awkgram.y" */ void setfname(Cell *p) @@ -165,1448 +190,2006 @@ void checkdup(Node *vl, Cell *cp) /* check if name already in list */ } } } -short yyexca[] = -{-1, 0, - 1, 28, - 8, 28, - 9, 28, - 12, 28, - 13, 28, - 16, 28, +__YYSCLASS yytabelem yyexca[] ={ +-1, 0, + 0, 28, + 261, 28, + 262, 28, + 123, 28, + 40, 28, + 47, 28, + 288, 28, + 289, 28, + 297, 28, + 298, 28, + 299, 28, + 301, 28, + 303, 28, + 321, 28, + 329, 28, + 330, 28, + 331, 28, + 332, 28, + 333, 28, + 334, 28, + 336, 28, + 338, 28, + 339, 28, + 43, 28, 45, 28, - 46, 28, - 54, 28, - 55, 28, - 56, 28, - 58, 28, - 60, 28, - 78, 28, - 86, 28, - 87, 28, - 88, 28, - 89, 28, - 90, 28, - 91, 28, - 95, 28, - 97, 28, - 98, 28, - 101, 28, - 102, 28, - 105, 28, - 108, 28, - 109, 28, - 110, 28, + 342, 28, + 345, 28, + 346, 28, + 347, 28, -2, 0, -1, 1, - 1, -1, + 0, -1, -2, 0, -1, 157, - 15, 30, + 59, 30, -2, 0, -1, 176, - 14, 0, - 24, 0, - 38, 0, - 39, 0, - 40, 0, - 41, 0, - 42, 0, - 43, 0, - 44, 0, + 124, 0, + 267, 0, + 281, 0, + 282, 0, + 283, 0, + 284, 0, + 285, 0, + 286, 0, + 287, 0, -2, 63, -1, 177, - 14, 0, - 24, 0, - 38, 0, - 39, 0, - 40, 0, - 41, 0, - 42, 0, - 43, 0, - 44, 0, + 124, 0, + 267, 0, + 281, 0, + 282, 0, + 283, 0, + 284, 0, + 285, 0, + 286, 0, + 287, 0, -2, 64, -1, 178, - 14, 0, - 24, 0, - 38, 0, - 39, 0, - 40, 0, - 41, 0, - 42, 0, - 43, 0, - 44, 0, + 124, 0, + 267, 0, + 281, 0, + 282, 0, + 283, 0, + 284, 0, + 285, 0, + 286, 0, + 287, 0, -2, 65, -1, 179, - 14, 0, - 24, 0, - 38, 0, - 39, 0, - 40, 0, - 41, 0, - 42, 0, - 43, 0, - 44, 0, + 124, 0, + 267, 0, + 281, 0, + 282, 0, + 283, 0, + 284, 0, + 285, 0, + 286, 0, + 287, 0, -2, 66, -1, 180, - 14, 0, - 24, 0, - 38, 0, - 39, 0, - 40, 0, - 41, 0, - 42, 0, - 43, 0, - 44, 0, + 124, 0, + 267, 0, + 281, 0, + 282, 0, + 283, 0, + 284, 0, + 285, 0, + 286, 0, + 287, 0, -2, 67, -1, 181, - 14, 0, - 24, 0, - 38, 0, - 39, 0, - 40, 0, - 41, 0, - 42, 0, - 43, 0, - 44, 0, + 124, 0, + 267, 0, + 281, 0, + 282, 0, + 283, 0, + 284, 0, + 285, 0, + 286, 0, + 287, 0, -2, 68, -1, 183, - 14, 0, - 24, 0, - 38, 0, - 39, 0, - 40, 0, - 41, 0, - 42, 0, - 43, 0, - 44, 0, + 124, 0, + 267, 0, + 281, 0, + 282, 0, + 283, 0, + 284, 0, + 285, 0, + 286, 0, + 287, 0, -2, 70, -1, 288, - 24, 0, - 44, 0, + 267, 0, + 287, 0, -2, 53, -1, 332, - 17, 30, + 41, 30, -2, 0, -1, 354, - 17, 30, + 41, 30, -2, 0, -}; -#define YYNPROD 184 -#define YYPRIVATE 57344 -#define YYLAST 4108 -short yyact[] = -{ - 17, 137, 112, 66, 155, 228, 199, 24, 276, 124, - 185, 105, 42, 53, 253, 110, 100, 138, 243, 103, - 104, 307, 214, 102, 100, 249, 100, 100, 100, 42, - 62, 121, 122, 123, 82, 11, 223, 83, 313, 9, - 42, 50, 253, 79, 80, 110, 10, 252, 232, 42, - 205, 268, 244, 41, 22, 43, 113, 103, 104, 142, - 113, 146, 103, 104, 133, 149, 150, 152, 153, 190, - 41, 233, 43, 163, 234, 100, 148, 23, 315, 277, - 11, 41, 22, 43, 85, 275, 156, 190, 253, 132, - 41, 22, 43, 168, 169, 16, 257, 351, 134, 350, - 100, 182, 109, 111, 349, 23, 112, 100, 100, 100, - 100, 100, 100, 100, 23, 190, 190, 320, 317, 319, - 330, 334, 323, 42, 140, 100, 202, 204, 190, 139, - 107, 108, 109, 111, 277, 210, 112, 211, 86, 190, - 274, 190, 100, 219, 218, 283, 100, 221, 190, 190, - 190, 311, 100, 226, 264, 259, 258, 156, 170, 167, - 158, 230, 190, 100, 41, 216, 43, 157, 188, 130, - 140, 129, 100, 236, 100, 309, 100, 100, 100, 100, - 100, 100, 100, 3, 100, 6, 251, 100, 100, 47, - 7, 6, 154, 128, 48, 127, 7, 126, 125, 120, - 20, 100, 119, 51, 16, 140, 100, 273, 100, 100, - 100, 217, 143, 100, 100, 270, 96, 144, 131, 316, - 4, 346, 360, 363, 114, 1, 116, 117, 118, 49, - 269, 72, 100, 100, 100, 100, 163, 39, 163, 163, - 163, 163, 224, 5, 163, 58, 100, 238, 287, 67, - 222, 291, 61, 60, 292, 100, 100, 293, 248, 81, - 8, 159, 160, 2, 0, 0, 0, 0, 0, 299, - 300, 0, 0, 165, 0, 96, 0, 0, 0, 308, - 0, 0, 100, 0, 0, 100, 100, 100, 0, 100, - 0, 100, 156, 0, 312, 0, 100, 0, 100, 100, - 116, 239, 100, 54, 100, 100, 100, 96, 193, 194, - 195, 196, 197, 198, 332, 163, 0, 0, 0, 333, - 0, 0, 19, 0, 0, 206, 340, 156, 341, 0, - 339, 0, 100, 0, 0, 0, 230, 100, 345, 100, - 0, 0, 96, 100, 100, 0, 96, 337, 115, 354, - 0, 347, 96, 0, 355, 358, 0, 136, 230, 0, - 359, 162, 156, 242, 0, 147, 238, 0, 361, 238, - 238, 238, 96, 238, 96, 238, 96, 96, 96, 96, - 96, 96, 96, 21, 96, 0, 0, 96, 96, 0, - 0, 0, 0, 0, 0, 164, 0, 0, 0, 0, - 0, 96, 0, 0, 0, 0, 260, 0, 96, 96, - 96, 0, 0, 96, 96, 0, 0, 0, 0, 0, - 239, 238, 0, 239, 239, 239, 0, 239, 0, 239, - 0, 0, 96, 278, 279, 280, 165, 136, 165, 165, - 165, 165, 0, 0, 165, 0, 96, 0, 220, 0, - 0, 0, 136, 0, 0, 96, 96, 166, 227, 0, - 0, 256, 74, 0, 0, 0, 0, 15, 0, 0, - 0, 0, 136, 136, 0, 239, 0, 0, 184, 0, - 0, 106, 242, 0, 0, 242, 242, 242, 0, 242, - 0, 242, 0, 0, 0, 0, 96, 0, 96, 96, - 0, 0, 96, 0, 96, 96, 96, 0, 0, 0, - 0, 0, 15, 0, 15, 165, 0, 0, 0, 141, - 0, 0, 145, 0, 0, 0, 272, 0, 151, 0, - 0, 0, 96, 0, 0, 0, 0, 242, 0, 96, - 0, 229, 0, 96, 96, 0, 0, 171, 173, 175, - 176, 177, 178, 179, 180, 181, 183, 0, 164, 0, - 164, 164, 164, 164, 186, 187, 164, 189, 191, 0, - 0, 0, 0, 136, 0, 0, 200, 0, 0, 0, - 0, 0, 200, 200, 0, 0, 0, 0, 207, 208, - 209, 200, 212, 213, 0, 0, 0, 281, 0, 284, - 285, 286, 288, 0, 0, 290, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 231, 235, 0, 106, 289, 0, 0, 0, 0, - 245, 0, 0, 0, 0, 0, 296, 164, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 302, 0, 0, - 356, 136, 254, 0, 255, 140, 0, 0, 18, 310, - 139, 44, 0, 0, 362, 0, 0, 364, 0, 261, - 262, 263, 0, 265, 266, 267, 336, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 42, 28, 0, 0, 0, 0, 0, 335, 189, 0, - 45, 46, 0, 33, 0, 34, 0, 200, 0, 0, - 294, 0, 0, 295, 0, 0, 0, 0, 0, 297, - 0, 0, 0, 37, 298, 301, 0, 0, 303, 304, - 305, 41, 22, 43, 29, 35, 38, 0, 0, 0, - 32, 0, 36, 40, 0, 106, 27, 26, 0, 0, - 25, 0, 0, 30, 31, 23, 0, 0, 0, 75, - 0, 0, 0, 0, 322, 325, 327, 328, 0, 16, - 18, 331, 68, 44, 189, 357, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 338, 0, 0, 0, 0, - 0, 342, 0, 343, 0, 0, 0, 0, 0, 0, - 0, 0, 42, 28, 55, 56, 57, 73, 69, 59, - 70, 0, 45, 46, 71, 33, 0, 34, 63, 64, - 0, 0, 0, 0, 0, 0, 0, 0, 75, 0, - 0, 0, 0, 77, 78, 37, 52, 0, 16, 18, - 0, 68, 44, 41, 22, 43, 29, 35, 38, 0, - 0, 0, 32, 65, 36, 40, 76, 0, 27, 26, - 0, 0, 25, 0, 0, 30, 31, 23, 0, 0, - 0, 42, 28, 55, 56, 57, 73, 69, 59, 70, - 0, 45, 46, 71, 33, 0, 34, 63, 64, 0, - 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, - 0, 0, 77, 78, 37, 16, 18, 0, 68, 44, - 0, 306, 41, 22, 43, 29, 35, 38, 0, 0, - 0, 32, 65, 36, 40, 76, 0, 27, 26, 0, - 0, 25, 0, 0, 30, 31, 23, 0, 42, 28, - 55, 56, 57, 73, 69, 59, 70, 0, 45, 46, - 71, 33, 0, 34, 63, 64, 0, 0, 0, 0, - 0, 0, 0, 0, 75, 0, 0, 0, 0, 77, - 78, 37, 271, 0, 16, 18, 0, 68, 44, 41, - 22, 43, 29, 35, 38, 0, 0, 0, 32, 65, - 36, 40, 76, 0, 27, 26, 0, 0, 25, 0, - 0, 30, 31, 23, 0, 0, 0, 42, 28, 55, - 56, 57, 73, 69, 59, 70, 0, 45, 46, 71, - 33, 0, 34, 63, 64, 0, 0, 0, 0, 0, - 0, 75, 0, 0, 0, 0, 0, 0, 77, 78, - 37, 16, 18, 0, 68, 44, 0, 247, 41, 22, - 43, 29, 35, 38, 0, 0, 0, 32, 65, 36, - 40, 76, 0, 27, 26, 0, 0, 25, 0, 0, - 30, 31, 23, 0, 42, 28, 55, 56, 57, 73, - 69, 59, 70, 0, 45, 46, 71, 33, 0, 34, - 63, 64, 0, 0, 0, 0, 0, 0, 75, 0, - 0, 0, 0, 0, 0, 77, 78, 37, 16, 18, - 0, 68, 44, 0, 246, 41, 22, 43, 29, 35, - 38, 0, 0, 0, 32, 65, 36, 40, 76, 0, - 27, 26, 0, 0, 25, 0, 0, 30, 31, 23, - 0, 42, 28, 55, 56, 57, 73, 69, 59, 70, - 0, 45, 46, 71, 33, 0, 34, 63, 64, 0, - 0, 0, 0, 0, 0, 75, 0, 0, 0, 0, - 0, 0, 77, 78, 37, 16, 18, 0, 68, 44, - 0, 225, 41, 22, 43, 29, 35, 38, 0, 0, - 0, 32, 65, 36, 40, 76, 0, 27, 26, 0, - 0, 25, 0, 0, 30, 31, 23, 0, 42, 28, - 55, 56, 57, 73, 69, 59, 70, 0, 45, 46, - 71, 33, 0, 34, 63, 64, 0, 0, 0, 0, - 0, 0, 75, 0, 0, 0, 0, 0, 0, 77, - 78, 37, 16, 18, 0, 68, 44, 0, 215, 41, - 22, 43, 29, 35, 38, 0, 0, 0, 32, 65, - 36, 40, 76, 0, 27, 26, 0, 0, 25, 0, - 0, 30, 31, 23, 0, 42, 28, 55, 56, 57, - 73, 69, 59, 70, 0, 45, 46, 71, 33, 0, - 34, 63, 64, 0, 0, 0, 0, 0, 0, 75, - 0, 0, 0, 0, 0, 0, 77, 78, 37, 16, - 18, 0, 68, 44, 0, 135, 41, 22, 43, 29, - 35, 38, 0, 0, 0, 32, 65, 36, 40, 76, - 0, 27, 26, 0, 0, 25, 0, 0, 30, 31, - 23, 0, 42, 28, 55, 56, 57, 73, 69, 59, - 70, 0, 45, 46, 71, 33, 0, 34, 63, 64, - 0, 0, 0, 0, 0, 0, 75, 0, 0, 0, - 0, 0, 0, 77, 78, 37, 16, 18, 0, 68, - 44, 0, 0, 41, 22, 43, 29, 35, 38, 0, - 0, 0, 32, 65, 36, 40, 76, 0, 27, 26, - 0, 0, 25, 0, 0, 30, 31, 23, 0, 42, - 28, 55, 56, 57, 73, 69, 59, 70, 0, 45, - 46, 71, 33, 0, 34, 63, 64, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 77, 78, 37, 0, 0, 0, 0, 0, 0, 0, - 41, 22, 43, 29, 35, 38, 0, 0, 0, 32, - 65, 36, 40, 76, 0, 27, 26, 0, 0, 25, - 0, 0, 30, 31, 23, 190, 0, 101, 95, 0, - 0, 329, 0, 0, 0, 0, 0, 0, 93, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, - 97, 0, 87, 88, 89, 90, 91, 92, 94, 42, - 28, 0, 0, 0, 0, 0, 0, 0, 0, 45, - 46, 0, 33, 0, 34, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, - 41, 22, 43, 29, 35, 38, 0, 84, 0, 32, - 0, 36, 40, 0, 0, 27, 26, 0, 0, 99, - 0, 0, 30, 31, 23, 190, 0, 101, 95, 0, - 0, 326, 0, 0, 0, 0, 0, 0, 93, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, - 97, 0, 87, 88, 89, 90, 91, 92, 94, 42, - 28, 0, 0, 0, 0, 0, 0, 0, 0, 45, - 46, 0, 33, 0, 34, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, - 41, 22, 43, 29, 35, 38, 0, 84, 0, 32, - 0, 36, 40, 0, 0, 27, 26, 0, 0, 99, - 0, 0, 30, 31, 23, 190, 0, 101, 95, 0, - 0, 324, 0, 0, 0, 0, 0, 0, 93, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 98, - 97, 0, 87, 88, 89, 90, 91, 92, 94, 42, - 28, 0, 0, 0, 0, 0, 0, 0, 0, 45, - 46, 0, 33, 0, 34, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, - 41, 22, 43, 29, 35, 38, 0, 84, 0, 32, - 0, 36, 40, 0, 0, 27, 26, 0, 0, 99, - 0, 0, 30, 31, 23, 140, 0, 0, 101, 95, - 139, 0, 0, 0, 0, 0, 0, 0, 0, 93, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 98, 97, 0, 87, 88, 89, 90, 91, 92, 94, - 42, 28, 0, 0, 0, 0, 0, 0, 0, 0, - 45, 46, 0, 33, 0, 34, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, - 0, 41, 22, 43, 29, 35, 38, 0, 84, 0, - 32, 0, 36, 40, 0, 0, 27, 26, 0, 0, - 99, 0, 0, 30, 31, 23, 190, 0, 101, 95, - 0, 0, 192, 0, 0, 0, 0, 0, 0, 93, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 98, 97, 0, 87, 88, 89, 90, 91, 92, 94, - 42, 28, 0, 0, 0, 0, 0, 0, 0, 0, - 45, 46, 0, 33, 0, 34, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, - 0, 41, 22, 43, 29, 35, 38, 0, 84, 0, - 32, 0, 36, 40, 0, 0, 27, 26, 101, 95, - 99, 0, 353, 30, 31, 23, 0, 0, 0, 93, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 98, 97, 0, 87, 88, 89, 90, 91, 92, 94, - 42, 28, 0, 0, 0, 0, 0, 0, 0, 0, - 45, 46, 0, 33, 0, 34, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, - 0, 41, 22, 43, 29, 35, 38, 0, 84, 0, - 32, 0, 36, 40, 0, 0, 27, 26, 101, 95, - 99, 0, 352, 30, 31, 23, 0, 0, 0, 93, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 98, 97, 0, 87, 88, 89, 90, 91, 92, 94, - 42, 28, 0, 0, 0, 0, 0, 0, 0, 0, - 45, 46, 0, 33, 0, 34, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, - 0, 41, 22, 43, 29, 35, 38, 0, 84, 0, - 32, 0, 36, 40, 0, 0, 27, 26, 101, 95, - 99, 0, 348, 30, 31, 23, 0, 0, 0, 93, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 98, 97, 0, 87, 88, 89, 90, 91, 92, 94, - 42, 28, 0, 0, 0, 0, 0, 0, 0, 0, - 45, 46, 0, 33, 0, 34, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, - 0, 41, 22, 43, 29, 35, 38, 0, 84, 0, - 32, 0, 36, 40, 0, 0, 27, 26, 0, 0, - 99, 0, 0, 30, 31, 23, 101, 95, 344, 0, - 0, 0, 0, 0, 0, 0, 0, 93, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 98, 97, - 0, 87, 88, 89, 90, 91, 92, 94, 42, 28, - 0, 0, 0, 0, 0, 0, 0, 0, 45, 46, - 0, 33, 0, 34, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 37, 0, 0, 0, 0, 0, 0, 0, 41, - 22, 43, 29, 35, 38, 0, 84, 0, 32, 0, - 36, 40, 0, 0, 27, 26, 101, 95, 99, 0, - 321, 30, 31, 23, 0, 0, 0, 93, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 98, 97, - 0, 87, 88, 89, 90, 91, 92, 94, 42, 28, - 0, 0, 0, 0, 0, 0, 0, 0, 45, 46, - 0, 33, 0, 34, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 37, 0, 0, 0, 0, 0, 0, 0, 41, - 22, 43, 29, 35, 38, 0, 84, 0, 32, 0, - 36, 40, 0, 0, 27, 26, 101, 95, 99, 0, - 318, 30, 31, 23, 0, 0, 0, 93, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 98, 97, - 0, 87, 88, 89, 90, 91, 92, 94, 42, 28, - 0, 0, 0, 0, 0, 0, 0, 0, 45, 46, - 0, 33, 0, 34, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 37, 0, 0, 0, 0, 0, 0, 0, 41, - 22, 43, 29, 35, 38, 0, 84, 0, 32, 0, - 36, 40, 0, 0, 27, 26, 101, 95, 99, 0, - 277, 30, 31, 23, 0, 0, 0, 93, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 98, 97, - 0, 87, 88, 89, 90, 91, 92, 94, 42, 28, - 0, 0, 0, 0, 0, 0, 0, 0, 45, 46, - 0, 33, 0, 34, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 37, 0, 0, 0, 0, 0, 0, 0, 41, - 22, 43, 29, 35, 38, 0, 84, 0, 32, 0, - 36, 40, 0, 0, 27, 26, 0, 190, 99, 101, - 95, 30, 31, 23, 0, 0, 0, 0, 0, 0, - 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 98, 97, 0, 87, 88, 89, 90, 91, 92, - 94, 42, 28, 0, 0, 0, 0, 0, 0, 0, - 0, 45, 46, 0, 33, 0, 34, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, - 0, 0, 41, 22, 43, 29, 35, 38, 0, 84, - 0, 32, 0, 36, 40, 0, 0, 27, 26, 101, - 95, 99, 0, 192, 30, 31, 23, 0, 0, 0, - 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 98, 97, 0, 87, 88, 89, 90, 91, 92, - 94, 42, 28, 0, 0, 0, 0, 0, 0, 0, - 0, 45, 46, 0, 33, 0, 34, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, - 0, 0, 41, 22, 43, 29, 35, 38, 0, 84, - 0, 32, 0, 36, 40, 0, 0, 27, 26, 101, - 95, 99, 0, 0, 30, 31, 23, 0, 0, 0, - 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 98, 97, 0, 87, 88, 89, 90, 91, 92, - 94, 42, 28, 0, 0, 0, 0, 0, 0, 0, - 0, 45, 46, 0, 33, 0, 34, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, - 0, 0, 41, 22, 43, 29, 35, 38, 0, 84, - 250, 32, 0, 36, 40, 0, 0, 27, 26, 101, - 95, 99, 0, 0, 30, 31, 23, 0, 0, 0, - 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 98, 97, 0, 87, 88, 89, 90, 91, 92, - 94, 42, 28, 0, 0, 0, 0, 0, 0, 0, - 0, 45, 46, 0, 33, 0, 34, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, - 0, 0, 41, 22, 43, 29, 35, 38, 0, 84, - 0, 32, 0, 36, 40, 0, 0, 27, 26, 101, - 95, 99, 0, 0, 30, 31, 23, 0, 0, 0, - 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 98, 0, 0, 87, 88, 89, 90, 91, 92, - 94, 42, 28, 0, 0, 0, 0, 0, 0, 0, - 0, 45, 46, 0, 33, 0, 34, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, - 0, 0, 41, 22, 43, 29, 35, 38, 101, 95, - 0, 32, 0, 36, 40, 0, 0, 27, 26, 93, - 0, 99, 0, 0, 30, 31, 23, 0, 0, 0, - 0, 0, 0, 87, 88, 89, 90, 91, 92, 94, - 42, 28, 0, 0, 0, 0, 0, 0, 0, 0, - 45, 46, 0, 33, 0, 34, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 37, 0, 0, 101, 0, 0, 0, - 0, 41, 22, 43, 29, 35, 38, 240, 0, 0, - 32, 0, 36, 40, 0, 0, 27, 26, 98, 97, - 99, 0, 0, 30, 31, 23, 0, 241, 42, 28, - 0, 0, 0, 0, 0, 0, 0, 0, 45, 46, - 0, 33, 0, 34, 0, 0, 75, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, - 44, 37, 0, 0, 0, 0, 0, 0, 0, 41, - 22, 43, 29, 35, 38, 0, 237, 314, 32, 0, - 36, 40, 0, 0, 27, 26, 0, 0, 99, 42, - 28, 30, 31, 23, 73, 0, 0, 0, 0, 45, - 46, 0, 33, 0, 34, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 77, 78, 37, 0, 0, 101, 0, 0, 0, 0, - 41, 22, 43, 29, 35, 38, 240, 0, 0, 32, - 0, 36, 40, 0, 0, 27, 26, 98, 97, 25, - 0, 0, 30, 31, 23, 0, 241, 42, 28, 0, - 0, 0, 0, 0, 0, 0, 0, 45, 46, 0, - 33, 0, 34, 0, 0, 0, 0, 0, 12, 13, - 0, 0, 16, 18, 0, 0, 44, 0, 0, 0, - 37, 0, 0, 0, 0, 0, 0, 0, 41, 22, - 43, 29, 35, 38, 0, 237, 0, 32, 0, 36, - 40, 0, 0, 27, 26, 42, 28, 99, 0, 0, - 30, 31, 23, 0, 14, 45, 46, 0, 33, 0, - 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, - 0, 101, 0, 0, 0, 0, 41, 22, 43, 29, - 35, 38, 240, 0, 0, 32, 0, 36, 40, 0, - 0, 27, 26, 98, 0, 25, 0, 0, 30, 31, - 23, 0, 241, 42, 28, 0, 0, 0, 0, 0, - 0, 0, 0, 45, 46, 0, 33, 0, 34, 0, - 0, 0, 0, 0, 0, 0, 253, 0, 0, 18, - 0, 0, 44, 0, 0, 0, 37, 0, 0, 0, - 0, 0, 0, 0, 41, 22, 43, 29, 35, 38, - 0, 0, 0, 32, 101, 36, 40, 0, 0, 27, - 26, 42, 28, 99, 0, 240, 30, 31, 23, 0, - 0, 45, 46, 0, 33, 0, 34, 0, 0, 0, - 0, 0, 0, 0, 0, 241, 42, 28, 0, 0, - 0, 0, 0, 0, 37, 0, 45, 46, 0, 33, - 0, 34, 41, 22, 43, 29, 35, 38, 0, 174, - 0, 32, 282, 36, 40, 44, 0, 27, 26, 37, - 0, 25, 0, 0, 30, 31, 23, 41, 22, 43, - 29, 35, 38, 0, 172, 0, 32, 282, 36, 40, - 44, 0, 27, 26, 42, 28, 99, 0, 0, 30, - 31, 23, 0, 0, 45, 46, 0, 33, 0, 34, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, - 28, 0, 0, 0, 0, 0, 0, 37, 0, 45, - 46, 0, 33, 0, 34, 41, 22, 43, 29, 35, - 38, 0, 253, 0, 32, 282, 36, 40, 44, 0, - 27, 26, 37, 0, 25, 0, 0, 30, 31, 23, - 41, 22, 43, 29, 35, 38, 0, 0, 0, 32, - 18, 36, 40, 44, 203, 27, 26, 42, 28, 25, - 0, 0, 30, 31, 23, 0, 0, 45, 46, 0, - 33, 0, 34, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 42, 28, 0, 0, 0, 0, 0, 0, - 37, 0, 45, 46, 0, 33, 0, 34, 41, 22, - 43, 29, 35, 38, 0, 0, 0, 32, 18, 36, - 40, 44, 201, 27, 26, 37, 0, 25, 0, 0, - 30, 31, 23, 41, 22, 43, 29, 35, 38, 0, - 174, 0, 32, 18, 36, 40, 44, 0, 27, 26, - 42, 28, 25, 0, 0, 30, 31, 23, 0, 0, - 45, 46, 0, 33, 0, 34, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 42, 28, 0, 0, 0, - 0, 0, 0, 37, 0, 45, 46, 0, 33, 0, - 34, 41, 22, 43, 29, 35, 38, 0, 172, 0, - 32, 18, 36, 40, 44, 0, 27, 26, 37, 0, - 25, 0, 0, 30, 31, 23, 41, 22, 43, 29, - 35, 38, 0, 0, 0, 32, 18, 36, 40, 44, - 0, 27, 26, 42, 28, 25, 0, 0, 30, 31, - 23, 0, 0, 45, 46, 0, 33, 0, 34, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 42, 28, - 0, 0, 0, 0, 0, 0, 37, 0, 45, 46, - 0, 33, 0, 34, 41, 22, 43, 29, 35, 38, - 0, 0, 0, 32, 282, 36, 40, 44, 0, 27, - 26, 37, 0, 25, 0, 0, 30, 31, 23, 41, - 22, 43, 29, 35, 38, 0, 0, 0, 32, 161, - 36, 40, 44, 0, 27, 26, 42, 28, 25, 0, - 0, 30, 31, 23, 0, 0, 45, 46, 0, 33, - 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 42, 28, 0, 0, 0, 0, 0, 0, 37, - 0, 45, 46, 0, 33, 0, 34, 41, 22, 43, - 29, 35, 38, 0, 0, 0, 32, 101, 36, 40, - 44, 0, 27, 26, 37, 0, 25, 0, 0, 30, - 31, 23, 41, 22, 43, 29, 35, 38, 0, 0, - 0, 32, 101, 36, 40, 0, 0, 27, 26, 42, - 28, 25, 0, 0, 30, 31, 23, 0, 0, 45, - 46, 0, 33, 0, 34, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 42, 28, 0, 0, 0, 0, - 0, 0, 37, 0, 45, 46, 0, 33, 0, 34, - 41, 22, 43, 29, 35, 38, 0, 0, 0, 32, - 101, 36, 40, 0, 0, 27, 26, 37, 0, 25, - 0, 0, 30, 31, 23, 41, 22, 43, 29, 35, - 38, 0, 0, 0, 32, 0, 36, 40, 0, 0, - 27, 26, 42, 28, 99, 0, 0, 30, 31, 23, - 0, 0, 45, 46, 0, 33, 0, 34, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, - 0, 0, 0, 41, 22, 43, 29, 35, 38, 0, - 0, 0, 0, 0, 36, 40, 0, 0, 27, 26, - 0, 0, 99, 0, 0, 30, 31, 23 -}; -short yypact[] = -{ - 181,-1000,-1000,-1000,3290, 179,-1000,-1000, 175,-1000, - 192, 826, 83, 83, -52,2866,-1000, -46,3773,-1000, - 29, 37,-1000,3939,-1000,3914,3939,3939, 189, 186, - -5, -5, -33, 185, 184,-1000, 182, 180,-1000, 158, - 156,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,3290, - 826,3773,-1000,1297,-1000, 114,3773, 114, 202, 645, --1000,1364, 826, 114, 114, 645, 114,-1000, 195,-1000, - 154, 147,3856, -16,2866,-1000, 146,-1000,-1000, 826, - 826, 145,-1000,-1000,3773,3748,3690,3773,3773,3773, -3773,3773,3773,3773, -16, -85, 29,-1000,-1000,3939, - -89,3773,3773,-1000,-1000, 151,1865,3939,3939,3939, -3939,3939,3939,3773,-1000,-1000,-105,-105,-105,3665, -3607,-1000,-1000, 8,3939,3773,3773,3773,3773,3773, -3773, -70,-1000,1230, 83,-1000,-1000,-1000, 201, 195, --1000,1765,-1000,-1000,1364,1765,-1000, -43,1163,-1000, --1000,1765,-1000,-1000,1364,-1000, 201,3164,3773, 34, - 130,3773,3232, -51,-1000, 29, 33,3773,1096,1029, - -61,2776,-1000,2956,-1000,3035,3997,3997,3997,3997, -3997,3997,-1000,3997,-1000, -5,2686,2866, 3,3416, --1000,3416,-1000, -1, -1,-105,-105,-105,-105, 76, -2866,-1000, 139,-1000, 138,3939, 29,2596,2596,2596, - 137, 130,2596,2596, 35,-1000, 826,-1000,-1000,-1000, --1000,-1000, 962,-1000, 197,-1000,-1000,-1000, 125, 41, --1000,2503,3939,3939,3939,3582, 128,3831,3524,3499, -3831, -16, 29,3831,3773,2503,-1000,-1000, 117,-1000, -3773,-1000, -16,-1000,2866,2866,3416,-1000,-1000,-1000, - 29,3416,3416, 78,-1000,3416,3416,3416,-1000, 893, - -78,-1000,-1000,-1000, 160, -16, 141,-1000, 29, 29, - 29,3232,3773, -6,3103,3358,3441,-1000,3997,-1000, -3232, 58, 141, 141, 32,2866,-1000,2866,2413, 102, - 100,2323, 105,1664,1564,1464,-1000, 107,3773, 195, - 62,-1000, 104, -16,3831,-1000, 83,-1000,-1000,-1000, --1000,-1000,3416,-1000,-1000, 4,-1000, 4,3416,-1000, -3773,2233,3164, 141, -6,-1000,3232, 826,2135, 87, - 82, 80,2045,1955, 195, 62,1364, 757,-1000,-1000, --1000,-1000,-1000, 114,3164, 141,-1000,-1000,-1000, 62, -1364, 141,-1000,1364,-1000 -}; -short yypgo[] = -{ - 0, 263, 462, 361, 11, 262, 6, 261, 200, 322, - 46, 39, 260, 7, 3, 5, 303, 13, 0, 383, - 259, 258, 253, 252, 250, 249, 245, 1, 243, 220, - 30, 242, 8, 461, 17, 4, 138, 84, 237, 231, - 225, 223, 222, 221, 219, 218, 217, 215, 192 -}; -short yyr1[] = -{ - 0, 40, 40, 36, 36, 37, 37, 33, 33, 26, - 26, 24, 24, 41, 22, 42, 22, 43, 22, 20, - 20, 23, 30, 30, 34, 34, 35, 35, 29, 29, - 15, 15, 1, 1, 10, 11, 11, 11, 11, 11, - 11, 11, 44, 11, 12, 12, 6, 6, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, - 5, 5, 7, 7, 7, 39, 39, 28, 28, 28, - 28, 31, 31, 9, 9, 45, 13, 32, 32, 14, - 14, 14, 14, 14, 14, 14, 14, 27, 27, 16, - 16, 16, 46, 47, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 48, 16, 16, 17, - 17, 38, 38, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 18, 18, 18, 18, 21, 21, 21, - 19, 19, 19, 25 -}; -short yyr2[] = -{ - 0, 1, 1, 1, 2, 1, 2, 1, 2, 1, - 2, 1, 2, 0, 12, 0, 10, 0, 8, 1, - 1, 4, 1, 2, 1, 2, 0, 1, 0, 1, - 0, 1, 1, 3, 1, 1, 4, 3, 6, 3, - 4, 4, 0, 9, 1, 3, 1, 3, 3, 5, - 3, 3, 3, 3, 3, 5, 2, 1, 1, 3, - 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 5, 4, 3, 2, 1, 1, 3, 3, - 1, 3, 0, 1, 3, 1, 1, 1, 1, 2, - 2, 1, 2, 1, 2, 0, 4, 1, 2, 4, - 4, 4, 2, 5, 2, 1, 1, 1, 2, 2, - 3, 2, 0, 0, 9, 3, 2, 1, 4, 2, - 3, 2, 2, 3, 2, 2, 0, 3, 2, 1, - 2, 1, 1, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 3, 4, 1, 3, 4, 2, 2, 2, - 2, 4, 3, 2, 1, 6, 6, 3, 6, 6, - 1, 8, 8, 6, 4, 1, 6, 6, 8, 8, - 8, 6, 1, 1, 4, 1, 2, 0, 1, 3, - 1, 1, 1, 4 -}; -short yychk[] = -{ --1000, -40, -1, 2, -29, -28, 10, 15, -12, -11, - -10, -30, 8, 9, 54, -2, 12, -18, 13, -9, - -8, -19, 87, 110, -13, 105, 102, 101, 46, 89, - 108, 109, 95, 58, 60, 90, 97, 78, 91, -38, - 98, 86, 45, 88, 16, 55, 56, 10, 15, -29, - -30, 11, 10, -17, -16, 47, 48, 49, -26, 52, - -22, -23, -30, 61, 62, 96, -14, -25, 15, 51, - 53, 57, -39, 50, -2, 2, 99, 76, 77, -30, - -30, -20, 86, 89, 93, -37, -36, 38, 39, 40, - 41, 42, 43, 24, 44, 14, -8, 36, 35, 105, - -18, 13, 69, 108, 109, -4, -2, 101, 102, 103, - 16, 104, 107, 19, -8, -9, -8, -8, -8, 13, - 13, -18, -18, -18, 42, 13, 13, 13, 13, 13, - 13, -45, -11, -17, -10, 18, -16, -27, -34, 15, - 10, -2, -27, 10, -46, -2, -27, -16, -17, -27, - -27, -2, -27, -27, -48, -35, -34, 13, 13, -7, - -5, 13, -3, -18, -9, -8, -19, 13, -17, -17, - 13, -2, 10, -2, 10, -2, -2, -2, -2, -2, - -2, -2, -13, -2, -19, 95, -2, -2, 17, -33, - 11, -33, 17, -8, -8, -8, -8, -8, -8, -6, - -2, 17, -6, 17, -6, 42, -8, -2, -2, -2, - -6, -13, -2, -2, 92, 18, -30, 10, -35, -27, - -16, -27, -24, 79, -31, 18, -27, -16, -15, -19, - -14, -2, 14, 37, 40, -33, -4, 93, -37, -36, - 24, 44, -8, 69, 19, -2, 18, 18, -21, 86, - 94, -18, 44, 10, -2, -2, -33, 20, 17, 17, - -8, -33, -33, -33, 17, -33, -33, -33, 16, -17, - -47, 10, -16, 10, 15, 44, -32, 17, -8, -8, - -8, -3, 13, 17, -3, -3, -3, -13, -3, -19, - -3, -6, -32, -32, -33, -2, -19, -2, -2, -13, - -13, -2, -19, -2, -2, -2, 18, 99, -35, 15, - -19, 10, -4, 44, 94, 20, -44, 86, 17, 17, - 17, 17, -33, 17, 17, -33, 17, -33, -33, 17, - 13, -2, -35, -32, 17, -19, -3, -30, -2, -13, - -18, -18, -2, -2, 15, -15, -43, -17, 17, 17, - 17, 17, 17, 17, -35, -32, -16, 18, -27, -15, - -42, -32, -16, -41, -16 -}; -short yydef[] = -{ - -2, -2, 1, 2, 32, 29, 87, 88, 28, 44, - 35, 0, 0, 0, 0, 34, 22, 172, 0, 76, - 77, 173, 175, 0, 93, 0, 0, 0, 144, 0, - 0, 0, 154, 0, 0, 160, 0, 0, 165, 0, - 0, 180, 181, 182, 95, 131, 132, 89, 90, 33, - 0, 0, 23, 0, 129, 0, 0, 0, 112, 0, - 117, 0, 0, 0, 0, 0, 0, 126, 26, 9, - 0, 0, 82, 0, 105, 106, 0, 85, 86, 0, - 0, 0, 19, 20, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 75, 5, 3, 0, - 172, 0, 0, 149, 150, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 176, 94, 141, 139, 140, 0, - 0, 147, 148, 153, 0, 0, 0, 0, 0, 0, - 0, 0, 45, 0, 37, 39, 130, 109, 107, 26, - 24, 0, 111, 10, 0, 0, 116, 119, 0, 121, - 122, 0, 124, 125, 0, 128, 27, -2, 0, 102, - 83, 0, 80, 172, 57, 58, 104, 0, 0, 0, - 177, 0, 6, 61, 4, 62, -2, -2, -2, -2, - -2, -2, 69, -2, 71, 74, 0, 59, 0, 0, - 7, 0, 157, 133, 134, 135, 136, 137, 138, 0, - 46, 142, 0, 145, 0, 0, 152, 0, 0, 0, - 0, 93, 0, 0, 0, 36, 0, 25, 108, 110, - 113, 115, 0, 11, 120, 91, 123, 127, 0, 173, - 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 56, 0, 0, 0, 40, 41, 0, 178, - 0, 73, 0, 8, 79, 78, 0, 174, 143, 146, - 151, 0, 0, 0, 164, 0, 0, 0, 96, 0, - 0, 12, 118, 92, 26, 0, 21, 97, 99, 100, - 101, 81, 0, 84, 0, 50, 51, 52, -2, 54, - 48, 0, 183, 42, 0, 60, 72, 47, 0, 93, - 93, 0, 0, 0, 0, 0, 38, 0, 0, 26, - 0, 98, 0, 0, 0, 103, 0, 179, 155, 156, - 158, 159, 0, 163, 166, 0, 167, 0, 0, 171, - 0, 0, -2, 17, 0, 55, 49, 0, 0, 93, - 0, 0, 0, 0, 26, 0, 0, 0, 161, 162, - 168, 169, 170, 0, -2, 15, 18, 43, 114, 0, - 0, 13, 16, 0, 14 -}; -short yytok1[] = -{ - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 104, 0, 0, - 13, 17, 103, 101, 11, 102, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 94, 15, - 0, 0, 0, 93, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 19, 0, 20, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 12, 14, 18 -}; -short yytok2[] = -{ - 2, 3, 4, 5, 6, 7, 8, 9, 10, 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, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 95, 96, 97, 98, 99, 100, 105, 106, 107, - 108, 109, 110, 111 -}; -long yytok3[] = -{ - 0 -}; -#define YYFLAG -1000 -#define YYERROR goto yyerrlab -#define YYACCEPT return(0) -#define YYABORT return(1) -#define yyclearin yychar = -1 -#define yyerrok yyerrflag = 0 + }; +# define YYNPROD 184 +# define YYLAST 4423 +__YYSCLASS yytabelem yyact[]={ -#ifdef yydebug -#include "y.debug" -#else -#define yydebug 0 -char* yytoknames[1]; /* for debugging */ -char* yystates[1]; /* for debugging */ + 17, 137, 66, 228, 253, 276, 243, 124, 138, 102, + 42, 103, 104, 111, 112, 42, 100, 155, 109, 107, + 307, 108, 185, 110, 100, 214, 100, 100, 100, 42, + 253, 121, 122, 123, 249, 82, 253, 42, 83, 103, + 104, 223, 103, 104, 313, 252, 113, 205, 232, 139, + 311, 41, 22, 43, 53, 42, 41, 22, 43, 142, + 7, 146, 309, 7, 48, 149, 150, 152, 153, 23, + 41, 22, 43, 163, 23, 100, 111, 156, 41, 140, + 43, 109, 85, 273, 217, 143, 110, 105, 23, 51, + 62, 16, 190, 244, 274, 11, 41, 113, 43, 10, + 100, 50, 317, 79, 80, 133, 190, 100, 100, 100, + 100, 100, 100, 100, 9, 268, 334, 148, 323, 190, + 277, 190, 190, 190, 283, 100, 264, 190, 259, 190, + 258, 190, 277, 190, 168, 169, 188, 351, 86, 190, + 11, 315, 100, 219, 350, 349, 100, 221, 156, 24, + 320, 134, 100, 226, 319, 257, 330, 218, 170, 167, + 230, 158, 157, 100, 132, 130, 129, 128, 16, 127, + 126, 125, 100, 120, 100, 119, 100, 100, 100, 100, + 100, 100, 100, 4, 100, 154, 251, 100, 100, 21, + 270, 144, 49, 131, 316, 346, 360, 363, 1, 72, + 20, 100, 199, 39, 233, 224, 100, 234, 100, 100, + 100, 5, 58, 100, 100, 67, 96, 222, 61, 60, + 248, 81, 8, 159, 114, 216, 116, 117, 118, 160, + 2, 0, 100, 100, 100, 100, 163, 0, 163, 163, + 163, 163, 275, 182, 163, 238, 100, 0, 0, 236, + 0, 292, 0, 140, 293, 100, 100, 3, 0, 0, + 0, 0, 0, 166, 6, 0, 140, 6, 47, 0, + 0, 269, 162, 165, 0, 96, 0, 0, 0, 211, + 0, 0, 100, 156, 184, 100, 100, 100, 0, 100, + 0, 100, 308, 0, 0, 0, 100, 0, 100, 100, + 116, 239, 100, 0, 100, 100, 100, 96, 193, 194, + 195, 196, 197, 198, 18, 163, 333, 27, 156, 26, + 112, 44, 202, 204, 0, 206, 340, 332, 341, 0, + 0, 210, 100, 68, 0, 230, 345, 100, 0, 100, + 0, 0, 96, 100, 100, 0, 96, 229, 0, 0, + 0, 355, 96, 156, 0, 358, 0, 230, 359, 0, + 0, 0, 354, 242, 238, 361, 0, 238, 238, 238, + 312, 238, 96, 238, 96, 0, 96, 96, 96, 96, + 96, 96, 96, 112, 96, 0, 18, 96, 96, 27, + 287, 26, 347, 44, 0, 0, 0, 16, 0, 357, + 0, 96, 0, 0, 0, 68, 260, 337, 96, 96, + 96, 299, 300, 96, 96, 0, 0, 0, 0, 238, + 239, 0, 0, 239, 239, 239, 0, 239, 0, 239, + 0, 289, 96, 278, 279, 280, 165, 0, 165, 165, + 165, 165, 296, 0, 165, 0, 96, 291, 0, 0, + 0, 0, 0, 302, 0, 96, 96, 18, 0, 0, + 27, 0, 26, 0, 44, 310, 0, 0, 0, 16, + 0, 0, 339, 0, 0, 239, 68, 0, 0, 0, + 0, 0, 242, 0, 0, 242, 242, 242, 19, 242, + 0, 242, 0, 0, 0, 0, 96, 0, 96, 96, + 0, 0, 96, 335, 96, 96, 96, 0, 281, 0, + 284, 285, 286, 288, 115, 165, 290, 18, 0, 0, + 27, 0, 26, 0, 44, 0, 0, 0, 0, 0, + 75, 0, 96, 0, 0, 0, 68, 242, 0, 96, + 16, 0, 306, 96, 96, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 164, 42, 28, 55, 56, 57, 73, 69, 59, + 70, 0, 45, 46, 71, 33, 0, 34, 63, 64, + 0, 0, 0, 0, 0, 0, 101, 336, 0, 27, + 0, 26, 0, 77, 78, 37, 0, 0, 0, 0, + 16, 0, 75, 41, 22, 43, 29, 35, 38, 52, + 32, 65, 36, 40, 76, 0, 25, 0, 0, 30, + 31, 23, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 42, 28, 55, 56, 57, 73, + 69, 59, 70, 0, 45, 46, 71, 33, 0, 34, + 63, 64, 0, 0, 0, 0, 18, 0, 0, 27, + 0, 26, 0, 44, 0, 77, 78, 37, 0, 0, + 0, 0, 0, 75, 0, 41, 22, 43, 29, 35, + 38, 0, 32, 65, 36, 40, 76, 0, 25, 0, + 0, 30, 31, 23, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 42, 28, 55, 56, 57, + 73, 69, 59, 70, 0, 45, 46, 71, 33, 0, + 34, 63, 64, 0, 164, 0, 164, 164, 164, 164, + 0, 0, 164, 75, 0, 0, 77, 78, 37, 0, + 271, 0, 0, 0, 0, 0, 41, 22, 43, 29, + 35, 38, 0, 32, 65, 36, 40, 76, 0, 25, + 0, 0, 30, 31, 23, 42, 28, 55, 56, 57, + 73, 69, 59, 70, 0, 45, 46, 71, 33, 0, + 34, 63, 64, 18, 0, 0, 27, 0, 26, 0, + 44, 0, 0, 0, 0, 0, 77, 78, 37, 0, + 0, 0, 68, 164, 0, 0, 41, 22, 43, 29, + 35, 38, 0, 32, 65, 36, 40, 76, 0, 25, + 0, 0, 30, 31, 23, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 42, 28, 0, 0, 0, 0, + 0, 0, 0, 18, 45, 46, 27, 33, 26, 34, + 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 68, 0, 0, 0, 16, 37, 247, 0, + 0, 0, 75, 0, 0, 41, 22, 43, 29, 35, + 38, 0, 32, 0, 36, 40, 0, 0, 99, 0, + 0, 30, 31, 23, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 18, 42, 28, 27, 0, 26, 73, + 44, 0, 0, 0, 45, 46, 0, 33, 0, 34, + 0, 0, 68, 0, 0, 0, 16, 0, 246, 0, + 0, 0, 0, 0, 0, 77, 78, 37, 0, 0, + 0, 0, 0, 0, 0, 41, 22, 43, 29, 35, + 38, 0, 32, 0, 36, 40, 0, 0, 25, 0, + 0, 30, 31, 23, 0, 0, 0, 0, 0, 0, + 18, 0, 0, 27, 0, 26, 0, 44, 0, 0, + 0, 0, 0, 0, 0, 0, 16, 0, 225, 68, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 42, 28, 55, 56, 57, 73, 69, 59, 70, + 0, 45, 46, 71, 33, 0, 34, 63, 64, 0, + 0, 0, 0, 16, 0, 215, 0, 0, 0, 75, + 0, 0, 77, 78, 37, 0, 0, 0, 0, 0, + 0, 256, 41, 22, 43, 29, 35, 38, 0, 32, + 65, 36, 40, 76, 0, 25, 0, 0, 30, 31, + 23, 42, 28, 55, 56, 57, 73, 69, 59, 70, + 0, 45, 46, 71, 33, 0, 34, 63, 64, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, + 0, 0, 77, 78, 37, 0, 0, 0, 0, 0, + 0, 0, 41, 22, 43, 29, 35, 38, 0, 32, + 65, 36, 40, 76, 0, 25, 0, 0, 30, 31, + 23, 42, 28, 55, 56, 57, 73, 69, 59, 70, + 0, 45, 46, 71, 33, 0, 34, 63, 64, 18, + 0, 0, 27, 0, 26, 0, 44, 189, 191, 0, + 0, 0, 77, 78, 37, 0, 75, 0, 68, 0, + 0, 0, 41, 22, 43, 29, 35, 38, 0, 32, + 65, 36, 40, 76, 0, 25, 0, 0, 30, 31, + 23, 0, 0, 0, 0, 0, 0, 0, 42, 28, + 55, 56, 57, 73, 69, 59, 70, 0, 45, 46, + 71, 33, 235, 34, 63, 64, 18, 0, 0, 27, + 0, 26, 0, 44, 0, 0, 0, 0, 0, 77, + 78, 37, 16, 0, 135, 68, 0, 0, 0, 41, + 22, 43, 29, 35, 38, 0, 32, 65, 36, 40, + 76, 0, 25, 0, 0, 30, 31, 23, 0, 261, + 262, 263, 0, 265, 266, 267, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 189, 0, + 101, 329, 0, 27, 190, 26, 0, 0, 0, 16, + 294, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 322, 325, 327, 328, 0, 0, + 0, 0, 0, 0, 189, 75, 101, 326, 0, 27, + 190, 26, 0, 0, 95, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, + 0, 0, 0, 0, 0, 0, 0, 42, 28, 55, + 56, 57, 73, 69, 59, 70, 0, 45, 46, 71, + 33, 0, 34, 63, 64, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 77, 78, + 37, 0, 75, 0, 0, 0, 0, 0, 41, 22, + 43, 29, 35, 38, 0, 32, 65, 36, 40, 76, + 95, 25, 0, 0, 30, 31, 23, 0, 0, 0, + 0, 0, 0, 0, 42, 28, 55, 56, 57, 73, + 69, 59, 70, 0, 45, 46, 71, 33, 0, 34, + 63, 64, 0, 0, 0, 0, 0, 0, 101, 324, + 0, 27, 190, 26, 0, 77, 78, 37, 0, 0, + 0, 0, 0, 0, 0, 41, 22, 43, 29, 35, + 38, 84, 32, 65, 36, 40, 76, 93, 25, 0, + 0, 30, 31, 23, 0, 0, 0, 0, 98, 97, + 0, 87, 88, 89, 90, 91, 92, 94, 42, 28, + 0, 0, 0, 0, 0, 0, 0, 0, 45, 46, + 0, 33, 0, 34, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 37, 95, 0, 0, 0, 0, 0, 0, 41, + 22, 43, 29, 35, 38, 0, 32, 0, 36, 40, + 0, 0, 99, 93, 0, 30, 31, 23, 101, 0, + 0, 27, 0, 26, 98, 97, 0, 87, 88, 89, + 90, 91, 92, 94, 42, 28, 0, 139, 0, 0, + 0, 84, 0, 0, 45, 46, 0, 33, 0, 34, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, + 0, 0, 0, 0, 0, 41, 22, 43, 29, 35, + 38, 0, 32, 0, 36, 40, 0, 0, 99, 0, + 0, 30, 31, 23, 101, 192, 0, 27, 190, 26, + 0, 0, 95, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 93, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 98, 97, 0, 87, + 88, 89, 90, 91, 92, 94, 42, 28, 0, 0, + 0, 0, 0, 0, 0, 0, 45, 46, 0, 33, + 0, 34, 0, 0, 0, 0, 0, 0, 95, 0, + 0, 0, 0, 0, 0, 101, 353, 0, 27, 37, + 26, 0, 0, 0, 0, 0, 0, 41, 22, 43, + 29, 35, 38, 0, 32, 0, 36, 40, 84, 0, + 99, 0, 0, 30, 31, 23, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 140, 0, 0, 0, 93, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 98, 97, 0, 87, + 88, 89, 90, 91, 92, 94, 42, 28, 0, 95, + 101, 352, 0, 27, 0, 26, 45, 46, 0, 33, + 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 84, 0, 0, 0, 0, 0, 37, + 0, 0, 0, 0, 0, 0, 0, 41, 22, 43, + 29, 35, 38, 0, 32, 0, 36, 40, 0, 0, + 99, 93, 0, 30, 31, 23, 0, 0, 0, 0, + 0, 0, 98, 97, 0, 87, 88, 89, 90, 91, + 92, 94, 42, 28, 0, 0, 0, 0, 0, 0, + 0, 0, 45, 46, 95, 33, 0, 34, 101, 348, + 0, 27, 0, 26, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, + 0, 84, 0, 41, 22, 43, 29, 35, 38, 0, + 32, 0, 36, 40, 0, 0, 99, 0, 0, 30, + 31, 23, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 93, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 98, 97, 0, 87, 88, 89, 90, + 91, 92, 94, 42, 28, 0, 0, 0, 0, 0, + 0, 0, 95, 45, 46, 0, 33, 0, 34, 0, + 101, 0, 0, 27, 0, 26, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 37, 0, 0, 344, + 0, 0, 0, 84, 41, 22, 43, 29, 35, 38, + 0, 32, 0, 36, 40, 0, 0, 99, 0, 0, + 30, 31, 23, 0, 0, 0, 0, 93, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 98, 97, + 0, 87, 88, 89, 90, 91, 92, 94, 42, 28, + 0, 0, 0, 0, 0, 0, 0, 0, 45, 46, + 0, 33, 0, 34, 95, 0, 0, 0, 0, 0, + 0, 0, 101, 321, 0, 27, 0, 26, 0, 0, + 0, 37, 0, 0, 0, 0, 0, 0, 0, 41, + 22, 43, 29, 35, 38, 84, 32, 0, 36, 40, + 0, 0, 99, 0, 0, 30, 31, 23, 0, 0, + 0, 0, 0, 0, 0, 93, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 98, 97, 0, 87, + 88, 89, 90, 91, 92, 94, 42, 28, 0, 0, + 0, 0, 0, 0, 0, 0, 45, 46, 0, 33, + 0, 34, 0, 0, 0, 0, 95, 0, 0, 0, + 101, 318, 0, 27, 0, 26, 0, 0, 0, 37, + 0, 0, 0, 0, 0, 0, 0, 41, 22, 43, + 29, 35, 38, 84, 32, 0, 36, 40, 0, 0, + 99, 0, 0, 30, 31, 23, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 93, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 98, 97, + 0, 87, 88, 89, 90, 91, 92, 94, 42, 28, + 0, 0, 0, 0, 0, 0, 0, 0, 45, 46, + 0, 33, 0, 34, 95, 101, 277, 0, 27, 0, + 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 37, 0, 0, 0, 0, 0, 0, 84, 41, + 22, 43, 29, 35, 38, 0, 32, 0, 36, 40, + 0, 0, 99, 0, 0, 30, 31, 23, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 98, 97, 0, 87, 88, 89, 90, 91, 92, 94, + 42, 28, 0, 0, 0, 0, 0, 0, 0, 95, + 45, 46, 0, 33, 0, 34, 101, 0, 0, 27, + 190, 26, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 37, 0, 0, 0, 0, 0, 84, + 0, 41, 22, 43, 29, 35, 38, 0, 32, 0, + 36, 40, 0, 0, 99, 0, 0, 30, 31, 23, + 0, 0, 0, 0, 0, 0, 0, 93, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 98, 97, + 0, 87, 88, 89, 90, 91, 92, 94, 42, 28, + 0, 0, 101, 192, 0, 27, 0, 26, 45, 46, + 95, 33, 0, 34, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 84, 0, 0, 0, 0, + 0, 37, 0, 0, 0, 0, 0, 0, 0, 41, + 22, 43, 29, 35, 38, 0, 32, 0, 36, 40, + 0, 0, 99, 0, 0, 30, 31, 23, 0, 0, + 0, 0, 93, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 98, 97, 0, 87, 88, 89, 90, + 91, 92, 94, 42, 28, 0, 95, 0, 0, 0, + 0, 0, 101, 45, 46, 27, 33, 26, 34, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 250, 0, 0, 0, 0, 84, 37, 0, 0, 0, + 0, 0, 0, 0, 41, 22, 43, 29, 35, 38, + 0, 32, 0, 36, 40, 0, 0, 99, 0, 0, + 30, 31, 23, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 93, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 98, 97, 0, 87, 88, 89, + 90, 91, 92, 94, 42, 28, 95, 0, 101, 0, + 0, 27, 0, 26, 45, 46, 0, 33, 0, 34, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 84, 0, 0, 0, 0, 0, 37, 0, 0, + 0, 0, 0, 0, 0, 41, 22, 43, 29, 35, + 38, 0, 32, 0, 36, 40, 0, 0, 99, 93, + 0, 30, 31, 23, 0, 0, 0, 0, 0, 0, + 98, 97, 0, 87, 88, 89, 90, 91, 92, 94, + 42, 28, 0, 0, 0, 0, 0, 0, 0, 0, + 45, 46, 95, 33, 101, 34, 0, 27, 0, 26, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, + 0, 41, 22, 43, 29, 35, 38, 0, 32, 0, + 36, 40, 0, 0, 99, 0, 0, 30, 31, 23, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 98, 97, 0, 87, 88, 89, 90, 91, 92, 94, + 42, 28, 0, 0, 0, 0, 0, 0, 95, 101, + 45, 46, 27, 33, 26, 34, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, + 0, 41, 22, 43, 29, 35, 38, 0, 32, 0, + 36, 40, 0, 0, 99, 54, 0, 30, 31, 23, + 0, 0, 0, 0, 0, 93, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 98, 97, 0, 87, + 88, 89, 90, 91, 92, 94, 42, 28, 0, 0, + 0, 0, 0, 95, 0, 0, 45, 46, 0, 33, + 0, 34, 0, 0, 0, 0, 0, 0, 0, 136, + 0, 0, 0, 0, 0, 0, 0, 147, 0, 37, + 0, 0, 0, 0, 0, 0, 0, 41, 22, 43, + 29, 35, 38, 0, 32, 0, 36, 40, 0, 0, + 99, 0, 0, 30, 31, 23, 0, 0, 0, 0, + 0, 93, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 98, 0, 0, 87, 88, 89, 90, 91, + 92, 94, 42, 28, 0, 0, 0, 0, 0, 0, + 0, 0, 45, 46, 0, 33, 0, 34, 0, 136, + 18, 0, 0, 27, 0, 26, 0, 44, 0, 0, + 220, 0, 0, 0, 136, 37, 0, 0, 0, 0, + 227, 0, 0, 41, 22, 43, 29, 35, 38, 0, + 32, 0, 36, 40, 136, 136, 99, 0, 0, 30, + 31, 23, 0, 0, 0, 0, 93, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 87, 88, 89, 90, 91, 92, 94, 42, 28, 0, + 0, 0, 0, 0, 0, 0, 0, 45, 46, 74, + 33, 0, 34, 16, 15, 0, 0, 0, 272, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 106, 0, + 37, 0, 0, 0, 0, 0, 0, 0, 41, 22, + 43, 29, 35, 38, 0, 32, 0, 36, 40, 0, + 0, 99, 0, 0, 30, 31, 23, 0, 0, 15, + 0, 15, 0, 0, 0, 136, 141, 101, 0, 145, + 27, 0, 26, 0, 0, 151, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 314, 0, 0, 0, 0, + 237, 0, 0, 0, 171, 173, 175, 176, 177, 178, + 179, 180, 181, 183, 0, 0, 0, 0, 0, 0, + 0, 186, 187, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 200, 0, 0, 0, 0, 0, 200, + 200, 0, 0, 0, 0, 207, 208, 209, 200, 212, + 213, 101, 356, 136, 27, 0, 26, 0, 0, 0, + 0, 12, 13, 0, 0, 0, 362, 0, 0, 364, + 101, 0, 0, 27, 237, 26, 0, 0, 231, 0, + 0, 106, 0, 0, 0, 0, 0, 245, 42, 28, + 0, 0, 0, 0, 0, 0, 0, 14, 45, 46, + 0, 33, 0, 34, 0, 0, 0, 0, 0, 254, + 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 37, 0, 0, 0, 0, 0, 0, 0, 41, + 22, 43, 29, 35, 38, 0, 32, 0, 36, 40, + 0, 0, 25, 0, 0, 30, 31, 23, 18, 0, + 0, 27, 0, 26, 0, 44, 0, 0, 0, 0, + 0, 0, 0, 0, 200, 0, 0, 139, 0, 0, + 295, 0, 0, 0, 0, 0, 297, 0, 0, 0, + 0, 298, 301, 0, 0, 303, 304, 305, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 18, 0, 106, 27, 240, 26, 0, 44, 0, 0, + 0, 0, 0, 0, 0, 98, 97, 0, 0, 0, + 0, 0, 0, 0, 241, 42, 28, 0, 331, 0, + 0, 0, 0, 0, 0, 45, 46, 0, 33, 0, + 34, 0, 338, 0, 0, 0, 0, 0, 342, 0, + 343, 0, 0, 0, 0, 0, 0, 0, 37, 0, + 0, 0, 0, 0, 0, 0, 41, 22, 43, 29, + 35, 38, 0, 32, 0, 36, 40, 0, 240, 99, + 0, 0, 30, 31, 23, 0, 0, 0, 101, 98, + 97, 27, 0, 26, 0, 0, 0, 240, 241, 42, + 28, 0, 0, 0, 0, 0, 0, 0, 98, 45, + 46, 0, 33, 0, 34, 0, 0, 241, 42, 28, + 0, 0, 0, 0, 0, 0, 0, 0, 45, 46, + 0, 33, 37, 34, 0, 0, 0, 0, 0, 0, + 41, 22, 43, 29, 35, 38, 0, 32, 0, 36, + 40, 37, 0, 99, 0, 0, 30, 31, 23, 41, + 22, 43, 29, 35, 38, 0, 32, 0, 36, 40, + 0, 140, 99, 0, 0, 30, 31, 23, 282, 0, + 0, 27, 0, 26, 0, 44, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 42, 28, 0, 0, + 0, 0, 0, 0, 0, 0, 45, 46, 0, 33, + 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 253, 0, 0, 0, 0, 0, 37, + 0, 0, 0, 0, 0, 0, 0, 41, 22, 43, + 29, 35, 38, 0, 32, 0, 36, 40, 42, 28, + 25, 0, 0, 30, 31, 23, 0, 0, 45, 46, + 0, 33, 0, 34, 282, 0, 0, 27, 0, 26, + 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 37, 0, 0, 0, 0, 0, 0, 0, 41, + 22, 43, 29, 35, 38, 0, 32, 0, 36, 40, + 0, 0, 25, 0, 0, 30, 31, 23, 0, 0, + 0, 0, 0, 0, 0, 240, 282, 0, 0, 27, + 0, 26, 0, 44, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 241, 42, 28, 0, 0, + 0, 0, 0, 0, 0, 0, 45, 46, 0, 33, + 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, + 0, 0, 0, 0, 0, 0, 0, 41, 22, 43, + 29, 35, 38, 0, 32, 0, 36, 40, 0, 0, + 99, 0, 0, 30, 31, 23, 0, 18, 203, 0, + 27, 174, 26, 0, 44, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 18, 201, 0, 27, + 0, 26, 0, 44, 0, 0, 42, 28, 0, 0, + 0, 0, 0, 0, 0, 0, 45, 46, 0, 33, + 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, + 0, 0, 0, 0, 0, 0, 0, 41, 22, 43, + 29, 35, 38, 0, 32, 0, 36, 40, 0, 0, + 25, 0, 0, 30, 31, 23, 0, 172, 18, 0, + 0, 27, 0, 26, 0, 44, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 42, 28, 0, 0, 0, 0, 0, 0, + 0, 0, 45, 46, 0, 33, 0, 34, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 253, + 0, 0, 0, 18, 0, 37, 27, 0, 26, 0, + 44, 0, 0, 41, 22, 43, 29, 35, 38, 0, + 32, 0, 36, 40, 42, 28, 25, 0, 0, 30, + 31, 23, 0, 0, 45, 46, 0, 33, 0, 34, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 18, 0, 37, 27, 0, + 26, 0, 44, 0, 0, 41, 22, 43, 29, 35, + 38, 0, 32, 0, 36, 40, 0, 0, 25, 0, + 0, 30, 31, 23, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 42, 28, 282, 0, 0, + 27, 0, 26, 0, 44, 45, 46, 0, 33, 0, + 34, 0, 0, 0, 42, 28, 161, 0, 0, 27, + 0, 26, 0, 44, 45, 46, 0, 33, 37, 34, + 0, 0, 0, 0, 0, 0, 41, 22, 43, 29, + 35, 38, 0, 32, 0, 36, 40, 37, 0, 25, + 0, 0, 30, 31, 23, 41, 22, 43, 29, 35, + 38, 174, 32, 0, 36, 40, 0, 0, 25, 0, + 0, 30, 31, 23, 0, 0, 101, 0, 0, 27, + 0, 26, 0, 44, 0, 0, 42, 28, 0, 0, + 0, 0, 0, 0, 0, 101, 45, 46, 27, 33, + 26, 34, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 172, 0, 0, 37, + 0, 0, 0, 0, 0, 0, 0, 41, 22, 43, + 29, 35, 38, 0, 32, 0, 36, 40, 0, 0, + 25, 42, 28, 30, 31, 23, 0, 0, 0, 0, + 0, 45, 46, 0, 33, 0, 34, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, + 0, 0, 41, 22, 43, 29, 35, 38, 0, 32, + 0, 36, 40, 42, 28, 25, 0, 0, 30, 31, + 23, 0, 0, 45, 46, 0, 33, 0, 34, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, + 0, 0, 0, 0, 41, 22, 43, 29, 35, 38, + 0, 32, 0, 36, 40, 42, 28, 25, 0, 0, + 30, 31, 23, 0, 0, 45, 46, 0, 33, 0, + 34, 0, 0, 0, 42, 28, 0, 0, 0, 0, + 0, 0, 0, 0, 45, 46, 0, 33, 37, 34, + 0, 0, 0, 0, 0, 0, 41, 22, 43, 29, + 35, 38, 0, 32, 0, 36, 40, 37, 0, 25, + 0, 0, 30, 31, 23, 41, 22, 43, 29, 35, + 38, 0, 32, 0, 36, 40, 0, 0, 25, 0, + 0, 30, 31, 23, 42, 28, 0, 0, 0, 0, + 0, 0, 0, 0, 45, 46, 0, 33, 0, 34, + 0, 0, 0, 42, 28, 0, 0, 0, 0, 0, + 0, 0, 0, 45, 46, 0, 33, 37, 34, 0, + 0, 0, 0, 0, 0, 41, 22, 43, 29, 35, + 38, 0, 32, 0, 36, 40, 37, 0, 25, 0, + 0, 30, 31, 23, 41, 22, 43, 29, 35, 38, + 0, 0, 0, 36, 40, 0, 0, 99, 0, 0, + 30, 31, 23 }; +__YYSCLASS yytabelem yypact[]={ + + 1, -3000, -3000, -3000, 2970, 5, -3000, -3000, 4, -3000, + 45, 346, -32, -32, -294, 2618, -3000, -303, 3925, -3000, + -24, 6, -3000, 546, -3000, 4056, 546, 546, 135, 133, + -273, -273, -278, 131, 130, -3000, 129, 127, -3000, 126, + 125, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, 2970, + 346, 3925, -3000, 1129, -3000, -10, 3925, -10, -178, 3278, + -3000, 1196, 346, -10, -10, 3278, -10, -3000, -184, -3000, + 122, 121, 3996, -251, 2618, -3000, 119, -3000, -3000, 346, + 346, 118, -3000, -3000, 3925, 3873, 3818, 3925, 3925, 3925, + 3925, 3925, 3925, 3925, -251, -314, -24, -3000, -3000, 546, + -334, 3925, 3925, -3000, -3000, 95, 1654, 546, 546, 546, + 546, 546, 546, 3925, -3000, -3000, -330, -330, -330, 3746, + 3727, -3000, -3000, -238, 546, 3925, 3925, 3925, 3925, 3925, + 3925, -310, -3000, 930, -32, -3000, -3000, -3000, -179, -184, + -3000, 1578, -3000, -3000, 1196, 1578, -3000, -281, 863, -3000, + -3000, 1578, -3000, -3000, 1196, -3000, -179, 616, 3925, -76, + 78, 3925, 3181, -306, -3000, -24, 2, 3925, 803, 743, + -295, 2532, -3000, 2704, -3000, 2789, 4075, 4075, 4075, 4075, + 4075, 4075, -3000, 4075, -3000, -273, 2442, 2618, -242, 3330, + -3000, 3330, -3000, 39, 39, -330, -330, -330, -330, 62, + 2618, -3000, 89, -3000, 87, 546, -24, 2366, 2366, 2366, + 85, 78, 2366, 2366, 68, -3000, 346, -3000, -3000, -3000, + -3000, -3000, 477, -3000, -180, -3000, -3000, -3000, 35, -45, + -3000, 2275, 546, 546, 546, 3646, 83, 3977, 3594, 3508, + 3977, -251, -24, 3977, 3925, 2275, -3000, -3000, 79, -3000, + 3925, -3000, -251, -3000, 2618, 2618, 3330, -3000, -3000, -3000, + -24, 3330, 3330, -233, -3000, 3330, 3330, 3330, -3000, 417, + -320, -3000, -3000, -3000, 3, -251, -213, -3000, -24, -24, + -24, 3181, 3925, -243, 3107, 3200, 3418, -3000, 4075, -3000, + 3181, 48, -213, -213, -227, 2618, -3000, 2618, 2190, 113, + 109, 2102, 77, 1468, 1346, 1270, -3000, 116, 3925, -184, + 91, -3000, 75, -251, 3977, -3000, -32, -3000, -3000, -3000, + -3000, -3000, 3330, -3000, -3000, -259, -3000, -259, 3330, -3000, + 3925, 2010, 616, -213, -243, -3000, 3181, 346, 1918, 104, + 103, 96, 1830, 1745, -184, 91, 1196, 274, -3000, -3000, + -3000, -3000, -3000, -10, 616, -213, -3000, -3000, -3000, 91, + 1196, -213, -3000, 1196, -3000 }; +__YYSCLASS yytabelem yypgo[]={ + + 0, 230, 3089, 272, 87, 229, 202, 223, 200, 488, + 99, 114, 222, 149, 2, 3, 2875, 54, 0, 189, + 221, 220, 219, 218, 217, 215, 212, 1, 211, 183, + 90, 205, 5, 1071, 8, 17, 138, 82, 203, 199, + 198, 197, 196, 195, 194, 193, 191, 190, 185 }; +__YYSCLASS yytabelem yyr1[]={ + + 0, 40, 40, 36, 36, 37, 37, 33, 33, 26, + 26, 24, 24, 41, 22, 42, 22, 43, 22, 20, + 20, 23, 30, 30, 34, 34, 35, 35, 29, 29, + 15, 15, 1, 1, 10, 11, 11, 11, 11, 11, + 11, 11, 44, 11, 12, 12, 6, 6, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, + 5, 5, 7, 7, 7, 39, 39, 28, 28, 28, + 28, 31, 31, 9, 9, 45, 13, 32, 32, 14, + 14, 14, 14, 14, 14, 14, 14, 27, 27, 16, + 16, 16, 46, 47, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 48, 16, 16, 17, + 17, 38, 38, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 18, 18, 18, 18, 21, 21, 21, + 19, 19, 19, 25 }; +__YYSCLASS yytabelem yyr2[]={ + + 0, 3, 3, 2, 4, 2, 4, 2, 4, 2, + 4, 2, 4, 1, 25, 1, 21, 1, 17, 3, + 3, 9, 2, 4, 2, 4, 1, 2, 1, 2, + 1, 2, 3, 7, 3, 3, 9, 7, 13, 7, + 9, 9, 1, 19, 2, 7, 2, 7, 7, 11, + 7, 7, 7, 7, 7, 11, 5, 2, 2, 7, + 11, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 11, 9, 7, 5, 2, 2, 7, 7, + 2, 7, 1, 2, 7, 2, 2, 2, 2, 4, + 4, 2, 4, 3, 5, 1, 9, 2, 4, 9, + 9, 9, 5, 11, 5, 3, 3, 2, 4, 5, + 7, 5, 1, 1, 19, 7, 5, 2, 9, 5, + 7, 5, 5, 7, 5, 4, 1, 7, 5, 2, + 5, 2, 2, 7, 7, 7, 7, 7, 7, 5, + 5, 5, 7, 9, 3, 7, 9, 5, 5, 5, + 5, 9, 7, 5, 3, 13, 13, 7, 13, 13, + 3, 17, 17, 13, 9, 3, 13, 13, 17, 17, + 17, 13, 2, 2, 9, 3, 5, 1, 3, 7, + 3, 3, 3, 9 }; +__YYSCLASS yytabelem yychk[]={ + + -3000, -40, -1, 256, -29, -28, 263, 59, -12, -11, + -10, -30, 261, 262, 297, -2, 123, -18, 40, -9, + -8, -19, 330, 347, -13, 342, 45, 43, 289, 332, + 345, 346, 336, 301, 303, 333, 338, 321, 334, -38, + 339, 329, 288, 331, 47, 298, 299, 263, 59, -29, + -30, 44, 263, -17, -16, 290, 291, 292, -26, 295, + -22, -23, -30, 304, 305, 337, -14, -25, 59, 294, + 296, 300, -39, 293, -2, 256, 340, 319, 320, -30, + -30, -20, 329, 332, 63, -37, -36, 281, 282, 283, + 284, 285, 286, 267, 287, 124, -8, 279, 278, 342, + -18, 40, 312, 345, 346, -4, -2, 43, 45, 42, + 47, 37, 344, 91, -8, -9, -8, -8, -8, 40, + 40, -18, -18, -18, 285, 40, 40, 40, 40, 40, + 40, -45, -11, -17, -10, 125, -16, -27, -34, 59, + 263, -2, -27, 263, -46, -2, -27, -16, -17, -27, + -27, -2, -27, -27, -48, -35, -34, 40, 40, -7, + -5, 40, -3, -18, -9, -8, -19, 40, -17, -17, + 40, -2, 263, -2, 263, -2, -2, -2, -2, -2, + -2, -2, -13, -2, -19, 336, -2, -2, 41, -33, + 44, -33, 41, -8, -8, -8, -8, -8, -8, -6, + -2, 41, -6, 41, -6, 285, -8, -2, -2, -2, + -6, -13, -2, -2, 335, 125, -30, 263, -35, -27, + -16, -27, -24, 322, -31, 125, -27, -16, -15, -19, + -14, -2, 124, 280, 283, -33, -4, 63, -37, -36, + 267, 287, -8, 312, 91, -2, 125, 125, -21, 329, + 58, -18, 287, 263, -2, -2, -33, 93, 41, 41, + -8, -33, -33, -33, 41, -33, -33, -33, 47, -17, + -47, 263, -16, 263, 59, 287, -32, 41, -8, -8, + -8, -3, 40, 41, -3, -3, -3, -13, -3, -19, + -3, -6, -32, -32, -33, -2, -19, -2, -2, -13, + -13, -2, -19, -2, -2, -2, 125, 340, -35, 59, + -19, 263, -4, 287, 58, 93, -44, 329, 41, 41, + 41, 41, -33, 41, 41, -33, 41, -33, -33, 41, + 40, -2, -35, -32, 41, -19, -3, -30, -2, -13, + -18, -18, -2, -2, 59, -15, -43, -17, 41, 41, + 41, 41, 41, 41, -35, -32, -16, 125, -27, -15, + -42, -32, -16, -41, -16 }; +__YYSCLASS yytabelem yydef[]={ + + -2, -2, 1, 2, 32, 29, 87, 88, 28, 44, + 35, 0, 0, 0, 0, 34, 22, 172, 0, 76, + 77, 173, 175, 0, 93, 0, 0, 0, 144, 0, + 0, 0, 154, 0, 0, 160, 0, 0, 165, 0, + 0, 180, 181, 182, 95, 131, 132, 89, 90, 33, + 0, 0, 23, 0, 129, 0, 0, 0, 112, 0, + 117, 0, 0, 0, 0, 0, 0, 126, 26, 9, + 0, 0, 82, 0, 105, 106, 0, 85, 86, 0, + 0, 0, 19, 20, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 75, 5, 3, 0, + 172, 0, 0, 149, 150, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 176, 94, 141, 139, 140, 0, + 0, 147, 148, 153, 0, 0, 0, 0, 0, 0, + 0, 0, 45, 0, 37, 39, 130, 109, 107, 26, + 24, 0, 111, 10, 0, 0, 116, 119, 0, 121, + 122, 0, 124, 125, 0, 128, 27, -2, 0, 102, + 83, 0, 80, 172, 57, 58, 104, 0, 0, 0, + 177, 0, 6, 61, 4, 62, -2, -2, -2, -2, + -2, -2, 69, -2, 71, 74, 0, 59, 0, 0, + 7, 0, 157, 133, 134, 135, 136, 137, 138, 0, + 46, 142, 0, 145, 0, 0, 152, 0, 0, 0, + 0, 93, 0, 0, 0, 36, 0, 25, 108, 110, + 113, 115, 0, 11, 120, 91, 123, 127, 0, 173, + 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 56, 0, 0, 0, 40, 41, 0, 178, + 0, 73, 0, 8, 79, 78, 0, 174, 143, 146, + 151, 0, 0, 0, 164, 0, 0, 0, 96, 0, + 0, 12, 118, 92, 26, 0, 21, 97, 99, 100, + 101, 81, 0, 84, 0, 50, 51, 52, -2, 54, + 48, 0, 183, 42, 0, 60, 72, 47, 0, 93, + 93, 0, 0, 0, 0, 0, 38, 0, 0, 26, + 0, 98, 0, 0, 0, 103, 0, 179, 155, 156, + 158, 159, 0, 163, 166, 0, 167, 0, 0, 171, + 0, 0, -2, 17, 0, 55, 49, 0, 0, 93, + 0, 0, 0, 0, 26, 0, 0, 0, 161, 162, + 168, 169, 170, 0, -2, 15, 18, 43, 114, 0, + 0, 13, 16, 0, 14 }; +typedef struct { char *t_name; int t_val; } yytoktype; +#ifndef YYDEBUG +# define YYDEBUG 0 /* don't allow debugging */ #endif -/* parser for yacc output */ +#if YYDEBUG -int yynerrs = 0; /* number of errors */ -int yyerrflag = 0; /* error recovery flag */ - -extern int fprint(int, char*, ...); -extern int sprint(char*, char*, ...); - -char* -yytokname(int yyc) +__YYSCLASS yytoktype yytoks[] = { - static char x[10]; + "FIRSTTOKEN", 257, + "PROGRAM", 258, + "PASTAT", 259, + "PASTAT2", 260, + "XBEGIN", 261, + "XEND", 262, + "NL", 263, + ",", 44, + "{", 123, + "(", 40, + "|", 124, + ";", 59, + "/", 47, + ")", 41, + "}", 125, + "[", 91, + "]", 93, + "ARRAY", 264, + "MATCH", 265, + "NOTMATCH", 266, + "MATCHOP", 267, + "FINAL", 268, + "DOT", 269, + "ALL", 270, + "CCL", 271, + "NCCL", 272, + "CHAR", 273, + "OR", 274, + "STAR", 275, + "QUEST", 276, + "PLUS", 277, + "AND", 278, + "BOR", 279, + "APPEND", 280, + "EQ", 281, + "GE", 282, + "GT", 283, + "LE", 284, + "LT", 285, + "NE", 286, + "IN", 287, + "ARG", 288, + "BLTIN", 289, + "BREAK", 290, + "CLOSE", 291, + "CONTINUE", 292, + "DELETE", 293, + "DO", 294, + "EXIT", 295, + "FOR", 296, + "FUNC", 297, + "SUB", 298, + "GSUB", 299, + "IF", 300, + "INDEX", 301, + "LSUBSTR", 302, + "MATCHFCN", 303, + "NEXT", 304, + "NEXTFILE", 305, + "ADD", 306, + "MINUS", 307, + "MULT", 308, + "DIVIDE", 309, + "MOD", 310, + "ASSIGN", 311, + "ASGNOP", 312, + "ADDEQ", 313, + "SUBEQ", 314, + "MULTEQ", 315, + "DIVEQ", 316, + "MODEQ", 317, + "POWEQ", 318, + "PRINT", 319, + "PRINTF", 320, + "SPRINTF", 321, + "ELSE", 322, + "INTEST", 323, + "CONDEXPR", 324, + "POSTINCR", 325, + "PREINCR", 326, + "POSTDECR", 327, + "PREDECR", 328, + "VAR", 329, + "IVAR", 330, + "VARNF", 331, + "CALL", 332, + "NUMBER", 333, + "STRING", 334, + "REGEXPR", 335, + "?", 63, + ":", 58, + "GETLINE", 336, + "RETURN", 337, + "SPLIT", 338, + "SUBSTR", 339, + "WHILE", 340, + "CAT", 341, + "+", 43, + "-", 45, + "*", 42, + "%", 37, + "NOT", 342, + "UMINUS", 343, + "POWER", 344, + "DECR", 345, + "INCR", 346, + "INDIRECT", 347, + "LASTTOKEN", 348, + "-unknown-", -1 /* ends search */ +}; - if(yyc > 0 && yyc <= sizeof(yytoknames)/sizeof(yytoknames[0])) - if(yytoknames[yyc-1]) - return yytoknames[yyc-1]; - sprintf(x, "<%d>", yyc); - return x; -} - -char* -yystatname(int yys) +__YYSCLASS char * yyreds[] = { - static char x[10]; + "-no such reduction-", + "program : pas", + "program : error", + "and : AND", + "and : and NL", + "bor : BOR", + "bor : bor NL", + "comma : ','", + "comma : comma NL", + "do : DO", + "do : do NL", + "else : ELSE", + "else : else NL", + "for : FOR '(' opt_simple_stmt ';' opt_nl pattern ';' opt_nl opt_simple_stmt rparen", + "for : FOR '(' opt_simple_stmt ';' opt_nl pattern ';' opt_nl opt_simple_stmt rparen stmt", + "for : FOR '(' opt_simple_stmt ';' ';' opt_nl opt_simple_stmt rparen", + "for : FOR '(' opt_simple_stmt ';' ';' opt_nl opt_simple_stmt rparen stmt", + "for : FOR '(' varname IN varname rparen", + "for : FOR '(' varname IN varname rparen stmt", + "funcname : VAR", + "funcname : CALL", + "if : IF '(' pattern rparen", + "lbrace : '{'", + "lbrace : lbrace NL", + "nl : NL", + "nl : nl NL", + "opt_nl : /* empty */", + "opt_nl : nl", + "opt_pst : /* empty */", + "opt_pst : pst", + "opt_simple_stmt : /* empty */", + "opt_simple_stmt : simple_stmt", + "pas : opt_pst", + "pas : opt_pst pa_stats opt_pst", + "pa_pat : pattern", + "pa_stat : pa_pat", + "pa_stat : pa_pat lbrace stmtlist '}'", + "pa_stat : pa_pat ',' pa_pat", + "pa_stat : pa_pat ',' pa_pat lbrace stmtlist '}'", + "pa_stat : lbrace stmtlist '}'", + "pa_stat : XBEGIN lbrace stmtlist '}'", + "pa_stat : XEND lbrace stmtlist '}'", + "pa_stat : FUNC funcname '(' varlist rparen", + "pa_stat : FUNC funcname '(' varlist rparen lbrace stmtlist '}'", + "pa_stats : pa_stat", + "pa_stats : pa_stats opt_pst pa_stat", + "patlist : pattern", + "patlist : patlist comma pattern", + "ppattern : var ASGNOP ppattern", + "ppattern : ppattern '?' ppattern ':' ppattern", + "ppattern : ppattern bor ppattern", + "ppattern : ppattern and ppattern", + "ppattern : ppattern MATCHOP reg_expr", + "ppattern : ppattern MATCHOP ppattern", + "ppattern : ppattern IN varname", + "ppattern : '(' plist ')' IN varname", + "ppattern : ppattern term", + "ppattern : re", + "ppattern : term", + "pattern : var ASGNOP pattern", + "pattern : pattern '?' pattern ':' pattern", + "pattern : pattern bor pattern", + "pattern : pattern and pattern", + "pattern : pattern EQ pattern", + "pattern : pattern GE pattern", + "pattern : pattern GT pattern", + "pattern : pattern LE pattern", + "pattern : pattern LT pattern", + "pattern : pattern NE pattern", + "pattern : pattern MATCHOP reg_expr", + "pattern : pattern MATCHOP pattern", + "pattern : pattern IN varname", + "pattern : '(' plist ')' IN varname", + "pattern : pattern '|' GETLINE var", + "pattern : pattern '|' GETLINE", + "pattern : pattern term", + "pattern : re", + "pattern : term", + "plist : pattern comma pattern", + "plist : plist comma pattern", + "pplist : ppattern", + "pplist : pplist comma ppattern", + "prarg : /* empty */", + "prarg : pplist", + "prarg : '(' plist ')'", + "print : PRINT", + "print : PRINTF", + "pst : NL", + "pst : ';'", + "pst : pst NL", + "pst : pst ';'", + "rbrace : '}'", + "rbrace : rbrace NL", + "re : reg_expr", + "re : NOT re", + "reg_expr : '/'", + "reg_expr : '/' REGEXPR '/'", + "rparen : ')'", + "rparen : rparen NL", + "simple_stmt : print prarg '|' term", + "simple_stmt : print prarg APPEND term", + "simple_stmt : print prarg GT term", + "simple_stmt : print prarg", + "simple_stmt : DELETE varname '[' patlist ']'", + "simple_stmt : DELETE varname", + "simple_stmt : pattern", + "simple_stmt : error", + "st : nl", + "st : ';' opt_nl", + "stmt : BREAK st", + "stmt : CLOSE pattern st", + "stmt : CONTINUE st", + "stmt : do", + "stmt : do stmt", + "stmt : do stmt WHILE '(' pattern ')' st", + "stmt : EXIT pattern st", + "stmt : EXIT st", + "stmt : for", + "stmt : if stmt else stmt", + "stmt : if stmt", + "stmt : lbrace stmtlist rbrace", + "stmt : NEXT st", + "stmt : NEXTFILE st", + "stmt : RETURN pattern st", + "stmt : RETURN st", + "stmt : simple_stmt st", + "stmt : while", + "stmt : while stmt", + "stmt : ';' opt_nl", + "stmtlist : stmt", + "stmtlist : stmtlist stmt", + "subop : SUB", + "subop : GSUB", + "term : term '+' term", + "term : term '-' term", + "term : term '*' term", + "term : term '/' term", + "term : term '%' term", + "term : term POWER term", + "term : '-' term", + "term : '+' term", + "term : NOT term", + "term : BLTIN '(' ')'", + "term : BLTIN '(' patlist ')'", + "term : BLTIN", + "term : CALL '(' ')'", + "term : CALL '(' patlist ')'", + "term : DECR var", + "term : INCR var", + "term : var DECR", + "term : var INCR", + "term : GETLINE var LT term", + "term : GETLINE LT term", + "term : GETLINE var", + "term : GETLINE", + "term : INDEX '(' pattern comma pattern ')'", + "term : INDEX '(' pattern comma reg_expr ')'", + "term : '(' pattern ')'", + "term : MATCHFCN '(' pattern comma reg_expr ')'", + "term : MATCHFCN '(' pattern comma pattern ')'", + "term : NUMBER", + "term : SPLIT '(' pattern comma varname comma pattern ')'", + "term : SPLIT '(' pattern comma varname comma reg_expr ')'", + "term : SPLIT '(' pattern comma varname ')'", + "term : SPRINTF '(' patlist ')'", + "term : STRING", + "term : subop '(' reg_expr comma pattern ')'", + "term : subop '(' pattern comma pattern ')'", + "term : subop '(' reg_expr comma pattern comma var ')'", + "term : subop '(' pattern comma pattern comma var ')'", + "term : SUBSTR '(' pattern comma pattern comma pattern ')'", + "term : SUBSTR '(' pattern comma pattern ')'", + "term : var", + "var : varname", + "var : varname '[' patlist ']'", + "var : IVAR", + "var : INDIRECT term", + "varlist : /* empty */", + "varlist : VAR", + "varlist : varlist comma VAR", + "varname : VAR", + "varname : ARG", + "varname : VARNF", + "while : WHILE '(' pattern rparen", +}; +#endif /* YYDEBUG */ +#define YYFLAG (-3000) +/* @(#) $Revision: 1.2 $ */ - if(yys >= 0 && yys < sizeof(yystates)/sizeof(yystates[0])) - if(yystates[yys]) - return yystates[yys]; - sprintf(x, "<%d>\n", yys); - return x; +/* +** Skeleton parser driver for yacc output +*/ + +#if defined(NLS) && !defined(NL_SETN) +#include +#endif + +#ifndef nl_msg +#define nl_msg(i,s) (s) +#endif + +/* +** yacc user known macros and defines +*/ +#define YYERROR goto yyerrlab + +#ifndef __RUNTIME_YYMAXDEPTH +#define YYACCEPT return(0) +#define YYABORT return(1) +#else +#define YYACCEPT {free_stacks(); return(0);} +#define YYABORT {free_stacks(); return(1);} +#endif + +#define YYBACKUP( newtoken, newvalue )\ +{\ + if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\ + {\ + yyerror( (nl_msg(30001,"syntax error - cannot backup")) );\ + goto yyerrlab;\ + }\ + yychar = newtoken;\ + yystate = *yyps;\ + yylval = newvalue;\ + goto yynewstate;\ } +#define YYRECOVERING() (!!yyerrflag) +#ifndef YYDEBUG +# define YYDEBUG 1 /* make debugging available */ +#endif -long -yylex1(void) -{ - long yychar; - long *t3p; - int c; +/* +** user known globals +*/ +int yydebug; /* set to 1 to get debugging */ - yychar = yylex(); - if(yychar <= 0) { - c = yytok1[0]; - goto out; - } - if(yychar < sizeof(yytok1)/sizeof(yytok1[0])) { - c = yytok1[yychar]; - goto out; - } - if(yychar >= YYPRIVATE) - if(yychar < YYPRIVATE+sizeof(yytok2)/sizeof(yytok2[0])) { - c = yytok2[yychar-YYPRIVATE]; - goto out; - } - for(t3p=yytok3;; t3p+=2) { - c = t3p[0]; - if(c == yychar) { - c = t3p[1]; - goto out; - } - if(c == 0) - break; - } - c = 0; +/* +** driver internal defines +*/ +/* define for YYFLAG now generated by yacc program. */ +/*#define YYFLAG (FLAGVAL)*/ -out: - if(c == 0) - c = yytok2[1]; /* unknown char */ - if(yydebug >= 3) - printf("lex %.4X %s\n", yychar, yytokname(c)); - return c; -} +/* +** global variables used by the parser +*/ +# ifndef __RUNTIME_YYMAXDEPTH +__YYSCLASS YYSTYPE yyv[ YYMAXDEPTH ]; /* value stack */ +__YYSCLASS int yys[ YYMAXDEPTH ]; /* state stack */ +# else +__YYSCLASS YYSTYPE *yyv; /* pointer to malloc'ed value stack */ +__YYSCLASS int *yys; /* pointer to malloc'ed stack stack */ +#if defined(__STDC__) || defined (__cplusplus) +#include +#else + extern char *malloc(); + extern char *realloc(); + extern void free(); +#endif /* __STDC__ or __cplusplus */ + + +static int allocate_stacks(); +static void free_stacks(); +# ifndef YYINCREMENT +# define YYINCREMENT (YYMAXDEPTH/2) + 10 +# endif +# endif /* __RUNTIME_YYMAXDEPTH */ +long yymaxdepth = YYMAXDEPTH; + +__YYSCLASS YYSTYPE *yypv; /* top of value stack */ +__YYSCLASS int *yyps; /* top of state stack */ + +__YYSCLASS int yystate; /* current state */ +__YYSCLASS int yytmp; /* extra var (lasts between blocks) */ + +int yynerrs; /* number of errors */ +__YYSCLASS int yyerrflag; /* error recovery flag */ +int yychar; /* current input token number */ + + + +/* +** yyparse - return 0 if worked, 1 if syntax error not recovered from +*/ int +#ifndef __STDC__ +yyparse() +#else yyparse(void) +#endif { - struct - { - YYSTYPE yyv; - int yys; - } yys[YYMAXDEPTH], *yyp, *yypt; - short *yyxi; - int yyj, yym, yystate, yyn, yyg; - YYSTYPE save1, save2; - int save3, save4; - long yychar; - - save1 = yylval; - save2 = yyval; - save3 = yynerrs; - save4 = yyerrflag; + register YYSTYPE *yypvt; /* top of value stack for $vars */ + /* + ** Initialize externals - yyparse may be called more than once + */ +# ifdef __RUNTIME_YYMAXDEPTH + if (allocate_stacks()) YYABORT; +# endif + yypv = &yyv[-1]; + yyps = &yys[-1]; yystate = 0; - yychar = -1; + yytmp = 0; yynerrs = 0; yyerrflag = 0; - yyp = &yys[-1]; + yychar = -1; + goto yystack; + { + register YYSTYPE *yy_pv; /* top of value stack */ + register int *yy_ps; /* top of state stack */ + register int yy_state; /* current state */ + register int yy_n; /* internal state number info */ -ret0: - yyn = 0; - goto ret; + /* + ** get globals into registers. + ** branch to here only if YYBACKUP was called. + */ + yynewstate: + yy_pv = yypv; + yy_ps = yyps; + yy_state = yystate; + goto yy_newstate; -ret1: - yyn = 1; - goto ret; + /* + ** get globals into registers. + ** either we just started, or we just finished a reduction + */ + yystack: + yy_pv = yypv; + yy_ps = yyps; + yy_state = yystate; -ret: - yylval = save1; - yyval = save2; - yynerrs = save3; - yyerrflag = save4; - return yyn; + /* + ** top of for (;;) loop while no reductions done + */ + yy_stack: + /* + ** put a state and value onto the stacks + */ +#if YYDEBUG + /* + ** if debugging, look up token value in list of value vs. + ** name pairs. 0 and negative (-1) are special values. + ** Note: linear search is used since time is not a real + ** consideration while debugging. + */ + if ( yydebug ) + { + register int yy_i; -yystack: - /* put a state and value onto the stack */ - if(yydebug >= 4) - printf("char %s in %s", yytokname(yychar), yystatname(yystate)); - - yyp++; - if(yyp >= &yys[YYMAXDEPTH]) { - yyerror("yacc stack overflow"); - goto ret1; - } - yyp->yys = yystate; - yyp->yyv = yyval; - -yynewstate: - yyn = yypact[yystate]; - if(yyn <= YYFLAG) - goto yydefault; /* simple state */ - if(yychar < 0) - yychar = yylex1(); - yyn += yychar; - if(yyn < 0 || yyn >= YYLAST) - goto yydefault; - yyn = yyact[yyn]; - if(yychk[yyn] == yychar) { /* valid shift */ - yychar = -1; - yyval = yylval; - yystate = yyn; - if(yyerrflag > 0) - yyerrflag--; - goto yystack; - } - -yydefault: - /* default state action */ - yyn = yydef[yystate]; - if(yyn == -2) { - if(yychar < 0) - yychar = yylex1(); - - /* look through exception table */ - for(yyxi=yyexca;; yyxi+=2) - if(yyxi[0] == -1 && yyxi[1] == yystate) - break; - for(yyxi += 2;; yyxi += 2) { - yyn = yyxi[0]; - if(yyn < 0 || yyn == yychar) - break; - } - yyn = yyxi[1]; - if(yyn < 0) - goto ret0; - } - if(yyn == 0) { - /* error ... attempt to resume parsing */ - switch(yyerrflag) { - case 0: /* brand new error */ - yyerror("syntax error"); - if(yydebug >= 1) { - printf("%s", yystatname(yystate)); - printf("saw %s\n", yytokname(yychar)); - } -yyerrlab: - yynerrs++; - - case 1: - case 2: /* incompletely recovered error ... try again */ - yyerrflag = 3; - - /* find a state where "error" is a legal shift action */ - while(yyp >= yys) { - yyn = yypact[yyp->yys] + YYERRCODE; - if(yyn >= 0 && yyn < YYLAST) { - yystate = yyact[yyn]; /* simulate a shift of "error" */ - if(yychk[yystate] == YYERRCODE) - goto yystack; + printf( "State %d, token ", yy_state ); + if ( yychar == 0 ) + printf( "end-of-file\n" ); + else if ( yychar < 0 ) + printf( "-none-\n" ); + else + { + for ( yy_i = 0; yytoks[yy_i].t_val >= 0; + yy_i++ ) + { + if ( yytoks[yy_i].t_val == yychar ) + break; } - - /* the current yyp has no shift onn "error", pop stack */ - if(yydebug >= 2) - printf("error recovery pops state %d, uncovers %d\n", - yyp->yys, (yyp-1)->yys ); - yyp--; + printf( "%s\n", yytoks[yy_i].t_name ); } - /* there is no state on the stack with an error shift ... abort */ - goto ret1; - - case 3: /* no shift yet; clobber input char */ - if(yydebug >= YYEOFCODE) - printf("error recovery discards %s\n", yytokname(yychar)); - if(yychar == YYEOFCODE) - goto ret1; - yychar = -1; - goto yynewstate; /* try again in the same state */ } +#endif /* YYDEBUG */ + if ( ++yy_ps >= &yys[ yymaxdepth ] ) /* room on stack? */ + { +# ifndef __RUNTIME_YYMAXDEPTH + yyerror( (nl_msg(30002,"yacc stack overflow")) ); + YYABORT; +# else + /* save old stack bases to recalculate pointers */ + YYSTYPE * yyv_old = yyv; + int * yys_old = yys; + yymaxdepth += YYINCREMENT; + yys = (int *) realloc(yys, yymaxdepth * sizeof(int)); + yyv = (YYSTYPE *) realloc(yyv, yymaxdepth * sizeof(YYSTYPE)); + if (yys==0 || yyv==0) { + yyerror( (nl_msg(30002,"yacc stack overflow")) ); + YYABORT; + } + /* Reset pointers into stack */ + yy_ps = (yy_ps - yys_old) + yys; + yyps = (yyps - yys_old) + yys; + yy_pv = (yy_pv - yyv_old) + yyv; + yypv = (yypv - yyv_old) + yyv; +# endif + + } + *yy_ps = yy_state; + *++yy_pv = yyval; + + /* + ** we have a new state - find out what to do + */ + yy_newstate: + if ( ( yy_n = yypact[ yy_state ] ) <= YYFLAG ) + goto yydefault; /* simple state */ +#if YYDEBUG + /* + ** if debugging, need to mark whether new token grabbed + */ + yytmp = yychar < 0; +#endif + if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) ) + yychar = 0; /* reached EOF */ +#if YYDEBUG + if ( yydebug && yytmp ) + { + register int yy_i; + + printf( "Received token " ); + if ( yychar == 0 ) + printf( "end-of-file\n" ); + else if ( yychar < 0 ) + printf( "-none-\n" ); + else + { + for ( yy_i = 0; yytoks[yy_i].t_val >= 0; + yy_i++ ) + { + if ( yytoks[yy_i].t_val == yychar ) + break; + } + printf( "%s\n", yytoks[yy_i].t_name ); + } + } +#endif /* YYDEBUG */ + if ( ( ( yy_n += yychar ) < 0 ) || ( yy_n >= YYLAST ) ) + goto yydefault; + if ( yychk[ yy_n = yyact[ yy_n ] ] == yychar ) /*valid shift*/ + { + yychar = -1; + yyval = yylval; + yy_state = yy_n; + if ( yyerrflag > 0 ) + yyerrflag--; + goto yy_stack; + } + + yydefault: + if ( ( yy_n = yydef[ yy_state ] ) == -2 ) + { +#if YYDEBUG + yytmp = yychar < 0; +#endif + if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) ) + yychar = 0; /* reached EOF */ +#if YYDEBUG + if ( yydebug && yytmp ) + { + register int yy_i; + + printf( "Received token " ); + if ( yychar == 0 ) + printf( "end-of-file\n" ); + else if ( yychar < 0 ) + printf( "-none-\n" ); + else + { + for ( yy_i = 0; + yytoks[yy_i].t_val >= 0; + yy_i++ ) + { + if ( yytoks[yy_i].t_val + == yychar ) + { + break; + } + } + printf( "%s\n", yytoks[yy_i].t_name ); + } + } +#endif /* YYDEBUG */ + /* + ** look through exception table + */ + { + register int *yyxi = yyexca; + + while ( ( *yyxi != -1 ) || + ( yyxi[1] != yy_state ) ) + { + yyxi += 2; + } + while ( ( *(yyxi += 2) >= 0 ) && + ( *yyxi != yychar ) ) + ; + if ( ( yy_n = yyxi[1] ) < 0 ) + YYACCEPT; + } + } + + /* + ** check for syntax error + */ + if ( yy_n == 0 ) /* have an error */ + { + /* no worry about speed here! */ + switch ( yyerrflag ) + { + case 0: /* new error */ + yyerror( (nl_msg(30003,"syntax error")) ); + yynerrs++; + goto skip_init; + yyerrlab: + /* + ** get globals into registers. + ** we have a user generated syntax type error + */ + yy_pv = yypv; + yy_ps = yyps; + yy_state = yystate; + yynerrs++; + skip_init: + case 1: + case 2: /* incompletely recovered error */ + /* try again... */ + yyerrflag = 3; + /* + ** find state where "error" is a legal + ** shift action + */ + while ( yy_ps >= yys ) + { + yy_n = yypact[ *yy_ps ] + YYERRCODE; + if ( yy_n >= 0 && yy_n < YYLAST && + yychk[yyact[yy_n]] == YYERRCODE) { + /* + ** simulate shift of "error" + */ + yy_state = yyact[ yy_n ]; + goto yy_stack; + } + /* + ** current state has no shift on + ** "error", pop stack + */ +#if YYDEBUG +# define _POP_ "Error recovery pops state %d, uncovers state %d\n" + if ( yydebug ) + printf( _POP_, *yy_ps, + yy_ps[-1] ); +# undef _POP_ +#endif + yy_ps--; + yy_pv--; + } + /* + ** there is no state on stack with "error" as + ** a valid shift. give up. + */ + YYABORT; + case 3: /* no shift yet; eat a token */ +#if YYDEBUG + /* + ** if debugging, look up token in list of + ** pairs. 0 and negative shouldn't occur, + ** but since timing doesn't matter when + ** debugging, it doesn't hurt to leave the + ** tests here. + */ + if ( yydebug ) + { + register int yy_i; + + printf( "Error recovery discards " ); + if ( yychar == 0 ) + printf( "token end-of-file\n" ); + else if ( yychar < 0 ) + printf( "token -none-\n" ); + else + { + for ( yy_i = 0; + yytoks[yy_i].t_val >= 0; + yy_i++ ) + { + if ( yytoks[yy_i].t_val + == yychar ) + { + break; + } + } + printf( "token %s\n", + yytoks[yy_i].t_name ); + } + } +#endif /* YYDEBUG */ + if ( yychar == 0 ) /* reached EOF. quit */ + YYABORT; + yychar = -1; + goto yy_newstate; + } + }/* end if ( yy_n == 0 ) */ + /* + ** reduction by production yy_n + ** put stack tops, etc. so things right after switch + */ +#if YYDEBUG + /* + ** if debugging, print the string that is the user's + ** specification of the reduction which is just about + ** to be done. + */ + if ( yydebug ) + printf( "Reduce by (%d) \"%s\"\n", + yy_n, yyreds[ yy_n ] ); +#endif + yytmp = yy_n; /* value to switch over */ + yypvt = yy_pv; /* $vars top of value stack */ + /* + ** Look in goto table for next state + ** Sorry about using yy_state here as temporary + ** register variable, but why not, if it works... + ** If yyr2[ yy_n ] doesn't have the low order bit + ** set, then there is no action to be done for + ** this reduction. So, no saving & unsaving of + ** registers done. The only difference between the + ** code just after the if and the body of the if is + ** the goto yy_stack in the body. This way the test + ** can be made before the choice of what to do is needed. + */ + { + /* length of production doubled with extra bit */ + register int yy_len = yyr2[ yy_n ]; + + if ( !( yy_len & 01 ) ) + { + yy_len >>= 1; + yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */ + yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] + + *( yy_ps -= yy_len ) + 1; + if ( yy_state >= YYLAST || + yychk[ yy_state = + yyact[ yy_state ] ] != -yy_n ) + { + yy_state = yyact[ yypgo[ yy_n ] ]; + } + goto yy_stack; + } + yy_len >>= 1; + yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */ + yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] + + *( yy_ps -= yy_len ) + 1; + if ( yy_state >= YYLAST || + yychk[ yy_state = yyact[ yy_state ] ] != -yy_n ) + { + yy_state = yyact[ yypgo[ yy_n ] ]; + } + } + /* save until reenter driver code */ + yystate = yy_state; + yyps = yy_ps; + yypv = yy_pv; } - - /* reduction by production yyn */ - if(yydebug >= 2) - printf("reduce %d in:\n\t%s", yyn, yystatname(yystate)); - - yypt = yyp; - yyp -= yyr2[yyn]; - yyval = (yyp+1)->yyv; - yym = yyn; - - /* consult goto table to find next state */ - yyn = yyr1[yyn]; - yyg = yypgo[yyn]; - yyj = yyg + yyp->yys + 1; - - if(yyj >= YYLAST || yychk[yystate=yyact[yyj]] != -yyn) - yystate = yyact[yyg]; - switch(yym) { + /* + ** code supplied by user is placed in this switch + */ + switch( yytmp ) + { case 1: -#line 98 "awkgram.y" +/* # line 98 "awkgram.y" */ { if (errorflag==0) - winner = (Node *)stat3(PROGRAM, beginloc, yypt[-0].yyv.p, endloc); } break; + winner = (Node *)stat3(PROGRAM, beginloc, yypvt[-0].p, endloc); } break; case 2: -#line 100 "awkgram.y" +/* # line 100 "awkgram.y" */ { yyclearin; bracecheck(); ERROR "bailing out" SYNTAX; } break; case 13: -#line 124 "awkgram.y" +/* # line 124 "awkgram.y" */ {inloop++;} break; case 14: -#line 125 "awkgram.y" -{ --inloop; yyval.p = stat4(FOR, yypt[-9].yyv.p, notnull(yypt[-6].yyv.p), yypt[-3].yyv.p, yypt[-0].yyv.p); } break; +/* # line 125 "awkgram.y" */ +{ --inloop; yyval.p = stat4(FOR, yypvt[-9].p, notnull(yypvt[-6].p), yypvt[-3].p, yypvt[-0].p); } break; case 15: -#line 126 "awkgram.y" +/* # line 126 "awkgram.y" */ {inloop++;} break; case 16: -#line 127 "awkgram.y" -{ --inloop; yyval.p = stat4(FOR, yypt[-7].yyv.p, NIL, yypt[-3].yyv.p, yypt[-0].yyv.p); } break; +/* # line 127 "awkgram.y" */ +{ --inloop; yyval.p = stat4(FOR, yypvt[-7].p, NIL, yypvt[-3].p, yypvt[-0].p); } break; case 17: -#line 128 "awkgram.y" +/* # line 128 "awkgram.y" */ {inloop++;} break; case 18: -#line 129 "awkgram.y" -{ --inloop; yyval.p = stat3(IN, yypt[-5].yyv.p, makearr(yypt[-3].yyv.p), yypt[-0].yyv.p); } break; +/* # line 129 "awkgram.y" */ +{ --inloop; yyval.p = stat3(IN, yypvt[-5].p, makearr(yypvt[-3].p), yypvt[-0].p); } break; case 19: -#line 133 "awkgram.y" -{ setfname(yypt[-0].yyv.cp); } break; +/* # line 133 "awkgram.y" */ +{ setfname(yypvt[-0].cp); } break; case 20: -#line 134 "awkgram.y" -{ setfname(yypt[-0].yyv.cp); } break; +/* # line 134 "awkgram.y" */ +{ setfname(yypvt[-0].cp); } break; case 21: -#line 138 "awkgram.y" -{ yyval.p = notnull(yypt[-1].yyv.p); } break; +/* # line 138 "awkgram.y" */ +{ yyval.p = notnull(yypvt[-1].p); } break; case 26: -#line 150 "awkgram.y" +/* # line 150 "awkgram.y" */ { yyval.i = 0; } break; case 28: -#line 155 "awkgram.y" +/* # line 155 "awkgram.y" */ { yyval.i = 0; } break; case 30: -#line 161 "awkgram.y" +/* # line 161 "awkgram.y" */ { yyval.p = 0; } break; case 32: -#line 166 "awkgram.y" +/* # line 166 "awkgram.y" */ { yyval.p = 0; } break; case 33: -#line 167 "awkgram.y" -{ yyval.p = yypt[-1].yyv.p; } break; +/* # line 167 "awkgram.y" */ +{ yyval.p = yypvt[-1].p; } break; case 34: -#line 171 "awkgram.y" -{ yyval.p = notnull(yypt[-0].yyv.p); } break; +/* # line 171 "awkgram.y" */ +{ yyval.p = notnull(yypvt[-0].p); } break; case 35: -#line 175 "awkgram.y" -{ yyval.p = stat2(PASTAT, yypt[-0].yyv.p, stat2(PRINT, rectonode(), NIL)); } break; +/* # line 175 "awkgram.y" */ +{ yyval.p = stat2(PASTAT, yypvt[-0].p, stat2(PRINT, rectonode(), NIL)); } break; case 36: -#line 176 "awkgram.y" -{ yyval.p = stat2(PASTAT, yypt[-3].yyv.p, yypt[-1].yyv.p); } break; +/* # line 176 "awkgram.y" */ +{ yyval.p = stat2(PASTAT, yypvt[-3].p, yypvt[-1].p); } break; case 37: -#line 177 "awkgram.y" -{ yyval.p = pa2stat(yypt[-2].yyv.p, yypt[-0].yyv.p, stat2(PRINT, rectonode(), NIL)); } break; +/* # line 177 "awkgram.y" */ +{ yyval.p = pa2stat(yypvt[-2].p, yypvt[-0].p, stat2(PRINT, rectonode(), NIL)); } break; case 38: -#line 178 "awkgram.y" -{ yyval.p = pa2stat(yypt[-5].yyv.p, yypt[-3].yyv.p, yypt[-1].yyv.p); } break; +/* # line 178 "awkgram.y" */ +{ yyval.p = pa2stat(yypvt[-5].p, yypvt[-3].p, yypvt[-1].p); } break; case 39: -#line 179 "awkgram.y" -{ yyval.p = stat2(PASTAT, NIL, yypt[-1].yyv.p); } break; +/* # line 179 "awkgram.y" */ +{ yyval.p = stat2(PASTAT, NIL, yypvt[-1].p); } break; case 40: -#line 181 "awkgram.y" -{ beginloc = linkum(beginloc, yypt[-1].yyv.p); yyval.p = 0; } break; +/* # line 181 "awkgram.y" */ +{ beginloc = linkum(beginloc, yypvt[-1].p); yyval.p = 0; } break; case 41: -#line 183 "awkgram.y" -{ endloc = linkum(endloc, yypt[-1].yyv.p); yyval.p = 0; } break; +/* # line 183 "awkgram.y" */ +{ endloc = linkum(endloc, yypvt[-1].p); yyval.p = 0; } break; case 42: -#line 184 "awkgram.y" +/* # line 184 "awkgram.y" */ {infunc++;} break; case 43: -#line 185 "awkgram.y" -{ infunc--; curfname=0; defn((Cell *)yypt[-7].yyv.p, yypt[-5].yyv.p, yypt[-1].yyv.p); yyval.p = 0; } break; +/* # line 185 "awkgram.y" */ +{ infunc--; curfname=0; defn((Cell *)yypvt[-7].p, yypvt[-5].p, yypvt[-1].p); yyval.p = 0; } break; case 45: -#line 190 "awkgram.y" -{ yyval.p = linkum(yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 190 "awkgram.y" */ +{ yyval.p = linkum(yypvt[-2].p, yypvt[-0].p); } break; case 47: -#line 195 "awkgram.y" -{ yyval.p = linkum(yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 195 "awkgram.y" */ +{ yyval.p = linkum(yypvt[-2].p, yypvt[-0].p); } break; case 48: -#line 199 "awkgram.y" -{ yyval.p = op2(yypt[-1].yyv.i, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 199 "awkgram.y" */ +{ yyval.p = op2(yypvt[-1].i, yypvt[-2].p, yypvt[-0].p); } break; case 49: -#line 201 "awkgram.y" -{ yyval.p = op3(CONDEXPR, notnull(yypt[-4].yyv.p), yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 201 "awkgram.y" */ +{ yyval.p = op3(CONDEXPR, notnull(yypvt[-4].p), yypvt[-2].p, yypvt[-0].p); } break; case 50: -#line 203 "awkgram.y" -{ yyval.p = op2(BOR, notnull(yypt[-2].yyv.p), notnull(yypt[-0].yyv.p)); } break; +/* # line 203 "awkgram.y" */ +{ yyval.p = op2(BOR, notnull(yypvt[-2].p), notnull(yypvt[-0].p)); } break; case 51: -#line 205 "awkgram.y" -{ yyval.p = op2(AND, notnull(yypt[-2].yyv.p), notnull(yypt[-0].yyv.p)); } break; +/* # line 205 "awkgram.y" */ +{ yyval.p = op2(AND, notnull(yypvt[-2].p), notnull(yypvt[-0].p)); } break; case 52: -#line 206 "awkgram.y" -{ yyval.p = op3(yypt[-1].yyv.i, NIL, yypt[-2].yyv.p, (Node*)makedfa(yypt[-0].yyv.s, 0)); } break; +/* # line 206 "awkgram.y" */ +{ yyval.p = op3(yypvt[-1].i, NIL, yypvt[-2].p, (Node*)makedfa(yypvt[-0].s, 0)); } break; case 53: -#line 208 "awkgram.y" -{ if (constnode(yypt[-0].yyv.p)) - yyval.p = op3(yypt[-1].yyv.i, NIL, yypt[-2].yyv.p, (Node*)makedfa(strnode(yypt[-0].yyv.p), 0)); +/* # line 208 "awkgram.y" */ +{ if (constnode(yypvt[-0].p)) + yyval.p = op3(yypvt[-1].i, NIL, yypvt[-2].p, (Node*)makedfa(strnode(yypvt[-0].p), 0)); else - yyval.p = op3(yypt[-1].yyv.i, (Node *)1, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; + yyval.p = op3(yypvt[-1].i, (Node *)1, yypvt[-2].p, yypvt[-0].p); } break; case 54: -#line 212 "awkgram.y" -{ yyval.p = op2(INTEST, yypt[-2].yyv.p, makearr(yypt[-0].yyv.p)); } break; +/* # line 212 "awkgram.y" */ +{ yyval.p = op2(INTEST, yypvt[-2].p, makearr(yypvt[-0].p)); } break; case 55: -#line 213 "awkgram.y" -{ yyval.p = op2(INTEST, yypt[-3].yyv.p, makearr(yypt[-0].yyv.p)); } break; +/* # line 213 "awkgram.y" */ +{ yyval.p = op2(INTEST, yypvt[-3].p, makearr(yypvt[-0].p)); } break; case 56: -#line 214 "awkgram.y" -{ yyval.p = op2(CAT, yypt[-1].yyv.p, yypt[-0].yyv.p); } break; +/* # line 214 "awkgram.y" */ +{ yyval.p = op2(CAT, yypvt[-1].p, yypvt[-0].p); } break; case 59: -#line 220 "awkgram.y" -{ yyval.p = op2(yypt[-1].yyv.i, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 220 "awkgram.y" */ +{ yyval.p = op2(yypvt[-1].i, yypvt[-2].p, yypvt[-0].p); } break; case 60: -#line 222 "awkgram.y" -{ yyval.p = op3(CONDEXPR, notnull(yypt[-4].yyv.p), yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 222 "awkgram.y" */ +{ yyval.p = op3(CONDEXPR, notnull(yypvt[-4].p), yypvt[-2].p, yypvt[-0].p); } break; case 61: -#line 224 "awkgram.y" -{ yyval.p = op2(BOR, notnull(yypt[-2].yyv.p), notnull(yypt[-0].yyv.p)); } break; +/* # line 224 "awkgram.y" */ +{ yyval.p = op2(BOR, notnull(yypvt[-2].p), notnull(yypvt[-0].p)); } break; case 62: -#line 226 "awkgram.y" -{ yyval.p = op2(AND, notnull(yypt[-2].yyv.p), notnull(yypt[-0].yyv.p)); } break; +/* # line 226 "awkgram.y" */ +{ yyval.p = op2(AND, notnull(yypvt[-2].p), notnull(yypvt[-0].p)); } break; case 63: -#line 227 "awkgram.y" -{ yyval.p = op2(yypt[-1].yyv.i, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 227 "awkgram.y" */ +{ yyval.p = op2(yypvt[-1].i, yypvt[-2].p, yypvt[-0].p); } break; case 64: -#line 228 "awkgram.y" -{ yyval.p = op2(yypt[-1].yyv.i, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 228 "awkgram.y" */ +{ yyval.p = op2(yypvt[-1].i, yypvt[-2].p, yypvt[-0].p); } break; case 65: -#line 229 "awkgram.y" -{ yyval.p = op2(yypt[-1].yyv.i, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 229 "awkgram.y" */ +{ yyval.p = op2(yypvt[-1].i, yypvt[-2].p, yypvt[-0].p); } break; case 66: -#line 230 "awkgram.y" -{ yyval.p = op2(yypt[-1].yyv.i, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 230 "awkgram.y" */ +{ yyval.p = op2(yypvt[-1].i, yypvt[-2].p, yypvt[-0].p); } break; case 67: -#line 231 "awkgram.y" -{ yyval.p = op2(yypt[-1].yyv.i, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 231 "awkgram.y" */ +{ yyval.p = op2(yypvt[-1].i, yypvt[-2].p, yypvt[-0].p); } break; case 68: -#line 232 "awkgram.y" -{ yyval.p = op2(yypt[-1].yyv.i, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 232 "awkgram.y" */ +{ yyval.p = op2(yypvt[-1].i, yypvt[-2].p, yypvt[-0].p); } break; case 69: -#line 233 "awkgram.y" -{ yyval.p = op3(yypt[-1].yyv.i, NIL, yypt[-2].yyv.p, (Node*)makedfa(yypt[-0].yyv.s, 0)); } break; +/* # line 233 "awkgram.y" */ +{ yyval.p = op3(yypvt[-1].i, NIL, yypvt[-2].p, (Node*)makedfa(yypvt[-0].s, 0)); } break; case 70: -#line 235 "awkgram.y" -{ if (constnode(yypt[-0].yyv.p)) - yyval.p = op3(yypt[-1].yyv.i, NIL, yypt[-2].yyv.p, (Node*)makedfa(strnode(yypt[-0].yyv.p), 0)); +/* # line 235 "awkgram.y" */ +{ if (constnode(yypvt[-0].p)) + yyval.p = op3(yypvt[-1].i, NIL, yypvt[-2].p, (Node*)makedfa(strnode(yypvt[-0].p), 0)); else - yyval.p = op3(yypt[-1].yyv.i, (Node *)1, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; + yyval.p = op3(yypvt[-1].i, (Node *)1, yypvt[-2].p, yypvt[-0].p); } break; case 71: -#line 239 "awkgram.y" -{ yyval.p = op2(INTEST, yypt[-2].yyv.p, makearr(yypt[-0].yyv.p)); } break; +/* # line 239 "awkgram.y" */ +{ yyval.p = op2(INTEST, yypvt[-2].p, makearr(yypvt[-0].p)); } break; case 72: -#line 240 "awkgram.y" -{ yyval.p = op2(INTEST, yypt[-3].yyv.p, makearr(yypt[-0].yyv.p)); } break; +/* # line 240 "awkgram.y" */ +{ yyval.p = op2(INTEST, yypvt[-3].p, makearr(yypvt[-0].p)); } break; case 73: -#line 241 "awkgram.y" +/* # line 241 "awkgram.y" */ { if (safe) ERROR "cmd | getline is unsafe" SYNTAX; - else yyval.p = op3(GETLINE, yypt[-0].yyv.p, (Node*)yypt[-2].yyv.i, yypt[-3].yyv.p); } break; + else yyval.p = op3(GETLINE, yypvt[-0].p, (Node*)yypvt[-2].i, yypvt[-3].p); } break; case 74: -#line 244 "awkgram.y" +/* # line 244 "awkgram.y" */ { if (safe) ERROR "cmd | getline is unsafe" SYNTAX; - else yyval.p = op3(GETLINE, (Node*)0, (Node*)yypt[-1].yyv.i, yypt[-2].yyv.p); } break; + else yyval.p = op3(GETLINE, (Node*)0, (Node*)yypvt[-1].i, yypvt[-2].p); } break; case 75: -#line 247 "awkgram.y" -{ yyval.p = op2(CAT, yypt[-1].yyv.p, yypt[-0].yyv.p); } break; +/* # line 247 "awkgram.y" */ +{ yyval.p = op2(CAT, yypvt[-1].p, yypvt[-0].p); } break; case 78: -#line 253 "awkgram.y" -{ yyval.p = linkum(yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 253 "awkgram.y" */ +{ yyval.p = linkum(yypvt[-2].p, yypvt[-0].p); } break; case 79: -#line 254 "awkgram.y" -{ yyval.p = linkum(yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 254 "awkgram.y" */ +{ yyval.p = linkum(yypvt[-2].p, yypvt[-0].p); } break; case 81: -#line 259 "awkgram.y" -{ yyval.p = linkum(yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 259 "awkgram.y" */ +{ yyval.p = linkum(yypvt[-2].p, yypvt[-0].p); } break; case 82: -#line 263 "awkgram.y" +/* # line 263 "awkgram.y" */ { yyval.p = rectonode(); } break; case 84: -#line 265 "awkgram.y" -{ yyval.p = yypt[-1].yyv.p; } break; +/* # line 265 "awkgram.y" */ +{ yyval.p = yypvt[-1].p; } break; case 93: -#line 282 "awkgram.y" -{ yyval.p = op3(MATCH, NIL, rectonode(), (Node*)makedfa(yypt[-0].yyv.s, 0)); } break; +/* # line 282 "awkgram.y" */ +{ yyval.p = op3(MATCH, NIL, rectonode(), (Node*)makedfa(yypvt[-0].s, 0)); } break; case 94: -#line 283 "awkgram.y" -{ yyval.p = op1(NOT, notnull(yypt[-0].yyv.p)); } break; +/* # line 283 "awkgram.y" */ +{ yyval.p = op1(NOT, notnull(yypvt[-0].p)); } break; case 95: -#line 287 "awkgram.y" +/* # line 287 "awkgram.y" */ {startreg();} break; case 96: -#line 287 "awkgram.y" -{ yyval.s = yypt[-1].yyv.s; } break; +/* # line 287 "awkgram.y" */ +{ yyval.s = yypvt[-1].s; } break; case 99: -#line 295 "awkgram.y" +/* # line 295 "awkgram.y" */ { if (safe) ERROR "print | is unsafe" SYNTAX; - else yyval.p = stat3(yypt[-3].yyv.i, yypt[-2].yyv.p, (Node *) yypt[-1].yyv.i, yypt[-0].yyv.p); } break; + else yyval.p = stat3(yypvt[-3].i, yypvt[-2].p, (Node *) yypvt[-1].i, yypvt[-0].p); } break; case 100: -#line 298 "awkgram.y" +/* # line 298 "awkgram.y" */ { if (safe) ERROR "print >> is unsafe" SYNTAX; - else yyval.p = stat3(yypt[-3].yyv.i, yypt[-2].yyv.p, (Node *) yypt[-1].yyv.i, yypt[-0].yyv.p); } break; + else yyval.p = stat3(yypvt[-3].i, yypvt[-2].p, (Node *) yypvt[-1].i, yypvt[-0].p); } break; case 101: -#line 301 "awkgram.y" +/* # line 301 "awkgram.y" */ { if (safe) ERROR "print > is unsafe" SYNTAX; - else yyval.p = stat3(yypt[-3].yyv.i, yypt[-2].yyv.p, (Node *) yypt[-1].yyv.i, yypt[-0].yyv.p); } break; + else yyval.p = stat3(yypvt[-3].i, yypvt[-2].p, (Node *) yypvt[-1].i, yypvt[-0].p); } break; case 102: -#line 304 "awkgram.y" -{ yyval.p = stat3(yypt[-1].yyv.i, yypt[-0].yyv.p, NIL, NIL); } break; +/* # line 304 "awkgram.y" */ +{ yyval.p = stat3(yypvt[-1].i, yypvt[-0].p, NIL, NIL); } break; case 103: -#line 305 "awkgram.y" -{ yyval.p = stat2(DELETE, makearr(yypt[-3].yyv.p), yypt[-1].yyv.p); } break; +/* # line 305 "awkgram.y" */ +{ yyval.p = stat2(DELETE, makearr(yypvt[-3].p), yypvt[-1].p); } break; case 104: -#line 306 "awkgram.y" -{ yyval.p = stat2(DELETE, makearr(yypt[-0].yyv.p), 0); } break; +/* # line 306 "awkgram.y" */ +{ yyval.p = stat2(DELETE, makearr(yypvt[-0].p), 0); } break; case 105: -#line 307 "awkgram.y" -{ yyval.p = exptostat(yypt[-0].yyv.p); } break; +/* # line 307 "awkgram.y" */ +{ yyval.p = exptostat(yypvt[-0].p); } break; case 106: -#line 308 "awkgram.y" +/* # line 308 "awkgram.y" */ { yyclearin; ERROR "illegal statement" SYNTAX; } break; case 109: -#line 317 "awkgram.y" +/* # line 317 "awkgram.y" */ { if (!inloop) ERROR "break illegal outside of loops" SYNTAX; yyval.p = stat1(BREAK, NIL); } break; case 110: -#line 319 "awkgram.y" -{ yyval.p = stat1(CLOSE, yypt[-1].yyv.p); } break; +/* # line 319 "awkgram.y" */ +{ yyval.p = stat1(CLOSE, yypvt[-1].p); } break; case 111: -#line 320 "awkgram.y" +/* # line 320 "awkgram.y" */ { if (!inloop) ERROR "continue illegal outside of loops" SYNTAX; yyval.p = stat1(CONTINUE, NIL); } break; case 112: -#line 322 "awkgram.y" +/* # line 322 "awkgram.y" */ {inloop++;} break; case 113: -#line 322 "awkgram.y" +/* # line 322 "awkgram.y" */ {--inloop;} break; case 114: -#line 323 "awkgram.y" -{ yyval.p = stat2(DO, yypt[-6].yyv.p, notnull(yypt[-2].yyv.p)); } break; +/* # line 323 "awkgram.y" */ +{ yyval.p = stat2(DO, yypvt[-6].p, notnull(yypvt[-2].p)); } break; case 115: -#line 324 "awkgram.y" -{ yyval.p = stat1(EXIT, yypt[-1].yyv.p); } break; +/* # line 324 "awkgram.y" */ +{ yyval.p = stat1(EXIT, yypvt[-1].p); } break; case 116: -#line 325 "awkgram.y" +/* # line 325 "awkgram.y" */ { yyval.p = stat1(EXIT, NIL); } break; case 118: -#line 327 "awkgram.y" -{ yyval.p = stat3(IF, yypt[-3].yyv.p, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 327 "awkgram.y" */ +{ yyval.p = stat3(IF, yypvt[-3].p, yypvt[-2].p, yypvt[-0].p); } break; case 119: -#line 328 "awkgram.y" -{ yyval.p = stat3(IF, yypt[-1].yyv.p, yypt[-0].yyv.p, NIL); } break; +/* # line 328 "awkgram.y" */ +{ yyval.p = stat3(IF, yypvt[-1].p, yypvt[-0].p, NIL); } break; case 120: -#line 329 "awkgram.y" -{ yyval.p = yypt[-1].yyv.p; } break; +/* # line 329 "awkgram.y" */ +{ yyval.p = yypvt[-1].p; } break; case 121: -#line 330 "awkgram.y" +/* # line 330 "awkgram.y" */ { if (infunc) ERROR "next is illegal inside a function" SYNTAX; yyval.p = stat1(NEXT, NIL); } break; case 122: -#line 333 "awkgram.y" +/* # line 333 "awkgram.y" */ { if (infunc) ERROR "nextfile is illegal inside a function" SYNTAX; yyval.p = stat1(NEXTFILE, NIL); } break; case 123: -#line 336 "awkgram.y" -{ yyval.p = stat1(RETURN, yypt[-1].yyv.p); } break; +/* # line 336 "awkgram.y" */ +{ yyval.p = stat1(RETURN, yypvt[-1].p); } break; case 124: -#line 337 "awkgram.y" +/* # line 337 "awkgram.y" */ { yyval.p = stat1(RETURN, NIL); } break; case 126: -#line 339 "awkgram.y" +/* # line 339 "awkgram.y" */ {inloop++;} break; case 127: -#line 339 "awkgram.y" -{ --inloop; yyval.p = stat2(WHILE, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 339 "awkgram.y" */ +{ --inloop; yyval.p = stat2(WHILE, yypvt[-2].p, yypvt[-0].p); } break; case 128: -#line 340 "awkgram.y" +/* # line 340 "awkgram.y" */ { yyval.p = 0; } break; case 130: -#line 345 "awkgram.y" -{ yyval.p = linkum(yypt[-1].yyv.p, yypt[-0].yyv.p); } break; +/* # line 345 "awkgram.y" */ +{ yyval.p = linkum(yypvt[-1].p, yypvt[-0].p); } break; case 133: -#line 353 "awkgram.y" -{ yyval.p = op2(ADD, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 353 "awkgram.y" */ +{ yyval.p = op2(ADD, yypvt[-2].p, yypvt[-0].p); } break; case 134: -#line 354 "awkgram.y" -{ yyval.p = op2(MINUS, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 354 "awkgram.y" */ +{ yyval.p = op2(MINUS, yypvt[-2].p, yypvt[-0].p); } break; case 135: -#line 355 "awkgram.y" -{ yyval.p = op2(MULT, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 355 "awkgram.y" */ +{ yyval.p = op2(MULT, yypvt[-2].p, yypvt[-0].p); } break; case 136: -#line 356 "awkgram.y" -{ yyval.p = op2(DIVIDE, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 356 "awkgram.y" */ +{ yyval.p = op2(DIVIDE, yypvt[-2].p, yypvt[-0].p); } break; case 137: -#line 357 "awkgram.y" -{ yyval.p = op2(MOD, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 357 "awkgram.y" */ +{ yyval.p = op2(MOD, yypvt[-2].p, yypvt[-0].p); } break; case 138: -#line 358 "awkgram.y" -{ yyval.p = op2(POWER, yypt[-2].yyv.p, yypt[-0].yyv.p); } break; +/* # line 358 "awkgram.y" */ +{ yyval.p = op2(POWER, yypvt[-2].p, yypvt[-0].p); } break; case 139: -#line 359 "awkgram.y" -{ yyval.p = op1(UMINUS, yypt[-0].yyv.p); } break; +/* # line 359 "awkgram.y" */ +{ yyval.p = op1(UMINUS, yypvt[-0].p); } break; case 140: -#line 360 "awkgram.y" -{ yyval.p = yypt[-0].yyv.p; } break; +/* # line 360 "awkgram.y" */ +{ yyval.p = yypvt[-0].p; } break; case 141: -#line 361 "awkgram.y" -{ yyval.p = op1(NOT, notnull(yypt[-0].yyv.p)); } break; +/* # line 361 "awkgram.y" */ +{ yyval.p = op1(NOT, notnull(yypvt[-0].p)); } break; case 142: -#line 362 "awkgram.y" -{ yyval.p = op2(BLTIN, (Node *) yypt[-2].yyv.i, rectonode()); } break; +/* # line 362 "awkgram.y" */ +{ yyval.p = op2(BLTIN, (Node *) yypvt[-2].i, rectonode()); } break; case 143: -#line 363 "awkgram.y" -{ yyval.p = op2(BLTIN, (Node *) yypt[-3].yyv.i, yypt[-1].yyv.p); } break; +/* # line 363 "awkgram.y" */ +{ yyval.p = op2(BLTIN, (Node *) yypvt[-3].i, yypvt[-1].p); } break; case 144: -#line 364 "awkgram.y" -{ yyval.p = op2(BLTIN, (Node *) yypt[-0].yyv.i, rectonode()); } break; +/* # line 364 "awkgram.y" */ +{ yyval.p = op2(BLTIN, (Node *) yypvt[-0].i, rectonode()); } break; case 145: -#line 365 "awkgram.y" -{ yyval.p = op2(CALL, celltonode(yypt[-2].yyv.cp,CVAR), NIL); } break; +/* # line 365 "awkgram.y" */ +{ yyval.p = op2(CALL, celltonode(yypvt[-2].cp,CVAR), NIL); } break; case 146: -#line 366 "awkgram.y" -{ yyval.p = op2(CALL, celltonode(yypt[-3].yyv.cp,CVAR), yypt[-1].yyv.p); } break; +/* # line 366 "awkgram.y" */ +{ yyval.p = op2(CALL, celltonode(yypvt[-3].cp,CVAR), yypvt[-1].p); } break; case 147: -#line 367 "awkgram.y" -{ yyval.p = op1(PREDECR, yypt[-0].yyv.p); } break; +/* # line 367 "awkgram.y" */ +{ yyval.p = op1(PREDECR, yypvt[-0].p); } break; case 148: -#line 368 "awkgram.y" -{ yyval.p = op1(PREINCR, yypt[-0].yyv.p); } break; +/* # line 368 "awkgram.y" */ +{ yyval.p = op1(PREINCR, yypvt[-0].p); } break; case 149: -#line 369 "awkgram.y" -{ yyval.p = op1(POSTDECR, yypt[-1].yyv.p); } break; +/* # line 369 "awkgram.y" */ +{ yyval.p = op1(POSTDECR, yypvt[-1].p); } break; case 150: -#line 370 "awkgram.y" -{ yyval.p = op1(POSTINCR, yypt[-1].yyv.p); } break; +/* # line 370 "awkgram.y" */ +{ yyval.p = op1(POSTINCR, yypvt[-1].p); } break; case 151: -#line 371 "awkgram.y" -{ yyval.p = op3(GETLINE, yypt[-2].yyv.p, (Node *)yypt[-1].yyv.i, yypt[-0].yyv.p); } break; +/* # line 371 "awkgram.y" */ +{ yyval.p = op3(GETLINE, yypvt[-2].p, (Node *)yypvt[-1].i, yypvt[-0].p); } break; case 152: -#line 372 "awkgram.y" -{ yyval.p = op3(GETLINE, NIL, (Node *)yypt[-1].yyv.i, yypt[-0].yyv.p); } break; +/* # line 372 "awkgram.y" */ +{ yyval.p = op3(GETLINE, NIL, (Node *)yypvt[-1].i, yypvt[-0].p); } break; case 153: -#line 373 "awkgram.y" -{ yyval.p = op3(GETLINE, yypt[-0].yyv.p, NIL, NIL); } break; +/* # line 373 "awkgram.y" */ +{ yyval.p = op3(GETLINE, yypvt[-0].p, NIL, NIL); } break; case 154: -#line 374 "awkgram.y" +/* # line 374 "awkgram.y" */ { yyval.p = op3(GETLINE, NIL, NIL, NIL); } break; case 155: -#line 376 "awkgram.y" -{ yyval.p = op2(INDEX, yypt[-3].yyv.p, yypt[-1].yyv.p); } break; +/* # line 376 "awkgram.y" */ +{ yyval.p = op2(INDEX, yypvt[-3].p, yypvt[-1].p); } break; case 156: -#line 378 "awkgram.y" +/* # line 378 "awkgram.y" */ { ERROR "index() doesn't permit regular expressions" SYNTAX; - yyval.p = op2(INDEX, yypt[-3].yyv.p, (Node*)yypt[-1].yyv.s); } break; + yyval.p = op2(INDEX, yypvt[-3].p, (Node*)yypvt[-1].s); } break; case 157: -#line 380 "awkgram.y" -{ yyval.p = yypt[-1].yyv.p; } break; +/* # line 380 "awkgram.y" */ +{ yyval.p = yypvt[-1].p; } break; case 158: -#line 382 "awkgram.y" -{ yyval.p = op3(MATCHFCN, NIL, yypt[-3].yyv.p, (Node*)makedfa(yypt[-1].yyv.s, 1)); } break; +/* # line 382 "awkgram.y" */ +{ yyval.p = op3(MATCHFCN, NIL, yypvt[-3].p, (Node*)makedfa(yypvt[-1].s, 1)); } break; case 159: -#line 384 "awkgram.y" -{ if (constnode(yypt[-1].yyv.p)) - yyval.p = op3(MATCHFCN, NIL, yypt[-3].yyv.p, (Node*)makedfa(strnode(yypt[-1].yyv.p), 1)); +/* # line 384 "awkgram.y" */ +{ if (constnode(yypvt[-1].p)) + yyval.p = op3(MATCHFCN, NIL, yypvt[-3].p, (Node*)makedfa(strnode(yypvt[-1].p), 1)); else - yyval.p = op3(MATCHFCN, (Node *)1, yypt[-3].yyv.p, yypt[-1].yyv.p); } break; + yyval.p = op3(MATCHFCN, (Node *)1, yypvt[-3].p, yypvt[-1].p); } break; case 160: -#line 388 "awkgram.y" -{ yyval.p = celltonode(yypt[-0].yyv.cp, CCON); } break; +/* # line 388 "awkgram.y" */ +{ yyval.p = celltonode(yypvt[-0].cp, CCON); } break; case 161: -#line 390 "awkgram.y" -{ yyval.p = op4(SPLIT, yypt[-5].yyv.p, makearr(yypt[-3].yyv.p), yypt[-1].yyv.p, (Node*)STRING); } break; +/* # line 390 "awkgram.y" */ +{ yyval.p = op4(SPLIT, yypvt[-5].p, makearr(yypvt[-3].p), yypvt[-1].p, (Node*)STRING); } break; case 162: -#line 392 "awkgram.y" -{ yyval.p = op4(SPLIT, yypt[-5].yyv.p, makearr(yypt[-3].yyv.p), (Node*)makedfa(yypt[-1].yyv.s, 1), (Node *)REGEXPR); } break; +/* # line 392 "awkgram.y" */ +{ yyval.p = op4(SPLIT, yypvt[-5].p, makearr(yypvt[-3].p), (Node*)makedfa(yypvt[-1].s, 1), (Node *)REGEXPR); } break; case 163: -#line 394 "awkgram.y" -{ yyval.p = op4(SPLIT, yypt[-3].yyv.p, makearr(yypt[-1].yyv.p), NIL, (Node*)STRING); } break; +/* # line 394 "awkgram.y" */ +{ yyval.p = op4(SPLIT, yypvt[-3].p, makearr(yypvt[-1].p), NIL, (Node*)STRING); } break; case 164: -#line 395 "awkgram.y" -{ yyval.p = op1(yypt[-3].yyv.i, yypt[-1].yyv.p); } break; +/* # line 395 "awkgram.y" */ +{ yyval.p = op1(yypvt[-3].i, yypvt[-1].p); } break; case 165: -#line 396 "awkgram.y" -{ yyval.p = celltonode(yypt[-0].yyv.cp, CCON); } break; +/* # line 396 "awkgram.y" */ +{ yyval.p = celltonode(yypvt[-0].cp, CCON); } break; case 166: -#line 398 "awkgram.y" -{ yyval.p = op4(yypt[-5].yyv.i, NIL, (Node*)makedfa(yypt[-3].yyv.s, 1), yypt[-1].yyv.p, rectonode()); } break; +/* # line 398 "awkgram.y" */ +{ yyval.p = op4(yypvt[-5].i, NIL, (Node*)makedfa(yypvt[-3].s, 1), yypvt[-1].p, rectonode()); } break; case 167: -#line 400 "awkgram.y" -{ if (constnode(yypt[-3].yyv.p)) - yyval.p = op4(yypt[-5].yyv.i, NIL, (Node*)makedfa(strnode(yypt[-3].yyv.p), 1), yypt[-1].yyv.p, rectonode()); +/* # line 400 "awkgram.y" */ +{ if (constnode(yypvt[-3].p)) + yyval.p = op4(yypvt[-5].i, NIL, (Node*)makedfa(strnode(yypvt[-3].p), 1), yypvt[-1].p, rectonode()); else - yyval.p = op4(yypt[-5].yyv.i, (Node *)1, yypt[-3].yyv.p, yypt[-1].yyv.p, rectonode()); } break; + yyval.p = op4(yypvt[-5].i, (Node *)1, yypvt[-3].p, yypvt[-1].p, rectonode()); } break; case 168: -#line 405 "awkgram.y" -{ yyval.p = op4(yypt[-7].yyv.i, NIL, (Node*)makedfa(yypt[-5].yyv.s, 1), yypt[-3].yyv.p, yypt[-1].yyv.p); } break; +/* # line 405 "awkgram.y" */ +{ yyval.p = op4(yypvt[-7].i, NIL, (Node*)makedfa(yypvt[-5].s, 1), yypvt[-3].p, yypvt[-1].p); } break; case 169: -#line 407 "awkgram.y" -{ if (constnode(yypt[-5].yyv.p)) - yyval.p = op4(yypt[-7].yyv.i, NIL, (Node*)makedfa(strnode(yypt[-5].yyv.p), 1), yypt[-3].yyv.p, yypt[-1].yyv.p); +/* # line 407 "awkgram.y" */ +{ if (constnode(yypvt[-5].p)) + yyval.p = op4(yypvt[-7].i, NIL, (Node*)makedfa(strnode(yypvt[-5].p), 1), yypvt[-3].p, yypvt[-1].p); else - yyval.p = op4(yypt[-7].yyv.i, (Node *)1, yypt[-5].yyv.p, yypt[-3].yyv.p, yypt[-1].yyv.p); } break; + yyval.p = op4(yypvt[-7].i, (Node *)1, yypvt[-5].p, yypvt[-3].p, yypvt[-1].p); } break; case 170: -#line 412 "awkgram.y" -{ yyval.p = op3(SUBSTR, yypt[-5].yyv.p, yypt[-3].yyv.p, yypt[-1].yyv.p); } break; +/* # line 412 "awkgram.y" */ +{ yyval.p = op3(SUBSTR, yypvt[-5].p, yypvt[-3].p, yypvt[-1].p); } break; case 171: -#line 414 "awkgram.y" -{ yyval.p = op3(SUBSTR, yypt[-3].yyv.p, yypt[-1].yyv.p, NIL); } break; +/* # line 414 "awkgram.y" */ +{ yyval.p = op3(SUBSTR, yypvt[-3].p, yypvt[-1].p, NIL); } break; case 174: -#line 420 "awkgram.y" -{ yyval.p = op2(ARRAY, makearr(yypt[-3].yyv.p), yypt[-1].yyv.p); } break; +/* # line 420 "awkgram.y" */ +{ yyval.p = op2(ARRAY, makearr(yypvt[-3].p), yypvt[-1].p); } break; case 175: -#line 421 "awkgram.y" -{ yyval.p = op1(INDIRECT, celltonode(yypt[-0].yyv.cp, CVAR)); } break; +/* # line 421 "awkgram.y" */ +{ yyval.p = op1(INDIRECT, celltonode(yypvt[-0].cp, CVAR)); } break; case 176: -#line 422 "awkgram.y" -{ yyval.p = op1(INDIRECT, yypt[-0].yyv.p); } break; +/* # line 422 "awkgram.y" */ +{ yyval.p = op1(INDIRECT, yypvt[-0].p); } break; case 177: -#line 426 "awkgram.y" +/* # line 426 "awkgram.y" */ { arglist = yyval.p = 0; } break; case 178: -#line 427 "awkgram.y" -{ arglist = yyval.p = celltonode(yypt[-0].yyv.cp,CVAR); } break; +/* # line 427 "awkgram.y" */ +{ arglist = yyval.p = celltonode(yypvt[-0].cp,CVAR); } break; case 179: -#line 428 "awkgram.y" +/* # line 428 "awkgram.y" */ { - checkdup(yypt[-2].yyv.p, yypt[-0].yyv.cp); - arglist = yyval.p = linkum(yypt[-2].yyv.p,celltonode(yypt[-0].yyv.cp,CVAR)); } break; + checkdup(yypvt[-2].p, yypvt[-0].cp); + arglist = yyval.p = linkum(yypvt[-2].p,celltonode(yypvt[-0].cp,CVAR)); } break; case 180: -#line 434 "awkgram.y" -{ yyval.p = celltonode(yypt[-0].yyv.cp, CVAR); } break; +/* # line 434 "awkgram.y" */ +{ yyval.p = celltonode(yypvt[-0].cp, CVAR); } break; case 181: -#line 435 "awkgram.y" -{ yyval.p = op1(ARG, (Node *) yypt[-0].yyv.i); } break; +/* # line 435 "awkgram.y" */ +{ yyval.p = op1(ARG, (Node *) yypvt[-0].i); } break; case 182: -#line 436 "awkgram.y" -{ yyval.p = op1(VARNF, (Node *) yypt[-0].yyv.cp); } break; +/* # line 436 "awkgram.y" */ +{ yyval.p = op1(VARNF, (Node *) yypvt[-0].cp); } break; case 183: -#line 441 "awkgram.y" -{ yyval.p = notnull(yypt[-1].yyv.p); } break; +/* # line 441 "awkgram.y" */ +{ yyval.p = notnull(yypvt[-1].p); } break; } - goto yystack; /* stack new state and value */ + goto yystack; /* reset registers in driver code */ } + +# ifdef __RUNTIME_YYMAXDEPTH + +static int allocate_stacks() { + /* allocate the yys and yyv stacks */ + yys = (int *) malloc(yymaxdepth * sizeof(int)); + yyv = (YYSTYPE *) malloc(yymaxdepth * sizeof(YYSTYPE)); + + if (yys==0 || yyv==0) { + yyerror( (nl_msg(30004,"unable to allocate space for yacc stacks")) ); + return(1); + } + else return(0); + +} + + +static void free_stacks() { + if (yys!=0) free((char *) yys); + if (yyv!=0) free((char *) yyv); +} + +# endif /* defined(__RUNTIME_YYMAXDEPTH) */ diff --git a/usr.bin/awk/ytab.h b/usr.bin/awk/ytab.h index d18ddfd..36d2a46 100644 --- a/usr.bin/awk/ytab.h +++ b/usr.bin/awk/ytab.h @@ -1,100 +1,102 @@ +/* $Id: ytab.h,v 1.2 1998/04/07 16:14:20 tribby Exp $ */ + typedef union { Node *p; Cell *cp; int i; char *s; -} YYSTYPE; -extern YYSTYPE yylval; -#define FIRSTTOKEN 57346 -#define PROGRAM 57347 -#define PASTAT 57348 -#define PASTAT2 57349 -#define XBEGIN 57350 -#define XEND 57351 -#define NL 57352 -#define ARRAY 57353 -#define MATCH 57354 -#define NOTMATCH 57355 -#define MATCHOP 57356 -#define FINAL 57357 -#define DOT 57358 -#define ALL 57359 -#define CCL 57360 -#define NCCL 57361 -#define CHAR 57362 -#define OR 57363 -#define STAR 57364 -#define QUEST 57365 -#define PLUS 57366 -#define AND 57367 -#define BOR 57368 -#define APPEND 57369 -#define EQ 57370 -#define GE 57371 -#define GT 57372 -#define LE 57373 -#define LT 57374 -#define NE 57375 -#define IN 57376 -#define ARG 57377 -#define BLTIN 57378 -#define BREAK 57379 -#define CLOSE 57380 -#define CONTINUE 57381 -#define DELETE 57382 -#define DO 57383 -#define EXIT 57384 -#define FOR 57385 -#define FUNC 57386 -#define SUB 57387 -#define GSUB 57388 -#define IF 57389 -#define INDEX 57390 -#define LSUBSTR 57391 -#define MATCHFCN 57392 -#define NEXT 57393 -#define NEXTFILE 57394 -#define ADD 57395 -#define MINUS 57396 -#define MULT 57397 -#define DIVIDE 57398 -#define MOD 57399 -#define ASSIGN 57400 -#define ASGNOP 57401 -#define ADDEQ 57402 -#define SUBEQ 57403 -#define MULTEQ 57404 -#define DIVEQ 57405 -#define MODEQ 57406 -#define POWEQ 57407 -#define PRINT 57408 -#define PRINTF 57409 -#define SPRINTF 57410 -#define ELSE 57411 -#define INTEST 57412 -#define CONDEXPR 57413 -#define POSTINCR 57414 -#define PREINCR 57415 -#define POSTDECR 57416 -#define PREDECR 57417 -#define VAR 57418 -#define IVAR 57419 -#define VARNF 57420 -#define CALL 57421 -#define NUMBER 57422 -#define STRING 57423 -#define REGEXPR 57424 -#define GETLINE 57425 -#define RETURN 57426 -#define SPLIT 57427 -#define SUBSTR 57428 -#define WHILE 57429 -#define CAT 57430 -#define NOT 57431 -#define UMINUS 57432 -#define POWER 57433 -#define DECR 57434 -#define INCR 57435 -#define INDIRECT 57436 -#define LASTTOKEN 57437 +} YYSTYPE; +extern YYSTYPE yylval; +# define FIRSTTOKEN 257 +# define PROGRAM 258 +# define PASTAT 259 +# define PASTAT2 260 +# define XBEGIN 261 +# define XEND 262 +# define NL 263 +# define ARRAY 264 +# define MATCH 265 +# define NOTMATCH 266 +# define MATCHOP 267 +# define FINAL 268 +# define DOT 269 +# define ALL 270 +# define CCL 271 +# define NCCL 272 +# define CHAR 273 +# define OR 274 +# define STAR 275 +# define QUEST 276 +# define PLUS 277 +# define AND 278 +# define BOR 279 +# define APPEND 280 +# define EQ 281 +# define GE 282 +# define GT 283 +# define LE 284 +# define LT 285 +# define NE 286 +# define IN 287 +# define ARG 288 +# define BLTIN 289 +# define BREAK 290 +# define CLOSE 291 +# define CONTINUE 292 +# define DELETE 293 +# define DO 294 +# define EXIT 295 +# define FOR 296 +# define FUNC 297 +# define SUB 298 +# define GSUB 299 +# define IF 300 +# define INDEX 301 +# define LSUBSTR 302 +# define MATCHFCN 303 +# define NEXT 304 +# define NEXTFILE 305 +# define ADD 306 +# define MINUS 307 +# define MULT 308 +# define DIVIDE 309 +# define MOD 310 +# define ASSIGN 311 +# define ASGNOP 312 +# define ADDEQ 313 +# define SUBEQ 314 +# define MULTEQ 315 +# define DIVEQ 316 +# define MODEQ 317 +# define POWEQ 318 +# define PRINT 319 +# define PRINTF 320 +# define SPRINTF 321 +# define ELSE 322 +# define INTEST 323 +# define CONDEXPR 324 +# define POSTINCR 325 +# define PREINCR 326 +# define POSTDECR 327 +# define PREDECR 328 +# define VAR 329 +# define IVAR 330 +# define VARNF 331 +# define CALL 332 +# define NUMBER 333 +# define STRING 334 +# define REGEXPR 335 +# define GETLINE 336 +# define RETURN 337 +# define SPLIT 338 +# define SUBSTR 339 +# define WHILE 340 +# define CAT 341 +# define NOT 342 +# define UMINUS 343 +# define POWER 344 +# define DECR 345 +# define INCR 346 +# define INDIRECT 347 +# define LASTTOKEN 348