Coverage Report

Created: 2025-11-11 06:22

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/vlc/modules/codec/webvtt/CSSGrammar.c
Line
Count
Source
1
/* A Bison parser, made by GNU Bison 3.5.1.  */
2
3
/* Bison implementation for Yacc-like parsers in C
4
5
   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
6
   Inc.
7
8
   This program is free software: you can redistribute it and/or modify
9
   it under the terms of the GNU General Public License as published by
10
   the Free Software Foundation, either version 3 of the License, or
11
   (at your option) any later version.
12
13
   This program is distributed in the hope that it will be useful,
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
   GNU General Public License for more details.
17
18
   You should have received a copy of the GNU General Public License
19
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
20
21
/* As a special exception, you may create a larger work that contains
22
   part or all of the Bison parser skeleton and distribute that work
23
   under terms of your choice, so long as that work isn't itself a
24
   parser generator using the skeleton or a modified version thereof
25
   as a parser skeleton.  Alternatively, if you modify or redistribute
26
   the parser skeleton itself, you may (at your option) remove this
27
   special exception, which will cause the skeleton and the resulting
28
   Bison output files to be licensed under the GNU General Public
29
   License without this special exception.
30
31
   This special exception was added by the Free Software Foundation in
32
   version 2.2 of Bison.  */
33
34
/* C LALR(1) parser skeleton written by Richard Stallman, by
35
   simplifying the original so-called "semantic" parser.  */
36
37
/* All symbols defined below should begin with yy or YY, to avoid
38
   infringing on user name space.  This should be done even for local
39
   variables, as they might otherwise be expanded by user macros.
40
   There are some unavoidable exceptions within include files to
41
   define necessary library symbols; they are noted "INFRINGES ON
42
   USER NAME SPACE" below.  */
43
44
/* Undocumented macros, especially those whose name start with YY_,
45
   are private implementation details.  Do not rely on them.  */
46
47
/* Identify Bison output.  */
48
#define YYBISON 1
49
50
/* Bison version.  */
51
#define YYBISON_VERSION "3.5.1"
52
53
/* Skeleton name.  */
54
#define YYSKELETON_NAME "yacc.c"
55
56
/* Pure parsers.  */
57
#define YYPURE 2
58
59
/* Push parsers.  */
60
#define YYPUSH 0
61
62
/* Pull parsers.  */
63
#define YYPULL 1
64
65
/* Substitute the type names.  */
66
#define YYSTYPE         CSSSTYPE
67
/* Substitute the variable and function names.  */
68
#define yyparse         cssparse
69
3.54M
#define yylex           csslex
70
46.0k
#define yyerror         csserror
71
#define yydebug         cssdebug
72
57.8k
#define yynerrs         cssnerrs
73
74
/* First part of user prologue.  */
75
#line 36 "codec/webvtt/CSSGrammar.y"
76
77
#ifdef HAVE_CONFIG_H
78
# include "config.h"
79
#endif
80
#include <vlc_common.h>
81
#include "css_parser.h"
82
83
#ifndef YY_TYPEDEF_YY_SCANNER_T
84
#define YY_TYPEDEF_YY_SCANNER_T
85
typedef void* yyscan_t;
86
#endif
87
88
#line 89 "codec/webvtt/CSSGrammar.c"
89
90
# ifndef YY_CAST
91
#  ifdef __cplusplus
92
#   define YY_CAST(Type, Val) static_cast<Type> (Val)
93
#   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
94
#  else
95
10.5M
#   define YY_CAST(Type, Val) ((Type) (Val))
96
#   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
97
#  endif
98
# endif
99
# ifndef YY_NULLPTR
100
#  if defined __cplusplus
101
#   if 201103L <= __cplusplus
102
#    define YY_NULLPTR nullptr
103
#   else
104
#    define YY_NULLPTR 0
105
#   endif
106
#  else
107
#   define YY_NULLPTR ((void*)0)
108
#  endif
109
# endif
110
111
/* Enabling verbose error messages.  */
112
#ifdef YYERROR_VERBOSE
113
# undef YYERROR_VERBOSE
114
# define YYERROR_VERBOSE 1
115
#else
116
# define YYERROR_VERBOSE 0
117
#endif
118
119
/* Use api.header.include to #include this header
120
   instead of duplicating it here.  */
121
#ifndef YY_CSS_CODEC_WEBVTT_CSSGRAMMAR_H_INCLUDED
122
# define YY_CSS_CODEC_WEBVTT_CSSGRAMMAR_H_INCLUDED
123
/* Debug traces.  */
124
#ifndef CSSDEBUG
125
# if defined YYDEBUG
126
#if YYDEBUG
127
#   define CSSDEBUG 1
128
#  else
129
#   define CSSDEBUG 0
130
#  endif
131
# else /* ! defined YYDEBUG */
132
#  define CSSDEBUG 0
133
# endif /* ! defined YYDEBUG */
134
#endif  /* ! defined CSSDEBUG */
135
#if CSSDEBUG
136
extern int cssdebug;
137
#endif
138
139
/* Token type.  */
140
#ifndef CSSTOKENTYPE
141
# define CSSTOKENTYPE
142
  enum csstokentype
143
  {
144
    TOKEN_EOF = 0,
145
    LOWEST_PREC = 258,
146
    UNIMPORTANT_TOK = 259,
147
    WHITESPACE = 260,
148
    SGML_CD = 261,
149
    INCLUDES = 262,
150
    DASHMATCH = 263,
151
    BEGINSWITH = 264,
152
    ENDSWITH = 265,
153
    CONTAINS = 266,
154
    STRING = 267,
155
    IDENT = 268,
156
    IDSEL = 269,
157
    HASH = 270,
158
    FONT_FACE_SYM = 271,
159
    CHARSET_SYM = 272,
160
    IMPORTANT_SYM = 273,
161
    CDO = 274,
162
    CDC = 275,
163
    LENGTH = 276,
164
    ANGLE = 277,
165
    TIME = 278,
166
    FREQ = 279,
167
    DIMEN = 280,
168
    PERCENTAGE = 281,
169
    NUMBER = 282,
170
    URI = 283,
171
    FUNCTION = 284,
172
    UNICODERANGE = 285
173
  };
174
#endif
175
/* Tokens.  */
176
#define TOKEN_EOF 0
177
#define LOWEST_PREC 258
178
#define UNIMPORTANT_TOK 259
179
#define WHITESPACE 260
180
#define SGML_CD 261
181
#define INCLUDES 262
182
#define DASHMATCH 263
183
#define BEGINSWITH 264
184
#define ENDSWITH 265
185
#define CONTAINS 266
186
#define STRING 267
187
#define IDENT 268
188
#define IDSEL 269
189
#define HASH 270
190
#define FONT_FACE_SYM 271
191
#define CHARSET_SYM 272
192
#define IMPORTANT_SYM 273
193
#define CDO 274
194
#define CDC 275
195
#define LENGTH 276
196
#define ANGLE 277
197
#define TIME 278
198
#define FREQ 279
199
#define DIMEN 280
200
#define PERCENTAGE 281
201
#define NUMBER 282
202
#define URI 283
203
#define FUNCTION 284
204
#define UNICODERANGE 285
205
206
/* Value type.  */
207
#if ! defined CSSSTYPE && ! defined CSSSTYPE_IS_DECLARED
208
union CSSSTYPE
209
{
210
#line 49 "codec/webvtt/CSSGrammar.y"
211
212
    bool boolean;
213
    char character;
214
    int integer;
215
    char *string;
216
    enum vlc_css_relation_e relation;
217
218
    vlc_css_term_t term;
219
    vlc_css_expr_t *expr;
220
    vlc_css_rule_t  *rule;
221
    vlc_css_declaration_t *declaration;
222
    vlc_css_declaration_t *declarationList;
223
    vlc_css_selector_t *selector;
224
    vlc_css_selector_t *selectorList;
225
226
#line 227 "codec/webvtt/CSSGrammar.c"
227
228
};
229
typedef union CSSSTYPE CSSSTYPE;
230
# define CSSSTYPE_IS_TRIVIAL 1
231
# define CSSSTYPE_IS_DECLARED 1
232
#endif
233
234
235
236
int cssparse (yyscan_t scanner, vlc_css_parser_t *css_parser);
237
238
#endif /* !YY_CSS_CODEC_WEBVTT_CSSGRAMMAR_H_INCLUDED  */
239
240
/* Second part of user prologue.  */
241
#line 65 "codec/webvtt/CSSGrammar.y"
242
243
/* See bison pure calling */
244
#define YY_DECL int yylex(union YYSTYPE *, yyscan_t)
245
YY_DECL;
246
247
static void yyerror(yyscan_t scanner, vlc_css_parser_t *p, const char *msg)
248
46.0k
{
249
46.0k
    VLC_UNUSED(scanner);VLC_UNUSED(p);VLC_UNUSED(msg);
250
46.0k
}
251
252
253
#line 254 "codec/webvtt/CSSGrammar.c"
254
255
256
#ifdef short
257
# undef short
258
#endif
259
260
/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
261
   <limits.h> and (if available) <stdint.h> are included
262
   so that the code can choose integer types of a good width.  */
263
264
#ifndef __PTRDIFF_MAX__
265
# include <limits.h> /* INFRINGES ON USER NAME SPACE */
266
# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
267
#  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
268
#  define YY_STDINT_H
269
# endif
270
#endif
271
272
/* Narrow types that promote to a signed type and that can represent a
273
   signed or unsigned integer of at least N bits.  In tables they can
274
   save space and decrease cache pressure.  Promoting to a signed type
275
   helps avoid bugs in integer arithmetic.  */
276
277
#ifdef __INT_LEAST8_MAX__
278
typedef __INT_LEAST8_TYPE__ yytype_int8;
279
#elif defined YY_STDINT_H
280
typedef int_least8_t yytype_int8;
281
#else
282
typedef signed char yytype_int8;
283
#endif
284
285
#ifdef __INT_LEAST16_MAX__
286
typedef __INT_LEAST16_TYPE__ yytype_int16;
287
#elif defined YY_STDINT_H
288
typedef int_least16_t yytype_int16;
289
#else
290
typedef short yytype_int16;
291
#endif
292
293
#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
294
typedef __UINT_LEAST8_TYPE__ yytype_uint8;
295
#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
296
       && UINT_LEAST8_MAX <= INT_MAX)
297
typedef uint_least8_t yytype_uint8;
298
#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
299
typedef unsigned char yytype_uint8;
300
#else
301
typedef short yytype_uint8;
302
#endif
303
304
#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
305
typedef __UINT_LEAST16_TYPE__ yytype_uint16;
306
#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
307
       && UINT_LEAST16_MAX <= INT_MAX)
308
typedef uint_least16_t yytype_uint16;
309
#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
310
typedef unsigned short yytype_uint16;
311
#else
312
typedef int yytype_uint16;
313
#endif
314
315
#ifndef YYPTRDIFF_T
316
# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
317
19.7k
#  define YYPTRDIFF_T __PTRDIFF_TYPE__
318
#  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
319
# elif defined PTRDIFF_MAX
320
#  ifndef ptrdiff_t
321
#   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
322
#  endif
323
#  define YYPTRDIFF_T ptrdiff_t
324
#  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
325
# else
326
#  define YYPTRDIFF_T long
327
#  define YYPTRDIFF_MAXIMUM LONG_MAX
328
# endif
329
#endif
330
331
#ifndef YYSIZE_T
332
# ifdef __SIZE_TYPE__
333
#  define YYSIZE_T __SIZE_TYPE__
334
# elif defined size_t
335
#  define YYSIZE_T size_t
336
# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
337
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
338
#  define YYSIZE_T size_t
339
# else
340
#  define YYSIZE_T unsigned
341
# endif
342
#endif
343
344
#define YYSIZE_MAXIMUM                                  \
345
  YY_CAST (YYPTRDIFF_T,                                 \
346
           (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
347
            ? YYPTRDIFF_MAXIMUM                         \
348
            : YY_CAST (YYSIZE_T, -1)))
349
350
15.5k
#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
351
352
/* Stored state numbers (used for stacks). */
353
typedef yytype_uint8 yy_state_t;
354
355
/* State numbers in computations.  */
356
typedef int yy_state_fast_t;
357
358
#ifndef YY_
359
# if defined YYENABLE_NLS && YYENABLE_NLS
360
#  if ENABLE_NLS
361
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
362
#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
363
#  endif
364
# endif
365
# ifndef YY_
366
46.0k
#  define YY_(Msgid) Msgid
367
# endif
368
#endif
369
370
#ifndef YY_ATTRIBUTE_PURE
371
# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
372
#  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
373
# else
374
#  define YY_ATTRIBUTE_PURE
375
# endif
376
#endif
377
378
#ifndef YY_ATTRIBUTE_UNUSED
379
# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
380
#  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
381
# else
382
#  define YY_ATTRIBUTE_UNUSED
383
# endif
384
#endif
385
386
/* Suppress unused-variable warnings by "using" E.  */
387
#if ! defined lint || defined __GNUC__
388
6.75M
# define YYUSE(E) ((void) (E))
389
#else
390
# define YYUSE(E) /* empty */
391
#endif
392
393
#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
394
/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
395
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                            \
396
    _Pragma ("GCC diagnostic push")                                     \
397
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
398
    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
399
# define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
400
    _Pragma ("GCC diagnostic pop")
401
#else
402
23.7k
# define YY_INITIAL_VALUE(Value) Value
403
#endif
404
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
405
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
406
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
407
#endif
408
#ifndef YY_INITIAL_VALUE
409
# define YY_INITIAL_VALUE(Value) /* Nothing. */
410
#endif
411
412
#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
413
# define YY_IGNORE_USELESS_CAST_BEGIN                          \
414
    _Pragma ("GCC diagnostic push")                            \
415
    _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
416
# define YY_IGNORE_USELESS_CAST_END            \
417
    _Pragma ("GCC diagnostic pop")
418
#endif
419
#ifndef YY_IGNORE_USELESS_CAST_BEGIN
420
# define YY_IGNORE_USELESS_CAST_BEGIN
421
# define YY_IGNORE_USELESS_CAST_END
422
#endif
423
424
425
10.4M
#define YY_ASSERT(E) ((void) (0 && (E)))
426
427
#if ! defined yyoverflow || YYERROR_VERBOSE
428
429
/* The parser invokes alloca or malloc; define the necessary symbols.  */
430
431
# ifdef YYSTACK_USE_ALLOCA
432
#  if YYSTACK_USE_ALLOCA
433
#   ifdef __GNUC__
434
#    define YYSTACK_ALLOC __builtin_alloca
435
#   elif defined __BUILTIN_VA_ARG_INCR
436
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
437
#   elif defined _AIX
438
#    define YYSTACK_ALLOC __alloca
439
#   elif defined _MSC_VER
440
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
441
#    define alloca _alloca
442
#   else
443
#    define YYSTACK_ALLOC alloca
444
#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
445
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
446
      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
447
#     ifndef EXIT_SUCCESS
448
#      define EXIT_SUCCESS 0
449
#     endif
450
#    endif
451
#   endif
452
#  endif
453
# endif
454
455
# ifdef YYSTACK_ALLOC
456
   /* Pacify GCC's 'empty if-body' warning.  */
457
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
458
#  ifndef YYSTACK_ALLOC_MAXIMUM
459
    /* The OS might guarantee only one guard page at the bottom of the stack,
460
       and a page size can be as small as 4096 bytes.  So we cannot safely
461
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
462
       to allow for a few compiler-allocated temporary stack slots.  */
463
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
464
#  endif
465
# else
466
#  define YYSTACK_ALLOC YYMALLOC
467
2.58k
#  define YYSTACK_FREE YYFREE
468
#  ifndef YYSTACK_ALLOC_MAXIMUM
469
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
470
#  endif
471
#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
472
       && ! ((defined YYMALLOC || defined malloc) \
473
             && (defined YYFREE || defined free)))
474
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
475
#   ifndef EXIT_SUCCESS
476
#    define EXIT_SUCCESS 0
477
#   endif
478
#  endif
479
#  ifndef YYMALLOC
480
#   define YYMALLOC malloc
481
#   if ! defined malloc && ! defined EXIT_SUCCESS
482
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
483
#   endif
484
#  endif
485
#  ifndef YYFREE
486
2.58k
#   define YYFREE free
487
#   if ! defined free && ! defined EXIT_SUCCESS
488
void free (void *); /* INFRINGES ON USER NAME SPACE */
489
#   endif
490
#  endif
491
# endif
492
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
493
494
495
#if (! defined yyoverflow \
496
     && (! defined __cplusplus \
497
         || (defined CSSSTYPE_IS_TRIVIAL && CSSSTYPE_IS_TRIVIAL)))
498
499
/* A type that is properly aligned for any stack member.  */
500
union yyalloc
501
{
502
  yy_state_t yyss_alloc;
503
  YYSTYPE yyvs_alloc;
504
};
505
506
/* The size of the maximum gap between one aligned stack and the next.  */
507
5.17k
# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
508
509
/* The size of an array large to enough to hold all stacks, each with
510
   N elements.  */
