#include #include #include # define U(x) x # define NLSTATE yyprevious=YYNEWLINE # define BEGIN yybgin = yysvec + 1 + # define INITIAL 0 # define YYLERR yysvec # define YYSTATE (yyestate-yysvec-1) # define YYOPTIM 1 # ifndef YYLMAX # define YYLMAX BUFSIZ # endif #ifndef __cplusplus # define output(c) (void)putc(c,yyout) #else # define lex_output(c) (void)putc(c,yyout) #endif #if defined(__cplusplus) || defined(__STDC__) #if defined(__cplusplus) && defined(__EXTERN_C__) extern "C" { #endif int yyback(int *, int); int yyinput(void); int yylook(void); void yyoutput(int); int yyracc(int); int yyreject(void); void yyunput(int); int yylex(void); #ifdef YYLEX_E void yywoutput(wchar_t); wchar_t yywinput(void); #endif #ifndef yyless int yyless(int); #endif #ifndef yywrap int yywrap(void); #endif #ifdef LEXDEBUG void allprint(char); void sprint(char *); #endif #if defined(__cplusplus) && defined(__EXTERN_C__) } #endif #ifdef __cplusplus extern "C" { #endif void exit(int); #ifdef __cplusplus } #endif #endif # define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;} # define yymore() (yymorfg=1) #ifndef __cplusplus # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) #else # define lex_input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) #endif #define ECHO fprintf(yyout, "%s",yytext) # define REJECT { nstr = yyreject(); goto yyfussy;} int yyleng; #define YYISARRAY char yytext[YYLMAX]; int yymorfg; extern char *yysptr, yysbuf[]; int yytchar; FILE *yyin = {stdin}, *yyout = {stdout}; extern int yylineno; struct yysvf { struct yywork *yystoff; struct yysvf *yyother; int *yystops;}; struct yysvf *yyestate; extern struct yysvf yysvec[], *yybgin; # line 3 "aqlparse.l" /* File: aqlparse.l * Author: Stefan Wiesmann and Richard Durbin (wiesmann,rd@sanger.ac.uk) * Copyright (C) J Thierry-Mieg and R Durbin, 1996 * ------------------------------------------------------------------- * Acedb is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * or see the on-line version at http://www.gnu.org/copyleft/gpl.txt * ------------------------------------------------------------------- * This file is part of the ACEDB genome database package, written by * Richard Durbin (MRC LMB, UK) rd@sanger.ac.uk, and * Jean Thierry-Mieg (CRBM du CNRS, France) mieg@kaa.cnrs-mop.fr * * Description: lex for AQL * Exported functions: * HISTORY: * Last edited: Sep 13 15:57 1999 (fw) * * Mar 1 13:19 1999 (fw): fixed lex/flex incompatability for Linux * * Feb 24 10:26 1999 (fw): reintroduced exist_tag (interpreted as tag[0]) * * Jan 11 11:26 1999 (fw): replaced order_by with order and by * removed keyword 'exists_tag' (now done with tag[0]) * * Aug 17 16:13 1998 (fw): ~ changed to 'like' * * Aug 14 18:11 1998 (fw): added ~ comparator for string wildcard matching * * Aug 10 11:55 1998 (fw): removed keyword ACTIVE (now replaced by context vars in tace) * * Jul 27 15:33 1998 (fw): changed error code for invalid character from 700 to 701 * Created: Tue Oct 29 00:01:02 1996 (rd) *------------------------------------------------------------------- */ # line 42 "aqlparse.l" /* $Id: aqlparse.l,v 1.29 2002/05/10 16:39:53 srk Exp $ */ #if !defined(LINUX) && !FreeBSD && !defined(__CYGWIN__) && !defined(DARWIN) /* for system that use the AT&T lex and its derivatives * we can redefine the input method for the lexer quite * easily - by replacing the macros input/unput */ #undef input #undef unput /* redefine them using a function that accesses the global string */ static char input (void) { ++lexPos ; return *lexString++ ; } static void unput (char c) { --lexPos ; *--lexString = c ; } #else /* LINUX || FreeBSD or CYGWIN */ /* LINUX uses flex, which doesn't provide the above functionality * the fact that input/unput are macros was never defined in the * POSIX standard. The standard define setting the global 'yyin' to * a user supplied FILE* stream as the only way to change the input * from stdin to another stream. So flex rigerously implements the standard. * We have to do a lot of trickery to convince flex not to work on a FILE* stream. */ #define YY_SKIP_YYWRAP /* yywrap() is used to switch to the next input file * if it's finished with one. We're not dealing with * multiple inputs and ignore this feature. * We need to link with -lfl (flex library) to provide * the yywrap stub. */ #define YY_NEVER_INTERACTIVE 1 /* flex has a notion of interactive buffers * (streams from tty devices such as stdin) and * non-interactive buffers (streams from fopen on a file) * To find out which it is, the function 'isatty' is * is called. When this compiler flag is set, we * make sure it doesn't need to call this function * at all. We need to prevent it from calling file-ops * on yyin, because we set it to (FILE*)1 in aqlParse() * to fool flex into thinking we have a stream (which prevents * it from defaulting to stdin) */ /* redefine the macro which is used by flex to get at another character * from the ficticous input stream. We have set yyin to (FILE*)1 and * now we let flex get the input from out global input string instead. * the redefinition is based on an example given on the Linux flex man-page. */ #define YY_INPUT(buf,result,max_size) \ { \ int c = *lexString++; ++lexPos ; \ result = (c == '\0') ? YY_NULL : (buf[0] = c, 1); \ } #endif /* LINUX */ /****************************************************/ #define token(x) tokPos[x] = lexPos - yyleng ; return x # define YYNEWLINE 10 yylex(){ int nstr; extern int yyprevious; #ifdef __cplusplus /* to avoid CC and lint complaining yyfussy not being used ...*/ static int __lex_hack = 0; if (__lex_hack) goto yyfussy; #endif while((nstr = yylook()) >= 0) yyfussy: switch(nstr){ case 0: if(yywrap()) return(0); break; case 1: # line 112 "aqlparse.l" { yytext[strlen((const char*)&yytext[0])-1] = 0 ; yylval.String = strnew ((char*)&yytext[1], aql_L->query->handle) ; token(StringLiteral) ; /* match string literals before all keyword, * so we can quote keywords and match them as tagnames etc. */ } break; case 2: # line 119 "aqlparse.l" { token(SELECT) ; } break; case 3: # line 120 "aqlparse.l" { token(FROM) ; } break; case 4: # line 121 "aqlparse.l" { token(WHERE) ; } break; case 5: # line 122 "aqlparse.l" { token(ALL); } break; case 6: # line 123 "aqlparse.l" { token(AS) ; } break; case 7: # line 124 "aqlparse.l" { token(IN) ; } break; case 8: # line 125 "aqlparse.l" { yylval.String = strnew ("class", aql_L->query->handle); /* for EXPR_LOC_FUNC */ token(CLASS) ; } break; case 9: # line 127 "aqlparse.l" { token(OBJECT) ; } break; case 10: # line 128 "aqlparse.l" { token(EXISTS) ; } break; case 11: # line 129 "aqlparse.l" { token(EXISTS_TAG) ; } break; case 12: # line 130 "aqlparse.l" { token(NOW) ; } break; case 13: # line 131 "aqlparse.l" { token(TODAY) ; } break; case 14: # line 132 "aqlparse.l" { token(NOT) ; } break; case 15: # line 133 "aqlparse.l" { token(AND) ; } break; case 16: # line 134 "aqlparse.l" { token(OR) ; } break; case 17: # line 135 "aqlparse.l" { token(XOR) ; } break; case 18: # line 136 "aqlparse.l" { token(UNION) ; } break; case 19: # line 137 "aqlparse.l" { token(INTERSECT) ; } break; case 20: # line 138 "aqlparse.l" { token(DIFF) ; } break; case 21: # line 139 "aqlparse.l" { token(DIFF) ; } break; case 22: # line 140 "aqlparse.l" { token(ORDER) ; } break; case 23: # line 141 "aqlparse.l" { token(ORDER) ; } break; case 24: # line 142 "aqlparse.l" { token(BY) ; } break; case 25: # line 143 "aqlparse.l" { token(TRUEtok) ; } break; case 26: # line 144 "aqlparse.l" { token(FALSEtok) ; } break; case 27: # line 146 "aqlparse.l" { yylval.Int = oYEARDIFF ; token(ExprExprFunc) ; } break; case 28: # line 147 "aqlparse.l" { yylval.Int = oMONTHDIFF ; token(ExprExprFunc) ; } break; case 29: # line 148 "aqlparse.l" { yylval.Int = oWEEKDIFF ; token(ExprExprFunc) ; } break; case 30: # line 149 "aqlparse.l" { yylval.Int = oDAYDIFF ; token(ExprExprFunc) ; } break; case 31: # line 150 "aqlparse.l" { yylval.Int = oHOURDIFF ; token(ExprExprFunc) ; } break; case 32: # line 151 "aqlparse.l" { yylval.Int = oMINDIFF ; token(ExprExprFunc) ; } break; case 33: # line 152 "aqlparse.l" { yylval.Int = oSECDIFF ; token(ExprExprFunc) ; } break; case 34: # line 154 "aqlparse.l" { yylval.Int = oCOUNT ; token(TableFunc) ; } break; case 35: # line 155 "aqlparse.l" { yylval.Int = oFIRST ; token(TableFunc) ; } break; case 36: # line 156 "aqlparse.l" { yylval.Int = oLAST ; token(TableFunc) ; } break; case 37: # line 157 "aqlparse.l" { yylval.Int = oMIN ; token(TableFunc) ; } break; case 38: # line 158 "aqlparse.l" { yylval.Int = oMAX ; token(TableFunc) ; } break; case 39: # line 159 "aqlparse.l" { yylval.Int = oSUM ; token(TableFunc) ; } break; case 40: # line 160 "aqlparse.l" { yylval.Int = oAVG ; token(TableFunc) ; } break; case 41: # line 162 "aqlparse.l" { yylval.Int = oABS ; token(ExprFunc) ; } break; case 42: # line 163 "aqlparse.l" { yylval.Int = oMOD ; token(ExprExprFunc) ; } break; case 43: # line 164 "aqlparse.l" { yylval.Int = oMOD ; token(ExprExprFunc) ; } break; case 44: # line 166 "aqlparse.l" { yylval.Int = oASC ; token(Ordering) ; } break; case 45: # line 167 "aqlparse.l" { yylval.Int = oDESC ; token(Ordering) ; } break; case 46: # line 169 "aqlparse.l" { yylval.Int = oLIKE ; token(Comparator) ; } break; case 47: # line 171 "aqlparse.l" { yylval.String = strnew ((char*)&yytext[0], aql_L->query->handle) ; token(Identifier) ; } break; case 48: # line 175 "aqlparse.l" token(yytext[0]) ; break; case 49: # line 177 "aqlparse.l" { token(ASSIGN) ; } break; case 50: # line 178 "aqlparse.l" { token(ARROW) ; } break; case 51: # line 179 "aqlparse.l" { token(DOUBLE_COLON) ; } break; case 52: # line 181 "aqlparse.l" { yylval.Int = oEQ ; token(Comparator) ; } break; case 53: # line 182 "aqlparse.l" { yylval.Int = oLT ; token(Comparator) ; } break; case 54: # line 183 "aqlparse.l" { yylval.Int = oGT ; token(Comparator) ; } break; case 55: # line 184 "aqlparse.l" { yylval.Int = oNE ; token(Comparator) ; } break; case 56: # line 185 "aqlparse.l" { yylval.Int = oLE ; token(Comparator) ; } break; case 57: # line 186 "aqlparse.l" { yylval.Int = oGE ; token(Comparator) ; } break; case 58: # line 188 "aqlparse.l" { sscanf ((const char*)&yytext[0], "%d", &yylval.Int) ; token(Number) ; } break; case 59: # line 192 "aqlparse.l" case 60: # line 193 "aqlparse.l" case 61: # line 194 "aqlparse.l" case 62: # line 195 "aqlparse.l" case 63: # line 196 "aqlparse.l" { sscanf ((const char*)&yytext[0], "%f", &yylval.Float) ; token(FloatLiteral) ; } break; case 64: # line 201 "aqlparse.l" case 65: # line 202 "aqlparse.l" case 66: # line 203 "aqlparse.l" case 67: # line 204 "aqlparse.l" case 68: # line 205 "aqlparse.l" case 69: # line 206 "aqlparse.l" { yylval.String = strnew ((char*)&yytext[1], aql_L->query->handle) ; /* YYYY */ token(DateLiteral) ; } break; case 70: # line 212 "aqlparse.l" ; break; case 71: # line 214 "aqlparse.l" aqlError (aql_L, 701, lexPos == 0 ? 1 : lexPos-1, "syntax error: invalid character") ; break; case -1: break; default: (void)fprintf(yyout,"bad switch yylook %d",nstr); } return(0); } /* end of yylex */ # line 217 "aqlparse.l" void yyerror (char *s) { /* Syntax error */ aqlError (aql_L, 700, lexPos ? lexPos-1 : 1, s); /* aql is a static in aqlparse.y - the current AQL object */ } /********************** end of file *******************/ int yyvstop[] = { 0, 71, 0, 70, 71, 0, 70, 0, 71, 0, 71, 0, 48, 71, 0, 48, 71, 0, 48, 71, 0, 58, 71, 0, 48, 71, 0, 53, 71, 0, 52, 71, 0, 54, 71, 0, 47, 71, 0, 71, 0, 47, 71, 0, 47, 71, 0, 47, 71, 0, 47, 71, 0, 47, 71, 0, 47, 71, 0, 47, 71, 0, 47, 71, 0, 47, 71, 0, 47, 71, 0, 47, 71, 0, 47, 71, 0, 47, 71, 0, 47, 71, 0, 47, 71, 0, 47, 71, 0, 47, 71, 0, 47, 71, 0, 55, 0, 1, 0, 50, 0, 63, 0, 62, 0, 58, 0, 51, 0, 49, 0, 56, 0, 57, 0, 47, 0, 47, 0, 47, 0, 47, 0, 6, 47, 0, 47, 0, 24, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 7, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 16, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 1, 0, 61, 0, 59, 0, 41, 47, 0, 5, 47, 0, 15, 47, 0, 44, 47, 0, 40, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 38, 47, 0, 37, 47, 0, 43, 47, 0, 47, 0, 14, 47, 0, 12, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 39, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 17, 47, 0, 47, 0, 60, 0, 47, 0, 47, 0, 47, 0, 45, 47, 0, 21, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 3, 47, 0, 47, 0, 47, 0, 36, 47, 0, 46, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 23, 47, 0, 47, 0, 25, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 69, 0, 8, 47, 0, 34, 47, 0, 47, 0, 47, 0, 47, 0, 26, 47, 0, 35, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 47, 0, 22, 47, 0, 47, 0, 47, 0, 13, 47, 0, 18, 47, 0, 47, 0, 4, 47, 0, 47, 0, 47, 0, 20, 47, 0, 10, 47, 0, 47, 0, 47, 0, 47, 0, 42, 47, 0, 47, 0, 9, 47, 0, 47, 0, 2, 47, 0, 47, 0, 47, 0, 30, 47, 0, 47, 0, 47, 0, 47, 0, 32, 47, 0, 47, 0, 33, 47, 0, 47, 0, 47, 0, 68, 0, 47, 0, 31, 47, 0, 47, 0, 47, 0, 29, 47, 0, 27, 47, 0, 47, 0, 19, 47, 0, 28, 47, 0, 11, 47, 0, 67, 0, 66, 0, 65, 0, 64, 0, 0}; # define YYTYPE unsigned char struct yywork { YYTYPE verify, advance; } yycrank[] = { 0,0, 0,0, 1,3, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,4, 1,5, 0,0, 4,5, 4,5, 0,0, 4,5, 4,5, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,6, 1,7, 4,5, 1,8, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,8, 0,0, 1,9, 1,10, 0,0, 1,11, 1,11, 1,11, 1,11, 1,11, 0,0, 1,11, 39,87, 0,0, 1,11, 1,12, 2,6, 1,13, 1,14, 1,15, 6,36, 9,40, 1,16, 13,48, 12,46, 15,49, 1,16, 12,47, 2,9, 2,10, 17,51, 17,51, 0,0, 51,93, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 2,12, 51,93, 2,13, 2,14, 2,15, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,17, 1,18, 1,19, 1,20, 1,21, 1,22, 1,23, 37,39, 1,24, 1,25, 26,69, 55,97, 1,26, 1,27, 1,28, 1,29, 35,86, 39,39, 26,70, 1,30, 1,31, 1,32, 25,68, 1,33, 1,34, 1,35, 2,17, 2,18, 2,19, 2,20, 2,21, 2,22, 2,23, 19,57, 2,24, 2,25, 22,63, 24,67, 2,26, 2,27, 2,28, 2,29, 28,74, 32,82, 7,37, 2,30, 2,31, 2,32, 34,85, 2,33, 2,34, 2,35, 7,37, 7,37, 10,41, 10,41, 10,41, 10,41, 10,41, 10,41, 10,41, 10,41, 10,41, 10,41, 18,52, 20,58, 31,80, 29,75, 20,59, 31,81, 23,64, 52,94, 53,95, 54,96, 18,53, 10,42, 18,54, 7,38, 23,65, 7,37, 56,98, 18,55, 27,71, 29,76, 18,56, 33,83, 7,37, 23,66, 33,84, 30,77, 27,72, 7,37, 7,37, 7,37, 7,37, 7,37, 27,73, 7,37, 21,60, 30,78, 7,37, 58,99, 21,61, 59,100, 60,101, 30,79, 21,62, 10,42, 7,37, 61,102, 62,103, 11,43, 7,37, 11,44, 11,44, 11,44, 11,44, 11,44, 11,44, 11,44, 11,44, 11,44, 11,44, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 63,104, 11,45, 7,39, 64,106, 65,107, 66,108, 63,105, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 11,45, 67,109, 68,110, 69,111, 16,50, 70,112, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 16,50, 42,88, 71,113, 42,88, 72,114, 75,119, 42,89, 42,89, 42,89, 42,89, 42,89, 42,89, 42,89, 42,89, 42,89, 42,89, 43,43, 43,43, 43,43, 43,43, 43,43, 43,43, 43,43, 43,43, 43,43, 43,43, 73,115, 74,117, 76,120, 78,123, 74,118, 79,124, 80,125, 45,91, 81,126, 45,91, 73,116, 43,90, 45,92, 45,92, 45,92, 45,92, 45,92, 45,92, 45,92, 45,92, 45,92, 45,92, 77,121, 82,127, 83,128, 84,129, 85,130, 86,131, 87,39, 99,135, 100,136, 77,122, 88,89, 88,89, 88,89, 88,89, 88,89, 88,89, 88,89, 88,89, 88,89, 88,89, 90,132, 43,90, 90,132, 101,137, 102,138, 90,133, 90,133, 90,133, 90,133, 90,133, 90,133, 90,133, 90,133, 90,133, 90,133, 91,92, 91,92, 91,92, 91,92, 91,92, 91,92, 91,92, 91,92, 91,92, 91,92, 93,134, 93,134, 93,134, 93,134, 93,134, 93,134, 93,134, 93,134, 93,134, 93,134, 103,139, 104,140, 105,141, 106,142, 107,143, 108,144, 109,145, 110,146, 111,147, 112,148, 114,149, 115,150, 116,151, 119,152, 120,153, 121,154, 122,155, 123,156, 125,157, 126,158, 127,159, 128,160, 129,161, 131,162, 132,133, 132,133, 132,133, 132,133, 132,133, 132,133, 132,133, 132,133, 132,133, 132,133, 134,163, 134,163, 134,163, 134,163, 134,163, 134,163, 134,163, 134,163, 134,163, 134,163, 135,164, 136,165, 137,166, 140,167, 141,168, 142,169, 143,170, 145,171, 146,172, 149,173, 150,174, 151,175, 152,176, 153,177, 154,178, 155,179, 157,180, 159,181, 160,182, 161,183, 162,184, 163,185, 166,186, 167,187, 168,188, 171,189, 172,190, 173,191, 174,192, 175,193, 176,194, 178,195, 179,196, 182,197, 184,198, 185,199, 185,199, 186,200, 188,201, 189,202, 190,203, 191,204, 193,205, 195,206, 197,207, 198,208, 199,209, 199,209, 199,209, 199,209, 199,209, 199,209, 199,209, 199,209, 199,209, 199,209, 201,210, 202,211, 203,212, 205,213, 207,214, 208,215, 209,216, 210,217, 212,218, 213,219, 216,220, 216,220, 216,220, 216,220, 217,221, 220,222, 220,222, 220,222, 220,222, 220,222, 220,222, 220,222, 220,222, 220,222, 220,222, 222,223, 223,224, 223,224, 223,224, 224,225, 224,225, 224,225, 224,225, 224,225, 224,225, 224,225, 224,225, 224,225, 224,225, 225,226, 226,227, 226,227, 226,227, 226,227, 226,227, 226,227, 227,228, 227,228, 227,228, 227,228, 227,228, 227,228, 227,228, 227,228, 227,228, 227,228, 228,229, 229,230, 229,230, 229,230, 229,230, 229,230, 229,230, 230,231, 230,231, 230,231, 230,231, 230,231, 230,231, 230,231, 230,231, 230,231, 230,231, 0,0, 0,0, 0,0}; struct yysvf yysvec[] = { 0, 0, 0, yycrank+-1, 0, 0, yycrank+-27, yysvec+1, 0, yycrank+0, 0, yyvstop+1, yycrank+4, 0, yyvstop+3, yycrank+0, yysvec+4, yyvstop+6, yycrank+3, 0, yyvstop+8, yycrank+-140, 0, yyvstop+10, yycrank+0, 0, yyvstop+12, yycrank+3, 0, yyvstop+15, yycrank+103, 0, yyvstop+18, yycrank+162, 0, yyvstop+21, yycrank+10, 0, yyvstop+24, yycrank+6, 0, yyvstop+27, yycrank+0, 0, yyvstop+30, yycrank+8, 0, yyvstop+33, yycrank+172, 0, yyvstop+36, yycrank+25, 0, yyvstop+39, yycrank+63, yysvec+16, yyvstop+41, yycrank+9, yysvec+16, yyvstop+44, yycrank+54, yysvec+16, yyvstop+47, yycrank+98, yysvec+16, yyvstop+50, yycrank+13, yysvec+16, yyvstop+53, yycrank+70, yysvec+16, yyvstop+56, yycrank+23, yysvec+16, yyvstop+59, yycrank+9, yysvec+16, yyvstop+62, yycrank+10, yysvec+16, yyvstop+65, yycrank+82, yysvec+16, yyvstop+68, yycrank+28, yysvec+16, yyvstop+71, yycrank+66, yysvec+16, yyvstop+74, yycrank+85, yysvec+16, yyvstop+77, yycrank+52, yysvec+16, yyvstop+80, yycrank+30, yysvec+16, yyvstop+83, yycrank+81, yysvec+16, yyvstop+86, yycrank+34, yysvec+16, yyvstop+89, yycrank+12, yysvec+16, yyvstop+92, yycrank+0, 0, yyvstop+95, yycrank+-12, yysvec+7, 0, yycrank+0, 0, yyvstop+97, yycrank+-22, yysvec+7, 0, yycrank+0, 0, yyvstop+99, yycrank+0, yysvec+10, yyvstop+101, yycrank+252, 0, 0, yycrank+262, 0, yyvstop+103, yycrank+0, yysvec+11, yyvstop+105, yycrank+284, 0, 0, yycrank+0, 0, yyvstop+107, yycrank+0, 0, yyvstop+109, yycrank+0, 0, yyvstop+111, yycrank+0, 0, yyvstop+113, yycrank+0, yysvec+16, yyvstop+115, yycrank+29, 0, 0, yycrank+53, yysvec+16, yyvstop+117, yycrank+61, yysvec+16, yyvstop+119, yycrank+70, yysvec+16, yyvstop+121, yycrank+9, yysvec+16, yyvstop+123, yycrank+74, yysvec+16, yyvstop+126, yycrank+0, yysvec+16, yyvstop+128, yycrank+101, yysvec+16, yyvstop+131, yycrank+83, yysvec+16, yyvstop+133, yycrank+80, yysvec+16, yyvstop+135, yycrank+91, yysvec+16, yyvstop+137, yycrank+105, yysvec+16, yyvstop+139, yycrank+131, yysvec+16, yyvstop+141, yycrank+125, yysvec+16, yyvstop+143, yycrank+120, yysvec+16, yyvstop+145, yycrank+124, yysvec+16, yyvstop+147, yycrank+147, yysvec+16, yyvstop+149, yycrank+149, yysvec+16, yyvstop+151, yycrank+151, yysvec+16, yyvstop+154, yycrank+161, yysvec+16, yyvstop+156, yycrank+176, yysvec+16, yyvstop+158, yycrank+188, yysvec+16, yyvstop+160, yycrank+220, yysvec+16, yyvstop+162, yycrank+205, yysvec+16, yyvstop+164, yycrank+193, yysvec+16, yyvstop+166, yycrank+222, yysvec+16, yyvstop+168, yycrank+243, yysvec+16, yyvstop+171, yycrank+209, yysvec+16, yyvstop+173, yycrank+216, yysvec+16, yyvstop+175, yycrank+226, yysvec+16, yyvstop+177, yycrank+211, yysvec+16, yyvstop+179, yycrank+238, yysvec+16, yyvstop+181, yycrank+243, yysvec+16, yyvstop+183, yycrank+244, yysvec+16, yyvstop+185, yycrank+232, yysvec+16, yyvstop+187, yycrank+250, yysvec+16, yyvstop+189, yycrank+-256, yysvec+7, yyvstop+191, yycrank+304, 0, 0, yycrank+0, yysvec+88, yyvstop+193, yycrank+319, 0, 0, yycrank+329, 0, 0, yycrank+0, yysvec+91, yyvstop+195, yycrank+339, 0, 0, yycrank+0, yysvec+16, yyvstop+197, yycrank+0, yysvec+16, yyvstop+200, yycrank+0, yysvec+16, yyvstop+203, yycrank+0, yysvec+16, yyvstop+206, yycrank+0, yysvec+16, yyvstop+209, yycrank+234, yysvec+16, yyvstop+212, yycrank+240, yysvec+16, yyvstop+214, yycrank+265, yysvec+16, yyvstop+216, yycrank+267, yysvec+16, yyvstop+218, yycrank+295, yysvec+16, yyvstop+220, yycrank+297, yysvec+16, yyvstop+222, yycrank+284, yysvec+16, yyvstop+224, yycrank+285, yysvec+16, yyvstop+226, yycrank+286, yysvec+16, yyvstop+228, yycrank+293, yysvec+16, yyvstop+230, yycrank+289, yysvec+16, yyvstop+232, yycrank+303, yysvec+16, yyvstop+234, yycrank+289, yysvec+16, yyvstop+236, yycrank+305, yysvec+16, yyvstop+238, yycrank+0, yysvec+16, yyvstop+240, yycrank+307, yysvec+16, yyvstop+243, yycrank+291, yysvec+16, yyvstop+246, yycrank+293, yysvec+16, yyvstop+249, yycrank+0, yysvec+16, yyvstop+251, yycrank+0, yysvec+16, yyvstop+254, yycrank+309, yysvec+16, yyvstop+257, yycrank+310, yysvec+16, yyvstop+259, yycrank+312, yysvec+16, yyvstop+261, yycrank+312, yysvec+16, yyvstop+263, yycrank+298, yysvec+16, yyvstop+265, yycrank+0, yysvec+16, yyvstop+267, yycrank+318, yysvec+16, yyvstop+270, yycrank+315, yysvec+16, yyvstop+272, yycrank+306, yysvec+16, yyvstop+274, yycrank+311, yysvec+16, yyvstop+276, yycrank+305, yysvec+16, yyvstop+278, yycrank+0, yysvec+16, yyvstop+280, yycrank+306, yysvec+16, yyvstop+283, yycrank+373, 0, 0, yycrank+0, yysvec+132, yyvstop+285, yycrank+383, 0, 0, yycrank+326, yysvec+16, yyvstop+287, yycrank+326, yysvec+16, yyvstop+289, yycrank+338, yysvec+16, yyvstop+291, yycrank+0, yysvec+16, yyvstop+293, yycrank+0, yysvec+16, yyvstop+296, yycrank+332, yysvec+16, yyvstop+299, yycrank+329, yysvec+16, yyvstop+301, yycrank+345, yysvec+16, yyvstop+303, yycrank+331, yysvec+16, yyvstop+305, yycrank+0, yysvec+16, yyvstop+307, yycrank+348, yysvec+16, yyvstop+310, yycrank+335, yysvec+16, yyvstop+312, yycrank+0, yysvec+16, yyvstop+314, yycrank+0, yysvec+16, yyvstop+317, yycrank+345, yysvec+16, yyvstop+320, yycrank+343, yysvec+16, yyvstop+322, yycrank+348, yysvec+16, yyvstop+324, yycrank+354, yysvec+16, yyvstop+326, yycrank+340, yysvec+16, yyvstop+328, yycrank+350, yysvec+16, yyvstop+330, yycrank+357, yysvec+16, yyvstop+332, yycrank+0, yysvec+16, yyvstop+334, yycrank+336, yysvec+16, yyvstop+337, yycrank+0, yysvec+16, yyvstop+339, yycrank+348, yysvec+16, yyvstop+342, yycrank+359, yysvec+16, yyvstop+344, yycrank+359, yysvec+16, yyvstop+346, yycrank+361, yysvec+16, yyvstop+348, yycrank+417, 0, yyvstop+350, yycrank+0, yysvec+16, yyvstop+352, yycrank+0, yysvec+16, yyvstop+355, yycrank+361, yysvec+16, yyvstop+358, yycrank+348, yysvec+16, yyvstop+360, yycrank+350, yysvec+16, yyvstop+362, yycrank+0, yysvec+16, yyvstop+364, yycrank+0, yysvec+16, yyvstop+367, yycrank+361, yysvec+16, yyvstop+370, yycrank+352, yysvec+16, yyvstop+372, yycrank+366, yysvec+16, yyvstop+374, yycrank+358, yysvec+16, yyvstop+376, yycrank+370, yysvec+16, yyvstop+378, yycrank+355, yysvec+16, yyvstop+380, yycrank+0, yysvec+16, yyvstop+382, yycrank+370, yysvec+16, yyvstop+385, yycrank+357, yysvec+16, yyvstop+387, yycrank+0, yysvec+16, yyvstop+389, yycrank+0, yysvec+16, yyvstop+392, yycrank+369, yysvec+16, yyvstop+395, yycrank+0, yysvec+16, yyvstop+397, yycrank+370, yysvec+16, yyvstop+400, yycrank+428, 0, 0, yycrank+376, yysvec+16, yyvstop+402, yycrank+0, yysvec+16, yyvstop+404, yycrank+384, yysvec+16, yyvstop+407, yycrank+378, yysvec+16, yyvstop+410, yycrank+380, yysvec+16, yyvstop+412, yycrank+380, yysvec+16, yyvstop+414, yycrank+0, yysvec+16, yyvstop+416, yycrank+378, yysvec+16, yyvstop+419, yycrank+0, yysvec+16, yyvstop+421, yycrank+382, yysvec+16, yyvstop+424, yycrank+0, yysvec+16, yyvstop+426, yycrank+383, yysvec+16, yyvstop+429, yycrank+384, yysvec+16, yyvstop+431, yycrank+439, 0, 0, yycrank+0, yysvec+16, yyvstop+433, yycrank+381, yysvec+16, yyvstop+436, yycrank+396, yysvec+16, yyvstop+438, yycrank+400, yysvec+16, yyvstop+440, yycrank+0, yysvec+16, yyvstop+442, yycrank+398, yysvec+16, yyvstop+445, yycrank+0, yysvec+16, yyvstop+447, yycrank+399, yysvec+16, yyvstop+450, yycrank+400, yysvec+16, yyvstop+452, yycrank+458, 0, yyvstop+454, yycrank+407, yysvec+16, yyvstop+456, yycrank+0, yysvec+16, yyvstop+458, yycrank+389, yysvec+16, yyvstop+461, yycrank+404, yysvec+16, yyvstop+463, yycrank+0, yysvec+16, yyvstop+465, yycrank+0, yysvec+16, yyvstop+468, yycrank+459, 0, 0, yycrank+408, yysvec+16, yyvstop+471, yycrank+0, yysvec+16, yyvstop+473, yycrank+0, yysvec+16, yyvstop+476, yycrank+464, 0, 0, yycrank+0, yysvec+16, yyvstop+479, yycrank+427, 0, yyvstop+482, yycrank+475, 0, 0, yycrank+478, 0, 0, yycrank+478, 0, yyvstop+484, yycrank+489, 0, 0, yycrank+495, 0, 0, yycrank+495, 0, yyvstop+486, yycrank+506, 0, 0, yycrank+512, 0, 0, yycrank+0, 0, yyvstop+488, 0, 0, 0}; struct yywork *yytop = yycrank+569; struct yysvf *yybgin = yysvec+1; char yymatch[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 9, 10, 1, 9, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 34, 1, 36, 36, 1, 1, 36, 36, 36, 43, 36, 43, 36, 36, 48, 49, 50, 51, 52, 52, 54, 54, 54, 57, 36, 36, 1, 1, 1, 1, 36, 65, 65, 65, 65, 69, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 36, 1, 36, 1, 36, 1, 65, 65, 65, 65, 69, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 1, 36, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}; char yyextra[] = { 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0}; /* Copyright (c) 1989 AT&T */ /* All Rights Reserved */ /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */ /* The copyright notice above does not evidence any */ /* actual or intended publication of such source code. */ #pragma ident "@(#)ncform 6.12 97/12/08 SMI" int yylineno =1; # define YYU(x) x # define NLSTATE yyprevious=YYNEWLINE struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp; char yysbuf[YYLMAX]; char *yysptr = yysbuf; int *yyfnd; extern struct yysvf *yyestate; int yyprevious = YYNEWLINE; #if defined(__cplusplus) || defined(__STDC__) int yylook(void) #else yylook() #endif { register struct yysvf *yystate, **lsp; register struct yywork *yyt; struct yysvf *yyz; int yych, yyfirst; struct yywork *yyr; # ifdef LEXDEBUG int debug; # endif char *yylastch; /* start off machines */ # ifdef LEXDEBUG debug = 0; # endif yyfirst=1; if (!yymorfg) yylastch = yytext; else { yymorfg=0; yylastch = yytext+yyleng; } for(;;){ lsp = yylstate; yyestate = yystate = yybgin; if (yyprevious==YYNEWLINE) yystate++; for (;;){ # ifdef LEXDEBUG if(debug)fprintf(yyout,"state %d\n",yystate-yysvec-1); # endif yyt = yystate->yystoff; if(yyt == yycrank && !yyfirst){ /* may not be any transitions */ yyz = yystate->yyother; if(yyz == 0)break; if(yyz->yystoff == yycrank)break; } #ifndef __cplusplus *yylastch++ = yych = input(); #else *yylastch++ = yych = lex_input(); #endif #ifdef YYISARRAY if(yylastch > &yytext[YYLMAX]) { fprintf(yyout,"Input string too long, limit %d\n",YYLMAX); exit(1); } #else if (yylastch >= &yytext[ yytextsz ]) { int x = yylastch - yytext; yytextsz += YYTEXTSZINC; if (yytext == yy_tbuf) { yytext = (char *) malloc(yytextsz); memcpy(yytext, yy_tbuf, sizeof (yy_tbuf)); } else yytext = (char *) realloc(yytext, yytextsz); if (!yytext) { fprintf(yyout, "Cannot realloc yytext\n"); exit(1); } yylastch = yytext + x; } #endif yyfirst=0; tryagain: # ifdef LEXDEBUG if(debug){ fprintf(yyout,"char "); allprint(yych); putchar('\n'); } # endif yyr = yyt; if ( (uintptr_t)yyt > (uintptr_t)yycrank){ yyt = yyr + yych; if (yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; if(lsp > &yylstate[YYLMAX]) { fprintf(yyout,"Input string too long, limit %d\n",YYLMAX); exit(1); } goto contin; } } # ifdef YYOPTIM else if((uintptr_t)yyt < (uintptr_t)yycrank) { /* r < yycrank */ yyt = yyr = yycrank+(yycrank-yyt); # ifdef LEXDEBUG if(debug)fprintf(yyout,"compressed state\n"); # endif yyt = yyt + yych; if(yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; if(lsp > &yylstate[YYLMAX]) { fprintf(yyout,"Input string too long, limit %d\n",YYLMAX); exit(1); } goto contin; } yyt = yyr + YYU(yymatch[yych]); # ifdef LEXDEBUG if(debug){ fprintf(yyout,"try fall back character "); allprint(YYU(yymatch[yych])); putchar('\n'); } # endif if(yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transition */ {unput(*--yylastch);break;} *lsp++ = yystate = yyt->advance+yysvec; if(lsp > &yylstate[YYLMAX]) { fprintf(yyout,"Input string too long, limit %d\n",YYLMAX); exit(1); } goto contin; } } if ((yystate = yystate->yyother) && (yyt= yystate->yystoff) != yycrank){ # ifdef LEXDEBUG if(debug)fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1); # endif goto tryagain; } # endif else {unput(*--yylastch);break;} contin: # ifdef LEXDEBUG if(debug){ fprintf(yyout,"state %d char ",yystate-yysvec-1); allprint(yych); putchar('\n'); } # endif ; } # ifdef LEXDEBUG if(debug){ fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1); allprint(yych); putchar('\n'); } # endif while (lsp-- > yylstate){ *yylastch-- = 0; if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd > 0){ yyolsp = lsp; if(yyextra[*yyfnd]){ /* must backup */ while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){ lsp--; unput(*yylastch--); } } yyprevious = YYU(*yylastch); yylsp = lsp; yyleng = yylastch-yytext+1; yytext[yyleng] = 0; # ifdef LEXDEBUG if(debug){ fprintf(yyout,"\nmatch "); sprint(yytext); fprintf(yyout," action %d\n",*yyfnd); } # endif return(*yyfnd++); } unput(*yylastch); } if (yytext[0] == 0 /* && feof(yyin) */) { yysptr=yysbuf; return(0); } #ifndef __cplusplus yyprevious = yytext[0] = input(); if (yyprevious>0) output(yyprevious); #else yyprevious = yytext[0] = lex_input(); if (yyprevious>0) lex_output(yyprevious); #endif yylastch=yytext; # ifdef LEXDEBUG if(debug)putchar('\n'); # endif } } #if defined(__cplusplus) || defined(__STDC__) int yyback(int *p, int m) #else yyback(p, m) int *p; #endif { if (p==0) return(0); while (*p) { if (*p++ == m) return(1); } return(0); } /* the following are only used in the lex library */ #if defined(__cplusplus) || defined(__STDC__) int yyinput(void) #else yyinput() #endif { #ifndef __cplusplus return(input()); #else return(lex_input()); #endif } #if defined(__cplusplus) || defined(__STDC__) void yyoutput(int c) #else yyoutput(c) int c; #endif { #ifndef __cplusplus output(c); #else lex_output(c); #endif } #if defined(__cplusplus) || defined(__STDC__) void yyunput(int c) #else yyunput(c) int c; #endif { unput(c); }