// A Bison parser, made by GNU Bison 3.0.2.

// Skeleton interface for Bison LALR(1) parsers in C++

// Copyright (C) 2002-2013 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 <http://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.

/**
 ** \file DynareBison.hh
 ** Define the Dynare::parser class.
 */

// C++ LALR(1) parser skeleton written by Akim Demaille.

#ifndef YY_DYNARE_DYNAREBISON_HH_INCLUDED
# define YY_DYNARE_DYNAREBISON_HH_INCLUDED


# include <vector>
# include <iostream>
# include <stdexcept>
# include <string>
# include "stack.hh"
# include "location.hh"


#ifndef YY_ATTRIBUTE
# if (defined __GNUC__                                               \
      && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
     || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
#  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
# else
#  define YY_ATTRIBUTE(Spec) /* empty */
# endif
#endif

#ifndef YY_ATTRIBUTE_PURE
# define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
#endif

#ifndef YY_ATTRIBUTE_UNUSED
# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
#endif

#if !defined _Noreturn \
     && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
# if defined _MSC_VER && 1200 <= _MSC_VER
#  define _Noreturn __declspec (noreturn)
# else
#  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
# endif
#endif

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

#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
    _Pragma ("GCC diagnostic push") \
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
# 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

/* Debug traces.  */
#ifndef YYDEBUG
# define YYDEBUG 1
#endif


namespace Dynare {
#line 113 "DynareBison.hh" // lalr1.cc:372





  /// A Bison parser.
  class parser
  {
  public:
#ifndef YYSTYPE
    /// Symbol semantic values.
    union semantic_type
    {
    #line 71 "DynareBison.yy" // lalr1.cc:372

  string *string_val;
  expr_t node_val;
  SymbolType symbol_type_val;
  vector<string *> *vector_string_val;
  vector<int> *vector_int_val;
  PriorDistributions prior_distributions_val;

#line 136 "DynareBison.hh" // lalr1.cc:372
    };
#else
    typedef YYSTYPE semantic_type;
#endif
    /// Symbol locations.
    typedef location location_type;

    /// Syntax errors thrown from user actions.
    struct syntax_error : std::runtime_error
    {
      syntax_error (const location_type& l, const std::string& m);
      location_type location;
    };

