/* A Bison parser, made by GNU Bison 3.8.2.  */

/* Bison implementation for Yacc-like parsers in C

   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
   Inc.

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */

/* As a special exception, you may create a larger work that contains
   part or all of the Bison parser skeleton and distribute that work
   under terms of your choice, so long as that work isn't itself a
   parser generator using the skeleton or a modified version thereof
   as a parser skeleton.  Alternatively, if you modify or redistribute
   the parser skeleton itself, you may (at your option) remove this
   special exception, which will cause the skeleton and the resulting
   Bison output files to be licensed under the GNU General Public
   License without this special exception.

   This special exception was added by the Free Software Foundation in
   version 2.2 of Bison.  */

/* C LALR(1) parser skeleton written by Richard Stallman, by
   simplifying the original so-called "semantic" parser.  */

/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
   especially those whose name start with YY_ or yy_.  They are
   private implementation details that can be changed or removed.  */

/* All symbols defined below should begin with yy or YY, to avoid
   infringing on user name space.  This should be done even for local
   variables, as they might otherwise be expanded by user macros.
   There are some unavoidable exceptions within include files to
   define necessary library symbols; they are noted "INFRINGES ON
   USER NAME SPACE" below.  */

/* Identify Bison output, and Bison version.  */
#define YYBISON 30802

/* Bison version string.  */
#define YYBISON_VERSION "3.8.2"

/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 0

/* Push parsers.  */
#define YYPUSH 0

/* Pull parsers.  */
#define YYPULL 1


/* Substitute the variable and function names.  */
#define yyparse         dvdvmparse
#define yylex           dvdvmlex
#define yyerror         dvdvmerror
#define yydebug         dvdvmdebug
#define yynerrs         dvdvmnerrs
#define yylval          dvdvmlval
#define yychar          dvdvmchar

/* First part of user prologue.  */
#line 1 "dvdvmy.y"


/*
 * Copyright (C) 2002 Scott Smith (trckjunky@users.sourceforge.net)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 * USA
 */

#include "compat.h" /* needed for bool */
#include "dvdvm.h"


#define YYERROR_VERBOSE


#line 107 "dvdvmy.c"

# ifndef YY_CAST
#  ifdef __cplusplus
#   define YY_CAST(Type, Val) static_cast<Type> (Val)
#   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
#  else
#   define YY_CAST(Type, Val) ((Type) (Val))
#   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
#  endif
# endif
# ifndef YY_NULLPTR
#  if defined __cplusplus
#   if 201103L <= __cplusplus
#    define YY_NULLPTR nullptr
#   else
#    define YY_NULLPTR 0
#   endif
#  else
#   define YY_NULLPTR ((void*)0)
#  endif
# endif

#include "dvdvmy.h"
/* Symbol kind.  */
enum yysymbol_kind_t
{
  YYSYMBOL_YYEMPTY = -2,
  YYSYMBOL_YYEOF = 0,                      /* "end of file"  */
  YYSYMBOL_YYerror = 1,                    /* error  */
  YYSYMBOL_YYUNDEF = 2,                    /* "invalid token"  */
  YYSYMBOL_NUM_TOK = 3,                    /* NUM_TOK  */
  YYSYMBOL_G_TOK = 4,                      /* G_TOK  */
  YYSYMBOL_S_TOK = 5,                      /* S_TOK  */
  YYSYMBOL_ID_TOK = 6,                     /* ID_TOK  */
  YYSYMBOL_ANGLE_TOK = 7,                  /* ANGLE_TOK  */
  YYSYMBOL_AUDIO_TOK = 8,                  /* AUDIO_TOK  */
  YYSYMBOL_BREAK_TOK = 9,                  /* BREAK_TOK  */
  YYSYMBOL_BUTTON_TOK = 10,                /* BUTTON_TOK  */
  YYSYMBOL_CALL_TOK = 11,                  /* CALL_TOK  */
  YYSYMBOL_CELL_TOK = 12,                  /* CELL_TOK  */
  YYSYMBOL_CHAPTER_TOK = 13,               /* CHAPTER_TOK  */
  YYSYMBOL_CLOSEBRACE_TOK = 14,            /* CLOSEBRACE_TOK  */
  YYSYMBOL_CLOSEPAREN_TOK = 15,            /* CLOSEPAREN_TOK  */
  YYSYMBOL_COUNTER_TOK = 16,               /* COUNTER_TOK  */
  YYSYMBOL_ELSE_TOK = 17,                  /* ELSE_TOK  */
  YYSYMBOL_ENTRY_TOK = 18,                 /* ENTRY_TOK  */
  YYSYMBOL_EXIT_TOK = 19,                  /* EXIT_TOK  */
  YYSYMBOL_FPC_TOK = 20,                   /* FPC_TOK  */
  YYSYMBOL_GOTO_TOK = 21,                  /* GOTO_TOK  */
  YYSYMBOL_IF_TOK = 22,                    /* IF_TOK  */
  YYSYMBOL_JUMP_TOK = 23,                  /* JUMP_TOK  */
  YYSYMBOL_LAST_TOK = 24,                  /* LAST_TOK  */
  YYSYMBOL_MENU_TOK = 25,                  /* MENU_TOK  */
  YYSYMBOL_NEXT_TOK = 26,                  /* NEXT_TOK  */
  YYSYMBOL_OPENBRACE_TOK = 27,             /* OPENBRACE_TOK  */
  YYSYMBOL_OPENPAREN_TOK = 28,             /* OPENPAREN_TOK  */
  YYSYMBOL_PGC_TOK = 29,                   /* PGC_TOK  */
  YYSYMBOL_PREV_TOK = 30,                  /* PREV_TOK  */
  YYSYMBOL_PROGRAM_TOK = 31,               /* PROGRAM_TOK  */
  YYSYMBOL_PTT_TOK = 32,                   /* PTT_TOK  */
  YYSYMBOL_REGION_TOK = 33,                /* REGION_TOK  */
  YYSYMBOL_RESUME_TOK = 34,                /* RESUME_TOK  */
  YYSYMBOL_RND_TOK = 35,                   /* RND_TOK  */
  YYSYMBOL_ROOT_TOK = 36,                  /* ROOT_TOK  */
  YYSYMBOL_SET_TOK = 37,                   /* SET_TOK  */
  YYSYMBOL_SUBTITLE_TOK = 38,              /* SUBTITLE_TOK  */
  YYSYMBOL_TAIL_TOK = 39,                  /* TAIL_TOK  */
  YYSYMBOL_TITLE_TOK = 40,                 /* TITLE_TOK  */
  YYSYMBOL_TITLESET_TOK = 41,              /* TITLESET_TOK  */
  YYSYMBOL_TOP_TOK = 42,                   /* TOP_TOK  */
  YYSYMBOL_UP_TOK = 43,                    /* UP_TOK  */
  YYSYMBOL_VMGM_TOK = 44,                  /* VMGM_TOK  */
  YYSYMBOL__OR_TOK = 45,                   /* _OR_TOK  */
  YYSYMBOL_XOR_TOK = 46,                   /* XOR_TOK  */
  YYSYMBOL_LOR_TOK = 47,                   /* LOR_TOK  */
  YYSYMBOL_BOR_TOK = 48,                   /* BOR_TOK  */
  YYSYMBOL__AND_TOK = 49,                  /* _AND_TOK  */
  YYSYMBOL_LAND_TOK = 50,                  /* LAND_TOK  */
  YYSYMBOL_BAND_TOK = 51,                  /* BAND_TOK  */
  YYSYMBOL_NOT_TOK = 52,                   /* NOT_TOK  */
  YYSYMBOL_EQ_TOK = 53,                    /* EQ_TOK  */
  YYSYMBOL_NE_TOK = 54,                    /* NE_TOK  */
  YYSYMBOL_GE_TOK = 55,                    /* GE_TOK  */
  YYSYMBOL_GT_TOK = 56,                    /* GT_TOK  */
  YYSYMBOL_LE_TOK = 57,                    /* LE_TOK  */
  YYSYMBOL_LT_TOK = 58,                    /* LT_TOK  */
  YYSYMBOL_ADD_TOK = 59,                   /* ADD_TOK  */
  YYSYMBOL_SUB_TOK = 60,                   /* SUB_TOK  */
  YYSYMBOL_MUL_TOK = 61,                   /* MUL_TOK  */
  YYSYMBOL_DIV_TOK = 62,                   /* DIV_TOK  */
  YYSYMBOL_MOD_TOK = 63,                   /* MOD_TOK  */
  YYSYMBOL_ADDSET_TOK = 64,                /* ADDSET_TOK  */
  YYSYMBOL_SUBSET_TOK = 65,                /* SUBSET_TOK  */
  YYSYMBOL_MULSET_TOK = 66,                /* MULSET_TOK  */
  YYSYMBOL_DIVSET_TOK = 67,                /* DIVSET_TOK  */
  YYSYMBOL_MODSET_TOK = 68,                /* MODSET_TOK  */
  YYSYMBOL_ANDSET_TOK = 69,                /* ANDSET_TOK  */
  YYSYMBOL_ORSET_TOK = 70,                 /* ORSET_TOK  */
  YYSYMBOL_XORSET_TOK = 71,                /* XORSET_TOK  */
  YYSYMBOL_SEMICOLON_TOK = 72,             /* SEMICOLON_TOK  */
  YYSYMBOL_COLON_TOK = 73,                 /* COLON_TOK  */
  YYSYMBOL_ERROR_TOK = 74,                 /* ERROR_TOK  */
  YYSYMBOL_YYACCEPT = 75,                  /* $accept  */
  YYSYMBOL_finalparse = 76,                /* finalparse  */
  YYSYMBOL_statements = 77,                /* statements  */
  YYSYMBOL_statement = 78,                 /* statement  */
  YYSYMBOL_jtsl = 79,                      /* jtsl  */
  YYSYMBOL_jtml = 80,                      /* jtml  */
  YYSYMBOL_jcl = 81,                       /* jcl  */
  YYSYMBOL_jumpstatement = 82,             /* jumpstatement  */
  YYSYMBOL_resumel = 83,                   /* resumel  */
  YYSYMBOL_lastmenu = 84,                  /* lastmenu  */
  YYSYMBOL_callstatement = 85,             /* callstatement  */
  YYSYMBOL_reg = 86,                       /* reg  */
  YYSYMBOL_regornum = 87,                  /* regornum  */
  YYSYMBOL_expression = 88,                /* expression  */
  YYSYMBOL_boolexpr = 89,                  /* boolexpr  */
  YYSYMBOL_regorcounter = 90,              /* regorcounter  */
  YYSYMBOL_setstatement = 91,              /* setstatement  */
  YYSYMBOL_ifstatement = 92,               /* ifstatement  */
  YYSYMBOL_ifelsestatement = 93            /* ifelsestatement  */
};
typedef enum yysymbol_kind_t yysymbol_kind_t;




#ifdef short
# undef short
#endif

/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
   <limits.h> and (if available) <stdint.h> are included
   so that the code can choose integer types of a good width.  */

#ifndef __PTRDIFF_MAX__
# include <limits.h> /* INFRINGES ON USER NAME SPACE */
# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
#  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
#  define YY_STDINT_H
# endif
#endif

/* Narrow types that promote to a signed type and that can represent a
   signed or unsigned integer of at least N bits.  In tables they can
   save space and decrease cache pressure.  Promoting to a signed type
   helps avoid bugs in integer arithmetic.  */

#ifdef __INT_LEAST8_MAX__
typedef __INT_LEAST8_TYPE__ yytype_int8;
#elif defined YY_STDINT_H
typedef int_least8_t yytype_int8;
#else
typedef signed char yytype_int8;
#endif

#ifdef __INT_LEAST16_MAX__
typedef __INT_LEAST16_TYPE__ yytype_int16;
#elif defined YY_STDINT_H
typedef int_least16_t yytype_int16;
#else
typedef short yytype_int16;
#endif

/* Work around bug in HP-UX 11.23, which defines these macros
   incorrectly for preprocessor constants.  This workaround can likely
   be removed in 2023, as HPE has promised support for HP-UX 11.23
   (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
   <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>.  */
#ifdef __hpux
# undef UINT_LEAST8_MAX
# undef UINT_LEAST16_MAX
# define UINT_LEAST8_MAX 255
# define UINT_LEAST16_MAX 65535
#endif

#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
typedef __UINT_LEAST8_TYPE__ yytype_uint8;
#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
       && UINT_LEAST8_MAX <= INT_MAX)
typedef uint_least8_t yytype_uint8;
#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
typedef unsigned char yytype_uint8;
#else
typedef short yytype_uint8;
#endif

#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
typedef __UINT_LEAST16_TYPE__ yytype_uint16;
#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
       && UINT_LEAST16_MAX <= INT_MAX)
typedef uint_least16_t yytype_uint16;
#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
typedef unsigned short yytype_uint16;
#else
typedef int yytype_uint16;
#endif

#ifndef YYPTRDIFF_T
# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
#  define YYPTRDIFF_T __PTRDIFF_TYPE__
#  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
# elif defined PTRDIFF_MAX
#  ifndef ptrdiff_t
#   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  endif
#  define YYPTRDIFF_T ptrdiff_t
#  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
# else
#  define YYPTRDIFF_T long
#  define YYPTRDIFF_MAXIMUM LONG_MAX
# endif
#endif

#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
#  define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
#  define YYSIZE_T size_t
# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# else
#  define YYSIZE_T unsigned
# endif
#endif

#define YYSIZE_MAXIMUM                                  \
  YY_CAST (YYPTRDIFF_T,                                 \
           (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
            ? YYPTRDIFF_MAXIMUM                         \
            : YY_CAST (YYSIZE_T, -1)))

#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))


/* Stored state numbers (used for stacks). */
typedef yytype_uint8 yy_state_t;

/* State numbers in computations.  */
typedef int yy_state_fast_t;

#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
#  if ENABLE_NLS
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
#  endif
# endif
# ifndef YY_
#  define YY_(Msgid) Msgid
# endif
#endif


#ifndef YY_ATTRIBUTE_PURE
# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
#  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
# else
#  define YY_ATTRIBUTE_PURE
# endif
#endif

#ifndef YY_ATTRIBUTE_UNUSED
# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
#  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
# else
#  define YY_ATTRIBUTE_UNUSED
# endif
#endif

/* Suppress unused-variable warnings by "using" E.  */
#if ! defined lint || defined __GNUC__
# define YY_USE(E) ((void) (E))
#else
# define YY_USE(E) /* empty */
#endif

/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
#  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
    _Pragma ("GCC diagnostic push")                                     \
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
# else
#  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \
    _Pragma ("GCC diagnostic push")                                     \
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
# endif
# define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
    _Pragma ("GCC diagnostic pop")
#else
# define YY_INITIAL_VALUE(Value) Value
#endif
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
#endif
#ifndef YY_INITIAL_VALUE
# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif

#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
# define YY_IGNORE_USELESS_CAST_BEGIN                          \
    _Pragma ("GCC diagnostic push")                            \
    _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
# define YY_IGNORE_USELESS_CAST_END            \
    _Pragma ("GCC diagnostic pop")
#endif
#ifndef YY_IGNORE_USELESS_CAST_BEGIN
# define YY_IGNORE_USELESS_CAST_BEGIN
# define YY_IGNORE_USELESS_CAST_END
#endif


#define YY_ASSERT(E) ((void) (0 && (E)))

#if !defined yyoverflow

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# ifdef YYSTACK_USE_ALLOCA
#  if YYSTACK_USE_ALLOCA
#   ifdef __GNUC__
#    define YYSTACK_ALLOC __builtin_alloca
#   elif defined __BUILTIN_VA_ARG_INCR
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
#   elif defined _AIX
#    define YYSTACK_ALLOC __alloca
#   elif defined _MSC_VER
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
#    define alloca _alloca
#   else
#    define YYSTACK_ALLOC alloca
#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
#     ifndef EXIT_SUCCESS
#      define EXIT_SUCCESS 0
#     endif
#    endif
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* Pacify GCC's 'empty if-body' warning.  */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
#  ifndef YYSTACK_ALLOC_MAXIMUM
    /* The OS might guarantee only one guard page at the bottom of the stack,
       and a page size can be as small as 4096 bytes.  So we cannot safely
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
       to allow for a few compiler-allocated temporary stack slots.  */
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
#  endif
# else
#  define YYSTACK_ALLOC YYMALLOC
#  define YYSTACK_FREE YYFREE
#  ifndef YYSTACK_ALLOC_MAXIMUM
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
#  endif
#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
       && ! ((defined YYMALLOC || defined malloc) \
             && (defined YYFREE || defined free)))
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   ifndef EXIT_SUCCESS
#    define EXIT_SUCCESS 0
#   endif
#  endif
#  ifndef YYMALLOC
#   define YYMALLOC malloc
#   if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
#  ifndef YYFREE
#   define YYFREE free
#   if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
# endif
#endif /* !defined yyoverflow */

#if (! defined yyoverflow \
     && (! defined __cplusplus \
         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  yy_state_t yyss_alloc;
  YYSTYPE yyvs_alloc;
};

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
      + YYSTACK_GAP_MAXIMUM)

# define YYCOPY_NEEDED 1

/* Relocate STACK from its old location to the new one.  The
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
   elements in the stack, and YYPTR gives the new location of the
   stack.  Advance YYPTR to a properly aligned location for the next
   stack.  */
# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
    do                                                                  \
      {                                                                 \
        YYPTRDIFF_T yynewbytes;                                         \
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
        Stack = &yyptr->Stack_alloc;                                    \
        yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
        yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
      }                                                                 \
    while (0)

#endif

#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from SRC to DST.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if defined __GNUC__ && 1 < __GNUC__
#   define YYCOPY(Dst, Src, Count) \
      __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
#  else
#   define YYCOPY(Dst, Src, Count)              \
      do                                        \
        {                                       \
          YYPTRDIFF_T yyi;                      \
          for (yyi = 0; yyi < (Count); yyi++)   \
            (Dst)[yyi] = (Src)[yyi];            \
        }                                       \
      while (0)
#  endif
# endif
#endif /* !YYCOPY_NEEDED */

/* YYFINAL -- State number of the termination state.  */
#define YYFINAL  46
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   394

/* YYNTOKENS -- Number of terminals.  */
#define YYNTOKENS  75
/* YYNNTS -- Number of nonterminals.  */
#define YYNNTS  19
/* YYNRULES -- Number of rules.  */
#define YYNRULES  98
/* YYNSTATES -- Number of states.  */
#define YYNSTATES  194

/* YYMAXUTOK -- Last valid token kind.  */
#define YYMAXUTOK   329


/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
   as returned by yylex, with out-of-bounds checking.  */
#define YYTRANSLATE(YYX)                                \
  (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
   ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
   : YYSYMBOL_YYUNDEF)

/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
   as returned by yylex.  */
static const yytype_int8 yytranslate[] =
{
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
      65,    66,    67,    68,    69,    70,    71,    72,    73,    74
};

#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
static const yytype_int16 yyrline[] =
{
       0,   103,   103,   108,   111,   117,   120,   123,   127,   132,
     137,   142,   146,   149,   152,   157,   160,   163,   168,   171,
     174,   177,   180,   183,   186,   189,   192,   195,   198,   203,
     206,   211,   218,   223,   228,   233,   238,   243,   248,   253,
     258,   263,   268,   273,   278,   283,   290,   293,   298,   301,
     306,   317,   320,   323,   326,   329,   332,   335,   340,   343,
     348,   351,   356,   359,   362,   365,   368,   371,   374,   377,
     380,   383,   386,   393,   396,   399,   402,   405,   408,   411,
     414,   417,   420,   423,   426,   433,   436,   441,   447,   450,
     453,   456,   459,   462,   465,   468,   473,   483,   486
};
#endif

/** Accessing symbol of state STATE.  */
#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])

#if YYDEBUG || 0
/* The user-facing name of the symbol whose (internal) number is
   YYSYMBOL.  No bounds checking.  */
static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;

/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
static const char *const yytname[] =
{
  "\"end of file\"", "error", "\"invalid token\"", "NUM_TOK", "G_TOK",
  "S_TOK", "ID_TOK", "ANGLE_TOK", "AUDIO_TOK", "BREAK_TOK", "BUTTON_TOK",
  "CALL_TOK", "CELL_TOK", "CHAPTER_TOK", "CLOSEBRACE_TOK",
  "CLOSEPAREN_TOK", "COUNTER_TOK", "ELSE_TOK", "ENTRY_TOK", "EXIT_TOK",
  "FPC_TOK", "GOTO_TOK", "IF_TOK", "JUMP_TOK", "LAST_TOK", "MENU_TOK",
  "NEXT_TOK", "OPENBRACE_TOK", "OPENPAREN_TOK", "PGC_TOK", "PREV_TOK",
  "PROGRAM_TOK", "PTT_TOK", "REGION_TOK", "RESUME_TOK", "RND_TOK",
  "ROOT_TOK", "SET_TOK", "SUBTITLE_TOK", "TAIL_TOK", "TITLE_TOK",
  "TITLESET_TOK", "TOP_TOK", "UP_TOK", "VMGM_TOK", "_OR_TOK", "XOR_TOK",
  "LOR_TOK", "BOR_TOK", "_AND_TOK", "LAND_TOK", "BAND_TOK", "NOT_TOK",
  "EQ_TOK", "NE_TOK", "GE_TOK", "GT_TOK", "LE_TOK", "LT_TOK", "ADD_TOK",
  "SUB_TOK", "MUL_TOK", "DIV_TOK", "MOD_TOK", "ADDSET_TOK", "SUBSET_TOK",
  "MULSET_TOK", "DIVSET_TOK", "MODSET_TOK", "ANDSET_TOK", "ORSET_TOK",
  "XORSET_TOK", "SEMICOLON_TOK", "COLON_TOK", "ERROR_TOK", "$accept",
  "finalparse", "statements", "statement", "jtsl", "jtml", "jcl",
  "jumpstatement", "resumel", "lastmenu", "callstatement", "reg",
  "regornum", "expression", "boolexpr", "regorcounter", "setstatement",
  "ifstatement", "ifelsestatement", YY_NULLPTR
};

static const char *
yysymbol_name (yysymbol_kind_t yysymbol)
{
  return yytname[yysymbol];
}
#endif

#define YYPACT_NINF (-55)

#define yypact_value_is_default(Yyn) \
  ((Yyn) == YYPACT_NINF)

#define YYTABLE_NINF (-1)

#define yytable_value_is_error(Yyn) \
  0

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
static const yytype_int16 yypact[] =
{
     170,   -55,   -55,   -54,   -55,   -55,   -45,   -55,   -13,    25,
     -34,    34,    14,   176,   170,   -55,   -26,   -55,    53,   -55,
     170,   -55,   -55,   318,    23,   -55,    71,   -55,   -55,   -55,
      88,   -55,    -3,   -55,   -55,    33,    82,     7,     4,    13,
       3,     9,    73,    -3,    90,   -55,   -55,   -55,    93,    93,
      93,    93,    93,    93,    93,    93,    93,   170,   -55,   -55,
      21,   105,   100,   -55,   -55,    82,    78,    82,   -55,   -55,
     294,    -2,    42,    44,    47,    50,    51,    55,    64,    81,
      85,    95,    96,   111,   112,   113,   100,   -55,    93,   150,
     178,   185,   207,   214,   236,   243,   265,   272,   -55,   -55,
      18,   -55,   147,   126,    84,    62,    93,   -55,    93,    93,
      93,    93,    93,    93,    93,    93,    93,    93,    93,    93,
      93,    93,    93,    93,   170,    82,    82,    82,    82,   -55,
     -55,   -55,   -55,   -55,   -55,   -55,   -55,   -55,   -55,   -55,
     -55,   -55,   -55,   115,   103,   -55,   -55,   -55,   -55,   -55,
     -55,   -55,   -55,   -55,   -55,   -55,   -55,   -55,   -55,   -55,
     -55,   179,   166,   -55,   -55,   110,   317,   317,   317,   331,
     331,   312,   312,   312,   312,   312,   312,    32,    32,   -55,
     -55,   -55,   -55,    30,    30,   -55,   -55,   -55,   -55,   169,
     128,   -55,   -55,   -55
};

/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
   Performed when YYTABLE does not specify something else to do.  Zero
   means the default is an error.  */
static const yytype_int8 yydefact[] =
{
       0,    51,    52,     0,    55,    53,     0,    56,    17,     0,
       0,     0,     0,    17,     0,    57,     0,    54,     0,     2,
       3,     5,     6,    85,     0,    12,    97,    14,    10,    11,
       0,    16,    28,    86,     7,     0,     0,     0,     0,     0,
       0,     0,     0,    28,     0,     8,     1,     4,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,    15,    26,
      19,     0,    30,     9,    59,     0,     0,     0,    58,    61,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,    30,    13,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,    98,    18,
       0,    27,     0,    47,     0,     0,     0,    84,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,    33,
      35,    36,    42,    39,    32,    45,    41,    37,    43,    40,
      34,    38,    44,     0,     0,    88,    89,    90,    91,    92,
      93,    94,    95,    87,    24,    23,    25,    21,    22,    20,
      29,     0,    49,    60,    73,     0,    70,    71,    68,    69,
      67,    74,    75,    76,    77,    78,    79,    62,    63,    64,
      65,    66,    96,    82,    80,    83,    81,    31,    46,     0,
       0,    72,    48,    50
};

/* YYPGOTO[NTERM-NUM].  */
static const yytype_int16 yypgoto[] =
{
     -55,   -55,    16,   -46,   201,   172,   130,   -55,   -55,   -55,
     -55,     0,   -55,   -47,   -44,   -55,   -55,   -55,   -55
};

/* YYDEFGOTO[NTERM-NUM].  */
static const yytype_uint8 yydefgoto[] =
{
       0,    18,    19,    20,    32,    62,   103,    21,   162,   190,
      22,    68,    69,    70,    71,    24,    25,    26,    27
};

/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
   positive, shift that token.  If negative, reduce the rule whose
   number is the opposite.  If YYTABLE_NINF, syntax error.  */
static const yytype_uint8 yytable[] =
{
      23,    89,    90,    91,    92,    93,    94,    95,    96,    97,
      72,    98,    83,   124,    23,    80,    74,    59,   104,    28,
      23,   105,    60,   107,    99,   154,   155,    29,    30,    33,
      44,    31,    81,    75,    82,    76,    47,    61,    34,   100,
      35,   144,    36,   125,    77,   126,    45,   127,   128,    73,
     156,    84,    78,    46,   157,    79,   158,    23,   159,   165,
      56,   166,   167,   168,   169,   170,   171,   172,   173,   174,
     175,   176,   177,   178,   179,   180,   181,   164,   182,   127,
     128,   183,   184,   185,   186,    64,     1,     2,    57,     4,
       5,    58,     7,   121,   122,   123,    64,     1,     2,   163,
       4,     5,    85,     7,    87,    63,   106,   125,   101,   126,
      65,   127,   128,   102,   129,    15,   130,    66,   163,   131,
      17,    88,   132,   133,    23,   191,    15,   134,    66,   108,
     109,    17,   110,   111,    67,   112,   135,   113,   114,   115,
     116,   117,   118,   119,   120,   121,   122,   123,   108,   109,
     160,   110,   111,   136,   112,   108,   109,   137,   110,   111,
     161,   112,   119,   120,   121,   122,   123,   138,   139,   119,
     120,   121,   122,   123,     1,     2,     3,     4,     5,     6,
       7,     8,   188,   140,   141,   142,     9,   187,    37,    10,
     189,    11,    12,    13,   192,   108,   109,    14,   110,   111,
     193,   112,    38,    15,    16,    39,    40,    41,    17,   119,
     120,   121,   122,   123,    43,    86,   143,    30,     0,    42,
      31,     0,   145,   108,   109,     0,   110,   111,     0,   112,
     108,   109,     0,   110,   111,     0,   112,   119,   120,   121,
     122,   123,     0,     0,   119,   120,   121,   122,   123,     0,
     146,     0,   108,   109,     0,   110,   111,   147,   112,   108,
     109,     0,   110,   111,     0,   112,   119,   120,   121,   122,
     123,     0,     0,   119,   120,   121,   122,   123,     0,   148,
       0,   108,   109,     0,   110,   111,   149,   112,   108,   109,
       0,   110,   111,     0,   112,   119,   120,   121,   122,   123,
       0,     0,   119,   120,   121,   122,   123,     0,   150,     0,
     108,   109,     0,   110,   111,   151,   112,   108,   109,     0,
     110,   111,     0,   112,   119,   120,   121,   122,   123,     0,
       0,   119,   120,   121,   122,   123,     0,   152,     0,   108,
     109,     0,   110,   111,   153,   112,     0,   113,   114,   115,
     116,   117,   118,   119,   120,   121,   122,   123,   109,     0,
     110,     0,     0,   112,     0,     0,   111,     0,   112,     0,
       0,   119,   120,   121,   122,   123,   119,   120,   121,   122,
     123,     0,    48,    49,    50,    51,    52,    53,    54,    55,
     119,   120,   121,   122,   123
};