511
# define YYSTACK_BYTES(N) \
512
     ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
513
      + YYSTACK_GAP_MAXIMUM)
514
515
# define YYCOPY_NEEDED 1
516
517
/* Relocate STACK from its old location to the new one.  The
518
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
519
   elements in the stack, and YYPTR gives the new location of the
520
   stack.  Advance YYPTR to a properly aligned location for the next
521
   stack.  */
522
# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
523
5.17k
    do                                                                  \
524
5.17k
      {                                                                 \
525
5.17k
        YYPTRDIFF_T yynewbytes;                                         \
526
5.17k
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
527
5.17k
        Stack = &yyptr->Stack_alloc;                                    \
528
5.17k
        yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
529
5.17k
        yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
530
5.17k
      }                                                                 \
531
5.17k
    while (0)
532
533
#endif
534
535
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
536
/* Copy COUNT objects from SRC to DST.  The source and destination do
537
   not overlap.  */
538
# ifndef YYCOPY
539
#  if defined __GNUC__ && 1 < __GNUC__
540
#   define YYCOPY(Dst, Src, Count) \
541
5.17k
      __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
542
#  else
543
#   define YYCOPY(Dst, Src, Count)              \
544
      do                                        \
545
        {                                       \
546
          YYPTRDIFF_T yyi;                      \
547
          for (yyi = 0; yyi < (Count); yyi++)   \
548
            (Dst)[yyi] = (Src)[yyi];            \
549
        }                                       \
550
      while (0)
551
#  endif
552
# endif
553
#endif /* !YYCOPY_NEEDED */
554
555
/* YYFINAL -- State number of the termination state.  */
556
10.4M
#define YYFINAL  3
557
/* YYLAST -- Last index in YYTABLE.  */
558
22.2M
#define YYLAST   473
559
560
/* YYNTOKENS -- Number of terminals.  */
561
4.76M
#define YYNTOKENS  50
562
/* YYNNTS -- Number of nonterminals.  */
563
#define YYNNTS  42
564
/* YYNRULES -- Number of rules.  */
565
#define YYNRULES  135
566
/* YYNSTATES -- Number of states.  */
567
#define YYNSTATES  230
568
569
0
#define YYUNDEFTOK  2
570
7.51M
#define YYMAXUTOK   285
571
572
573
/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
574
   as returned by yylex, with out-of-bounds checking.  */
575
#define YYTRANSLATE(YYX)                                                \
576
10.4M
  (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
577
578
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
579
   as returned by yylex.  */
580
static const yytype_int8 yytranslate[] =
581
{
582
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
583
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
584
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
585
       2,     2,     2,     2,     2,    48,     2,    49,     2,     2,
586
       2,    46,    19,    39,    43,    42,    17,    47,     2,     2,
587
       2,     2,     2,     2,     2,     2,     2,     2,    16,    37,
588
       2,    45,    41,     2,     2,     2,     2,     2,     2,     2,
589
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
590
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
591
       2,    18,     2,    44,     2,     2,     2,     2,     2,     2,
592
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
593
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
594
       2,     2,     2,    38,    20,    36,    40,     2,     2,     2,
595
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
596
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
597
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
598
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
599
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
600
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
601
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
602
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
603
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
604
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
605
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
606
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
607
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
608
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
609
      15,    21,    22,    23,    24,    25,    26,    27,    28,    29,
610
      30,    31,    32,    33,    34,    35
611
};
612
613
#if CSSDEBUG
614
  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
615
static const yytype_int16 yyrline[] =
616
{
617
       0,   176,   176,   180,   181,   184,   186,   187,   190,   192,
618
     198,   199,   203,   207,   210,   216,   221,   226,   228,   235,
619
     236,   240,   245,   246,   250,   255,   258,   264,   265,   266,
620
     270,   271,   275,   276,   280,   291,   296,   309,   316,   322,
621
     325,   329,   339,   348,   355,   359,   371,   377,   378,   382,
622
     385,   395,   402,   407,   415,   416,   417,   421,   428,   434,
623
     438,   451,   454,   457,   460,   463,   466,   472,   473,   477,
624
     481,   486,   495,   509,   519,   522,   527,   530,   533,   536,
625
     539,   545,   548,   552,   556,   559,   562,   570,   573,   579,
626
     592,   597,   606,   613,   618,   624,   630,   638,   644,   645,
627
     649,   654,   659,   663,   667,   674,   677,   680,   686,   687,
628
     691,   692,   694,   695,   696,   697,   698,   699,   700,   702,
629
     705,   711,   712,   713,   714,   715,   716,   720,   726,   731,
630
     736,   746,   764,   765,   769,   770
631
};
632
#endif
633
634
#if CSSDEBUG || YYERROR_VERBOSE || 0
635
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
636
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
637
static const char *const yytname[] =
638
{
639
  "TOKEN_EOF", "error", "$undefined", "LOWEST_PREC", "UNIMPORTANT_TOK",
640
  "WHITESPACE", "SGML_CD", "INCLUDES", "DASHMATCH", "BEGINSWITH",
641
  "ENDSWITH", "CONTAINS", "STRING", "IDENT", "IDSEL", "HASH", "':'", "'.'",
642
  "'['", "'*'", "'|'", "FONT_FACE_SYM", "CHARSET_SYM", "IMPORTANT_SYM",
643
  "CDO", "CDC", "LENGTH", "ANGLE", "TIME", "FREQ", "DIMEN", "PERCENTAGE",
644
  "NUMBER", "URI", "FUNCTION", "UNICODERANGE", "'}'", "';'", "'{'", "'+'",
645
  "'~'", "'>'", "'-'", "','", "']'", "'='", "')'", "'/'", "'#'", "'%'",
646
  "$accept", "stylesheet", "maybe_space", "maybe_sgml", "maybe_charset",
647
  "closing_brace", "charset", "ignored_charset", "rule_list", "valid_rule",
648
  "rule", "font_face", "combinator", "maybe_unary_operator",
649
  "unary_operator", "ruleset", "selector_list",
650
  "selector_with_trailing_whitespace", "selector", "simple_selector",
651
  "element_name", "specifier_list", "specifier", "class", "attr_name",
652
  "attrib", "match", "ident_or_string", "pseudo", "declaration_list",
653
  "decl_list", "declaration", "property", "prio", "expr", "operator",
654
  "term", "unary_term", "function", "invalid_rule", "invalid_block",
655
  "invalid_block_list", YY_NULLPTR
656
};
657
#endif
658
659
# ifdef YYPRINT
660
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
661
   (internal) symbol number NUM (which must be that of a token).  */
662
static const yytype_int16 yytoknum[] =
663
{
664
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
665
     265,   266,   267,   268,   269,   270,    58,    46,    91,    42,
666
     124,   271,   272,   273,   274,   275,   276,   277,   278,   279,
667
     280,   281,   282,   283,   284,   285,   125,    59,   123,    43,
668
     126,    62,    45,    44,    93,    61,    41,    47,    35,    37
669
};
670
# endif
671
672
13.9M
#define YYPACT_NINF (-126)
673
674
#define yypact_value_is_default(Yyn) \
675
13.9M
  ((Yyn) == YYPACT_NINF)
676
677
#define YYTABLE_NINF (-108)
678
679
#define yytable_value_is_error(Yyn) \
680
253k
  0
681
682
  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
683
     STATE-NUM.  */
684
static const yytype_int16 yypact[] =
685
{
686
    -126,    10,    88,  -126,  -126,   290,  -126,  -126,    68,     6,
687
     135,  -126,    11,  -126,  -126,  -126,  -126,   328,    73,    75,
688
     -24,  -126,  -126,  -126,   368,     9,  -126,  -126,    95,  -126,
689
    -126,  -126,  -126,  -126,  -126,     1,   420,    84,  -126,   292,
690
      14,  -126,  -126,  -126,  -126,  -126,  -126,  -126,  -126,  -126,
691
      35,  -126,  -126,  -126,    -7,  -126,  -126,     3,   117,    30,
692
     171,   135,  -126,  -126,  -126,  -126,  -126,  -126,  -126,  -126,
693
    -126,   420,   179,  -126,  -126,    73,  -126,  -126,    79,  -126,
694
     141,  -126,  -126,  -126,  -126,  -126,   186,   248,    70,    70,
695
      70,  -126,  -126,  -126,   248,  -126,  -126,  -126,    54,  -126,
696
      70,  -126,  -126,  -126,  -126,  -126,  -126,  -126,  -126,   186,
697
     121,   119,  -126,  -126,    41,   388,   169,    24,    96,    42,
698
      -1,  -126,   291,    41,  -126,  -126,    90,    70,    70,  -126,
699
     173,    58,    66,  -126,   404,  -126,  -126,  -126,     0,  -126,
700
       2,  -126,  -126,  -126,  -126,    70,   204,  -126,   114,  -126,
701
     -24,    70,  -126,    70,   285,  -126,  -126,    12,  -126,    70,
702
     214,    70,    70,   417,  -126,  -126,  -126,  -126,  -126,  -126,
703
    -126,  -126,  -126,  -126,  -126,  -126,  -126,  -126,  -126,  -126,
704
     441,   245,  -126,  -126,  -126,  -126,    70,  -126,   245,    70,
705
      70,    70,    70,    70,    70,    70,    70,    70,    70,    70,
706
      70,   364,    70,    70,    70,  -126,  -126,  -126,  -126,  -126,
707
    -126,    33,   417,   201,    70,  -126,  -126,  -126,   325,    70,
708
      70,    70,    70,  -126,  -126,   -24,    70,  -126,  -126,    70
709
};
710
711
  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
712
     Performed when YYTABLE does not specify something else to do.  Zero
713
     means the default is an error.  */
714
static const yytype_uint8 yydefact[] =
715
{
716
       3,     0,     8,     1,     4,     0,     5,     9,     0,     0,
717
      17,    14,     0,    13,     3,     7,     6,     0,     0,     0,
718
       0,    47,    52,    53,     0,     0,     3,    48,     0,     3,
719
      22,    21,     5,    20,    19,     0,    40,     0,    39,    44,
720
       0,    49,    54,    55,    56,    23,    11,    10,   133,   134,
721
       0,    12,   131,    69,     0,     3,    57,     0,     0,     0,
722
       0,    18,    37,     3,     3,    41,    43,    38,     3,     3,
723
       3,     0,     0,    51,    50,     0,    70,     3,    31,     3,
724
       0,    26,    25,     3,     3,    16,     0,     0,    27,    28,
725
      29,    42,   132,   135,     0,     3,    33,    32,     0,    30,
726
      58,    62,    63,    64,    65,    66,    59,    61,     3,     0,
727
       0,    78,     3,     3,     0,     0,    74,     0,     0,     0,
728
       0,     3,     0,     0,    15,     3,     0,    97,    93,    34,
729
      79,    75,     0,     3,     0,    90,     3,    96,     0,    73,
730
       0,    68,    67,     3,    24,    84,    77,     3,     0,     3,
731
       0,    81,     3,    82,     0,    72,    71,     0,     3,    87,
732
       0,    86,    83,    95,     3,     3,     3,     3,     3,     3,
733
       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
734
       0,     0,   100,   108,   119,    60,    85,     3,     0,   110,
735
     111,   116,   117,   123,   124,   125,   126,   112,   122,   121,
736
     114,     0,   115,   118,   120,     3,   109,   104,     3,     3,
737
       3,     0,     0,     0,    88,    91,   130,     3,     0,   113,
738
      98,   106,   105,    92,   101,   103,   129,   128,     3,   127
739
};
740
741
  /* YYPGOTO[NTERM-NUM].  */
742
static const yytype_int8 yypgoto[] =
743
{
744
    -126,  -126,    -5,    85,  -126,   -72,  -126,  -126,  -126,  -126,
745
    -126,  -126,  -126,  -126,    52,  -126,  -126,  -126,   -74,   -10,
746
    -126,    80,   105,  -126,  -126,  -126,  -126,  -126,  -126,    23,
747
    -126,    28,  -126,     4,  -125,  -126,   -34,     8,  -126,  -126,
748
      29,   -17
749
};
750
751
  /* YYDEFGOTO[NTERM-NUM].  */
752
static const yytype_int16 yydefgoto[] =
753
{
754
      -1,     1,     2,    10,     6,    48,     7,    30,    17,    31,
755
      32,    33,    71,    98,   180,    34,    35,    36,    37,    38,
756
      39,    40,    41,    42,    80,    43,   108,   143,    44,   114,
757
     115,   116,   117,   211,   181,   212,   182,   183,   184,    45,
758
      49,   213
759
};
760
761
  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
762
     positive, shift that token.  If negative, reduce the rule whose
763
     number is the opposite.  If YYTABLE_NINF, syntax error.  */
764
static const yytype_int16 yytable[] =
765
{
766
       9,    50,    62,    92,     4,     4,    76,     4,     4,    19,
767
       3,     4,    18,   118,    12,    73,    79,     4,    14,   -46,
768
     119,    57,    56,    59,    60,   135,    65,    77,    22,    23,
769
      24,    25,    26,   -89,   223,     4,    75,    13,   188,    63,
770
     136,    46,   129,    66,    64,   139,   155,    67,   156,    52,
771
      78,   144,   -46,   -46,   -46,   -46,   185,   -46,    86,    87,
772
     -46,    91,    12,    88,    89,    90,   -80,   150,    83,   -89,
773
     -89,   -89,    94,    46,   100,     4,   218,    47,   109,   110,
774
       4,    68,    69,    70,     4,    66,   121,    82,    -3,    67,
775
     120,   146,    95,     4,   126,   149,    58,    66,   132,   134,
776
      -3,    67,   -80,   122,    93,    11,    12,   127,   128,    47,
777
       5,    12,    51,   148,   138,   160,   140,    61,    96,    72,
778
     145,    97,   -35,    68,    69,    70,     4,   -35,   151,   153,
779
      99,   154,   123,    -3,   -36,    68,    69,    70,   157,   -36,
780
      15,    16,   159,   131,   161,    74,   137,   162,   101,   102,
781
     103,   104,   105,   186,    81,    12,   125,    12,   124,   189,
782
     190,   191,   192,   193,   194,   195,   196,   197,   198,   199,
783
     200,   201,   202,   203,   204,    93,     4,    74,   224,    93,
784
      73,     0,   214,    84,   -45,   106,   107,   111,   206,    93,
785
       0,     4,   215,    22,    23,    24,    25,    26,     0,   112,
786
     219,  -102,   225,   220,   221,   222,   133,    12,    85,   113,
787
     147,    12,   226,  -102,  -102,  -102,  -102,   -45,   -45,   -45,
788
     -45,     0,   -45,   229,  -102,   -45,     0,  -102,  -102,  -102,
789
    -102,  -102,  -102,  -102,  -102,  -102,  -102,  -102,  -102,  -102,
790
    -102,   158,    12,  -102,  -102,   -99,   207,  -102,  -102,  -102,
791
    -102,   187,    12,     4,    93,     0,     0,  -107,  -107,  -107,
792
    -107,    21,    22,    23,    24,    25,    26,    27,   208,     0,
793
       0,  -107,  -107,  -107,  -107,  -107,  -107,  -107,  -107,  -107,
794
    -107,   -99,   -99,    12,  -107,   -94,   163,  -107,   209,     0,
795
       4,     8,   210,  -107,  -107,    -3,     4,   164,   165,   166,
796
     167,     0,    -3,   141,   142,     0,    22,    23,    24,    25,
797
      26,   168,   169,   170,   171,   172,   173,   174,   175,   176,
798
     177,   -94,   -94,   -94,    96,   227,   207,    97,    -2,    20,
799
       0,     0,     0,   178,   179,     0,     0,  -107,  -107,  -107,
800
    -107,    21,    22,    23,    24,    25,    26,    27,     0,    28,
801
      29,  -107,  -107,  -107,  -107,  -107,  -107,  -107,  -107,  -107,
802
    -107,     0,     0,    12,  -107,   216,     0,  -107,   209,     4,
803
       0,   228,   210,  -107,  -107,     0,   164,   165,   166,   167,
804
       0,    53,     0,     0,    54,     0,     0,     0,   -76,   130,
805
     168,   169,   170,   171,   172,   173,   174,   175,   176,   177,
806
       0,   112,    55,    96,    -3,   150,    97,     0,     0,    -3,
807
     217,   113,   178,   179,     0,     0,     0,    -3,     0,     0,
808
       0,     0,     0,     0,   -76,     0,    12,    -3,     0,   164,
809
     165,   166,   167,    21,    22,    23,    24,    25,    26,    27,
810
      -3,   152,    -3,   168,   169,   170,   171,   172,   173,   174,
811
     175,   176,   177,     0,     0,     0,    96,     0,     0,    97,
812
       0,     0,     0,     0,     0,   178,   179,   168,   169,   170,
813
     171,   205,   173,   174
814
};
815
816
static const yytype_int16 yycheck[] =
817
{
818
       5,    18,     1,    75,     5,     5,    13,     5,     5,    14,
819
       0,     5,     1,    87,    38,     1,    13,     5,    12,     5,
820
      94,    26,    13,    28,    29,     1,    36,    34,    14,    15,
821
      16,    17,    18,     0,     1,     5,     1,     8,   163,    38,
822
      16,     0,   114,     1,    43,    46,    46,     5,    46,    20,
823
      55,   123,    38,    39,    40,    41,    44,    43,    63,    64,
824
      46,    71,    38,    68,    69,    70,     0,     1,    38,    36,
825
      37,    38,    77,     0,    79,     5,   201,    36,    83,    84,
826
       5,    39,    40,    41,     5,     1,    32,    58,    46,     5,
827
      95,     1,    13,     5,   111,    37,     1,     1,   115,   116,
828
       5,     5,    36,   108,    75,    37,    38,   112,   113,    36,
829
      22,    38,    37,   130,   119,     1,   121,    32,    39,    39,
830
     125,    42,    38,    39,    40,    41,     5,    43,   133,   134,
831
      78,   136,   109,    38,    38,    39,    40,    41,   143,    43,
832
       5,     6,   147,   115,   149,    40,   117,   152,     7,     8,
833
       9,    10,    11,   158,    37,    38,    37,    38,    37,   164,
834
     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
835
     175,   176,   177,   178,   179,   146,     5,    72,   212,   150,
836
       1,    -1,   187,    12,     5,    44,    45,     1,   180,   160,
837
      -1,     5,   188,    14,    15,    16,    17,    18,    -1,    13,
838
     205,     0,     1,   208,   209,   210,    37,    38,    37,    23,
839
      37,    38,   217,    12,    13,    14,    15,    38,    39,    40,
840
      41,    -1,    43,   228,    23,    46,    -1,    26,    27,    28,
841
      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
842
      39,    37,    38,    42,    43,     0,     1,    46,    47,    48,
843
      49,    37,    38,     5,   225,    -1,    -1,    12,    13,    14,
844
      15,    13,    14,    15,    16,    17,    18,    19,    23,    -1,
845
      -1,    26,    27,    28,    29,    30,    31,    32,    33,    34,
846
      35,    36,    37,    38,    39,     0,     1,    42,    43,    -1,
847
       5,     1,    47,    48,    49,     5,     5,    12,    13,    14,
848
      15,    -1,    12,    12,    13,    -1,    14,    15,    16,    17,
849
      18,    26,    27,    28,    29,    30,    31,    32,    33,    34,
850
      35,    36,    37,    38,    39,     0,     1,    42,     0,     1,
851
      -1,    -1,    -1,    48,    49,    -1,    -1,    12,    13,    14,
852
      15,    13,    14,    15,    16,    17,    18,    19,    -1,    21,
853
      22,    26,    27,    28,    29,    30,    31,    32,    33,    34,
854
      35,    -1,    -1,    38,    39,     1,    -1,    42,    43,     5,
855
      -1,    46,    47,    48,    49,    -1,    12,    13,    14,    15,
856
      -1,    13,    -1,    -1,    16,    -1,    -1,    -1,     0,     1,
857
      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
858
      -1,    13,    34,    39,     0,     1,    42,    -1,    -1,     5,
859
      46,    23,    48,    49,    -1,    -1,    -1,    13,    -1,    -1,
860
      -1,    -1,    -1,    -1,    36,    -1,    38,    23,    -1,    12,
861
      13,    14,    15,    13,    14,    15,    16,    17,    18,    19,
862
      36,    37,    38,    26,    27,    28,    29,    30,    31,    32,
863
      33,    34,    35,    -1,    -1,    -1,    39,    -1,    -1,    42,
864
      -1,    -1,    -1,    -1,    -1,    48,    49,    26,    27,    28,
865
      29,    30,    31,    32
866
};
867
868
  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
869
     symbol of state STATE-NUM.  */
870
static const yytype_int8 yystos[] =
871
{
872
       0,    51,    52,     0,     5,    22,    54,    56,     1,    52,
873
      53,    37,    38,    90,    12,     5,     6,    58,     1,    52,
874
       1,    13,    14,    15,    16,    17,    18,    19,    21,    22,
875
      57,    59,    60,    61,    65,    66,    67,    68,    69,    70,
876
      71,    72,    73,    75,    78,    89,     0,    36,    55,    90,
877
      91,    37,    90,    13,    16,    34,    13,    52,     1,    52,
878
      52,    53,     1,    38,    43,    69,     1,     5,    39,    40,
879
      41,    62,    71,     1,    72,     1,    13,    34,    52,    13,
880
      74,    37,    90,    38,    12,    37,    52,    52,    52,    52,
881
      52,    69,    55,    90,    52,    13,    39,    42,    63,    64,
882
      52,     7,     8,     9,    10,    11,    44,    45,    76,    52,
883
      52,     1,    13,    23,    79,    80,    81,    82,    68,    68,
884
      52,    32,    52,    79,    37,    37,    91,    52,    52,    55,
885
       1,    81,    91,    37,    91,     1,    16,    90,    52,    46,
886
      52,    12,    13,    77,    55,    52,     1,    37,    91,    37,
887
       1,    52,    37,    52,    52,    46,    46,    52,    37,    52,
888
       1,    52,    52,     1,    12,    13,    14,    15,    26,    27,
889
      28,    29,    30,    31,    32,    33,    34,    35,    48,    49,
890
      64,    84,    86,    87,    88,    44,    52,    37,    84,    52,
891
      52,    52,    52,    52,    52,    52,    52,    52,    52,    52,
892
      52,    52,    52,    52,    52,    30,    87,     1,    23,    43,
893
      47,    83,    85,    91,    52,    83,     1,    46,    84,    52,
894
      52,    52,    52,     1,    86,     1,    52,     0,    46,    52
895
};
896
897
  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
898
static const yytype_int8 yyr1[] =
899
{
900
       0,    50,    51,    52,    52,    53,    53,    53,    54,    54,
901
      55,    55,    56,    56,    56,    57,    57,    58,    58,    59,
902
      59,    60,    60,    60,    61,    61,    61,    62,    62,    62,
903
      63,    63,    64,    64,    65,    66,    66,    66,    67,    68,
904
      68,    68,    68,    68,    69,    69,    69,    70,    70,    71,
905
      71,    71,    72,    72,    72,    72,    72,    73,    74,    75,
906
      75,    76,    76,    76,    76,    76,    76,    77,    77,    78,
907
      78,    78,    78,    78,    79,    79,    79,    79,    79,    79,
908
      79,    80,    80,    80,    80,    80,    80,    80,    80,    81,
909
      81,    81,    81,    81,    81,    81,    81,    82,    83,    83,
910
      84,    84,    84,    84,    84,    85,    85,    85,    86,    86,
911
      86,    86,    86,    86,    86,    86,    86,    86,    86,    86,
912
      86,    87,    87,    87,    87,    87,    87,    88,    88,    88,
913
      88,    89,    90,    90,    91,    91
914
};
915
916
  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
917
static const yytype_int8 yyr2[] =
918
{
919
       0,     2,     4,     0,     2,     0,     2,     2,     0,     1,
920
       1,     1,     5,     3,     3,     5,     3,     0,     3,     1,
921
       1,     1,     1,     1,     6,     3,     3,     2,     2,     2,
922
       1,     0,     1,     1,     5,     1,     4,     2,     2,     1,
923
       1,     2,     3,     2,     1,     2,     1,     1,     1,     1,
924
       2,     2,     1,     1,     1,     1,     1,     2,     2,     4,
925
       8,     1,     1,     1,     1,     1,     1,     1,     1,     2,
926
       3,     7,     7,     6,     1,     2,     1,     3,     1,     2,
927
       2,     3,     3,     4,     3,     5,     4,     4,     6,     5,
928
       2,     6,     6,     2,     3,     4,     2,     2,     2,     0,
929
       1,     3,     2,     3,     2,     2,     2,     0,     1,     2,
930
       2,     2,     2,     3,     2,     2,     2,     2,     2,     1,
931
       2,     2,     2,     2,     2,     2,     2,     5,     4,     4,
932
       3,     2,     5,     3,     1,     3
933
};
934
935
936
#define yyerrok         (yyerrstatus = 0)
937
#define yyclearin       (yychar = YYEMPTY)
938
12.8M
#define YYEMPTY         (-2)
939
8.92M
#define YYEOF           0
940
941
7.59k
#define YYACCEPT        goto yyacceptlab
942
4.20k
#define YYABORT         goto yyabortlab
943
0
#define YYERROR         goto yyerrorlab
944
945
946
#define YYRECOVERING()  (!!yyerrstatus)
947
948
#define YYBACKUP(Token, Value)                                    \
949
  do                                                              \
950
    if (yychar == YYEMPTY)                                        \
951
      {                                                           \
952
        yychar = (Token);                                         \
953
        yylval = (Value);                                         \
954
        YYPOPSTACK (yylen);                                       \
955
        yystate = *yyssp;                                         \
956
        goto yybackup;                                            \
957
      }                                                           \
958
    else                                                          \
959
      {                                                           \
960
        yyerror (scanner, css_parser, YY_("syntax error: cannot back up")); \
961
        YYERROR;                                                  \
962
      }                                                           \
963
  while (0)
964
965
/* Error token number */
966
6.88M
#define YYTERROR        1
967
#define YYERRCODE       256
968
969
970
971
/* Enable debugging if requested.  */
972
#if CSSDEBUG
973
974
# ifndef YYFPRINTF
975
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
976
#  define YYFPRINTF fprintf
977
# endif
978
979
# define YYDPRINTF(Args)                        \
980
do {                                            \
981
  if (yydebug)                                  \
982
    YYFPRINTF Args;                             \
983
} while (0)
984
985
/* This macro is provided for backward compatibility. */
986
#ifndef YY_LOCATION_PRINT
987
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
988
#endif
989
990
991
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
992
do {                                                                      \
993
  if (yydebug)                                                            \
994
    {                                                                     \
995
      YYFPRINTF (stderr, "%s ", Title);                                   \
996
      yy_symbol_print (stderr,                                            \
997
                  Type, Value, scanner, css_parser); \
998
      YYFPRINTF (stderr, "\n");                                           \
999
    }                                                                     \
1000
} while (0)
1001
1002
1003
/*-----------------------------------.
1004
| Print this symbol's value on YYO.  |
1005
`-----------------------------------*/
1006
1007
static void
1008
yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, yyscan_t scanner, vlc_css_parser_t *css_parser)
1009
{
1010
  FILE *yyoutput = yyo;
1011
  YYUSE (yyoutput);
1012
  YYUSE (scanner);
1013
  YYUSE (css_parser);
1014
  if (!yyvaluep)
1015
    return;
1016
# ifdef YYPRINT
1017
  if (yytype < YYNTOKENS)
1018
    YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
1019
# endif
1020
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1021
  YYUSE (yytype);
1022
  YY_IGNORE_MAYBE_UNINITIALIZED_END
1023
}
1024
1025
1026
/*---------------------------.
1027
| Print this symbol on YYO.  |
1028
`---------------------------*/
1029
1030
static void
1031
yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, yyscan_t scanner, vlc_css_parser_t *css_parser)
1032
{
1033
  YYFPRINTF (yyo, "%s %s (",
1034
             yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1035
1036
  yy_symbol_value_print (yyo, yytype, yyvaluep, scanner, css_parser);
1037
  YYFPRINTF (yyo, ")");
1038
}
1039
1040
/*------------------------------------------------------------------.
1041
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1042
| TOP (included).                                                   |
1043
`------------------------------------------------------------------*/
1044
1045
static void
1046
yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
1047
{
1048
  YYFPRINTF (stderr, "Stack now");
1049
  for (; yybottom <= yytop; yybottom++)
1050
    {
1051
      int yybot = *yybottom;
1052
      YYFPRINTF (stderr, " %d", yybot);
1053
    }
1054
  YYFPRINTF (stderr, "\n");
1055
}
1056
1057
# define YY_STACK_PRINT(Bottom, Top)                            \
1058
do {                                                            \
1059
  if (yydebug)                                                  \
1060
    yy_stack_print ((Bottom), (Top));                           \
1061
} while (0)
1062
1063
1064
/*------------------------------------------------.
1065
| Report that the YYRULE is going to be reduced.  |
1066
`------------------------------------------------*/
1067
1068
static void
1069
yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule, yyscan_t scanner, vlc_css_parser_t *css_parser)
1070
{
1071
  int yylno = yyrline[yyrule];
1072
  int yynrhs = yyr2[yyrule];
1073
  int yyi;
1074
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
1075
             yyrule - 1, yylno);
