示例#1
0
文件: ls.c 项目: haskellerator/os4
void
ls(char *path)
{
  char buf[512], *p;
  int fd;
  struct dirent de;
  struct stat st;
  
  if((fd = open(path, 0)) < 0){
    printf(2, "ls: cannot open %s\n", path);
    return;
  }
  
  if(fstat(fd, &st) < 0){
    printf(2, "ls: cannot stat %s\n", path);
    close(fd);
    return;
  }
  
  switch(st.type){
  case T_FILE:
    printf(1, "%s %d %d %d\n", fmtname(path), st.type, st.ino, st.size);
    break;
  
  case T_DIR:
    if(strlen(path) + 1 + DIRSIZ + 1 > sizeof buf){
      printf(1, "ls: path too long\n");
      break;
    }
    strcpy(buf, path);
    p = buf+strlen(buf);
    *p++ = '/';
    while(read(fd, &de, sizeof(de)) == sizeof(de)){
      if(de.inum == 0)
        continue;
      memmove(p, de.name, DIRSIZ);
      p[DIRSIZ] = 0;
      if(stat2(buf, &st) < 0){
        printf(1, "ls: cannot stat %s\n", buf);
        continue;
      }
      printf(1, "%s %d %d %d\n", fmtname(buf), st.type, st.ino, st.size);
    }
    break;
  }
  close(fd);
}
示例#2
0
文件: compat.cpp 项目: Kalimeiro/burp
static int do_stat(const char *file, struct stat *sb, uint64_t *winattr)
{
	WIN32_FILE_ATTRIBUTE_DATA data;
	errno=0;

	memset(sb, 0, sizeof(*sb));
	memset(winattr, 0, sizeof(*winattr));

	if(p_GetFileAttributesExW)
	{
		// Dynamically allocate enough space for UCS2 filename.
		char *pwszBuf=sm_get_pool_memory(PM_FNAME);
		make_win32_path_UTF8_2_wchar(&pwszBuf, file);

		BOOL b=p_GetFileAttributesExW((LPCWSTR)pwszBuf,
			GetFileExInfoStandard, &data);
		sm_free_pool_memory(pwszBuf);

		if(!b) return stat2(file, sb, winattr);

	}
	else if(p_GetFileAttributesExA)
	{
		if(!p_GetFileAttributesExA(file, GetFileExInfoStandard, &data))
			return stat2(file, sb, winattr);
	}
	else
		return stat2(file, sb, winattr);

	*winattr=(int64_t)data.dwFileAttributes;

	/* Graham says: all the following stuff seems rather complicated.
	   It is probably not all needed anymore, since I have added *winattr
	   above, which bacula did not do.
	   One reason for keeping it is that some of the values get converted to
	   unix-style permissions that show up in the long list functionality.
	   I think I would prefer to remove it all though.
	 */
	sb->st_mode = 0777; // Start with everything.
	if(data.dwFileAttributes & FILE_ATTRIBUTE_READONLY)
		sb->st_mode &= ~(S_IRUSR|S_IRGRP|S_IROTH);
	if(data.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM)
		sb->st_mode &= ~S_IRWXO; // Remove everything for other.
	if(data.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)
		sb->st_mode |= S_ISVTX; // use sticky bit -> hidden.
	if(data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
		sb->st_mode |= S_IFDIR;
	else
		sb->st_mode |= S_IFREG;

	// Use st_rdev to store reparse attribute.
	sb->st_rdev=(data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)?1:0; 

	sb->st_nlink=1;
	sb->st_size=data.nFileSizeHigh;
	sb->st_size<<=32;
	sb->st_size|=data.nFileSizeLow;
	sb->st_blksize=4096;
	sb->st_blocks=(uint32_t)(sb->st_size + 4095)/4096;
	sb->st_atime=cvt_ftime_to_utime(data.ftLastAccessTime);
	sb->st_mtime=cvt_ftime_to_utime(data.ftLastWriteTime);
	sb->st_ctime=cvt_ftime_to_utime(data.ftCreationTime);

	/* If we are not at the root, then to distinguish a reparse 
	   point from a mount point, we must call FindFirstFile() to
	   get the WIN32_FIND_DATA, which has the bit that indicates
	   that this directory is a mount point -- aren't Win32 APIs
	   wonderful? (sarcasm).  The code exists in the statDir
	   subroutine.  */
	if(data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY
	  && file[1]==':' && file[2])
		statDir(file, sb, winattr);
	return 0;
}
示例#3
0
文件: awk.g.c 项目: npe9/sprite
yyparse() {

    short yys[YYMAXDEPTH];
    short yyj, yym;
    register YYSTYPE *yypvt;
    register short yystate, *yyps, yyn;
    register YYSTYPE *yypv;
    register short *yyxi;

    yystate = 0;
    yychar = -1;
    yynerrs = 0;
    yyerrflag = 0;
    yyps= &yys[-1];
    yypv= &yyv[-1];

yystack:    /* put a state and value onto the stack */

#ifdef YYDEBUG
    if( yydebug  ) printf( "state %d, char 0%o\n", yystate, yychar );
#endif
    if( ++yyps> &yys[YYMAXDEPTH] ) {
        yyerror( "yacc stack overflow" );
        return(1);
    }
    *yyps = yystate;
    ++yypv;
    *yypv = yyval;

yynewstate:

    yyn = yypact[yystate];

    if( yyn<= YYFLAG ) goto yydefault; /* simple state */

    if( yychar<0 ) if( (yychar=yylex())<0 ) yychar=0;
    if( (yyn += yychar)<0 || yyn >= YYLAST ) goto yydefault;

    if( yychk[ yyn=yyact[ yyn ] ] == yychar ) { /* valid shift */
        yychar = -1;
        yyval = yylval;
        yystate = yyn;
        if( yyerrflag > 0 ) --yyerrflag;
        goto yystack;
    }

yydefault:
    /* default state action */

    if( (yyn=yydef[yystate]) == -2 ) {
        if( yychar<0 ) if( (yychar=yylex())<0 ) yychar = 0;
        /* look through exception table */

        for( yyxi=yyexca; (*yyxi!= (-1)) || (yyxi[1]!=yystate) ; yyxi += 2 ) ; /* VOID */

        while( *(yyxi+=2) >= 0 ) {
            if( *yyxi == yychar ) break;
        }
        if( (yyn = yyxi[1]) < 0 ) return(0);   /* accept */
    }

    if( yyn == 0 ) { /* error */
        /* error ... attempt to resume parsing */

        switch( yyerrflag ) {

        case 0:   /* brand new error */

            yyerror( "syntax error" );
yyerrlab:
            ++yynerrs;

        case 1:
        case 2: /* incompletely recovered error ... try again */

            yyerrflag = 3;

            /* find a state where "error" is a legal shift action */

            while ( yyps >= yys ) {
                yyn = yypact[*yyps] + YYERRCODE;
                if( yyn>= 0 && yyn < YYLAST && yychk[yyact[yyn]] == YYERRCODE ) {
                    yystate = yyact[yyn];  /* simulate a shift of "error" */
                    goto yystack;
                }
                yyn = yypact[*yyps];

                /* the current yyps has no shift onn "error", pop stack */

#ifdef YYDEBUG
                if( yydebug ) printf( "error recovery pops state %d, uncovers %d\n", *yyps, yyps[-1] );
#endif
                --yyps;
                --yypv;
            }

            /* there is no state on the stack with an error shift ... abort */

yyabort:
            return(1);


        case 3:  /* no shift yet; clobber input char */

#ifdef YYDEBUG
            if( yydebug ) printf( "error recovery discards char %d\n", yychar );
#endif

            if( yychar == 0 ) goto yyabort; /* don't discard EOF, quit */
            yychar = -1;
            goto yynewstate;   /* try again in the same state */

        }

    }

    /* reduction by production yyn */

#ifdef YYDEBUG
    if( yydebug ) printf("reduce %d\n",yyn);
#endif
    yyps -= yyr2[yyn];
    yypvt = yypv;
    yypv -= yyr2[yyn];
    yyval = yypv[1];
    yym=yyn;
    /* consult goto table to find next state */
    yyn = yyr1[yyn];
    yyj = yypgo[yyn] + *yyps + 1;
    if( yyj>=YYLAST || yychk[ yystate = yyact[yyj] ] != -yyn ) yystate = yyact[yypgo[yyn]];
    switch(yym) {

    case 1:
# line 44 "awk.g.y"
        {
            if (errorflag==0) winner = (node *)stat3(PROGRAM, yypvt[-2], yypvt[-1], yypvt[-0]);
        }
        break;
    case 2:
# line 45 "awk.g.y"
        {
            yyclearin;
            yyerror("bailing out");
        }
        break;
    case 3:
# line 49 "awk.g.y"
        {
            PUTS("XBEGIN list");
            yyval = yypvt[-1];
        }
        break;
    case 5:
# line 51 "awk.g.y"
        {
            PUTS("empty XBEGIN");
            yyval = (hack)nullstat;
        }
        break;
    case 6:
# line 55 "awk.g.y"
        {
            PUTS("XEND list");
            yyval = yypvt[-1];
        }
        break;
    case 8:
# line 57 "awk.g.y"
        {
            PUTS("empty END");
            yyval = (hack)nullstat;
        }
        break;
    case 9:
# line 61 "awk.g.y"
        {
            PUTS("cond||cond");
            yyval = op2(BOR, yypvt[-2], yypvt[-0]);
        }
        break;
    case 10:
# line 62 "awk.g.y"
        {
            PUTS("cond&&cond");
            yyval = op2(AND, yypvt[-2], yypvt[-0]);
        }
        break;
    case 11:
# line 63 "awk.g.y"
        {
            PUTS("!cond");
            yyval = op1(NOT, yypvt[-0]);
        }
        break;
    case 12:
# line 64 "awk.g.y"
        {
            yyval = yypvt[-1];
        }
        break;
    case 13:
# line 68 "awk.g.y"
        {
            PUTS("pat||pat");
            yyval = op2(BOR, yypvt[-2], yypvt[-0]);
        }
        break;
    case 14:
# line 69 "awk.g.y"
        {
            PUTS("pat&&pat");
            yyval = op2(AND, yypvt[-2], yypvt[-0]);
        }
        break;
    case 15:
# line 70 "awk.g.y"
        {
            PUTS("!pat");
            yyval = op1(NOT, yypvt[-0]);
        }
        break;
    case 16:
# line 71 "awk.g.y"
        {
            yyval = yypvt[-1];
        }
        break;
    case 17:
# line 75 "awk.g.y"
        {
            PUTS("expr");
            yyval = op2(NE, yypvt[-0], valtonode(lookup("$zero&null", symtab, 0), CCON));
        }
        break;
    case 18:
# line 76 "awk.g.y"
        {
            PUTS("relexpr");
        }
        break;
    case 19:
# line 77 "awk.g.y"
        {
            PUTS("lexexpr");
        }
        break;
    case 20:
# line 78 "awk.g.y"
        {
            PUTS("compcond");
        }
        break;
    case 21:
# line 82 "awk.g.y"
        {
            PUTS("else");
        }
        break;
    case 22:
# line 86 "awk.g.y"
        {
            PUTS("field");
            yyval = valtonode(yypvt[-0], CFLD);
        }
        break;
    case 23:
# line 87 "awk.g.y"
        {
            PUTS("ind field");
            yyval = op1(INDIRECT, yypvt[-0]);
        }
        break;
    case 24:
# line 91 "awk.g.y"
        {
            PUTS("if(cond)");
            yyval = yypvt[-2];
        }
        break;
    case 25:
# line 95 "awk.g.y"
        {
            PUTS("expr~re");
            yyval = op2(yypvt[-1], yypvt[-2], makedfa(yypvt[-0]));
        }
        break;
    case 26:
# line 96 "awk.g.y"
        {
            PUTS("(lex_expr)");
            yyval = yypvt[-1];
        }
        break;
    case 27:
# line 100 "awk.g.y"
        {
            PUTS("number");
            yyval = valtonode(yypvt[-0], CCON);
        }
        break;
    case 28:
# line 101 "awk.g.y"
        {
            PUTS("string");
            yyval = valtonode(yypvt[-0], CCON);
        }
        break;
    case 29:
# line 102 "awk.g.y"
        {
            PUTS("var");
            yyval = valtonode(yypvt[-0], CVAR);
        }
        break;
    case 30:
# line 103 "awk.g.y"
        {
            PUTS("array[]");
            yyval = op2(ARRAY, yypvt[-3], yypvt[-1]);
        }
        break;
    case 33:
# line 108 "awk.g.y"
        {
            PUTS("getline");
            yyval = op1(GETLINE, 0);
        }
        break;
    case 34:
# line 109 "awk.g.y"
        {   PUTS("func");
            yyval = op2(FNCN, yypvt[-0], valtonode(lookup("$record", symtab, 0), CFLD));
        }
        break;
    case 35:
# line 112 "awk.g.y"
        {   PUTS("func()");
            yyval = op2(FNCN, yypvt[-2], valtonode(lookup("$record", symtab, 0), CFLD));
        }
        break;
    case 36:
# line 115 "awk.g.y"
        {
            PUTS("func(expr)");
            yyval = op2(FNCN, yypvt[-3], yypvt[-1]);
        }
        break;
    case 37:
# line 116 "awk.g.y"
        {
            PUTS("sprintf");
            yyval = op1(yypvt[-1], yypvt[-0]);
        }
        break;
    case 38:
# line 118 "awk.g.y"
        {
            PUTS("substr(e,e,e)");
            yyval = op3(SUBSTR, yypvt[-5], yypvt[-3], yypvt[-1]);
        }
        break;
    case 39:
# line 120 "awk.g.y"
        {
            PUTS("substr(e,e,e)");
            yyval = op3(SUBSTR, yypvt[-3], yypvt[-1], nullstat);
        }
        break;
    case 40:
# line 122 "awk.g.y"
        {
            PUTS("split(e,e,e)");
            yyval = op3(SPLIT, yypvt[-5], yypvt[-3], yypvt[-1]);
        }
        break;
    case 41:
# line 124 "awk.g.y"
        {
            PUTS("split(e,e,e)");
            yyval = op3(SPLIT, yypvt[-3], yypvt[-1], nullstat);
        }
        break;
    case 42:
# line 126 "awk.g.y"
        {
            PUTS("index(e,e)");
            yyval = op2(INDEX, yypvt[-3], yypvt[-1]);
        }
        break;
    case 43:
# line 127 "awk.g.y"
        {
            PUTS("(expr)");
            yyval = yypvt[-1];
        }
        break;
    case 44:
# line 128 "awk.g.y"
        {
            PUTS("t+t");
            yyval = op2(ADD, yypvt[-2], yypvt[-0]);
        }
        break;
    case 45:
# line 129 "awk.g.y"
        {
            PUTS("t-t");
            yyval = op2(MINUS, yypvt[-2], yypvt[-0]);
        }
        break;
    case 46:
# line 130 "awk.g.y"
        {
            PUTS("t*t");
            yyval = op2(MULT, yypvt[-2], yypvt[-0]);
        }
        break;
    case 47:
# line 131 "awk.g.y"
        {
            PUTS("t/t");
            yyval = op2(DIVIDE, yypvt[-2], yypvt[-0]);
        }
        break;
    case 48:
# line 132 "awk.g.y"
        {
            PUTS("t%t");
            yyval = op2(MOD, yypvt[-2], yypvt[-0]);
        }
        break;
    case 49:
# line 133 "awk.g.y"
        {
            PUTS("-term");
            yyval = op1(UMINUS, yypvt[-0]);
        }
        break;
    case 50:
# line 134 "awk.g.y"
        {
            PUTS("+term");
            yyval = yypvt[-0];
        }
        break;
    case 51:
# line 135 "awk.g.y"
        {
            PUTS("++var");
            yyval = op1(PREINCR, yypvt[-0]);
        }
        break;
    case 52:
# line 136 "awk.g.y"
        {
            PUTS("--var");
            yyval = op1(PREDECR, yypvt[-0]);
        }
        break;
    case 53:
# line 137 "awk.g.y"
        {
            PUTS("var++");
            yyval= op1(POSTINCR, yypvt[-1]);
        }
        break;
    case 54:
# line 138 "awk.g.y"
        {
            PUTS("var--");
            yyval= op1(POSTDECR, yypvt[-1]);
        }
        break;
    case 55:
# line 142 "awk.g.y"
        {
            PUTS("term");
        }
        break;
    case 56:
# line 143 "awk.g.y"
        {
            PUTS("expr term");
            yyval = op2(CAT, yypvt[-1], yypvt[-0]);
        }
        break;
    case 57:
# line 144 "awk.g.y"
        {
            PUTS("var=expr");
            yyval = stat2(yypvt[-1], yypvt[-2], yypvt[-0]);
        }
        break;
    case 60:
# line 153 "awk.g.y"
        {
            PUTS("pattern");
            yyval = stat2(PASTAT, yypvt[-0], genprint());
        }
        break;
    case 61:
# line 154 "awk.g.y"
        {
            PUTS("pattern {...}");
            yyval = stat2(PASTAT, yypvt[-3], yypvt[-1]);
        }
        break;
    case 62:
# line 155 "awk.g.y"
        {
            PUTS("srch,srch");
            yyval = pa2stat(yypvt[-2], yypvt[-0], genprint());
        }
        break;
    case 63:
# line 157 "awk.g.y"
        {
            PUTS("srch, srch {...}");
            yyval = pa2stat(yypvt[-5], yypvt[-3], yypvt[-1]);
        }
        break;
    case 64:
# line 158 "awk.g.y"
        {
            PUTS("null pattern {...}");
            yyval = stat2(PASTAT, nullstat, yypvt[-1]);
        }
        break;
    case 65:
# line 162 "awk.g.y"
        {
            PUTS("pa_stats pa_stat");
            yyval = linkum(yypvt[-2], yypvt[-1]);
        }
        break;
    case 66:
# line 163 "awk.g.y"
        {
            PUTS("null pa_stat");
            yyval = (hack)nullstat;
        }
        break;
    case 67:
# line 164 "awk.g.y"
        {
            PUTS("pa_stats pa_stat");
            yyval = linkum(yypvt[-1], yypvt[-0]);
        }
        break;
    case 68:
# line 168 "awk.g.y"
        {   PUTS("regex");
            yyval = op2(MATCH, valtonode(lookup("$record", symtab, 0), CFLD), makedfa(yypvt[-0]));
        }
        break;
    case 69:
# line 171 "awk.g.y"
        {
            PUTS("relexpr");
        }
        break;
    case 70:
# line 172 "awk.g.y"
        {
            PUTS("lexexpr");
        }
        break;
    case 71:
# line 173 "awk.g.y"
        {
            PUTS("comp pat");
        }
        break;
    case 72:
# line 177 "awk.g.y"
        {
            PUTS("expr");
        }
        break;
    case 73:
# line 178 "awk.g.y"
        {
            PUTS("pe_list");
        }
        break;
    case 74:
# line 179 "awk.g.y"
        {
            PUTS("null print_list");
            yyval = valtonode(lookup("$record", symtab, 0), CFLD);
        }
        break;
    case 75:
# line 183 "awk.g.y"
        {
            yyval = linkum(yypvt[-2], yypvt[-0]);
        }
        break;
    case 76:
# line 184 "awk.g.y"
        {
            yyval = linkum(yypvt[-2], yypvt[-0]);
        }
        break;
    case 77:
# line 185 "awk.g.y"
        {
            yyval = yypvt[-1];
        }
        break;
    case 80:
# line 194 "awk.g.y"
        {
            startreg();
        }
        break;
    case 81:
# line 196 "awk.g.y"
        {
            PUTS("/r/");
            yyval = yypvt[-1];
        }
        break;
    case 82:
# line 200 "awk.g.y"
        {
            PUTS("regex CHAR");
            yyval = op2(CHAR, (node *) 0, yypvt[-0]);
        }
        break;
    case 83:
# line 201 "awk.g.y"
        {
            PUTS("regex DOT");
            yyval = op2(DOT, (node *) 0, (node *) 0);
        }
        break;
    case 84:
# line 202 "awk.g.y"
        {
            PUTS("regex CCL");
            yyval = op2(CCL, (node *) 0, cclenter(yypvt[-0]));
        }
        break;
    case 85:
# line 203 "awk.g.y"
        {
            PUTS("regex NCCL");
            yyval = op2(NCCL, (node *) 0, cclenter(yypvt[-0]));
        }
        break;
    case 86:
# line 204 "awk.g.y"
        {
            PUTS("regex ^");
            yyval = op2(CHAR, (node *) 0, HAT);
        }
        break;
    case 87:
# line 205 "awk.g.y"
        {
            PUTS("regex $");
            yyval = op2(CHAR, (node *) 0 ,(node *) 0);
        }
        break;
    case 88:
# line 206 "awk.g.y"
        {
            PUTS("regex OR");
            yyval = op2(OR, yypvt[-2], yypvt[-0]);
        }
        break;
    case 89:
# line 208 "awk.g.y"
        {
            PUTS("regex CAT");
            yyval = op2(CAT, yypvt[-1], yypvt[-0]);
        }
        break;
    case 90:
# line 209 "awk.g.y"
        {
            PUTS("regex STAR");
            yyval = op2(STAR, yypvt[-1], (node *) 0);
        }
        break;
    case 91:
# line 210 "awk.g.y"
        {
            PUTS("regex PLUS");
            yyval = op2(PLUS, yypvt[-1], (node *) 0);
        }
        break;
    case 92:
# line 211 "awk.g.y"
        {
            PUTS("regex QUEST");
            yyval = op2(QUEST, yypvt[-1], (node *) 0);
        }
        break;
    case 93:
# line 212 "awk.g.y"
        {
            PUTS("(regex)");
            yyval = yypvt[-1];
        }
        break;
    case 94:
# line 217 "awk.g.y"
        {
            PUTS("expr relop expr");
            yyval = op2(yypvt[-1], yypvt[-2], yypvt[-0]);
        }
        break;
    case 95:
# line 219 "awk.g.y"
        {
            PUTS("(relexpr)");
            yyval = yypvt[-1];
        }
        break;
    case 98:
# line 229 "awk.g.y"
        {
            PUTS("print>stat");
            yyval = stat3(yypvt[-3], yypvt[-2], yypvt[-1], yypvt[-0]);
        }
        break;
    case 99:
# line 231 "awk.g.y"
        {
            PUTS("print list");
            yyval = stat3(yypvt[-1], yypvt[-0], nullstat, nullstat);
        }
        break;
    case 100:
# line 233 "awk.g.y"
        {
            PUTS("printf>stat");
            yyval = stat3(yypvt[-3], yypvt[-2], yypvt[-1], yypvt[-0]);
        }
        break;
    case 101:
# line 235 "awk.g.y"
        {
            PUTS("printf list");
            yyval = stat3(yypvt[-1], yypvt[-0], nullstat, nullstat);
        }
        break;
    case 102:
# line 236 "awk.g.y"
        {
            PUTS("expr");
            yyval = exptostat(yypvt[-0]);
        }
        break;
    case 103:
# line 237 "awk.g.y"
        {
            PUTS("null simple statement");
            yyval = (hack)nullstat;
        }
        break;
    case 104:
# line 238 "awk.g.y"
        {
            yyclearin;
            yyerror("illegal statement");
        }
        break;
    case 105:
# line 242 "awk.g.y"
        {
            PUTS("simple stat");
        }
        break;
    case 106:
# line 243 "awk.g.y"
        {
            PUTS("if stat");
            yyval = stat3(IF, yypvt[-1], yypvt[-0], nullstat);
        }
        break;
    case 107:
# line 245 "awk.g.y"
        {
            PUTS("if-else stat");
            yyval = stat3(IF, yypvt[-3], yypvt[-2], yypvt[-0]);
        }
        break;
    case 108:
# line 246 "awk.g.y"
        {
            PUTS("while stat");
            yyval = stat2(WHILE, yypvt[-1], yypvt[-0]);
        }
        break;
    case 109:
# line 247 "awk.g.y"
        {
            PUTS("for stat");
        }
        break;
    case 110:
# line 248 "awk.g.y"
        {
            PUTS("next");
            yyval = stat1(NEXT, 0);
        }
        break;
    case 111:
# line 249 "awk.g.y"
        {
            PUTS("exit");
            yyval = stat1(EXIT, 0);
        }
        break;
    case 112:
# line 250 "awk.g.y"
        {
            PUTS("exit");
            yyval = stat1(EXIT, yypvt[-1]);
        }
        break;
    case 113:
# line 251 "awk.g.y"
        {
            PUTS("break");
            yyval = stat1(BREAK, 0);
        }
        break;
    case 114:
# line 252 "awk.g.y"
        {
            PUTS("continue");
            yyval = stat1(CONTINUE, 0);
        }
        break;
    case 115:
# line 253 "awk.g.y"
        {
            PUTS("{statlist}");
            yyval = yypvt[-1];
        }
        break;
    case 116:
# line 257 "awk.g.y"
        {
            PUTS("stat_list stat");
            yyval = linkum(yypvt[-1], yypvt[-0]);
        }
        break;
    case 117:
# line 258 "awk.g.y"
        {
            PUTS("null stat list");
            yyval = (hack)nullstat;
        }
        break;
    case 118:
# line 262 "awk.g.y"
        {
            PUTS("while(cond)");
            yyval = yypvt[-2];
        }
        break;
    case 119:
# line 267 "awk.g.y"
        {
            PUTS("for(e;e;e)");
            yyval = stat4(FOR, yypvt[-7], yypvt[-5], yypvt[-3], yypvt[-0]);
        }
        break;
    case 120:
# line 269 "awk.g.y"
        {
            PUTS("for(e;e;e)");
            yyval = stat4(FOR, yypvt[-6], nullstat, yypvt[-3], yypvt[-0]);
        }
        break;
    case 121:
# line 271 "awk.g.y"
        {
            PUTS("for(v in v)");
            yyval = stat3(IN, yypvt[-5], yypvt[-3], yypvt[-0]);
        }
        break;
    }
    goto yystack;  /* stack new state and value */

}