    /// Tokens.
    struct token
    {
      enum yytokentype
      {
        AIM_SOLVER = 258,
        ANALYTIC_DERIVATION = 259,
        AR = 260,
        AUTOCORR = 261,
        BAYESIAN_IRF = 262,
        BETA_PDF = 263,
        BLOCK = 264,
        USE_CALIBRATION = 265,
        BVAR_DENSITY = 266,
        BVAR_FORECAST = 267,
        BVAR_PRIOR_DECAY = 268,
        BVAR_PRIOR_FLAT = 269,
        BVAR_PRIOR_LAMBDA = 270,
        BVAR_PRIOR_MU = 271,
        BVAR_PRIOR_OMEGA = 272,
        BVAR_PRIOR_TAU = 273,
        BVAR_PRIOR_TRAIN = 274,
        BVAR_REPLIC = 275,
        BYTECODE = 276,
        ALL_VALUES_REQUIRED = 277,
        CALIB_SMOOTHER = 278,
        CHANGE_TYPE = 279,
        CHECK = 280,
        CONDITIONAL_FORECAST = 281,
        CONDITIONAL_FORECAST_PATHS = 282,
        CONF_SIG = 283,
        CONSTANT = 284,
        CONTROLLED_VAREXO = 285,
        CORR = 286,
        COVAR = 287,
        CUTOFF = 288,
        CYCLE_REDUCTION = 289,
        LOGARITHMIC_REDUCTION = 290,
        DATAFILE = 291,
        FILE = 292,
        DOUBLING = 293,
        DR_CYCLE_REDUCTION_TOL = 294,
        DR_LOGARITHMIC_REDUCTION_TOL = 295,
        DR_LOGARITHMIC_REDUCTION_MAXITER = 296,
        DR_ALGO = 297,
        DROP = 298,
        DSAMPLE = 299,
        DYNASAVE = 300,
        DYNATYPE = 301,
        CALIBRATION = 302,
        DIFFERENTIATE_FORWARD_VARS = 303,
        END = 304,
        ENDVAL = 305,
        EQUAL = 306,
        ESTIMATION = 307,
        ESTIMATED_PARAMS = 308,
        ESTIMATED_PARAMS_BOUNDS = 309,
        ESTIMATED_PARAMS_INIT = 310,
        EXTENDED_PATH = 311,
        ENDOGENOUS_PRIOR = 312,
        FILENAME = 313,
        FILTER_STEP_AHEAD = 314,
        FILTERED_VARS = 315,
        FIRST_OBS = 316,
        LAST_OBS = 317,
        SET_TIME = 318,
        FLOAT_NUMBER = 319,
        DATES = 320,
        DEFAULT = 321,
        FIXED_POINT = 322,
        FORECAST = 323,
        K_ORDER_SOLVER = 324,
        INSTRUMENTS = 325,
        SHIFT = 326,
        MEAN = 327,
        STDEV = 328,
        VARIANCE = 329,
        MODE = 330,
        INTERVAL = 331,
        SHAPE = 332,
        DOMAINN = 333,
        GAMMA_PDF = 334,
        GRAPH = 335,
        GRAPH_FORMAT = 336,
        CONDITIONAL_VARIANCE_DECOMPOSITION = 337,
        NOCHECK = 338,
        STD = 339,
        HISTVAL = 340,
        HOMOTOPY_SETUP = 341,
        HOMOTOPY_MODE = 342,
        HOMOTOPY_STEPS = 343,
        HOMOTOPY_FORCE_CONTINUE = 344,
        HP_FILTER = 345,
        HP_NGRID = 346,
        HYBRID = 347,
        IDENTIFICATION = 348,
        INF_CONSTANT = 349,
        INITVAL = 350,
        INITVAL_FILE = 351,
        BOUNDS = 352,
        JSCALE = 353,
        INIT = 354,
        INT_NUMBER = 355,
        INV_GAMMA_PDF = 356,
        INV_GAMMA1_PDF = 357,
        INV_GAMMA2_PDF = 358,
        IRF = 359,
        IRF_SHOCKS = 360,
        IRF_PLOT_THRESHOLD = 361,
        KALMAN_ALGO = 362,
        KALMAN_TOL = 363,
        SUBSAMPLES = 364,
        OPTIONS = 365,
        TOLF = 366,
        LAPLACE = 367,
        LIK_ALGO = 368,
        LIK_INIT = 369,
        LINEAR = 370,
        LOAD_IDENT_FILES = 371,
        LOAD_MH_FILE = 372,
        LOAD_PARAMS_AND_STEADY_STATE = 373,
        LOGLINEAR = 374,
        LYAPUNOV = 375,
        LYAPUNOV_FIXED_POINT_TOL = 376,
        LYAPUNOV_DOUBLING_TOL = 377,
        LYAPUNOV_SQUARE_ROOT_SOLVER_TOL = 378,
        LOG_DEFLATOR = 379,
        LOG_TREND_VAR = 380,
        LOG_GROWTH_FACTOR = 381,
        MARKOWITZ = 382,
        MARGINAL_DENSITY = 383,
        MAX = 384,
        MAXIT = 385,
        MFS = 386,
        MH_CONF_SIG = 387,
        MH_DROP = 388,
        MH_INIT_SCALE = 389,
        MH_JSCALE = 390,
        MH_MODE = 391,
        MH_NBLOCKS = 392,
        MH_REPLIC = 393,
        MH_RECOVER = 394,
        MIN = 395,
        MINIMAL_SOLVING_PERIODS = 396,
        MODE_CHECK = 397,
        MODE_CHECK_NEIGHBOURHOOD_SIZE = 398,
        MODE_CHECK_SYMMETRIC_PLOTS = 399,
        MODE_CHECK_NUMBER_OF_POINTS = 400,
        MODE_COMPUTE = 401,
        MODE_FILE = 402,
        MODEL = 403,
        MODEL_COMPARISON = 404,
        MODEL_INFO = 405,
        MSHOCKS = 406,
        ABS = 407,
        SIGN = 408,
        MODEL_DIAGNOSTICS = 409,
        MODIFIEDHARMONICMEAN = 410,
        MOMENTS_VARENDO = 411,
        DIFFUSE_FILTER = 412,
        SUB_DRAWS = 413,
        TAPER_STEPS = 414,
        GEWEKE_INTERVAL = 415,
        MCMC_JUMPING_COVARIANCE = 416,
        NAME = 417,
        NAN_CONSTANT = 418,
        NO_STATIC = 419,
        NOBS = 420,
        NOCONSTANT = 421,
        NODISPLAY = 422,
        NOCORR = 423,
        NODIAGNOSTIC = 424,
        NOFUNCTIONS = 425,
        NOGRAPH = 426,
        NOMOMENTS = 427,
        NOPRINT = 428,
        NORMAL_PDF = 429,
        SAVE_DRAWS = 430,
        OBSERVATION_TRENDS = 431,
        OPTIM = 432,
        OPTIM_WEIGHTS = 433,
        ORDER = 434,
        OSR = 435,
        OSR_PARAMS = 436,
        MAX_DIM_COVA_GROUP = 437,
        ADVANCED = 438,
        PARALLEL_LOCAL_FILES = 439,
        PARAMETERS = 440,
        PARAMETER_SET = 441,
        PARTIAL_INFORMATION = 442,
        PERFECT_FORESIGHT = 443,
        PERIODS = 444,
        PLANNER_OBJECTIVE = 445,
        PLOT_CONDITIONAL_FORECAST = 446,
        PLOT_PRIORS = 447,
        PREFILTER = 448,
        PRESAMPLE = 449,
        PRINT = 450,
        PRIOR_MC = 451,
        PRIOR_TRUNC = 452,
        PRIOR_MODE = 453,
        PRIOR_MEAN = 454,
        POSTERIOR_MODE = 455,
        POSTERIOR_MEAN = 456,
        POSTERIOR_MEDIAN = 457,
        PRUNING = 458,
        QUOTED_STRING = 459,
        QZ_CRITERIUM = 460,
        QZ_ZERO_THRESHOLD = 461,
        FULL = 462,
        DSGE_VAR = 463,
        DSGE_VARLAG = 464,
        DSGE_PRIOR_WEIGHT = 465,
        TRUNCATE = 466,
        RELATIVE_IRF = 467,
        REPLIC = 468,
        SIMUL_REPLIC = 469,
        RPLOT = 470,
        SAVE_PARAMS_AND_STEADY_STATE = 471,
        PARAMETER_UNCERTAINTY = 472,
        SHOCKS = 473,
        SHOCK_DECOMPOSITION = 474,
        SIGMA_E = 475,
        SIMUL = 476,
        SIMUL_ALGO = 477,
        SIMUL_SEED = 478,
        SMOOTHER = 479,
        SQUARE_ROOT_SOLVER = 480,
        STACK_SOLVE_ALGO = 481,
        STEADY_STATE_MODEL = 482,
        SOLVE_ALGO = 483,
        SOLVER_PERIODS = 484,
        STDERR = 485,
        STEADY = 486,
        STOCH_SIMUL = 487,
        SURPRISE = 488,
        SYLVESTER = 489,
        SYLVESTER_FIXED_POINT_TOL = 490,
        REGIMES = 491,
        REGIME = 492,
        TEX = 493,
        RAMSEY_POLICY = 494,
        PLANNER_DISCOUNT = 495,
        DISCRETIONARY_POLICY = 496,
        DISCRETIONARY_TOL = 497,
        TEX_NAME = 498,
        UNIFORM_PDF = 499,
        UNIT_ROOT_VARS = 500,
        USE_DLL = 501,
        USEAUTOCORR = 502,
        GSA_SAMPLE_FILE = 503,
        USE_UNIVARIATE_FILTERS_IF_SINGULARITY_IS_DETECTED = 504,
        VALUES = 505,
        VAR = 506,
        VAREXO = 507,
        VAREXO_DET = 508,
        VAROBS = 509,
        PREDETERMINED_VARIABLES = 510,
        WRITE_LATEX_DYNAMIC_MODEL = 511,
        WRITE_LATEX_STATIC_MODEL = 512,
        XLS_SHEET = 513,
        XLS_RANGE = 514,
        LONG_NAME = 515,
        COMMA = 516,
        EQUAL_EQUAL = 517,
        EXCLAMATION_EQUAL = 518,
        LESS = 519,
        GREATER = 520,
        LESS_EQUAL = 521,
        GREATER_EQUAL = 522,
        PLUS = 523,
        MINUS = 524,
        TIMES = 525,
        DIVIDE = 526,
        UMINUS = 527,
        UPLUS = 528,
        POWER = 529,
        EXP = 530,
        LOG = 531,
        LN = 532,
        LOG10 = 533,
        SIN = 534,
        COS = 535,
        TAN = 536,
        ASIN = 537,
        ACOS = 538,
        ATAN = 539,
        SINH = 540,
        COSH = 541,
        TANH = 542,
        ERF = 543,
        ASINH = 544,
        ACOSH = 545,
        ATANH = 546,
        SQRT = 547,
        NORMCDF = 548,
        NORMPDF = 549,
        STEADY_STATE = 550,
        EXPECTATION = 551,
        DYNARE_SENSITIVITY = 552,
        MORRIS = 553,
        STAB = 554,
        REDFORM = 555,
        PPRIOR = 556,
        PRIOR_RANGE = 557,
        PPOST = 558,
        ILPTAU = 559,
        MORRIS_NLIV = 560,
        MORRIS_NTRA = 561,
        NSAM = 562,
        LOAD_REDFORM = 563,
        LOAD_RMSE = 564,
        LOAD_STAB = 565,
        ALPHA2_STAB = 566,
        KSSTAT = 567,
        LOGTRANS_REDFORM = 568,
        THRESHOLD_REDFORM = 569,
        KSSTAT_REDFORM = 570,
        ALPHA2_REDFORM = 571,
        NAMENDO = 572,
        NAMLAGENDO = 573,
        NAMEXO = 574,
        RMSE = 575,
        LIK_ONLY = 576,
        VAR_RMSE = 577,
        PFILT_RMSE = 578,
        ISTART_RMSE = 579,
        ALPHA_RMSE = 580,
        ALPHA2_RMSE = 581,
        FREQ = 582,
        INITIAL_YEAR = 583,
        INITIAL_SUBPERIOD = 584,
        FINAL_YEAR = 585,
        FINAL_SUBPERIOD = 586,
        DATA = 587,
        VLIST = 588,
        LOG_VAR = 589,
        PERCENT_VAR = 590,
        VLISTLOG = 591,
        VLISTPER = 592,
        RESTRICTION = 593,
        RESTRICTION_FNAME = 594,
        CROSS_RESTRICTIONS = 595,
        NLAGS = 596,
        CONTEMP_REDUCED_FORM = 597,
        REAL_PSEUDO_FORECAST = 598,
        DUMMY_OBS = 599,
        NSTATES = 600,
        INDXSCALESSTATES = 601,
        NO_BAYESIAN_PRIOR = 602,
        SPECIFICATION = 603,
        SIMS_ZHA = 604,
        ALPHA = 605,
        BETA = 606,
        ABAND = 607,
        NINV = 608,
        CMS = 609,
        NCMS = 610,
        CNUM = 611,
        GAMMA = 612,
        INV_GAMMA = 613,
        INV_GAMMA1 = 614,
        INV_GAMMA2 = 615,
        NORMAL = 616,
        UNIFORM = 617,
        EPS = 618,
        PDF = 619,
        FIG = 620,
        DR = 621,
        NONE = 622,
        PRIOR = 623,
        PRIOR_VARIANCE = 624,
        HESSIAN = 625,
        IDENTITY_MATRIX = 626,
        GSIG2_LMDM = 627,
        Q_DIAG = 628,
        FLAT_PRIOR = 629,
        NCSK = 630,
        NSTD = 631,
        INDXPARR = 632,
        INDXOVR = 633,
        INDXAP = 634,
        APBAND = 635,
        INDXIMF = 636,
        IMFBAND = 637,
        INDXFORE = 638,
        FOREBAND = 639,
        INDXGFOREHAT = 640,
        INDXGIMFHAT = 641,
        INDXESTIMA = 642,
        INDXGDLS = 643,
        EQ_MS = 644,
        FILTER_COVARIANCE = 645,
        FILTER_DECOMPOSITION = 646,
        EQ_CMS = 647,
        TLINDX = 648,
        TLNUMBER = 649,
        BANACT = 650,
        RESTRICTIONS = 651,
        OUTPUT_FILE_TAG = 652,
        DRAWS_NBR_BURN_IN_1 = 653,
        DRAWS_NBR_BURN_IN_2 = 654,
        HORIZON = 655,
        SBVAR = 656,
        TREND_VAR = 657,
        DEFLATOR = 658,
        GROWTH_FACTOR = 659,
        MS_IRF = 660,
        MS_VARIANCE_DECOMPOSITION = 661,
        MS_ESTIMATION = 662,
        MS_SIMULATION = 663,
        MS_COMPUTE_MDD = 664,
        MS_COMPUTE_PROBABILITIES = 665,
        MS_FORECAST = 666,
        SVAR_IDENTIFICATION = 667,
        EQUATION = 668,
        EXCLUSION = 669,
        LAG = 670,
        UPPER_CHOLESKY = 671,
        LOWER_CHOLESKY = 672,
        MONTHLY = 673,
        QUARTERLY = 674,
        MARKOV_SWITCHING = 675,
        CHAIN = 676,
        DURATION = 677,
        NUMBER_OF_REGIMES = 678,
        SVAR = 679,
        COEFF = 680,
        COEFFICIENTS = 681,
        VARIANCES = 682,
        CONSTANTS = 683,
        EQUATIONS = 684,
        EXTERNAL_FUNCTION = 685,
        EXT_FUNC_NAME = 686,
        EXT_FUNC_NARGS = 687,
        FIRST_DERIV_PROVIDED = 688,
        SECOND_DERIV_PROVIDED = 689,
        SELECTED_VARIABLES_ONLY = 690,
        COVA_COMPUTE = 691,
        SIMULATION_FILE_TAG = 692,
        FILE_TAG = 693,
        NO_ERROR_BANDS = 694,
        ERROR_BAND_PERCENTILES = 695,
        SHOCKS_PER_PARAMETER = 696,
        NO_CREATE_INIT = 697,
        SHOCK_DRAWS = 698,
        FREE_PARAMETERS = 699,
        MEDIAN = 700,
        DATA_OBS_NBR = 701,
        NEIGHBORHOOD_WIDTH = 702,
        PVALUE_KS = 703,
        PVALUE_CORR = 704,
        FILTERED_PROBABILITIES = 705,
        REAL_TIME_SMOOTHED = 706,
        PROPOSAL_TYPE = 707,
        PROPOSAL_UPPER_BOUND = 708,
        PROPOSAL_LOWER_BOUND = 709,
        PROPOSAL_DRAWS = 710,
        USE_MEAN_CENTER = 711,
        ADAPTIVE_MH_DRAWS = 712,
        THINNING_FACTOR = 713,
        COEFFICIENTS_PRIOR_HYPERPARAMETERS = 714,
        CONVERGENCE_STARTING_VALUE = 715,
        CONVERGENCE_ENDING_VALUE = 716,
        CONVERGENCE_INCREMENT_VALUE = 717,
        MAX_ITERATIONS_STARTING_VALUE = 718,
        MAX_ITERATIONS_INCREMENT_VALUE = 719,
        MAX_BLOCK_ITERATIONS = 720,
        MAX_REPEATED_OPTIMIZATION_RUNS = 721,
        FUNCTION_CONVERGENCE_CRITERION = 722,
        PARAMETER_CONVERGENCE_CRITERION = 723,
        NUMBER_OF_LARGE_PERTURBATIONS = 724,
        NUMBER_OF_SMALL_PERTURBATIONS = 725,
        NUMBER_OF_POSTERIOR_DRAWS_AFTER_PERTURBATION = 726,
        MAX_NUMBER_OF_STAGES = 727,
        RANDOM_FUNCTION_CONVERGENCE_CRITERION = 728,
        RANDOM_PARAMETER_CONVERGENCE_CRITERION = 729
      };
    };

    /// (External) token type, as returned by yylex.
    typedef token::yytokentype token_type;

    /// Internal symbol number.
    typedef int symbol_number_type;

    /// Internal symbol number for tokens (subsumed by symbol_number_type).
    typedef unsigned short int token_number_type;

    /// A complete symbol.
    ///
    /// Expects its Base type to provide access to the symbol type
    /// via type_get().
    ///
    /// Provide access to semantic value and location.
    template <typename Base>
    struct basic_symbol : Base
    {
      /// Alias to Base.
      typedef Base super_type;

      /// Default constructor.
      basic_symbol ();

      /// Copy constructor.
      basic_symbol (const basic_symbol& other);

      /// Constructor for valueless symbols.
      basic_symbol (typename Base::kind_type t,
                    const location_type& l);

      /// Constructor for symbols with semantic value.
      basic_symbol (typename Base::kind_type t,
                    const semantic_type& v,
                    const location_type& l);

      ~basic_symbol ();

      /// Destructive move, \a s is emptied into this.
      void move (basic_symbol& s);

      /// The semantic value.
      semantic_type value;

      /// The location.
      location_type location;

    private:
      /// Assignment operator.
      basic_symbol& operator= (const basic_symbol& other);
    };

    /// Type access provider for token (enum) based symbols.
    struct by_type
    {
      /// Default constructor.
      by_type ();

