/src/vlc/modules/codec/webvtt/CSSGrammar.c
Line | Count | Source (jump to first uncovered line) |
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 | 0 | #define yylex csslex |
70 | 0 | #define yyerror csserror |
71 | | #define yydebug cssdebug |
72 | 0 | #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 | 0 | # 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 | 0 | { |
249 | 0 | VLC_UNUSED(scanner);VLC_UNUSED(p);VLC_UNUSED(msg); |
250 | 0 | } |
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 | 0 | # 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 | 0 | #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 | 0 | # 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 | 0 | # 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 | 0 | # 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 | 0 | #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 | 0 | # 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 | 0 | # 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 | 0 | # 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 | 0 | do \ |
524 | 0 | { \ |
525 | 0 | YYPTRDIFF_T yynewbytes; \ |
526 | 0 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
527 | 0 | Stack = &yyptr->Stack_alloc; \ |
528 | 0 | yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
529 | 0 | yyptr += yynewbytes / YYSIZEOF (*yyptr); \ |
530 | 0 | } \ |
531 | 0 | 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 | 0 | __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 | 0 | #define YYFINAL 3 |
557 | | /* YYLAST -- Last index in YYTABLE. */ |
558 | 0 | #define YYLAST 473 |
559 | | |
560 | | /* YYNTOKENS -- Number of terminals. */ |
561 | 0 | #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 | 0 | #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 | 0 | (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 | | 588, 593, 602, 609, 614, 620, 626, 634, 640, 641, |
627 | | 645, 650, 655, 659, 663, 670, 673, 676, 682, 683, |
628 | | 687, 688, 690, 691, 692, 693, 694, 695, 696, 698, |
629 | | 701, 707, 708, 709, 710, 711, 712, 716, 722, 727, |
630 | | 732, 742, 760, 761, 765, 766 |
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 | 0 | #define YYPACT_NINF (-126) |
673 | | |
674 | | #define yypact_value_is_default(Yyn) \ |
675 | 0 | ((Yyn) == YYPACT_NINF) |
676 | | |
677 | | #define YYTABLE_NINF (-108) |
678 | | |
679 | | #define yytable_value_is_error(Yyn) \ |
680 | 0 | 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 | 0 | #define YYEMPTY (-2) |
939 | 0 | #define YYEOF 0 |
940 | | |
941 | 0 | #define YYACCEPT goto yyacceptlab |
942 | 0 | #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 | 0 | #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 | 0 | # 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 | 0 | # 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 | 0 | { |
1361 | 0 | YYUSE (yyvaluep); |
1362 | 0 | YYUSE (scanner); |
1363 | 0 | YYUSE (css_parser); |
1364 | 0 | if (!yymsg) |
1365 | 0 | yymsg = "Deleting"; |
1366 | 0 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
1367 | |
|
1368 | 0 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
1369 | 0 | switch (yytype) |
1370 | 0 | { |
1371 | 0 | case 12: /* STRING */ |
1372 | 0 | #line 171 "codec/webvtt/CSSGrammar.y" |
1373 | 0 | { free(((*yyvaluep).string)); } |
1374 | 0 | #line 1375 "codec/webvtt/CSSGrammar.c" |
1375 | 0 | break; |
1376 | | |
1377 | 0 | case 13: /* IDENT */ |
1378 | 0 | #line 171 "codec/webvtt/CSSGrammar.y" |
1379 | 0 | { free(((*yyvaluep).string)); } |
1380 | 0 | #line 1381 "codec/webvtt/CSSGrammar.c" |
1381 | 0 | break; |
1382 | | |
1383 | 0 | case 14: /* IDSEL */ |
1384 | 0 | #line 171 "codec/webvtt/CSSGrammar.y" |
1385 | 0 | { free(((*yyvaluep).string)); } |
1386 | 0 | #line 1387 "codec/webvtt/CSSGrammar.c" |
1387 | 0 | break; |
1388 | | |
1389 | 0 | case 15: /* HASH */ |
1390 | 0 | #line 171 "codec/webvtt/CSSGrammar.y" |
1391 | 0 | { free(((*yyvaluep).string)); } |
1392 | 0 | #line 1393 "codec/webvtt/CSSGrammar.c" |
1393 | 0 | break; |
1394 | | |
1395 | 0 | case 26: /* LENGTH */ |
1396 | 0 | #line 119 "codec/webvtt/CSSGrammar.y" |
1397 | 0 | { vlc_css_term_Clean(((*yyvaluep).term)); } |
1398 | 0 | #line 1399 "codec/webvtt/CSSGrammar.c" |
1399 | 0 | break; |
1400 | | |
1401 | 0 | case 27: /* ANGLE */ |
1402 | 0 | #line 119 "codec/webvtt/CSSGrammar.y" |
1403 | 0 | { vlc_css_term_Clean(((*yyvaluep).term)); } |
1404 | 0 | #line 1405 "codec/webvtt/CSSGrammar.c" |
1405 | 0 | break; |
1406 | | |
1407 | 0 | case 28: /* TIME */ |
1408 | 0 | #line 119 "codec/webvtt/CSSGrammar.y" |
1409 | 0 | { vlc_css_term_Clean(((*yyvaluep).term)); } |
1410 | 0 | #line 1411 "codec/webvtt/CSSGrammar.c" |
1411 | 0 | break; |
1412 | | |
1413 | 0 | case 29: /* FREQ */ |
1414 | 0 | #line 119 "codec/webvtt/CSSGrammar.y" |
1415 | 0 | { vlc_css_term_Clean(((*yyvaluep).term)); } |
1416 | 0 | #line 1417 "codec/webvtt/CSSGrammar.c" |
1417 | 0 | break; |
1418 | | |
1419 | 0 | case 30: /* DIMEN */ |
1420 | 0 | #line 119 "codec/webvtt/CSSGrammar.y" |
1421 | 0 | { vlc_css_term_Clean(((*yyvaluep).term)); } |
1422 | 0 | #line 1423 "codec/webvtt/CSSGrammar.c" |
1423 | 0 | break; |
1424 | | |
1425 | 0 | case 31: /* PERCENTAGE */ |
1426 | 0 | #line 119 "codec/webvtt/CSSGrammar.y" |
1427 | 0 | { vlc_css_term_Clean(((*yyvaluep).term)); } |
1428 | 0 | #line 1429 "codec/webvtt/CSSGrammar.c" |
1429 | 0 | break; |
1430 | | |
1431 | 0 | case 32: /* NUMBER */ |
1432 | 0 | #line 119 "codec/webvtt/CSSGrammar.y" |
1433 | 0 | { vlc_css_term_Clean(((*yyvaluep).term)); } |
1434 | 0 | #line 1435 "codec/webvtt/CSSGrammar.c" |
1435 | 0 | break; |
1436 | | |
1437 | 0 | case 33: /* URI */ |
1438 | 0 | #line 171 "codec/webvtt/CSSGrammar.y" |
1439 | 0 | { free(((*yyvaluep).string)); } |
1440 | 0 | #line 1441 "codec/webvtt/CSSGrammar.c" |
1441 | 0 | break; |
1442 | | |
1443 | 0 | case 34: /* FUNCTION */ |
1444 | 0 | #line 171 "codec/webvtt/CSSGrammar.y" |
1445 | 0 | { free(((*yyvaluep).string)); } |
1446 | 0 | #line 1447 "codec/webvtt/CSSGrammar.c" |
1447 | 0 | break; |
1448 | | |
1449 | 0 | case 35: /* UNICODERANGE */ |
1450 | 0 | #line 171 "codec/webvtt/CSSGrammar.y" |
1451 | 0 | { free(((*yyvaluep).string)); } |
1452 | 0 | #line 1453 "codec/webvtt/CSSGrammar.c" |
1453 | 0 | 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 | 0 | case 66: /* selector_list */ |
1492 | 0 | #line 148 "codec/webvtt/CSSGrammar.y" |
1493 | 0 | { vlc_css_selectors_Delete(((*yyvaluep).selectorList)); } |
1494 | 0 | #line 1495 "codec/webvtt/CSSGrammar.c" |
1495 | 0 | break; |
1496 | | |
1497 | 0 | case 67: /* selector_with_trailing_whitespace */ |
1498 | 0 | #line 148 "codec/webvtt/CSSGrammar.y" |
1499 | 0 | { vlc_css_selectors_Delete(((*yyvaluep).selector)); } |
1500 | 0 | #line 1501 "codec/webvtt/CSSGrammar.c" |
1501 | 0 | break; |
1502 | | |
1503 | 0 | case 68: /* selector */ |
1504 | 0 | #line 148 "codec/webvtt/CSSGrammar.y" |
1505 | 0 | { vlc_css_selectors_Delete(((*yyvaluep).selector)); } |
1506 | 0 | #line 1507 "codec/webvtt/CSSGrammar.c" |
1507 | 0 | 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 | 0 | case 70: /* element_name */ |
1516 | 0 | #line 171 "codec/webvtt/CSSGrammar.y" |
1517 | 0 | { free(((*yyvaluep).string)); } |
1518 | 0 | #line 1519 "codec/webvtt/CSSGrammar.c" |
1519 | 0 | break; |
1520 | | |
1521 | 0 | case 71: /* specifier_list */ |
1522 | 0 | #line 148 "codec/webvtt/CSSGrammar.y" |
1523 | 0 | { vlc_css_selectors_Delete(((*yyvaluep).selector)); } |
1524 | 0 | #line 1525 "codec/webvtt/CSSGrammar.c" |
1525 | 0 | 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 | 0 | case 74: /* attr_name */ |
1540 | 0 | #line 171 "codec/webvtt/CSSGrammar.y" |
1541 | 0 | { free(((*yyvaluep).string)); } |
1542 | 0 | #line 1543 "codec/webvtt/CSSGrammar.c" |
1543 | 0 | 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 | 0 | case 77: /* ident_or_string */ |
1552 | 0 | #line 171 "codec/webvtt/CSSGrammar.y" |
1553 | 0 | { free(((*yyvaluep).string)); } |
1554 | 0 | #line 1555 "codec/webvtt/CSSGrammar.c" |
1555 | 0 | 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 | 0 | case 79: /* declaration_list */ |
1564 | 0 | #line 153 "codec/webvtt/CSSGrammar.y" |
1565 | 0 | { vlc_css_declarations_Delete(((*yyvaluep).declarationList)); } |
1566 | 0 | #line 1567 "codec/webvtt/CSSGrammar.c" |
1567 | 0 | break; |
1568 | | |
1569 | 0 | case 80: /* decl_list */ |
1570 | 0 | #line 153 "codec/webvtt/CSSGrammar.y" |
1571 | 0 | { vlc_css_declarations_Delete(((*yyvaluep).declarationList)); } |
1572 | 0 | #line 1573 "codec/webvtt/CSSGrammar.c" |
1573 | 0 | break; |
1574 | | |
1575 | 0 | case 81: /* declaration */ |
1576 | 0 | #line 153 "codec/webvtt/CSSGrammar.y" |
1577 | 0 | { vlc_css_declarations_Delete(((*yyvaluep).declaration)); } |
1578 | 0 | #line 1579 "codec/webvtt/CSSGrammar.c" |
1579 | 0 | break; |
1580 | | |
1581 | 0 | case 82: /* property */ |
1582 | 0 | #line 171 "codec/webvtt/CSSGrammar.y" |
1583 | 0 | { free(((*yyvaluep).string)); } |
1584 | 0 | #line 1585 "codec/webvtt/CSSGrammar.c" |
1585 | 0 | break; |
1586 | | |
1587 | 0 | case 84: /* expr */ |
1588 | 0 | #line 166 "codec/webvtt/CSSGrammar.y" |
1589 | 0 | { vlc_css_expression_Delete(((*yyvaluep).expr)); } |
1590 | 0 | #line 1591 "codec/webvtt/CSSGrammar.c" |
1591 | 0 | 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 | 0 | default: |
1618 | 0 | break; |
1619 | 0 | } |
1620 | 0 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
1621 | 0 | } |
1622 | | |
1623 | | |
1624 | | |
1625 | | |
1626 | | /*----------. |
1627 | | | yyparse. | |
1628 | | `----------*/ |
1629 | | |
1630 | | int |
1631 | | yyparse (yyscan_t scanner, vlc_css_parser_t *css_parser) |
1632 | 0 | { |
1633 | | /* The lookahead symbol. */ |
1634 | 0 | 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 | 0 | YY_INITIAL_VALUE (static YYSTYPE yyval_default;) |
1641 | 0 | YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); |
1642 | | |
1643 | | /* Number of syntax errors so far. */ |
1644 | 0 | int yynerrs; |
1645 | |
|
1646 | 0 | yy_state_fast_t yystate; |
1647 | | /* Number of tokens to shift before error messages enabled. */ |
1648 | 0 | 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 | 0 | yy_state_t yyssa[YYINITDEPTH]; |
1659 | 0 | yy_state_t *yyss; |
1660 | 0 | yy_state_t *yyssp; |
1661 | | |
1662 | | /* The semantic value stack. */ |
1663 | 0 | YYSTYPE yyvsa[YYINITDEPTH]; |
1664 | 0 | YYSTYPE *yyvs; |
1665 | 0 | YYSTYPE *yyvsp; |
1666 | |
|
1667 | 0 | YYPTRDIFF_T yystacksize; |
1668 | |
|
1669 | 0 | int yyn; |
1670 | 0 | int yyresult; |
1671 | | /* Lookahead token as an internal (translated) token number. */ |
1672 | 0 | int yytoken = 0; |
1673 | | /* The variables used to return semantic value and location from the |
1674 | | action routines. */ |
1675 | 0 | 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 | 0 | #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 | 0 | int yylen = 0; |
1689 | |
|
1690 | 0 | yyssp = yyss = yyssa; |
1691 | 0 | yyvsp = yyvs = yyvsa; |
1692 | 0 | yystacksize = YYINITDEPTH; |
1693 | |
|
1694 | 0 | YYDPRINTF ((stderr, "Starting parse\n")); |
1695 | |
|
1696 | 0 | yystate = 0; |
1697 | 0 | yyerrstatus = 0; |
1698 | 0 | yynerrs = 0; |
1699 | 0 | yychar = YYEMPTY; /* Cause a token to be read. */ |
1700 | 0 | goto yysetstate; |
1701 | | |
1702 | | |
1703 | | /*------------------------------------------------------------. |
1704 | | | yynewstate -- push a new state, which is found in yystate. | |
1705 | | `------------------------------------------------------------*/ |
1706 | 0 | 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 | 0 | yyssp++; |
1710 | | |
1711 | | |
1712 | | /*--------------------------------------------------------------------. |
1713 | | | yysetstate -- set current state (the top of the stack) to yystate. | |
1714 | | `--------------------------------------------------------------------*/ |
1715 | 0 | yysetstate: |
1716 | 0 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
1717 | 0 | YY_ASSERT (0 <= yystate && yystate < YYNSTATES); |
1718 | 0 | YY_IGNORE_USELESS_CAST_BEGIN |
1719 | 0 | *yyssp = YY_CAST (yy_state_t, yystate); |
1720 | 0 | YY_IGNORE_USELESS_CAST_END |
1721 | |
|
1722 | 0 | if (yyss + yystacksize - 1 <= yyssp) |
1723 | | #if !defined yyoverflow && !defined YYSTACK_RELOCATE |
1724 | | goto yyexhaustedlab; |
1725 | | #else |
1726 | 0 | { |
1727 | | /* Get the current used size of the three stacks, in elements. */ |
1728 | 0 | 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 | 0 | if (YYMAXDEPTH <= yystacksize) |
1752 | 0 | goto yyexhaustedlab; |
1753 | 0 | yystacksize *= 2; |
1754 | 0 | if (YYMAXDEPTH < yystacksize) |
1755 | 0 | yystacksize = YYMAXDEPTH; |
1756 | |
|
1757 | 0 | { |
1758 | 0 | yy_state_t *yyss1 = yyss; |
1759 | 0 | union yyalloc *yyptr = |
1760 | 0 | YY_CAST (union yyalloc *, |
1761 | 0 | YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); |
1762 | 0 | if (! yyptr) |
1763 | 0 | goto yyexhaustedlab; |
1764 | 0 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
1765 | 0 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
1766 | 0 | # undef YYSTACK_RELOCATE |
1767 | 0 | if (yyss1 != yyssa) |
1768 | 0 | YYSTACK_FREE (yyss1); |
1769 | 0 | } |
1770 | 0 | # endif |
1771 | | |
1772 | 0 | yyssp = yyss + yysize - 1; |
1773 | 0 | yyvsp = yyvs + yysize - 1; |
1774 | |
|
1775 | 0 | YY_IGNORE_USELESS_CAST_BEGIN |
1776 | 0 | YYDPRINTF ((stderr, "Stack size increased to %ld\n", |
1777 | 0 | YY_CAST (long, yystacksize))); |
1778 | 0 | YY_IGNORE_USELESS_CAST_END |
1779 | |
|
1780 | 0 | if (yyss + yystacksize - 1 <= yyssp) |
1781 | 0 | YYABORT; |
1782 | 0 | } |
1783 | 0 | #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ |
1784 | | |
1785 | 0 | if (yystate == YYFINAL) |
1786 | 0 | YYACCEPT; |
1787 | | |
1788 | 0 | goto yybackup; |
1789 | | |
1790 | | |
1791 | | /*-----------. |
1792 | | | yybackup. | |
1793 | | `-----------*/ |
1794 | 0 | 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 | 0 | yyn = yypact[yystate]; |
1800 | 0 | if (yypact_value_is_default (yyn)) |
1801 | 0 | 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 | 0 | if (yychar == YYEMPTY) |
1807 | 0 | { |
1808 | 0 | YYDPRINTF ((stderr, "Reading a token: ")); |
1809 | 0 | yychar = yylex (&yylval, scanner); |
1810 | 0 | } |
1811 | |
|
1812 | 0 | if (yychar <= YYEOF) |
1813 | 0 | { |
1814 | 0 | yychar = yytoken = YYEOF; |
1815 | 0 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
1816 | 0 | } |
1817 | 0 | else |
1818 | 0 | { |
1819 | 0 | yytoken = YYTRANSLATE (yychar); |
1820 | 0 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
1821 | 0 | } |
1822 | | |
1823 | | /* If the proper action on seeing token YYTOKEN is to reduce or to |
1824 | | detect an error, take that action. */ |
1825 | 0 | yyn += yytoken; |
1826 | 0 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
1827 | 0 | goto yydefault; |
1828 | 0 | yyn = yytable[yyn]; |
1829 | 0 | if (yyn <= 0) |
1830 | 0 | { |
1831 | 0 | if (yytable_value_is_error (yyn)) |
1832 | 0 | goto yyerrlab; |
1833 | 0 | yyn = -yyn; |
1834 | 0 | goto yyreduce; |
1835 | 0 | } |
1836 | | |
1837 | | /* Count tokens shifted since error; after three, turn off error |
1838 | | status. */ |
1839 | 0 | if (yyerrstatus) |
1840 | 0 | yyerrstatus--; |
1841 | | |
1842 | | /* Shift the lookahead token. */ |
1843 | 0 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
1844 | 0 | yystate = yyn; |
1845 | 0 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
1846 | 0 | *++yyvsp = yylval; |
1847 | 0 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
1848 | | |
1849 | | /* Discard the shifted token. */ |
1850 | 0 | yychar = YYEMPTY; |
1851 | 0 | goto yynewstate; |
1852 | | |
1853 | | |
1854 | | /*-----------------------------------------------------------. |
1855 | | | yydefault -- do the default action for the current state. | |
1856 | | `-----------------------------------------------------------*/ |
1857 | 0 | yydefault: |
1858 | 0 | yyn = yydefact[yystate]; |
1859 | 0 | if (yyn == 0) |
1860 | 0 | goto yyerrlab; |
1861 | 0 | goto yyreduce; |
1862 | | |
1863 | | |
1864 | | /*-----------------------------. |
1865 | | | yyreduce -- do a reduction. | |
1866 | | `-----------------------------*/ |
1867 | 0 | yyreduce: |
1868 | | /* yyn is the number of a rule to reduce with. */ |
1869 | 0 | 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 | 0 | yyval = yyvsp[1-yylen]; |
1880 | | |
1881 | |
|
1882 | 0 | YY_REDUCE_PRINT (yyn); |
1883 | 0 | switch (yyn) |
1884 | 0 | { |
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 | 0 | case 18: |
1937 | 0 | #line 228 "codec/webvtt/CSSGrammar.y" |
1938 | 0 | { |
1939 | 0 | if( (yyvsp[-1].rule) ) |
1940 | 0 | vlc_css_parser_AddRule( css_parser, (yyvsp[-1].rule) ); |
1941 | 0 | } |
1942 | 0 | #line 1943 "codec/webvtt/CSSGrammar.c" |
1943 | 0 | break; |
1944 | | |
1945 | 0 | case 21: |
1946 | 0 | #line 240 "codec/webvtt/CSSGrammar.y" |
1947 | 0 | { |
1948 | 0 | (yyval.rule) = (yyvsp[0].rule); |
1949 | 0 | if((yyval.rule)) |
1950 | 0 | (yyval.rule)->b_valid = true; |
1951 | 0 | } |
1952 | 0 | #line 1953 "codec/webvtt/CSSGrammar.c" |
1953 | 0 | 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 | 0 | case 27: |
1981 | 0 | #line 264 "codec/webvtt/CSSGrammar.y" |
1982 | 0 | { (yyval.relation) = RELATION_DIRECTADJACENT; } |
1983 | 0 | #line 1984 "codec/webvtt/CSSGrammar.c" |
1984 | 0 | break; |
1985 | | |
1986 | 0 | case 28: |
1987 | 0 | #line 265 "codec/webvtt/CSSGrammar.y" |
1988 | 0 | { (yyval.relation) = RELATION_INDIRECTADJACENT; } |
1989 | 0 | #line 1990 "codec/webvtt/CSSGrammar.c" |
1990 | 0 | break; |
1991 | | |
1992 | 0 | case 29: |
1993 | 0 | #line 266 "codec/webvtt/CSSGrammar.y" |
1994 | 0 | { (yyval.relation) = RELATION_CHILD; } |
1995 | 0 | #line 1996 "codec/webvtt/CSSGrammar.c" |
1996 | 0 | break; |
1997 | | |
1998 | 0 | case 30: |
1999 | 0 | #line 270 "codec/webvtt/CSSGrammar.y" |
2000 | 0 | { (yyval.integer) = (yyvsp[0].integer); } |
2001 | 0 | #line 2002 "codec/webvtt/CSSGrammar.c" |
2002 | 0 | break; |
2003 | | |
2004 | 0 | case 31: |
2005 | 0 | #line 271 "codec/webvtt/CSSGrammar.y" |
2006 | 0 | { (yyval.integer) = 1; } |
2007 | 0 | #line 2008 "codec/webvtt/CSSGrammar.c" |
2008 | 0 | break; |
2009 | | |
2010 | 0 | case 32: |
2011 | 0 | #line 275 "codec/webvtt/CSSGrammar.y" |
2012 | 0 | { (yyval.integer) = -1; } |
2013 | 0 | #line 2014 "codec/webvtt/CSSGrammar.c" |
2014 | 0 | break; |
2015 | | |
2016 | 0 | case 33: |
2017 | 0 | #line 276 "codec/webvtt/CSSGrammar.y" |
2018 | 0 | { (yyval.integer) = 1; } |
2019 | 0 | #line 2020 "codec/webvtt/CSSGrammar.c" |
2020 | 0 | break; |
2021 | | |
2022 | 0 | case 34: |
2023 | 0 | #line 280 "codec/webvtt/CSSGrammar.y" |
2024 | 0 | { |
2025 | 0 | (yyval.rule) = vlc_css_rule_New(); |
2026 | 0 | if((yyval.rule)) |
2027 | 0 | { |
2028 | 0 | (yyval.rule)->p_selectors = (yyvsp[-4].selectorList); |
2029 | 0 | (yyval.rule)->p_declarations = (yyvsp[-1].declarationList); |
2030 | 0 | } |
2031 | 0 | } |
2032 | 0 | #line 2033 "codec/webvtt/CSSGrammar.c" |
2033 | 0 | break; |
2034 | | |
2035 | 0 | case 35: |
2036 | 0 | #line 291 "codec/webvtt/CSSGrammar.y" |
2037 | 0 | { |
2038 | 0 | if ((yyvsp[0].selector)) { |
2039 | 0 | (yyval.selectorList) = (yyvsp[0].selector); |
2040 | 0 | } |
2041 | 0 | } |
2042 | 0 | #line 2043 "codec/webvtt/CSSGrammar.c" |
2043 | 0 | break; |
2044 | | |
2045 | 0 | case 36: |
2046 | 0 | #line 296 "codec/webvtt/CSSGrammar.y" |
2047 | 0 | { |
2048 | 0 | if ((yyvsp[-3].selectorList) && (yyvsp[0].selector) ) |
2049 | 0 | { |
2050 | 0 | (yyval.selectorList) = (yyvsp[-3].selectorList); |
2051 | 0 | vlc_css_selector_Append( (yyval.selectorList), (yyvsp[0].selector) ); |
2052 | 0 | } |
2053 | 0 | else |
2054 | 0 | { |
2055 | 0 | vlc_css_selectors_Delete( (yyvsp[-3].selectorList) ); |
2056 | 0 | vlc_css_selectors_Delete( (yyvsp[0].selector) ); |
2057 | 0 | (yyval.selectorList) = NULL; |
2058 | 0 | } |
2059 | 0 | } |
2060 | 0 | #line 2061 "codec/webvtt/CSSGrammar.c" |
2061 | 0 | break; |
2062 | | |
2063 | 0 | case 37: |
2064 | 0 | #line 309 "codec/webvtt/CSSGrammar.y" |
2065 | 0 | { |
2066 | 0 | vlc_css_selectors_Delete( (yyvsp[-1].selectorList) ); |
2067 | 0 | (yyval.selectorList) = NULL; |
2068 | 0 | } |
2069 | 0 | #line 2070 "codec/webvtt/CSSGrammar.c" |
2070 | 0 | break; |
2071 | | |
2072 | 0 | case 38: |
2073 | 0 | #line 316 "codec/webvtt/CSSGrammar.y" |
2074 | 0 | { |
2075 | 0 | (yyval.selector) = (yyvsp[-1].selector); |
2076 | 0 | } |
2077 | 0 | #line 2078 "codec/webvtt/CSSGrammar.c" |
2078 | 0 | break; |
2079 | | |
2080 | 0 | case 39: |
2081 | 0 | #line 322 "codec/webvtt/CSSGrammar.y" |
2082 | 0 | { |
2083 | 0 | (yyval.selector) = (yyvsp[0].selector); |
2084 | 0 | } |
2085 | 0 | #line 2086 "codec/webvtt/CSSGrammar.c" |
2086 | 0 | break; |
2087 | | |
2088 | 0 | case 40: |
2089 | 0 | #line 326 "codec/webvtt/CSSGrammar.y" |
2090 | 0 | { |
2091 | 0 | (yyval.selector) = (yyvsp[0].selector); |
2092 | 0 | } |
2093 | 0 | #line 2094 "codec/webvtt/CSSGrammar.c" |
2094 | 0 | break; |
2095 | | |
2096 | 0 | case 41: |
2097 | 0 | #line 330 "codec/webvtt/CSSGrammar.y" |
2098 | 0 | { |
2099 | 0 | (yyval.selector) = (yyvsp[-1].selector); |
2100 | 0 | if ((yyval.selector)) |
2101 | 0 | { |
2102 | 0 | vlc_css_selector_AddSpecifier( (yyval.selector), (yyvsp[0].selector) ); |
2103 | 0 | (yyvsp[0].selector)->combinator = RELATION_DESCENDENT; |
2104 | 0 | } |
2105 | 0 | else (yyval.selector) = (yyvsp[0].selector); |
2106 | 0 | } |
2107 | 0 | #line 2108 "codec/webvtt/CSSGrammar.c" |
2108 | 0 | break; |
2109 | | |
2110 | 0 | case 42: |
2111 | 0 | #line 339 "codec/webvtt/CSSGrammar.y" |
2112 | 0 | { |
2113 | 0 | (yyval.selector) = (yyvsp[-2].selector); |
2114 | 0 | if ((yyval.selector)) |
2115 | 0 | { |
2116 | 0 | vlc_css_selector_AddSpecifier( (yyval.selector), (yyvsp[0].selector) ); |
2117 | 0 | (yyvsp[0].selector)->combinator = (yyvsp[-1].relation); |
2118 | 0 | } |
2119 | 0 | else (yyval.selector) = (yyvsp[0].selector); |
2120 | 0 | } |
2121 | 0 | #line 2122 "codec/webvtt/CSSGrammar.c" |
2122 | 0 | break; |
2123 | | |
2124 | 0 | case 43: |
2125 | 0 | #line 348 "codec/webvtt/CSSGrammar.y" |
2126 | 0 | { |
2127 | 0 | vlc_css_selectors_Delete( (yyvsp[-1].selector) ); |
2128 | 0 | (yyval.selector) = NULL; |
2129 | 0 | } |
2130 | 0 | #line 2131 "codec/webvtt/CSSGrammar.c" |
2131 | 0 | break; |
2132 | | |
2133 | 0 | case 44: |
2134 | 0 | #line 355 "codec/webvtt/CSSGrammar.y" |
2135 | 0 | { |
2136 | 0 | (yyval.selector) = vlc_css_selector_New( SELECTOR_SIMPLE, (yyvsp[0].string) ); |
2137 | 0 | free( (yyvsp[0].string) ); |
2138 | 0 | } |
2139 | 0 | #line 2140 "codec/webvtt/CSSGrammar.c" |
2140 | 0 | break; |
2141 | | |
2142 | 0 | case 45: |
2143 | 0 | #line 359 "codec/webvtt/CSSGrammar.y" |
2144 | 0 | { |
2145 | 0 | (yyval.selector) = vlc_css_selector_New( SELECTOR_SIMPLE, (yyvsp[-1].string) ); |
2146 | 0 | if( (yyval.selector) && (yyvsp[0].selector) ) |
2147 | 0 | { |
2148 | 0 | vlc_css_selector_AddSpecifier( (yyval.selector), (yyvsp[0].selector) ); |
2149 | 0 | } |
2150 | 0 | else |
2151 | 0 | { |
2152 | 0 | vlc_css_selectors_Delete( (yyvsp[0].selector) ); |
2153 | 0 | } |
2154 | 0 | free( (yyvsp[-1].string) ); |
2155 | 0 | } |
2156 | 0 | #line 2157 "codec/webvtt/CSSGrammar.c" |
2157 | 0 | break; |
2158 | | |
2159 | 0 | case 46: |
2160 | 0 | #line 371 "codec/webvtt/CSSGrammar.y" |
2161 | 0 | { |
2162 | 0 | (yyval.selector) = (yyvsp[0].selector); |
2163 | 0 | } |
2164 | 0 | #line 2165 "codec/webvtt/CSSGrammar.c" |
2165 | 0 | break; |
2166 | | |
2167 | 0 | case 48: |
2168 | 0 | #line 378 "codec/webvtt/CSSGrammar.y" |
2169 | 0 | { (yyval.string) = strdup("*"); } |
2170 | 0 | #line 2171 "codec/webvtt/CSSGrammar.c" |
2171 | 0 | break; |
2172 | | |
2173 | 0 | case 49: |
2174 | 0 | #line 382 "codec/webvtt/CSSGrammar.y" |
2175 | 0 | { |
2176 | 0 | (yyval.selector) = (yyvsp[0].selector); |
2177 | 0 | } |
2178 | 0 | #line 2179 "codec/webvtt/CSSGrammar.c" |
2179 | 0 | break; |
2180 | | |
2181 | 0 | case 50: |
2182 | 0 | #line 385 "codec/webvtt/CSSGrammar.y" |
2183 | 0 | { |
2184 | 0 | if( (yyvsp[-1].selector) ) |
2185 | 0 | { |
2186 | 0 | (yyval.selector) = (yyvsp[-1].selector); |
2187 | 0 | while( (yyvsp[-1].selector)->specifiers.p_first ) |
2188 | 0 | (yyvsp[-1].selector) = (yyvsp[-1].selector)->specifiers.p_first; |
2189 | 0 | vlc_css_selector_AddSpecifier( (yyvsp[-1].selector), (yyvsp[0].selector) ); |
2190 | 0 | } |
2191 | 0 | else (yyval.selector) = (yyvsp[0].selector); |
2192 | 0 | } |
2193 | 0 | #line 2194 "codec/webvtt/CSSGrammar.c" |
2194 | 0 | break; |
2195 | | |
2196 | 0 | case 51: |
2197 | 0 | #line 395 "codec/webvtt/CSSGrammar.y" |
2198 | 0 | { |
2199 | 0 | vlc_css_selectors_Delete( (yyvsp[-1].selector) ); |
2200 | 0 | (yyval.selector) = NULL; |
2201 | 0 | } |
2202 | 0 | #line 2203 "codec/webvtt/CSSGrammar.c" |
2203 | 0 | break; |
2204 | | |
2205 | 0 | case 52: |
2206 | 0 | #line 402 "codec/webvtt/CSSGrammar.y" |
2207 | 0 | { |
2208 | 0 | (yyval.selector) = vlc_css_selector_New( SPECIFIER_ID, (yyvsp[0].string) ); |
2209 | 0 | free( (yyvsp[0].string) ); |
2210 | 0 | } |
2211 | 0 | #line 2212 "codec/webvtt/CSSGrammar.c" |
2212 | 0 | break; |
2213 | | |
2214 | 0 | case 53: |
2215 | 0 | #line 407 "codec/webvtt/CSSGrammar.y" |
2216 | 0 | { |
2217 | 0 | if ((yyvsp[0].string)[0] >= '0' && (yyvsp[0].string)[0] <= '9') { |
2218 | 0 | (yyval.selector) = NULL; |
2219 | 0 | } else { |
2220 | 0 | (yyval.selector) = vlc_css_selector_New( SPECIFIER_ID, (yyvsp[0].string) ); |
2221 | 0 | } |
2222 | 0 | free( (yyvsp[0].string) ); |
2223 | 0 | } |
2224 | 0 | #line 2225 "codec/webvtt/CSSGrammar.c" |
2225 | 0 | break; |
2226 | | |
2227 | 0 | case 57: |
2228 | 0 | #line 421 "codec/webvtt/CSSGrammar.y" |
2229 | 0 | { |
2230 | 0 | (yyval.selector) = vlc_css_selector_New( SPECIFIER_CLASS, (yyvsp[0].string) ); |
2231 | 0 | free( (yyvsp[0].string) ); |
2232 | 0 | } |
2233 | 0 | #line 2234 "codec/webvtt/CSSGrammar.c" |
2234 | 0 | break; |
2235 | | |
2236 | 0 | case 58: |
2237 | 0 | #line 428 "codec/webvtt/CSSGrammar.y" |
2238 | 0 | { |
2239 | 0 | (yyval.string) = (yyvsp[-1].string); |
2240 | 0 | } |
2241 | 0 | #line 2242 "codec/webvtt/CSSGrammar.c" |
2242 | 0 | break; |
2243 | | |
2244 | 0 | case 59: |
2245 | 0 | #line 434 "codec/webvtt/CSSGrammar.y" |
2246 | 0 | { |
2247 | 0 | (yyval.selector) = vlc_css_selector_New( SPECIFIER_ATTRIB, (yyvsp[-1].string) ); |
2248 | 0 | free( (yyvsp[-1].string) ); |
2249 | 0 | } |
2250 | 0 | #line 2251 "codec/webvtt/CSSGrammar.c" |
2251 | 0 | break; |
2252 | | |
2253 | 0 | case 60: |
2254 | 0 | #line 438 "codec/webvtt/CSSGrammar.y" |
2255 | 0 | { |
2256 | 0 | (yyval.selector) = vlc_css_selector_New( SPECIFIER_ATTRIB, (yyvsp[-5].string) ); |
2257 | 0 | if( (yyval.selector) ) |
2258 | 0 | { |
2259 | 0 | (yyval.selector)->match = (yyvsp[-4].integer); |
2260 | 0 | (yyval.selector)->p_matchsel = vlc_css_selector_New( SPECIFIER_ID, (yyvsp[-2].string) ); |
2261 | 0 | } |
2262 | 0 | free( (yyvsp[-5].string) ); |
2263 | 0 | free( (yyvsp[-2].string) ); |
2264 | 0 | } |
2265 | 0 | #line 2266 "codec/webvtt/CSSGrammar.c" |
2266 | 0 | break; |
2267 | | |
2268 | 0 | case 61: |
2269 | 0 | #line 451 "codec/webvtt/CSSGrammar.y" |
2270 | 0 | { |
2271 | 0 | (yyval.integer) = MATCH_EQUALS; |
2272 | 0 | } |
2273 | 0 | #line 2274 "codec/webvtt/CSSGrammar.c" |
2274 | 0 | break; |
2275 | | |
2276 | 0 | case 62: |
2277 | 0 | #line 454 "codec/webvtt/CSSGrammar.y" |
2278 | 0 | { |
2279 | 0 | (yyval.integer) = MATCH_INCLUDES; |
2280 | 0 | } |
2281 | 0 | #line 2282 "codec/webvtt/CSSGrammar.c" |
2282 | 0 | break; |
2283 | | |
2284 | 0 | case 63: |
2285 | 0 | #line 457 "codec/webvtt/CSSGrammar.y" |
2286 | 0 | { |
2287 | 0 | (yyval.integer) = MATCH_DASHMATCH; |
2288 | 0 | } |
2289 | 0 | #line 2290 "codec/webvtt/CSSGrammar.c" |
2290 | 0 | break; |
2291 | | |
2292 | 0 | case 64: |
2293 | 0 | #line 460 "codec/webvtt/CSSGrammar.y" |
2294 | 0 | { |
2295 | 0 | (yyval.integer) = MATCH_BEGINSWITH; |
2296 | 0 | } |
2297 | 0 | #line 2298 "codec/webvtt/CSSGrammar.c" |
2298 | 0 | break; |
2299 | | |
2300 | 0 | case 65: |
2301 | 0 | #line 463 "codec/webvtt/CSSGrammar.y" |
2302 | 0 | { |
2303 | 0 | (yyval.integer) = MATCH_ENDSWITH; |
2304 | 0 | } |
2305 | 0 | #line 2306 "codec/webvtt/CSSGrammar.c" |
2306 | 0 | break; |
2307 | | |
2308 | 0 | case 66: |
2309 | 0 | #line 466 "codec/webvtt/CSSGrammar.y" |
2310 | 0 | { |
2311 | 0 | (yyval.integer) = MATCH_CONTAINS; |
2312 | 0 | } |
2313 | 0 | #line 2314 "codec/webvtt/CSSGrammar.c" |
2314 | 0 | break; |
2315 | | |
2316 | 0 | case 69: |
2317 | 0 | #line 477 "codec/webvtt/CSSGrammar.y" |
2318 | 0 | { |
2319 | 0 | (yyval.selector) = vlc_css_selector_New( SELECTOR_PSEUDOCLASS, (yyvsp[0].string) ); |
2320 | 0 | free( (yyvsp[0].string) ); |
2321 | 0 | } |
2322 | 0 | #line 2323 "codec/webvtt/CSSGrammar.c" |
2323 | 0 | break; |
2324 | | |
2325 | 0 | case 70: |
2326 | 0 | #line 481 "codec/webvtt/CSSGrammar.y" |
2327 | 0 | { |
2328 | 0 | (yyval.selector) = vlc_css_selector_New( SELECTOR_PSEUDOELEMENT, (yyvsp[0].string) ); |
2329 | 0 | free( (yyvsp[0].string) ); |
2330 | 0 | } |
2331 | 0 | #line 2332 "codec/webvtt/CSSGrammar.c" |
2332 | 0 | break; |
2333 | | |
2334 | 0 | case 71: |
2335 | 0 | #line 486 "codec/webvtt/CSSGrammar.y" |
2336 | 0 | { |
2337 | 0 | if(*(yyvsp[-5].string) != 0) |
2338 | 0 | (yyvsp[-5].string)[strlen((yyvsp[-5].string)) - 1] = 0; |
2339 | 0 | (yyval.selector) = vlc_css_selector_New( SELECTOR_PSEUDOCLASS, (yyvsp[-5].string) ); |
2340 | 0 | (yyvsp[-2].term).val *= (yyvsp[-3].integer); |
2341 | 0 | free( (yyvsp[-5].string) ); |
2342 | 0 | vlc_css_term_Clean( (yyvsp[-2].term) ); |
2343 | 0 | } |
2344 | 0 | #line 2345 "codec/webvtt/CSSGrammar.c" |
2345 | 0 | break; |
2346 | | |
2347 | 0 | case 72: |
2348 | 0 | #line 495 "codec/webvtt/CSSGrammar.y" |
2349 | 0 | { |
2350 | 0 | if(*(yyvsp[-4].string) != 0) |
2351 | 0 | (yyvsp[-4].string)[strlen((yyvsp[-4].string)) - 1] = 0; |
2352 | 0 | (yyval.selector) = vlc_css_selector_New( SELECTOR_PSEUDOELEMENT, (yyvsp[-4].string) ); |
2353 | 0 | free( (yyvsp[-4].string) ); |
2354 | 0 | if( (yyval.selector) && (yyvsp[-2].selector) ) |
2355 | 0 | { |
2356 | 0 | vlc_css_selector_AddSpecifier( (yyval.selector), (yyvsp[-2].selector) ); |
2357 | 0 | (yyvsp[-2].selector)->combinator = RELATION_SELF; |
2358 | 0 | } |
2359 | 0 | else |
2360 | 0 | vlc_css_selectors_Delete( (yyvsp[-2].selector) ); |
2361 | 0 | } |
2362 | 0 | #line 2363 "codec/webvtt/CSSGrammar.c" |
2363 | 0 | break; |
2364 | | |
2365 | 0 | case 73: |
2366 | 0 | #line 509 "codec/webvtt/CSSGrammar.y" |
2367 | 0 | { |
2368 | 0 | if(*(yyvsp[-4].string) != 0) |
2369 | 0 | (yyvsp[-4].string)[strlen((yyvsp[-4].string)) - 1] = 0; |
2370 | 0 | (yyval.selector) = vlc_css_selector_New( SELECTOR_PSEUDOCLASS, (yyvsp[-4].string) ); |
2371 | 0 | free( (yyvsp[-4].string) ); |
2372 | 0 | free( (yyvsp[-2].string) ); |
2373 | 0 | } |
2374 | 0 | #line 2375 "codec/webvtt/CSSGrammar.c" |
2375 | 0 | break; |
2376 | | |
2377 | 0 | case 74: |
2378 | 0 | #line 519 "codec/webvtt/CSSGrammar.y" |
2379 | 0 | { |
2380 | 0 | (yyval.declarationList) = (yyvsp[0].declaration); |
2381 | 0 | } |
2382 | 0 | #line 2383 "codec/webvtt/CSSGrammar.c" |
2383 | 0 | break; |
2384 | | |
2385 | 0 | case 75: |
2386 | 0 | #line 522 "codec/webvtt/CSSGrammar.y" |
2387 | 0 | { |
2388 | 0 | (yyval.declarationList) = (yyvsp[-1].declarationList); |
2389 | 0 | if( (yyval.declarationList) ) |
2390 | 0 | vlc_css_declarations_Append( (yyval.declarationList), (yyvsp[0].declaration) ); |
2391 | 0 | } |
2392 | 0 | #line 2393 "codec/webvtt/CSSGrammar.c" |
2393 | 0 | break; |
2394 | | |
2395 | 0 | case 76: |
2396 | 0 | #line 527 "codec/webvtt/CSSGrammar.y" |
2397 | 0 | { |
2398 | 0 | (yyval.declarationList) = (yyvsp[0].declarationList); |
2399 | 0 | } |
2400 | 0 | #line 2401 "codec/webvtt/CSSGrammar.c" |
2401 | 0 | break; |
2402 | | |
2403 | 0 | case 77: |
2404 | 0 | #line 530 "codec/webvtt/CSSGrammar.y" |
2405 | 0 | { |
2406 | 0 | (yyval.declarationList) = NULL; |
2407 | 0 | } |
2408 | 0 | #line 2409 "codec/webvtt/CSSGrammar.c" |
2409 | 0 | break; |
2410 | | |
2411 | 0 | case 78: |
2412 | 0 | #line 533 "codec/webvtt/CSSGrammar.y" |
2413 | 0 | { |
2414 | 0 | (yyval.declarationList) = NULL; |
2415 | 0 | } |
2416 | 0 | #line 2417 "codec/webvtt/CSSGrammar.c" |
2417 | 0 | break; |
2418 | | |
2419 | 0 | case 79: |
2420 | 0 | #line 536 "codec/webvtt/CSSGrammar.y" |
2421 | 0 | { |
2422 | 0 | (yyval.declarationList) = (yyvsp[-1].declarationList); |
2423 | 0 | } |
2424 | 0 | #line 2425 "codec/webvtt/CSSGrammar.c" |
2425 | 0 | break; |
2426 | | |
2427 | 0 | case 80: |
2428 | 0 | #line 539 "codec/webvtt/CSSGrammar.y" |
2429 | 0 | { |
2430 | 0 | (yyval.declarationList) = (yyvsp[-1].declarationList); |
2431 | 0 | } |
2432 | 0 | #line 2433 "codec/webvtt/CSSGrammar.c" |
2433 | 0 | break; |
2434 | | |
2435 | 0 | case 81: |
2436 | 0 | #line 545 "codec/webvtt/CSSGrammar.y" |
2437 | 0 | { |
2438 | 0 | (yyval.declarationList) = (yyvsp[-2].declaration); |
2439 | 0 | } |
2440 | 0 | #line 2441 "codec/webvtt/CSSGrammar.c" |
2441 | 0 | break; |
2442 | | |
2443 | 0 | case 82: |
2444 | 0 | #line 548 "codec/webvtt/CSSGrammar.y" |
2445 | 0 | { |
2446 | 0 | vlc_css_declarations_Delete( (yyvsp[-2].declaration) ); |
2447 | 0 | (yyval.declarationList) = NULL; |
2448 | 0 | } |
2449 | 0 | #line 2450 "codec/webvtt/CSSGrammar.c" |
2450 | 0 | break; |
2451 | | |
2452 | 0 | case 83: |
2453 | 0 | #line 552 "codec/webvtt/CSSGrammar.y" |
2454 | 0 | { |
2455 | 0 | vlc_css_declarations_Delete( (yyvsp[-3].declaration) ); |
2456 | 0 | (yyval.declarationList) = NULL; |
2457 | 0 | } |
2458 | 0 | #line 2459 "codec/webvtt/CSSGrammar.c" |
2459 | 0 | break; |
2460 | | |
2461 | 0 | case 84: |
2462 | 0 | #line 556 "codec/webvtt/CSSGrammar.y" |
2463 | 0 | { |
2464 | 0 | (yyval.declarationList) = NULL; |
2465 | 0 | } |
2466 | 0 | #line 2467 "codec/webvtt/CSSGrammar.c" |
2467 | 0 | break; |
2468 | | |
2469 | 0 | case 85: |
2470 | 0 | #line 559 "codec/webvtt/CSSGrammar.y" |
2471 | 0 | { |
2472 | 0 | (yyval.declarationList) = NULL; |
2473 | 0 | } |
2474 | 0 | #line 2475 "codec/webvtt/CSSGrammar.c" |
2475 | 0 | break; |
2476 | | |
2477 | 0 | case 86: |
2478 | 0 | #line 562 "codec/webvtt/CSSGrammar.y" |
2479 | 0 | { |
2480 | 0 | if( (yyvsp[-3].declarationList) ) |
2481 | 0 | { |
2482 | 0 | (yyval.declarationList) = (yyvsp[-3].declarationList); |
2483 | 0 | vlc_css_declarations_Append( (yyval.declarationList), (yyvsp[-2].declaration) ); |
2484 | 0 | } |
2485 | 0 | else (yyval.declarationList) = (yyvsp[-2].declaration); |
2486 | 0 | } |
2487 | 0 | #line 2488 "codec/webvtt/CSSGrammar.c" |
2488 | 0 | break; |
2489 | | |
2490 | 0 | case 87: |
2491 | 0 | #line 570 "codec/webvtt/CSSGrammar.y" |
2492 | 0 | { |
2493 | 0 | (yyval.declarationList) = (yyvsp[-3].declarationList); |
2494 | 0 | } |
2495 | 0 | #line 2496 "codec/webvtt/CSSGrammar.c" |
2496 | 0 | 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 | 0 | case 89: |
2507 | 0 | #line 579 "codec/webvtt/CSSGrammar.y" |
2508 | 0 | { |
2509 | 0 | (yyval.declaration) = vlc_css_declaration_New( (yyvsp[-4].string) ); |
2510 | 0 | if( (yyval.declaration) ) |
2511 | 0 | (yyval.declaration)->expr = (yyvsp[-1].expr); |
2512 | 0 | else |
2513 | 0 | vlc_css_expression_Delete( (yyvsp[-1].expr) ); |
2514 | 0 | free( (yyvsp[-4].string) ); |
2515 | 0 | } |
2516 | 0 | #line 2517 "codec/webvtt/CSSGrammar.c" |
2517 | 0 | break; |
2518 | | |
2519 | 0 | case 90: |
2520 | 0 | #line 588 "codec/webvtt/CSSGrammar.y" |
2521 | 0 | { |
2522 | 0 | free( (yyvsp[-1].string) ); |
2523 | 0 | (yyval.declaration) = NULL; |
2524 | 0 | } |
2525 | 0 | #line 2526 "codec/webvtt/CSSGrammar.c" |
2526 | 0 | break; |
2527 | | |
2528 | 0 | case 91: |
2529 | 0 | #line 593 "codec/webvtt/CSSGrammar.y" |
2530 | 0 | { |
2531 | 0 | free( (yyvsp[-5].string) ); |
2532 | 0 | vlc_css_expression_Delete( (yyvsp[-1].expr) ); |
2533 | | /* The default movable type template has letter-spacing: .none; Handle this by looking for |
2534 | | error tokens at the start of an expr, recover the expr and then treat as an error, cleaning |
2535 | | up and deleting the shifted expr. */ |
2536 | 0 | (yyval.declaration) = NULL; |
2537 | 0 | } |
2538 | 0 | #line 2539 "codec/webvtt/CSSGrammar.c" |
2539 | 0 | break; |
2540 | | |
2541 | 0 | case 92: |
2542 | 0 | #line 602 "codec/webvtt/CSSGrammar.y" |
2543 | 0 | { |
2544 | 0 | free( (yyvsp[-5].string) ); |
2545 | 0 | vlc_css_expression_Delete( (yyvsp[-2].expr) ); |
2546 | | /* When we encounter something like p {color: red !important fail;} we should drop the declaration */ |
2547 | 0 | (yyval.declaration) = NULL; |
2548 | 0 | } |
2549 | 0 | #line 2550 "codec/webvtt/CSSGrammar.c" |
2550 | 0 | break; |
2551 | | |
2552 | 0 | case 93: |
2553 | 0 | #line 609 "codec/webvtt/CSSGrammar.y" |
2554 | 0 | { |
2555 | | /* Handle this case: div { text-align: center; !important } Just reduce away the stray !important. */ |
2556 | 0 | (yyval.declaration) = NULL; |
2557 | 0 | } |
2558 | 0 | #line 2559 "codec/webvtt/CSSGrammar.c" |
2559 | 0 | break; |
2560 | | |
2561 | 0 | case 94: |
2562 | 0 | #line 614 "codec/webvtt/CSSGrammar.y" |
2563 | 0 | { |
2564 | 0 | free( (yyvsp[-2].string) ); |
2565 | | /* div { font-family: } Just reduce away this property with no value. */ |
2566 | 0 | (yyval.declaration) = NULL; |
2567 | 0 | } |
2568 | 0 | #line 2569 "codec/webvtt/CSSGrammar.c" |
2569 | 0 | break; |
2570 | | |
2571 | 0 | case 95: |
2572 | 0 | #line 620 "codec/webvtt/CSSGrammar.y" |
2573 | 0 | { |
2574 | 0 | free( (yyvsp[-3].string) ); |
2575 | | /* if we come across rules with invalid values like this case: p { weight: *; }, just discard the rule */ |
2576 | 0 | (yyval.declaration) = NULL; |
2577 | 0 | } |
2578 | 0 | #line 2579 "codec/webvtt/CSSGrammar.c" |
2579 | 0 | break; |
2580 | | |
2581 | 0 | case 96: |
2582 | 0 | #line 626 "codec/webvtt/CSSGrammar.y" |
2583 | 0 | { |
2584 | | /* if we come across: div { color{;color:maroon} }, ignore everything within curly brackets */ |
2585 | 0 | free( (yyvsp[-1].string) ); |
2586 | 0 | (yyval.declaration) = NULL; |
2587 | 0 | } |
2588 | 0 | #line 2589 "codec/webvtt/CSSGrammar.c" |
2589 | 0 | break; |
2590 | | |
2591 | 0 | case 97: |
2592 | 0 | #line 634 "codec/webvtt/CSSGrammar.y" |
2593 | 0 | { |
2594 | 0 | (yyval.string) = (yyvsp[-1].string); |
2595 | 0 | } |
2596 | 0 | #line 2597 "codec/webvtt/CSSGrammar.c" |
2597 | 0 | break; |
2598 | | |
2599 | 0 | case 98: |
2600 | 0 | #line 640 "codec/webvtt/CSSGrammar.y" |
2601 | 0 | { (yyval.boolean) = true; } |
2602 | 0 | #line 2603 "codec/webvtt/CSSGrammar.c" |
2603 | 0 | break; |
2604 | | |
2605 | 0 | case 99: |
2606 | 0 | #line 641 "codec/webvtt/CSSGrammar.y" |
2607 | 0 | { (yyval.boolean) = false; } |
2608 | 0 | #line 2609 "codec/webvtt/CSSGrammar.c" |
2609 | 0 | break; |
2610 | | |
2611 | 0 | case 100: |
2612 | 0 | #line 645 "codec/webvtt/CSSGrammar.y" |
2613 | 0 | { |
2614 | 0 | (yyval.expr) = vlc_css_expression_New( (yyvsp[0].term) ); |
2615 | 0 | if( !(yyval.expr) ) |
2616 | 0 | vlc_css_term_Clean( (yyvsp[0].term) ); |
2617 | 0 | } |
2618 | 0 | #line 2619 "codec/webvtt/CSSGrammar.c" |
2619 | 0 | break; |
2620 | | |
2621 | 0 | case 101: |
2622 | 0 | #line 650 "codec/webvtt/CSSGrammar.y" |
2623 | 0 | { |
2624 | 0 | (yyval.expr) = (yyvsp[-2].expr); |
2625 | 0 | if( !(yyvsp[-2].expr) || !vlc_css_expression_AddTerm((yyvsp[-2].expr), (yyvsp[-1].character), (yyvsp[0].term)) ) |
2626 | 0 | vlc_css_term_Clean( (yyvsp[0].term) ); |
2627 | 0 | } |
2628 | 0 | #line 2629 "codec/webvtt/CSSGrammar.c" |
2629 | 0 | break; |
2630 | | |
2631 | 0 | case 102: |
2632 | 0 | #line 655 "codec/webvtt/CSSGrammar.y" |
2633 | 0 | { |
2634 | 0 | vlc_css_expression_Delete( (yyvsp[-1].expr) ); |
2635 | 0 | (yyval.expr) = NULL; |
2636 | 0 | } |
2637 | 0 | #line 2638 "codec/webvtt/CSSGrammar.c" |
2638 | 0 | break; |
2639 | | |
2640 | 0 | case 103: |
2641 | 0 | #line 659 "codec/webvtt/CSSGrammar.y" |
2642 | 0 | { |
2643 | 0 | vlc_css_expression_Delete( (yyvsp[-2].expr) ); |
2644 | 0 | (yyval.expr) = NULL; |
2645 | 0 | } |
2646 | 0 | #line 2647 "codec/webvtt/CSSGrammar.c" |
2647 | 0 | break; |
2648 | | |
2649 | 0 | case 104: |
2650 | 0 | #line 663 "codec/webvtt/CSSGrammar.y" |
2651 | 0 | { |
2652 | 0 | vlc_css_expression_Delete( (yyvsp[-1].expr) ); |
2653 | 0 | (yyval.expr) = NULL; |
2654 | 0 | } |
2655 | 0 | #line 2656 "codec/webvtt/CSSGrammar.c" |
2656 | 0 | break; |
2657 | | |
2658 | 0 | case 105: |
2659 | 0 | #line 670 "codec/webvtt/CSSGrammar.y" |
2660 | 0 | { |
2661 | 0 | (yyval.character) = '/'; |
2662 | 0 | } |
2663 | 0 | #line 2664 "codec/webvtt/CSSGrammar.c" |
2664 | 0 | break; |
2665 | | |
2666 | 0 | case 106: |
2667 | 0 | #line 673 "codec/webvtt/CSSGrammar.y" |
2668 | 0 | { |
2669 | 0 | (yyval.character) = ','; |
2670 | 0 | } |
2671 | 0 | #line 2672 "codec/webvtt/CSSGrammar.c" |
2672 | 0 | break; |
2673 | | |
2674 | 0 | case 107: |
2675 | 0 | #line 676 "codec/webvtt/CSSGrammar.y" |
2676 | 0 | { |
2677 | 0 | (yyval.character) = 0; |
2678 | 0 | } |
2679 | 0 | #line 2680 "codec/webvtt/CSSGrammar.c" |
2680 | 0 | break; |
2681 | | |
2682 | 0 | case 108: |
2683 | 0 | #line 682 "codec/webvtt/CSSGrammar.y" |
2684 | 0 | { (yyval.term) = (yyvsp[0].term); } |
2685 | 0 | #line 2686 "codec/webvtt/CSSGrammar.c" |
2686 | 0 | break; |
2687 | | |
2688 | 0 | case 109: |
2689 | 0 | #line 683 "codec/webvtt/CSSGrammar.y" |
2690 | 0 | { |
2691 | 0 | (yyval.term) = (yyvsp[0].term); |
2692 | 0 | (yyval.term).val *= (yyvsp[-1].integer); |
2693 | 0 | } |
2694 | 0 | #line 2695 "codec/webvtt/CSSGrammar.c" |
2695 | 0 | break; |
2696 | | |
2697 | 0 | case 110: |
2698 | 0 | #line 687 "codec/webvtt/CSSGrammar.y" |
2699 | 0 | { (yyval.term).type = TYPE_STRING; (yyval.term).psz = (yyvsp[-1].string); } |
2700 | 0 | #line 2701 "codec/webvtt/CSSGrammar.c" |
2701 | 0 | break; |
2702 | | |
2703 | 0 | case 111: |
2704 | 0 | #line 688 "codec/webvtt/CSSGrammar.y" |
2705 | 0 | { (yyval.term).type = TYPE_IDENTIFIER; (yyval.term).psz = (yyvsp[-1].string); } |
2706 | 0 | #line 2707 "codec/webvtt/CSSGrammar.c" |
2707 | 0 | break; |
2708 | | |
2709 | 0 | case 112: |
2710 | 0 | #line 690 "codec/webvtt/CSSGrammar.y" |
2711 | 0 | { (yyval.term) = (yyvsp[-1].term); } |
2712 | 0 | #line 2713 "codec/webvtt/CSSGrammar.c" |
2713 | 0 | break; |
2714 | | |
2715 | 0 | case 113: |
2716 | 0 | #line 691 "codec/webvtt/CSSGrammar.y" |
2717 | 0 | { (yyval.term) = (yyvsp[-1].term); } |
2718 | 0 | #line 2719 "codec/webvtt/CSSGrammar.c" |
2719 | 0 | break; |
2720 | | |
2721 | 0 | case 114: |
2722 | 0 | #line 692 "codec/webvtt/CSSGrammar.y" |
2723 | 0 | { (yyval.term).type = TYPE_URI; (yyval.term).psz = (yyvsp[-1].string); } |
2724 | 0 | #line 2725 "codec/webvtt/CSSGrammar.c" |
2725 | 0 | break; |
2726 | | |
2727 | 0 | case 115: |
2728 | 0 | #line 693 "codec/webvtt/CSSGrammar.y" |
2729 | 0 | { (yyval.term).type = TYPE_UNICODERANGE; (yyval.term).psz = (yyvsp[-1].string); } |
2730 | 0 | #line 2731 "codec/webvtt/CSSGrammar.c" |
2731 | 0 | break; |
2732 | | |
2733 | 0 | case 116: |
2734 | 0 | #line 694 "codec/webvtt/CSSGrammar.y" |
2735 | 0 | { (yyval.term).type = TYPE_HEXCOLOR; (yyval.term).psz = (yyvsp[-1].string); } |
2736 | 0 | #line 2737 "codec/webvtt/CSSGrammar.c" |
2737 | 0 | break; |
2738 | | |
2739 | 0 | case 117: |
2740 | 0 | #line 695 "codec/webvtt/CSSGrammar.y" |
2741 | 0 | { (yyval.term).type = TYPE_HEXCOLOR; (yyval.term).psz = (yyvsp[-1].string); } |
2742 | 0 | #line 2743 "codec/webvtt/CSSGrammar.c" |
2743 | 0 | break; |
2744 | | |
2745 | 0 | case 118: |
2746 | 0 | #line 696 "codec/webvtt/CSSGrammar.y" |
2747 | 0 | { (yyval.term).type = TYPE_HEXCOLOR; (yyval.term).psz = NULL; } |
2748 | 0 | #line 2749 "codec/webvtt/CSSGrammar.c" |
2749 | 0 | break; |
2750 | | |
2751 | 0 | case 119: |
2752 | 0 | #line 698 "codec/webvtt/CSSGrammar.y" |
2753 | 0 | { |
2754 | 0 | (yyval.term) = (yyvsp[0].term); |
2755 | 0 | } |
2756 | 0 | #line 2757 "codec/webvtt/CSSGrammar.c" |
2757 | 0 | break; |
2758 | | |
2759 | 0 | case 120: |
2760 | 0 | #line 701 "codec/webvtt/CSSGrammar.y" |
2761 | 0 | { /* Handle width: %; */ |
2762 | 0 | (yyval.term).type = TYPE_PERCENT; (yyval.term).val = 0; |
2763 | 0 | } |
2764 | 0 | #line 2765 "codec/webvtt/CSSGrammar.c" |
2765 | 0 | break; |
2766 | | |
2767 | 0 | case 127: |
2768 | 0 | #line 716 "codec/webvtt/CSSGrammar.y" |
2769 | 0 | { |
2770 | 0 | (yyval.term).type = TYPE_FUNCTION; (yyval.term).function = (yyvsp[-2].expr); |
2771 | 0 | (yyval.term).psz = (yyvsp[-4].string); |
2772 | 0 | if(*(yyval.term).psz != 0) |
2773 | 0 | (yyval.term).psz[strlen((yyval.term).psz) - 1] = 0; |
2774 | 0 | } |
2775 | 0 | #line 2776 "codec/webvtt/CSSGrammar.c" |
2776 | 0 | break; |
2777 | | |
2778 | 0 | case 128: |
2779 | 0 | #line 722 "codec/webvtt/CSSGrammar.y" |
2780 | 0 | { |
2781 | 0 | (yyval.term).type = TYPE_FUNCTION; (yyval.term).function = (yyvsp[-1].expr); (yyval.term).psz = (yyvsp[-3].string); |
2782 | 0 | if(*(yyval.term).psz != 0) |
2783 | 0 | (yyval.term).psz[strlen((yyval.term).psz) - 1] = 0; |
2784 | 0 | } |
2785 | 0 | #line 2786 "codec/webvtt/CSSGrammar.c" |
2786 | 0 | break; |
2787 | | |
2788 | 0 | case 129: |
2789 | 0 | #line 727 "codec/webvtt/CSSGrammar.y" |
2790 | 0 | { |
2791 | 0 | (yyval.term).type = TYPE_FUNCTION; (yyval.term).function = NULL; (yyval.term).psz = (yyvsp[-3].string); |
2792 | 0 | if(*(yyval.term).psz != 0) |
2793 | 0 | (yyval.term).psz[strlen((yyval.term).psz) - 1] = 0; |
2794 | 0 | } |
2795 | 0 | #line 2796 "codec/webvtt/CSSGrammar.c" |
2796 | 0 | break; |
2797 | | |
2798 | 0 | case 130: |
2799 | 0 | #line 732 "codec/webvtt/CSSGrammar.y" |
2800 | 0 | { |
2801 | 0 | (yyval.term).type = TYPE_FUNCTION; (yyval.term).function = NULL; (yyval.term).psz = (yyvsp[-2].string); |
2802 | 0 | if(*(yyval.term).psz != 0) |
2803 | 0 | (yyval.term).psz[strlen((yyval.term).psz) - 1] = 0; |
2804 | 0 | } |
2805 | 0 | #line 2806 "codec/webvtt/CSSGrammar.c" |
2806 | 0 | break; |
2807 | | |
2808 | 0 | case 131: |
2809 | 0 | #line 742 "codec/webvtt/CSSGrammar.y" |
2810 | 0 | { |
2811 | 0 | (yyval.rule) = NULL; |
2812 | 0 | } |
2813 | 0 | #line 2814 "codec/webvtt/CSSGrammar.c" |
2814 | 0 | break; |
2815 | | |
2816 | | |
2817 | 0 | #line 2818 "codec/webvtt/CSSGrammar.c" |
2818 | | |
2819 | 0 | default: break; |
2820 | 0 | } |
2821 | | /* User semantic actions sometimes alter yychar, and that requires |
2822 | | that yytoken be updated with the new translation. We take the |
2823 | | approach of translating immediately before every use of yytoken. |
2824 | | One alternative is translating here after every semantic action, |
2825 | | but that translation would be missed if the semantic action invokes |
2826 | | YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
2827 | | if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
2828 | | incorrect destructor might then be invoked immediately. In the |
2829 | | case of YYERROR or YYBACKUP, subsequent parser actions might lead |
2830 | | to an incorrect destructor call or verbose syntax error message |
2831 | | before the lookahead is translated. */ |
2832 | 0 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
2833 | |
|
2834 | 0 | YYPOPSTACK (yylen); |
2835 | 0 | yylen = 0; |
2836 | 0 | YY_STACK_PRINT (yyss, yyssp); |
2837 | |
|
2838 | 0 | *++yyvsp = yyval; |
2839 | | |
2840 | | /* Now 'shift' the result of the reduction. Determine what state |
2841 | | that goes to, based on the state we popped back to and the rule |
2842 | | number reduced by. */ |
2843 | 0 | { |
2844 | 0 | const int yylhs = yyr1[yyn] - YYNTOKENS; |
2845 | 0 | const int yyi = yypgoto[yylhs] + *yyssp; |
2846 | 0 | yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp |
2847 | 0 | ? yytable[yyi] |
2848 | 0 | : yydefgoto[yylhs]); |
2849 | 0 | } |
2850 | |
|
2851 | 0 | goto yynewstate; |
2852 | | |
2853 | | |
2854 | | /*--------------------------------------. |
2855 | | | yyerrlab -- here on detecting error. | |
2856 | | `--------------------------------------*/ |
2857 | 0 | yyerrlab: |
2858 | | /* Make sure we have latest lookahead translation. See comments at |
2859 | | user semantic actions for why this is necessary. */ |
2860 | 0 | yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
2861 | | |
2862 | | /* If not already recovering from an error, report this error. */ |
2863 | 0 | if (!yyerrstatus) |
2864 | 0 | { |
2865 | 0 | ++yynerrs; |
2866 | 0 | #if ! YYERROR_VERBOSE |
2867 | 0 | yyerror (scanner, css_parser, YY_("syntax error")); |
2868 | | #else |
2869 | | # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ |
2870 | | yyssp, yytoken) |
2871 | | { |
2872 | | char const *yymsgp = YY_("syntax error"); |
2873 | | int yysyntax_error_status; |
2874 | | yysyntax_error_status = YYSYNTAX_ERROR; |
2875 | | if (yysyntax_error_status == 0) |
2876 | | yymsgp = yymsg; |
2877 | | else if (yysyntax_error_status == 1) |
2878 | | { |
2879 | | if (yymsg != yymsgbuf) |
2880 | | YYSTACK_FREE (yymsg); |
2881 | | yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); |
2882 | | if (!yymsg) |
2883 | | { |
2884 | | yymsg = yymsgbuf; |
2885 | | yymsg_alloc = sizeof yymsgbuf; |
2886 | | yysyntax_error_status = 2; |
2887 | | } |
2888 | | else |
2889 | | { |
2890 | | yysyntax_error_status = YYSYNTAX_ERROR; |
2891 | | yymsgp = yymsg; |
2892 | | } |
2893 | | } |
2894 | | yyerror (scanner, css_parser, yymsgp); |
2895 | | if (yysyntax_error_status == 2) |
2896 | | goto yyexhaustedlab; |
2897 | | } |
2898 | | # undef YYSYNTAX_ERROR |
2899 | | #endif |
2900 | 0 | } |
2901 | | |
2902 | | |
2903 | |
|
2904 | 0 | if (yyerrstatus == 3) |
2905 | 0 | { |
2906 | | /* If just tried and failed to reuse lookahead token after an |
2907 | | error, discard it. */ |
2908 | |
|
2909 | 0 | if (yychar <= YYEOF) |
2910 | 0 | { |
2911 | | /* Return failure if at end of input. */ |
2912 | 0 | if (yychar == YYEOF) |
2913 | 0 | YYABORT; |
2914 | 0 | } |
2915 | 0 | else |
2916 | 0 | { |
2917 | 0 | yydestruct ("Error: discarding", |
2918 | 0 | yytoken, &yylval, scanner, css_parser); |
2919 | 0 | yychar = YYEMPTY; |
2920 | 0 | } |
2921 | 0 | } |
2922 | | |
2923 | | /* Else will try to reuse lookahead token after shifting the error |
2924 | | token. */ |
2925 | 0 | goto yyerrlab1; |
2926 | | |
2927 | | |
2928 | | /*---------------------------------------------------. |
2929 | | | yyerrorlab -- error raised explicitly by YYERROR. | |
2930 | | `---------------------------------------------------*/ |
2931 | 0 | yyerrorlab: |
2932 | | /* Pacify compilers when the user code never invokes YYERROR and the |
2933 | | label yyerrorlab therefore never appears in user code. */ |
2934 | 0 | if (0) |
2935 | 0 | YYERROR; |
2936 | | |
2937 | | /* Do not reclaim the symbols of the rule whose action triggered |
2938 | | this YYERROR. */ |
2939 | 0 | YYPOPSTACK (yylen); |
2940 | 0 | yylen = 0; |
2941 | 0 | YY_STACK_PRINT (yyss, yyssp); |
2942 | 0 | yystate = *yyssp; |
2943 | 0 | goto yyerrlab1; |
2944 | | |
2945 | | |
2946 | | /*-------------------------------------------------------------. |
2947 | | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
2948 | | `-------------------------------------------------------------*/ |
2949 | 0 | yyerrlab1: |
2950 | 0 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
2951 | |
|
2952 | 0 | for (;;) |
2953 | 0 | { |
2954 | 0 | yyn = yypact[yystate]; |
2955 | 0 | if (!yypact_value_is_default (yyn)) |
2956 | 0 | { |
2957 | 0 | yyn += YYTERROR; |
2958 | 0 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
2959 | 0 | { |
2960 | 0 | yyn = yytable[yyn]; |
2961 | 0 | if (0 < yyn) |
2962 | 0 | break; |
2963 | 0 | } |
2964 | 0 | } |
2965 | | |
2966 | | /* Pop the current state because it cannot handle the error token. */ |
2967 | 0 | if (yyssp == yyss) |
2968 | 0 | YYABORT; |
2969 | | |
2970 | | |
2971 | 0 | yydestruct ("Error: popping", |
2972 | 0 | yystos[yystate], yyvsp, scanner, css_parser); |
2973 | 0 | YYPOPSTACK (1); |
2974 | 0 | yystate = *yyssp; |
2975 | 0 | YY_STACK_PRINT (yyss, yyssp); |
2976 | 0 | } |
2977 | | |
2978 | 0 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
2979 | 0 | *++yyvsp = yylval; |
2980 | 0 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
2981 | | |
2982 | | |
2983 | | /* Shift the error token. */ |
2984 | 0 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
2985 | |
|
2986 | 0 | yystate = yyn; |
2987 | 0 | goto yynewstate; |
2988 | | |
2989 | | |
2990 | | /*-------------------------------------. |
2991 | | | yyacceptlab -- YYACCEPT comes here. | |
2992 | | `-------------------------------------*/ |
2993 | 0 | yyacceptlab: |
2994 | 0 | yyresult = 0; |
2995 | 0 | goto yyreturn; |
2996 | | |
2997 | | |
2998 | | /*-----------------------------------. |
2999 | | | yyabortlab -- YYABORT comes here. | |
3000 | | `-----------------------------------*/ |
3001 | 0 | yyabortlab: |
3002 | 0 | yyresult = 1; |
3003 | 0 | goto yyreturn; |
3004 | | |
3005 | | |
3006 | 0 | #if !defined yyoverflow || YYERROR_VERBOSE |
3007 | | /*-------------------------------------------------. |
3008 | | | yyexhaustedlab -- memory exhaustion comes here. | |
3009 | | `-------------------------------------------------*/ |
3010 | 0 | yyexhaustedlab: |
3011 | 0 | yyerror (scanner, css_parser, YY_("memory exhausted")); |
3012 | 0 | yyresult = 2; |
3013 | | /* Fall through. */ |
3014 | 0 | #endif |
3015 | | |
3016 | | |
3017 | | /*-----------------------------------------------------. |
3018 | | | yyreturn -- parsing is finished, return the result. | |
3019 | | `-----------------------------------------------------*/ |
3020 | 0 | yyreturn: |
3021 | 0 | if (yychar != YYEMPTY) |
3022 | 0 | { |
3023 | | /* Make sure we have latest lookahead translation. See comments at |
3024 | | user semantic actions for why this is necessary. */ |
3025 | 0 | yytoken = YYTRANSLATE (yychar); |
3026 | 0 | yydestruct ("Cleanup: discarding lookahead", |
3027 | 0 | yytoken, &yylval, scanner, css_parser); |
3028 | 0 | } |
3029 | | /* Do not reclaim the symbols of the rule whose action triggered |
3030 | | this YYABORT or YYACCEPT. */ |
3031 | 0 | YYPOPSTACK (yylen); |
3032 | 0 | YY_STACK_PRINT (yyss, yyssp); |
3033 | 0 | while (yyssp != yyss) |
3034 | 0 | { |
3035 | 0 | yydestruct ("Cleanup: popping", |
3036 | 0 | yystos[+*yyssp], yyvsp, scanner, css_parser); |
3037 | 0 | YYPOPSTACK (1); |
3038 | 0 | } |
3039 | 0 | #ifndef yyoverflow |
3040 | 0 | if (yyss != yyssa) |
3041 | 0 | YYSTACK_FREE (yyss); |
3042 | 0 | #endif |
3043 | | #if YYERROR_VERBOSE |
3044 | | if (yymsg != yymsgbuf) |
3045 | | YYSTACK_FREE (yymsg); |
3046 | | #endif |
3047 | 0 | return yyresult; |
3048 | 0 | } |
3049 | | #line 769 "codec/webvtt/CSSGrammar.y" |
3050 | | |
3051 | | |
3052 | | #ifdef YYDEBUG |
3053 | | int yydebug=1; |
3054 | | #else |
3055 | | int yydebug=0; |
3056 | | #endif |