📄 yacc.c
字号:
/* A Bison parser, made by GNU Bison 1.875. *//* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 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 { STRING = 258, ID = 259, VERSION_t = 260, NAMES = 261, MODULE = 262, VALUE = 263, INTEGER = 264, FLOAT = 265, STRING_TABLE = 266, INTEGER_TYPE = 267, FLOAT_TYPE = 268, STRING_TYPE = 269, ANY_TYPE = 270, BOOLEAN_TYPE = 271, PROCEDURE = 272, PROCEDURES = 273, IMPORTED = 274, CONTROLS = 275, ARGUMENT = 276, ARGUMENTS = 277, OBJECT = 278, CALLBACK = 279, END = 280, EXPORTED = 281, OBJECTS = 282, CHAR_SET = 283, WIDGET = 284, INC_FILE = 285, LIST = 286, UNMANAGED = 287, KEYSYM = 288, ICON = 289, COMPOUND_STRING = 290, SEPARATE = 291, BOOL = 292, GADGET = 293, PRIVATE = 294, REASON = 295, USER_DEFINED = 296, RGB = 297, COLOR = 298, COLOR_TABLE = 299, XBITMAPFILE = 300, XPIXMAPFILE = 301, FONT = 302, FONT_TABLE = 303, FONT_UNIT = 304, BACKGROUND_COLOR = 305, FOREGROUND_COLOR = 306, RIGHT_TO_LEFT = 307, SIXTEEN_BIT = 308 };#endif#define STRING 258#define ID 259#define VERSION_t 260#define NAMES 261#define MODULE 262#define VALUE 263#define INTEGER 264#define FLOAT 265#define STRING_TABLE 266#define INTEGER_TYPE 267#define FLOAT_TYPE 268#define STRING_TYPE 269#define ANY_TYPE 270#define BOOLEAN_TYPE 271#define PROCEDURE 272#define PROCEDURES 273#define IMPORTED 274#define CONTROLS 275#define ARGUMENT 276#define ARGUMENTS 277#define OBJECT 278#define CALLBACK 279#define END 280#define EXPORTED 281#define OBJECTS 282#define CHAR_SET 283#define WIDGET 284#define INC_FILE 285#define LIST 286#define UNMANAGED 287#define KEYSYM 288#define ICON 289#define COMPOUND_STRING 290#define SEPARATE 291#define BOOL 292#define GADGET 293#define PRIVATE 294#define REASON 295#define USER_DEFINED 296#define RGB 297#define COLOR 298#define COLOR_TABLE 299#define XBITMAPFILE 300#define XPIXMAPFILE 301#define FONT 302#define FONT_TABLE 303#define FONT_UNIT 304#define BACKGROUND_COLOR 305#define FOREGROUND_COLOR 306#define RIGHT_TO_LEFT 307#define SIXTEEN_BIT 308/* Copy the first part of user declarations. */#line 1 "yacc.y"/** * * $Id: yacc.y,v 1.1 2004/08/28 19:28:18 dannybackx Exp $ * * Copyright (C) 1995 Free Software Foundation, Inc. * Copyright (C) 1995-2001 LessTif Development Team * * This file is part of the GNU LessTif Library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * * Original author: Geoffrey W. Ritchey * codesmit@southwind.net **/ #include <LTconfig.h>#include <stdlib.h>#include <stdio.h>#include <stdarg.h>#include "uil.h" #include "glue.h"extern int LineNumber;extern char *FileName;#ifdef YYTEXT_POINTERextern char *yytext;#elseextern unsigned char yytext[]; /* Unsigned needed on HP/UX */#endifextern int yylex(void);/* For the prototype police. GNU bison up to 1.28 doesn't allow us to use the const qualifier here. Shame on it ... */ void yyerror(char *s);void yyExit(int line, char *file, char *fmt, ...);static int False = 0;static int True = 1;#define YYDEBUG 1int yydebug = 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 197 "yacc.y"typedef union YYSTYPE { char *string;} YYSTYPE;/* Line 191 of yacc.c. */#line 250 "yacc.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 262 "yacc.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 4/* YYLAST -- Last index in YYTABLE. */#define YYLAST 460/* YYNTOKENS -- Number of terminals. */#define YYNTOKENS 68/* YYNNTS -- Number of nonterminals. */#define YYNNTS 30/* YYNRULES -- Number of rules. */#define YYNRULES 136/* YYNRULES -- Number of states. */#define YYNSTATES 385/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */#define YYUNDEFTOK 2#define YYMAXUTOK 308#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, 67, 2, 2, 64, 2, 59, 60, 65, 63, 61, 62, 2, 66, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 58, 54, 2, 55, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 56, 2, 57, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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, 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};#if YYDEBUG/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */static const unsigned short yyprhs[] ={ 0, 0, 3, 11, 12, 16, 20, 24, 28, 29, 34, 39, 44, 50, 51, 57, 63, 64, 70, 78, 87, 96, 108, 117, 124, 131, 132, 138, 142, 144, 150, 156, 162, 163, 169, 173, 177, 183, 187, 193, 202, 209, 213, 217, 219, 221, 228, 232, 238, 244, 247, 252, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 283, 292, 301, 302, 308, 309, 316, 325, 335, 345, 356, 357, 360, 363, 366, 367, 373, 377, 382, 389, 397, 405, 414, 420, 425, 430, 431, 437, 443, 450, 455, 456, 458, 462, 466, 470, 472, 476, 480, 482, 485, 487, 491, 493, 495, 500, 505, 510, 515, 520, 529, 534, 543, 548, 555, 557, 561, 570, 579, 584, 589, 595, 599, 609, 618, 619, 626, 627, 631, 635, 639, 641, 643, 645, 647};/* YYRHS -- A `-1'-separated list of the rules' RHS. */static const yysigned_char yyrhs[] ={ 69, 0, -1, 7, 4, 71, 70, 25, 7, 54,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -