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