# line 2 "../prexgram.y" /* * 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) 1994, by Sun Microsytems, Inc. */ #pragma ident "%Z%%M% %I% %E% SMI" # define ADD 257 # define ALLOC 258 # define BUFFER 259 # define CLEAR 260 # define COMMA 261 # define CONNECT 262 # define DEALLOC 263 # define DELETE 264 # define FILTER 265 # define CONTINUE 266 # define CREATE 267 # define DISABLE 268 # define ENABLE 269 # define EQ 270 # define FCNNAME 271 # define FCNS 272 # define ON 273 # define OFF 274 # define HELP 275 # define KTRACE 276 # define HISTORY 277 # define IDENT 278 # define INVAL 279 # define KILL 280 # define LIST 281 # define NL 282 # define PFILTER 283 # define PROBES 284 # define QUIT 285 # define REGEXP 286 # define RESUME 287 # define SCALED_INT 288 # define SETNAME 289 # define SETS 290 # define SOURCE 291 # define SUSPEND 292 # define TRACE 293 # define TRACEFILE 294 # define UNTRACE 295 # define VALSTR 296 # define VALUES 297 # line 72 "../prexgram.y" #include #include #include #include "set.h" #include "cmd.h" #include "fcn.h" #include "list.h" #include "expr.h" #include "spec.h" #include "source.h" #include "prbk.h" extern int yylex(); extern void help_on_topic(char *topic); extern void help_on_command(int cmd); extern boolean_t g_kernelmode; extern tnfctl_handle_t *g_hndl; void quit(boolean_t killtarget, boolean_t runtarget); extern void help(void); extern void process_cmd(tnfctl_handle_t *hndl, cmd_t *cmd); extern void cmd_listtracefile(); # line 98 "../prexgram.y" typedef union #ifdef __cplusplus YYSTYPE #endif { char * strval; expr_t * exprval; spec_t * specval; void * pidlistval; int intval; } YYSTYPE; #include #ifdef __STDC__ #include #include #define YYCONST const #else #include #include #define YYCONST #endif #include #if defined(__cplusplus) || defined(__STDC__) #if defined(__cplusplus) && defined(__EXTERN_C__) extern "C" { #endif #ifndef yyerror #if defined(__cplusplus) void yyerror(YYCONST char *); #endif #endif #ifndef yylex int yylex(void); #endif int yyparse(void); #if defined(__cplusplus) && defined(__EXTERN_C__) } #endif #endif #define yyclearin yychar = -1 #define yyerrok yyerrflag = 0 extern int yychar; extern int yyerrflag; YYSTYPE yylval; YYSTYPE yyval; typedef int yytabelem; #ifndef YYMAXDEPTH #define YYMAXDEPTH 150 #endif #if YYMAXDEPTH > 0 int yy_yys[YYMAXDEPTH], *yys = yy_yys; YYSTYPE yy_yyv[YYMAXDEPTH], *yyv = yy_yyv; #else /* user does initial allocation */ int *yys; YYSTYPE *yyv; #endif static int yymaxdepth = YYMAXDEPTH; # define YYERRCODE 256 # line 382 "../prexgram.y" static YYCONST yytabelem yyexca[] ={ -1, 1, 0, -1, -2, 0, -1, 2, 0, 1, -2, 0, }; # define YYNPROD 96 # define YYLAST 291 static YYCONST yytabelem yyact[]={ 25, 150, 127, 38, 35, 115, 34, 74, 128, 123, 28, 39, 31, 30, 71, 106, 69, 67, 90, 27, 37, 138, 65, 108, 88, 41, 26, 36, 145, 29, 155, 55, 58, 107, 59, 40, 89, 32, 46, 33, 47, 48, 87, 81, 82, 149, 94, 49, 56, 146, 45, 92, 83, 50, 43, 57, 85, 51, 106, 147, 142, 86, 156, 52, 91, 53, 108, 54, 93, 106, 106, 96, 137, 152, 148, 106, 107, 108, 108, 143, 84, 106, 106, 108, 136, 118, 114, 107, 107, 108, 108, 135, 134, 107, 106, 133, 106, 106, 112, 107, 107, 110, 108, 106, 108, 108, 62, 103, 61, 78, 145, 108, 107, 63, 107, 107, 79, 132, 64, 129, 126, 107, 125, 120, 119, 76, 77, 117, 113, 111, 109, 144, 102, 101, 80, 100, 99, 98, 97, 60, 42, 131, 73, 141, 122, 66, 105, 95, 121, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 104, 44, 0, 0, 68, 70, 72, 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, 0, 0, 0, 0, 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 124, 0, 0, 0, 0, 130, 0, 0, 0, 0, 0, 0, 0, 0, 139, 0, 140, 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, 151, 0, 0, 139, 153, 0, 154 }; static YYCONST yytabelem yypact[]={ -10000000,-10000000, -256,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, -10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, -10000000,-10000000,-10000000,-10000000,-10000000, -142,-10000000, -228, -143, -174, -267, -272, -273, -275, -129, -282, -148, -230, -202, -247, -260, -226,-10000000,-10000000, -144, -145,-10000000,-10000000,-10000000,-10000000, -10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, -10000000,-10000000, -146, -147, -149, -150, -175, -152, -181, -153, -184, -154, -196, -284, -155, -197, -158, -159, -279, -279, -10000000, -160, -162,-10000000,-10000000, -280, -163,-10000000, -137, -165, -187, -190, -191, -198, -210, -263,-10000000,-10000000,-10000000,-10000000, -10000000,-10000000,-10000000,-10000000,-10000000, -127,-10000000,-10000000,-10000000,-10000000, -10000000,-10000000,-10000000,-10000000,-10000000, -222, -203,-10000000,-10000000,-10000000, -10000000, -151,-10000000,-10000000, -233,-10000000,-10000000,-10000000, -223,-10000000, -208, -237,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, -288,-10000000, -209, -182,-10000000,-10000000,-10000000, -279,-10000000,-10000000,-10000000,-10000000, -252, -220,-10000000,-10000000,-10000000,-10000000,-10000000 }; static YYCONST yytabelem yypgo[]={ 0, 174, 173, 145, 146, 147, 148, 144, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160, 159, 158, 157, 156, 155, 154, 153, 152, 151, 150, 149 }; static YYCONST yytabelem yyr1[]={ 0, 8, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 13, 14, 14, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 24, 24, 25, 25, 26, 27, 28, 29, 21, 21, 21, 21, 21, 22, 22, 22, 30, 30, 31, 3, 3, 5, 5, 2, 2, 4, 4, 4, 6, 6, 7, 23, 23, 23, 23 }; static YYCONST yytabelem yyr2[]={ 0, 2, 1, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 7, 7, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 7, 7, 9, 9, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 5, 7, 7, 5, 11, 11, 9, 1, 5, 1, 5, 7, 3, 3, 3, 3, 7, 3, 2, 5, 7, 9, 7 }; static YYCONST yytabelem yychk[]={ -10000000, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30, -31, 256, 282, 275, 266, 285, 269, 268, 293, 295, 262, 260, 283, 276, 259, 267, 291, 281, 282, 282, -1, 278, 266, 268, 269, 275, 281, 285, 291, 293, 295, 259, 276, 283, 260, 262, 282, 282, 280, 287, 292, 289, -3, 289, -3, 289, -3, 289, -3, 271, 289, -3, 273, 274, 257, 264, 282, 273, 274, 282, 282, 258, 263, 289, 271, 296, 278, 290, 277, 294, 272, -5, 297, 282, 282, 282, 282, 282, 282, 282, -2, -4, 278, 296, 286, 282, 282, 282, 282, 282, 282, 289, -3, 282, 282, 282, 282, -6, -7, 288, -6, 282, 282, 282, 288, 282, -3, 278, 282, 282, 282, 282, 282, 282, 284, -4, -5, 270, 282, 282, 282, 261, 282, 282, 282, 282, 289, -3, 282, -4, -7, 282, 282 }; static YYCONST yytabelem yydef[]={ 2, -2, -2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 0, 26, 0, 0, 0, 80, 80, 80, 80, 0, 80, 0, 0, 0, 0, 0, 82, 25, 41, 0, 0, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 73, 0, 0, 76, 92, 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 82, 42, 43, 46, 47, 48, 49, 50, 81, 85, 86, 87, 88, 51, 52, 53, 54, 55, 56, 0, 0, 59, 60, 69, 70, 0, 90, 91, 0, 74, 75, 93, 0, 95, 0, 0, 63, 64, 65, 66, 67, 68, 80, 83, 0, 0, 57, 58, 71, 0, 72, 94, 61, 62, 0, 0, 79, 84, 89, 77, 78 }; typedef struct #ifdef __cplusplus yytoktype #endif { #ifdef __cplusplus const #endif char *t_name; int t_val; } yytoktype; #ifndef YYDEBUG # define YYDEBUG 0 /* don't allow debugging */ #endif #if YYDEBUG yytoktype yytoks[] = { "ADD", 257, "ALLOC", 258, "BUFFER", 259, "CLEAR", 260, "COMMA", 261, "CONNECT", 262, "DEALLOC", 263, "DELETE", 264, "FILTER", 265, "CONTINUE", 266, "CREATE", 267, "DISABLE", 268, "ENABLE", 269, "EQ", 270, "FCNNAME", 271, "FCNS", 272, "ON", 273, "OFF", 274, "HELP", 275, "KTRACE", 276, "HISTORY", 277, "IDENT", 278, "INVAL", 279, "KILL", 280, "LIST", 281, "NL", 282, "PFILTER", 283, "PROBES", 284, "QUIT", 285, "REGEXP", 286, "RESUME", 287, "SCALED_INT", 288, "SETNAME", 289, "SETS", 290, "SOURCE", 291, "SUSPEND", 292, "TRACE", 293, "TRACEFILE", 294, "UNTRACE", 295, "VALSTR", 296, "VALUES", 297, "-unknown-", -1 /* ends search */ }; #ifdef __cplusplus const #endif char * yyreds[] = { "-no such reduction-", "file : statement_list", "statement_list : /* empty */", "statement_list : statement_list statement", "statement : empty_statement", "statement : help_statement", "statement : continue_statement", "statement : quit_statement", "statement : enable_statement", "statement : disable_statement", "statement : trace_statement", "statement : untrace_statement", "statement : connect_statement", "statement : clear_statement", "statement : pfilter_statement", "statement : ktrace_statement", "statement : buffer_statement", "statement : create_statement", "statement : source_statement", "statement : listsets_statement", "statement : listhistory_statement", "statement : listtracefile_statement", "statement : listfcns_statement", "statement : listprobes_statement", "statement : listvalues_statement", "statement : error NL", "empty_statement : NL", "command : CONTINUE", "command : DISABLE", "command : ENABLE", "command : HELP", "command : LIST", "command : QUIT", "command : SOURCE", "command : TRACE", "command : UNTRACE", "command : BUFFER", "command : KTRACE", "command : PFILTER", "command : CLEAR", "command : CONNECT", "help_statement : HELP NL", "help_statement : HELP command NL", "help_statement : HELP IDENT NL", "continue_statement : CONTINUE NL", "quit_statement : QUIT NL", "quit_statement : QUIT KILL NL", "quit_statement : QUIT RESUME NL", "quit_statement : QUIT SUSPEND NL", "enable_statement : ENABLE SETNAME NL", "enable_statement : ENABLE exprlist NL", "disable_statement : DISABLE SETNAME NL", "disable_statement : DISABLE exprlist NL", "trace_statement : TRACE SETNAME NL", "trace_statement : TRACE exprlist NL", "untrace_statement : UNTRACE SETNAME NL", "untrace_statement : UNTRACE exprlist NL", "connect_statement : CONNECT FCNNAME SETNAME NL", "connect_statement : CONNECT FCNNAME exprlist NL", "clear_statement : CLEAR SETNAME NL", "clear_statement : CLEAR exprlist NL", "create_statement : CREATE SETNAME exprlist NL", "create_statement : CREATE FCNNAME IDENT NL", "source_statement : SOURCE VALSTR NL", "source_statement : SOURCE IDENT NL", "listsets_statement : LIST SETS NL", "listhistory_statement : LIST HISTORY NL", "listtracefile_statement : LIST TRACEFILE NL", "listfcns_statement : LIST FCNS NL", "pfilter_statement : PFILTER ON NL", "pfilter_statement : PFILTER OFF NL", "pfilter_statement : PFILTER ADD pidlist NL", "pfilter_statement : PFILTER DELETE pidlist NL", "pfilter_statement : PFILTER NL", "ktrace_statement : KTRACE ON NL", "ktrace_statement : KTRACE OFF NL", "ktrace_statement : KTRACE NL", "listprobes_statement : LIST speclist PROBES SETNAME NL", "listprobes_statement : LIST speclist PROBES exprlist NL", "listvalues_statement : LIST VALUES speclist NL", "exprlist : /* empty */", "exprlist : exprlist expr", "speclist : /* empty */", "speclist : speclist spec", "expr : spec EQ spec", "expr : spec", "spec : IDENT", "spec : VALSTR", "spec : REGEXP", "pidlist : pidlist COMMA singlepid", "pidlist : singlepid", "singlepid : SCALED_INT", "buffer_statement : BUFFER NL", "buffer_statement : BUFFER ALLOC NL", "buffer_statement : BUFFER ALLOC SCALED_INT NL", "buffer_statement : BUFFER DEALLOC NL", }; #endif /* YYDEBUG */ # line 1 "/usr/share/lib/ccs/yaccpar" /* * 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 1993 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ #pragma ident "%Z%%M% %I% %E% SMI" /* ** Skeleton parser driver for yacc output */ /* ** yacc user known macros and defines */ #define YYERROR goto yyerrlab #define YYACCEPT return(0) #define YYABORT return(1) #define YYBACKUP( newtoken, newvalue )\ {\ if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\ {\ yyerror( "syntax error - cannot backup" );\ goto yyerrlab;\ }\ yychar = newtoken;\ yystate = *yyps;\ yylval = newvalue;\ goto yynewstate;\ } #define YYRECOVERING() (!!yyerrflag) #define YYNEW(type) malloc(sizeof(type) * yynewmax) #define YYCOPY(to, from, type) \ (type *) memcpy(to, (char *) from, yymaxdepth * sizeof (type)) #define YYENLARGE( from, type) \ (type *) realloc((char *) from, yynewmax * sizeof(type)) #ifndef YYDEBUG # define YYDEBUG 1 /* make debugging available */ #endif /* ** user known globals */ int yydebug; /* set to 1 to get debugging */ /* ** driver internal defines */ #define YYFLAG (-10000000) /* ** global variables used by the parser */ YYSTYPE *yypv; /* top of value stack */ int *yyps; /* top of state stack */ int yystate; /* current state */ int yytmp; /* extra var (lasts between blocks) */ int yynerrs; /* number of errors */ int yyerrflag; /* error recovery flag */ int yychar; /* current input token number */ #ifdef YYNMBCHARS #define YYLEX() yycvtok(yylex()) /* ** yycvtok - return a token if i is a wchar_t value that exceeds 255. ** If i<255, i itself is the token. If i>255 but the neither ** of the 30th or 31st bit is on, i is already a token. */ #if defined(__STDC__) || defined(__cplusplus) int yycvtok(int i) #else int yycvtok(i) int i; #endif { int first = 0; int last = YYNMBCHARS - 1; int mid; wchar_t j; if(i&0x60000000){/*Must convert to a token. */ if( yymbchars[last].character < i ){ return i;/*Giving up*/ } while ((last>=first)&&(first>=0)) {/*Binary search loop*/ mid = (first+last)/2; j = yymbchars[mid].character; if( j==i ){/*Found*/ return yymbchars[mid].tvalue; }else if( j= 0; yy_i++ ) { if ( yytoks[yy_i].t_val == yychar ) break; } printf( "%s\n", yytoks[yy_i].t_name ); } } #endif /* YYDEBUG */ if ( ++yy_ps >= &yys[ yymaxdepth ] ) /* room on stack? */ { /* ** reallocate and recover. Note that pointers ** have to be reset, or bad things will happen */ long yyps_index = (yy_ps - yys); long yypv_index = (yy_pv - yyv); long yypvt_index = (yypvt - yyv); int yynewmax; #ifdef YYEXPAND yynewmax = YYEXPAND(yymaxdepth); #else yynewmax = 2 * yymaxdepth; /* double table size */ if (yymaxdepth == YYMAXDEPTH) /* first time growth */ { char *newyys = (char *)YYNEW(int); char *newyyv = (char *)YYNEW(YYSTYPE); if (newyys != 0 && newyyv != 0) { yys = YYCOPY(newyys, yys, int); yyv = YYCOPY(newyyv, yyv, YYSTYPE); } else yynewmax = 0; /* failed */ } else /* not first time */ { yys = YYENLARGE(yys, int); yyv = YYENLARGE(yyv, YYSTYPE); if (yys == 0 || yyv == 0) yynewmax = 0; /* failed */ } #endif if (yynewmax <= yymaxdepth) /* tables not expanded */ { yyerror( "yacc stack overflow" ); YYABORT; } yymaxdepth = yynewmax; yy_ps = yys + yyps_index; yy_pv = yyv + yypv_index; yypvt = yyv + yypvt_index; } *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 YYCONST 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( "syntax error" ); 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; skip_init: yynerrs++; /* FALLTHRU */ 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; } /* ** code supplied by user is placed in this switch */ switch( yytmp ) { case 2: # line 119 "../prexgram.y" { prompt(); } break; case 3: # line 121 "../prexgram.y" { if (g_kernelmode) prbk_warn_pfilter_empty(); prompt(); } break; case 25: # line 149 "../prexgram.y" { yyerrok; } break; case 27: # line 155 "../prexgram.y" { yyval.intval = yypvt[-0].intval; } break; case 28: # line 156 "../prexgram.y" { yyval.intval = yypvt[-0].intval; } break; case 29: # line 157 "../prexgram.y" { yyval.intval = yypvt[-0].intval; } break; case 30: # line 158 "../prexgram.y" { yyval.intval = yypvt[-0].intval; } break; case 31: # line 159 "../prexgram.y" { yyval.intval = yypvt[-0].intval; } break; case 32: # line 160 "../prexgram.y" { yyval.intval = yypvt[-0].intval; } break; case 33: # line 161 "../prexgram.y" { yyval.intval = yypvt[-0].intval; } break; case 34: # line 162 "../prexgram.y" { yyval.intval = yypvt[-0].intval; } break; case 35: # line 163 "../prexgram.y" { yyval.intval = yypvt[-0].intval; } break; case 36: # line 164 "../prexgram.y" { yyval.intval = yypvt[-0].intval; } break; case 37: # line 165 "../prexgram.y" { yyval.intval = yypvt[-0].intval; } break; case 38: # line 166 "../prexgram.y" { yyval.intval = yypvt[-0].intval; } break; case 39: # line 167 "../prexgram.y" { yyval.intval = yypvt[-0].intval; } break; case 40: # line 168 "../prexgram.y" { yyval.intval = yypvt[-0].intval; } break; case 41: # line 171 "../prexgram.y" { help(); } break; case 42: # line 172 "../prexgram.y" { help_on_command(yypvt[-1].intval); } break; case 43: # line 173 "../prexgram.y" { help_on_topic(yypvt[-1].strval); } break; case 44: # line 177 "../prexgram.y" { if (!g_kernelmode) YYACCEPT; } break; case 45: # line 182 "../prexgram.y" { quit(B_TRUE, B_TRUE); } break; case 46: # line 183 "../prexgram.y" { quit(B_TRUE, B_FALSE); } break; case 47: # line 184 "../prexgram.y" { quit(B_FALSE, B_TRUE); } break; case 48: # line 185 "../prexgram.y" { quit(B_FALSE, B_FALSE); } break; case 49: # line 189 "../prexgram.y" { cmd_t *cmd_p; cmd_p = cmd_set(yypvt[-1].strval, CMD_ENABLE, NULL); if (cmd_p) process_cmd(g_hndl, cmd_p); } break; case 50: # line 196 "../prexgram.y" { cmd_t *cmd_p; cmd_p = cmd_expr(yypvt[-1].exprval, CMD_ENABLE, NULL); if (cmd_p) process_cmd(g_hndl, cmd_p); } break; case 51: # line 205 "../prexgram.y" { cmd_t *cmd_p; cmd_p = cmd_set(yypvt[-1].strval, CMD_DISABLE, NULL); if (cmd_p) process_cmd(g_hndl, cmd_p); } break; case 52: # line 212 "../prexgram.y" { cmd_t *cmd_p; cmd_p = cmd_expr(yypvt[-1].exprval, CMD_DISABLE, NULL); if (cmd_p) process_cmd(g_hndl, cmd_p); } break; case 53: # line 221 "../prexgram.y" { cmd_t *cmd_p; cmd_p = cmd_set(yypvt[-1].strval, CMD_TRACE, NULL); if (cmd_p) process_cmd(g_hndl, cmd_p); } break; case 54: # line 228 "../prexgram.y" { cmd_t *cmd_p; cmd_p = cmd_expr(yypvt[-1].exprval, CMD_TRACE, NULL); if (cmd_p) process_cmd(g_hndl, cmd_p); } break; case 55: # line 237 "../prexgram.y" { cmd_t *cmd_p; cmd_p = cmd_set(yypvt[-1].strval, CMD_UNTRACE, NULL); if (cmd_p) process_cmd(g_hndl, cmd_p); } break; case 56: # line 244 "../prexgram.y" { cmd_t *cmd_p; cmd_p = cmd_expr(yypvt[-1].exprval, CMD_UNTRACE, NULL); if (cmd_p) process_cmd(g_hndl, cmd_p); } break; case 57: # line 253 "../prexgram.y" { cmd_t *cmd_p; cmd_p = cmd_set(yypvt[-1].strval, CMD_CONNECT, yypvt[-2].strval); if (cmd_p) process_cmd(g_hndl, cmd_p); } break; case 58: # line 260 "../prexgram.y" { cmd_t *cmd_p; cmd_p = cmd_expr(yypvt[-1].exprval, CMD_CONNECT, yypvt[-2].strval); if (cmd_p) process_cmd(g_hndl, cmd_p); } break; case 59: # line 269 "../prexgram.y" { cmd_t *cmd_p; cmd_p = cmd_set(yypvt[-1].strval, CMD_CLEAR, NULL); if (cmd_p) process_cmd(g_hndl, cmd_p); } break; case 60: # line 276 "../prexgram.y" { cmd_t *cmd_p; cmd_p = cmd_expr(yypvt[-1].exprval, CMD_CLEAR, NULL); if (cmd_p) process_cmd(g_hndl, cmd_p); } break; case 61: # line 284 "../prexgram.y" { (void) set(yypvt[-2].strval, yypvt[-1].exprval); } break; case 62: # line 285 "../prexgram.y" { fcn(yypvt[-2].strval, yypvt[-1].strval); } break; case 63: # line 288 "../prexgram.y" { source_file(yypvt[-1].strval); } break; case 64: # line 289 "../prexgram.y" { source_file(yypvt[-1].strval); } break; case 65: # line 292 "../prexgram.y" { set_list(); } break; case 66: # line 295 "../prexgram.y" { cmd_list(); } break; case 67: # line 298 "../prexgram.y" { cmd_listtracefile(); } break; case 68: # line 301 "../prexgram.y" { fcn_list(); } break; case 69: # line 307 "../prexgram.y" { prbk_set_pfilter_mode(B_TRUE); } break; case 70: # line 309 "../prexgram.y" { prbk_set_pfilter_mode(B_FALSE); } break; case 71: # line 311 "../prexgram.y" { prbk_pfilter_add(yypvt[-1].pidlistval); } break; case 72: # line 313 "../prexgram.y" { prbk_pfilter_drop(yypvt[-1].pidlistval); } break; case 73: # line 315 "../prexgram.y" { prbk_show_pfilter_mode(); } break; case 74: # line 319 "../prexgram.y" { prbk_set_tracing(B_TRUE); } break; case 75: # line 321 "../prexgram.y" { prbk_set_tracing(B_FALSE); } break; case 76: # line 323 "../prexgram.y" { prbk_show_tracing(); } break; case 77: # line 327 "../prexgram.y" { list_set(yypvt[-3].specval, yypvt[-1].strval); } break; case 78: # line 329 "../prexgram.y" { list_expr(yypvt[-3].specval, yypvt[-1].exprval); } break; case 79: # line 332 "../prexgram.y" { list_values(yypvt[-1].specval); } break; case 80: # line 335 "../prexgram.y" { yyval.exprval = NULL; } break; case 81: # line 336 "../prexgram.y" { yyval.exprval = expr_list(yypvt[-1].exprval, yypvt[-0].exprval); } break; case 82: # line 339 "../prexgram.y" { yyval.specval = NULL; } break; case 83: # line 340 "../prexgram.y" { yyval.specval = spec_list(yypvt[-1].specval, yypvt[-0].specval); } break; case 84: # line 343 "../prexgram.y" { yyval.exprval = expr(yypvt[-2].specval, yypvt[-0].specval); } break; case 85: # line 344 "../prexgram.y" { yyval.exprval = expr(spec(strdup("keys"), SPEC_EXACT), yypvt[-0].specval); } break; case 86: # line 348 "../prexgram.y" { yyval.specval = spec(yypvt[-0].strval, SPEC_EXACT); } break; case 87: # line 349 "../prexgram.y" { yyval.specval = spec(yypvt[-0].strval, SPEC_EXACT); } break; case 88: # line 350 "../prexgram.y" { yyval.specval = spec(yypvt[-0].strval, SPEC_REGEXP); } break; case 89: # line 354 "../prexgram.y" { yyval.pidlistval = prbk_pidlist_add(yypvt[-2].pidlistval, yypvt[-0].intval); } break; case 90: # line 356 "../prexgram.y" { yyval.pidlistval = prbk_pidlist_add(NULL, yypvt[-0].intval); } break; case 92: # line 363 "../prexgram.y" { prbk_buffer_list(); } break; case 93: # line 367 "../prexgram.y" { extern int g_outsize; prbk_buffer_alloc(g_outsize); } break; case 94: # line 372 "../prexgram.y" { prbk_buffer_alloc(yypvt[-1].intval); } break; case 95: # line 376 "../prexgram.y" { prbk_buffer_dealloc(); } break; # line 556 "/usr/share/lib/ccs/yaccpar" } goto yystack; /* reset registers in driver code */ }