1076
  /* The symbols being reduced.  */
1077
  for (yyi = 0; yyi < yynrhs; yyi++)
1078
    {
1079
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
1080
      yy_symbol_print (stderr,
1081
                       yystos[+yyssp[yyi + 1 - yynrhs]],
1082
                       &yyvsp[(yyi + 1) - (yynrhs)]
1083
                                              , scanner, css_parser);
1084
      YYFPRINTF (stderr, "\n");
1085
    }
1086
}
1087
1088
# define YY_REDUCE_PRINT(Rule)          \
1089
do {                                    \
1090
  if (yydebug)                          \
1091
    yy_reduce_print (yyssp, yyvsp, Rule, scanner, css_parser); \
1092
} while (0)
1093
1094
/* Nonzero means print parse trace.  It is left uninitialized so that
1095
   multiple parsers can coexist.  */
1096
int yydebug;
1097
#else /* !CSSDEBUG */
1098
# define YYDPRINTF(Args)
1099
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1100
# define YY_STACK_PRINT(Bottom, Top)
1101
# define YY_REDUCE_PRINT(Rule)
1102
#endif /* !CSSDEBUG */
1103
1104
1105
/* YYINITDEPTH -- initial size of the parser's stacks.  */
1106
#ifndef YYINITDEPTH
1107
11.8k
# define YYINITDEPTH 200
1108
#endif
1109
1110
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1111
   if the built-in stack extension method is used).
1112
1113
   Do not make this value too large; the results are undefined if
1114
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1115
   evaluated with infinite-precision integer arithmetic.  */
1116
1117
#ifndef YYMAXDEPTH
1118
5.52k
# define YYMAXDEPTH 10000
1119
#endif
1120
1121
1122
#if YYERROR_VERBOSE
1123
1124
# ifndef yystrlen
1125
#  if defined __GLIBC__ && defined _STRING_H
1126
#   define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
1127
#  else
1128
/* Return the length of YYSTR.  */
1129
static YYPTRDIFF_T
1130
yystrlen (const char *yystr)
1131
{
1132
  YYPTRDIFF_T yylen;
1133
  for (yylen = 0; yystr[yylen]; yylen++)
1134
    continue;
1135
  return yylen;
1136
}
1137
#  endif
1138
# endif
1139
1140
# ifndef yystpcpy
1141
#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1142
#   define yystpcpy stpcpy
1143
#  else
1144
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1145
   YYDEST.  */
1146
static char *
1147
yystpcpy (char *yydest, const char *yysrc)
1148
{
1149
  char *yyd = yydest;
1150
  const char *yys = yysrc;
1151
1152
  while ((*yyd++ = *yys++) != '\0')
1153
    continue;
1154
1155
  return yyd - 1;
1156
}
1157
#  endif
1158
# endif
1159
1160
# ifndef yytnamerr
1161
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1162
   quotes and backslashes, so that it's suitable for yyerror.  The
1163
   heuristic is that double-quoting is unnecessary unless the string
1164
   contains an apostrophe, a comma, or backslash (other than
1165
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1166
   null, do not copy; instead, return the length of what the result
1167
   would have been.  */
1168
static YYPTRDIFF_T
1169
yytnamerr (char *yyres, const char *yystr)
1170
{
1171
  if (*yystr == '"')
1172
    {
1173
      YYPTRDIFF_T yyn = 0;
1174
      char const *yyp = yystr;
1175
1176
      for (;;)
1177
        switch (*++yyp)
1178
          {
1179
          case '\'':
1180
          case ',':
1181
            goto do_not_strip_quotes;
1182
1183
          case '\\':
1184
            if (*++yyp != '\\')
1185
              goto do_not_strip_quotes;
1186
            else
1187
              goto append;
1188
1189
          append:
1190
          default:
1191
            if (yyres)
1192
              yyres[yyn] = *yyp;
1193
            yyn++;
1194
            break;
1195
1196
          case '"':
1197
            if (yyres)
1198
              yyres[yyn] = '\0';
1199
            return yyn;
1200
          }
1201
    do_not_strip_quotes: ;
1202
    }
1203
1204
  if (yyres)
1205
    return yystpcpy (yyres, yystr) - yyres;
1206
  else
1207
    return yystrlen (yystr);
1208
}
1209
# endif
1210
1211
/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1212
   about the unexpected token YYTOKEN for the state stack whose top is
1213
   YYSSP.
1214
1215
   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
1216
   not large enough to hold the message.  In that case, also set
1217
   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
1218
   required number of bytes is too large to store.  */
1219
static int
1220
yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
1221
                yy_state_t *yyssp, int yytoken)
