ael.tab.c
来自「Asterisk-1.4.4最新内核源代码」· C语言 代码 · 共 2,072 行 · 第 1/5 页
C
2,072 行
/* A Bison parser, made by GNU Bison 2.3. *//* Skeleton implementation for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *//* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. *//* C LALR(1) parser skeleton 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/* Bison version. */#define YYBISON_VERSION "2.3"/* Skeleton name. */#define YYSKELETON_NAME "yacc.c"/* Pure parsers. */#define YYPURE 1/* Using locations. */#define YYLSP_NEEDED 1/* Substitute the variable and function names. */#define yyparse ael_yyparse#define yylex ael_yylex#define yyerror ael_yyerror#define yylval ael_yylval#define yychar ael_yychar#define yydebug ael_yydebug#define yynerrs ael_yynerrs#define yylloc ael_yylloc/* Tokens. */#ifndef YYTOKENTYPE# define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { KW_CONTEXT = 258, LC = 259, RC = 260, LP = 261, RP = 262, SEMI = 263, EQ = 264, COMMA = 265, COLON = 266, AMPER = 267, BAR = 268, AT = 269, KW_MACRO = 270, KW_GLOBALS = 271, KW_IGNOREPAT = 272, KW_SWITCH = 273, KW_IF = 274, KW_IFTIME = 275, KW_ELSE = 276, KW_RANDOM = 277, KW_ABSTRACT = 278, EXTENMARK = 279, KW_GOTO = 280, KW_JUMP = 281, KW_RETURN = 282, KW_BREAK = 283, KW_CONTINUE = 284, KW_REGEXTEN = 285, KW_HINT = 286, KW_FOR = 287, KW_WHILE = 288, KW_CASE = 289, KW_PATTERN = 290, KW_DEFAULT = 291, KW_CATCH = 292, KW_SWITCHES = 293, KW_ESWITCHES = 294, KW_INCLUDES = 295, word = 296 };#endif/* Tokens. */#define KW_CONTEXT 258#define LC 259#define RC 260#define LP 261#define RP 262#define SEMI 263#define EQ 264#define COMMA 265#define COLON 266#define AMPER 267#define BAR 268#define AT 269#define KW_MACRO 270#define KW_GLOBALS 271#define KW_IGNOREPAT 272#define KW_SWITCH 273#define KW_IF 274#define KW_IFTIME 275#define KW_ELSE 276#define KW_RANDOM 277#define KW_ABSTRACT 278#define EXTENMARK 279#define KW_GOTO 280#define KW_JUMP 281#define KW_RETURN 282#define KW_BREAK 283#define KW_CONTINUE 284#define KW_REGEXTEN 285#define KW_HINT 286#define KW_FOR 287#define KW_WHILE 288#define KW_CASE 289#define KW_PATTERN 290#define KW_DEFAULT 291#define KW_CATCH 292#define KW_SWITCHES 293#define KW_ESWITCHES 294#define KW_INCLUDES 295#define word 296/* Copy the first part of user declarations. */#line 1 "ael.y"/* * Asterisk -- An open source telephony toolkit. * * Copyright (C) 2006, Digium, Inc. * * Steve Murphy <murf@parsetree.com> * * See http://www.asterisk.org for more information about * the Asterisk project. Please do not directly contact * any of the maintainers of this project for assistance; * the project provides a web site, mailing lists and IRC * channels for your use. * * This program is free software, distributed under the terms of * the GNU General Public License Version 2. See the LICENSE file * at the top of the source tree. *//*! \file * * \brief Bison Grammar description of AEL2. * */#include "asterisk.h"ASTERISK_FILE_VERSION(__FILE__, "$Revision: 49020 $")#include <stdio.h>#include <stdlib.h>#include <string.h>#include "asterisk/logger.h"#include "asterisk/ael_structs.h"static pval * linku1(pval *head, pval *tail);static void set_dads(pval *dad, pval *child_list);void reset_parencount(yyscan_t yyscanner);void reset_semicount(yyscan_t yyscanner);void reset_argcount(yyscan_t yyscanner );#define YYLEX_PARAM ((struct parse_io *)parseio)->scanner#define YYERROR_VERBOSE 1extern char *my_file;#ifdef AAL_ARGCHECKint ael_is_funcname(char *name);#endifstatic char *ael_token_subst(char *mess);/* 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 1#endif/* Enabling the token table. */#ifndef YYTOKEN_TABLE# define YYTOKEN_TABLE 0#endif#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLAREDtypedef union YYSTYPE#line 54 "ael.y"{ int intval; /* integer value, typically flags */ char *str; /* strings */ struct pval *pval; /* full objects */}/* Line 193 of yacc.c. */#line 244 "ael.tab.c" YYSTYPE;# define yystype YYSTYPE /* obsolescent; will be withdrawn */# define YYSTYPE_IS_DECLARED 1# define YYSTYPE_IS_TRIVIAL 1#endif#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLAREDtypedef struct YYLTYPE{ int first_line; int first_column; int last_line; int last_column;} YYLTYPE;# define yyltype YYLTYPE /* obsolescent; will be withdrawn */# define YYLTYPE_IS_DECLARED 1# define YYLTYPE_IS_TRIVIAL 1#endif/* Copy the second part of user declarations. */#line 60 "ael.y" /* declaring these AFTER the union makes things a lot simpler! */void yyerror(YYLTYPE *locp, struct parse_io *parseio, char const *s);int ael_yylex (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , void * yyscanner);/* create a new object with start-end marker */static pval *npval(pvaltype type, int first_line, int last_line, int first_column, int last_column);/* create a new object with start-end marker, simplified interface. * Must be declared here because YYLTYPE is not known before */static pval *npval2(pvaltype type, YYLTYPE *first, YYLTYPE *last);/* another frontend for npval, this time for a string */static pval *nword(char *string, YYLTYPE *pos);/* update end position of an object, return the object */static pval *update_last(pval *, YYLTYPE *);/* Line 216 of yacc.c. */#line 289 "ael.tab.c"#ifdef short# undef short#endif#ifdef YYTYPE_UINT8typedef YYTYPE_UINT8 yytype_uint8;#elsetypedef unsigned char yytype_uint8;#endif#ifdef YYTYPE_INT8typedef YYTYPE_INT8 yytype_int8;#elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER)typedef signed char yytype_int8;#elsetypedef short int yytype_int8;#endif#ifdef YYTYPE_UINT16typedef YYTYPE_UINT16 yytype_uint16;#elsetypedef unsigned short int yytype_uint16;#endif#ifdef YYTYPE_INT16typedef YYTYPE_INT16 yytype_int16;#elsetypedef short int yytype_int16;#endif#ifndef YYSIZE_T# ifdef __SIZE_TYPE__# define YYSIZE_T __SIZE_TYPE__# elif defined size_t# define YYSIZE_T size_t# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER)# include <stddef.h> /* INFRINGES ON USER NAME SPACE */# define YYSIZE_T size_t# else# define YYSIZE_T unsigned int# endif#endif#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)#ifndef YY_# if YYENABLE_NLS# if ENABLE_NLS# include <libintl.h> /* INFRINGES ON USER NAME SPACE */# define YY_(msgid) dgettext ("bison-runtime", msgid)# endif# endif# ifndef YY_# define YY_(msgid) msgid# endif#endif/* Suppress unused-variable warnings by "using" E. */#if ! defined lint || defined __GNUC__# define YYUSE(e) ((void) (e))#else# define YYUSE(e) /* empty */#endif/* Identity function, used to suppress warnings about constant conditions. */#ifndef lint# define YYID(n) (n)#else#if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER)static intYYID (int i)#elsestatic intYYID (i) int i;#endif{ return i;}#endif#if ! defined yyoverflow || YYERROR_VERBOSE/* 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# elif defined __BUILTIN_VA_ARG_INCR# include <alloca.h> /* INFRINGES ON USER NAME SPACE */# elif defined _AIX# define YYSTACK_ALLOC __alloca# elif defined _MSC_VER# include <malloc.h> /* INFRINGES ON USER NAME SPACE */# define alloca _alloca# else# define YYSTACK_ALLOC alloca# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER)# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */# ifndef _STDLIB_H# define _STDLIB_H 1# endif# endif# endif# endif# endif# ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))# ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */# endif# else# define YYSTACK_ALLOC YYMALLOC# define YYSTACK_FREE YYFREE# ifndef YYSTACK_ALLOC_MAXIMUM
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?