      /// Copy constructor.
      by_type (const by_type& other);

      /// The symbol type as needed by the constructor.
      typedef token_type kind_type;

      /// Constructor from (external) token numbers.
      by_type (kind_type t);

      /// Steal the symbol type from \a that.
      void move (by_type& that);

      /// The (internal) type number (corresponding to \a type).
      /// -1 when this symbol is empty.
      symbol_number_type type_get () const;

      /// The token.
      token_type token () const;

      enum { empty = 0 };

      /// The symbol type.
      /// -1 when this symbol is empty.
      token_number_type type;
    };

    /// "External" symbols: returned by the scanner.
    typedef basic_symbol<by_type> symbol_type;


    /// Build a parser object.
    parser (ParsingDriver &driver_yyarg);
    virtual ~parser ();

    /// Parse.
    /// \returns  0 iff parsing succeeded.
    virtual int parse ();

#if YYDEBUG
    /// The current debugging stream.
    std::ostream& debug_stream () const YY_ATTRIBUTE_PURE;
    /// Set the current debugging stream.
    void set_debug_stream (std::ostream &);

    /// Type for debugging levels.
    typedef int debug_level_type;
    /// The current debugging level.
    debug_level_type debug_level () const YY_ATTRIBUTE_PURE;
    /// Set the current debugging level.
    void set_debug_level (debug_level_type l);
#endif

