?? conf.tab.c
字號:
/* A Bison parser, made by GNU Bison 1.875c. *//* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 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/* If NAME_PREFIX is specified substitute the variables and functions names. */#define yyparse bdconfig_parse#define yylex bdconfig_lex#define yyerror bdconfig_error#define yylval bdconfig_lval#define yychar bdconfig_char#define yydebug bdconfig_debug#define yynerrs bdconfig_nerrs/* Tokens. */#ifndef YYTOKENTYPE# define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { TOKJUNK = 258, TOKSUBNET = 259, TOKDEV = 260, TOKSLASH = 261, TOKSKIPINTERVALS = 262, TOKGRAPHCUTOFF = 263, TOKPROMISC = 264, TOKOUTPUTCDF = 265, TOKRECOVERCDF = 266, TOKGRAPH = 267, TOKNEWLINE = 268, TOKFILTER = 269, TOKMETAREFRESH = 270, TOKPGSQLCONNECTSTRING = 271, TOKSENSORID = 272, IPADDR = 273, NUMBER = 274, STRING = 275, STATE = 276 };#endif#define TOKJUNK 258#define TOKSUBNET 259#define TOKDEV 260#define TOKSLASH 261#define TOKSKIPINTERVALS 262#define TOKGRAPHCUTOFF 263#define TOKPROMISC 264#define TOKOUTPUTCDF 265#define TOKRECOVERCDF 266#define TOKGRAPH 267#define TOKNEWLINE 268#define TOKFILTER 269#define TOKMETAREFRESH 270#define TOKPGSQLCONNECTSTRING 271#define TOKSENSORID 272#define IPADDR 273#define NUMBER 274#define STRING 275#define STATE 276/* Copy the first part of user declarations. */#line 1 "conf.y"#include <stdio.h>#include <string.h>#include <unistd.h>#include <stdlib.h>#include <unistd.h>#include <sys/types.h>#include <signal.h>#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>#include "netwolf.h"extern unsigned int SubnetCount;extern struct SubnetData SubnetTable[];extern struct config config;int bdconfig_lex(void);int LineNo = 1;void bdconfig_error(const char *str) { fprintf(stderr, "Syntax Error \"%s\" on line %d\n", str, LineNo); syslog(LOG_ERR, "Syntax Error \"%s\" on line %d", str, LineNo); exit(1); }int bdconfig_wrap() { return(1); }/* 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 38 "conf.y"typedef union YYSTYPE { int number; char *string;} YYSTYPE;/* Line 191 of yacc.c. */#line 165 "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 177 "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# define YYSTACK_ALLOC alloca# endif# else# if defined (alloca) || defined (_ALLOCA_H)# define YYSTACK_ALLOC alloca# else# ifdef __GNUC__# define YYSTACK_ALLOC __builtin_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 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 defined (__GNUC__) && 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 2/* YYLAST -- Last index in YYTABLE. */#define YYLAST 30/* YYNTOKENS -- Number of terminals. */#define YYNTOKENS 22/* YYNNTS -- Number of nonterminals. */#define YYNNTS 19/* YYNRULES -- Number of rules. */#define YYNRULES 33/* YYNRULES -- Number of states. */#define YYNSTATES 48/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */#define YYUNDEFTOK 2#define YYMAXUTOK 276#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, 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, 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, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21};#if YYDEBUG/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */static const unsigned char yyprhs[] ={ 0, 0, 3, 4, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 43, 48, 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80};/* YYRHS -- A `-1'-separated list of the rules' RHS. */static const yysigned_char yyrhs[] ={ 23, 0, -1, -1, 23, 24, -1, 25, -1, 30, -1, 33, -1, 34, -1, 35, -1, 36, -1, 37, -1, 38, -1, 26, -1, 31, -1, 32, -1, 39, -1, 40, -1, 27, -1, 28, -1, 13, -1, 4, 18, 18, -1, 4, 18, 6, 19, -1, 20, -1, 5, 29, -1, 14, 29, -1, 15, 19, -1, 7, 19, -1, 8, 19, -1, 9, 21, -1, 10, 21, -1, 11, 21, -1, 12, 21, -1, 16, 29, -1, 17, 29, -1};/* YYRLINE[YYN] -- source line where rule number YYN was defined. */static const unsigned char yyrline[] ={ 0, 50, 50, 51, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 83, 85, 89, 96, 110, 130, 138, 145, 152, 159, 166, 173, 180, 187, 194, 201, 209};#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", "TOKJUNK", "TOKSUBNET", "TOKDEV", "TOKSLASH", "TOKSKIPINTERVALS", "TOKGRAPHCUTOFF", "TOKPROMISC", "TOKOUTPUTCDF", "TOKRECOVERCDF", "TOKGRAPH", "TOKNEWLINE", "TOKFILTER", "TOKMETAREFRESH", "TOKPGSQLCONNECTSTRING", "TOKSENSORID", "IPADDR", "NUMBER", "STRING", "STATE", "$accept", "commands", "command", "subnet", "newline", "subneta", "subnetb", "string", "device", "filter", "meta_refresh", "skip_intervals", "graph_cutoff", "promisc", "output_cdf", "recover_cdf", "graph", "pgsql_connect_string", "sensor_id", 0};#endif# ifdef YYPRINT/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */static const unsigned short yytoknum[] ={ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276};# endif/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */static const unsigned char yyr1[] ={ 0, 22, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40};/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */static const unsigned char yyr2[] ={ 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */static const unsigned char yydefact[] ={ 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 3, 4, 12, 17, 18, 5, 13, 14, 6, 7, 8, 9, 10, 11, 15, 16, 0, 22, 23, 26, 27, 28, 29, 30, 31, 24, 25, 32, 33, 0, 20, 21};/* YYDEFGOTO[NTERM-NUM]. */static const yysigned_char yydefgoto[] ={ -1, 1, 16, 17, 18, 19, 20, 34, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */#define YYPACT_NINF -19static const yysigned_char yypact[] ={ -19, 0, -19, -17, -18, -16, -13, -1, 2, 3, 4, -19, -18, 8, -18, -18, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, 12, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, 9, -19, -19};/* YYPGOTO[NTERM-NUM]. */static const yysigned_char yypgoto[] ={ -19, -19, -19, -19, -19, -19, -19, 7, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19};/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */#define YYTABLE_NINF -1static const unsigned char yytable[] ={ 2, 32, 33, 35, 3, 4, 36, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 45, 41, 37, 43, 44, 38, 39, 40, 0, 42, 47, 0, 46};static const yysigned_char yycheck[] ={ 0, 18, 20, 19, 4, 5, 19, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 6, 12, 21, 14, 15, 21, 21, 21, -1, 19, 19, -1, 18};/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */static const unsigned char yystos[] ={ 0, 23, 0, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 18, 20, 29, 19, 19, 21, 21, 21, 21, 29, 19, 29, 29, 6, 18, 19};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -