diff options
Diffstat (limited to 'dcop/dcopidl/yacc.cc')
-rw-r--r-- | dcop/dcopidl/yacc.cc | 1908 |
1 files changed, 1237 insertions, 671 deletions
diff --git a/dcop/dcopidl/yacc.cc b/dcop/dcopidl/yacc.cc index d41fa6dbd..85794118a 100644 --- a/dcop/dcopidl/yacc.cc +++ b/dcop/dcopidl/yacc.cc @@ -1,30 +1,39 @@ -/* A Bison parser, made by GNU Bison 1.875d. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* A Bison parser, made by GNU Bison 2.4.1. */ - This program is free software; you can redistribute it and/or modify +/* 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. - + the Free Software Foundation, either version 3 of the License, 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, 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. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +/* 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 @@ -36,17 +45,116 @@ /* Identify Bison output. */ #define YYBISON 1 +/* Bison version. */ +#define YYBISON_VERSION "2.4.1" + /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + /* Using locations. */ #define YYLSP_NEEDED 0 +/* Copy the first part of user declarations. */ + +/* Line 189 of yacc.c */ +#line 1 "yacc.yy" + +/***************************************************************** +Copyright (c) 1999 Torben Weis <weis@kde.org> +Copyright (c) 2000 Matthias Ettrich <ettrich@kde.org> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +******************************************************************/ + +#include <config.h> + +// Workaround for a bison issue: +// bison.simple concludes from _GNU_SOURCE that stpcpy is available, +// while GNU string.h only exposes it if __USE_GNU is set. +#ifdef _GNU_SOURCE +#define __USE_GNU 1 +#endif + +#include <stdlib.h> +#include <stdio.h> +#include <assert.h> + +#include <qstring.h> + +#define AMP_ENTITY "&" +#define YYERROR_VERBOSE + +extern int yylex(); + +// extern QString idl_lexFile; +extern int idl_line_no; +extern int function_mode; + +static int dcop_area = 0; +static int dcop_signal_area = 0; + +static QString in_namespace( "" ); + +void dcopidlInitFlex( const char *_code ); + +void yyerror( const char *s ) +{ + qDebug( "In line %i : %s", idl_line_no, s ); + exit(1); + // theParser->parse_error( idl_lexFile, s, idl_line_no ); +} + + + +/* Line 189 of yacc.c */ +#line 138 "yacc.cc" + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 1 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + + /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -119,225 +227,202 @@ T_SHIFT = 321 }; #endif -#define T_UNIMPORTANT 258 -#define T_CHARACTER_LITERAL 259 -#define T_DOUBLE_LITERAL 260 -#define T_IDENTIFIER 261 -#define T_INTEGER_LITERAL 262 -#define T_STRING_LITERAL 263 -#define T_INCLUDE 264 -#define T_CLASS 265 -#define T_STRUCT 266 -#define T_LEFT_CURLY_BRACKET 267 -#define T_LEFT_PARANTHESIS 268 -#define T_RIGHT_CURLY_BRACKET 269 -#define T_RIGHT_PARANTHESIS 270 -#define T_COLON 271 -#define T_SEMICOLON 272 -#define T_PUBLIC 273 -#define T_PROTECTED 274 -#define T_TRIPE_DOT 275 -#define T_PRIVATE 276 -#define T_VIRTUAL 277 -#define T_CONST 278 -#define T_INLINE 279 -#define T_FRIEND 280 -#define T_RETURN 281 -#define T_SIGNAL 282 -#define T_SLOT 283 -#define T_TYPEDEF 284 -#define T_PLUS 285 -#define T_MINUS 286 -#define T_COMMA 287 -#define T_ASTERISK 288 -#define T_TILDE 289 -#define T_LESS 290 -#define T_GREATER 291 -#define T_AMPERSAND 292 -#define T_EXTERN 293 -#define T_EXTERN_C 294 -#define T_ACCESS 295 -#define T_ENUM 296 -#define T_NAMESPACE 297 -#define T_USING 298 -#define T_UNKNOWN 299 -#define T_TRIPLE_DOT 300 -#define T_TRUE 301 -#define T_FALSE 302 -#define T_STATIC 303 -#define T_MUTABLE 304 -#define T_EQUAL 305 -#define T_SCOPE 306 -#define T_NULL 307 -#define T_INT 308 -#define T_ARRAY_OPEN 309 -#define T_ARRAY_CLOSE 310 -#define T_CHAR 311 -#define T_DCOP 312 -#define T_DCOP_AREA 313 -#define T_DCOP_SIGNAL_AREA 314 -#define T_SIGNED 315 -#define T_UNSIGNED 316 -#define T_LONG 317 -#define T_SHORT 318 -#define T_FUNOPERATOR 319 -#define T_MISCOPERATOR 320 -#define T_SHIFT 321 - - -/* Copy the first part of user declarations. */ -#line 1 "yacc.yy" -/***************************************************************** -Copyright (c) 1999 Torben Weis <weis@kde.org> -Copyright (c) 2000 Matthias Ettrich <ettrich@kde.org> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +/* Line 214 of yacc.c */ +#line 67 "yacc.yy" -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + long _int; + QString *_str; + unsigned short _char; + double _float; -******************************************************************/ -#include <config.h> -// Workaround for a bison issue: -// bison.simple concludes from _GNU_SOURCE that stpcpy is available, -// while GNU string.h only exposes it if __USE_GNU is set. -#ifdef _GNU_SOURCE -#define __USE_GNU 1 +/* Line 214 of yacc.c */ +#line 249 "yacc.cc" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 #endif -#include <stdlib.h> -#include <stdio.h> -#include <assert.h> - -#include <tqstring.h> - -#define AMP_ENTITY "&" -#define YYERROR_VERBOSE - -extern int yylex(); -// extern TQString idl_lexFile; -extern int idl_line_no; -extern int function_mode; - -static int dcop_area = 0; -static int dcop_signal_area = 0; - -static TQString in_namespace( "" ); - -void dcopidlInitFlex( const char *_code ); +/* Copy the second part of user declarations. */ -void yyerror( const char *s ) -{ - qDebug( "In line %i : %s", idl_line_no, s ); - exit(1); - // theParser->parse_error( idl_lexFile, s, idl_line_no ); -} +/* Line 264 of yacc.c */ +#line 261 "yacc.cc" +#ifdef short +# undef short +#endif -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 1 +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; #endif -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; #else -# define YYERROR_VERBOSE 0 +typedef short int yytype_int8; #endif -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 67 "yacc.yy" -typedef union YYSTYPE { - long _int; - TQString *_str; - unsigned short _char; - double _float; -} YYSTYPE; -/* Line 191 of yacc.c. */ -#line 279 "yacc.cc" -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; #endif +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef 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 -/* Copy the second part of user declarations. */ +#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 -/* Line 214 of yacc.c. */ -#line 291 "yacc.cc" +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif -#if ! defined (yyoverflow) || YYERROR_VERBOSE +/* 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 int +YYID (int yyi) +#else +static int +YYID (yyi) + int yyi; +#endif +{ + return yyi; +} +#endif -# ifndef YYFREE -# define YYFREE free -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# endif +#if ! defined yyoverflow || YYERROR_VERBOSE /* 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 +# 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 (0) -# else -# if defined (__STDC__) || defined (__cplusplus) -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t + /* 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 +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif # endif -#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ -#if (! defined (yyoverflow) \ - && (! defined (__cplusplus) \ - || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) +#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; - }; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -345,24 +430,24 @@ union yyalloc /* 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)) \ + ((N) * (sizeof (yytype_int16) + 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__ +# 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; \ + YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ - while (0) + while (YYID (0)) # endif # endif @@ -371,48 +456,42 @@ union yyalloc 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) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ - while (0) + while (YYID (0)) #endif -#if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; -#else - typedef short int yysigned_char; -#endif - -/* YYFINAL -- State number of the termination state. */ +/* YYFINAL -- State number of the termination state. */ #define YYFINAL 5 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 559 -/* YYNTOKENS -- Number of terminals. */ +/* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 67 -/* YYNNTS -- Number of nonterminals. */ +/* YYNNTS -- Number of nonterminals. */ #define YYNNTS 53 -/* YYNRULES -- Number of rules. */ +/* YYNRULES -- Number of rules. */ #define YYNRULES 185 -/* YYNRULES -- Number of states. */ +/* YYNRULES -- Number of states. */ #define YYNSTATES 374 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 321 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char yytranslate[] = +static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -452,7 +531,7 @@ static const unsigned char yytranslate[] = #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ -static const unsigned short int yyprhs[] = +static const yytype_uint16 yyprhs[] = { 0, 0, 3, 7, 8, 11, 16, 17, 19, 20, 27, 35, 39, 43, 49, 50, 58, 63, 69, 72, @@ -475,8 +554,8 @@ static const unsigned short int yyprhs[] = 611, 615, 621, 627, 633, 640 }; -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yysigned_char yyrhs[] = +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = { 68, 0, -1, 69, 71, 68, -1, -1, 69, 9, -1, 39, 12, 68, 14, -1, -1, 57, -1, -1, @@ -546,7 +625,7 @@ static const yysigned_char yyrhs[] = }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short int yyrline[] = +static const yytype_uint16 yyrline[] = { 0, 164, 164, 167, 171, 175, 179, 184, 185, 189, 198, 207, 210, 213, 217, 216, 228, 231, 234, 237, @@ -570,9 +649,9 @@ static const unsigned short int yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE -/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[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", "T_UNIMPORTANT", "T_CHARACTER_LITERAL", @@ -589,7 +668,7 @@ static const char *const yytname[] = "T_NULL", "T_INT", "T_ARRAY_OPEN", "T_ARRAY_CLOSE", "T_CHAR", "T_DCOP", "T_DCOP_AREA", "T_DCOP_SIGNAL_AREA", "T_SIGNED", "T_UNSIGNED", "T_LONG", "T_SHORT", "T_FUNOPERATOR", "T_MISCOPERATOR", "T_SHIFT", "$accept", - "main", "includes", "dcoptag", "declaration", "@1", "member_list", + "main", "includes", "dcoptag", "declaration", "$@1", "member_list", "bool_value", "nodcop_area", "sigslot", "nodcop_area_begin", "dcop_area_begin", "dcop_signal_area_begin", "Identifier", "super_class_name", "super_class", "super_classes", "class_header", @@ -607,7 +686,7 @@ static const char *const yytname[] = # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ -static const unsigned short int yytoknum[] = +static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, @@ -620,7 +699,7 @@ static const unsigned short int yytoknum[] = # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = +static const yytype_uint8 yyr1[] = { 0, 67, 68, 68, 69, 69, 69, 70, 70, 71, 71, 71, 71, 71, 72, 71, 71, 71, 71, 71, @@ -644,7 +723,7 @@ static const unsigned char yyr1[] = }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char yyr2[] = +static const yytype_uint8 yyr2[] = { 0, 2, 3, 0, 2, 4, 0, 1, 0, 6, 7, 3, 3, 5, 0, 7, 4, 5, 2, 4, @@ -670,7 +749,7 @@ static const unsigned char yyr2[] = /* 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[] = +static const yytype_uint8 yydefact[] = { 6, 0, 0, 145, 6, 1, 40, 4, 0, 0, 146, 0, 145, 0, 0, 0, 0, 0, 0, 0, @@ -712,8 +791,8 @@ static const unsigned char yydefact[] = 85, 155, 0, 86 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const short int yydefgoto[] = +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = { -1, 2, 3, 156, 26, 192, 183, 214, 171, 172, 173, 174, 175, 27, 151, 152, 153, 94, 343, 176, @@ -726,7 +805,7 @@ static const short int yydefgoto[] = /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -191 -static const short int yypact[] = +static const yytype_int16 yypact[] = { 28, 78, 99, 342, 80, -191, 67, -191, 115, 159, 205, 81, 386, 463, 153, 44, 190, 32, 205, 205, @@ -769,7 +848,7 @@ static const short int yypact[] = }; /* YYPGOTO[NTERM-NUM]. */ -static const short int yypgoto[] = +static const yytype_int16 yypgoto[] = { -191, 9, -191, 314, -191, -191, -2, -191, -191, 301, -191, -191, -191, -8, 238, -191, 243, -33, -191, 77, @@ -784,7 +863,7 @@ static const short int yypgoto[] = number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -177 -static const short int yytable[] = +static const yytype_int16 yytable[] = { 39, 40, 43, 43, 101, 43, 218, 96, 35, 34, 43, 43, 46, 36, 154, 222, 188, 115, 48, 198, @@ -844,7 +923,7 @@ static const short int yytable[] = 0, 0, 0, 211, 212, 0, 0, 0, 0, 213 }; -static const short int yycheck[] = +static const yytype_int16 yycheck[] = { 8, 9, 10, 11, 45, 13, 130, 40, 3, 3, 18, 19, 11, 4, 92, 138, 107, 58, 12, 116, @@ -906,7 +985,7 @@ static const short int yycheck[] = /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const unsigned char yystos[] = +static const yytype_uint8 yystos[] = { 0, 39, 68, 69, 12, 0, 6, 9, 10, 11, 22, 23, 24, 29, 38, 41, 42, 43, 48, 49, @@ -948,22 +1027,6 @@ static const unsigned char yystos[] = 17, 108, 80, 17 }; -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# if defined (__STDC__) || defined (__cplusplus) -# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif - #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) @@ -989,30 +1052,63 @@ do \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ + YYPOPSTACK (1); \ goto yybackup; \ } \ else \ - { \ - yyerror ("syntax error: cannot back up");\ + { \ + yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ -while (0) +while (YYID (0)) + #define YYTERROR 1 #define YYERRCODE 256 -/* YYLLOC_DEFAULT -- Compute the default location (before the actions - are run). */ +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - ((Current).first_line = (Rhs)[1].first_line, \ - (Current).first_column = (Rhs)[1].first_column, \ - (Current).last_line = (Rhs)[N].last_line, \ - (Current).last_column = (Rhs)[N].last_column) +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif #endif + /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM @@ -1033,43 +1129,100 @@ while (0) do { \ if (yydebug) \ YYFPRINTF Args; \ -} while (0) +} while (YYID (0)) -# define YYDSYMPRINT(Args) \ -do { \ - if (yydebug) \ - yysymprint Args; \ -} while (0) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) -# define YYDSYMPRINTF(Title, Token, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Token, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (short int *bottom, short int *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - short int *bottom; - short int *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -1077,45 +1230,52 @@ yy_stack_print (bottom, top) do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ -} while (0) +} while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (int yyrule) +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void -yy_reduce_print (yyrule) +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; int yyrule; #endif { + int yynrhs = yyr2[yyrule]; int yyi; - unsigned int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", - yyrule - 1, yylno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + YYFPRINTF (stderr, "\n"); + } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ - yy_reduce_print (Rule); \ -} while (0) + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) -# define YYDSYMPRINT(Args) -# define YYDSYMPRINTF(Title, Token, Value, Location) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -1130,13 +1290,9 @@ int yydebug; if the built-in stack extension method is used). Do not make this value too large; the results are undefined if - SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ -#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 -# undef YYMAXDEPTH -#endif - #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif @@ -1146,45 +1302,47 @@ int yydebug; #if YYERROR_VERBOSE # ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) +# if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static YYSIZE_T -# if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) -# else +#else +static YYSIZE_T yystrlen (yystr) - const char *yystr; -# endif + const char *yystr; +#endif { - register const char *yys = yystr; - - while (*yys++ != '\0') + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) continue; - - return yys - yystr - 1; + return yylen; } # endif # endif # ifndef yystpcpy -# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static char * -# if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) -# else +#else +static char * yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif + char *yydest; + const char *yysrc; +#endif { - register char *yyd = yydest; - register const char *yys = yysrc; + char *yyd = yydest; + const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; @@ -1194,84 +1352,204 @@ yystpcpy (yydest, yysrc) # endif # endif -#endif /* !YYERROR_VERBOSE */ +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } - + if (! yyres) + return yystrlen (yystr); -#if YYDEBUG -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ + return yystpcpy (yyres, yystr) - yyres; +} +# endif -#if defined (__STDC__) || defined (__cplusplus) -static void -yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) -#else -static void -yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; -#endif +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; + int yyn = yypact[yystate]; - if (yytype < YYNTOKENS) - { - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); -# ifdef YYPRINT - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - } + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - switch (yytype) { - default: - break; + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; } - YYFPRINTF (yyoutput, ")"); } +#endif /* YYERROR_VERBOSE */ + -#endif /* ! YYDEBUG */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yydestruct (int yytype, YYSTYPE *yyvaluep) +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void -yydestruct (yytype, yyvaluep) +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: - break; + break; } } - /* Prevent warnings from -Wmissing-prototypes. */ - #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) +#if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); -# else +#else int yyparse (); -# endif +#endif #else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) +#if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); @@ -1279,7 +1557,6 @@ int yyparse (); #endif /* ! YYPARSE_PARAM */ - /* The lookahead symbol. */ int yychar; @@ -1291,19 +1568,23 @@ int yynerrs; -/*----------. -| yyparse. | -`----------*/ +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM) -# else -int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -# endif +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif #else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else @@ -1313,64 +1594,71 @@ yyparse () #endif #endif { - - register int yystate; - register int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - /* The state stack. */ - short int yyssa[YYINITDEPTH]; - short int *yyss = yyssa; - register short int *yyssp; + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - register YYSTYPE *yyvsp; + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; -#define YYPOPSTACK (yyvsp--, yyssp--) + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; - YYSIZE_T yystacksize = YYINITDEPTH; + YYSIZE_T yystacksize; + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ - int yylen; + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; yyvsp = yyvs; - goto yysetstate; /*------------------------------------------------------------. @@ -1378,8 +1666,7 @@ yyparse () `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. - */ + have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: @@ -1392,21 +1679,19 @@ yyparse () #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of + /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; - short int *yyss1 = yyss; - + yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ - yyoverflow ("parser stack overflow", + yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); yyss = yyss1; @@ -1414,24 +1699,23 @@ yyparse () } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE - goto yyoverflowlab; + goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyoverflowlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { - short int *yyss1 = yyss; + yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) - goto yyoverflowlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -1442,7 +1726,6 @@ yyparse () yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -1452,6 +1735,9 @@ yyparse () YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -1459,12 +1745,10 @@ yyparse () `-----------*/ yybackup: -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; @@ -1486,7 +1770,7 @@ yybackup: else { yytoken = YYTRANSLATE (yychar); - YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to @@ -1503,25 +1787,20 @@ yybackup: goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - - /* Shift the lookahead token. */ - YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; - - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + yystate = yyn; + *++yyvsp = yylval; + goto yynewstate; @@ -1557,45 +1836,59 @@ yyreduce: switch (yyn) { case 2: + +/* Line 1455 of yacc.c */ #line 165 "yacc.yy" { ;} break; case 4: + +/* Line 1455 of yacc.c */ #line 172 "yacc.yy" { - printf("<INCLUDE>%s</INCLUDE>\n", yyvsp[0]._str->latin1() ); + printf("<INCLUDE>%s</INCLUDE>\n", (yyvsp[(2) - (2)]._str)->latin1() ); ;} break; case 5: + +/* Line 1455 of yacc.c */ #line 176 "yacc.yy" { ;} break; case 6: + +/* Line 1455 of yacc.c */ #line 179 "yacc.yy" { ;} break; case 7: + +/* Line 1455 of yacc.c */ #line 184 "yacc.yy" - { yyval._int = 1; ;} + { (yyval._int) = 1; ;} break; case 8: + +/* Line 1455 of yacc.c */ #line 185 "yacc.yy" - { yyval._int = 0; ;} + { (yyval._int) = 0; ;} break; case 9: + +/* Line 1455 of yacc.c */ #line 190 "yacc.yy" { - if (yyvsp[-2]._int) - printf("<CLASS>\n <NAME>%s</NAME>\n%s%s</CLASS>\n", ( in_namespace + *yyvsp[-4]._str ).latin1(), yyvsp[-3]._str->latin1(), yyvsp[-1]._str->latin1() ); + if ((yyvsp[(4) - (6)]._int)) + printf("<CLASS>\n <NAME>%s</NAME>\n%s%s</CLASS>\n", ( in_namespace + *(yyvsp[(2) - (6)]._str) ).latin1(), (yyvsp[(3) - (6)]._str)->latin1(), (yyvsp[(5) - (6)]._str)->latin1() ); // default C++ visibility specifier is 'private' dcop_area = 0; dcop_signal_area = 0; @@ -1604,10 +1897,12 @@ yyreduce: break; case 10: + +/* Line 1455 of yacc.c */ #line 199 "yacc.yy" { - if (yyvsp[-2]._int) - printf("<CLASS>\n <NAME>%s</NAME>\n <LINK_SCOPE>%s</LINK_SCOPE>\n%s%s</CLASS>\n", ( in_namespace + *yyvsp[-4]._str ).latin1(),yyvsp[-5]._str->latin1(), yyvsp[-3]._str->latin1(), yyvsp[-1]._str->latin1() ); + if ((yyvsp[(5) - (7)]._int)) + printf("<CLASS>\n <NAME>%s</NAME>\n <LINK_SCOPE>%s</LINK_SCOPE>\n%s%s</CLASS>\n", ( in_namespace + *(yyvsp[(3) - (7)]._str) ).latin1(),(yyvsp[(2) - (7)]._str)->latin1(), (yyvsp[(4) - (7)]._str)->latin1(), (yyvsp[(6) - (7)]._str)->latin1() ); // default C++ visibility specifier is 'private' dcop_area = 0; dcop_signal_area = 0; @@ -1616,31 +1911,41 @@ yyreduce: break; case 11: + +/* Line 1455 of yacc.c */ #line 208 "yacc.yy" { ;} break; case 12: + +/* Line 1455 of yacc.c */ #line 211 "yacc.yy" { ;} break; case 13: + +/* Line 1455 of yacc.c */ #line 214 "yacc.yy" { ;} break; case 14: + +/* Line 1455 of yacc.c */ #line 217 "yacc.yy" { - in_namespace += *yyvsp[-1]._str; in_namespace += "::"; + in_namespace += *(yyvsp[(2) - (3)]._str); in_namespace += "::"; ;} break; case 15: + +/* Line 1455 of yacc.c */ #line 221 "yacc.yy" { int pos = in_namespace.findRev( "::", -3 ); @@ -1652,66 +1957,88 @@ yyreduce: break; case 16: + +/* Line 1455 of yacc.c */ #line 229 "yacc.yy" { ;} break; case 17: + +/* Line 1455 of yacc.c */ #line 232 "yacc.yy" { ;} break; case 18: + +/* Line 1455 of yacc.c */ #line 235 "yacc.yy" { ;} break; case 19: + +/* Line 1455 of yacc.c */ #line 238 "yacc.yy" { ;} break; case 20: + +/* Line 1455 of yacc.c */ #line 241 "yacc.yy" { ;} break; case 21: + +/* Line 1455 of yacc.c */ #line 244 "yacc.yy" { ;} break; case 22: + +/* Line 1455 of yacc.c */ #line 247 "yacc.yy" { ;} break; case 23: + +/* Line 1455 of yacc.c */ #line 250 "yacc.yy" { ;} break; case 24: + +/* Line 1455 of yacc.c */ #line 253 "yacc.yy" { ;} break; case 25: + +/* Line 1455 of yacc.c */ #line 256 "yacc.yy" { ;} break; case 36: + +/* Line 1455 of yacc.c */ #line 273 "yacc.yy" { dcop_area = 0; @@ -1720,6 +2047,8 @@ yyreduce: break; case 37: + +/* Line 1455 of yacc.c */ #line 278 "yacc.yy" { dcop_area = 0; @@ -1728,6 +2057,8 @@ yyreduce: break; case 38: + +/* Line 1455 of yacc.c */ #line 286 "yacc.yy" { dcop_area = 1; @@ -1736,6 +2067,8 @@ yyreduce: break; case 39: + +/* Line 1455 of yacc.c */ #line 294 "yacc.yy" { /* @@ -1748,271 +2081,351 @@ yyreduce: break; case 40: + +/* Line 1455 of yacc.c */ #line 305 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(1) - (1)]._str); ;} break; case 41: + +/* Line 1455 of yacc.c */ #line 308 "yacc.yy" { - TQString* tmp = new TQString( "%1::%2" ); - *tmp = tmp->arg(*(yyvsp[-2]._str)).arg(*(yyvsp[0]._str)); - yyval._str = tmp; + QString* tmp = new QString( "%1::%2" ); + *tmp = tmp->arg(*((yyvsp[(1) - (3)]._str))).arg(*((yyvsp[(3) - (3)]._str))); + (yyval._str) = tmp; ;} break; case 42: + +/* Line 1455 of yacc.c */ #line 317 "yacc.yy" { - TQString* tmp = new TQString( " <SUPER>%1</SUPER>\n" ); - *tmp = tmp->arg( *(yyvsp[0]._str) ); - yyval._str = tmp; + QString* tmp = new QString( " <SUPER>%1</SUPER>\n" ); + *tmp = tmp->arg( *((yyvsp[(1) - (1)]._str)) ); + (yyval._str) = tmp; ;} break; case 43: + +/* Line 1455 of yacc.c */ #line 323 "yacc.yy" { - TQString* tmp = new TQString( " <SUPER>%1</SUPER>\n" ); - *tmp = tmp->arg( *(yyvsp[-3]._str) + "<" + *(yyvsp[-1]._str) + ">" ); - yyval._str = tmp; + QString* tmp = new QString( " <SUPER>%1</SUPER>\n" ); + *tmp = tmp->arg( *((yyvsp[(1) - (4)]._str)) + "<" + *((yyvsp[(3) - (4)]._str)) + ">" ); + (yyval._str) = tmp; ;} break; case 44: + +/* Line 1455 of yacc.c */ #line 332 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(3) - (3)]._str); ;} break; case 45: + +/* Line 1455 of yacc.c */ #line 336 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(1) - (1)]._str); ;} break; case 46: + +/* Line 1455 of yacc.c */ #line 343 "yacc.yy" { - yyval._str = yyvsp[-1]._str; + (yyval._str) = (yyvsp[(1) - (2)]._str); ;} break; case 47: + +/* Line 1455 of yacc.c */ #line 347 "yacc.yy" { /* $$ = $1; */ - yyval._str = new TQString( *(yyvsp[-2]._str) + *(yyvsp[0]._str) ); + (yyval._str) = new QString( *((yyvsp[(1) - (3)]._str)) + *((yyvsp[(3) - (3)]._str)) ); ;} break; case 48: + +/* Line 1455 of yacc.c */ #line 355 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(2) - (2)]._str); ;} break; case 49: + +/* Line 1455 of yacc.c */ #line 359 "yacc.yy" { - yyval._str = new TQString( "" ); + (yyval._str) = new QString( "" ); ;} break; case 50: + +/* Line 1455 of yacc.c */ #line 366 "yacc.yy" { ;} break; case 52: + +/* Line 1455 of yacc.c */ #line 373 "yacc.yy" { - yyval._str = new TQString( "" ); + (yyval._str) = new QString( "" ); ;} break; case 53: + +/* Line 1455 of yacc.c */ #line 377 "yacc.yy" { - yyval._str = new TQString( *(yyvsp[-1]._str) + *(yyvsp[0]._str) ); + (yyval._str) = new QString( *((yyvsp[(1) - (2)]._str)) + *((yyvsp[(2) - (2)]._str)) ); ;} break; case 54: + +/* Line 1455 of yacc.c */ #line 381 "yacc.yy" { - yyval._str = new TQString( *(yyvsp[-1]._str) + *(yyvsp[0]._str) ); + (yyval._str) = new QString( *((yyvsp[(2) - (3)]._str)) + *((yyvsp[(3) - (3)]._str)) ); ;} break; case 55: + +/* Line 1455 of yacc.c */ #line 385 "yacc.yy" { - yyval._str = new TQString( *(yyvsp[-1]._str) + *(yyvsp[0]._str) ); + (yyval._str) = new QString( *((yyvsp[(1) - (2)]._str)) + *((yyvsp[(2) - (2)]._str)) ); ;} break; case 56: + +/* Line 1455 of yacc.c */ #line 389 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(2) - (2)]._str); ;} break; case 57: + +/* Line 1455 of yacc.c */ #line 393 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(2) - (2)]._str); ;} break; case 58: + +/* Line 1455 of yacc.c */ #line 397 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(2) - (2)]._str); ;} break; case 59: + +/* Line 1455 of yacc.c */ #line 401 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(2) - (2)]._str); ;} break; case 60: + +/* Line 1455 of yacc.c */ #line 405 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(2) - (2)]._str); ;} break; case 61: + +/* Line 1455 of yacc.c */ #line 409 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(5) - (5)]._str); ;} break; case 62: + +/* Line 1455 of yacc.c */ #line 413 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(4) - (4)]._str); ;} break; case 63: + +/* Line 1455 of yacc.c */ #line 417 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(4) - (4)]._str); ;} break; case 64: + +/* Line 1455 of yacc.c */ #line 421 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(4) - (4)]._str); ;} break; case 65: + +/* Line 1455 of yacc.c */ #line 425 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(6) - (6)]._str); ;} break; case 66: + +/* Line 1455 of yacc.c */ #line 429 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(4) - (4)]._str); ;} break; case 67: + +/* Line 1455 of yacc.c */ #line 433 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(6) - (6)]._str); ;} break; case 68: + +/* Line 1455 of yacc.c */ #line 437 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(6) - (6)]._str); ;} break; case 75: + +/* Line 1455 of yacc.c */ #line 455 "yacc.yy" {;} break; case 76: + +/* Line 1455 of yacc.c */ #line 456 "yacc.yy" {;} break; case 77: + +/* Line 1455 of yacc.c */ #line 460 "yacc.yy" {;} break; case 78: + +/* Line 1455 of yacc.c */ #line 461 "yacc.yy" {;} break; case 79: + +/* Line 1455 of yacc.c */ #line 462 "yacc.yy" {;} break; case 80: + +/* Line 1455 of yacc.c */ #line 463 "yacc.yy" {;} break; case 81: + +/* Line 1455 of yacc.c */ #line 464 "yacc.yy" {;} break; case 82: + +/* Line 1455 of yacc.c */ #line 468 "yacc.yy" {;} break; case 83: + +/* Line 1455 of yacc.c */ #line 469 "yacc.yy" {;} break; case 84: + +/* Line 1455 of yacc.c */ #line 470 "yacc.yy" {;} break; case 85: + +/* Line 1455 of yacc.c */ #line 475 "yacc.yy" { if (dcop_area) { - TQString* tmp = new TQString("<TYPEDEF name=\"%1\" template=\"%2\"><PARAM %3</TYPEDEF>\n"); - *tmp = tmp->arg( *(yyvsp[-1]._str) ).arg( *(yyvsp[-5]._str) ).arg( *(yyvsp[-3]._str) ); - yyval._str = tmp; + QString* tmp = new QString("<TYPEDEF name=\"%1\" template=\"%2\"><PARAM %3</TYPEDEF>\n"); + *tmp = tmp->arg( *((yyvsp[(6) - (7)]._str)) ).arg( *((yyvsp[(2) - (7)]._str)) ).arg( *((yyvsp[(4) - (7)]._str)) ); + (yyval._str) = tmp; } else { - yyval._str = new TQString(""); + (yyval._str) = new QString(""); } ;} break; case 86: + +/* Line 1455 of yacc.c */ #line 485 "yacc.yy" { if (dcop_area) @@ -2021,184 +2434,248 @@ yyreduce: break; case 87: + +/* Line 1455 of yacc.c */ #line 493 "yacc.yy" { - yyval._int = 0; + (yyval._int) = 0; ;} break; case 88: + +/* Line 1455 of yacc.c */ #line 497 "yacc.yy" { - yyval._int = 1; + (yyval._int) = 1; ;} break; case 89: + +/* Line 1455 of yacc.c */ #line 503 "yacc.yy" - { yyval._str = new TQString("signed int"); ;} + { (yyval._str) = new QString("signed int"); ;} break; case 90: + +/* Line 1455 of yacc.c */ #line 504 "yacc.yy" - { yyval._str = new TQString("signed int"); ;} + { (yyval._str) = new QString("signed int"); ;} break; case 91: + +/* Line 1455 of yacc.c */ #line 505 "yacc.yy" - { yyval._str = new TQString("unsigned int"); ;} + { (yyval._str) = new QString("unsigned int"); ;} break; case 92: + +/* Line 1455 of yacc.c */ #line 506 "yacc.yy" - { yyval._str = new TQString("unsigned int"); ;} + { (yyval._str) = new QString("unsigned int"); ;} break; case 93: + +/* Line 1455 of yacc.c */ #line 507 "yacc.yy" - { yyval._str = new TQString("signed short int"); ;} + { (yyval._str) = new QString("signed short int"); ;} break; case 94: + +/* Line 1455 of yacc.c */ #line 508 "yacc.yy" - { yyval._str = new TQString("signed short int"); ;} + { (yyval._str) = new QString("signed short int"); ;} break; case 95: + +/* Line 1455 of yacc.c */ #line 509 "yacc.yy" - { yyval._str = new TQString("signed long int"); ;} + { (yyval._str) = new QString("signed long int"); ;} break; case 96: + +/* Line 1455 of yacc.c */ #line 510 "yacc.yy" - { yyval._str = new TQString("signed long int"); ;} + { (yyval._str) = new QString("signed long int"); ;} break; case 97: + +/* Line 1455 of yacc.c */ #line 511 "yacc.yy" - { yyval._str = new TQString("unsigned short int"); ;} + { (yyval._str) = new QString("unsigned short int"); ;} break; case 98: + +/* Line 1455 of yacc.c */ #line 512 "yacc.yy" - { yyval._str = new TQString("unsigned short int"); ;} + { (yyval._str) = new QString("unsigned short int"); ;} break; case 99: + +/* Line 1455 of yacc.c */ #line 513 "yacc.yy" - { yyval._str = new TQString("unsigned long int"); ;} + { (yyval._str) = new QString("unsigned long int"); ;} break; case 100: + +/* Line 1455 of yacc.c */ #line 514 "yacc.yy" - { yyval._str = new TQString("unsigned long int"); ;} + { (yyval._str) = new QString("unsigned long int"); ;} break; case 101: + +/* Line 1455 of yacc.c */ #line 515 "yacc.yy" - { yyval._str = new TQString("int"); ;} + { (yyval._str) = new QString("int"); ;} break; case 102: + +/* Line 1455 of yacc.c */ #line 516 "yacc.yy" - { yyval._str = new TQString("long int"); ;} + { (yyval._str) = new QString("long int"); ;} break; case 103: + +/* Line 1455 of yacc.c */ #line 517 "yacc.yy" - { yyval._str = new TQString("long int"); ;} + { (yyval._str) = new QString("long int"); ;} break; case 104: + +/* Line 1455 of yacc.c */ #line 518 "yacc.yy" - { yyval._str = new TQString("short int"); ;} + { (yyval._str) = new QString("short int"); ;} break; case 105: + +/* Line 1455 of yacc.c */ #line 519 "yacc.yy" - { yyval._str = new TQString("short int"); ;} + { (yyval._str) = new QString("short int"); ;} break; case 106: + +/* Line 1455 of yacc.c */ #line 520 "yacc.yy" - { yyval._str = new TQString("char"); ;} + { (yyval._str) = new QString("char"); ;} break; case 107: + +/* Line 1455 of yacc.c */ #line 521 "yacc.yy" - { yyval._str = new TQString("signed char"); ;} + { (yyval._str) = new QString("signed char"); ;} break; case 108: + +/* Line 1455 of yacc.c */ #line 522 "yacc.yy" - { yyval._str = new TQString("unsigned char"); ;} + { (yyval._str) = new QString("unsigned char"); ;} break; case 111: + +/* Line 1455 of yacc.c */ #line 532 "yacc.yy" { - yyval._str = new TQString( "" ); + (yyval._str) = new QString( "" ); ;} break; case 113: + +/* Line 1455 of yacc.c */ #line 537 "yacc.yy" { - yyval._str = new TQString( *(yyvsp[-2]._str) + *(yyvsp[0]._str) ); + (yyval._str) = new QString( *((yyvsp[(1) - (3)]._str)) + *((yyvsp[(3) - (3)]._str)) ); ;} break; case 115: + +/* Line 1455 of yacc.c */ #line 545 "yacc.yy" - { yyval._str = yyvsp[0]._str; ;} + { (yyval._str) = (yyvsp[(1) - (1)]._str); ;} break; case 116: + +/* Line 1455 of yacc.c */ #line 546 "yacc.yy" - { yyval._str = yyvsp[0]._str; ;} + { (yyval._str) = (yyvsp[(2) - (2)]._str); ;} break; case 117: + +/* Line 1455 of yacc.c */ #line 547 "yacc.yy" - { yyval._str = yyvsp[0]._str; ;} + { (yyval._str) = (yyvsp[(2) - (2)]._str); ;} break; case 118: + +/* Line 1455 of yacc.c */ #line 548 "yacc.yy" { - TQString *tmp = new TQString("%1<%2>"); - *tmp = tmp->arg(*(yyvsp[-3]._str)); - *tmp = tmp->arg(*(yyvsp[-1]._str)); - yyval._str = tmp; + QString *tmp = new QString("%1<%2>"); + *tmp = tmp->arg(*((yyvsp[(1) - (4)]._str))); + *tmp = tmp->arg(*((yyvsp[(3) - (4)]._str))); + (yyval._str) = tmp; ;} break; case 119: + +/* Line 1455 of yacc.c */ #line 554 "yacc.yy" { - TQString *tmp = new TQString("%1<%2>::%3"); - *tmp = tmp->arg(*(yyvsp[-5]._str)); - *tmp = tmp->arg(*(yyvsp[-3]._str)); - *tmp = tmp->arg(*(yyvsp[0]._str)); - yyval._str = tmp; + QString *tmp = new QString("%1<%2>::%3"); + *tmp = tmp->arg(*((yyvsp[(1) - (6)]._str))); + *tmp = tmp->arg(*((yyvsp[(3) - (6)]._str))); + *tmp = tmp->arg(*((yyvsp[(6) - (6)]._str))); + (yyval._str) = tmp; ;} break; case 120: + +/* Line 1455 of yacc.c */ #line 566 "yacc.yy" { - yyval._str = new TQString(*(yyvsp[-2]._str) + "," + *(yyvsp[0]._str)); + (yyval._str) = new QString(*((yyvsp[(1) - (3)]._str)) + "," + *((yyvsp[(3) - (3)]._str))); ;} break; case 121: + +/* Line 1455 of yacc.c */ #line 570 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(1) - (1)]._str); ;} break; case 122: + +/* Line 1455 of yacc.c */ #line 578 "yacc.yy" { if (dcop_area) @@ -2207,13 +2684,17 @@ yyreduce: break; case 123: + +/* Line 1455 of yacc.c */ #line 583 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(1) - (1)]._str); ;} break; case 124: + +/* Line 1455 of yacc.c */ #line 592 "yacc.yy" { if (dcop_area) @@ -2222,46 +2703,56 @@ yyreduce: break; case 125: + +/* Line 1455 of yacc.c */ #line 596 "yacc.yy" { if (dcop_area) { - TQString* tmp = new TQString("<TYPE qleft=\"const\" qright=\"" AMP_ENTITY "\">%1</TYPE>"); - *tmp = tmp->arg( *(yyvsp[-1]._str) ); - yyval._str = tmp; + QString* tmp = new QString("<TYPE qleft=\"const\" qright=\"" AMP_ENTITY "\">%1</TYPE>"); + *tmp = tmp->arg( *((yyvsp[(2) - (3)]._str)) ); + (yyval._str) = tmp; } ;} break; case 126: + +/* Line 1455 of yacc.c */ #line 603 "yacc.yy" { - TQString* tmp = new TQString("<TYPE>%1</TYPE>"); - *tmp = tmp->arg( *(yyvsp[0]._str) ); - yyval._str = tmp; + QString* tmp = new QString("<TYPE>%1</TYPE>"); + *tmp = tmp->arg( *((yyvsp[(2) - (2)]._str)) ); + (yyval._str) = tmp; ;} break; case 127: + +/* Line 1455 of yacc.c */ #line 608 "yacc.yy" { - TQString* tmp = new TQString("<TYPE>%1</TYPE>"); - *tmp = tmp->arg( *(yyvsp[-1]._str) ); - yyval._str = tmp; + QString* tmp = new QString("<TYPE>%1</TYPE>"); + *tmp = tmp->arg( *((yyvsp[(1) - (2)]._str)) ); + (yyval._str) = tmp; ;} break; case 128: + +/* Line 1455 of yacc.c */ #line 613 "yacc.yy" { if (dcop_area) { - TQString* tmp = new TQString("<TYPE qleft=\"const\" qright=\"" AMP_ENTITY "\">%1</TYPE>"); - *tmp = tmp->arg( *(yyvsp[-2]._str) ); - yyval._str = tmp; + QString* tmp = new QString("<TYPE qleft=\"const\" qright=\"" AMP_ENTITY "\">%1</TYPE>"); + *tmp = tmp->arg( *((yyvsp[(1) - (3)]._str)) ); + (yyval._str) = tmp; } ;} break; case 129: + +/* Line 1455 of yacc.c */ #line 620 "yacc.yy" { if (dcop_area) @@ -2270,15 +2761,19 @@ yyreduce: break; case 130: + +/* Line 1455 of yacc.c */ #line 625 "yacc.yy" { - TQString* tmp = new TQString("<TYPE>%1</TYPE>"); - *tmp = tmp->arg( *(yyvsp[0]._str) ); - yyval._str = tmp; + QString* tmp = new QString("<TYPE>%1</TYPE>"); + *tmp = tmp->arg( *((yyvsp[(1) - (1)]._str)) ); + (yyval._str) = tmp; ;} break; case 131: + +/* Line 1455 of yacc.c */ #line 631 "yacc.yy" { if (dcop_area) @@ -2287,222 +2782,282 @@ yyreduce: break; case 132: + +/* Line 1455 of yacc.c */ #line 639 "yacc.yy" { - yyval._str = new TQString(*(yyvsp[-2]._str) + "," + *(yyvsp[0]._str)); + (yyval._str) = new QString(*((yyvsp[(1) - (3)]._str)) + "," + *((yyvsp[(3) - (3)]._str))); ;} break; case 133: + +/* Line 1455 of yacc.c */ #line 643 "yacc.yy" { - yyval._str = yyvsp[0]._str; + (yyval._str) = (yyvsp[(1) - (1)]._str); ;} break; case 134: + +/* Line 1455 of yacc.c */ #line 650 "yacc.yy" { if (dcop_area) { - TQString* tmp = new TQString("\n <ARG>%1<NAME>%2</NAME></ARG>"); - *tmp = tmp->arg( *(yyvsp[-2]._str) ); - *tmp = tmp->arg( *(yyvsp[-1]._str) ); - yyval._str = tmp; - } else yyval._str = new TQString(); + QString* tmp = new QString("\n <ARG>%1<NAME>%2</NAME></ARG>"); + *tmp = tmp->arg( *((yyvsp[(1) - (3)]._str)) ); + *tmp = tmp->arg( *((yyvsp[(2) - (3)]._str)) ); + (yyval._str) = tmp; + } else (yyval._str) = new QString(); ;} break; case 135: + +/* Line 1455 of yacc.c */ #line 659 "yacc.yy" { if (dcop_area) { - TQString* tmp = new TQString("\n <ARG>%1</ARG>"); - *tmp = tmp->arg( *(yyvsp[-1]._str) ); - yyval._str = tmp; - } else yyval._str = new TQString(); + QString* tmp = new QString("\n <ARG>%1</ARG>"); + *tmp = tmp->arg( *((yyvsp[(1) - (2)]._str)) ); + (yyval._str) = tmp; + } else (yyval._str) = new QString(); ;} break; case 136: + +/* Line 1455 of yacc.c */ #line 667 "yacc.yy" { if (dcop_area) yyerror("variable arguments not supported in dcop area."); - yyval._str = new TQString(""); + (yyval._str) = new QString(""); ;} break; case 137: + +/* Line 1455 of yacc.c */ #line 676 "yacc.yy" { ;} break; case 138: + +/* Line 1455 of yacc.c */ #line 679 "yacc.yy" { ;} break; case 139: + +/* Line 1455 of yacc.c */ #line 682 "yacc.yy" { ;} break; case 140: + +/* Line 1455 of yacc.c */ #line 689 "yacc.yy" { ;} break; case 141: + +/* Line 1455 of yacc.c */ #line 692 "yacc.yy" { ;} break; case 142: + +/* Line 1455 of yacc.c */ #line 695 "yacc.yy" { ;} break; case 143: + +/* Line 1455 of yacc.c */ #line 698 "yacc.yy" { ;} break; case 144: + +/* Line 1455 of yacc.c */ #line 701 "yacc.yy" { ;} break; case 145: + +/* Line 1455 of yacc.c */ #line 706 "yacc.yy" - { yyval._int = 0; ;} + { (yyval._int) = 0; ;} break; case 146: + +/* Line 1455 of yacc.c */ #line 707 "yacc.yy" - { yyval._int = 1; ;} + { (yyval._int) = 1; ;} break; case 152: + +/* Line 1455 of yacc.c */ #line 716 "yacc.yy" { if (dcop_area || dcop_signal_area) { - TQString* tmp = 0; - tmp = new TQString( + QString* tmp = 0; + tmp = new QString( " <%4>\n" " %2\n" " <NAME>%1</NAME>" "%3\n" " </%5>\n"); - *tmp = tmp->arg( *(yyvsp[-4]._str) ); - *tmp = tmp->arg( *(yyvsp[-5]._str) ); - *tmp = tmp->arg( *(yyvsp[-2]._str) ); + *tmp = tmp->arg( *((yyvsp[(2) - (6)]._str)) ); + *tmp = tmp->arg( *((yyvsp[(1) - (6)]._str)) ); + *tmp = tmp->arg( *((yyvsp[(4) - (6)]._str)) ); - TQString tagname = (dcop_signal_area) ? "SIGNAL" : "FUNC"; - TQString attr = (yyvsp[0]._int) ? " qual=\"const\"" : ""; - *tmp = tmp->arg( TQString("%1%2").arg(tagname).arg(attr) ); - *tmp = tmp->arg( TQString("%1").arg(tagname) ); - yyval._str = tmp; + QString tagname = (dcop_signal_area) ? "SIGNAL" : "FUNC"; + QString attr = ((yyvsp[(6) - (6)]._int)) ? " qual=\"const\"" : ""; + *tmp = tmp->arg( QString("%1%2").arg(tagname).arg(attr) ); + *tmp = tmp->arg( QString("%1").arg(tagname) ); + (yyval._str) = tmp; } else - yyval._str = new TQString(""); + (yyval._str) = new QString(""); ;} break; case 153: + +/* Line 1455 of yacc.c */ #line 738 "yacc.yy" { if (dcop_area) yyerror("operators aren't allowed in dcop areas!"); - yyval._str = new TQString(""); + (yyval._str) = new QString(""); ;} break; case 154: + +/* Line 1455 of yacc.c */ #line 748 "yacc.yy" {;} break; case 155: + +/* Line 1455 of yacc.c */ #line 749 "yacc.yy" {;} break; case 156: + +/* Line 1455 of yacc.c */ #line 750 "yacc.yy" {;} break; case 157: + +/* Line 1455 of yacc.c */ #line 755 "yacc.yy" {;} break; case 158: + +/* Line 1455 of yacc.c */ #line 760 "yacc.yy" {;} break; case 159: + +/* Line 1455 of yacc.c */ #line 761 "yacc.yy" {;} break; case 160: + +/* Line 1455 of yacc.c */ #line 766 "yacc.yy" { - yyval._str = yyvsp[-1]._str; + (yyval._str) = (yyvsp[(1) - (2)]._str); ;} break; case 161: + +/* Line 1455 of yacc.c */ #line 770 "yacc.yy" { - yyval._str = yyvsp[-3]._str; + (yyval._str) = (yyvsp[(2) - (5)]._str); ;} break; case 162: + +/* Line 1455 of yacc.c */ #line 774 "yacc.yy" { - yyval._str = yyvsp[-1]._str; + (yyval._str) = (yyvsp[(2) - (3)]._str); ;} break; case 163: + +/* Line 1455 of yacc.c */ #line 778 "yacc.yy" { /* The constructor */ assert(!dcop_area); - yyval._str = new TQString(""); + (yyval._str) = new QString(""); ;} break; case 164: + +/* Line 1455 of yacc.c */ #line 784 "yacc.yy" { /* The constructor */ assert(!dcop_area); - yyval._str = new TQString(""); + (yyval._str) = new QString(""); ;} break; case 165: + +/* Line 1455 of yacc.c */ #line 790 "yacc.yy" { /* The destructor */ assert(!dcop_area); - yyval._str = new TQString(""); + (yyval._str) = new QString(""); ;} break; case 166: + +/* Line 1455 of yacc.c */ #line 796 "yacc.yy" { if (dcop_area) { @@ -2511,12 +3066,14 @@ yyreduce: else yyerror("DCOP functions cannot be static"); } else { - yyval._str = new TQString(); + (yyval._str) = new QString(); } ;} break; case 167: + +/* Line 1455 of yacc.c */ #line 809 "yacc.yy" { function_mode = 1; @@ -2524,80 +3081,103 @@ yyreduce: break; case 171: + +/* Line 1455 of yacc.c */ #line 821 "yacc.yy" {;} break; case 172: + +/* Line 1455 of yacc.c */ #line 822 "yacc.yy" {;} break; case 176: + +/* Line 1455 of yacc.c */ #line 834 "yacc.yy" {;} break; case 177: + +/* Line 1455 of yacc.c */ #line 835 "yacc.yy" {;} break; case 178: + +/* Line 1455 of yacc.c */ #line 836 "yacc.yy" {;} break; case 179: + +/* Line 1455 of yacc.c */ #line 839 "yacc.yy" {;} break; case 180: + +/* Line 1455 of yacc.c */ #line 843 "yacc.yy" {;} break; case 181: + +/* Line 1455 of yacc.c */ #line 844 "yacc.yy" {;} break; case 182: + +/* Line 1455 of yacc.c */ #line 845 "yacc.yy" {;} break; case 183: + +/* Line 1455 of yacc.c */ #line 846 "yacc.yy" {;} break; case 184: + +/* Line 1455 of yacc.c */ #line 847 "yacc.yy" {;} break; case 185: + +/* Line 1455 of yacc.c */ #line 848 "yacc.yy" {;} break; - } - -/* Line 1010 of yacc.c. */ -#line 2591 "yacc.cc" - - yyvsp -= yylen; - yyssp -= yylen; +/* Line 1455 of yacc.c */ +#line 3171 "yacc.cc" + default: break; + } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + YYPOPSTACK (yylen); + yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -2621,66 +3201,41 @@ yyerrlab: if (!yyerrstatus) { ++yynerrs; -#if YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (YYPACT_NINF < yyn && yyn < YYLAST) - { - YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); - const char* yyprefix; - char *yymsg; - int yyx; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 0; - - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else { - yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); - yycount += 1; - if (yycount == 5) - { - yysize = 0; - break; - } + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; } - yysize += (sizeof ("syntax error, unexpected ") - + yystrlen (yytname[yytype])); - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg != 0) - { - char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); - yyp = yystpcpy (yyp, yytname[yytype]); - - if (yycount < 5) - { - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - yyp = yystpcpy (yyp, yyprefix); - yyp = yystpcpy (yyp, yytname[yyx]); - yyprefix = " or "; - } - } - yyerror (yymsg); - YYSTACK_FREE (yymsg); - } - else - yyerror ("syntax error; also virtual memory exhausted"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror ("syntax error"); + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif } @@ -2691,25 +3246,16 @@ yyerrlab: error, discard it. */ if (yychar <= YYEOF) - { - /* If at end of input, pop the error token, - then the rest of the stack, then return failure. */ + { + /* Return failure if at end of input. */ if (yychar == YYEOF) - for (;;) - { - YYPOPSTACK; - if (yyssp == yyss) - YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[*yyssp], yyvsp); - } - } + YYABORT; + } else { - YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); - yydestruct (yytoken, &yylval); + yydestruct ("Error: discarding", + yytoken, &yylval); yychar = YYEMPTY; - } } @@ -2723,15 +3269,17 @@ yyerrlab: `---------------------------------------------------*/ yyerrorlab: -#ifdef __GNUC__ - /* Pacify GCC when the user code never invokes YYERROR and the label - yyerrorlab therefore never appears in user code. */ - if (0) + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) goto yyerrorlab; -#endif - yyvsp -= yylen; - yyssp -= yylen; + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; @@ -2760,21 +3308,20 @@ yyerrlab1: if (yyssp == yyss) YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[yystate], yyvsp); - YYPOPSTACK; + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - - YYDPRINTF ((stderr, "Shifting error token, ")); - *++yyvsp = yylval; + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + yystate = yyn; goto yynewstate; @@ -2793,25 +3340,45 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow -/*----------------------------------------------. -| yyoverflowlab -- parser overflow comes here. | -`----------------------------------------------*/ -yyoverflowlab: - yyerror ("parser stack overflow"); +#if !defined(yyoverflow) || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: + if (yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif - return yyresult; +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); } + +/* Line 1675 of yacc.c */ #line 851 "yacc.yy" @@ -2821,4 +3388,3 @@ void dcopidlParse( const char *_code ) yyparse(); } - |