1222
{
1223
  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1224
  /* Internationalized format string. */
1225
  const char *yyformat = YY_NULLPTR;
1226
  /* Arguments of yyformat: reported tokens (one for the "unexpected",
1227
     one per "expected"). */
1228
  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1229
  /* Actual size of YYARG. */
1230
  int yycount = 0;
1231
  /* Cumulated lengths of YYARG.  */
1232
  YYPTRDIFF_T yysize = 0;
1233
1234
  /* There are many possibilities here to consider:
1235
     - If this state is a consistent state with a default action, then
1236
       the only way this function was invoked is if the default action
1237
       is an error action.  In that case, don't check for expected
1238
       tokens because there are none.
1239
     - The only way there can be no lookahead present (in yychar) is if
1240
       this state is a consistent state with a default action.  Thus,
1241
       detecting the absence of a lookahead is sufficient to determine
1242
       that there is no unexpected or expected token to report.  In that
1243
       case, just report a simple "syntax error".
1244
     - Don't assume there isn't a lookahead just because this state is a
1245
       consistent state with a default action.  There might have been a
1246
       previous inconsistent state, consistent state with a non-default
1247
       action, or user semantic action that manipulated yychar.
1248
     - Of course, the expected token list depends on states to have
1249
       correct lookahead information, and it depends on the parser not
1250
       to perform extra reductions after fetching a lookahead from the
1251
       scanner and before detecting a syntax error.  Thus, state merging
1252
       (from LALR or IELR) and default reductions corrupt the expected
1253
       token list.  However, the list is correct for canonical LR with
1254
       one exception: it will still contain any token that will not be
1255
       accepted due to an error action in a later state.
1256
  */
1257
  if (yytoken != YYEMPTY)
1258
    {
1259
      int yyn = yypact[+*yyssp];
1260
      YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1261
      yysize = yysize0;
1262
      yyarg[yycount++] = yytname[yytoken];
1263
      if (!yypact_value_is_default (yyn))
1264
        {
1265
          /* Start YYX at -YYN if negative to avoid negative indexes in
1266
             YYCHECK.  In other words, skip the first -YYN actions for
1267
             this state because they are default actions.  */
1268
          int yyxbegin = yyn < 0 ? -yyn : 0;
1269
          /* Stay within bounds of both yycheck and yytname.  */
1270
          int yychecklim = YYLAST - yyn + 1;
1271
          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1272
          int yyx;
1273
1274
          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1275
            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1276
                && !yytable_value_is_error (yytable[yyx + yyn]))
1277
              {
1278
                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1279
                  {
1280
                    yycount = 1;
1281
                    yysize = yysize0;
1282
                    break;
1283
                  }
1284
                yyarg[yycount++] = yytname[yyx];
1285
                {
1286
                  YYPTRDIFF_T yysize1
1287
                    = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1288
                  if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1289
                    yysize = yysize1;
1290
                  else
1291
                    return 2;
1292
                }
1293
              }
1294
        }
1295
    }
1296
1297
  switch (yycount)
1298
    {
1299
# define YYCASE_(N, S)                      \
1300
      case N:                               \
1301
        yyformat = S;                       \
1302
      break
1303
    default: /* Avoid compiler warnings. */
1304
      YYCASE_(0, YY_("syntax error"));
1305
      YYCASE_(1, YY_("syntax error, unexpected %s"));
1306
      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1307
      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1308
      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1309
      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1310
# undef YYCASE_
1311
    }
1312
1313
  {
1314
    /* Don't count the "%s"s in the final size, but reserve room for
1315
       the terminator.  */
1316
    YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1;
1317
    if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1318
      yysize = yysize1;
1319
    else
1320
      return 2;
1321
  }
1322
1323
  if (*yymsg_alloc < yysize)
1324
    {
1325
      *yymsg_alloc = 2 * yysize;
1326
      if (! (yysize <= *yymsg_alloc
1327
             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1328
        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1329
      return 1;
1330
    }
1331
1332
  /* Avoid sprintf, as that infringes on the user's name space.
1333
     Don't have undefined behavior even if the translation
1334
     produced a string with the wrong number of "%s"s.  */
1335
  {
1336
    char *yyp = *yymsg;
1337
    int yyi = 0;
1338
    while ((*yyp = *yyformat) != '\0')
1339
      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1340
        {
1341
          yyp += yytnamerr (yyp, yyarg[yyi++]);
1342
          yyformat += 2;
1343
        }
1344
      else
1345
        {
1346
          ++yyp;
1347
          ++yyformat;
1348
        }
1349
  }
1350
  return 0;
1351
}
1352
#endif /* YYERROR_VERBOSE */
1353
1354
/*-----------------------------------------------.
1355
| Release the memory associated to this symbol.  |
1356
`-----------------------------------------------*/
1357
1358
static void
1359
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, yyscan_t scanner, vlc_css_parser_t *css_parser)
1360
2.25M
{
1361
2.25M
  YYUSE (yyvaluep);
1362
2.25M
  YYUSE (scanner);
1363
2.25M
  YYUSE (css_parser);
1364
2.25M
  if (!yymsg)
1365
0
    yymsg = "Deleting";
1366
2.25M
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1367
1368
2.25M
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1369
2.25M
  switch (yytype)
1370
2.25M
    {
1371
2.06k
    case 12: /* STRING  */
1372
2.06k
#line 171 "codec/webvtt/CSSGrammar.y"
1373
2.06k
            { free(((*yyvaluep).string)); }
1374
2.06k
#line 1375 "codec/webvtt/CSSGrammar.c"
1375
2.06k
        break;
1376
1377
160k
    case 13: /* IDENT  */
1378
160k
#line 171 "codec/webvtt/CSSGrammar.y"
1379
160k
            { free(((*yyvaluep).string)); }
1380
160k
#line 1381 "codec/webvtt/CSSGrammar.c"
1381
160k
        break;
1382
1383
4.65k
    case 14: /* IDSEL  */
1384
4.65k
#line 171 "codec/webvtt/CSSGrammar.y"
1385
4.65k
            { free(((*yyvaluep).string)); }
1386
4.65k
#line 1387 "codec/webvtt/CSSGrammar.c"
1387
4.65k
        break;
1388
1389
1.18k
    case 15: /* HASH  */
1390
1.18k
#line 171 "codec/webvtt/CSSGrammar.y"
1391
1.18k
            { free(((*yyvaluep).string)); }
1392
1.18k
#line 1393 "codec/webvtt/CSSGrammar.c"
1393
1.18k
        break;
1394
1395
3.18k
    case 26: /* LENGTH  */
1396
3.18k
#line 119 "codec/webvtt/CSSGrammar.y"
1397
3.18k
            { vlc_css_term_Clean(((*yyvaluep).term)); }
1398
3.18k
#line 1399 "codec/webvtt/CSSGrammar.c"
1399
3.18k
        break;
1400
1401
504
    case 27: /* ANGLE  */
1402
504
#line 119 "codec/webvtt/CSSGrammar.y"
1403
504
            { vlc_css_term_Clean(((*yyvaluep).term)); }
1404
504
#line 1405 "codec/webvtt/CSSGrammar.c"
1405
504
        break;
1406
1407
527
    case 28: /* TIME  */
1408
527
#line 119 "codec/webvtt/CSSGrammar.y"
1409
527
            { vlc_css_term_Clean(((*yyvaluep).term)); }
1410
527
#line 1411 "codec/webvtt/CSSGrammar.c"
1411
527
        break;
1412
1413
2.88k
    case 29: /* FREQ  */
1414
2.88k
#line 119 "codec/webvtt/CSSGrammar.y"
1415
2.88k
            { vlc_css_term_Clean(((*yyvaluep).term)); }
1416
2.88k
#line 1417 "codec/webvtt/CSSGrammar.c"
1417
2.88k
        break;
1418
1419
7.92k
    case 30: /* DIMEN  */
1420
7.92k
#line 119 "codec/webvtt/CSSGrammar.y"
1421
7.92k
            { vlc_css_term_Clean(((*yyvaluep).term)); }
1422
7.92k
#line 1423 "codec/webvtt/CSSGrammar.c"
1423
7.92k
        break;
1424
1425
1.32k
    case 31: /* PERCENTAGE  */
1426
1.32k
#line 119 "codec/webvtt/CSSGrammar.y"
1427
1.32k
            { vlc_css_term_Clean(((*yyvaluep).term)); }
1428
1.32k
#line 1429 "codec/webvtt/CSSGrammar.c"
1429
1.32k
        break;
1430
1431
19.1k
    case 32: /* NUMBER  */
1432
19.1k
#line 119 "codec/webvtt/CSSGrammar.y"
1433
19.1k
            { vlc_css_term_Clean(((*yyvaluep).term)); }
1434
19.1k
#line 1435 "codec/webvtt/CSSGrammar.c"
1435
19.1k
        break;
1436
1437
207
    case 33: /* URI  */
1438
207
#line 171 "codec/webvtt/CSSGrammar.y"
1439
207
            { free(((*yyvaluep).string)); }
1440
207
#line 1441 "codec/webvtt/CSSGrammar.c"
1441
207
        break;
1442
1443
164k
    case 34: /* FUNCTION  */
1444
164k
#line 171 "codec/webvtt/CSSGrammar.y"
1445
164k
            { free(((*yyvaluep).string)); }
1446
164k
#line 1447 "codec/webvtt/CSSGrammar.c"
1447
164k
        break;
1448
1449
483
    case 35: /* UNICODERANGE  */
1450
483
#line 171 "codec/webvtt/CSSGrammar.y"
1451
483
            { free(((*yyvaluep).string)); }
1452
483
#line 1453 "codec/webvtt/CSSGrammar.c"
1453
483
        break;
1454
1455
0
    case 56: /* charset  */
1456
0
#line 134 "codec/webvtt/CSSGrammar.y"
1457
0
            { vlc_css_rules_Delete(((*yyvaluep).rule)); }
1458
0
#line 1459 "codec/webvtt/CSSGrammar.c"
1459
0
        break;
1460
1461
0
    case 57: /* ignored_charset  */
1462
0
#line 134 "codec/webvtt/CSSGrammar.y"
1463
0
            { vlc_css_rules_Delete(((*yyvaluep).rule)); }
1464
0
#line 1465 "codec/webvtt/CSSGrammar.c"
1465
0
        break;
1466
1467
0
    case 59: /* valid_rule  */
1468
0
#line 134 "codec/webvtt/CSSGrammar.y"
1469
0
            { vlc_css_rules_Delete(((*yyvaluep).rule)); }
1470
0
#line 1471 "codec/webvtt/CSSGrammar.c"
1471
0
        break;
1472
1473
0
    case 60: /* rule  */
1474
0
#line 134 "codec/webvtt/CSSGrammar.y"
1475
0
            { vlc_css_rules_Delete(((*yyvaluep).rule)); }
1476
0
#line 1477 "codec/webvtt/CSSGrammar.c"
1477
0
        break;
1478
1479
0
    case 61: /* font_face  */
1480
0
#line 134 "codec/webvtt/CSSGrammar.y"
1481
0
            { vlc_css_rules_Delete(((*yyvaluep).rule)); }
1482
0
#line 1483 "codec/webvtt/CSSGrammar.c"
1483
0
        break;
1484
1485
0
    case 65: /* ruleset  */
1486
0
#line 134 "codec/webvtt/CSSGrammar.y"
1487
0
            { vlc_css_rules_Delete(((*yyvaluep).rule)); }
1488
0
#line 1489 "codec/webvtt/CSSGrammar.c"
1489
0
        break;
1490
1491
693
    case 66: /* selector_list  */
1492
693
#line 148 "codec/webvtt/CSSGrammar.y"
1493
693
            { vlc_css_selectors_Delete(((*yyvaluep).selectorList)); }
1494
693
#line 1495 "codec/webvtt/CSSGrammar.c"
1495
693
        break;
1496
1497
1.17k
    case 67: /* selector_with_trailing_whitespace  */
1498
1.17k
#line 148 "codec/webvtt/CSSGrammar.y"
1499
1.17k
            { vlc_css_selectors_Delete(((*yyvaluep).selector)); }
1500
1.17k
#line 1501 "codec/webvtt/CSSGrammar.c"
1501
1.17k
        break;
1502
1503
2.11k
    case 68: /* selector  */
1504
2.11k
#line 148 "codec/webvtt/CSSGrammar.y"
1505
2.11k
            { vlc_css_selectors_Delete(((*yyvaluep).selector)); }
1506
2.11k
#line 1507 "codec/webvtt/CSSGrammar.c"
1507
2.11k
        break;
1508
1509
0
    case 69: /* simple_selector  */
1510
0
#line 148 "codec/webvtt/CSSGrammar.y"
1511
0
            { vlc_css_selectors_Delete(((*yyvaluep).selector)); }
1512
0
#line 1513 "codec/webvtt/CSSGrammar.c"
1513
0
        break;
1514
1515
2.31k
    case 70: /* element_name  */
1516
2.31k
#line 171 "codec/webvtt/CSSGrammar.y"
1517
2.31k
            { free(((*yyvaluep).string)); }
1518
2.31k
#line 1519 "codec/webvtt/CSSGrammar.c"
1519
2.31k
        break;
1520
1521
643
    case 71: /* specifier_list  */
1522
643
#line 148 "codec/webvtt/CSSGrammar.y"
1523
643
            { vlc_css_selectors_Delete(((*yyvaluep).selector)); }
1524
643
#line 1525 "codec/webvtt/CSSGrammar.c"
1525
643
        break;
1526
1527
0
    case 72: /* specifier  */
1528
0
#line 148 "codec/webvtt/CSSGrammar.y"
1529
0
            { vlc_css_selectors_Delete(((*yyvaluep).selector)); }
1530
0
#line 1531 "codec/webvtt/CSSGrammar.c"
1531
0
        break;
1532
1533
0
    case 73: /* class  */
1534
0
#line 148 "codec/webvtt/CSSGrammar.y"
1535
0
            { vlc_css_selectors_Delete(((*yyvaluep).selector)); }
1536
0
#line 1537 "codec/webvtt/CSSGrammar.c"
1537
0
        break;
1538
1539
2.28k
    case 74: /* attr_name  */
1540
2.28k
#line 171 "codec/webvtt/CSSGrammar.y"
1541
2.28k
            { free(((*yyvaluep).string)); }
1542
2.28k
#line 1543 "codec/webvtt/CSSGrammar.c"
1543
2.28k
        break;
1544
1545
0
    case 75: /* attrib  */
1546
0
#line 148 "codec/webvtt/CSSGrammar.y"
1547
0
            { vlc_css_selectors_Delete(((*yyvaluep).selector)); }
1548
0
#line 1549 "codec/webvtt/CSSGrammar.c"
1549
0
        break;
1550
1551
379
    case 77: /* ident_or_string  */
1552
379
#line 171 "codec/webvtt/CSSGrammar.y"
1553
379
            { free(((*yyvaluep).string)); }
1554
379
#line 1555 "codec/webvtt/CSSGrammar.c"
1555
379
        break;
1556
1557
0
    case 78: /* pseudo  */
1558
0
#line 148 "codec/webvtt/CSSGrammar.y"
1559
0
            { vlc_css_selectors_Delete(((*yyvaluep).selector)); }
1560
0
#line 1561 "codec/webvtt/CSSGrammar.c"
1561
0
        break;
1562
1563
70.2k
    case 79: /* declaration_list  */
1564
70.2k
#line 153 "codec/webvtt/CSSGrammar.y"
1565
70.2k
            { vlc_css_declarations_Delete(((*yyvaluep).declarationList)); }
1566
70.2k
#line 1567 "codec/webvtt/CSSGrammar.c"
1567
70.2k
        break;
1568
1569
82
    case 80: /* decl_list  */
1570
82
#line 153 "codec/webvtt/CSSGrammar.y"
1571
82
            { vlc_css_declarations_Delete(((*yyvaluep).declarationList)); }
1572
82
#line 1573 "codec/webvtt/CSSGrammar.c"
1573
82
        break;
1574
1575
200
    case 81: /* declaration  */
1576
200
#line 153 "codec/webvtt/CSSGrammar.y"
1577
200
            { vlc_css_declarations_Delete(((*yyvaluep).declaration)); }
1578
200
#line 1579 "codec/webvtt/CSSGrammar.c"
1579
200
        break;
1580
1581
25
    case 82: /* property  */
1582
25
#line 171 "codec/webvtt/CSSGrammar.y"
1583
25
            { free(((*yyvaluep).string)); }
1584
25
#line 1585 "codec/webvtt/CSSGrammar.c"
1585
25
        break;
1586
1587
591
    case 84: /* expr  */
1588
591
#line 166 "codec/webvtt/CSSGrammar.y"
1589
591
            { vlc_css_expression_Delete(((*yyvaluep).expr)); }
1590
591
#line 1591 "codec/webvtt/CSSGrammar.c"
1591
591
        break;
1592
1593
0
    case 86: /* term  */
1594
0
#line 119 "codec/webvtt/CSSGrammar.y"
1595
0
            { vlc_css_term_Clean(((*yyvaluep).term)); }
1596
0
#line 1597 "codec/webvtt/CSSGrammar.c"
1597
0
        break;
1598
1599
0
    case 87: /* unary_term  */
1600
0
#line 119 "codec/webvtt/CSSGrammar.y"
1601
0
            { vlc_css_term_Clean(((*yyvaluep).term)); }
1602
0
#line 1603 "codec/webvtt/CSSGrammar.c"
1603
0
        break;
1604
1605
0
    case 88: /* function  */
1606
0
#line 119 "codec/webvtt/CSSGrammar.y"
1607
0
            { vlc_css_term_Clean(((*yyvaluep).term)); }
1608
0
#line 1609 "codec/webvtt/CSSGrammar.c"
1609
0
        break;
1610
1611
0
    case 89: /* invalid_rule  */
1612
0
#line 134 "codec/webvtt/CSSGrammar.y"
1613
0
            { vlc_css_rules_Delete(((*yyvaluep).rule)); }
1614
0
#line 1615 "codec/webvtt/CSSGrammar.c"
1615
0
        break;
1616
1617
1.80M
      default:
1618
1.80M
        break;
1619
2.25M
    }
1620
2.25M
  YY_IGNORE_MAYBE_UNINITIALIZED_END
1621
2.25M
}
1622
1623
1624
1625
1626
/*----------.
1627
| yyparse.  |
1628
`----------*/
1629
1630
int
1631
yyparse (yyscan_t scanner, vlc_css_parser_t *css_parser)
1632
11.8k
{
1633
/* The lookahead symbol.  */
1634
11.8k
int yychar;
1635
1636
1637
/* The semantic value of the lookahead symbol.  */
1638
/* Default value used for initialization, for pacifying older GCCs
1639
   or non-GCC compilers.  */
1640
11.8k
YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
1641
11.8k
YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
1642
1643
    /* Number of syntax errors so far.  */
1644
11.8k
    int yynerrs;
1645
1646
11.8k
    yy_state_fast_t yystate;
1647
    /* Number of tokens to shift before error messages enabled.  */
1648
11.8k
    int yyerrstatus;
1649
1650
    /* The stacks and their tools:
1651
       'yyss': related to states.
1652
       'yyvs': related to semantic values.
1653
1654
       Refer to the stacks through separate pointers, to allow yyoverflow
1655
       to reallocate them elsewhere.  */
1656
1657
    /* The state stack.  */
1658
11.8k
    yy_state_t yyssa[YYINITDEPTH];
1659
11.8k
    yy_state_t *yyss;
1660
11.8k
    yy_state_t *yyssp;
1661
1662
    /* The semantic value stack.  */
1663
11.8k
    YYSTYPE yyvsa[YYINITDEPTH];
1664
11.8k
    YYSTYPE *yyvs;
1665
11.8k
    YYSTYPE *yyvsp;
1666
1667
11.8k
    YYPTRDIFF_T yystacksize;
1668
1669
11.8k
  int yyn;
1670
11.8k
  int yyresult;
1671
  /* Lookahead token as an internal (translated) token number.  */
1672
11.8k
  int yytoken = 0;
1673
  /* The variables used to return semantic value and location from the
1674
     action routines.  */
1675
11.8k
  YYSTYPE yyval;
1676
1677
#if YYERROR_VERBOSE
1678
  /* Buffer for error messages, and its allocated size.  */
1679
  char yymsgbuf[128];
1680
  char *yymsg = yymsgbuf;
1681
  YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
1682
#endif
1683
1684
6.30M
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1685
1686
  /* The number of symbols on the RHS of the reduced rule.
1687
     Keep to zero when no symbol should be popped.  */
1688
11.8k
  int yylen = 0;
1689
1690
11.8k
  yyssp = yyss = yyssa;
1691
11.8k
  yyvsp = yyvs = yyvsa;
1692
11.8k
  yystacksize = YYINITDEPTH;
1693
1694
11.8k
  YYDPRINTF ((stderr, "Starting parse\n"));
1695
1696
11.8k
  yystate = 0;
1697
11.8k
  yyerrstatus = 0;
1698
11.8k
  yynerrs = 0;
1699
11.8k
  yychar = YYEMPTY; /* Cause a token to be read.  */
1700
11.8k
  goto yysetstate;
1701
1702
1703
/*------------------------------------------------------------.
1704
| yynewstate -- push a new state, which is found in yystate.  |
1705
`------------------------------------------------------------*/
1706
10.4M
yynewstate:
1707
  /* In all cases, when you get here, the value and location stacks
1708
     have just been pushed.  So pushing a state here evens the stacks.  */
1709
10.4M
  yyssp++;
1710
1711
1712
/*--------------------------------------------------------------------.
1713
| yysetstate -- set current state (the top of the stack) to yystate.  |
1714
`--------------------------------------------------------------------*/
1715
10.4M
yysetstate:
1716
10.4M
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1717
10.4M
  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1718
10.4M
  YY_IGNORE_USELESS_CAST_BEGIN
1719
10.4M
  *yyssp = YY_CAST (yy_state_t, yystate);
1720
10.4M
  YY_IGNORE_USELESS_CAST_END
1721
1722
10.4M
  if (yyss + yystacksize - 1 <= yyssp)
1723
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1724
    goto yyexhaustedlab;
1725
#else
1726
2.67k
    {
1727
      /* Get the current used size of the three stacks, in elements.  */
1728
2.67k
      YYPTRDIFF_T yysize = yyssp - yyss + 1;
1729
1730
# if defined yyoverflow
1731
      {
1732
        /* Give user a chance to reallocate the stack.  Use copies of
1733
           these so that the &'s don't force the real ones into
1734
           memory.  */
1735
        yy_state_t *yyss1 = yyss;
1736
        YYSTYPE *yyvs1 = yyvs;
1737
1738
        /* Each stack pointer address is followed by the size of the
1739
           data in use in that stack, in bytes.  This used to be a
1740
           conditional around just the two extra args, but that might
1741
           be undefined if yyoverflow is a macro.  */
1742
        yyoverflow (YY_("memory exhausted"),
1743
                    &yyss1, yysize * YYSIZEOF (*yyssp),
1744
                    &yyvs1, yysize * YYSIZEOF (*yyvsp),
1745
                    &yystacksize);
1746
        yyss = yyss1;
1747
        yyvs = yyvs1;
1748
      }
1749
# else /* defined YYSTACK_RELOCATE */
1750
      /* Extend the stack our own way.  */
1751
2.67k
      if (YYMAXDEPTH <= yystacksize)
1752
88
        goto yyexhaustedlab;
1753
2.58k
      yystacksize *= 2;
1754
2.58k
      if (YYMAXDEPTH < yystacksize)
1755
263
        yystacksize = YYMAXDEPTH;
1756
1757
2.58k
      {
1758
2.58k
        yy_state_t *yyss1 = yyss;
1759
2.58k
        union yyalloc *yyptr =
1760
2.58k
          YY_CAST (union yyalloc *,
1761
2.58k
                   YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
1762
2.58k
        if (! yyptr)
1763
0
          goto yyexhaustedlab;
1764
2.58k
        YYSTACK_RELOCATE (yyss_alloc, yyss);
1765
2.58k
        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1766
2.58k
# undef YYSTACK_RELOCATE
1767
2.58k
        if (yyss1 != yyssa)
1768
1.81k
          YYSTACK_FREE (yyss1);
1769
2.58k
      }
1770
0
# endif
1771
1772
0
      yyssp = yyss + yysize - 1;
1773
2.58k
      yyvsp = yyvs + yysize - 1;
1774
1775
2.58k
      YY_IGNORE_USELESS_CAST_BEGIN
1776
2.58k
      YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1777
2.58k
                  YY_CAST (long, yystacksize)));
1778
2.58k
      YY_IGNORE_USELESS_CAST_END
1779
1780
2.58k
      if (yyss + yystacksize - 1 <= yyssp)
1781
0
        YYABORT;
1782
2.58k
    }
