/* A Bison parser, made by GNU Bison 2.0. */
/* Skeleton parser for Yacc-like parsing with Bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
/* Written by Richard Stallman by simplifying the original so called
``semantic'' parser. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
There are some unavoidable exceptions within include files to
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
/* Identify Bison output. */
#define YYBISON 1
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
/* Pure parsers. */
#define YYPURE 0
/* Using locations. */
#define YYLSP_NEEDED 0
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
FIRSTTOKEN = 258,
PROGRAM = 259,
PASTAT = 260,
PASTAT2 = 261,
XBEGIN = 262,
XEND = 263,
NL = 264,
ARRAY = 265,
MATCH = 266,
NOTMATCH = 267,
MATCHOP = 268,
FINAL = 269,
DOT = 270,
ALL = 271,
CCL = 272,
NCCL = 273,
CHAR = 274,
OR = 275,
STAR = 276,
QUEST = 277,
PLUS = 278,
EMPTYRE = 279,
AND = 280,
BOR = 281,
APPEND = 282,
EQ = 283,
GE = 284,
GT = 285,
LE = 286,
LT = 287,
NE = 288,
IN = 289,
ARG = 290,
BLTIN = 291,
BREAK = 292,
CLOSE = 293,
CONTINUE = 294,
DELETE = 295,
DO = 296,
EXIT = 297,
FOR = 298,
FUNC = 299,
SUB = 300,
GSUB = 301,
IF = 302,
INDEX = 303,
LSUBSTR = 304,
MATCHFCN = 305,
NEXT = 306,
NEXTFILE = 307,
ADD = 308,
MINUS = 309,
MULT = 310,
DIVIDE = 311,
MOD = 312,
ASSIGN = 313,
ASGNOP = 314,
ADDEQ = 315,
SUBEQ = 316,
MULTEQ = 317,
DIVEQ = 318,
MODEQ = 319,
POWEQ = 320,
PRINT = 321,
PRINTF = 322,
SPRINTF = 323,
ELSE = 324,
INTEST = 325,
CONDEXPR = 326,
POSTINCR = 327,
PREINCR = 328,
POSTDECR = 329,
PREDECR = 330,
VAR = 331,
IVAR = 332,
VARNF = 333,
CALL = 334,
NUMBER = 335,
STRING = 336,
REGEXPR = 337,
GETLINE = 338,
SUBSTR = 339,
SPLIT = 340,
RETURN = 341,
WHILE = 342,
CAT = 343,
UMINUS = 344,
NOT = 345,
POWER = 346,
INCR = 347,
DECR = 348,
INDIRECT = 349,
LASTTOKEN = 350
};
#endif
#define FIRSTTOKEN 258
#define PROGRAM 259
#define PASTAT 260
#define PASTAT2 261
#define XBEGIN 262
#define XEND 263
#define NL 264
#define ARRAY 265
#define MATCH 266
#define NOTMATCH 267
#define MATCHOP 268
#define FINAL 269
#define DOT 270
#define ALL 271
#define CCL 272
#define NCCL 273
#define CHAR 274
#define OR 275
#define STAR 276
#define QUEST 277
#define PLUS 278
#define EMPTYRE 279
#define AND 280
#define BOR 281
#define APPEND 282
#define EQ 283
#define GE 284
#define GT 285
#define LE 286
#define LT 287
#define NE 288
#define IN 289
#define ARG 290
#define BLTIN 291
#define BREAK 292
#define CLOSE 293
#define CONTINUE 294
#define DELETE 295
#define DO 296
#define EXIT 297
#define FOR 298
#define FUNC 299
#define SUB 300
#define GSUB 301
#define IF 302
#define INDEX 303
#define LSUBSTR 304
#define MATCHFCN 305
#define NEXT 306
#define NEXTFILE 307
#define ADD 308
#define MINUS 309
#define MULT 310
#define DIVIDE 311
#define MOD 312
#define ASSIGN 313
#define ASGNOP 314
#define ADDEQ 315
#define SUBEQ 316
#define MULTEQ 317
#define DIVEQ 318
#define MODEQ 319
#define POWEQ 320
#define PRINT 321
#define PRINTF 322
#define SPRINTF 323
#define ELSE 324
#define INTEST 325
#define CONDEXPR 326
#define POSTINCR 327
#define PREINCR 328
#define POSTDECR 329
#define PREDECR 330
#define VAR 331
#define IVAR 332
#define VARNF 333
#define CALL 334
#define NUMBER 335
#define STRING 336
#define REGEXPR 337
#define GETLINE 338
#define SUBSTR 339
#define SPLIT 340
#define RETURN 341
#define WHILE 342
#define CAT 343
#define UMINUS 344
#define NOT 345
#define POWER 346
#define INCR 347
#define DECR 348
#define INDIRECT 349
#define LASTTOKEN 350
/* Copy the first part of user declarations. */
#line 25 "awkgram.y"
#include <stdio.h>
#include <string.h>
#include "awk.h"
void checkdup(Node *list, Cell *item);
int yywrap(void) { return(1); }
Node *beginloc = 0;
Node *endloc = 0;
int infunc = 0; /* = 1 if in arglist or body of func */
int inloop = 0; /* = 1 if in while, for, do */
char *curfname = 0; /* current function name */
Node *arglist = 0; /* list of args for current function */
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 41 "awkgram.y"
typedef union YYSTYPE {
Node *p;
Cell *cp;
int i;
char *s;
} YYSTYPE;
/* Line 190 of yacc.c. */
#line 289 "y.tab.c"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
/* Copy the second part of user declarations. */
/* Line 213 of yacc.c. */
#line 301 "y.tab.c"
#if ! defined (yyoverflow) || YYERROR_VERBOSE
# ifndef YYFREE
# define YYFREE free
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
# endif
/* The parser invokes alloca or malloc; define the necessary symbols. */
# ifdef YYSTACK_USE_ALLOCA
# if YYSTACK_USE_ALLOCA
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# else
# define YYSTACK_ALLOC alloca
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else
# if defined (__STDC__) || defined (__cplusplus)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
# define YYSTACK_ALLOC YYMALLOC
# define YYSTACK_FREE YYFREE
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
#if (! defined (yyoverflow) \
&& (! defined (__cplusplus) \
|| (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
short int yyss;
YYSTYPE yyvs;
};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
# if defined (__GNUC__) && 1 < __GNUC__
# define YYCOPY(To, From
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
awk.rar (38个子文件)
awk
missing95.obj 700B
awkgram.y 14KB
lib.c 17KB
main.c 5KB
b.obj 19KB
lib.obj 20KB
awk源码windows下编译说明.docx 80KB
ytab.h 5KB
missing95.c 321B
proctab.obj 7KB
ytabc.bak 137KB
buildwin.bat 426B
maketab.c 5KB
ytab.obj 39KB
ytab.c 137KB
awk.1 10KB
FIXES 32KB
makefile 2KB
ytabh.bak 5KB
awk.exe 248KB
parse.c 5KB
run.obj 41KB
proto.h 7KB
makefile.win 328B
main.obj 5KB
lex.obj 21KB
run.c 43KB
tran.c 12KB
vcvars32.bat 989B
README 4KB
maketab.exe 66KB
tran.obj 12KB
parse.obj 5KB
awk.h 6KB
maketab.obj 8KB
proctab.c 5KB
lex.c 13KB
b.c 22KB
共 38 条
- 1
资源评论
DayThinking
- 粉丝: 350
- 资源: 27
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功