#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); void yywunput(wchar_t); #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 "poolcfg.l" /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" #pragma error_messages(off, E_STATEMENT_NOT_REACHED) # line 31 "poolcfg.l" /* * poolcfg.l * * Overview * poolcfg.l implements a lexer for the poolcfg(1) utility.The lexer uses * the token definitions generated by YACC in the file poolcfg_Grammar.h. * To make token recognition simpler, the lexer uses a separate state for * each of the different data types supported by poolcfg(1). * * States * Lex provides the ability to minimise conflict between qualifying regexps * by providing states. A regexp that is qualified by a state will only be * used when the state is entered (using the BEGIN command). (The * exception to this rule, is that rules defined in the default state are * available in all states.) * * poolcfg.l makes use of type states, one for each of the poolcfg(1) * supported data types: * * ISTATE => int64_t * USTATE => uint64_t * BSTATE => uchar_t * SSTATE => const char * * DSTATE => double * * and a further state, CPUSTATE, to indicate the difference between matching * a valid "name" (i.e. id) for a cpu and a valid name for other components of * libpool. * * When a token indicating a variable declaration is matched, the corresponding * state is saved in the state variable. Once the assignment ('=') token is * matched, the stored state is entered and the additional state specific * matching regular expressions become available. Once a state specific * token is matched, the default state is restored. * */ #include #include #include #include #include #include #include #include "utils.h" #include "poolcfg.h" #include "poolcfg_grammar.h" static int lex_lineno = 1; /* line-number for error reporting */ static int state = INITIAL; /* state to be used */ extern void yyerror(char *s); extern int dofile; /* are we processing a file? */ # define ISTATE 2 # define USTATE 4 # define BSTATE 6 # define SSTATE 8 # define DSTATE 10 # define CPUSTATE 12 # define YYNEWLINE 10 int 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 93 "poolcfg.l" lex_lineno++; break; case 2: # line 95 "poolcfg.l" ; break; case 3: # line 97 "poolcfg.l" ; break; case 4: # line 99 "poolcfg.l" { return PCC_INFO; } break; case 5: # line 101 "poolcfg.l" { return PCC_CREATE; } break; case 6: # line 103 "poolcfg.l" { return PCC_DESTROY; } break; case 7: # line 105 "poolcfg.l" { return PCC_MODIFY; } break; case 8: # line 107 "poolcfg.l" { return PCC_ASSOC; } break; case 9: # line 109 "poolcfg.l" { BEGIN USTATE; return PCC_TRANSFER; } break; case 10: # line 114 "poolcfg.l" { return PCC_DISC; } break; case 11: # line 116 "poolcfg.l" { return PCC_RENAME; } break; case 12: # line 118 "poolcfg.l" { return PCK_TO; } break; case 13: # line 120 "poolcfg.l" { return PCK_FROM; } break; case 14: # line 122 "poolcfg.l" { state=ISTATE; return PCT_INT; } break; case 15: # line 127 "poolcfg.l" { state=USTATE; return PCT_UINT; } break; case 16: # line 132 "poolcfg.l" { state=BSTATE; return PCT_BOOLEAN; } break; case 17: # line 137 "poolcfg.l" { state=SSTATE; return PCT_STRING; } break; case 18: # line 142 "poolcfg.l" { state=DSTATE; return PCT_FLOAT; } break; case 19: # line 147 "poolcfg.l" { BEGIN CPUSTATE; return PCE_CPU; } break; case 20: # line 152 "poolcfg.l" { return PCE_PSET; } break; case 21: # line 154 "poolcfg.l" { return PCE_POOL; } break; case 22: # line 156 "poolcfg.l" { return PCE_SYSTEM; } break; case 23: # line 158 "poolcfg.l" { return PCK_OPENLST; } break; case 24: # line 160 "poolcfg.l" { return PCK_CLOSELST; } break; case 25: # line 162 "poolcfg.l" { BEGIN state; return PCK_ASSIGN; } break; case 26: # line 167 "poolcfg.l" { return PCK_SEPLST; } break; case 27: # line 169 "poolcfg.l" { return PCK_UNDEF; } break; case 28: # line 171 "poolcfg.l" { yylval.ival = strtoll(yytext, NULL, 0); if (errno == EINVAL || errno == ERANGE) { yyerror(gettext("Invalid value")); exit(E_ERROR); } BEGIN INITIAL; return PCV_VAL_INT; } break; case 29: # line 181 "poolcfg.l" { yylval.uval = strtoull(yytext, NULL, 0); if (errno == EINVAL || errno == ERANGE) { yyerror(gettext("Invalid value")); exit(E_ERROR); } BEGIN INITIAL; return PCV_VAL_UINT; } break; case 30: # line 192 "poolcfg.l" { if (strcmp(yytext, "true") == 0) yylval.bval = 1; else yylval.bval = 0; BEGIN INITIAL; return PCV_VAL_BOOLEAN; } break; case 31: # line 201 "poolcfg.l" { if((yylval.sval = strdup(yytext+1)) == NULL) { yyerror(gettext("Out of memory")); exit(E_ERROR); } if (yylval.sval[yyleng-2] =='"') yylval.sval[yyleng-2] = 0; BEGIN INITIAL; return PCV_VAL_STRING; } break; case 32: # line 212 "poolcfg.l" { yylval.dval = strtod(yytext, (char **)NULL); if (errno == EINVAL || errno == ERANGE) { yyerror(gettext("Invalid value")); exit(E_ERROR); } BEGIN INITIAL; return PCV_VAL_FLOAT; } break; case 33: # line 222 "poolcfg.l" { if ((yylval.sval = strdup(yytext)) == NULL) { yyerror(gettext("Out of memory")); exit(E_ERROR); } return PCV_SYMBOL; } break; case 34: # line 230 "poolcfg.l" { if ((yylval.sval = strdup(yytext)) == NULL) { yyerror(gettext("Out of memory")); exit(E_ERROR); } BEGIN INITIAL; return PCV_SYMBOL; } break; case 35: # line 238 "poolcfg.l" { yyerror(gettext("Illegal character")); exit(E_ERROR); } break; case -1: break; default: (void)fprintf(yyout,"bad switch yylook %d",nstr); } return(0); } /* end of yylex */ # line 244 "poolcfg.l" void yyerror(char *s) { if (dofile == PO_TRUE) { if (yytext[0] == '\0') { (void) warn(gettext("line %d, %s, token expected\n"), lex_lineno, s); return; } (void) warn(gettext("line %d, %s at '%s'\n"), lex_lineno, s, yytext); } else { if (yytext[0] == '\0') { (void) warn(gettext("%s, token expected\n"), s); return; } (void) warn(gettext("%s at '%s'\n"), s, yytext); } } int yyvstop[] = { 0, 35, 0, 2, 35, 0, 1, 0, 3, 35, 0, 23, 35, 0, 24, 35, 0, 26, 35, 0, 25, 35, 0, 33, 35, 0, 33, 35, 0, 33, 35, 0, 33, 35, 0, 33, 35, 0, 33, 35, 0, 33, 35, 0, 33, 35, 0, 33, 35, 0, 33, 35, 0, 33, 35, 0, 33, 35, 0, 33, 35, 0, 27, 35, 0, 35, 0, 28, 35, 0, 29, 35, 0, 33, 35, 0, 33, 35, 0, 35, 0, 35, 0, 32, 35, 0, 34, 35, 0, 2, 0, 3, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 12, 33, 0, 33, 0, 33, 0, 28, 0, 29, 0, 33, 0, 33, 0, 31, 0, 32, 0, 32, 0, 34, 0, 33, 0, 33, 0, 19, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 14, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 13, 33, 0, 4, 33, 0, 33, 0, 21, 33, 0, 20, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 15, 33, 0, 33, 0, 30, 33, 0, 32, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 18, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 33, 0, 5, 33, 0, 33, 0, 33, 0, 7, 33, 0, 11, 33, 0, 17, 33, 0, 22, 33, 0, 33, 0, 33, 0, 16, 33, 0, 6, 33, 0, 33, 0, 33, 0, 33, 0, 10, 33, 0, 9, 33, 0, 8, 33, 0, 0}; # define YYTYPE unsigned char struct yywork { YYTYPE verify, advance; } yycrank[] = { 0,0, 0,0, 1,15, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 1,16, 1,17, 47,0, 0,0, 16,46, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 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,15, 1,18, 16,46, 0,0, 0,0, 0,0, 1,19, 1,20, 0,0, 1,15, 1,15, 1,15, 0,0, 0,0, 1,15, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 2,18, 0,0, 1,21, 0,0, 1,22, 2,19, 2,20, 0,0, 1,23, 0,0, 0,0, 0,0, 1,23, 37,67, 37,67, 37,67, 37,67, 37,67, 37,67, 37,67, 37,67, 37,67, 37,67, 3,18, 2,21, 0,0, 2,22, 0,0, 3,19, 3,20, 0,0, 0,0, 0,0, 3,37, 0,0, 0,0, 3,38, 0,0, 0,0, 0,0, 1,24, 1,25, 1,26, 1,27, 58,87, 1,28, 27,53, 3,21, 1,29, 3,22, 27,54, 32,61, 1,30, 35,66, 29,57, 1,31, 25,50, 1,32, 1,33, 1,34, 1,35, 24,49, 2,24, 2,25, 2,26, 2,27, 26,51, 2,28, 26,52, 1,36, 2,29, 30,58, 28,55, 34,64, 2,30, 49,77, 34,65, 2,31, 28,56, 2,32, 2,33, 2,34, 2,35, 50,78, 33,62, 3,24, 3,25, 3,26, 3,27, 33,63, 3,28, 2,36, 31,59, 3,29, 51,79, 52,80, 31,60, 3,30, 40,69, 53,81, 3,31, 54,82, 3,32, 3,33, 3,34, 3,35, 4,18, 41,64, 55,83, 40,55, 41,70, 4,19, 4,20, 56,84, 3,36, 40,56, 4,37, 57,85, 59,88, 4,38, 60,89, 61,90, 62,91, 63,92, 65,93, 66,94, 69,95, 70,93, 5,18, 73,97, 4,21, 57,86, 4,22, 5,19, 5,20, 77,98, 78,99, 80,100, 81,101, 82,102, 83,103, 5,39, 84,104, 85,105, 87,106, 88,107, 89,108, 70,96, 90,109, 91,110, 92,111, 6,18, 5,21, 93,112, 5,22, 94,113, 6,19, 6,20, 95,114, 96,115, 98,118, 73,97, 99,119, 100,120, 6,39, 101,121, 102,122, 103,123, 4,24, 4,25, 4,26, 4,27, 106,124, 4,28, 109,125, 6,21, 4,29, 6,22, 110,126, 111,127, 4,30, 112,128, 114,115, 4,31, 118,129, 4,32, 4,33, 4,34, 4,35, 119,130, 5,24, 5,25, 5,26, 5,27, 120,131, 5,28, 121,132, 4,36, 5,29, 122,133, 124,134, 125,135, 5,30, 126,136, 127,137, 5,31, 128,138, 5,32, 5,33, 5,34, 5,35, 129,139, 130,140, 6,24, 6,25, 6,26, 6,27, 7,18, 6,28, 5,36, 132,141, 6,29, 7,19, 7,20, 133,142, 6,30, 138,143, 139,144, 6,31, 142,145, 6,32, 6,33, 6,34, 6,35, 143,146, 144,147, 0,0, 0,0, 0,0, 8,18, 0,0, 7,21, 6,36, 7,22, 8,19, 8,20, 39,68, 39,68, 39,68, 39,68, 39,68, 39,68, 39,68, 39,68, 39,68, 39,68, 0,0, 0,0, 0,0, 0,0, 0,0, 9,42, 9,18, 8,21, 0,0, 8,22, 0,0, 9,19, 9,20, 43,73, 43,73, 43,73, 43,73, 43,73, 43,73, 43,73, 43,73, 43,73, 43,73, 7,24, 7,25, 7,26, 7,27, 0,0, 7,40, 0,0, 9,21, 7,29, 9,22, 0,0, 0,0, 7,30, 0,0, 0,0, 7,31, 0,0, 7,32, 7,33, 7,41, 7,35, 0,0, 8,24, 8,25, 8,26, 8,27, 0,0, 8,40, 0,0, 7,36, 8,29, 0,0, 0,0, 0,0, 8,30, 18,47, 0,0, 8,31, 0,0, 8,32, 8,33, 8,41, 8,35, 18,47, 18,0, 9,24, 9,25, 9,26, 9,27, 0,0, 9,28, 8,36, 0,0, 9,29, 0,0, 0,0, 0,0, 9,30, 0,0, 0,0, 9,31, 0,0, 9,32, 9,33, 9,34, 9,35, 10,42, 10,18, 18,47, 0,0, 0,0, 0,0, 10,19, 10,20, 9,36, 0,0, 0,0, 18,47, 18,47, 18,47, 0,0, 0,0, 18,47, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 11,18, 0,0, 10,21, 0,0, 10,22, 11,19, 11,20, 0,0, 0,0, 0,0, 18,47, 11,43, 0,0, 11,44, 18,47, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 12,18, 11,21, 0,0, 11,22, 0,0, 12,19, 12,20, 0,0, 0,0, 0,0, 0,0, 12,43, 0,0, 12,44, 0,0, 0,0, 0,0, 10,24, 10,25, 10,26, 10,27, 0,0, 10,28, 0,0, 12,21, 10,29, 12,22, 0,0, 0,0, 10,30, 0,0, 0,0, 10,31, 0,0, 10,32, 10,33, 10,34, 10,35, 0,0, 11,24, 11,25, 11,26, 11,27, 0,0, 11,28, 0,0, 10,36, 11,29, 0,0, 0,0, 0,0, 11,30, 0,0, 0,0, 11,31, 0,0, 11,32, 11,33, 11,34, 11,35, 0,0, 0,0, 12,24, 12,25, 12,26, 12,27, 0,0, 12,28, 11,36, 0,0, 12,29, 0,0, 0,0, 0,0, 12,30, 0,0, 0,0, 12,31, 0,0, 12,32, 12,33, 12,34, 12,35, 13,18, 0,0, 0,0, 0,0, 0,0, 13,19, 13,20, 42,71, 12,36, 0,0, 0,0, 0,0, 0,0, 13,45, 0,0, 42,71, 42,72, 0,0, 0,0, 0,0, 0,0, 0,0, 14,18, 0,0, 13,21, 0,0, 13,22, 14,19, 14,20, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 14,45, 0,0, 0,0, 0,0, 0,0, 42,72, 0,0, 0,0, 0,0, 0,0, 0,0, 14,21, 0,0, 14,22, 42,71, 42,71, 42,71, 0,0, 0,0, 42,71, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 13,24, 13,25, 13,26, 13,27, 0,0, 13,28, 0,0, 0,0, 13,29, 42,71, 0,0, 0,0, 13,30, 42,71, 0,0, 13,31, 0,0, 13,32, 13,33, 13,34, 13,35, 0,0, 14,24, 14,25, 14,26, 14,27, 0,0, 14,28, 0,0, 13,36, 14,29, 0,0, 0,0, 0,0, 14,30, 0,0, 0,0, 14,31, 0,0, 14,32, 14,33, 14,34, 14,35, 0,0, 0,0, 0,0, 0,0, 0,0, 23,48, 23,48, 23,48, 14,36, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 0,0, 0,0, 0,0, 0,0, 23,48, 0,0, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 23,48, 44,74, 0,0, 44,75, 44,75, 44,75, 44,75, 44,75, 44,75, 44,75, 44,75, 44,75, 44,75, 45,76, 45,76, 45,76, 45,76, 45,76, 45,76, 45,76, 45,76, 45,76, 45,76, 97,116, 0,0, 97,116, 0,0, 0,0, 97,117, 97,117, 97,117, 97,117, 97,117, 97,117, 97,117, 97,117, 97,117, 97,117, 116,117, 116,117, 116,117, 116,117, 116,117, 116,117, 116,117, 116,117, 116,117, 116,117, 0,0}; struct yysvf yysvec[] = { 0, 0, 0, yycrank+-1, 0, 0, yycrank+-23, yysvec+1, 0, yycrank+-46, yysvec+1, 0, yycrank+-129, yysvec+1, 0, yycrank+-151, yysvec+1, 0, yycrank+-174, yysvec+1, 0, yycrank+-240, yysvec+1, 0, yycrank+-262, yysvec+1, 0, yycrank+-285, yysvec+1, 0, yycrank+-369, yysvec+1, 0, yycrank+-391, yysvec+1, 0, yycrank+-414, yysvec+1, 0, yycrank+-497, yysvec+1, 0, yycrank+-519, yysvec+1, 0, yycrank+0, 0, yyvstop+1, yycrank+5, 0, yyvstop+3, yycrank+0, 0, yyvstop+6, yycrank+-371, 0, yyvstop+8, yycrank+0, 0, yyvstop+11, yycrank+0, 0, yyvstop+14, yycrank+0, 0, yyvstop+17, yycrank+0, 0, yyvstop+20, yycrank+598, 0, yyvstop+23, yycrank+4, yysvec+23, yyvstop+26, yycrank+3, yysvec+23, yyvstop+29, yycrank+12, yysvec+23, yyvstop+32, yycrank+3, yysvec+23, yyvstop+35, yycrank+22, yysvec+23, yyvstop+38, yycrank+2, yysvec+23, yyvstop+41, yycrank+18, yysvec+23, yyvstop+44, yycrank+39, yysvec+23, yyvstop+47, yycrank+8, yysvec+23, yyvstop+50, yycrank+26, yysvec+23, yyvstop+53, yycrank+20, yysvec+23, yyvstop+56, yycrank+6, yysvec+23, yyvstop+59, yycrank+0, 0, yyvstop+62, yycrank+23, 0, yyvstop+65, yycrank+0, yysvec+37, yyvstop+67, yycrank+256, 0, yyvstop+70, yycrank+59, yysvec+23, yyvstop+73, yycrank+54, yysvec+23, yyvstop+76, yycrank+-538, 0, yyvstop+79, yycrank+279, 0, yyvstop+81, yycrank+675, 0, yyvstop+83, yycrank+685, 0, yyvstop+86, yycrank+0, yysvec+16, yyvstop+89, yycrank+-2, yysvec+18, yyvstop+91, yycrank+0, yysvec+23, yyvstop+93, yycrank+18, yysvec+23, yyvstop+95, yycrank+30, yysvec+23, yyvstop+97, yycrank+35, yysvec+23, yyvstop+99, yycrank+52, yysvec+23, yyvstop+101, yycrank+42, yysvec+23, yyvstop+103, yycrank+44, yysvec+23, yyvstop+105, yycrank+55, yysvec+23, yyvstop+107, yycrank+60, yysvec+23, yyvstop+109, yycrank+73, yysvec+23, yyvstop+111, yycrank+2, yysvec+23, yyvstop+113, yycrank+65, yysvec+23, yyvstop+115, yycrank+77, yysvec+23, yyvstop+117, yycrank+69, yysvec+23, yyvstop+119, yycrank+66, yysvec+23, yyvstop+121, yycrank+66, yysvec+23, yyvstop+123, yycrank+0, yysvec+23, yyvstop+125, yycrank+85, yysvec+23, yyvstop+128, yycrank+73, yysvec+23, yyvstop+130, yycrank+0, yysvec+37, yyvstop+132, yycrank+0, yysvec+39, yyvstop+134, yycrank+76, yysvec+23, yyvstop+136, yycrank+88, yysvec+23, yyvstop+138, yycrank+0, yysvec+42, 0, yycrank+0, 0, yyvstop+140, yycrank+118, yysvec+43, yyvstop+142, yycrank+0, yysvec+43, 0, yycrank+0, yysvec+44, yyvstop+144, yycrank+0, yysvec+45, yyvstop+146, yycrank+82, yysvec+23, yyvstop+148, yycrank+86, yysvec+23, yyvstop+150, yycrank+0, yysvec+23, yyvstop+152, yycrank+98, yysvec+23, yyvstop+155, yycrank+80, yysvec+23, yyvstop+157, yycrank+98, yysvec+23, yyvstop+159, yycrank+101, yysvec+23, yyvstop+161, yycrank+91, yysvec+23, yyvstop+163, yycrank+90, yysvec+23, yyvstop+165, yycrank+0, yysvec+23, yyvstop+167, yycrank+97, yysvec+23, yyvstop+170, yycrank+95, yysvec+23, yyvstop+172, yycrank+88, yysvec+23, yyvstop+174, yycrank+109, yysvec+23, yyvstop+176, yycrank+102, yysvec+23, yyvstop+178, yycrank+92, yysvec+23, yyvstop+180, yycrank+101, yysvec+23, yyvstop+182, yycrank+97, yysvec+23, yyvstop+184, yycrank+101, yysvec+23, yyvstop+186, yycrank+116, yysvec+23, yyvstop+188, yycrank+700, 0, 0, yycrank+119, yysvec+23, yyvstop+190, yycrank+119, yysvec+23, yyvstop+192, yycrank+105, yysvec+23, yyvstop+194, yycrank+109, yysvec+23, yyvstop+196, yycrank+113, yysvec+23, yyvstop+198, yycrank+109, yysvec+23, yyvstop+200, yycrank+0, yysvec+23, yyvstop+202, yycrank+0, yysvec+23, yyvstop+205, yycrank+128, yysvec+23, yyvstop+208, yycrank+0, yysvec+23, yyvstop+210, yycrank+0, yysvec+23, yyvstop+213, yycrank+123, yysvec+23, yyvstop+216, yycrank+126, yysvec+23, yyvstop+218, yycrank+136, yysvec+23, yyvstop+220, yycrank+124, yysvec+23, yyvstop+222, yycrank+0, yysvec+23, yyvstop+224, yycrank+139, yysvec+23, yyvstop+227, yycrank+0, yysvec+23, yyvstop+229, yycrank+710, 0, 0, yycrank+0, yysvec+116, yyvstop+232, yycrank+137, yysvec+23, yyvstop+234, yycrank+150, yysvec+23, yyvstop+236, yycrank+151, yysvec+23, yyvstop+238, yycrank+143, yysvec+23, yyvstop+240, yycrank+139, yysvec+23, yyvstop+242, yycrank+0, yysvec+23, yyvstop+244, yycrank+137, yysvec+23, yyvstop+247, yycrank+158, yysvec+23, yyvstop+249, yycrank+158, yysvec+23, yyvstop+251, yycrank+153, yysvec+23, yyvstop+253, yycrank+162, yysvec+23, yyvstop+255, yycrank+172, yysvec+23, yyvstop+257, yycrank+160, yysvec+23, yyvstop+259, yycrank+0, yysvec+23, yyvstop+261, yycrank+157, yysvec+23, yyvstop+264, yycrank+181, yysvec+23, yyvstop+266, yycrank+0, yysvec+23, yyvstop+268, yycrank+0, yysvec+23, yyvstop+271, yycrank+0, yysvec+23, yyvstop+274, yycrank+0, yysvec+23, yyvstop+277, yycrank+183, yysvec+23, yyvstop+280, yycrank+169, yysvec+23, yyvstop+282, yycrank+0, yysvec+23, yyvstop+284, yycrank+0, yysvec+23, yyvstop+287, yycrank+173, yysvec+23, yyvstop+290, yycrank+178, yysvec+23, yyvstop+292, yycrank+192, yysvec+23, yyvstop+294, yycrank+0, yysvec+23, yyvstop+296, yycrank+0, yysvec+23, yyvstop+299, yycrank+0, yysvec+23, yyvstop+302, 0, 0, 0}; struct yywork *yytop = yycrank+767; struct yysvf *yybgin = yysvec+1; char yymatch[] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 9, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 34, 1, 1, 1, 1, 1, 1, 1, 1, 43, 44, 45, 44, 1, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 44, 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, 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, 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}; /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* Copyright (c) 1989 AT&T */ /* All Rights Reserved */ #pragma ident "%Z%%M% %I% %E% 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); }