1783
10.4M
#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1784
1785
10.4M
  if (yystate == YYFINAL)
1786
7.59k
    YYACCEPT;
1787
1788
10.4M
  goto yybackup;
1789
1790
1791
/*-----------.
1792
| yybackup.  |
1793
`-----------*/
1794
10.4M
yybackup:
1795
  /* Do appropriate processing given the current state.  Read a
1796
     lookahead token if we need one and don't already have one.  */
1797
1798
  /* First try to decide what to do without reference to lookahead token.  */
1799
10.4M
  yyn = yypact[yystate];
1800
10.4M
  if (yypact_value_is_default (yyn))
1801
4.07M
    goto yydefault;
1802
1803
  /* Not known => get a lookahead token if don't already have one.  */
1804
1805
  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1806
6.40M
  if (yychar == YYEMPTY)
1807
3.54M
    {
1808
3.54M
      YYDPRINTF ((stderr, "Reading a token: "));
1809
3.54M
      yychar = yylex (&yylval, scanner);
1810
3.54M
    }
1811
1812
6.40M
  if (yychar <= YYEOF)
1813
1.79M
    {
1814
1.79M
      yychar = yytoken = YYEOF;
1815
1.79M
      YYDPRINTF ((stderr, "Now at end of input.\n"));
1816
1.79M
    }
1817
4.61M
  else
1818
4.61M
    {
1819
4.61M
      yytoken = YYTRANSLATE (yychar);
1820
4.61M
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1821
4.61M
    }
1822
1823
  /* If the proper action on seeing token YYTOKEN is to reduce or to
1824
     detect an error, take that action.  */
1825
6.40M
  yyn += yytoken;
1826
6.40M
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1827
3.33M
    goto yydefault;
1828
3.07M
  yyn = yytable[yyn];
1829
3.07M
  if (yyn <= 0)
1830
253k
    {
1831
253k
      if (yytable_value_is_error (yyn))
1832
0
        goto yyerrlab;
1833
253k
      yyn = -yyn;
1834
253k
      goto yyreduce;
1835
253k
    }
1836
1837
  /* Count tokens shifted since error; after three, turn off error
1838
     status.  */
1839
2.81M
  if (yyerrstatus)
1840
2.26M
    yyerrstatus--;
1841
1842
  /* Shift the lookahead token.  */
1843
2.81M
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1844
2.81M
  yystate = yyn;
1845
2.81M
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1846
2.81M
  *++yyvsp = yylval;
1847
2.81M
  YY_IGNORE_MAYBE_UNINITIALIZED_END
1848
1849
  /* Discard the shifted token.  */
1850
2.81M
  yychar = YYEMPTY;
1851
2.81M
  goto yynewstate;
1852
1853
1854
/*-----------------------------------------------------------.
1855
| yydefault -- do the default action for the current state.  |
1856
`-----------------------------------------------------------*/
1857
7.40M
yydefault:
1858
7.40M
  yyn = yydefact[yystate];
1859
7.40M
  if (yyn == 0)
1860
2.89M
    goto yyerrlab;
1861
4.51M
  goto yyreduce;
1862
1863
1864
/*-----------------------------.
1865
| yyreduce -- do a reduction.  |
1866
`-----------------------------*/
1867
4.76M
yyreduce:
1868
  /* yyn is the number of a rule to reduce with.  */
1869
4.76M
  yylen = yyr2[yyn];
1870
1871
  /* If YYLEN is nonzero, implement the default value of the action:
1872
     '$$ = $1'.
1873
1874
     Otherwise, the following line sets YYVAL to garbage.
1875
     This behavior is undocumented and Bison
1876
     users should not rely upon it.  Assigning to YYVAL
1877
     unconditionally makes the parser a bit smaller, and it avoids a
1878
     GCC warning that YYVAL may be used uninitialized.  */
1879
4.76M
  yyval = yyvsp[1-yylen];
1880
1881
1882
4.76M
  YY_REDUCE_PRINT (yyn);
1883
4.76M
  switch (yyn)