static const yytype_int16 yycheck[] =
{
       0,    48,    49,    50,    51,    52,    53,    54,    55,    56,
       3,    57,     3,    15,    14,    12,    12,    20,    65,    73,
      20,    65,    25,    67,     3,     7,     8,    72,    41,     4,
      14,    44,    29,    29,    31,    31,    20,    40,    72,    18,
       6,    88,    28,    45,    40,    47,    72,    49,    50,    42,
      32,    42,    39,     0,    36,    42,    38,    57,    40,   106,
      37,   108,   109,   110,   111,   112,   113,   114,   115,   116,
     117,   118,   119,   120,   121,   122,   123,    15,   124,    49,
      50,   125,   126,   127,   128,     3,     4,     5,    17,     7,
       8,     3,    10,    61,    62,    63,     3,     4,     5,    15,
       7,     8,    29,    10,    14,    72,    28,    45,     3,    47,
      28,    49,    50,    13,    72,    33,    72,    35,    15,    72,
      38,    28,    72,    72,   124,    15,    33,    72,    35,    45,
      46,    38,    48,    49,    52,    51,    72,    53,    54,    55,
      56,    57,    58,    59,    60,    61,    62,    63,    45,    46,
       3,    48,    49,    72,    51,    45,    46,    72,    48,    49,
      34,    51,    59,    60,    61,    62,    63,    72,    72,    59,
      60,    61,    62,    63,     4,     5,     6,     7,     8,     9,
      10,    11,     3,    72,    72,    72,    16,    72,    12,    19,
      24,    21,    22,    23,    25,    45,    46,    27,    48,    49,
      72,    51,    26,    33,    34,    29,    30,    31,    38,    59,
      60,    61,    62,    63,    13,    43,    86,    41,    -1,    43,
      44,    -1,    72,    45,    46,    -1,    48,    49,    -1,    51,
      45,    46,    -1,    48,    49,    -1,    51,    59,    60,    61,
      62,    63,    -1,    -1,    59,    60,    61,    62,    63,    -1,
      72,    -1,    45,    46,    -1,    48,    49,    72,    51,    45,
      46,    -1,    48,    49,    -1,    51,    59,    60,    61,    62,
      63,    -1,    -1,    59,    60,    61,    62,    63,    -1,    72,
      -1,    45,    46,    -1,    48,    49,    72,    51,    45,    46,
      -1,    48,    49,    -1,    51,    59,    60,    61,    62,    63,
      -1,    -1,    59,    60,    61,    62,    63,    -1,    72,    -1,
      45,    46,    -1,    48,    49,    72,    51,    45,    46,    -1,
      48,    49,    -1,    51,    59,    60,    61,    62,    63,    -1,
      -1,    59,    60,    61,    62,    63,    -1,    72,    -1,    45,
      46,    -1,    48,    49,    72,    51,    -1,    53,    54,    55,
      56,    57,    58,    59,    60,    61,    62,    63,    46,    -1,
      48,    -1,    -1,    51,    -1,    -1,    49,    -1,    51,    -1,
      -1,    59,    60,    61,    62,    63,    59,    60,    61,    62,
      63,    -1,    64,    65,    66,    67,    68,    69,    70,    71,
      59,    60,    61,    62,    63
};

/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
   state STATE-NUM.  */
static const yytype_int8 yystos[] =
{
       0,     4,     5,     6,     7,     8,     9,    10,    11,    16,
      19,    21,    22,    23,    27,    33,    34,    38,    76,    77,
      78,    82,    85,    86,    90,    91,    92,    93,    73,    72,
      41,    44,    79,     4,    72,     6,    28,    12,    26,    29,
      30,    31,    43,    79,    77,    72,     0,    77,    64,    65,
      66,    67,    68,    69,    70,    71,    37,    17,     3,    20,
      25,    40,    80,    72,     3,    28,    35,    52,    86,    87,
      88,    89,     3,    42,    12,    29,    31,    40,    39,    42,
      12,    29,    31,     3,    42,    29,    80,    14,    28,    88,
      88,    88,    88,    88,    88,    88,    88,    88,    78,     3,
      18,     3,    13,    81,    88,    89,    28,    89,    45,    46,
      48,    49,    51,    53,    54,    55,    56,    57,    58,    59,
      60,    61,    62,    63,    15,    45,    47,    49,    50,    72,
      72,    72,    72,    72,    72,    72,    72,    72,    72,    72,
      72,    72,    72,    81,    88,    72,    72,    72,    72,    72,
      72,    72,    72,    72,     7,     8,    32,    36,    38,    40,
       3,    34,    83,    15,    15,    88,    88,    88,    88,    88,
      88,    88,    88,    88,    88,    88,    88,    88,    88,    88,
      88,    88,    78,    89,    89,    89,    89,    72,     3,    24,
      84,    15,    25,    72
};

/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.  */
static const yytype_int8 yyr1[] =
{
       0,    75,    76,    77,    77,    78,    78,    78,    78,    78,
      78,    78,    78,    78,    78,    79,    79,    79,    80,    80,
      80,    80,    80,    80,    80,    80,    80,    80,    80,    81,
      81,    82,    82,    82,    82,    82,    82,    82,    82,    82,
      82,    82,    82,    82,    82,    82,    83,    83,    84,    84,
      85,    86,    86,    86,    86,    86,    86,    86,    87,    87,
      88,    88,    88,    88,    88,    88,    88,    88,    88,    88,
      88,    88,    88,    89,    89,    89,    89,    89,    89,    89,
      89,    89,    89,    89,    89,    90,    90,    91,    91,    91,
      91,    91,    91,    91,    91,    91,    92,    93,    93
};

/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.  */
static const yytype_int8 yyr2[] =
{
       0,     2,     1,     1,     2,     1,     1,     2,     2,     3,
       2,     2,     1,     3,     1,     2,     1,     0,     2,     1,
       3,     3,     3,     3,     3,     3,     1,     2,     0,     2,
       0,     5,     4,     4,     4,     4,     4,     4,     4,     4,
       4,     4,     4,     4,     4,     4,     2,     0,     2,     0,
       7,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       3,     1,     3,     3,     3,     3,     3,     3,     3,     3,
       3,     3,     4,     3,     3,     3,     3,     3,     3,     3,
       3,     3,     3,     3,     2,     1,     2,     4,     4,     4,
       4,     4,     4,     4,     4,     4,     5,     1,     3
};


enum { YYENOMEM = -2 };

#define yyerrok         (yyerrstatus = 0)
#define yyclearin       (yychar = YYEMPTY)

#define YYACCEPT        goto yyacceptlab
#define YYABORT         goto yyabortlab
#define YYERROR         goto yyerrorlab
#define YYNOMEM         goto yyexhaustedlab


#define YYRECOVERING()  (!!yyerrstatus)

#define YYBACKUP(Token, Value)                                    \
  do                                                              \
    if (yychar == YYEMPTY)                                        \
      {                                                           \
        yychar = (Token);                                         \
        yylval = (Value);                                         \
        YYPOPSTACK (yylen);                                       \
        yystate = *yyssp;                                         \
        goto yybackup;                                            \
      }                                                           \
    else                                                          \
      {                                                           \
        yyerror (YY_("syntax error: cannot back up")); \
        YYERROR;                                                  \
      }                                                           \
  while (0)

/* Backward compatibility with an undocumented macro.
   Use YYerror or YYUNDEF. */
#define YYERRCODE YYUNDEF


/* Enable debugging if requested.  */
#if YYDEBUG

# ifndef YYFPRINTF
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
#  define YYFPRINTF fprintf
# endif

# define YYDPRINTF(Args)                        \
do {                                            \
  if (yydebug)                                  \
    YYFPRINTF Args;                             \
} while (0)




# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
do {                                                                      \
  if (yydebug)                                                            \
    {                                                                     \
      YYFPRINTF (stderr, "%s ", Title);                                   \
      yy_symbol_print (stderr,                                            \
                  Kind, Value); \
      YYFPRINTF (stderr, "\n");                                           \
    }                                                                     \
} while (0)


