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