1884
4.76M
    {
1885
0
  case 9:
1886
0
#line 192 "codec/webvtt/CSSGrammar.y"
1887
0
            {
1888
0
    vlc_css_rules_Delete((yyvsp[0].rule));
1889
0
  }
1890
0
#line 1891 "codec/webvtt/CSSGrammar.c"
1891
0
    break;
1892
1893
0
  case 12:
1894
0
#line 203 "codec/webvtt/CSSGrammar.y"
1895
0
                                                 {
1896
0
      free( (yyvsp[-2].string) );
1897
0
      (yyval.rule) = 0;
1898
0
  }
1899
0
#line 1900 "codec/webvtt/CSSGrammar.c"
1900
0
    break;
1901
1902
0
  case 13:
1903
0
#line 207 "codec/webvtt/CSSGrammar.y"
1904
0
                                    {
1905
0
      (yyval.rule) = 0;
1906
0
  }
1907
0
#line 1908 "codec/webvtt/CSSGrammar.c"
1908
0
    break;
1909
1910
0
  case 14:
1911
0
#line 210 "codec/webvtt/CSSGrammar.y"
1912
0
                          {
1913
0
      (yyval.rule) = 0;
1914
0
  }
1915
0
#line 1916 "codec/webvtt/CSSGrammar.c"
1916
0
    break;
1917
1918
0
  case 15:
1919
0
#line 216 "codec/webvtt/CSSGrammar.y"
1920
0
                                                   {
1921
        // Ignore any @charset rule not at the beginning of the style sheet.
1922
0
        free( (yyvsp[-2].string) );
1923
0
        (yyval.rule) = 0;
1924
0
    }
1925
0
#line 1926 "codec/webvtt/CSSGrammar.c"
1926
0
    break;
1927
1928
0
  case 16:
1929
0
#line 221 "codec/webvtt/CSSGrammar.y"
1930
0
                                  {
1931
0
        (yyval.rule) = 0;
1932
0
    }
1933
0
#line 1934 "codec/webvtt/CSSGrammar.c"
1934
0
    break;
1935
1936
18.1k
  case 18:
1937
18.1k
#line 228 "codec/webvtt/CSSGrammar.y"
1938
18.1k
                             {
1939
18.1k
     if( (yyvsp[-1].rule) )
1940
16.1k
         vlc_css_parser_AddRule( css_parser, (yyvsp[-1].rule) );
1941
18.1k
 }
1942
18.1k
#line 1943 "codec/webvtt/CSSGrammar.c"
1943
18.1k
    break;
1944
1945
16.1k
  case 21:
1946
16.1k
#line 240 "codec/webvtt/CSSGrammar.y"
1947
16.1k
               {
1948
16.1k
        (yyval.rule) = (yyvsp[0].rule);
1949
16.1k
        if((yyval.rule))
1950
16.1k
            (yyval.rule)->b_valid = true;
1951
16.1k
    }
1952
16.1k
#line 1953 "codec/webvtt/CSSGrammar.c"
1953
16.1k
    break;
1954
1955
0
  case 24:
1956
0
#line 251 "codec/webvtt/CSSGrammar.y"
1957
0
                                                   {
1958
0
        vlc_css_declarations_Delete( (yyvsp[-1].declarationList) );
1959
0
        (yyval.rule) = NULL;
1960
0
    }
1961
0
#line 1962 "codec/webvtt/CSSGrammar.c"
1962
0
    break;
1963
1964
0
  case 25:
1965
0
#line 255 "codec/webvtt/CSSGrammar.y"
1966
0
                                        {
1967
0
        (yyval.rule) = NULL;
1968
0
    }
1969
0
#line 1970 "codec/webvtt/CSSGrammar.c"
1970
0
    break;
1971
1972
0
  case 26:
1973
0
#line 258 "codec/webvtt/CSSGrammar.y"
1974
0
                              {
1975
0
        (yyval.rule) = NULL;
1976
0
    }
1977
0
#line 1978 "codec/webvtt/CSSGrammar.c"
1978
0
    break;
1979
1980
10.3k
  case 27:
1981
10.3k
#line 264 "codec/webvtt/CSSGrammar.y"
1982
10.3k
                    { (yyval.relation) = RELATION_DIRECTADJACENT; }
1983
10.3k
#line 1984 "codec/webvtt/CSSGrammar.c"
1984
10.3k
    break;
1985
1986
1.27k
  case 28:
1987
1.27k
#line 265 "codec/webvtt/CSSGrammar.y"
1988
1.27k
                    { (yyval.relation) = RELATION_INDIRECTADJACENT; }
1989
1.27k
#line 1990 "codec/webvtt/CSSGrammar.c"
1990
1.27k
    break;
1991
1992
5.70k
  case 29:
1993
5.70k
#line 266 "codec/webvtt/CSSGrammar.y"
1994
5.70k
                    { (yyval.relation) = RELATION_CHILD; }
1995
5.70k
#line 1996 "codec/webvtt/CSSGrammar.c"
1996
5.70k
    break;
1997
1998
207
  case 30:
1999
207
#line 270 "codec/webvtt/CSSGrammar.y"
2000
207
                   { (yyval.integer) = (yyvsp[0].integer); }
2001
207
#line 2002 "codec/webvtt/CSSGrammar.c"
2002
207
    break;
2003
2004
853
  case 31:
2005
853
#line 271 "codec/webvtt/CSSGrammar.y"
2006
853
      { (yyval.integer) = 1; }
2007
853
#line 2008 "codec/webvtt/CSSGrammar.c"
2008
853
    break;
2009
2010
12.6k
  case 32:
2011
12.6k
#line 275 "codec/webvtt/CSSGrammar.y"
2012
12.6k
        { (yyval.integer) = -1; }
2013
12.6k
#line 2014 "codec/webvtt/CSSGrammar.c"
2014
12.6k
    break;
2015
2016
5.85k
  case 33:
2017
5.85k
#line 276 "codec/webvtt/CSSGrammar.y"
2018
5.85k
        { (yyval.integer) = 1; }
2019
5.85k
#line 2020 "codec/webvtt/CSSGrammar.c"
2020
5.85k
    break;
2021
2022
16.1k
  case 34:
2023
16.1k
#line 280 "codec/webvtt/CSSGrammar.y"
2024
16.1k
                                                                 {
2025
16.1k
        (yyval.rule) = vlc_css_rule_New();
2026
16.1k
        if((yyval.rule))
2027
16.1k
        {
2028
16.1k
            (yyval.rule)->p_selectors = (yyvsp[-4].selectorList);
2029
16.1k
            (yyval.rule)->p_declarations = (yyvsp[-1].declarationList);
2030
16.1k
        }
2031
16.1k
    }
2032
16.1k
#line 2033 "codec/webvtt/CSSGrammar.c"
2033
16.1k
    break;
2034
2035
16.8k
  case 35:
2036
16.8k
#line 291 "codec/webvtt/CSSGrammar.y"
2037
16.8k
                                   {
2038
16.8k
        if ((yyvsp[0].selector)) {
2039
13.6k
            (yyval.selectorList) = (yyvsp[0].selector);
2040
13.6k
        }
2041
16.8k
    }
2042
16.8k
#line 2043 "codec/webvtt/CSSGrammar.c"
2043
16.8k
    break;
2044
2045
1.17k
  case 36:
2046
1.17k
#line 296 "codec/webvtt/CSSGrammar.y"
2047
1.17k
                                                                   {
2048
1.17k
        if ((yyvsp[-3].selectorList) && (yyvsp[0].selector) )
2049
471
        {
2050
471
            (yyval.selectorList) = (yyvsp[-3].selectorList);
2051
471
            vlc_css_selector_Append( (yyval.selectorList), (yyvsp[0].selector) );
2052
471
        }
2053
699
        else
2054
699
        {
2055
699
            vlc_css_selectors_Delete( (yyvsp[-3].selectorList) );
2056
699
            vlc_css_selectors_Delete( (yyvsp[0].selector) );
2057
699
            (yyval.selectorList) = NULL;
2058
699
        }
2059
1.17k
    }
2060
1.17k
#line 2061 "codec/webvtt/CSSGrammar.c"
2061
1.17k
    break;
2062
2063
8.77k
  case 37:
2064
8.77k
#line 309 "codec/webvtt/CSSGrammar.y"
2065
8.77k
                        {
2066
8.77k
        vlc_css_selectors_Delete( (yyvsp[-1].selectorList) );
2067
8.77k
        (yyval.selectorList) = NULL;
2068
8.77k
    }
2069
8.77k
#line 2070 "codec/webvtt/CSSGrammar.c"
2070
8.77k
    break;
2071
2072
40.1k
  case 38:
2073
40.1k
#line 316 "codec/webvtt/CSSGrammar.y"
2074
40.1k
                        {
2075
40.1k
        (yyval.selector) = (yyvsp[-1].selector);
2076
40.1k
    }
2077
40.1k
#line 2078 "codec/webvtt/CSSGrammar.c"
2078
40.1k
    break;
2079
2080
24.4k
  case 39:
2081
24.4k
#line 322 "codec/webvtt/CSSGrammar.y"
2082
24.4k
                    {
2083
24.4k
        (yyval.selector) = (yyvsp[0].selector);
2084
24.4k
    }
2085
24.4k
#line 2086 "codec/webvtt/CSSGrammar.c"
2086
24.4k
    break;
2087
2088
16.1k
  case 40:
2089
16.1k
#line 326 "codec/webvtt/CSSGrammar.y"
2090
16.1k
    {
2091
16.1k
        (yyval.selector) = (yyvsp[0].selector);
2092
16.1k
    }
2093
16.1k
#line 2094 "codec/webvtt/CSSGrammar.c"
2094
16.1k
    break;
2095
2096
22.8k
  case 41:
2097
22.8k
#line 330 "codec/webvtt/CSSGrammar.y"
2098
22.8k
    {
2099
22.8k
        (yyval.selector) = (yyvsp[-1].selector);
2100
22.8k
        if ((yyval.selector) && (yyvsp[0].selector))
2101
10.5k
        {
2102
10.5k
            vlc_css_selector_AddSpecifier( (yyval.selector), (yyvsp[0].selector) );
2103
10.5k
            (yyvsp[0].selector)->combinator = RELATION_DESCENDENT;
2104
10.5k
        }
2105
12.2k
        else (yyval.selector) = (yyvsp[0].selector);
2106
22.8k
    }
2107
22.8k
#line 2108 "codec/webvtt/CSSGrammar.c"
2108
22.8k
    break;
2109
2110
3.89k
  case 42:
2111
3.89k
#line 339 "codec/webvtt/CSSGrammar.y"
2112
3.89k
                                          {
2113
3.89k
        (yyval.selector) = (yyvsp[-2].selector);
2114
3.89k
        if ((yyval.selector) && (yyvsp[0].selector))
2115
1.31k
        {
2116
1.31k
            vlc_css_selector_AddSpecifier( (yyval.selector), (yyvsp[0].selector) );
2117
1.31k
            (yyvsp[0].selector)->combinator = (yyvsp[-1].relation);
2118
1.31k
        }
2119
2.58k
        else (yyval.selector) = (yyvsp[0].selector);
2120
3.89k
    }
2121
3.89k
#line 2122 "codec/webvtt/CSSGrammar.c"
2122
3.89k
    break;
2123
2124
135k
  case 43:
2125
135k
#line 348 "codec/webvtt/CSSGrammar.y"
2126
135k
                     {
2127
135k
        vlc_css_selectors_Delete( (yyvsp[-1].selector) );
2128
135k
        (yyval.selector) = NULL;
2129
135k
    }
2130
135k
#line 2131 "codec/webvtt/CSSGrammar.c"
2131
135k
    break;
2132
2133
28.6k
  case 44:
2134
28.6k
#line 355 "codec/webvtt/CSSGrammar.y"
2135
28.6k
                 {
2136
28.6k
        (yyval.selector) = vlc_css_selector_New( SELECTOR_SIMPLE, (yyvsp[0].string) );
2137
28.6k
        free( (yyvsp[0].string) );
2138
28.6k
    }
2139
28.6k
#line 2140 "codec/webvtt/CSSGrammar.c"
2140
28.6k
    break;
2141
2142
3.84k
  case 45:
2143
3.84k
#line 359 "codec/webvtt/CSSGrammar.y"
2144
3.84k
                                  {
2145
3.84k
        (yyval.selector) = vlc_css_selector_New( SELECTOR_SIMPLE, (yyvsp[-1].string) );
2146
3.84k
        if( (yyval.selector) && (yyvsp[0].selector) )
2147
2.19k
        {
2148
2.19k
            vlc_css_selector_AddSpecifier( (yyval.selector), (yyvsp[0].selector) );
2149
2.19k
        }
2150
1.65k
        else
2151
1.65k
        {
2152
1.65k
            vlc_css_selectors_Delete( (yyvsp[0].selector) );
2153
1.65k
        }
2154
3.84k
        free( (yyvsp[-1].string) );
2155
3.84k
    }
2156
3.84k
#line 2157 "codec/webvtt/CSSGrammar.c"
2157
3.84k
    break;
2158
2159
18.5k
  case 46:
2160
18.5k
#line 371 "codec/webvtt/CSSGrammar.y"
2161
18.5k
                     {
2162
18.5k
        (yyval.selector) = (yyvsp[0].selector);
2163
18.5k
    }
2164
18.5k
#line 2165 "codec/webvtt/CSSGrammar.c"
2165
18.5k
    break;
2166
2167
436
  case 48:
2168
436
#line 378 "codec/webvtt/CSSGrammar.y"
2169
436
          { (yyval.string) = strdup("*"); }
2170
436
#line 2171 "codec/webvtt/CSSGrammar.c"
2171
436
    break;
2172
2173
23.0k
  case 49:
2174
23.0k
#line 382 "codec/webvtt/CSSGrammar.y"
2175
23.0k
              {
2176
23.0k
        (yyval.selector) = (yyvsp[0].selector);
2177
23.0k
    }
2178
23.0k
#line 2179 "codec/webvtt/CSSGrammar.c"
2179
23.0k
    break;
2180
2181
6.98k
  case 50:
2182
6.98k
#line 385 "codec/webvtt/CSSGrammar.y"
2183
6.98k
                               {
2184
6.98k
        if( (yyvsp[-1].selector) )
2185
4.67k
        {
2186
4.67k
            (yyval.selector) = (yyvsp[-1].selector);
2187
41.0k
            while( (yyvsp[-1].selector)->specifiers.p_first )
2188
36.3k
                (yyvsp[-1].selector) = (yyvsp[-1].selector)->specifiers.p_first;
2189
4.67k
            vlc_css_selector_AddSpecifier( (yyvsp[-1].selector), (yyvsp[0].selector) );
2190
4.67k
        }
2191
2.30k
        else (yyval.selector) = (yyvsp[0].selector);
2192
6.98k
    }
2193
6.98k
#line 2194 "codec/webvtt/CSSGrammar.c"
2194
6.98k
    break;
2195
2196
27.8k
  case 51:
2197
27.8k
#line 395 "codec/webvtt/CSSGrammar.y"
2198
27.8k
                           {
2199
27.8k
        vlc_css_selectors_Delete( (yyvsp[-1].selector) );
2200
27.8k
        (yyval.selector) = NULL;
2201
27.8k
    }
2202
27.8k
#line 2203 "codec/webvtt/CSSGrammar.c"
2203
27.8k
    break;
2204
2205
4.74k
  case 52:
2206
4.74k
#line 402 "codec/webvtt/CSSGrammar.y"
2207
4.74k
          {
2208
4.74k
        (yyval.selector) = vlc_css_selector_New( SPECIFIER_ID, (yyvsp[0].string) );
2209
4.74k
        free( (yyvsp[0].string) );
2210
4.74k
    }
2211
4.74k
#line 2212 "codec/webvtt/CSSGrammar.c"
2212
4.74k
    break;
2213
2214
562
  case 53:
2215
562
#line 407 "codec/webvtt/CSSGrammar.y"
2216
562
         {
2217
562
        if ((yyvsp[0].string)[0] >= '0' && (yyvsp[0].string)[0] <= '9') {
2218
0
            (yyval.selector) = NULL;
2219
562
        } else {
2220
562
            (yyval.selector) = vlc_css_selector_New( SPECIFIER_ID, (yyvsp[0].string) );
2221
562
        }
2222
562
        free( (yyvsp[0].string) );
2223
562
    }
2224
562
#line 2225 "codec/webvtt/CSSGrammar.c"
2225
562
    break;
2226
2227
1.83k
  case 57:
2228
1.83k
#line 421 "codec/webvtt/CSSGrammar.y"
2229
1.83k
              {
2230
1.83k
        (yyval.selector) = vlc_css_selector_New( SPECIFIER_CLASS, (yyvsp[0].string) );
2231
1.83k
        free( (yyvsp[0].string) );
2232
1.83k
    }
2233
1.83k
#line 2234 "codec/webvtt/CSSGrammar.c"
2234
1.83k
    break;
2235
2236
5.79k
  case 58:
2237
5.79k
#line 428 "codec/webvtt/CSSGrammar.y"
2238
5.79k
                      {
2239
5.79k
        (yyval.string) = (yyvsp[-1].string);
2240
5.79k
    }
2241
5.79k
#line 2242 "codec/webvtt/CSSGrammar.c"
2242
5.79k
    break;
2243
2244
675
  case 59:
2245
675
#line 434 "codec/webvtt/CSSGrammar.y"
2246
675
                                  {
2247
675
        (yyval.selector) = vlc_css_selector_New( SPECIFIER_ATTRIB, (yyvsp[-1].string) );
2248
675
        free( (yyvsp[-1].string) );
2249
675
    }
2250
675
#line 2251 "codec/webvtt/CSSGrammar.c"
2251
675
    break;
2252
2253
2.83k
  case 60:
2254
2.83k
#line 438 "codec/webvtt/CSSGrammar.y"
2255
2.83k
                                                                                  {
2256
2.83k
        (yyval.selector) = vlc_css_selector_New( SPECIFIER_ATTRIB, (yyvsp[-5].string) );
2257
2.83k
        if( (yyval.selector) && (yyval.selector) )
2258
2.83k
        {
2259
2.83k
            (yyval.selector)->match = (yyvsp[-4].integer);
2260
2.83k
            (yyval.selector)->p_matchsel = vlc_css_selector_New( SPECIFIER_ID, (yyvsp[-2].string) );
2261
2.83k
        }
2262
2.83k
        free( (yyvsp[-5].string) );
2263
2.83k
        free( (yyvsp[-2].string) );
2264
2.83k
    }
2265
2.83k
#line 2266 "codec/webvtt/CSSGrammar.c"
2266
2.83k
    break;
2267
2268
2.17k
  case 61:
2269
2.17k
#line 451 "codec/webvtt/CSSGrammar.y"
2270
2.17k
        {
2271
2.17k
        (yyval.integer) = MATCH_EQUALS;
2272
2.17k
    }
2273
2.17k
#line 2274 "codec/webvtt/CSSGrammar.c"
2274
2.17k
    break;
2275
2276
443
  case 62:
2277
443
#line 454 "codec/webvtt/CSSGrammar.y"
2278
443
               {
2279
443
        (yyval.integer) = MATCH_INCLUDES;
2280
443
    }
2281
443
#line 2282 "codec/webvtt/CSSGrammar.c"
2282
443
    break;
2283
2284
262
  case 63:
2285
262
#line 457 "codec/webvtt/CSSGrammar.y"
2286
262
                {
2287
262
        (yyval.integer) = MATCH_DASHMATCH;
2288
262
    }
2289
262
#line 2290 "codec/webvtt/CSSGrammar.c"
2290
262
    break;
2291
2292
201
  case 64:
2293
201
#line 460 "codec/webvtt/CSSGrammar.y"
2294
201
                 {
2295
201
        (yyval.integer) = MATCH_BEGINSWITH;
2296
201
    }
2297
201
#line 2298 "codec/webvtt/CSSGrammar.c"
2298
201
    break;
2299
2300
464
  case 65:
2301
464
#line 463 "codec/webvtt/CSSGrammar.y"
2302
464
               {
2303
464
        (yyval.integer) = MATCH_ENDSWITH;
2304
464
    }
2305
464
#line 2306 "codec/webvtt/CSSGrammar.c"
2306
464
    break;
2307
2308
277
  case 66:
2309
277
#line 466 "codec/webvtt/CSSGrammar.y"
2310
277
               {
2311
277
        (yyval.integer) = MATCH_CONTAINS;
2312
277
    }
2313
277
#line 2314 "codec/webvtt/CSSGrammar.c"
2314
277
    break;
2315
2316
11.4k
  case 69:
2317
11.4k
#line 477 "codec/webvtt/CSSGrammar.y"
2318
11.4k
              {
2319
11.4k
        (yyval.selector) = vlc_css_selector_New( SELECTOR_PSEUDOCLASS, (yyvsp[0].string) );
2320
11.4k
        free( (yyvsp[0].string) );
2321
11.4k
    }
2322
11.4k
#line 2323 "codec/webvtt/CSSGrammar.c"
2323
11.4k
    break;
2324
2325
3.43k
  case 70:
2326
3.43k
#line 481 "codec/webvtt/CSSGrammar.y"
2327
3.43k
                    {
2328
3.43k
        (yyval.selector) = vlc_css_selector_New( SELECTOR_PSEUDOELEMENT, (yyvsp[0].string) );
2329
3.43k
        free( (yyvsp[0].string) );
2330
3.43k
    }
2331
3.43k
#line 2332 "codec/webvtt/CSSGrammar.c"
2332
3.43k
    break;
2333
2334
285
  case 71:
2335
285
#line 486 "codec/webvtt/CSSGrammar.y"
2336
285
                                                                           {
2337
285
        if(*(yyvsp[-5].string) != 0)
2338
209
            (yyvsp[-5].string)[strlen((yyvsp[-5].string)) - 1] = 0;
2339
285
        (yyval.selector) = vlc_css_selector_New( SELECTOR_PSEUDOCLASS, (yyvsp[-5].string) );
2340
285
        (yyvsp[-2].term).val *= (yyvsp[-3].integer);
2341
285
        free( (yyvsp[-5].string) );
2342
285
        vlc_css_term_Clean( (yyvsp[-2].term) );
2343
285
    }
2344
285
#line 2345 "codec/webvtt/CSSGrammar.c"
2345
285
    break;
2346
2347
3.07k
  case 72:
2348
3.07k
#line 495 "codec/webvtt/CSSGrammar.y"
2349
3.07k
                                                            {
2350
3.07k
        if(*(yyvsp[-4].string) != 0)
2351
2.83k
            (yyvsp[-4].string)[strlen((yyvsp[-4].string)) - 1] = 0;
2352
3.07k
        (yyval.selector) = vlc_css_selector_New( SELECTOR_PSEUDOELEMENT, (yyvsp[-4].string) );
2353
3.07k
        free( (yyvsp[-4].string) );
2354
3.07k
        if( (yyval.selector) && (yyvsp[-2].selector) )
2355
2.50k
        {
2356
2.50k
            vlc_css_selector_AddSpecifier( (yyval.selector), (yyvsp[-2].selector) );
2357
2.50k
            (yyvsp[-2].selector)->combinator = RELATION_SELF;
2358
2.50k
        }
2359
573
        else
2360
573
            vlc_css_selectors_Delete( (yyvsp[-2].selector) );
2361
3.07k
    }
2362
3.07k
#line 2363 "codec/webvtt/CSSGrammar.c"
2363
3.07k
    break;
2364
2365
1.14k
  case 73:
2366
1.14k
#line 509 "codec/webvtt/CSSGrammar.y"
2367
1.14k
                                                     {
2368
1.14k
        if(*(yyvsp[-4].string) != 0)
2369
215
            (yyvsp[-4].string)[strlen((yyvsp[-4].string)) - 1] = 0;
2370
1.14k
        (yyval.selector) = vlc_css_selector_New( SELECTOR_PSEUDOCLASS, (yyvsp[-4].string) );
2371
1.14k
        free( (yyvsp[-4].string) );
2372
1.14k
        free( (yyvsp[-2].string) );
2373
1.14k
    }
2374
1.14k
#line 2375 "codec/webvtt/CSSGrammar.c"
2375
1.14k
    break;
2376
2377
6.96k
  case 74:
2378
6.96k
#line 519 "codec/webvtt/CSSGrammar.y"
2379
6.96k
                {
2380
6.96k
        (yyval.declarationList) = (yyvsp[0].declaration);
2381
6.96k
    }
2382
6.96k
#line 2383 "codec/webvtt/CSSGrammar.c"
2383
6.96k
    break;
2384
2385
2.83k
  case 75:
2386
2.83k
#line 522 "codec/webvtt/CSSGrammar.y"
2387
2.83k
                            {
2388
2.83k
        (yyval.declarationList) = (yyvsp[-1].declarationList);
2389
2.83k
        if( (yyval.declarationList) )
2390
989
            vlc_css_declarations_Append( (yyval.declarationList), (yyvsp[0].declaration) );
2391
2.83k
    }
2392
2.83k
#line 2393 "codec/webvtt/CSSGrammar.c"
2393
2.83k
    break;
2394
2395
5.14k
  case 76:
2396
5.14k
#line 527 "codec/webvtt/CSSGrammar.y"
2397
5.14k
                {
2398
5.14k
        (yyval.declarationList) = (yyvsp[0].declarationList);
2399
5.14k
    }
2400
5.14k
#line 2401 "codec/webvtt/CSSGrammar.c"
2401
5.14k
    break;
2402
2403
2.22k
  case 77:
2404
2.22k
#line 530 "codec/webvtt/CSSGrammar.y"
2405
2.22k
                                     {
2406
2.22k
        (yyval.declarationList) = NULL;
2407
2.22k
    }
2408
2.22k
#line 2409 "codec/webvtt/CSSGrammar.c"
2409
2.22k
    break;
2410
2411
68.0k
  case 78:
2412
68.0k
#line 533 "codec/webvtt/CSSGrammar.y"
2413
68.0k
            {
2414
68.0k
        (yyval.declarationList) = NULL;
2415
68.0k
    }
2416
68.0k
#line 2417 "codec/webvtt/CSSGrammar.c"
2417
68.0k
    break;
2418
2419
883
  case 79:
2420
883
#line 536 "codec/webvtt/CSSGrammar.y"
2421
883
                      {
2422
883
        (yyval.declarationList) = (yyvsp[-1].declarationList);
2423
883
    }
2424
883
#line 2425 "codec/webvtt/CSSGrammar.c"
2425
883
    break;
2426
2427
306
  case 80:
2428
306
#line 539 "codec/webvtt/CSSGrammar.y"
2429
306
                                   {
2430
306
        (yyval.declarationList) = (yyvsp[-1].declarationList);
2431
306
    }
2432
306
#line 2433 "codec/webvtt/CSSGrammar.c"
2433
306
    break;
2434
2435
4.91k
  case 81:
2436
4.91k
#line 545 "codec/webvtt/CSSGrammar.y"
2437
4.91k
                                {
2438
4.91k
        (yyval.declarationList) = (yyvsp[-2].declaration);
2439
4.91k
    }
2440
4.91k
#line 2441 "codec/webvtt/CSSGrammar.c"
2441
4.91k
    break;
2442
2443
302
  case 82:
2444
302
#line 548 "codec/webvtt/CSSGrammar.y"
2445
302
                                                 {
2446
302
        vlc_css_declarations_Delete( (yyvsp[-2].declaration) );
2447
302
        (yyval.declarationList) = NULL;
2448
302
    }
2449
302
#line 2450 "codec/webvtt/CSSGrammar.c"
2450
302
    break;
2451
2452
352
  case 83:
2453
352
#line 552 "codec/webvtt/CSSGrammar.y"
2454
352
                                                     {
2455
352
        vlc_css_declarations_Delete( (yyvsp[-3].declaration) );
2456
352
        (yyval.declarationList) = NULL;
2457
352
    }
2458
352
#line 2459 "codec/webvtt/CSSGrammar.c"
2459
352
    break;
2460
2461
3.42k
  case 84:
2462
3.42k
#line 556 "codec/webvtt/CSSGrammar.y"
2463
3.42k
                            {
2464
3.42k
        (yyval.declarationList) = NULL;
2465
3.42k
    }
2466
3.42k
#line 2467 "codec/webvtt/CSSGrammar.c"
2467
3.42k
    break;
2468
2469
264
  case 85:
2470
264
#line 559 "codec/webvtt/CSSGrammar.y"
2471
264
                                                     {
2472
264
        (yyval.declarationList) = NULL;
2473
264
    }
2474
264
#line 2475 "codec/webvtt/CSSGrammar.c"
2475
264
    break;
2476
2477
3.42k
  case 86:
2478
3.42k
#line 562 "codec/webvtt/CSSGrammar.y"
2479
3.42k
                                            {
2480
3.42k
        if( (yyvsp[-3].declarationList) )
2481
1.85k
        {
2482
1.85k
            (yyval.declarationList) = (yyvsp[-3].declarationList);
2483
1.85k
            vlc_css_declarations_Append( (yyval.declarationList), (yyvsp[-2].declaration) );
2484
1.85k
        }
2485
1.56k
        else (yyval.declarationList) = (yyvsp[-2].declaration);
2486
3.42k
    }
2487
3.42k
#line 2488 "codec/webvtt/CSSGrammar.c"
2488
3.42k
    break;
2489
2490
382
  case 87:
2491
382
#line 570 "codec/webvtt/CSSGrammar.y"
2492
382
                                      {
2493
382
        (yyval.declarationList) = (yyvsp[-3].declarationList);
2494
382
    }
2495
382
#line 2496 "codec/webvtt/CSSGrammar.c"
2496
382
    break;
2497
2498
0
  case 88:
2499
0
#line 573 "codec/webvtt/CSSGrammar.y"
2500
0
                                                               {
2501
0
        (yyval.declarationList) = (yyvsp[-5].declarationList);
2502
0
    }
2503
0
#line 2504 "codec/webvtt/CSSGrammar.c"
2504
0
    break;
2505
2506
7.66k
  case 89:
2507
7.66k
#line 579 "codec/webvtt/CSSGrammar.y"
2508
7.66k
                                       {
2509
7.66k
        if( (yyvsp[-1].expr) )
2510
6.61k
        {
2511
6.61k
            (yyval.declaration) = vlc_css_declaration_New( (yyvsp[-4].string) );
2512
6.61k
            if( (yyval.declaration) )
2513
6.61k
                (yyval.declaration)->expr = (yyvsp[-1].expr);
2514
0
            else
2515
0
                vlc_css_expression_Delete( (yyvsp[-1].expr) );
2516
6.61k
        }
2517
1.05k
        else (yyval.declaration) = NULL;
2518
7.66k
        free( (yyvsp[-4].string) );
2519
7.66k
    }
2520
7.66k
#line 2521 "codec/webvtt/CSSGrammar.c"
2521
7.66k
    break;
2522
2523
7.16k
  case 90:
2524
7.16k
#line 592 "codec/webvtt/CSSGrammar.y"
2525
7.16k
                   {
2526
7.16k
        free( (yyvsp[-1].string) );
2527
7.16k
        (yyval.declaration) = NULL;
2528
7.16k
    }
2529
7.16k
#line 2530 "codec/webvtt/CSSGrammar.c"
2530
7.16k
    break;
2531
2532
226
  case 91:
2533
226
#line 597 "codec/webvtt/CSSGrammar.y"
2534
226
                                             {
2535
226
        free( (yyvsp[-5].string) );
2536
226
        vlc_css_expression_Delete( (yyvsp[-1].expr) );
2537
        /* The default movable type template has letter-spacing: .none;  Handle this by looking for
2538
        error tokens at the start of an expr, recover the expr and then treat as an error, cleaning
2539
        up and deleting the shifted expr.  */
2540
226
        (yyval.declaration) = NULL;
2541
226
    }
2542
226
#line 2543 "codec/webvtt/CSSGrammar.c"
2543
226
    break;
2544
2545
0
  case 92:
2546
0
#line 606 "codec/webvtt/CSSGrammar.y"
2547
0
                                             {
2548
0
        free( (yyvsp[-5].string) );
2549
0
        vlc_css_expression_Delete( (yyvsp[-2].expr) );
2550
        /* When we encounter something like p {color: red !important fail;} we should drop the declaration */
2551
0
        (yyval.declaration) = NULL;
2552
0
    }
2553
0
#line 2554 "codec/webvtt/CSSGrammar.c"
2554
0
    break;
2555
2556
0
  case 93:
2557
0
#line 613 "codec/webvtt/CSSGrammar.y"
2558
0
                              {
2559
        /* Handle this case: div { text-align: center; !important } Just reduce away the stray !important. */
2560
0
        (yyval.declaration) = NULL;
2561
0
    }
2562
0
#line 2563 "codec/webvtt/CSSGrammar.c"
2563
0
    break;
2564
2565
2.22k
  case 94:
2566
2.22k
#line 618 "codec/webvtt/CSSGrammar.y"
2567
2.22k
                             {
2568
2.22k
        free( (yyvsp[-2].string) );
2569
        /* div { font-family: } Just reduce away this property with no value. */
2570
2.22k
        (yyval.declaration) = NULL;
2571
2.22k
    }
2572
2.22k
#line 2573 "codec/webvtt/CSSGrammar.c"
2573
2.22k
    break;
2574
2575
696
  case 95:
2576
696
#line 624 "codec/webvtt/CSSGrammar.y"
2577
696
                                   {
2578
696
        free( (yyvsp[-3].string) );
2579
        /* if we come across rules with invalid values like this case: p { weight: *; }, just discard the rule */
2580
696
        (yyval.declaration) = NULL;
2581
696
    }
2582
696
#line 2583 "codec/webvtt/CSSGrammar.c"
2583
696
    break;
2584
2585
1.01k
  case 96:
2586
1.01k
#line 630 "codec/webvtt/CSSGrammar.y"
2587
1.01k
                           {
2588
        /* if we come across: div { color{;color:maroon} }, ignore everything within curly brackets */
2589
1.01k
        free( (yyvsp[-1].string) );
2590
1.01k
        (yyval.declaration) = NULL;
2591
1.01k
    }
2592
1.01k
#line 2593 "codec/webvtt/CSSGrammar.c"
2593
1.01k
    break;
2594
2595
19.0k
  case 97:
2596
19.0k
#line 638 "codec/webvtt/CSSGrammar.y"
2597
19.0k
                      {
2598
19.0k
        (yyval.string) = (yyvsp[-1].string);
2599
19.0k
    }
2600
19.0k
#line 2601 "codec/webvtt/CSSGrammar.c"
2601
19.0k
    break;
2602
2603
0
  case 98:
2604
0
#line 644 "codec/webvtt/CSSGrammar.y"
2605
0
                              { (yyval.boolean) = true; }
2606
0
#line 2607 "codec/webvtt/CSSGrammar.c"
2607
0
    break;
2608
2609
7.89k
  case 99:
2610
7.89k
#line 645 "codec/webvtt/CSSGrammar.y"
2611
7.89k
                  { (yyval.boolean) = false; }
2612
7.89k
#line 2613 "codec/webvtt/CSSGrammar.c"
2613
7.89k
    break;
2614
2615
79.6k
  case 100:
2616
79.6k
#line 649 "codec/webvtt/CSSGrammar.y"
2617
79.6k
         {
2618
79.6k
        (yyval.expr) = vlc_css_expression_New( (yyvsp[0].term) );
2619
79.6k
        if( !(yyval.expr) )
2620
0
            vlc_css_term_Clean( (yyvsp[0].term) );
2621
79.6k
    }
2622
79.6k
#line 2623 "codec/webvtt/CSSGrammar.c"
2623
79.6k
    break;
2624
2625
182k
  case 101:
2626
182k
#line 654 "codec/webvtt/CSSGrammar.y"
2627
182k
                         {
2628
182k
        (yyval.expr) = (yyvsp[-2].expr);
2629
182k
        if( !(yyvsp[-2].expr) || !vlc_css_expression_AddTerm((yyvsp[-2].expr), (yyvsp[-1].character), (yyvsp[0].term)) )
2630
47.9k
            vlc_css_term_Clean( (yyvsp[0].term) );
2631
182k
    }
2632
182k
#line 2633 "codec/webvtt/CSSGrammar.c"
2633
182k
    break;
2634
2635
630
  case 102:
2636
630
#line 659 "codec/webvtt/CSSGrammar.y"
2637
630
                              {
2638
630
        vlc_css_expression_Delete( (yyvsp[-1].expr) );
2639
630
        (yyval.expr) = NULL;
2640
630
    }
2641
630
#line 2642 "codec/webvtt/CSSGrammar.c"
2642
630
    break;
2643
2644
502
  case 103:
2645
502
#line 663 "codec/webvtt/CSSGrammar.y"
2646
502
                                    {
2647
502
        vlc_css_expression_Delete( (yyvsp[-2].expr) );
2648
502
        (yyval.expr) = NULL;
2649
502
    }
2650
502
#line 2651 "codec/webvtt/CSSGrammar.c"
2651
502
    break;
2652
2653
96.9k
  case 104:
2654
96.9k
#line 667 "codec/webvtt/CSSGrammar.y"
2655
96.9k
                 {
2656
96.9k
        vlc_css_expression_Delete( (yyvsp[-1].expr) );
2657
96.9k
        (yyval.expr) = NULL;
2658
96.9k
    }
2659
96.9k
#line 2660 "codec/webvtt/CSSGrammar.c"
2660
96.9k
    break;
2661
2662
1.10k
  case 105:
2663
1.10k
#line 674 "codec/webvtt/CSSGrammar.y"
2664
1.10k
                    {
2665
1.10k
        (yyval.character) = '/';
2666
1.10k
    }
2667
1.10k
#line 2668 "codec/webvtt/CSSGrammar.c"
2668
1.10k
    break;
2669
2670
14.7k
  case 106:
2671
14.7k
#line 677 "codec/webvtt/CSSGrammar.y"
2672
14.7k
                    {
2673
14.7k
        (yyval.character) = ',';
2674
14.7k
    }
2675
14.7k
#line 2676 "codec/webvtt/CSSGrammar.c"
2676
14.7k
    break;
2677
2678
178k
  case 107:
2679
178k
#line 680 "codec/webvtt/CSSGrammar.y"
2680
178k
                {
2681
178k
        (yyval.character) = 0;
2682
178k
  }
2683
178k
#line 2684 "codec/webvtt/CSSGrammar.c"
2684
178k
    break;
2685
2686
15.7k
  case 108:
2687
15.7k
#line 686 "codec/webvtt/CSSGrammar.y"
2688
15.7k
             { (yyval.term) = (yyvsp[0].term); }
2689
15.7k
#line 2690 "codec/webvtt/CSSGrammar.c"
2690
15.7k
    break;
2691
2692
1.94k
  case 109:
2693
1.94k
#line 687 "codec/webvtt/CSSGrammar.y"
2694
1.94k
                              {
2695
1.94k
      (yyval.term) = (yyvsp[0].term);
2696
1.94k
      (yyval.term).val *= (yyvsp[-1].integer);
2697
1.94k
  }
2698
1.94k
#line 2699 "codec/webvtt/CSSGrammar.c"
2699
1.94k
    break;
2700
2701
5.47k
  case 110:
2702
5.47k
#line 691 "codec/webvtt/CSSGrammar.y"
2703
5.47k
                       { (yyval.term).type = TYPE_STRING; (yyval.term).psz = (yyvsp[-1].string); }
2704
5.47k
#line 2705 "codec/webvtt/CSSGrammar.c"
2705
5.47k
    break;
2706
2707
22.3k
  case 111:
2708
22.3k
#line 692 "codec/webvtt/CSSGrammar.y"
2709
22.3k
                      { (yyval.term).type = TYPE_IDENTIFIER; (yyval.term).psz = (yyvsp[-1].string); }
2710
22.3k
#line 2711 "codec/webvtt/CSSGrammar.c"
2711
22.3k
    break;
2712
2713
7.75k
  case 112:
2714
7.75k
#line 694 "codec/webvtt/CSSGrammar.y"
2715
7.75k
                      { (yyval.term) = (yyvsp[-1].term); }
2716
7.75k
#line 2717 "codec/webvtt/CSSGrammar.c"
2717
7.75k
    break;
2718
2719
5.34k
  case 113:
2720
5.34k
#line 695 "codec/webvtt/CSSGrammar.y"
2721
5.34k
                                     { (yyval.term) = (yyvsp[-1].term); }
2722
5.34k
#line 2723 "codec/webvtt/CSSGrammar.c"
2723
5.34k
    break;
2724
2725
243
  case 114:
2726
243
#line 696 "codec/webvtt/CSSGrammar.y"
2727
243
                    { (yyval.term).type = TYPE_URI; (yyval.term).psz = (yyvsp[-1].string); }
2728
243
#line 2729 "codec/webvtt/CSSGrammar.c"
2729
243
    break;
2730
2731
196
  case 115:
2732
196
#line 697 "codec/webvtt/CSSGrammar.y"
2733
196
                             { (yyval.term).type = TYPE_UNICODERANGE; (yyval.term).psz = (yyvsp[-1].string); }
2734
196
#line 2735 "codec/webvtt/CSSGrammar.c"
2735
196
    break;
2736
2737
2.11k
  case 116:
2738
2.11k
#line 698 "codec/webvtt/CSSGrammar.y"
2739
2.11k
                      { (yyval.term).type = TYPE_HEXCOLOR; (yyval.term).psz = (yyvsp[-1].string); }
2740
2.11k
#line 2741 "codec/webvtt/CSSGrammar.c"
2741
2.11k
    break;
2742
2743
1.59k
  case 117:
2744
1.59k
#line 699 "codec/webvtt/CSSGrammar.y"
2745
1.59k
                     { (yyval.term).type = TYPE_HEXCOLOR; (yyval.term).psz = (yyvsp[-1].string); }
2746
1.59k
#line 2747 "codec/webvtt/CSSGrammar.c"
2747
1.59k
    break;
2748
2749
125k
  case 118:
2750
125k
#line 700 "codec/webvtt/CSSGrammar.y"
2751
125k
                    { (yyval.term).type = TYPE_HEXCOLOR; (yyval.term).psz = NULL; }
2752
125k
#line 2753 "codec/webvtt/CSSGrammar.c"
2753
125k
    break;
2754
2755
73.4k
  case 119:
2756
73.4k
#line 702 "codec/webvtt/CSSGrammar.y"
2757
73.4k
             {
2758
73.4k
      (yyval.term) = (yyvsp[0].term);
2759
73.4k
  }
2760
73.4k
#line 2761 "codec/webvtt/CSSGrammar.c"
2761
73.4k
    break;
2762
2763
688
  case 120:
2764
688
#line 705 "codec/webvtt/CSSGrammar.y"
2765
688
                    { /* Handle width: %; */
2766
688
      (yyval.term).type = TYPE_PERCENT; (yyval.term).val = 0;
2767
688
  }
2768
688
#line 2769 "codec/webvtt/CSSGrammar.c"
2769
688
    break;
2770
2771
3.38k
  case 127:
2772
3.38k
#line 720 "codec/webvtt/CSSGrammar.y"
2773
3.38k
                                              {
2774
3.38k
        (yyval.term).type = TYPE_FUNCTION; (yyval.term).function = (yyvsp[-2].expr);
2775
3.38k
        (yyval.term).psz = (yyvsp[-4].string);
2776
3.38k
        if(*(yyval.term).psz != 0)
2777
2.98k
            (yyval.term).psz[strlen((yyval.term).psz) - 1] = 0;
2778
3.38k
    }
2779
3.38k
#line 2780 "codec/webvtt/CSSGrammar.c"
2780
3.38k
    break;
2781
2782
67.7k
  case 128:
2783
67.7k
#line 726 "codec/webvtt/CSSGrammar.y"
2784
67.7k
                                        {
2785
67.7k
        (yyval.term).type = TYPE_FUNCTION; (yyval.term).function = (yyvsp[-1].expr); (yyval.term).psz = (yyvsp[-3].string);
2786
67.7k
        if(*(yyval.term).psz != 0)
2787
67.5k
            (yyval.term).psz[strlen((yyval.term).psz) - 1] = 0;
2788
67.7k
    }
2789
67.7k
#line 2790 "codec/webvtt/CSSGrammar.c"
2790
67.7k
    break;
2791
2792
706
  case 129:
2793
706
#line 731 "codec/webvtt/CSSGrammar.y"
2794
706
                                         {
2795
706
        (yyval.term).type = TYPE_FUNCTION; (yyval.term).function = NULL; (yyval.term).psz = (yyvsp[-3].string);
2796
706
        if(*(yyval.term).psz != 0)
2797
486
            (yyval.term).psz[strlen((yyval.term).psz) - 1] = 0;
2798
706
    }
2799
706
#line 2800 "codec/webvtt/CSSGrammar.c"
2800
706
    break;
2801
2802
1.58k
  case 130:
2803
1.58k
#line 736 "codec/webvtt/CSSGrammar.y"
2804
1.58k
                               {
2805
1.58k
        (yyval.term).type = TYPE_FUNCTION; (yyval.term).function = NULL; (yyval.term).psz = (yyvsp[-2].string);
2806
1.58k
        if(*(yyval.term).psz != 0)
2807
1.08k
            (yyval.term).psz[strlen((yyval.term).psz) - 1] = 0;
2808
1.58k
  }
2809
1.58k
#line 2810 "codec/webvtt/CSSGrammar.c"
2810
1.58k
    break;
2811
2812
1.96k
  case 131:
2813
1.96k
#line 746 "codec/webvtt/CSSGrammar.y"
2814
1.96k
                        {
2815
1.96k
        (yyval.rule) = NULL;
2816
1.96k
    }
2817
1.96k
#line 2818 "codec/webvtt/CSSGrammar.c"
2818
1.96k
    break;
2819
2820
2821
0
#line 2822 "codec/webvtt/CSSGrammar.c"
2822
2823
3.22M
      default: break;
2824
4.76M
    }