    /// Report a syntax error.
    /// \param loc    where the syntax error is found.
    /// \param msg    a description of the syntax error.
    virtual void error (const location_type& loc, const std::string& msg);

    /// Report a syntax error.
    void error (const syntax_error& err);

  private:
    /// This class is not copyable.
    parser (const parser&);
    parser& operator= (const parser&);

    /// State numbers.
    typedef int state_type;

    /// Generate an error message.
    /// \param yystate   the state where the error occurred.
    /// \param yytoken   the lookahead token type, or yyempty_.
    virtual std::string yysyntax_error_ (state_type yystate,
                                         symbol_number_type yytoken) const;

    /// Compute post-reduction state.
    /// \param yystate   the current state
    /// \param yysym     the nonterminal to push on the stack
    state_type yy_lr_goto_state_ (state_type yystate, int yysym);

    /// Whether the given \c yypact_ value indicates a defaulted state.
    /// \param yyvalue   the value to check
    static bool yy_pact_value_is_default_ (int yyvalue);

    /// Whether the given \c yytable_ value indicates a syntax error.
    /// \param yyvalue   the value to check
    static bool yy_table_value_is_error_ (int yyvalue);

    static const short int yypact_ninf_;
    static const short int yytable_ninf_;

    /// Convert a scanner token number \a t to a symbol number.
    static token_number_type yytranslate_ (int t);

