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

/* C++ Skeleton parser for LALR(1) parsing with Bison,
   Copyright (C) 2002, 2003, 2004, 2005 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 2, 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., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.  */


#include "scene.parser.hh"

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

/* A pseudo ostream that takes yydebug_ into account. */
# define YYCDEBUG							\
  for (bool yydebugcond_ = yydebug_; yydebugcond_; yydebugcond_ = false)	\
    (*yycdebug_)

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

# define YY_SYMBOL_PRINT(Title, Type, Value, Location)	\
do {							\
  if (yydebug_)						\
    {							\
      *yycdebug_ << (Title) << ' ';			\
      yysymprint_ ((Type), (Value), (Location));	\
      *yycdebug_ << std::endl;				\
    }							\
} while (0)

# define YY_REDUCE_PRINT(Rule)		\
do {					\
  if (yydebug_)				\
    yyreduce_print_ (Rule);		\
} while (0)

# define YY_STACK_PRINT()		\
do {					\
  if (yydebug_)				\
    yystack_print_ ();			\
} while (0)

#else /* !YYDEBUG */

# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_REDUCE_PRINT(Rule)
# define YY_STACK_PRINT()

#endif /* !YYDEBUG */

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

#if YYERROR_VERBOSE

/* Return YYSTR after stripping away unnecessary quotes and
   backslashes, so that it's suitable for yyerror.  The heuristic is
   that double-quoting is unnecessary unless the string contains an
   apostrophe, a comma, or backslash (other than backslash-backslash).
   YYSTR is taken from yytname.  */
std::string
yy::SceneParser::yytnamerr_ (const char *yystr)
{
  if (*yystr == '"')
    {
      std::string yyr = "";
      char const *yyp = yystr;

      for (;;)
	switch (*++yyp)
	  {
	  case '\'':
	  case ',':
	    goto do_not_strip_quotes;

	  case '\\':
	    if (*++yyp != '\\')
	      goto do_not_strip_quotes;
	    /* Fall through.  */
	  default:
	    yyr += *yyp;
	    break;

	  case '"':
	    return yyr;
	  }
    do_not_strip_quotes: ;
    }

  return yystr;
}

#endif

#if YYDEBUG
/*--------------------------------.
| Print this symbol on YYOUTPUT.  |
`--------------------------------*/

void
yy::SceneParser::yysymprint_ (int yytype,
                         const semantic_type* yyvaluep, const location_type* yylocationp)
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yyvaluep;
  (void) yylocationp;
  /* Backward compatibility, but should be removed eventually. */
  std::ostream& cdebug_ = *yycdebug_;
  (void) cdebug_;

  *yycdebug_ << (yytype < yyntokens_ ? "token" : "nterm")
	     << ' ' << yytname_[yytype] << " ("
             << *yylocationp << ": ";
  switch (yytype)
    {
      case 3: /* "\"identifier\"" */
#line 103 ".\\Code\\Scene Parser\\scene.y"
        { debug_stream () << *(yyvaluep->sval); };
#line 144 "scene.parser.cc"
        break;
      case 4: /* "\"expression\"" */
#line 104 ".\\Code\\Scene Parser\\scene.y"
        { debug_stream () << (yyvaluep->dval); };
#line 149 "scene.parser.cc"
        break;
      case 5: /* "\"int\"" */
#line 104 ".\\Code\\Scene Parser\\scene.y"
        { debug_stream () << (yyvaluep->ival); };
#line 154 "scene.parser.cc"
        break;
      case 7: /* "\"float\"" */
#line 104 ".\\Code\\Scene Parser\\scene.y"
        { debug_stream () << (yyvaluep->fval); };
#line 159 "scene.parser.cc"
        break;
      case 8: /* "\"string\"" */
#line 103 ".\\Code\\Scene Parser\\scene.y"
        { debug_stream () << *(yyvaluep->sval); };
#line 164 "scene.parser.cc"
        break;
      default:
        break;
    }
  *yycdebug_ << ')';
}
#endif /* ! YYDEBUG */

void
yy::SceneParser::yydestruct_ (const char* yymsg,
                         int yytype, semantic_type* yyvaluep, location_type* yylocationp)
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yymsg;
  (void) yyvaluep;
  (void) yylocationp;

  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);

  switch (yytype)
    {
      case 3: /* "\"identifier\"" */
#line 102 ".\\Code\\Scene Parser\\scene.y"
        { delete (yyvaluep->sval); };
#line 189 "scene.parser.cc"
        break;
      case 8: /* "\"string\"" */
#line 102 ".\\Code\\Scene Parser\\scene.y"
        { delete (yyvaluep->sval); };
#line 194 "scene.parser.cc"
        break;

      default:
        break;
    }
}

void
yy::SceneParser::yypop_ (unsigned int n)
{
  yystate_stack_.pop (n);
  yysemantic_stack_.pop (n);
  yylocation_stack_.pop (n);
}

std::ostream&
yy::SceneParser::debug_stream () const
{
  return *yycdebug_;
}

void
yy::SceneParser::set_debug_stream (std::ostream& o)
{
  yycdebug_ = &o;
}


yy::SceneParser::debug_level_type
yy::SceneParser::debug_level () const
{
  return yydebug_;
}

void
yy::SceneParser::set_debug_level (debug_level_type l)
{
  yydebug_ = l;
}


int
yy::SceneParser::parse ()
{
  /* Look-ahead and look-ahead in internal form.  */
  int yylooka;
  int yyilooka;

  /// Semantic value of the look-ahead.
  semantic_type yylval;
  /// Location of the look-ahead.
  location_type yylloc;
  /// The locations where the error started and ended.
  location yyerror_range[2];

  /// $$.
  semantic_type yyval;
  /// @$.
  location_type yyloc;

  int yyresult_;

  YYCDEBUG << "Starting parse" << std::endl;

  yynerrs_ = 0;
  yyerrstatus_ = 0;

  /* Start.  */
  yystate_ = 0;
  yylooka = yyempty_;


  /* User initialization code. */
  #line 23 ".\\Code\\Scene Parser\\scene.y"
{
	// Initialize the initial location.
	yylloc.begin.filename = yylloc.end.filename = &driver.file;
}
/* Line 548 of yacc.c.  */
#line 274 "scene.parser.cc"
  /* Initialize the stacks.  The initial state will be pushed in
     yynewstate, since the latter expects the semantical and the
     location values to have been already stored, initialize these
     stacks with a primary value.  */
  yystate_stack_ = state_stack_type (0);
  yysemantic_stack_ = semantic_stack_type (0);
  yylocation_stack_ = location_stack_type (0);
  yysemantic_stack_.push (yylval);
  yylocation_stack_.push (yylloc);

  /* New state.  */
yynewstate:
  yystate_stack_.push (yystate_);
  YYCDEBUG << "Entering state " << yystate_ << std::endl;
  goto yybackup;

  /* Backup.  */
yybackup:

  /* Try to take a decision without look-ahead.  */
  yyn_ = yypact_[yystate_];
  if (yyn_ == yypact_ninf_)
    goto yydefault;

  /* Read a look-ahead token.  */
  if (yylooka == yyempty_)
    {
      YYCDEBUG << "Reading a token: ";
      yylooka = yylex (&yylval, &yylloc, driver);
    }


  /* Convert token to internal form.  */
  if (yylooka <= yyeof_)
    {
      yylooka = yyilooka = yyeof_;
      YYCDEBUG << "Now at end of input." << std::endl;
    }
  else
    {
      yyilooka = yytranslate_ (yylooka);
      YY_SYMBOL_PRINT ("Next token is", yyilooka, &yylval, &yylloc);
    }

  /* If the proper action on seeing token ILOOKA_ is to reduce or to
     detect an error, take that action.  */
  yyn_ += yyilooka;
  if (yyn_ < 0 || yylast_ < yyn_ || yycheck_[yyn_] != yyilooka)
    goto yydefault;

  /* Reduce or error.  */
  yyn_ = yytable_[yyn_];
  if (yyn_ < 0)
    {
      if (yyn_ == yytable_ninf_)
	goto yyerrlab;
      else
	{
	  yyn_ = -yyn_;
	  goto yyreduce;
	}
    }
  else if (yyn_ == 0)
    goto yyerrlab;

  /* Accept?  */
  if (yyn_ == yyfinal_)
    goto yyacceptlab;

  /* Shift the look-ahead token.  */
  YY_SYMBOL_PRINT ("Shifting", yyilooka, &yylval, &yylloc);

  /* Discard the token being shifted unless it is eof.  */
  if (yylooka != yyeof_)
    yylooka = yyempty_;

  yysemantic_stack_.push (yylval);
  yylocation_stack_.push (yylloc);

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

  yystate_ = yyn_;
  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:
  yylen_ = yyr2_[yyn_];
  /* If LEN_ is nonzero, implement the default value of the action:
     `$$ = $1'.  Otherwise, use the top of the stack.

     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  */
  if (yylen_)
    yyval = yysemantic_stack_[yylen_ - 1];
  else
    yyval = yysemantic_stack_[0];

  {
    slice<location_type, location_stack_type> slice (yylocation_stack_, yylen_);
    YYLLOC_DEFAULT (yyloc, slice, yylen_);
  }
  YY_REDUCE_PRINT (yyn_);
  switch (yyn_)
    {
        case 2:
#line 110 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 3:
#line 111 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 4:
#line 114 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 5:
#line 115 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 6:
#line 117 ".\\Code\\Scene Parser\\scene.y"
    { addGlobalInst((yysemantic_stack_[0].dval)); ;}
    break;

  case 7:
#line 118 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 8:
#line 121 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addFunction(*(yysemantic_stack_[6].sval), (yysemantic_stack_[4].dval), (yysemantic_stack_[1].dval)); ;}
    break;

  case 9:
#line 123 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = NULL; ;}
    break;

  case 10:
#line 124 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 11:
#line 125 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addVector(addDataId(*(yysemantic_stack_[0].sval))); ;}
    break;

  case 12:
#line 126 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addVector((yysemantic_stack_[2].dval), addDataId(*(yysemantic_stack_[0].sval))); ;}
    break;

  case 13:
#line 129 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = NULL; ;}
    break;

  case 14:
#line 130 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 15:
#line 134 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addVector((yysemantic_stack_[0].dval)); ;}
    break;

  case 16:
#line 135 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addVector((yysemantic_stack_[1].dval), (yysemantic_stack_[0].dval)); ;}
    break;

  case 17:
#line 136 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addVector(addReturn((yysemantic_stack_[1].dval))); ;}
    break;

  case 18:
#line 137 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addVector((yysemantic_stack_[3].dval), addReturn((yysemantic_stack_[1].dval))); ;}
    break;

  case 19:
#line 140 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 20:
#line 141 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 21:
#line 142 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 22:
#line 143 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 23:
#line 153 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 24:
#line 154 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 25:
#line 155 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 26:
#line 156 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 27:
#line 157 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 28:
#line 160 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = (yysemantic_stack_[1].dval); ;}
    break;

  case 29:
#line 161 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addVector(NULL); ;}
    break;

  case 30:
#line 162 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 31:
#line 163 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addVector((yysemantic_stack_[0].dval)); ;}
    break;

  case 32:
#line 164 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addVector((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval)); ;}
    break;

  case 33:
#line 167 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[0].dval), "-"); ;}
    break;

  case 34:
#line 168 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "+"); ;}
    break;

  case 35:
#line 169 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "-"); ;}
    break;

  case 36:
#line 170 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "*"); ;}
    break;

  case 37:
#line 171 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "/"); ;}
    break;

  case 38:
#line 172 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "%"); ;}
    break;

  case 39:
#line 173 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "="); ;}
    break;

  case 40:
#line 174 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[0].dval), "++"); ;}
    break;

  case 41:
#line 175 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[1].dval), "++"); ;}
    break;

  case 42:
#line 176 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[0].dval), "--"); ;}
    break;

  case 43:
#line 177 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[1].dval), "--"); ;}
    break;

  case 44:
#line 178 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "+="); ;}
    break;

  case 45:
#line 179 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "-="); ;}
    break;

  case 46:
#line 180 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "*="); ;}
    break;

  case 47:
#line 181 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "/="); ;}
    break;

  case 48:
#line 182 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "%="); ;}
    break;

  case 49:
#line 184 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addDataId(*(yysemantic_stack_[0].sval)); ;}
    break;

  case 50:
#line 185 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 51:
#line 186 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), addDataId(*(yysemantic_stack_[0].sval)), "."); ;}
    break;

  case 52:
#line 187 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "."); ;}
    break;

  case 53:
#line 188 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[3].dval), (yysemantic_stack_[1].dval), "[]"); ;}
    break;

  case 54:
#line 191 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[0].dval), "!"); ;}
    break;

  case 55:
#line 192 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "<"); ;}
    break;

  case 56:
#line 193 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), ">"); ;}
    break;

  case 57:
#line 194 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "<="); ;}
    break;

  case 58:
#line 195 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), ">="); ;}
    break;

  case 59:
#line 196 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "=="); ;}
    break;

  case 60:
#line 197 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "!="); ;}
    break;

  case 61:
#line 198 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "&&"); ;}
    break;

  case 62:
#line 199 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addOperation((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), "||"); ;}
    break;

  case 63:
#line 202 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addData((yysemantic_stack_[0].ival)); ;}
    break;

  case 64:
#line 203 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addData((yysemantic_stack_[0].bval)); ;}
    break;

  case 65:
#line 204 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addData((yysemantic_stack_[0].fval)); ;}
    break;

  case 66:
#line 205 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addData(*(yysemantic_stack_[0].sval)); ;}
    break;

  case 67:
#line 208 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addIf((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval), NULL); ;}
    break;

  case 68:
#line 209 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addIf((yysemantic_stack_[4].dval), (yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval)); ;}
    break;

  case 69:
#line 212 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addWhile((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval)); ;}
    break;

  case 70:
#line 213 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addFor((yysemantic_stack_[6].dval), (yysemantic_stack_[4].dval), (yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval)); ;}
    break;

  case 71:
#line 216 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addVector((yysemantic_stack_[0].dval)); ;}
    break;

  case 72:
#line 217 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addVector(addReturn((yysemantic_stack_[1].dval))); ;}
    break;

  case 73:
#line 218 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = (yysemantic_stack_[1].dval); ;}
    break;

  case 74:
#line 221 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addCallFunction(*(yysemantic_stack_[3].sval), (yysemantic_stack_[1].dval)); ;}
    break;

  case 75:
#line 222 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = NULL; ;}
    break;

  case 76:
#line 223 ".\\Code\\Scene Parser\\scene.y"
    { ;}
    break;

  case 77:
#line 224 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addVector((yysemantic_stack_[0].dval)); ;}
    break;

  case 78:
#line 225 ".\\Code\\Scene Parser\\scene.y"
    { (yyval.dval) = addVector((yysemantic_stack_[2].dval), (yysemantic_stack_[0].dval)); ;}
    break;


      default: break;
    }

/* Line 676 of lalr1.cc.  */
#line 784 "scene.parser.cc"

  yypop_ (yylen_);

  YY_STACK_PRINT ();

  yysemantic_stack_.push (yyval);
  yylocation_stack_.push (yyloc);

  /* Shift the result of the reduction.  */
  yyn_ = yyr1_[yyn_];
  yystate_ = yypgoto_[yyn_ - yyntokens_] + yystate_stack_[0];
  if (0 <= yystate_ && yystate_ <= yylast_
      && yycheck_[yystate_] == yystate_stack_[0])
    yystate_ = yytable_[yystate_];
  else
    yystate_ = yydefgoto_[yyn_ - yyntokens_];
  goto yynewstate;

/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus_)
    {
      ++yynerrs_;
      error (yylloc, yysyntax_error_ (YYERROR_VERBOSE_IF (yyilooka)));
    }

  yyerror_range[0] = yylloc;
  if (yyerrstatus_ == 3)
    {
      /* If just tried and failed to reuse look-ahead token after an
	 error, discard it.  */

      if (yylooka <= yyeof_)
        {
	  /* Return failure if at end of input.  */
	  if (yylooka == yyeof_)
	    YYABORT;
        }
      else
        {
          yydestruct_ ("Error: discarding", yyilooka, &yylval, &yylloc);
          yylooka = yyempty_;
        }
    }

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