2825
  /* User semantic actions sometimes alter yychar, and that requires
2826
     that yytoken be updated with the new translation.  We take the
2827
     approach of translating immediately before every use of yytoken.
2828
     One alternative is translating here after every semantic action,
2829
     but that translation would be missed if the semantic action invokes
2830
     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2831
     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
2832
     incorrect destructor might then be invoked immediately.  In the
2833
     case of YYERROR or YYBACKUP, subsequent parser actions might lead
2834
     to an incorrect destructor call or verbose syntax error message
2835
     before the lookahead is translated.  */
2836
4.76M
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2837
2838
4.76M
  YYPOPSTACK (yylen);
2839
4.76M
  yylen = 0;
2840
4.76M
  YY_STACK_PRINT (yyss, yyssp);
2841
2842
4.76M
  *++yyvsp = yyval;
2843
2844
  /* Now 'shift' the result of the reduction.  Determine what state
2845
     that goes to, based on the state we popped back to and the rule
2846
     number reduced by.  */
2847
4.76M
  {
2848
4.76M
    const int yylhs = yyr1[yyn] - YYNTOKENS;
2849
4.76M
    const int yyi = yypgoto[yylhs] + *yyssp;
2850
4.76M
    yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
2851
4.76M
               ? yytable[yyi]
2852
4.76M
               : yydefgoto[yylhs]);
