#ifndef EUC #define EUC #endif #include #include #include #include #include #include #define YYLEX_E 1 #define YYTEXT yywtext #define YYLENG yywleng #define YYINPUT yywinput #define YYOUTPUT yywoutput #define YYUNPUT yywunput # 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_e(); goto yyfussy;} int yyleng; size_t yywleng; #define YYISARRAY unsigned char yytext[YYLMAX*MB_LEN_MAX]; wchar_t yywtext[YYLMAX]; int yymorfg; extern wchar_t *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 "fsdb_lex.l" /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (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 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" #include #include "y.tab.h" extern int base; int cmd_no = 1; # 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 43 "fsdb_lex.l" { cmd_no++; return NL; } break; case 2: # line 44 "fsdb_lex.l" { return DOT; } break; case 3: # line 46 "fsdb_lex.l" { return BASE; } break; case 4: # line 47 "fsdb_lex.l" { return BASE; } break; case 5: # line 48 "fsdb_lex.l" { return BLOCK; } break; case 6: # line 49 "fsdb_lex.l" { return CD; } break; case 7: # line 50 "fsdb_lex.l" { return CD; } break; case 8: # line 51 "fsdb_lex.l" { return DIRECTORY; } break; case 9: # line 52 "fsdb_lex.l" { return TFILE; } break; case 10: # line 53 "fsdb_lex.l" { return FIND; } break; case 11: # line 54 "fsdb_lex.l" { return FIND; } break; case 12: # line 55 "fsdb_lex.l" { return FILL; } break; case 13: # line 56 "fsdb_lex.l" { return INODE; } break; case 14: # line 57 "fsdb_lex.l" { return LS; } break; case 15: # line 58 "fsdb_lex.l" { return LS; } break; case 16: # line 59 "fsdb_lex.l" { return OVERRIDE; } break; case 17: # line 60 "fsdb_lex.l" { return OVERRIDE; } break; case 18: # line 61 "fsdb_lex.l" { return PROMPT; } break; case 19: # line 62 "fsdb_lex.l" { return PROMPT; } break; case 20: # line 63 "fsdb_lex.l" { return PWD; } break; case 21: # line 64 "fsdb_lex.l" { return PWD; } break; case 22: # line 65 "fsdb_lex.l" { return QUIT; } break; case 23: # line 66 "fsdb_lex.l" { return QUIT; } break; case 24: # line 67 "fsdb_lex.l" { return TAG; } break; case 25: # line 68 "fsdb_lex.l" { return BANG; } break; case 26: # line 69 "fsdb_lex.l" { return BANG; } break; case 27: # line 72 "fsdb_lex.l" { return AVD; } break; case 28: # line 73 "fsdb_lex.l" { return MVDS; } break; case 29: # line 74 "fsdb_lex.l" { return RVDS; } break; case 30: # line 75 "fsdb_lex.l" { return INTS; } break; case 31: # line 76 "fsdb_lex.l" { return FSDS; } break; case 32: # line 77 "fsdb_lex.l" { return ROOT; } break; case 33: # line 79 "fsdb_lex.l" { return ATTZ; } break; case 34: # line 80 "fsdb_lex.l" { return ATYE; } break; case 35: # line 81 "fsdb_lex.l" { return ATMO; } break; case 36: # line 82 "fsdb_lex.l" { return ATDA; } break; case 37: # line 83 "fsdb_lex.l" { return ATHO; } break; case 38: # line 84 "fsdb_lex.l" { return ATMI; } break; case 39: # line 85 "fsdb_lex.l" { return ATSE; } break; case 40: # line 86 "fsdb_lex.l" { return ATCE; } break; case 41: # line 87 "fsdb_lex.l" { return ATHU; } break; case 42: # line 88 "fsdb_lex.l" { return ATMIC; } break; case 43: # line 90 "fsdb_lex.l" { return CTTZ; } break; case 44: # line 91 "fsdb_lex.l" { return CTYE; } break; case 45: # line 92 "fsdb_lex.l" { return CTMO; } break; case 46: # line 93 "fsdb_lex.l" { return CTDA; } break; case 47: # line 94 "fsdb_lex.l" { return CTHO; } break; case 48: # line 95 "fsdb_lex.l" { return CTMI; } break; case 49: # line 96 "fsdb_lex.l" { return CTSE; } break; case 50: # line 97 "fsdb_lex.l" { return CTCE; } break; case 51: # line 98 "fsdb_lex.l" { return CTHU; } break; case 52: # line 99 "fsdb_lex.l" { return CTMIC; } break; case 53: # line 101 "fsdb_lex.l" { return MTTZ; } break; case 54: # line 102 "fsdb_lex.l" { return MTYE; } break; case 55: # line 103 "fsdb_lex.l" { return MTMO; } break; case 56: # line 104 "fsdb_lex.l" { return MTDA; } break; case 57: # line 105 "fsdb_lex.l" { return MTHO; } break; case 58: # line 106 "fsdb_lex.l" { return MTMI; } break; case 59: # line 107 "fsdb_lex.l" { return MTSE; } break; case 60: # line 108 "fsdb_lex.l" { return MTCE; } break; case 61: # line 109 "fsdb_lex.l" { return MTHU; } break; case 62: # line 110 "fsdb_lex.l" { return MTMIC; } break; case 63: # line 113 "fsdb_lex.l" { return GID; } break; case 64: # line 114 "fsdb_lex.l" { return LN; } break; case 65: # line 115 "fsdb_lex.l" { return MD; } break; case 66: # line 116 "fsdb_lex.l" { return MAJ; } break; case 67: # line 117 "fsdb_lex.l" { return MIO; } break; case 68: # line 118 "fsdb_lex.l" { return NM; } break; case 69: # line 119 "fsdb_lex.l" { return SZ; } break; case 70: # line 120 "fsdb_lex.l" { return UID; } break; case 71: # line 121 "fsdb_lex.l" { return UNIQ; } break; case 72: # line 124 "fsdb_lex.l" { yylval.strval = yytext; return WORD; } break; case 73: # line 126 "fsdb_lex.l" { return yytext[0]; } break; case -1: break; default: (void)fprintf(yyout,"bad switch yylook %d",nstr); } return(0); } /* end of yylex */ # line 129 "fsdb_lex.l" void yyerror() { fprintf(stderr, gettext("Syntax error line : %d token : %s \n"), cmd_no, yytext); } /* :{WS}*fsds { return FSDS; } :{WS}*root { return ROOT; } */ int yyvstop[] = { 0, 73, 0, 73, 0, 1, 0, 72, 73, 0, 2, 72, 73, 0, 73, 0, 73, 0, 73, 0, 73, 0, 72, 0, 26, 0, 64, 0, 65, 0, 68, 0, 69, 0, 25, 0, 7, 0, 15, 0, 27, 0, 63, 0, 66, 0, 67, 0, 24, 0, 70, 0, 6, 0, 14, 0, 21, 0, 40, 0, 36, 0, 37, 0, 41, 0, 38, 0, 35, 0, 39, 0, 33, 0, 34, 0, 49, 0, 50, 0, 46, 0, 47, 0, 51, 0, 48, 0, 45, 0, 43, 0, 44, 0, 9, 0, 12, 0, 31, 0, 30, 0, 60, 0, 56, 0, 57, 0, 61, 0, 58, 0, 55, 0, 59, 0, 53, 0, 54, 0, 28, 0, 32, 0, 29, 0, 71, 0, 20, 0, 4, 0, 11, 0, 23, 0, 42, 0, 5, 0, 52, 0, 13, 0, 62, 0, 3, 0, 10, 0, 22, 0, 19, 0, 18, 0, 17, 0, 8, 0, 16, 0, 0}; # define YYTYPE unsigned char struct yywork { YYTYPE verify, advance; } yycrank[] = { 0,0, 0,0, 1,3, 1,4, 2,10, 1,5, 0,0, 0,0, 4,12, 0,0, 0,0, 1,6, 4,12, 1,7, 2,7, 0,0, 0,0, 0,0, 0,0, 1,8, 2,11, 1,9, 2,9, 0,0, 4,13, 6,0, 6,0, 6,0, 6,0, 6,0, 6,0, 6,0, 6,0, 6,0, 6,14, 6,0, 28,64, 6,0, 0,0, 18,47, 0,0, 6,0, 6,0, 6,0, 6,0, 6,0, 13,13, 19,49, 21,52, 6,0, 13,13, 6,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 9,30, 7,0, 10,32, 7,0, 9,30, 17,46, 10,32, 7,0, 7,0, 7,0, 7,0, 7,0, 18,48, 13,17, 20,50, 7,0, 9,31, 7,0, 10,33, 16,44, 22,53, 13,43, 23,54, 16,45, 25,60, 26,61, 27,63, 11,34, 29,65, 36,78, 37,79, 11,34, 35,35, 11,35, 20,51, 38,80, 35,35, 39,54, 29,66, 26,62, 6,0, 6,0, 6,0, 6,0, 6,0, 6,0, 6,0, 39,81, 8,15, 40,82, 24,55, 36,46, 8,15, 42,85, 41,83, 11,36, 24,56, 11,37, 43,86, 45,94, 46,95, 47,96, 49,103, 11,38, 41,84, 50,104, 24,57, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 7,0, 8,16, 11,39, 8,17, 51,105, 8,18, 52,106, 8,19, 11,40, 55,109, 11,41, 8,20, 11,42, 8,21, 53,107, 24,58, 57,110, 8,22, 59,118, 24,59, 61,119, 62,120, 64,121, 8,23, 53,108, 8,24, 65,122, 8,25, 66,123, 67,67, 68,124, 69,125, 70,126, 67,67, 71,127, 8,26, 72,128, 8,27, 74,131, 8,28, 75,79, 8,29, 14,0, 14,0, 14,0, 14,0, 14,0, 14,0, 14,0, 14,0, 14,0, 31,31, 14,0, 73,129, 14,0, 31,31, 76,132, 31,67, 14,0, 14,0, 14,0, 14,0, 14,0, 73,130, 77,81, 78,133, 14,0, 80,104, 14,0, 82,135, 44,87, 80,134, 44,88, 83,136, 84,137, 85,138, 86,139, 87,140, 33,33, 31,68, 44,89, 31,69, 33,33, 88,141, 33,35, 91,146, 89,142, 31,70, 90,144, 92,147, 44,90, 93,148, 95,149, 96,150, 97,151, 98,152, 101,157, 34,34, 89,143, 31,71, 90,145, 34,34, 44,91, 34,35, 44,92, 31,72, 33,36, 31,73, 33,75, 31,74, 102,158, 103,159, 44,93, 105,162, 33,76, 107,163, 108,164, 111,165, 14,0, 14,0, 14,0, 14,0, 14,0, 14,0, 14,0, 34,36, 33,77, 34,37, 48,97, 58,111, 48,98, 58,112, 33,40, 34,38, 33,41, 99,153, 33,42, 112,166, 48,99, 58,113, 100,155, 115,171, 104,160, 116,172, 117,173, 34,39, 113,167, 99,154, 48,100, 58,114, 118,174, 34,40, 100,156, 34,41, 114,169, 34,42, 104,161, 119,175, 113,168, 120,176, 121,121, 58,115, 48,101, 58,116, 121,121, 123,177, 114,170, 124,178, 126,179, 128,180, 48,102, 58,117, 129,181, 130,182, 131,183, 132,139, 133,184, 134,185, 135,186, 136,187, 137,137, 138,188, 139,161, 144,189, 137,137, 149,190, 155,191, 159,192, 160,160, 161,161, 163,193, 169,194, 160,160, 161,161, 178,195, 179,196, 180,197, 181,198, 182,182, 183,199, 184,184, 185,185, 182,182, 186,200, 184,184, 185,185, 187,201, 188,188, 190,190, 192,202, 193,193, 188,188, 190,190, 195,195, 193,193, 196,196, 197,203, 195,195, 198,204, 196,196, 199,199, 200,205, 201,206, 202,207, 199,199, 203,208, 204,209, 205,210, 206,206, 207,211, 208,212, 209,209, 206,206, 210,213, 211,214, 209,209, 212,215, 213,213, 214,214, 215,215, 0,0, 213,213, 214,214, 215,215, 0,0, 0,0, 0,0}; struct yysvf yysvec[] = { 0, 0, 0, yycrank+-1, 0, 0, yycrank+-2, yysvec+1, 0, yycrank+0, 0, yyvstop+1, yycrank+6, 0, yyvstop+3, yycrank+0, 0, yyvstop+5, yycrank+-24, 0, yyvstop+7, yycrank+-51, yysvec+6, yyvstop+10, yycrank+107, 0, yyvstop+14, yycrank+59, 0, yyvstop+16, yycrank+61, 0, yyvstop+18, yycrank+86, yysvec+8, yyvstop+20, yycrank+0, yysvec+4, 0, yycrank+44, 0, 0, yycrank+-175, yysvec+6, yyvstop+22, yycrank+0, yysvec+8, 0, yycrank+14, 0, 0, yycrank+16, 0, 0, yycrank+7, 0, 0, yycrank+3, 0, 0, yycrank+31, 0, 0, yycrank+4, 0, 0, yycrank+27, 0, 0, yycrank+29, 0, 0, yycrank+83, 0, 0, yycrank+33, 0, 0, yycrank+30, 0, 0, yycrank+11, 0, 0, yycrank+8, 0, 0, yycrank+45, 0, 0, yycrank+0, yysvec+9, 0, yycrank+183, 0, 0, yycrank+0, yysvec+10, 0, yycrank+210, 0, 0, yycrank+229, yysvec+8, 0, yycrank+91, 0, yyvstop+24, yycrank+62, 0, 0, yycrank+57, yysvec+18, 0, yycrank+52, yysvec+20, 0, yycrank+44, 0, 0, yycrank+40, 0, 0, yycrank+53, 0, 0, yycrank+46, 0, 0, yycrank+75, 0, 0, yycrank+172, 0, 0, yycrank+86, 0, 0, yycrank+65, 0, 0, yycrank+56, 0, 0, yycrank+230, 0, 0, yycrank+61, 0, 0, yycrank+76, 0, 0, yycrank+104, 0, 0, yycrank+106, 0, 0, yycrank+92, 0, 0, yycrank+0, 0, yyvstop+26, yycrank+97, 0, 0, yycrank+0, 0, yyvstop+28, yycrank+96, 0, 0, yycrank+231, 0, 0, yycrank+118, 0, 0, yycrank+0, 0, yyvstop+30, yycrank+98, 0, 0, yycrank+121, 0, 0, yycrank+0, 0, yyvstop+32, yycrank+116, 0, 0, yycrank+126, 0, 0, yycrank+118, 0, 0, yycrank+161, 0, yyvstop+34, yycrank+136, 0, 0, yycrank+131, 0, 0, yycrank+122, 0, 0, yycrank+104, 0, 0, yycrank+100, 0, 0, yycrank+125, 0, 0, yycrank+104, 0, 0, yycrank+140, 0, 0, yycrank+146, 0, 0, yycrank+134, 0, 0, yycrank+135, 0, 0, yycrank+0, 0, yyvstop+36, yycrank+151, 0, 0, yycrank+0, 0, yyvstop+38, yycrank+167, 0, 0, yycrank+151, 0, 0, yycrank+174, 0, 0, yycrank+165, 0, 0, yycrank+160, 0, 0, yycrank+175, 0, 0, yycrank+189, 0, 0, yycrank+164, 0, 0, yycrank+178, 0, 0, yycrank+183, 0, 0, yycrank+147, 0, 0, yycrank+189, 0, 0, yycrank+0, 0, yyvstop+40, yycrank+194, 0, 0, yycrank+191, 0, 0, yycrank+192, 0, 0, yycrank+201, 0, 0, yycrank+213, 0, 0, yycrank+230, 0, 0, yycrank+154, 0, 0, yycrank+208, 0, 0, yycrank+209, 0, 0, yycrank+240, 0, 0, yycrank+183, 0, 0, yycrank+0, 0, yyvstop+42, yycrank+215, 0, 0, yycrank+186, 0, 0, yycrank+0, 0, yyvstop+44, yycrank+0, 0, yyvstop+46, yycrank+215, 0, 0, yycrank+243, 0, 0, yycrank+224, 0, 0, yycrank+244, 0, 0, yycrank+239, 0, 0, yycrank+201, 0, 0, yycrank+242, 0, 0, yycrank+220, 0, 0, yycrank+225, 0, 0, yycrank+229, 0, 0, yycrank+292, 0, yyvstop+48, yycrank+0, 0, yyvstop+50, yycrank+239, 0, 0, yycrank+237, 0, 0, yycrank+0, 0, yyvstop+52, yycrank+248, 0, 0, yycrank+0, 0, yyvstop+54, yycrank+267, 0, 0, yycrank+250, 0, 0, yycrank+273, 0, 0, yycrank+264, 0, 0, yycrank+259, yysvec+80, 0, yycrank+274, 0, 0, yycrank+277, 0, 0, yycrank+250, 0, 0, yycrank+261, 0, 0, yycrank+312, 0, yyvstop+56, yycrank+249, 0, 0, yycrank+266, 0, 0, yycrank+0, 0, yyvstop+58, yycrank+0, 0, yyvstop+60, yycrank+0, 0, yyvstop+62, yycrank+0, 0, yyvstop+64, yycrank+285, 0, yyvstop+66, yycrank+0, 0, yyvstop+68, yycrank+0, 0, yyvstop+70, yycrank+0, 0, yyvstop+72, yycrank+0, 0, yyvstop+74, yycrank+271, 0, 0, yycrank+0, 0, yyvstop+76, yycrank+0, 0, yyvstop+78, yycrank+0, 0, yyvstop+80, yycrank+0, 0, yyvstop+82, yycrank+0, 0, yyvstop+84, yycrank+288, 0, yyvstop+86, yycrank+0, 0, yyvstop+88, yycrank+0, 0, yyvstop+90, yycrank+0, 0, yyvstop+92, yycrank+289, 0, 0, yycrank+320, 0, yyvstop+94, yycrank+321, 0, yyvstop+96, yycrank+0, 0, yyvstop+98, yycrank+288, 0, 0, yycrank+0, 0, yyvstop+100, yycrank+0, 0, yyvstop+102, yycrank+0, 0, yyvstop+104, yycrank+0, 0, yyvstop+106, yycrank+0, 0, yyvstop+108, yycrank+293, 0, yyvstop+110, yycrank+0, 0, yyvstop+112, yycrank+0, 0, yyvstop+114, yycrank+0, 0, yyvstop+116, yycrank+0, 0, yyvstop+118, yycrank+0, 0, yyvstop+120, yycrank+0, 0, yyvstop+122, yycrank+0, 0, yyvstop+124, yycrank+0, 0, yyvstop+126, yycrank+292, 0, 0, yycrank+295, 0, 0, yycrank+268, 0, 0, yycrank+279, 0, 0, yycrank+330, 0, yyvstop+128, yycrank+267, 0, 0, yycrank+332, 0, yyvstop+130, yycrank+333, 0, yyvstop+132, yycrank+275, 0, 0, yycrank+282, 0, 0, yycrank+339, 0, yyvstop+134, yycrank+0, 0, yyvstop+136, yycrank+340, 0, yyvstop+138, yycrank+0, 0, yyvstop+140, yycrank+277, 0, 0, yycrank+342, 0, yyvstop+142, yycrank+0, 0, yyvstop+144, yycrank+345, 0, yyvstop+146, yycrank+347, 0, yyvstop+148, yycrank+288, 0, 0, yycrank+294, 0, 0, yycrank+352, 0, yyvstop+150, yycrank+311, 0, 0, yycrank+290, 0, 0, yycrank+301, 0, 0, yycrank+315, 0, 0, yycrank+294, 0, 0, yycrank+327, 0, 0, yycrank+360, 0, yyvstop+152, yycrank+301, 0, 0, yycrank+330, 0, 0, yycrank+363, 0, yyvstop+154, yycrank+331, 0, 0, yycrank+294, 0, 0, yycrank+334, 0, 0, yycrank+369, 0, yyvstop+156, yycrank+370, 0, yyvstop+158, yycrank+371, 0, yyvstop+160, 0, 0, 0}; struct yywork *yytop = yycrank+377; struct yysvf *yybgin = yysvec+1; int yymatch[] = { 0, 1, 2, 1, 4, 1, 2, 1, 1, 1, 10, 1, 10, 1, 10, 10, 10, 1, 1, 1, 1, 1, 10, 10, 10, 1, 10, 1, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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,0,0,0,0,0,0,0, 0}; #define YYNCGIDTBL 42 unsigned long yycgidtbl[]={ 0x00000000, 0x00000009, 0x0000000a, 0x00000020, 0x00000021, 0x0000002d, 0x0000002e, 0x00000030, 0x00000039, 0x0000003a, 0x0000003b, 0x00000041, 0x0000005a, 0x0000005f, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006a, 0x0000006b, 0x0000006c, 0x0000006d, 0x0000006e, 0x0000006f, 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000079, 0x0000007a, 0x000000ff, 0x20ffffff, 0x40ffffff, 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 2005 Sun Microsystems, Inc. * All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1989 AT&T */ /* All Rights Reserved */ #pragma ident "%Z%%M% %I% %E% SMI" int yylineno =1; int yygid; #define LONG_WCHAR_T 1 # define YYU(x) x # define NLSTATE yyprevious=YYNEWLINE wchar_t yysbuf[YYLMAX]; wchar_t *yysptr = yysbuf; struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp; int *yyfnd; extern struct yysvf *yyestate; int yyprevious = YYNEWLINE; #if defined(__cplusplus) || defined(__STDC__) int yylook(void) #else yylook() #endif { struct yysvf *yystate, **lsp; struct yywork *yyt; struct yysvf *yyz; int yych, yyfirst; struct yywork *yyr; # ifdef LEXDEBUG int debug; # endif wchar_t *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; } *yylastch++ = yych = YYINPUT(); #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; #ifdef YYLEX_E /* -e */ if (YYTEXT == yy_twbuf) { YYTEXT = (wchar_t *) malloc(yytextsz * sizeof (wchar_t)); memcpy(YYTEXT, yy_twbuf, sizeof (yy_twbuf)); yytext = (wchar_t *) malloc(yytextsz * sizeof (wchar_t)); memcpy(yytext, yy_tbuf, sizeof (yy_tbuf)); #else if (YYTEXT == yy_tbuf) { YYTEXT = (wchar_t *) malloc(yytextsz * sizeof (wchar_t)); memcpy(YYTEXT, yy_tbuf, sizeof (yy_tbuf)); #endif } else { YYTEXT = (wchar_t *) realloc(YYTEXT, yytextsz); #ifdef YYLEX_E /* -e */ yytext = (wchar_t *) realloc(yytext, yytextsz * sizeof (wchar_t)); #endif } if (!YYTEXT) { fprintf(yyout, "Cannot realloc YYTEXT\n"); exit(1); } yylastch = YYTEXT + x; } #endif yygid = yycgid(yych); yyfirst=0; tryagain: # ifdef LEXDEBUG if(debug){ fprintf(yyout,"wchar_t "); allprint(yych); fprintf(yyout," gid %d\n", yygid); } # endif yyr = yyt; if ( (uintptr_t)yyt > (uintptr_t)yycrank){ yyt = yyr + yygid; if (yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {YYUNPUT(*--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 + yygid; if(yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transitions */ {YYUNPUT(*--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[yygid]); # ifdef LEXDEBUG if(debug){ fprintf(yyout,"try fall back character "); allprint_w(YYU(yymatch[yygid])); fprintf(yyout," gid %d\n", yygid); } # endif if(yyt <= yytop && yyt->verify+yysvec == yystate){ if(yyt->advance+yysvec == YYLERR) /* error transition */ {YYUNPUT(*--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 {YYUNPUT(*--yylastch);break;} contin: # ifdef LEXDEBUG if(debug){ fprintf(yyout,"state %d wchar_t ",yystate-yysvec-1); allprint_w(yych); fprintf(yyout," gid %d\n", yygid); } # endif ; } # ifdef LEXDEBUG if(debug){ fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1); allprint_w(yych); fprintf(yyout," gid %d\n", yygid); } # 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--; YYUNPUT(*yylastch--); } } yyprevious = YYU(*yylastch); yylsp = lsp; YYLENG = yylastch-YYTEXT+1; YYTEXT[YYLENG] = 0; # ifdef LEXDEBUG if(debug){ fprintf(yyout,"\nmatch "); sprint_w(YYTEXT); fprintf(yyout," action %d\n",*yyfnd); } # endif #ifdef YYLEX_E /* -e */ yyleng=wcstombs((char *)yytext, YYTEXT, sizeof(yytext)-1); #ifdef LEXDEBUG if(yyleng>=sizeof(yytext)-1) fprintf(yyout, "yytext[] too short\n"); #endif #endif return(*yyfnd++); } YYUNPUT(*yylastch); } if (YYTEXT[0] == 0 /* && feof(yyin) */) { yysptr=yysbuf; return(0); } yyprevious = YYTEXT[0] = YYINPUT(); if (yyprevious>0) YYOUTPUT(yyprevious); yylastch=YYTEXT; # ifdef LEXDEBUG if(debug)putchar('\n'); # endif } } int #if defined(__cplusplus) || defined(__STDC__) yyback(int *p, int m) #else yyback(p, m) int *p; int m; #endif { if (p==0) return(0); while (*p) { if (*p++ == m) return(1); } return(0); } #ifdef YYLEX_E /* -e */ wchar_t #if defined(__cplusplus) || defined(__STDC__) yywinput(void){ #else yywinput(){ #endif unsigned char eucbuf[MB_LEN_MAX]; wchar_t wc; unsigned char *p=eucbuf; int n; #ifndef __cplusplus *p++=input(); n=euclen(eucbuf); while(--n>0) *p++=input(); #else *p++=lex_input(); n=euclen(eucbuf); while(--n>0) *p++=lex_input(); #endif *p=0; mbtowc( &wc, (char *)eucbuf, MB_LEN_MAX ); return wc; } #if defined(__cplusplus) || defined(__STDC__) void yywoutput(wchar_t wc) #else yywoutput(wc) wchar_t wc; #endif { unsigned char eucbuf[MB_LEN_MAX]; int n; unsigned char *p=eucbuf; n=wctomb( (char *)eucbuf, wc ); #ifndef __cplusplus while(n-->0) output(*p++); #else while(n-->0) lex_output(*p++); #endif } #if defined(__cplusplus) || defined(__STDC__) void yywunput(wchar_t wc) #else yywunput(wc) wchar_t wc; #endif { unsigned char eucbuf[MB_LEN_MAX]; int n; unsigned char *p; n=wctomb( (char *)eucbuf, wc ); p=eucbuf+n; while(n-->0) unput(*--p); } #endif #ifdef LONG_WCHAR_T #define yylinearize(lc) lc #else/*!LONG_WCHAR_T*/ unsigned long yylinearize(wc) wchar_t wc; { unsigned long prefix; switch(wc&0x8080){ case 0x0000: prefix=0x00000000; break; case 0x0080: prefix=0x20000000; break; case 0x8000: prefix=0x40000000; break; case 0x8080: prefix=0x60000000; break; } return prefix|wc; } #endif/*!LONG_WCHAR_T*/ int yycgid(c) wchar_t c; { int first = 0; int last = YYNCGIDTBL - 1; unsigned long lc=yylinearize(c); if( yycgidtbl[YYNCGIDTBL-1] < lc ) return YYNCGIDTBL*2-1; while (last >= 0) { int i = (first+last)/2; if (lc == yycgidtbl[i]) return (2*i); else if ( yycgidtbl[i]