/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR.  |
`---------------------------------------------------*/
yyerrorlab:

  /* Pacify compilers like GCC when the user code never invokes
     YYERROR and the label yyerrorlab therefore never appears in user
     code.  */
  if (false)
    goto yyerrorlab;

  yyerror_range[0] = yylocation_stack_[yylen_ - 1];
  yypop_ (yylen_);
  yystate_ = yystate_stack_[0];
  goto yyerrlab1;

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

  for (;;)
    {
      yyn_ = yypact_[yystate_];
      if (yyn_ != yypact_ninf_)
	{
	  yyn_ += yyterror_;
	  if (0 <= yyn_ && yyn_ <= yylast_ && yycheck_[yyn_] == yyterror_)
	    {
	      yyn_ = yytable_[yyn_];
	      if (0 < yyn_)
		break;
	    }
	}

      /* Pop the current state because it cannot handle the error token.  */
      if (yystate_stack_.height () == 1)
	YYABORT;

      yyerror_range[0] = yylocation_stack_[0];
      yydestruct_ ("Error: popping",
                   yystos_[yystate_],
                   &yysemantic_stack_[0], &yylocation_stack_[0]);
      yypop_ ();
      yystate_ = yystate_stack_[0];
      YY_STACK_PRINT ();
    }

  if (yyn_ == yyfinal_)
    goto yyacceptlab;

  yyerror_range[1] = yylloc;
  // Using YYLLOC is tempting, but would change the location of
  // the look-ahead.  YYLOC is available though.
  YYLLOC_DEFAULT (yyloc, yyerror_range - 1, 2);
  yysemantic_stack_.push (yylval);
  yylocation_stack_.push (yyloc);

  /* Shift the error token. */
  YY_SYMBOL_PRINT ("Shifting", yystos_[yyn_],
		   &yysemantic_stack_[0], &yylocation_stack_[0]);

  yystate_ = yyn_;
  goto yynewstate;

  /* Accept.  */
yyacceptlab:
  yyresult_ = 0;
  goto yyreturn;

  /* Abort.  */
yyabortlab:
  yyresult_ = 1;
  goto yyreturn;

yyreturn:
  if (yylooka != yyeof_ && yylooka != yyempty_)
    yydestruct_ ("Cleanup: discarding lookahead", yyilooka, &yylval, &yylloc);

  while (yystate_stack_.height () != 1)
    {
      yydestruct_ ("Cleanup: popping",
		   yystos_[yystate_stack_[0]],
		   &yysemantic_stack_[0],
		   &yylocation_stack_[0]);
      yypop_ ();
    }

  return yyresult_;
}

// Generate an error message.
std::string
yy::SceneParser::yysyntax_error_ (YYERROR_VERBOSE_IF (int tok))
{
  std::string res;
#if YYERROR_VERBOSE
  yyn_ = yypact_[yystate_];
  if (yypact_ninf_ < yyn_ && yyn_ < yylast_)
    {
      /* Start YYX at -YYN if negative to avoid negative indexes in
         YYCHECK.  */
      int yyxbegin = yyn_ < 0 ? -yyn_ : 0;

      /* Stay within bounds of both yycheck and yytname.  */
      int yychecklim = yylast_ - yyn_;
      int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
      int count = 0;
      for (int x = yyxbegin; x < yyxend; ++x)
        if (yycheck_[x + yyn_] == x && x != yyterror_)
          ++count;

      // FIXME: This method of building the message is not compatible
      // with internationalization.  It should work like yacc.c does it.
      // That is, first build a string that looks like this:
      // "syntax error, unexpected %s or %s or %s"
      // Then, invoke YY_ on this string.
      // Finally, use the string as a format to output
      // yytname_[tok], etc.
      // Until this gets fixed, this message appears in English only.
      res = "syntax error, unexpected ";
      res += yytnamerr_ (yytname_[tok]);
      if (count < 5)
        {
          count = 0;
          for (int x = yyxbegin; x < yyxend; ++x)
            if (yycheck_[x + yyn_] == x && x != yyterror_)
              {
                res += (!count++) ? ", expecting " : " or ";
                res += yytnamerr_ (yytname_[x]);
              }
        }
    }
  else
#endif
    res = YY_("syntax error");
  return res;
}


/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
const signed char yy::SceneParser::yypact_ninf_ = -102;
const short int
yy::SceneParser::yypact_[] =
{
      70,    -7,  -102,  -102,  -102,  -102,   228,   228,    15,   228,
      15,     6,     7,    10,    20,    26,    70,  -102,  -102,  -102,
     227,  -102,  -102,   189,  -102,  -102,  -102,  -102,  -102,  -102,
     228,   425,    12,    18,   -23,    -3,   -24,    -3,   228,   228,
     228,    16,  -102,  -102,  -102,   228,   228,   228,   228,   228,
     228,   228,   228,   228,   228,   228,   228,   228,    28,   228,
     228,  -102,   228,  -102,   228,   228,   228,   228,   425,    14,
      22,  -102,   228,   366,   251,   386,    34,   -23,   -23,   -23,
     -23,   -23,   -23,   -23,   -23,   -24,   -24,  -102,  -102,  -102,
      -7,  -102,   346,   425,   425,   425,   425,   425,   425,  -102,
     228,   425,   123,   228,   123,  -102,    23,    29,  -102,   425,
     142,   228,  -102,    13,   270,  -102,    37,    55,   228,    46,
     185,  -102,   289,   123,   228,   142,  -102,   308,  -102,   228,
    -102,  -102,  -102,   406,    47,  -102,   327,   123,  -102,  -102,
    -102
};

/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
   doesn't specify something else to do.  Zero means the default is an
   error.  */
const unsigned char
yy::SceneParser::yydefact_[] =
{
       2,    49,    63,    64,    65,    66,    29,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     3,     4,     7,     6,
       0,    24,    26,    27,    25,    23,    20,    21,    22,    50,
      75,    31,     0,    30,    54,    40,    33,    42,     0,     0,
       0,     0,     1,     5,    19,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,    41,     0,    43,     0,     0,     0,     0,    77,     0,
      76,    28,     0,     0,     0,     0,     9,    61,    62,    59,
      60,    55,    56,    57,    58,    34,    35,    36,    37,    38,
      51,    52,     0,    39,    44,    45,    46,    47,    48,    74,
       0,    32,     0,     0,     0,    11,     0,    10,    53,    78,
      13,     0,    71,    67,     0,    69,     0,     0,     0,     0,
      14,    15,     0,     0,     0,    13,    12,     0,    73,     0,
      16,    72,    68,     0,     0,    17,     0,     0,     8,    18,
      70
};

/* YYPGOTO[NTERM-NUM].  */
const signed char
yy::SceneParser::yypgoto_[] =
{
    -102,  -102,  -102,    49,  -102,  -102,  -102,   -59,  -102,     0,
      -5,  -102,  -102,  -102,  -102,     9,  -102,  -102,  -102,  -102,
    -102,  -101,    11,  -102,  -102
};

/* YYDEFGOTO[NTERM-NUM].  */
const signed char
yy::SceneParser::yydefgoto_[] =
{
      -1,    15,    16,    17,    18,   106,   107,   119,   120,   112,
      20,    21,    32,    33,    22,    23,    24,    25,    26,    27,
      28,   113,    29,    69,    70
};

/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
   positive, shift that token.  If negative, reduce the rule which
   number is the opposite.  If zero, do what YYDEFACT says.  */
const signed char yy::SceneParser::yytable_ninf_ = -1;
const unsigned char
yy::SceneParser::yytable_[] =
{
      19,    31,    34,   115,    36,    53,    58,    30,    54,    59,
      55,    55,    56,    56,    57,    57,    19,    35,     1,    37,
      38,    39,   132,    41,    40,    68,    42,    71,    72,    99,
      76,    90,   100,    73,    74,    75,   140,   105,   116,   117,
      77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
      87,    88,    89,   125,    92,    93,   123,    94,   126,    95,
      96,    97,    98,   128,   138,    43,   134,   101,     0,    91,
       0,     0,     0,     1,     0,     2,     3,     4,     5,     0,
       0,     0,     0,     0,     6,     0,     0,     0,     7,     0,
       0,     0,     0,     0,     0,   109,     0,     0,   114,     8,
       0,     9,    10,     0,     0,     0,   122,     0,     0,     0,
     121,     0,    11,   127,    12,    13,    14,     0,     0,   133,
     130,     0,     0,     0,   136,   121,     1,     0,     2,     3,
       4,     5,     0,     0,     0,     0,     0,     6,     0,   110,
       0,     7,     0,     0,     0,     1,     0,     2,     3,     4,
       5,     0,     8,     0,     9,    10,     6,     0,     0,     0,
       7,     0,     0,   111,     0,    11,     0,    12,    13,     0,
       0,     8,     0,     9,    10,     0,     0,     0,     0,     0,
       0,     0,   118,     0,    11,     0,    12,    13,     1,     0,
       2,     3,     4,     5,     0,     0,     0,     0,    58,     6,
       0,    59,     0,     7,     0,     0,     0,     0,    60,     0,
       0,     0,     0,     0,     8,     0,     9,    10,    61,    62,
       0,    63,    64,     0,    65,   129,    66,    11,    67,    12,
      13,     1,     0,     2,     3,     4,     5,     0,    44,     0,
       0,     0,     6,     0,     0,     0,     7,    45,    46,    47,
      48,    49,    50,    51,    52,    53,     0,     8,    54,     9,
      10,    55,   103,    56,     0,    57,     0,     0,     0,     0,
       0,    45,    46,    47,    48,    49,    50,    51,    52,    53,
       0,   124,    54,     0,     0,    55,     0,    56,     0,    57,
      45,    46,    47,    48,    49,    50,    51,    52,    53,     0,
     131,    54,     0,     0,    55,     0,    56,     0,    57,    45,
      46,    47,    48,    49,    50,    51,    52,    53,     0,   135,
      54,     0,     0,    55,     0,    56,     0,    57,    45,    46,
      47,    48,    49,    50,    51,    52,    53,     0,   139,    54,
       0,     0,    55,     0,    56,     0,    57,    45,    46,    47,
      48,    49,    50,    51,    52,    53,     0,     0,    54,   108,
       0,    55,     0,    56,     0,    57,    45,    46,    47,    48,
      49,    50,    51,    52,    53,     0,     0,    54,     0,     0,
      55,   102,    56,     0,    57,     0,    45,    46,    47,    48,
      49,    50,    51,    52,    53,     0,     0,    54,     0,     0,
      55,   104,    56,     0,    57,     0,    45,    46,    47,    48,
      49,    50,    51,    52,    53,     0,     0,    54,     0,     0,
      55,   137,    56,     0,    57,     0,    45,    46,    47,    48,
      49,    50,    51,    52,    53,     0,     0,    54,     0,     0,
      55,     0,    56,     0,    57,    45,    46,    47,    48,    49,
      50,    51,    52,    53,     0,     0,    54,     0,     0,    55,
       0,    56,     0,    57
};

/* YYCHECK.  */
const short int
yy::SceneParser::yycheck_[] =
{
       0,     6,     7,   104,     9,    28,     9,    14,    31,    12,
      34,    34,    36,    36,    38,    38,    16,     8,     3,    10,
      14,    14,   123,     3,    14,    30,     0,    15,    10,    15,
      14,     3,    10,    38,    39,    40,   137,     3,    15,    10,
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    16,    59,    60,    43,    62,     3,    64,
      65,    66,    67,    17,    17,    16,   125,    72,    -1,    58,
      -1,    -1,    -1,     3,    -1,     5,     6,     7,     8,    -1,
      -1,    -1,    -1,    -1,    14,    -1,    -1,    -1,    18,    -1,
      -1,    -1,    -1,    -1,    -1,   100,    -1,    -1,   103,    29,
      -1,    31,    32,    -1,    -1,    -1,   111,    -1,    -1,    -1,
     110,    -1,    42,   118,    44,    45,    46,    -1,    -1,   124,
     120,    -1,    -1,    -1,   129,   125,     3,    -1,     5,     6,
       7,     8,    -1,    -1,    -1,    -1,    -1,    14,    -1,    16,
      -1,    18,    -1,    -1,    -1,     3,    -1,     5,     6,     7,
       8,    -1,    29,    -1,    31,    32,    14,    -1,    -1,    -1,
      18,    -1,    -1,    40,    -1,    42,    -1,    44,    45,    -1,
      -1,    29,    -1,    31,    32,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    40,    -1,    42,    -1,    44,    45,     3,    -1,
       5,     6,     7,     8,    -1,    -1,    -1,    -1,     9,    14,
      -1,    12,    -1,    18,    -1,    -1,    -1,    -1,    19,    -1,
      -1,    -1,    -1,    -1,    29,    -1,    31,    32,    29,    30,
      -1,    32,    33,    -1,    35,    40,    37,    42,    39,    44,
      45,     3,    -1,     5,     6,     7,     8,    -1,    11,    -1,
      -1,    -1,    14,    -1,    -1,    -1,    18,    20,    21,    22,
      23,    24,    25,    26,    27,    28,    -1,    29,    31,    31,
      32,    34,    11,    36,    -1,    38,    -1,    -1,    -1,    -1,
      -1,    20,    21,    22,    23,    24,    25,    26,    27,    28,
      -1,    11,    31,    -1,    -1,    34,    -1,    36,    -1,    38,
      20,    21,    22,    23,    24,    25,    26,    27,    28,    -1,
      11,    31,    -1,    -1,    34,    -1,    36,    -1,    38,    20,
      21,    22,    23,    24,    25,    26,    27,    28,    -1,    11,
      31,    -1,    -1,    34,    -1,    36,    -1,    38,    20,    21,
      22,    23,    24,    25,    26,    27,    28,    -1,    11,    31,
      -1,    -1,    34,    -1,    36,    -1,    38,    20,    21,    22,
      23,    24,    25,    26,    27,    28,    -1,    -1,    31,    13,
      -1,    34,    -1,    36,    -1,    38,    20,    21,    22,    23,
      24,    25,    26,    27,    28,    -1,    -1,    31,    -1,    -1,
      34,    15,    36,    -1,    38,    -1,    20,    21,    22,    23,
      24,    25,    26,    27,    28,    -1,    -1,    31,    -1,    -1,
      34,    15,    36,    -1,    38,    -1,    20,    21,    22,    23,
      24,    25,    26,    27,    28,    -1,    -1,    31,    -1,    -1,
      34,    15,    36,    -1,    38,    -1,    20,    21,    22,    23,
      24,    25,    26,    27,    28,    -1,    -1,    31,    -1,    -1,
      34,    -1,    36,    -1,    38,    20,    21,    22,    23,    24,
      25,    26,    27,    28,    -1,    -1,    31,    -1,    -1,    34,
      -1,    36,    -1,    38
};

/* STOS_[STATE-NUM] -- The (internal number of the) accessing
   symbol of state STATE-NUM.  */
const unsigned char
yy::SceneParser::yystos_[] =
{
       0,     3,     5,     6,     7,     8,    14,    18,    29,    31,
      32,    42,    44,    45,    46,    48,    49,    50,    51,    56,
      57,    58,    61,    62,    63,    64,    65,    66,    67,    69,
      14,    57,    59,    60,    57,    62,    57,    62,    14,    14,
      14,     3,     0,    50,    11,    20,    21,    22,    23,    24,
      25,    26,    27,    28,    31,    34,    36,    38,     9,    12,
      19,    29,    30,    32,    33,    35,    37,    39,    57,    70,
      71,    15,    10,    57,    57,    57,    14,    57,    57,    57,
      57,    57,    57,    57,    57,    57,    57,    57,    57,    57,
       3,    69,    57,    57,    57,    57,    57,    57,    57,    15,
      10,    57,    15,    11,    15,     3,    52,    53,    13,    57,
      16,    40,    56,    68,    57,    68,    15,    10,    40,    54,
      55,    56,    57,    43,    11,    16,     3,    57,    17,    40,
      56,    11,    68,    57,    54,    11,    57,    15,    17,    11,
      68
};

#if YYDEBUG
/* TOKEN_NUMBER_[YYLEX-NUM] -- Internal symbol number corresponding
   to YYLEX-NUM.  */
const unsigned short int
yy::SceneParser::yytoken_number_[] =
{
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
     295,   296,   297,   298,   299,   300,   301
};
#endif

/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
const unsigned char
yy::SceneParser::yyr1_[] =
{
       0,    47,    48,    48,    49,    49,    50,    50,    51,    52,
      52,    53,    53,    54,    54,    55,    55,    55,    55,    56,
      56,    56,    56,    57,    57,    57,    57,    57,    58,    59,
      59,    60,    60,    61,    61,    61,    61,    61,    61,    61,
      61,    61,    61,    61,    61,    61,    61,    61,    61,    62,
      62,    62,    62,    62,    63,    63,    63,    63,    63,    63,
      63,    63,    63,    64,    64,    64,    64,    65,    65,    66,
      67,    68,    68,    68,    69,    70,    70,    71,    71
};

/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
const unsigned char
yy::SceneParser::yyr2_[] =
{
       0,     2,     0,     1,     1,     2,     1,     1,     8,     0,
       1,     1,     3,     0,     1,     1,     2,     3,     4,     2,
       1,     1,     1,     1,     1,     1,     1,     1,     3,     0,
       1,     1,     3,     2,     3,     3,     3,     3,     3,     3,
       2,     2,     2,     2,     3,     3,     3,     3,     3,     1,
       1,     3,     3,     4,     2,     3,     3,     3,     3,     3,
       3,     3,     3,     1,     1,     1,     1,     5,     7,     5,
       9,     1,     3,     3,     4,     0,     1,     1,     3
};

#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at \a yyntokens_, nonterminals. */
const char*
const yy::SceneParser::yytname_[] =
{
  "\"end of file\"", "error", "$undefined", "\"identifier\"",
  "\"expression\"", "\"int\"", "\"bool\"", "\"float\"", "\"string\"",
  "\".\"", "\",\"", "\";\"", "\"[\"", "\"]\"", "\"(\"", "\")\"", "\"{\"",
  "\"}\"", "\"!\"", "\"=\"", "\"&&\"", "\"||\"", "\"==\"", "\"!=\"",
  "\"<\"", "\">\"", "\"<=\"", "\">=\"", "\"+\"", "\"++\"", "\"+=\"",
  "\"-\"", "\"--\"", "\"-=\"", "\"*\"", "\"*=\"", "\"/\"", "\"/=\"",
  "\"%\"", "\"%=\"", "\"return\"", "\"null\"", "\"if\"", "\"else\"",
  "\"for\"", "\"while\"", "\"def\"", "$accept", "main", "global_defs",
  "global_def", "def_function", "def_params", "def_param", "instructions",
  "lines", "line", "exp", "list", "list_items", "list_item",
  "arithmetic_exp", "left_exp", "bool_exp", "value", "if",
  "while_statement", "for_statement", "action", "call_function",
  "call_params", "call_param", 0
};
#endif

#if YYDEBUG
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
const yy::SceneParser::rhs_number_type
yy::SceneParser::yyrhs_[] =
{
      48,     0,    -1,    -1,    49,    -1,    50,    -1,    49,    50,
      -1,    56,    -1,    51,    -1,    46,     3,    14,    52,    15,
      16,    54,    17,    -1,    -1,    53,    -1,     3,    -1,    53,
      10,     3,    -1,    -1,    55,    -1,    56,    -1,    55,    56,
      -1,    40,    57,    11,    -1,    55,    40,    57,    11,    -1,
      57,    11,    -1,    65,    -1,    66,    -1,    67,    -1,    64,
      -1,    58,    -1,    63,    -1,    61,    -1,    62,    -1,    14,
      59,    15,    -1,    -1,    60,    -1,    57,    -1,    60,    10,
      57,    -1,    31,    57,    -1,    57,    28,    57,    -1,    57,
      31,    57,    -1,    57,    34,    57,    -1,    57,    36,    57,
      -1,    57,    38,    57,    -1,    62,    19,    57,    -1,    29,
      62,    -1,    62,    29,    -1,    32,    62,    -1,    62,    32,
      -1,    62,    30,    57,    -1,    62,    33,    57,    -1,    62,
      35,    57,    -1,    62,    37,    57,    -1,    62,    39,    57,
      -1,     3,    -1,    69,    -1,    62,     9,     3,    -1,    62,
       9,    69,    -1,    62,    12,    57,    13,    -1,    18,    57,
      -1,    57,    24,    57,    -1,    57,    25,    57,    -1,    57,
      26,    57,    -1,    57,    27,    57,    -1,    57,    22,    57,
      -1,    57,    23,    57,    -1,    57,    20,    57,    -1,    57,
      21,    57,    -1,     5,    -1,     6,    -1,     7,    -1,     8,
      -1,    42,    14,    57,    15,    68,    -1,    42,    14,    57,
      15,    68,    43,    68,    -1,    45,    14,    57,    15,    68,
      -1,    44,    14,    57,    11,    57,    11,    57,    15,    68,
      -1,    56,    -1,    40,    57,    11,    -1,    16,    54,    17,
      -1,     3,    14,    70,    15,    -1,    -1,    71,    -1,    57,
      -1,    71,    10,    57,    -1
};

/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
   YYRHS.  */
const unsigned char
yy::SceneParser::yyprhs_[] =
{
       0,     0,     3,     4,     6,     8,    11,    13,    15,    24,
      25,    27,    29,    33,    34,    36,    38,    41,    45,    50,
      53,    55,    57,    59,    61,    63,    65,    67,    69,    73,
      74,    76,    78,    82,    85,    89,    93,    97,   101,   105,
     109,   112,   115,   118,   121,   125,   129,   133,   137,   141,
     143,   145,   149,   153,   158,   161,   165,   169,   173,   177,
     181,   185,   189,   193,   195,   197,   199,   201,   207,   215,
     221,   231,   233,   237,   241,   246,   247,   249,   251
};

/* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
const unsigned char
yy::SceneParser::yyrline_[] =
{
       0,   110,   110,   111,   114,   115,   117,   118,   121,   123,
     124,   125,   126,   129,   130,   134,   135,   136,   137,   140,
     141,   142,   143,   153,   154,   155,   156,   157,   160,   161,
     162,   163,   164,   167,   168,   169,   170,   171,   172,   173,
     174,   175,   176,   177,   178,   179,   180,   181,   182,   184,
     185,   186,   187,   188,   191,   192,   193,   194,   195,   196,
     197,   198,   199,   202,   203,   204,   205,   208,   209,   212,
     213,   216,   217,   218,   221,   222,   223,   224,   225
};

// Print the state stack on the debug stream.
void
yy::SceneParser::yystack_print_ ()
{
  *yycdebug_ << "Stack now";
  for (state_stack_type::const_iterator i = yystate_stack_.begin ();
       i != yystate_stack_.end (); ++i)
    *yycdebug_ << ' ' << *i;
  *yycdebug_ << std::endl;
}

// Report on the debug stream that the rule \a yyrule is going to be reduced.
void
yy::SceneParser::yyreduce_print_ (int yyrule)
{
  unsigned int yylno = yyrline_[yyrule];
  /* Print the symbols being reduced, and their result.  */
  *yycdebug_ << "Reducing stack by rule " << yyn_ - 1
             << " (line " << yylno << "), ";
  for (unsigned char i = yyprhs_[yyn_];
       0 <= yyrhs_[i]; ++i)
    *yycdebug_ << yytname_[yyrhs_[i]] << ' ';
  *yycdebug_ << "-> " << yytname_[yyr1_[yyn_]] << std::endl;
}
#endif // YYDEBUG

/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
yy::SceneParser::token_number_type
yy::SceneParser::yytranslate_ (int token)
{
  static
  const token_number_type
  translate_table[] =
  {
         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
  };
  if ((unsigned int) token <= yyuser_token_number_max_)
    return translate_table[token];
  else
    return yyundef_token_;
}

const int yy::SceneParser::yyeof_ = 0;
const int yy::SceneParser::yylast_ = 463;
const int yy::SceneParser::yynnts_ = 25;
const int yy::SceneParser::yyempty_ = -2;
const int yy::SceneParser::yyfinal_ = 42;
const int yy::SceneParser::yyterror_ = 1;
const int yy::SceneParser::yyerrcode_ = 256;
const int yy::SceneParser::yyntokens_ = 47;

const unsigned int yy::SceneParser::yyuser_token_number_max_ = 301;
const yy::SceneParser::token_number_type yy::SceneParser::yyundef_token_ = 2;

#line 227 ".\\Code\\Scene Parser\\scene.y"


// Method to report erorrs in the parsing.
void yy::SceneParser::error(const yy::SceneParser::location_type& l, const std::string& m) {
	driver.error (l, m);
}