    // Tables.
  // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  // STATE-NUM.
  static const short int yypact_[];

  // 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 unsigned short int yydefact_[];

  // YYPGOTO[NTERM-NUM].
  static const short int yypgoto_[];

  // YYDEFGOTO[NTERM-NUM].
  static const short int yydefgoto_[];

  // 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 short int yytable_[];

  static const short int yycheck_[];

  // YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  // symbol of state STATE-NUM.
  static const unsigned short int yystos_[];

  // YYR1[YYN] -- Symbol number of symbol that rule YYN derives.
  static const unsigned short int yyr1_[];

  // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.
  static const unsigned char yyr2_[];


    /// Convert the symbol name \a n to a form suitable for a diagnostic.
    static std::string yytnamerr_ (const char *n);


    /// For a symbol, its name in clear.
    static const char* const yytname_[];
#if YYDEBUG
  // YYRLINE[YYN] -- Source line where rule number YYN was defined.
  static const unsigned short int yyrline_[];
    /// Report on the debug stream that the rule \a r is going to be reduced.
    virtual void yy_reduce_print_ (int r);
    /// Print the state stack on the debug stream.
    virtual void yystack_print_ ();

    // Debugging.
    int yydebug_;
    std::ostream* yycdebug_;

    /// \brief Display a symbol type, value and location.
    /// \param yyo    The output stream.
    /// \param yysym  The symbol.
    template <typename Base>
    void yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const;
#endif

