File indexing completed on 2024-04-28 15:22:51

0001 /* A Bison parser, made by GNU Bison 2.5.1.  */
0002 
0003 /* Bison implementation for Yacc-like parsers in C
0004    
0005       Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
0006    
0007    This program is free software: you can redistribute it and/or modify
0008    it under the terms of the GNU General Public License as published by
0009    the Free Software Foundation, either version 3 of the License, or
0010    (at your option) any later version.
0011    
0012    This program is distributed in the hope that it will be useful,
0013    but WITHOUT ANY WARRANTY; without even the implied warranty of
0014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0015    GNU General Public License for more details.
0016    
0017    You should have received a copy of the GNU General Public License
0018    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
0019 
0020 /* As a special exception, you may create a larger work that contains
0021    part or all of the Bison parser skeleton and distribute that work
0022    under terms of your choice, so long as that work isn't itself a
0023    parser generator using the skeleton or a modified version thereof
0024    as a parser skeleton.  Alternatively, if you modify or redistribute
0025    the parser skeleton itself, you may (at your option) remove this
0026    special exception, which will cause the skeleton and the resulting
0027    Bison output files to be licensed under the GNU General Public
0028    License without this special exception.
0029    
0030    This special exception was added by the Free Software Foundation in
0031    version 2.2 of Bison.  */
0032 
0033 /* C LALR(1) parser skeleton written by Richard Stallman, by
0034    simplifying the original so-called "semantic" parser.  */
0035 
0036 /* All symbols defined below should begin with yy or YY, to avoid
0037    infringing on user name space.  This should be done even for local
0038    variables, as they might otherwise be expanded by user macros.
0039    There are some unavoidable exceptions within include files to
0040    define necessary library symbols; they are noted "INFRINGES ON
0041    USER NAME SPACE" below.  */
0042 
0043 /* Identify Bison output.  */
0044 #define YYBISON 1
0045 
0046 /* Bison version.  */
0047 #define YYBISON_VERSION "2.5.1"
0048 
0049 /* Skeleton name.  */
0050 #define YYSKELETON_NAME "yacc.c"
0051 
0052 /* Pure parsers.  */
0053 #define YYPURE 1
0054 
0055 /* Push parsers.  */
0056 #define YYPUSH 0
0057 
0058 /* Pull parsers.  */
0059 #define YYPULL 1
0060 
0061 /* Using locations.  */
0062 #define YYLSP_NEEDED 0
0063 
0064 /* Substitute the variable and function names.  */
0065 #define yyparse         cssyyparse
0066 #define yylex           cssyylex
0067 #define yyerror         cssyyerror
0068 #define yylval          cssyylval
0069 #define yychar          cssyychar
0070 #define yydebug         cssyydebug
0071 #define yynerrs         cssyynerrs
0072 
0073 
0074 /* Copy the first part of user declarations.  */
0075 
0076 
0077 
0078 /*
0079  *  This file is part of the KDE libraries
0080  *  Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org)
0081  *  Copyright (c) 2003 Apple Computer
0082  *  Copyright (C) 2003 Dirk Mueller (mueller@kde.org)
0083  *  Copyright (C) 2008 Germain Garand (germain@ebooksfrance.org)
0084  *
0085  *  This library is free software; you can redistribute it and/or
0086  *  modify it under the terms of the GNU Lesser General Public
0087  *  License as published by the Free Software Foundation; either
0088  *  version 2 of the License, or (at your option) any later version.
0089  *
0090  *  This library is distributed in the hope that it will be useful,
0091  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0092  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0093  *  Lesser General Public License for more details.
0094  *
0095  *  You should have received a copy of the GNU Lesser General Public
0096  *  License along with this library; if not, write to the Free Software
0097  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0098  *
0099  */
0100 
0101 #include <string.h>
0102 #include <stdlib.h>
0103 
0104 #include <dom/dom_string.h>
0105 #include <xml/dom_docimpl.h>
0106 #include <css/cssstyleselector.h>
0107 #include <css/css_ruleimpl.h>
0108 #include <css/css_stylesheetimpl.h>
0109 #include <css/css_valueimpl.h>
0110 #include <css/css_mediaquery.h>
0111 #include "cssparser.h"
0112 
0113 
0114 
0115 #include <assert.h>
0116 #include "khtml_debug.h"
0117 
0118 //#define CSS_DEBUG
0119 
0120 using namespace DOM;
0121 
0122 //
0123 // The following file defines the function
0124 //     const struct props *findProp(const char *word, int len)
0125 //
0126 // with 'props->id' a CSS property in the range from CSS_PROP_MIN to
0127 // (and including) CSS_PROP_TOTAL-1
0128 
0129 // Turn off gnu90 inlining to avoid linker errors
0130 #undef __GNUC_STDC_INLINE__
0131 #undef __GNUC_GNU_INLINE__
0132 #include "cssproperties.c"
0133 #include "cssvalues.c"
0134 
0135 int DOM::getPropertyID(const char *tagStr, int len)
0136 {
0137     { // HTML CSS Properties
0138         const struct css_prop *prop = findProp(tagStr, len);
0139         if (!prop) {
0140             return 0;
0141         }
0142 
0143         return prop->id;
0144     }
0145 }
0146 
0147 int DOM::getValueID(const char *tagStr, int len)
0148 {
0149     { // HTML CSS Values
0150         const struct css_value *val = findValue(tagStr, len);
0151         if (!val) {
0152             return 0;
0153         }
0154 
0155         return val->id;
0156     }
0157 }
0158 
0159 #define YYDEBUG 0
0160 #define YYMAXDEPTH 10000
0161 #define YYPARSE_PARAM parser
0162 #define YYENABLE_NLS 0
0163 #define YYLTYPE_IS_TRIVIAL 1
0164 
0165 
0166 
0167 # ifndef YY_NULL
0168 #  if defined __cplusplus && 201103L <= __cplusplus
0169 #   define YY_NULL nullptr
0170 #  else
0171 #   define YY_NULL 0
0172 #  endif
0173 # endif
0174 
0175 /* Enabling traces.  */
0176 #ifndef YYDEBUG
0177 # define YYDEBUG 0
0178 #endif
0179 
0180 /* Enabling verbose error messages.  */
0181 #ifdef YYERROR_VERBOSE
0182 # undef YYERROR_VERBOSE
0183 # define YYERROR_VERBOSE 1
0184 #else
0185 # define YYERROR_VERBOSE 0
0186 #endif
0187 
0188 /* Enabling the token table.  */
0189 #ifndef YYTOKEN_TABLE
0190 # define YYTOKEN_TABLE 0
0191 #endif
0192 
0193 
0194 /* Tokens.  */
0195 #ifndef YYTOKENTYPE
0196 # define YYTOKENTYPE
0197    /* Put the tokens into the symbol table, so that GDB and other debuggers
0198       know about them.  */
0199    enum yytokentype {
0200      REDUCE = 258,
0201      S = 259,
0202      SGML_CD = 260,
0203      INCLUDES = 261,
0204      DASHMATCH = 262,
0205      BEGINSWITH = 263,
0206      ENDSWITH = 264,
0207      CONTAINS = 265,
0208      STRING = 266,
0209      IDENT = 267,
0210      NTH = 268,
0211      HASH = 269,
0212      HEXCOLOR = 270,
0213      IMPORT_SYM = 271,
0214      PAGE_SYM = 272,
0215      MEDIA_SYM = 273,
0216      FONT_FACE_SYM = 274,
0217      CHARSET_SYM = 275,
0218      NAMESPACE_SYM = 276,
0219      KHTML_RULE_SYM = 277,
0220      KHTML_DECLS_SYM = 278,
0221      KHTML_VALUE_SYM = 279,
0222      KHTML_MEDIAQUERY_SYM = 280,
0223      KHTML_SELECTORS_SYM = 281,
0224      IMPORTANT_SYM = 282,
0225      MEDIA_ONLY = 283,
0226      MEDIA_NOT = 284,
0227      MEDIA_AND = 285,
0228      QEMS = 286,
0229      EMS = 287,
0230      EXS = 288,
0231      CHS = 289,
0232      REMS = 290,
0233      PXS = 291,
0234      CMS = 292,
0235      MMS = 293,
0236      INS = 294,
0237      PTS = 295,
0238      PCS = 296,
0239      DEGS = 297,
0240      RADS = 298,
0241      GRADS = 299,
0242      MSECS = 300,
0243      SECS = 301,
0244      HERZ = 302,
0245      KHERZ = 303,
0246      DPI = 304,
0247      DPCM = 305,
0248      DIMEN = 306,
0249      PERCENTAGE = 307,
0250      FLOAT = 308,
0251      INTEGER = 309,
0252      URI = 310,
0253      FUNCTION = 311,
0254      NOTFUNCTION = 312,
0255      UNICODERANGE = 313
0256    };
0257 #endif
0258 
0259 
0260 
0261 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
0262 typedef union YYSTYPE
0263 {
0264 
0265 
0266     CSSRuleImpl *rule;
0267     CSSSelector *selector;
0268     QList<CSSSelector *> *selectorList;
0269     bool ok;
0270     MediaListImpl *mediaList;
0271     CSSMediaRuleImpl *mediaRule;
0272     CSSRuleListImpl *ruleList;
0273     ParseString string;
0274     double val;
0275     int prop_id;
0276     unsigned int attribute;
0277     unsigned int element;
0278     CSSSelector::Relation relation;
0279     CSSSelector::Match match;
0280     bool b;
0281     char tok;
0282     Value value;
0283     ValueList *valueList;
0284 
0285     khtml::MediaQuery *mediaQuery;
0286     khtml::MediaQueryExp *mediaQueryExp;
0287     QList<khtml::MediaQueryExp *> *mediaQueryExpList;
0288     khtml::MediaQuery::Restrictor mediaQueryRestrictor;
0289 
0290 
0291 
0292 } YYSTYPE;
0293 # define YYSTYPE_IS_TRIVIAL 1
0294 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
0295 # define YYSTYPE_IS_DECLARED 1
0296 #endif
0297 
0298 
0299 /* Copy the second part of user declarations.  */
0300 
0301 
0302 
0303 static inline int cssyyerror(const char *x)
0304 {
0305 #ifdef CSS_DEBUG
0306     qDebug("%s", x);
0307 #else
0308     Q_UNUSED(x);
0309 #endif
0310     return 1;
0311 }
0312 
0313 static int cssyylex(YYSTYPE *yylval) {
0314     return CSSParser::current()->lex(yylval);
0315 }
0316 
0317 #define null 1
0318 
0319 
0320 
0321 
0322 #ifdef short
0323 # undef short
0324 #endif
0325 
0326 #ifdef YYTYPE_UINT8
0327 typedef YYTYPE_UINT8 yytype_uint8;
0328 #else
0329 typedef unsigned char yytype_uint8;
0330 #endif
0331 
0332 #ifdef YYTYPE_INT8
0333 typedef YYTYPE_INT8 yytype_int8;
0334 #elif (defined __STDC__ || defined __C99__FUNC__ \
0335      || defined __cplusplus || defined _MSC_VER)
0336 typedef signed char yytype_int8;
0337 #else
0338 typedef short int yytype_int8;
0339 #endif
0340 
0341 #ifdef YYTYPE_UINT16
0342 typedef YYTYPE_UINT16 yytype_uint16;
0343 #else
0344 typedef unsigned short int yytype_uint16;
0345 #endif
0346 
0347 #ifdef YYTYPE_INT16
0348 typedef YYTYPE_INT16 yytype_int16;
0349 #else
0350 typedef short int yytype_int16;
0351 #endif
0352 
0353 #ifndef YYSIZE_T
0354 # ifdef __SIZE_TYPE__
0355 #  define YYSIZE_T __SIZE_TYPE__
0356 # elif defined size_t
0357 #  define YYSIZE_T size_t
0358 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
0359      || defined __cplusplus || defined _MSC_VER)
0360 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
0361 #  define YYSIZE_T size_t
0362 # else
0363 #  define YYSIZE_T unsigned int
0364 # endif
0365 #endif
0366 
0367 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
0368 
0369 #ifndef YY_
0370 # if defined YYENABLE_NLS && YYENABLE_NLS
0371 #  if ENABLE_NLS
0372 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
0373 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
0374 #  endif
0375 # endif
0376 # ifndef YY_
0377 #  define YY_(msgid) msgid
0378 # endif
0379 #endif
0380 
0381 /* Suppress unused-variable warnings by "using" E.  */
0382 #if ! defined lint || defined __GNUC__
0383 # define YYUSE(e) ((void) (e))
0384 #else
0385 # define YYUSE(e) /* empty */
0386 #endif
0387 
0388 /* Identity function, used to suppress warnings about constant conditions.  */
0389 #ifndef lint
0390 # define YYID(n) (n)
0391 #else
0392 #if (defined __STDC__ || defined __C99__FUNC__ \
0393      || defined __cplusplus || defined _MSC_VER)
0394 static int
0395 YYID (int yyi)
0396 #else
0397 static int
0398 YYID (yyi)
0399     int yyi;
0400 #endif
0401 {
0402   return yyi;
0403 }
0404 #endif
0405 
0406 #if ! defined yyoverflow || YYERROR_VERBOSE
0407 
0408 /* The parser invokes alloca or malloc; define the necessary symbols.  */
0409 
0410 # ifdef YYSTACK_USE_ALLOCA
0411 #  if YYSTACK_USE_ALLOCA
0412 #   ifdef __GNUC__
0413 #    define YYSTACK_ALLOC __builtin_alloca
0414 #   elif defined __BUILTIN_VA_ARG_INCR
0415 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
0416 #   elif defined _AIX
0417 #    define YYSTACK_ALLOC __alloca
0418 #   elif defined _MSC_VER
0419 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
0420 #    define alloca _alloca
0421 #   else
0422 #    define YYSTACK_ALLOC alloca
0423 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
0424      || defined __cplusplus || defined _MSC_VER)
0425 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
0426       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
0427 #     ifndef EXIT_SUCCESS
0428 #      define EXIT_SUCCESS 0
0429 #     endif
0430 #    endif
0431 #   endif
0432 #  endif
0433 # endif
0434 
0435 # ifdef YYSTACK_ALLOC
0436    /* Pacify GCC's `empty if-body' warning.  */
0437 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
0438 #  ifndef YYSTACK_ALLOC_MAXIMUM
0439     /* The OS might guarantee only one guard page at the bottom of the stack,
0440        and a page size can be as small as 4096 bytes.  So we cannot safely
0441        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
0442        to allow for a few compiler-allocated temporary stack slots.  */
0443 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
0444 #  endif
0445 # else
0446 #  define YYSTACK_ALLOC YYMALLOC
0447 #  define YYSTACK_FREE YYFREE
0448 #  ifndef YYSTACK_ALLOC_MAXIMUM
0449 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
0450 #  endif
0451 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
0452        && ! ((defined YYMALLOC || defined malloc) \
0453          && (defined YYFREE || defined free)))
0454 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
0455 #   ifndef EXIT_SUCCESS
0456 #    define EXIT_SUCCESS 0
0457 #   endif
0458 #  endif
0459 #  ifndef YYMALLOC
0460 #   define YYMALLOC malloc
0461 #   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
0462      || defined __cplusplus || defined _MSC_VER)
0463 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
0464 #   endif
0465 #  endif
0466 #  ifndef YYFREE
0467 #   define YYFREE free
0468 #   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
0469      || defined __cplusplus || defined _MSC_VER)
0470 void free (void *); /* INFRINGES ON USER NAME SPACE */
0471 #   endif
0472 #  endif
0473 # endif
0474 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
0475 
0476 
0477 #if (! defined yyoverflow \
0478      && (! defined __cplusplus \
0479      || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
0480 
0481 /* A type that is properly aligned for any stack member.  */
0482 union yyalloc
0483 {
0484   yytype_int16 yyss_alloc;
0485   YYSTYPE yyvs_alloc;
0486 };
0487 
0488 /* The size of the maximum gap between one aligned stack and the next.  */
0489 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
0490 
0491 /* The size of an array large to enough to hold all stacks, each with
0492    N elements.  */
0493 # define YYSTACK_BYTES(N) \
0494      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
0495       + YYSTACK_GAP_MAXIMUM)
0496 
0497 # define YYCOPY_NEEDED 1
0498 
0499 /* Relocate STACK from its old location to the new one.  The
0500    local variables YYSIZE and YYSTACKSIZE give the old and new number of
0501    elements in the stack, and YYPTR gives the new location of the
0502    stack.  Advance YYPTR to a properly aligned location for the next
0503    stack.  */
0504 # define YYSTACK_RELOCATE(Stack_alloc, Stack)               \
0505     do                                  \
0506       {                                 \
0507     YYSIZE_T yynewbytes;                        \
0508     YYCOPY (&yyptr->Stack_alloc, Stack, yysize);            \
0509     Stack = &yyptr->Stack_alloc;                    \
0510     yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
0511     yyptr += yynewbytes / sizeof (*yyptr);              \
0512       }                                 \
0513     while (YYID (0))
0514 
0515 #endif
0516 
0517 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
0518 /* Copy COUNT objects from SRC to DST.  The source and destination do
0519    not overlap.  */
0520 # ifndef YYCOPY
0521 #  if defined __GNUC__ && 1 < __GNUC__
0522 #   define YYCOPY(Dst, Src, Count) \
0523       __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
0524 #  else
0525 #   define YYCOPY(Dst, Src, Count)              \
0526       do                                        \
0527         {                                       \
0528           YYSIZE_T yyi;                         \
0529           for (yyi = 0; yyi < (Count); yyi++)   \
0530             (Dst)[yyi] = (Src)[yyi];            \
0531         }                                       \
0532       while (YYID (0))
0533 #  endif
0534 # endif
0535 #endif /* !YYCOPY_NEEDED */
0536 
0537 /* YYFINAL -- State number of the termination state.  */
0538 #define YYFINAL  19
0539 /* YYLAST -- Last index in YYTABLE.  */
0540 #define YYLAST   633
0541 
0542 /* YYNTOKENS -- Number of terminals.  */
0543 #define YYNTOKENS  78
0544 /* YYNNTS -- Number of nonterminals.  */
0545 #define YYNNTS  69
0546 /* YYNRULES -- Number of rules.  */
0547 #define YYNRULES  201
0548 /* YYNRULES -- Number of states.  */
0549 #define YYNSTATES  382
0550 
0551 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
0552 #define YYUNDEFTOK  2
0553 #define YYMAXUTOK   313
0554 
0555 #define YYTRANSLATE(YYX)                        \
0556   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
0557 
0558 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
0559 static const yytype_uint8 yytranslate[] =
0560 {
0561        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0562        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0563        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0564        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0565       68,    69,    19,    66,    70,    73,    17,    76,     2,     2,
0566        2,     2,     2,     2,     2,     2,     2,     2,    16,    67,
0567        2,    75,    72,     2,    77,     2,     2,     2,     2,     2,
0568        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0569        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0570        2,    18,     2,    74,     2,     2,     2,     2,     2,     2,
0571        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0572        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0573        2,     2,     2,    64,    20,    65,    71,     2,     2,     2,
0574        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0575        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0576        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0577        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0578        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0579        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0580        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0581        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0582        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0583        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0584        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0585        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0586        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
0587        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
0588       15,    21,    22,    23,    24,    25,    26,    27,    28,    29,
0589       30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
0590       40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
0591       50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
0592       60,    61,    62,    63
0593 };
0594 
0595 #if YYDEBUG
0596 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
0597    YYRHS.  */
0598 static const yytype_uint16 yyprhs[] =
0599 {
0600        0,     0,     3,    10,    13,    16,    19,    22,    25,    27,
0601       29,    31,    38,    41,    47,    53,    59,    60,    62,    63,
0602       66,    67,    70,    73,    74,    76,    82,    86,    90,    91,
0603       95,   102,   106,   110,   111,   115,   120,   124,   128,   132,
0604      133,   136,   137,   141,   143,   145,   147,   149,   151,   153,
0605      156,   158,   160,   162,   165,   167,   169,   172,   173,   178,
0606      186,   188,   194,   195,   199,   200,   202,   204,   206,   211,
0607      212,   214,   216,   221,   224,   232,   239,   240,   244,   247,
0608      251,   255,   259,   263,   267,   270,   273,   276,   278,   280,
0609      283,   285,   290,   293,   295,   298,   302,   306,   309,   311,
0610      314,   317,   319,   322,   324,   327,   331,   334,   336,   338,
0611      341,   344,   346,   348,   350,   353,   356,   358,   360,   362,
0612      364,   367,   370,   375,   384,   390,   400,   402,   404,   406,
0613      408,   410,   412,   414,   416,   419,   423,   430,   438,   445,
0614      452,   459,   464,   469,   474,   480,   486,   490,   494,   499,
0615      504,   510,   513,   516,   519,   520,   522,   526,   529,   532,
0616      533,   535,   538,   541,   544,   547,   550,   553,   555,   557,
0617      560,   563,   566,   569,   572,   575,   578,   581,   584,   587,
0618      590,   593,   596,   599,   602,   605,   608,   611,   614,   617,
0619      620,   623,   626,   632,   636,   639,   643,   647,   650,   656,
0620      660,   662
0621 };
0622 
0623 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
0624 static const yytype_int16 yyrhs[] =
0625 {
0626       79,     0,    -1,    87,    89,    88,    91,    93,    97,    -1,
0627       81,    87,    -1,    82,    87,    -1,    83,    87,    -1,    85,
0628       87,    -1,    84,    87,    -1,   117,    -1,    92,    -1,    94,
0629       -1,    27,    64,    87,    80,    87,    65,    -1,    28,   132,
0630       -1,    29,    64,    87,   137,    65,    -1,    31,    64,    87,
0631      118,    65,    -1,    30,     4,    87,   107,    65,    -1,    -1,
0632       66,    -1,    -1,    87,     4,    -1,    -1,    88,     5,    -1,
0633       88,     4,    -1,    -1,    90,    -1,    25,    87,    11,    87,
0634       67,    -1,    25,     1,   145,    -1,    25,     1,    67,    -1,
0635       -1,    91,    92,    88,    -1,    21,    87,   100,    87,   108,
0636       67,    -1,    21,     1,   145,    -1,    21,     1,    67,    -1,
0637       -1,    93,    95,    88,    -1,    26,    87,    96,   100,    -1,
0638       94,    87,    67,    -1,    26,     1,   145,    -1,    26,     1,
0639       67,    -1,    -1,    12,     4,    -1,    -1,    97,    98,    88,
0640       -1,   117,    -1,   110,    -1,   113,    -1,   114,    -1,   144,
0641       -1,   143,    -1,    92,     1,    -1,   117,    -1,   144,    -1,
0642      143,    -1,    92,     1,    -1,    11,    -1,    60,    -1,    12,
0643       87,    -1,    -1,    16,    87,   137,    87,    -1,    68,    87,
0644      101,    87,   102,    69,    87,    -1,   103,    -1,   104,    87,
0645       35,    87,   103,    -1,    -1,    35,    87,   104,    -1,    -1,
0646       33,    -1,    34,    -1,   104,    -1,   106,    87,   112,   105,
0647       -1,    -1,   109,    -1,   107,    -1,   109,    70,    87,   107,
0648       -1,   109,     1,    -1,    23,    87,   109,    64,    87,   111,
0649       65,    -1,    23,    87,    64,    87,   111,    65,    -1,    -1,
0650      111,    99,    87,    -1,    12,    87,    -1,    22,     1,   145,
0651       -1,    22,     1,    67,    -1,    24,    87,   132,    -1,    24,
0652        1,   145,    -1,    24,     1,    67,    -1,    66,    87,    -1,
0653       71,    87,    -1,    72,    87,    -1,    73,    -1,    66,    -1,
0654      118,   132,    -1,   119,    -1,   118,    70,    87,   119,    -1,
0655      118,     1,    -1,   121,    -1,   119,     4,    -1,   119,     4,
0656      121,    -1,   119,   115,   121,    -1,   119,     1,    -1,    20,
0657       -1,    19,    20,    -1,    12,    20,    -1,   123,    -1,   123,
0658      124,    -1,   124,    -1,   120,   123,    -1,   120,   123,   124,
0659       -1,   120,   124,    -1,   123,    -1,   125,    -1,   120,   123,
0660       -1,   120,   125,    -1,    12,    -1,    19,    -1,   125,    -1,
0661      124,   125,    -1,   124,     1,    -1,    14,    -1,   126,    -1,
0662      128,    -1,   131,    -1,    17,    12,    -1,    12,    87,    -1,
0663       18,    87,   127,    74,    -1,    18,    87,   127,   129,    87,
0664      130,    87,    74,    -1,    18,    87,   120,   127,    74,    -1,
0665       18,    87,   120,   127,   129,    87,   130,    87,    74,    -1,
0666       75,    -1,     6,    -1,     7,    -1,     8,    -1,     9,    -1,
0667       10,    -1,    12,    -1,    11,    -1,    16,    12,    -1,    16,
0668       16,    12,    -1,    16,    61,    87,    13,    87,    69,    -1,
0669       16,    61,    87,    86,    59,    87,    69,    -1,    16,    61,
0670       87,    12,    87,    69,    -1,    16,    61,    87,    11,    87,
0671       69,    -1,    16,    62,    87,   122,    87,    69,    -1,    64,
0672       87,   134,    65,    -1,    64,    87,     1,    65,    -1,    64,
0673       87,   133,    65,    -1,    64,    87,   133,   134,    65,    -1,
0674       64,    87,   133,     1,    65,    -1,   134,    67,    87,    -1,
0675        1,    67,    87,    -1,   133,   134,    67,    87,    -1,   133,
0676        1,    67,    87,    -1,   135,    16,    87,   137,   136,    -1,
0677        1,   145,    -1,    12,    87,    -1,    32,    87,    -1,    -1,
0678      139,    -1,   137,   138,   139,    -1,    76,    87,    -1,    70,
0679       87,    -1,    -1,   140,    -1,   116,   140,    -1,    56,    87,
0680       -1,    11,    87,    -1,    12,    87,    -1,    60,    87,    -1,
0681       63,    87,    -1,   142,    -1,   141,    -1,    59,    87,    -1,
0682       58,    87,    -1,    57,    87,    -1,    41,    87,    -1,    42,
0683       87,    -1,    43,    87,    -1,    44,    87,    -1,    45,    87,
0684       -1,    46,    87,    -1,    47,    87,    -1,    48,    87,    -1,
0685       49,    87,    -1,    50,    87,    -1,    51,    87,    -1,    52,
0686       87,    -1,    53,    87,    -1,    37,    87,    -1,    36,    87,
0687       -1,    38,    87,    -1,    39,    87,    -1,    40,    87,    -1,
0688       54,    87,    -1,    55,    87,    -1,    61,    87,   137,    69,
0689       87,    -1,    61,    87,     1,    -1,    15,    87,    -1,    77,
0690        1,   145,    -1,    77,     1,    67,    -1,     1,   145,    -1,
0691       64,     1,   146,     1,    65,    -1,    64,     1,    65,    -1,
0692      145,    -1,   146,     1,   145,    -1
0693 };
0694 
0695 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
0696 static const yytype_uint16 yyrline[] =
0697 {
0698        0,   294,   294,   295,   296,   297,   298,   299,   303,   304,
0699      305,   309,   316,   322,   347,   359,   365,   367,   371,   372,
0700      375,   377,   378,   381,   383,   386,   395,   397,   401,   403,
0701      414,   424,   427,   433,   434,   438,   448,   456,   457,   461,
0702      462,   465,   467,   478,   479,   480,   481,   482,   483,   484,
0703      488,   489,   490,   491,   495,   496,   500,   506,   509,   515,
0704      521,   525,   532,   535,   541,   544,   547,   553,   556,   562,
0705      565,   570,   574,   579,   586,   597,   609,   610,   620,   638,
0706      641,   647,   654,   657,   663,   664,   665,   669,   670,   674,
0707      696,   709,   727,   737,   740,   743,   757,   771,   778,   779,
0708      780,   784,   789,   796,   803,   811,   821,   834,   839,   846,
0709      854,   867,   871,   877,   880,   890,   897,   911,   912,   913,
0710      917,   934,   941,   947,   954,   963,   976,   979,   982,   985,
0711      988,   991,   997,   998,  1002,  1008,  1014,  1021,  1028,  1035,
0712     1042,  1051,  1054,  1057,  1060,  1065,  1071,  1075,  1078,  1083,
0713     1089,  1111,  1117,  1124,  1125,  1129,  1133,  1149,  1152,  1155,
0714     1161,  1162,  1164,  1165,  1166,  1172,  1173,  1174,  1176,  1182,
0715     1183,  1184,  1185,  1186,  1187,  1188,  1189,  1190,  1191,  1192,
0716     1193,  1194,  1195,  1196,  1197,  1198,  1199,  1200,  1201,  1202,
0717     1203,  1204,  1209,  1217,  1233,  1240,  1246,  1255,  1281,  1282,
0718     1286,  1287
0719 };
0720 #endif
0721 
0722 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
0723 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
0724    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
0725 static const char *const yytname[] =
0726 {
0727   "$end", "error", "$undefined", "REDUCE", "S", "SGML_CD", "INCLUDES",
0728   "DASHMATCH", "BEGINSWITH", "ENDSWITH", "CONTAINS", "STRING", "IDENT",
0729   "NTH", "HASH", "HEXCOLOR", "':'", "'.'", "'['", "'*'", "'|'",
0730   "IMPORT_SYM", "PAGE_SYM", "MEDIA_SYM", "FONT_FACE_SYM", "CHARSET_SYM",
0731   "NAMESPACE_SYM", "KHTML_RULE_SYM", "KHTML_DECLS_SYM", "KHTML_VALUE_SYM",
0732   "KHTML_MEDIAQUERY_SYM", "KHTML_SELECTORS_SYM", "IMPORTANT_SYM",
0733   "MEDIA_ONLY", "MEDIA_NOT", "MEDIA_AND", "QEMS", "EMS", "EXS", "CHS",
0734   "REMS", "PXS", "CMS", "MMS", "INS", "PTS", "PCS", "DEGS", "RADS",
0735   "GRADS", "MSECS", "SECS", "HERZ", "KHERZ", "DPI", "DPCM", "DIMEN",
0736   "PERCENTAGE", "FLOAT", "INTEGER", "URI", "FUNCTION", "NOTFUNCTION",
0737   "UNICODERANGE", "'{'", "'}'", "'+'", "';'", "'('", "')'", "','", "'~'",
0738   "'>'", "'-'", "']'", "'='", "'/'", "'@'", "$accept", "stylesheet",
0739   "ruleset_or_import_or_namespace", "khtml_rule", "khtml_decls",
0740   "khtml_value", "khtml_selectors", "khtml_mediaquery", "maybe_plus",
0741   "maybe_space", "maybe_sgml", "maybe_charset", "charset", "import_list",
0742   "import", "namespace_list", "namespace_rule", "namespace",
0743   "maybe_ns_prefix", "rule_list", "rule", "safe_ruleset", "string_or_uri",
0744   "media_feature", "maybe_media_value", "media_query_exp",
0745   "media_query_exp_list", "maybe_and_media_query_exp_list",
0746   "maybe_media_restrictor", "media_query", "maybe_media_list",
0747   "media_list", "media", "ruleset_list", "medium", "page", "font_face",
0748   "combinator", "unary_operator", "ruleset", "selector_list", "selector",
0749   "namespace_selector", "simple_selector", "simple_css3_selector",
0750   "element_name", "specifier_list", "specifier", "class", "attrib_id",
0751   "attrib", "match", "ident_or_string", "pseudo", "declaration_block",
0752   "declaration_list", "declaration", "property", "prio", "expr",
0753   "operator", "term", "unary_term", "function", "hexcolor", "invalid_at",
0754   "invalid_rule", "invalid_block", "invalid_block_list", YY_NULL
0755 };
0756 #endif
0757 
0758 # ifdef YYPRINT
0759 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
0760    token YYLEX-NUM.  */
0761 static const yytype_uint16 yytoknum[] =
0762 {
0763        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
0764      265,   266,   267,   268,   269,   270,    58,    46,    91,    42,
0765      124,   271,   272,   273,   274,   275,   276,   277,   278,   279,
0766      280,   281,   282,   283,   284,   285,   286,   287,   288,   289,
0767      290,   291,   292,   293,   294,   295,   296,   297,   298,   299,
0768      300,   301,   302,   303,   304,   305,   306,   307,   308,   309,
0769      310,   311,   312,   313,   123,   125,    43,    59,    40,    41,
0770       44,   126,    62,    45,    93,    61,    47,    64
0771 };
0772 # endif
0773 
0774 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
0775 static const yytype_uint8 yyr1[] =
0776 {
0777        0,    78,    79,    79,    79,    79,    79,    79,    80,    80,
0778       80,    81,    82,    83,    84,    85,    86,    86,    87,    87,
0779       88,    88,    88,    89,    89,    90,    90,    90,    91,    91,
0780       92,    92,    92,    93,    93,    94,    95,    95,    95,    96,
0781       96,    97,    97,    98,    98,    98,    98,    98,    98,    98,
0782       99,    99,    99,    99,   100,   100,   101,   102,   102,   103,
0783      104,   104,   105,   105,   106,   106,   106,   107,   107,   108,
0784      108,   109,   109,   109,   110,   110,   111,   111,   112,   113,
0785      113,   114,   114,   114,   115,   115,   115,   116,   116,   117,
0786      118,   118,   118,   119,   119,   119,   119,   119,   120,   120,
0787      120,   121,   121,   121,   121,   121,   121,   122,   122,   122,
0788      122,   123,   123,   124,   124,   124,   125,   125,   125,   125,
0789      126,   127,   128,   128,   128,   128,   129,   129,   129,   129,
0790      129,   129,   130,   130,   131,   131,   131,   131,   131,   131,
0791      131,   132,   132,   132,   132,   132,   133,   133,   133,   133,
0792      134,   134,   135,   136,   136,   137,   137,   138,   138,   138,
0793      139,   139,   139,   139,   139,   139,   139,   139,   139,   140,
0794      140,   140,   140,   140,   140,   140,   140,   140,   140,   140,
0795      140,   140,   140,   140,   140,   140,   140,   140,   140,   140,
0796      140,   140,   141,   141,   142,   143,   143,   144,   145,   145,
0797      146,   146
0798 };
0799 
0800 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
0801 static const yytype_uint8 yyr2[] =
0802 {
0803        0,     2,     6,     2,     2,     2,     2,     2,     1,     1,
0804        1,     6,     2,     5,     5,     5,     0,     1,     0,     2,
0805        0,     2,     2,     0,     1,     5,     3,     3,     0,     3,
0806        6,     3,     3,     0,     3,     4,     3,     3,     3,     0,
0807        2,     0,     3,     1,     1,     1,     1,     1,     1,     2,
0808        1,     1,     1,     2,     1,     1,     2,     0,     4,     7,
0809        1,     5,     0,     3,     0,     1,     1,     1,     4,     0,
0810        1,     1,     4,     2,     7,     6,     0,     3,     2,     3,
0811        3,     3,     3,     3,     2,     2,     2,     1,     1,     2,
0812        1,     4,     2,     1,     2,     3,     3,     2,     1,     2,
0813        2,     1,     2,     1,     2,     3,     2,     1,     1,     2,
0814        2,     1,     1,     1,     2,     2,     1,     1,     1,     1,
0815        2,     2,     4,     8,     5,     9,     1,     1,     1,     1,
0816        1,     1,     1,     1,     2,     3,     6,     7,     6,     6,
0817        6,     4,     4,     4,     5,     5,     3,     3,     4,     4,
0818        5,     2,     2,     2,     0,     1,     3,     2,     2,     0,
0819        1,     2,     2,     2,     2,     2,     2,     1,     1,     2,
0820        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0821        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
0822        2,     2,     5,     3,     2,     3,     3,     2,     5,     3,
0823        1,     3
0824 };
0825 
0826 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
0827    Performed when YYTABLE doesn't specify something else to do.  Zero
0828    means the default is an error.  */
0829 static const yytype_uint8 yydefact[] =
0830 {
0831       18,     0,     0,     0,     0,     0,     0,    18,    18,    18,
0832       18,    18,    23,    18,    18,    12,    18,    18,    18,     1,
0833        3,     4,     5,     7,     6,    19,     0,    20,    24,     0,
0834        0,     0,    64,     0,     0,     0,    28,   111,   116,     0,
0835        0,    18,   112,    98,     0,    18,    18,     9,    10,     8,
0836        0,     0,     0,    93,   101,     0,   113,   117,   118,   119,
0837        0,    18,     0,     0,     0,    18,    18,    18,    18,    18,
0838       18,    18,    18,    18,    18,    18,    18,    18,    18,    18,
0839       18,    18,    18,    18,    18,    18,    18,    18,    18,    18,
0840       18,    18,    18,    18,    18,    88,    87,     0,   159,   155,
0841      160,   168,   167,    65,    66,    18,    60,    67,    18,     0,
0842        0,     0,    27,    26,    18,    22,    21,    33,   100,   134,
0843        0,    18,    18,   120,     0,    99,     0,     0,    39,     0,
0844       92,    18,    89,    97,    94,    18,    18,    18,     0,   111,
0845      112,   104,     0,     0,   115,   114,   142,    18,   151,   152,
0846        0,   143,     0,   141,    18,    18,   163,   164,   194,   186,
0847      185,   187,   188,   189,   172,   173,   174,   175,   176,   177,
0848      178,   179,   180,   181,   182,   183,   184,   190,   191,   162,
0849      171,   170,   169,   165,     0,   166,   161,    13,    18,    18,
0850        0,     0,     0,     0,    15,    14,     0,     0,    20,    41,
0851      135,    16,     0,    18,     0,     0,     0,    32,    31,    54,
0852       55,    18,     0,     0,    11,     0,    95,    84,    85,    86,
0853       96,     0,   147,   145,    18,   144,    18,   146,     0,   193,
0854      159,   158,   157,   156,    18,    18,    18,    18,    62,   199,
0855      200,     0,    25,    29,     0,    18,    20,     0,    18,    18,
0856       18,    17,     0,     0,    18,   107,   108,   121,    18,     0,
0857      127,   128,   129,   130,   131,   122,   126,    18,    64,    40,
0858       35,     0,   149,   148,   159,    18,    56,    57,     0,    78,
0859       18,    68,     0,     0,     0,    34,     0,     0,    18,     0,
0860        0,     0,    20,    44,    45,    46,    43,    48,    47,     0,
0861        0,     0,    18,   109,   110,     0,   124,    18,     0,    71,
0862        0,     0,    18,   150,   192,    18,     0,    61,     0,   198,
0863      201,    38,    37,    36,   197,     0,    64,     0,     0,     0,
0864       49,    42,   139,   138,   136,     0,   140,     0,   133,   132,
0865       18,    30,    73,    18,   153,     0,    18,    63,    80,    79,
0866       18,     0,    83,    82,    81,   196,   195,   137,    18,     0,
0867       64,   159,    59,    76,    18,     0,   123,    72,    58,     0,
0868       76,   125,    75,     0,    18,    50,    52,    51,     0,    53,
0869       77,    74
0870 };
0871 
0872 /* YYDEFGOTO[NTERM-NUM].  */
0873 static const yytype_int16 yydefgoto[] =
0874 {
0875       -1,     6,    46,     7,     8,     9,    10,    11,   252,   128,
0876       36,    27,    28,   117,   373,   199,    48,   246,   213,   247,
0877      292,   374,   211,   235,   316,   106,   107,   281,   108,   309,
0878      310,   311,   293,   369,   238,   294,   295,   138,    97,   375,
0879       50,    51,    52,    53,   254,    54,    55,    56,    57,   206,
0880       58,   267,   340,    59,    15,    62,    63,    64,   313,    98,
0881      190,    99,   100,   101,   102,   376,   377,   148,   241
0882 };
0883 
0884 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
0885    STATE-NUM.  */
0886 #define YYPACT_NINF -194
0887 static const yytype_int16 yypact[] =
0888 {
0889      380,    -2,    80,   121,    29,   169,   200,  -194,  -194,  -194,
0890     -194,  -194,    24,  -194,  -194,  -194,  -194,  -194,  -194,  -194,
0891      197,   197,   197,   197,   197,  -194,   310,  -194,  -194,   532,
0892      297,   474,   240,   452,   290,    26,   155,   198,  -194,   266,
0893      235,  -194,   222,  -194,   302,  -194,  -194,  -194,  -194,  -194,
0894       63,    53,   543,  -194,    42,   112,  -194,  -194,  -194,  -194,
0895      253,  -194,   137,   298,   244,  -194,  -194,  -194,  -194,  -194,
0896     -194,  -194,  -194,  -194,  -194,  -194,  -194,  -194,  -194,  -194,
0897     -194,  -194,  -194,  -194,  -194,  -194,  -194,  -194,  -194,  -194,
0898     -194,  -194,  -194,  -194,  -194,  -194,  -194,   565,   -36,  -194,
0899     -194,  -194,  -194,  -194,  -194,  -194,  -194,    17,  -194,   220,
0900       50,   293,  -194,  -194,  -194,  -194,  -194,   283,  -194,  -194,
0901      288,  -194,  -194,  -194,    23,  -194,   308,   273,    27,   128,
0902     -194,  -194,  -194,  -194,   613,  -194,  -194,  -194,   613,  -194,
0903     -194,    42,   352,   411,  -194,  -194,  -194,  -194,  -194,   197,
0904      267,  -194,   306,  -194,  -194,  -194,   197,   197,   197,   197,
0905      197,   197,   197,   197,   197,   197,   197,   197,   197,   197,
0906      197,   197,   197,   197,   197,   197,   197,   197,   197,   197,
0907      197,   197,   197,   197,   340,   197,  -194,  -194,  -194,  -194,
0908      527,   279,    20,   312,  -194,  -194,   284,    44,  -194,   304,
0909     -194,   227,   452,   198,   222,   307,   262,  -194,  -194,  -194,
0910     -194,  -194,   301,   230,  -194,   452,  -194,   197,   197,   197,
0911     -194,   429,   197,  -194,  -194,  -194,  -194,   197,   474,  -194,
0912      269,   197,   197,  -194,  -194,  -194,  -194,  -194,   332,  -194,
0913     -194,   322,  -194,   155,   275,  -194,  -194,   151,  -194,  -194,
0914     -194,  -194,   345,   543,  -194,  -194,  -194,   197,  -194,   428,
0915     -194,  -194,  -194,  -194,  -194,  -194,  -194,  -194,   292,  -194,
0916     -194,   144,   197,   197,   387,  -194,   197,    34,   157,   197,
0917     -194,  -194,   356,   338,   160,   155,   278,   413,  -194,   228,
0918      425,   430,  -194,  -194,  -194,  -194,  -194,  -194,  -194,    41,
0919       43,   135,  -194,  -194,  -194,   136,  -194,  -194,   130,  -194,
0920      365,   152,  -194,  -194,   197,  -194,   371,  -194,   157,  -194,
0921     -194,  -194,  -194,  -194,  -194,   375,   153,   377,   187,   384,
0922     -194,   155,  -194,  -194,  -194,   154,  -194,   130,  -194,  -194,
0923     -194,  -194,  -194,  -194,   197,   474,  -194,    17,  -194,  -194,
0924     -194,   142,  -194,  -194,  -194,  -194,  -194,  -194,  -194,    21,
0925      240,    28,   197,   197,  -194,    32,  -194,  -194,   197,   178,
0926      197,  -194,  -194,   448,  -194,  -194,  -194,  -194,   245,  -194,
0927      197,  -194
0928 };
0929 
0930 /* YYPGOTO[NTERM-NUM].  */
0931 static const yytype_int16 yypgoto[] =
0932 {
0933     -194,  -194,  -194,  -194,  -194,  -194,  -194,  -194,  -194,     0,
0934     -193,  -194,  -194,  -194,   -17,  -194,   251,  -194,  -194,  -194,
0935     -194,  -194,   242,  -194,  -194,   175,   140,  -194,  -194,   -31,
0936     -194,   133,  -194,    90,  -194,  -194,  -194,  -194,  -194,   -27,
0937      432,   246,  -101,    12,  -194,   -46,   -32,   -40,  -194,   257,
0938     -194,   208,   143,  -194,   -47,  -194,   412,  -194,  -194,  -165,
0939     -194,   289,   376,  -194,  -194,   237,   241,   -30,  -194
0940 };
0941 
0942 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
0943    positive, shift that token.  If negative, reduce the rule which
0944    number is the opposite.  If YYTABLE_NINF, syntax error.  */
0945 #define YYTABLE_NINF -155
0946 static const yytype_int16 yytable[] =
0947 {
0948       12,   109,    49,   132,   113,   243,   141,    20,    21,    22,
0949       23,    24,    47,    29,    30,   145,    31,    32,    33,   230,
0950      142,   -18,   143,   205,    25,    25,    35,    25,    25,   187,
0951       25,    25,   -18,    17,   188,   203,    25,   114,    25,   212,
0952      189,   124,   204,    43,   127,    25,   129,    25,    25,    26,
0953      315,   130,   -18,   285,   133,   236,    38,   134,    39,    40,
0954       41,   149,    13,   274,   130,   156,   157,   158,   159,   160,
0955      161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
0956      171,   172,   173,   174,   175,   176,   177,   178,   179,   180,
0957      181,   182,   183,   184,   185,   366,   208,   -18,   188,   331,
0958      198,   253,   145,   145,   189,   191,   371,   192,   193,   221,
0959      332,   242,   333,   144,   197,   195,  -103,   -90,   -90,   135,
0960      131,   201,   202,   -90,   136,   137,    38,    14,    39,    40,
0961       41,   215,    25,   131,    25,   217,   218,   219,   150,    25,
0962       25,   338,   339,   342,    14,   133,   216,   222,   134,    61,
0963      220,    -2,   286,   342,   227,   228,   255,    25,    25,   115,
0964      116,    25,   256,    37,    25,    38,   240,    39,    40,    41,
0965       42,    43,    44,   287,   288,   289,  -103,  -103,  -103,   286,
0966      361,   145,  -103,  -103,  -103,    16,   103,   104,   231,   232,
0967       37,    25,    38,   214,    39,    40,    41,    42,    43,    44,
0968       19,    25,   151,   257,   334,   336,   364,   303,   -91,   -91,
0969      135,   268,   343,   304,   -91,   136,   137,   350,   118,   -70,
0970      296,   105,   343,   357,   272,   105,   273,   323,   290,   327,
0971      291,    25,   -18,    18,   276,   277,   278,   279,   248,   249,
0972      250,   209,   125,   372,    25,   284,   286,   123,   299,   300,
0973      301,    14,   320,   322,   305,   290,   324,    37,   257,    38,
0974      155,    39,    40,    41,    42,    43,    44,   308,   260,   261,
0975      262,   263,   264,   103,   104,   314,   283,    25,   119,   -18,
0976      318,   354,   120,    25,   209,   194,   -18,   -18,   326,   328,
0977      210,   234,   -18,   251,   196,   349,    25,   353,    60,   356,
0978      200,    25,   335,   126,    44,   269,   -18,   337,   105,    61,
0979      381,    34,   344,   -18,   -18,   345,    25,   111,   146,   258,
0980      147,   -18,   290,   282,   237,   103,   104,   121,   122,   367,
0981      244,   111,   223,   210,   224,   -18,   265,   266,   275,   188,
0982      359,   229,   111,   360,    25,   189,   362,   192,   111,   239,
0983      363,    65,    66,   144,   111,    67,  -106,   112,   365,   -69,
0984      105,   368,   -18,   153,   370,   154,    38,   280,    39,    40,
0985       41,   225,   111,   226,   380,   207,    68,    69,    70,    71,
0986       72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
0987       82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
0988       92,    93,   111,    94,   302,   321,    95,     1,     2,     3,
0989        4,     5,   144,    96,   325,  -102,  -106,  -106,  -106,   312,
0990      111,   319,  -106,  -106,  -106,    38,   329,    39,    40,    41,
0991      144,   330,   341,  -105,   260,   261,   262,   263,   264,   111,
0992      346,   111,   348,    38,   352,    39,    40,    41,   111,   379,
0993      245,   355,  -154,   317,  -154,   270,    25,   188,   347,   351,
0994      378,   271,   259,   189,    37,   110,    38,   307,    39,    40,
0995       41,    42,    43,   186,   152,  -102,  -102,  -102,    25,   233,
0996      358,  -102,  -102,  -102,   297,    65,    66,     0,   298,    67,
0997        0,     0,     0,  -105,  -105,  -105,     0,     0,     0,  -105,
0998     -105,  -105,   306,   266,     0,     0,     0,     0,     0,     0,
0999       68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
1000       78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
1001       88,    89,    90,    91,    92,    93,    25,    94,    65,    66,
1002       95,     0,    67,     0,    37,     0,    38,    96,    39,    40,
1003       41,    42,    43,    44,     0,   139,     0,    38,    45,    39,
1004       40,    41,   140,    68,    69,    70,    71,    72,    73,    74,
1005       75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
1006       85,    86,    87,    88,    89,    90,    91,    92,    93,     0,
1007       94,     0,     0,    95,     0,     0,     0,     0,     0,     0,
1008       96,    68,    69,    70,    71,    72,    73,    74,    75,    76,
1009       77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
1010       87,     0,    89,    90,    91,    37,     0,    38,     0,    39,
1011       40,    41,    42,    43
1012 };
1013 
1014 #define yypact_value_is_default(yystate) \
1015   ((yystate) == (-194))
1016 
1017 #define yytable_value_is_error(yytable_value) \
1018   YYID (0)
1019 
1020 static const yytype_int16 yycheck[] =
1021 {
1022        0,    32,    29,    50,    34,   198,    52,     7,     8,     9,
1023       10,    11,    29,    13,    14,    55,    16,    17,    18,   184,
1024       52,     4,    54,   124,     4,     4,    26,     4,     4,    65,
1025        4,     4,     4,     4,    70,    12,     4,    11,     4,    12,
1026       76,    41,    19,    20,    44,     4,    46,     4,     4,    25,
1027       16,     1,    35,   246,     1,    35,    14,     4,    16,    17,
1028       18,    61,    64,   228,     1,    65,    66,    67,    68,    69,
1029       70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
1030       80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
1031       90,    91,    92,    93,    94,    74,   126,    69,    70,   292,
1032      117,   202,   142,   143,    76,   105,    74,   107,   108,   141,
1033       69,    67,    69,     1,   114,    65,     4,    64,    65,    66,
1034       70,   121,   122,    70,    71,    72,    14,    64,    16,    17,
1035       18,   131,     4,    70,     4,   135,   136,   137,     1,     4,
1036        4,    11,    12,     1,    64,     1,   134,   147,     4,    12,
1037      138,     0,     1,     1,   154,   155,   202,     4,     4,     4,
1038        5,     4,   202,    12,     4,    14,   196,    16,    17,    18,
1039       19,    20,    21,    22,    23,    24,    64,    65,    66,     1,
1040      345,   221,    70,    71,    72,    64,    33,    34,   188,   189,
1041       12,     4,    14,    65,    16,    17,    18,    19,    20,    21,
1042        0,     4,    65,   203,    69,    69,    64,   253,    64,    65,
1043       66,   211,    70,   253,    70,    71,    72,    64,    20,    67,
1044      247,    68,    70,    69,   224,    68,   226,    67,    77,     1,
1045      247,     4,     4,    64,   234,   235,   236,   237,    11,    12,
1046       13,    11,    20,    65,     4,   245,     1,    12,   248,   249,
1047      250,    64,   282,   283,   254,    77,   286,    12,   258,    14,
1048       16,    16,    17,    18,    19,    20,    21,   267,     6,     7,
1049        8,     9,    10,    33,    34,   275,     1,     4,    12,     4,
1050      280,   328,    16,     4,    11,    65,    11,    12,   288,   289,
1051       60,    12,    64,    66,     1,   325,     4,   327,     1,   329,
1052       12,     4,   302,     1,    21,     4,     4,   307,    68,    12,
1053       65,     1,   312,    11,     4,   315,     4,    64,    65,    12,
1054       67,    11,    77,     1,    12,    33,    34,    61,    62,   360,
1055       26,    64,    65,    60,    67,    60,    74,    75,    69,    70,
1056      340,     1,    64,   343,     4,    76,   346,   347,    64,    65,
1057      350,    11,    12,     1,    64,    15,     4,    67,   358,    67,
1058       68,   361,    60,    65,   364,    67,    14,    35,    16,    17,
1059       18,    65,    64,    67,   374,    67,    36,    37,    38,    39,
1060       40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
1061       50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
1062       60,    61,    64,    63,    59,    67,    66,    27,    28,    29,
1063       30,    31,     1,    73,     1,     4,    64,    65,    66,    32,
1064       64,    65,    70,    71,    72,    14,     1,    16,    17,    18,
1065        1,     1,    67,     4,     6,     7,     8,     9,    10,    64,
1066       69,    64,    67,    14,    67,    16,    17,    18,    64,     1,
1067      199,    67,    65,   278,    67,   213,     4,    70,   318,   326,
1068      370,   215,   205,    76,    12,    33,    14,   259,    16,    17,
1069       18,    19,    20,    97,    62,    64,    65,    66,     4,   190,
1070      337,    70,    71,    72,   247,    11,    12,    -1,   247,    15,
1071       -1,    -1,    -1,    64,    65,    66,    -1,    -1,    -1,    70,
1072       71,    72,    74,    75,    -1,    -1,    -1,    -1,    -1,    -1,
1073       36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
1074       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
1075       56,    57,    58,    59,    60,    61,     4,    63,    11,    12,
1076       66,    -1,    15,    -1,    12,    -1,    14,    73,    16,    17,
1077       18,    19,    20,    21,    -1,    12,    -1,    14,    26,    16,
1078       17,    18,    19,    36,    37,    38,    39,    40,    41,    42,
1079       43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
1080       53,    54,    55,    56,    57,    58,    59,    60,    61,    -1,
1081       63,    -1,    -1,    66,    -1,    -1,    -1,    -1,    -1,    -1,
1082       73,    36,    37,    38,    39,    40,    41,    42,    43,    44,
1083       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
1084       55,    -1,    57,    58,    59,    12,    -1,    14,    -1,    16,
1085       17,    18,    19,    20
1086 };
1087 
1088 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1089    symbol of state STATE-NUM.  */
1090 static const yytype_uint8 yystos[] =
1091 {
1092        0,    27,    28,    29,    30,    31,    79,    81,    82,    83,
1093       84,    85,    87,    64,    64,   132,    64,     4,    64,     0,
1094       87,    87,    87,    87,    87,     4,    25,    89,    90,    87,
1095       87,    87,    87,    87,     1,    87,    88,    12,    14,    16,
1096       17,    18,    19,    20,    21,    26,    80,    92,    94,   117,
1097      118,   119,   120,   121,   123,   124,   125,   126,   128,   131,
1098        1,    12,   133,   134,   135,    11,    12,    15,    36,    37,
1099       38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
1100       48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
1101       58,    59,    60,    61,    63,    66,    73,   116,   137,   139,
1102      140,   141,   142,    33,    34,    68,   103,   104,   106,   107,
1103      118,    64,    67,   145,    11,     4,     5,    91,    20,    12,
1104       16,    61,    62,    12,    87,    20,     1,    87,    87,    87,
1105        1,    70,   132,     1,     4,    66,    71,    72,   115,    12,
1106       19,   123,   124,   124,     1,   125,    65,    67,   145,    87,
1107        1,    65,   134,    65,    67,    16,    87,    87,    87,    87,
1108       87,    87,    87,    87,    87,    87,    87,    87,    87,    87,
1109       87,    87,    87,    87,    87,    87,    87,    87,    87,    87,
1110       87,    87,    87,    87,    87,    87,   140,    65,    70,    76,
1111      138,    87,    87,    87,    65,    65,     1,    87,    92,    93,
1112       12,    87,    87,    12,    19,   120,   127,    67,   145,    11,
1113       60,   100,    12,    96,    65,    87,   121,    87,    87,    87,
1114      121,   124,    87,    65,    67,    65,    67,    87,    87,     1,
1115      137,    87,    87,   139,    12,   101,    35,    12,   112,    65,
1116      145,   146,    67,    88,    26,    94,    95,    97,    11,    12,
1117       13,    66,    86,   120,   122,   123,   125,    87,    12,   127,
1118        6,     7,     8,     9,    10,    74,    75,   129,    87,     4,
1119      100,   119,    87,    87,   137,    69,    87,    87,    87,    87,
1120       35,   105,     1,     1,    87,    88,     1,    22,    23,    24,
1121       77,    92,    98,   110,   113,   114,   117,   143,   144,    87,
1122       87,    87,    59,   123,   125,    87,    74,   129,    87,   107,
1123      108,   109,    32,   136,    87,    16,   102,   103,    87,    65,
1124      145,    67,   145,    67,   145,     1,    87,     1,    87,     1,
1125        1,    88,    69,    69,    69,    87,    69,    87,    11,    12,
1126      130,    67,     1,    70,    87,    87,    69,   104,    67,   145,
1127       64,   109,    67,   145,   132,    67,   145,    69,   130,    87,
1128       87,   137,    87,    87,    64,    87,    74,   107,    87,   111,
1129       87,    74,    65,    92,    99,   117,   143,   144,   111,     1,
1130       87,    65
1131 };
1132 
1133 #define yyerrok     (yyerrstatus = 0)
1134 #define yyclearin   (yychar = YYEMPTY)
1135 #define YYEMPTY     (-2)
1136 #define YYEOF       0
1137 
1138 #define YYACCEPT    goto yyacceptlab
1139 #define YYABORT     goto yyabortlab
1140 #define YYERROR     goto yyerrorlab
1141 
1142 
1143 /* Like YYERROR except do call yyerror.  This remains here temporarily
1144    to ease the transition to the new meaning of YYERROR, for GCC.
1145    Once GCC version 2 has supplanted version 1, this can go.  However,
1146    YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
1147    in Bison 2.4.2's NEWS entry, where a plan to phase it out is
1148    discussed.  */
1149 
1150 #define YYFAIL      goto yyerrlab
1151 #if defined YYFAIL
1152   /* This is here to suppress warnings from the GCC cpp's
1153      -Wunused-macros.  Normally we don't worry about that warning, but
1154      some users do, and we want to make it easy for users to remove
1155      YYFAIL uses, which will produce warnings from Bison 2.5.  */
1156 #endif
1157 
1158 #define YYRECOVERING()  (!!yyerrstatus)
1159 
1160 #define YYBACKUP(Token, Value)                                  \
1161 do                                                              \
1162   if (yychar == YYEMPTY)                                        \
1163     {                                                           \
1164       yychar = (Token);                                         \
1165       yylval = (Value);                                         \
1166       YYPOPSTACK (yylen);                                       \
1167       yystate = *yyssp;                                         \
1168       goto yybackup;                                            \
1169     }                                                           \
1170   else                                                          \
1171     {                                                           \
1172       yyerror (YY_("syntax error: cannot back up")); \
1173       YYERROR;                          \
1174     }                               \
1175 while (YYID (0))
1176 
1177 
1178 #define YYTERROR    1
1179 #define YYERRCODE   256
1180 
1181 
1182 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1183    If N is 0, then set CURRENT to the empty location which ends
1184    the previous symbol: RHS[0] (always defined).  */
1185 
1186 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1187 #ifndef YYLLOC_DEFAULT
1188 # define YYLLOC_DEFAULT(Current, Rhs, N)                \
1189     do                                  \
1190       if (YYID (N))                                                    \
1191     {                               \
1192       (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;    \
1193       (Current).first_column = YYRHSLOC (Rhs, 1).first_column;  \
1194       (Current).last_line    = YYRHSLOC (Rhs, N).last_line;     \
1195       (Current).last_column  = YYRHSLOC (Rhs, N).last_column;   \
1196     }                               \
1197       else                              \
1198     {                               \
1199       (Current).first_line   = (Current).last_line   =      \
1200         YYRHSLOC (Rhs, 0).last_line;                \
1201       (Current).first_column = (Current).last_column =      \
1202         YYRHSLOC (Rhs, 0).last_column;              \
1203     }                               \
1204     while (YYID (0))
1205 #endif
1206 
1207 
1208 /* This macro is provided for backward compatibility. */
1209 
1210 #ifndef YY_LOCATION_PRINT
1211 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1212 #endif
1213 
1214 
1215 /* YYLEX -- calling `yylex' with the right arguments.  */
1216 
1217 #ifdef YYLEX_PARAM
1218 # define YYLEX yylex (&yylval, YYLEX_PARAM)
1219 #else
1220 # define YYLEX yylex (&yylval)
1221 #endif
1222 
1223 /* Enable debugging if requested.  */
1224 #if YYDEBUG
1225 
1226 # ifndef YYFPRINTF
1227 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1228 #  define YYFPRINTF fprintf
1229 # endif
1230 
1231 # define YYDPRINTF(Args)            \
1232 do {                        \
1233   if (yydebug)                  \
1234     YYFPRINTF Args;             \
1235 } while (YYID (0))
1236 
1237 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)            \
1238 do {                                      \
1239   if (yydebug)                                \
1240     {                                     \
1241       YYFPRINTF (stderr, "%s ", Title);                   \
1242       yy_symbol_print (stderr,                        \
1243           Type, Value); \
1244       YYFPRINTF (stderr, "\n");                       \
1245     }                                     \
1246 } while (YYID (0))
1247 
1248 
1249 /*--------------------------------.
1250 | Print this symbol on YYOUTPUT.  |
1251 `--------------------------------*/
1252 
1253 /*ARGSUSED*/
1254 #if (defined __STDC__ || defined __C99__FUNC__ \
1255      || defined __cplusplus || defined _MSC_VER)
1256 static void
1257 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1258 #else
1259 static void
1260 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1261     FILE *yyoutput;
1262     int yytype;
1263     YYSTYPE const * const yyvaluep;
1264 #endif
1265 {
1266   FILE *yyo = yyoutput;
1267   YYUSE (yyo);
1268   if (!yyvaluep)
1269     return;
1270 # ifdef YYPRINT
1271   if (yytype < YYNTOKENS)
1272     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1273 # else
1274   YYUSE (yyoutput);
1275 # endif
1276   switch (yytype)
1277     {
1278       default:
1279     break;
1280     }
1281 }
1282 
1283 
1284 /*--------------------------------.
1285 | Print this symbol on YYOUTPUT.  |
1286 `--------------------------------*/
1287 
1288 #if (defined __STDC__ || defined __C99__FUNC__ \
1289      || defined __cplusplus || defined _MSC_VER)
1290 static void
1291 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1292 #else
1293 static void
1294 yy_symbol_print (yyoutput, yytype, yyvaluep)
1295     FILE *yyoutput;
1296     int yytype;
1297     YYSTYPE const * const yyvaluep;
1298 #endif
1299 {
1300   if (yytype < YYNTOKENS)
1301     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1302   else
1303     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1304 
1305   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1306   YYFPRINTF (yyoutput, ")");
1307 }
1308 
1309 /*------------------------------------------------------------------.
1310 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1311 | TOP (included).                                                   |
1312 `------------------------------------------------------------------*/
1313 
1314 #if (defined __STDC__ || defined __C99__FUNC__ \
1315      || defined __cplusplus || defined _MSC_VER)
1316 static void
1317 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1318 #else
1319 static void
1320 yy_stack_print (yybottom, yytop)
1321     yytype_int16 *yybottom;
1322     yytype_int16 *yytop;
1323 #endif
1324 {
1325   YYFPRINTF (stderr, "Stack now");
1326   for (; yybottom <= yytop; yybottom++)
1327     {
1328       int yybot = *yybottom;
1329       YYFPRINTF (stderr, " %d", yybot);
1330     }
1331   YYFPRINTF (stderr, "\n");
1332 }
1333 
1334 # define YY_STACK_PRINT(Bottom, Top)                \
1335 do {                                \
1336   if (yydebug)                          \
1337     yy_stack_print ((Bottom), (Top));               \
1338 } while (YYID (0))
1339 
1340 
1341 /*------------------------------------------------.
1342 | Report that the YYRULE is going to be reduced.  |
1343 `------------------------------------------------*/
1344 
1345 #if (defined __STDC__ || defined __C99__FUNC__ \
1346      || defined __cplusplus || defined _MSC_VER)
1347 static void
1348 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1349 #else
1350 static void
1351 yy_reduce_print (yyvsp, yyrule)
1352     YYSTYPE *yyvsp;
1353     int yyrule;
1354 #endif
1355 {
1356   int yynrhs = yyr2[yyrule];
1357   int yyi;
1358   unsigned long int yylno = yyrline[yyrule];
1359   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1360          yyrule - 1, yylno);
1361   /* The symbols being reduced.  */
1362   for (yyi = 0; yyi < yynrhs; yyi++)
1363     {
1364       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
1365       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1366                &(yyvsp[(yyi + 1) - (yynrhs)])
1367                            );
1368       YYFPRINTF (stderr, "\n");
1369     }
1370 }
1371 
1372 # define YY_REDUCE_PRINT(Rule)      \
1373 do {                    \
1374   if (yydebug)              \
1375     yy_reduce_print (yyvsp, Rule); \
1376 } while (YYID (0))
1377 
1378 /* Nonzero means print parse trace.  It is left uninitialized so that
1379    multiple parsers can coexist.  */
1380 int yydebug;
1381 #else /* !YYDEBUG */
1382 # define YYDPRINTF(Args)
1383 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1384 # define YY_STACK_PRINT(Bottom, Top)
1385 # define YY_REDUCE_PRINT(Rule)
1386 #endif /* !YYDEBUG */
1387 
1388 
1389 /* YYINITDEPTH -- initial size of the parser's stacks.  */
1390 #ifndef YYINITDEPTH
1391 # define YYINITDEPTH 200
1392 #endif
1393 
1394 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1395    if the built-in stack extension method is used).
1396 
1397    Do not make this value too large; the results are undefined if
1398    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1399    evaluated with infinite-precision integer arithmetic.  */
1400 
1401 #ifndef YYMAXDEPTH
1402 # define YYMAXDEPTH 10000
1403 #endif
1404 
1405 
1406 #if YYERROR_VERBOSE
1407 
1408 # ifndef yystrlen
1409 #  if defined __GLIBC__ && defined _STRING_H
1410 #   define yystrlen strlen
1411 #  else
1412 /* Return the length of YYSTR.  */
1413 #if (defined __STDC__ || defined __C99__FUNC__ \
1414      || defined __cplusplus || defined _MSC_VER)
1415 static YYSIZE_T
1416 yystrlen (const char *yystr)
1417 #else
1418 static YYSIZE_T
1419 yystrlen (yystr)
1420     const char *yystr;
1421 #endif
1422 {
1423   YYSIZE_T yylen;
1424   for (yylen = 0; yystr[yylen]; yylen++)
1425     continue;
1426   return yylen;
1427 }
1428 #  endif
1429 # endif
1430 
1431 # ifndef yystpcpy
1432 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1433 #   define yystpcpy stpcpy
1434 #  else
1435 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1436    YYDEST.  */
1437 #if (defined __STDC__ || defined __C99__FUNC__ \
1438      || defined __cplusplus || defined _MSC_VER)
1439 static char *
1440 yystpcpy (char *yydest, const char *yysrc)
1441 #else
1442 static char *
1443 yystpcpy (yydest, yysrc)
1444     char *yydest;
1445     const char *yysrc;
1446 #endif
1447 {
1448   char *yyd = yydest;
1449   const char *yys = yysrc;
1450 
1451   while ((*yyd++ = *yys++) != '\0')
1452     continue;
1453 
1454   return yyd - 1;
1455 }
1456 #  endif
1457 # endif
1458 
1459 # ifndef yytnamerr
1460 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1461    quotes and backslashes, so that it's suitable for yyerror.  The
1462    heuristic is that double-quoting is unnecessary unless the string
1463    contains an apostrophe, a comma, or backslash (other than
1464    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1465    null, do not copy; instead, return the length of what the result
1466    would have been.  */
1467 static YYSIZE_T
1468 yytnamerr (char *yyres, const char *yystr)
1469 {
1470   if (*yystr == '"')
1471     {
1472       YYSIZE_T yyn = 0;
1473       char const *yyp = yystr;
1474 
1475       for (;;)
1476     switch (*++yyp)
1477       {
1478       case '\'':
1479       case ',':
1480         goto do_not_strip_quotes;
1481 
1482       case '\\':
1483         if (*++yyp != '\\')
1484           goto do_not_strip_quotes;
1485         /* Fall through.  */
1486       default:
1487         if (yyres)
1488           yyres[yyn] = *yyp;
1489         yyn++;
1490         break;
1491 
1492       case '"':
1493         if (yyres)
1494           yyres[yyn] = '\0';
1495         return yyn;
1496       }
1497     do_not_strip_quotes: ;
1498     }
1499 
1500   if (! yyres)
1501     return yystrlen (yystr);
1502 
1503   return yystpcpy (yyres, yystr) - yyres;
1504 }
1505 # endif
1506 
1507 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1508    about the unexpected token YYTOKEN for the state stack whose top is
1509    YYSSP.
1510 
1511    Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
1512    not large enough to hold the message.  In that case, also set
1513    *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
1514    required number of bytes is too large to store.  */
1515 static int
1516 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1517                 yytype_int16 *yyssp, int yytoken)
1518 {
1519   YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
1520   YYSIZE_T yysize = yysize0;
1521   YYSIZE_T yysize1;
1522   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1523   /* Internationalized format string. */
1524   const char *yyformat = YY_NULL;
1525   /* Arguments of yyformat. */
1526   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1527   /* Number of reported tokens (one for the "unexpected", one per
1528      "expected"). */
1529   int yycount = 0;
1530 
1531   /* There are many possibilities here to consider:
1532      - Assume YYFAIL is not used.  It's too flawed to consider.  See
1533        <https://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1534        for details.  YYERROR is fine as it does not invoke this
1535        function.
1536      - If this state is a consistent state with a default action, then
1537        the only way this function was invoked is if the default action
1538        is an error action.  In that case, don't check for expected
1539        tokens because there are none.
1540      - The only way there can be no lookahead present (in yychar) is if
1541        this state is a consistent state with a default action.  Thus,
1542        detecting the absence of a lookahead is sufficient to determine
1543        that there is no unexpected or expected token to report.  In that
1544        case, just report a simple "syntax error".
1545      - Don't assume there isn't a lookahead just because this state is a
1546        consistent state with a default action.  There might have been a
1547        previous inconsistent state, consistent state with a non-default
1548        action, or user semantic action that manipulated yychar.
1549      - Of course, the expected token list depends on states to have
1550        correct lookahead information, and it depends on the parser not
1551        to perform extra reductions after fetching a lookahead from the
1552        scanner and before detecting a syntax error.  Thus, state merging
1553        (from LALR or IELR) and default reductions corrupt the expected
1554        token list.  However, the list is correct for canonical LR with
1555        one exception: it will still contain any token that will not be
1556        accepted due to an error action in a later state.
1557   */
1558   if (yytoken != YYEMPTY)
1559     {
1560       int yyn = yypact[*yyssp];
1561       yyarg[yycount++] = yytname[yytoken];
1562       if (!yypact_value_is_default (yyn))
1563         {
1564           /* Start YYX at -YYN if negative to avoid negative indexes in
1565              YYCHECK.  In other words, skip the first -YYN actions for
1566              this state because they are default actions.  */
1567           int yyxbegin = yyn < 0 ? -yyn : 0;
1568           /* Stay within bounds of both yycheck and yytname.  */
1569           int yychecklim = YYLAST - yyn + 1;
1570           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1571           int yyx;
1572 
1573           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1574             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1575                 && !yytable_value_is_error (yytable[yyx + yyn]))
1576               {
1577                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1578                   {
1579                     yycount = 1;
1580                     yysize = yysize0;
1581                     break;
1582                   }
1583                 yyarg[yycount++] = yytname[yyx];
1584                 yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1585                 if (! (yysize <= yysize1
1586                        && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1587                   return 2;
1588                 yysize = yysize1;
1589               }
1590         }
1591     }
1592 
1593   switch (yycount)
1594     {
1595 # define YYCASE_(N, S)                      \
1596       case N:                               \
1597         yyformat = S;                       \
1598       break
1599       YYCASE_(0, YY_("syntax error"));
1600       YYCASE_(1, YY_("syntax error, unexpected %s"));
1601       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1602       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1603       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1604       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1605 # undef YYCASE_
1606     }
1607 
1608   yysize1 = yysize + yystrlen (yyformat);
1609   if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1610     return 2;
1611   yysize = yysize1;
1612 
1613   if (*yymsg_alloc < yysize)
1614     {
1615       *yymsg_alloc = 2 * yysize;
1616       if (! (yysize <= *yymsg_alloc
1617              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1618         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1619       return 1;
1620     }
1621 
1622   /* Avoid sprintf, as that infringes on the user's name space.
1623      Don't have undefined behavior even if the translation
1624      produced a string with the wrong number of "%s"s.  */
1625   {
1626     char *yyp = *yymsg;
1627     int yyi = 0;
1628     while ((*yyp = *yyformat) != '\0')
1629       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1630         {
1631           yyp += yytnamerr (yyp, yyarg[yyi++]);
1632           yyformat += 2;
1633         }
1634       else
1635         {
1636           yyp++;
1637           yyformat++;
1638         }
1639   }
1640   return 0;
1641 }
1642 #endif /* YYERROR_VERBOSE */
1643 
1644 /*-----------------------------------------------.
1645 | Release the memory associated to this symbol.  |
1646 `-----------------------------------------------*/
1647 
1648 /*ARGSUSED*/
1649 #if (defined __STDC__ || defined __C99__FUNC__ \
1650      || defined __cplusplus || defined _MSC_VER)
1651 static void
1652 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1653 #else
1654 static void
1655 yydestruct (yymsg, yytype, yyvaluep)
1656     const char *yymsg;
1657     int yytype;
1658     YYSTYPE *yyvaluep;
1659 #endif
1660 {
1661   YYUSE (yyvaluep);
1662 
1663   if (!yymsg)
1664     yymsg = "Deleting";
1665   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1666 
1667   switch (yytype)
1668     {
1669       case 102: /* "maybe_media_value" */
1670 
1671     { delete (yyvaluep->valueList); (yyvaluep->valueList) = nullptr; };
1672 
1673     break;
1674       case 104: /* "media_query_exp_list" */
1675 
1676     { delete (yyvaluep->mediaQueryExpList); (yyvaluep->mediaQueryExpList) = nullptr; };
1677 
1678     break;
1679       case 105: /* "maybe_and_media_query_exp_list" */
1680 
1681     { delete (yyvaluep->mediaQueryExpList); (yyvaluep->mediaQueryExpList) = nullptr; };
1682 
1683     break;
1684       case 108: /* "maybe_media_list" */
1685 
1686     { delete (yyvaluep->mediaList); (yyvaluep->mediaList) = nullptr; };
1687 
1688     break;
1689       case 109: /* "media_list" */
1690 
1691     { delete (yyvaluep->mediaList); (yyvaluep->mediaList) = nullptr; };
1692 
1693     break;
1694       case 111: /* "ruleset_list" */
1695 
1696     { delete (yyvaluep->ruleList); (yyvaluep->ruleList) = nullptr; };
1697 
1698     break;
1699       case 118: /* "selector_list" */
1700 
1701     { if ((yyvaluep->selectorList)) qDeleteAll(*(yyvaluep->selectorList)); delete (yyvaluep->selectorList); (yyvaluep->selectorList) = nullptr; };
1702 
1703     break;
1704       case 119: /* "selector" */
1705 
1706     { delete (yyvaluep->selector); (yyvaluep->selector) = nullptr; };
1707 
1708     break;
1709       case 121: /* "simple_selector" */
1710 
1711     { delete (yyvaluep->selector); (yyvaluep->selector) = nullptr; };
1712 
1713     break;
1714       case 122: /* "simple_css3_selector" */
1715 
1716     { delete (yyvaluep->selector); (yyvaluep->selector) = nullptr; };
1717 
1718     break;
1719       case 124: /* "specifier_list" */
1720 
1721     { delete (yyvaluep->selector); (yyvaluep->selector) = nullptr; };
1722 
1723     break;
1724       case 125: /* "specifier" */
1725 
1726     { delete (yyvaluep->selector); (yyvaluep->selector) = nullptr; };
1727 
1728     break;
1729       case 126: /* "class" */
1730 
1731     { delete (yyvaluep->selector); (yyvaluep->selector) = nullptr; };
1732 
1733     break;
1734       case 128: /* "attrib" */
1735 
1736     { delete (yyvaluep->selector); (yyvaluep->selector) = nullptr; };
1737 
1738     break;
1739       case 131: /* "pseudo" */
1740 
1741     { delete (yyvaluep->selector); (yyvaluep->selector) = nullptr; };
1742 
1743     break;
1744       case 137: /* "expr" */
1745 
1746     { delete (yyvaluep->valueList); (yyvaluep->valueList) = nullptr; };
1747 
1748     break;
1749       case 141: /* "function" */
1750 
1751     { if ((yyvaluep->value).function) delete (yyvaluep->value).function->args; delete (yyvaluep->value).function; (yyvaluep->value).function = nullptr; };
1752 
1753     break;
1754 
1755       default:
1756     break;
1757     }
1758 }
1759 
1760 
1761 /* Prevent warnings from -Wmissing-prototypes.  */
1762 #ifdef YYPARSE_PARAM
1763 #if defined __STDC__ || defined __cplusplus
1764 int yyparse (void *YYPARSE_PARAM);
1765 #else
1766 int yyparse ();
1767 #endif
1768 #else /* ! YYPARSE_PARAM */
1769 #if defined __STDC__ || defined __cplusplus
1770 int yyparse (void);
1771 #else
1772 int yyparse ();
1773 #endif
1774 #endif /* ! YYPARSE_PARAM */
1775 
1776 
1777 /*----------.
1778 | yyparse.  |
1779 `----------*/
1780 
1781 #ifdef YYPARSE_PARAM
1782 #if (defined __STDC__ || defined __C99__FUNC__ \
1783      || defined __cplusplus || defined _MSC_VER)
1784 int
1785 yyparse (void *YYPARSE_PARAM)
1786 #else
1787 int
1788 yyparse (YYPARSE_PARAM)
1789     void *YYPARSE_PARAM;
1790 #endif
1791 #else /* ! YYPARSE_PARAM */
1792 #if (defined __STDC__ || defined __C99__FUNC__ \
1793      || defined __cplusplus || defined _MSC_VER)
1794 int
1795 yyparse (void)
1796 #else
1797 int
1798 yyparse ()
1799 
1800 #endif
1801 #endif
1802 {
1803 /* The lookahead symbol.  */
1804 int yychar;
1805 
1806 /* The semantic value of the lookahead symbol.  */
1807 YYSTYPE yylval;
1808 
1809     /* Number of syntax errors so far.  */
1810     int yynerrs;
1811 
1812     int yystate;
1813     /* Number of tokens to shift before error messages enabled.  */
1814     int yyerrstatus;
1815 
1816     /* The stacks and their tools:
1817        `yyss': related to states.
1818        `yyvs': related to semantic values.
1819 
1820        Refer to the stacks through separate pointers, to allow yyoverflow
1821        to reallocate them elsewhere.  */
1822 
1823     /* The state stack.  */
1824     yytype_int16 yyssa[YYINITDEPTH];
1825     yytype_int16 *yyss;
1826     yytype_int16 *yyssp;
1827 
1828     /* The semantic value stack.  */
1829     YYSTYPE yyvsa[YYINITDEPTH];
1830     YYSTYPE *yyvs;
1831     YYSTYPE *yyvsp;
1832 
1833     YYSIZE_T yystacksize;
1834 
1835   int yyn;
1836   int yyresult;
1837   /* Lookahead token as an internal (translated) token number.  */
1838   int yytoken;
1839   /* The variables used to return semantic value and location from the
1840      action routines.  */
1841   YYSTYPE yyval;
1842 
1843 #if YYERROR_VERBOSE
1844   /* Buffer for error messages, and its allocated size.  */
1845   char yymsgbuf[128];
1846   char *yymsg = yymsgbuf;
1847   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1848 #endif
1849 
1850 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1851 
1852   /* The number of symbols on the RHS of the reduced rule.
1853      Keep to zero when no symbol should be popped.  */
1854   int yylen = 0;
1855 
1856   yytoken = 0;
1857   yyss = yyssa;
1858   yyvs = yyvsa;
1859   yystacksize = YYINITDEPTH;
1860 
1861   YYDPRINTF ((stderr, "Starting parse\n"));
1862 
1863   yystate = 0;
1864   yyerrstatus = 0;
1865   yynerrs = 0;
1866   yychar = YYEMPTY; /* Cause a token to be read.  */
1867 
1868   /* Initialize stack pointers.
1869      Waste one element of value and location stack
1870      so that they stay on the same level as the state stack.
1871      The wasted elements are never initialized.  */
1872   yyssp = yyss;
1873   yyvsp = yyvs;
1874 
1875   goto yysetstate;
1876 
1877 /*------------------------------------------------------------.
1878 | yynewstate -- Push a new state, which is found in yystate.  |
1879 `------------------------------------------------------------*/
1880  yynewstate:
1881   /* In all cases, when you get here, the value and location stacks
1882      have just been pushed.  So pushing a state here evens the stacks.  */
1883   yyssp++;
1884 
1885  yysetstate:
1886   *yyssp = yystate;
1887 
1888   if (yyss + yystacksize - 1 <= yyssp)
1889     {
1890       /* Get the current used size of the three stacks, in elements.  */
1891       YYSIZE_T yysize = yyssp - yyss + 1;
1892 
1893 #ifdef yyoverflow
1894       {
1895     /* Give user a chance to reallocate the stack.  Use copies of
1896        these so that the &'s don't force the real ones into
1897        memory.  */
1898     YYSTYPE *yyvs1 = yyvs;
1899     yytype_int16 *yyss1 = yyss;
1900 
1901     /* Each stack pointer address is followed by the size of the
1902        data in use in that stack, in bytes.  This used to be a
1903        conditional around just the two extra args, but that might
1904        be undefined if yyoverflow is a macro.  */
1905     yyoverflow (YY_("memory exhausted"),
1906             &yyss1, yysize * sizeof (*yyssp),
1907             &yyvs1, yysize * sizeof (*yyvsp),
1908             &yystacksize);
1909 
1910     yyss = yyss1;
1911     yyvs = yyvs1;
1912       }
1913 #else /* no yyoverflow */
1914 # ifndef YYSTACK_RELOCATE
1915       goto yyexhaustedlab;
1916 # else
1917       /* Extend the stack our own way.  */
1918       if (YYMAXDEPTH <= yystacksize)
1919     goto yyexhaustedlab;
1920       yystacksize *= 2;
1921       if (YYMAXDEPTH < yystacksize)
1922     yystacksize = YYMAXDEPTH;
1923 
1924       {
1925     yytype_int16 *yyss1 = yyss;
1926     union yyalloc *yyptr =
1927       (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1928     if (! yyptr)
1929       goto yyexhaustedlab;
1930     YYSTACK_RELOCATE (yyss_alloc, yyss);
1931     YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1932 #  undef YYSTACK_RELOCATE
1933     if (yyss1 != yyssa)
1934       YYSTACK_FREE (yyss1);
1935       }
1936 # endif
1937 #endif /* no yyoverflow */
1938 
1939       yyssp = yyss + yysize - 1;
1940       yyvsp = yyvs + yysize - 1;
1941 
1942       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1943           (unsigned long int) yystacksize));
1944 
1945       if (yyss + yystacksize - 1 <= yyssp)
1946     YYABORT;
1947     }
1948 
1949   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1950 
1951   if (yystate == YYFINAL)
1952     YYACCEPT;
1953 
1954   goto yybackup;
1955 
1956 /*-----------.
1957 | yybackup.  |
1958 `-----------*/
1959 yybackup:
1960 
1961   /* Do appropriate processing given the current state.  Read a
1962      lookahead token if we need one and don't already have one.  */
1963 
1964   /* First try to decide what to do without reference to lookahead token.  */
1965   yyn = yypact[yystate];
1966   if (yypact_value_is_default (yyn))
1967     goto yydefault;
1968 
1969   /* Not known => get a lookahead token if don't already have one.  */
1970 
1971   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1972   if (yychar == YYEMPTY)
1973     {
1974       YYDPRINTF ((stderr, "Reading a token: "));
1975       yychar = YYLEX;
1976     }
1977 
1978   if (yychar <= YYEOF)
1979     {
1980       yychar = yytoken = YYEOF;
1981       YYDPRINTF ((stderr, "Now at end of input.\n"));
1982     }
1983   else
1984     {
1985       yytoken = YYTRANSLATE (yychar);
1986       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1987     }
1988 
1989   /* If the proper action on seeing token YYTOKEN is to reduce or to
1990      detect an error, take that action.  */
1991   yyn += yytoken;
1992   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1993     goto yydefault;
1994   yyn = yytable[yyn];
1995   if (yyn <= 0)
1996     {
1997       if (yytable_value_is_error (yyn))
1998         goto yyerrlab;
1999       yyn = -yyn;
2000       goto yyreduce;
2001     }
2002 
2003   /* Count tokens shifted since error; after three, turn off error
2004      status.  */
2005   if (yyerrstatus)
2006     yyerrstatus--;
2007 
2008   /* Shift the lookahead token.  */
2009   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2010 
2011   /* Discard the shifted token.  */
2012   yychar = YYEMPTY;
2013 
2014   yystate = yyn;
2015   *++yyvsp = yylval;
2016 
2017   goto yynewstate;
2018 
2019 
2020 /*-----------------------------------------------------------.
2021 | yydefault -- do the default action for the current state.  |
2022 `-----------------------------------------------------------*/
2023 yydefault:
2024   yyn = yydefact[yystate];
2025   if (yyn == 0)
2026     goto yyerrlab;
2027   goto yyreduce;
2028 
2029 
2030 /*-----------------------------.
2031 | yyreduce -- Do a reduction.  |
2032 `-----------------------------*/
2033 yyreduce:
2034   /* yyn is the number of a rule to reduce with.  */
2035   yylen = yyr2[yyn];
2036 
2037   /* If YYLEN is nonzero, implement the default value of the action:
2038      `$$ = $1'.
2039 
2040      Otherwise, the following line sets YYVAL to garbage.
2041      This behavior is undocumented and Bison
2042      users should not rely upon it.  Assigning to YYVAL
2043      unconditionally makes the parser a bit smaller, and it avoids a
2044      GCC warning that YYVAL may be used uninitialized.  */
2045   yyval = yyvsp[1-yylen];
2046 
2047 
2048   YY_REDUCE_PRINT (yyn);
2049   switch (yyn)
2050     {
2051         case 11:
2052 
2053     {
2054         CSSParser *p = static_cast<CSSParser *>(parser);
2055     p->rule = (yyvsp[(4) - (6)].rule);
2056     }
2057     break;
2058 
2059   case 12:
2060 
2061     {
2062     /* can be empty */
2063     }
2064     break;
2065 
2066   case 13:
2067 
2068     {
2069     CSSParser *p = static_cast<CSSParser *>(parser);
2070     if ( (yyvsp[(4) - (5)].valueList) ) {
2071         p->valueList = (yyvsp[(4) - (5)].valueList);
2072 #ifdef CSS_DEBUG
2073         qCDebug(KHTML_LOG) << "   got property for " << p->id <<
2074         (p->important?" important":"");
2075         bool ok =
2076 #endif
2077         p->parseValue( p->id, p->important );
2078 #ifdef CSS_DEBUG
2079         if ( !ok )
2080         qCDebug(KHTML_LOG) << "     couldn't parse value!";
2081 #endif
2082     }
2083 #ifdef CSS_DEBUG
2084     else
2085         qCDebug(KHTML_LOG) << "     no value found!";
2086 #endif
2087     delete p->valueList;
2088     p->valueList = nullptr;
2089     }
2090     break;
2091 
2092   case 14:
2093 
2094     {
2095         CSSParser *p = static_cast<CSSParser *>(parser);
2096         if ((yyvsp[(4) - (5)].selectorList)) {
2097             p->selectors = *(yyvsp[(4) - (5)].selectorList);
2098             delete (yyvsp[(4) - (5)].selectorList);
2099             (yyvsp[(4) - (5)].selectorList) = nullptr;
2100         } else
2101             p->selectors.clear(); // parse error
2102     }
2103     break;
2104 
2105   case 15:
2106 
2107     {
2108          CSSParser *p = static_cast<CSSParser *>(parser);
2109          p->mediaQuery = (yyvsp[(4) - (5)].mediaQuery);
2110      }
2111     break;
2112 
2113   case 25:
2114 
2115     {
2116 #ifdef CSS_DEBUG
2117      qCDebug(KHTML_LOG) << "charset rule: " << qString((yyvsp[(3) - (5)].string));
2118 #endif
2119      CSSParser* p = static_cast<CSSParser*>(parser);
2120      if (p->styleElement && p->styleElement->isCSSStyleSheet()) {
2121          p->styleElement->append( new CSSCharsetRuleImpl(p->styleElement, domString((yyvsp[(3) - (5)].string))) );
2122      }
2123  }
2124     break;
2125 
2126   case 26:
2127 
2128     {
2129  }
2130     break;
2131 
2132   case 27:
2133 
2134     {
2135  }
2136     break;
2137 
2138   case 29:
2139 
2140     {
2141      CSSParser *p = static_cast<CSSParser *>(parser);
2142      if ( (yyvsp[(2) - (3)].rule) && p->styleElement && p->styleElement->isCSSStyleSheet() ) {
2143      p->styleElement->append( (yyvsp[(2) - (3)].rule) );
2144      } else {
2145      delete (yyvsp[(2) - (3)].rule);
2146      }
2147  }
2148     break;
2149 
2150   case 30:
2151 
2152     {
2153 #ifdef CSS_DEBUG
2154     qCDebug(KHTML_LOG) << "@import: " << qString((yyvsp[(3) - (6)].string));
2155 #endif
2156     CSSParser *p = static_cast<CSSParser *>(parser);
2157     if ( (yyvsp[(5) - (6)].mediaList) && p->styleElement && p->styleElement->isCSSStyleSheet() )
2158         (yyval.rule) = new CSSImportRuleImpl( p->styleElement, domString((yyvsp[(3) - (6)].string)), (yyvsp[(5) - (6)].mediaList) );
2159     else
2160         (yyval.rule) = nullptr;
2161     }
2162     break;
2163 
2164   case 31:
2165 
2166     {
2167         (yyval.rule) = nullptr;
2168     }
2169     break;
2170 
2171   case 32:
2172 
2173     {
2174         (yyval.rule) = nullptr;
2175     }
2176     break;
2177 
2178   case 35:
2179 
2180     {
2181 #ifdef CSS_DEBUG
2182     qCDebug(KHTML_LOG) << "@namespace: " << qString((yyvsp[(3) - (4)].string)) << qString((yyvsp[(4) - (4)].string));
2183 #endif
2184     CSSParser *p = static_cast<CSSParser *>(parser);
2185     (yyval.rule) = new CSSNamespaceRuleImpl(p->styleElement, domString((yyvsp[(3) - (4)].string)), domString((yyvsp[(4) - (4)].string)));
2186  }
2187     break;
2188 
2189   case 36:
2190 
2191     {
2192     CSSParser *p = static_cast<CSSParser *>(parser);
2193     if (p->styleElement && p->styleElement->isCSSStyleSheet())
2194     static_cast<CSSStyleSheetImpl*>(p->styleElement)->appendNamespaceRule
2195                     (static_cast<CSSNamespaceRuleImpl*>((yyvsp[(1) - (3)].rule))); 
2196                             // can't use ->append since it 
2197                             // wouldn't keep track of dirtiness
2198  }
2199     break;
2200 
2201   case 39:
2202 
2203     { (yyval.string).string = nullptr; }
2204     break;
2205 
2206   case 40:
2207 
2208     { (yyval.string) = (yyvsp[(1) - (2)].string); }
2209     break;
2210 
2211   case 42:
2212 
2213     {
2214      CSSParser *p = static_cast<CSSParser *>(parser);
2215      if ( (yyvsp[(2) - (3)].rule) && p->styleElement && p->styleElement->isCSSStyleSheet() ) {
2216      p->styleElement->append( (yyvsp[(2) - (3)].rule) );
2217      } else {
2218      delete (yyvsp[(2) - (3)].rule);
2219      }
2220  }
2221     break;
2222 
2223   case 49:
2224 
2225     { delete (yyvsp[(1) - (2)].rule); (yyval.rule) = nullptr; }
2226     break;
2227 
2228   case 53:
2229 
2230     { delete (yyvsp[(1) - (2)].rule); (yyval.rule) = nullptr; }
2231     break;
2232 
2233   case 56:
2234 
2235     {
2236         (yyval.string) = (yyvsp[(1) - (2)].string);
2237     }
2238     break;
2239 
2240   case 57:
2241 
2242     {
2243         (yyval.valueList) = nullptr;
2244     }
2245     break;
2246 
2247   case 58:
2248 
2249     {
2250         (yyval.valueList) = (yyvsp[(3) - (4)].valueList);
2251     }
2252     break;
2253 
2254   case 59:
2255 
2256     {
2257         (yyval.mediaQueryExp) = new khtml::MediaQueryExp(domString((yyvsp[(3) - (7)].string)).lower(), (yyvsp[(5) - (7)].valueList));
2258     }
2259     break;
2260 
2261   case 60:
2262 
2263     {
2264       (yyval.mediaQueryExpList) =  new QList<khtml::MediaQueryExp*>;
2265       (yyval.mediaQueryExpList)->append((yyvsp[(1) - (1)].mediaQueryExp));
2266     }
2267     break;
2268 
2269   case 61:
2270 
2271     {
2272       (yyval.mediaQueryExpList) = (yyvsp[(1) - (5)].mediaQueryExpList);
2273       (yyval.mediaQueryExpList)->append((yyvsp[(5) - (5)].mediaQueryExp));
2274     }
2275     break;
2276 
2277   case 62:
2278 
2279     {
2280         (yyval.mediaQueryExpList) = new QList<khtml::MediaQueryExp*>;
2281     }
2282     break;
2283 
2284   case 63:
2285 
2286     {
2287         (yyval.mediaQueryExpList) = (yyvsp[(3) - (3)].mediaQueryExpList);
2288     }
2289     break;
2290 
2291   case 64:
2292 
2293     {
2294         (yyval.mediaQueryRestrictor) = khtml::MediaQuery::None;
2295     }
2296     break;
2297 
2298   case 65:
2299 
2300     {
2301         (yyval.mediaQueryRestrictor) = khtml::MediaQuery::Only;
2302     }
2303     break;
2304 
2305   case 66:
2306 
2307     {
2308         (yyval.mediaQueryRestrictor) = khtml::MediaQuery::Not;
2309     }
2310     break;
2311 
2312   case 67:
2313 
2314     {
2315         (yyval.mediaQuery) = new khtml::MediaQuery(khtml::MediaQuery::None, "all", (yyvsp[(1) - (1)].mediaQueryExpList));
2316     }
2317     break;
2318 
2319   case 68:
2320 
2321     {
2322         (yyval.mediaQuery) = new khtml::MediaQuery((yyvsp[(1) - (4)].mediaQueryRestrictor), domString((yyvsp[(3) - (4)].string)).lower(), (yyvsp[(4) - (4)].mediaQueryExpList));
2323     }
2324     break;
2325 
2326   case 69:
2327 
2328     {
2329     (yyval.mediaList) = new MediaListImpl();
2330     }
2331     break;
2332 
2333   case 71:
2334 
2335     {
2336         (yyval.mediaList) = new MediaListImpl();
2337         (yyval.mediaList)->appendMediaQuery((yyvsp[(1) - (1)].mediaQuery));
2338     }
2339     break;
2340 
2341   case 72:
2342 
2343     {
2344     (yyval.mediaList) = (yyvsp[(1) - (4)].mediaList);
2345     if ((yyval.mediaList))
2346         (yyval.mediaList)->appendMediaQuery( (yyvsp[(4) - (4)].mediaQuery) );
2347     }
2348     break;
2349 
2350   case 73:
2351 
2352     {
2353        delete (yyvsp[(1) - (2)].mediaList);
2354        (yyval.mediaList) = nullptr;
2355     }
2356     break;
2357 
2358   case 74:
2359 
2360     {
2361     CSSParser *p = static_cast<CSSParser *>(parser);
2362     if ( (yyvsp[(3) - (7)].mediaList) && (yyvsp[(6) - (7)].ruleList) &&
2363          p->styleElement && p->styleElement->isCSSStyleSheet() ) {
2364         (yyval.rule) = new CSSMediaRuleImpl( static_cast<CSSStyleSheetImpl*>(p->styleElement), (yyvsp[(3) - (7)].mediaList), (yyvsp[(6) - (7)].ruleList) );
2365     } else {
2366         (yyval.rule) = nullptr;
2367         delete (yyvsp[(3) - (7)].mediaList);
2368         delete (yyvsp[(6) - (7)].ruleList);
2369     }
2370     }
2371     break;
2372 
2373   case 75:
2374 
2375     {
2376         CSSParser *p = static_cast<CSSParser *>(parser);
2377         if ((yyvsp[(5) - (6)].ruleList) && p->styleElement && p->styleElement->isCSSStyleSheet() ) {
2378             (yyval.rule) = new CSSMediaRuleImpl( static_cast<CSSStyleSheetImpl*>(p->styleElement), nullptr, (yyvsp[(5) - (6)].ruleList));
2379         } else {
2380             (yyval.rule) = nullptr;
2381             delete (yyvsp[(5) - (6)].ruleList);
2382         }
2383     }
2384     break;
2385 
2386   case 76:
2387 
2388     { (yyval.ruleList) = nullptr; }
2389     break;
2390 
2391   case 77:
2392 
2393     {
2394       (yyval.ruleList) = (yyvsp[(1) - (3)].ruleList);
2395       if ( (yyvsp[(2) - (3)].rule) ) {
2396       if ( !(yyval.ruleList) ) (yyval.ruleList) = new CSSRuleListImpl();
2397       (yyval.ruleList)->append( (yyvsp[(2) - (3)].rule) );
2398       }
2399   }
2400     break;
2401 
2402   case 78:
2403 
2404     {
2405       (yyval.string) = (yyvsp[(1) - (2)].string);
2406   }
2407     break;
2408 
2409   case 79:
2410 
2411     {
2412       (yyval.rule) = nullptr;
2413     }
2414     break;
2415 
2416   case 80:
2417 
2418     {
2419       (yyval.rule) = nullptr;
2420     }
2421     break;
2422 
2423   case 81:
2424 
2425     {
2426       CSSParser *p = static_cast<CSSParser *>(parser);
2427       CSSFontFaceRuleImpl *rule = new CSSFontFaceRuleImpl( p->styleElement );
2428       CSSStyleDeclarationImpl *decl = p->createFontFaceStyleDeclaration( rule );
2429       rule->setDeclaration(decl);
2430       (yyval.rule) = rule;
2431     }
2432     break;
2433 
2434   case 82:
2435 
2436     {
2437       (yyval.rule) = nullptr;
2438     }
2439     break;
2440 
2441   case 83:
2442 
2443     {
2444       (yyval.rule) = nullptr;
2445     }
2446     break;
2447 
2448   case 84:
2449 
2450     { (yyval.relation) = CSSSelector::DirectAdjacent; }
2451     break;
2452 
2453   case 85:
2454 
2455     { (yyval.relation) = CSSSelector::IndirectAdjacent; }
2456     break;
2457 
2458   case 86:
2459 
2460     { (yyval.relation) = CSSSelector::Child; }
2461     break;
2462 
2463   case 87:
2464 
2465     { (yyval.val) = -1; }
2466     break;
2467 
2468   case 88:
2469 
2470     { (yyval.val) = 1; }
2471     break;
2472 
2473   case 89:
2474 
2475     {
2476 #ifdef CSS_DEBUG
2477     qCDebug(KHTML_LOG) << "got ruleset" << endl << "  selector:";
2478 #endif
2479     CSSParser *p = static_cast<CSSParser *>(parser);
2480     if ( (yyvsp[(1) - (2)].selectorList)  ) {
2481         CSSStyleRuleImpl *rule = new CSSStyleRuleImpl( p->styleElement );
2482         CSSStyleDeclarationImpl *decl = p->createStyleDeclaration( rule );
2483         rule->setSelector( (yyvsp[(1) - (2)].selectorList) );
2484         rule->setDeclaration(decl);
2485         (yyval.rule) = rule;
2486     } else {
2487         (yyval.rule) = nullptr;
2488         if ((yyvsp[(1) - (2)].selectorList)) qDeleteAll(*(yyvsp[(1) - (2)].selectorList));
2489         delete (yyvsp[(1) - (2)].selectorList);
2490         (yyvsp[(1) - (2)].selectorList) = nullptr;
2491         p->clearProperties();
2492     }
2493     }
2494     break;
2495 
2496   case 90:
2497 
2498     {
2499     if ( (yyvsp[(1) - (1)].selector) ) {
2500         (yyval.selectorList) = new QList<CSSSelector*>;
2501 #ifdef CSS_DEBUG
2502         qCDebug(KHTML_LOG) << "   got simple selector:";
2503         (yyvsp[(1) - (1)].selector)->print();
2504 #endif
2505         (yyval.selectorList)->append( (yyvsp[(1) - (1)].selector) );
2506         khtml::CSSStyleSelector::precomputeAttributeDependencies(static_cast<CSSParser *>(parser)->document(), (yyvsp[(1) - (1)].selector));
2507     } else {
2508         (yyval.selectorList) = nullptr;
2509     }
2510     }
2511     break;
2512 
2513   case 91:
2514 
2515     {
2516     if ( (yyvsp[(1) - (4)].selectorList) && (yyvsp[(4) - (4)].selector) ) {
2517         (yyval.selectorList) = (yyvsp[(1) - (4)].selectorList);
2518         (yyval.selectorList)->append( (yyvsp[(4) - (4)].selector) );
2519         khtml::CSSStyleSelector::precomputeAttributeDependencies(static_cast<CSSParser *>(parser)->document(), (yyvsp[(4) - (4)].selector));
2520 #ifdef CSS_DEBUG
2521         qCDebug(KHTML_LOG) << "   got simple selector:";
2522         (yyvsp[(4) - (4)].selector)->print();
2523 #endif
2524     } else {
2525             if ((yyvsp[(1) - (4)].selectorList)) qDeleteAll(*(yyvsp[(1) - (4)].selectorList));
2526         delete (yyvsp[(1) - (4)].selectorList);
2527         (yyvsp[(1) - (4)].selectorList)=nullptr;
2528 
2529         delete (yyvsp[(4) - (4)].selector);
2530         (yyval.selectorList) = nullptr;
2531     }
2532     }
2533     break;
2534 
2535   case 92:
2536 
2537     {
2538         if ((yyvsp[(1) - (2)].selectorList)) qDeleteAll(*(yyvsp[(1) - (2)].selectorList));
2539     delete (yyvsp[(1) - (2)].selectorList);
2540     (yyvsp[(1) - (2)].selectorList) = nullptr;
2541     (yyval.selectorList) = nullptr;
2542     }
2543     break;
2544 
2545   case 93:
2546 
2547     {
2548     (yyval.selector) = (yyvsp[(1) - (1)].selector);
2549     }
2550     break;
2551 
2552   case 94:
2553 
2554     {
2555         (yyval.selector) = (yyvsp[(1) - (2)].selector);
2556     }
2557     break;
2558 
2559   case 95:
2560 
2561     {
2562         if ( !(yyvsp[(1) - (3)].selector) || !(yyvsp[(3) - (3)].selector) ) {
2563         delete (yyvsp[(1) - (3)].selector);
2564         delete (yyvsp[(3) - (3)].selector);
2565         (yyval.selector) = nullptr;
2566         } else {
2567             (yyval.selector) = (yyvsp[(3) - (3)].selector);
2568             CSSSelector *end = (yyval.selector);
2569             while( end->tagHistory )
2570                 end = end->tagHistory;
2571             end->relation = CSSSelector::Descendant;
2572             end->tagHistory = (yyvsp[(1) - (3)].selector);
2573         }
2574     }
2575     break;
2576 
2577   case 96:
2578 
2579     {
2580     if ( !(yyvsp[(1) - (3)].selector) || !(yyvsp[(3) - (3)].selector) ) {
2581         delete (yyvsp[(1) - (3)].selector);
2582         delete (yyvsp[(3) - (3)].selector);
2583         (yyval.selector) = nullptr;
2584     } else {
2585         (yyval.selector) = (yyvsp[(3) - (3)].selector);
2586         CSSSelector *end = (yyvsp[(3) - (3)].selector);
2587         while( end->tagHistory )
2588         end = end->tagHistory;
2589         end->relation = (yyvsp[(2) - (3)].relation);
2590         end->tagHistory = (yyvsp[(1) - (3)].selector);
2591     }
2592     }
2593     break;
2594 
2595   case 97:
2596 
2597     {
2598     delete (yyvsp[(1) - (2)].selector);
2599     (yyval.selector) = nullptr;
2600     }
2601     break;
2602 
2603   case 98:
2604 
2605     { (yyval.string).string = nullptr; (yyval.string).length = 0; }
2606     break;
2607 
2608   case 99:
2609 
2610     { static unsigned short star = '*'; (yyval.string).string = &star; (yyval.string).length = 1; }
2611     break;
2612 
2613   case 100:
2614 
2615     { (yyval.string) = (yyvsp[(1) - (2)].string); }
2616     break;
2617 
2618   case 101:
2619 
2620     {
2621     (yyval.selector) = new CSSSelector();
2622         (yyval.selector)->tagLocalName = LocalName::fromId(localNamePart((yyvsp[(1) - (1)].element)));
2623         (yyval.selector)->tagNamespace = NamespaceName::fromId(namespacePart((yyvsp[(1) - (1)].element)));
2624     }
2625     break;
2626 
2627   case 102:
2628 
2629     {
2630     (yyval.selector) = (yyvsp[(2) - (2)].selector);
2631         if ( (yyval.selector) ) {
2632             (yyval.selector)->tagLocalName = LocalName::fromId(localNamePart((yyvsp[(1) - (2)].element)));
2633             (yyval.selector)->tagNamespace = NamespaceName::fromId(namespacePart((yyvsp[(1) - (2)].element)));
2634         }
2635     }
2636     break;
2637 
2638   case 103:
2639 
2640     {
2641     (yyval.selector) = (yyvsp[(1) - (1)].selector);
2642         if ( (yyval.selector) ) {
2643             (yyval.selector)->tagLocalName = LocalName::fromId(anyLocalName);
2644             (yyval.selector)->tagNamespace = NamespaceName::fromId(static_cast<CSSParser*>(parser)->defaultNamespace());
2645         }
2646     }
2647     break;
2648 
2649   case 104:
2650 
2651     {
2652         (yyval.selector) = new CSSSelector();
2653         (yyval.selector)->tagLocalName = LocalName::fromId(localNamePart((yyvsp[(2) - (2)].element)));
2654         (yyval.selector)->tagNamespace = NamespaceName::fromId(namespacePart((yyvsp[(2) - (2)].element)));
2655     CSSParser *p = static_cast<CSSParser *>(parser);
2656         if (p->styleElement && p->styleElement->isCSSStyleSheet())
2657             static_cast<CSSStyleSheetImpl*>(p->styleElement)->determineNamespace((yyval.selector)->tagNamespace, domString((yyvsp[(1) - (2)].string)));
2658     }
2659     break;
2660 
2661   case 105:
2662 
2663     {
2664         (yyval.selector) = (yyvsp[(3) - (3)].selector);
2665         if ((yyval.selector)) {
2666             (yyval.selector)->tagLocalName = LocalName::fromId(localNamePart((yyvsp[(2) - (3)].element)));
2667             (yyval.selector)->tagNamespace = NamespaceName::fromId(namespacePart((yyvsp[(2) - (3)].element)));
2668             CSSParser *p = static_cast<CSSParser *>(parser);
2669             if (p->styleElement && p->styleElement->isCSSStyleSheet())
2670                 static_cast<CSSStyleSheetImpl*>(p->styleElement)->determineNamespace((yyval.selector)->tagNamespace, domString((yyvsp[(1) - (3)].string)));
2671         }
2672     }
2673     break;
2674 
2675   case 106:
2676 
2677     {
2678         (yyval.selector) = (yyvsp[(2) - (2)].selector);
2679         if ((yyval.selector)) {
2680             (yyval.selector)->tagLocalName = LocalName::fromId(anyLocalName);
2681             (yyval.selector)->tagNamespace = NamespaceName::fromId(anyNamespace);
2682             CSSParser *p = static_cast<CSSParser *>(parser);
2683             if (p->styleElement && p->styleElement->isCSSStyleSheet())
2684                 static_cast<CSSStyleSheetImpl*>(p->styleElement)->determineNamespace((yyval.selector)->tagNamespace, domString((yyvsp[(1) - (2)].string)));
2685         }
2686     }
2687     break;
2688 
2689   case 107:
2690 
2691     {
2692     (yyval.selector) = new CSSSelector();
2693         (yyval.selector)->tagLocalName = LocalName::fromId(localNamePart((yyvsp[(1) - (1)].element)));
2694         (yyval.selector)->tagNamespace = NamespaceName::fromId(namespacePart((yyvsp[(1) - (1)].element)));
2695     }
2696     break;
2697 
2698   case 108:
2699 
2700     {
2701     (yyval.selector) = (yyvsp[(1) - (1)].selector);
2702         if ( (yyval.selector) ) {
2703             (yyval.selector)->tagLocalName = LocalName::fromId(anyLocalName);
2704             (yyval.selector)->tagNamespace = NamespaceName::fromId(static_cast<CSSParser*>(parser)->defaultNamespace());
2705         }
2706     }
2707     break;
2708 
2709   case 109:
2710 
2711     {
2712         (yyval.selector) = new CSSSelector();
2713         (yyval.selector)->tagLocalName = LocalName::fromId(localNamePart((yyvsp[(2) - (2)].element)));
2714         (yyval.selector)->tagNamespace = NamespaceName::fromId(namespacePart((yyvsp[(2) - (2)].element)));
2715     CSSParser *p = static_cast<CSSParser *>(parser);
2716         if (p->styleElement && p->styleElement->isCSSStyleSheet())
2717             static_cast<CSSStyleSheetImpl*>(p->styleElement)->determineNamespace((yyval.selector)->tagNamespace, domString((yyvsp[(1) - (2)].string)));
2718     }
2719     break;
2720 
2721   case 110:
2722 
2723     {
2724         (yyval.selector) = (yyvsp[(2) - (2)].selector);
2725         if ((yyval.selector)) {
2726             (yyval.selector)->tagLocalName = LocalName::fromId(anyLocalName);
2727             (yyval.selector)->tagNamespace = NamespaceName::fromId(anyNamespace);
2728             CSSParser *p = static_cast<CSSParser *>(parser);
2729             if (p->styleElement && p->styleElement->isCSSStyleSheet())
2730                 static_cast<CSSStyleSheetImpl*>(p->styleElement)->determineNamespace((yyval.selector)->tagNamespace, domString((yyvsp[(1) - (2)].string)));
2731         }
2732     }
2733     break;
2734 
2735   case 111:
2736 
2737     {
2738       CSSParser *p = static_cast<CSSParser *>(parser);
2739       (yyval.element) = makeId(p->defaultNamespace(), p->getLocalNameId(domString((yyvsp[(1) - (1)].string))));
2740     }
2741     break;
2742 
2743   case 112:
2744 
2745     {
2746     (yyval.element) = makeId(static_cast<CSSParser*>(parser)->defaultNamespace(), anyLocalName);
2747     }
2748     break;
2749 
2750   case 113:
2751 
2752     {
2753     (yyval.selector) = (yyvsp[(1) - (1)].selector);
2754     }
2755     break;
2756 
2757   case 114:
2758 
2759     {
2760     (yyval.selector) = (yyvsp[(1) - (2)].selector);
2761     if ( (yyval.selector) ) {
2762             CSSSelector *end = (yyvsp[(1) - (2)].selector);
2763             while( end->tagHistory )
2764                 end = end->tagHistory;
2765             end->relation = CSSSelector::SubSelector;
2766             end->tagHistory = (yyvsp[(2) - (2)].selector);
2767     }
2768     }
2769     break;
2770 
2771   case 115:
2772 
2773     {
2774     delete (yyvsp[(1) - (2)].selector);
2775     (yyval.selector) = nullptr;
2776     }
2777     break;
2778 
2779   case 116:
2780 
2781     {
2782         CSSParser *p = static_cast<CSSParser *>(parser);
2783 
2784     (yyval.selector) = new CSSSelector();
2785     (yyval.selector)->match = CSSSelector::Id;
2786         (yyval.selector)->attrLocalName = LocalName::fromId(localNamePart(ATTR_ID));
2787         (yyval.selector)->attrNamespace = NamespaceName::fromId(namespacePart(ATTR_ID));
2788 
2789         bool caseSensitive = p->document()->htmlMode() == DocumentImpl::XHtml || !p->document()->inCompatMode();
2790         if (caseSensitive)
2791             (yyval.selector)->value = domString((yyvsp[(1) - (1)].string));
2792         else
2793             (yyval.selector)->value = domString((yyvsp[(1) - (1)].string)).lower();
2794     }
2795     break;
2796 
2797   case 120:
2798 
2799     {
2800         CSSParser *p = static_cast<CSSParser *>(parser);
2801 
2802     (yyval.selector) = new CSSSelector();
2803     (yyval.selector)->match = CSSSelector::Class;
2804         (yyval.selector)->attrLocalName = LocalName::fromId(localNamePart(ATTR_CLASS));
2805         (yyval.selector)->attrNamespace = NamespaceName::fromId(namespacePart(ATTR_CLASS));
2806 
2807         bool caseSensitive = p->document()->htmlMode() == DocumentImpl::XHtml || !p->document()->inCompatMode();
2808         if (caseSensitive)
2809             (yyval.selector)->value = domString((yyvsp[(2) - (2)].string));
2810         else
2811             (yyval.selector)->value = domString((yyvsp[(2) - (2)].string)).lower();
2812     }
2813     break;
2814 
2815   case 121:
2816 
2817     {
2818       CSSParser *p = static_cast<CSSParser *>(parser);
2819       (yyval.attribute) = makeId(emptyNamespace, p->getLocalNameId(domString((yyvsp[(1) - (2)].string))));
2820     }
2821     break;
2822 
2823   case 122:
2824 
2825     {
2826     (yyval.selector) = new CSSSelector();
2827         (yyval.selector)->attrLocalName = LocalName::fromId(localNamePart((yyvsp[(3) - (4)].attribute)));
2828         (yyval.selector)->attrNamespace = NamespaceName::fromId(namespacePart((yyvsp[(3) - (4)].attribute)));
2829     (yyval.selector)->match = CSSSelector::Set;
2830     }
2831     break;
2832 
2833   case 123:
2834 
2835     {
2836     (yyval.selector) = new CSSSelector();
2837         (yyval.selector)->attrLocalName = LocalName::fromId(localNamePart((yyvsp[(3) - (8)].attribute)));
2838         (yyval.selector)->attrNamespace = NamespaceName::fromId(namespacePart((yyvsp[(3) - (8)].attribute)));
2839     (yyval.selector)->match = (yyvsp[(4) - (8)].match);
2840     (yyval.selector)->value = domString((yyvsp[(6) - (8)].string));
2841     }
2842     break;
2843 
2844   case 124:
2845 
2846     {
2847         (yyval.selector) = new CSSSelector();
2848         (yyval.selector)->attrLocalName = LocalName::fromId(localNamePart((yyvsp[(4) - (5)].attribute)));
2849         (yyval.selector)->attrNamespace = NamespaceName::fromId(namespacePart((yyvsp[(4) - (5)].attribute)));
2850         (yyval.selector)->match = CSSSelector::Set;
2851         CSSParser *p = static_cast<CSSParser *>(parser);
2852         if (p->styleElement && p->styleElement->isCSSStyleSheet())
2853             static_cast<CSSStyleSheetImpl*>(p->styleElement)->determineNamespace((yyval.selector)->attrNamespace, domString((yyvsp[(3) - (5)].string)));
2854     }
2855     break;
2856 
2857   case 125:
2858 
2859     {
2860         (yyval.selector) = new CSSSelector();
2861         (yyval.selector)->attrLocalName = LocalName::fromId(localNamePart((yyvsp[(4) - (9)].attribute)));
2862         (yyval.selector)->attrNamespace = NamespaceName::fromId(namespacePart((yyvsp[(4) - (9)].attribute)));
2863         (yyval.selector)->match = (CSSSelector::Match)(yyvsp[(5) - (9)].match);
2864         (yyval.selector)->value = domString((yyvsp[(7) - (9)].string));
2865         CSSParser *p = static_cast<CSSParser *>(parser);
2866         if (p->styleElement && p->styleElement->isCSSStyleSheet())
2867             static_cast<CSSStyleSheetImpl*>(p->styleElement)->determineNamespace((yyval.selector)->attrNamespace, domString((yyvsp[(3) - (9)].string)));
2868    }
2869     break;
2870 
2871   case 126:
2872 
2873     {
2874     (yyval.match) = CSSSelector::Exact;
2875     }
2876     break;
2877 
2878   case 127:
2879 
2880     {
2881     (yyval.match) = CSSSelector::List;
2882     }
2883     break;
2884 
2885   case 128:
2886 
2887     {
2888     (yyval.match) = CSSSelector::Hyphen;
2889     }
2890     break;
2891 
2892   case 129:
2893 
2894     {
2895     (yyval.match) = CSSSelector::Begin;
2896     }
2897     break;
2898 
2899   case 130:
2900 
2901     {
2902     (yyval.match) = CSSSelector::End;
2903     }
2904     break;
2905 
2906   case 131:
2907 
2908     {
2909     (yyval.match) = CSSSelector::Contain;
2910     }
2911     break;
2912 
2913   case 134:
2914 
2915     {
2916     (yyval.selector) = new CSSSelector();
2917     (yyval.selector)->match = CSSSelector::PseudoClass;
2918     (yyval.selector)->value = domString((yyvsp[(2) - (2)].string));
2919     }
2920     break;
2921 
2922   case 135:
2923 
2924     {
2925     (yyval.selector) = new CSSSelector();
2926     (yyval.selector)->match = CSSSelector::PseudoElement;
2927         (yyval.selector)->value = domString((yyvsp[(3) - (3)].string));
2928     }
2929     break;
2930 
2931   case 136:
2932 
2933     {
2934         (yyval.selector) = new CSSSelector();
2935         (yyval.selector)->match = CSSSelector::PseudoClass;
2936         (yyval.selector)->string_arg = domString((yyvsp[(4) - (6)].string));
2937         (yyval.selector)->value = domString((yyvsp[(2) - (6)].string));
2938     }
2939     break;
2940 
2941   case 137:
2942 
2943     {
2944         (yyval.selector) = new CSSSelector();
2945         (yyval.selector)->match = CSSSelector::PseudoClass;
2946         (yyval.selector)->string_arg = QString::number((yyvsp[(5) - (7)].val));
2947         (yyval.selector)->value = domString((yyvsp[(2) - (7)].string));
2948     }
2949     break;
2950 
2951   case 138:
2952 
2953     {
2954         (yyval.selector) = new CSSSelector();
2955         (yyval.selector)->match = CSSSelector::PseudoClass;
2956         (yyval.selector)->string_arg = domString((yyvsp[(4) - (6)].string));
2957         (yyval.selector)->value = domString((yyvsp[(2) - (6)].string));
2958     }
2959     break;
2960 
2961   case 139:
2962 
2963     {
2964         (yyval.selector) = new CSSSelector();
2965         (yyval.selector)->match = CSSSelector::PseudoClass;
2966         (yyval.selector)->string_arg = domString((yyvsp[(4) - (6)].string));
2967         (yyval.selector)->value = domString((yyvsp[(2) - (6)].string));
2968     }
2969     break;
2970 
2971   case 140:
2972 
2973     {
2974         (yyval.selector) = new CSSSelector();
2975         (yyval.selector)->match = CSSSelector::PseudoClass;
2976         (yyval.selector)->simpleSelector = (yyvsp[(4) - (6)].selector);
2977         (yyval.selector)->value = domString((yyvsp[(2) - (6)].string));
2978     }
2979     break;
2980 
2981   case 141:
2982 
2983     {
2984     (yyval.ok) = (yyvsp[(3) - (4)].ok);
2985     }
2986     break;
2987 
2988   case 142:
2989 
2990     {
2991     (yyval.ok) = false;
2992     }
2993     break;
2994 
2995   case 143:
2996 
2997     {
2998     (yyval.ok) = (yyvsp[(3) - (4)].ok);
2999     }
3000     break;
3001 
3002   case 144:
3003 
3004     {
3005     (yyval.ok) = (yyvsp[(3) - (5)].ok);
3006     if ( (yyvsp[(4) - (5)].ok) )
3007         (yyval.ok) = (yyvsp[(4) - (5)].ok);
3008     }
3009     break;
3010 
3011   case 145:
3012 
3013     {
3014     (yyval.ok) = (yyvsp[(3) - (5)].ok);
3015     }
3016     break;
3017 
3018   case 146:
3019 
3020     {
3021     (yyval.ok) = (yyvsp[(1) - (3)].ok);
3022     }
3023     break;
3024 
3025   case 147:
3026 
3027     {
3028         (yyval.ok) = false;
3029     }
3030     break;
3031 
3032   case 148:
3033 
3034     {
3035     (yyval.ok) = (yyvsp[(1) - (4)].ok);
3036     if ( (yyvsp[(2) - (4)].ok) )
3037         (yyval.ok) = (yyvsp[(2) - (4)].ok);
3038     }
3039     break;
3040 
3041   case 149:
3042 
3043     {
3044         (yyval.ok) = (yyvsp[(1) - (4)].ok);
3045     }
3046     break;
3047 
3048   case 150:
3049 
3050     {
3051     (yyval.ok) = false;
3052     CSSParser *p = static_cast<CSSParser *>(parser);
3053     if ( (yyvsp[(1) - (5)].prop_id) && (yyvsp[(4) - (5)].valueList) ) {
3054         p->valueList = (yyvsp[(4) - (5)].valueList);
3055 #ifdef CSS_DEBUG
3056         qCDebug(KHTML_LOG) << "   got property: " << (yyvsp[(1) - (5)].prop_id) <<
3057         ((yyvsp[(5) - (5)].b)?" important":"");
3058 #endif
3059             bool ok = p->parseValue( (yyvsp[(1) - (5)].prop_id), (yyvsp[(5) - (5)].b) );
3060                 if ( ok )
3061             (yyval.ok) = ok;
3062 #ifdef CSS_DEBUG
3063             else
3064             qCDebug(KHTML_LOG) << "     couldn't parse value!";
3065 #endif
3066     } else {
3067             delete (yyvsp[(4) - (5)].valueList);
3068         }
3069     delete p->valueList;
3070     p->valueList = nullptr;
3071     }
3072     break;
3073 
3074   case 151:
3075 
3076     {
3077         (yyval.ok) = false;
3078     }
3079     break;
3080 
3081   case 152:
3082 
3083     {
3084         QString str = qString((yyvsp[(1) - (2)].string));
3085         (yyval.prop_id) = getPropertyID(str.toLower().toLatin1(), str.length());
3086     }
3087     break;
3088 
3089   case 153:
3090 
3091     { (yyval.b) = true; }
3092     break;
3093 
3094   case 154:
3095 
3096     { (yyval.b) = false; }
3097     break;
3098 
3099   case 155:
3100 
3101     {
3102     (yyval.valueList) = new ValueList;
3103     (yyval.valueList)->addValue( (yyvsp[(1) - (1)].value) );
3104     }
3105     break;
3106 
3107   case 156:
3108 
3109     {
3110     (yyval.valueList) = (yyvsp[(1) - (3)].valueList);
3111     if ( (yyval.valueList) ) {
3112         if ( (yyvsp[(2) - (3)].tok) ) {
3113         Value v;
3114         v.id = 0;
3115         v.unit = Value::Operator;
3116         v.iValue = (yyvsp[(2) - (3)].tok);
3117         (yyval.valueList)->addValue( v );
3118         }
3119         (yyval.valueList)->addValue( (yyvsp[(3) - (3)].value) );
3120     }
3121     }
3122     break;
3123 
3124   case 157:
3125 
3126     {
3127     (yyval.tok) = '/';
3128     }
3129     break;
3130 
3131   case 158:
3132 
3133     {
3134     (yyval.tok) = ',';
3135     }
3136     break;
3137 
3138   case 159:
3139 
3140     {
3141         (yyval.tok) = 0;
3142   }
3143     break;
3144 
3145   case 160:
3146 
3147     { (yyval.value) = (yyvsp[(1) - (1)].value); }
3148     break;
3149 
3150   case 161:
3151 
3152     { (yyval.value) = (yyvsp[(2) - (2)].value); (yyval.value).fValue *= (yyvsp[(1) - (2)].val); }
3153     break;
3154 
3155   case 162:
3156 
3157     { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_DIMENSION; }
3158     break;
3159 
3160   case 163:
3161 
3162     { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_STRING; }
3163     break;
3164 
3165   case 164:
3166 
3167     {
3168       QString str = qString( (yyvsp[(1) - (2)].string) );
3169       (yyval.value).id = getValueID( str.toLower().toLatin1(), str.length() );
3170       (yyval.value).unit = CSSPrimitiveValue::CSS_IDENT;
3171       (yyval.value).string = (yyvsp[(1) - (2)].string);
3172   }
3173     break;
3174 
3175   case 165:
3176 
3177     { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_URI; }
3178     break;
3179 
3180   case 166:
3181 
3182     { (yyval.value).id = 0; (yyval.value).iValue = 0; (yyval.value).unit = CSSPrimitiveValue::CSS_UNKNOWN;/* ### */ }
3183     break;
3184 
3185   case 167:
3186 
3187     { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (1)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_RGBCOLOR; }
3188     break;
3189 
3190   case 168:
3191 
3192     {
3193       (yyval.value) = (yyvsp[(1) - (1)].value);
3194   }
3195     break;
3196 
3197   case 169:
3198 
3199     { (yyval.value).id = 0; (yyval.value).isInt = true; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; }
3200     break;
3201 
3202   case 170:
3203 
3204     { (yyval.value).id = 0; (yyval.value).isInt = false; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; }
3205     break;
3206 
3207   case 171:
3208 
3209     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_PERCENTAGE; }
3210     break;
3211 
3212   case 172:
3213 
3214     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_PX; }
3215     break;
3216 
3217   case 173:
3218 
3219     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_CM; }
3220     break;
3221 
3222   case 174:
3223 
3224     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_MM; }
3225     break;
3226 
3227   case 175:
3228 
3229     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_IN; }
3230     break;
3231 
3232   case 176:
3233 
3234     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_PT; }
3235     break;
3236 
3237   case 177:
3238 
3239     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_PC; }
3240     break;
3241 
3242   case 178:
3243 
3244     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_DEG; }
3245     break;
3246 
3247   case 179:
3248 
3249     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_RAD; }
3250     break;
3251 
3252   case 180:
3253 
3254     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_GRAD; }
3255     break;
3256 
3257   case 181:
3258 
3259     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_MS; }
3260     break;
3261 
3262   case 182:
3263 
3264     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_S; }
3265     break;
3266 
3267   case 183:
3268 
3269     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_HZ; }
3270     break;
3271 
3272   case 184:
3273 
3274     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_KHZ; }
3275     break;
3276 
3277   case 185:
3278 
3279     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_EMS; }
3280     break;
3281 
3282   case 186:
3283 
3284     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = Value::Q_EMS; }
3285     break;
3286 
3287   case 187:
3288 
3289     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_EXS; }
3290     break;
3291 
3292   case 188:
3293 
3294     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_CHS; }
3295     break;
3296 
3297   case 189:
3298 
3299     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_REMS; }
3300     break;
3301 
3302   case 190:
3303 
3304     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_DPI; }
3305     break;
3306 
3307   case 191:
3308 
3309     { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].val); (yyval.value).unit = CSSPrimitiveValue::CSS_DPCM; }
3310     break;
3311 
3312   case 192:
3313 
3314     {
3315       Function *f = new Function;
3316       f->name = (yyvsp[(1) - (5)].string);
3317       f->args = (yyvsp[(3) - (5)].valueList);
3318       (yyval.value).id = 0;
3319       (yyval.value).unit = Value::Function;
3320       (yyval.value).function = f;
3321   }
3322     break;
3323 
3324   case 193:
3325 
3326     {
3327       Function *f = new Function;
3328       f->name = (yyvsp[(1) - (3)].string);
3329       f->args = nullptr;
3330       (yyval.value).id = 0;
3331       (yyval.value).unit = Value::Function;
3332       (yyval.value).function = f;
3333   }
3334     break;
3335 
3336   case 194:
3337 
3338     { (yyval.string) = (yyvsp[(1) - (2)].string); }
3339     break;
3340 
3341   case 195:
3342 
3343     {
3344     (yyval.rule) = nullptr;
3345 #ifdef CSS_DEBUG
3346     qCDebug(KHTML_LOG) << "skipped invalid @-rule";
3347 #endif
3348     }
3349     break;
3350 
3351   case 196:
3352 
3353     {
3354     (yyval.rule) = nullptr;
3355 #ifdef CSS_DEBUG
3356     qCDebug(KHTML_LOG) << "skipped invalid @-rule";
3357 #endif
3358     }
3359     break;
3360 
3361   case 197:
3362 
3363     {
3364     (yyval.rule) = nullptr;
3365 #ifdef CSS_DEBUG
3366     qCDebug(KHTML_LOG) << "skipped invalid rule";
3367 #endif
3368     }
3369     break;
3370 
3371 
3372 
3373       default: break;
3374     }
3375   /* User semantic actions sometimes alter yychar, and that requires
3376      that yytoken be updated with the new translation.  We take the
3377      approach of translating immediately before every use of yytoken.
3378      One alternative is translating here after every semantic action,
3379      but that translation would be missed if the semantic action invokes
3380      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3381      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
3382      incorrect destructor might then be invoked immediately.  In the
3383      case of YYERROR or YYBACKUP, subsequent parser actions might lead
3384      to an incorrect destructor call or verbose syntax error message
3385      before the lookahead is translated.  */
3386   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3387 
3388   YYPOPSTACK (yylen);
3389   yylen = 0;
3390   YY_STACK_PRINT (yyss, yyssp);
3391 
3392   *++yyvsp = yyval;
3393 
3394   /* Now `shift' the result of the reduction.  Determine what state
3395      that goes to, based on the state we popped back to and the rule
3396      number reduced by.  */
3397 
3398   yyn = yyr1[yyn];
3399 
3400   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3401   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3402     yystate = yytable[yystate];
3403   else
3404     yystate = yydefgoto[yyn - YYNTOKENS];
3405 
3406   goto yynewstate;
3407 
3408 
3409 /*------------------------------------.
3410 | yyerrlab -- here on detecting error |
3411 `------------------------------------*/
3412 yyerrlab:
3413   /* Make sure we have latest lookahead translation.  See comments at
3414      user semantic actions for why this is necessary.  */
3415   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3416 
3417   /* If not already recovering from an error, report this error.  */
3418   if (!yyerrstatus)
3419     {
3420       ++yynerrs;
3421 #if ! YYERROR_VERBOSE
3422       yyerror (YY_("syntax error"));
3423 #else
3424 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3425                                         yyssp, yytoken)
3426       {
3427         char const *yymsgp = YY_("syntax error");
3428         int yysyntax_error_status;
3429         yysyntax_error_status = YYSYNTAX_ERROR;
3430         if (yysyntax_error_status == 0)
3431           yymsgp = yymsg;
3432         else if (yysyntax_error_status == 1)
3433           {
3434             if (yymsg != yymsgbuf)
3435               YYSTACK_FREE (yymsg);
3436             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3437             if (!yymsg)
3438               {
3439                 yymsg = yymsgbuf;
3440                 yymsg_alloc = sizeof yymsgbuf;
3441                 yysyntax_error_status = 2;
3442               }
3443             else
3444               {
3445                 yysyntax_error_status = YYSYNTAX_ERROR;
3446                 yymsgp = yymsg;
3447               }
3448           }
3449         yyerror (yymsgp);
3450         if (yysyntax_error_status == 2)
3451           goto yyexhaustedlab;
3452       }
3453 # undef YYSYNTAX_ERROR
3454 #endif
3455     }
3456 
3457 
3458 
3459   if (yyerrstatus == 3)
3460     {
3461       /* If just tried and failed to reuse lookahead token after an
3462      error, discard it.  */
3463 
3464       if (yychar <= YYEOF)
3465     {
3466       /* Return failure if at end of input.  */
3467       if (yychar == YYEOF)
3468         YYABORT;
3469     }
3470       else
3471     {
3472       yydestruct ("Error: discarding",
3473               yytoken, &yylval);
3474       yychar = YYEMPTY;
3475     }
3476     }
3477 
3478   /* Else will try to reuse lookahead token after shifting the error
3479      token.  */
3480   goto yyerrlab1;
3481 
3482 
3483 /*---------------------------------------------------.
3484 | yyerrorlab -- error raised explicitly by YYERROR.  |
3485 `---------------------------------------------------*/
3486 yyerrorlab:
3487 
3488   /* Pacify compilers like GCC when the user code never invokes
3489      YYERROR and the label yyerrorlab therefore never appears in user
3490      code.  */
3491   if (/*CONSTCOND*/ 0)
3492      goto yyerrorlab;
3493 
3494   /* Do not reclaim the symbols of the rule which action triggered
3495      this YYERROR.  */
3496   YYPOPSTACK (yylen);
3497   yylen = 0;
3498   YY_STACK_PRINT (yyss, yyssp);
3499   yystate = *yyssp;
3500   goto yyerrlab1;
3501 
3502 
3503 /*-------------------------------------------------------------.
3504 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
3505 `-------------------------------------------------------------*/
3506 yyerrlab1:
3507   yyerrstatus = 3;  /* Each real token shifted decrements this.  */
3508 
3509   for (;;)
3510     {
3511       yyn = yypact[yystate];
3512       if (!yypact_value_is_default (yyn))
3513     {
3514       yyn += YYTERROR;
3515       if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3516         {
3517           yyn = yytable[yyn];
3518           if (0 < yyn)
3519         break;
3520         }
3521     }
3522 
3523       /* Pop the current state because it cannot handle the error token.  */
3524       if (yyssp == yyss)
3525     YYABORT;
3526 
3527 
3528       yydestruct ("Error: popping",
3529           yystos[yystate], yyvsp);
3530       YYPOPSTACK (1);
3531       yystate = *yyssp;
3532       YY_STACK_PRINT (yyss, yyssp);
3533     }
3534 
3535   *++yyvsp = yylval;
3536 
3537 
3538   /* Shift the error token.  */
3539   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3540 
3541   yystate = yyn;
3542   goto yynewstate;
3543 
3544 
3545 /*-------------------------------------.
3546 | yyacceptlab -- YYACCEPT comes here.  |
3547 `-------------------------------------*/
3548 yyacceptlab:
3549   yyresult = 0;
3550   goto yyreturn;
3551 
3552 /*-----------------------------------.
3553 | yyabortlab -- YYABORT comes here.  |
3554 `-----------------------------------*/
3555 yyabortlab:
3556   yyresult = 1;
3557   goto yyreturn;
3558 
3559 #if !defined yyoverflow || YYERROR_VERBOSE
3560 /*-------------------------------------------------.
3561 | yyexhaustedlab -- memory exhaustion comes here.  |
3562 `-------------------------------------------------*/
3563 yyexhaustedlab:
3564   yyerror (YY_("memory exhausted"));
3565   yyresult = 2;
3566   /* Fall through.  */
3567 #endif
3568 
3569 yyreturn:
3570   if (yychar != YYEMPTY)
3571     {
3572       /* Make sure we have latest lookahead translation.  See comments at
3573          user semantic actions for why this is necessary.  */
3574       yytoken = YYTRANSLATE (yychar);
3575       yydestruct ("Cleanup: discarding lookahead",
3576                   yytoken, &yylval);
3577     }
3578   /* Do not reclaim the symbols of the rule which action triggered
3579      this YYABORT or YYACCEPT.  */
3580   YYPOPSTACK (yylen);
3581   YY_STACK_PRINT (yyss, yyssp);
3582   while (yyssp != yyss)
3583     {
3584       yydestruct ("Cleanup: popping",
3585           yystos[*yyssp], yyvsp);
3586       YYPOPSTACK (1);
3587     }
3588 #ifndef yyoverflow
3589   if (yyss != yyssa)
3590     YYSTACK_FREE (yyss);
3591 #endif
3592 #if YYERROR_VERBOSE
3593   if (yymsg != yymsgbuf)
3594     YYSTACK_FREE (yymsg);
3595 #endif
3596   /* Make sure YYID is used.  */
3597   return YYID (yyresult);
3598 }
3599 
3600 
3601 
3602 
3603 
3604