$ANTLR start "Exponent"
199999
public final void mExponent() throws RecognitionException {
		try {
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1338:10: ( ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1338:12: ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+
			{
			if ( input.LA(1)=='E'||input.LA(1)=='e' ) {
				input.consume();
			}
			else {
				MismatchedSetException mse = new MismatchedSetException(null,input);
				recover(mse);
				throw mse;
			}
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1338:22: ( '+' | '-' )?
			int alt20=2;
			int LA20_0 = input.LA(1);
			if ( (LA20_0=='+'||LA20_0=='-') ) {
				alt20=1;
			}
			switch (alt20) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:
					{
					if ( input.LA(1)=='+'||input.LA(1)=='-' ) {
						input.consume();
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						recover(mse);
						throw mse;
					}
					}
					break;

			}

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1338:33: ( '0' .. '9' )+
			int cnt21=0;
			loop21:
			while (true) {
				int alt21=2;
				int LA21_0 = input.LA(1);
				if ( ((LA21_0 >= '0' && LA21_0 <= '9')) ) {
					alt21=1;
				}

				switch (alt21) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:
					{
					if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
						input.consume();
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						recover(mse);
						throw mse;
					}
					}
					break;

				default :
					if ( cnt21 >= 1 ) break loop21;
					EarlyExitException eee = new EarlyExitException(21, input);
					throw eee;
				}
				cnt21++;
			}

			}

		}
		finally {
			// do for sure before leaving
		}
	}
395471
public final void mEXP() throws RecognitionException {
        try {
            int _type = EXP;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // com/dyuproject/protostuff/parser/ProtoLexer.g:235:5: ( NUMINT ( 'e' | 'E' ) NUMINT )
            // com/dyuproject/protostuff/parser/ProtoLexer.g:235:9: NUMINT ( 'e' | 'E' ) NUMINT
            {
            mNUMINT(); 
            if ( input.LA(1)=='E'||input.LA(1)=='e' ) {
                input.consume();

            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;}

            mNUMINT(); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
358618
public final EObject ruleJvmTypeParameter() throws RecognitionException {
        EObject current = null;

        AntlrDatatypeRuleToken lv_name_0_0 = null;

        EObject lv_constraints_1_0 = null;

        EObject lv_constraints_2_0 = null;



        	enterRule();

        try {
            // InternalSARL.g:16575:2: ( ( ( (lv_name_0_0= ruleValidID ) ) ( ( (lv_constraints_1_0= ruleJvmUpperBound ) ) ( (lv_constraints_2_0= ruleJvmUpperBoundAnded ) )* )? ) )
            // InternalSARL.g:16576:2: ( ( (lv_name_0_0= ruleValidID ) ) ( ( (lv_constraints_1_0= ruleJvmUpperBound ) ) ( (lv_constraints_2_0= ruleJvmUpperBoundAnded ) )* )? )
            {
            // InternalSARL.g:16576:2: ( ( (lv_name_0_0= ruleValidID ) ) ( ( (lv_constraints_1_0= ruleJvmUpperBound ) ) ( (lv_constraints_2_0= ruleJvmUpperBoundAnded ) )* )? )
            // InternalSARL.g:16577:3: ( (lv_name_0_0= ruleValidID ) ) ( ( (lv_constraints_1_0= ruleJvmUpperBound ) ) ( (lv_constraints_2_0= ruleJvmUpperBoundAnded ) )* )?
            {
            // InternalSARL.g:16577:3: ( (lv_name_0_0= ruleValidID ) )
            // InternalSARL.g:16578:4: (lv_name_0_0= ruleValidID )
            {
            // InternalSARL.g:16578:4: (lv_name_0_0= ruleValidID )
            // InternalSARL.g:16579:5: lv_name_0_0= ruleValidID
            {
            if ( state.backtracking==0 ) {

              					newCompositeNode(grammarAccess.getJvmTypeParameterAccess().getNameValidIDParserRuleCall_0_0());
              				
            }
            pushFollow(FOLLOW_155);
            lv_name_0_0=ruleValidID();

            state._fsp--;
            if (state.failed) return current;
            if ( state.backtracking==0 ) {

              					if (current==null) {
              						current = createModelElementForParent(grammarAccess.getJvmTypeParameterRule());
              					}
              					set(
              						current,
              						"name",
              						lv_name_0_0,
              						"org.eclipse.xtend.core.Xtend.ValidID");
              					afterParserOrEnumRuleCall();
              				
            }

            }


            }

            // InternalSARL.g:16596:3: ( ( (lv_constraints_1_0= ruleJvmUpperBound ) ) ( (lv_constraints_2_0= ruleJvmUpperBoundAnded ) )* )?
            int alt380=2;
            int LA380_0 = input.LA(1);

            if ( (LA380_0==28) ) {
                alt380=1;
            }
            switch (alt380) {
                case 1 :
                    // InternalSARL.g:16597:4: ( (lv_constraints_1_0= ruleJvmUpperBound ) ) ( (lv_constraints_2_0= ruleJvmUpperBoundAnded ) )*
                    {
                    // InternalSARL.g:16597:4: ( (lv_constraints_1_0= ruleJvmUpperBound ) )
                    // InternalSARL.g:16598:5: (lv_constraints_1_0= ruleJvmUpperBound )
                    {
                    // InternalSARL.g:16598:5: (lv_constraints_1_0= ruleJvmUpperBound )
                    // InternalSARL.g:16599:6: lv_constraints_1_0= ruleJvmUpperBound
                    {
                    if ( state.backtracking==0 ) {

                      						newCompositeNode(grammarAccess.getJvmTypeParameterAccess().getConstraintsJvmUpperBoundParserRuleCall_1_0_0());
                      					
                    }
                    pushFollow(FOLLOW_154);
                    lv_constraints_1_0=ruleJvmUpperBound();

                    state._fsp--;
                    if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      						if (current==null) {
                      							current = createModelElementForParent(grammarAccess.getJvmTypeParameterRule());
                      						}
                      						add(
                      							current,
                      							"constraints",
                      							lv_constraints_1_0,
                      							"org.eclipse.xtext.xbase.Xtype.JvmUpperBound");
                      						afterParserOrEnumRuleCall();
                      					
                    }

                    }


                    }

                    // InternalSARL.g:16616:4: ( (lv_constraints_2_0= ruleJvmUpperBoundAnded ) )*
                    loop379:
                    do {
                        int alt379=2;
                        int LA379_0 = input.LA(1);

                        if ( (LA379_0==144) ) {
                            alt379=1;
                        }


                        switch (alt379) {
                    	case 1 :
                    	    // InternalSARL.g:16617:5: (lv_constraints_2_0= ruleJvmUpperBoundAnded )
                    	    {
                    	    // InternalSARL.g:16617:5: (lv_constraints_2_0= ruleJvmUpperBoundAnded )
                    	    // InternalSARL.g:16618:6: lv_constraints_2_0= ruleJvmUpperBoundAnded
                    	    {
                    	    if ( state.backtracking==0 ) {

                    	      						newCompositeNode(grammarAccess.getJvmTypeParameterAccess().getConstraintsJvmUpperBoundAndedParserRuleCall_1_1_0());
                    	      					
                    	    }
                    	    pushFollow(FOLLOW_154);
                    	    lv_constraints_2_0=ruleJvmUpperBoundAnded();

                    	    state._fsp--;
                    	    if (state.failed) return current;
                    	    if ( state.backtracking==0 ) {

                    	      						if (current==null) {
                    	      							current = createModelElementForParent(grammarAccess.getJvmTypeParameterRule());
                    	      						}
                    	      						add(
                    	      							current,
                    	      							"constraints",
                    	      							lv_constraints_2_0,
                    	      							"org.eclipse.xtext.xbase.Xtype.JvmUpperBoundAnded");
                    	      						afterParserOrEnumRuleCall();
                    	      					
                    	    }

                    	    }


                    	    }
                    	    break;

                    	default :
                    	    break loop379;
                        }
                    } while (true);


                    }
                    break;

            }


            }


            }

            if ( state.backtracking==0 ) {

              	leaveRule();

            }
        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
1191960
public final EObject ruleXtendEnumLiteral() throws RecognitionException {
        EObject current = null;

        AntlrDatatypeRuleToken lv_name_1_0 = null;



        	enterRule();

        try {
            // InternalSARL.g:7417:2: ( ( () ( (lv_name_1_0= ruleValidID ) ) ) )
            // InternalSARL.g:7418:2: ( () ( (lv_name_1_0= ruleValidID ) ) )
            {
            // InternalSARL.g:7418:2: ( () ( (lv_name_1_0= ruleValidID ) ) )
            // InternalSARL.g:7419:3: () ( (lv_name_1_0= ruleValidID ) )
            {
            // InternalSARL.g:7419:3: ()
            // InternalSARL.g:7420:4: 
            {
            if ( state.backtracking==0 ) {

              				current = forceCreateModelElement(
              					grammarAccess.getXtendEnumLiteralAccess().getSarlEnumLiteralAction_0(),
              					current);
              			
            }

            }

            // InternalSARL.g:7426:3: ( (lv_name_1_0= ruleValidID ) )
            // InternalSARL.g:7427:4: (lv_name_1_0= ruleValidID )
            {
            // InternalSARL.g:7427:4: (lv_name_1_0= ruleValidID )
            // InternalSARL.g:7428:5: lv_name_1_0= ruleValidID
            {
            if ( state.backtracking==0 ) {

              					newCompositeNode(grammarAccess.getXtendEnumLiteralAccess().getNameValidIDParserRuleCall_1_0());
              				
            }
            pushFollow(FOLLOW_2);
            lv_name_1_0=ruleValidID();

            state._fsp--;
            if (state.failed) return current;
            if ( state.backtracking==0 ) {

              					if (current==null) {
              						current = createModelElementForParent(grammarAccess.getXtendEnumLiteralRule());
              					}
              					set(
              						current,
              						"name",
              						lv_name_1_0,
              						"org.eclipse.xtend.core.Xtend.ValidID");
              					afterParserOrEnumRuleCall();
              				
            }

            }


            }


            }


            }

            if ( state.backtracking==0 ) {

              	leaveRule();

            }
        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
615310
private short expectedExponent() {
        // since the log of 0, or the log base 0 of something, causes an
        // error, declare the exponent in these cases to be 0 (we also
        // deal with the special-rule identifiers here)
        if (radix == 0 || baseValue < 1) {
            return 0;
        }

        // we get rounding error in some cases-- for example, log 1000 / log 10
        // gives us 1.9999999996 instead of 2.  The extra logic here is to take
        // that into account
        short tempResult = (short)(Math.log(baseValue) / Math.log(radix));
        if (power(radix, (short)(tempResult + 1)) <= baseValue) {
            return (short)(tempResult + 1);
        } else {
            return tempResult;
        }
    }
800926
function CreateArithmeticGrammar(myna)  
{
    // Setup a shorthand for the Myna parsing library object
    let m = myna;    

    // Construct a grammar 
    let g = new function() 
    {
        // These are helper rules, they do not create nodes in the parse tree.  
        this.fraction       = m.seq(".", m.digit.zeroOrMore);    
        this.plusOrMinus    = m.char("+-");
        this.exponent       = m.seq(m.char("eE"), this.plusOrMinus.opt, m.digits); 
        this.comma          = m.text(",").ws;  
        
        // Using a lazy evaluation rule to allow recursive rule definitions  
        let _this = this; 
        this.expr = m.delay(function() { return _this.sum; });

        // The following rules create nodes in the abstract syntax tree 
        this.number     = m.seq(m.integer, this.fraction.opt, this.exponent.opt).ast;    
        this.parenExpr  = m.parenthesized(this.expr.ws).ast;
        this.leafExpr   = m.choice(this.parenExpr, this.number.ws);
        this.prefixOp   = this.plusOrMinus.ast;
        this.prefixExpr = m.seq(this.prefixOp.ws.zeroOrMore, this.leafExpr).ast;
        this.divExpr    = m.seq(m.char("/").ws, this.prefixExpr).ast;
        this.mulExpr    = m.seq(m.char("*").ws, this.prefixExpr).ast;
        this.product    = m.seq(this.prefixExpr.ws, this.mulExpr.or(this.divExpr).zeroOrMore).ast;
        this.subExpr    = m.seq(m.char("-").ws, this.product).ast;
        this.addExpr    = m.seq(m.char("+").ws, this.product).ast;
        this.sum        = m.seq(this.product, this.addExpr.or(this.subExpr).zeroOrMore).ast;
    };

    // Register the grammar, providing a name and the default parse rule
    return myna.registerGrammar("arithmetic", g, g.expr);
}
835771
public final void mAS() throws RecognitionException {
		try {
			int _type = AS;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// druidG.g:626:5: ( ( 'AS' | 'as' ) )
			// druidG.g:626:7: ( 'AS' | 'as' )
			{
			// druidG.g:626:7: ( 'AS' | 'as' )
			int alt15=2;
			int LA15_0 = input.LA(1);
			if ( (LA15_0=='A') ) {
				alt15=1;
			}
			else if ( (LA15_0=='a') ) {
				alt15=2;
			}

			else {
				NoViableAltException nvae =
					new NoViableAltException("", 15, 0, input);
				throw nvae;
			}

			switch (alt15) {
				case 1 :
					// druidG.g:626:8: 'AS'
					{
					match("AS"); 

					}
					break;
				case 2 :
					// druidG.g:626:13: 'as'
					{
					match("as"); 

					}
					break;

			}

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
777632
public final void mGREATER() throws RecognitionException {
		try {
			int _type = GREATER;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:226:5: ( '>' )
			// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:226:7: '>'
			{
			match('>'); if (state.failed) return;
			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
1026534
function parseDecimal(x, str) {
    var e, i, len;

    // Decimal point?
    if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');

    // Exponential form?
    if ((i = str.search(/e/i)) > 0) {

      // Determine exponent.
      if (e < 0) e = i;
      e += +str.slice(i + 1);
      str = str.substring(0, i);
    } else if (e < 0) {

      // Integer.
      e = str.length;
    }

    // Determine leading zeros.
    for (i = 0; str.charCodeAt(i) === 48;) ++i;

    // Determine trailing zeros.
    for (len = str.length; str.charCodeAt(len - 1) === 48;) --len;
    str = str.slice(i, len);

    if (str) {
      len -= i;
      e = e - i - 1;
      x.e = mathfloor(e / LOG_BASE);
      x.d = [];

      // Transform base

      // e is the base 10 exponent.
      // i is where to slice str to get the first word of the digits array.
      i = (e + 1) % LOG_BASE;
      if (e < 0) i += LOG_BASE;

      if (i < len) {
        if (i) x.d.push(+str.slice(0, i));
        for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));
        str = str.slice(i);
        i = LOG_BASE - str.length;
      } else {
        i -= len;
      }

      for (; i--;) str += '0';
      x.d.push(+str);

      if (external && (x.e > MAX_E || x.e < -MAX_E)) throw Error(exponentOutOfRange + e);
    } else {

      // Zero.
      x.s = 0;
      x.e = 0;
      x.d = [0];
    }

    return x;
  }
50630
public final void arguments() throws RecognitionException {
		Token LEFT_PAREN27=null;
		Token RIGHT_PAREN28=null;

		try {
			// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:673:5: ( LEFT_PAREN ( expressionList )? RIGHT_PAREN )
			// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:673:7: LEFT_PAREN ( expressionList )? RIGHT_PAREN
			{
			LEFT_PAREN27=(Token)match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_arguments4069); if (state.failed) return;
			if ( state.backtracking==0 ) { helper.emit(LEFT_PAREN27, DroolsEditorType.SYMBOL); }
			// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:674:9: ( expressionList )?
			int alt87=2;
			int LA87_0 = input.LA(1);
			if ( (LA87_0==BOOL||(LA87_0 >= DECIMAL && LA87_0 <= DECR)||LA87_0==FLOAT||LA87_0==HEX||(LA87_0 >= ID && LA87_0 <= INCR)||(LA87_0 >= LEFT_PAREN && LA87_0 <= LESS)||LA87_0==MINUS||LA87_0==NEGATION||LA87_0==NULL||LA87_0==PLUS||(LA87_0 >= STAR && LA87_0 <= TIME_INTERVAL)) ) {
				alt87=1;
			}
			switch (alt87) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:674:9: expressionList
					{
					pushFollow(FOLLOW_expressionList_in_arguments4081);
					expressionList();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}

			RIGHT_PAREN28=(Token)match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_arguments4092); if (state.failed) return;
			if ( state.backtracking==0 ) { helper.emit(RIGHT_PAREN28, DroolsEditorType.SYMBOL); }
			}

		}

		catch (RecognitionException re) {
		    throw re;
		}

		finally {
			// do for sure before leaving
		}
	}
1030636
private void parseAdditiveExpr() throws TTXPathException {

        parseMultiplicativeExpr();

        String op = mToken.getContent();
        while (is(TokenType.PLUS, true) || is(TokenType.MINUS, true)) {

            // identify current operator kind
            // for (Operators op : Operators.values()) {
            // if (is(op.getOpName(), true)) {

            // parse second operand axis

            mPipeBuilder.addExpressionSingle();

            parseMultiplicativeExpr();

            mPipeBuilder.addOperatorExpression(getTransaction(), op);
            op = mToken.getContent();
        }
        // }
        // }
    }
1219540
public final AntlrDatatypeRuleToken ruleOpMultiAssign() throws RecognitionException {
        AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();

        Token kw=null;


        	enterRule();

        try {
            // InternalXbaseWithAnnotations.g:767:2: ( (kw= '+=' | kw= '-=' | kw= '*=' | kw= '/=' | kw= '%=' | (kw= '<' kw= '<' kw= '=' ) | (kw= '>' (kw= '>' )? kw= '>=' ) ) )
            // InternalXbaseWithAnnotations.g:768:2: (kw= '+=' | kw= '-=' | kw= '*=' | kw= '/=' | kw= '%=' | (kw= '<' kw= '<' kw= '=' ) | (kw= '>' (kw= '>' )? kw= '>=' ) )
            {
            // InternalXbaseWithAnnotations.g:768:2: (kw= '+=' | kw= '-=' | kw= '*=' | kw= '/=' | kw= '%=' | (kw= '<' kw= '<' kw= '=' ) | (kw= '>' (kw= '>' )? kw= '>=' ) )
            int alt16=7;
            switch ( input.LA(1) ) {
            case 21:
                {
                alt16=1;
                }
                break;
            case 22:
                {
                alt16=2;
                }
                break;
            case 23:
                {
                alt16=3;
                }
                break;
            case 24:
                {
                alt16=4;
                }
                break;
            case 25:
                {
                alt16=5;
                }
                break;
            case 26:
                {
                alt16=6;
                }
                break;
            case 27:
                {
                alt16=7;
                }
                break;
            default:
                if (state.backtracking>0) {state.failed=true; return current;}
                NoViableAltException nvae =
                    new NoViableAltException("", 16, 0, input);

                throw nvae;
            }

            switch (alt16) {
                case 1 :
                    // InternalXbaseWithAnnotations.g:769:3: kw= '+='
                    {
                    kw=(Token)match(input,21,FOLLOW_2); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      			current.merge(kw);
                      			newLeafNode(kw, grammarAccess.getOpMultiAssignAccess().getPlusSignEqualsSignKeyword_0());
                      		
                    }

                    }
                    break;
                case 2 :
                    // InternalXbaseWithAnnotations.g:775:3: kw= '-='
                    {
                    kw=(Token)match(input,22,FOLLOW_2); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      			current.merge(kw);
                      			newLeafNode(kw, grammarAccess.getOpMultiAssignAccess().getHyphenMinusEqualsSignKeyword_1());
                      		
                    }

                    }
                    break;
                case 3 :
                    // InternalXbaseWithAnnotations.g:781:3: kw= '*='
                    {
                    kw=(Token)match(input,23,FOLLOW_2); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      			current.merge(kw);
                      			newLeafNode(kw, grammarAccess.getOpMultiAssignAccess().getAsteriskEqualsSignKeyword_2());
                      		
                    }

                    }
                    break;
                case 4 :
                    // InternalXbaseWithAnnotations.g:787:3: kw= '/='
                    {
                    kw=(Token)match(input,24,FOLLOW_2); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      			current.merge(kw);
                      			newLeafNode(kw, grammarAccess.getOpMultiAssignAccess().getSolidusEqualsSignKeyword_3());
                      		
                    }

                    }
                    break;
                case 5 :
                    // InternalXbaseWithAnnotations.g:793:3: kw= '%='
                    {
                    kw=(Token)match(input,25,FOLLOW_2); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      			current.merge(kw);
                      			newLeafNode(kw, grammarAccess.getOpMultiAssignAccess().getPercentSignEqualsSignKeyword_4());
                      		
                    }

                    }
                    break;
                case 6 :
                    // InternalXbaseWithAnnotations.g:799:3: (kw= '<' kw= '<' kw= '=' )
                    {
                    // InternalXbaseWithAnnotations.g:799:3: (kw= '<' kw= '<' kw= '=' )
                    // InternalXbaseWithAnnotations.g:800:4: kw= '<' kw= '<' kw= '='
                    {
                    kw=(Token)match(input,26,FOLLOW_15); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      				current.merge(kw);
                      				newLeafNode(kw, grammarAccess.getOpMultiAssignAccess().getLessThanSignKeyword_5_0());
                      			
                    }
                    kw=(Token)match(input,26,FOLLOW_8); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      				current.merge(kw);
                      				newLeafNode(kw, grammarAccess.getOpMultiAssignAccess().getLessThanSignKeyword_5_1());
                      			
                    }
                    kw=(Token)match(input,17,FOLLOW_2); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      				current.merge(kw);
                      				newLeafNode(kw, grammarAccess.getOpMultiAssignAccess().getEqualsSignKeyword_5_2());
                      			
                    }

                    }


                    }
                    break;
                case 7 :
                    // InternalXbaseWithAnnotations.g:817:3: (kw= '>' (kw= '>' )? kw= '>=' )
                    {
                    // InternalXbaseWithAnnotations.g:817:3: (kw= '>' (kw= '>' )? kw= '>=' )
                    // InternalXbaseWithAnnotations.g:818:4: kw= '>' (kw= '>' )? kw= '>='
                    {
                    kw=(Token)match(input,27,FOLLOW_16); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      				current.merge(kw);
                      				newLeafNode(kw, grammarAccess.getOpMultiAssignAccess().getGreaterThanSignKeyword_6_0());
                      			
                    }
                    // InternalXbaseWithAnnotations.g:823:4: (kw= '>' )?
                    int alt15=2;
                    int LA15_0 = input.LA(1);

                    if ( (LA15_0==27) ) {
                        alt15=1;
                    }
                    switch (alt15) {
                        case 1 :
                            // InternalXbaseWithAnnotations.g:824:5: kw= '>'
                            {
                            kw=(Token)match(input,27,FOLLOW_17); if (state.failed) return current;
                            if ( state.backtracking==0 ) {

                              					current.merge(kw);
                              					newLeafNode(kw, grammarAccess.getOpMultiAssignAccess().getGreaterThanSignKeyword_6_1());
                              				
                            }

                            }
                            break;

                    }

                    kw=(Token)match(input,28,FOLLOW_2); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      				current.merge(kw);
                      				newLeafNode(kw, grammarAccess.getOpMultiAssignAccess().getGreaterThanSignEqualsSignKeyword_6_2());
                      			
                    }

                    }


                    }
                    break;

            }


            }

            if ( state.backtracking==0 ) {

              	leaveRule();

            }
        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
1024180
def call_antlr4(arg):
    ""
    # pylint: disable=unused-argument, unused-variable
    antlr_path = os.path.join(ROOT_DIR, "java", "antlr-4.7-complete.jar")
    classpath = os.pathsep.join([".", "{:s}".format(antlr_path), "$CLASSPATH"])
    generated = os.path.join(ROOT_DIR, 'src', 'pymoca', 'generated')
    cmd = "java -Xmx500M -cp \"{classpath:s}\" org.antlr.v4.Tool {arg:s}" \
          " -o {generated:s} -visitor -Dlanguage=Python3".format(**locals())
    print(cmd)
    proc = subprocess.Popen(cmd.split(), cwd=os.path.join(ROOT_DIR, 'src', 'pymoca'))
    proc.communicate()
    with open(os.path.join(generated, '__init__.py'), 'w') as fid:
        fid.write('')
1028679
public final EObject ruleXNumberLiteral() throws RecognitionException {
        EObject current = null;

        AntlrDatatypeRuleToken lv_value_1_0 = null;



        	enterRule();

        try {
            // InternalPureXbase.g:5368:2: ( ( () ( (lv_value_1_0= ruleNumber ) ) ) )
            // InternalPureXbase.g:5369:2: ( () ( (lv_value_1_0= ruleNumber ) ) )
            {
            // InternalPureXbase.g:5369:2: ( () ( (lv_value_1_0= ruleNumber ) ) )
            // InternalPureXbase.g:5370:3: () ( (lv_value_1_0= ruleNumber ) )
            {
            // InternalPureXbase.g:5370:3: ()
            // InternalPureXbase.g:5371:4: 
            {
            if ( state.backtracking==0 ) {

              				current = forceCreateModelElement(
              					grammarAccess.getXNumberLiteralAccess().getXNumberLiteralAction_0(),
              					current);
              			
            }

            }

            // InternalPureXbase.g:5377:3: ( (lv_value_1_0= ruleNumber ) )
            // InternalPureXbase.g:5378:4: (lv_value_1_0= ruleNumber )
            {
            // InternalPureXbase.g:5378:4: (lv_value_1_0= ruleNumber )
            // InternalPureXbase.g:5379:5: lv_value_1_0= ruleNumber
            {
            if ( state.backtracking==0 ) {

              					newCompositeNode(grammarAccess.getXNumberLiteralAccess().getValueNumberParserRuleCall_1_0());
              				
            }
            pushFollow(FOLLOW_2);
            lv_value_1_0=ruleNumber();

            state._fsp--;
            if (state.failed) return current;
            if ( state.backtracking==0 ) {

              					if (current==null) {
              						current = createModelElementForParent(grammarAccess.getXNumberLiteralRule());
              					}
              					set(
              						current,
              						"value",
              						lv_value_1_0,
              						"org.eclipse.xtext.xbase.Xbase.Number");
              					afterParserOrEnumRuleCall();
              				
            }

            }


            }


            }


            }

            if ( state.backtracking==0 ) {

              	leaveRule();

            }
        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
1293053
public final void ruleXAdditiveExpression() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXbase.g:421:2: ( ( ( rule__XAdditiveExpression__Group__0 ) ) )
            // InternalXbase.g:422:2: ( ( rule__XAdditiveExpression__Group__0 ) )
            {
            // InternalXbase.g:422:2: ( ( rule__XAdditiveExpression__Group__0 ) )
            // InternalXbase.g:423:3: ( rule__XAdditiveExpression__Group__0 )
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getXAdditiveExpressionAccess().getGroup()); 
            }
            // InternalXbase.g:424:3: ( rule__XAdditiveExpression__Group__0 )
            // InternalXbase.g:424:4: rule__XAdditiveExpression__Group__0
            {
            pushFollow(FOLLOW_2);
            rule__XAdditiveExpression__Group__0();

            state._fsp--;
            if (state.failed) return ;

            }

            if ( state.backtracking==0 ) {
               after(grammarAccess.getXAdditiveExpressionAccess().getGroup()); 
            }

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
520310
public final AntlrDatatypeRuleToken ruleFieldModifier() throws RecognitionException {
        AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();

        Token kw=null;


        	enterRule();

        try {
            // InternalSARL.g:9770:2: ( (kw= 'val' | kw= 'var' ) )
            // InternalSARL.g:9771:2: (kw= 'val' | kw= 'var' )
            {
            // InternalSARL.g:9771:2: (kw= 'val' | kw= 'var' )
            int alt253=2;
            int LA253_0 = input.LA(1);

            if ( (LA253_0==66) ) {
                alt253=1;
            }
            else if ( (LA253_0==65) ) {
                alt253=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return current;}
                NoViableAltException nvae =
                    new NoViableAltException("", 253, 0, input);

                throw nvae;
            }
            switch (alt253) {
                case 1 :
                    // InternalSARL.g:9772:3: kw= 'val'
                    {
                    kw=(Token)match(input,66,FOLLOW_2); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      			current.merge(kw);
                      			newLeafNode(kw, grammarAccess.getFieldModifierAccess().getValKeyword_0());
                      		
                    }

                    }
                    break;
                case 2 :
                    // InternalSARL.g:9778:3: kw= 'var'
                    {
                    kw=(Token)match(input,65,FOLLOW_2); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      			current.merge(kw);
                      			newLeafNode(kw, grammarAccess.getFieldModifierAccess().getVarKeyword_1());
                      		
                    }

                    }
                    break;

            }


            }

            if ( state.backtracking==0 ) {

              	leaveRule();

            }
        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
1042450
public final void mEXPONENT() throws RecognitionException {
		try {
			// hql.g:871:2: ( ( 'e' ) ( '+' | '-' )? ( '0' .. '9' )+ )
			// hql.g:871:4: ( 'e' ) ( '+' | '-' )? ( '0' .. '9' )+
			{
			// hql.g:871:4: ( 'e' )
			// hql.g:871:5: 'e'
			{
			match('e'); if (state.failed) return;
			}

			// hql.g:871:10: ( '+' | '-' )?
			int alt21=2;
			int LA21_0 = input.LA(1);
			if ( (LA21_0=='+'||LA21_0=='-') ) {
				alt21=1;
			}
			switch (alt21) {
				case 1 :
					// hql.g:
					{
					if ( input.LA(1)=='+'||input.LA(1)=='-' ) {
						input.consume();
						state.failed=false;
					}
					else {
						if (state.backtracking>0) {state.failed=true; return;}
						MismatchedSetException mse = new MismatchedSetException(null,input);
						recover(mse);
						throw mse;
					}
					}
					break;

			}

			// hql.g:871:21: ( '0' .. '9' )+
			int cnt22=0;
			loop22:
			while (true) {
				int alt22=2;
				int LA22_0 = input.LA(1);
				if ( ((LA22_0 >= '0' && LA22_0 <= '9')) ) {
					alt22=1;
				}

				switch (alt22) {
				case 1 :
					// hql.g:
					{
					if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
						input.consume();
						state.failed=false;
					}
					else {
						if (state.backtracking>0) {state.failed=true; return;}
						MismatchedSetException mse = new MismatchedSetException(null,input);
						recover(mse);
						throw mse;
					}
					}
					break;

				default :
					if ( cnt22 >= 1 ) break loop22;
					if (state.backtracking>0) {state.failed=true; return;}
					EarlyExitException eee = new EarlyExitException(22, input);
					throw eee;
				}
				cnt22++;
			}

			}

		}
		finally {
			// do for sure before leaving
		}
	}