/*-----------------------------------.
| Print this symbol's value on YYO.  |
`-----------------------------------*/

static void
yy_symbol_value_print (FILE *yyo,
                       yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
{
  FILE *yyoutput = yyo;
  YY_USE (yyoutput);
  if (!yyvaluep)
    return;
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  YY_USE (yykind);
  YY_IGNORE_MAYBE_UNINITIALIZED_END
}


/*---------------------------.
| Print this symbol on YYO.  |
`---------------------------*/

static void
yy_symbol_print (FILE *yyo,
                 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
{
  YYFPRINTF (yyo, "%s %s (",
             yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));

  yy_symbol_value_print (yyo, yykind, yyvaluep);
  YYFPRINTF (yyo, ")");
}

/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included).                                                   |
`------------------------------------------------------------------*/

static void
yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
{
  YYFPRINTF (stderr, "Stack now");
  for (; yybottom <= yytop; yybottom++)
    {
      int yybot = *yybottom;
      YYFPRINTF (stderr, " %d", yybot);
    }
  YYFPRINTF (stderr, "\n");
}

# define YY_STACK_PRINT(Bottom, Top)                            \
do {                                                            \
  if (yydebug)                                                  \
    yy_stack_print ((Bottom), (Top));                           \
} while (0)


/*------------------------------------------------.
| Report that the YYRULE is going to be reduced.  |
`------------------------------------------------*/

static void
yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
                 int yyrule)
{
  int yylno = yyrline[yyrule];
  int yynrhs = yyr2[yyrule];
  int yyi;
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
             yyrule - 1, yylno);
  /* The symbols being reduced.  */
  for (yyi = 0; yyi < yynrhs; yyi++)
    {
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
      yy_symbol_print (stderr,
                       YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
                       &yyvsp[(yyi + 1) - (yynrhs)]);
      YYFPRINTF (stderr, "\n");
    }
}

# define YY_REDUCE_PRINT(Rule)          \
do {                                    \
  if (yydebug)                          \
    yy_reduce_print (yyssp, yyvsp, Rule); \
} while (0)

/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args) ((void) 0)
# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */


/* YYINITDEPTH -- initial size of the parser's stacks.  */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif

/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
   if the built-in stack extension method is used).

   Do not make this value too large; the results are undefined if
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
   evaluated with infinite-precision integer arithmetic.  */

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif






/*-----------------------------------------------.
| Release the memory associated to this symbol.  |
`-----------------------------------------------*/