2853
4.76M
  }
2854
2855
4.76M
  goto yynewstate;
2856
2857
2858
/*--------------------------------------.
2859
| yyerrlab -- here on detecting error.  |
2860
`--------------------------------------*/
2861
2.89M
yyerrlab:
2862
  /* Make sure we have latest lookahead translation.  See comments at
2863
     user semantic actions for why this is necessary.  */
2864
2.89M
  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2865
2866
  /* If not already recovering from an error, report this error.  */
2867
2.89M
  if (!yyerrstatus)
2868
46.0k
    {
2869
46.0k
      ++yynerrs;
2870
46.0k
#if ! YYERROR_VERBOSE
2871
46.0k
      yyerror (scanner, css_parser, YY_("syntax error"));
2872
#else
2873
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2874
                                        yyssp, yytoken)
2875
      {
2876
        char const *yymsgp = YY_("syntax error");
2877
        int yysyntax_error_status;
2878
        yysyntax_error_status = YYSYNTAX_ERROR;
2879
        if (yysyntax_error_status == 0)
2880
          yymsgp = yymsg;
2881
        else if (yysyntax_error_status == 1)
2882
          {
2883
            if (yymsg != yymsgbuf)
2884
              YYSTACK_FREE (yymsg);
2885
            yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
2886
            if (!yymsg)
2887
              {
2888
                yymsg = yymsgbuf;
2889
                yymsg_alloc = sizeof yymsgbuf;
2890
                yysyntax_error_status = 2;
2891
              }
2892
            else
2893
              {
2894
                yysyntax_error_status = YYSYNTAX_ERROR;
2895
                yymsgp = yymsg;
2896
              }
2897
          }
2898
        yyerror (scanner, css_parser, yymsgp);
2899
        if (yysyntax_error_status == 2)
2900
          goto yyexhaustedlab;
2901
      }
2902
# undef YYSYNTAX_ERROR
2903
#endif
2904
46.0k
    }
2905
2906
2907
2908
2.89M
  if (yyerrstatus == 3)
2909
728k
    {
2910
      /* If just tried and failed to reuse lookahead token after an
2911
         error, discard it.  */
2912
2913
728k
      if (yychar <= YYEOF)
2914
4.20k
        {
2915
          /* Return failure if at end of input.  */
2916
4.20k
          if (yychar == YYEOF)
2917
4.20k
            YYABORT;
2918
4.20k
        }
2919
723k
      else
2920
723k
        {
2921
723k
          yydestruct ("Error: discarding",
2922
723k
                      yytoken, &yylval, scanner, css_parser);
2923
723k
          yychar = YYEMPTY;
2924
723k
        }
2925
728k
    }
2926
2927
  /* Else will try to reuse lookahead token after shifting the error
2928
     token.  */
2929
2.89M
  goto yyerrlab1;
2930
2931
2932
/*---------------------------------------------------.
2933
| yyerrorlab -- error raised explicitly by YYERROR.  |
2934
`---------------------------------------------------*/
2935
2.89M
yyerrorlab:
2936
  /* Pacify compilers when the user code never invokes YYERROR and the
2937
     label yyerrorlab therefore never appears in user code.  */
2938
0
  if (0)
2939
0
    YYERROR;
2940
2941
  /* Do not reclaim the symbols of the rule whose action triggered
2942
     this YYERROR.  */
2943
0
  YYPOPSTACK (yylen);
2944
0
  yylen = 0;
2945
0
  YY_STACK_PRINT (yyss, yyssp);
2946
0
  yystate = *yyssp;
2947
0
  goto yyerrlab1;
2948
2949
2950
/*-------------------------------------------------------------.
2951
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
2952
`-------------------------------------------------------------*/
2953
2.89M
yyerrlab1:
2954
2.89M
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
2955
2956
2.89M
  for (;;)
2957
3.49M
    {
2958
3.49M
      yyn = yypact[yystate];
2959
3.49M
      if (!yypact_value_is_default (yyn))
2960
3.48M
        {
2961
3.48M
          yyn += YYTERROR;
2962
3.48M
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2963
2.89M
            {
2964
2.89M
              yyn = yytable[yyn];
2965
2.89M
              if (0 < yyn)
2966
2.89M
                break;
2967
2.89M
            }
2968
3.48M
        }
2969
2970
      /* Pop the current state because it cannot handle the error token.  */
2971
600k
      if (yyssp == yyss)
2972
0
        YYABORT;
2973
2974
2975
600k
      yydestruct ("Error: popping",
2976
600k
                  yystos[yystate], yyvsp, scanner, css_parser);
2977
600k
      YYPOPSTACK (1);
2978
600k
      yystate = *yyssp;
2979
600k
      YY_STACK_PRINT (yyss, yyssp);
2980
600k
    }
2981
2982
2.89M
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2983
2.89M
  *++yyvsp = yylval;
2984
2.89M
  YY_IGNORE_MAYBE_UNINITIALIZED_END
2985
2986
2987
  /* Shift the error token.  */
2988
2.89M
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2989
2990
2.89M
  yystate = yyn;
2991
2.89M
  goto yynewstate;
2992
2993
2994
/*-------------------------------------.
2995
| yyacceptlab -- YYACCEPT comes here.  |
2996
`-------------------------------------*/
2997
7.59k
yyacceptlab:
2998
7.59k
  yyresult = 0;
2999
7.59k
  goto yyreturn;
3000
3001
3002
/*-----------------------------------.
3003
| yyabortlab -- YYABORT comes here.  |
3004
`-----------------------------------*/
3005
4.20k
yyabortlab:
3006
4.20k
  yyresult = 1;
3007
4.20k
  goto yyreturn;
3008
3009
3010
0
#if !defined yyoverflow || YYERROR_VERBOSE
3011
/*-------------------------------------------------.
3012
| yyexhaustedlab -- memory exhaustion comes here.  |
3013
`-------------------------------------------------*/
3014
88
yyexhaustedlab:
3015
88
  yyerror (scanner, css_parser, YY_("memory exhausted"));
3016
88
  yyresult = 2;
3017
  /* Fall through.  */
3018
88
#endif
3019
3020
3021
/*-----------------------------------------------------.
3022
| yyreturn -- parsing is finished, return the result.  |
3023
`-----------------------------------------------------*/
3024
11.8k
yyreturn:
3025
11.8k
  if (yychar != YYEMPTY)
3026
4.22k
    {
3027
      /* Make sure we have latest lookahead translation.  See comments at
3028
         user semantic actions for why this is necessary.  */
3029
4.22k
      yytoken = YYTRANSLATE (yychar);
3030
4.22k
      yydestruct ("Cleanup: discarding lookahead",
3031
4.22k
                  yytoken, &yylval, scanner, css_parser);
3032
4.22k
    }
3033
  /* Do not reclaim the symbols of the rule whose action triggered
3034
     this YYABORT or YYACCEPT.  */
3035
11.8k
  YYPOPSTACK (yylen);
3036
11.8k
  YY_STACK_PRINT (yyss, yyssp);
3037
935k
  while (yyssp != yyss)
3038
924k
    {
3039
924k
      yydestruct ("Cleanup: popping",
3040
924k
                  yystos[+*yyssp], yyvsp, scanner, css_parser);
3041
924k
      YYPOPSTACK (1);
3042
924k
    }
3043
11.8k
#ifndef yyoverflow
3044
11.8k
  if (yyss != yyssa)
3045
774
    YYSTACK_FREE (yyss);
3046
11.8k
#endif
3047
#if YYERROR_VERBOSE
3048
  if (yymsg != yymsgbuf)
3049
    YYSTACK_FREE (yymsg);
3050
#endif
3051
11.8k
  return yyresult;
3052
88
}
3053
#line 773 "codec/webvtt/CSSGrammar.y"
3054
3055
3056
#ifdef YYDEBUG
3057
    int yydebug=1;
3058
#else
3059
    int yydebug=0;
3060
#endif