/// <summary>
        ///
        /// </summary>
        /// <param name="list"></param>
        /// <param name="response"></param>
        /// <returns></returns>
        protected override bool parseListSize(System.Int32[] list, System.IO.MemoryStream response)
        {
            System.Object[] tmplist = new System.Object[list.Length];
            bool            error   = !this.parseUntaggedResponse(response, tmplist, "RFC822.SIZE", anmar.SharpWebMail.EmailClientCommand.ListSize);

            if (!error)
            {
                tmplist.CopyTo(list, 0);
            }
            return(!error);
        }
Esempio n. 2
0
        private DocsPAWA.DocsPaWR.Corrispondente[] pf_getCorrispondentiFiltrati(DocsPAWA.DocsPaWR.Corrispondente[] corrispondenti)
        {
            string l_oldSystemId = "";

            System.Object[]  l_objects       = new System.Object[0];
            System.Object[]  l_objects_ruoli = new System.Object[0];
            DocsPaWR.Ruolo[] lruolo          = new DocsPAWA.DocsPaWR.Ruolo[0];
            int i = 0;

            foreach (DocsPAWA.DocsPaWR.Corrispondente t_corrispondente in corrispondenti)
            {
                string t_systemId = t_corrispondente.systemId;
                if (t_systemId != l_oldSystemId)
                {
                    l_objects     = Utils.addToArray(l_objects, t_corrispondente);
                    l_oldSystemId = t_systemId;
                    i             = i + 1;
                    continue;
                }
                else
                {
                    /* il corrispondente non viene aggiunto, in quanto sarebbe un duplicato
                     * ma viene aggiunto solamente il ruolo */

                    if (t_corrispondente.GetType().Equals(typeof(DocsPAWA.DocsPaWR.Utente)))
                    {
                        if ((l_objects[i - 1]).GetType().Equals(typeof(DocsPAWA.DocsPaWR.Utente)))
                        {
                            l_objects_ruoli = ((Utils.addToArray(((DocsPAWA.DocsPaWR.Utente)(l_objects[i - 1])).ruoli, ((DocsPAWA.DocsPaWR.Utente)t_corrispondente).ruoli[0])));
                            DocsPaWR.Ruolo[] l_ruolo = new DocsPAWA.DocsPaWR.Ruolo[l_objects_ruoli.Length];
                            ((DocsPAWA.DocsPaWR.Utente)(l_objects[i - 1])).ruoli = l_ruolo;
                            l_objects_ruoli.CopyTo(((DocsPAWA.DocsPaWR.Utente)(l_objects[i - 1])).ruoli, 0);
                        }
                    }
                }
            }

            DocsPaWR.Corrispondente[] l_corrSearch = new DocsPAWA.DocsPaWR.Corrispondente[l_objects.Length];
            l_objects.CopyTo(l_corrSearch, 0);

            return(l_corrSearch);
        }
Esempio n. 3
0
  /** the generated parser.
      Maintains a state and a value stack, currently with fixed maximum size.
      @param yyLex scanner.
      @return result of the last reduction, if any.
      @throws yyException on irrecoverable parse error.
    */
  public Object yyparse (yyParser.yyInput yyLex)
				{
    if (yyMax <= 0) yyMax = 256;			// initial size
    int yyState = 0;                                   // state stack ptr
    int [] yyStates = new int[yyMax];	                // state stack 
    Object yyVal = null;                               // value stack ptr
    Object [] yyVals = new Object[yyMax];	        // value stack
    int yyToken = -1;					// current input
    int yyErrorFlag = 0;				// #tks to shift

    int yyTop = 0;
    goto skip;
    yyLoop:
    yyTop++;
    skip:
    for (;; ++ yyTop) {
      if (yyTop >= yyStates.Length) {			// dynamically increase
        int[] i = new int[yyStates.Length+yyMax];
        yyStates.CopyTo (i, 0);
        yyStates = i;
        Object[] o = new Object[yyVals.Length+yyMax];
        yyVals.CopyTo (o, 0);
        yyVals = o;
      }
      yyStates[yyTop] = yyState;
      yyVals[yyTop] = yyVal;
//t      if (debug != null) debug.push(yyState, yyVal);

      yyDiscarded: for (;;) {	// discarding a token does not change stack
        int yyN;
        if ((yyN = yyDefRed[yyState]) == 0) {	// else [default] reduce (yyN)
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
//t            if (debug != null)
//t              debug.lex(yyState, yyToken, yyname(yyToken), yyLex.value());
          }
          if ((yyN = yySindex[yyState]) != 0 && ((yyN += yyToken) >= 0)
              && (yyN < yyTable.Length) && (yyCheck[yyN] == yyToken)) {
//t            if (debug != null)
//t              debug.shift(yyState, yyTable[yyN], yyErrorFlag-1);
            yyState = yyTable[yyN];		// shift to yyN
            yyVal = yyLex.value();
            yyToken = -1;
            if (yyErrorFlag > 0) -- yyErrorFlag;
            goto yyLoop;
          }
          if ((yyN = yyRindex[yyState]) != 0 && (yyN += yyToken) >= 0
              && yyN < yyTable.Length && yyCheck[yyN] == yyToken)
            yyN = yyTable[yyN];			// reduce (yyN)
          else
            switch (yyErrorFlag) {
  
            case 0:
              yyerror("syntax error", yyExpecting(yyState));
//t              if (debug != null) debug.error("syntax error");
              goto case 1;
            case 1: case 2:
              yyErrorFlag = 3;
              do {
                if ((yyN = yySindex[yyStates[yyTop]]) != 0
                    && (yyN += Token.yyErrorCode) >= 0 && yyN < yyTable.Length
                    && yyCheck[yyN] == Token.yyErrorCode) {
//t                  if (debug != null)
//t                    debug.shift(yyStates[yyTop], yyTable[yyN], 3);
                  yyState = yyTable[yyN];
                  yyVal = yyLex.value();
                  goto yyLoop;
                }
//t                if (debug != null) debug.pop(yyStates[yyTop]);
              } while (-- yyTop >= 0);
//t              if (debug != null) debug.reject();
              throw new yyParser.yyException("irrecoverable syntax error");
  
            case 3:
              if (yyToken == 0) {
//t                if (debug != null) debug.reject();
                throw new yyParser.yyException("irrecoverable syntax error at end-of-file");
              }
//t              if (debug != null)
//t                debug.discard(yyState, yyToken, yyname(yyToken),
//t  							yyLex.value());
              yyToken = -1;
              goto yyDiscarded;		// leave stack alone
            }
        }
        int yyV = yyTop + 1-yyLen[yyN];
//t        if (debug != null)
//t          debug.reduce(yyState, yyStates[yyV-1], yyN, yyRule[yyN], yyLen[yyN]);
        yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
        switch (yyN) {
case 1:
#line 217 "XQuery.y"
  {
     notation.ConfirmTag(Tag.Module, Descriptor.Root, yyVals[0+yyTop]);
     yyVal = notation.ResolveTag(Tag.Module);	 
  }
  break;
case 2:
#line 222 "XQuery.y"
  {
	 notation.ConfirmTag(Tag.Module, Descriptor.Root, yyVals[0+yyTop]);	 
	 yyVal = notation.ResolveTag(Tag.Module);	 
  }
  break;
case 3:
#line 227 "XQuery.y"
  {
     notation.ConfirmTag(Tag.Module, Descriptor.Root, yyVals[0+yyTop]);	 
     yyVal = notation.ResolveTag(Tag.Module);	 
  }
  break;
case 4:
#line 232 "XQuery.y"
  {
	 notation.ConfirmTag(Tag.Module, Descriptor.Root, yyVals[0+yyTop]);	 
	 yyVal = notation.ResolveTag(Tag.Module);	 
  }
  break;
case 5:
#line 240 "XQuery.y"
  {
     notation.ConfirmTag(Tag.Module, Descriptor.Version, yyVals[-1+yyTop], null);
  }
  break;
case 6:
#line 244 "XQuery.y"
  {
     notation.ConfirmTag(Tag.Module, Descriptor.Version, yyVals[-3+yyTop], yyVals[-1+yyTop]);
  }
  break;
case 7:
#line 251 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.Query, yyVals[-1+yyTop], yyVals[0+yyTop]);
  }
  break;
case 8:
#line 258 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.Library, yyVals[-1+yyTop], yyVals[0+yyTop]);
  }
  break;
case 9:
#line 265 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.ModuleNamespace, yyVals[-3+yyTop], yyVals[-1+yyTop]);
  }
  break;
case 10:
#line 272 "XQuery.y"
  {
     yyVal = null;
  }
  break;
case 13:
#line 278 "XQuery.y"
  {
     yyVal = Lisp.Append(yyVals[-1+yyTop], yyVals[0+yyTop]);
  }
  break;
case 14:
#line 285 "XQuery.y"
  {
      yyVal = Lisp.Cons(yyVals[-1+yyTop]);
   }
  break;
case 15:
#line 289 "XQuery.y"
  {
      yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[-1+yyTop]));
   }
  break;
case 16:
#line 296 "XQuery.y"
  {
      yyVal = Lisp.Cons(yyVals[-1+yyTop]);
   }
  break;
case 17:
#line 300 "XQuery.y"
  {
      yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[-1+yyTop]));
   }
  break;
case 35:
#line 339 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.Namespace, yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 36:
#line 346 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Module), 
		Descriptor.BoundarySpace, new TokenWrapper(Token.PRESERVE));
  }
  break;
case 37:
#line 351 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Module), 
		Descriptor.BoundarySpace, new TokenWrapper(Token.STRIP));  
  }
  break;
case 38:
#line 359 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.DefaultElement, yyVals[0+yyTop]);
  }
  break;
case 39:
#line 363 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.DefaultFunction, yyVals[0+yyTop]);
  }
  break;
case 40:
#line 370 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.OptionDecl, yyVals[-1+yyTop], yyVals[0+yyTop]);
  }
  break;
case 41:
#line 377 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Module), 
		Descriptor.Ordering, new TokenWrapper(Token.ORDERED));  
  }
  break;
case 42:
#line 382 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Module), 
		Descriptor.Ordering, new TokenWrapper(Token.UNORDERED));  
  }
  break;
case 43:
#line 390 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Module), 
		Descriptor.DefaultOrder, new TokenWrapper(Token.EMPTY_GREATEST));  
  }
  break;
case 44:
#line 395 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Module), 
		Descriptor.DefaultOrder, new TokenWrapper(Token.EMPTY_LEAST));  
  }
  break;
case 45:
#line 403 "XQuery.y"
  {
	  yyVal = notation.Confirm(new Symbol(Tag.Module), 
	    Descriptor.CopyNamespace, yyVals[-2+yyTop], yyVals[0+yyTop]); 
  }
  break;
case 46:
#line 411 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.PRESERVE);
  }
  break;
case 47:
#line 415 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.NO_PRESERVE);
  }
  break;
case 48:
#line 422 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.INHERIT);
  }
  break;
case 49:
#line 426 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.NO_INHERIT);
  }
  break;
case 50:
#line 433 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.DefaultCollation, yyVals[0+yyTop]);
  }
  break;
case 51:
#line 440 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.BaseUri, yyVals[0+yyTop]);
  }
  break;
case 52:
#line 447 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Module), 
         Descriptor.ImportSchema, yyVals[-1+yyTop], yyVals[0+yyTop], null);
  }
  break;
case 53:
#line 452 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Module), 
         Descriptor.ImportSchema, yyVals[-3+yyTop], yyVals[-2+yyTop], yyVals[0+yyTop]);  
  }
  break;
case 54:
#line 460 "XQuery.y"
  { 
     yyVal = null;
  }
  break;
case 56:
#line 468 "XQuery.y"
  {
     yyVal = Lisp.Cons(yyVals[0+yyTop]);
  }
  break;
case 57:
#line 472 "XQuery.y"
  {
     yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
  }
  break;
case 58:
#line 479 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.Namespace, yyVals[-1+yyTop]);
  }
  break;
case 59:
#line 483 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.DefaultElement);
  }
  break;
case 60:
#line 490 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.ImportModule, yyVals[-1+yyTop], yyVals[0+yyTop]);
  }
  break;
case 61:
#line 494 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.ImportModule, yyVals[-3+yyTop], yyVals[-1+yyTop], yyVals[0+yyTop]);
  }
  break;
case 62:
#line 501 "XQuery.y"
  {
     yyVal = null;
  }
  break;
case 63:
#line 505 "XQuery.y"
  {
     yyVal = yyVals[0+yyTop];
  }
  break;
case 64:
#line 511 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.VarDecl, yyVals[-4+yyTop], yyVals[-3+yyTop], yyVals[0+yyTop]); 
  }
  break;
case 65:
#line 515 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.VarDecl, yyVals[-2+yyTop], yyVals[-1+yyTop]); 
  }
  break;
case 66:
#line 522 "XQuery.y"
  {
     yyVal = null;
  }
  break;
case 68:
#line 530 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.ConstructionDecl, 
		new TokenWrapper(Token.PRESERVE));
  }
  break;
case 69:
#line 535 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.ConstructionDecl, 
		new TokenWrapper(Token.STRIP));
  }
  break;
case 70:
#line 543 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.DeclareFunction, yyVals[-4+yyTop], yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 71:
#line 547 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Module), Descriptor.DeclareFunction, yyVals[-6+yyTop], yyVals[-4+yyTop], yyVals[-1+yyTop], yyVals[0+yyTop]);
  }
  break;
case 73:
#line 555 "XQuery.y"
  {
     yyVal = null;
  }
  break;
case 74:
#line 562 "XQuery.y"
  {
     yyVal = null;
  }
  break;
case 76:
#line 570 "XQuery.y"
  {
     yyVal = Lisp.Cons(yyVals[0+yyTop]);
  }
  break;
case 77:
#line 574 "XQuery.y"
  {
     yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
  }
  break;
case 78:
#line 581 "XQuery.y"
  {
     yyVal = yyVals[0+yyTop];
  }
  break;
case 79:
#line 585 "XQuery.y"
  {
     yyVal = yyVals[-1+yyTop];
     notation.Confirm((Symbol)yyVals[-1+yyTop], Descriptor.TypeDecl, yyVals[0+yyTop]);
  }
  break;
case 80:
#line 593 "XQuery.y"
  {
     yyVal = yyVals[-1+yyTop];
  }
  break;
case 82:
#line 604 "XQuery.y"
  {
     yyVal = Lisp.Cons(yyVals[0+yyTop]);
  }
  break;
case 83:
#line 608 "XQuery.y"
  {
     yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
  }
  break;
case 89:
#line 623 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.FLWORExpr, yyVals[-2+yyTop], null, null, yyVals[0+yyTop]);
  }
  break;
case 90:
#line 627 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.FLWORExpr, yyVals[-3+yyTop], yyVals[-2+yyTop], null, yyVals[0+yyTop]);
  }
  break;
case 91:
#line 631 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.FLWORExpr, yyVals[-3+yyTop], null, yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 92:
#line 635 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.FLWORExpr, yyVals[-4+yyTop], yyVals[-3+yyTop], yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 93:
#line 642 "XQuery.y"
  {
     yyVal = Lisp.Cons(yyVals[0+yyTop]);
  }
  break;
case 94:
#line 646 "XQuery.y"
  {
     yyVal = Lisp.Cons(yyVals[0+yyTop]);
  }
  break;
case 95:
#line 650 "XQuery.y"
  {
     yyVal = Lisp.Append(yyVals[-1+yyTop], Lisp.Cons(yyVals[0+yyTop]));
  }
  break;
case 96:
#line 654 "XQuery.y"
  {
     yyVal = Lisp.Append(yyVals[-1+yyTop], Lisp.Cons(yyVals[0+yyTop]));
  }
  break;
case 97:
#line 661 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.For, yyVals[0+yyTop]);
  }
  break;
case 98:
#line 665 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.For, yyVals[0+yyTop]);
	 notation.Confirm((Symbol)yyVal, Descriptor.Parallel);
  }
  break;
case 99:
#line 673 "XQuery.y"
  {
     yyVal = Lisp.Cons(yyVals[0+yyTop]);
  }
  break;
case 100:
#line 677 "XQuery.y"
  {
     yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
  }
  break;
case 101:
#line 684 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.ForClauseOperator, yyVals[-4+yyTop], yyVals[-3+yyTop], yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 102:
#line 691 "XQuery.y"
  {
     yyVal = null;
  }
  break;
case 104:
#line 699 "XQuery.y"
  {
     yyVal = yyVals[0+yyTop];
  }
  break;
case 105:
#line 706 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Let, yyVals[0+yyTop]);
  }
  break;
case 106:
#line 713 "XQuery.y"
  {
     yyVal = Lisp.Cons(yyVals[0+yyTop]);
  }
  break;
case 107:
#line 717 "XQuery.y"
  {
     yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
  }
  break;
case 108:
#line 724 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.LetClauseOperator, yyVals[-4+yyTop], yyVals[-3+yyTop], yyVals[0+yyTop]);
  }
  break;
case 109:
#line 731 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Where, yyVals[0+yyTop]);
  }
  break;
case 110:
#line 738 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.OrderBy, yyVals[0+yyTop]);
  }
  break;
case 111:
#line 742 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.StableOrderBy, yyVals[0+yyTop]);
  }
  break;
case 112:
#line 749 "XQuery.y"
  {
     yyVal = Lisp.Cons(yyVals[0+yyTop]);
  }
  break;
case 113:
#line 753 "XQuery.y"
  {
     yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
  }
  break;
case 115:
#line 761 "XQuery.y"
  {
     yyVal = yyVals[-1+yyTop];
     notation.Confirm((Symbol)yyVals[-1+yyTop], Descriptor.Modifier, yyVals[0+yyTop]);
  }
  break;
case 116:
#line 769 "XQuery.y"
  {
     yyVal = Lisp.List(yyVals[0+yyTop], null, null);
  }
  break;
case 117:
#line 773 "XQuery.y"
  {
     yyVal = Lisp.List(null, null, yyVals[0+yyTop]);
  }
  break;
case 118:
#line 777 "XQuery.y"
  {
     yyVal = Lisp.List(yyVals[-1+yyTop], yyVals[0+yyTop], null);
  }
  break;
case 119:
#line 781 "XQuery.y"
  {
     yyVal = Lisp.List(yyVals[-2+yyTop], null, yyVals[0+yyTop]);
  }
  break;
case 120:
#line 785 "XQuery.y"
  {
     yyVal = Lisp.List(yyVals[-3+yyTop], yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 121:
#line 789 "XQuery.y"
  {
     yyVal = Lisp.List(null, yyVals[0+yyTop], null);
  }
  break;
case 122:
#line 793 "XQuery.y"
  {
     yyVal = Lisp.List(null, yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 123:
#line 800 "XQuery.y"
  {
     yyVal = new TokenWrapper(Token.ASCENDING);
  }
  break;
case 124:
#line 804 "XQuery.y"
  {
     yyVal = new TokenWrapper(Token.DESCENDING);
  }
  break;
case 125:
#line 811 "XQuery.y"
  {
     yyVal = new TokenWrapper(Token.EMPTY_GREATEST); 
  }
  break;
case 126:
#line 815 "XQuery.y"
  {
     yyVal = new TokenWrapper(Token.EMPTY_LEAST); 
  }
  break;
case 127:
#line 822 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Some, yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 128:
#line 826 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Every, yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 129:
#line 833 "XQuery.y"
  {
     yyVal = Lisp.Cons(yyVals[0+yyTop]);
  }
  break;
case 130:
#line 837 "XQuery.y"
  {
     yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
  }
  break;
case 131:
#line 844 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.QuantifiedExprOper, yyVals[-3+yyTop], yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 132:
#line 851 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Typeswitch, yyVals[-5+yyTop], yyVals[-3+yyTop], yyVals[0+yyTop]); 
  }
  break;
case 133:
#line 855 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Typeswitch, yyVals[-7+yyTop], yyVals[-5+yyTop], yyVals[-2+yyTop], yyVals[0+yyTop]); 
  }
  break;
case 134:
#line 862 "XQuery.y"
  {
     yyVal = Lisp.Cons(yyVals[0+yyTop]);
  }
  break;
case 135:
#line 866 "XQuery.y"
  {
     yyVal = Lisp.Append(yyVals[-1+yyTop], Lisp.Cons(yyVals[0+yyTop]));
  }
  break;
case 136:
#line 873 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Case, yyVals[-4+yyTop], yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 137:
#line 877 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Case, yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 138:
#line 884 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.If, yyVals[-5+yyTop], yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 140:
#line 892 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Or, yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 142:
#line 900 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.And, yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 144:
#line 908 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), 
		Descriptor.ValueComp, yyVals[-2+yyTop], yyVals[-1+yyTop], yyVals[0+yyTop]);
  }
  break;
case 145:
#line 913 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), 
		Descriptor.GeneralComp, yyVals[-2+yyTop], yyVals[-1+yyTop], yyVals[0+yyTop]);
  }
  break;
case 146:
#line 918 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), 
		Descriptor.NodeComp, yyVals[-2+yyTop], yyVals[-1+yyTop], yyVals[0+yyTop]);
  }
  break;
case 148:
#line 927 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr),
        Descriptor.Range, yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 150:
#line 936 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr),
        Descriptor.Add, yyVals[-2+yyTop], new TokenWrapper('+'), yyVals[0+yyTop]);
  }
  break;
case 151:
#line 941 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr),
        Descriptor.Add, yyVals[-2+yyTop], new TokenWrapper('-'), yyVals[0+yyTop]);
  }
  break;
case 153:
#line 950 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr),
        Descriptor.Mul, yyVals[-2+yyTop], new TokenWrapper(Token.ML), yyVals[0+yyTop]);
  }
  break;
case 154:
#line 955 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr),
        Descriptor.Mul, yyVals[-2+yyTop], new TokenWrapper(Token.DIV), yyVals[0+yyTop]);
  }
  break;
case 155:
#line 960 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr),
        Descriptor.Mul, yyVals[-2+yyTop], new TokenWrapper(Token.IDIV), yyVals[0+yyTop]);
  }
  break;
case 156:
#line 965 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr),
        Descriptor.Mul, yyVals[-2+yyTop], new TokenWrapper(Token.MOD), yyVals[0+yyTop]);
  }
  break;
case 158:
#line 974 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr),
        Descriptor.Union, yyVals[-2+yyTop], yyVals[0+yyTop]);  
  }
  break;
case 159:
#line 979 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr),
        Descriptor.Concatenate, yyVals[-2+yyTop], yyVals[0+yyTop]);  
  }
  break;
case 161:
#line 988 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr),
        Descriptor.IntersectExcept, yyVals[-2+yyTop], new TokenWrapper(Token.INTERSECT), yyVals[0+yyTop]);  
  }
  break;
case 162:
#line 993 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr),
        Descriptor.IntersectExcept, yyVals[-2+yyTop], new TokenWrapper(Token.EXCEPT), yyVals[0+yyTop]);  
  }
  break;
case 164:
#line 1002 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.InstanceOf, yyVals[-2+yyTop], yyVals[0+yyTop]);    
  }
  break;
case 166:
#line 1010 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.TreatAs, yyVals[-2+yyTop], yyVals[0+yyTop]);    
  }
  break;
case 168:
#line 1018 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.CastableAs, yyVals[-2+yyTop], yyVals[0+yyTop]);    
  }
  break;
case 170:
#line 1026 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.CastAs, yyVals[-2+yyTop], yyVals[0+yyTop]);    
  }
  break;
case 171:
#line 1033 "XQuery.y"
  {
     if (yyVals[-1+yyTop] == null)
       yyVal = yyVals[0+yyTop];
     else
       yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Unary, yyVals[-1+yyTop], yyVals[0+yyTop]);
  }
  break;
case 172:
#line 1043 "XQuery.y"
  {
     yyVal = null;
  }
  break;
case 173:
#line 1047 "XQuery.y"
  {
     yyVal = Lisp.Append(Lisp.Cons(new TokenWrapper('+')), yyVals[0+yyTop]);
  }
  break;
case 174:
#line 1051 "XQuery.y"
  {
     yyVal = Lisp.Append(Lisp.Cons(new TokenWrapper('-')), yyVals[0+yyTop]);
  }
  break;
case 175:
#line 1058 "XQuery.y"
  {
     yyVal = new Literal("=");
  }
  break;
case 176:
#line 1062 "XQuery.y"
  {
     yyVal = new Literal("!=");
  }
  break;
case 177:
#line 1066 "XQuery.y"
  {
     yyVal = new Literal("<");
  }
  break;
case 178:
#line 1070 "XQuery.y"
  {
     yyVal = new Literal("<=");
  }
  break;
case 179:
#line 1074 "XQuery.y"
  {
     yyVal = new Literal(">");
  }
  break;
case 180:
#line 1078 "XQuery.y"
  {
     yyVal = new Literal(">=");
  }
  break;
case 181:
#line 1085 "XQuery.y"
  {
     yyVal = new TokenWrapper(Token.EQ);
  }
  break;
case 182:
#line 1089 "XQuery.y"
  {
     yyVal = new TokenWrapper(Token.NE);
  }
  break;
case 183:
#line 1093 "XQuery.y"
  {
     yyVal = new TokenWrapper(Token.LT);
  }
  break;
case 184:
#line 1097 "XQuery.y"
  {
     yyVal = new TokenWrapper(Token.LE);
  }
  break;
case 185:
#line 1101 "XQuery.y"
  {
     yyVal = new TokenWrapper(Token.GT);
  }
  break;
case 186:
#line 1105 "XQuery.y"
  {
     yyVal = new TokenWrapper(Token.GE);
  }
  break;
case 187:
#line 1112 "XQuery.y"
  {
     yyVal = new TokenWrapper(Token.IS);
  }
  break;
case 188:
#line 1116 "XQuery.y"
  {
     yyVal = new Literal("<<");
  }
  break;
case 189:
#line 1120 "XQuery.y"
  {
     yyVal = new Literal(">>");
  }
  break;
case 193:
#line 1134 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Validate, null, yyVals[-1+yyTop]);
  }
  break;
case 194:
#line 1138 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Validate, yyVals[-3+yyTop], yyVals[-1+yyTop]);
  }
  break;
case 195:
#line 1145 "XQuery.y"
  {
     yyVal = new TokenWrapper(Token.LAX);
  }
  break;
case 196:
#line 1149 "XQuery.y"
  {
     yyVal = new TokenWrapper(Token.STRICT);
  }
  break;
case 197:
#line 1156 "XQuery.y"
  {
     yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.ExtensionExpr, yyVals[-3+yyTop], yyVals[-1+yyTop]);
  }
  break;
case 198:
#line 1163 "XQuery.y"
  {
     yyVal = Lisp.Cons(yyVals[0+yyTop]);
  }
  break;
case 199:
#line 1167 "XQuery.y"
  {
     yyVal = Lisp.Append(yyVals[-1+yyTop], Lisp.Cons(yyVals[0+yyTop]));
  }
  break;
case 200:
#line 1174 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Pragma, yyVals[-2+yyTop], new Literal(yyVals[-1+yyTop]));
   }
  break;
case 201:
#line 1181 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Child, new object[] { null });
  }
  break;
case 202:
#line 1185 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Child, yyVals[0+yyTop]);
  }
  break;
case 203:
#line 1189 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Descendant, yyVals[0+yyTop]);
  }
  break;
case 206:
#line 1198 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Child, yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 207:
#line 1202 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Descendant, yyVals[-2+yyTop], yyVals[0+yyTop]);
  }
  break;
case 208:
#line 1209 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.AxisStep, yyVals[0+yyTop]);
  }
  break;
case 209:
#line 1213 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.FilterExpr, yyVals[0+yyTop]);
  }
  break;
case 211:
#line 1221 "XQuery.y"
  {
      yyVal = yyVals[-1+yyTop];
      notation.Confirm((Symbol)yyVals[-1+yyTop], Descriptor.PredicateList, yyVals[0+yyTop]);
  }
  break;
case 213:
#line 1227 "XQuery.y"
  {
      yyVal = yyVals[-1+yyTop];
      notation.Confirm((Symbol)yyVals[-1+yyTop], Descriptor.PredicateList, yyVals[0+yyTop]);
  }
  break;
case 214:
#line 1235 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.ForwardStep, yyVals[-1+yyTop], yyVals[0+yyTop]);
   }
  break;
case 216:
#line 1243 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.AXIS_CHILD);
   }
  break;
case 217:
#line 1247 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.AXIS_DESCENDANT);
   }
  break;
case 218:
#line 1251 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.AXIS_ATTRIBUTE);
   }
  break;
case 219:
#line 1255 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.AXIS_SELF);
   }
  break;
case 220:
#line 1259 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.AXIS_DESCENDANT_OR_SELF);
   }
  break;
case 221:
#line 1263 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.AXIS_FOLLOWING_SIBLING);
   }
  break;
case 222:
#line 1267 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.AXIS_FOLLOWING);
   }
  break;
case 223:
#line 1271 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.AXIS_NAMESPACE);
   }
  break;
case 224:
#line 1278 "XQuery.y"
  {  
	  yyVal = notation.Confirm((Symbol)yyVals[0+yyTop], Descriptor.AbbrevForward, yyVals[0+yyTop]); 
   }
  break;
case 226:
#line 1286 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.ReverseStep, yyVals[-1+yyTop], yyVals[0+yyTop]);
   }
  break;
case 228:
#line 1294 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.AXIS_PARENT);
   }
  break;
case 229:
#line 1298 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.AXIS_ANCESTOR);
   }
  break;
case 230:
#line 1302 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.AXIS_PRECEDING_SIBLING);
   }
  break;
case 231:
#line 1306 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.AXIS_PRECEDING);
   }
  break;
case 232:
#line 1310 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.AXIS_ANCESTOR_OR_SELF);
   }
  break;
case 233:
#line 1317 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.DOUBLE_PERIOD);
   }
  break;
case 238:
#line 1334 "XQuery.y"
  {
      yyVal = new TokenWrapper('*');
   }
  break;
case 239:
#line 1338 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Wildcard1, yyVals[-2+yyTop]);
   }
  break;
case 240:
#line 1342 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Wildcard2, yyVals[0+yyTop]);
   }
  break;
case 242:
#line 1350 "XQuery.y"
  {
      yyVal = yyVals[-1+yyTop];
      notation.Confirm((Symbol)yyVals[-1+yyTop], Descriptor.PredicateList, yyVals[0+yyTop]);
   }
  break;
case 243:
#line 1358 "XQuery.y"
  {
      yyVal = Lisp.Cons(yyVals[0+yyTop]);
   }
  break;
case 244:
#line 1362 "XQuery.y"
  {
      yyVal = Lisp.Append(yyVals[-1+yyTop], Lisp.Cons(yyVals[0+yyTop]));
   }
  break;
case 245:
#line 1369 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Predicate, yyVals[-1+yyTop]);
   }
  break;
case 259:
#line 1398 "XQuery.y"
  {
      yyVal = yyVals[0+yyTop];
   }
  break;
case 260:
#line 1405 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.ParenthesizedExpr, new object[] { null });
   }
  break;
case 261:
#line 1409 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.ParenthesizedExpr, yyVals[-1+yyTop]);
   }
  break;
case 262:
#line 1416 "XQuery.y"
  {
      yyVal = new TokenWrapper('.');
   }
  break;
case 263:
#line 1423 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Ordered, yyVals[-1+yyTop]);
   }
  break;
case 264:
#line 1430 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Unordered, yyVals[-1+yyTop]);
   }
  break;
case 265:
#line 1437 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Funcall, yyVals[-2+yyTop], null);
   }
  break;
case 266:
#line 1441 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Funcall, yyVals[-3+yyTop], yyVals[-1+yyTop]);
   }
  break;
case 267:
#line 1448 "XQuery.y"
  {
      yyVal = Lisp.Cons(yyVals[0+yyTop]);
   }
  break;
case 268:
#line 1452 "XQuery.y"
  {
      yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
   }
  break;
case 274:
#line 1470 "XQuery.y"
  {
       yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirElemConstructor, yyVals[-3+yyTop], yyVals[-2+yyTop]);
   }
  break;
case 275:
#line 1474 "XQuery.y"
  {
       yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirElemConstructor, yyVals[-3+yyTop], null);
   }
  break;
case 276:
#line 1478 "XQuery.y"
  {
       if (!yyVals[-7+yyTop].Equals(yyVals[-2+yyTop]))
	     throw new XQueryException(Properties.Resources.XPST0003, 
		   String.Format("The end tag '{0}' does not match the start tag '{1}'", yyVals[-2+yyTop], yyVals[-7+yyTop]));
       yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirElemConstructor, 
		 yyVals[-7+yyTop], yyVals[-6+yyTop], null, yyVals[-2+yyTop], yyVals[-1+yyTop]);
   }
  break;
case 277:
#line 1486 "XQuery.y"
  {
       if (!yyVals[-7+yyTop].Equals(yyVals[-2+yyTop]))
	     throw new XQueryException(Properties.Resources.XPST0003, 
		   String.Format("The end tag '{0}' does not match the start tag '{1}'", yyVals[-2+yyTop], yyVals[-7+yyTop]));
       yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirElemConstructor, 
		 yyVals[-7+yyTop], null, null, yyVals[-2+yyTop], yyVals[-1+yyTop]);
   }
  break;
case 278:
#line 1494 "XQuery.y"
  {
       if (!yyVals[-8+yyTop].Equals(yyVals[-2+yyTop]))
	     throw new XQueryException(Properties.Resources.XPST0003, 
		   String.Format("The end tag '{0}' does not match the start tag '{1}'", yyVals[-2+yyTop], yyVals[-8+yyTop]));
       yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirElemConstructor, 
		 yyVals[-8+yyTop], yyVals[-7+yyTop], yyVals[-5+yyTop], yyVals[-2+yyTop], yyVals[-1+yyTop]);
   }
  break;
case 279:
#line 1502 "XQuery.y"
  {
       if (!yyVals[-8+yyTop].Equals(yyVals[-2+yyTop]))
	     throw new XQueryException(Properties.Resources.XPST0003, 
		   String.Format("The end tag '{0}' does not match the start tag '{1}'", yyVals[-2+yyTop], yyVals[-8+yyTop]));
       yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirElemConstructor, 
		 yyVals[-8+yyTop], null, yyVals[-5+yyTop], yyVals[-2+yyTop], yyVals[-1+yyTop]);
   }
  break;
case 280:
#line 1511 "XQuery.y"
  { 
       yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirElemConstructor, yyVals[-7+yyTop], yyVals[-2+yyTop]);
       notation.Confirm((Symbol)yyVal, Descriptor.MappingExpr, yyVals[-4+yyTop]);
   }
  break;
case 281:
#line 1516 "XQuery.y"
  {
       yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirElemConstructor, yyVals[-7+yyTop], null);
       notation.Confirm((Symbol)yyVal, Descriptor.MappingExpr, yyVals[-4+yyTop]);
   }
  break;
case 282:
#line 1521 "XQuery.y"
  {
       yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirElemConstructor, 
		 yyVals[-11+yyTop], yyVals[-6+yyTop], null, yyVals[-3+yyTop], yyVals[-2+yyTop]); 
	   notation.Confirm((Symbol)yyVal, Descriptor.MappingExpr, yyVals[-8+yyTop]);	 
   }
  break;
case 283:
#line 1527 "XQuery.y"
  {
       if (!yyVals[-11+yyTop].Equals(yyVals[-2+yyTop]))
	     throw new XQueryException(Properties.Resources.XPST0003, 
		   String.Format("The end tag '{0}' does not match the start tag '{1}'", yyVals[-2+yyTop], yyVals[-11+yyTop]));
       yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirElemConstructor, 
		 yyVals[-11+yyTop], null, null, yyVals[-3+yyTop], yyVals[-2+yyTop]);
	   notation.Confirm((Symbol)yyVal, Descriptor.MappingExpr, yyVals[-8+yyTop]); 
   }
  break;
case 284:
#line 1536 "XQuery.y"
  {
       if (!yyVals[-12+yyTop].Equals(yyVals[-2+yyTop]))
	     throw new XQueryException(Properties.Resources.XPST0003, 
		   String.Format("The end tag '{0}' does not match the start tag '{1}'", yyVals[-2+yyTop], yyVals[-12+yyTop]));
       yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirElemConstructor, 
		 yyVals[-12+yyTop], yyVals[-7+yyTop], yyVals[-5+yyTop], yyVals[-2+yyTop], yyVals[-1+yyTop]);
	   notation.Confirm((Symbol)yyVal, Descriptor.MappingExpr, yyVals[-9+yyTop]);
   }
  break;
case 285:
#line 1545 "XQuery.y"
  {
       if (!yyVals[-12+yyTop].Equals(yyVals[-2+yyTop]))
	     throw new XQueryException(Properties.Resources.XPST0003, 
		   String.Format("The end tag '{0}' does not match the start tag '{1}'", yyVals[-2+yyTop], yyVals[-12+yyTop]));
       yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirElemConstructor, 
		 yyVals[-12+yyTop], null, yyVals[-5+yyTop], yyVals[-2+yyTop], yyVals[-1+yyTop]);
	   notation.Confirm((Symbol)yyVal, Descriptor.MappingExpr, yyVals[-9+yyTop]);	 
   }
  break;
case 286:
#line 1557 "XQuery.y"
  {
      yyVal = Lisp.Cons(yyVals[0+yyTop]);
   }
  break;
case 287:
#line 1561 "XQuery.y"
  {      
      yyVal = Lisp.Append(yyVals[-1+yyTop], Lisp.Cons(yyVals[0+yyTop]));
   }
  break;
case 288:
#line 1568 "XQuery.y"
  {
      yyVal = null;
   }
  break;
case 290:
#line 1576 "XQuery.y"
  {
      yyVal = Lisp.List(yyVals[-1+yyTop], yyVals[0+yyTop]);   
   }
  break;
case 291:
#line 1580 "XQuery.y"
  {
      yyVal = Lisp.Append(yyVals[-1+yyTop], Lisp.Cons(yyVals[0+yyTop]));
   }
  break;
case 292:
#line 1584 "XQuery.y"
  {
      yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.List(yyVals[-1+yyTop], yyVals[0+yyTop]));
   }
  break;
case 293:
#line 1591 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirAttribute,
		 yyVals[-5+yyTop], yyVals[-4+yyTop], yyVals[-2+yyTop], new Literal("\""), Lisp.Cons(new Literal("")));   
   }
  break;
case 294:
#line 1596 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirAttribute,
		 yyVals[-6+yyTop], yyVals[-5+yyTop], yyVals[-3+yyTop], new Literal("\""), yyVals[-1+yyTop]);
   }
  break;
case 295:
#line 1601 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirAttribute,
		 yyVals[-5+yyTop], yyVals[-4+yyTop], yyVals[-2+yyTop], new Literal("\'"), Lisp.Cons(new Literal("")));   
   }
  break;
case 296:
#line 1606 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirAttribute,
		 yyVals[-6+yyTop], yyVals[-5+yyTop], yyVals[-3+yyTop], new Literal("\'"), yyVals[-1+yyTop]);
   }
  break;
case 297:
#line 1614 "XQuery.y"
  {
      yyVal = Lisp.Cons(new TokenWrapper(Token.EscapeQuot));
   }
  break;
case 298:
#line 1618 "XQuery.y"
  {
      yyVal = Lisp.Cons(yyVals[0+yyTop]);
   }
  break;
case 299:
#line 1622 "XQuery.y"
  {
      yyVal = Lisp.Append(yyVals[-1+yyTop], Lisp.Cons(new TokenWrapper(Token.EscapeQuot)));
   }
  break;
case 300:
#line 1626 "XQuery.y"
  {
      yyVal = Lisp.Append(yyVals[-1+yyTop], Lisp.Cons(yyVals[0+yyTop]));
   }
  break;
case 301:
#line 1633 "XQuery.y"
  {
      yyVal = Lisp.Cons(new TokenWrapper(Token.EscapeApos));
   }
  break;
case 302:
#line 1637 "XQuery.y"
  {
      yyVal = Lisp.Cons(yyVals[0+yyTop]);
   }
  break;
case 303:
#line 1641 "XQuery.y"
  {
      yyVal = Lisp.Append(yyVals[-1+yyTop], Lisp.Cons(new TokenWrapper(Token.EscapeApos)));
   }
  break;
case 304:
#line 1645 "XQuery.y"
  {
      yyVal = Lisp.Append(yyVals[-1+yyTop], Lisp.Cons(yyVals[0+yyTop]));
   }
  break;
case 315:
#line 1671 "XQuery.y"
  {
      yyVal = new Literal("{");
   }
  break;
case 316:
#line 1675 "XQuery.y"
  {
      yyVal = new Literal("}");
   }
  break;
case 317:
#line 1679 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.CommonContent), Descriptor.EnclosedExpr, yyVals[0+yyTop]); 
   }
  break;
case 318:
#line 1686 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirCommentConstructor, yyVals[-1+yyTop]);
   }
  break;
case 319:
#line 1693 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirPIConstructor, yyVals[-1+yyTop], null);
   }
  break;
case 320:
#line 1697 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Constructor), Descriptor.DirPIConstructor, yyVals[-3+yyTop], yyVals[-1+yyTop]);
   }
  break;
case 321:
#line 1704 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.CData), Descriptor.CDataSection, yyVals[-1+yyTop]);
   }
  break;
case 328:
#line 1720 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.CompConstructor), 
		Descriptor.CompDocConstructor, yyVals[-1+yyTop]);
   }
  break;
case 329:
#line 1728 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.CompConstructor), 
		Descriptor.CompElemConstructor, yyVals[-3+yyTop], yyVals[-1+yyTop]);   
   }
  break;
case 330:
#line 1733 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.CompConstructor), 
		Descriptor.CompElemConstructor, yyVals[-2+yyTop], null);   
   }
  break;
case 331:
#line 1738 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.CompConstructor), 
		Descriptor.CompElemConstructor, yyVals[-4+yyTop], yyVals[-1+yyTop]);   
   }
  break;
case 332:
#line 1743 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.CompConstructor), 
		Descriptor.CompElemConstructor, yyVals[-3+yyTop], null);   
   }
  break;
case 334:
#line 1755 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.CompConstructor), 
		Descriptor.CompAttrConstructor, yyVals[-3+yyTop], yyVals[-1+yyTop]);   
   }
  break;
case 335:
#line 1760 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.CompConstructor), 
		Descriptor.CompAttrConstructor, yyVals[-2+yyTop], null);   
   }
  break;
case 336:
#line 1765 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.CompConstructor), 
		Descriptor.CompAttrConstructor, yyVals[-4+yyTop], yyVals[-1+yyTop]);   
   }
  break;
case 337:
#line 1770 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.CompConstructor), 
		Descriptor.CompAttrConstructor, yyVals[-3+yyTop], null);   
   }
  break;
case 338:
#line 1778 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.CompConstructor), 
		Descriptor.CompTextConstructor, yyVals[-1+yyTop]);   
   }
  break;
case 339:
#line 1786 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.CompConstructor), 
		Descriptor.CompCommentConstructor, yyVals[-1+yyTop]);   
   }
  break;
case 340:
#line 1794 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.CompConstructor), 
		Descriptor.CompPIConstructor, yyVals[-3+yyTop], yyVals[-1+yyTop]);   
   }
  break;
case 341:
#line 1799 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.CompConstructor), 
		Descriptor.CompPIConstructor, yyVals[-2+yyTop], null);   
   }
  break;
case 342:
#line 1804 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.CompConstructor), 
		Descriptor.CompPIConstructor, yyVals[-4+yyTop], yyVals[-1+yyTop]);   
   }
  break;
case 343:
#line 1809 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.CompConstructor), 
		Descriptor.CompPIConstructor, yyVals[-3+yyTop], null);   
   }
  break;
case 345:
#line 1818 "XQuery.y"
  {
      yyVal = yyVals[-1+yyTop];
      notation.Confirm((Symbol)yyVals[-1+yyTop], Descriptor.Occurrence, 
		new TokenWrapper(Token.Indicator3));
   }
  break;
case 346:
#line 1827 "XQuery.y"
  {
      yyVal = yyVals[0+yyTop];
   }
  break;
case 348:
#line 1835 "XQuery.y"
  {
      yyVal = yyVals[-1+yyTop];
      notation.Confirm((Symbol)yyVals[-1+yyTop], Descriptor.Occurrence, yyVals[0+yyTop]);
   }
  break;
case 349:
#line 1840 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.EMPTY_SEQUENCE);
   }
  break;
case 350:
#line 1847 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.Indicator1);
   }
  break;
case 351:
#line 1851 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.Indicator2);
   }
  break;
case 352:
#line 1855 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.Indicator3);
   }
  break;
case 355:
#line 1864 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.ITEM);
   }
  break;
case 357:
#line 1875 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.KindTest, yyVals[0+yyTop]);
   }
  break;
case 367:
#line 1893 "XQuery.y"
  {
       yyVal = new TokenWrapper(Token.NODE);
   }
  break;
case 368:
#line 1900 "XQuery.y"
  {
       yyVal = new TokenWrapper(Token.DOCUMENT_NODE);
   }
  break;
case 369:
#line 1904 "XQuery.y"
  {
       yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.DocumentNode, yyVals[-1+yyTop]);
   }
  break;
case 370:
#line 1908 "XQuery.y"
  {
       yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.DocumentNode, yyVals[-1+yyTop]);
   }
  break;
case 371:
#line 1915 "XQuery.y"
  {
       yyVal = new TokenWrapper(Token.TEXT);
   }
  break;
case 372:
#line 1922 "XQuery.y"
  {
      yyVal = new TokenWrapper(Token.COMMENT);
   }
  break;
case 373:
#line 1930 "XQuery.y"
  {
       yyVal = new TokenWrapper(Token.PROCESSING_INSTRUCTION);
   }
  break;
case 374:
#line 1934 "XQuery.y"
  {
       yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.ProcessingInstruction, yyVals[-1+yyTop]);
   }
  break;
case 375:
#line 1938 "XQuery.y"
  {
       yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.ProcessingInstruction, yyVals[-1+yyTop]);
   }
  break;
case 376:
#line 1945 "XQuery.y"
  {
       yyVal = new TokenWrapper(Token.ELEMENT);
   }
  break;
case 377:
#line 1949 "XQuery.y"
  {
       yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Element, yyVals[-1+yyTop]);
   }
  break;
case 378:
#line 1953 "XQuery.y"
  {
       yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Element, yyVals[-3+yyTop], yyVals[-1+yyTop]);
   }
  break;
case 379:
#line 1957 "XQuery.y"
  {
       yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Element, 
		yyVals[-4+yyTop], yyVals[-2+yyTop], new TokenWrapper('?'));
   }
  break;
case 381:
#line 1966 "XQuery.y"
  {
      yyVal = new TokenWrapper('*');
   }
  break;
case 382:
#line 1973 "XQuery.y"
  {
       yyVal = new TokenWrapper(Token.ATTRIBUTE);
   }
  break;
case 383:
#line 1977 "XQuery.y"
  {
       yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Attribute, yyVals[-1+yyTop]);
   }
  break;
case 384:
#line 1981 "XQuery.y"
  {
       yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Attribute, yyVals[-3+yyTop], yyVals[-1+yyTop]);
   }
  break;
case 386:
#line 1989 "XQuery.y"
  {
      yyVal = new TokenWrapper('*');
   }
  break;
case 387:
#line 1996 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.SchemaElement, yyVals[-1+yyTop]);
   }
  break;
case 388:
#line 2003 "XQuery.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.SchemaAttribute, yyVals[-1+yyTop]);
   }
  break;
case 392:
#line 2022 "XQuery.y"
  {
      yyVal = null;
   }
  break;
#line default
        }
        yyTop -= yyLen[yyN];
        yyState = yyStates[yyTop];
        int yyM = yyLhs[yyN];
        if (yyState == 0 && yyM == 0) {
//t          if (debug != null) debug.shift(0, yyFinal);
          yyState = yyFinal;
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
//t            if (debug != null)
//t               debug.lex(yyState, yyToken,yyname(yyToken), yyLex.value());
          }
          if (yyToken == 0) {
//t            if (debug != null) debug.accept(yyVal);
            return yyVal;
          }
          goto yyLoop;
        }
        if (((yyN = yyGindex[yyM]) != 0) && ((yyN += yyState) >= 0)
            && (yyN < yyTable.Length) && (yyCheck[yyN] == yyState))
          yyState = yyTable[yyN];
        else
          yyState = yyDgoto[yyM];
//t        if (debug != null) debug.shift(yyStates[yyTop], yyState);
	 goto yyLoop;
      }
    }
  }
Esempio n. 4
0
	public void TestSetValue1() {
		{
			bool errorThrown = false;
			try {
				char[,] c = new Char[2,2];
				c.SetValue("buh", 1);
			} catch (ArgumentException) {
				errorThrown = true;
			}
			Assert("#M01", errorThrown);
		}
		{
			bool errorThrown = false;
			try {
				char[] c = {'a', 'b', 'c'};
				c.SetValue("buh", -1);
			} catch (IndexOutOfRangeException) {
				errorThrown = true;
			}
			Assert("#M02", errorThrown);
		}
		{
			bool errorThrown = false;
			try {
				char[] c = {'a', 'b', 'c'};
				c.SetValue("buh", 4);
			} catch (IndexOutOfRangeException) {
				errorThrown = true;
			}
			Assert("#M03", errorThrown);
		}

		char[] c1 = {'a', 'b', 'c', 'd'};
		char[] c2 = new char[4];
		for (int i = 0; i < c1.Length; i++) {
			c2.SetValue(c1[i], i);
		}
		for (int i = 0; i < c1.Length; i++) {
			AssertEquals("#M04(" + i + ")", c1[i], c2[i]);
		}

		int[] c3 = { 1, 2, 3 };
		long[] c4 = new long [3];

		for (int i = 0; i < c3.Length; i++)
			c4.SetValue (c3 [i], i);

		try {
			c3.CopyTo (c4, 0);
		} catch (Exception e) {
			Fail ("c3.CopyTo(): e=" + e);
		}
		for (int i = 0; i < c3.Length; i++)
			Assert ("#M05(" + i + ")", c3[i] == c4[i]);

		Object[] c5 = new Object [3];
		long[] c6 = new long [3];

		try {
			c4.CopyTo (c5, 0);
		} catch (Exception e) {
			Fail ("c4.CopyTo(): e=" + e);
		}

		try {
			c5.CopyTo (c6, 0);
		} catch (Exception e) {
			Fail ("c5.CopyTo(): e=" + e);
		}
		// for (int i = 0; i < c5.Length; i++)
		// Assert ("#M06(" + i + ")", c5[i] == c6[i]);
	}
  /** the generated parser.
      Maintains a state and a value stack, currently with fixed maximum size.
      @param yyLex scanner.
      @return result of the last reduction, if any.
      @throws yyException on irrecoverable parse error.
    */
  internal Object yyparse (yyParser.yyInput yyLex)
  {
    if (yyMax <= 0) yyMax = 256;			// initial size
    int yyState = 0;                                   // state stack ptr
    int [] yyStates = new int[yyMax];	                // state stack 
    Object yyVal = null;                               // value stack ptr
    Object [] yyVals = new Object[yyMax];	        // value stack
    int yyToken = -1;					// current input
    int yyErrorFlag = 0;				// #tks to shift

    /*yyLoop:*/ for (int yyTop = 0;; ++ yyTop) {
      if (yyTop >= yyStates.Length) {			// dynamically increase
        int[] i = new int[yyStates.Length+yyMax];
        yyStates.CopyTo (i, 0);
        yyStates = i;
        Object[] o = new Object[yyVals.Length+yyMax];
        yyVals.CopyTo (o, 0);
        yyVals = o;
      }
      yyStates[yyTop] = yyState;
      yyVals[yyTop] = yyVal;
      if (debug != null) debug.push(yyState, yyVal);

      /*yyDiscarded:*/ for (;;) {	// discarding a token does not change stack
        int yyN;
        if ((yyN = yyDefRed[yyState]) == 0) {	// else [default] reduce (yyN)
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
            if (debug != null)
              debug.lex(yyState, yyToken, yyname(yyToken), yyLex.value());
          }
          if ((yyN = yySindex[yyState]) != 0 && ((yyN += yyToken) >= 0)
              && (yyN < yyTable.Length) && (yyCheck[yyN] == yyToken)) {
            if (debug != null)
              debug.shift(yyState, yyTable[yyN], yyErrorFlag-1);
            yyState = yyTable[yyN];		// shift to yyN
            yyVal = yyLex.value();
            yyToken = -1;
            if (yyErrorFlag > 0) -- yyErrorFlag;
            goto continue_yyLoop;
          }
          if ((yyN = yyRindex[yyState]) != 0 && (yyN += yyToken) >= 0
              && yyN < yyTable.Length && yyCheck[yyN] == yyToken)
            yyN = yyTable[yyN];			// reduce (yyN)
          else
            switch (yyErrorFlag) {
  
            case 0:
              yyExpectingState = yyState;
              // yyerror(String.Format ("syntax error, got token `{0}'", yyname (yyToken)), yyExpecting(yyState));
              if (debug != null) debug.error("syntax error");
              if (yyToken == 0 /*eof*/ || yyToken == eof_token) throw new yyParser.yyUnexpectedEof ();
              goto case 1;
            case 1: case 2:
              yyErrorFlag = 3;
              do {
                if ((yyN = yySindex[yyStates[yyTop]]) != 0
                    && (yyN += Token.yyErrorCode) >= 0 && yyN < yyTable.Length
                    && yyCheck[yyN] == Token.yyErrorCode) {
                  if (debug != null)
                    debug.shift(yyStates[yyTop], yyTable[yyN], 3);
                  yyState = yyTable[yyN];
                  yyVal = yyLex.value();
                  goto continue_yyLoop;
                }
                if (debug != null) debug.pop(yyStates[yyTop]);
              } while (-- yyTop >= 0);
              if (debug != null) debug.reject();
              throw new yyParser.yyException("irrecoverable syntax error");
  
            case 3:
              if (yyToken == 0) {
                if (debug != null) debug.reject();
                throw new yyParser.yyException("irrecoverable syntax error at end-of-file");
              }
              if (debug != null)
                debug.discard(yyState, yyToken, yyname(yyToken),
  							yyLex.value());
              yyToken = -1;
              goto continue_yyDiscarded;		// leave stack alone
            }
        }
        int yyV = yyTop + 1-yyLen[yyN];
        if (debug != null)
          debug.reduce(yyState, yyStates[yyV-1], yyN, YYRules.getRule (yyN), yyLen[yyN]);
        yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
        switch (yyN) {
case 2:
#line 170 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprUNION ((NodeSet) yyVals[-2+yyTop], (NodeSet) yyVals[0+yyTop]);
	}
  break;
case 3:
#line 177 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprRoot ();
	}
  break;
case 4:
#line 181 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprSLASH (new ExprRoot (), (NodeSet) yyVals[0+yyTop]);
	}
  break;
case 6:
#line 186 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprSLASH ((Expression) yyVals[-2+yyTop], (NodeSet) yyVals[0+yyTop]);
	}
  break;
case 7:
#line 190 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprSLASH2 ((Expression) yyVals[-2+yyTop], (NodeSet) yyVals[0+yyTop]);
	}
  break;
case 8:
#line 194 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprSLASH2 (new ExprRoot (), (NodeSet) yyVals[0+yyTop]);
	}
  break;
case 10:
#line 203 "Mono.Xml.Xsl/PatternParser.jay"
  {
		XmlQualifiedName name = (XmlQualifiedName) yyVals[-3+yyTop];
		if (name.Name != "id" || name.Namespace != String.Empty)
			throw new XPathException (String.Format ("Expected 'id' but got '{0}'", name));
		yyVal = ExprFunctionCall.Factory (name,
			new FunctionArguments (
				new ExprLiteral ((string) yyVals[-1+yyTop]),
				null),
			Context);
	}
  break;
case 11:
#line 214 "Mono.Xml.Xsl/PatternParser.jay"
  {
		XmlQualifiedName name = (XmlQualifiedName) yyVals[-5+yyTop];
		if (name.Name != "key" || name.Namespace != String.Empty)
			throw new XPathException (String.Format ("Expected 'key' but got '{0}'", name));
		yyVal = Context.TryGetFunction (name,
			new FunctionArguments (
				new ExprLiteral ((string) yyVals[-3+yyTop]),
				new FunctionArguments (
					new ExprLiteral ((string) yyVals[-1+yyTop]),
					null)));
	}
  break;
case 13:
#line 230 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprSLASH ((Expression) yyVals[-2+yyTop], (NodeSet) yyVals[0+yyTop]);
	}
  break;
case 14:
#line 234 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprSLASH2 ((Expression) yyVals[-2+yyTop], (NodeSet) yyVals[0+yyTop]);
	}
  break;
case 15:
#line 241 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = CreateNodeTest ((Axes) yyVals[-2+yyTop], yyVals[-1+yyTop], (ArrayList) yyVals[0+yyTop]);
	}
  break;
case 17:
#line 249 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = Axes.Child;
	}
  break;
case 18:
#line 253 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = Axes.Attribute;
	}
  break;
case 19:
#line 260 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = null;
	}
  break;
case 20:
#line 264 "Mono.Xml.Xsl/PatternParser.jay"
  {
		ArrayList al = (ArrayList) yyVals[-1+yyTop];
		if (al == null)
			al = new ArrayList ();
		al.Add ((Expression) yyVals[0+yyTop]);
		yyVal = al;
	}
  break;
case 23:
#line 283 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprOR ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	}
  break;
case 25:
#line 291 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprAND ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	}
  break;
case 27:
#line 299 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprEQ ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	}
  break;
case 28:
#line 303 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprNE ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	}
  break;
case 30:
#line 311 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprLT ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	}
  break;
case 31:
#line 315 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprGT ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	}
  break;
case 32:
#line 319 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprLE ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	}
  break;
case 33:
#line 323 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprGE ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	}
  break;
case 35:
#line 331 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprPLUS ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	}
  break;
case 36:
#line 335 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprMINUS ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	}
  break;
case 38:
#line 343 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprMULT ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	}
  break;
case 39:
#line 347 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprDIV ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	}
  break;
case 40:
#line 351 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprMOD ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	}
  break;
case 42:
#line 359 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprNEG ((Expression) yyVals[0+yyTop]);
	}
  break;
case 44:
#line 367 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprUNION ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	}
  break;
case 47:
#line 376 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprSLASH ((Expression) yyVals[-2+yyTop], (NodeSet) yyVals[0+yyTop]);
	}
  break;
case 48:
#line 380 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprSLASH2 ((Expression) yyVals[-2+yyTop], (NodeSet) yyVals[0+yyTop]);
	}
  break;
case 51:
#line 392 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprRoot ();
	}
  break;
case 52:
#line 396 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprSLASH (new ExprRoot (), (NodeSet) yyVals[0+yyTop]);
	}
  break;
case 53:
#line 400 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprSLASH2 (new ExprRoot (), (NodeSet) yyVals[0+yyTop]);
	}
  break;
case 55:
#line 408 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprSLASH ((NodeSet) yyVals[-2+yyTop], (NodeSet) yyVals[0+yyTop]);
	}
  break;
case 56:
#line 412 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprSLASH2 ((NodeSet) yyVals[-2+yyTop], (NodeSet) yyVals[0+yyTop]);
	}
  break;
case 57:
#line 419 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = CreateNodeTest ((Axes) yyVals[-2+yyTop], yyVals[-1+yyTop], (ArrayList) yyVals[0+yyTop]);
	}
  break;
case 60:
#line 428 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = (XPathNodeType) yyVals[-2+yyTop];
	}
  break;
case 61:
#line 432 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = (string) yyVals[-1+yyTop];
	}
  break;
case 62:
#line 439 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = XmlQualifiedName.Empty;
	}
  break;
case 64:
#line 447 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new NodeTypeTest (Axes.Self, XPathNodeType.All);
	}
  break;
case 65:
#line 451 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new NodeTypeTest (Axes.Parent, XPathNodeType.All);
	}
  break;
case 66:
#line 458 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = null;
	}
  break;
case 67:
#line 462 "Mono.Xml.Xsl/PatternParser.jay"
  {
		ArrayList al = (ArrayList) yyVals[-1+yyTop];
		if (al == null)
			al = new ArrayList ();
		al.Add (yyVals[0+yyTop]);
		yyVal = al;
	}
  break;
case 68:
#line 473 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = yyVals[-1+yyTop];
	}
  break;
case 70:
#line 481 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = Axes.Child;
	}
  break;
case 71:
#line 485 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = Axes.Attribute;
	}
  break;
case 72:
#line 491 "Mono.Xml.Xsl/PatternParser.jay"
  { yyVal = XPathNodeType.Comment; }
  break;
case 73:
#line 492 "Mono.Xml.Xsl/PatternParser.jay"
  { yyVal = XPathNodeType.Text; }
  break;
case 74:
#line 493 "Mono.Xml.Xsl/PatternParser.jay"
  { yyVal = XPathNodeType.ProcessingInstruction; }
  break;
case 75:
#line 494 "Mono.Xml.Xsl/PatternParser.jay"
  { yyVal = XPathNodeType.All; }
  break;
case 77:
#line 501 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprFilter ((Expression) yyVals[-1+yyTop], (Expression) yyVals[0+yyTop]);
	}
  break;
case 78:
#line 508 "Mono.Xml.Xsl/PatternParser.jay"
  {
		Expression ret = null;
		if (Context != null)
			ret = Context.TryGetVariable (((XmlQualifiedName) yyVals[0+yyTop]).ToString ());
		
		if (ret == null)
			ret = new ExprVariable ((XmlQualifiedName) yyVals[0+yyTop], Context);
			
		yyVal = ret;
	}
  break;
case 79:
#line 519 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprParens ((Expression) yyVals[-1+yyTop]);
	}
  break;
case 80:
#line 523 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprLiteral ((String) yyVals[0+yyTop]);
	}
  break;
case 81:
#line 527 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new ExprNumber ((double) yyVals[0+yyTop]);
	}
  break;
case 83:
#line 535 "Mono.Xml.Xsl/PatternParser.jay"
  {
		Expression ret = null;
		if (Context != null)
			ret = Context.TryGetFunction ((XmlQualifiedName) yyVals[-3+yyTop], (FunctionArguments) yyVals[-1+yyTop]);
		if (ret == null)
			ret = ExprFunctionCall.Factory ((XmlQualifiedName) yyVals[-3+yyTop], (FunctionArguments) yyVals[-1+yyTop], Context);
		
		yyVal = ret;
	}
  break;
case 85:
#line 549 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new FunctionArguments ((Expression) yyVals[-1+yyTop], (FunctionArguments) yyVals[0+yyTop]);
	}
  break;
case 87:
#line 557 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = new FunctionArguments ((Expression) yyVals[-1+yyTop], (FunctionArguments) yyVals[0+yyTop]);
	}
  break;
case 88:
#line 564 "Mono.Xml.Xsl/PatternParser.jay"
  {
		yyVal = yyVals[-1+yyTop];
	}
  break;
case 89:
#line 570 "Mono.Xml.Xsl/PatternParser.jay"
  { yyVal = Axes.Ancestor; }
  break;
case 90:
#line 571 "Mono.Xml.Xsl/PatternParser.jay"
  { yyVal = Axes.AncestorOrSelf; }
  break;
case 91:
#line 572 "Mono.Xml.Xsl/PatternParser.jay"
  { yyVal = Axes.Attribute; }
  break;
case 92:
#line 573 "Mono.Xml.Xsl/PatternParser.jay"
  { yyVal = Axes.Child; }
  break;
case 93:
#line 574 "Mono.Xml.Xsl/PatternParser.jay"
  { yyVal = Axes.Descendant; }
  break;
case 94:
#line 575 "Mono.Xml.Xsl/PatternParser.jay"
  { yyVal = Axes.DescendantOrSelf; }
  break;
case 95:
#line 576 "Mono.Xml.Xsl/PatternParser.jay"
  { yyVal = Axes.Following; }
  break;
case 96:
#line 577 "Mono.Xml.Xsl/PatternParser.jay"
  { yyVal = Axes.FollowingSibling; }
  break;
case 97:
#line 578 "Mono.Xml.Xsl/PatternParser.jay"
  { yyVal = Axes.Namespace; }
  break;
case 98:
#line 579 "Mono.Xml.Xsl/PatternParser.jay"
  { yyVal = Axes.Parent; }
  break;
case 99:
#line 580 "Mono.Xml.Xsl/PatternParser.jay"
  { yyVal = Axes.Preceding; }
  break;
case 100:
#line 581 "Mono.Xml.Xsl/PatternParser.jay"
  { yyVal = Axes.PrecedingSibling; }
  break;
case 101:
#line 582 "Mono.Xml.Xsl/PatternParser.jay"
  { yyVal = Axes.Self; }
  break;
#line default
        }
        yyTop -= yyLen[yyN];
        yyState = yyStates[yyTop];
        int yyM = yyLhs[yyN];
        if (yyState == 0 && yyM == 0) {
          if (debug != null) debug.shift(0, yyFinal);
          yyState = yyFinal;
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
            if (debug != null)
               debug.lex(yyState, yyToken,yyname(yyToken), yyLex.value());
          }
          if (yyToken == 0) {
            if (debug != null) debug.accept(yyVal);
            return yyVal;
          }
          goto continue_yyLoop;
        }
        if (((yyN = yyGindex[yyM]) != 0) && ((yyN += yyState) >= 0)
            && (yyN < yyTable.Length) && (yyCheck[yyN] == yyState))
          yyState = yyTable[yyN];
        else
          yyState = yyDgoto[yyM];
        if (debug != null) debug.shift(yyStates[yyTop], yyState);
	 goto continue_yyLoop;
      continue_yyDiscarded: continue;	// implements the named-loop continue: 'continue yyDiscarded'
      }
    continue_yyLoop: continue;		// implements the named-loop continue: 'continue yyLoop'
    }
  }
Esempio n. 6
0
 protected override bool parseListSize(Int32[] list, MemoryStream response )
 {
     Object[] tmplist = new Object[list.Length];
     bool error = !this.parseUntaggedResponse(response, tmplist, "RFC822.SIZE",EmailClientCommand.ListSize);
     if ( !error )
         tmplist.CopyTo(list, 0);
     return !error;
 }
Esempio n. 7
0
  /** the generated parser.
      Maintains a state and a value stack, currently with fixed maximum size.
      @param yyLex scanner.
      @return result of the last reduction, if any.
      @throws yyException on irrecoverable parse error.
    */
  internal Object yyparse (yyParser.yyInput yyLex)
  {
    if (yyMax <= 0) yyMax = 256;			// initial size
    int yyState = 0;                                   // state stack ptr
    int [] yyStates = new int[yyMax];	                // state stack 
    Object yyVal = null;                               // value stack ptr
    Object [] yyVals = new Object[yyMax];	        // value stack
    int yyToken = -1;					// current input
    int yyErrorFlag = 0;				// #tks to shift

    /*yyLoop:*/ for (int yyTop = 0;; ++ yyTop) {
      if (yyTop >= yyStates.Length) {			// dynamically increase
        int[] i = new int[yyStates.Length+yyMax];
        yyStates.CopyTo (i, 0);
        yyStates = i;
        Object[] o = new Object[yyVals.Length+yyMax];
        yyVals.CopyTo (o, 0);
        yyVals = o;
      }
      yyStates[yyTop] = yyState;
      yyVals[yyTop] = yyVal;
//t      if (debug != null) debug.push(yyState, yyVal);

      /*yyDiscarded:*/ for (;;) {	// discarding a token does not change stack
        int yyN;
        if ((yyN = yyDefRed[yyState]) == 0) {	// else [default] reduce (yyN)
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
//t            if (debug != null)
//t              debug.lex(yyState, yyToken, yyname(yyToken), yyLex.value());
          }
          if ((yyN = yySindex[yyState]) != 0 && ((yyN += yyToken) >= 0)
              && (yyN < yyTable.Length) && (yyCheck[yyN] == yyToken)) {
//t            if (debug != null)
//t              debug.shift(yyState, yyTable[yyN], yyErrorFlag-1);
            yyState = yyTable[yyN];		// shift to yyN
            yyVal = yyLex.value();
            yyToken = -1;
            if (yyErrorFlag > 0) -- yyErrorFlag;
            goto continue_yyLoop;
          }
          if ((yyN = yyRindex[yyState]) != 0 && (yyN += yyToken) >= 0
              && yyN < yyTable.Length && yyCheck[yyN] == yyToken)
            yyN = yyTable[yyN];			// reduce (yyN)
          else
            switch (yyErrorFlag) {
  
            case 0:
              yyExpectingState = yyState;
              // yyerror(String.Format ("syntax error, got token `{0}'", yyname (yyToken)), yyExpecting(yyState));
//t              if (debug != null) debug.error("syntax error");
              if (yyToken == 0 /*eof*/ || yyToken == eof_token) throw new yyParser.yyUnexpectedEof ();
              goto case 1;
            case 1: case 2:
              yyErrorFlag = 3;
              do {
                if ((yyN = yySindex[yyStates[yyTop]]) != 0
                    && (yyN += Token.yyErrorCode) >= 0 && yyN < yyTable.Length
                    && yyCheck[yyN] == Token.yyErrorCode) {
//t                  if (debug != null)
//t                    debug.shift(yyStates[yyTop], yyTable[yyN], 3);
                  yyState = yyTable[yyN];
                  yyVal = yyLex.value();
                  goto continue_yyLoop;
                }
//t                if (debug != null) debug.pop(yyStates[yyTop]);
              } while (-- yyTop >= 0);
//t              if (debug != null) debug.reject();
              throw new yyParser.yyException("irrecoverable syntax error");
  
            case 3:
              if (yyToken == 0) {
//t                if (debug != null) debug.reject();
                throw new yyParser.yyException("irrecoverable syntax error at end-of-file");
              }
//t              if (debug != null)
//t                debug.discard(yyState, yyToken, yyname(yyToken),
//t  							yyLex.value());
              yyToken = -1;
              goto continue_yyDiscarded;		// leave stack alone
            }
        }
        int yyV = yyTop + 1-yyLen[yyN];
//t        if (debug != null)
//t          debug.reduce(yyState, yyStates[yyV-1], yyN, YYRules.getRule (yyN), yyLen[yyN]);
        yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
        switch (yyN) {
case 6:
#line 366 "cs-parser.jay"
  {
		Lexer.check_incorrect_doc_comment ();
	  }
  break;
case 7:
#line 370 "cs-parser.jay"
  {
		Lexer.check_incorrect_doc_comment ();
	  }
  break;
case 15:
#line 393 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-2+yyTop];
		string s = lt.Value;
		if (s != "alias"){
			syntax_error (lt.Location, "`alias' expected");
		} else if (RootContext.Version == LanguageVersion.ISO_1) {
			Report.FeatureIsNotAvailable (lt.Location, "external alias");
		} else {
			lt = (LocatedToken) yyVals[-1+yyTop]; 
			current_namespace.AddUsingExternalAlias (lt.Value, lt.Location);
		}
	  }
  break;
case 16:
#line 406 "cs-parser.jay"
  {
	  	syntax_error (GetLocation (yyVals[-1+yyTop]), "`alias' expected");   /* TODO: better*/
	  }
  break;
case 19:
#line 418 "cs-parser.jay"
  {
		if (RootContext.Documentation != null)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 20:
#line 423 "cs-parser.jay"
  {
		if (RootContext.Documentation != null)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 21:
#line 431 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-3+yyTop];
		current_namespace.AddUsingAlias (lt.Value, (MemberName) yyVals[-1+yyTop], (Location) yyVals[-4+yyTop]);
	  }
  break;
case 22:
#line 435 "cs-parser.jay"
  {
		CheckIdentifierToken (yyToken, GetLocation (yyVals[0+yyTop]));
		yyVal = null;
	  }
  break;
case 23:
#line 443 "cs-parser.jay"
  {
		current_namespace.AddUsing ((MemberName) yyVals[-1+yyTop], (Location) yyVals[-2+yyTop]);
	  }
  break;
case 24:
#line 455 "cs-parser.jay"
  {
		MemberName name = (MemberName) yyVals[0+yyTop];

		if (yyVals[-2+yyTop] != null) {
			Report.Error(1671, name.Location, "A namespace declaration cannot have modifiers or attributes");
		}

		current_namespace = new NamespaceEntry (
			current_namespace, file, name.GetName ());
		current_class = current_namespace.SlaveDeclSpace;
		current_container = current_class.PartialContainer;
	  }
  break;
case 25:
#line 468 "cs-parser.jay"
  { 
		current_namespace = current_namespace.Parent;
		current_class = current_namespace.SlaveDeclSpace;
		current_container = current_class.PartialContainer;
	  }
  break;
case 26:
#line 477 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[0+yyTop];
		yyVal = new MemberName (lt.Value, lt.Location);
	  }
  break;
case 27:
#line 482 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[0+yyTop];
		yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], lt.Value, lt.Location);		
	  }
  break;
case 28:
#line 487 "cs-parser.jay"
  {
		syntax_error (lexer.Location, "`.' expected");
	  }
  break;
case 33:
#line 504 "cs-parser.jay"
  {
		MemberName name = (MemberName) yyVals[0+yyTop];

		if (name.TypeArguments != null)
			syntax_error (lexer.Location, "namespace name expected");

		yyVal = name;
	  }
  break;
case 34:
#line 516 "cs-parser.jay"
  {
		if (RootContext.Documentation != null)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 37:
#line 529 "cs-parser.jay"
  {
		Report.Error (1518, lexer.Location, "Expected `class', `delegate', `enum', `interface', or `struct'");
	  }
  break;
case 39:
#line 537 "cs-parser.jay"
  {
		Report.Error (1513, lexer.Location, "Expected `}'");
	  }
  break;
case 48:
#line 564 "cs-parser.jay"
  {
		if (yyVals[0+yyTop] != null) {
			DeclSpace ds = (DeclSpace)yyVals[0+yyTop];

			if ((ds.ModFlags & (Modifiers.PRIVATE|Modifiers.PROTECTED)) != 0){
				Report.Error (1527, ds.Location, 
				"Namespace elements cannot be explicitly declared as private, protected or protected internal");
			}
		}
		current_namespace.DeclarationFound = true;
	  }
  break;
case 49:
#line 575 "cs-parser.jay"
  {
		current_namespace.DeclarationFound = true;
	  }
  break;
case 50:
#line 579 "cs-parser.jay"
  {
		Report.Error (116, ((MemberCore) yyVals[0+yyTop]).Location, "A namespace can only contain types and namespace declarations");
	  }
  break;
case 51:
#line 582 "cs-parser.jay"
  {
		Report.Error (116, ((MemberCore) yyVals[0+yyTop]).Location, "A namespace can only contain types and namespace declarations");
	  }
  break;
case 57:
#line 608 "cs-parser.jay"
  {
		if (yyVals[0+yyTop] != null) {
			Attributes attrs = (Attributes)yyVals[0+yyTop];
			if (global_attrs_enabled) {
				CodeGen.Assembly.AddAttributes (attrs.Attrs);
			} else {
				foreach (Attribute a in attrs.Attrs) {
					Report.Error (1730, a.Location, "Assembly and module attributes must precede all other elements except using clauses and extern alias declarations");
				}
			}
		}
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 58:
#line 625 "cs-parser.jay"
  {
		global_attrs_enabled = false;
		yyVal = null;
      }
  break;
case 59:
#line 630 "cs-parser.jay"
  { 
		global_attrs_enabled = false;
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 60:
#line 639 "cs-parser.jay"
  {
		if (current_attr_target != String.Empty) {
			ArrayList sect = (ArrayList) yyVals[0+yyTop];

			if (global_attrs_enabled) {
				if (current_attr_target == "module") {
					CodeGen.Module.AddAttributes (sect);
					yyVal = null;
				} else if (current_attr_target != null && current_attr_target.Length > 0) {
					CodeGen.Assembly.AddAttributes (sect);
					yyVal = null;
				} else {
					yyVal = new Attributes (sect);
				}
				if (yyVal == null) {
					if (RootContext.Documentation != null) {
						Lexer.check_incorrect_doc_comment ();
						Lexer.doc_state =
							XmlCommentState.Allowed;
					}
				}
			} else {
				yyVal = new Attributes (sect);
			}		
		}
		else
			yyVal = null;
		current_attr_target = null;
	  }
  break;
case 61:
#line 669 "cs-parser.jay"
  {
		if (current_attr_target != String.Empty) {
			Attributes attrs = yyVals[-1+yyTop] as Attributes;
			ArrayList sect = (ArrayList) yyVals[0+yyTop];

			if (global_attrs_enabled) {
				if (current_attr_target == "module") {
					CodeGen.Module.AddAttributes (sect);
					yyVal = null;
				} else if (current_attr_target == "assembly") {
					CodeGen.Assembly.AddAttributes (sect);
					yyVal = null;
				} else {
					if (attrs == null)
						attrs = new Attributes (sect);
					else
						attrs.AddAttributes (sect);			
				}
			} else {
				if (attrs == null)
					attrs = new Attributes (sect);
				else
					attrs.AddAttributes (sect);
			}		
			yyVal = attrs;
		}
		else
			yyVal = null;
		current_attr_target = null;
	  }
  break;
case 62:
#line 703 "cs-parser.jay"
  {
		yyVal = yyVals[-2+yyTop];
 	  }
  break;
case 63:
#line 707 "cs-parser.jay"
  {
		yyVal = yyVals[-2+yyTop];
	  }
  break;
case 64:
#line 714 "cs-parser.jay"
  {
		current_attr_target = (string)yyVals[-1+yyTop];
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 65:
#line 722 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[0+yyTop];
		yyVal = CheckAttributeTarget (lt.Value, lt.Location);
	  }
  break;
case 66:
#line 726 "cs-parser.jay"
  { yyVal = "event"; }
  break;
case 67:
#line 727 "cs-parser.jay"
  { yyVal = "return"; }
  break;
case 68:
#line 729 "cs-parser.jay"
  {
		string name = GetTokenName (yyToken);
		yyVal = CheckAttributeTarget (name, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 69:
#line 737 "cs-parser.jay"
  {
		ArrayList attrs = new ArrayList (4);
		attrs.Add (yyVals[0+yyTop]);

		yyVal = attrs;
	       
	  }
  break;
case 70:
#line 745 "cs-parser.jay"
  {
		ArrayList attrs = (ArrayList) yyVals[-2+yyTop];
		attrs.Add (yyVals[0+yyTop]);

		yyVal = attrs;
	  }
  break;
case 71:
#line 755 "cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 72:
#line 759 "cs-parser.jay"
  {
		--lexer.parsing_block;
		MemberName mname = (MemberName) yyVals[-2+yyTop];
		if (mname.IsGeneric) {
			Report.Error (404, lexer.Location,
				      "'<' unexpected: attributes cannot be generic");
		}

		object [] arguments = (object []) yyVals[0+yyTop];
		MemberName left = mname.Left;
		string identifier = mname.Name;

		Expression left_expr = left == null ? null : left.GetTypeExpression ();

		if (current_attr_target == String.Empty)
			yyVal = null;
		else if (global_attrs_enabled && (current_attr_target == "assembly" || current_attr_target == "module"))
			/* FIXME: supply "nameEscaped" parameter here.*/
			yyVal = new GlobalAttribute (current_namespace, current_attr_target,
						  left_expr, identifier, arguments, mname.Location, lexer.IsEscapedIdentifier (mname.Location));
		else
			yyVal = new Attribute (current_attr_target, left_expr, identifier, arguments, mname.Location, lexer.IsEscapedIdentifier (mname.Location));
	  }
  break;
case 73:
#line 785 "cs-parser.jay"
  { /* reserved attribute name or identifier: 17.4 */ }
  break;
case 74:
#line 789 "cs-parser.jay"
  { yyVal = null; }
  break;
case 75:
#line 791 "cs-parser.jay"
  {
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 76:
#line 799 "cs-parser.jay"
  {
		if (yyVals[0+yyTop] == null)
			yyVal = null;
		else {
			yyVal = new object [] { yyVals[0+yyTop], null };
		}
	  }
  break;
case 77:
#line 807 "cs-parser.jay"
  {
		yyVal = new object[] { yyVals[-2+yyTop], yyVals[0+yyTop] };
	  }
  break;
case 78:
#line 811 "cs-parser.jay"
  {
		yyVal = new object [] { null, yyVals[0+yyTop] };
	  }
  break;
case 79:
#line 818 "cs-parser.jay"
  { yyVal = null; }
  break;
case 81:
#line 824 "cs-parser.jay"
  {
		ArrayList args = new ArrayList (4);
		args.Add (new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Expression));

		yyVal = args;
	  }
  break;
case 82:
#line 831 "cs-parser.jay"
  {
		ArrayList args = (ArrayList) yyVals[-2+yyTop];
		args.Add (new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Expression));

		yyVal = args;
	 }
  break;
case 83:
#line 841 "cs-parser.jay"
  {
		ArrayList args = new ArrayList (4);
		args.Add (yyVals[0+yyTop]);

		yyVal = args;
	  }
  break;
case 84:
#line 848 "cs-parser.jay"
  {	  
		ArrayList args = (ArrayList) yyVals[-2+yyTop];
		args.Add (yyVals[0+yyTop]);

		yyVal = args;
	  }
  break;
case 85:
#line 855 "cs-parser.jay"
  {
		Report.Error (1016, ((Expression) yyVals[0+yyTop]).Location, "Named attribute argument expected");
		yyVal = null;
	  }
  break;
case 86:
#line 863 "cs-parser.jay"
  {
		/* FIXME: keep location*/
		yyVal = new DictionaryEntry (
			((LocatedToken) yyVals[-2+yyTop]).Value, 
			new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Expression));
	  }
  break;
case 102:
#line 899 "cs-parser.jay"
  {
		Report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration",
			GetSymbolName (yyToken));
		yyVal = null;
		lexer.parsing_generic_declaration = false;
	  }
  break;
case 103:
#line 912 "cs-parser.jay"
  {
		lexer.ConstraintsParsing = true;
	  }
  break;
case 104:
#line 916 "cs-parser.jay"
  { 
		MemberName name = MakeName ((MemberName) yyVals[0+yyTop]);
		push_current_class (new Struct (current_namespace, current_class, name, (int) yyVals[-4+yyTop], (Attributes) yyVals[-5+yyTop]), yyVals[-3+yyTop]);
	  }
  break;
case 105:
#line 922 "cs-parser.jay"
  {
		lexer.ConstraintsParsing = false;

		current_class.SetParameterInfo ((ArrayList) yyVals[0+yyTop]);

		if (RootContext.Documentation != null)
			current_container.DocComment = Lexer.consume_doc_comment ();
	  }
  break;
case 106:
#line 931 "cs-parser.jay"
  {
		--lexer.parsing_declaration;	  
		if (RootContext.Documentation != null)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 107:
#line 937 "cs-parser.jay"
  {
		yyVal = pop_current_class ();
	  }
  break;
case 108:
#line 940 "cs-parser.jay"
  {
		CheckIdentifierToken (yyToken, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 109:
#line 947 "cs-parser.jay"
  {
		if (RootContext.Documentation != null)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 125:
#line 989 "cs-parser.jay"
  {
		int modflags = (int) yyVals[-4+yyTop];
		foreach (VariableDeclaration constant in (ArrayList) yyVals[-1+yyTop]){
			Location l = constant.Location;
			if ((modflags & Modifiers.STATIC) != 0) {
				Report.Error (504, l, "The constant `{0}' cannot be marked static", current_container.GetSignatureForError () + '.' + (string) constant.identifier);
				continue;
			}

			Const c = new Const (
				current_class, (FullNamedExpression) yyVals[-2+yyTop], (string) constant.identifier, 
				(Expression) constant.expression_or_array_initializer, modflags, 
				(Attributes) yyVals[-5+yyTop], l);

			if (RootContext.Documentation != null) {
				c.DocComment = Lexer.consume_doc_comment ();
				Lexer.doc_state = XmlCommentState.Allowed;
			}
			current_container.AddConstant (c);
		}
	  }
  break;
case 126:
#line 1014 "cs-parser.jay"
  {
		ArrayList constants = new ArrayList (4);
		if (yyVals[0+yyTop] != null)
			constants.Add (yyVals[0+yyTop]);
		yyVal = constants;
	  }
  break;
case 127:
#line 1021 "cs-parser.jay"
  {
		if (yyVals[0+yyTop] != null) {
			ArrayList constants = (ArrayList) yyVals[-2+yyTop];
			constants.Add (yyVals[0+yyTop]);
		}
	  }
  break;
case 128:
#line 1031 "cs-parser.jay"
  {
	  	++lexer.parsing_block;
	  }
  break;
case 129:
#line 1035 "cs-parser.jay"
  {
	  	--lexer.parsing_block;
		yyVal = new VariableDeclaration ((LocatedToken) yyVals[-3+yyTop], yyVals[0+yyTop]);
	  }
  break;
case 130:
#line 1040 "cs-parser.jay"
  {
		/* A const field requires a value to be provided*/
		Report.Error (145, ((LocatedToken) yyVals[0+yyTop]).Location, "A const field requires a value to be provided");
		yyVal = null;
	  }
  break;
case 133:
#line 1058 "cs-parser.jay"
  { 
		FullNamedExpression type = (FullNamedExpression) yyVals[-2+yyTop];
		if (type == TypeManager.system_void_expr)
			Report.Error (670, GetLocation (yyVals[-2+yyTop]), "Fields cannot have void type");
		
		int mod = (int) yyVals[-3+yyTop];

		current_array_type = null;

		foreach (VariableMemberDeclaration var in (ArrayList) yyVals[-1+yyTop]){
			Field field = new Field (current_class, type, mod, var.MemberName, (Attributes) yyVals[-4+yyTop]);

			field.Initializer = var.expression_or_array_initializer;

			if (RootContext.Documentation != null) {
				field.DocComment = Lexer.consume_doc_comment ();
				Lexer.doc_state = XmlCommentState.Allowed;
			}
			current_container.AddField (field);
			yyVal = field; /* FIXME: might be better if it points to the top item*/
		}
	  }
  break;
case 134:
#line 1086 "cs-parser.jay"
  { 
			FullNamedExpression type = (FullNamedExpression) yyVals[-2+yyTop];
			
			int mod = (int) yyVals[-4+yyTop];

			current_array_type = null;

			foreach (VariableDeclaration var in (ArrayList) yyVals[-1+yyTop]) {
				FixedField field = new FixedField (current_class, type, mod, var.identifier,
					(Expression)var.expression_or_array_initializer, (Attributes) yyVals[-5+yyTop], var.Location);

				if (RootContext.Documentation != null) {
					field.DocComment = Lexer.consume_doc_comment ();
					Lexer.doc_state = XmlCommentState.Allowed;
				}
				current_container.AddField (field);
				yyVal = field; /* FIXME: might be better if it points to the top item*/
			}
	  }
  break;
case 135:
#line 1110 "cs-parser.jay"
  {
		Report.Error (1641, GetLocation (yyVals[-1+yyTop]), "A fixed size buffer field must have the array size specifier after the field name");
	  }
  break;
case 136:
#line 1117 "cs-parser.jay"
  {
		ArrayList decl = new ArrayList (2);
		decl.Add (yyVals[0+yyTop]);
		yyVal = decl;
  	  }
  break;
case 137:
#line 1123 "cs-parser.jay"
  {
		ArrayList decls = (ArrayList) yyVals[-2+yyTop];
		decls.Add (yyVals[0+yyTop]);
		yyVal = yyVals[-2+yyTop];
	  }
  break;
case 138:
#line 1132 "cs-parser.jay"
  {
		yyVal = new VariableDeclaration ((LocatedToken) yyVals[-3+yyTop], yyVals[-1+yyTop]);
	  }
  break;
case 139:
#line 1136 "cs-parser.jay"
  {
		Report.Error (443, lexer.Location, "Value or constant expected");
		yyVal = new VariableDeclaration ((LocatedToken) yyVals[-2+yyTop], null);
	  }
  break;
case 140:
#line 1145 "cs-parser.jay"
  {
		ArrayList decl = new ArrayList (4);
		if (yyVals[0+yyTop] != null)
			decl.Add (yyVals[0+yyTop]);
		yyVal = decl;
	  }
  break;
case 141:
#line 1152 "cs-parser.jay"
  {
		ArrayList decls = (ArrayList) yyVals[-2+yyTop];
		decls.Add (yyVals[0+yyTop]);
		yyVal = yyVals[-2+yyTop];
	  }
  break;
case 142:
#line 1161 "cs-parser.jay"
  {
		yyVal = new VariableDeclaration ((LocatedToken) yyVals[-2+yyTop], yyVals[0+yyTop]);
	  }
  break;
case 143:
#line 1165 "cs-parser.jay"
  {
		yyVal = new VariableDeclaration ((LocatedToken) yyVals[0+yyTop], null);
	  }
  break;
case 144:
#line 1169 "cs-parser.jay"
  {
		yyVal = null;
	  }
  break;
case 147:
#line 1178 "cs-parser.jay"
  {
		yyVal = new StackAlloc ((Expression) yyVals[-3+yyTop], (Expression) yyVals[-1+yyTop], (Location) yyVals[-4+yyTop]);
	  }
  break;
case 148:
#line 1182 "cs-parser.jay"
  {
		yyVal = new ArglistAccess ((Location) yyVals[0+yyTop]);
	  }
  break;
case 149:
#line 1186 "cs-parser.jay"
  {
		Report.Error (1575, (Location) yyVals[-1+yyTop], "A stackalloc expression requires [] after type");
		yyVal = new StackAlloc ((Expression) yyVals[0+yyTop], null, (Location) yyVals[-1+yyTop]);		
	  }
  break;
case 150:
#line 1194 "cs-parser.jay"
  {
		ArrayList decl = new ArrayList (4);
		if (yyVals[0+yyTop] != null)
			decl.Add (yyVals[0+yyTop]);
		yyVal = decl;
	  }
  break;
case 151:
#line 1201 "cs-parser.jay"
  {
		ArrayList decls = (ArrayList) yyVals[-2+yyTop];
		decls.Add (yyVals[0+yyTop]);
		yyVal = yyVals[-2+yyTop];
	  }
  break;
case 152:
#line 1210 "cs-parser.jay"
  {
	  	++lexer.parsing_block;
	  	lexer.parsing_generic_declaration = false;
	  }
  break;
case 153:
#line 1215 "cs-parser.jay"
  {
	  	--lexer.parsing_block;
		yyVal = new VariableMemberDeclaration ((MemberName) yyVals[-3+yyTop], yyVals[0+yyTop]);
	  }
  break;
case 154:
#line 1220 "cs-parser.jay"
  {
	  	lexer.parsing_generic_declaration = false;
		yyVal = new VariableMemberDeclaration ((MemberName) yyVals[0+yyTop], null);
	  }
  break;
case 155:
#line 1225 "cs-parser.jay"
  {
		lexer.parsing_generic_declaration = false;	  
		yyVal = null;
	  }
  break;
case 156:
#line 1233 "cs-parser.jay"
  {
		Report.Error (650, GetLocation (yyVals[-2+yyTop]), "Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. " +
			"To declare a fixed size buffer field, use the fixed keyword before the field type");
	  }
  break;
case 159:
#line 1245 "cs-parser.jay"
  {
		if (RootContext.Documentation != null)
			Lexer.doc_state = XmlCommentState.NotAllowed;
	  }
  break;
case 160:
#line 1250 "cs-parser.jay"
  {
		Method method = (Method) yyVals[-2+yyTop];
		method.Block = (ToplevelBlock) yyVals[0+yyTop];
		current_container.AddMethod (method);
		
		if (current_container.Kind == Kind.Interface && method.Block != null) {
			Report.Error (531, method.Location, "`{0}': interface members cannot have a definition", method.GetSignatureForError ());
		}

		current_generic_method = null;
		current_local_parameters = null;

		if (RootContext.Documentation != null)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 161:
#line 1272 "cs-parser.jay"
  {
		arglist_allowed = true;
	  }
  break;
case 162:
#line 1276 "cs-parser.jay"
  {
		lexer.ConstraintsParsing = true;
	  }
  break;
case 163:
#line 1280 "cs-parser.jay"
  {
		lexer.ConstraintsParsing = false;
		arglist_allowed = false;
		MemberName name = (MemberName) yyVals[-6+yyTop];
		current_local_parameters = (Parameters) yyVals[-3+yyTop];

		if (yyVals[0+yyTop] != null && name.TypeArguments == null)
			Report.Error (80, lexer.Location,
				      "Constraints are not allowed on non-generic declarations");

		Method method;

		GenericMethod generic = null;
		if (name.TypeArguments != null) {
			generic = new GenericMethod (current_namespace, current_class, name,
						     (FullNamedExpression) yyVals[-7+yyTop], current_local_parameters);

			generic.SetParameterInfo ((ArrayList) yyVals[0+yyTop]);
		}

		method = new Method (current_class, generic, (FullNamedExpression) yyVals[-7+yyTop], (int) yyVals[-8+yyTop],
				     name, current_local_parameters, (Attributes) yyVals[-9+yyTop]);

		current_generic_method = generic;

		if (RootContext.Documentation != null)
			method.DocComment = Lexer.consume_doc_comment ();

		yyVal = method;
	  }
  break;
case 164:
#line 1315 "cs-parser.jay"
  {
		lexer.ConstraintsParsing = true;
	  }
  break;
case 165:
#line 1319 "cs-parser.jay"
  {
		lexer.ConstraintsParsing = false;

		MemberName name = (MemberName) yyVals[-5+yyTop];
		current_local_parameters = (Parameters) yyVals[-3+yyTop];

		if (yyVals[-1+yyTop] != null && name.TypeArguments == null)
			Report.Error (80, lexer.Location,
				      "Constraints are not allowed on non-generic declarations");

		Method method;
		GenericMethod generic = null;
		if (name.TypeArguments != null) {
			generic = new GenericMethod (current_namespace, current_class, name,
						     TypeManager.system_void_expr, current_local_parameters);

			generic.SetParameterInfo ((ArrayList) yyVals[0+yyTop]);
		}

		int modifiers = (int) yyVals[-8+yyTop];


		const int invalid_partial_mod = Modifiers.Accessibility | Modifiers.ABSTRACT | Modifiers.EXTERN |
			Modifiers.NEW | Modifiers.OVERRIDE | Modifiers.SEALED | Modifiers.VIRTUAL;

		if ((modifiers & invalid_partial_mod) != 0) {
			Report.Error (750, name.Location, "A partial method cannot define access modifier or " +
       			"any of abstract, extern, new, override, sealed, or virtual modifiers");
			modifiers &= ~invalid_partial_mod;
		}

		if ((current_class.ModFlags & Modifiers.PARTIAL) == 0) {
			Report.Error (751, name.Location, "A partial method must be declared within a " +
       			"partial class or partial struct");
		}

		modifiers |= Modifiers.PARTIAL | Modifiers.PRIVATE;
		
		method = new Method (current_class, generic, TypeManager.system_void_expr,
				     modifiers, name, current_local_parameters, (Attributes) yyVals[-9+yyTop]);

		current_generic_method = generic;

		if (RootContext.Documentation != null)
			method.DocComment = Lexer.consume_doc_comment ();

		yyVal = method;
	  }
  break;
case 166:
#line 1371 "cs-parser.jay"
  {
		MemberName name = (MemberName) yyVals[-3+yyTop];
		Report.Error (1585, name.Location, 
			"Member modifier `{0}' must precede the member type and name", Modifiers.Name ((int) yyVals[-4+yyTop]));

		Method method = new Method (current_class, null, TypeManager.system_void_expr,
					    0, name, (Parameters) yyVals[-1+yyTop], (Attributes) yyVals[-7+yyTop]);

		current_local_parameters = (Parameters) yyVals[-1+yyTop];

		if (RootContext.Documentation != null)
			method.DocComment = Lexer.consume_doc_comment ();

		yyVal = null;
	  }
  break;
case 168:
#line 1390 "cs-parser.jay"
  { yyVal = null; }
  break;
case 169:
#line 1394 "cs-parser.jay"
  { yyVal = Parameters.EmptyReadOnlyParameters; }
  break;
case 171:
#line 1399 "cs-parser.jay"
  { yyVal = Parameters.EmptyReadOnlyParameters; }
  break;
case 172:
#line 1401 "cs-parser.jay"
  {
		parameter_modifiers_not_allowed = true;
	  }
  break;
case 173:
#line 1405 "cs-parser.jay"
  {
		parameter_modifiers_not_allowed = false;
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 174:
#line 1413 "cs-parser.jay"
  { 
		ArrayList pars_list = (ArrayList) yyVals[0+yyTop];

		Parameter [] pars = new Parameter [pars_list.Count];
		pars_list.CopyTo (pars);

	  	yyVal = new Parameters (pars); 
	  }
  break;
case 175:
#line 1422 "cs-parser.jay"
  {
		ArrayList pars_list = (ArrayList) yyVals[-2+yyTop];
		pars_list.Add (yyVals[0+yyTop]);

		Parameter [] pars = new Parameter [pars_list.Count];
		pars_list.CopyTo (pars);

		yyVal = new Parameters (pars); 
	  }
  break;
case 176:
#line 1432 "cs-parser.jay"
  {
		ArrayList pars_list = (ArrayList) yyVals[-2+yyTop];
		pars_list.Add (new ArglistParameter (GetLocation (yyVals[0+yyTop])));

		Parameter [] pars = new Parameter [pars_list.Count];
		pars_list.CopyTo (pars);

		yyVal = new Parameters (pars, true);
	  }
  break;
case 177:
#line 1442 "cs-parser.jay"
  {
		if (yyVals[-2+yyTop] != null)
			Report.Error (231, ((Parameter) yyVals[-2+yyTop]).Location, "A params parameter must be the last parameter in a formal parameter list");
		yyVal = null;
	  }
  break;
case 178:
#line 1448 "cs-parser.jay"
  {
		if (yyVals[-2+yyTop] != null)
			Report.Error (231, ((Parameter) yyVals[-2+yyTop]).Location, "A params parameter must be the last parameter in a formal parameter list");
		yyVal = null;
	  }
  break;
case 179:
#line 1454 "cs-parser.jay"
  {
		Report.Error (257, (Location) yyVals[-2+yyTop], "An __arglist parameter must be the last parameter in a formal parameter list");
		yyVal = null;
	  }
  break;
case 180:
#line 1459 "cs-parser.jay"
  {
		Report.Error (257, (Location) yyVals[-2+yyTop], "An __arglist parameter must be the last parameter in a formal parameter list");
		yyVal = null;
	  }
  break;
case 181:
#line 1464 "cs-parser.jay"
  {
		yyVal = new Parameters (new Parameter[] { (Parameter) yyVals[0+yyTop] } );
	  }
  break;
case 182:
#line 1468 "cs-parser.jay"
  {
		yyVal = new Parameters (new Parameter [] { new ArglistParameter ((Location) yyVals[0+yyTop]) }, true);
	  }
  break;
case 183:
#line 1475 "cs-parser.jay"
  {
		ArrayList pars = new ArrayList (4);

		pars.Add (yyVals[0+yyTop]);
		yyVal = pars;
	  }
  break;
case 184:
#line 1482 "cs-parser.jay"
  {
		ArrayList pars = (ArrayList) yyVals[-2+yyTop];
		Parameter p = (Parameter)yyVals[0+yyTop];
		if (p != null) {
			if (p.HasExtensionMethodModifier)
				Report.Error (1100, p.Location, "The parameter modifier `this' can only be used on the first parameter");
			pars.Add (p);
		}
		yyVal = yyVals[-2+yyTop];
	  }
  break;
case 185:
#line 1499 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[0+yyTop];
		yyVal = new Parameter ((FullNamedExpression) yyVals[-1+yyTop], lt.Value, (Parameter.Modifier) yyVals[-2+yyTop], (Attributes) yyVals[-3+yyTop], lt.Location);
	  }
  break;
case 186:
#line 1507 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-2+yyTop];
		Report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name");
		yyVal = null;
	  }
  break;
case 187:
#line 1515 "cs-parser.jay"
  {
		Report.Error (1001, GetLocation (yyVals[0+yyTop]), "Identifier expected");
		yyVal = new Parameter ((FullNamedExpression) yyVals[0+yyTop], "NeedSomeGeneratorHere", (Parameter.Modifier) yyVals[-1+yyTop], (Attributes) yyVals[-2+yyTop], lexer.Location);		
	  }
  break;
case 188:
#line 1522 "cs-parser.jay"
  {
		CheckIdentifierToken (yyToken, GetLocation (yyVals[0+yyTop]));
		yyVal = null;
	  }
  break;
case 189:
#line 1532 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-2+yyTop];
		Report.Error (241, lt.Location, "Default parameter specifiers are not permitted");
		 yyVal = null;
	   }
  break;
case 190:
#line 1540 "cs-parser.jay"
  { yyVal = Parameter.Modifier.NONE; }
  break;
case 192:
#line 1546 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 193:
#line 1550 "cs-parser.jay"
  {
		Parameter.Modifier p2 = (Parameter.Modifier)yyVals[0+yyTop];
  		Parameter.Modifier mod = (Parameter.Modifier)yyVals[-1+yyTop] | p2;
  		if (((Parameter.Modifier)yyVals[-1+yyTop] & p2) == p2) {
  			Error_DuplicateParameterModifier (lexer.Location, p2);
  		} else {
	  		switch (mod & ~Parameter.Modifier.This) {
  				case Parameter.Modifier.REF:
					Report.Error (1101, lexer.Location, "The parameter modifiers `this' and `ref' cannot be used altogether");
  					break;
   				case Parameter.Modifier.OUT:
					Report.Error (1102, lexer.Location, "The parameter modifiers `this' and `out' cannot be used altogether");
  					break;
  				default:
 					Report.Error (1108, lexer.Location, "A parameter cannot have specified more than one modifier");
 					break;
 			}
  		}
  		yyVal = mod;
	  }
  break;
case 194:
#line 1574 "cs-parser.jay"
  {
	  	if (parameter_modifiers_not_allowed)
	  		Error_ParameterModifierNotValid ("ref", (Location)yyVals[0+yyTop]);
	  		
	  	yyVal = Parameter.Modifier.REF;
	  }
  break;
case 195:
#line 1581 "cs-parser.jay"
  {
	  	if (parameter_modifiers_not_allowed)
	  		Error_ParameterModifierNotValid ("out", (Location)yyVals[0+yyTop]);
	  
	  	yyVal = Parameter.Modifier.OUT;
	  }
  break;
case 196:
#line 1588 "cs-parser.jay"
  {
		if (parameter_modifiers_not_allowed)
	  		Error_ParameterModifierNotValid ("this", (Location)yyVals[0+yyTop]);

	  	if (RootContext.Version <= LanguageVersion.ISO_2)
	  		Report.FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "extension methods");
	  			
		yyVal = Parameter.Modifier.This;
	  }
  break;
case 197:
#line 1601 "cs-parser.jay"
  { 
		LocatedToken lt = (LocatedToken) yyVals[0+yyTop];
		yyVal = new ParamsParameter ((FullNamedExpression) yyVals[-1+yyTop], lt.Value, (Attributes) yyVals[-3+yyTop], lt.Location);
	  }
  break;
case 198:
#line 1605 "cs-parser.jay"
  {
		CheckIdentifierToken (yyToken, GetLocation (yyVals[0+yyTop]));
		yyVal = null;
	  }
  break;
case 199:
#line 1613 "cs-parser.jay"
  {
		if (params_modifiers_not_allowed)
			Report.Error (1670, ((Location) yyVals[0+yyTop]), "The `params' modifier is not allowed in current context");
	  }
  break;
case 200:
#line 1618 "cs-parser.jay"
  {
		Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop];
		if ((mod & Parameter.Modifier.This) != 0) {
			Report.Error (1104, (Location)yyVals[-1+yyTop], "The parameter modifiers `this' and `params' cannot be used altogether");
		} else {
			Report.Error (1611, (Location)yyVals[-1+yyTop], "The params parameter cannot be declared as ref or out");
		}	  
	  }
  break;
case 201:
#line 1627 "cs-parser.jay"
  {
		Error_DuplicateParameterModifier ((Location)yyVals[-1+yyTop], Parameter.Modifier.PARAMS);
	  }
  break;
case 202:
#line 1634 "cs-parser.jay"
  {
	  	if (!arglist_allowed)
	  		Report.Error (1669, (Location) yyVals[0+yyTop], "__arglist is not valid in this context");
	  }
  break;
case 203:
#line 1645 "cs-parser.jay"
  {
		if (RootContext.Documentation != null)
			tmpComment = Lexer.consume_doc_comment ();
	  }
  break;
case 204:
#line 1650 "cs-parser.jay"
  {
		implicit_value_parameter_type = (FullNamedExpression) yyVals[-3+yyTop];
		lexer.PropertyParsing = true;
	  }
  break;
case 205:
#line 1655 "cs-parser.jay"
  {
		lexer.PropertyParsing = false;
		has_get = has_set = false;
	  }
  break;
case 206:
#line 1660 "cs-parser.jay"
  { 
		Property prop;
		Accessors accessors = (Accessors) yyVals[-2+yyTop];
		Accessor get_block = accessors != null ? accessors.get_or_add : null;
		Accessor set_block = accessors != null ? accessors.set_or_remove : null;
		bool order = accessors != null ? accessors.declared_in_reverse : false;

		MemberName name = (MemberName) yyVals[-6+yyTop];
		FullNamedExpression ptype = (FullNamedExpression) yyVals[-7+yyTop];

		prop = new Property (current_class, ptype, (int) yyVals[-8+yyTop],
				     name, (Attributes) yyVals[-9+yyTop], get_block, set_block, order, current_block);

		if (ptype == TypeManager.system_void_expr)
			Report.Error (547, name.Location, "`{0}': property or indexer cannot have void type", prop.GetSignatureForError ());
			
		if (accessors == null)
			Report.Error (548, prop.Location, "`{0}': property or indexer must have at least one accessor", prop.GetSignatureForError ());

		if (current_container.Kind == Kind.Interface) {
			if (prop.Get.Block != null)
				Report.Error (531, prop.Location, "`{0}.get': interface members cannot have a definition", prop.GetSignatureForError ());

			if (prop.Set.Block != null)
				Report.Error (531, prop.Location, "`{0}.set': interface members cannot have a definition", prop.GetSignatureForError ());
		}

		current_container.AddProperty (prop);
		implicit_value_parameter_type = null;

		if (RootContext.Documentation != null)
			prop.DocComment = ConsumeStoredComment ();

	  }
  break;
case 207:
#line 1698 "cs-parser.jay"
  {
		yyVal = new Accessors ((Accessor) yyVals[0+yyTop], null);
	 }
  break;
case 208:
#line 1702 "cs-parser.jay"
  { 
		Accessors accessors = (Accessors) yyVals[0+yyTop];
		accessors.get_or_add = (Accessor) yyVals[-1+yyTop];
		yyVal = accessors;
	 }
  break;
case 209:
#line 1708 "cs-parser.jay"
  {
		yyVal = new Accessors (null, (Accessor) yyVals[0+yyTop]);
	 }
  break;
case 210:
#line 1712 "cs-parser.jay"
  { 
		Accessors accessors = (Accessors) yyVals[0+yyTop];
		accessors.set_or_remove = (Accessor) yyVals[-1+yyTop];
		accessors.declared_in_reverse = true;
		yyVal = accessors;
	 }
  break;
case 211:
#line 1719 "cs-parser.jay"
  {
	  	if (yyToken == Token.CLOSE_BRACE) {
	  		yyVal = null;
		} else {
			if (yyToken == Token.SEMICOLON)
				Report.Error (1597, lexer.Location, "Semicolon after method or accessor block is not valid");
			else
				Report.Error (1014, GetLocation (yyVals[0+yyTop]), "A get or set accessor expected");

			yyVal = new Accessors (null, null);
		}
	  }
  break;
case 212:
#line 1735 "cs-parser.jay"
  {
		/* If this is not the case, then current_local_parameters has already*/
		/* been set in indexer_declaration*/
		if (parsing_indexer == false)
			current_local_parameters = Parameters.EmptyReadOnlyParameters;
		else 
			current_local_parameters = indexer_parameters;
		lexer.PropertyParsing = false;
	  }
  break;
case 213:
#line 1745 "cs-parser.jay"
  {
		if (has_get) {
			Report.Error (1007, GetLocation (yyVals[-2+yyTop]), "Property accessor already defined");
			break;
		}
		Accessor accessor = new Accessor ((ToplevelBlock) yyVals[0+yyTop], (int) yyVals[-3+yyTop], (Attributes) yyVals[-4+yyTop], current_local_parameters, (Location) yyVals[-2+yyTop]);
		has_get = true;
		current_local_parameters = null;
		lexer.PropertyParsing = true;

		if (RootContext.Documentation != null)
			if (Lexer.doc_state == XmlCommentState.Error)
				Lexer.doc_state = XmlCommentState.NotAllowed;

		yyVal = accessor;
	  }
  break;
case 214:
#line 1765 "cs-parser.jay"
  {
		Parameter implicit_value_parameter = new Parameter (
			implicit_value_parameter_type, "value", 
			Parameter.Modifier.NONE, null, (Location) yyVals[0+yyTop]);

		if (!parsing_indexer) {
			current_local_parameters = new Parameters (new Parameter [] { implicit_value_parameter });
		} else {
			current_local_parameters = Parameters.MergeGenerated (
				indexer_parameters, true, implicit_value_parameter, null);
		}
		
		lexer.PropertyParsing = false;
	  }
  break;
case 215:
#line 1780 "cs-parser.jay"
  {
		if (has_set) {
			Report.Error (1007, GetLocation (yyVals[-2+yyTop]), "Property accessor already defined");
			break;
		}
		Accessor accessor = new Accessor ((ToplevelBlock) yyVals[0+yyTop], (int) yyVals[-3+yyTop], (Attributes) yyVals[-4+yyTop], current_local_parameters, (Location) yyVals[-2+yyTop]);
		has_set = true;
		current_local_parameters = null;
		lexer.PropertyParsing = true;

		if (RootContext.Documentation != null
			&& Lexer.doc_state == XmlCommentState.Error)
			Lexer.doc_state = XmlCommentState.NotAllowed;

		yyVal = accessor;
	  }
  break;
case 217:
#line 1801 "cs-parser.jay"
  {
	  	yyVal = null;
	  }
  break;
case 218:
#line 1805 "cs-parser.jay"
  {
	  	Error_SyntaxError (1043, yyToken);
	  	yyVal = null;
	  }
  break;
case 219:
#line 1816 "cs-parser.jay"
  {
		lexer.ConstraintsParsing = true;
	  }
  break;
case 220:
#line 1820 "cs-parser.jay"
  {
		MemberName name = MakeName ((MemberName) yyVals[0+yyTop]);
		push_current_class (new Interface (current_namespace, current_class, name, (int) yyVals[-4+yyTop], (Attributes) yyVals[-5+yyTop]), yyVals[-3+yyTop]);
	  }
  break;
case 221:
#line 1826 "cs-parser.jay"
  {
		lexer.ConstraintsParsing = false;

		current_class.SetParameterInfo ((ArrayList) yyVals[0+yyTop]);

		if (RootContext.Documentation != null) {
			current_container.DocComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}
	  }
  break;
case 222:
#line 1837 "cs-parser.jay"
  {
		--lexer.parsing_declaration;	  
		if (RootContext.Documentation != null)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 223:
#line 1843 "cs-parser.jay"
  {
		yyVal = pop_current_class ();
	  }
  break;
case 224:
#line 1846 "cs-parser.jay"
  {
		CheckIdentifierToken (yyToken, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 230:
#line 1869 "cs-parser.jay"
  {
		Report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants");
	  }
  break;
case 231:
#line 1873 "cs-parser.jay"
  {
		Report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants");
	  }
  break;
case 236:
#line 1881 "cs-parser.jay"
  {
	  	Report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators");
	  }
  break;
case 237:
#line 1885 "cs-parser.jay"
  {
	  	Report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors");
	  }
  break;
case 238:
#line 1889 "cs-parser.jay"
  {
	  	Report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations");
	  }
  break;
case 239:
#line 1896 "cs-parser.jay"
  {
	  }
  break;
case 240:
#line 1899 "cs-parser.jay"
  {
		if (yyVals[-2+yyTop] == null)
			break;

		OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop];
		Operator op = new Operator (
			current_class, decl.optype, decl.ret_type, (int) yyVals[-3+yyTop], 
			current_local_parameters,
			(ToplevelBlock) yyVals[0+yyTop], (Attributes) yyVals[-4+yyTop], decl.location);

		if (RootContext.Documentation != null) {
			op.DocComment = tmpComment;
			Lexer.doc_state = XmlCommentState.Allowed;
		}

		/* Note again, checking is done in semantic analysis*/
		current_container.AddOperator (op);

		current_local_parameters = null;
	  }
  break;
case 242:
#line 1923 "cs-parser.jay"
  { yyVal = null; }
  break;
case 244:
#line 1929 "cs-parser.jay"
  {
		Report.Error (590, lexer.Location, "User-defined operators cannot return void");
		yyVal = TypeManager.system_void_expr;		
	  }
  break;
case 245:
#line 1937 "cs-parser.jay"
  {
		params_modifiers_not_allowed = true;
	  }
  break;
case 246:
#line 1941 "cs-parser.jay"
  {
		params_modifiers_not_allowed = false;

		Location loc = (Location) yyVals[-5+yyTop];
		Operator.OpType op = (Operator.OpType) yyVals[-4+yyTop];
		current_local_parameters = (Parameters)yyVals[-1+yyTop];
		
		int p_count = current_local_parameters.Count;
		if (p_count == 1) {
			if (op == Operator.OpType.Addition)
				op = Operator.OpType.UnaryPlus;
			else if (op == Operator.OpType.Subtraction)
				op = Operator.OpType.UnaryNegation;
		}
		
		if (IsUnaryOperator (op)) {
			if (p_count == 2) {
				Report.Error (1020, loc, "Overloadable binary operator expected");
			} else if (p_count != 1) {
				Report.Error (1535, loc, "Overloaded unary operator `{0}' takes one parameter",
					Operator.GetName (op));
			}
		} else {
			if (p_count > 2) {
				Report.Error (1534, loc, "Overloaded binary operator `{0}' takes two parameters",
					Operator.GetName (op));
			} else if (p_count != 2) {
				Report.Error (1019, loc, "Overloadable unary operator expected");
			}
		}
		
		if (RootContext.Documentation != null) {
			tmpComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.NotAllowed;
		}

		yyVal = new OperatorDeclaration (op, (FullNamedExpression) yyVals[-6+yyTop], loc);
	  }
  break;
case 248:
#line 1984 "cs-parser.jay"
  { yyVal = Operator.OpType.LogicalNot; }
  break;
case 249:
#line 1985 "cs-parser.jay"
  { yyVal = Operator.OpType.OnesComplement; }
  break;
case 250:
#line 1986 "cs-parser.jay"
  { yyVal = Operator.OpType.Increment; }
  break;
case 251:
#line 1987 "cs-parser.jay"
  { yyVal = Operator.OpType.Decrement; }
  break;
case 252:
#line 1988 "cs-parser.jay"
  { yyVal = Operator.OpType.True; }
  break;
case 253:
#line 1989 "cs-parser.jay"
  { yyVal = Operator.OpType.False; }
  break;
case 254:
#line 1991 "cs-parser.jay"
  { yyVal = Operator.OpType.Addition; }
  break;
case 255:
#line 1992 "cs-parser.jay"
  { yyVal = Operator.OpType.Subtraction; }
  break;
case 256:
#line 1994 "cs-parser.jay"
  { yyVal = Operator.OpType.Multiply; }
  break;
case 257:
#line 1995 "cs-parser.jay"
  {  yyVal = Operator.OpType.Division; }
  break;
case 258:
#line 1996 "cs-parser.jay"
  { yyVal = Operator.OpType.Modulus; }
  break;
case 259:
#line 1997 "cs-parser.jay"
  { yyVal = Operator.OpType.BitwiseAnd; }
  break;
case 260:
#line 1998 "cs-parser.jay"
  { yyVal = Operator.OpType.BitwiseOr; }
  break;
case 261:
#line 1999 "cs-parser.jay"
  { yyVal = Operator.OpType.ExclusiveOr; }
  break;
case 262:
#line 2000 "cs-parser.jay"
  { yyVal = Operator.OpType.LeftShift; }
  break;
case 263:
#line 2001 "cs-parser.jay"
  { yyVal = Operator.OpType.RightShift; }
  break;
case 264:
#line 2002 "cs-parser.jay"
  { yyVal = Operator.OpType.Equality; }
  break;
case 265:
#line 2003 "cs-parser.jay"
  { yyVal = Operator.OpType.Inequality; }
  break;
case 266:
#line 2004 "cs-parser.jay"
  { yyVal = Operator.OpType.GreaterThan; }
  break;
case 267:
#line 2005 "cs-parser.jay"
  { yyVal = Operator.OpType.LessThan; }
  break;
case 268:
#line 2006 "cs-parser.jay"
  { yyVal = Operator.OpType.GreaterThanOrEqual; }
  break;
case 269:
#line 2007 "cs-parser.jay"
  { yyVal = Operator.OpType.LessThanOrEqual; }
  break;
case 270:
#line 2012 "cs-parser.jay"
  {
		params_modifiers_not_allowed = true;
	  }
  break;
case 271:
#line 2016 "cs-parser.jay"
  {
		params_modifiers_not_allowed = false;

		Location loc = (Location) yyVals[-5+yyTop];
		current_local_parameters = (Parameters)yyVals[-1+yyTop];  
		  
		if (RootContext.Documentation != null) {
			tmpComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.NotAllowed;
		}

		yyVal = new OperatorDeclaration (Operator.OpType.Implicit, (FullNamedExpression) yyVals[-4+yyTop], loc);
	  }
  break;
case 272:
#line 2030 "cs-parser.jay"
  {
		params_modifiers_not_allowed = true;
	  }
  break;
case 273:
#line 2034 "cs-parser.jay"
  {
		params_modifiers_not_allowed = false;
		
		Location loc = (Location) yyVals[-5+yyTop];
		current_local_parameters = (Parameters)yyVals[-1+yyTop];  
		  
		if (RootContext.Documentation != null) {
			tmpComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.NotAllowed;
		}

		yyVal = new OperatorDeclaration (Operator.OpType.Explicit, (FullNamedExpression) yyVals[-4+yyTop], loc);
	  }
  break;
case 274:
#line 2048 "cs-parser.jay"
  {
	  	Error_SyntaxError (yyToken);
		yyVal = new OperatorDeclaration (Operator.OpType.Implicit, null, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 275:
#line 2053 "cs-parser.jay"
  {
	  	Error_SyntaxError (yyToken);
	  	yyVal = new OperatorDeclaration (Operator.OpType.Explicit, null, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 276:
#line 2062 "cs-parser.jay"
  { 
		Constructor c = (Constructor) yyVals[-1+yyTop];
		c.Block = (ToplevelBlock) yyVals[0+yyTop];
		
		if (RootContext.Documentation != null)
			c.DocComment = ConsumeStoredComment ();

		current_container.AddConstructor (c);

		current_local_parameters = null;
		if (RootContext.Documentation != null)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 277:
#line 2081 "cs-parser.jay"
  {
		if (RootContext.Documentation != null) {
			tmpComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}
	  }
  break;
case 278:
#line 2088 "cs-parser.jay"
  {
		current_local_parameters = (Parameters) yyVals[-1+yyTop];  
		
		/**/
		/* start block here, so possible anonymous methods inside*/
		/* constructor initializer can get correct parent block*/
		/**/
	  	start_block (lexer.Location);
	  }
  break;
case 279:
#line 2098 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-6+yyTop];
		int mods = (int) yyVals[-7+yyTop];
		ConstructorInitializer ci = (ConstructorInitializer) yyVals[0+yyTop];

		Constructor c = new Constructor (current_class, lt.Value, mods,
			(Attributes) yyVals[-8+yyTop], current_local_parameters, ci, lt.Location);
		
		if (lt.Value != current_container.MemberName.Name) {
			Report.Error (1520, c.Location, "Class, struct, or interface method must have a return type");
		} else if ((mods & Modifiers.STATIC) != 0) {
			if ((mods & Modifiers.Accessibility) != 0){
				Report.Error (515, c.Location,
					"`{0}': static constructor cannot have an access modifier",
					c.GetSignatureForError ());
			}
			if (ci != null) {
				Report.Error (514, c.Location,
					"`{0}': static constructor cannot have an explicit `this' or `base' constructor call",
					c.GetSignatureForError ());
			
			}
		}
		
		yyVal = c;
	  }
  break;
case 281:
#line 2128 "cs-parser.jay"
  { current_block = null; yyVal = null; }
  break;
case 284:
#line 2138 "cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 285:
#line 2142 "cs-parser.jay"
  {
	  	--lexer.parsing_block;
		yyVal = new ConstructorBaseInitializer ((ArrayList) yyVals[-1+yyTop], (Location) yyVals[-4+yyTop]);
	  }
  break;
case 286:
#line 2147 "cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 287:
#line 2151 "cs-parser.jay"
  {
	  	--lexer.parsing_block;
		yyVal = new ConstructorThisInitializer ((ArrayList) yyVals[-1+yyTop], (Location) yyVals[-4+yyTop]);
	  }
  break;
case 288:
#line 2155 "cs-parser.jay"
  {
		Report.Error (1018, (Location) yyVals[-1+yyTop], "Keyword this or base expected");
		yyVal = null;
	  }
  break;
case 289:
#line 2163 "cs-parser.jay"
  {
		if (RootContext.Documentation != null) {
			tmpComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.NotAllowed;
		}
		
		current_local_parameters = Parameters.EmptyReadOnlyParameters;
	  }
  break;
case 290:
#line 2172 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-3+yyTop];
		if (lt.Value != current_container.MemberName.Name){
			Report.Error (574, lt.Location, "Name of destructor must match name of class");
		} else if (current_container.Kind != Kind.Class){
			Report.Error (575, lt.Location, "Only class types can contain destructor");
		} else {
			Destructor d = new Destructor (current_class, (int) yyVals[-6+yyTop],
				Parameters.EmptyReadOnlyParameters, (Attributes) yyVals[-7+yyTop], lt.Location);
			if (RootContext.Documentation != null)
				d.DocComment = ConsumeStoredComment ();
		  
			d.Block = (ToplevelBlock) yyVals[0+yyTop];
			current_container.AddMethod (d);
		}

		current_local_parameters = null;
	  }
  break;
case 291:
#line 2196 "cs-parser.jay"
  {
		current_array_type = null;
		foreach (VariableMemberDeclaration var in (ArrayList) yyVals[-1+yyTop]) {

			EventField e = new EventField (
				current_class, (FullNamedExpression) yyVals[-2+yyTop], (int) yyVals[-4+yyTop], var.MemberName, (Attributes) yyVals[-5+yyTop]);
				
			if (var.expression_or_array_initializer != null) {
				if (current_container.Kind == Kind.Interface) {
					Report.Error (68, e.Location, "`{0}': event in interface cannot have initializer", e.GetSignatureForError ());
				}

				e.Initializer = var.expression_or_array_initializer;
			}
			
			if (var.MemberName.Left != null) {
				Report.Error (71, e.Location,
					"`{0}': An explicit interface implementation of an event must use property syntax",
					e.GetSignatureForError ());
			}

			current_container.AddEvent (e);

			if (RootContext.Documentation != null) {
				e.DocComment = Lexer.consume_doc_comment ();
				Lexer.doc_state = XmlCommentState.Allowed;
			}
		}
	  }
  break;
case 292:
#line 2229 "cs-parser.jay"
  {
		implicit_value_parameter_type = (FullNamedExpression) yyVals[-2+yyTop];  
		current_local_parameters = new Parameters (
			new Parameter (implicit_value_parameter_type, "value", 
			Parameter.Modifier.NONE, null, GetLocation (yyVals[-3+yyTop])));

		lexer.EventParsing = true;
	  }
  break;
case 293:
#line 2238 "cs-parser.jay"
  {
		lexer.EventParsing = false;  
	  }
  break;
case 294:
#line 2242 "cs-parser.jay"
  {
		MemberName name = (MemberName) yyVals[-5+yyTop];
		
		if (current_container.Kind == Kind.Interface) {
			Report.Error (69, (Location) yyVals[-7+yyTop], "Event in interface cannot have add or remove accessors");
		}

		if (yyVals[-2+yyTop] == null){
			Report.Error (65, (Location) yyVals[-7+yyTop], "`{0}.{1}': event property must have both add and remove accessors",
				current_container.Name, name.GetSignatureForError ());
			yyVal = null;
		} else {
			Accessors accessors = (Accessors) yyVals[-2+yyTop];
			
			if (accessors.get_or_add == null || accessors.set_or_remove == null)
				/* CS0073 is already reported, so no CS0065 here.*/
				yyVal = null;
			else {
				Event e = new EventProperty (
					current_class, (FullNamedExpression) yyVals[-6+yyTop], (int) yyVals[-8+yyTop], name,
					(Attributes) yyVals[-9+yyTop], accessors.get_or_add, accessors.set_or_remove);
				if (RootContext.Documentation != null) {
					e.DocComment = Lexer.consume_doc_comment ();
					Lexer.doc_state = XmlCommentState.Allowed;
				}

				current_container.AddEvent (e);
				implicit_value_parameter_type = null;
			}
		}
		current_local_parameters = null;
	  }
  break;
case 295:
#line 2275 "cs-parser.jay"
  {
		MemberName mn = (MemberName) yyVals[-1+yyTop];
		if (mn.Left != null)
			Report.Error (71, mn.Location, "An explicit interface implementation of an event must use property syntax");

		if (RootContext.Documentation != null)
			Lexer.doc_state = XmlCommentState.Allowed;

		Error_SyntaxError (yyToken);
		yyVal = null;
	  }
  break;
case 296:
#line 2290 "cs-parser.jay"
  {
		yyVal = new Accessors ((Accessor) yyVals[-1+yyTop], (Accessor) yyVals[0+yyTop]);
	  }
  break;
case 297:
#line 2294 "cs-parser.jay"
  {
		Accessors accessors = new Accessors ((Accessor) yyVals[0+yyTop], (Accessor) yyVals[-1+yyTop]);
		accessors.declared_in_reverse = true;
		yyVal = accessors;
	  }
  break;
case 298:
#line 2299 "cs-parser.jay"
  { yyVal = null; }
  break;
case 299:
#line 2300 "cs-parser.jay"
  { yyVal = null; }
  break;
case 300:
#line 2302 "cs-parser.jay"
  { 
		Report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected");
		yyVal = null;
	  }
  break;
case 301:
#line 2306 "cs-parser.jay"
  { yyVal = null; }
  break;
case 302:
#line 2311 "cs-parser.jay"
  {
		lexer.EventParsing = false;
	  }
  break;
case 303:
#line 2315 "cs-parser.jay"
  {
		Accessor accessor = new Accessor ((ToplevelBlock) yyVals[0+yyTop], 0, (Attributes) yyVals[-3+yyTop], null, (Location) yyVals[-2+yyTop]);
		lexer.EventParsing = true;
		yyVal = accessor;
	  }
  break;
case 304:
#line 2320 "cs-parser.jay"
  {
		Report.Error (73, (Location) yyVals[-1+yyTop], "An add or remove accessor must have a body");
		yyVal = null;
	  }
  break;
case 305:
#line 2324 "cs-parser.jay"
  {
		Report.Error (1609, (Location) yyVals[0+yyTop], "Modifiers cannot be placed on event accessor declarations");
		yyVal = null;
	  }
  break;
case 306:
#line 2332 "cs-parser.jay"
  {
		lexer.EventParsing = false;
	  }
  break;
case 307:
#line 2336 "cs-parser.jay"
  {
		yyVal = new Accessor ((ToplevelBlock) yyVals[0+yyTop], 0, (Attributes) yyVals[-3+yyTop], null, (Location) yyVals[-2+yyTop]);
		lexer.EventParsing = true;
	  }
  break;
case 308:
#line 2340 "cs-parser.jay"
  {
		Report.Error (73, (Location) yyVals[-1+yyTop], "An add or remove accessor must have a body");
		yyVal = null;
	  }
  break;
case 309:
#line 2344 "cs-parser.jay"
  {
		Report.Error (1609, (Location) yyVals[0+yyTop], "Modifiers cannot be placed on event accessor declarations");
		yyVal = null;
	  }
  break;
case 310:
#line 2354 "cs-parser.jay"
  {
		implicit_value_parameter_type = (FullNamedExpression) yyVals[-5+yyTop];
		indexer_parameters = (Parameters) yyVals[-2+yyTop];
		
		if (indexer_parameters.IsEmpty)
			Report.Error (1551, GetLocation (yyVals[-3+yyTop]), "Indexers must have at least one parameter");

		if (RootContext.Documentation != null) {
			tmpComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}

		lexer.PropertyParsing = true;
		parsing_indexer  = true;
		
	  }
  break;
case 311:
#line 2371 "cs-parser.jay"
  {
		  lexer.PropertyParsing = false;
		  has_get = has_set = false;
		  parsing_indexer  = false;
	  }
  break;
case 312:
#line 2377 "cs-parser.jay"
  { 
		Accessors accessors = (Accessors) yyVals[-2+yyTop];
		Accessor get_block = accessors != null ? accessors.get_or_add : null;
		Accessor set_block = accessors != null ? accessors.set_or_remove : null;
		bool order = accessors != null ? accessors.declared_in_reverse : false;

		Indexer indexer = new Indexer (current_class, (FullNamedExpression) yyVals[-9+yyTop],
			(MemberName)yyVals[-8+yyTop], (int) yyVals[-10+yyTop], (Parameters) yyVals[-6+yyTop], (Attributes) yyVals[-11+yyTop],
			get_block, set_block, order);
				       
		if (yyVals[-9+yyTop] == TypeManager.system_void_expr)
			Report.Error (620, GetLocation (yyVals[-9+yyTop]), "`{0}': indexer return type cannot be `void'", indexer.GetSignatureForError ());
			
		if (accessors == null)
			Report.Error (548, indexer.Location, "`{0}': property or indexer must have at least one accessor", indexer.GetSignatureForError ());

		if (current_container.Kind == Kind.Interface) {
			if (indexer.Get.Block != null)
				Report.Error (531, indexer.Location, "`{0}.get': interface members cannot have a definition", indexer.GetSignatureForError ());

			if (indexer.Set.Block != null)
				Report.Error (531, indexer.Location, "`{0}.set': interface members cannot have a definition", indexer.GetSignatureForError ());
		}

		if (RootContext.Documentation != null)
			indexer.DocComment = ConsumeStoredComment ();

		current_container.AddIndexer (indexer);
		
		current_local_parameters = null;
		implicit_value_parameter_type = null;
		indexer_parameters = null;
	  }
  break;
case 313:
#line 2416 "cs-parser.jay"
  {
		if (RootContext.Documentation != null)
			enumTypeComment = Lexer.consume_doc_comment ();
	  }
  break;
case 314:
#line 2422 "cs-parser.jay"
  {
		MemberName name = (MemberName) yyVals[-4+yyTop];
		if (name.IsGeneric) {
			Report.Error (1675, name.Location, "Enums cannot have type parameters");
		}

		name = MakeName (name);
		Enum e = new Enum (current_namespace, current_class, (TypeExpr) yyVals[-3+yyTop], (int) yyVals[-6+yyTop],
				   name, (Attributes) yyVals[-7+yyTop]);
		
		if (RootContext.Documentation != null)
			e.DocComment = enumTypeComment;


		EnumMember em = null;
		foreach (VariableDeclaration ev in (ArrayList) yyVals[-1+yyTop]) {
			em = new EnumMember (
				e, em, ev.identifier, (Expression) ev.expression_or_array_initializer,
				ev.OptAttributes, ev.Location);

/*			if (RootContext.Documentation != null)*/
				em.DocComment = ev.DocComment;

			e.AddEnumMember (em);
		}
		if (RootContext.EvalMode)
			undo.AddTypeContainer (current_container, e);

		current_container.AddTypeContainer (e);

		yyVal = e;

	  }
  break;
case 315:
#line 2458 "cs-parser.jay"
  { yyVal = TypeManager.system_int32_expr; }
  break;
case 316:
#line 2460 "cs-parser.jay"
  {
		if (yyVals[0+yyTop] != TypeManager.system_int32_expr && yyVals[0+yyTop] != TypeManager.system_uint32_expr &&
			yyVals[0+yyTop] != TypeManager.system_int64_expr && yyVals[0+yyTop] != TypeManager.system_uint64_expr &&
			yyVals[0+yyTop] != TypeManager.system_int16_expr && yyVals[0+yyTop] != TypeManager.system_uint16_expr &&
			yyVals[0+yyTop] != TypeManager.system_byte_expr && yyVals[0+yyTop] != TypeManager.system_sbyte_expr)
			Enum.Error_1008 (GetLocation (yyVals[0+yyTop]));
	 
		yyVal = yyVals[0+yyTop];
	 }
  break;
case 317:
#line 2470 "cs-parser.jay"
  {
	 	Error_TypeExpected (lexer.Location);
	 }
  break;
case 318:
#line 2477 "cs-parser.jay"
  {
		if (RootContext.Documentation != null)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 319:
#line 2482 "cs-parser.jay"
  {
	  	/* here will be evaluated after CLOSE_BLACE is consumed.*/
		if (RootContext.Documentation != null)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 320:
#line 2488 "cs-parser.jay"
  {
		yyVal = yyVals[-2+yyTop];
	  }
  break;
case 321:
#line 2494 "cs-parser.jay"
  { yyVal = new ArrayList (4); }
  break;
case 322:
#line 2495 "cs-parser.jay"
  { yyVal = yyVals[-1+yyTop]; }
  break;
case 323:
#line 2500 "cs-parser.jay"
  {
		ArrayList l = new ArrayList (4);

		l.Add (yyVals[0+yyTop]);
		yyVal = l;
	  }
  break;
case 324:
#line 2507 "cs-parser.jay"
  {
		ArrayList l = (ArrayList) yyVals[-2+yyTop];

		l.Add (yyVals[0+yyTop]);

		yyVal = l;
	  }
  break;
case 325:
#line 2518 "cs-parser.jay"
  {
		VariableDeclaration vd = new VariableDeclaration (
			(LocatedToken) yyVals[0+yyTop], null, (Attributes) yyVals[-1+yyTop]);

		if (RootContext.Documentation != null) {
			vd.DocComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}

		yyVal = vd;
	  }
  break;
case 326:
#line 2530 "cs-parser.jay"
  {
	  	++lexer.parsing_block;
		if (RootContext.Documentation != null) {
			tmpComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.NotAllowed;
		}
	  }
  break;
case 327:
#line 2538 "cs-parser.jay"
  { 
		--lexer.parsing_block;	  
		VariableDeclaration vd = new VariableDeclaration (
			(LocatedToken) yyVals[-3+yyTop], yyVals[0+yyTop], (Attributes) yyVals[-4+yyTop]);

		if (RootContext.Documentation != null)
			vd.DocComment = ConsumeStoredComment ();

		yyVal = vd;
	  }
  break;
case 328:
#line 2556 "cs-parser.jay"
  {
		MemberName name = MakeName ((MemberName) yyVals[-3+yyTop]);
		Parameters p = (Parameters) yyVals[-1+yyTop];

		Delegate del = new Delegate (current_namespace, current_class, (FullNamedExpression) yyVals[-4+yyTop],
					     (int) yyVals[-6+yyTop], name, p, (Attributes) yyVals[-7+yyTop]);

		if (RootContext.Documentation != null) {
			del.DocComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}

		current_container.AddDelegate (del);
		current_delegate = del;
		lexer.ConstraintsParsing = true;
	  }
  break;
case 329:
#line 2573 "cs-parser.jay"
  {
		lexer.ConstraintsParsing = false;
	  }
  break;
case 330:
#line 2577 "cs-parser.jay"
  {
		current_delegate.SetParameterInfo ((ArrayList) yyVals[-2+yyTop]);
		yyVal = current_delegate;

		current_delegate = null;
	  }
  break;
case 331:
#line 2587 "cs-parser.jay"
  {
		yyVal = null;
	  }
  break;
case 332:
#line 2591 "cs-parser.jay"
  {
		if (RootContext.Version < LanguageVersion.ISO_2)
			Report.FeatureIsNotAvailable (lexer.Location, "nullable types");
	  
	  	yyVal = this;
	  }
  break;
case 334:
#line 2602 "cs-parser.jay"
  {
		LocatedToken lt1 = (LocatedToken) yyVals[-2+yyTop];
		LocatedToken lt2 = (LocatedToken) yyVals[-1+yyTop];
		
		yyVal = new MemberName (lt1.Value, lt2.Value, (TypeArguments) yyVals[0+yyTop], lt1.Location);
	  }
  break;
case 336:
#line 2613 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-1+yyTop];
		yyVal = new MemberName ((MemberName) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location);
	  }
  break;
case 337:
#line 2621 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-1+yyTop];
		yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location);	  
	  }
  break;
case 338:
#line 2631 "cs-parser.jay"
  { yyVal = null; }
  break;
case 339:
#line 2633 "cs-parser.jay"
  {
		if (RootContext.Version < LanguageVersion.ISO_2)
			Report.FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics");	  
	  
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 340:
#line 2640 "cs-parser.jay"
  {
		Error_TypeExpected (lexer.Location);
		yyVal = new TypeArguments ();
	  }
  break;
case 341:
#line 2648 "cs-parser.jay"
  {
		TypeArguments type_args = new TypeArguments ();
		type_args.Add ((FullNamedExpression) yyVals[0+yyTop]);
		yyVal = type_args;
	  }
  break;
case 342:
#line 2654 "cs-parser.jay"
  {
		TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop];
		type_args.Add ((FullNamedExpression) yyVals[0+yyTop]);
		yyVal = type_args;
	  }
  break;
case 343:
#line 2666 "cs-parser.jay"
  {
		lexer.parsing_generic_declaration = true;
	  }
  break;
case 344:
#line 2670 "cs-parser.jay"
  {
		lexer.parsing_generic_declaration = false;
		LocatedToken lt = (LocatedToken) yyVals[-2+yyTop];
		yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location);	  
	  }
  break;
case 345:
#line 2679 "cs-parser.jay"
  {
	  	MemberName mn = (MemberName)yyVals[0+yyTop];
	  	if (mn.TypeArguments != null)
	  		syntax_error (mn.Location, string.Format ("Member `{0}' cannot declare type arguments",
	  			mn.GetSignatureForError ()));
	  }
  break;
case 347:
#line 2690 "cs-parser.jay"
  {
		lexer.parsing_generic_declaration = false;	  
		LocatedToken lt = (LocatedToken) yyVals[-1+yyTop];
		yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location);
	  }
  break;
case 348:
#line 2699 "cs-parser.jay"
  {
		lexer.parsing_generic_declaration = false;	  
		yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 349:
#line 2704 "cs-parser.jay"
  {
		lexer.parsing_generic_declaration = false;
		yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 350:
#line 2712 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-2+yyTop];
		yyVal = new MemberName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location);
	  }
  break;
case 351:
#line 2717 "cs-parser.jay"
  {
		LocatedToken lt1 = (LocatedToken) yyVals[-3+yyTop];
		LocatedToken lt2 = (LocatedToken) yyVals[-2+yyTop];
		
		yyVal = new MemberName (lt1.Value, lt2.Value, (TypeArguments) yyVals[-1+yyTop], lt1.Location);
	  }
  break;
case 352:
#line 2724 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-2+yyTop];
		yyVal = new MemberName ((MemberName) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location);
	  }
  break;
case 353:
#line 2731 "cs-parser.jay"
  { yyVal = null; }
  break;
case 354:
#line 2733 "cs-parser.jay"
  {
		if (RootContext.Version < LanguageVersion.ISO_2)
			Report.FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics");
	  
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 355:
#line 2743 "cs-parser.jay"
  {
		TypeArguments type_args = new TypeArguments ();
		type_args.Add ((FullNamedExpression)yyVals[0+yyTop]);
		yyVal = type_args;
	  }
  break;
case 356:
#line 2749 "cs-parser.jay"
  {
		TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop];
		type_args.Add ((FullNamedExpression)yyVals[0+yyTop]);
		yyVal = type_args;
	  }
  break;
case 357:
#line 2758 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken)yyVals[0+yyTop];
		yyVal = new TypeParameterName (lt.Value, (Attributes)yyVals[-1+yyTop], lt.Location);
  	  }
  break;
case 358:
#line 2763 "cs-parser.jay"
  {
  	  	if (GetTokenName (yyToken) == "type")
			Report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type");
		else
			Error_SyntaxError (yyToken);
			
  	  	yyVal = new TypeParameterName ("", null, lexer.Location);
  	  }
  break;
case 360:
#line 2779 "cs-parser.jay"
  {
		yyVal = TypeManager.system_void_expr;
	  }
  break;
case 361:
#line 2786 "cs-parser.jay"
  {
		lexer.parsing_generic_declaration = true;
	  }
  break;
case 363:
#line 2797 "cs-parser.jay"
  {
	  	Expression.Error_VoidInvalidInTheContext (lexer.Location);
		yyVal = TypeManager.system_void_expr;
	  }
  break;
case 365:
#line 2806 "cs-parser.jay"
  {
	  	Expression.Error_VoidInvalidInTheContext (lexer.Location);
		yyVal = TypeManager.system_void_expr;
	  }
  break;
case 367:
#line 2815 "cs-parser.jay"
  {
		string rank_specifiers = (string) yyVals[0+yyTop];
		yyVal = current_array_type = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], rank_specifiers);
	  }
  break;
case 368:
#line 2823 "cs-parser.jay"
  {
		MemberName name = (MemberName) yyVals[-1+yyTop];

		if (yyVals[0+yyTop] != null) {
			yyVal = new ComposedCast (name.GetTypeExpression (), "?", lexer.Location);
		} else {
			if (name.Left == null && name.Name == "var" &&
			    (RootContext.Version > LanguageVersion.ISO_2 || RootContext.Version == LanguageVersion.Default_MCS))
				yyVal = current_array_type = new VarExpr (name.Location);
			else
				yyVal = name.GetTypeExpression ();
		}
	  }
  break;
case 369:
#line 2837 "cs-parser.jay"
  {
		if (yyVals[0+yyTop] != null)
			yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], "?", lexer.Location);
	  }
  break;
case 370:
#line 2842 "cs-parser.jay"
  {
		/**/
		/* Note that here only unmanaged types are allowed but we*/
		/* can't perform checks during this phase - we do it during*/
		/* semantic analysis.*/
		/**/
		yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], "*", Lexer.Location);
	  }
  break;
case 371:
#line 2851 "cs-parser.jay"
  {
		yyVal = new ComposedCast (TypeManager.system_void_expr, "*", (Location) yyVals[-1+yyTop]);
	  }
  break;
case 372:
#line 2858 "cs-parser.jay"
  {
		ArrayList types = new ArrayList (2);
		types.Add (yyVals[0+yyTop]);
		yyVal = types;
	  }
  break;
case 373:
#line 2864 "cs-parser.jay"
  {
		ArrayList types = (ArrayList) yyVals[-2+yyTop];
		types.Add (yyVals[0+yyTop]);
		yyVal = types;
	  }
  break;
case 374:
#line 2873 "cs-parser.jay"
  {
		if (yyVals[0+yyTop] is ComposedCast)
			Report.Error (1521, GetLocation (yyVals[0+yyTop]), "Invalid base type `{0}'", ((ComposedCast)yyVals[0+yyTop]).GetSignatureForError ());
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 375:
#line 2879 "cs-parser.jay"
  {
	  	Error_TypeExpected (lexer.Location);
	  }
  break;
case 376:
#line 2889 "cs-parser.jay"
  { yyVal = TypeManager.system_object_expr; }
  break;
case 377:
#line 2890 "cs-parser.jay"
  { yyVal = TypeManager.system_string_expr; }
  break;
case 378:
#line 2891 "cs-parser.jay"
  { yyVal = TypeManager.system_boolean_expr; }
  break;
case 379:
#line 2892 "cs-parser.jay"
  { yyVal = TypeManager.system_decimal_expr; }
  break;
case 380:
#line 2893 "cs-parser.jay"
  { yyVal = TypeManager.system_single_expr; }
  break;
case 381:
#line 2894 "cs-parser.jay"
  { yyVal = TypeManager.system_double_expr; }
  break;
case 383:
#line 2899 "cs-parser.jay"
  { yyVal = TypeManager.system_sbyte_expr; }
  break;
case 384:
#line 2900 "cs-parser.jay"
  { yyVal = TypeManager.system_byte_expr; }
  break;
case 385:
#line 2901 "cs-parser.jay"
  { yyVal = TypeManager.system_int16_expr; }
  break;
case 386:
#line 2902 "cs-parser.jay"
  { yyVal = TypeManager.system_uint16_expr; }
  break;
case 387:
#line 2903 "cs-parser.jay"
  { yyVal = TypeManager.system_int32_expr; }
  break;
case 388:
#line 2904 "cs-parser.jay"
  { yyVal = TypeManager.system_uint32_expr; }
  break;
case 389:
#line 2905 "cs-parser.jay"
  { yyVal = TypeManager.system_int64_expr; }
  break;
case 390:
#line 2906 "cs-parser.jay"
  { yyVal = TypeManager.system_uint64_expr; }
  break;
case 391:
#line 2907 "cs-parser.jay"
  { yyVal = TypeManager.system_char_expr; }
  break;
case 393:
#line 2913 "cs-parser.jay"
  {
		yyVal = TypeManager.system_void_expr;	
	  }
  break;
case 397:
#line 2931 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-1+yyTop];
		yyVal = new SimpleName (MemberName.MakeName (lt.Value, (TypeArguments)yyVals[0+yyTop]), (TypeArguments)yyVals[0+yyTop], lt.Location);	  
	  }
  break;
case 418:
#line 2958 "cs-parser.jay"
  { yyVal = new CharLiteral ((char) lexer.Value, lexer.Location); }
  break;
case 419:
#line 2959 "cs-parser.jay"
  { yyVal = new StringLiteral ((string) lexer.Value, lexer.Location); }
  break;
case 420:
#line 2960 "cs-parser.jay"
  { yyVal = new NullLiteral (lexer.Location); }
  break;
case 421:
#line 2964 "cs-parser.jay"
  { yyVal = new FloatLiteral ((float) lexer.Value, lexer.Location); }
  break;
case 422:
#line 2965 "cs-parser.jay"
  { yyVal = new DoubleLiteral ((double) lexer.Value, lexer.Location); }
  break;
case 423:
#line 2966 "cs-parser.jay"
  { yyVal = new DecimalLiteral ((decimal) lexer.Value, lexer.Location); }
  break;
case 424:
#line 2970 "cs-parser.jay"
  { 
		object v = lexer.Value;

		if (v is int){
			yyVal = new IntLiteral ((int) v, lexer.Location);
		} else if (v is uint)
			yyVal = new UIntLiteral ((UInt32) v, lexer.Location);
		else if (v is long)
			yyVal = new LongLiteral ((Int64) v, lexer.Location);
		else if (v is ulong)
			yyVal = new ULongLiteral ((UInt64) v, lexer.Location);
		else
			Console.WriteLine ("OOPS.  Unexpected result from scanner");
	  }
  break;
case 425:
#line 2987 "cs-parser.jay"
  { yyVal = new BoolLiteral (true, lexer.Location); }
  break;
case 426:
#line 2988 "cs-parser.jay"
  { yyVal = new BoolLiteral (false, lexer.Location); }
  break;
case 430:
#line 3005 "cs-parser.jay"
  {
		yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]);
	  }
  break;
case 431:
#line 3012 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-1+yyTop];
		yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location);
	  }
  break;
case 432:
#line 3017 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-1+yyTop];
		/* TODO: Location is wrong as some predefined types doesn't hold a location*/
		yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location);
	  }
  break;
case 433:
#line 3023 "cs-parser.jay"
  {
		LocatedToken lt1 = (LocatedToken) yyVals[-2+yyTop];
		LocatedToken lt2 = (LocatedToken) yyVals[-1+yyTop];

		yyVal = new QualifiedAliasMember (lt1.Value, lt2.Value, (TypeArguments) yyVals[0+yyTop], lt1.Location);
	  }
  break;
case 434:
#line 3033 "cs-parser.jay"
  {
		yyVal = new Invocation ((Expression) yyVals[-3+yyTop], (ArrayList) yyVals[-1+yyTop]);
	  }
  break;
case 435:
#line 3039 "cs-parser.jay"
  { yyVal = null; }
  break;
case 437:
#line 3045 "cs-parser.jay"
  {
	  	if (yyVals[-1+yyTop] == null)
	  	  yyVal = CollectionOrObjectInitializers.Empty;
	  	else
	  	  yyVal = new CollectionOrObjectInitializers ((ArrayList) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 438:
#line 3052 "cs-parser.jay"
  {
	  	yyVal = new CollectionOrObjectInitializers ((ArrayList) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop]));
	  }
  break;
case 439:
#line 3058 "cs-parser.jay"
  { yyVal = null; }
  break;
case 440:
#line 3060 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	}
  break;
case 441:
#line 3067 "cs-parser.jay"
  {
	  	ArrayList a = new ArrayList ();
	  	a.Add (yyVals[0+yyTop]);
	  	yyVal = a;
	  }
  break;
case 442:
#line 3073 "cs-parser.jay"
  {
	  	ArrayList a = (ArrayList)yyVals[-2+yyTop];
	  	a.Add (yyVals[0+yyTop]);
	  	yyVal = a;
	  }
  break;
case 443:
#line 3082 "cs-parser.jay"
  {
	  	LocatedToken lt = yyVals[-2+yyTop] as LocatedToken;
	  	yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location);
	  }
  break;
case 444:
#line 3087 "cs-parser.jay"
  {
		yyVal = new CollectionElementInitializer ((Expression)yyVals[0+yyTop]);
	  }
  break;
case 445:
#line 3091 "cs-parser.jay"
  {
	  	yyVal = new CollectionElementInitializer ((ArrayList)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 446:
#line 3095 "cs-parser.jay"
  {
	  	Report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty");
	  }
  break;
case 449:
#line 3106 "cs-parser.jay"
  { yyVal = null; }
  break;
case 451:
#line 3112 "cs-parser.jay"
  { 
		ArrayList list = new ArrayList (4);
		list.Add (yyVals[0+yyTop]);
		yyVal = list;
	  }
  break;
case 452:
#line 3118 "cs-parser.jay"
  {
		ArrayList list = (ArrayList) yyVals[-2+yyTop];
		list.Add (yyVals[0+yyTop]);
		yyVal = list;
	  }
  break;
case 453:
#line 3124 "cs-parser.jay"
  {
	  	Report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing");
	  	yyVal = null;
	  }
  break;
case 454:
#line 3129 "cs-parser.jay"
  {
	  	Report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing");
	  	yyVal = null;
	  }
  break;
case 455:
#line 3137 "cs-parser.jay"
  {
		yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Expression);
	  }
  break;
case 456:
#line 3141 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 457:
#line 3148 "cs-parser.jay"
  { 
		yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref);
	  }
  break;
case 458:
#line 3152 "cs-parser.jay"
  { 
		yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out);
	  }
  break;
case 459:
#line 3156 "cs-parser.jay"
  {
		ArrayList list = (ArrayList) yyVals[-1+yyTop];
		Argument[] args = new Argument [list.Count];
		list.CopyTo (args, 0);

		Expression expr = new Arglist (args, (Location) yyVals[-3+yyTop]);
		yyVal = new Argument (expr, Argument.AType.Expression);
	  }
  break;
case 460:
#line 3165 "cs-parser.jay"
  {
		yyVal = new Argument (new Arglist ((Location) yyVals[-2+yyTop]), Argument.AType.Expression);
	  }
  break;
case 461:
#line 3169 "cs-parser.jay"
  {
		yyVal = new Argument (new ArglistAccess ((Location) yyVals[0+yyTop]), Argument.AType.ArgList);
	  }
  break;
case 462:
#line 3175 "cs-parser.jay"
  { note ("section 5.4"); yyVal = yyVals[0+yyTop]; }
  break;
case 463:
#line 3180 "cs-parser.jay"
  {
		yyVal = new ElementAccess ((Expression) yyVals[-3+yyTop], (ArrayList) yyVals[-1+yyTop]);
	  }
  break;
case 464:
#line 3184 "cs-parser.jay"
  {
	  	/* LAMESPEC: Not allowed according to specification*/
		yyVal = new ElementAccess ((Expression) yyVals[-3+yyTop], (ArrayList) yyVals[-1+yyTop]);
	  }
  break;
case 465:
#line 3189 "cs-parser.jay"
  {
		/* So the super-trick is that primary_expression*/
		/* can only be either a SimpleName or a MemberAccess. */
		/* The MemberAccess case arises when you have a fully qualified type-name like :*/
		/* Foo.Bar.Blah i;*/
		/* SimpleName is when you have*/
		/* Blah i;*/
		  
		Expression expr = (Expression) yyVals[-1+yyTop];  
		if (expr is ComposedCast){
			yyVal = new ComposedCast ((ComposedCast)expr, (string) yyVals[0+yyTop]);
		} else if (expr is ATypeNameExpression){
			/**/
			/* So we extract the string corresponding to the SimpleName*/
			/* or MemberAccess*/
			/* */
			yyVal = new ComposedCast ((ATypeNameExpression)expr, (string) yyVals[0+yyTop]);
		} else {
			Error_ExpectingTypeName (expr);
			yyVal = TypeManager.system_object_expr;
		}
		
		current_array_type = (FullNamedExpression)yyVal;
	  }
  break;
case 466:
#line 3217 "cs-parser.jay"
  {
		ArrayList list = new ArrayList (4);
		list.Add (yyVals[0+yyTop]);
		yyVal = list;
	  }
  break;
case 467:
#line 3223 "cs-parser.jay"
  {
		ArrayList list = (ArrayList) yyVals[-2+yyTop];
		list.Add (yyVals[0+yyTop]);
		yyVal = list;
	  }
  break;
case 468:
#line 3232 "cs-parser.jay"
  {
		yyVal = new This (current_block, (Location) yyVals[0+yyTop]);
	  }
  break;
case 469:
#line 3239 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-1+yyTop];
		yyVal = new BaseAccess (lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location);
	  }
  break;
case 470:
#line 3244 "cs-parser.jay"
  {
		yyVal = new BaseIndexerAccess ((ArrayList) yyVals[-1+yyTop], (Location) yyVals[-3+yyTop]);
	  }
  break;
case 471:
#line 3247 "cs-parser.jay"
  {
		Report.Error (175, (Location) yyVals[-1+yyTop], "Use of keyword `base' is not valid in this context");
		yyVal = null;
	  }
  break;
case 472:
#line 3255 "cs-parser.jay"
  {
		yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop]);
	  }
  break;
case 473:
#line 3262 "cs-parser.jay"
  {
		yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop]);
	  }
  break;
case 474:
#line 3269 "cs-parser.jay"
  {
		if (yyVals[0+yyTop] != null) {
			if (RootContext.Version <= LanguageVersion.ISO_2)
				Report.FeatureIsNotAvailable (GetLocation (yyVals[-5+yyTop]), "object initializers");
				
			yyVal = new NewInitialize ((Expression) yyVals[-4+yyTop], (ArrayList) yyVals[-2+yyTop], (CollectionOrObjectInitializers) yyVals[0+yyTop], (Location) yyVals[-5+yyTop]);
		}
		else
			yyVal = new New ((Expression) yyVals[-4+yyTop], (ArrayList) yyVals[-2+yyTop], (Location) yyVals[-5+yyTop]);
	  }
  break;
case 475:
#line 3280 "cs-parser.jay"
  {
		if (RootContext.Version <= LanguageVersion.ISO_2)
			Report.FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers");
	  
		yyVal = new NewInitialize ((Expression) yyVals[-1+yyTop], null, (CollectionOrObjectInitializers) yyVals[0+yyTop], (Location) yyVals[-2+yyTop]);
	  }
  break;
case 476:
#line 3293 "cs-parser.jay"
  {
		yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-5+yyTop], (ArrayList) yyVals[-3+yyTop], (string) yyVals[-1+yyTop], (ArrayList) yyVals[0+yyTop], (Location) yyVals[-6+yyTop]);
	  }
  break;
case 477:
#line 3297 "cs-parser.jay"
  {
	  	if (yyVals[0+yyTop] == null)
	  		Report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer");

		yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-2+yyTop], (string) yyVals[-1+yyTop], (ArrayList) yyVals[0+yyTop], (Location) yyVals[-3+yyTop]);
	  }
  break;
case 478:
#line 3304 "cs-parser.jay"
  {
		yyVal = new ImplicitlyTypedArrayCreation ((string) yyVals[-1+yyTop], (ArrayList) yyVals[0+yyTop], (Location) yyVals[-2+yyTop]);
	  }
  break;
case 479:
#line 3308 "cs-parser.jay"
  {
		Report.Error (1526, (Location) yyVals[-2+yyTop], "A new expression requires () or [] after type");
		yyVal = null;
	  }
  break;
case 480:
#line 3316 "cs-parser.jay"
  {
	  	if (RootContext.Version <= LanguageVersion.ISO_2)
	  		Report.FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types");

		yyVal = new AnonymousTypeDeclaration ((ArrayList) yyVals[-1+yyTop], current_container, GetLocation (yyVals[-3+yyTop]));
	  }
  break;
case 483:
#line 3330 "cs-parser.jay"
  { yyVal = null; }
  break;
case 485:
#line 3336 "cs-parser.jay"
  {
	  	ArrayList a = new ArrayList (4);
	  	a.Add (yyVals[0+yyTop]);
	  	yyVal = a;
	  }
  break;
case 486:
#line 3342 "cs-parser.jay"
  {
	  	ArrayList a = (ArrayList) yyVals[-2+yyTop];
	  	a.Add (yyVals[0+yyTop]);
	  	yyVal = a;
	  }
  break;
case 487:
#line 3351 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken)yyVals[-2+yyTop];
	  	yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location);
	  }
  break;
case 488:
#line 3356 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken)yyVals[0+yyTop];
	  	yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location),
	  		lt.Value, lt.Location);
	  }
  break;
case 489:
#line 3362 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-1+yyTop];
		BaseAccess ba = new BaseAccess (lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location);
	  	yyVal = new AnonymousTypeParameter (ba, lt.Value, lt.Location);		
	  }
  break;
case 490:
#line 3368 "cs-parser.jay"
  {
	  	MemberAccess ma = (MemberAccess) yyVals[0+yyTop];
	  	yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location);
	  }
  break;
case 491:
#line 3373 "cs-parser.jay"
  {
		Report.Error (746, lexer.Location, "Invalid anonymous type member declarator. " +
		"Anonymous type members must be a member assignment, simple name or member access expression");
	  }
  break;
case 492:
#line 3381 "cs-parser.jay"
  {
		yyVal = "";
	  }
  break;
case 493:
#line 3385 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 494:
#line 3392 "cs-parser.jay"
  {
		if (yyVals[0+yyTop] != null)
			yyVal = "?";
		else
			yyVal = string.Empty;
	  }
  break;
case 495:
#line 3399 "cs-parser.jay"
  {
		if (yyVals[-1+yyTop] != null)
			yyVal = "?" + (string) yyVals[0+yyTop];
		else
			yyVal = yyVals[0+yyTop];
	  }
  break;
case 497:
#line 3410 "cs-parser.jay"
  {
		yyVal = (string) yyVals[0+yyTop] + (string) yyVals[-1+yyTop];
	  }
  break;
case 498:
#line 3417 "cs-parser.jay"
  {
		yyVal = "[]";
	  }
  break;
case 499:
#line 3421 "cs-parser.jay"
  {
		yyVal = "[" + (string) yyVals[-1+yyTop] + "]";
	  }
  break;
case 500:
#line 3425 "cs-parser.jay"
  {
		ArrayCreation.Error_IncorrectArrayInitializer (GetLocation (yyVals[-2+yyTop]));
		yyVal = "[]";
	  }
  break;
case 501:
#line 3433 "cs-parser.jay"
  {
		yyVal = ",";
	  }
  break;
case 502:
#line 3437 "cs-parser.jay"
  {
		yyVal = (string) yyVals[-1+yyTop] + ",";
	  }
  break;
case 503:
#line 3444 "cs-parser.jay"
  {
		yyVal = null;
	  }
  break;
case 504:
#line 3448 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 505:
#line 3455 "cs-parser.jay"
  {
		ArrayList list = new ArrayList (4);
		yyVal = list;
	  }
  break;
case 506:
#line 3460 "cs-parser.jay"
  {
		yyVal = (ArrayList) yyVals[-2+yyTop];
	  }
  break;
case 507:
#line 3467 "cs-parser.jay"
  {
		ArrayList list = new ArrayList (4);
		list.Add (yyVals[0+yyTop]);
		yyVal = list;
	  }
  break;
case 508:
#line 3473 "cs-parser.jay"
  {
		ArrayList list = (ArrayList) yyVals[-2+yyTop];
		list.Add (yyVals[0+yyTop]);
		yyVal = list;
	  }
  break;
case 509:
#line 3479 "cs-parser.jay"
  {
	  	Error_SyntaxError (yyToken);
	  	yyVal = new ArrayList ();
	  }
  break;
case 510:
#line 3487 "cs-parser.jay"
  {
	  	pushed_current_array_type = current_array_type;
	  	lexer.TypeOfParsing = true;
	  }
  break;
case 511:
#line 3492 "cs-parser.jay"
  {
	  	lexer.TypeOfParsing = false;
		Expression type = (Expression)yyVals[-1+yyTop];
		if (type == TypeManager.system_void_expr)
			yyVal = new TypeOfVoid ((Location) yyVals[-4+yyTop]);
		else
			yyVal = new TypeOf (type, (Location) yyVals[-4+yyTop]);
		current_array_type = pushed_current_array_type;
	  }
  break;
case 514:
#line 3507 "cs-parser.jay"
  {
	 	Error_TypeExpected (lexer.Location);
	 	yyVal = null;
	 }
  break;
case 515:
#line 3515 "cs-parser.jay"
  {  
		LocatedToken lt = (LocatedToken) yyVals[-1+yyTop];

		yyVal = new SimpleName (MemberName.MakeName (lt.Value, (int)yyVals[0+yyTop]), lt.Location);
	  }
  break;
case 516:
#line 3521 "cs-parser.jay"
  {
		LocatedToken lt1 = (LocatedToken) yyVals[-2+yyTop];
		LocatedToken lt2 = (LocatedToken) yyVals[-1+yyTop];

		yyVal = new QualifiedAliasMember (lt1.Value, MemberName.MakeName (lt2.Value, (int) yyVals[0+yyTop]), lt1.Location);
	  }
  break;
case 517:
#line 3528 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[0+yyTop];
		
		yyVal = new MemberAccess ((Expression) yyVals[-2+yyTop], lt.Value, lt.Location);		
	  }
  break;
case 518:
#line 3534 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-1+yyTop];
		
		yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], MemberName.MakeName (lt.Value, (int) yyVals[0+yyTop]), lt.Location);		
	  }
  break;
case 519:
#line 3540 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-1+yyTop];
		MemberName name = (MemberName) yyVals[-3+yyTop];

		yyVal = new MemberAccess (name.GetTypeExpression (), MemberName.MakeName (lt.Value, (int) yyVals[0+yyTop]), lt.Location);		
	  }
  break;
case 520:
#line 3550 "cs-parser.jay"
  {
		if (RootContext.Version < LanguageVersion.ISO_2)
			Report.FeatureIsNotAvailable (lexer.Location, "generics");

		yyVal = yyVals[0+yyTop];
	  }
  break;
case 521:
#line 3560 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-1+yyTop];
		if (RootContext.Version == LanguageVersion.ISO_1)
			Report.FeatureIsNotAvailable (lt.Location, "namespace alias qualifier");

		yyVal = lt;		
	  }
  break;
case 522:
#line 3570 "cs-parser.jay"
  { 
		yyVal = new SizeOf ((Expression) yyVals[-1+yyTop], (Location) yyVals[-3+yyTop]);
	  }
  break;
case 523:
#line 3577 "cs-parser.jay"
  {
		yyVal = new CheckedExpr ((Expression) yyVals[-1+yyTop], (Location) yyVals[-3+yyTop]);
	  }
  break;
case 524:
#line 3584 "cs-parser.jay"
  {
		yyVal = new UnCheckedExpr ((Expression) yyVals[-1+yyTop], (Location) yyVals[-3+yyTop]);
	  }
  break;
case 525:
#line 3591 "cs-parser.jay"
  {
		Expression deref;
		LocatedToken lt = (LocatedToken) yyVals[0+yyTop];

		deref = new Indirection ((Expression) yyVals[-2+yyTop], lt.Location);
		yyVal = new MemberAccess (deref, lt.Value);
	  }
  break;
case 526:
#line 3602 "cs-parser.jay"
  {
		start_anonymous (false, (Parameters) yyVals[0+yyTop], (Location) yyVals[-1+yyTop]);
	  }
  break;
case 527:
#line 3606 "cs-parser.jay"
  {
		yyVal = end_anonymous ((ToplevelBlock) yyVals[0+yyTop]);
	}
  break;
case 528:
#line 3613 "cs-parser.jay"
  {
		yyVal = Parameters.Undefined;
	  }
  break;
case 530:
#line 3621 "cs-parser.jay"
  {
	  	params_modifiers_not_allowed = true; 
	  }
  break;
case 531:
#line 3625 "cs-parser.jay"
  {
	  	params_modifiers_not_allowed = false;
	  	yyVal = yyVals[-1+yyTop];
	  }
  break;
case 532:
#line 3633 "cs-parser.jay"
  {
		if (RootContext.Version < LanguageVersion.ISO_2)
			Report.FeatureIsNotAvailable (lexer.Location, "default value expression");

		yyVal = new DefaultValueExpression ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
	  }
  break;
case 534:
#line 3644 "cs-parser.jay"
  {
		yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop]);
	  }
  break;
case 535:
#line 3648 "cs-parser.jay"
  {
		yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop]);
	  }
  break;
case 537:
#line 3656 "cs-parser.jay"
  {
		yyVal = new Cast ((FullNamedExpression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop]));
	  }
  break;
case 538:
#line 3660 "cs-parser.jay"
  {
		yyVal = new Cast ((FullNamedExpression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop]));
	  }
  break;
case 540:
#line 3672 "cs-parser.jay"
  { 
	  	yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop]);
	  }
  break;
case 541:
#line 3676 "cs-parser.jay"
  { 
		yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop]);
	  }
  break;
case 542:
#line 3680 "cs-parser.jay"
  {
		yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop]);
	  }
  break;
case 543:
#line 3684 "cs-parser.jay"
  {
		yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop]);
	  }
  break;
case 544:
#line 3688 "cs-parser.jay"
  {
		yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 545:
#line 3692 "cs-parser.jay"
  {
		yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop]);
	  }
  break;
case 547:
#line 3700 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.Multiply, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 548:
#line 3705 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.Division, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 549:
#line 3710 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.Modulus, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 551:
#line 3719 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.Addition, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 552:
#line 3724 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 553:
#line 3728 "cs-parser.jay"
  {
	  	/* Shift/Reduce conflict*/
		yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
  	  }
  break;
case 554:
#line 3733 "cs-parser.jay"
  {
		yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], (Location) yyVals[-1+yyTop]);
	  }
  break;
case 555:
#line 3737 "cs-parser.jay"
  {
		yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], (Location) yyVals[-1+yyTop]);
	  }
  break;
case 557:
#line 3745 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.LeftShift, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 558:
#line 3750 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.RightShift, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 560:
#line 3759 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.LessThan, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 561:
#line 3764 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.GreaterThan, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 562:
#line 3769 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.LessThanOrEqual, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 563:
#line 3774 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 565:
#line 3783 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.Equality, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 566:
#line 3788 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.Inequality, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 568:
#line 3797 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.BitwiseAnd, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 570:
#line 3806 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.ExclusiveOr, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 572:
#line 3815 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.BitwiseOr, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 574:
#line 3824 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.LogicalAnd, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 576:
#line 3833 "cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.LogicalOr, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 578:
#line 3842 "cs-parser.jay"
  {
		if (RootContext.Version < LanguageVersion.ISO_2)
			Report.FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator");
			
		yyVal = new Nullable.NullCoalescingOperator ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], lexer.Location);
	  }
  break;
case 580:
#line 3853 "cs-parser.jay"
  {
		yyVal = new Conditional ((Expression) yyVals[-4+yyTop], (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 581:
#line 3860 "cs-parser.jay"
  {
		yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 582:
#line 3864 "cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 583:
#line 3869 "cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 584:
#line 3874 "cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 585:
#line 3879 "cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 586:
#line 3884 "cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 587:
#line 3889 "cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 588:
#line 3894 "cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 589:
#line 3899 "cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 590:
#line 3904 "cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 591:
#line 3909 "cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop]);
	  }
  break;
case 592:
#line 3917 "cs-parser.jay"
  {
		ArrayList pars = new ArrayList (4);
		pars.Add (yyVals[0+yyTop]);

		yyVal = pars;
	  }
  break;
case 593:
#line 3924 "cs-parser.jay"
  {
		ArrayList pars = (ArrayList) yyVals[-2+yyTop];
		Parameter p = (Parameter)yyVals[0+yyTop];
		if (pars[0].GetType () != p.GetType ()) {
			Report.Error (748, p.Location, "All lambda parameters must be typed either explicitly or implicitly");
		}
		
		pars.Add (p);
		yyVal = pars;
	  }
  break;
case 594:
#line 3938 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[0+yyTop];

		yyVal = new Parameter ((FullNamedExpression) yyVals[-1+yyTop], lt.Value, (Parameter.Modifier) yyVals[-2+yyTop], null, lt.Location);
	  }
  break;
case 595:
#line 3944 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[0+yyTop];

		yyVal = new Parameter ((FullNamedExpression) yyVals[-1+yyTop], lt.Value, Parameter.Modifier.NONE, null, lt.Location);
	  }
  break;
case 596:
#line 3950 "cs-parser.jay"
  {
	  	LocatedToken lt = (LocatedToken) yyVals[0+yyTop];
		yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location);
	  }
  break;
case 597:
#line 3957 "cs-parser.jay"
  { yyVal = Parameters.EmptyReadOnlyParameters; }
  break;
case 598:
#line 3958 "cs-parser.jay"
  { 
		ArrayList pars_list = (ArrayList) yyVals[0+yyTop];
		yyVal = new Parameters ((Parameter[])pars_list.ToArray (typeof (Parameter)));
	  }
  break;
case 599:
#line 3965 "cs-parser.jay"
  {
		start_block (lexer.Location);
	  }
  break;
case 600:
#line 3969 "cs-parser.jay"
  {
		Block b = end_block (lexer.Location);
		b.AddStatement (new ContextualReturn ((Expression) yyVals[0+yyTop]));
		yyVal = b;
	  }
  break;
case 601:
#line 3974 "cs-parser.jay"
  { 
	  	yyVal = yyVals[0+yyTop]; 
	  }
  break;
case 602:
#line 3981 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-1+yyTop];
		Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location);
		start_anonymous (true, new Parameters (p), GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 603:
#line 3987 "cs-parser.jay"
  {
		yyVal = end_anonymous ((ToplevelBlock) yyVals[0+yyTop]);
	  }
  break;
case 604:
#line 3991 "cs-parser.jay"
  {
		start_anonymous (true, (Parameters) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop]));
	  }
  break;
case 605:
#line 3995 "cs-parser.jay"
  {
		yyVal = end_anonymous ((ToplevelBlock) yyVals[0+yyTop]);
	  }
  break;
case 613:
#line 4027 "cs-parser.jay"
  {
		lexer.ConstraintsParsing = true;
	  }
  break;
case 614:
#line 4031 "cs-parser.jay"
  {
		MemberName name = MakeName ((MemberName) yyVals[0+yyTop]);
		push_current_class (new Class (current_namespace, current_class, name, (int) yyVals[-4+yyTop], (Attributes) yyVals[-5+yyTop]), yyVals[-3+yyTop]);
	  }
  break;
case 615:
#line 4037 "cs-parser.jay"
  {
		lexer.ConstraintsParsing = false;

		current_class.SetParameterInfo ((ArrayList) yyVals[0+yyTop]);

		if (RootContext.Documentation != null) {
			current_container.DocComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}
	  }
  break;
case 616:
#line 4048 "cs-parser.jay"
  {
		--lexer.parsing_declaration;	  
		if (RootContext.Documentation != null)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 617:
#line 4054 "cs-parser.jay"
  {
		yyVal = pop_current_class ();
	  }
  break;
case 618:
#line 4061 "cs-parser.jay"
  { yyVal = null; }
  break;
case 619:
#line 4063 "cs-parser.jay"
  { yyVal = yyVals[0+yyTop]; }
  break;
case 620:
#line 4067 "cs-parser.jay"
  { yyVal = (int) 0; }
  break;
case 623:
#line 4074 "cs-parser.jay"
  { 
		int m1 = (int) yyVals[-1+yyTop];
		int m2 = (int) yyVals[0+yyTop];

		if ((m1 & m2) != 0) {
			Location l = lexer.Location;
			Report.Error (1004, l, "Duplicate `{0}' modifier", Modifiers.Name (m2));
		}
		yyVal = (int) (m1 | m2);
	  }
  break;
case 624:
#line 4088 "cs-parser.jay"
  {
		yyVal = Modifiers.NEW;
		if (current_container == RootContext.ToplevelTypes)
			Report.Error (1530, lexer.Location, "Keyword `new' is not allowed on namespace elements");
	  }
  break;
case 625:
#line 4093 "cs-parser.jay"
  { yyVal = Modifiers.PUBLIC; }
  break;
case 626:
#line 4094 "cs-parser.jay"
  { yyVal = Modifiers.PROTECTED; }
  break;
case 627:
#line 4095 "cs-parser.jay"
  { yyVal = Modifiers.INTERNAL; }
  break;
case 628:
#line 4096 "cs-parser.jay"
  { yyVal = Modifiers.PRIVATE; }
  break;
case 629:
#line 4097 "cs-parser.jay"
  { yyVal = Modifiers.ABSTRACT; }
  break;
case 630:
#line 4098 "cs-parser.jay"
  { yyVal = Modifiers.SEALED; }
  break;
case 631:
#line 4099 "cs-parser.jay"
  { yyVal = Modifiers.STATIC; }
  break;
case 632:
#line 4100 "cs-parser.jay"
  { yyVal = Modifiers.READONLY; }
  break;
case 633:
#line 4101 "cs-parser.jay"
  { yyVal = Modifiers.VIRTUAL; }
  break;
case 634:
#line 4102 "cs-parser.jay"
  { yyVal = Modifiers.OVERRIDE; }
  break;
case 635:
#line 4103 "cs-parser.jay"
  { yyVal = Modifiers.EXTERN; }
  break;
case 636:
#line 4104 "cs-parser.jay"
  { yyVal = Modifiers.VOLATILE; }
  break;
case 637:
#line 4105 "cs-parser.jay"
  { yyVal = Modifiers.UNSAFE; }
  break;
case 640:
#line 4114 "cs-parser.jay"
  { current_container.AddBasesForPart (current_class, (ArrayList) yyVals[0+yyTop]); }
  break;
case 641:
#line 4118 "cs-parser.jay"
  { yyVal = null; }
  break;
case 642:
#line 4120 "cs-parser.jay"
  { yyVal = yyVals[0+yyTop]; }
  break;
case 643:
#line 4124 "cs-parser.jay"
  {
		ArrayList constraints = new ArrayList (1);
		constraints.Add (yyVals[0+yyTop]);
		yyVal = constraints;
	  }
  break;
case 644:
#line 4129 "cs-parser.jay"
  {
		ArrayList constraints = (ArrayList) yyVals[-1+yyTop];
		Constraints new_constraint = (Constraints)yyVals[0+yyTop];

		foreach (Constraints c in constraints) {
			if (new_constraint.TypeParameter == c.TypeParameter) {
				Report.Error (409, new_constraint.Location, "A constraint clause has already been specified for type parameter `{0}'",
					new_constraint.TypeParameter);
			}
		}

		constraints.Add (new_constraint);
		yyVal = constraints;
	  }
  break;
case 645:
#line 4146 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-2+yyTop];
		yyVal = new Constraints (lt.Value, (ArrayList) yyVals[0+yyTop], lt.Location);
	  }
  break;
case 646:
#line 4153 "cs-parser.jay"
  {
		ArrayList constraints = new ArrayList (1);
		constraints.Add (yyVals[0+yyTop]);
		yyVal = constraints;
	  }
  break;
case 647:
#line 4158 "cs-parser.jay"
  {
		ArrayList constraints = (ArrayList) yyVals[-2+yyTop];

		constraints.Add (yyVals[0+yyTop]);
		yyVal = constraints;
	  }
  break;
case 649:
#line 4168 "cs-parser.jay"
  {
		yyVal = SpecialConstraint.Constructor;
	  }
  break;
case 650:
#line 4171 "cs-parser.jay"
  {
		yyVal = SpecialConstraint.ReferenceType;
	  }
  break;
case 651:
#line 4174 "cs-parser.jay"
  {
		yyVal = SpecialConstraint.ValueType;
	  }
  break;
case 652:
#line 4194 "cs-parser.jay"
  {
		++lexer.parsing_block;
		start_block ((Location) yyVals[0+yyTop]);
	  }
  break;
case 653:
#line 4199 "cs-parser.jay"
  {
	 	--lexer.parsing_block;
		yyVal = end_block ((Location) yyVals[0+yyTop]);
	  }
  break;
case 654:
#line 4207 "cs-parser.jay"
  {
		++lexer.parsing_block;
		current_block.StartLocation = GetLocation (yyVals[0+yyTop]);
	  }
  break;
case 655:
#line 4212 "cs-parser.jay"
  {
		--lexer.parsing_block;
		yyVal = end_block ((Location) yyVals[0+yyTop]);
	  }
  break;
case 660:
#line 4230 "cs-parser.jay"
  {
		if (yyVals[0+yyTop] != null && (Block) yyVals[0+yyTop] != current_block){
			current_block.AddStatement ((Statement) yyVals[0+yyTop]);
			current_block = (Block) yyVals[0+yyTop];
		}
	  }
  break;
case 661:
#line 4237 "cs-parser.jay"
  {
		current_block.AddStatement ((Statement) yyVals[0+yyTop]);
	  }
  break;
case 665:
#line 4256 "cs-parser.jay"
  {
		if (yyVals[0+yyTop] != null && (Block) yyVals[0+yyTop] != current_block){
			current_block.AddStatement ((Statement) yyVals[0+yyTop]);
			current_block = (Block) yyVals[0+yyTop];
		}
	  }
  break;
case 666:
#line 4263 "cs-parser.jay"
  {
		current_block.AddStatement ((Statement) yyVals[0+yyTop]);
	  }
  break;
case 695:
#line 4304 "cs-parser.jay"
  {
		  Report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement");
		  yyVal = null;
	  }
  break;
case 696:
#line 4309 "cs-parser.jay"
  {
		  Report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement");
		  yyVal = null;
	  }
  break;
case 697:
#line 4317 "cs-parser.jay"
  {
		  yyVal = EmptyStatement.Value;
	  }
  break;
case 698:
#line 4324 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-1+yyTop];
		LabeledStatement labeled = new LabeledStatement (lt.Value, lt.Location);

		if (current_block.AddLabel (labeled))
			current_block.AddStatement (labeled);
	  }
  break;
case 700:
#line 4336 "cs-parser.jay"
  {
		current_array_type = null;
		if (yyVals[-1+yyTop] != null){
			DictionaryEntry de = (DictionaryEntry) yyVals[-1+yyTop];
			Expression e = (Expression) de.Key;

			yyVal = declare_local_variables (e, (ArrayList) de.Value, e.Location);
		}
	  }
  break;
case 701:
#line 4347 "cs-parser.jay"
  {
		current_array_type = null;
		if (yyVals[-1+yyTop] != null){
			DictionaryEntry de = (DictionaryEntry) yyVals[-1+yyTop];

			yyVal = declare_local_constants ((Expression) de.Key, (ArrayList) de.Value);
		}
	  }
  break;
case 702:
#line 4365 "cs-parser.jay"
  { 
		/* FIXME: Do something smart here regarding the composition of the type.*/

		/* Ok, the above "primary_expression" is there to get rid of*/
		/* both reduce/reduce and shift/reduces in the grammar, it should*/
		/* really just be "type_name".  If you use type_name, a reduce/reduce*/
		/* creeps up.  If you use namespace_or_type_name (which is all we need*/
		/* really) two shift/reduces appear.*/
		/* */

		/* So the super-trick is that primary_expression*/
		/* can only be either a SimpleName or a MemberAccess. */
		/* The MemberAccess case arises when you have a fully qualified type-name like :*/
		/* Foo.Bar.Blah i;*/
		/* SimpleName is when you have*/
		/* Blah i;*/
		
		Expression expr = (Expression) yyVals[-1+yyTop];
		string rank_or_nullable = (string) yyVals[0+yyTop];
		
		if (expr is ComposedCast){
			yyVal = new ComposedCast ((ComposedCast)expr, rank_or_nullable);
		} else if (expr is ATypeNameExpression){
			/**/
			/* So we extract the string corresponding to the SimpleName*/
			/* or MemberAccess*/
			/**/
			if (rank_or_nullable.Length == 0) {
				SimpleName sn = expr as SimpleName;
				if (sn != null && sn.Name == "var" &&
				    (RootContext.Version > LanguageVersion.ISO_2 || RootContext.Version == LanguageVersion.Default_MCS))
					yyVal = current_array_type = new VarExpr (sn.Location);
				else
					yyVal = yyVals[-1+yyTop];
			} else {
				yyVal = new ComposedCast ((ATypeNameExpression)expr, rank_or_nullable);
			}
		} else {
			Error_ExpectingTypeName (expr);
			yyVal = TypeManager.system_object_expr;
		}
	  }
  break;
case 703:
#line 4408 "cs-parser.jay"
  {
		if ((string) yyVals[0+yyTop] == "")
			yyVal = yyVals[-1+yyTop];
		else
			yyVal = current_array_type = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (string) yyVals[0+yyTop], lexer.Location);
	  }
  break;
case 704:
#line 4415 "cs-parser.jay"
  {
		Expression.Error_VoidInvalidInTheContext (lexer.Location);
		yyVal = TypeManager.system_void_expr;
	  }
  break;
case 705:
#line 4423 "cs-parser.jay"
  {
		ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression;

		if (expr != null) {
			yyVal = new ComposedCast (expr, "*");
		} else {
			Error_ExpectingTypeName ((Expression)yyVals[-1+yyTop]);
			yyVal = expr;
		}
	  }
  break;
case 706:
#line 4434 "cs-parser.jay"
  {
		yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], "*", GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 707:
#line 4438 "cs-parser.jay"
  {
		yyVal = new ComposedCast (TypeManager.system_void_expr, "*", (Location) yyVals[-1+yyTop]);
	  }
  break;
case 708:
#line 4442 "cs-parser.jay"
  {
		yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], "*");
	  }
  break;
case 710:
#line 4450 "cs-parser.jay"
  {
		if (yyVals[-1+yyTop] != null){
			string rank = (string)yyVals[0+yyTop];

			if (rank == "")
				yyVal = yyVals[-1+yyTop];
			else
				yyVal = current_array_type = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], rank);
		} else {
			yyVal = null;
		}
	  }
  break;
case 711:
#line 4466 "cs-parser.jay"
  {
		if (yyVals[-1+yyTop] != null) {
			VarExpr ve = yyVals[-1+yyTop] as VarExpr;
			if (ve != null)
				ve.VariableInitializer = (ArrayList)yyVals[0+yyTop];
				
			yyVal = new DictionaryEntry (yyVals[-1+yyTop], yyVals[0+yyTop]);
		} else
			yyVal = null;
	  }
  break;
case 712:
#line 4480 "cs-parser.jay"
  {
		if (yyVals[-1+yyTop] != null)
			yyVal = new DictionaryEntry (yyVals[-1+yyTop], yyVals[0+yyTop]);
		else
			yyVal = null;
	  }
  break;
case 713:
#line 4489 "cs-parser.jay"
  { yyVal = yyVals[-1+yyTop]; }
  break;
case 714:
#line 4493 "cs-parser.jay"
  { yyVal = yyVals[-1+yyTop]; }
  break;
case 715:
#line 4502 "cs-parser.jay"
  {
		ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement;
		if (s == null) {
			((Expression) yyVals[0+yyTop]).Error_InvalidExpressionStatement ();
			s = EmptyExpressionStatement.Instance;
		}

		yyVal = new StatementExpression (s);
	  }
  break;
case 716:
#line 4512 "cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
		yyVal = null;
	  }
  break;
case 717:
#line 4520 "cs-parser.jay"
  {
		Expression expr = (Expression) yyVals[0+yyTop];
		ExpressionStatement s;

	        s = new OptionalAssign (new SimpleName ("$retval", lexer.Location), expr, lexer.Location);
		yyVal = new StatementExpression (s);
	  }
  break;
case 718:
#line 4528 "cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
		yyVal = null;
	  }
  break;
case 721:
#line 4542 "cs-parser.jay"
  { 
		Location l = (Location) yyVals[-4+yyTop];

		yyVal = new If ((Expression) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop], l);

		/* FIXME: location for warning should be loc property of $5.*/
		if (yyVals[0+yyTop] == EmptyStatement.Value)
			Report.Warning (642, 3, l, "Possible mistaken empty statement");

	  }
  break;
case 722:
#line 4554 "cs-parser.jay"
  {
		Location l = (Location) yyVals[-6+yyTop];

		yyVal = new If ((Expression) yyVals[-4+yyTop], (Statement) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop], l);

		/* FIXME: location for warning should be loc property of $5 and $7.*/
		if (yyVals[-2+yyTop] == EmptyStatement.Value)
			Report.Warning (642, 3, l, "Possible mistaken empty statement");
		if (yyVals[0+yyTop] == EmptyStatement.Value)
			Report.Warning (642, 3, l, "Possible mistaken empty statement");
	  }
  break;
case 723:
#line 4569 "cs-parser.jay"
  { 
		if (switch_stack == null)
			switch_stack = new Stack (2);
		switch_stack.Push (current_block);
	  }
  break;
case 724:
#line 4576 "cs-parser.jay"
  {
		yyVal = new Switch ((Expression) yyVals[-2+yyTop], (ArrayList) yyVals[0+yyTop], (Location) yyVals[-5+yyTop]);
		current_block = (Block) switch_stack.Pop ();
	  }
  break;
case 725:
#line 4586 "cs-parser.jay"
  {
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 726:
#line 4593 "cs-parser.jay"
  {
	  	Report.Warning (1522, 1, lexer.Location, "Empty switch block"); 
		yyVal = new ArrayList ();
	  }
  break;
case 728:
#line 4602 "cs-parser.jay"
  {
		ArrayList sections = new ArrayList (4);

		sections.Add (yyVals[0+yyTop]);
		yyVal = sections;
	  }
  break;
case 729:
#line 4609 "cs-parser.jay"
  {
		ArrayList sections = (ArrayList) yyVals[-1+yyTop];

		sections.Add (yyVals[0+yyTop]);
		yyVal = sections;
	  }
  break;
case 730:
#line 4619 "cs-parser.jay"
  {
		current_block = current_block.CreateSwitchBlock (lexer.Location);
	  }
  break;
case 731:
#line 4623 "cs-parser.jay"
  {
		yyVal = new SwitchSection ((ArrayList) yyVals[-2+yyTop], current_block.Explicit);
	  }
  break;
case 732:
#line 4630 "cs-parser.jay"
  {
		ArrayList labels = new ArrayList (4);

		labels.Add (yyVals[0+yyTop]);
		yyVal = labels;
	  }
  break;
case 733:
#line 4637 "cs-parser.jay"
  {
		ArrayList labels = (ArrayList) (yyVals[-1+yyTop]);
		labels.Add (yyVals[0+yyTop]);

		yyVal = labels;
	  }
  break;
case 734:
#line 4647 "cs-parser.jay"
  {
	 	yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], (Location) yyVals[-2+yyTop]);
	 }
  break;
case 735:
#line 4651 "cs-parser.jay"
  {
		yyVal = new SwitchLabel (null, (Location) yyVals[0+yyTop]);
	  }
  break;
case 740:
#line 4665 "cs-parser.jay"
  {
		Location l = (Location) yyVals[-4+yyTop];
		yyVal = new While ((Expression) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop], l);
	  }
  break;
case 741:
#line 4674 "cs-parser.jay"
  {
		Location l = (Location) yyVals[-6+yyTop];

		yyVal = new Do ((Statement) yyVals[-5+yyTop], (Expression) yyVals[-2+yyTop], l);
	  }
  break;
case 742:
#line 4683 "cs-parser.jay"
  {
		Location l = lexer.Location;
		start_block (l);  
		Block assign_block = current_block;

		if (yyVals[-1+yyTop] is DictionaryEntry){
			DictionaryEntry de = (DictionaryEntry) yyVals[-1+yyTop];
			
			Expression type = (Expression) de.Key;
			ArrayList var_declarators = (ArrayList) de.Value;

			foreach (VariableDeclaration decl in var_declarators){

				LocalInfo vi;

				vi = current_block.AddVariable (type, decl.identifier, decl.Location);
				if (vi == null)
					continue;

				Expression expr = decl.expression_or_array_initializer;
					
				LocalVariableReference var;
				var = new LocalVariableReference (assign_block, decl.identifier, l);

				if (expr != null) {
					Assign a = new SimpleAssign (var, expr, decl.Location);
					
					assign_block.AddStatement (new StatementExpression (a));
				}
			}
			
			/* Note: the $$ below refers to the value of this code block, not of the LHS non-terminal.*/
			/* This can be referred to as $5 below.*/
			yyVal = null;
		} else {
			yyVal = yyVals[-1+yyTop];
		}
	  }
  break;
case 743:
#line 4724 "cs-parser.jay"
  {
		Location l = (Location) yyVals[-9+yyTop];

		For f = new For ((Statement) yyVals[-5+yyTop], (Expression) yyVals[-4+yyTop], (Statement) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop], l);

		current_block.AddStatement (f);

		yyVal = end_block (lexer.Location);
	  }
  break;
case 744:
#line 4736 "cs-parser.jay"
  { yyVal = EmptyStatement.Value; }
  break;
case 748:
#line 4746 "cs-parser.jay"
  { yyVal = null; }
  break;
case 750:
#line 4751 "cs-parser.jay"
  { yyVal = EmptyStatement.Value; }
  break;
case 753:
#line 4761 "cs-parser.jay"
  {
		/* CHANGE: was `null'*/
		Statement s = (Statement) yyVals[0+yyTop];
		Block b = new Block (current_block, s.loc, lexer.Location);   

		b.AddStatement (s);
		yyVal = b;
	  }
  break;
case 754:
#line 4770 "cs-parser.jay"
  {
		Block b = (Block) yyVals[-2+yyTop];

		b.AddStatement ((Statement) yyVals[0+yyTop]);
		yyVal = yyVals[-2+yyTop];
	  }
  break;
case 755:
#line 4780 "cs-parser.jay"
  {
		Report.Error (230, (Location) yyVals[-5+yyTop], "Type and identifier are both required in a foreach statement");
		yyVal = null;
	  }
  break;
case 756:
#line 4786 "cs-parser.jay"
  {
		start_block (lexer.Location);
		Block foreach_block = current_block;

		LocatedToken lt = (LocatedToken) yyVals[-3+yyTop];
		Location l = lt.Location;
		LocalInfo vi = foreach_block.AddVariable ((Expression) yyVals[-4+yyTop], lt.Value, l);
		if (vi != null) {
			vi.SetReadOnlyContext (LocalInfo.ReadOnlyContext.Foreach);

			/* Get a writable reference to this read-only variable.*/
			/**/
			/* Note that the $$ here refers to the value of _this_ code block,*/
			/* not the value of the LHS non-terminal.  This can be referred to as $8 below.*/
			yyVal = new LocalVariableReference (foreach_block, lt.Value, l, vi, false);
		} else {
			yyVal = null;
		}
	  }
  break;
case 757:
#line 4806 "cs-parser.jay"
  {
		LocalVariableReference v = (LocalVariableReference) yyVals[-1+yyTop];
		Location l = (Location) yyVals[-8+yyTop];

		if (v != null) {
			Foreach f = new Foreach ((Expression) yyVals[-6+yyTop], v, (Expression) yyVals[-3+yyTop], (Statement) yyVals[0+yyTop], l);
			current_block.AddStatement (f);
		}

		yyVal = end_block (lexer.Location);
	  }
  break;
case 764:
#line 4830 "cs-parser.jay"
  {
		yyVal = new Break ((Location) yyVals[-1+yyTop]);
	  }
  break;
case 765:
#line 4837 "cs-parser.jay"
  {
		yyVal = new Continue ((Location) yyVals[-1+yyTop]);
	  }
  break;
case 766:
#line 4844 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-1+yyTop];
		yyVal = new Goto (lt.Value, lt.Location);
	  }
  break;
case 767:
#line 4849 "cs-parser.jay"
  {
		yyVal = new GotoCase ((Expression) yyVals[-1+yyTop], (Location) yyVals[-3+yyTop]);
	  }
  break;
case 768:
#line 4853 "cs-parser.jay"
  {
		yyVal = new GotoDefault ((Location) yyVals[-2+yyTop]);
	  }
  break;
case 769:
#line 4860 "cs-parser.jay"
  {
		yyVal = new Return ((Expression) yyVals[-1+yyTop], (Location) yyVals[-2+yyTop]);
	  }
  break;
case 770:
#line 4867 "cs-parser.jay"
  {
		yyVal = new Throw ((Expression) yyVals[-1+yyTop], (Location) yyVals[-2+yyTop]);
	  }
  break;
case 771:
#line 4874 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-3+yyTop];
		string s = lt.Value;
		if (s != "yield"){
			Report.Error (1003, lt.Location, "; expected");
			yyVal = null;
		}
		if (RootContext.Version == LanguageVersion.ISO_1){
			Report.FeatureIsNotAvailable (lt.Location, "yield statement");
			yyVal = null;
		}
		current_block.Toplevel.IsIterator = true;
		yyVal = new Yield ((Expression) yyVals[-1+yyTop], lt.Location); 
	  }
  break;
case 772:
#line 4889 "cs-parser.jay"
  {
		Report.Error (1627, (Location) yyVals[-1+yyTop], "Expression expected after yield return");
		yyVal = null;
	  }
  break;
case 773:
#line 4894 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-2+yyTop];
		string s = lt.Value;
		if (s != "yield"){
			Report.Error (1003, lt.Location, "; expected");
			yyVal = null;
		}
		if (RootContext.Version == LanguageVersion.ISO_1){
			Report.FeatureIsNotAvailable (lt.Location, "yield statement");
			yyVal = null;
		}
		
		current_block.Toplevel.IsIterator = true;
		yyVal = new YieldBreak (lt.Location);
	  }
  break;
case 776:
#line 4918 "cs-parser.jay"
  {
		yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (ArrayList) yyVals[0+yyTop], (Location) yyVals[-2+yyTop], false);
	  }
  break;
case 777:
#line 4922 "cs-parser.jay"
  {
		yyVal = new TryFinally ((Statement) yyVals[-2+yyTop], (Block) yyVals[0+yyTop], (Location) yyVals[-3+yyTop]);
	  }
  break;
case 778:
#line 4926 "cs-parser.jay"
  {
		yyVal = new TryFinally (new TryCatch ((Block) yyVals[-3+yyTop], (ArrayList) yyVals[-2+yyTop], (Location) yyVals[-4+yyTop], true), (Block) yyVals[0+yyTop], (Location) yyVals[-4+yyTop]);
	  }
  break;
case 779:
#line 4930 "cs-parser.jay"
  {
		Report.Error (1524, (Location) yyVals[-2+yyTop], "Expected catch or finally");
		yyVal = null;
	  }
  break;
case 780:
#line 4938 "cs-parser.jay"
  {
		ArrayList l = new ArrayList (4);

		l.Add (yyVals[0+yyTop]);
		yyVal = l;
	  }
  break;
case 781:
#line 4945 "cs-parser.jay"
  {
		ArrayList l = (ArrayList) yyVals[-1+yyTop];

		l.Add (yyVals[0+yyTop]);
		yyVal = l;
	  }
  break;
case 782:
#line 4954 "cs-parser.jay"
  { yyVal = null; }
  break;
case 784:
#line 4960 "cs-parser.jay"
  {
		Expression type = null;
		
		if (yyVals[0+yyTop] != null) {
			DictionaryEntry cc = (DictionaryEntry) yyVals[0+yyTop];
			type = (Expression) cc.Key;
			LocatedToken lt = (LocatedToken) cc.Value;

			if (lt != null){
				ArrayList one = new ArrayList (4);

				one.Add (new VariableDeclaration (lt, null));

				start_block (lexer.Location);
				current_block = declare_local_variables (type, one, lt.Location);
			}
		}
	  }
  break;
case 785:
#line 4977 "cs-parser.jay"
  {
		Expression type = null;
		string id = null;
		Block var_block = null;

		if (yyVals[-2+yyTop] != null){
			DictionaryEntry cc = (DictionaryEntry) yyVals[-2+yyTop];
			type = (Expression) cc.Key;
			LocatedToken lt = (LocatedToken) cc.Value;

			if (lt != null){
				id = lt.Value;
				var_block = end_block (lexer.Location);
			}
		}

		yyVal = new Catch (type, id, (Block) yyVals[0+yyTop], var_block, ((Block) yyVals[0+yyTop]).loc);
	  }
  break;
case 786:
#line 4998 "cs-parser.jay"
  { yyVal = null; }
  break;
case 788:
#line 5004 "cs-parser.jay"
  {
		yyVal = new DictionaryEntry (yyVals[-2+yyTop], yyVals[-1+yyTop]);
	  }
  break;
case 789:
#line 5008 "cs-parser.jay"
  {
		Report.Error (1015, GetLocation (yyVals[-1+yyTop]), "A type that derives from `System.Exception', `object', or `string' expected");
	  }
  break;
case 790:
#line 5015 "cs-parser.jay"
  {
		yyVal = new Checked ((Block) yyVals[0+yyTop]);
	  }
  break;
case 791:
#line 5022 "cs-parser.jay"
  {
		yyVal = new Unchecked ((Block) yyVals[0+yyTop]);
	  }
  break;
case 792:
#line 5029 "cs-parser.jay"
  {
		RootContext.CheckUnsafeOption ((Location) yyVals[0+yyTop]);
	  }
  break;
case 793:
#line 5031 "cs-parser.jay"
  {
		yyVal = new Unsafe ((Block) yyVals[0+yyTop]);
	  }
  break;
case 794:
#line 5040 "cs-parser.jay"
  {
		ArrayList list = (ArrayList) yyVals[-1+yyTop];
		Expression type = (Expression) yyVals[-2+yyTop];
		Location l = (Location) yyVals[-4+yyTop];
		int top = list.Count;

		start_block (lexer.Location);

		for (int i = 0; i < top; i++){
			Pair p = (Pair) list [i];
			LocalInfo v;

			v = current_block.AddVariable (type, (string) p.First, l);
			if (v == null)
				continue;

			v.SetReadOnlyContext (LocalInfo.ReadOnlyContext.Fixed);
			v.Pinned = true;
			p.First = v;
			list [i] = p;
		}
	  }
  break;
case 795:
#line 5063 "cs-parser.jay"
  {
		Location l = (Location) yyVals[-6+yyTop];

		Fixed f = new Fixed ((Expression) yyVals[-4+yyTop], (ArrayList) yyVals[-3+yyTop], (Statement) yyVals[0+yyTop], l);

		current_block.AddStatement (f);

		yyVal = end_block (lexer.Location);
	  }
  break;
case 796:
#line 5075 "cs-parser.jay"
  { 
	   	ArrayList declarators = new ArrayList (4);
	   	if (yyVals[0+yyTop] != null)
			declarators.Add (yyVals[0+yyTop]);
		yyVal = declarators;
	  }
  break;
case 797:
#line 5082 "cs-parser.jay"
  {
		ArrayList declarators = (ArrayList) yyVals[-2+yyTop];
		if (yyVals[0+yyTop] != null)
			declarators.Add (yyVals[0+yyTop]);
		yyVal = declarators;
	  }
  break;
case 798:
#line 5092 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-2+yyTop];
		/* FIXME: keep location*/
		yyVal = new Pair (lt.Value, yyVals[0+yyTop]);
	  }
  break;
case 799:
#line 5098 "cs-parser.jay"
  {
		Report.Error (210, ((LocatedToken) yyVals[0+yyTop]).Location, "You must provide an initializer in a fixed or using statement declaration");
		yyVal = null;
	  }
  break;
case 800:
#line 5106 "cs-parser.jay"
  {
		/**/
 	  }
  break;
case 801:
#line 5110 "cs-parser.jay"
  {
		yyVal = new Lock ((Expression) yyVals[-3+yyTop], (Statement) yyVals[0+yyTop], (Location) yyVals[-5+yyTop]);
	  }
  break;
case 802:
#line 5117 "cs-parser.jay"
  {
		start_block (lexer.Location);
		Block assign_block = current_block;

		DictionaryEntry de = (DictionaryEntry) yyVals[-1+yyTop];
		Location l = (Location) yyVals[-3+yyTop];

		Expression type = (Expression) de.Key;
		ArrayList var_declarators = (ArrayList) de.Value;

		Stack vars = new Stack ();

		foreach (VariableDeclaration decl in var_declarators) {
			LocalInfo vi = current_block.AddVariable (type, decl.identifier, decl.Location);
			if (vi == null)
				continue;
			vi.SetReadOnlyContext (LocalInfo.ReadOnlyContext.Using);

			Expression expr = decl.expression_or_array_initializer;
			if (expr == null) {
				Report.Error (210, l, "You must provide an initializer in a fixed or using statement declaration");
				continue;
			}
			LocalVariableReference var;

			/* Get a writable reference to this read-only variable.*/
			var = new LocalVariableReference (assign_block, decl.identifier, l, vi, false);

			/* This is so that it is not a warning on using variables*/
			vi.Used = true;

			vars.Push (new DictionaryEntry (var, expr));

			/* Assign a = new SimpleAssign (var, expr, decl.Location);*/
			/* assign_block.AddStatement (new StatementExpression (a));*/
		}

		/* Note: the $$ here refers to the value of this code block and not of the LHS non-terminal.*/
		/* It can be referred to as $5 below.*/
		yyVal = vars;
	  }
  break;
case 803:
#line 5159 "cs-parser.jay"
  {
		Statement stmt = (Statement) yyVals[0+yyTop];
		Stack vars = (Stack) yyVals[-1+yyTop];
		Location l = (Location) yyVals[-5+yyTop];

		while (vars.Count > 0) {
			  DictionaryEntry de = (DictionaryEntry) vars.Pop ();
			  stmt = new Using ((Expression) de.Key, (Expression) de.Value, stmt, l);
		}
		current_block.AddStatement (stmt);
		yyVal = end_block (lexer.Location);
	  }
  break;
case 804:
#line 5172 "cs-parser.jay"
  {
		start_block (lexer.Location);
	  }
  break;
case 805:
#line 5176 "cs-parser.jay"
  {
		current_block.AddStatement (new UsingTemporary ((Expression) yyVals[-3+yyTop], (Statement) yyVals[0+yyTop], (Location) yyVals[-5+yyTop]));
		yyVal = end_block (lexer.Location);
	  }
  break;
case 806:
#line 5187 "cs-parser.jay"
  {
		++lexer.query_parsing;
	  }
  break;
case 807:
#line 5191 "cs-parser.jay"
  {
		if (--lexer.query_parsing == 1)
			lexer.query_parsing = 0;
			
		Linq.AQueryClause from = yyVals[-2+yyTop] as Linq.AQueryClause;
			
		from.Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop];
		yyVal = from;
		
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  }
  break;
case 808:
#line 5207 "cs-parser.jay"
  {
		yyVal = new Linq.QueryExpression (current_block, new Linq.QueryStartClause ((Expression)yyVals[0+yyTop]));
		current_block = new Linq.QueryBlock (current_block, (LocatedToken) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop]));
	  }
  break;
case 809:
#line 5212 "cs-parser.jay"
  {
		yyVal = new Linq.QueryExpression (current_block, new Linq.Cast ((FullNamedExpression)yyVals[-3+yyTop], (Expression)yyVals[0+yyTop]));
		current_block = new Linq.QueryBlock (current_block, (LocatedToken) yyVals[-2+yyTop], GetLocation (yyVals[-4+yyTop]));
	  }
  break;
case 810:
#line 5220 "cs-parser.jay"
  {
		current_block = new Linq.QueryBlock (current_block, GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 811:
#line 5224 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-3+yyTop];
		yyVal = new Linq.SelectMany (current_block.Toplevel, lt, (Expression)yyVals[0+yyTop]);
		
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
		
		((Linq.QueryBlock)current_block).AddTransparentParameter (lt);
	  }
  break;
case 812:
#line 5234 "cs-parser.jay"
  {
		current_block = new Linq.QueryBlock (current_block, GetLocation (yyVals[-3+yyTop]));
	  }
  break;
case 813:
#line 5238 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-3+yyTop];
		FullNamedExpression type = (FullNamedExpression)yyVals[-4+yyTop];
		
		yyVal = new Linq.SelectMany (current_block.Toplevel, lt, new Linq.Cast (type, (FullNamedExpression)yyVals[0+yyTop]));
		
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
		
		((Linq.QueryBlock)current_block).AddTransparentParameter (lt);
	  }
  break;
case 814:
#line 5253 "cs-parser.jay"
  {
	  	Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop];
		
		if (yyVals[0+yyTop] != null)
			head.Next = (Linq.AQueryClause)yyVals[0+yyTop];
				
		if (yyVals[-2+yyTop] != null) {
			Linq.AQueryClause clause = (Linq.AQueryClause)yyVals[-2+yyTop];
			clause.Tail.Next = head;
			head = clause;
		}
		
		yyVal = head;
	  }
  break;
case 815:
#line 5271 "cs-parser.jay"
  {
	  	current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 816:
#line 5275 "cs-parser.jay"
  {
		yyVal = new Linq.Select (current_block.Toplevel, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));

		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  }
  break;
case 817:
#line 5282 "cs-parser.jay"
  {
	  	if (linq_clause_blocks == null)
	  		linq_clause_blocks = new Stack ();
	  		
	  	current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  	linq_clause_blocks.Push (current_block);
	  }
  break;
case 818:
#line 5290 "cs-parser.jay"
  {
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 819:
#line 5297 "cs-parser.jay"
  {
		yyVal = new Linq.GroupBy (current_block.Toplevel, (Expression)yyVals[-3+yyTop], (ToplevelBlock) linq_clause_blocks.Pop (), (Expression)yyVals[0+yyTop], GetLocation (yyVals[-5+yyTop]));
		
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  }
  break;
case 823:
#line 5313 "cs-parser.jay"
  {
		((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop];
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 829:
#line 5329 "cs-parser.jay"
  {
	  	current_block = new Linq.QueryBlock (current_block, GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 830:
#line 5333 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-3+yyTop];
	  	yyVal = new Linq.Let (current_block.Toplevel, current_container, lt, (Expression)yyVals[0+yyTop]);
	  	
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
		
		((Linq.QueryBlock)current_block).AddTransparentParameter (lt);
	  }
  break;
case 831:
#line 5346 "cs-parser.jay"
  {
	  	current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 832:
#line 5350 "cs-parser.jay"
  {
		yyVal = new Linq.Where (current_block.Toplevel, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));

		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  }
  break;
case 833:
#line 5360 "cs-parser.jay"
  {
		if (linq_clause_blocks == null)
			linq_clause_blocks = new Stack ();
	  		
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
		linq_clause_blocks.Push (current_block);
	  }
  break;
case 834:
#line 5368 "cs-parser.jay"
  {
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;

		current_block = new Linq.QueryBlock (current_block, lexer.Location);
		linq_clause_blocks.Push (current_block);
	  }
  break;
case 835:
#line 5376 "cs-parser.jay"
  {
		current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop]));
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;

		current_block = new Linq.QueryBlock (current_block, (LocatedToken) yyVals[-7+yyTop], lexer.Location);
	  }
  break;
case 836:
#line 5384 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-10+yyTop];
		
		ToplevelBlock outer_selector = (ToplevelBlock) linq_clause_blocks.Pop ();
		ToplevelBlock block = (ToplevelBlock) linq_clause_blocks.Pop ();

		if (yyVals[0+yyTop] == null) {
	  		yyVal = new Linq.Join (block, lt, (Expression)yyVals[-7+yyTop], outer_selector, current_block.Toplevel, GetLocation (yyVals[-11+yyTop]));
		} else {
			yyVal = new Linq.GroupJoin (block, lt, (Expression)yyVals[-7+yyTop], outer_selector, current_block.Toplevel,
				(LocatedToken) yyVals[0+yyTop], GetLocation (yyVals[-11+yyTop]));
		}

		current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop]));
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
			
		if (yyVals[0+yyTop] == null)
			((Linq.QueryBlock)current_block).AddTransparentParameter (lt);
		else
			((Linq.QueryBlock)current_block).AddTransparentParameter ((LocatedToken) yyVals[0+yyTop]);
	  }
  break;
case 837:
#line 5407 "cs-parser.jay"
  {
		if (linq_clause_blocks == null)
			linq_clause_blocks = new Stack ();
	  		
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
		linq_clause_blocks.Push (current_block);
	  }
  break;
case 838:
#line 5415 "cs-parser.jay"
  {
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;

		current_block = new Linq.QueryBlock (current_block, lexer.Location);
		linq_clause_blocks.Push (current_block);
	  }
  break;
case 839:
#line 5423 "cs-parser.jay"
  {
		current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop]));
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;

		current_block = new Linq.QueryBlock (current_block, (LocatedToken) yyVals[-7+yyTop], lexer.Location);
	  }
  break;
case 840:
#line 5431 "cs-parser.jay"
  {
		LocatedToken lt = (LocatedToken) yyVals[-10+yyTop];
		ToplevelBlock outer_selector = (ToplevelBlock) linq_clause_blocks.Pop ();
		ToplevelBlock block = (ToplevelBlock) linq_clause_blocks.Pop ();
		
		Linq.Cast cast = new Linq.Cast ((FullNamedExpression)yyVals[-11+yyTop], (Expression)yyVals[-7+yyTop]);
		if (yyVals[0+yyTop] == null) {
	  		yyVal = new Linq.Join (block, lt, cast, outer_selector, current_block.Toplevel, GetLocation (yyVals[-12+yyTop]));
		} else {
			yyVal = new Linq.GroupJoin (block, lt, cast, outer_selector, current_block.Toplevel,
				(LocatedToken) yyVals[0+yyTop], GetLocation (yyVals[-12+yyTop]));
		}
		
		current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop]));
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
			
		if (yyVals[0+yyTop] == null)
			((Linq.QueryBlock)current_block).AddTransparentParameter (lt);
		else
			((Linq.QueryBlock)current_block).AddTransparentParameter ((LocatedToken) yyVals[0+yyTop]);
	  }
  break;
case 842:
#line 5458 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 843:
#line 5465 "cs-parser.jay"
  {
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 844:
#line 5469 "cs-parser.jay"
  {
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 846:
#line 5480 "cs-parser.jay"
  {
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 847:
#line 5487 "cs-parser.jay"
  {
		((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop];
		yyVal = yyVals[-3+yyTop];
	  }
  break;
case 849:
#line 5496 "cs-parser.jay"
  {
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  
		current_block = new Linq.QueryBlock (current_block, lexer.Location);	 
	 }
  break;
case 850:
#line 5503 "cs-parser.jay"
  {
		((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[-1+yyTop];
		yyVal = yyVals[-3+yyTop];
	 }
  break;
case 851:
#line 5511 "cs-parser.jay"
  {
		yyVal = new Linq.OrderByAscending (current_block.Toplevel, (Expression)yyVals[0+yyTop]);	
	  }
  break;
case 852:
#line 5515 "cs-parser.jay"
  {
		yyVal = new Linq.OrderByAscending (current_block.Toplevel, (Expression)yyVals[-1+yyTop]);	
	  }
  break;
case 853:
#line 5519 "cs-parser.jay"
  {
		yyVal = new Linq.OrderByDescending (current_block.Toplevel, (Expression)yyVals[-1+yyTop]);	
	  }
  break;
case 854:
#line 5526 "cs-parser.jay"
  {
		yyVal = new Linq.ThenByAscending (current_block.Toplevel, (Expression)yyVals[0+yyTop]);	
	  }
  break;
case 855:
#line 5530 "cs-parser.jay"
  {
		yyVal = new Linq.ThenByAscending (current_block.Toplevel, (Expression)yyVals[-1+yyTop]);	
	  }
  break;
case 856:
#line 5534 "cs-parser.jay"
  {
		yyVal = new Linq.ThenByDescending (current_block.Toplevel, (Expression)yyVals[-1+yyTop]);	
	  }
  break;
case 858:
#line 5543 "cs-parser.jay"
  {
		/* query continuation block is not linked with query block but with block*/
		/* before. This means each query can use same range variable names for*/
		/* different identifiers.*/

		current_block.SetEndLocation (GetLocation (yyVals[-1+yyTop]));
		current_block = current_block.Parent;
		
		current_block = new Linq.QueryBlock (current_block, (LocatedToken) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 859:
#line 5554 "cs-parser.jay"
  {
  		yyVal = new Linq.QueryExpression (current_block, (Linq.AQueryClause)yyVals[0+yyTop]);
	  }
  break;
case 862:
#line 5575 "cs-parser.jay"
  { 
	        Evaluator.LoadAliases (current_namespace);

		push_current_class (new Class (current_namespace, current_class, new MemberName ("Class" + class_count++),
			Modifiers.PUBLIC, null), null);

		ArrayList baseclass_list = new ArrayList ();
		baseclass_list.Add (new TypeExpression (Evaluator.InteractiveBaseClass, lexer.Location));
		current_container.AddBasesForPart (current_class, baseclass_list);

		/* (ref object retval)*/
		Parameter [] mpar = new Parameter [1];
		mpar [0] = new Parameter (TypeManager.system_object_expr, "$retval", Parameter.Modifier.REF, null, Location.Null);

		Parameters pars = new Parameters (mpar);
		current_local_parameters = pars;
		Method method = new Method (
			current_class,
			null, /* generic*/
			TypeManager.system_void_expr,
			Modifiers.PUBLIC | Modifiers.STATIC,
			new MemberName ("Host"),
			pars,
			null /* attributes */);

		oob_stack.Push (method);
	        ++lexer.parsing_block;
		start_block (lexer.Location);
	  }
  break;
case 863:
#line 5605 "cs-parser.jay"
  {
		--lexer.parsing_block;
		Method method = (Method) oob_stack.Pop ();

		method.Block = (ToplevelBlock) end_block(lexer.Location);
		current_container.AddMethod (method);

		--lexer.parsing_declaration;
		InteractiveResult = pop_current_class ();
		current_local_parameters = null;
	  }
  break;
case 864:
#line 5616 "cs-parser.jay"
  {
	        Evaluator.LoadAliases (current_namespace);
	  }
  break;
#line default
        }
        yyTop -= yyLen[yyN];
        yyState = yyStates[yyTop];
        int yyM = yyLhs[yyN];
        if (yyState == 0 && yyM == 0) {
//t          if (debug != null) debug.shift(0, yyFinal);
          yyState = yyFinal;
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
//t            if (debug != null)
//t               debug.lex(yyState, yyToken,yyname(yyToken), yyLex.value());
          }
          if (yyToken == 0) {
//t            if (debug != null) debug.accept(yyVal);
            return yyVal;
          }
          goto continue_yyLoop;
        }
        if (((yyN = yyGindex[yyM]) != 0) && ((yyN += yyState) >= 0)
            && (yyN < yyTable.Length) && (yyCheck[yyN] == yyState))
          yyState = yyTable[yyN];
        else
          yyState = yyDgoto[yyM];
//t        if (debug != null) debug.shift(yyStates[yyTop], yyState);
	 goto continue_yyLoop;
      continue_yyDiscarded: continue;	// implements the named-loop continue: 'continue yyDiscarded'
      }
    continue_yyLoop: continue;		// implements the named-loop continue: 'continue yyLoop'
    }
Esempio n. 8
0
  /** the generated parser.
      Maintains a state and a value stack, currently with fixed maximum size.
      @param yyLex scanner.
      @return result of the last reduction, if any.
      @throws yyException on irrecoverable parse error.
    */
  public Object yyparse (yyParser.yyInput yyLex)
				{
    if (yyMax <= 0) yyMax = 256;			// initial size
    int yyState = 0;                                   // state stack ptr
    int [] yyStates = new int[yyMax];	                // state stack 
    Object yyVal = null;                               // value stack ptr
    Object [] yyVals = new Object[yyMax];	        // value stack
    int yyToken = -1;					// current input
    int yyErrorFlag = 0;				// #tks to shift

    int yyTop = 0;
    goto skip;
    yyLoop:
    yyTop++;
    skip:
    for (;; ++ yyTop) {
      if (yyTop >= yyStates.Length) {			// dynamically increase
        int[] i = new int[yyStates.Length+yyMax];
        yyStates.CopyTo (i, 0);
        yyStates = i;
        Object[] o = new Object[yyVals.Length+yyMax];
        yyVals.CopyTo (o, 0);
        yyVals = o;
      }
      yyStates[yyTop] = yyState;
      yyVals[yyTop] = yyVal;
//t      if (debug != null) debug.push(yyState, yyVal);

      yyDiscarded: for (;;) {	// discarding a token does not change stack
        int yyN;
        if ((yyN = yyDefRed[yyState]) == 0) {	// else [default] reduce (yyN)
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
//t            if (debug != null)
//t              debug.lex(yyState, yyToken, yyname(yyToken), yyLex.value());
          }
          if ((yyN = yySindex[yyState]) != 0 && ((yyN += yyToken) >= 0)
              && (yyN < yyTable.Length) && (yyCheck[yyN] == yyToken)) {
//t            if (debug != null)
//t              debug.shift(yyState, yyTable[yyN], yyErrorFlag-1);
            yyState = yyTable[yyN];		// shift to yyN
            yyVal = yyLex.value();
            yyToken = -1;
            if (yyErrorFlag > 0) -- yyErrorFlag;
            goto yyLoop;
          }
          if ((yyN = yyRindex[yyState]) != 0 && (yyN += yyToken) >= 0
              && yyN < yyTable.Length && yyCheck[yyN] == yyToken)
            yyN = yyTable[yyN];			// reduce (yyN)
          else
            switch (yyErrorFlag) {
  
            case 0:
              yyerror("syntax error", yyExpecting(yyState));
//t              if (debug != null) debug.error("syntax error");
              goto case 1;
            case 1: case 2:
              yyErrorFlag = 3;
              do {
                if ((yyN = yySindex[yyStates[yyTop]]) != 0
                    && (yyN += Token.yyErrorCode) >= 0 && yyN < yyTable.Length
                    && yyCheck[yyN] == Token.yyErrorCode) {
//t                  if (debug != null)
//t                    debug.shift(yyStates[yyTop], yyTable[yyN], 3);
                  yyState = yyTable[yyN];
                  yyVal = yyLex.value();
                  goto yyLoop;
                }
//t                if (debug != null) debug.pop(yyStates[yyTop]);
              } while (-- yyTop >= 0);
//t              if (debug != null) debug.reject();
              throw new yyParser.yyException("irrecoverable syntax error");
  
            case 3:
              if (yyToken == 0) {
//t                if (debug != null) debug.reject();
                throw new yyParser.yyException("irrecoverable syntax error at end-of-file");
              }
//t              if (debug != null)
//t                debug.discard(yyState, yyToken, yyname(yyToken),
//t  							yyLex.value());
              yyToken = -1;
              goto yyDiscarded;		// leave stack alone
            }
        }
        int yyV = yyTop + 1-yyLen[yyN];
//t        if (debug != null)
//t          debug.reduce(yyState, yyStates[yyV-1], yyN, yyRule[yyN], yyLen[yyN]);
        yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
        switch (yyN) {
case 1:
#line 165 "DTD.y"
  {
      yyVal = Lisp.Cons(yyVals[0+yyTop]);
  }
  break;
case 2:
#line 169 "DTD.y"
  {
      yyVal = Lisp.Append(yyVals[-1+yyTop], Lisp.Cons(yyVals[0+yyTop]));
  }
  break;
case 3:
#line 173 "DTD.y"
  {
      yyVal = null;
  }
  break;
case 4:
#line 177 "DTD.y"
  {
      yyVal = yyVals[-3+yyTop];
  }
  break;
case 5:
#line 181 "DTD.y"
  {
      yyVal = yyVals[-1+yyTop];
  }
  break;
case 6:
#line 185 "DTD.y"
  {
      yyVal = Lisp.Append(yyVals[-5+yyTop], yyVals[-3+yyTop]);
  }
  break;
case 13:
#line 196 "DTD.y"
  {
      yyVal = Lisp.List(DTDID.ElementDecl, yyVals[-2+yyTop], yyVals[-1+yyTop]);
   }
  break;
case 14:
#line 203 "DTD.y"
  {
      yyVal = Lisp.List(DTDID.AttlistDecl, yyVals[-2+yyTop], yyVals[-1+yyTop]);
   }
  break;
case 17:
#line 215 "DTD.y"
  {
      yyVal = Lisp.List(DTDID.GEDecl, yyVals[-2+yyTop], yyVals[-1+yyTop]);
   }
  break;
case 18:
#line 222 "DTD.y"
  {
      yyVal = Lisp.List(DTDID.PEDecl, yyVals[-2+yyTop], yyVals[-1+yyTop]);
      if (Lisp.IsFunctor(yyVals[-1+yyTop], DTDID.PUBLIC))
        _tokenizer.AddPE((string)yyVals[-2+yyTop], Lisp.SArg1(yyVals[-1+yyTop]), Lisp.SArg2(yyVals[-1+yyTop]));
      else if (Lisp.IsFunctor(yyVals[-1+yyTop], DTDID.SYSTEM))
        _tokenizer.AddPE((string)yyVals[-2+yyTop], null, Lisp.SArg1(yyVals[-1+yyTop]));
      else
        _tokenizer.AddPE((string)yyVals[-2+yyTop], (string)yyVals[-1+yyTop]);       
   }
  break;
case 19:
#line 235 "DTD.y"
  {
      yyVal = Lisp.List(DTDID.NotationDecl, yyVals[-2+yyTop], yyVals[-1+yyTop]);
   }
  break;
case 20:
#line 239 "DTD.y"
  {
      yyVal = Lisp.List(DTDID.NotationDecl, yyVals[-2+yyTop], yyVals[-1+yyTop]);
   }
  break;
case 21:
#line 246 "DTD.y"
  {
      yyVal = DTDID.EMPTY;
   }
  break;
case 22:
#line 250 "DTD.y"
  {
      yyVal = DTDID.ANY;
   }
  break;
case 23:
#line 254 "DTD.y"
  {
      yyVal = Lisp.List(DTDID.MixedContent, yyVals[0+yyTop]);    
   }
  break;
case 25:
#line 262 "DTD.y"
  {
      yyVal = Lisp.Cons(DTDID.PCDATA);
   }
  break;
case 26:
#line 266 "DTD.y"
  {
      yyVal = Lisp.Append(Lisp.Cons(DTDID.PCDATA), yyVals[-2+yyTop]);
   }
  break;
case 28:
#line 274 "DTD.y"
  {
      yyVal = Lisp.List(yyVals[0+yyTop], yyVals[-1+yyTop]);
   }
  break;
case 30:
#line 279 "DTD.y"
  {
      yyVal = Lisp.List(yyVals[0+yyTop], yyVals[-1+yyTop]);
   }
  break;
case 37:
#line 295 "DTD.y"
  {
     yyVal = Lisp.List(DTDID.Choice, Lisp.Append(Lisp.Cons(yyVals[-3+yyTop]), yyVals[-1+yyTop]));  
  }
  break;
case 38:
#line 302 "DTD.y"
  {
     yyVal = Lisp.List(DTDID.Seq, Lisp.Cons(yyVals[-1+yyTop]));  
  }
  break;
case 39:
#line 306 "DTD.y"
  {
     yyVal = Lisp.List(DTDID.Seq, Lisp.Append(Lisp.Cons(yyVals[-3+yyTop]), yyVals[-1+yyTop]));  
  }
  break;
case 40:
#line 313 "DTD.y"
  {
      yyVal = Lisp.Cons(yyVals[0+yyTop]);
  }
  break;
case 41:
#line 317 "DTD.y"
  {
      yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
  }
  break;
case 42:
#line 324 "DTD.y"
  {
      yyVal = Lisp.Cons(yyVals[0+yyTop]);
  }
  break;
case 43:
#line 328 "DTD.y"
  {
      yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
  }
  break;
case 44:
#line 335 "DTD.y"
  {
      yyVal = Lisp.Cons(yyVals[0+yyTop]);
   }
  break;
case 45:
#line 339 "DTD.y"
  {
      yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
   }
  break;
case 46:
#line 346 "DTD.y"
  {
       yyVal = DTDID.ZeroOrOne;
   }
  break;
case 47:
#line 350 "DTD.y"
  {
       yyVal = DTDID.ZeroOrMore;
   }
  break;
case 48:
#line 354 "DTD.y"
  {
       yyVal = DTDID.OneOrMore;
   }
  break;
case 49:
#line 361 "DTD.y"
  {   
      yyVal = Lisp.Cons(yyVals[0+yyTop]);
   }
  break;
case 50:
#line 365 "DTD.y"
  {
      yyVal = Lisp.Append(yyVals[-1+yyTop], Lisp.Cons(yyVals[0+yyTop]));
   }
  break;
case 51:
#line 372 "DTD.y"
  {
       yyVal = Lisp.List(DTDID.AttDef, yyVals[-2+yyTop], yyVals[-1+yyTop], yyVals[0+yyTop]);
   }
  break;
case 55:
#line 383 "DTD.y"
  {
       yyVal = DTDID.CDATA;
   }
  break;
case 56:
#line 390 "DTD.y"
  {
        yyVal = DTDID.ID;
   }
  break;
case 57:
#line 394 "DTD.y"
  {
        yyVal = DTDID.IDREF;
   }
  break;
case 58:
#line 398 "DTD.y"
  {
        yyVal = DTDID.IDREFS;
   }
  break;
case 59:
#line 402 "DTD.y"
  {
        yyVal = DTDID.ENTITY;
   }
  break;
case 60:
#line 406 "DTD.y"
  {
        yyVal = DTDID.ENTITIES;
   }
  break;
case 61:
#line 410 "DTD.y"
  {
        yyVal = DTDID.NMTOKEN;
   }
  break;
case 62:
#line 414 "DTD.y"
  {
        yyVal = DTDID.NMTOKENS;
   }
  break;
case 65:
#line 426 "DTD.y"
  {
       yyVal = Lisp.List(DTDID.Notation, yyVals[-1+yyTop]);
   }
  break;
case 66:
#line 430 "DTD.y"
  {
       yyVal = Lisp.List(DTDID.Notation, Lisp.Append(Lisp.Cons(yyVals[-3+yyTop]), yyVals[-1+yyTop]));
   }
  break;
case 67:
#line 437 "DTD.y"
  {
      yyVal = Lisp.Cons(yyVals[-1+yyTop]);
   }
  break;
case 68:
#line 441 "DTD.y"
  {
      yyVal = Lisp.Append(Lisp.Cons(yyVals[-3+yyTop]), yyVals[-1+yyTop]);
   }
  break;
case 69:
#line 448 "DTD.y"
  {
      yyVal = DTDID.REQUIRED;
   }
  break;
case 70:
#line 452 "DTD.y"
  {
      yyVal = DTDID.IMPLIED;
   }
  break;
case 71:
#line 456 "DTD.y"
  {
      yyVal = Lisp.List(DTDID.FIXED, yyVals[0+yyTop]);
   }
  break;
case 75:
#line 466 "DTD.y"
  {
      yyVal = Lisp.List(DTDID.NData, yyVals[-1+yyTop], yyVals[0+yyTop]);
   }
  break;
case 78:
#line 478 "DTD.y"
  {
      yyVal = Lisp.List(DTDID.SYSTEM, yyVals[0+yyTop]);
   }
  break;
case 79:
#line 482 "DTD.y"
  {
      yyVal = Lisp.List(DTDID.PUBLIC, yyVals[-1+yyTop], yyVals[0+yyTop]);
   }
  break;
case 80:
#line 489 "DTD.y"
  {
      yyVal = Lisp.List(DTDID.PUBLIC, yyVals[0+yyTop]);
   }
  break;
case 81:
#line 496 "DTD.y"
  {
      yyVal = yyVals[0+yyTop];
   }
  break;
#line default
        }
        yyTop -= yyLen[yyN];
        yyState = yyStates[yyTop];
        int yyM = yyLhs[yyN];
        if (yyState == 0 && yyM == 0) {
//t          if (debug != null) debug.shift(0, yyFinal);
          yyState = yyFinal;
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
//t            if (debug != null)
//t               debug.lex(yyState, yyToken,yyname(yyToken), yyLex.value());
          }
          if (yyToken == 0) {
//t            if (debug != null) debug.accept(yyVal);
            return yyVal;
          }
          goto yyLoop;
        }
        if (((yyN = yyGindex[yyM]) != 0) && ((yyN += yyState) >= 0)
            && (yyN < yyTable.Length) && (yyCheck[yyN] == yyState))
          yyState = yyTable[yyN];
        else
          yyState = yyDgoto[yyM];
//t        if (debug != null) debug.shift(yyStates[yyTop], yyState);
	 goto yyLoop;
      }
    }
  }
Esempio n. 9
0
 public void SetMethodParameters(Object[] parameters)
 {
   m_MethodParameters = new Object[parameters.Length];
   parameters.CopyTo(m_MethodParameters, 0);
 }
Esempio n. 10
0
  /** the generated parser.
      Maintains a state and a value stack, currently with fixed maximum size.
      @param yyLex scanner.
      @return result of the last reduction, if any.
      @throws yyException on irrecoverable parse error.
    */
  public Object yyparse (yyParser.yyInput yyLex)
				{
    if (yyMax <= 0) yyMax = 256;			// initial size
    int yyState = 0;                                   // state stack ptr
    int [] yyStates = new int[yyMax];	                // state stack 
    Object yyVal = null;                               // value stack ptr
    Object [] yyVals = new Object[yyMax];	        // value stack
    int yyToken = -1;					// current input
    int yyErrorFlag = 0;				// #tks to shift

    int yyTop = 0;
    goto skip;
    yyLoop:
    yyTop++;
    skip:
    for (;; ++ yyTop) {
      if (yyTop >= yyStates.Length) {			// dynamically increase
        int[] i = new int[yyStates.Length+yyMax];
        yyStates.CopyTo (i, 0);
        yyStates = i;
        Object[] o = new Object[yyVals.Length+yyMax];
        yyVals.CopyTo (o, 0);
        yyVals = o;
      }
      yyStates[yyTop] = yyState;
      yyVals[yyTop] = yyVal;
//t      if (debug != null) debug.push(yyState, yyVal);

      yyDiscarded: for (;;) {	// discarding a token does not change stack
        int yyN;
        if ((yyN = yyDefRed[yyState]) == 0) {	// else [default] reduce (yyN)
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
//t            if (debug != null)
//t              debug.lex(yyState, yyToken, yyname(yyToken), yyLex.value());
          }
          if ((yyN = yySindex[yyState]) != 0 && ((yyN += yyToken) >= 0)
              && (yyN < yyTable.Length) && (yyCheck[yyN] == yyToken)) {
//t            if (debug != null)
//t              debug.shift(yyState, yyTable[yyN], yyErrorFlag-1);
            yyState = yyTable[yyN];		// shift to yyN
            yyVal = yyLex.value();
            yyToken = -1;
            if (yyErrorFlag > 0) -- yyErrorFlag;
            goto yyLoop;
          }
          if ((yyN = yyRindex[yyState]) != 0 && (yyN += yyToken) >= 0
              && yyN < yyTable.Length && yyCheck[yyN] == yyToken)
            yyN = yyTable[yyN];			// reduce (yyN)
          else
            switch (yyErrorFlag) {
  
            case 0:
              yyerror("syntax error", yyExpecting(yyState));
//t              if (debug != null) debug.error("syntax error");
              goto case 1;
            case 1: case 2:
              yyErrorFlag = 3;
              do {
                if ((yyN = yySindex[yyStates[yyTop]]) != 0
                    && (yyN += Token.yyErrorCode) >= 0 && yyN < yyTable.Length
                    && yyCheck[yyN] == Token.yyErrorCode) {
//t                  if (debug != null)
//t                    debug.shift(yyStates[yyTop], yyTable[yyN], 3);
                  yyState = yyTable[yyN];
                  yyVal = yyLex.value();
                  goto yyLoop;
                }
//t                if (debug != null) debug.pop(yyStates[yyTop]);
              } while (-- yyTop >= 0);
//t              if (debug != null) debug.reject();
              throw new yyParser.yyException("irrecoverable syntax error");
  
            case 3:
              if (yyToken == 0) {
//t                if (debug != null) debug.reject();
                throw new yyParser.yyException("irrecoverable syntax error at end-of-file");
              }
//t              if (debug != null)
//t                debug.discard(yyState, yyToken, yyname(yyToken),
//t  							yyLex.value());
              yyToken = -1;
              goto yyDiscarded;		// leave stack alone
            }
        }
        int yyV = yyTop + 1-yyLen[yyN];
//t        if (debug != null)
//t          debug.reduce(yyState, yyStates[yyV-1], yyN, yyRule[yyN], yyLen[yyN]);
        yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
        switch (yyN) {
case 1:
#line 345 "SQL92-min.y"
  {            
            notation.ConfirmTag(Tag.Stmt, Descriptor.Root, yyVals[0+yyTop]);
            yyVal = notation.ResolveTag(Tag.Stmt);
            if (yyVals[-1+yyTop] != null)
                notation.Confirm((Symbol)yyVal, Descriptor.OptimizerHint, yyVals[-1+yyTop]);
      }
  break;
case 2:
#line 352 "SQL92-min.y"
  {      
            notation.ConfirmTag(Tag.Stmt, Descriptor.Root, yyVals[-1+yyTop]);
			notation.ConfirmTag(Tag.Stmt, Descriptor.Order, yyVals[0+yyTop]);						
			yyVal = notation.ResolveTag(Tag.Stmt);
            if (yyVals[-2+yyTop] != null)
                notation.Confirm((Symbol)yyVal, Descriptor.OptimizerHint, yyVals[-2+yyTop]);			
      }
  break;
case 3:
#line 363 "SQL92-min.y"
  {
         yyVal = yyVals[0+yyTop];
      }
  break;
case 4:
#line 371 "SQL92-min.y"
  {
         Symbol sym = new Symbol(Tag.Predicate);
         yyVal = notation.Confirm(sym, Descriptor.Between, yyVals[-5+yyTop], yyVals[-2+yyTop], yyVals[0+yyTop]);
         if (yyVals[-4+yyTop] != null)
           notation.Confirm(sym, Descriptor.Inverse);
      }
  break;
case 5:
#line 381 "SQL92-min.y"
  {
        yyVal = null;
      }
  break;
case 10:
#line 398 "SQL92-min.y"
  {
          yyVal = notation.Confirm(new Symbol(Tag.Expr), 
            Descriptor.NullIf, yyVals[-3+yyTop], yyVals[-1+yyTop]);
      }
  break;
case 11:
#line 406 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.Expr),
            Descriptor.Coalesce, yyVals[-1+yyTop]);
      }
  break;
case 12:
#line 414 "SQL92-min.y"
  {
		yyVal = Lisp.Cons(yyVals[0+yyTop]);
      }
  break;
case 13:
#line 418 "SQL92-min.y"
  {
		yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
	  }
  break;
case 22:
#line 449 "SQL92-min.y"
  {
         Symbol sym = new Symbol(Tag.CExpr);
         if (yyVals[-1+yyTop] == null)
			yyVal = notation.Confirm(sym, Descriptor.Substring, yyVals[-4+yyTop], yyVals[-2+yyTop]);
		 else
			yyVal = notation.Confirm(sym, Descriptor.Substring, yyVals[-4+yyTop], yyVals[-2+yyTop], yyVals[-1+yyTop]);
      }
  break;
case 23:
#line 460 "SQL92-min.y"
  {
         yyVal = null;
      }
  break;
case 24:
#line 464 "SQL92-min.y"
  {
         yyVal = yyVals[0+yyTop];
      }
  break;
case 26:
#line 472 "SQL92-min.y"
  {
           yyVal = notation.Confirm(new Symbol(Tag.CExpr), Descriptor.Concat, yyVals[-2+yyTop], yyVals[0+yyTop]);
      }
  break;
case 31:
#line 486 "SQL92-min.y"
  {
		yyVal = Lisp.Cons(yyVals[0+yyTop]);
      }
  break;
case 32:
#line 490 "SQL92-min.y"
  {
		yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
	  }
  break;
case 39:
#line 507 "SQL92-min.y"
  {
          yyVal = notation.Confirm(new Symbol(Tag.Predicate), Descriptor.Pred, yyVals[-2+yyTop], yyVals[-1+yyTop], yyVals[0+yyTop]);
      }
  break;
case 44:
#line 527 "SQL92-min.y"
  {
		yyVal = yyVals[-1+yyTop];
    }
  break;
case 45:
#line 534 "SQL92-min.y"
  {
		yyVal = yyVals[0+yyTop];
	}
  break;
case 46:
#line 541 "SQL92-min.y"
  {
		yyVal = yyVals[0+yyTop];
	}
  break;
case 47:
#line 548 "SQL92-min.y"
  {
		yyVal = yyVals[0+yyTop];
		if (yyVals[-2+yyTop] != null)
			notation.ConfirmTag(Tag.Join, Descriptor.JoinType, new TokenWrapper(yyVals[-2+yyTop]));
    }
  break;
case 50:
#line 562 "SQL92-min.y"
  {
          yyVal = yyVals[-1+yyTop];          
          notation.Confirm((Symbol)yyVal, Descriptor.Alias, yyVals[0+yyTop]);          
      }
  break;
case 52:
#line 571 "SQL92-min.y"
  {
          yyVal = yyVals[0+yyTop];
          notation.Confirm((Symbol)yyVal,  Descriptor.Dynatable);
      }
  break;
case 57:
#line 592 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.CaseExpr), Descriptor.ElseBranch, yyVals[0+yyTop]);
      }
  break;
case 59:
#line 603 "SQL92-min.y"
  {
      yyVal = notation.Confirm(new Symbol(Tag.Predicate), Descriptor.Exists, yyVals[0+yyTop]);
    }
  break;
case 61:
#line 618 "SQL92-min.y"
  {
         if (yyVals[-1+yyTop].Equals("-"))
			yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.UnaryMinus, yyVals[0+yyTop]);
		 else
			yyVal = 2;
       }
  break;
case 62:
#line 629 "SQL92-min.y"
  {
         Symbol sym = new Symbol(Tag.CExpr);
         switch((int)yyVals[-3+yyTop])
         {
			case Token.UPPER:
				yyVal = notation.Confirm(sym, Descriptor.StringUpper, yyVals[-1+yyTop]);
				break;
			case Token.LOWER:
				yyVal = notation.Confirm(sym, Descriptor.StringLower, yyVals[-1+yyTop]);
				break;
         }
      }
  break;
case 65:
#line 651 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.CExpr), 
			Descriptor.StringConvert,  yyVals[-3+yyTop], yyVals[-1+yyTop]);
      }
  break;
case 67:
#line 663 "SQL92-min.y"
  {
		notation.ConfirmTag(Tag.SQuery, Descriptor.From, yyVals[0+yyTop]);
      }
  break;
case 68:
#line 670 "SQL92-min.y"
  {
        yyVal = Lisp.Cons(yyVals[0+yyTop]);
      }
  break;
case 69:
#line 674 "SQL92-min.y"
  {
		yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
	  }
  break;
case 70:
#line 682 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.AggExpr), Descriptor.Aggregate, new TokenWrapper(yyVals[-3+yyTop]), yyVals[-1+yyTop]);
      }
  break;
case 71:
#line 687 "SQL92-min.y"
  {
         Symbol sym = new Symbol(Tag.AggExpr);
         yyVal = notation.Confirm(sym, Descriptor.Aggregate, new TokenWrapper(yyVals[-4+yyTop]), yyVals[-1+yyTop]);
         if ((int)yyVals[-2+yyTop] == Token.DISTINCT)
            notation.Confirm(sym, Descriptor.Distinct);
      }
  break;
case 72:
#line 697 "SQL92-min.y"
  {
         yyVal = new Parameter(yyVals[0+yyTop].ToString()); 
      }
  break;
case 76:
#line 710 "SQL92-min.y"
  {
        yyVal = yyVals[0+yyTop];
		notation.ConfirmTag(Tag.SQuery, Descriptor.GroupingColumnRef, yyVals[0+yyTop]);
      }
  break;
case 77:
#line 718 "SQL92-min.y"
  {
		yyVal = Lisp.Cons(yyVals[0+yyTop]);
      }
  break;
case 78:
#line 722 "SQL92-min.y"
  {
		yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
      }
  break;
case 80:
#line 731 "SQL92-min.y"
  {
		notation.ConfirmTag(Tag.SQuery, Descriptor.GroupBy, yyVals[0+yyTop]);
      }
  break;
case 82:
#line 739 "SQL92-min.y"
  {
		notation.ConfirmTag(Tag.SQuery, Descriptor.Having, yyVals[0+yyTop]);
      }
  break;
case 86:
#line 756 "SQL92-min.y"
  {         
         Symbol sym = new Symbol(Tag.Predicate);
		 yyVal = notation.Confirm(sym, Descriptor.InSet, yyVals[-3+yyTop], yyVals[0+yyTop]);            
		 if (yyVals[-2+yyTop] != null)
		   notation.Confirm(sym, Descriptor.Inverse);
      }
  break;
case 88:
#line 767 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.ValueList), Descriptor.ValueList, yyVals[-1+yyTop]);
      }
  break;
case 89:
#line 774 "SQL92-min.y"
  {
         yyVal = Lisp.Cons(yyVals[0+yyTop]);
      }
  break;
case 90:
#line 778 "SQL92-min.y"
  {
         yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
      }
  break;
case 91:
#line 785 "SQL92-min.y"
  {
		notation.ConfirmTag(Tag.Join, Descriptor.CrossJoin, yyVals[-1+yyTop], yyVals[0+yyTop]);
		yyVal = notation.ResolveTag(Tag.Join);
      }
  break;
case 92:
#line 790 "SQL92-min.y"
  {
		notation.ConfirmTag(Tag.Join, Descriptor.UnionJoin, yyVals[-1+yyTop], yyVals[0+yyTop]);
		yyVal = notation.ResolveTag(Tag.Join);      
      }
  break;
case 93:
#line 795 "SQL92-min.y"
  {
		notation.ConfirmTag(Tag.Join, Descriptor.NaturalJoin, yyVals[-1+yyTop], yyVals[0+yyTop]);
		yyVal = notation.ResolveTag(Tag.Join);      
      }
  break;
case 94:
#line 800 "SQL92-min.y"
  {
		notation.ConfirmTag(Tag.Join, Descriptor.QualifiedJoin, yyVals[-1+yyTop], yyVals[0+yyTop]);
		yyVal = notation.ResolveTag(Tag.Join);      
      }
  break;
case 95:
#line 805 "SQL92-min.y"
  {
		yyVal = notation.Confirm(new Symbol(Tag.Join), Descriptor.Branch, yyVals[-1+yyTop]);
      }
  break;
case 97:
#line 816 "SQL92-min.y"
  {
		yyVal = yyVals[0+yyTop];
      }
  break;
case 104:
#line 835 "SQL92-min.y"
  {
		  notation.ConfirmTag(Tag.Join, Descriptor.Outer);
	  }
  break;
case 105:
#line 842 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.Predicate), 
			Descriptor.Like, yyVals[-2+yyTop], yyVals[0+yyTop]);           
      }
  break;
case 106:
#line 847 "SQL92-min.y"
  {               
         Symbol sym = new Symbol(Tag.Predicate);
         yyVal = notation.Confirm(sym, Descriptor.Like, yyVals[-2+yyTop], yyVals[0+yyTop]);           
		 notation.Confirm(sym, Descriptor.Inverse);
      }
  break;
case 107:
#line 853 "SQL92-min.y"
  {
         Symbol sym = new Symbol(Tag.Predicate);
         yyVal = notation.Confirm(sym, Descriptor.Like, yyVals[-4+yyTop], yyVals[-2+yyTop]);           
		 notation.Confirm(sym, Descriptor.Escape, yyVals[0+yyTop]);
      }
  break;
case 108:
#line 859 "SQL92-min.y"
  {
         Symbol sym = new Symbol(Tag.Predicate);
         yyVal = notation.Confirm(sym, Descriptor.Like, yyVals[-4+yyTop], yyVals[-2+yyTop]);           
         notation.Confirm(sym, Descriptor.Inverse);
		 notation.Confirm(sym, Descriptor.Escape, yyVals[0+yyTop]);
      }
  break;
case 109:
#line 871 "SQL92-min.y"
  {
          Symbol sym = new Symbol(Tag.Predicate);          
          yyVal = notation.Confirm(sym, Descriptor.Match, yyVals[-4+yyTop], yyVals[0+yyTop]);
		  if (yyVals[-2+yyTop] != null)
			notation.Confirm(sym, Descriptor.Unique);          
		  if (yyVals[-1+yyTop] != null)
			notation.Confirm(sym, Descriptor.MatchType, new TokenWrapper(yyVals[-1+yyTop]));
      }
  break;
case 110:
#line 883 "SQL92-min.y"
  {
        yyVal = null;
      }
  break;
case 112:
#line 891 "SQL92-min.y"
  {
        yyVal = null;
      }
  break;
case 116:
#line 904 "SQL92-min.y"
  {
		yyVal = notation.Confirm(new Symbol(Tag.Join), Descriptor.Using, yyVals[-1+yyTop]);
      }
  break;
case 117:
#line 911 "SQL92-min.y"
  {
		yyVal = notation.Confirm(new Symbol(Tag.Join), Descriptor.Constraint, new TokenWrapper(yyVals[-1+yyTop]));
      }
  break;
case 118:
#line 915 "SQL92-min.y"
  {
        yyVal = notation.Confirm(new Symbol(Tag.Join), Descriptor.Constraint, new TokenWrapper(yyVals[-1+yyTop]));
      }
  break;
case 119:
#line 919 "SQL92-min.y"
  {
        yyVal = notation.Confirm(new Symbol(Tag.Join), Descriptor.Constraint, yyVals[0+yyTop]);
      }
  break;
case 121:
#line 927 "SQL92-min.y"
  {         
         Symbol sym = new Symbol(Tag.QueryExp);     
         switch((int)yyVals[-3+yyTop])
         {
            case Token.UNION:
               notation.Confirm(sym, Descriptor.Union, yyVals[-4+yyTop], yyVals[0+yyTop]);
               break;
            case Token.EXCEPT:
               notation.Confirm(sym, Descriptor.Except, yyVals[-4+yyTop], yyVals[0+yyTop]);
               break;
         }
         if (yyVals[-2+yyTop] != null)
           notation.Confirm(sym, Descriptor.Distinct);
         yyVal = sym;
      }
  break;
case 124:
#line 951 "SQL92-min.y"
  {
        yyVal = null;
      }
  break;
case 126:
#line 959 "SQL92-min.y"
  {
		yyVal = null;
      }
  break;
case 129:
#line 968 "SQL92-min.y"
  {
         Symbol sym = new Symbol(Tag.QueryTerm);
         notation.Confirm(sym, Descriptor.Intersect, yyVals[-4+yyTop], yyVals[0+yyTop]); 
         if (yyVals[-2+yyTop] != null)
           notation.Confirm(sym, Descriptor.Distinct);
         yyVal = sym;
      }
  break;
case 130:
#line 980 "SQL92-min.y"
  {
        Symbol sym = new Symbol(Tag.Predicate);
        yyVal = notation.Confirm(sym, Descriptor.IsNull, yyVals[-3+yyTop]);
        if (yyVals[-1+yyTop] != null)
          notation.Confirm(sym, Descriptor.Inverse);
      }
  break;
case 136:
#line 1001 "SQL92-min.y"
  {
		  Symbol sym = new Symbol(Tag.Expr);
          if (yyVals[-1+yyTop].Equals("+"))
			yyVal = notation.Confirm(sym, Descriptor.Add, yyVals[-2+yyTop], yyVals[0+yyTop]);
		  else
		    yyVal = notation.Confirm(sym, Descriptor.Sub, yyVals[-2+yyTop], yyVals[0+yyTop]);
      }
  break;
case 141:
#line 1022 "SQL92-min.y"
  {
			yyVal  = yyVals[0+yyTop];
	  }
  break;
case 145:
#line 1036 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.Predicate), Descriptor.Overlaps, yyVals[-2+yyTop], yyVals[0+yyTop]);
      }
  break;
case 149:
#line 1053 "SQL92-min.y"
  {
           yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.PosString, yyVals[-1+yyTop], yyVals[-3+yyTop]);
       }
  break;
case 160:
#line 1073 "SQL92-min.y"
  {
		yyVal = yyVals[-1+yyTop];
		if (yyVals[-3+yyTop] != null)
			notation.ConfirmTag(Tag.Join, Descriptor.JoinType, new TokenWrapper(yyVals[-3+yyTop]));		
		notation.ConfirmTag(Tag.Join, Descriptor.JoinSpec, yyVals[0+yyTop]);		
	  }
  break;
case 161:
#line 1083 "SQL92-min.y"
  {
		yyVal = null;
	  }
  break;
case 163:
#line 1092 "SQL92-min.y"
  {
		  yyVal = notation.Confirm(new Symbol(Tag.Predicate), 
		    Descriptor.QuantifiedPred, yyVals[-3+yyTop], yyVals[-2+yyTop], new TokenWrapper(yyVals[-1+yyTop]), yyVals[0+yyTop]);	  
      }
  break;
case 167:
#line 1107 "SQL92-min.y"
  {
           if ((int)yyVals[-2+yyTop] == Token.DISTINCT)
              notation.ConfirmTag(Tag.SQuery, Descriptor.Distinct);      
           if (yyVals[-3+yyTop] != null)
              notation.ConfirmTag(Tag.SQuery, Descriptor.Top, yyVals[-3+yyTop]);      
           yyVal = notation.ResolveTag(Tag.SQuery);           
           notation.LeaveContext();
      }
  break;
case 168:
#line 1119 "SQL92-min.y"
  {
         yyVal = null;
      }
  break;
case 169:
#line 1123 "SQL92-min.y"
  {
         yyVal = yyVals[-1+yyTop]; 
      }
  break;
case 174:
#line 1141 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.RowValue), 
            Descriptor.RowValue, Lisp.Append(Lisp.Cons(yyVals[-3+yyTop]), yyVals[-1+yyTop]));
      }
  break;
case 176:
#line 1151 "SQL92-min.y"
  { 
		yyVal = new TokenWrapper(yyVals[0+yyTop]);
	  }
  break;
case 177:
#line 1155 "SQL92-min.y"
  {
        yyVal = new TokenWrapper(yyVals[0+yyTop]);
      }
  break;
case 178:
#line 1162 "SQL92-min.y"
  {
        yyVal = Lisp.Cons(yyVals[0+yyTop]);
      }
  break;
case 179:
#line 1166 "SQL92-min.y"
  {
        yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
      }
  break;
case 180:
#line 1175 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.CaseExpr), Descriptor.Case, yyVals[-1+yyTop]);         
      }
  break;
case 181:
#line 1182 "SQL92-min.y"
  {
         object clause_list = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[-1+yyTop]));
         yyVal = notation.Confirm(new Symbol(Tag.CaseExpr), Descriptor.Case, clause_list);         
      }
  break;
case 182:
#line 1190 "SQL92-min.y"
  {
         yyVal = Lisp.Cons(yyVals[0+yyTop]);
      }
  break;
case 183:
#line 1194 "SQL92-min.y"
  {
         yyVal = Lisp.Append(yyVals[-1+yyTop], Lisp.Cons(yyVals[0+yyTop]));
      }
  break;
case 184:
#line 1201 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.CaseExpr), Descriptor.CaseBranch, yyVals[-2+yyTop], yyVals[0+yyTop]);
      }
  break;
case 187:
#line 1213 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.BooleanExpr), Descriptor.LogicalOR, yyVals[-2+yyTop], yyVals[0+yyTop]);
      }
  break;
case 190:
#line 1225 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.BooleanExpr), Descriptor.LogicalAND, yyVals[-2+yyTop], yyVals[0+yyTop]);
      }
  break;
case 193:
#line 1237 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.BooleanExpr), Descriptor.Inverse, yyVals[0+yyTop]);
      }
  break;
case 195:
#line 1245 "SQL92-min.y"
  {
         Symbol sym = new Symbol(Tag.BooleanExpr);
         yyVal = notation.Confirm(sym, Descriptor.BooleanTest, new TokenWrapper(yyVals[0+yyTop]), yyVals[-3+yyTop]);
		 if (yyVals[-1+yyTop] != null)
		   notation.Confirm(sym, Descriptor.Inverse);                  
      }
  break;
case 197:
#line 1256 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.BooleanExpr),
           Descriptor.Branch, yyVals[-1+yyTop]);
      }
  break;
case 201:
#line 1270 "SQL92-min.y"
  {
          notation.ConfirmTag(Tag.SQuery, Descriptor.Select, null); 
      }
  break;
case 202:
#line 1274 "SQL92-min.y"
  {
          notation.ConfirmTag(Tag.SQuery, Descriptor.Select, yyVals[0+yyTop]); 
      }
  break;
case 203:
#line 1281 "SQL92-min.y"
  {
          yyVal = Lisp.Cons(yyVals[0+yyTop]);
      }
  break;
case 204:
#line 1285 "SQL92-min.y"
  {
         yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
      }
  break;
case 205:
#line 1292 "SQL92-min.y"
  {		
		 yyVal = notation.Confirm(new Symbol(Tag.TableFields), Descriptor.TableFields, yyVals[-1+yyTop]);   
      }
  break;
case 207:
#line 1300 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.AggExpr), Descriptor.AggCount);
      }
  break;
case 215:
#line 1317 "SQL92-min.y"
  {
           notation.EnterContext();
           yyVal = Token.ALL;
        }
  break;
case 216:
#line 1322 "SQL92-min.y"
  {
           notation.EnterContext();
           yyVal = yyVals[0+yyTop];
        }
  break;
case 221:
#line 1342 "SQL92-min.y"
  {
          yyVal = notation.Confirm(new Symbol(Tag.CaseExpr), Descriptor.Case, yyVals[-2+yyTop], yyVals[-1+yyTop]);              
      }
  break;
case 222:
#line 1349 "SQL92-min.y"
  {
         object clause_list = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[-1+yyTop]));
         yyVal = notation.Confirm(new Symbol(Tag.CaseExpr), Descriptor.Case, yyVals[-3+yyTop], clause_list);
      }
  break;
case 223:
#line 1357 "SQL92-min.y"
  {
         yyVal = Lisp.Cons(yyVals[0+yyTop]);
      }
  break;
case 224:
#line 1361 "SQL92-min.y"
  {
         yyVal = Lisp.Append(yyVals[-1+yyTop], Lisp.Cons(yyVals[0+yyTop]));
      }
  break;
case 227:
#line 1374 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.CaseExpr), Descriptor.CaseBranch, yyVals[-2+yyTop], yyVals[0+yyTop]);
      }
  break;
case 229:
#line 1382 "SQL92-min.y"
  {
			yyVal = new IntegerValue(yyVals[0+yyTop]);
      }
  break;
case 230:
#line 1390 "SQL92-min.y"
  {
        yyVal = yyVals[-1+yyTop]; 
        if ((int)yyVals[0+yyTop] == Token.DESC) 
			notation.Confirm((Symbol)yyVals[-1+yyTop], Descriptor.Desc);
      }
  break;
case 231:
#line 1399 "SQL92-min.y"
  {
        yyVal = Token.ASC;
      }
  break;
case 233:
#line 1407 "SQL92-min.y"
  {
			yyVal = Lisp.Cons(yyVals[0+yyTop]);
      }
  break;
case 234:
#line 1411 "SQL92-min.y"
  {
            yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
      }
  break;
case 238:
#line 1430 "SQL92-min.y"
  {
         yyVal = yyVals[-1+yyTop];
         if (yyVals[-2+yyTop] != null)
           notation.Confirm((Symbol)yyVals[-1+yyTop], Descriptor.OptimizerHint, yyVals[-2+yyTop]);
      }
  break;
case 239:
#line 1436 "SQL92-min.y"
  {
         yyVal = yyVals[-2+yyTop];
         notation.Confirm((Symbol)yyVals[-2+yyTop], Descriptor.Order, yyVals[-1+yyTop]);  
         if (yyVals[-3+yyTop] != null)
           notation.Confirm((Symbol)yyVals[-2+yyTop], Descriptor.OptimizerHint, yyVals[-3+yyTop]);         
      }
  break;
case 245:
#line 1460 "SQL92-min.y"
  {
		yyVal = yyVals[-1+yyTop];
		notation.Confirm((Symbol)yyVal, Descriptor.Alias, yyVals[0+yyTop]);
    }
  break;
case 249:
#line 1474 "SQL92-min.y"
  {
        yyVal = notation.Confirm(new Symbol(Tag.Dynatable), Descriptor.Dynatable, yyVals[0+yyTop]);
    }
  break;
case 250:
#line 1478 "SQL92-min.y"
  {
        yyVal = notation.Confirm(new Symbol(Tag.Dynatable), Descriptor.Dynatable, yyVals[0+yyTop]);
    }
  break;
case 251:
#line 1482 "SQL92-min.y"
  {
        yyVal = notation.Confirm(new Symbol(Tag.Dynatable), Descriptor.Dynatable, yyVals[-2+yyTop]);
    }
  break;
case 252:
#line 1486 "SQL92-min.y"
  {
		yyVal = notation.Confirm(new Symbol(Tag.Dynatable), Descriptor.Dynatable, yyVals[0+yyTop]);
    }
  break;
case 253:
#line 1493 "SQL92-min.y"
  {
		yyVal = new Qname(yyVals[0+yyTop]);
    }
  break;
case 254:
#line 1498 "SQL92-min.y"
  {
		yyVal = new Qname(yyVals[-3+yyTop]);
		notation.Confirm((Symbol)yyVal, Descriptor.DerivedColumns, yyVals[-1+yyTop]);
    }
  break;
case 255:
#line 1506 "SQL92-min.y"
  {
       yyVal = notation.Confirm(new Symbol(Tag.TableConstructor), 
          Descriptor.TableValue, yyVals[0+yyTop]);
    }
  break;
case 256:
#line 1514 "SQL92-min.y"
  {
      yyVal = Lisp.Cons(yyVals[0+yyTop]);
    }
  break;
case 257:
#line 1518 "SQL92-min.y"
  {
      yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
    }
  break;
case 259:
#line 1526 "SQL92-min.y"
  {
        yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Mul, yyVals[-2+yyTop], yyVals[0+yyTop]);
    }
  break;
case 260:
#line 1530 "SQL92-min.y"
  {
        yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Div, yyVals[-2+yyTop], yyVals[0+yyTop]);
    }
  break;
case 261:
#line 1537 "SQL92-min.y"
  { 
        yyVal = yyVals[-1+yyTop];
      }
  break;
case 262:
#line 1544 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.CExpr), Descriptor.StringTrim, 
			new TokenWrapper(Token.BOTH), new Literal(" "), yyVals[0+yyTop]);
      }
  break;
case 263:
#line 1549 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.CExpr), Descriptor.StringTrim, 
            new TokenWrapper(Token.BOTH), new Literal(" "), yyVals[0+yyTop]);
      }
  break;
case 264:
#line 1554 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.CExpr), Descriptor.StringTrim, 
            new TokenWrapper(Token.BOTH), yyVals[-2+yyTop], yyVals[0+yyTop]);
      }
  break;
case 265:
#line 1559 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.CExpr), Descriptor.StringTrim, 
			new TokenWrapper(yyVals[-2+yyTop]), new Literal(" "), yyVals[0+yyTop]);
      }
  break;
case 266:
#line 1564 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.CExpr), Descriptor.StringTrim, 
			new TokenWrapper(yyVals[-3+yyTop]), yyVals[-2+yyTop], yyVals[0+yyTop]);
      }
  break;
case 272:
#line 1586 "SQL92-min.y"
  {
        yyVal = notation.Confirm(new Symbol(Tag.Predicate), Descriptor.Unique, yyVals[0+yyTop]);
      }
  break;
case 284:
#line 1610 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.Expr), Descriptor.Branch, yyVals[-1+yyTop]);
      }
  break;
case 285:
#line 1617 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.Funcall), Descriptor.Funcall, new Qname(yyVals[-2+yyTop]), null);
      }
  break;
case 286:
#line 1621 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.Funcall), Descriptor.Funcall, new Qname(yyVals[-3+yyTop]), yyVals[-1+yyTop]);
      }
  break;
case 289:
#line 1633 "SQL92-min.y"
  {
        notation.ConfirmTag(Tag.SQuery, Descriptor.Where, yyVals[0+yyTop]);
    }
  break;
case 290:
#line 1640 "SQL92-min.y"
  {
       yyVal = null;
    }
  break;
case 292:
#line 1648 "SQL92-min.y"
  {
       yyVal = Lisp.Cons(yyVals[0+yyTop]);
    }
  break;
case 293:
#line 1652 "SQL92-min.y"
  {
       yyVal = Lisp.Append(yyVals[-1+yyTop], Lisp.Cons(yyVals[0+yyTop])); 
    }
  break;
case 294:
#line 1659 "SQL92-min.y"
  {
	   yyVal = new Qname(yyVals[0+yyTop]);
    }
  break;
case 295:
#line 1666 "SQL92-min.y"
  {
       yyVal = yyVals[0+yyTop];
       notation.ConfirmTag(Tag.SQuery, Descriptor.TableName, yyVals[0+yyTop]);
    }
  break;
case 296:
#line 1671 "SQL92-min.y"
  {      
       notation.ConfirmTag(Tag.SQuery, Descriptor.TableName, yyVals[0+yyTop]);
    }
  break;
case 297:
#line 1678 "SQL92-min.y"
  {
       yyVal = yyVals[0+yyTop];
       notation.Confirm((Symbol)yyVal, Descriptor.Prefix, new Literal(yyVals[-2+yyTop]));       
    }
  break;
case 299:
#line 1687 "SQL92-min.y"
  {
       yyVal = yyVals[-2+yyTop];
       ((Qname)yyVals[-2+yyTop]).Append((String)yyVals[0+yyTop]);
    }
  break;
case 300:
#line 1695 "SQL92-min.y"
  {
       yyVal = yyVals[0+yyTop];
       notation.Confirm((Symbol)yyVals[0+yyTop], Descriptor.ColumnRef);
    }
  break;
case 302:
#line 1704 "SQL92-min.y"
  {
       yyVal = notation.Confirm(new Symbol(Tag.Dref), Descriptor.Dref, yyVals[-2+yyTop], new Literal((String)yyVals[0+yyTop]));
    }
  break;
case 303:
#line 1708 "SQL92-min.y"
  {       
       Notation.Record[] recs = notation.Select((Symbol)yyVals[0+yyTop], Descriptor.Funcall, 2);       
       if (recs.Length > 0)
       {
          yyVal = notation.Confirm(new Symbol(Tag.Funcall), Descriptor.Funcall, 
             recs[0].Arg0, Lisp.Append(Lisp.Cons(yyVals[-2+yyTop]), recs[0].args[1]));
          notation.Remove(recs);
       }
       else
          throw new InvalidOperationException();
    }
  break;
case 304:
#line 1720 "SQL92-min.y"
  {
       yyVal = notation.Confirm(new Symbol(Tag.Dref), Descriptor.At, yyVals[-3+yyTop], yyVals[-1+yyTop]);
    }
  break;
case 305:
#line 1724 "SQL92-min.y"
  {
       yyVal = notation.Confirm(new Symbol(Tag.Dref), Descriptor.Wref, yyVals[-2+yyTop], new Literal((String)yyVals[0+yyTop]));    
    }
  break;
case 306:
#line 1731 "SQL92-min.y"
  {
      yyVal = new Qname(yyVals[0+yyTop]);
    }
  break;
case 307:
#line 1738 "SQL92-min.y"
  {
      yyVal = new IntegerValue(yyVals[0+yyTop]);
    }
  break;
case 308:
#line 1742 "SQL92-min.y"
  {
      yyVal = new DecimalValue(yyVals[0+yyTop]);
    }
  break;
case 309:
#line 1746 "SQL92-min.y"
  {
      yyVal = new DoubleValue(yyVals[0+yyTop]);
    }
  break;
case 310:
#line 1750 "SQL92-min.y"
  {
      yyVal = new Literal(yyVals[0+yyTop]);
    }
  break;
case 320:
#line 1770 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLQuery, yyVals[-2+yyTop], null, yyVals[-1+yyTop]);     
      }
  break;
case 321:
#line 1774 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLQuery, yyVals[-4+yyTop], yyVals[-2+yyTop], yyVals[-1+yyTop]);     
      }
  break;
case 322:
#line 1778 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLQuery, yyVals[-6+yyTop], yyVals[-2+yyTop], yyVals[-1+yyTop]);     
      }
  break;
case 323:
#line 1785 "SQL92-min.y"
  {
         yyVal = null;
      }
  break;
case 324:
#line 1789 "SQL92-min.y"
  {
         yyVal = new TokenWrapper(Token.RETURNING_CONTENT);
      }
  break;
case 325:
#line 1793 "SQL92-min.y"
  {
         yyVal = new TokenWrapper(Token.RETURNING_SEQUENCE);
      }
  break;
case 326:
#line 1800 "SQL92-min.y"
  {
         yyVal = Lisp.Cons(yyVals[0+yyTop]);
      }
  break;
case 327:
#line 1804 "SQL92-min.y"
  {
         yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
      }
  break;
case 328:
#line 1811 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.AggExpr), Descriptor.Aggregate, 
            new TokenWrapper(Token.XMLAGG), yyVals[-1+yyTop]);
      }
  break;
case 329:
#line 1816 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.AggExpr), Descriptor.Aggregate, 
            new TokenWrapper(Token.XMLAGG), yyVals[-2+yyTop]);
         notation.Confirm((Symbol)yyVal, Descriptor.Order, yyVals[-1+yyTop]);
      }
  break;
case 330:
#line 1825 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), 
            Descriptor.XMLConcat, yyVals[-1+yyTop]); 
      }
  break;
case 331:
#line 1833 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLForestAll);               
      }
  break;
case 332:
#line 1837 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), 
            Descriptor.XMLForest, yyVals[-1+yyTop]);         
      }
  break;
case 333:
#line 1842 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), 
            Descriptor.XMLForest, yyVals[-1+yyTop]);  
         notation.Confirm((Symbol)yyVal, Descriptor.XMLNamespaces, yyVals[-3+yyTop]);
      }
  break;
case 334:
#line 1851 "SQL92-min.y"
  {
          String spec = yyVals[-3+yyTop].ToString().ToUpperInvariant();
          if (spec.Equals("DOCUMENT") || spec.Equals("CONTENT"))        
			 yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLParse, new Literal(spec), yyVals[-2+yyTop], yyVals[-1+yyTop]);
	      else
	      {
	         yyerror(String.Format(Properties.Resources.SyntaxError, 
	            String.Format("XMLPARSE({0}...", spec)));
	         throw new yyParser.yyException("Syntax error");
	      }      
      }
  break;
case 335:
#line 1866 "SQL92-min.y"
  {
          String spec = (String)yyVals[-2+yyTop];  
          if (! spec.Equals("NAME", StringComparison.InvariantCultureIgnoreCase))
          {
	         yyerror(String.Format(Properties.Resources.SyntaxError, 
	            String.Format("XMLPI({0}...", spec)));          
             throw new yyParser.yyException("Syntax error");	      
          }
          yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLPI, yyVals[-1+yyTop], null);
      }
  break;
case 336:
#line 1877 "SQL92-min.y"
  {
          String spec = (String)yyVals[-4+yyTop];  
          if (! spec.Equals("NAME", StringComparison.InvariantCultureIgnoreCase))
          {
	         yyerror(String.Format(Properties.Resources.SyntaxError, 
	            String.Format("XMLPI({0}...", spec)));                    
             throw new yyParser.yyException("Syntax error");	            
          }
          yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLPI, yyVals[-3+yyTop], yyVals[-1+yyTop]);      
      }
  break;
case 337:
#line 1891 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLComment, yyVals[-1+yyTop]);
      }
  break;
case 338:
#line 1898 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLCDATA, yyVals[-1+yyTop]);
      }
  break;
case 339:
#line 1905 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLRoot, yyVals[-1+yyTop], null, null);
      }
  break;
case 340:
#line 1909 "SQL92-min.y"
  {
         String tok = (String)yyVals[-2+yyTop];
         if (! tok.Equals("VERSION", StringComparison.InvariantCultureIgnoreCase))
         {
	         yyerror(String.Format(Properties.Resources.SyntaxError, 
	            String.Format("XMLRoot(... {0} ...", tok)));                             
              throw new yyParser.yyException("Syntax error");	                     
         }
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLRoot, yyVals[-4+yyTop], new Literal(yyVals[-1+yyTop]), null);
      }
  break;
case 341:
#line 1920 "SQL92-min.y"
  {
         String tok = (String)yyVals[-5+yyTop];
         if (! tok.Equals("VERSION", StringComparison.InvariantCultureIgnoreCase))
         {
	         yyerror(String.Format(Properties.Resources.SyntaxError, 
	            String.Format("XMLRoot(... {0} ...", tok)));                             
              throw new yyParser.yyException("Syntax error");	                     
         }
         tok = (String)yyVals[-2+yyTop];
         if (! tok.Equals("STANDALONE", StringComparison.InvariantCultureIgnoreCase))
         {
	         yyerror(String.Format(Properties.Resources.SyntaxError, 
	            String.Format("XMLRoot(... {0} ...", tok)));                             
              throw new yyParser.yyException("Syntax error");	                     
         }
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLRoot, yyVals[-7+yyTop], new Literal(yyVals[-4+yyTop]), yyVals[-1+yyTop]);
      }
  break;
case 343:
#line 1942 "SQL92-min.y"
  {
         yyVal = null;
      }
  break;
case 344:
#line 1949 "SQL92-min.y"
  {
         String tok = (String)yyVals[0+yyTop];
         if (tok.Equals("NO", StringComparison.InvariantCultureIgnoreCase) ||
             tok.Equals("YES", StringComparison.InvariantCultureIgnoreCase)) 
			yyVal = new Qname(tok.ToUpperInvariant());
         else
            throw new yyParser.yyException(String.Format(Properties.Resources.SyntaxError, 
               "STANDALONE value must be YES|NO|NO VALUE"));			
      }
  break;
case 345:
#line 1959 "SQL92-min.y"
  {
         yyVal = null;
      }
  break;
case 346:
#line 1966 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLElement, yyVals[-1+yyTop], null);
      }
  break;
case 347:
#line 1970 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLElement, yyVals[-3+yyTop], null);
         notation.Confirm((Symbol)yyVal, Descriptor.XMLNamespaces, yyVals[-1+yyTop]);
      }
  break;
case 348:
#line 1975 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLElement, yyVals[-3+yyTop], null);
         notation.Confirm((Symbol)yyVal, Descriptor.XMLAttributes, yyVals[-1+yyTop]);
      }
  break;
case 349:
#line 1981 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLElement, yyVals[-5+yyTop], null);
         notation.Confirm((Symbol)yyVal, Descriptor.XMLNamespaces, yyVals[-3+yyTop]);
         notation.Confirm((Symbol)yyVal, Descriptor.XMLAttributes, yyVals[-1+yyTop]);
      }
  break;
case 350:
#line 1987 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLElement, yyVals[-3+yyTop], yyVals[-1+yyTop]);         
      }
  break;
case 351:
#line 1991 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLElement, yyVals[-5+yyTop], yyVals[-1+yyTop]);
         notation.Confirm((Symbol)yyVal, Descriptor.XMLNamespaces, yyVals[-3+yyTop]);
      }
  break;
case 352:
#line 1996 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLElement, yyVals[-5+yyTop], yyVals[-1+yyTop]);
         notation.Confirm((Symbol)yyVal, Descriptor.XMLAttributes, yyVals[-3+yyTop]);
      }
  break;
case 353:
#line 2002 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), Descriptor.XMLElement, yyVals[-7+yyTop], yyVals[-1+yyTop]);
         notation.Confirm((Symbol)yyVal, Descriptor.XMLNamespaces, yyVals[-5+yyTop]);
         notation.Confirm((Symbol)yyVal, Descriptor.XMLAttributes, yyVals[-3+yyTop]);      
      }
  break;
case 354:
#line 2011 "SQL92-min.y"
  {
         yyVal = yyVals[-1+yyTop];
      }
  break;
case 355:
#line 2018 "SQL92-min.y"
  {
         yyVal = Lisp.Cons(yyVals[0+yyTop]);
      }
  break;
case 356:
#line 2022 "SQL92-min.y"
  {
         yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
      }
  break;
case 359:
#line 2034 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), 
            Descriptor.DeclNamespace, new Literal(yyVals[-2+yyTop]), yyVals[0+yyTop]);  
      }
  break;
case 360:
#line 2042 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.SQLX), 
            Descriptor.DeclNamespace, new Literal(yyVals[0+yyTop]), null);        
      }
  break;
case 361:
#line 2047 "SQL92-min.y"
  {
         yyVal = null;
      }
  break;
case 362:
#line 2054 "SQL92-min.y"
  {
         yyVal = null;
      }
  break;
case 363:
#line 2058 "SQL92-min.y"
  {
         yyVal = yyVals[-1+yyTop];
      }
  break;
case 364:
#line 2065 "SQL92-min.y"
  {
          yyVal = Lisp.Cons(yyVals[0+yyTop]);
      }
  break;
case 365:
#line 2069 "SQL92-min.y"
  {
          yyVal = Lisp.Append(yyVals[-2+yyTop], Lisp.Cons(yyVals[0+yyTop]));
      }
  break;
case 367:
#line 2077 "SQL92-min.y"
  {
         yyVal = yyVals[-1+yyTop];
         notation.Confirm((Symbol)yyVal, Descriptor.ContentOption, yyVals[0+yyTop]);
      }
  break;
case 368:
#line 2082 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.TableFields), Descriptor.TableFields, yyVals[-1+yyTop]);   
      }
  break;
case 369:
#line 2086 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.TableFields), Descriptor.TableFields, yyVals[-2+yyTop]);   
         notation.Confirm((Symbol)yyVal, Descriptor.ContentOption, yyVals[0+yyTop]);
      }
  break;
case 371:
#line 2095 "SQL92-min.y"
  {
         yyVal = yyVals[-1+yyTop];
         notation.Confirm((Symbol)yyVal, Descriptor.Alias, yyVals[0+yyTop]);
      }
  break;
case 372:
#line 2103 "SQL92-min.y"
  { 
         yyVal = null;
      }
  break;
case 374:
#line 2111 "SQL92-min.y"
  {
          yyVal = new TokenWrapper(Token.PRESERVE_WHITESPACE);
      }
  break;
case 375:
#line 2115 "SQL92-min.y"
  {
          yyVal = new TokenWrapper(Token.STRIP_WHITESPACE);
      }
  break;
case 376:
#line 2122 "SQL92-min.y"
  {
         yyVal = new TokenWrapper(Token.OPTION_NULL);
      }
  break;
case 377:
#line 2126 "SQL92-min.y"
  {
         yyVal = new TokenWrapper(Token.OPTION_EMPTY);
      }
  break;
case 378:
#line 2130 "SQL92-min.y"
  {
         yyVal = new TokenWrapper(Token.OPTION_ABSENT);
      }
  break;
case 379:
#line 2134 "SQL92-min.y"
  {
         yyVal = new TokenWrapper(Token.OPTION_NIL);
      }
  break;
case 380:
#line 2138 "SQL92-min.y"
  {
         yyVal = new TokenWrapper(Token.NO_CONTENT);
      }
  break;
case 383:
#line 2150 "SQL92-min.y"
  {
         yyVal = notation.Confirm(new Symbol(Tag.Expr), 
            Descriptor.Cast, yyVals[-3+yyTop], yyVals[-1+yyTop]);                 
      }
  break;
case 384:
#line 2158 "SQL92-min.y"
  {
         yyVal = null;
      }
  break;
case 388:
#line 2168 "SQL92-min.y"
  {
         yyVal = new TokenWrapper(yyVals[0+yyTop]);
      }
  break;
case 390:
#line 2176 "SQL92-min.y"
  {
         yyVal = new TokenWrapper(yyVals[0+yyTop]);
      }
  break;
case 391:
#line 2180 "SQL92-min.y"
  {
         yyVal = new TokenWrapper(yyVals[-3+yyTop]);
         notation.Confirm((Symbol)yyVal, Descriptor.Typelen, yyVals[-1+yyTop]);
      }
  break;
case 399:
#line 2198 "SQL92-min.y"
  {
         yyVal = new TokenWrapper(yyVals[0+yyTop]);
      }
  break;
case 405:
#line 2213 "SQL92-min.y"
  {
         yyVal = new TokenWrapper(yyVals[0+yyTop]);
      }
  break;
case 406:
#line 2217 "SQL92-min.y"
  {
         yyVal = new TokenWrapper(yyVals[-3+yyTop]);
         notation.Confirm((Symbol)yyVal, Descriptor.Typeprec, yyVals[-1+yyTop]);         
      }
  break;
case 407:
#line 2222 "SQL92-min.y"
  {
         yyVal = new TokenWrapper(yyVals[-5+yyTop]);
         notation.Confirm((Symbol)yyVal, Descriptor.Typeprec, yyVals[-3+yyTop]);
         notation.Confirm((Symbol)yyVal, Descriptor.Typescale, yyVals[-1+yyTop]);         
      }
  break;
case 411:
#line 2237 "SQL92-min.y"
  {
         yyVal = new TokenWrapper(Token.FLOAT);
      }
  break;
case 412:
#line 2241 "SQL92-min.y"
  {
         yyVal = new TokenWrapper(Token.FLOAT);
         notation.Confirm((Symbol)yyVal, Descriptor.Typeprec, yyVals[-1+yyTop]);         
      }
  break;
case 413:
#line 2249 "SQL92-min.y"
  {
         yyVal = new Qname(yyVals[0+yyTop]);
      }
  break;
#line default
        }
        yyTop -= yyLen[yyN];
        yyState = yyStates[yyTop];
        int yyM = yyLhs[yyN];
        if (yyState == 0 && yyM == 0) {
//t          if (debug != null) debug.shift(0, yyFinal);
          yyState = yyFinal;
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
//t            if (debug != null)
//t               debug.lex(yyState, yyToken,yyname(yyToken), yyLex.value());
          }
          if (yyToken == 0) {
//t            if (debug != null) debug.accept(yyVal);
            return yyVal;
          }
          goto yyLoop;
        }
        if (((yyN = yyGindex[yyM]) != 0) && ((yyN += yyState) >= 0)
            && (yyN < yyTable.Length) && (yyCheck[yyN] == yyState))
          yyState = yyTable[yyN];
        else
          yyState = yyDgoto[yyM];
//t        if (debug != null) debug.shift(yyStates[yyTop], yyState);
	 goto yyLoop;
      }
    }
  }
Esempio n. 11
0
  /** the generated parser.
      Maintains a state and a value stack, currently with fixed maximum size.
      @param yyLex scanner.
      @return result of the last reduction, if any.
      @throws yyException on irrecoverable parse error.
    */
  public Object yyparse (yyParser.yyInput yyLex)
				{
    if (yyMax <= 0) yyMax = 256;			// initial size
    int yyState = 0;                                   // state stack ptr
    int [] yyStates = new int[yyMax];	                // state stack 
    Object yyVal = null;                               // value stack ptr
    Object [] yyVals = new Object[yyMax];	        // value stack
    int yyToken = -1;					// current input
    int yyErrorFlag = 0;				// #tks to shift

    int yyTop = 0;
    goto skip;
    yyLoop:
    yyTop++;
    skip:
    for (;; ++ yyTop) {
      if (yyTop >= yyStates.Length) {			// dynamically increase
        int[] i = new int[yyStates.Length+yyMax];
        yyStates.CopyTo (i, 0);
        yyStates = i;
        Object[] o = new Object[yyVals.Length+yyMax];
        yyVals.CopyTo (o, 0);
        yyVals = o;
      }
      yyStates[yyTop] = yyState;
      yyVals[yyTop] = yyVal;
      if (debug != null) debug.push(yyState, yyVal);

      yyDiscarded: for (;;) {	// discarding a token does not change stack
        int yyN;
        if ((yyN = yyDefRed[yyState]) == 0) {	// else [default] reduce (yyN)
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
            if (debug != null)
              debug.lex(yyState, yyToken, yyname(yyToken), yyLex.value());
          }
          if ((yyN = yySindex[yyState]) != 0 && ((yyN += yyToken) >= 0)
              && (yyN < yyTable.Length) && (yyCheck[yyN] == yyToken)) {
            if (debug != null)
              debug.shift(yyState, yyTable[yyN], yyErrorFlag-1);
            yyState = yyTable[yyN];		// shift to yyN
            yyVal = yyLex.value();
            yyToken = -1;
            if (yyErrorFlag > 0) -- yyErrorFlag;
            goto yyLoop;
          }
          if ((yyN = yyRindex[yyState]) != 0 && (yyN += yyToken) >= 0
              && yyN < yyTable.Length && yyCheck[yyN] == yyToken)
            yyN = yyTable[yyN];			// reduce (yyN)
          else
            switch (yyErrorFlag) {
  
            case 0:
              yyerror("syntax error", yyExpecting(yyState));
              if (debug != null) debug.error("syntax error");
              goto case 1;
            case 1: case 2:
              yyErrorFlag = 3;
              do {
                if ((yyN = yySindex[yyStates[yyTop]]) != 0
                    && (yyN += Token.yyErrorCode) >= 0 && yyN < yyTable.Length
                    && yyCheck[yyN] == Token.yyErrorCode) {
                  if (debug != null)
                    debug.shift(yyStates[yyTop], yyTable[yyN], 3);
                  yyState = yyTable[yyN];
                  yyVal = yyLex.value();
                  goto yyLoop;
                }
                if (debug != null) debug.pop(yyStates[yyTop]);
              } while (-- yyTop >= 0);
              if (debug != null) debug.reject();
              throw new yyParser.yyException("irrecoverable syntax error");
  
            case 3:
              if (yyToken == 0) {
                if (debug != null) debug.reject();
                throw new yyParser.yyException("irrecoverable syntax error at end-of-file");
              }
              if (debug != null)
                debug.discard(yyState, yyToken, yyname(yyToken),
  							yyLex.value());
              yyToken = -1;
              goto yyDiscarded;		// leave stack alone
            }
        }
        int yyV = yyTop + 1-yyLen[yyN];
        if (debug != null)
          debug.reduce(yyState, yyStates[yyV-1], yyN, yyRule[yyN], yyLen[yyN]);
        yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
        switch (yyN) {
case 17:
#line 271 "cs-parser.jay"
  {
		  Namespace = Namespace + (Namespace.Length > 0 ? "." : "") + ((TokenValue)yyVals[0+yyTop]).val.s;
		  Namespaces.Push (((TokenValue)yyVals[0+yyTop]).val.s.Length);
          }
  break;
case 18:
#line 276 "cs-parser.jay"
  {
		  int idx = (int) Namespaces.Pop ();
		  Namespace = Namespace.Remove (Namespace.Length - idx, idx);
	  }
  break;
case 19:
#line 283 "cs-parser.jay"
  { yyVal = new TokenValue (); }
  break;
case 24:
#line 294 "cs-parser.jay"
  {
	        ((TokenValue)yyVal).val = ((TokenValue)yyVals[-2+yyTop]).val.s + "." + ((TokenValue)yyVals[0+yyTop]).val.s; }
  break;
case 26:
#line 308 "cs-parser.jay"
  {
	  }
  break;
case 40:
#line 351 "cs-parser.jay"
  { yyVal = new TokenValue (); }
  break;
case 43:
#line 358 "cs-parser.jay"
  {
		  ((TokenValue)yyVals[-1+yyTop]).Update (((TokenValue)yyVals[0+yyTop]));
	  }
  break;
case 44:
#line 365 "cs-parser.jay"
  {
		  ((TokenValue)yyVals[-4+yyTop]).Update (((TokenValue)yyVals[0+yyTop]));
	  }
  break;
case 45:
#line 369 "cs-parser.jay"
  {
		  ((TokenValue)yyVals[-3+yyTop]).Update (((TokenValue)yyVals[0+yyTop]));
	  }
  break;
case 46:
#line 376 "cs-parser.jay"
  {
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 47:
#line 383 "cs-parser.jay"
  {
		yyVal = ((TokenValue)yyVals[0+yyTop]);
	  }
  break;
case 48:
#line 386 "cs-parser.jay"
  { yyVal = "event"; }
  break;
case 49:
#line 387 "cs-parser.jay"
  { yyVal = "return"; }
  break;
case 53:
#line 401 "cs-parser.jay"
  { /* reserved attribute name or identifier: 17.4 */ }
  break;
case 54:
#line 405 "cs-parser.jay"
  { yyVal = null; }
  break;
case 59:
#line 418 "cs-parser.jay"
  { yyVal = null; }
  break;
case 66:
#line 439 "cs-parser.jay"
  {
		  ((TokenValue)yyVals[-2+yyTop]).Update (((TokenValue)yyVals[0+yyTop]));
	  }
  break;
case 101:
#line 533 "cs-parser.jay"
  {
		  ((TokenValue)yyVals[-4+yyTop]).Update (((TokenValue)yyVals[-3+yyTop]));
		  ((TokenValue)yyVals[-4+yyTop]).Update (((TokenValue)yyVals[-2+yyTop]));
		  ((TokenValue)yyVals[-4+yyTop]).Update (((TokenValue)yyVals[0+yyTop]));
		  /*Console.WriteLine ("fi {0}", $2);*/
		  foreach (string name in ((TokenValue)yyVals[-1+yyTop]).val.s.Split (','))
		          db.AddMember (Namespace, type, name, new Part (fileID, ((TokenValue)yyVals[-4+yyTop])));
	  }
  break;
case 103:
#line 546 "cs-parser.jay"
  {
		  ((TokenValue)yyVals[-2+yyTop]).Update (((TokenValue)yyVals[0+yyTop]), ((TokenValue)yyVals[-2+yyTop]).val.s + "," + ((TokenValue)yyVals[0+yyTop]).val.s);
	  }
  break;
case 104:
#line 553 "cs-parser.jay"
  {
		  ((TokenValue)yyVals[-2+yyTop]).Update (((TokenValue)yyVals[0+yyTop]));
	  }
  break;
case 109:
#line 568 "cs-parser.jay"
  {
		  ((TokenValue)yyVals[-1+yyTop]).Update (((TokenValue)yyVals[0+yyTop]));
		  db.AddMember (Namespace, type, ((TokenValue)yyVals[-1+yyTop]), new Part (fileID, ((TokenValue)yyVals[-1+yyTop])));
	  }
  break;
case 112:
#line 585 "cs-parser.jay"
  {
		((TokenValue)yyVals[-6+yyTop]).Update (((TokenValue)yyVals[-5+yyTop]));
		((TokenValue)yyVals[-6+yyTop]).Update (((TokenValue)yyVals[-4+yyTop]));
		((TokenValue)yyVals[-6+yyTop]).Update (((TokenValue)yyVals[0+yyTop]), ((TokenValue)yyVals[-3+yyTop]).val.s + " (" + ((TokenValue)yyVals[-1+yyTop]).val.s + "), " + ((TokenValue)yyVals[-4+yyTop]).val.s);
	}
  break;
case 113:
#line 595 "cs-parser.jay"
  {
		((TokenValue)yyVals[-6+yyTop]).Update (((TokenValue)yyVals[-5+yyTop]));
		((TokenValue)yyVals[-6+yyTop]).Update (((TokenValue)yyVals[-4+yyTop]));
		((TokenValue)yyVals[-6+yyTop]).Update (((TokenValue)yyVals[0+yyTop]), ((TokenValue)yyVals[-3+yyTop]).val.s + " (" + ((TokenValue)yyVals[-1+yyTop]).val.s + "), void");
	}
  break;
case 116:
#line 608 "cs-parser.jay"
  { yyVal = new TokenValue (); }
  break;
case 119:
#line 614 "cs-parser.jay"
  { ((TokenValue)yyVal).val = ((TokenValue)yyVals[-2+yyTop]).val.s + ", " + ((TokenValue)yyVals[0+yyTop]).val.s; }
  break;
case 122:
#line 620 "cs-parser.jay"
  { ((TokenValue)yyVal).val = ((TokenValue)yyVals[-2+yyTop]).val.s + ", " + ((TokenValue)yyVals[0+yyTop]).val.s; }
  break;
case 123:
#line 628 "cs-parser.jay"
  {
		((TokenValue)yyVal).val = ((TokenValue)yyVals[-1+yyTop]).val.s + " " + ((TokenValue)yyVals[0+yyTop]).val.s;
	}
  break;
case 124:
#line 634 "cs-parser.jay"
  { yyVal = new TokenValue (); }
  break;
case 130:
#line 656 "cs-parser.jay"
  {
		  Rows.Push (lexer.Location.Row);
	  }
  break;
case 131:
#line 660 "cs-parser.jay"
  {
		lexer.PropertyParsing = true;
	  }
  break;
case 132:
#line 664 "cs-parser.jay"
  {
		lexer.PropertyParsing = false;
	  }
  break;
case 133:
#line 668 "cs-parser.jay"
  {
		  db.AddMember (Namespace, type, ((TokenValue)yyVals[-7+yyTop]).val.s + " " + ((TokenValue)yyVals[-6+yyTop]).val.s, new Part (fileID, (int) Rows.Pop (), lexer.Location.Row));
	  }
  break;
case 136:
#line 679 "cs-parser.jay"
  { yyVal = null; }
  break;
case 138:
#line 684 "cs-parser.jay"
  { yyVal = null; }
  break;
case 140:
#line 690 "cs-parser.jay"
  {
		lexer.PropertyParsing = false;
	  }
  break;
case 141:
#line 694 "cs-parser.jay"
  {
		lexer.PropertyParsing = true;
	  }
  break;
case 142:
#line 701 "cs-parser.jay"
  {
		lexer.PropertyParsing = false;
	  }
  break;
case 143:
#line 705 "cs-parser.jay"
  {
		lexer.PropertyParsing = true;
	  }
  break;
case 145:
#line 712 "cs-parser.jay"
  { yyVal = null; }
  break;
case 147:
#line 724 "cs-parser.jay"
  { yyVal = null; }
  break;
case 149:
#line 729 "cs-parser.jay"
  { yyVal = yyVals[0+yyTop]; }
  break;
case 161:
#line 761 "cs-parser.jay"
  { yyVal = false; }
  break;
case 162:
#line 762 "cs-parser.jay"
  { yyVal = true; }
  break;
case 165:
#line 779 "cs-parser.jay"
  { lexer.PropertyParsing = true; }
  break;
case 166:
#line 781 "cs-parser.jay"
  { lexer.PropertyParsing = false; }
  break;
case 168:
#line 786 "cs-parser.jay"
  { yyVal = 1; }
  break;
case 169:
#line 787 "cs-parser.jay"
  { yyVal = 2; }
  break;
case 170:
#line 789 "cs-parser.jay"
  { yyVal = 3; }
  break;
case 171:
#line 791 "cs-parser.jay"
  { yyVal = 3; }
  break;
case 173:
#line 802 "cs-parser.jay"
  { lexer.PropertyParsing = true; }
  break;
case 174:
#line 804 "cs-parser.jay"
  { lexer.PropertyParsing = false; }
  break;
case 178:
#line 814 "cs-parser.jay"
  { yyVal = null; }
  break;
case 208:
#line 867 "cs-parser.jay"
  {
		  ((TokenValue)yyVals[-3+yyTop]).Update (((TokenValue)yyVals[-2+yyTop]));
		  ((TokenValue)yyVals[-3+yyTop]).Update (((TokenValue)yyVals[-1+yyTop]));
		  ((TokenValue)yyVals[-3+yyTop]).Update (((TokenValue)yyVals[0+yyTop]));
		  db.AddMember (Namespace, type, ((TokenValue)yyVals[-1+yyTop]), new Part (fileID, ((TokenValue)yyVals[-3+yyTop])));
	  }
  break;
case 209:
#line 879 "cs-parser.jay"
  {
		  ((TokenValue)yyVals[-4+yyTop]).Update (((TokenValue)yyVals[-1+yyTop]));
		  ((TokenValue)yyVals[-4+yyTop]).Update (((TokenValue)yyVals[0+yyTop]), (modStatic ? ".cctor" : ".ctor") + " (" + ((TokenValue)yyVals[-2+yyTop]).val.s + ")");
	  }
  break;
case 212:
#line 891 "cs-parser.jay"
  { yyVal = new TokenValue (); }
  break;
case 214:
#line 897 "cs-parser.jay"
  {
		  ((TokenValue)yyVals[-4+yyTop]).Update (((TokenValue)yyVals[0+yyTop]));
	  }
  break;
case 215:
#line 901 "cs-parser.jay"
  {
		  ((TokenValue)yyVals[-4+yyTop]).Update (((TokenValue)yyVals[0+yyTop]));
	  }
  break;
case 218:
#line 918 "cs-parser.jay"
  {
		lexer.EventParsing = true;
	  }
  break;
case 219:
#line 922 "cs-parser.jay"
  {
		lexer.EventParsing = false;  
	  }
  break;
case 223:
#line 935 "cs-parser.jay"
  {
		lexer.EventParsing = false;
	  }
  break;
case 224:
#line 939 "cs-parser.jay"
  {
		lexer.EventParsing = true;
	  }
  break;
case 225:
#line 946 "cs-parser.jay"
  {
		lexer.EventParsing = false;
	  }
  break;
case 226:
#line 950 "cs-parser.jay"
  {
		lexer.EventParsing = true;
	  }
  break;
case 227:
#line 958 "cs-parser.jay"
  {
		lexer.PropertyParsing = true;
	  }
  break;
case 228:
#line 962 "cs-parser.jay"
  {
		  lexer.PropertyParsing = false;
	  }
  break;
case 278:
#line 1102 "cs-parser.jay"
  { ((TokenValue)yyVal).val = ((TokenValue)yyVals[-1+yyTop]).val.s + ((TokenValue)yyVals[0+yyTop]).val.s; }
  break;
case 312:
#line 1170 "cs-parser.jay"
  { yyVal = null; }
  break;
case 319:
#line 1186 "cs-parser.jay"
  { note ("section 5.4"); yyVal = yyVals[0+yyTop]; }
  break;
case 335:
#line 1234 "cs-parser.jay"
  { yyVal = new TokenValue (); }
  break;
case 337:
#line 1240 "cs-parser.jay"
  {
		  ((TokenValue)yyVal).val = ((TokenValue)yyVals[0+yyTop]).val.s + ((TokenValue)yyVals[-1+yyTop]).val.s;
	  }
  break;
case 338:
#line 1247 "cs-parser.jay"
  {
		  ((TokenValue)yyVal).val.s = "[" + ((TokenValue)yyVals[-1+yyTop]).val.s + "]";
	  }
  break;
case 339:
#line 1253 "cs-parser.jay"
  { yyVal = new TokenValue (); }
  break;
case 341:
#line 1258 "cs-parser.jay"
  { ((TokenValue)yyVal).val = ","; }
  break;
case 342:
#line 1260 "cs-parser.jay"
  {
		((TokenValue)yyVal).val = ((TokenValue)yyVals[-1+yyTop]).val.s + ",";
	  }
  break;
case 416:
#line 1433 "cs-parser.jay"
  {
		  Types.Push (type);
		  type += (type.Length > 0 ? "." : "") + ((TokenValue)yyVals[-1+yyTop]).val.s;
	  }
  break;
case 417:
#line 1439 "cs-parser.jay"
  {
		  ((TokenValue)yyVals[-7+yyTop]).Update (((TokenValue)yyVals[-6+yyTop]));
		  ((TokenValue)yyVals[-7+yyTop]).Update (((TokenValue)yyVals[-5+yyTop]));
		  ((TokenValue)yyVals[-7+yyTop]).Update (((TokenValue)yyVals[-1+yyTop]));
		  ((TokenValue)yyVals[-7+yyTop]).Update (((TokenValue)yyVals[0+yyTop]));
		  db.AddType (Namespace, type, new Part (fileID, ((TokenValue)yyVals[-7+yyTop])));
		  type = (string) Types.Pop ();
	  }
  break;
case 418:
#line 1450 "cs-parser.jay"
  { yyVal = new TokenValue (); modStatic = false; }
  break;
case 419:
#line 1452 "cs-parser.jay"
  {
		  modStatic = ((TokenValue)yyVals[0+yyTop]).val.s.IndexOf ("static") >= 0;
	  }
  break;
case 421:
#line 1459 "cs-parser.jay"
  { ((TokenValue)yyVal).val = ((TokenValue)yyVals[-1+yyTop]).val.s + " " + ((TokenValue)yyVals[0+yyTop]).val.s; }
  break;
case 436:
#line 1480 "cs-parser.jay"
  { yyVal = new TokenValue (); }
  break;
case 438:
#line 1485 "cs-parser.jay"
  { yyVal = yyVals[0+yyTop]; }
  break;
case 439:
#line 1504 "cs-parser.jay"
  {
		  ((TokenValue)yyVals[-2+yyTop]).Update (((TokenValue)yyVals[0+yyTop]));
	  }
  break;
case 473:
#line 1584 "cs-parser.jay"
  {
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 482:
#line 1606 "cs-parser.jay"
  { note ("complain if this is a delegate maybe?"); }
  break;
case 485:
#line 1616 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 490:
#line 1642 "cs-parser.jay"
  {
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 537:
#line 1776 "cs-parser.jay"
  { yyVal = null; }
  break;
case 541:
#line 1786 "cs-parser.jay"
  { yyVal = null; }
  break;
case 544:
#line 1796 "cs-parser.jay"
  { yyVal = null; }
  break;
#line 1319 "-"
        }
        yyTop -= yyLen[yyN];
        yyState = yyStates[yyTop];
        int yyM = yyLhs[yyN];
        if (yyState == 0 && yyM == 0) {
          if (debug != null) debug.shift(0, yyFinal);
          yyState = yyFinal;
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
            if (debug != null)
               debug.lex(yyState, yyToken,yyname(yyToken), yyLex.value());
          }
          if (yyToken == 0) {
            if (debug != null) debug.accept(yyVal);
            return yyVal;
          }
          goto yyLoop;
        }
        if (((yyN = yyGindex[yyM]) != 0) && ((yyN += yyState) >= 0)
            && (yyN < yyTable.Length) && (yyCheck[yyN] == yyState))
          yyState = yyTable[yyN];
        else
          yyState = yyDgoto[yyM];
        if (debug != null) debug.shift(yyStates[yyTop], yyState);
	 goto yyLoop;
      }
    }
  }
Esempio n. 12
0
        //
        public virtual void InsertRange(int index, ICollection c)
        {
            if (c == null)
                throw new ArgumentNullException("c", "Collection");
            if (index < 0 || index > _size) throw new ArgumentOutOfRangeException("index", "Index");
            int count = c.Count;
            if (count > 0)
            {
                EnsureCapacity(_size + count);
                
                if (index < _size)
                {
                    Array.Copy(_items, index, _items, index + count, _size - index);
                }

                Object[] itemsToInsert = new Object[count];
                c.CopyTo(itemsToInsert, 0);
                itemsToInsert.CopyTo(_items, index);
                _size += count;
                _version++;
            }
        }
Esempio n. 13
0
    private DataTable _prepareDSTable(String bioCode, Params prms, IDbConnection conn) {
      var table = new DataTable("DSTable");
      JsonStoreRequestGet request = null; // (CExParams)Params.FindParamValue(vPrms, "ExParams");
      CJSCursor cursor = null;// new CJSCursor(vConn, vDSDefNode, bioCode);
      cursor.Init(request);

      try {
        cursor.Open(120);

        try {
          bool vIsFirstRow = true;
          Int64 vRowCount = 0;
          while (cursor.Next()) {
            if (vIsFirstRow) {
              DataColumn vNewColmn = table.Columns.Add();
              vNewColmn.ColumnName = csEXPDATAROWNUMBER_COL_NAME;
              vNewColmn.DataType = typeof(Int64);
              for (int i = 0; i < cursor.DataReader.FieldCount; i++) {
                vNewColmn = table.Columns.Add();
                vNewColmn.ColumnName = cursor.DataReader.GetName(i);
                vNewColmn.DataType = cursor.DataReader.GetFieldType(i);
              }
              vIsFirstRow = false;
            }
            var vVals = new Object[cursor.DataReader.FieldCount];
            cursor.DataReader.GetValues(vVals);
            var vVals1 = new Object[vVals.Length + 1];
            vVals.CopyTo(vVals1, 1);
            vRowCount++;
            vVals1[0] = vRowCount;
            table.Rows.Add(vVals1);
          }
        } catch (ThreadAbortException) {
          throw;
        } catch (Exception ex) {
          throw new EBioException("Ошибка при считывании данных из БД. Сообщение: " + ex.ToString(), ex);
        }
      } finally {
        cursor.Close();
        conn.Close();
      }
      return table;
    }
Esempio n. 14
0
  /** the generated parser.
      Maintains a state and a value stack, currently with fixed maximum size.
      @param yyLex scanner.
      @return result of the last reduction, if any.
      @throws yyException on irrecoverable parse error.
    */
  internal Object yyparse (yyParser.yyInput yyLex)
  {
    if (yyMax <= 0) yyMax = 256;			// initial size
    int yyState = 0;                                   // state stack ptr
    int [] yyStates = new int[yyMax];	                // state stack 
    Object yyVal = null;                               // value stack ptr
    Object [] yyVals = new Object[yyMax];	        // value stack
    int yyToken = -1;					// current input
    int yyErrorFlag = 0;				// #tks to shift

    /*yyLoop:*/ for (int yyTop = 0;; ++ yyTop) {
      if (yyTop >= yyStates.Length) {			// dynamically increase
        int[] i = new int[yyStates.Length+yyMax];
        yyStates.CopyTo (i, 0);
        yyStates = i;
        Object[] o = new Object[yyVals.Length+yyMax];
        yyVals.CopyTo (o, 0);
        yyVals = o;
      }
      yyStates[yyTop] = yyState;
      yyVals[yyTop] = yyVal;
      if (debug != null) debug.push(yyState, yyVal);

      /*yyDiscarded:*/ for (;;) {	// discarding a token does not change stack
        int yyN;
        if ((yyN = yyDefRed[yyState]) == 0) {	// else [default] reduce (yyN)
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
            if (debug != null)
              debug.lex(yyState, yyToken, yyname(yyToken), yyLex.value());
          }
          if ((yyN = yySindex[yyState]) != 0 && ((yyN += yyToken) >= 0)
              && (yyN < yyTable.Length) && (yyCheck[yyN] == yyToken)) {
            if (debug != null)
              debug.shift(yyState, yyTable[yyN], yyErrorFlag-1);
            yyState = yyTable[yyN];		// shift to yyN
            yyVal = yyLex.value();
            yyToken = -1;
            if (yyErrorFlag > 0) -- yyErrorFlag;
            goto continue_yyLoop;
          }
          if ((yyN = yyRindex[yyState]) != 0 && (yyN += yyToken) >= 0
              && yyN < yyTable.Length && yyCheck[yyN] == yyToken)
            yyN = yyTable[yyN];			// reduce (yyN)
          else
            switch (yyErrorFlag) {
  
            case 0:
              yyExpectingState = yyState;
              // yyerror(String.Format ("syntax error, got token `{0}'", yyname (yyToken)), yyExpecting(yyState));
              if (debug != null) debug.error("syntax error");
              if (yyToken == 0 /*eof*/ || yyToken == eof_token) throw new yyParser.yyUnexpectedEof ();
              goto case 1;
            case 1: case 2:
              yyErrorFlag = 3;
              do {
                if ((yyN = yySindex[yyStates[yyTop]]) != 0
                    && (yyN += Token.yyErrorCode) >= 0 && yyN < yyTable.Length
                    && yyCheck[yyN] == Token.yyErrorCode) {
                  if (debug != null)
                    debug.shift(yyStates[yyTop], yyTable[yyN], 3);
                  yyState = yyTable[yyN];
                  yyVal = yyLex.value();
                  goto continue_yyLoop;
                }
                if (debug != null) debug.pop(yyStates[yyTop]);
              } while (-- yyTop >= 0);
              if (debug != null) debug.reject();
              throw new yyParser.yyException("irrecoverable syntax error");
  
            case 3:
              if (yyToken == 0) {
                if (debug != null) debug.reject();
                throw new yyParser.yyException("irrecoverable syntax error at end-of-file");
              }
              if (debug != null)
                debug.discard(yyState, yyToken, yyname(yyToken),
  							yyLex.value());
              yyToken = -1;
              goto continue_yyDiscarded;		// leave stack alone
            }
        }
        int yyV = yyTop + 1-yyLen[yyN];
        if (debug != null)
          debug.reduce(yyState, yyStates[yyV-1], yyN, YYRules.getRule (yyN), yyLen[yyN]);
        yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
        switch (yyN) {
case 1:
#line 391 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Lexer.check_incorrect_doc_comment ();
	  }
  break;
case 2:
#line 394 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { Lexer.CompleteOnEOF = false; }
  break;
case 6:
#line 401 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[0+yyTop] != null) {
			Attributes attrs = (Attributes) yyVals[0+yyTop];
			report.Error (1730, attrs.Attrs [0].Location,
				"Assembly and module attributes must precede all other elements except using clauses and extern alias declarations");
		}
	  }
  break;
case 7:
#line 409 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		module.AddAttributes ((Attributes) yyVals[0+yyTop], current_namespace);
	  }
  break;
case 8:
#line 413 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyToken == Token.EXTERN_ALIAS)
			report.Error (439, lexer.Location, "An extern alias declaration must precede all other elements");
		else
			Error_SyntaxError (yyToken);
	  }
  break;
case 13:
#line 433 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
		string s = lt.Value;
		if (s != "alias"){
			syntax_error (lt.Location, "`alias' expected");
		} else if (lang_version == LanguageVersion.ISO_1) {
			FeatureIsNotAvailable (lt.Location, "external alias");
		} else {
			lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop]; 
			current_namespace.AddUsingExternalAlias (lt.Value, lt.Location, report);
		}
	  }
  break;
case 14:
#line 446 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	syntax_error (GetLocation (yyVals[-1+yyTop]), "`alias' expected");   /* TODO: better*/
	  }
  break;
case 17:
#line 458 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 18:
#line 463 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 19:
#line 471 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
		if (lang_version != LanguageVersion.ISO_1 && lt.Value == "global") {
			report.Warning (440, 2, lt.Location,
			 "An alias named `global' will not be used when resolving `global::'. The global namespace will be used instead");
		}

		current_namespace.AddUsingAlias (lt.Value, (MemberName) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop]));
	  }
  break;
case 20:
#line 481 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
		yyVal = null;
	  }
  break;
case 21:
#line 489 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_namespace.AddUsing ((MemberName) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 22:
#line 501 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Attributes attrs = (Attributes) yyVals[-2+yyTop];
		MemberName name = (MemberName) yyVals[0+yyTop];
		if (attrs != null) {
			bool valid_global_attrs = true;
			if ((current_namespace.DeclarationFound || current_namespace != file.NamespaceContainer)) {
				valid_global_attrs = false;
			} else {
				foreach (var a in attrs.Attrs) {
					if (a.ExplicitTarget == "assembly" || a.ExplicitTarget == "module")
						continue;
						
					valid_global_attrs = false;
					break;
				}
			}
			
			if (!valid_global_attrs)
				report.Error (1671, name.Location, "A namespace declaration cannot have modifiers or attributes");
		}
	
		module.AddAttributes (attrs, current_namespace);
		
		current_namespace = new NamespaceContainer (name, module, current_namespace, file);
		module.AddTypesContainer (current_namespace);
		current_class = current_namespace.SlaveDeclSpace;
		current_container = current_class.PartialContainer;
	  }
  break;
case 23:
#line 530 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 24:
#line 535 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[0+yyTop] != null)
			lbag.AddLocation (current_namespace, GetLocation (yyVals[-9+yyTop]), GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
		else
			lbag.AddLocation (current_namespace, GetLocation (yyVals[-9+yyTop]), GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-1+yyTop]));
	  
		current_namespace = current_namespace.Parent;
		current_class = current_namespace.SlaveDeclSpace;
		current_container = current_class.PartialContainer;
	  }
  break;
case 25:
#line 549 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		yyVal = new MemberName (lt.Value, lt.Location);
	  }
  break;
case 26:
#line 554 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], lt.Value, lt.Location);		
	  }
  break;
case 27:
#line 559 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
		yyVal = new MemberName ("<invalid>", lexer.Location);
	  }
  break;
case 32:
#line 577 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		MemberName name = (MemberName) yyVals[0+yyTop];

		if (name.TypeArguments != null)
			syntax_error (lexer.Location, "namespace name expected");

		yyVal = name;
	  }
  break;
case 41:
#line 609 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[0+yyTop] != null) {
			TypeContainer ds = (TypeContainer)yyVals[0+yyTop];

			if ((ds.ModFlags & (Modifiers.PRIVATE | Modifiers.PROTECTED)) != 0){
				report.Error (1527, ds.Location, 
				"Namespace elements cannot be explicitly declared as private, protected or protected internal");
			}

			/* Here is a trick, for explicit attributes we don't know where they belong to until*/
			/* we parse succeeding declaration hence we parse them as normal and re-attach them*/
			/* when we know whether they are global (assembly:, module:) or local (type:).*/
			if (ds.OptAttributes != null) {
				ds.OptAttributes.ConvertGlobalAttributes (ds, current_namespace, !current_namespace.DeclarationFound && current_namespace == file.NamespaceContainer);
			}
		}
		current_namespace.DeclarationFound = true;
	  }
  break;
case 42:
#line 628 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_namespace.DeclarationFound = true;
	  }
  break;
case 50:
#line 659 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var sect = (List<Attribute>) yyVals[0+yyTop];
		yyVal = new Attributes (sect);
	  }
  break;
case 51:
#line 664 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Attributes attrs = yyVals[-1+yyTop] as Attributes;
		var sect = (List<Attribute>) yyVals[0+yyTop];
		if (attrs == null)
			attrs = new Attributes (sect);
		else
			attrs.AddAttributes (sect);
		yyVal = attrs;
	  }
  break;
case 52:
#line 677 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.parsing_attribute_section = true;
	  }
  break;
case 53:
#line 681 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.parsing_attribute_section = false;
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 54:
#line 689 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_attr_target = (string) yyVals[-1+yyTop];
		if (current_attr_target == "assembly" || current_attr_target == "module") {
			Lexer.check_incorrect_doc_comment ();
		}
	  }
  break;
case 55:
#line 696 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		/* when attribute target is invalid*/
		if (current_attr_target == string.Empty)
			yyVal = new List<Attribute> (0);
		else
			yyVal = yyVals[-2+yyTop];
	  
		current_attr_target = null;
		lexer.parsing_attribute_section = false;
 	  }
  break;
case 56:
#line 707 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = yyVals[-2+yyTop];
	  }
  break;
case 57:
#line 714 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		yyVal = CheckAttributeTarget (lt.Value, lt.Location);
	  }
  break;
case 58:
#line 718 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = "event"; }
  break;
case 59:
#line 719 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = "return"; }
  break;
case 60:
#line 721 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyToken == Token.IDENTIFIER) {
			Error_SyntaxError (yyToken);
			yyVal = null;
		} else {
			string name = GetTokenName (yyToken);
			yyVal = CheckAttributeTarget (name, GetLocation (yyVals[0+yyTop]));
		}
	  }
  break;
case 61:
#line 734 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new List<Attribute> (4) { (Attribute) yyVals[0+yyTop] };
	  }
  break;
case 62:
#line 738 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var attrs = (List<Attribute>) yyVals[-2+yyTop];
		attrs.Add ((Attribute) yyVals[0+yyTop]);

		yyVal = attrs;
	  }
  break;
case 63:
#line 748 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 64:
#line 752 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		--lexer.parsing_block;
		MemberName mname = (MemberName) yyVals[-2+yyTop];
		if (mname.IsGeneric) {
			report.Error (404, lexer.Location,
				      "'<' unexpected: attributes cannot be generic");
		}

		Arguments [] arguments = (Arguments []) yyVals[0+yyTop];
		ATypeNameExpression expr = mname.GetTypeExpression ();
		yyVal = new Attribute (current_attr_target, expr, arguments, mname.Location, lexer.IsEscapedIdentifier (mname));
	  }
  break;
case 66:
#line 771 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = null; }
  break;
case 67:
#line 773 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 68:
#line 780 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = null; }
  break;
case 69:
#line 782 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	Arguments a = new Arguments (4);
		a.Add ((Argument) yyVals[0+yyTop]);
		yyVal = new Arguments [] { a, null };
	  }
  break;
case 70:
#line 788 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	Arguments a = new Arguments (4);
		a.Add ((Argument) yyVals[0+yyTop]);  
		yyVal = new Arguments [] { null, a };
	  }
  break;
case 71:
#line 794 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Arguments[] o = (Arguments[]) yyVals[-2+yyTop];
		if (o [1] != null) {
			report.Error (1016, ((Argument) yyVals[0+yyTop]).Expr.Location, "Named attribute arguments must appear after the positional arguments");
			o [0] = new Arguments (4);
		}
		
		Arguments args = ((Arguments) o [0]);
		if (args.Count > 0 && !(yyVals[0+yyTop] is NamedArgument) && args [args.Count - 1] is NamedArgument)
			Error_NamedArgumentExpected ((NamedArgument) args [args.Count - 1]);
		
		args.Add ((Argument) yyVals[0+yyTop]);
	  }
  break;
case 72:
#line 808 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Arguments[] o = (Arguments[]) yyVals[-2+yyTop];
		if (o [1] == null) {
			o [1] = new Arguments (4);
		}

		((Arguments) o [1]).Add ((Argument) yyVals[0+yyTop]);
	  }
  break;
case 73:
#line 820 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	yyVal = new Argument ((Expression) yyVals[0+yyTop]);
	  }
  break;
case 75:
#line 828 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 76:
#line 832 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	--lexer.parsing_block;
	  	var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
		yyVal = new NamedArgument (lt.Value, lt.Location, (Expression) yyVals[0+yyTop]);	  
	  }
  break;
case 77:
#line 841 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (lang_version <= LanguageVersion.V_3)
			FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "named argument");
			
		/* Avoid boxing in common case (no modifier)*/
		var arg_mod = yyVals[-1+yyTop] == null ? Argument.AType.None : (Argument.AType) yyVals[-1+yyTop];
			
		var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
		yyVal = new NamedArgument (lt.Value, lt.Location, (Expression) yyVals[0+yyTop], arg_mod);
	  }
  break;
case 78:
#line 854 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = null; }
  break;
case 79:
#line 856 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		yyVal = Argument.AType.Ref;
	  }
  break;
case 80:
#line 860 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		yyVal = Argument.AType.Out;
	  }
  break;
case 83:
#line 872 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.parsing_modifiers = true;
	  }
  break;
case 84:
#line 876 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.parsing_modifiers = true;
	  }
  break;
case 97:
#line 895 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (1519, lexer.Location, "Unexpected symbol `{0}' in class, struct, or interface member declaration",
			GetSymbolName (yyToken));
		yyVal = null;
		lexer.parsing_generic_declaration = false;
	  }
  break;
case 98:
#line 908 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.ConstraintsParsing = true;
	  }
  break;
case 99:
#line 912 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		MemberName name = MakeName ((MemberName) yyVals[0+yyTop]);
		push_current_class (new Struct (current_namespace, current_class, name, (Modifiers) yyVals[-4+yyTop], (Attributes) yyVals[-5+yyTop]), yyVals[-3+yyTop]);
	  }
  break;
case 100:
#line 918 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.ConstraintsParsing = false;

		current_class.SetParameterInfo ((List<Constraints>) yyVals[0+yyTop]);

		if (doc_support)
			current_container.DocComment = Lexer.consume_doc_comment ();

		lbag.AddMember (current_class, mod_locations, GetLocation (yyVals[-5+yyTop]));
		
		lexer.parsing_modifiers = true;
	  }
  break;
case 101:
#line 931 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 102:
#line 936 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		--lexer.parsing_declaration;
		if (doc_support)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 103:
#line 942 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lbag.AppendToMember (current_class, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
		yyVal = pop_current_class ();
	  }
  break;
case 104:
#line 947 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
	  }
  break;
case 105:
#line 956 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		var mod = (Modifiers) yyVals[-3+yyTop];
		current_field = new Const (current_class, (FullNamedExpression) yyVals[-1+yyTop], mod, new MemberName (lt.Value, lt.Location), (Attributes) yyVals[-4+yyTop]);
		current_container.AddConstant ((Const) current_field);
		
		if ((mod & Modifiers.STATIC) != 0) {
			report.Error (504, current_field.Location, "The constant `{0}' cannot be marked static", current_field.GetSignatureForError ());
		}
		
		yyVal = current_field;
	  }
  break;
case 106:
#line 969 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support) {
			current_field.DocComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}
		
		current_field.Initializer = (ConstInitializer) yyVals[-2+yyTop];
		lbag.AddMember (current_field, mod_locations, GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[0+yyTop]));
		current_field = null;
	  }
  break;
case 117:
#line 1003 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
         yyVal = yyVals[0+yyTop];
      }
  break;
case 118:
#line 1007 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
        yyVal = new SimpleName("dynamic",new Location(0,0));
      }
  break;
case 119:
#line 1013 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	lexer.parsing_generic_declaration = false;
	  	var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		FullNamedExpression type = yyVals[0+yyTop] as FullNamedExpression;
        if(type == null){
           report.Error (10008, GetLocation (yyVals[0+yyTop]), "Could not resolve type expression");
        }

		current_field = new RoleField (current_class, type, Modifiers.PRIVATE | Modifiers.ROLE, new MemberName (lt.Value, lt.Location),null);
		current_container.AddField (current_field);
		yyVal = current_field;
	  
		if (doc_support) {
			current_field.DocComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}
			
		lbag.AddMember (current_field, mod_locations, GetLocation (yyVals[-1+yyTop]));
		yyVal = current_field;
        current_role = current_field;
		current_field = null;
	  }
  break;
case 120:
#line 1039 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
         current_role = null;
      }
  break;
case 121:
#line 1045 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {   yyVal = null;  }
  break;
case 122:
#line 1047 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
        TypeParameter tparam = null;
        var simple = current_role.TypeExpression as SimpleName;
        if((simple != null && simple.Name != "dynamic") || (simple.Type != null && simple.Type.BuiltinType != BuiltinTypeSpec.Type.Dynamic)){
           if(current_class.IsGeneric){
             for(int i = 0; tparam == null && i<current_class.TypeParameters.Length;i++){
                 if(simple.Name == current_class.TypeParameters[i].Name){
                   tparam = current_class.TypeParameters[i];
                 }
             }
           }
           if(tparam == null) {
              report.Error (10009, GetLocation (yyVals[0+yyTop]), "Contracts can only be used for none typed roles");            
           }
        }
        var contractName = GetCurrentRoleContractName();
		MemberName name = MakeName (new MemberName(contractName));
        var inter = new Interface (current_namespace, current_class, name, Modifiers.PUBLIC, null);
        if(tparam != null) {
          tparam.Type.RolePlayerContract = inter.Type;

          var ns = current_namespace.NS;
          var className = new MemberName (ns.MemberName, new MemberName("><_extensionContainerFor" + GetCurrentRoleContractName(),GetLocation (yyVals[0+yyTop])));
          current_extensionContainer = new Class (current_namespace,
                                              current_class.Parent, 
                                              className, 
                                              Modifiers.PUBLIC | Modifiers.STATIC, 
                                              null);
        }
        RoleContracts.Add(contractName,inter);
		push_current_class (inter, null);
		lbag.AddMember (current_class, mod_locations, GetLocation (yyVals[0+yyTop]));		
	}
  break;
case 123:
#line 1081 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		--lexer.parsing_declaration;	  
		if (doc_support)
			Lexer.doc_state = XmlCommentState.Allowed;
	    lbag.AppendToMember (current_class, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
        if(current_extensionContainer != null) {
            var cls = current_class;
            var container = current_container;
            current_container = current_class.Module;
            push_current_class((Class)current_extensionContainer, null);
            lbag.AddMember (current_extensionContainer, mod_locations, GetLocation (yyVals[-4+yyTop]));	
            lbag.AppendToMember (current_extensionContainer, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
            pop_current_class();
            current_class = cls;
            current_container = container;
	        current_extensionContainer = null;
        }
		yyVal = pop_current_class ();
	  }
  break;
case 124:
#line 1104 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 125:
#line 1108 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 126:
#line 1115 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
	  	yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]);
	  	lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 127:
#line 1124 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 128:
#line 1128 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		--lexer.parsing_block;
		yyVal = new ConstInitializer (current_field, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 129:
#line 1133 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (145, lexer.Location, "A const field requires a value to be provided");
		yyVal = null;
	  }
  break;
case 132:
#line 1148 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	lexer.parsing_generic_declaration = false;

		FullNamedExpression type = (FullNamedExpression) yyVals[-1+yyTop];
		if (type.Type != null && type.Type.Kind == MemberKind.Void)
			report.Error (670, GetLocation (yyVals[-1+yyTop]), "Fields cannot have void type");
			
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		current_field = new Field (current_class, type, (Modifiers) yyVals[-2+yyTop], new MemberName (lt.Value, lt.Location), (Attributes) yyVals[-3+yyTop]);
		current_container.AddField (current_field);
		yyVal = current_field;
	  }
  break;
case 133:
#line 1163 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		if (doc_support) {
			current_field.DocComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}
			
		lbag.AddMember (current_field, mod_locations, GetLocation (yyVals[0+yyTop]));
		yyVal = current_field;
		current_field = null;
	  }
  break;
case 134:
#line 1176 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		if (lang_version < LanguageVersion.ISO_2)
			FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "fixed size buffers");

		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		current_field = new FixedField (current_class, (FullNamedExpression) yyVals[-1+yyTop], (Modifiers) yyVals[-3+yyTop],
			new MemberName (lt.Value, lt.Location), (Attributes) yyVals[-4+yyTop]);
			
		current_container.AddField (current_field);
	  }
  break;
case 135:
#line 1187 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support) {
			current_field.DocComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
	    }

		current_field.Initializer = (ConstInitializer) yyVals[-2+yyTop];	    
		lbag.AddMember (current_field, mod_locations, GetLocation (yyVals[0+yyTop]));
		yyVal = current_field;
	    current_field = null;
	  }
  break;
case 136:
#line 1202 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (1641, GetLocation (yyVals[-1+yyTop]), "A fixed size buffer field must have the array size specifier after the field name");
	  }
  break;
case 138:
#line 1210 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	++lexer.parsing_block;
		current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters;
	  	start_block (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 139:
#line 1216 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	--lexer.parsing_block;
		current_field.Initializer = (Expression) yyVals[0+yyTop];
		end_block (lexer.Location);
		current_local_parameters = null;
	  }
  break;
case 142:
#line 1231 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 143:
#line 1235 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 144:
#line 1242 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
	  	yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null);
	  	lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 145:
#line 1248 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 146:
#line 1252 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		--lexer.parsing_block;
		var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];	  
	  	yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (Expression) yyVals[0+yyTop]);
	  	lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 149:
#line 1267 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 150:
#line 1271 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 151:
#line 1278 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];	  
		yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]);
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 152:
#line 1287 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 153:
#line 1291 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		--lexer.parsing_block;
		yyVal = new ConstInitializer (current_field, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 154:
#line 1297 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (443, lexer.Location, "Value or constant expected");
		yyVal = null;
	  }
  break;
case 157:
#line 1307 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		/* It has to be here for the parent to safely restore artificial block*/
	  	Error_SyntaxError (yyToken);
	  	yyVal = null;
	  }
  break;
case 158:
#line 1316 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support)
			Lexer.doc_state = XmlCommentState.NotAllowed;

		/* Add it early in the case of body being eof for full ast*/
		Method m = (Method) yyVals[0+yyTop];
		async_block = (m.ModFlags & Modifiers.ASYNC) != 0;
		current_container.AddMethod (m);
		
	  }
  break;
case 159:
#line 1327 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Method method = (Method) yyVals[-2+yyTop];
		method.Block = (ToplevelBlock) yyVals[0+yyTop];
		async_block = false;
		
		if (method.Block == null) {
			method.ParameterInfo.CheckParameters (method);

			if ((method.ModFlags & Modifiers.ASYNC) != 0) {
				report.Error (1994, method.Location, "`{0}': The async modifier can only be used with methods that have a body",
					method.GetSignatureForError ());
			}
		} else {
			if (current_container.Kind == MemberKind.Interface) {
				report.Error (531, method.Location, "`{0}': interface members cannot have a definition",
					method.GetSignatureForError ());
			}
		}

		current_local_parameters = null;

		if (doc_support)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 160:
#line 1355 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support)
			Lexer.doc_state = XmlCommentState.NotAllowed;

		/* Add it early in the case of body being eof for full ast*/
		Method m = (Method) yyVals[0+yyTop];
		async_block = (m.ModFlags & Modifiers.ASYNC) != 0;
		current_container.AddMethod (m);
	  }
  break;
case 161:
#line 1365 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
        try{
		    Method method = (Method) yyVals[-2+yyTop];
		    method.Block = (ToplevelBlock) yyVals[0+yyTop];
		    async_block = false;
		
		    if (method.Block == null) {
			    method.ParameterInfo.CheckParameters (method);

			    if ((method.ModFlags & Modifiers.ASYNC) != 0) {
				    report.Error (1994, method.Location, "`{0}': The async modifier can only be used with methods that have a body",
					    method.GetSignatureForError ());
			    }
		    } else {
			    if (current_container.Kind == MemberKind.Interface) {
				    report.Error (531, method.Location, "`{0}': interface members cannot have a definition",
					    method.GetSignatureForError ());
			    }
		    }

		    current_local_parameters = null;

		    if (doc_support)
			    Lexer.doc_state = XmlCommentState.Allowed;
        } finally {
          isInteraction = false;
          interactionInitializationDone = false;
        }
	  }
  break;
case 162:
#line 1399 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	      isInteraction = true;
          interactionInitializationDone = false;		  
	  }
  break;
case 163:
#line 1405 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		valid_param_mod = ParameterModifierType.All;
	  }
  break;
case 164:
#line 1409 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.ConstraintsParsing = true;
	  }
  break;
case 165:
#line 1413 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.ConstraintsParsing = false;
		valid_param_mod = 0;
		MemberName name = (MemberName) yyVals[-6+yyTop];
		current_local_parameters = (ParametersCompiled) yyVals[-3+yyTop];

		GenericMethod generic = null;
		if (name.TypeArguments != null) {
			generic = new GenericMethod (current_namespace, current_class, name,
						     (FullNamedExpression) yyVals[-7+yyTop], current_local_parameters);

			generic.SetParameterInfo ((List<Constraints>) yyVals[0+yyTop]);
		} else if (yyVals[0+yyTop] != null) {
			report.Error (80, GetLocation (yyVals[0+yyTop]),
				"Constraints are not allowed on non-generic declarations");
		}
		var modifiers = Modifiers.PUBLIC;
		
		var method = Method.Create (current_class, generic, (FullNamedExpression) yyVals[-7+yyTop], modifiers,
				     name, current_local_parameters, (Attributes) yyVals[-10+yyTop], yyVals[0+yyTop] != null);
				     
		if (doc_support)
			method.DocComment = Lexer.consume_doc_comment ();

		lbag.AddMember (method, mod_locations, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-2+yyTop]));
		yyVal = method;
	  }
  break;
case 166:
#line 1444 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support)
			Lexer.doc_state = XmlCommentState.NotAllowed;
        isRoleMethod = true;
		/* Add it early in the case of body being eof for full ast*/
		var m = (Method) yyVals[0+yyTop];
        async_block = (m.ModFlags & Modifiers.ASYNC) != 0;
		current_container.AddMethod (m);
	  }
  break;
case 167:
#line 1454 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var method = (Method) yyVals[-2+yyTop];
		method.Block = (ToplevelBlock) yyVals[0+yyTop];
		async_block = false;
		
		if (method.Block == null) {
		    method.ParameterInfo.CheckParameters (method);

		    if ((method.ModFlags & Modifiers.ASYNC) != 0) {
			    report.Error (1994, method.Location, "`{0}': The async modifier can only be used with methods that have a body",
				    method.GetSignatureForError ());
		    }
		} else {
		    if (current_container.Kind == MemberKind.Interface) {
			    report.Error (531, method.Location, "`{0}': interface members cannot have a definition",
				    method.GetSignatureForError ());
		    }
		}

		current_local_parameters = null;

		if (doc_support)
		    Lexer.doc_state = XmlCommentState.Allowed;
		isRoleMethod = false;
	  }
  break;
case 168:
#line 1483 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
    yyVal = Modifiers.PRIVATE | Modifiers.ROLE;
  }
  break;
case 169:
#line 1487 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
    {
    yyVal = Modifiers.PRIVATE | Modifiers.ROLE |Modifiers.ENTRY;
  }
  }
  break;
case 170:
#line 1499 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	    isInteraction = false;
		valid_param_mod = ParameterModifierType.All;
	  }
  break;
case 171:
#line 1504 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.ConstraintsParsing = true;
	  }
  break;
case 172:
#line 1508 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.ConstraintsParsing = false;
		valid_param_mod = 0;
		MemberName name = (MemberName) yyVals[-6+yyTop];
		current_local_parameters = (ParametersCompiled) yyVals[-3+yyTop];
		var tempParameters = current_local_parameters.FixedParameters;
        var roleArgLocation = GetLocation (yyVals[-9+yyTop]);
		var realParameters = new Parameter[tempParameters.Length+1];
		realParameters[0] = new Self(GetCurrentRoleContractName(), current_role.TypeExpression,"self",Parameter.Modifier.NONE,null,roleArgLocation);
		Array.Copy(tempParameters,0,realParameters,1,tempParameters.Length);
		current_local_parameters = new ParametersCompiled(realParameters);
		GenericMethod generic = null;
		if (name.TypeArguments != null) {
			generic = new GenericMethod (current_namespace, current_class, name,
						     (FullNamedExpression) yyVals[-7+yyTop], current_local_parameters);

			generic.SetParameterInfo ((List<Constraints>) yyVals[0+yyTop]);
		} else if (yyVals[0+yyTop] != null) {
			report.Error (80, GetLocation (yyVals[0+yyTop]),
				"Constraints are not allowed on non-generic declarations");
		}

        var typeExpr = (FullNamedExpression) yyVals[-7+yyTop];
		var method = Method.Create (current_class, generic, typeExpr, (Modifiers)yyVals[-8+yyTop] | Modifiers.ROLE,
				     name, current_local_parameters, (Attributes) yyVals[-9+yyTop], yyVals[0+yyTop] != null);
        
        lbag.AddMember (method, mod_locations, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-2+yyTop]));
        if (doc_support)
			method.DocComment = Lexer.consume_doc_comment ();

		  yyVal = method;  
	  }
  break;
case 173:
#line 1547 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	    isInteraction = false;
		valid_param_mod = ParameterModifierType.All;
	  }
  break;
case 174:
#line 1552 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.ConstraintsParsing = true;
	  }
  break;
case 175:
#line 1556 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.ConstraintsParsing = false;
		valid_param_mod = 0;
		MemberName name = (MemberName) yyVals[-6+yyTop];
		current_local_parameters = (ParametersCompiled) yyVals[-3+yyTop];

		GenericMethod generic = null;
		if (name.TypeArguments != null) {
			generic = new GenericMethod (current_namespace, current_class, name,
						     (FullNamedExpression) yyVals[-7+yyTop], current_local_parameters);

			generic.SetParameterInfo ((List<Constraints>) yyVals[0+yyTop]);
		} else if (yyVals[0+yyTop] != null) {
			report.Error (80, GetLocation (yyVals[0+yyTop]),
				"Constraints are not allowed on non-generic declarations");
		}
		var modifiers = (Modifiers) yyVals[-8+yyTop];
		if((Modifiers.INTERACTION & modifiers) != 0){
		   modifiers = (modifiers ^ Modifiers.INTERACTION) | Modifiers.PUBLIC;
		   isInteraction = true;		   
		} else {
		   isInteraction = false;
		}
		var method = Method.Create (current_class, generic, (FullNamedExpression) yyVals[-7+yyTop], modifiers,
				     name, current_local_parameters, (Attributes) yyVals[-9+yyTop], yyVals[0+yyTop] != null);
		if(current_container.Kind == MemberKind.Interface && current_extensionContainer != null){
		    var parameters = new List<Parameter>();
            var typeExpression = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[-9+yyTop]));
            var parameter = new Parameter(typeExpression, "self", Parameter.Modifier.This, null, GetLocation(yyVals[-9+yyTop]));
            parameters.Add(parameter);
            parameters.Add(new Parameter(typeExpression, "ctx", Parameter.Modifier.NONE, null, GetLocation(yyVals[-9+yyTop])));
		    var clone = current_local_parameters.Clone();
		    for(var i = 0; i < clone.Count; i++){
		       parameters.Add(clone[i]);
		    }
		    
			var parameterTypeExpressions = parameters.Select(p=>p.TypeExpression).ToList();
			var key = current_namespace.NS.Name + "," + name.Name + "," + string.Join(",",parameterTypeExpressions.Select(p => p.ToString()));
			if(roleExtensionMethodDummies.Add(key)){
               var returnType = (FullNamedExpression) yyVals[-7+yyTop];
			   var parametersCompiled = new ParametersCompiled(parameters.ToArray(),false);
		       var dummy = Method.Create (current_extensionContainer, generic, (FullNamedExpression) yyVals[-7+yyTop], Modifiers.PUBLIC | Modifiers.STATIC,
				       name, parametersCompiled, (Attributes) yyVals[-9+yyTop], yyVals[0+yyTop] != null);
                var location = GetLocation(yyVals[-9+yyTop]);
				var parameterName = new SimpleName("self", null, location);
				var getTypeAccess = new MemberAccess(parameterName, "GetType", null, location);
                var getTypeExpression =  new Invocation(getTypeAccess, new Arguments(0));
                var argCount = parameterTypeExpressions.Count-1;
                var argumentsForGetMethod = new Arguments(2);
				var stringLiteral =  new StringLiteral(compiler.BuiltinTypes,name.Name,location);
                argumentsForGetMethod.Add(new Argument(stringLiteral));
				var typeName = new SimpleName("Type", null, location);
				var types = parameterTypeExpressions.Skip(2)
				                          .Select(t =>(Expression)(t.Type != null 
										                             ? new TypeOf(t.Type,location) 
																	 : new TypeOf(t,location))
									  ).ToList();
				var initializer = new ArrayInitializer(types,location);
                var parameterTypes = new ImplicitlyTypedArrayCreation (
				                           new ComposedTypeSpecifier (1, location), 
										   initializer, 
										   location);
		        lbag.AddLocation (parameterTypes, location, location);
				
                argumentsForGetMethod.Add(new Argument(parameterTypes));
                var getMethodExpression = new Invocation(new MemberAccess(getTypeExpression,"GetMethod"),argumentsForGetMethod);
                var argumentsForMethod = new Arguments(2);

                var delegatedArguments = parameters.Skip(2).Select(p =>
                         (Expression)new Cast(
                                  new TypeExpression(compiler.BuiltinTypes.Object,location),
                                  new SimpleName(p.Name,location),
                                  location)).ToList();
		        argumentsForMethod.Add(new Argument(new SimpleName("self", null, location)));
                if(delegatedArguments.Any()){
				      initializer = new ArrayInitializer(delegatedArguments,location);
				
				      argumentsForMethod.Add(new Argument(new ImplicitlyTypedArrayCreation(
				                           new ComposedTypeSpecifier (1, location), 
										   initializer, 
										   location)));
                } else {
				   argumentsForMethod.Add(new Argument(new ArrayCreation(new TypeExpression(compiler.BuiltinTypes.Object,location),new ArrayInitializer(0,location)))); 
				}    

                var invocation = new Invocation(new MemberAccess(getMethodExpression,"Invoke"),argumentsForMethod);
				Statement statement = new StatementExpression(invocation);
				var retType = (returnType as TypeExpression);
                if(retType != null && retType.Type.Name != "Void"){
				    var cast = new Cast(returnType,invocation,location);
                    statement = new Return(cast,location);
                }
			    
				dummy.Block = new ToplevelBlock (compiler, parametersCompiled, GetLocation(yyVals[-9+yyTop]));
				/*var exceptionExpression = new New(new MemberName("InvalidOperationException",GetLocation($1)).GetTypeExpression(),new Arguments(0),GetLocation($1));*/
				dummy.Block.AddStatement( statement);
				lbag.AddMember(dummy,mod_locations, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-2+yyTop]));
				((Class)current_extensionContainer).AddMethod(dummy);
			}
		}		     
		if (doc_support)
			method.DocComment = Lexer.consume_doc_comment ();

		lbag.AddMember (method, mod_locations, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-2+yyTop]));
		yyVal = method;
	  }
  break;
case 176:
#line 1666 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.parsing_generic_declaration = true;
	  }
  break;
case 177:
#line 1671 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.parsing_generic_declaration = false;
	  	valid_param_mod = ParameterModifierType.All;
	  }
  break;
case 178:
#line 1676 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.ConstraintsParsing = true;
	  }
  break;
case 179:
#line 1680 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.ConstraintsParsing = false;
		valid_param_mod = 0;

		MemberName name = (MemberName) yyVals[-6+yyTop];
		current_local_parameters = (ParametersCompiled) yyVals[-3+yyTop];

		if (yyVals[-1+yyTop] != null && name.TypeArguments == null)
			report.Error (80, lexer.Location,
				      "Constraints are not allowed on non-generic declarations");

		GenericMethod generic = null;
		if (name.TypeArguments != null) {
			generic = new GenericMethod (current_namespace, current_class, name,
				new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-8+yyTop])),
				current_local_parameters);

			generic.SetParameterInfo ((List<Constraints>) yyVals[-1+yyTop]);
		}

		var modifiers = (Modifiers) yyVals[-10+yyTop];
		modifiers |= Modifiers.PARTIAL;

		var method = Method.Create (current_class, generic, new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-8+yyTop])),
				     modifiers, name, current_local_parameters, (Attributes) yyVals[-11+yyTop], yyVals[-1+yyTop] != null);

		if (doc_support)
			method.DocComment = Lexer.consume_doc_comment ();

		StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[-9+yyTop]));
		lbag.AddMember (method, mod_locations, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-2+yyTop]));
		yyVal = method;
	  }
  break;
case 180:
#line 1717 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		MemberName name = (MemberName) yyVals[-3+yyTop];
		report.Error (1585, name.Location, 
			"Member modifier `{0}' must precede the member type and name", ModifiersExtensions.Name ((Modifiers) yyVals[-4+yyTop]));

		var method = Method.Create (current_class, null, (FullNamedExpression) yyVals[-5+yyTop],
					    0, name, (ParametersCompiled) yyVals[-1+yyTop], (Attributes) yyVals[-7+yyTop], false);

		current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop];

		if (doc_support)
			method.DocComment = Lexer.consume_doc_comment ();

		yyVal = method;
	  }
  break;
case 182:
#line 1736 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = null; }
  break;
case 183:
#line 1740 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = ParametersCompiled.EmptyReadOnlyParameters; }
  break;
case 185:
#line 1746 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var pars_list = (List<Parameter>) yyVals[0+yyTop];
	  	yyVal = new ParametersCompiled (pars_list.ToArray ());
	  }
  break;
case 186:
#line 1751 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var pars_list = (List<Parameter>) yyVals[-2+yyTop];
		pars_list.Add ((Parameter) yyVals[0+yyTop]);

		yyVal = new ParametersCompiled (pars_list.ToArray ()); 
	  }
  break;
case 187:
#line 1758 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var pars_list = (List<Parameter>) yyVals[-2+yyTop];
		pars_list.Add (new ArglistParameter (GetLocation (yyVals[0+yyTop])));
		yyVal = new ParametersCompiled (pars_list.ToArray (), true);
	  }
  break;
case 188:
#line 1764 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[-2+yyTop] != null)
			report.Error (231, ((Parameter) yyVals[-2+yyTop]).Location, "A params parameter must be the last parameter in a formal parameter list");

		yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[-2+yyTop] } );			
	  }
  break;
case 189:
#line 1771 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[-2+yyTop] != null)
			report.Error (231, ((Parameter) yyVals[-2+yyTop]).Location, "A params parameter must be the last parameter in a formal parameter list");

		var pars_list = (List<Parameter>) yyVals[-4+yyTop];
		pars_list.Add (new ArglistParameter (GetLocation (yyVals[-2+yyTop])));

		yyVal = new ParametersCompiled (pars_list.ToArray (), true);
	  }
  break;
case 190:
#line 1781 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list");

		yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[-2+yyTop])) }, true);
	  }
  break;
case 191:
#line 1787 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (257, GetLocation (yyVals[-2+yyTop]), "An __arglist parameter must be the last parameter in a formal parameter list");

		var pars_list = (List<Parameter>) yyVals[-4+yyTop];
		pars_list.Add (new ArglistParameter (GetLocation (yyVals[-2+yyTop])));

		yyVal = new ParametersCompiled (pars_list.ToArray (), true);
	  }
  break;
case 192:
#line 1796 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[0+yyTop] } );
	  }
  break;
case 193:
#line 1800 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[0+yyTop])) }, true);
	  }
  break;
case 194:
#line 1804 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
		yyVal = ParametersCompiled.EmptyReadOnlyParameters;
	  }
  break;
case 195:
#line 1812 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		parameters_bucket.Clear ();
		Parameter p = (Parameter) yyVals[0+yyTop];
		parameters_bucket.Add (p);
		
		default_parameter_used = p.HasDefaultValue;
		yyVal = parameters_bucket;
	  }
  break;
case 196:
#line 1821 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var pars = (List<Parameter>) yyVals[-2+yyTop];
		Parameter p = (Parameter) yyVals[0+yyTop];
		if (p != null) {
			if (p.HasExtensionMethodModifier)
				report.Error (1100, p.Location, "The parameter modifier `this' can only be used on the first parameter");
			else if (!p.HasDefaultValue && default_parameter_used)
				report.Error (1737, p.Location, "Optional parameter cannot precede required parameters");

			default_parameter_used |= p.HasDefaultValue;
			pars.Add (p);
			
			lbag.AddLocation (p, GetLocation (yyVals[-1+yyTop]));
		}
		
		yyVal = yyVals[-2+yyTop];
	  }
  break;
case 197:
#line 1845 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		yyVal = new Parameter ((FullNamedExpression) yyVals[-1+yyTop], lt.Value, (Parameter.Modifier) yyVals[-2+yyTop], (Attributes) yyVals[-3+yyTop], lt.Location);
	  }
  break;
case 198:
#line 1853 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
		report.Error (1552, lt.Location, "Array type specifier, [], must appear before parameter name");
		yyVal = new Parameter ((FullNamedExpression) yyVals[-3+yyTop], lt.Value, (Parameter.Modifier) yyVals[-4+yyTop], (Attributes) yyVals[-5+yyTop], lt.Location);
	  }
  break;
case 199:
#line 1862 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);	  
	  	Location l = GetLocation (yyVals[0+yyTop]);
		yyVal = new Parameter ((FullNamedExpression) yyVals[-1+yyTop], null, (Parameter.Modifier) yyVals[-2+yyTop], (Attributes) yyVals[-3+yyTop], l);
	  }
  break;
case 200:
#line 1872 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	++lexer.parsing_block;
	  }
  break;
case 201:
#line 1876 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	--lexer.parsing_block;
		if (lang_version <= LanguageVersion.V_3) {
			FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "optional parameter");
		}
		
		Parameter.Modifier mod = (Parameter.Modifier) yyVals[-5+yyTop];
		if (mod != Parameter.Modifier.NONE) {
			switch (mod) {
			case Parameter.Modifier.REF:
			case Parameter.Modifier.OUT:
				report.Error (1741, GetLocation (yyVals[-5+yyTop]), "Cannot specify a default value for the `{0}' parameter",
					Parameter.GetModifierSignature (mod));
				break;
				
			case Parameter.Modifier.This:
				report.Error (1743, GetLocation (yyVals[-5+yyTop]), "Cannot specify a default value for the `{0}' parameter",
					Parameter.GetModifierSignature (mod));
				break;
			default:
				throw new NotImplementedException (mod.ToString ());
			}
				
			mod = Parameter.Modifier.NONE;
		}
		
		if ((valid_param_mod & ParameterModifierType.DefaultValue) == 0)
			report.Error (1065, GetLocation (yyVals[-2+yyTop]), "Optional parameter is not valid in this context");
		
		var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
		yyVal = new Parameter ((FullNamedExpression) yyVals[-4+yyTop], lt.Value, mod, (Attributes) yyVals[-6+yyTop], lt.Location);
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
		
		if (yyVals[0+yyTop] != null)
			((Parameter) yyVal).DefaultValue = new DefaultParameterValueExpression ((Expression) yyVals[0+yyTop]);
	  }
  break;
case 202:
#line 1915 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Parameter.Modifier.NONE; }
  break;
case 204:
#line 1921 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 205:
#line 1925 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Parameter.Modifier p2 = (Parameter.Modifier)yyVals[0+yyTop];
  		Parameter.Modifier mod = (Parameter.Modifier)yyVals[-1+yyTop] | p2;
  		if (((Parameter.Modifier)yyVals[-1+yyTop] & p2) == p2) {
  			Error_DuplicateParameterModifier (lexer.Location, p2);
  		} else {
	  		switch (mod & ~Parameter.Modifier.This) {
  				case Parameter.Modifier.REF:
					report.Error (1101, lexer.Location, "The parameter modifiers `this' and `ref' cannot be used altogether");
  					break;
   				case Parameter.Modifier.OUT:
					report.Error (1102, lexer.Location, "The parameter modifiers `this' and `out' cannot be used altogether");
  					break;
  				default:
 					report.Error (1108, lexer.Location, "A parameter cannot have specified more than one modifier");
 					break;
 			}
  		}
  		yyVal = mod;
	  }
  break;
case 206:
#line 1949 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	if ((valid_param_mod & ParameterModifierType.Ref) == 0)
	  		Error_ParameterModifierNotValid ("ref", GetLocation (yyVals[0+yyTop]));
	  		
	  	yyVal = Parameter.Modifier.REF;
	  }
  break;
case 207:
#line 1956 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	if ((valid_param_mod & ParameterModifierType.Out) == 0)
	  		Error_ParameterModifierNotValid ("out", GetLocation (yyVals[0+yyTop]));
	  
	  	yyVal = Parameter.Modifier.OUT;
	  }
  break;
case 208:
#line 1963 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if ((valid_param_mod & ParameterModifierType.This) == 0)
	  		Error_ParameterModifierNotValid ("this", GetLocation (yyVals[0+yyTop]));

	  	if (lang_version <= LanguageVersion.ISO_2)
	  		FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "extension methods");
	  			
		yyVal = Parameter.Modifier.This;
	  }
  break;
case 209:
#line 1976 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		yyVal = new ParamsParameter ((FullNamedExpression) yyVals[-1+yyTop], lt.Value, (Attributes) yyVals[-3+yyTop], lt.Location);
	  }
  break;
case 210:
#line 1981 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (1751, GetLocation (yyVals[-4+yyTop]), "Cannot specify a default value for a parameter array");
		
		var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
		yyVal = new ParamsParameter ((FullNamedExpression) yyVals[-3+yyTop], lt.Value, (Attributes) yyVals[-5+yyTop], lt.Location);		
	  }
  break;
case 211:
#line 1988 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
		yyVal = null;
	  }
  break;
case 212:
#line 1996 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if ((valid_param_mod & ParameterModifierType.Params) == 0)
			report.Error (1670, (GetLocation (yyVals[0+yyTop])), "The `params' modifier is not allowed in current context");
	  }
  break;
case 213:
#line 2001 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Parameter.Modifier mod = (Parameter.Modifier)yyVals[0+yyTop];
		if ((mod & Parameter.Modifier.This) != 0) {
			report.Error (1104, GetLocation (yyVals[-1+yyTop]), "The parameter modifiers `this' and `params' cannot be used altogether");
		} else {
			report.Error (1611, GetLocation (yyVals[-1+yyTop]), "The params parameter cannot be declared as ref or out");
		}	  
	  }
  break;
case 214:
#line 2010 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS);
	  }
  break;
case 215:
#line 2017 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	if ((valid_param_mod & ParameterModifierType.Arglist) == 0)
	  		report.Error (1669, GetLocation (yyVals[0+yyTop]), "__arglist is not valid in this context");
	  }
  break;
case 216:
#line 2028 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support)
			tmpComment = Lexer.consume_doc_comment ();
	  }
  break;
case 217:
#line 2033 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var type = (FullNamedExpression) yyVals[-3+yyTop];
		current_property = new Property (current_class, type, (Modifiers) yyVals[-4+yyTop],
			(MemberName) yyVals[-2+yyTop], (Attributes) yyVals[-5+yyTop]);
			
		if (type.Type != null && type.Type.Kind == MemberKind.Void)
			report.Error (547, GetLocation (yyVals[-3+yyTop]), "`{0}': property or indexer cannot have void type", current_property.GetSignatureForError ());					
			
		current_container.AddProperty ((Property)current_property);
		lbag.AddMember (current_property, mod_locations, GetLocation (yyVals[0+yyTop]));
		
		lexer.PropertyParsing = true;
	  }
  break;
case 218:
#line 2047 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.PropertyParsing = false;
		
		if (doc_support)
			current_property.DocComment = ConsumeStoredComment ();				
	  }
  break;
case 219:
#line 2054 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lbag.AppendToMember (current_property, GetLocation (yyVals[0+yyTop]));
		current_property = null;
	  }
  break;
case 220:
#line 2064 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue;
	  }
  break;
case 221:
#line 2068 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		valid_param_mod = 0;
		var type = (FullNamedExpression) yyVals[-6+yyTop];
		Indexer indexer = new Indexer (current_class, type, (MemberName) yyVals[-5+yyTop], (Modifiers) yyVals[-7+yyTop], (ParametersCompiled) yyVals[-2+yyTop], (Attributes) yyVals[-8+yyTop]);
			
		current_property = indexer;

  		current_container.AddIndexer (indexer);
		lbag.AddMember (current_property, mod_locations, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
  		
		if (type.Type != null && type.Type.Kind == MemberKind.Void)
			report.Error (620, GetLocation (yyVals[-6+yyTop]), "`{0}': indexer return type cannot be `void'", indexer.GetSignatureForError ());  		

		if (indexer.ParameterInfo.IsEmpty) {
			report.Error (1551, GetLocation (yyVals[-4+yyTop]), "Indexers must have at least one parameter");
		}

		if (doc_support) {
			tmpComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}

		lexer.PropertyParsing = true;
	  }
  break;
case 222:
#line 2093 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.PropertyParsing = false;
	  }
  break;
case 223:
#line 2097 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null)
			((Indexer) current_property).ParameterInfo.CheckParameters (current_property);
	  
		if (doc_support)
			current_property.DocComment = ConsumeStoredComment ();
			
		lbag.AppendToMember (current_property, GetLocation (yyVals[-1+yyTop]));
		current_property = null;		
	  }
  break;
case 228:
#line 2116 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	if (yyToken == Token.CLOSE_BRACE) {
	  		report.Error (548, lexer.Location, "`{0}': property or indexer must have at least one accessor", current_property.GetSignatureForError ());
		} else {
			if (yyToken == Token.SEMICOLON)
				report.Error (1597, lexer.Location, "Semicolon after method or accessor block is not valid");
			else
				report.Error (1014, GetLocation (yyVals[0+yyTop]), "A get or set accessor expected");
		}
	  }
  break;
case 229:
#line 2130 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) {
			FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties");
		}
	  
		if (current_property.Get != null) {
			report.Error (1007, GetLocation (yyVals[0+yyTop]), "Property accessor already defined");
		}
		
		if (current_property is Indexer) {
			current_property.Get = new Indexer.GetIndexerMethod (current_property, (Modifiers) yyVals[-1+yyTop], ((Indexer)current_property).ParameterInfo.Clone (),
				(Attributes) yyVals[-2+yyTop], GetLocation (yyVals[0+yyTop]));
		} else {
			current_property.Get = new Property.GetMethod (current_property,
				(Modifiers) yyVals[-1+yyTop], (Attributes) yyVals[-2+yyTop], GetLocation (yyVals[0+yyTop]));
		}	
	  
		current_local_parameters = current_property.Get.ParameterInfo;	  
		lbag.AddMember (current_property.Get, mod_locations);
		lexer.PropertyParsing = false;
	  }
  break;
case 230:
#line 2152 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	if (yyVals[0+yyTop] != null) {
	  		current_property.Get.Block = (ToplevelBlock) yyVals[0+yyTop];			
	  	
			if (current_container.Kind == MemberKind.Interface) {
				report.Error (531, current_property.Get.Block.StartLocation,
					"`{0}': interface members cannot have a definition", current_property.Get.GetSignatureForError ());
			}		
		}
	  
		current_local_parameters = null;
		lexer.PropertyParsing = true;

		if (doc_support)
			if (Lexer.doc_state == XmlCommentState.Error)
				Lexer.doc_state = XmlCommentState.NotAllowed;
	  }
  break;
case 231:
#line 2173 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[-1+yyTop] != ModifierNone && lang_version == LanguageVersion.ISO_1) {
			FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "access modifiers on properties");
		}
		
		if (current_property.Set != null) {
			report.Error (1007, GetLocation (yyVals[0+yyTop]), "Property accessor already defined");
		}
	  
		if (current_property is Indexer) {
			current_property.Set = new Indexer.SetIndexerMethod (current_property, (Modifiers) yyVals[-1+yyTop],
				ParametersCompiled.MergeGenerated (compiler,
				((Indexer)current_property).ParameterInfo, true, new Parameter (
					current_property.TypeExpression, "value", Parameter.Modifier.NONE, null, GetLocation (yyVals[0+yyTop])),
					null),
				(Attributes) yyVals[-2+yyTop], GetLocation (yyVals[0+yyTop]));
		} else {
			current_property.Set = new Property.SetMethod (current_property, (Modifiers) yyVals[-1+yyTop], 
				ParametersCompiled.CreateImplicitParameter (current_property.TypeExpression, GetLocation (yyVals[0+yyTop])),
				(Attributes) yyVals[-2+yyTop], GetLocation (yyVals[0+yyTop]));
		}
		
		current_local_parameters = current_property.Set.ParameterInfo;	
		lbag.AddMember (current_property.Set, mod_locations);
		lexer.PropertyParsing = false;
	  }
  break;
case 232:
#line 2200 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[0+yyTop] != null) {		
			current_property.Set.Block = (ToplevelBlock) yyVals[0+yyTop];
		
			if (current_container.Kind == MemberKind.Interface) {
				report.Error (531, current_property.Set.Block.StartLocation,
					"`{0}': interface members cannot have a definition", current_property.Set.GetSignatureForError ());
			}
		}
		
		current_local_parameters = null;
		lexer.PropertyParsing = true;

		if (doc_support
			&& Lexer.doc_state == XmlCommentState.Error)
			Lexer.doc_state = XmlCommentState.NotAllowed;
	  }
  break;
case 234:
#line 2222 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		/* TODO: lbag*/
	  	yyVal = null;
	  }
  break;
case 235:
#line 2227 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	Error_SyntaxError (1043, yyToken, "Invalid accessor body");
	  	yyVal = null;
	  }
  break;
case 236:
#line 2238 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.ConstraintsParsing = true;
	  }
  break;
case 237:
#line 2242 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		MemberName name = MakeName ((MemberName) yyVals[0+yyTop]);
		push_current_class (new Interface (current_namespace, current_class, name, (Modifiers) yyVals[-4+yyTop], (Attributes) yyVals[-5+yyTop]), yyVals[-3+yyTop]);
		lbag.AddMember (current_class, mod_locations, GetLocation (yyVals[-2+yyTop]));		
	  }
  break;
case 238:
#line 2249 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.ConstraintsParsing = false;

		current_class.SetParameterInfo ((List<Constraints>) yyVals[0+yyTop]);

		if (doc_support) {
			current_container.DocComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}
		
		lexer.parsing_modifiers = true;
	  }
  break;
case 239:
#line 2262 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		--lexer.parsing_declaration;	  
		if (doc_support)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 240:
#line 2268 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	    lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]));
		yyVal = pop_current_class ();
	  }
  break;
case 241:
#line 2273 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);	  
	  }
  break;
case 244:
#line 2285 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.parsing_modifiers = true;
	  }
  break;
case 245:
#line 2289 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.parsing_modifiers = true;
	  }
  break;
case 246:
#line 2296 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants");
	  }
  break;
case 247:
#line 2300 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants");
	  }
  break;
case 252:
#line 2308 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators");
	  }
  break;
case 253:
#line 2312 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors");
	  }
  break;
case 254:
#line 2316 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations");
	  }
  break;
case 255:
#line 2323 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  }
  break;
case 256:
#line 2326 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		OperatorDeclaration decl = (OperatorDeclaration) yyVals[-2+yyTop];
		if (decl != null) {
			Operator op = new Operator (
				current_class, decl.optype, decl.ret_type, (Modifiers) yyVals[-3+yyTop], 
				current_local_parameters,
				(ToplevelBlock) yyVals[0+yyTop], (Attributes) yyVals[-4+yyTop], decl.location);
				
			if (op.Block == null)
				op.ParameterInfo.CheckParameters (op);

			if (doc_support) {
				op.DocComment = tmpComment;
				Lexer.doc_state = XmlCommentState.Allowed;
			}

			/* Note again, checking is done in semantic analysis*/
			current_container.AddOperator (op);

			lbag.AddMember (op, mod_locations, lbag.GetLocations (decl));
		}
		
		current_local_parameters = null;
	  }
  break;
case 258:
#line 2354 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = null; }
  break;
case 260:
#line 2360 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (590, GetLocation (yyVals[0+yyTop]), "User-defined operators cannot return void");
		yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 261:
#line 2368 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		valid_param_mod = ParameterModifierType.DefaultValue;
	  }
  break;
case 262:
#line 2372 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		valid_param_mod = 0;

		Location loc = GetLocation (yyVals[-5+yyTop]);
		Operator.OpType op = (Operator.OpType) yyVals[-4+yyTop];
		current_local_parameters = (ParametersCompiled)yyVals[-1+yyTop];
		
		int p_count = current_local_parameters.Count;
		if (p_count == 1) {
			if (op == Operator.OpType.Addition)
				op = Operator.OpType.UnaryPlus;
			else if (op == Operator.OpType.Subtraction)
				op = Operator.OpType.UnaryNegation;
		}
		
		if (IsUnaryOperator (op)) {
			if (p_count == 2) {
				report.Error (1020, loc, "Overloadable binary operator expected");
			} else if (p_count != 1) {
				report.Error (1535, loc, "Overloaded unary operator `{0}' takes one parameter",
					Operator.GetName (op));
			}
		} else {
			if (p_count > 2) {
				report.Error (1534, loc, "Overloaded binary operator `{0}' takes two parameters",
					Operator.GetName (op));
			} else if (p_count != 2) {
				report.Error (1019, loc, "Overloadable unary operator expected");
			}
		}
		
		if (doc_support) {
			tmpComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.NotAllowed;
		}

		yyVal = new OperatorDeclaration (op, (FullNamedExpression) yyVals[-6+yyTop], loc);
		lbag.AddLocation (yyVal, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 264:
#line 2416 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.LogicalNot; }
  break;
case 265:
#line 2417 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.OnesComplement; }
  break;
case 266:
#line 2418 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.Increment; }
  break;
case 267:
#line 2419 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.Decrement; }
  break;
case 268:
#line 2420 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.True; }
  break;
case 269:
#line 2421 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.False; }
  break;
case 270:
#line 2423 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.Addition; }
  break;
case 271:
#line 2424 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.Subtraction; }
  break;
case 272:
#line 2426 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.Multiply; }
  break;
case 273:
#line 2427 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {  yyVal = Operator.OpType.Division; }
  break;
case 274:
#line 2428 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.Modulus; }
  break;
case 275:
#line 2429 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.BitwiseAnd; }
  break;
case 276:
#line 2430 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.BitwiseOr; }
  break;
case 277:
#line 2431 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.ExclusiveOr; }
  break;
case 278:
#line 2432 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.LeftShift; }
  break;
case 279:
#line 2433 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.RightShift; }
  break;
case 280:
#line 2434 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.Equality; }
  break;
case 281:
#line 2435 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.Inequality; }
  break;
case 282:
#line 2436 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.GreaterThan; }
  break;
case 283:
#line 2437 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.LessThan; }
  break;
case 284:
#line 2438 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.GreaterThanOrEqual; }
  break;
case 285:
#line 2439 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = Operator.OpType.LessThanOrEqual; }
  break;
case 286:
#line 2444 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		valid_param_mod = ParameterModifierType.DefaultValue;
	  }
  break;
case 287:
#line 2448 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		valid_param_mod = 0;

		Location loc = GetLocation (yyVals[-5+yyTop]);
		current_local_parameters = (ParametersCompiled)yyVals[-1+yyTop];  
		  
		if (doc_support) {
			tmpComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.NotAllowed;
		}

		yyVal = new OperatorDeclaration (Operator.OpType.Implicit, (FullNamedExpression) yyVals[-4+yyTop], loc);
		lbag.AddLocation (yyVal, GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 288:
#line 2463 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		valid_param_mod = ParameterModifierType.DefaultValue;
	  }
  break;
case 289:
#line 2467 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		valid_param_mod = 0;
		
		Location loc = GetLocation (yyVals[-5+yyTop]);
		current_local_parameters = (ParametersCompiled)yyVals[-1+yyTop];  
		  
		if (doc_support) {
			tmpComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.NotAllowed;
		}

		yyVal = new OperatorDeclaration (Operator.OpType.Explicit, (FullNamedExpression) yyVals[-4+yyTop], loc);
		lbag.AddLocation (yyVal, GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 290:
#line 2482 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	Error_SyntaxError (yyToken);
		current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters;
		yyVal = new OperatorDeclaration (Operator.OpType.Implicit, null, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 291:
#line 2488 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	Error_SyntaxError (yyToken);
		current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters;
	  	yyVal = new OperatorDeclaration (Operator.OpType.Explicit, null, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 292:
#line 2498 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		Constructor c = (Constructor) yyVals[-1+yyTop];
		c.Block = (ToplevelBlock) yyVals[0+yyTop];
		
		if (doc_support)
			c.DocComment = ConsumeStoredComment ();

		current_container.AddConstructor (c);

		current_local_parameters = null;
		if (doc_support)
			Lexer.doc_state = XmlCommentState.Allowed;
        current_method = null;
	  }
  break;
case 293:
#line 2518 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support) {
			tmpComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}
		
		valid_param_mod = ParameterModifierType.All;
	  }
  break;
case 294:
#line 2527 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		valid_param_mod = 0;
		current_local_parameters = (ParametersCompiled) yyVals[-1+yyTop];  
		
		/**/
		/* start block here, so possible anonymous methods inside*/
		/* constructor initializer can get correct parent block*/
		/**/
	  	start_block (lexer.Location);
	  }
  break;
case 295:
#line 2538 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-6+yyTop];
		var mods = (Modifiers) yyVals[-7+yyTop];
		ConstructorInitializer ci = (ConstructorInitializer) yyVals[0+yyTop];

		Constructor c = new Constructor (current_class, lt.Value, mods,
			(Attributes) yyVals[-8+yyTop], current_local_parameters, ci, lt.Location);
		current_method = c;
		if (lt.Value != current_container.MemberName.Name) {
			report.Error (1520, c.Location, "Class, struct, or interface method must have a return type");
		} else if ((mods & Modifiers.STATIC) != 0) {
			if ((mods & Modifiers.AccessibilityMask) != 0){
				report.Error (515, c.Location,
					"`{0}': static constructor cannot have an access modifier",
					c.GetSignatureForError ());
			}
			if (ci != null) {
				report.Error (514, c.Location,
					"`{0}': static constructor cannot have an explicit `this' or `base' constructor call",
					c.GetSignatureForError ());
			
			}
		}
		
		lbag.AddMember (c, mod_locations, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]));
		yyVal = c; 
	  }
  break;
case 297:
#line 2569 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { current_block = null; yyVal = null; }
  break;
case 300:
#line 2579 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 301:
#line 2583 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	--lexer.parsing_block;
		yyVal = new ConstructorBaseInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 302:
#line 2589 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 303:
#line 2593 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	--lexer.parsing_block;
		yyVal = new ConstructorThisInitializer ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 304:
#line 2599 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
		yyVal = null;
	  }
  break;
case 305:
#line 2607 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support) {
			tmpComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.NotAllowed;
		}
		
		current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters;
	  }
  break;
case 306:
#line 2616 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
		if (lt.Value != current_container.MemberName.Name){
			report.Error (574, lt.Location, "Name of destructor must match name of class");
		} else if (current_container.Kind != MemberKind.Class){
			report.Error (575, lt.Location, "Only class types can contain destructor");
		}
		
		Destructor d = new Destructor (current_class, (Modifiers) yyVals[-6+yyTop],
			ParametersCompiled.EmptyReadOnlyParameters, (Attributes) yyVals[-7+yyTop], lt.Location);
		if (doc_support)
			d.DocComment = ConsumeStoredComment ();
		  
		d.Block = (ToplevelBlock) yyVals[0+yyTop];
		current_container.AddMethod (d);
		lbag.AddMember (d, mod_locations, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[-1+yyTop]));

		current_local_parameters = null;
	  }
  break;
case 307:
#line 2641 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_event_field = new EventField (current_class, (FullNamedExpression) yyVals[-1+yyTop], (Modifiers) yyVals[-3+yyTop], (MemberName) yyVals[0+yyTop], (Attributes) yyVals[-4+yyTop]);
		current_container.AddEvent (current_event_field);
		
		if (current_event_field.MemberName.Left != null) {
			report.Error (71, current_event_field.Location, "`{0}': An explicit interface implementation of an event must use property syntax",
			current_event_field.GetSignatureForError ());
		}
		
		yyVal = current_event_field;
	  }
  break;
case 308:
#line 2655 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support) {
			current_event_field.DocComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}
		
		lbag.AddMember (current_event_field, mod_locations, GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[0+yyTop]));
		current_event_field = null;
	  }
  break;
case 309:
#line 2668 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_event = new EventProperty (current_class, (FullNamedExpression) yyVals[-2+yyTop], (Modifiers) yyVals[-4+yyTop], (MemberName) yyVals[-1+yyTop], (Attributes) yyVals[-5+yyTop]);
		current_container.AddEvent (current_event);
		lbag.AddMember (current_event, mod_locations, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop]));
		
		lexer.EventParsing = true;
	  }
  break;
case 310:
#line 2676 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (current_container.Kind == MemberKind.Interface)
			report.Error (69, GetLocation (yyVals[-2+yyTop]), "Event in interface cannot have add or remove accessors");
	  
		lexer.EventParsing = false;
	  }
  break;
case 311:
#line 2683 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support) {
			current_event.DocComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}
		
		lbag.AppendToMember (current_event, GetLocation (yyVals[-1+yyTop]));
	  	current_event = null;	
		current_local_parameters = null;
	  }
  break;
case 313:
#line 2698 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	++lexer.parsing_block;
	  }
  break;
case 314:
#line 2702 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	--lexer.parsing_block;
		current_event_field.Initializer = (Expression) yyVals[0+yyTop];
	  }
  break;
case 317:
#line 2715 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 318:
#line 2719 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 319:
#line 2726 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
	  	yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), null);
	  	lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 320:
#line 2732 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 321:
#line 2736 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		--lexer.parsing_block;
		var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];	  
	  	yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (Expression) yyVals[0+yyTop]);
	  	lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 322:
#line 2745 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (current_container.Kind == MemberKind.Interface) {
			report.Error (68, lexer.Location, "`{0}': event in interface cannot have an initializer",
				current_event_field.GetSignatureForError ());
		}
		
	  	if ((current_event_field.ModFlags & Modifiers.ABSTRACT) != 0) {
			report.Error (74, lexer.Location, "`{0}': abstract event cannot have an initializer",
				current_event_field.GetSignatureForError ());
	  	}		
	  }
  break;
case 323:
#line 2757 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 326:
#line 2766 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors",
			current_event.GetSignatureForError ());
	  }
  break;
case 327:
#line 2771 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (65, lexer.Location, "`{0}': event property must have both add and remove accessors",
			current_event.GetSignatureForError ());
	  }
  break;
case 328:
#line 2776 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		report.Error (1055, GetLocation (yyVals[0+yyTop]), "An add or remove accessor expected");
		yyVal = null;
	  }
  break;
case 329:
#line 2784 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	if (yyVals[-1+yyTop] != ModifierNone) {
			report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations");
	  	}
	  	
	  	current_event.Add = new EventProperty.AddDelegateMethod (current_event, (Attributes) yyVals[-2+yyTop], GetLocation (yyVals[0+yyTop]));
		current_local_parameters = current_event.Add.ParameterInfo;
		
		lbag.AddMember (current_event.Add, mod_locations);
		lexer.EventParsing = false;		
	  }
  break;
case 330:
#line 2796 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.EventParsing = true;
	  
	  	current_event.Add.Block = (ToplevelBlock) yyVals[0+yyTop];
		
		if (current_container.Kind == MemberKind.Interface) {
			report.Error (531, current_event.Add.Block.StartLocation,
				"`{0}': interface members cannot have a definition", current_event.Add.GetSignatureForError ());
		}
		
		current_local_parameters = null;
	  }
  break;
case 331:
#line 2812 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	if (yyVals[-1+yyTop] != ModifierNone) {
			report.Error (1609, GetLocation (yyVals[-1+yyTop]), "Modifiers cannot be placed on event accessor declarations");
	  	}
	  	
	  	current_event.Remove = new EventProperty.RemoveDelegateMethod (current_event, (Attributes) yyVals[-2+yyTop], GetLocation (yyVals[0+yyTop]));
		current_local_parameters = current_event.Remove.ParameterInfo;

		lbag.AddMember (current_event.Remove, mod_locations);
		lexer.EventParsing = false;		
	  }
  break;
case 332:
#line 2824 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.EventParsing = true;
	  
	  	current_event.Remove.Block = (ToplevelBlock) yyVals[0+yyTop];
		
		if (current_container.Kind == MemberKind.Interface) {
			report.Error (531, current_event.Remove.Block.StartLocation,
				"`{0}': interface members cannot have a definition", current_event.Remove.GetSignatureForError ());
		}
		
		current_local_parameters = null;
	  }
  break;
case 333:
#line 2840 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (73, lexer.Location, "An add or remove accessor must have a body");
		yyVal = null;
	  }
  break;
case 335:
#line 2852 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support)
			enumTypeComment = Lexer.consume_doc_comment ();
	  }
  break;
case 336:
#line 2857 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support)
			Lexer.doc_state = XmlCommentState.Allowed;

		MemberName name = (MemberName) yyVals[-3+yyTop];
		if (name.IsGeneric) {
			report.Error (1675, name.Location, "Enums cannot have type parameters");
		}
		
		push_current_class (new Enum (current_namespace, current_class, (TypeExpression) yyVals[-2+yyTop], (Modifiers) yyVals[-5+yyTop], MakeName (name), (Attributes) yyVals[-6+yyTop]), null);
	  }
  break;
case 337:
#line 2869 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	/* here will be evaluated after CLOSE_BLACE is consumed.*/
		if (doc_support)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 338:
#line 2875 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support)
			current_class.DocComment = enumTypeComment;
			
		--lexer.parsing_declaration;

/*			if (doc_support)*/
/*				em.DocComment = ev.DocComment;*/

		lbag.AddMember (current_class, mod_locations, GetLocation (yyVals[-9+yyTop]), GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-1+yyTop]));
		yyVal = pop_current_class ();
	  }
  break;
case 340:
#line 2892 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	 	var te = yyVals[0+yyTop] as TypeExpression;
		if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) {
			Enum.Error_1008 (GetLocation (yyVals[0+yyTop]), report);
			yyVal = null;
		} else {
			yyVal = yyVals[0+yyTop];
		}
	 }
  break;
case 341:
#line 2902 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	 	Error_TypeExpected (GetLocation (yyVals[-1+yyTop]));
		yyVal = null;
	 }
  break;
case 344:
#line 2912 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	lbag.AddLocation (yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 346:
#line 2920 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	lbag.AddLocation (yyVals[-2+yyTop], GetLocation (yyVals[-1+yyTop]));
	  	yyVal = yyVals[0+yyTop];
	  }
  break;
case 347:
#line 2928 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
	  	var em = new EnumMember ((Enum) current_class, new MemberName (lt.Value, lt.Location), (Attributes) yyVals[-1+yyTop]);
	  	((Enum) current_class).AddEnumMember (em);

		if (doc_support) {
			em.DocComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}

		yyVal = em;
	  }
  break;
case 348:
#line 2941 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	++lexer.parsing_block;
		if (doc_support) {
			tmpComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.NotAllowed;
		}
	  }
  break;
case 349:
#line 2949 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		--lexer.parsing_block;
		
		var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
	  	var em = new EnumMember ((Enum) current_class, new MemberName (lt.Value, lt.Location), (Attributes) yyVals[-4+yyTop]);
	  	em.Initializer = new ConstInitializer (em, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  	((Enum) current_class).AddEnumMember (em);
		
		if (doc_support)
			em.DocComment = ConsumeStoredComment ();

		yyVal = em;
	  }
  break;
case 350:
#line 2970 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue;
	  }
  break;
case 351:
#line 2974 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		valid_param_mod = 0;

		MemberName name = MakeName ((MemberName) yyVals[-4+yyTop]);
		ParametersCompiled p = (ParametersCompiled) yyVals[-1+yyTop];

		Delegate del = new Delegate (current_namespace, current_class, (FullNamedExpression) yyVals[-5+yyTop],
					     (Modifiers) yyVals[-7+yyTop], name, p, (Attributes) yyVals[-8+yyTop]);

		p.CheckParameters (del);

		current_container.AddDelegate (del);
		current_delegate = del;
		lexer.ConstraintsParsing = true;
	  }
  break;
case 352:
#line 2990 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.ConstraintsParsing = false;
	  }
  break;
case 353:
#line 2994 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support) {
			current_delegate.DocComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}
	  
		current_delegate.SetParameterInfo ((List<Constraints>) yyVals[-2+yyTop]);
		lbag.AddMember (current_delegate, mod_locations, GetLocation (yyVals[-10+yyTop]), GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[0+yyTop]));

		yyVal = current_delegate;

		current_delegate = null;
	  }
  break;
case 355:
#line 3012 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (lang_version < LanguageVersion.ISO_2)
			FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "nullable types");
	  
	  	yyVal = ComposedTypeSpecifier.CreateNullable (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 357:
#line 3023 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
		var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		
		yyVal = new MemberName (lt1.Value, lt2.Value, (TypeArguments) yyVals[0+yyTop], lt1.Location);
	  }
  break;
case 359:
#line 3034 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		yyVal = new MemberName ((MemberName) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location);
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));		
	  }
  break;
case 360:
#line 3043 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location);	  
	  }
  break;
case 362:
#line 3055 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (lang_version < LanguageVersion.ISO_2)
			FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics");	  
	  
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 363:
#line 3062 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_TypeExpected (lexer.Location);
		yyVal = new TypeArguments ();
	  }
  break;
case 364:
#line 3070 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		TypeArguments type_args = new TypeArguments ();
		type_args.Add ((FullNamedExpression) yyVals[0+yyTop]);
		yyVal = type_args;
	  }
  break;
case 365:
#line 3076 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop];
		type_args.Add ((FullNamedExpression) yyVals[0+yyTop]);
		yyVal = type_args;
	  }
  break;
case 366:
#line 3088 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.parsing_generic_declaration = true;
	  }
  break;
case 367:
#line 3092 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.parsing_generic_declaration = false;
		var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
		yyVal = new MemberName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location);
	  }
  break;
case 368:
#line 3101 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	MemberName mn = (MemberName)yyVals[0+yyTop];
	  	if (mn.TypeArguments != null)
	  		syntax_error (mn.Location, string.Format ("Member `{0}' cannot declare type arguments",
	  			mn.GetSignatureForError ()));
	  }
  break;
case 370:
#line 3112 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.parsing_generic_declaration = false;	  
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location);
	  }
  break;
case 371:
#line 3121 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.parsing_generic_declaration = false;	  
		yyVal = new MemberName (TypeContainer.DefaultIndexerName, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 372:
#line 3126 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.parsing_generic_declaration = false;
		yyVal = new MemberName ((MemberName) yyVals[-1+yyTop], TypeContainer.DefaultIndexerName, null, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 373:
#line 3134 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
		yyVal = new MemberName (lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location);
		lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 374:
#line 3140 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt1 = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
		var lt2 = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
		
		yyVal = new MemberName (lt1.Value, lt2.Value, (TypeArguments) yyVals[-1+yyTop], lt1.Location);
		lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 375:
#line 3148 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
		yyVal = new MemberName ((MemberName) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[-1+yyTop], lt.Location);
		lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 377:
#line 3158 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (lang_version < LanguageVersion.ISO_2)
			FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "generics");
	  
		yyVal = yyVals[-1+yyTop];
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 378:
#line 3169 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		TypeArguments type_args = new TypeArguments ();
		type_args.Add ((FullNamedExpression)yyVals[0+yyTop]);
		yyVal = type_args;
	  }
  break;
case 379:
#line 3175 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		TypeArguments type_args = (TypeArguments) yyVals[-2+yyTop];
		type_args.Add ((FullNamedExpression)yyVals[0+yyTop]);
		yyVal = type_args;
		lbag.AddLocation (yyVals[0+yyTop], GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 380:
#line 3185 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop];
		yyVal = new TypeParameterName (lt.Value, (Attributes)yyVals[-2+yyTop], (Variance) yyVals[-1+yyTop], lt.Location);
  	  }
  break;
case 381:
#line 3190 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
  	  	if (GetTokenName (yyToken) == "type")
			report.Error (81, GetLocation (yyVals[0+yyTop]), "Type parameter declaration must be an identifier not a type");
		else
			Error_SyntaxError (yyToken);
			
  	  	yyVal = new TypeParameterName ("", null, lexer.Location);
  	  }
  break;
case 383:
#line 3206 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 384:
#line 3213 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.parsing_generic_declaration = true;
	  }
  break;
case 386:
#line 3224 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report);
		yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 388:
#line 3233 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report);
		yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 390:
#line 3242 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	report.Error (1536, GetLocation (yyVals[0+yyTop]), "Invalid parameter type `void'");
		yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 392:
#line 3251 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 393:
#line 3258 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		MemberName name = (MemberName) yyVals[-1+yyTop];

		if (yyVals[0+yyTop] != null) {
			yyVal = new ComposedCast (name.GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]);
		} else {
			if (name.Left == null && name.Name == "var")
				yyVal = new VarExpr (name.Location);
			else
				yyVal = name.GetTypeExpression ();
		}
	  }
  break;
case 394:
#line 3271 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new ComposedCast (((MemberName) yyVals[-1+yyTop]).GetTypeExpression (), (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 395:
#line 3275 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[0+yyTop] != null)
			yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 396:
#line 3280 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 397:
#line 3284 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 398:
#line 3291 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var types = new List<FullNamedExpression> (2);
		types.Add ((FullNamedExpression) yyVals[0+yyTop]);
		yyVal = types;
	  }
  break;
case 399:
#line 3297 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var types = (List<FullNamedExpression>) yyVals[-2+yyTop];
		types.Add ((FullNamedExpression) yyVals[0+yyTop]);
		yyVal = types;
	  }
  break;
case 400:
#line 3306 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[0+yyTop] is ComposedCast) {
			report.Error (1521, GetLocation (yyVals[0+yyTop]), "Invalid base type `{0}'", ((ComposedCast)yyVals[0+yyTop]).GetSignatureForError ());
		}
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 401:
#line 3313 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	Error_TypeExpected (lexer.Location);
		yyVal = null;
	  }
  break;
case 402:
#line 3324 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); }
  break;
case 403:
#line 3325 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); }
  break;
case 404:
#line 3326 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); }
  break;
case 405:
#line 3327 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); }
  break;
case 406:
#line 3328 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); }
  break;
case 407:
#line 3329 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); }
  break;
case 409:
#line 3334 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); }
  break;
case 410:
#line 3335 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); }
  break;
case 411:
#line 3336 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); }
  break;
case 412:
#line 3337 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); }
  break;
case 413:
#line 3338 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); }
  break;
case 414:
#line 3339 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); }
  break;
case 415:
#line 3340 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); }
  break;
case 416:
#line 3341 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); }
  break;
case 417:
#line 3342 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); }
  break;
case 418:
#line 3352 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	   checkForInteraction((Expression)yyVals[0+yyTop]);
	}
  break;
case 439:
#line 3382 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		yyVal = new SimpleName (lt.Value, (TypeArguments)yyVals[0+yyTop], lt.Location);	  
	  }
  break;
case 440:
#line 3386 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
	       yyVal = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location);
	  }
  break;
case 444:
#line 3396 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); }
  break;
case 445:
#line 3400 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); }
  break;
case 446:
#line 3401 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); }
  break;
case 451:
#line 3427 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]);
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 452:
#line 3432 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]);
	  }
  break;
case 453:
#line 3439 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location);
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 454:
#line 3445 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location);
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 455:
#line 3451 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		yyVal = new MemberAccess (new BaseThis (GetLocation (yyVals[-3+yyTop])), lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location);
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 456:
#line 3457 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
		var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop];

		yyVal = new QualifiedAliasMember (lt1.Value, lt2.Value, (TypeArguments) yyVals[0+yyTop], lt1.Location);
	  }
  break;
case 457:
#line 3463 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 458:
#line 3466 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location);
	  }
  break;
case 459:
#line 3471 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location);
	  }
  break;
case 460:
#line 3474 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		yyVal = new CompletionMemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, lt.Location);
 	  }
  break;
case 461:
#line 3482 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		 isInteractionArgumentList = isInteraction;
	  }
  break;
case 462:
#line 3486 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	    isInteractionArgumentList = false;
	  }
  break;
case 463:
#line 3490 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
	    var instance = (Expression) yyVals[-5+yyTop]; 
	    var arguments =  (Arguments) yyVals[-2+yyTop]; 
	
	    yyVal = new Invocation (instance,arguments);
	    lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 464:
#line 3500 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = null; }
  break;
case 466:
#line 3506 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	if (yyVals[-1+yyTop] == null) {
	  		yyVal = CollectionOrObjectInitializers.Empty;
	  		/* TODO: lbag*/
	  	} else {
	  		yyVal = new CollectionOrObjectInitializers ((List<Expression>) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
	  		lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  	}
	  }
  break;
case 467:
#line 3516 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	yyVal = new CollectionOrObjectInitializers ((List<Expression>) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop]));
	  	lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 468:
#line 3523 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = null; }
  break;
case 469:
#line 3525 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	}
  break;
case 470:
#line 3532 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	var a = new List<Expression> ();
	  	a.Add ((Expression) yyVals[0+yyTop]);
	  	yyVal = a;
	  }
  break;
case 471:
#line 3538 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	var a = (List<Expression>)yyVals[-2+yyTop];
	  	a.Add ((Expression) yyVals[0+yyTop]);
	  	yyVal = a;
	  }
  break;
case 472:
#line 3543 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	Error_SyntaxError (yyToken);
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 473:
#line 3551 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
	  	yyVal = new ElementInitializer (lt.Value, (Expression)yyVals[0+yyTop], lt.Location);
	  	lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 474:
#line 3557 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 475:
#line 3560 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		CompletionSimpleName csn = yyVals[-1+yyTop] as CompletionSimpleName;
		if (csn == null)
			yyVal = new CollectionElementInitializer ((Expression)yyVals[-1+yyTop]);
		else
			yyVal = new CompletionElementInitializer (csn.Prefix, csn.Location);
	  }
  break;
case 476:
#line 3568 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[-1+yyTop] == null)
			yyVal = null;
		else
	  		yyVal = new CollectionElementInitializer ((List<Expression>)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 477:
#line 3575 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	report.Error (1920, GetLocation (yyVals[-1+yyTop]), "An element initializer cannot be empty");
		yyVal = null;
	  }
  break;
case 480:
#line 3587 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = null; }
  break;
case 482:
#line 3593 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		Arguments list = new Arguments (4);
		list.Add ((Argument) yyVals[0+yyTop]);
		yyVal = list;
	  }
  break;
case 483:
#line 3599 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Arguments list = (Arguments) yyVals[-2+yyTop];
		if (list [list.Count - 1] is NamedArgument)
			Error_NamedArgumentExpected ((NamedArgument) list [list.Count - 1]);
		
		list.Add ((Argument) yyVals[0+yyTop]);
		yyVal = list;
	  }
  break;
case 484:
#line 3608 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Arguments list = (Arguments) yyVals[-2+yyTop];
		NamedArgument a = (NamedArgument) yyVals[0+yyTop];
		for (int i = 0; i < list.Count; ++i) {
			NamedArgument na = list [i] as NamedArgument;
			if (na != null && na.Name == a.Name)
				report.Error (1740, na.Location, "Named argument `{0}' specified multiple times",
					na.Name);
		}
		
		list.Add (a);
		yyVal = list;
	  }
  break;
case 485:
#line 3622 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	report.Error (839, GetLocation (yyVals[0+yyTop]), "An argument is missing");
	  	yyVal = yyVals[-1+yyTop];
	  }
  break;
case 486:
#line 3627 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	report.Error (839, GetLocation (yyVals[-1+yyTop]), "An argument is missing");
	  	yyVal = null;
	  }
  break;
case 487:
#line 3635 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Argument ((Expression) yyVals[0+yyTop]);
	  }
  break;
case 491:
#line 3648 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Ref);
		lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 492:
#line 3653 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		yyVal = new Argument ((Expression) yyVals[0+yyTop], Argument.AType.Out);
		lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 493:
#line 3658 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Argument (new Arglist ((Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop])));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 494:
#line 3663 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Argument (new Arglist (GetLocation (yyVals[-2+yyTop])));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 496:
#line 3675 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new ElementAccess ((Expression) yyVals[-3+yyTop], (Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 497:
#line 3683 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var list = new List<Expression> (4);
		list.Add ((Expression) yyVals[0+yyTop]);
		yyVal = list;
	  }
  break;
case 498:
#line 3689 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var list = (List<Expression>) yyVals[-2+yyTop];
		list.Add ((Expression) yyVals[0+yyTop]);
		yyVal = list;
	  }
  break;
case 499:
#line 3694 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	Error_SyntaxError (yyToken);
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 500:
#line 3702 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Arguments args = new Arguments (4);
		args.Add ((Argument) yyVals[0+yyTop]);
		yyVal = args;
	  }
  break;
case 501:
#line 3708 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Arguments args = (Arguments) yyVals[-2+yyTop];
		if (args [args.Count - 1] is NamedArgument && !(yyVals[0+yyTop] is NamedArgument))
			Error_NamedArgumentExpected ((NamedArgument) args [args.Count - 1]);
	  
		args.Add ((Argument) yyVals[0+yyTop]);
		yyVal = args;	  
	  }
  break;
case 502:
#line 3720 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	yyVal = new Argument ((Expression) yyVals[0+yyTop]);
	  }
  break;
case 504:
#line 3728 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	    if(isRoleMethod) {
		    report.Error (10077, lexer.Location,
			"Can't use this explicitly in role methods. Use self or role name to refer to the role");
		}
		yyVal = new This (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 505:
#line 3739 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	yyVal = new ElementAccess (new BaseThis (GetLocation (yyVals[-3+yyTop])), (Arguments) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 506:
#line 3744 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	Error_SyntaxError (yyToken);
		yyVal = new ElementAccess (null, null, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 507:
#line 3752 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 508:
#line 3759 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 509:
#line 3766 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[0+yyTop] != null) {
			if (lang_version <= LanguageVersion.ISO_2)
				FeatureIsNotAvailable (GetLocation (yyVals[-5+yyTop]), "object initializers");
				
			yyVal = new NewInitialize ((FullNamedExpression) yyVals[-4+yyTop], (Arguments) yyVals[-2+yyTop], (CollectionOrObjectInitializers) yyVals[0+yyTop], GetLocation (yyVals[-5+yyTop]));
		} else {
			yyVal = new New ((FullNamedExpression) yyVals[-4+yyTop], (Arguments) yyVals[-2+yyTop], GetLocation (yyVals[-5+yyTop]));
		}
		
		lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 510:
#line 3779 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (lang_version <= LanguageVersion.ISO_2)
			FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "collection initializers");
	  
		yyVal = new NewInitialize ((FullNamedExpression) yyVals[-1+yyTop], null, (CollectionOrObjectInitializers) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 511:
#line 3791 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-5+yyTop], (List<Expression>) yyVals[-3+yyTop],
				new ComposedTypeSpecifier (((List<Expression>) yyVals[-3+yyTop]).Count, GetLocation (yyVals[-4+yyTop])) {
	  				Next = (ComposedTypeSpecifier) yyVals[-1+yyTop]
			  	}, (ArrayInitializer) yyVals[0+yyTop], GetLocation (yyVals[-6+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 512:
#line 3799 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	if (yyVals[0+yyTop] == null)
	  		report.Error (1586, GetLocation (yyVals[-3+yyTop]), "Array creation must have array size or array initializer");

		yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-2+yyTop], (ComposedTypeSpecifier) yyVals[-1+yyTop], (ArrayInitializer) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop]));
	  }
  break;
case 513:
#line 3806 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (lang_version <= LanguageVersion.ISO_2)
			FeatureIsNotAvailable (GetLocation (yyVals[-2+yyTop]), "implicitly typed arrays");
	  
		yyVal = new ImplicitlyTypedArrayCreation ((ComposedTypeSpecifier) yyVals[-1+yyTop], (ArrayInitializer) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 514:
#line 3813 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (178, GetLocation (yyVals[-1+yyTop]), "Invalid rank specifier, expecting `,' or `]'");
		yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-5+yyTop], null, GetLocation (yyVals[-6+yyTop]));
	  }
  break;
case 515:
#line 3818 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (1526, yyToken, "Unexpected symbol");
		yyVal = new ArrayCreation ((FullNamedExpression) yyVals[-1+yyTop], null, GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 516:
#line 3825 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		++lexer.parsing_type;
	  }
  break;
case 517:
#line 3829 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		--lexer.parsing_type;
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 518:
#line 3837 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (lang_version <= LanguageVersion.ISO_2)
	  		FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "anonymous types");

		yyVal = new NewAnonymousType ((List<AnonymousTypeParameter>) yyVals[-1+yyTop], current_container, GetLocation (yyVals[-3+yyTop]));
		
		/* TODO: lbag comma location*/
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 521:
#line 3854 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = null; }
  break;
case 523:
#line 3860 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	var a = new List<AnonymousTypeParameter> (4);
	  	a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]);
	  	yyVal = a;
	  }
  break;
case 524:
#line 3866 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	var a = (List<AnonymousTypeParameter>) yyVals[-2+yyTop];
	  	a.Add ((AnonymousTypeParameter) yyVals[0+yyTop]);
	  	yyVal = a;
	  }
  break;
case 525:
#line 3875 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken)yyVals[-2+yyTop];
	  	yyVal = new AnonymousTypeParameter ((Expression)yyVals[0+yyTop], lt.Value, lt.Location);
	  	lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 526:
#line 3881 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken)yyVals[0+yyTop];
	  	yyVal = new AnonymousTypeParameter (new SimpleName (lt.Value, lt.Location),
	  		lt.Value, lt.Location);
	  }
  break;
case 527:
#line 3887 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	MemberAccess ma = (MemberAccess) yyVals[0+yyTop];
	  	yyVal = new AnonymousTypeParameter (ma, ma.Name, ma.Location);
	  }
  break;
case 528:
#line 3892 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (746, lexer.Location,
			"Invalid anonymous type member declarator. Anonymous type members must be a member assignment, simple name or member access expression");
		yyVal = null;
	  }
  break;
case 532:
#line 3907 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop];
	  	yyVal = yyVals[-1+yyTop];
	  }
  break;
case 533:
#line 3915 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = ComposedTypeSpecifier.CreateArrayDimension (1, GetLocation (yyVals[-1+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 534:
#line 3920 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = ComposedTypeSpecifier.CreateArrayDimension ((int)yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 535:
#line 3928 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = 2;
	  }
  break;
case 536:
#line 3932 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = ((int) yyVals[-1+yyTop]) + 1;
	  }
  break;
case 537:
#line 3939 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = null;
	  }
  break;
case 538:
#line 3943 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 539:
#line 3950 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var ai = new ArrayInitializer (0, GetLocation (yyVals[-1+yyTop]));
		ai.VariableDeclaration = current_variable;
		lbag.AddLocation (ai, GetLocation (yyVals[0+yyTop]));
		yyVal = ai;
	  }
  break;
case 540:
#line 3957 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var ai = new ArrayInitializer ((List<Expression>) yyVals[-2+yyTop], GetLocation (yyVals[-3+yyTop]));
		ai.VariableDeclaration = current_variable;
		if (yyVals[-1+yyTop] != null) {
			lbag.AddLocation (ai, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
		} else {
			lbag.AddLocation (ai, GetLocation (yyVals[0+yyTop]));
		}
		yyVal = ai;
	  }
  break;
case 541:
#line 3971 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var list = new List<Expression> (4);
		list.Add ((Expression) yyVals[0+yyTop]);
		yyVal = list;
	  }
  break;
case 542:
#line 3977 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var list = (List<Expression>) yyVals[-2+yyTop];
		list.Add ((Expression) yyVals[0+yyTop]);
		yyVal = list;
	  }
  break;
case 543:
#line 3986 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	lexer.TypeOfParsing = true;
	  }
  break;
case 544:
#line 3990 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	lexer.TypeOfParsing = false;
		yyVal = new TypeOf ((FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 547:
#line 4001 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	 	Error_TypeExpected (lexer.Location);
	 	yyVal = null;
	 }
  break;
case 548:
#line 4009 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {  
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];

		yyVal = new SimpleName (lt.Value, (int) yyVals[0+yyTop], lt.Location);
	  }
  break;
case 549:
#line 4015 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt1 = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
		var lt2 = (Tokenizer.LocatedToken) yyVals[-1+yyTop];

		yyVal = new QualifiedAliasMember (lt1.Value, lt2.Value, (int) yyVals[0+yyTop], lt1.Location);
	  }
  break;
case 550:
#line 4022 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		
		yyVal = new MemberAccess ((Expression) yyVals[-2+yyTop], lt.Value, lt.Location);		
	  }
  break;
case 551:
#line 4028 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		
		yyVal = new MemberAccess ((Expression) yyVals[-3+yyTop], lt.Value, (int) yyVals[0+yyTop], lt.Location);		
	  }
  break;
case 552:
#line 4034 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var te = ((MemberName) yyVals[-3+yyTop]).GetTypeExpression ();
		if (te.HasTypeArguments)
			Error_TypeExpected (GetLocation (yyVals[0+yyTop]));

		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		yyVal = new MemberAccess (te, lt.Value, (int) yyVals[0+yyTop], lt.Location);		
	  }
  break;
case 553:
#line 4046 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (lang_version < LanguageVersion.ISO_2)
			FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "generics");

		yyVal = yyVals[0+yyTop];
	  }
  break;
case 554:
#line 4056 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		if (lang_version == LanguageVersion.ISO_1)
			FeatureIsNotAvailable (lt.Location, "namespace alias qualifier");

		yyVal = lt;		
	  }
  break;
case 555:
#line 4067 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		yyVal = new SizeOf ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 556:
#line 4075 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new CheckedExpr ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 557:
#line 4083 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new UnCheckedExpr ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 558:
#line 4091 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		yyVal = new MemberAccess (new Indirection ((Expression) yyVals[-3+yyTop], GetLocation (yyVals[-2+yyTop])), lt.Value, (TypeArguments) yyVals[0+yyTop], lt.Location);
	  }
  break;
case 559:
#line 4099 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 560:
#line 4103 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]);
	  }
  break;
case 561:
#line 4107 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 562:
#line 4111 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]);
	  }
  break;
case 563:
#line 4118 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = ParametersCompiled.Undefined;
	  }
  break;
case 565:
#line 4126 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out;
	  }
  break;
case 566:
#line 4130 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		valid_param_mod = 0;
	  	yyVal = yyVals[-1+yyTop];
	  }
  break;
case 567:
#line 4138 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (lang_version < LanguageVersion.ISO_2)
			FeatureIsNotAvailable (GetLocation (yyVals[-3+yyTop]), "default value expression");

		yyVal = new DefaultValueExpression ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 569:
#line 4150 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 570:
#line 4154 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 571:
#line 4158 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Cast ((FullNamedExpression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 572:
#line 4163 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (!async_block) {
			report.Error (1992, GetLocation (yyVals[-1+yyTop]),
				"The `await' operator can only be used when its containing method or lambda expression is marked with the `async' modifier");
		} else {
			current_block.ParametersBlock.IsAsync = true;
		}
		
		yyVal = new Await ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 574:
#line 4182 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
	  	yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 575:
#line 4186 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 576:
#line 4190 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 577:
#line 4194 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 578:
#line 4198 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 579:
#line 4202 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 581:
#line 4210 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.Multiply, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 582:
#line 4215 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.Division, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 583:
#line 4220 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.Modulus, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 585:
#line 4229 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.Addition, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 586:
#line 4234 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 587:
#line 4238 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	/* Shift/Reduce conflict*/
		yyVal = new Binary (Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
  	  }
  break;
case 588:
#line 4243 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 589:
#line 4247 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 591:
#line 4255 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.LeftShift, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 592:
#line 4260 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.RightShift, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 594:
#line 4269 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.LessThan, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 595:
#line 4274 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.GreaterThan, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 596:
#line 4279 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.LessThanOrEqual, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 597:
#line 4284 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.GreaterThanOrEqual, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 599:
#line 4293 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.Equality, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 600:
#line 4298 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.Inequality, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 602:
#line 4307 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.BitwiseAnd, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 604:
#line 4316 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.ExclusiveOr, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 606:
#line 4325 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.BitwiseOr, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 608:
#line 4334 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.LogicalAnd, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 610:
#line 4343 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Binary (Binary.Operator.LogicalOr, 
			         (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 612:
#line 4352 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (lang_version < LanguageVersion.ISO_2)
			FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "null coalescing operator");
			
		yyVal = new Nullable.NullCoalescingOperator ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 614:
#line 4363 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Conditional (new BooleanExpression ((Expression) yyVals[-4+yyTop]), (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 615:
#line 4371 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
        var potentialRolePlayer  = yyVals[0+yyTop] as Expression;
	    var memberExpression = yyVals[-2+yyTop] as MemberAccess;
	    var simpleNameForRole = memberExpression != null ? memberExpression.LeftExpression as SimpleName : yyVals[-2+yyTop] as SimpleName;
	    if(simpleNameForRole != null){
	      var role = FindField(simpleNameForRole.Name, GetLocation(yyVals[-2+yyTop]));
          var isRole = role != null && role.IsRole;
	      if(current_method as Constructor != null){
             /*might be assigning to a role*/
	         yyVal = new RoleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	      } else if(isRole) {
	        report.Error (10000, GetLocation(potentialRolePlayer), "Roles can only be assigned to players in constructor");
	      } else{
             yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
          }
	    } else   {  
	       yyVal = new SimpleAssign ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	    }
	  }
  break;
case 616:
#line 4391 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.Multiply, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 617:
#line 4396 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.Division, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 618:
#line 4401 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.Modulus, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 619:
#line 4406 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.Addition, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 620:
#line 4411 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.Subtraction, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 621:
#line 4416 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.LeftShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 622:
#line 4421 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.RightShift, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 623:
#line 4426 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.BitwiseAnd, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 624:
#line 4431 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.BitwiseOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 625:
#line 4436 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new CompoundAssign (
			Binary.Operator.ExclusiveOr, (Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 626:
#line 4444 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var pars = new List<Parameter> (4);
		pars.Add ((Parameter) yyVals[0+yyTop]);

		yyVal = pars;
	  }
  break;
case 627:
#line 4451 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var pars = (List<Parameter>) yyVals[-2+yyTop];
		Parameter p = (Parameter)yyVals[0+yyTop];
		if (pars[0].GetType () != p.GetType ()) {
			report.Error (748, p.Location, "All lambda parameters must be typed either explicitly or implicitly");
		}
		
		pars.Add (p);
		yyVal = pars;
	  }
  break;
case 628:
#line 4465 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];

		yyVal = new Parameter ((FullNamedExpression) yyVals[-1+yyTop], lt.Value, (Parameter.Modifier) yyVals[-2+yyTop], null, lt.Location);
	  }
  break;
case 629:
#line 4471 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];

		yyVal = new Parameter ((FullNamedExpression) yyVals[-1+yyTop], lt.Value, Parameter.Modifier.NONE, null, lt.Location);
	  }
  break;
case 630:
#line 4477 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		yyVal = new ImplicitLambdaParameter (lt.Value, lt.Location);
	  }
  break;
case 631:
#line 4484 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = ParametersCompiled.EmptyReadOnlyParameters; }
  break;
case 632:
#line 4485 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		var pars_list = (List<Parameter>) yyVals[0+yyTop];
		yyVal = new ParametersCompiled (pars_list.ToArray ());
	  }
  break;
case 635:
#line 4497 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		start_block (lexer.Location);
	  }
  break;
case 636:
#line 4501 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Block b = end_block (lexer.Location);
		b.AddStatement (new ContextualReturn ((Expression) yyVals[0+yyTop]));
		yyVal = b;
	  }
  break;
case 638:
#line 4511 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);	
		yyVal = EmptyExpression.Null;
	  }
  break;
case 639:
#line 4519 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];	
		Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location);
		start_anonymous (true, new ParametersCompiled (p), false, lt.Location);
	  }
  break;
case 640:
#line 4525 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]);
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 641:
#line 4530 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		Parameter p = new ImplicitLambdaParameter (lt.Value, lt.Location);
		start_anonymous (true, new ParametersCompiled (p), true, lt.Location);
	  }
  break;
case 642:
#line 4536 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]);
		lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 643:
#line 4541 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out;
	  }
  break;
case 644:
#line 4545 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	valid_param_mod = 0;
		start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], false, GetLocation (yyVals[-4+yyTop]));
	  }
  break;
case 645:
#line 4550 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]);
		lbag.AddLocation (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 646:
#line 4555 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out;	  
	  }
  break;
case 647:
#line 4559 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	valid_param_mod = 0;
		start_anonymous (true, (ParametersCompiled) yyVals[-2+yyTop], true, GetLocation (yyVals[-5+yyTop]));
	  }
  break;
case 648:
#line 4564 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = end_anonymous ((ParametersBlock) yyVals[0+yyTop]);
		lbag.AddLocation (yyVal, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 654:
#line 4580 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 655:
#line 4587 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new RefValueExpr ((Expression) yyVals[-3+yyTop], (FullNamedExpression) yyVals[-1+yyTop], GetLocation (yyVals[-5+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 656:
#line 4592 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new RefTypeExpr ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 657:
#line 4597 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new MakeRefExpr ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));	  
	  }
  break;
case 659:
#line 4609 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]);
	  }
  break;
case 660:
#line 4622 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.ConstraintsParsing = true;
	  }
  break;
case 661:
#line 4626 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		MemberName name = MakeName ((MemberName) yyVals[0+yyTop]);
		Class c = new Class (current_namespace, current_class, name, (Modifiers) yyVals[-4+yyTop], (Attributes) yyVals[-5+yyTop]);
		if (((c.ModFlags & Modifiers.STATIC) != 0) && lang_version == LanguageVersion.ISO_1) {
			FeatureIsNotAvailable (c.Location, "static classes");
		}
			
		push_current_class (c, yyVals[-3+yyTop]);
	  }
  break;
case 662:
#line 4637 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.ConstraintsParsing = false;

		current_class.SetParameterInfo ((List<Constraints>) yyVals[0+yyTop]);
		lbag.AddMember (current_class, mod_locations, GetLocation (yyVals[-5+yyTop]));

		if (doc_support) {
			current_container.DocComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}
		
		lexer.parsing_modifiers = true;
	  }
  break;
case 663:
#line 4651 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		--lexer.parsing_declaration;
		if (doc_support)
			Lexer.doc_state = XmlCommentState.Allowed;
	  }
  break;
case 664:
#line 4657 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lbag.AppendToMember (current_class, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
		yyVal = pop_current_class ();
	  }
  break;
case 665:
#line 4665 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = null; }
  break;
case 666:
#line 4667 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = yyVals[0+yyTop]; }
  break;
case 667:
#line 4672 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	    mod_locations = null;
		yyVal = ModifierNone;
		lexer.parsing_modifiers = false;
	  }
  break;
case 668:
#line 4678 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.parsing_modifiers = false;		
	  }
  break;
case 670:
#line 4686 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		var m1 = (Modifiers) yyVals[-1+yyTop];
		var m2 = (Modifiers) yyVals[0+yyTop];
        
		if ((m1 & m2) != 0) {
			report.Error (1004, lexer.Location - ModifiersExtensions.Name (m2).Length,
				"Duplicate `{0}' modifier", ModifiersExtensions.Name (m2));
		} else if ((m2 & Modifiers.AccessibilityMask) != 0 && (m1 & Modifiers.AccessibilityMask) != 0 &&
			((m2 | m1 & Modifiers.AccessibilityMask) != (Modifiers.PROTECTED | Modifiers.INTERNAL))) {
			report.Error (107, lexer.Location - ModifiersExtensions.Name (m2).Length,
				"More than one protection modifier specified");
		}
		
		yyVal = m1 | m2;
	  }
  break;
case 671:
#line 4705 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.NEW;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
		
		if (current_container == module)
			report.Error (1530, GetLocation (yyVals[0+yyTop]), "Keyword `new' is not allowed on namespace elements");
	  }
  break;
case 672:
#line 4713 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.PUBLIC;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 673:
#line 4718 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.PROTECTED;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 674:
#line 4723 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.INTERNAL;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 675:
#line 4728 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.PRIVATE;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 676:
#line 4733 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.ABSTRACT;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 677:
#line 4738 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.SEALED;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 678:
#line 4743 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.STATIC;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 679:
#line 4748 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.READONLY;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 680:
#line 4753 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.VIRTUAL;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 681:
#line 4758 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.OVERRIDE;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 682:
#line 4763 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.EXTERN;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 683:
#line 4768 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.VOLATILE;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 684:
#line 4773 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.UNSAFE;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
		if (!settings.Unsafe)
			Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 685:
#line 4780 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Modifiers.ASYNC;
		StoreModifierLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 687:
#line 4789 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_container.AddBasesForPart (current_class, (List<FullNamedExpression>) yyVals[0+yyTop]);
	 }
  break;
case 689:
#line 4797 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 690:
#line 4801 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
		yyVal = null;
	 }
  break;
case 691:
#line 4809 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var constraints = new List<Constraints> (1);
		constraints.Add ((Constraints) yyVals[0+yyTop]);
		yyVal = constraints;
	  }
  break;
case 692:
#line 4815 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var constraints = (List<Constraints>) yyVals[-1+yyTop];
		Constraints new_constraint = (Constraints)yyVals[0+yyTop];

		foreach (Constraints c in constraints) {
			if (new_constraint.TypeParameter.Value == c.TypeParameter.Value) {
				report.Error (409, new_constraint.Location,
					"A constraint clause has already been specified for type parameter `{0}'",
					new_constraint.TypeParameter.Value);
			}
		}

		constraints.Add (new_constraint);
		yyVal = constraints;
	  }
  break;
case 693:
#line 4834 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
		yyVal = new Constraints (new SimpleMemberName (lt.Value, lt.Location), (List<FullNamedExpression>) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop]));
	  }
  break;
case 694:
#line 4842 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var constraints = new List<FullNamedExpression> (1);
		constraints.Add ((FullNamedExpression) yyVals[0+yyTop]);
		yyVal = constraints;
	  }
  break;
case 695:
#line 4848 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var constraints = (List<FullNamedExpression>) yyVals[-2+yyTop];
		var prev = constraints [constraints.Count - 1] as SpecialContraintExpr;
		if (prev != null && (prev.Constraint & SpecialConstraint.Constructor) != 0) {			
			report.Error (401, GetLocation (yyVals[-1+yyTop]), "The `new()' constraint must be the last constraint specified");
		}
		
		prev = yyVals[0+yyTop] as SpecialContraintExpr;
		if (prev != null) {
			if ((prev.Constraint & (SpecialConstraint.Class | SpecialConstraint.Struct)) != 0) {
				report.Error (449, prev.Location, "The `class' or `struct' constraint must be the first constraint specified");			
			} else {
			 	prev = constraints [0] as SpecialContraintExpr;
			 	if (prev != null && (prev.Constraint & SpecialConstraint.Struct) != 0) {			
					report.Error (451, GetLocation (yyVals[0+yyTop]), "The `new()' constraint cannot be used with the `struct' constraint");
				}
			}
		}

		constraints.Add ((FullNamedExpression) yyVals[0+yyTop]);
		yyVal = constraints;
	  }
  break;
case 696:
#line 4874 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[0+yyTop] is ComposedCast)
			report.Error (706, GetLocation (yyVals[0+yyTop]), "Invalid constraint type `{0}'", ((ComposedCast)yyVals[0+yyTop]).GetSignatureForError ());
	  
	  	yyVal = yyVals[0+yyTop];
	  }
  break;
case 697:
#line 4881 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new SpecialContraintExpr (SpecialConstraint.Constructor, GetLocation (yyVals[-2+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 698:
#line 4886 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 699:
#line 4890 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 700:
#line 4897 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Variance.None;
	  }
  break;
case 701:
#line 4901 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (lang_version <= LanguageVersion.V_3)
			FeatureIsNotAvailable (lexer.Location, "generic type variance");

		yyVal = yyVals[0+yyTop];
	  }
  break;
case 702:
#line 4911 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Variance.Covariant;
	  }
  break;
case 703:
#line 4915 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = Variance.Contravariant;
	  }
  break;
case 704:
#line 4935 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		++lexer.parsing_block;
		start_block (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 705:
#line 4940 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 706:
#line 4947 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	 	--lexer.parsing_block;
		yyVal = end_block (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 707:
#line 4952 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	 	--lexer.parsing_block;
		yyVal = end_block (lexer.Location);
	  }
  break;
case 708:
#line 4961 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		++lexer.parsing_block;
		current_block.StartLocation = GetLocation (yyVals[0+yyTop]);
	  }
  break;
case 709:
#line 4966 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		--lexer.parsing_block;
		yyVal = end_block (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 714:
#line 4984 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block.AddStatement ((Statement) yyVals[0+yyTop]);
	  }
  break;
case 715:
#line 4988 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block.AddStatement ((Statement) yyVals[0+yyTop]);
	  }
  break;
case 717:
#line 4993 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
		yyVal = null;
	  }
  break;
case 720:
#line 5012 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block.AddStatement ((Statement) yyVals[0+yyTop]);
	  }
  break;
case 721:
#line 5016 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block.AddStatement ((Statement) yyVals[0+yyTop]);
	  }
  break;
case 750:
#line 5057 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		  report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement");
		  yyVal = null;
	  }
  break;
case 751:
#line 5062 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		  report.Error (1023, GetLocation (yyVals[0+yyTop]), "An embedded statement may not be a declaration or labeled statement");
		  yyVal = null;
	  }
  break;
case 752:
#line 5067 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
		yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 753:
#line 5075 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		/* Uses lexer.Location because semicolon location is not kept in quick mode*/
		yyVal = new EmptyStatement (lexer.Location);
	  }
  break;
case 754:
#line 5083 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		LabeledStatement labeled = new LabeledStatement (lt.Value, current_block, lt.Location);

		current_block.AddLabel (labeled);
		current_block.AddStatement (labeled);
	  }
  break;
case 757:
#line 5096 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[-1+yyTop] is VarExpr)
			yyVals[-1+yyTop] = new SimpleName ("var", ((VarExpr) yyVals[-1+yyTop]).Location);
	  
		yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 758:
#line 5112 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		/* Ok, the above "primary_expression" is there to get rid of*/
		/* both reduce/reduce and shift/reduces in the grammar, it should*/
		/* really just be "type_name".  If you use type_name, a reduce/reduce*/
		/* creeps up.  If you use namespace_or_type_name (which is all we need*/
		/* really) two shift/reduces appear.*/
		/* */

		/* So the super-trick is that primary_expression*/
		/* can only be either a SimpleName or a MemberAccess. */
		/* The MemberAccess case arises when you have a fully qualified type-name like :*/
		/* Foo.Bar.Blah i;*/
		/* SimpleName is when you have*/
		/* Blah i;*/
		
		Expression expr = (Expression) yyVals[-1+yyTop];
		if (yyVals[0+yyTop] == null) {
			SimpleName sn = expr as SimpleName;
			if (sn != null && sn.Name == "var")
				yyVal = new VarExpr (sn.Location);
			else
				yyVal = yyVals[-1+yyTop];
		} else if (expr is ATypeNameExpression) {
			yyVal = new ComposedCast ((ATypeNameExpression)expr, (ComposedTypeSpecifier) yyVals[0+yyTop]);
		} else {
			Error_ExpectingTypeName (expr);
			yyVal = null;
		}
	  }
  break;
case 759:
#line 5142 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		ATypeNameExpression expr = yyVals[-1+yyTop] as ATypeNameExpression;

		if (expr != null) {
			yyVal = new ComposedCast (expr, (ComposedTypeSpecifier) yyVals[0+yyTop]);
		} else {
			Error_ExpectingTypeName ((Expression)yyVals[-1+yyTop]);
			yyVal = expr;
		}
	  }
  break;
case 760:
#line 5153 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[0+yyTop] == null)
			yyVal = yyVals[-1+yyTop];
		else
			yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 761:
#line 5160 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 762:
#line 5164 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 763:
#line 5168 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Expression.Error_VoidInvalidInTheContext (GetLocation (yyVals[0+yyTop]), report);
		yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 765:
#line 5177 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	((ComposedTypeSpecifier) yyVals[-1+yyTop]).Next = (ComposedTypeSpecifier) yyVals[0+yyTop];
	  	yyVal = yyVals[-1+yyTop];
	  }
  break;
case 766:
#line 5185 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 768:
#line 5193 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (async_block) {
			report.Error (4003, GetLocation (yyVals[0+yyTop]), "`await' cannot be used as an identifier within an async method or lambda expression");
			yyVal = Tokenizer.LocatedToken.Create ("await", GetLocation (yyVals[0+yyTop]));
		}
	  }
  break;
case 769:
#line 5203 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		var li = new LocalVariable (current_block, lt.Value, lt.Location);
		current_block.AddLocalName (li);
		current_variable = new BlockVariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li);
	  }
  break;
case 770:
#line 5210 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = current_variable;
		current_variable = null;
		lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 771:
#line 5216 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location);
		current_block.AddLocalName (li);
		current_variable = new BlockConstantDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li);
	  }
  break;
case 772:
#line 5223 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = current_variable;
		current_variable = null;
		lbag.AddLocation (yyVal, GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 774:
#line 5233 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_variable.Initializer = (Expression) yyVals[0+yyTop];
		/* TODO: lbag*/
	  }
  break;
case 775:
#line 5238 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	if (yyToken == Token.OPEN_BRACKET_EXPR) {
			report.Error (650, lexer.Location,
				"Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type");
		} else {
			Error_SyntaxError (yyToken);
		}
	  }
  break;
case 779:
#line 5256 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		foreach (var d in current_variable.Declarators) {
			if (d.Initializer == null)
				Error_MissingInitializer (d.Variable.Location);
		}
	  }
  break;
case 782:
#line 5271 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];	  
		var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location);
		var d = new BlockVariableDeclaration.Declarator (li, null);
		current_variable.AddDeclarator (d);
		current_block.AddLocalName (li);
	  	lbag.AddLocation (d, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 783:
#line 5280 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];	  
		var li = new LocalVariable (current_variable.Variable, lt.Value, lt.Location);
		var d = new BlockVariableDeclaration.Declarator (li, (Expression) yyVals[0+yyTop]);
		current_variable.AddDeclarator (d);
		current_block.AddLocalName (li);
	  	lbag.AddLocation (d, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 784:
#line 5292 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (145, lexer.Location, "A const field requires a value to be provided");
	  }
  break;
case 785:
#line 5296 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_variable.Initializer = (Expression) yyVals[0+yyTop];
	  }
  break;
case 790:
#line 5313 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];	  
		var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.Constant, lt.Location);
		var d = new BlockVariableDeclaration.Declarator (li, (Expression) yyVals[0+yyTop]);
		current_variable.AddDeclarator (d);
		current_block.AddLocalName (li);
	  	lbag.AddLocation (d, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 792:
#line 5326 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new StackAlloc ((Expression) yyVals[-3+yyTop], (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-4+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 793:
#line 5331 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (1575, GetLocation (yyVals[-1+yyTop]), "A stackalloc expression requires [] after type");
		yyVal = new StackAlloc ((Expression) yyVals[0+yyTop], null, GetLocation (yyVals[-1+yyTop]));		
	  }
  break;
case 794:
#line 5339 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = yyVals[-1+yyTop];
		lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 795:
#line 5343 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = yyVals[-1+yyTop]; }
  break;
case 796:
#line 5347 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = yyVals[-1+yyTop]; }
  break;
case 797:
#line 5348 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = yyVals[-1+yyTop]; }
  break;
case 798:
#line 5357 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		ExpressionStatement s = yyVals[0+yyTop] as ExpressionStatement;
		if (s == null) { 
			Expression.Error_InvalidExpressionStatement (report, GetLocation (yyVals[0+yyTop]));
			yyVal = new StatementExpression (EmptyExpressionStatement.Instance);
		} else {
			yyVal = new StatementExpression (s);
		}
	  }
  break;
case 799:
#line 5370 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Expression expr = (Expression) yyVals[0+yyTop];
		ExpressionStatement s;

	        s = new OptionalAssign (new SimpleName ("$retval", lexer.Location), expr, lexer.Location);
		yyVal = new StatementExpression (s);
	  }
  break;
case 800:
#line 5378 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
		yyVal = new EmptyStatement (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 803:
#line 5392 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		if (yyVals[0+yyTop] is EmptyStatement)
			Warning_EmptyStatement (GetLocation (yyVals[0+yyTop]));
		
		yyVal = new If ((BooleanExpression) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 804:
#line 5401 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new If ((BooleanExpression) yyVals[-4+yyTop], (Statement) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop], GetLocation (yyVals[-6+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));
		
		if (yyVals[-2+yyTop] is EmptyStatement)
			Warning_EmptyStatement (GetLocation (yyVals[-2+yyTop]));
		if (yyVals[0+yyTop] is EmptyStatement)
			Warning_EmptyStatement (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 805:
#line 5414 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		start_block (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 806:
#line 5418 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Switch ((Expression) yyVals[-5+yyTop], (ExplicitBlock) current_block.Explicit, (List<SwitchSection>) yyVals[-1+yyTop], GetLocation (yyVals[-7+yyTop]));	
		end_block (GetLocation (yyVals[0+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[-4+yyTop]));
	  }
  break;
case 807:
#line 5427 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Warning (1522, 1, current_block.StartLocation, "Empty switch block"); 
		yyVal = new List<SwitchSection> ();
	  }
  break;
case 809:
#line 5436 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var sections = new List<SwitchSection> (4);

		sections.Add ((SwitchSection) yyVals[0+yyTop]);
		yyVal = sections;
	  }
  break;
case 810:
#line 5443 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var sections = (List<SwitchSection>) yyVals[-1+yyTop];

		sections.Add ((SwitchSection) yyVals[0+yyTop]);
		yyVal = sections;
	  }
  break;
case 811:
#line 5450 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);	  
		yyVal = new List<SwitchSection> ();
	  }
  break;
case 812:
#line 5458 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block = current_block.CreateSwitchBlock (lexer.Location);
	  }
  break;
case 813:
#line 5462 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new SwitchSection ((List<SwitchLabel>) yyVals[-2+yyTop], current_block);
	  }
  break;
case 814:
#line 5469 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var labels = new List<SwitchLabel> (2);

		labels.Add ((SwitchLabel) yyVals[0+yyTop]);
		yyVal = labels;
	  }
  break;
case 815:
#line 5476 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var labels = (List<SwitchLabel>) (yyVals[-1+yyTop]);
		labels.Add ((SwitchLabel) yyVals[0+yyTop]);

		yyVal = labels;
	  }
  break;
case 816:
#line 5486 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	 	yyVal = new SwitchLabel ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
	 	lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	 }
  break;
case 817:
#line 5491 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 822:
#line 5505 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE)
			Warning_EmptyStatement (GetLocation (yyVals[0+yyTop]));
	  
		yyVal = new While ((BooleanExpression) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 823:
#line 5517 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Do ((Statement) yyVals[-5+yyTop], (BooleanExpression) yyVals[-2+yyTop], GetLocation (yyVals[-6+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 824:
#line 5525 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		start_block (GetLocation (yyVals[0+yyTop]));
		current_block.IsCompilerGenerated = true;
	  }
  break;
case 825:
#line 5530 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 826:
#line 5541 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE)
			Warning_EmptyStatement (GetLocation (yyVals[0+yyTop]));
	  
		For f = new For ((Statement) yyVals[-6+yyTop], (BooleanExpression) yyVals[-4+yyTop], (Statement) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop], GetLocation (yyVals[-9+yyTop]));
		current_block.AddStatement (f);
		
		lbag.AddStatement (f, current_block.StartLocation, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));

		yyVal = end_block (GetLocation (yyVals[-5+yyTop]));
	  }
  break;
case 827:
#line 5553 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
		yyVal = end_block (current_block.StartLocation);
	  }
  break;
case 828:
#line 5560 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new EmptyStatement (lexer.Location); }
  break;
case 830:
#line 5566 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		var li = new LocalVariable (current_block, lt.Value, lt.Location);
		current_block.AddLocalName (li);
		current_variable = new BlockVariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li);
	  }
  break;
case 831:
#line 5573 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = current_variable;
		current_variable = null;
	  }
  break;
case 833:
#line 5581 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = null; }
  break;
case 835:
#line 5586 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { yyVal = new EmptyStatement (lexer.Location); }
  break;
case 839:
#line 5597 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	var sl = yyVals[-2+yyTop] as StatementList;
	  	if (sl == null) {
	  		sl = new StatementList ((Statement) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop]);
			lbag.AddStatement (sl, GetLocation (yyVals[-1+yyTop]));
	  	} else {
	  		sl.Add ((Statement) yyVals[0+yyTop]);
	  		lbag.AppendTo (sl, GetLocation (yyVals[-1+yyTop]));
	  	}
	  		
		yyVal = sl;
	  }
  break;
case 840:
#line 5613 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (230, GetLocation (yyVals[-5+yyTop]), "Type and identifier are both required in a foreach statement");
		yyVal = null;
	  }
  break;
case 841:
#line 5618 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		start_block (GetLocation (yyVals[-5+yyTop]));
		current_block.IsCompilerGenerated = true;
		
		var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
		var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.ForeachVariable | LocalVariable.Flags.Used, lt.Location);
		current_block.AddLocalName (li);
		yyVal = li;
	  }
  break;
case 842:
#line 5628 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE)
			Warning_EmptyStatement (GetLocation (yyVals[0+yyTop]));
	  
		Foreach f = new Foreach ((Expression) yyVals[-6+yyTop], (LocalVariable) yyVals[-1+yyTop], (Expression) yyVals[-3+yyTop], (Statement) yyVals[0+yyTop], GetLocation (yyVals[-8+yyTop]));
		current_block.AddStatement (f);
		
		lbag.AddStatement (f, GetLocation (yyVals[-7+yyTop]), GetLocation (yyVals[-4+yyTop]), GetLocation (yyVals[-2+yyTop]));
		yyVal = end_block (GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 849:
#line 5651 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Break (GetLocation (yyVals[-1+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 850:
#line 5659 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Continue (GetLocation (yyVals[-1+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 851:
#line 5667 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		yyVal = new Goto (lt.Value, lt.Location);
		lbag.AddStatement (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 852:
#line 5673 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new GotoCase ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 853:
#line 5678 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new GotoDefault (GetLocation (yyVals[-2+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 854:
#line 5686 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Return ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 855:
#line 5694 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Throw ((Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 856:
#line 5702 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
		string s = lt.Value;
		if (s != "yield"){
			report.Error (1003, lt.Location, "; expected");
		} else if (yyVals[-1+yyTop] == null) {
			report.Error (1627, GetLocation (yyVals[0+yyTop]), "Expression expected after yield return");
		} else if (lang_version == LanguageVersion.ISO_1){
			FeatureIsNotAvailable (lt.Location, "iterators");
		}
		
		current_block.ParametersBlock.TopBlock.IsIterator = true;
		yyVal = new Yield ((Expression) yyVals[-1+yyTop], lt.Location);
		lbag.AddStatement (yyVal, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 857:
#line 5718 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
		string s = lt.Value;
		if (s != "yield"){
			report.Error (1003, lt.Location, "; expected");
		} else if (lang_version == LanguageVersion.ISO_1){
			FeatureIsNotAvailable (lt.Location, "iterators");
		}
		
		current_block.ParametersBlock.TopBlock.IsIterator = true;
		yyVal = new YieldBreak (lt.Location);
		lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]), GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 860:
#line 5740 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List<Catch>) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false);
	  }
  break;
case 861:
#line 5744 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new TryFinally ((Statement) yyVals[-2+yyTop], (Block) yyVals[0+yyTop], GetLocation (yyVals[-3+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 862:
#line 5749 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new TryFinally (new TryCatch ((Block) yyVals[-3+yyTop], (List<Catch>) yyVals[-2+yyTop], GetLocation (yyVals[-4+yyTop]), true), (Block) yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 863:
#line 5754 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		report.Error (1524, GetLocation (yyVals[-2+yyTop]), "Expected catch or finally");
		yyVal = null;
	  }
  break;
case 864:
#line 5762 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var l = new List<Catch> (2);

		l.Add ((Catch) yyVals[0+yyTop]);
		yyVal = l;
	  }
  break;
case 865:
#line 5769 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var l = (List<Catch>) yyVals[-1+yyTop];
		
		Catch c = (Catch) yyVals[0+yyTop];
		if (l [0].IsGeneral) {
			report.Error (1017, c.loc, "Try statement already has an empty catch block");
		} else {
			if (c.IsGeneral)
				l.Insert (0, c);
			else
				l.Add (c);
		}
		
		yyVal = l;
	  }
  break;
case 868:
#line 5793 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 869:
#line 5797 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		start_block (GetLocation (yyVals[-3+yyTop]));
		var c = new Catch (current_block, GetLocation (yyVals[-4+yyTop]));
		c.TypeExpression = (FullNamedExpression) yyVals[-2+yyTop];

		if (yyVals[-1+yyTop] != null) {
			var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
			c.Variable = new LocalVariable (current_block, lt.Value, lt.Location);
			current_block.AddLocalName (c.Variable);
		}
		
		lbag.AddLocation (c, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[0+yyTop]));
		yyVal = c;
	  }
  break;
case 870:
#line 5812 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 871:
#line 5816 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	if (yyToken == Token.CLOSE_PARENS) {
			report.Error (1015, lexer.Location,
				"A type that derives from `System.Exception', `object', or `string' expected");
		} else {
			Error_SyntaxError (yyToken);
		}
		
		yyVal = new Catch (null, GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 872:
#line 5830 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 873:
#line 5837 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 874:
#line 5844 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (!settings.Unsafe)
			Error_UnsafeCodeNotAllowed (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 875:
#line 5847 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 876:
#line 5854 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE)
			Warning_EmptyStatement (GetLocation (yyVals[0+yyTop]));
	  
		yyVal = new Lock ((Expression) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop]));
		lbag.AddStatement (yyVal, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 877:
#line 5865 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	    start_block (GetLocation (yyVals[-2+yyTop]));
	    
		current_block.IsCompilerGenerated = true;
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.FixedVariable | LocalVariable.Flags.Used, lt.Location);
		current_block.AddLocalName (li);
		current_variable = new Fixed.VariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li);
	  }
  break;
case 878:
#line 5875 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = current_variable;
		current_variable = null;
	  }
  break;
case 879:
#line 5880 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE)
			Warning_EmptyStatement (GetLocation (yyVals[0+yyTop]));
	  
		Fixed f = new Fixed ((Fixed.VariableDeclaration) yyVals[-1+yyTop], (Statement) yyVals[0+yyTop], GetLocation (yyVals[-9+yyTop]));
		current_block.AddStatement (f);
		yyVal = end_block (GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 880:
#line 5892 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	    start_block (GetLocation (yyVals[-2+yyTop]));
	    
		current_block.IsCompilerGenerated = true;
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.UsingVariable | LocalVariable.Flags.Used, lt.Location);
		current_block.AddLocalName (li);
		current_variable = new Using.VariableDeclaration ((FullNamedExpression) yyVals[-1+yyTop], li);
	  }
  break;
case 881:
#line 5902 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = current_variable;	  
		current_variable = null;
	  }
  break;
case 882:
#line 5907 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE)
			Warning_EmptyStatement (GetLocation (yyVals[0+yyTop]));
	  
		Using u = new Using ((Using.VariableDeclaration) yyVals[-1+yyTop], (Statement) yyVals[0+yyTop], GetLocation (yyVals[-9+yyTop]));
		current_block.AddStatement (u);
		yyVal = end_block (GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 883:
#line 5916 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[0+yyTop] is EmptyStatement && lexer.peek_token () == Token.OPEN_BRACE)
			Warning_EmptyStatement (GetLocation (yyVals[0+yyTop]));
	  
		Using u = new Using ((Expression) yyVals[-2+yyTop], (Statement) yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop]));
		lbag.AddStatement (u, GetLocation (yyVals[-3+yyTop]), GetLocation (yyVals[-1+yyTop]));
		yyVal = u;
	  }
  break;
case 884:
#line 5928 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_MissingInitializer (lexer.Location);
	  }
  break;
case 885:
#line 5932 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_variable.Initializer = (Expression) yyVals[0+yyTop];
		yyVal = current_variable;
	  }
  break;
case 886:
#line 5943 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		lexer.query_parsing = false;
			
		Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause;
			
		from.Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop];
		yyVal = from;
		
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  }
  break;
case 887:
#line 5955 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Linq.AQueryClause from = yyVals[-1+yyTop] as Linq.AQueryClause;
			
		from.Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop];
		yyVal = from;
		
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  }
  break;
case 888:
#line 5966 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	        lexer.query_parsing = false;
		yyVal = yyVals[-1+yyTop];

		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  }
  break;
case 889:
#line 5973 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	        yyVal = yyVals[-1+yyTop];
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  }
  break;
case 890:
#line 5982 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  
		var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
		var rv = new Linq.RangeVariable (lt.Value, lt.Location);
		yyVal = new Linq.QueryExpression (new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], rv, GetLocation (yyVals[-3+yyTop])));
	  }
  break;
case 891:
#line 5990 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  
		var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
		var rv = new Linq.RangeVariable (lt.Value, lt.Location);
		yyVal = new Linq.QueryExpression (
			new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], rv, GetLocation (yyVals[-4+yyTop])) {
				IdentifierType = (FullNamedExpression)yyVals[-3+yyTop]
			}
		);
	  }
  break;
case 892:
#line 6005 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  
		var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
		var rv = new Linq.RangeVariable (lt.Value, lt.Location);
		yyVal = new Linq.QueryExpression (new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], rv, GetLocation (yyVals[-3+yyTop])));
	  }
  break;
case 893:
#line 6013 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  
		var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
		var rv = new Linq.RangeVariable (lt.Value, lt.Location);
		yyVal = new Linq.QueryExpression (
			new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], rv, GetLocation (yyVals[-4+yyTop])) {
				IdentifierType = (FullNamedExpression)yyVals[-3+yyTop]
			}
		);
	  }
  break;
case 894:
#line 6028 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 895:
#line 6032 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
		var sn = new Linq.RangeVariable (lt.Value, lt.Location);
		yyVal = new Linq.SelectMany ((Linq.QueryBlock)current_block, sn, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop]));
		
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
		
		((Linq.QueryBlock)current_block).AddRangeVariable (sn);
	  }
  break;
case 896:
#line 6043 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 897:
#line 6047 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
		var sn = new Linq.RangeVariable (lt.Value, lt.Location);

		yyVal = new Linq.SelectMany ((Linq.QueryBlock)current_block, sn, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-5+yyTop])) {
			IdentifierType = (FullNamedExpression)yyVals[-4+yyTop]
		};
		
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
		
		((Linq.QueryBlock)current_block).AddRangeVariable (sn);
	  }
  break;
case 898:
#line 6064 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	Linq.AQueryClause head = (Linq.AQueryClause)yyVals[-1+yyTop];
		
		if (yyVals[0+yyTop] != null)
			head.Next = (Linq.AQueryClause)yyVals[0+yyTop];
				
		if (yyVals[-2+yyTop] != null) {
			Linq.AQueryClause clause = (Linq.AQueryClause)yyVals[-2+yyTop];
			clause.Tail.Next = head;
			head = clause;
		}
		
		yyVal = head;
	  }
  break;
case 900:
#line 6080 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
		yyVal = null;
	  }
  break;
case 901:
#line 6088 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 902:
#line 6092 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Linq.Select ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));

		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  }
  break;
case 903:
#line 6099 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	if (linq_clause_blocks == null)
	  		linq_clause_blocks = new Stack<Linq.QueryBlock> ();
	  		
	  	current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  	linq_clause_blocks.Push ((Linq.QueryBlock)current_block);
	  }
  break;
case 904:
#line 6107 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 905:
#line 6114 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Linq.GroupBy ((Linq.QueryBlock)current_block, (Expression)yyVals[-3+yyTop], linq_clause_blocks.Pop (), (Expression)yyVals[0+yyTop], GetLocation (yyVals[-5+yyTop]));
		
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  }
  break;
case 909:
#line 6130 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		((Linq.AQueryClause)yyVals[-1+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop];
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 915:
#line 6146 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 916:
#line 6150 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-3+yyTop];
		var sn = new Linq.RangeVariable (lt.Value, lt.Location);
	  	yyVal = new Linq.Let ((Linq.QueryBlock) current_block, sn, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-4+yyTop]));
	  	
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
		
		((Linq.QueryBlock)current_block).AddRangeVariable (sn);
	  }
  break;
case 917:
#line 6164 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 918:
#line 6168 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));

		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  }
  break;
case 919:
#line 6178 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (linq_clause_blocks == null)
			linq_clause_blocks = new Stack<Linq.QueryBlock> ();
	  		
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
		linq_clause_blocks.Push ((Linq.QueryBlock) current_block);
	  }
  break;
case 920:
#line 6186 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;

		current_block = new Linq.QueryBlock (current_block, lexer.Location);
		linq_clause_blocks.Push ((Linq.QueryBlock) current_block);
	  }
  break;
case 921:
#line 6194 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop]));
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;

		current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 922:
#line 6202 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop]));
		current_block.SetEndLocation (lexer.Location);
	  
		var outer_selector = linq_clause_blocks.Pop ();
		var block = linq_clause_blocks.Pop ();

		var lt = (Tokenizer.LocatedToken) yyVals[-10+yyTop];	
		var sn = new Linq.RangeVariable (lt.Value, lt.Location);
		Linq.RangeVariable into;
		
		if (yyVals[0+yyTop] == null) {
			into = sn;
	  		yyVal = new Linq.Join (block, sn, (Expression)yyVals[-7+yyTop], outer_selector, (Linq.QueryBlock) current_block, GetLocation (yyVals[-11+yyTop]));
		} else {
			/**/
			/* Set equals right side parent to beginning of linq query, it is not accessible therefore cannot cause name collisions*/
			/**/
			var parent = block.Parent;
			while (parent is Linq.QueryBlock) {
				parent = parent.Parent;
			}
			current_block.Parent = parent;
			
			((Linq.QueryBlock)current_block).AddRangeVariable (sn);
		
			lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
			into = new Linq.RangeVariable (lt.Value, lt.Location);

			yyVal = new Linq.GroupJoin (block, sn, (Expression)yyVals[-7+yyTop], outer_selector, (Linq.QueryBlock) current_block, into, GetLocation (yyVals[-11+yyTop]));	
		}

		current_block = block.Parent;
		((Linq.QueryBlock)current_block).AddRangeVariable (into);
	  }
  break;
case 923:
#line 6238 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (linq_clause_blocks == null)
			linq_clause_blocks = new Stack<Linq.QueryBlock> ();
	  		
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
		linq_clause_blocks.Push ((Linq.QueryBlock) current_block);
	  }
  break;
case 924:
#line 6246 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;

		current_block = new Linq.QueryBlock (current_block, lexer.Location);
		linq_clause_blocks.Push ((Linq.QueryBlock) current_block);
	  }
  break;
case 925:
#line 6254 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop]));
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;

		current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 926:
#line 6262 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block.AddStatement (new ContextualReturn ((Expression) yyVals[-1+yyTop]));
		current_block.SetEndLocation (lexer.Location);
	  
		var outer_selector = linq_clause_blocks.Pop ();
		var block = linq_clause_blocks.Pop ();
		
		var lt = (Tokenizer.LocatedToken) yyVals[-10+yyTop];
		var sn = new Linq.RangeVariable (lt.Value, lt.Location);
		Linq.RangeVariable into;
		
		if (yyVals[0+yyTop] == null) {
			into = sn;		
	  		yyVal = new Linq.Join (block, sn, (Expression)yyVals[-7+yyTop], outer_selector, (Linq.QueryBlock) current_block, GetLocation (yyVals[-12+yyTop])) {
	  			IdentifierType = (FullNamedExpression)yyVals[-11+yyTop]
	  		};
		} else {
			/**/
			/* Set equals right side parent to beginning of linq query, it is not accessible therefore cannot cause name collisions*/
			/**/
			var parent = block.Parent;
			while (parent is Linq.QueryBlock) {
				parent = parent.Parent;
			}
			current_block.Parent = parent;
		
			((Linq.QueryBlock)current_block).AddRangeVariable (sn);
		
			lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
			into = new Linq.RangeVariable (lt.Value, lt.Location); /* TODO:*/
			
			yyVal = new Linq.GroupJoin (block, sn, (Expression)yyVals[-7+yyTop], outer_selector, (Linq.QueryBlock) current_block, into, GetLocation (yyVals[-12+yyTop])) {
	  			IdentifierType = (FullNamedExpression)yyVals[-11+yyTop]
	  		};			
		}
		
		current_block = block.Parent;
		((Linq.QueryBlock)current_block).AddRangeVariable (into);		
	  }
  break;
case 928:
#line 6306 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 929:
#line 6313 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 930:
#line 6317 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 932:
#line 6328 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 933:
#line 6335 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		((Linq.AQueryClause)yyVals[-3+yyTop]).Next = (Linq.AQueryClause)yyVals[0+yyTop];
		yyVal = yyVals[-3+yyTop];
	  }
  break;
case 935:
#line 6344 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_block.SetEndLocation (lexer.Location);
		current_block = current_block.Parent;
	  
		current_block = new Linq.QueryBlock ((Linq.QueryBlock) current_block, lexer.Location);	 
	 }
  break;
case 936:
#line 6351 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		((Linq.AQueryClause)yyVals[-3+yyTop]).Tail.Next = (Linq.AQueryClause)yyVals[0+yyTop];
		yyVal = yyVals[-3+yyTop];
	 }
  break;
case 937:
#line 6359 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]);	
	  }
  break;
case 938:
#line 6363 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]);	
	  }
  break;
case 939:
#line 6367 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Linq.OrderByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]);	
	  }
  break;
case 940:
#line 6374 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]);	
	  }
  break;
case 941:
#line 6378 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]);	
	  }
  break;
case 942:
#line 6382 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new Linq.ThenByDescending ((Linq.QueryBlock) current_block, (Expression)yyVals[-1+yyTop]);	
	  }
  break;
case 944:
#line 6391 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		/* query continuation block is not linked with query block but with block*/
		/* before. This means each query can use same range variable names for*/
		/* different identifiers.*/

		current_block.SetEndLocation (GetLocation (yyVals[-1+yyTop]));
		current_block = current_block.Parent;
	
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
		
		if (linq_clause_blocks == null)
			linq_clause_blocks = new Stack<Linq.QueryBlock> ();
	  		
		linq_clause_blocks.Push ((Linq.QueryBlock) current_block);		
	  }
  break;
case 945:
#line 6407 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var current_block = linq_clause_blocks.Pop ();	  
		var lt = (Tokenizer.LocatedToken) yyVals[-2+yyTop];
		var rv = new Linq.RangeVariable (lt.Value, lt.Location);
  		yyVal = new Linq.QueryStartClause ((Linq.QueryBlock)current_block, null, rv, GetLocation (yyVals[-3+yyTop])) {
  			next = (Linq.AQueryClause)yyVals[0+yyTop]
  		};
	  }
  break;
case 948:
#line 6434 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  { 
		current_container = new Class (current_namespace, current_class, new MemberName ("<InteractiveExpressionClass>"), Modifiers.PUBLIC, null);
		current_class = current_container;

		/* (ref object retval)*/
		Parameter [] mpar = new Parameter [1];
		mpar [0] = new Parameter (new TypeExpression (compiler.BuiltinTypes.Object, Location.Null), "$retval", Parameter.Modifier.REF, null, Location.Null);

		ParametersCompiled pars = new ParametersCompiled (mpar);
		var mods = Modifiers.PUBLIC | Modifiers.STATIC;
		if (settings.Unsafe)
			mods |= Modifiers.UNSAFE;

		current_local_parameters = pars;
		Method method = new Method (
			current_class,
			null, /* generic*/
			new TypeExpression (compiler.BuiltinTypes.Void, Location.Null),
			mods,
			new MemberName ("Host"),
			pars,
			null /* attributes */);
			
		current_container.AddMethod (method);			

		oob_stack.Push (method);
		++lexer.parsing_block;
		start_block (lexer.Location);
	  }
  break;
case 949:
#line 6464 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		--lexer.parsing_block;
		Method method = (Method) oob_stack.Pop ();

		method.Block = (ToplevelBlock) end_block(lexer.Location);

		InteractiveResult = (Class) pop_current_class ();
		current_local_parameters = null;
	  }
  break;
case 957:
#line 6496 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop];
	  }
  break;
case 958:
#line 6503 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		module.DocumentationBuilder.ParsedParameters = (List<DocumentationParameter>)yyVals[0+yyTop];
	  }
  break;
case 959:
#line 6507 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-1+yyTop];
		module.DocumentationBuilder.ParsedParameters = (List<DocumentationParameter>)yyVals[0+yyTop];
		yyVal = null;
	  }
  break;
case 960:
#line 6513 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		module.DocumentationBuilder.ParsedBuiltinType = (TypeExpression)yyVals[-3+yyTop];
		module.DocumentationBuilder.ParsedParameters = (List<DocumentationParameter>)yyVals[0+yyTop];
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		yyVal = new MemberName (lt.Value);
	  }
  break;
case 961:
#line 6520 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], new MemberName (MemberCache.IndexerNameAlias));
	  }
  break;
case 962:
#line 6524 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out;
	  }
  break;
case 963:
#line 6528 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		module.DocumentationBuilder.ParsedParameters = (List<DocumentationParameter>)yyVals[-1+yyTop];
		yyVal = new MemberName ((MemberName) yyVals[-6+yyTop], new MemberName (MemberCache.IndexerNameAlias));
	  }
  break;
case 964:
#line 6533 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var p = (List<DocumentationParameter>)yyVals[0+yyTop] ?? new List<DocumentationParameter> (1);
		p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop]));
		module.DocumentationBuilder.ParsedParameters = p;
		module.DocumentationBuilder.ParsedOperator = Operator.OpType.Explicit;
		yyVal = null;
	  }
  break;
case 965:
#line 6541 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var p = (List<DocumentationParameter>)yyVals[0+yyTop] ?? new List<DocumentationParameter> (1);
		p.Add (new DocumentationParameter ((FullNamedExpression) yyVals[-1+yyTop]));
		module.DocumentationBuilder.ParsedParameters = p;
		module.DocumentationBuilder.ParsedOperator = Operator.OpType.Implicit;
		yyVal = null;
	  }
  break;
case 966:
#line 6549 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var p = (List<DocumentationParameter>)yyVals[0+yyTop] ?? new List<DocumentationParameter> (1);
		module.DocumentationBuilder.ParsedParameters = p;
		module.DocumentationBuilder.ParsedOperator = (Operator.OpType) yyVals[-1+yyTop];
		yyVal = null;
	  }
  break;
case 968:
#line 6560 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]);
	  }
  break;
case 970:
#line 6568 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out;
	  }
  break;
case 971:
#line 6572 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 972:
#line 6579 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		yyVal = new List<DocumentationParameter> (0);
	  }
  break;
case 974:
#line 6587 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var parameters = new List<DocumentationParameter> ();
		parameters.Add ((DocumentationParameter) yyVals[0+yyTop]);
		yyVal = parameters;
	  }
  break;
case 975:
#line 6593 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var parameters = yyVals[-2+yyTop] as List<DocumentationParameter>;
		parameters.Add ((DocumentationParameter) yyVals[0+yyTop]);
		yyVal = parameters;
	  }
  break;
case 976:
#line 6602 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (yyVals[-1+yyTop] != null)
			yyVal = new DocumentationParameter ((Parameter.Modifier) yyVals[-1+yyTop], (FullNamedExpression) yyVals[0+yyTop]);
		else
			yyVal = new DocumentationParameter ((FullNamedExpression) yyVals[0+yyTop]);
	  }
  break;
#line default
        }
        yyTop -= yyLen[yyN];
        yyState = yyStates[yyTop];
        int yyM = yyLhs[yyN];
        if (yyState == 0 && yyM == 0) {
          if (debug != null) debug.shift(0, yyFinal);
          yyState = yyFinal;
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
            if (debug != null)
               debug.lex(yyState, yyToken,yyname(yyToken), yyLex.value());
          }
          if (yyToken == 0) {
            if (debug != null) debug.accept(yyVal);
            return yyVal;
          }
          goto continue_yyLoop;
        }
        if (((yyN = yyGindex[yyM]) != 0) && ((yyN += yyState) >= 0)
            && (yyN < yyTable.Length) && (yyCheck[yyN] == yyState))
          yyState = yyTable[yyN];
        else
          yyState = yyDgoto[yyM];
        if (debug != null) debug.shift(yyStates[yyTop], yyState);
	 goto continue_yyLoop;
      continue_yyDiscarded: continue;	// implements the named-loop continue: 'continue yyDiscarded'
      }
    continue_yyLoop: continue;		// implements the named-loop continue: 'continue yyLoop'
    }
  }
Esempio n. 15
0
  /** the generated parser.
      Maintains a state and a value stack, currently with fixed maximum size.
      @param yyLex scanner.
      @return result of the last reduction, if any.
      @throws yyException on irrecoverable parse error.
    */
  public Object yyparse (yyParser.yyInput yyLex)
				{
    if (yyMax <= 0) yyMax = 256;			// initial size
    int yyState = 0;                                   // state stack ptr
    int [] yyStates = new int[yyMax];	                // state stack 
    Object yyVal = null;                               // value stack ptr
    Object [] yyVals = new Object[yyMax];	        // value stack
    int yyToken = -1;					// current input
    int yyErrorFlag = 0;				// #tks to shift

    int yyTop = 0;
    goto skip;
    yyLoop:
    yyTop++;
    skip:
    for (;; ++ yyTop) {
      if (yyTop >= yyStates.Length) {			// dynamically increase
        int[] i = new int[yyStates.Length+yyMax];
        yyStates.CopyTo (i, 0);
        yyStates = i;
        Object[] o = new Object[yyVals.Length+yyMax];
        yyVals.CopyTo (o, 0);
        yyVals = o;
      }
      yyStates[yyTop] = yyState;
      yyVals[yyTop] = yyVal;
      if (debug != null) debug.push(yyState, yyVal);

      yyDiscarded: for (;;) {	// discarding a token does not change stack
        int yyN;
        if ((yyN = yyDefRed[yyState]) == 0) {	// else [default] reduce (yyN)
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
            if (debug != null)
              debug.lex(yyState, yyToken, yyname(yyToken), yyLex.value());
          }
          if ((yyN = yySindex[yyState]) != 0 && ((yyN += yyToken) >= 0)
              && (yyN < yyTable.Length) && (yyCheck[yyN] == yyToken)) {
            if (debug != null)
              debug.shift(yyState, yyTable[yyN], yyErrorFlag-1);
            yyState = yyTable[yyN];		// shift to yyN
            yyVal = yyLex.value();
            yyToken = -1;
            if (yyErrorFlag > 0) -- yyErrorFlag;
            goto yyLoop;
          }
          if ((yyN = yyRindex[yyState]) != 0 && (yyN += yyToken) >= 0
              && yyN < yyTable.Length && yyCheck[yyN] == yyToken)
            yyN = yyTable[yyN];			// reduce (yyN)
          else
            switch (yyErrorFlag) {
  
            case 0:
              yyerror(String.Format ("syntax error, got token `{0}'", yyname (yyToken)), yyExpecting(yyState));
              if (debug != null) debug.error("syntax error");
              goto case 1;
            case 1: case 2:
              yyErrorFlag = 3;
              do {
                if ((yyN = yySindex[yyStates[yyTop]]) != 0
                    && (yyN += Token.yyErrorCode) >= 0 && yyN < yyTable.Length
                    && yyCheck[yyN] == Token.yyErrorCode) {
                  if (debug != null)
                    debug.shift(yyStates[yyTop], yyTable[yyN], 3);
                  yyState = yyTable[yyN];
                  yyVal = yyLex.value();
                  goto yyLoop;
                }
                if (debug != null) debug.pop(yyStates[yyTop]);
              } while (-- yyTop >= 0);
              if (debug != null) debug.reject();
              throw new yyParser.yyException("irrecoverable syntax error");
  
            case 3:
              if (yyToken == 0) {
                if (debug != null) debug.reject();
                throw new yyParser.yyException("irrecoverable syntax error at end-of-file");
              }
              if (debug != null)
                debug.discard(yyState, yyToken, yyname(yyToken),
  							yyLex.value());
              yyToken = -1;
              goto yyDiscarded;		// leave stack alone
            }
        }
        int yyV = yyTop + 1-yyLen[yyN];
        if (debug != null)
          debug.reduce(yyState, yyStates[yyV-1], yyN, yyRule[yyN], yyLen[yyN]);
        yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
        switch (yyN) {
case 3:
#line 105 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = (IExpression)yyVals[-1+yyTop];
	}
  break;
case 4:
#line 109 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new BoolOperation (Operation.AND, (IExpression)yyVals[-2+yyTop], (IExpression)yyVals[0+yyTop]);
	}
  break;
case 5:
#line 113 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new BoolOperation (Operation.OR, (IExpression)yyVals[-2+yyTop], (IExpression)yyVals[0+yyTop]);
	}
  break;
case 6:
#line 117 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new Negation ((IExpression)yyVals[0+yyTop]);
	}
  break;
case 12:
#line 132 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new Comparison ((Operation)yyVals[-1+yyTop], (IExpression)yyVals[-2+yyTop], (IExpression)yyVals[0+yyTop]);
	}
  break;
case 13:
#line 138 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = Operation.EQ; }
  break;
case 14:
#line 139 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = Operation.NE; }
  break;
case 15:
#line 140 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = Operation.LT; }
  break;
case 16:
#line 141 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = Operation.GT; }
  break;
case 17:
#line 142 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = Operation.LE; }
  break;
case 18:
#line 143 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = Operation.GE; }
  break;
case 22:
#line 152 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = (IExpression)yyVals[-1+yyTop];
	}
  break;
case 23:
#line 156 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new ArithmeticOperation (Operation.MUL, (IExpression)yyVals[-2+yyTop], (IExpression)yyVals[0+yyTop]);
	}
  break;
case 24:
#line 160 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new ArithmeticOperation (Operation.DIV, (IExpression)yyVals[-2+yyTop], (IExpression)yyVals[0+yyTop]);
	}
  break;
case 25:
#line 164 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new ArithmeticOperation (Operation.MOD, (IExpression)yyVals[-2+yyTop], (IExpression)yyVals[0+yyTop]);
	}
  break;
case 26:
#line 168 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new ArithmeticOperation (Operation.ADD, (IExpression)yyVals[-2+yyTop], (IExpression)yyVals[0+yyTop]);
	}
  break;
case 27:
#line 172 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new ArithmeticOperation (Operation.SUB, (IExpression)yyVals[-2+yyTop], (IExpression)yyVals[0+yyTop]);
	}
  break;
case 28:
#line 176 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new Negative ((IExpression)yyVals[0+yyTop]);
	}
  break;
case 33:
#line 189 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = new Literal (yyVals[0+yyTop]); }
  break;
case 34:
#line 190 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = new Literal (yyVals[0+yyTop]); }
  break;
case 35:
#line 191 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = new Literal (yyVals[0+yyTop]); }
  break;
case 37:
#line 196 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = new Literal (true); }
  break;
case 38:
#line 197 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = new Literal (false); }
  break;
case 39:
#line 202 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new ColumnReference ((string)yyVals[0+yyTop]);
	}
  break;
case 40:
#line 206 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new ColumnReference (ReferencedTable.Parent, null, (string)yyVals[0+yyTop]);
	}
  break;
case 41:
#line 210 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new ColumnReference (ReferencedTable.Parent, (string)yyVals[-3+yyTop], (string)yyVals[0+yyTop]);
	}
  break;
case 42:
#line 214 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new ColumnReference (ReferencedTable.Child, null, (string)yyVals[0+yyTop]);
	}
  break;
case 43:
#line 218 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new ColumnReference (ReferencedTable.Child, (string)yyVals[-3+yyTop], (string)yyVals[0+yyTop]);
	}
  break;
case 48:
#line 236 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new Aggregation (cacheAggregationResults, aggregationRows, (AggregationFunction)yyVals[-3+yyTop], (ColumnReference)yyVals[-1+yyTop]);
	}
  break;
case 49:
#line 242 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = AggregationFunction.Count; }
  break;
case 50:
#line 243 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = AggregationFunction.Sum; }
  break;
case 51:
#line 244 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = AggregationFunction.Avg; }
  break;
case 52:
#line 245 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = AggregationFunction.Max; }
  break;
case 53:
#line 246 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = AggregationFunction.Min; }
  break;
case 54:
#line 247 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = AggregationFunction.StDev; }
  break;
case 55:
#line 248 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = AggregationFunction.Var; }
  break;
case 56:
#line 253 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new IifFunction ((IExpression)yyVals[-5+yyTop], (IExpression)yyVals[-3+yyTop], (IExpression)yyVals[-1+yyTop]);
	}
  break;
case 57:
#line 257 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		long arg1 = (long) yyVals[-3+yyTop];
		long arg2 = (long) yyVals[-1+yyTop];
		yyVal = new SubstringFunction ((IExpression)yyVals[-5+yyTop], (int) arg1, (int) arg2);
	}
  break;
case 58:
#line 263 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new IsNullFunction ((IExpression)yyVals[-3+yyTop], (IExpression)yyVals[-1+yyTop]);
	}
  break;
case 59:
#line 267 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new LenFunction ((IExpression)yyVals[-1+yyTop]);
	}
  break;
case 60:
#line 271 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new TrimFunction ((IExpression)yyVals[-1+yyTop]);
	}
  break;
case 61:
#line 275 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new ConvertFunction ((IExpression)yyVals[-3+yyTop], (string)yyVals[-1+yyTop]);
	}
  break;
case 64:
#line 287 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new Comparison (Operation.EQ, (IExpression)yyVals[-2+yyTop], new Literal (null));
	}
  break;
case 65:
#line 291 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new Comparison (Operation.NE, (IExpression)yyVals[-3+yyTop], new Literal (null));
	}
  break;
case 66:
#line 298 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new Like ((IExpression)yyVals[-2+yyTop], (string)yyVals[0+yyTop]);
	}
  break;
case 67:
#line 302 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new Negation (new Like ((IExpression)yyVals[-3+yyTop], (string)yyVals[-1+yyTop]));
	}
  break;
case 68:
#line 309 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new In ((IExpression)yyVals[-2+yyTop], (IList)yyVals[0+yyTop]);
	}
  break;
case 69:
#line 313 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new Negation (new In ((IExpression)yyVals[-3+yyTop], (IList)yyVals[0+yyTop]));
	}
  break;
case 70:
#line 319 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  { yyVal = yyVals[-1+yyTop]; }
  break;
case 71:
#line 324 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		yyVal = new ArrayList();
		((IList)yyVal).Add (yyVals[0+yyTop]);
	}
  break;
case 72:
#line 329 "/home/jeff/dev/dev_apps/sand/qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Data/Mono.Data.SqlExpressions/Parser.jay"
  {
		((IList)(yyVal = yyVals[-2+yyTop])).Add (yyVals[0+yyTop]);
	}
  break;
#line default
        }
        yyTop -= yyLen[yyN];
        yyState = yyStates[yyTop];
        int yyM = yyLhs[yyN];
        if (yyState == 0 && yyM == 0) {
          if (debug != null) debug.shift(0, yyFinal);
          yyState = yyFinal;
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
            if (debug != null)
               debug.lex(yyState, yyToken,yyname(yyToken), yyLex.value());
          }
          if (yyToken == 0) {
            if (debug != null) debug.accept(yyVal);
            return yyVal;
          }
          goto yyLoop;
        }
        if (((yyN = yyGindex[yyM]) != 0) && ((yyN += yyState) >= 0)
            && (yyN < yyTable.Length) && (yyCheck[yyN] == yyState))
          yyState = yyTable[yyN];
        else
          yyState = yyDgoto[yyM];
        if (debug != null) debug.shift(yyStates[yyTop], yyState);
	 goto yyLoop;
      }
    }
  }
Esempio n. 16
0
        // Inserts the elements of the given collection at a given index. If
        // required, the capacity of the list is increased to twice the previous
        // capacity or the new size, whichever is larger.  Ranges may be added
        // to the end of the list by setting index to the ArrayList's size.
        //
        public virtual void InsertRange(int index, ICollection c) {
            if (c==null)
                throw new ArgumentNullException("c", Environment.GetResourceString("ArgumentNull_Collection"));
            if (index < 0 || index > _size) throw new ArgumentOutOfRangeException("index", Environment.GetResourceString("ArgumentOutOfRange_Index"));
            //Contract.Ensures(Count == Contract.OldValue(Count) + c.Count);
            Contract.EndContractBlock();

            int count = c.Count;
            if (count > 0) {
                EnsureCapacity(_size + count);                
                // shift existing items
                if (index < _size) {
                    Array.Copy(_items, index, _items, index + count, _size - index);
                }

                Object[] itemsToInsert = new Object[count];
                c.CopyTo(itemsToInsert, 0);
                itemsToInsert.CopyTo(_items, index);
                _size += count;
                _version++;
            }
        }
Esempio n. 17
0
  Object yyparse (yyInput yyLex) {
	if (yyMax <= 0) yyMax = 256;			
	int yyState = 0;								   
	int [] yyStates = new int[yyMax];					
	Object yyVal = null;							   
	Object [] yyVals = new Object[yyMax];			
	int yyToken = -1;					
	int yyErrorFlag = 0;				
	int yyTop = 0;
	goto skip;
	yyLoop:
	yyTop++;
	skip:
	for(;; ++yyTop) {
	  if(yyTop >= yyStates.Length) {			
		int[] i = new int[yyStates.Length + yyMax];
		yyStates.CopyTo(i, 0);
		yyStates = i;
		Object[] o = new Object[yyVals.Length + yyMax];
		yyVals.CopyTo(o, 0);
		yyVals = o;
	  }
	  yyStates[yyTop] = yyState;
	  yyVals[yyTop] = yyVal;
	  yyDiscarded:	
	  for(;;) {
		int yyN;
		if ((yyN = yyDefRed[yyState]) == 0) {	
		  if(yyToken < 0)
			yyToken = yyLex.advance() ? yyLex.token() : 0;
		  if((yyN = yySindex[yyState]) != 0 && ((yyN += yyToken) >= 0)
			  && (yyN < yyTable.Length) && (yyCheck[yyN] == yyToken)) {
			yyState = yyTable[yyN];		
			yyVal = yyLex.value();
			yyToken = -1;
			if (yyErrorFlag > 0) -- yyErrorFlag;
			goto yyLoop;
		  }
		  if((yyN = yyRindex[yyState]) != 0 && (yyN += yyToken) >= 0
			  && yyN < yyTable.Length && yyCheck[yyN] == yyToken)
			yyN = yyTable[yyN];			
		  else
			switch(yyErrorFlag) {
			case 0:
			  yyerror("syntax error");
			  goto case 1;
			case 1: case 2:
			  yyErrorFlag = 3;
			  do {
				if((yyN = yySindex[yyStates[yyTop]]) != 0
					&& (yyN += Token.yyErrorCode) >= 0 && yyN < yyTable.Length
					&& yyCheck[yyN] == Token.yyErrorCode) {
				  yyState = yyTable[yyN];
				  yyVal = yyLex.value();
				  goto yyLoop;
				}
			  } while (--yyTop >= 0);
			  yyerror("irrecoverable syntax error");
			  goto yyDiscarded;
			case 3:
			  if (yyToken == 0)
				yyerror("irrecoverable syntax error at end-of-file");
			  yyToken = -1;
			  goto yyDiscarded;		
			}
		}
		int yyV = yyTop + 1 - yyLen[yyN];
		yyVal = yyV > yyTop ? null : yyVals[yyV];
		switch(yyN) {
case 1:
#line 54 "grammar.y"
  { result = new CriteriaOperator[0]; }
  break;
case 2:
#line 55 "grammar.y"
  { result = ((List<CriteriaOperator>)yyVals[-1+yyTop]).ToArray(); }
  break;
case 3:
#line 59 "grammar.y"
  { yyVal = new List<CriteriaOperator>(new CriteriaOperator[] {(CriteriaOperator)yyVals[0+yyTop]}); }
  break;
case 4:
#line 60 "grammar.y"
  { yyVal = yyVals[-2+yyTop]; ((List<CriteriaOperator>)yyVal).Add((CriteriaOperator)yyVals[0+yyTop]); }
  break;
case 5:
#line 64 "grammar.y"
  { yyVal = yyVals[0+yyTop]; }
  break;
case 6:
#line 65 "grammar.y"
  {
		OperandProperty prop2 = (OperandProperty)yyVals[-2+yyTop];
		OperandProperty prop4 = (OperandProperty)yyVals[0+yyTop];
		prop2.PropertyName = '<' + prop2.PropertyName + '>' + prop4.PropertyName;
		yyVal = prop2;
	}
  break;
case 7:
#line 74 "grammar.y"
  { yyVal = yyVals[0+yyTop]; }
  break;
case 8:
#line 75 "grammar.y"
  { yyVal = new OperandProperty("^"); }
  break;
case 9:
#line 79 "grammar.y"
  { yyVal = yyVals[0+yyTop]; }
  break;
case 10:
#line 80 "grammar.y"
  {
		OperandProperty prop1 = (OperandProperty)yyVals[-2+yyTop];
		OperandProperty prop3 = (OperandProperty)yyVals[0+yyTop];
		prop1.PropertyName += '.' + prop3.PropertyName;
		yyVal = prop1;
	}
  break;
case 11:
#line 89 "grammar.y"
  {
		AggregateOperand agg = (AggregateOperand)yyVals[0+yyTop];
		yyVal = JoinOperand.JoinOrAggreagate((OperandProperty)yyVals[-2+yyTop], null, agg.AggregateType, agg.AggregatedExpression);
	}
  break;
case 12:
#line 93 "grammar.y"
  {
		AggregateOperand agg = (AggregateOperand)yyVals[0+yyTop];
		yyVal = JoinOperand.JoinOrAggreagate((OperandProperty)yyVals[-5+yyTop], (CriteriaOperator)yyVals[-3+yyTop], agg.AggregateType, agg.AggregatedExpression);
	}
  break;
case 13:
#line 97 "grammar.y"
  {
		AggregateOperand agg = (AggregateOperand)yyVals[0+yyTop];
		yyVal = JoinOperand.JoinOrAggreagate((OperandProperty)yyVals[-4+yyTop], null, agg.AggregateType, agg.AggregatedExpression);
	}
  break;
case 14:
#line 101 "grammar.y"
  { yyVal = JoinOperand.JoinOrAggreagate((OperandProperty)yyVals[-3+yyTop], (CriteriaOperator)yyVals[-1+yyTop], Aggregate.Exists, null); }
  break;
case 15:
#line 102 "grammar.y"
  { yyVal = JoinOperand.JoinOrAggreagate((OperandProperty)yyVals[-2+yyTop], null, Aggregate.Exists, null); }
  break;
case 18:
#line 110 "grammar.y"
  { yyVal = new AggregateOperand((OperandProperty)null, (CriteriaOperator)null, Aggregate.Count, null); }
  break;
case 19:
#line 111 "grammar.y"
  { yyVal = new AggregateOperand((OperandProperty)null, (CriteriaOperator)null, Aggregate.Exists, null); }
  break;
case 20:
#line 112 "grammar.y"
  { yyVal = new AggregateOperand((OperandProperty)null, (CriteriaOperator)null, Aggregate.Count, null); }
  break;
case 21:
#line 113 "grammar.y"
  { yyVal = new AggregateOperand((OperandProperty)null, (CriteriaOperator)null, Aggregate.Exists, null); }
  break;
case 22:
#line 114 "grammar.y"
  { yyVal = new AggregateOperand((OperandProperty)null, (CriteriaOperator)yyVals[-1+yyTop], Aggregate.Min, null); }
  break;
case 23:
#line 115 "grammar.y"
  { yyVal = new AggregateOperand((OperandProperty)null, (CriteriaOperator)yyVals[-1+yyTop], Aggregate.Max, null); }
  break;
case 24:
#line 116 "grammar.y"
  { yyVal = new AggregateOperand((OperandProperty)null, (CriteriaOperator)yyVals[-1+yyTop], Aggregate.Avg, null); }
  break;
case 25:
#line 117 "grammar.y"
  { yyVal = new AggregateOperand((OperandProperty)null, (CriteriaOperator)yyVals[-1+yyTop], Aggregate.Sum, null); }
  break;
case 26:
#line 121 "grammar.y"
  { yyVal = yyVals[0+yyTop]; }
  break;
case 27:
#line 122 "grammar.y"
  {
						  string paramName = (string)yyVals[0+yyTop];
						  if(string.IsNullOrEmpty(paramName)) {
							OperandValue param = new OperandValue();
							resultParameters.Add(param);
							yyVal = param;
						  } else {
							bool paramNotFound = true;
							foreach(OperandValue v in resultParameters) {
							  OperandParameter p = v as OperandParameter;
							  if(ReferenceEquals(p, null))
								continue;
							  if(p.ParameterName != paramName)
								continue;
							  paramNotFound = false;
							  resultParameters.Add(p);
							  yyVal = p;
							  break;
							}
							if(paramNotFound) {
							  OperandParameter param = new OperandParameter(paramName);
							  resultParameters.Add(param);
							  yyVal = param;
							}
						  }
						}
  break;
case 28:
#line 148 "grammar.y"
  { yyVal = yyVals[0+yyTop]; }
  break;
case 29:
#line 149 "grammar.y"
  { yyVal = yyVals[0+yyTop]; }
  break;
case 30:
#line 150 "grammar.y"
  { yyVal = new BinaryOperator( (CriteriaOperator)yyVals[-2+yyTop], (CriteriaOperator)yyVals[0+yyTop], BinaryOperatorType.Multiply ); }
  break;
case 31:
#line 151 "grammar.y"
  { yyVal = new BinaryOperator( (CriteriaOperator)yyVals[-2+yyTop], (CriteriaOperator)yyVals[0+yyTop], BinaryOperatorType.Divide ); }
  break;
case 32:
#line 152 "grammar.y"
  { yyVal = new BinaryOperator( (CriteriaOperator)yyVals[-2+yyTop], (CriteriaOperator)yyVals[0+yyTop], BinaryOperatorType.Plus ); }
  break;
case 33:
#line 153 "grammar.y"
  { yyVal = new BinaryOperator( (CriteriaOperator)yyVals[-2+yyTop], (CriteriaOperator)yyVals[0+yyTop], BinaryOperatorType.Minus ); }
  break;
case 34:
#line 154 "grammar.y"
  { yyVal = new BinaryOperator( (CriteriaOperator)yyVals[-2+yyTop], (CriteriaOperator)yyVals[0+yyTop], BinaryOperatorType.Modulo ); }
  break;
case 35:
#line 155 "grammar.y"
  { yyVal = new BinaryOperator( (CriteriaOperator)yyVals[-2+yyTop], (CriteriaOperator)yyVals[0+yyTop], BinaryOperatorType.BitwiseOr ); }
  break;
case 36:
#line 156 "grammar.y"
  { yyVal = new BinaryOperator( (CriteriaOperator)yyVals[-2+yyTop], (CriteriaOperator)yyVals[0+yyTop], BinaryOperatorType.BitwiseAnd ); }
  break;
case 37:
#line 157 "grammar.y"
  { yyVal = new BinaryOperator( (CriteriaOperator)yyVals[-2+yyTop], (CriteriaOperator)yyVals[0+yyTop], BinaryOperatorType.BitwiseXor ); }
  break;
case 38:
#line 158 "grammar.y"
  {
								yyVal = new UnaryOperator( UnaryOperatorType.Minus, (CriteriaOperator)yyVals[0+yyTop] );
								try {
									if(yyVals[0+yyTop] is OperandValue) {
										OperandValue operand = (OperandValue)yyVals[0+yyTop];
										if(operand.Value is Int32) {
											operand.Value = -(Int32)operand.Value;
											yyVal = operand;
											break;
										} else if(operand.Value is Int64) {
											operand.Value = -(Int64)operand.Value;
											yyVal = operand;
											break;
										} else if(operand.Value is Double) {
											operand.Value = -(Double)operand.Value;
											yyVal = operand;
											break;
										} else if(operand.Value is Decimal) {
											operand.Value = -(Decimal)operand.Value;
											yyVal = operand;
											break;
										}  else if(operand.Value is Int16) {
											operand.Value = -(Int16)operand.Value;
											yyVal = operand;
											break;
										}  else if(operand.Value is SByte) {
											operand.Value = -(SByte)operand.Value;
											yyVal = operand;
											break;
										}
									}
								} catch {}
							}
  break;
case 39:
#line 191 "grammar.y"
  { yyVal = new UnaryOperator( UnaryOperatorType.Plus, (CriteriaOperator)yyVals[0+yyTop] ); }
  break;
case 40:
#line 192 "grammar.y"
  { yyVal = new UnaryOperator( UnaryOperatorType.BitwiseNot, (CriteriaOperator)yyVals[0+yyTop] ); }
  break;
case 41:
#line 193 "grammar.y"
  { yyVal = new BinaryOperator( (CriteriaOperator)yyVals[-2+yyTop], (CriteriaOperator)yyVals[0+yyTop], BinaryOperatorType.Equal); }
  break;
case 42:
#line 194 "grammar.y"
  { yyVal = new BinaryOperator( (CriteriaOperator)yyVals[-2+yyTop], (CriteriaOperator)yyVals[0+yyTop], BinaryOperatorType.NotEqual); }
  break;
case 43:
#line 195 "grammar.y"
  { yyVal = new BinaryOperator( (CriteriaOperator)yyVals[-2+yyTop], (CriteriaOperator)yyVals[0+yyTop], BinaryOperatorType.Greater); }
  break;
case 44:
#line 196 "grammar.y"
  { yyVal = new BinaryOperator( (CriteriaOperator)yyVals[-2+yyTop], (CriteriaOperator)yyVals[0+yyTop], BinaryOperatorType.Less); }
  break;
case 45:
#line 197 "grammar.y"
  { yyVal = new BinaryOperator( (CriteriaOperator)yyVals[-2+yyTop], (CriteriaOperator)yyVals[0+yyTop], BinaryOperatorType.GreaterOrEqual); }
  break;
case 46:
#line 198 "grammar.y"
  { yyVal = new BinaryOperator( (CriteriaOperator)yyVals[-2+yyTop], (CriteriaOperator)yyVals[0+yyTop], BinaryOperatorType.LessOrEqual); }
  break;
case 47:
#line 199 "grammar.y"
  { yyVal = new BinaryOperator( (CriteriaOperator)yyVals[-2+yyTop], (CriteriaOperator)yyVals[0+yyTop], BinaryOperatorType.Like); }
  break;
case 48:
#line 200 "grammar.y"
  { yyVal = new UnaryOperator(UnaryOperatorType.Not, new BinaryOperator( (CriteriaOperator)yyVals[-3+yyTop], (CriteriaOperator)yyVals[0+yyTop], BinaryOperatorType.Like)); }
  break;
case 49:
#line 201 "grammar.y"
  { yyVal = new UnaryOperator(UnaryOperatorType.Not, (CriteriaOperator)yyVals[0+yyTop]); }
  break;
case 50:
#line 202 "grammar.y"
  { yyVal = GroupOperator.And((CriteriaOperator)yyVals[-2+yyTop], (CriteriaOperator)yyVals[0+yyTop]); }
  break;
case 51:
#line 203 "grammar.y"
  { yyVal = GroupOperator.Or((CriteriaOperator)yyVals[-2+yyTop], (CriteriaOperator)yyVals[0+yyTop]); }
  break;
case 52:
#line 204 "grammar.y"
  { yyVal = yyVals[-1+yyTop]; }
  break;
case 53:
#line 205 "grammar.y"
  { yyVal = new UnaryOperator(UnaryOperatorType.IsNull, (CriteriaOperator)yyVals[-2+yyTop]); }
  break;
case 54:
#line 206 "grammar.y"
  { yyVal = new UnaryOperator(UnaryOperatorType.Not, new UnaryOperator(UnaryOperatorType.IsNull, (CriteriaOperator)yyVals[-3+yyTop])); }
  break;
case 55:
#line 207 "grammar.y"
  { yyVal = new InOperator((CriteriaOperator)yyVals[-2+yyTop], (IEnumerable<CriteriaOperator>)yyVals[0+yyTop]); }
  break;
case 56:
#line 208 "grammar.y"
  { yyVal = new BetweenOperator((CriteriaOperator)yyVals[-6+yyTop], (CriteriaOperator)yyVals[-3+yyTop], (CriteriaOperator)yyVals[-1+yyTop]); }
  break;
case 57:
#line 209 "grammar.y"
  { yyVal = new UnaryOperator(UnaryOperatorType.IsNull, (CriteriaOperator)yyVals[-1+yyTop]); }
  break;
case 58:
#line 210 "grammar.y"
  { yyVal = new FunctionOperator(FunctionOperatorType.IsNull, (CriteriaOperator)yyVals[-3+yyTop], (CriteriaOperator)yyVals[-1+yyTop]); }
  break;
case 59:
#line 211 "grammar.y"
  {  FunctionOperator fo = new FunctionOperator((FunctionOperatorType)yyVals[-1+yyTop], (IEnumerable<CriteriaOperator>)yyVals[0+yyTop]); lexer.CheckFunctionArgumentsCount(fo.OperatorType, fo.Operands.Count); yyVal = fo; }
  break;
case 60:
#line 212 "grammar.y"
  { yyVal = null; }
  break;
case 61:
#line 216 "grammar.y"
  { yyVal = yyVals[-1+yyTop]; }
  break;
case 62:
#line 217 "grammar.y"
  { yyVal = new List<CriteriaOperator>(); }
  break;
case 63:
#line 221 "grammar.y"
  {
							List<CriteriaOperator> lst = new List<CriteriaOperator>();
							lst.Add((CriteriaOperator)yyVals[0+yyTop]);
							yyVal = lst;
						}
  break;
case 64:
#line 226 "grammar.y"
  {
							List<CriteriaOperator> lst = (List<CriteriaOperator>)yyVals[-2+yyTop];
							lst.Add((CriteriaOperator)yyVals[0+yyTop]);
							yyVal = lst;
						}
  break;
#line default
		}
		yyTop -= yyLen[yyN];
		yyState = yyStates[yyTop];
		int yyM = yyLhs[yyN];
		if(yyState == 0 && yyM == 0) {
		  yyState = yyFinal;
		  if(yyToken < 0)
			yyToken = yyLex.advance() ? yyLex.token() : 0;
		  if(yyToken == 0)
			return yyVal;
		  goto yyLoop;
		}
		if(((yyN = yyGindex[yyM]) != 0) && ((yyN += yyState) >= 0)
			&& (yyN < yyTable.Length) && (yyCheck[yyN] == yyState))
		  yyState = yyTable[yyN];
		else
		  yyState = yyDgoto[yyM];
	 goto yyLoop;
	  }
	}
  }
Esempio n. 18
0
        public static void executeUpdateQuery(SqlConnection conn, String table, String[] columns, Object[] updates, String condition, Object[] conditionValues) {
            String pair = "{0}=@value";
            String[] set = new String[updates.Length];
            for (int i = 0; i < columns.Length; i++) {
                set[i] = String.Format(pair + i, columns[i]);
            }
            String query = String.Format(updateSql, table, String.Join(",", set), condition);
            Object[] values = new Object[updates.Length + conditionValues.Length];
            updates.CopyTo(values, 0);
            conditionValues.CopyTo(values, updates.Length);

            executeNonQueryWithParameters(conn, query, values);
        }