static void
yydestruct (const char *yymsg,
            yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
{
  YY_USE (yyvaluep);
  if (!yymsg)
    yymsg = "Deleting";
  YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  YY_USE (yykind);
  YY_IGNORE_MAYBE_UNINITIALIZED_END
}


/* Lookahead token kind.  */
int yychar;

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;
/* Number of syntax errors so far.  */
int yynerrs;




/*----------.
| yyparse.  |
`----------*/

int
yyparse (void)
{
    yy_state_fast_t yystate = 0;
    /* Number of tokens to shift before error messages enabled.  */
    int yyerrstatus = 0;

    /* Refer to the stacks through separate pointers, to allow yyoverflow
       to reallocate them elsewhere.  */

    /* Their size.  */
    YYPTRDIFF_T yystacksize = YYINITDEPTH;

    /* The state stack: array, bottom, top.  */
    yy_state_t yyssa[YYINITDEPTH];
    yy_state_t *yyss = yyssa;
    yy_state_t *yyssp = yyss;

    /* The semantic value stack: array, bottom, top.  */
    YYSTYPE yyvsa[YYINITDEPTH];
    YYSTYPE *yyvs = yyvsa;
    YYSTYPE *yyvsp = yyvs;

  int yyn;
  /* The return value of yyparse.  */
  int yyresult;
  /* Lookahead symbol kind.  */
  yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;



#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))

  /* The number of symbols on the RHS of the reduced rule.
     Keep to zero when no symbol should be popped.  */
  int yylen = 0;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yychar = YYEMPTY; /* Cause a token to be read.  */

  goto yysetstate;


/*------------------------------------------------------------.
| yynewstate -- push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
yynewstate:
  /* In all cases, when you get here, the value and location stacks
     have just been pushed.  So pushing a state here evens the stacks.  */
  yyssp++;


/*--------------------------------------------------------------------.
| yysetstate -- set current state (the top of the stack) to yystate.  |
`--------------------------------------------------------------------*/
yysetstate:
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
  YY_IGNORE_USELESS_CAST_BEGIN
  *yyssp = YY_CAST (yy_state_t, yystate);
  YY_IGNORE_USELESS_CAST_END
  YY_STACK_PRINT (yyss, yyssp);

  if (yyss + yystacksize - 1 <= yyssp)
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
    YYNOMEM;
#else
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYPTRDIFF_T yysize = yyssp - yyss + 1;

# if defined yyoverflow
      {
        /* Give user a chance to reallocate the stack.  Use copies of
           these so that the &'s don't force the real ones into
           memory.  */
        yy_state_t *yyss1 = yyss;
        YYSTYPE *yyvs1 = yyvs;

        /* Each stack pointer address is followed by the size of the
           data in use in that stack, in bytes.  This used to be a
           conditional around just the two extra args, but that might
           be undefined if yyoverflow is a macro.  */
        yyoverflow (YY_("memory exhausted"),
                    &yyss1, yysize * YYSIZEOF (*yyssp),
                    &yyvs1, yysize * YYSIZEOF (*yyvsp),
                    &yystacksize);
        yyss = yyss1;
        yyvs = yyvs1;
      }
# else /* defined YYSTACK_RELOCATE */
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
        YYNOMEM;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
        yystacksize = YYMAXDEPTH;

      {
        yy_state_t *yyss1 = yyss;
        union yyalloc *yyptr =
          YY_CAST (union yyalloc *,
                   YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
        if (! yyptr)
          YYNOMEM;
        YYSTACK_RELOCATE (yyss_alloc, yyss);
        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#  undef YYSTACK_RELOCATE
        if (yyss1 != yyssa)
          YYSTACK_FREE (yyss1);
      }
# endif

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;

      YY_IGNORE_USELESS_CAST_BEGIN
      YYDPRINTF ((stderr, "Stack size increased to %ld\n",
                  YY_CAST (long, yystacksize)));
      YY_IGNORE_USELESS_CAST_END

      if (yyss + yystacksize - 1 <= yyssp)
        YYABORT;
    }
#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */


  if (yystate == YYFINAL)
    YYACCEPT;

  goto yybackup;


/*-----------.
| yybackup.  |
`-----------*/
yybackup:
  /* Do appropriate processing given the current state.  Read a
     lookahead token if we need one and don't already have one.  */

  /* First try to decide what to do without reference to lookahead token.  */
  yyn = yypact[yystate];
  if (yypact_value_is_default (yyn))
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* YYCHAR is either empty, or end-of-input, or a valid lookahead.  */
  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token\n"));
      yychar = yylex ();
    }

  if (yychar <= YYEOF)
    {
      yychar = YYEOF;
      yytoken = YYSYMBOL_YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else if (yychar == YYerror)
    {
      /* The scanner already issued an error message, process directly
         to error recovery.  But do not keep the error token as
         lookahead, it is too special and may lead us to an endless
         loop in error recovery. */
      yychar = YYUNDEF;
      yytoken = YYSYMBOL_YYerror;
      goto yyerrlab1;
    }
  else
    {
      yytoken = YYTRANSLATE (yychar);
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
    }

  /* If the proper action on seeing token YYTOKEN is to reduce or to
     detect an error, take that action.  */
  yyn += yytoken;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    goto yydefault;
  yyn = yytable[yyn];
  if (yyn <= 0)
    {
      if (yytable_value_is_error (yyn))
        goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;

  /* Shift the lookahead token.  */
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  yystate = yyn;
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END

  /* Discard the shifted token.  */
  yychar = YYEMPTY;
  goto yynewstate;


/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
  goto yyreduce;


/*-----------------------------.
| yyreduce -- do a reduction.  |
`-----------------------------*/
yyreduce:
  /* yyn is the number of a rule to reduce with.  */
  yylen = yyr2[yyn];

  /* If YYLEN is nonzero, implement the default value of the action:
     '$$ = $1'.

     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];


  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
  case 2: /* finalparse: statements  */
#line 103 "dvdvmy.y"
                       {
    dvd_vm_parsed_cmd=(yyval.statement);
}
#line 1362 "dvdvmy.c"
    break;

  case 3: /* statements: statement  */
#line 108 "dvdvmy.y"
                      {
    (yyval.statement)=(yyvsp[0].statement);
}
#line 1370 "dvdvmy.c"
    break;

  case 4: /* statements: statement statements  */
#line 111 "dvdvmy.y"
                       {
    (yyval.statement)=(yyvsp[-1].statement);
    (yyval.statement)->next=(yyvsp[0].statement);
}
#line 1379 "dvdvmy.c"
    break;

  case 5: /* statement: jumpstatement  */
#line 117 "dvdvmy.y"
                         {
    (yyval.statement)=(yyvsp[0].statement);
}
#line 1387 "dvdvmy.c"
    break;

  case 6: /* statement: callstatement  */
#line 120 "dvdvmy.y"
                {
    (yyval.statement)=(yyvsp[0].statement);
}
#line 1395 "dvdvmy.c"
    break;

  case 7: /* statement: EXIT_TOK SEMICOLON_TOK  */
#line 123 "dvdvmy.y"
                         {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_EXIT;
}
#line 1404 "dvdvmy.c"
    break;

  case 8: /* statement: RESUME_TOK SEMICOLON_TOK  */
#line 127 "dvdvmy.y"
                           {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_LINK;
    (yyval.statement)->i1=16;
}
#line 1414 "dvdvmy.c"
    break;

  case 9: /* statement: GOTO_TOK ID_TOK SEMICOLON_TOK  */
#line 132 "dvdvmy.y"
                                {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_GOTO;
    (yyval.statement)->s1=(yyvsp[-1].str_val);
}
#line 1424 "dvdvmy.c"
    break;

  case 10: /* statement: ID_TOK COLON_TOK  */
#line 137 "dvdvmy.y"
                   {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_LABEL;
    (yyval.statement)->s1=(yyvsp[-1].str_val);
}
#line 1434 "dvdvmy.c"
    break;

  case 11: /* statement: BREAK_TOK SEMICOLON_TOK  */
#line 142 "dvdvmy.y"
                          {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_BREAK;
}
#line 1443 "dvdvmy.c"
    break;

  case 12: /* statement: setstatement  */
#line 146 "dvdvmy.y"
               {
    (yyval.statement)=(yyvsp[0].statement);
}
#line 1451 "dvdvmy.c"
    break;

  case 13: /* statement: OPENBRACE_TOK statements CLOSEBRACE_TOK  */
#line 149 "dvdvmy.y"
                                          {
    (yyval.statement)=(yyvsp[-1].statement);
}
#line 1459 "dvdvmy.c"
    break;

  case 14: /* statement: ifelsestatement  */
#line 152 "dvdvmy.y"
                  {
    (yyval.statement)=(yyvsp[0].statement);
}
#line 1467 "dvdvmy.c"
    break;

  case 15: /* jtsl: TITLESET_TOK NUM_TOK  */
#line 157 "dvdvmy.y"
                           {
    (yyval.int_val)=((yyvsp[0].int_val))+1;
}
#line 1475 "dvdvmy.c"
    break;

  case 16: /* jtsl: VMGM_TOK  */
#line 160 "dvdvmy.y"
           {
    (yyval.int_val)=1;
}
#line 1483 "dvdvmy.c"
    break;

  case 17: /* jtsl: %empty  */
#line 163 "dvdvmy.y"
  {
    (yyval.int_val)=0;
}
#line 1491 "dvdvmy.c"
    break;

  case 18: /* jtml: MENU_TOK NUM_TOK  */
#line 168 "dvdvmy.y"
                       {
    (yyval.int_val)=(yyvsp[0].int_val);
}
#line 1499 "dvdvmy.c"
    break;

  case 19: /* jtml: MENU_TOK  */
#line 171 "dvdvmy.y"
           {
    (yyval.int_val)=120; // default entry
}
#line 1507 "dvdvmy.c"
    break;

  case 20: /* jtml: MENU_TOK ENTRY_TOK TITLE_TOK  */
#line 174 "dvdvmy.y"
                               {
    (yyval.int_val)=122;
}
#line 1515 "dvdvmy.c"
    break;

  case 21: /* jtml: MENU_TOK ENTRY_TOK ROOT_TOK  */
#line 177 "dvdvmy.y"
                              {
    (yyval.int_val)=123;
}
#line 1523 "dvdvmy.c"
    break;

  case 22: /* jtml: MENU_TOK ENTRY_TOK SUBTITLE_TOK  */
#line 180 "dvdvmy.y"
                                  {
    (yyval.int_val)=124;
}
#line 1531 "dvdvmy.c"
    break;

  case 23: /* jtml: MENU_TOK ENTRY_TOK AUDIO_TOK  */
#line 183 "dvdvmy.y"
                               {
    (yyval.int_val)=125;
}
#line 1539 "dvdvmy.c"
    break;

  case 24: /* jtml: MENU_TOK ENTRY_TOK ANGLE_TOK  */
#line 186 "dvdvmy.y"
                               {
    (yyval.int_val)=126;
}
#line 1547 "dvdvmy.c"
    break;

  case 25: /* jtml: MENU_TOK ENTRY_TOK PTT_TOK  */
#line 189 "dvdvmy.y"
                             {
    (yyval.int_val)=127;
}
#line 1555 "dvdvmy.c"
    break;

  case 26: /* jtml: FPC_TOK  */
#line 192 "dvdvmy.y"
          {
    (yyval.int_val)=121;
}
#line 1563 "dvdvmy.c"
    break;

  case 27: /* jtml: TITLE_TOK NUM_TOK  */
#line 195 "dvdvmy.y"
                    {
    (yyval.int_val)=((yyvsp[0].int_val))|128;
}
#line 1571 "dvdvmy.c"
    break;

  case 28: /* jtml: %empty  */
#line 198 "dvdvmy.y"
  {
    (yyval.int_val)=0;
}
#line 1579 "dvdvmy.c"
    break;

  case 29: /* jcl: CHAPTER_TOK NUM_TOK  */
#line 203 "dvdvmy.y"
                         {
    (yyval.int_val)=(yyvsp[0].int_val);
}
#line 1587 "dvdvmy.c"
    break;

  case 30: /* jcl: %empty  */
#line 206 "dvdvmy.y"
  {
    (yyval.int_val)=0;
}
#line 1595 "dvdvmy.c"
    break;

  case 31: /* jumpstatement: JUMP_TOK jtsl jtml jcl SEMICOLON_TOK  */
#line 211 "dvdvmy.y"
                                                    {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_JUMP;
    (yyval.statement)->i1=(yyvsp[-3].int_val);
    (yyval.statement)->i2=(yyvsp[-2].int_val);
    (yyval.statement)->i3=(yyvsp[-1].int_val);
}
#line 1607 "dvdvmy.c"
    break;

  case 32: /* jumpstatement: JUMP_TOK NEXT_TOK TITLE_TOK SEMICOLON_TOK  */
#line 218 "dvdvmy.y"
                                            {  // "jump next title;" will be replaced in DVD::SaveDVDAuthor()
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_LINK;
    (yyval.statement)->i1=20;
}
#line 1617 "dvdvmy.c"
    break;

  case 33: /* jumpstatement: JUMP_TOK CELL_TOK NUM_TOK SEMICOLON_TOK  */
#line 223 "dvdvmy.y"
                                          {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_JUMP;
    (yyval.statement)->i3=2*65536+(yyvsp[-1].int_val);
}
#line 1627 "dvdvmy.c"
    break;

  case 34: /* jumpstatement: JUMP_TOK PROGRAM_TOK NUM_TOK SEMICOLON_TOK  */
#line 228 "dvdvmy.y"
                                             {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_JUMP;
    (yyval.statement)->i3=65536+(yyvsp[-1].int_val);
}
#line 1637 "dvdvmy.c"
    break;

  case 35: /* jumpstatement: JUMP_TOK CELL_TOK TOP_TOK SEMICOLON_TOK  */
#line 233 "dvdvmy.y"
                                          {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_LINK;
    (yyval.statement)->i1=1;
}
#line 1647 "dvdvmy.c"
    break;

  case 36: /* jumpstatement: JUMP_TOK NEXT_TOK CELL_TOK SEMICOLON_TOK  */
#line 238 "dvdvmy.y"
                                           {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_LINK;
    (yyval.statement)->i1=2;
}
#line 1657 "dvdvmy.c"
    break;

  case 37: /* jumpstatement: JUMP_TOK PREV_TOK CELL_TOK SEMICOLON_TOK  */
#line 243 "dvdvmy.y"
                                           {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_LINK;
    (yyval.statement)->i1=3;
}
#line 1667 "dvdvmy.c"
    break;

  case 38: /* jumpstatement: JUMP_TOK PROGRAM_TOK TOP_TOK SEMICOLON_TOK  */
#line 248 "dvdvmy.y"
                                             {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_LINK;
    (yyval.statement)->i1=5;
}
#line 1677 "dvdvmy.c"
    break;

  case 39: /* jumpstatement: JUMP_TOK NEXT_TOK PROGRAM_TOK SEMICOLON_TOK  */
#line 253 "dvdvmy.y"
                                              {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_LINK;
    (yyval.statement)->i1=6;
}
#line 1687 "dvdvmy.c"
    break;

  case 40: /* jumpstatement: JUMP_TOK PREV_TOK PROGRAM_TOK SEMICOLON_TOK  */
#line 258 "dvdvmy.y"
                                              {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_LINK;
    (yyval.statement)->i1=7;
}
#line 1697 "dvdvmy.c"
    break;

  case 41: /* jumpstatement: JUMP_TOK PGC_TOK TOP_TOK SEMICOLON_TOK  */
#line 263 "dvdvmy.y"
                                         {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_LINK;
    (yyval.statement)->i1=9;
}
#line 1707 "dvdvmy.c"
    break;

  case 42: /* jumpstatement: JUMP_TOK NEXT_TOK PGC_TOK SEMICOLON_TOK  */
#line 268 "dvdvmy.y"
                                          {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_LINK;
    (yyval.statement)->i1=10;
}
#line 1717 "dvdvmy.c"
    break;

  case 43: /* jumpstatement: JUMP_TOK PREV_TOK PGC_TOK SEMICOLON_TOK  */
#line 273 "dvdvmy.y"
                                          {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_LINK;
    (yyval.statement)->i1=11;
}
#line 1727 "dvdvmy.c"
    break;

  case 44: /* jumpstatement: JUMP_TOK UP_TOK PGC_TOK SEMICOLON_TOK  */
#line 278 "dvdvmy.y"
                                        {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_LINK;
    (yyval.statement)->i1=12;
}
#line 1737 "dvdvmy.c"
    break;

  case 45: /* jumpstatement: JUMP_TOK PGC_TOK TAIL_TOK SEMICOLON_TOK  */
#line 283 "dvdvmy.y"
                                          {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_LINK;
    (yyval.statement)->i1=13;
}
#line 1747 "dvdvmy.c"
    break;

  case 46: /* resumel: RESUME_TOK NUM_TOK  */
#line 290 "dvdvmy.y"
                            {
    (yyval.int_val)=(yyvsp[0].int_val);
}
#line 1755 "dvdvmy.c"
    break;

  case 47: /* resumel: %empty  */
#line 293 "dvdvmy.y"
  {
    (yyval.int_val)=0;
}
#line 1763 "dvdvmy.c"
    break;

  case 48: /* lastmenu: LAST_TOK MENU_TOK  */
#line 298 "dvdvmy.y"
                            { // "call last menu;" will be replaced in DVD::SaveDVDAuthor()
    (yyval.int_val)=1;
}
#line 1771 "dvdvmy.c"
    break;

  case 49: /* lastmenu: %empty  */
#line 301 "dvdvmy.y"
  {
    (yyval.int_val)=0;
}
#line 1779 "dvdvmy.c"
    break;

  case 50: /* callstatement: CALL_TOK jtsl jtml jcl resumel lastmenu SEMICOLON_TOK  */
#line 306 "dvdvmy.y"
                                                                     {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_CALL;
    (yyval.statement)->i1=(yyvsp[-5].int_val);
    (yyval.statement)->i2=(yyvsp[-4].int_val);
    (yyval.statement)->i3=(yyvsp[-3].int_val);
    (yyval.statement)->i4=(yyvsp[-2].int_val);
    (yyval.statement)->i5=(yyvsp[-1].int_val);
}
#line 1793 "dvdvmy.c"
    break;

  case 51: /* reg: G_TOK  */
#line 317 "dvdvmy.y"
           {
    (yyval.int_val)=(yyvsp[0].int_val);
}
#line 1801 "dvdvmy.c"
    break;

  case 52: /* reg: S_TOK  */
#line 320 "dvdvmy.y"
        {
    (yyval.int_val)=(yyvsp[0].int_val)+0x80;
}
#line 1809 "dvdvmy.c"
    break;

  case 53: /* reg: AUDIO_TOK  */
#line 323 "dvdvmy.y"
            {
    (yyval.int_val)=0x81;
}
#line 1817 "dvdvmy.c"
    break;

  case 54: /* reg: SUBTITLE_TOK  */
#line 326 "dvdvmy.y"
               {
    (yyval.int_val)=0x82;
}
#line 1825 "dvdvmy.c"
    break;

  case 55: /* reg: ANGLE_TOK  */
#line 329 "dvdvmy.y"
            {
    (yyval.int_val)=0x83;
}
#line 1833 "dvdvmy.c"
    break;

  case 56: /* reg: BUTTON_TOK  */
#line 332 "dvdvmy.y"
             {
    (yyval.int_val)=0x88;
}
#line 1841 "dvdvmy.c"
    break;

  case 57: /* reg: REGION_TOK  */
#line 335 "dvdvmy.y"
             {
    (yyval.int_val)=0x80+20;
}
#line 1849 "dvdvmy.c"
    break;

  case 58: /* regornum: reg  */
#line 340 "dvdvmy.y"
              {
    (yyval.int_val)=(yyvsp[0].int_val)-256;
}
#line 1857 "dvdvmy.c"
    break;

  case 59: /* regornum: NUM_TOK  */
#line 343 "dvdvmy.y"
          {
    (yyval.int_val)=(yyvsp[0].int_val);
}
#line 1865 "dvdvmy.c"
    break;

  case 60: /* expression: OPENPAREN_TOK expression CLOSEPAREN_TOK  */
#line 348 "dvdvmy.y"
                                                    {
    (yyval.statement)=(yyvsp[-1].statement);
}
#line 1873 "dvdvmy.c"
    break;

  case 61: /* expression: regornum  */
#line 351 "dvdvmy.y"
           {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_VAL;
    (yyval.statement)->i1=(yyvsp[0].int_val);
}
#line 1883 "dvdvmy.c"
    break;

  case 62: /* expression: expression ADD_TOK expression  */
#line 356 "dvdvmy.y"
                                {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_ADD,(yyvsp[0].statement));
}
#line 1891 "dvdvmy.c"
    break;

  case 63: /* expression: expression SUB_TOK expression  */
#line 359 "dvdvmy.y"
                                {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_SUB,(yyvsp[0].statement));
}
#line 1899 "dvdvmy.c"
    break;

  case 64: /* expression: expression MUL_TOK expression  */
#line 362 "dvdvmy.y"
                                {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_MUL,(yyvsp[0].statement));
}
#line 1907 "dvdvmy.c"
    break;

  case 65: /* expression: expression DIV_TOK expression  */
#line 365 "dvdvmy.y"
                                {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_DIV,(yyvsp[0].statement));
}
#line 1915 "dvdvmy.c"
    break;

  case 66: /* expression: expression MOD_TOK expression  */
#line 368 "dvdvmy.y"
                                {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_MOD,(yyvsp[0].statement));
}
#line 1923 "dvdvmy.c"
    break;

  case 67: /* expression: expression BAND_TOK expression  */
#line 371 "dvdvmy.y"
                                 {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_AND,(yyvsp[0].statement));
}
#line 1931 "dvdvmy.c"
    break;

  case 68: /* expression: expression BOR_TOK expression  */
#line 374 "dvdvmy.y"
                                {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_OR, (yyvsp[0].statement));
}
#line 1939 "dvdvmy.c"
    break;

  case 69: /* expression: expression _AND_TOK expression  */
#line 377 "dvdvmy.y"
                                 {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_AND,(yyvsp[0].statement));
}
#line 1947 "dvdvmy.c"
    break;

  case 70: /* expression: expression _OR_TOK expression  */
#line 380 "dvdvmy.y"
                                {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_OR, (yyvsp[0].statement));
}
#line 1955 "dvdvmy.c"
    break;

  case 71: /* expression: expression XOR_TOK expression  */
#line 383 "dvdvmy.y"
                                {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_XOR,(yyvsp[0].statement));
}
#line 1963 "dvdvmy.c"
    break;

  case 72: /* expression: RND_TOK OPENPAREN_TOK expression CLOSEPAREN_TOK  */
#line 386 "dvdvmy.y"
                                                  {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_RND;
    (yyval.statement)->param=(yyvsp[-1].statement);
}
#line 1973 "dvdvmy.c"
    break;

  case 73: /* boolexpr: OPENPAREN_TOK boolexpr CLOSEPAREN_TOK  */
#line 393 "dvdvmy.y"
                                                {
    (yyval.statement)=(yyvsp[-1].statement);
}
#line 1981 "dvdvmy.c"
    break;

  case 74: /* boolexpr: expression EQ_TOK expression  */
#line 396 "dvdvmy.y"
                               {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_EQ,(yyvsp[0].statement));
}
#line 1989 "dvdvmy.c"
    break;

  case 75: /* boolexpr: expression NE_TOK expression  */
#line 399 "dvdvmy.y"
                               {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_NE,(yyvsp[0].statement));
}
#line 1997 "dvdvmy.c"
    break;

  case 76: /* boolexpr: expression GE_TOK expression  */
#line 402 "dvdvmy.y"
                               {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_GTE,(yyvsp[0].statement));
}
#line 2005 "dvdvmy.c"
    break;

  case 77: /* boolexpr: expression GT_TOK expression  */
#line 405 "dvdvmy.y"
                               {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_GT,(yyvsp[0].statement));
}
#line 2013 "dvdvmy.c"
    break;

  case 78: /* boolexpr: expression LE_TOK expression  */
#line 408 "dvdvmy.y"
                               {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_LTE,(yyvsp[0].statement));
}
#line 2021 "dvdvmy.c"
    break;

  case 79: /* boolexpr: expression LT_TOK expression  */
#line 411 "dvdvmy.y"
                               {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_LT,(yyvsp[0].statement));
}
#line 2029 "dvdvmy.c"
    break;

  case 80: /* boolexpr: boolexpr LOR_TOK boolexpr  */
#line 414 "dvdvmy.y"
                            {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_LOR,(yyvsp[0].statement));
}
#line 2037 "dvdvmy.c"
    break;

  case 81: /* boolexpr: boolexpr LAND_TOK boolexpr  */
#line 417 "dvdvmy.y"
                             {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_LAND,(yyvsp[0].statement));
}
#line 2045 "dvdvmy.c"
    break;

  case 82: /* boolexpr: boolexpr _OR_TOK boolexpr  */
#line 420 "dvdvmy.y"
                            {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_LOR,(yyvsp[0].statement));
}
#line 2053 "dvdvmy.c"
    break;

  case 83: /* boolexpr: boolexpr _AND_TOK boolexpr  */
#line 423 "dvdvmy.y"
                             {
    (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_LAND,(yyvsp[0].statement));
}
#line 2061 "dvdvmy.c"
    break;

  case 84: /* boolexpr: NOT_TOK boolexpr  */
#line 426 "dvdvmy.y"
                   {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_NOT;
    (yyval.statement)->param=(yyvsp[0].statement);
}
#line 2071 "dvdvmy.c"
    break;

  case 85: /* regorcounter: reg  */
#line 433 "dvdvmy.y"
                  {
    (yyval.int_val)=(yyvsp[0].int_val);
}
#line 2079 "dvdvmy.c"
    break;

  case 86: /* regorcounter: COUNTER_TOK G_TOK  */
#line 436 "dvdvmy.y"
                    {
    (yyval.int_val)=(yyvsp[0].int_val)+0x20;
}
#line 2087 "dvdvmy.c"
    break;

  case 87: /* setstatement: regorcounter SET_TOK expression SEMICOLON_TOK  */
#line 441 "dvdvmy.y"
                                                            {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_SET;
    (yyval.statement)->i1=(yyvsp[-3].int_val);
    (yyval.statement)->param=(yyvsp[-1].statement);
}
#line 2098 "dvdvmy.c"
    break;

  case 88: /* setstatement: reg ADDSET_TOK expression SEMICOLON_TOK  */
#line 447 "dvdvmy.y"
                                          {
    (yyval.statement)=statement_setop((yyvsp[-3].int_val),VM_ADD,(yyvsp[-1].statement));
}
#line 2106 "dvdvmy.c"
    break;

  case 89: /* setstatement: reg SUBSET_TOK expression SEMICOLON_TOK  */
#line 450 "dvdvmy.y"
                                          {
    (yyval.statement)=statement_setop((yyvsp[-3].int_val),VM_SUB,(yyvsp[-1].statement));
}
#line 2114 "dvdvmy.c"
    break;

  case 90: /* setstatement: reg MULSET_TOK expression SEMICOLON_TOK  */
#line 453 "dvdvmy.y"
                                          {
    (yyval.statement)=statement_setop((yyvsp[-3].int_val),VM_MUL,(yyvsp[-1].statement));
}
#line 2122 "dvdvmy.c"
    break;

  case 91: /* setstatement: reg DIVSET_TOK expression SEMICOLON_TOK  */
#line 456 "dvdvmy.y"
                                          {
    (yyval.statement)=statement_setop((yyvsp[-3].int_val),VM_DIV,(yyvsp[-1].statement));
}
#line 2130 "dvdvmy.c"
    break;

  case 92: /* setstatement: reg MODSET_TOK expression SEMICOLON_TOK  */
#line 459 "dvdvmy.y"
                                          {
    (yyval.statement)=statement_setop((yyvsp[-3].int_val),VM_MOD,(yyvsp[-1].statement));
}
#line 2138 "dvdvmy.c"
    break;

  case 93: /* setstatement: reg ANDSET_TOK expression SEMICOLON_TOK  */
#line 462 "dvdvmy.y"
                                          {
    (yyval.statement)=statement_setop((yyvsp[-3].int_val),VM_AND,(yyvsp[-1].statement));
}
#line 2146 "dvdvmy.c"
    break;

  case 94: /* setstatement: reg ORSET_TOK expression SEMICOLON_TOK  */
#line 465 "dvdvmy.y"
                                         {
    (yyval.statement)=statement_setop((yyvsp[-3].int_val),VM_OR,(yyvsp[-1].statement));
}
#line 2154 "dvdvmy.c"
    break;

  case 95: /* setstatement: reg XORSET_TOK expression SEMICOLON_TOK  */
#line 468 "dvdvmy.y"
                                          {
    (yyval.statement)=statement_setop((yyvsp[-3].int_val),VM_XOR,(yyvsp[-1].statement));
}
#line 2162 "dvdvmy.c"
    break;

  case 96: /* ifstatement: IF_TOK OPENPAREN_TOK boolexpr CLOSEPAREN_TOK statement  */
#line 473 "dvdvmy.y"
                                                                    {
    (yyval.statement)=statement_new();
    (yyval.statement)->op=VM_IF;
    (yyval.statement)->param=(yyvsp[-2].statement);
    (yyvsp[-2].statement)->next=statement_new();
    (yyvsp[-2].statement)->next->op=VM_IF;
    (yyvsp[-2].statement)->next->param=(yyvsp[0].statement);
}
#line 2175 "dvdvmy.c"
    break;

  case 97: /* ifelsestatement: ifstatement  */
#line 483 "dvdvmy.y"
                             {
    (yyval.statement)=(yyvsp[0].statement);
}
#line 2183 "dvdvmy.c"
    break;

  case 98: /* ifelsestatement: ifstatement ELSE_TOK statement  */
#line 486 "dvdvmy.y"
                                 {
    (yyval.statement)=(yyvsp[-2].statement);
    (yyval.statement)->param->next->next=(yyvsp[0].statement);
}
#line 2192 "dvdvmy.c"
    break;


#line 2196 "dvdvmy.c"

      default: break;
    }
  /* User semantic actions sometimes alter yychar, and that requires
     that yytoken be updated with the new translation.  We take the
     approach of translating immediately before every use of yytoken.
     One alternative is translating here after every semantic action,
     but that translation would be missed if the semantic action invokes
     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
     incorrect destructor might then be invoked immediately.  In the
     case of YYERROR or YYBACKUP, subsequent parser actions might lead
     to an incorrect destructor call or verbose syntax error message
     before the lookahead is translated.  */
  YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);

  YYPOPSTACK (yylen);
  yylen = 0;

  *++yyvsp = yyval;

  /* Now 'shift' the result of the reduction.  Determine what state
     that goes to, based on the state we popped back to and the rule
     number reduced by.  */
  {
    const int yylhs = yyr1[yyn] - YYNTOKENS;
    const int yyi = yypgoto[yylhs] + *yyssp;
    yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
               ? yytable[yyi]
               : yydefgoto[yylhs]);
  }

  goto yynewstate;


/*--------------------------------------.
| yyerrlab -- here on detecting error.  |
`--------------------------------------*/
yyerrlab:
  /* Make sure we have latest lookahead translation.  See comments at
     user semantic actions for why this is necessary.  */
  yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
      yyerror (YY_("syntax error"));
    }

  if (yyerrstatus == 3)
    {
      /* If just tried and failed to reuse lookahead token after an
         error, discard it.  */

      if (yychar <= YYEOF)
        {
          /* Return failure if at end of input.  */
          if (yychar == YYEOF)
            YYABORT;
        }
      else
        {
          yydestruct ("Error: discarding",
                      yytoken, &yylval);
          yychar = YYEMPTY;
        }
    }

  /* Else will try to reuse lookahead token after shifting the error
     token.  */
  goto yyerrlab1;


/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR.  |
`---------------------------------------------------*/
yyerrorlab:
  /* Pacify compilers when the user code never invokes YYERROR and the
     label yyerrorlab therefore never appears in user code.  */
  if (0)
    YYERROR;
  ++yynerrs;

  /* Do not reclaim the symbols of the rule whose action triggered
     this YYERROR.  */
  YYPOPSTACK (yylen);
  yylen = 0;
  YY_STACK_PRINT (yyss, yyssp);
  yystate = *yyssp;
  goto yyerrlab1;


/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
`-------------------------------------------------------------*/
yyerrlab1:
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */

  /* Pop stack until we find a state that shifts the error token.  */
  for (;;)
    {
      yyn = yypact[yystate];
      if (!yypact_value_is_default (yyn))
        {
          yyn += YYSYMBOL_YYerror;
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
            {
              yyn = yytable[yyn];
              if (0 < yyn)
                break;
            }
        }

      /* Pop the current state because it cannot handle the error token.  */
      if (yyssp == yyss)
        YYABORT;


      yydestruct ("Error: popping",
                  YY_ACCESSING_SYMBOL (yystate), yyvsp);
      YYPOPSTACK (1);
      yystate = *yyssp;
      YY_STACK_PRINT (yyss, yyssp);
    }

  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  *++yyvsp = yylval;
  YY_IGNORE_MAYBE_UNINITIALIZED_END


  /* Shift the error token.  */
  YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);

  yystate = yyn;
  goto yynewstate;


/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturnlab;


/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturnlab;


/*-----------------------------------------------------------.
| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here.  |
`-----------------------------------------------------------*/
yyexhaustedlab:
  yyerror (YY_("memory exhausted"));
  yyresult = 2;
  goto yyreturnlab;


/*----------------------------------------------------------.
| yyreturnlab -- parsing is finished, clean up and return.  |
`----------------------------------------------------------*/
yyreturnlab:
  if (yychar != YYEMPTY)
    {
      /* Make sure we have latest lookahead translation.  See comments at
         user semantic actions for why this is necessary.  */
      yytoken = YYTRANSLATE (yychar);
      yydestruct ("Cleanup: discarding lookahead",
                  yytoken, &yylval);
    }
  /* Do not reclaim the symbols of the rule whose action triggered
     this YYABORT or YYACCEPT.  */
  YYPOPSTACK (yylen);
  YY_STACK_PRINT (yyss, yyssp);
  while (yyssp != yyss)
    {
      yydestruct ("Cleanup: popping",
                  YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
      YYPOPSTACK (1);
    }
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif

  return yyresult;
}