    /// \brief Reclaim the memory associated to a symbol.
    /// \param yymsg     Why this token is reclaimed.
    ///                  If null, print nothing.
    /// \param yysym     The symbol.
    template <typename Base>
    void yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const;

  private:
    /// Type access provider for state based symbols.
    struct by_state
    {
      /// Default constructor.
      by_state ();

      /// The symbol type as needed by the constructor.
      typedef state_type kind_type;

      /// Constructor.
      by_state (kind_type s);

      /// Copy constructor.
      by_state (const by_state& other);

      /// Steal the symbol type from \a that.
      void move (by_state& that);

      /// The (internal) type number (corresponding to \a state).
      /// "empty" when empty.
      symbol_number_type type_get () const;

      enum { empty = 0 };

      /// The state.
      state_type state;
    };

    /// "Internal" symbol: element of the stack.
    struct stack_symbol_type : basic_symbol<by_state>
    {
      /// Superclass.
      typedef basic_symbol<by_state> super_type;
      /// Construct an empty symbol.
      stack_symbol_type ();
      /// Steal the contents from \a sym to build this.
      stack_symbol_type (state_type s, symbol_type& sym);
      /// Assignment, needed by push_back.
      stack_symbol_type& operator= (const stack_symbol_type& that);
    };

    /// Stack type.
    typedef stack<stack_symbol_type> stack_type;

    /// The stack.
    stack_type yystack_;

    /// Push a new state on the stack.
    /// \param m    a debug message to display
    ///             if null, no trace is output.
    /// \param s    the symbol
    /// \warning the contents of \a s.value is stolen.
    void yypush_ (const char* m, stack_symbol_type& s);

    /// Push a new look ahead token on the state on the stack.
    /// \param m    a debug message to display
    ///             if null, no trace is output.
    /// \param s    the state
    /// \param sym  the symbol (for its value and location).
    /// \warning the contents of \a s.value is stolen.
    void yypush_ (const char* m, state_type s, symbol_type& sym);

    /// Pop \a n symbols the three stacks.
    void yypop_ (unsigned int n = 1);

    // Constants.
    enum
    {
      yyeof_ = 0,
      yylast_ = 9546,     ///< Last index in yytable_.
      yynnts_ = 548,  ///< Number of nonterminal symbols.
      yyempty_ = -2,
      yyfinal_ = 305, ///< Termination state number.
      yyterror_ = 1,
      yyerrcode_ = 256,
      yyntokens_ = 483  ///< Number of tokens.
    };


    // User arguments.
    ParsingDriver &driver;
  };



} // Dynare
#line 935 "DynareBison.hh" // lalr1.cc:372




#endif // !YY_DYNARE_DYNAREBISON_HH_INCLUDED
