📄 awk.shar
字号:
-#define INCR 346-#define DECR 347-#define INDIRECT 348-#define LASTTOKEN 349-----/* 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 191 of yacc.c. */-#line 286 "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 214 of yacc.c. */-#line 298 "y.tab.c"--#if ! defined (yyoverflow) || YYERROR_VERBOSE--/* The parser invokes alloca or malloc; define the necessary symbols. */--# if YYSTACK_USE_ALLOCA-# define YYSTACK_ALLOC alloca-# else-# ifndef YYSTACK_USE_ALLOCA-# if defined (alloca) || defined (_ALLOCA_H)-# define YYSTACK_ALLOC alloca-# else-# ifdef __GNUC__-# define YYSTACK_ALLOC __builtin_alloca-# endif-# 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 malloc-# define YYSTACK_FREE free-# endif-#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */---#if (! defined (yyoverflow) \- && (! defined (__cplusplus) \- || (YYSTYPE_IS_TRIVIAL)))--/* A type that is properly aligned for any stack member. */-union yyalloc-{- short 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) + sizeof (YYSTYPE)) \- + YYSTACK_GAP_MAXIMUM)--/* Copy COUNT objects from FROM to TO. The source and destination do- not overlap. */-# ifndef YYCOPY-# if 1 < __GNUC__-# define YYCOPY(To, From, Count) \- __builtin_memcpy (To, From, (Count) * sizeof (*(From)))-# else-# define YYCOPY(To, From, Count) \- do \- { \- register YYSIZE_T yyi; \- for (yyi = 0; yyi < (Count); yyi++) \- (To)[yyi] = (From)[yyi]; \- } \- while (0)-# endif-# endif--/* Relocate STACK from its old location to the new one. The- local variables YYSIZE and YYSTACKSIZE give the old and new number of- elements in the stack, and YYPTR gives the new location of the- stack. Advance YYPTR to a properly aligned location for the next- stack. */-# define YYSTACK_RELOCATE(Stack) \- do \- { \- YYSIZE_T yynewbytes; \- YYCOPY (&yyptr->Stack, Stack, yysize); \- Stack = &yyptr->Stack; \- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \- yyptr += yynewbytes / sizeof (*yyptr); \- } \- while (0)--#endif--#if defined (__STDC__) || defined (__cplusplus)- typedef signed char yysigned_char;-#else- typedef short yysigned_char;-#endif--/* YYFINAL -- State number of the termination state. */-#define YYFINAL 8-/* YYLAST -- Last index in YYTABLE. */-#define YYLAST 4569--/* YYNTOKENS -- Number of terminals. */-#define YYNTOKENS 111-/* YYNNTS -- Number of nonterminals. */-#define YYNNTS 49-/* YYNRULES -- Number of rules. */-#define YYNRULES 185-/* YYNRULES -- Number of states. */-#define YYNSTATES 367--/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */-#define YYUNDEFTOK 2-#define YYMAXUTOK 349--#define YYTRANSLATE(YYX) \- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)--/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */-static const unsigned char yytranslate[] =-{- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 103, 2, 2,- 12, 16, 102, 100, 9, 101, 2, 15, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 93, 14,- 2, 2, 2, 92, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 18, 2, 19, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 11, 13, 17, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,- 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,- 5, 6, 7, 8, 10, 20, 21, 22, 23, 24,- 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,- 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,- 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,- 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,- 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,- 85, 86, 87, 88, 89, 90, 91, 94, 95, 96,- 97, 98, 99, 104, 105, 106, 107, 108, 109, 110-};--#if YYDEBUG-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in- YYRHS. */-static const unsigned short yyprhs[] =-{- 0, 0, 3, 5, 7, 9, 12, 14, 17, 19,- 22, 24, 27, 29, 32, 33, 46, 47, 58, 59,- 68, 70, 72, 77, 79, 82, 84, 87, 88, 90,- 91, 93, 94, 96, 98, 102, 104, 106, 111, 115,- 122, 126, 131, 136, 137, 147, 149, 153, 155, 159,- 163, 169, 173, 177, 181, 185, 189, 195, 198, 200,- 202, 206, 212, 216, 220, 224, 228, 232, 236, 240,- 244, 248, 252, 256, 262, 267, 271, 274, 276, 278,- 282, 286, 288, 292, 293, 295, 299, 301, 303, 305,- 307, 310, 313, 315, 318, 320, 323, 324, 329, 331,- 334, 339, 344, 349, 352, 358, 361, 363, 365, 367,- 370, 373, 376, 377, 378, 388, 392, 395, 397, 402,- 405, 409, 412, 415, 419, 422, 425, 426, 430, 433,- 435, 438, 440, 442, 447, 451, 455, 459, 463, 467,- 471, 474, 477, 480, 484, 489, 491, 495, 500, 503,- 506, 509, 512, 515, 520, 524, 527, 529, 536, 543,- 547, 554, 561, 563, 572, 581, 588, 593, 595, 602,- 609, 618, 627, 636, 643, 645, 647, 652, 654, 657,- 658, 660, 664, 666, 668, 670-};--/* YYRHS -- A `-1'-separated list of the rules' RHS. */-static const short yyrhs[] =-{- 112, 0, -1, 129, -1, 1, -1, 34, -1, 113,- 10, -1, 35, -1, 114, 10, -1, 9, -1, 115,- 10, -1, 50, -1, 116, 10, -1, 78, -1, 117,- 10, -1, -1, 52, 12, 128, 14, 126, 136, 14,- 126, 128, 146, 119, 149, -1, -1, 52, 12, 128,- 14, 14, 126, 128, 146, 120, 149, -1, -1, 52,- 12, 158, 43, 158, 146, 121, 149, -1, 85, -1,- 88, -1, 56, 12, 136, 146, -1, 11, -1, 124,- 10, -1, 10, -1, 125, 10, -1, -1, 125, -1,- -1, 141, -1, -1, 147, -1, 127, -1, 127, 133,- 127, -1, 136, -1, 130, -1, 130, 124, 153, 17,- -1, 130, 9, 130, -1, 130, 9, 130, 124, 153,- 17, -1, 124, 153, 17, -1, 7, 124, 153, 17,- -1, 8, 124, 153, 17, -1, -1, 53, 122, 12,- 157, 146, 132, 124, 153, 17, -1, 131, -1, 133,- 127, 131, -1, 136, -1, 134, 115, 136, -1, 156,- 68, 135, -1, 135, 92, 135, 93, 135, -1, 135,- 114, 135, -1, 135, 113, 135, -1, 135, 23, 144,- -1, 135, 23, 135, -1, 135, 43, 158, -1, 12,- 137, 16, 43, 158, -1, 135, 155, -1, 143, -1,- 155, -1, 156, 68, 136, -1, 136, 92, 136, 93,- 136, -1, 136, 114, 136, -1, 136, 113, 136, -1,- 136, 37, 136, -1, 136, 38, 136, -1, 136, 39,- 136, -1, 136, 40, 136, -1, 136, 41, 136, -1,- 136, 42, 136, -1, 136, 23, 144, -1, 136, 23,- 136, -1, 136, 43, 158, -1, 12, 137, 16, 43,- 158, -1, 136, 13, 94, 156, -1, 136, 13, 94,- -1, 136, 155, -1, 143, -1, 155, -1, 136, 115,- 136, -1, 137, 115, 136, -1, 135, -1, 138, 115,- 135, -1, -1, 138, -1, 12, 137, 16, -1, 75,- -1, 76, -1, 10, -1, 14, -1, 141, 10, -1,- 141, 14, -1, 17, -1, 142, 10, -1, 144, -1,- 105, 143, -1, -1, 15, 145, 91, 15, -1, 16,- -1, 146, 10, -1, 140, 139, 13, 155, -1, 140,- 139, 36, 155, -1, 140, 139, 39, 155, -1, 140,- 139, -1, 49, 158, 18, 134, 19, -1, 49, 158,- -1, 136, -1, 1, -1, 125, -1, 14, 126, -1,- 46, 148, -1, 48, 148, -1, -1, -1, 116, 150,- 149, 151, 98, 12, 136, 16, 148, -1, 51, 136,- 148, -1, 51, 148, -1, 118, -1, 123, 149, 117,- 149, -1, 123, 149, -1, 124, 153, 142, -1, 60,- 148, -1, 61, 148, -1, 97, 136, 148, -1, 97,- 148, -1, 147, 148, -1, -1, 159, 152, 149, -1,- 14, 126, -1, 149, -1, 153, 149, -1, 54, -1,- 55, -1, 155, 15, 68, 155, -1, 155, 100, 155,- -1, 155, 101, 155, -1, 155, 102, 155, -1, 155,- 15, 155, -1, 155, 103, 155, -1, 155, 106, 155,- -1, 101, 155, -1, 100, 155, -1, 105, 155, -1,- 45, 12, 16, -1, 45, 12, 134, 16, -1, 45,- -1, 88, 12, 16, -1, 88, 12, 134, 16, -1,- 47, 155, -1, 108, 156, -1, 107, 156, -1, 156,- 108, -1, 156, 107, -1, 94, 156, 41, 155, -1,- 94, 41, 155, -1, 94, 156, -1, 94, -1, 57,- 12, 136, 115, 136, 16, -1, 57, 12, 136, 115,- 144, 16, -1, 12, 136, 16, -1, 59, 12, 136,- 115, 144, 16, -1, 59, 12, 136, 115, 136, 16,- -1, 89, -1, 96, 12, 136, 115, 158, 115, 136,- 16, -1, 96, 12, 136, 115, 158, 115, 144, 16,- -1, 96, 12, 136, 115, 158, 16, -1, 77, 12,- 134, 16, -1, 90, -1, 154, 12, 144, 115, 136,- 16, -1, 154, 12, 136, 115, 136, 16, -1, 154,- 12, 144, 115, 136, 115, 156, 16, -1, 154, 12,- 136, 115, 136, 115, 156, 16, -1, 95, 12, 136,- 115, 136, 115, 136, 16, -1, 95, 12, 136, 115,- 136, 16, -1, 156, -1, 158, -1, 158, 18, 134,- 19, -1, 86, -1, 109, 155, -1, -1, 85, -1,- 157, 115, 85, -1, 85, -1, 44, -1, 87, -1,- 98, 12, 136, 146, -1-};--/* YYRLINE[YYN] -- source line where rule number YYN was defined. */-static const unsigned short yyrline[] =-{- 0, 98, 98, 100, 104, 104, 108, 108, 112, 112,- 116, 116, 120, 120, 124, 124, 126, 126, 128, 128,- 133, 134, 138, 142, 142, 146, 146, 150, 151, 155,- 156, 161, 162, 166, 167, 171, 175, 176, 177, 178,- 179, 180, 182, 184, 184, 189, 190, 194, 195, 199,- 200, 202, 204, 206, 207, 212, 213, 214, 215, 216,- 220, 221, 223, 225, 227, 228, 229, 230, 231, 232,- 233, 234, 239, 240, 241, 244, 247, 248, 249, 253,- 254, 258, 259, 263, 264, 265, 269, 269, 273, 273,- 273, 273, 277, 277, 281, 283, 287, 287, 291, 291,- 295, 298, 301, 304, 305, 306, 307, 308, 312, 313,- 317, 319, 321, 321, 321, 323, 324, 325, 326, 327,- 328, 329, 332, 335, 336, 337, 338, 338, 339, 343,- 344, 348, 348, 352, 353, 354, 355, 356, 357, 358,- 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,- 369, 370, 371, 372, 373, 374, 375, 376, 378, 381,- 382, 384, 389, 390, 392, 394, 396, 397, 398, 400,- 405, 407, 412, 414, 416, 420, 421, 422, 423, 427,- 428, 429, 435, 436, 437, 442-};-#endif--#if YYDEBUG || YYERROR_VERBOSE-/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.- First, the terminals, then, starting at YYNTOKENS, nonterminals. */-static const char *const yytname[] =-{- "$end", "error", "$undefined", "FIRSTTOKEN", "PROGRAM", "PASTAT", - "PASTAT2", "XBEGIN", "XEND", "','", "NL", "'{'", "'('", "'|'", "';'", - "'/'", "')'", "'}'", "'['", "']'", "ARRAY", "MATCH", "NOTMATCH", - "MATCHOP", "FINAL", "DOT", "ALL", "CCL", "NCCL", "CHAR", "OR", "STAR", - "QUEST", "PLUS", "AND", "BOR", "APPEND", "EQ", "GE", "GT", "LE", "LT", - "NE", "IN", "ARG", "BLTIN", "BREAK", "CLOSE", "CONTINUE", "DELETE", - "DO", "EXIT", "FOR", "FUNC", "SUB", "GSUB", "IF", "INDEX", "LSUBSTR", - "MATCHFCN", "NEXT", "NEXTFILE", "ADD", "MINUS", "MULT", "DIVIDE", "MOD", - "ASSIGN", "ASGNOP", "ADDEQ", "SUBEQ", "MULTEQ", "DIVEQ", "MODEQ", - "POWEQ", "PRINT", "PRINTF", "SPRINTF", "ELSE", "INTEST", "CONDEXPR", - "POSTINCR", "PREINCR", "POSTDECR", "PREDECR", "VAR", "IVAR", "VARNF", - "CALL", "NUMBER", "STRING", "REGEXPR", "'?'", "':'", "GETLINE", - "SUBSTR", "SPLIT", "RETURN", "WHILE", "CAT", "'+'", "'-'", "'*'", "'%'", - "UMINUS", "NOT", "POWER", "INCR", "DECR", "INDIRECT", "LASTTOKEN", - "$accept", "program", "and", "bor", "comma", "do", "else", "for", "@1", - "@2", "@3", "funcname", "if", "lbrace", "nl", "opt_nl", "opt_pst", - "opt_s
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -