$ANTLR start synpred12_DRL6Expressions
195679
public final void synpred12_DRL6Expressions_fragment() throws RecognitionException {
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:438:8: ( squareArguments shiftExpression )
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:438:9: squareArguments shiftExpression
		{
		pushFollow(FOLLOW_squareArguments_in_synpred12_DRL6Expressions2066);
		squareArguments();
		state._fsp--;
		if (state.failed) return;
		pushFollow(FOLLOW_shiftExpression_in_synpred12_DRL6Expressions2068);
		shiftExpression();
		state._fsp--;
		if (state.failed) return;
		}

	}
87100
public final void synpred16_DRL5Expressions_fragment() throws RecognitionException {
		// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:517:10: ( INCR | DECR )
		// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:
		{
		if ( input.LA(1)==DECR||input.LA(1)==INCR ) {
			input.consume();
			state.errorRecovery=false;
			state.failed=false;
		}
		else {
			if (state.backtracking>0) {state.failed=true; return;}
			MismatchedSetException mse = new MismatchedSetException(null,input);
			throw mse;
		}
		}

	}
968094
public final void synpred38_DRL5Expressions_fragment() throws RecognitionException {
		// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:654:9: ( DOT ID )
		// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:654:10: DOT ID
		{
		match(input,DOT,FOLLOW_DOT_in_synpred38_DRL5Expressions3848); if (state.failed) return;
		match(input,ID,FOLLOW_ID_in_synpred38_DRL5Expressions3850); if (state.failed) return;
		}

	}
553148
public final void synpred8_DRL6Expressions_fragment() throws RecognitionException {
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:337:6: ( not_key in_key )
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:337:7: not_key in_key
		{
		pushFollow(FOLLOW_not_key_in_synpred8_DRL6Expressions1629);
		not_key();
		state._fsp--;
		if (state.failed) return;
		pushFollow(FOLLOW_in_key_in_synpred8_DRL6Expressions1631);
		in_key();
		state._fsp--;
		if (state.failed) return;
		}

	}
294426
public final void synpred2_DRL6Expressions_fragment() throws RecognitionException {
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:138:44: ( LEFT_SQUARE RIGHT_SQUARE )
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:138:45: LEFT_SQUARE RIGHT_SQUARE
		{
		match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred2_DRL6Expressions559); if (state.failed) return;
		match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_synpred2_DRL6Expressions561); if (state.failed) return;
		}

	}
515550
public final void synpred48_DRL6Expressions_fragment() throws RecognitionException {
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:741:7: ( GREATER GREATER )
		// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:741:8: GREATER GREATER
		{
		match(input,GREATER,FOLLOW_GREATER_in_synpred48_DRL6Expressions4697); if (state.failed) return;
		match(input,GREATER,FOLLOW_GREATER_in_synpred48_DRL6Expressions4699); if (state.failed) return;
		}

	}
126694
public final void synpred38_InternalSARL_fragment() throws RecognitionException {   
        // InternalSARL.g:12983:6: ( ( '<' '<' ) )
        // InternalSARL.g:12983:7: ( '<' '<' )
        {
        // InternalSARL.g:12983:7: ( '<' '<' )
        // InternalSARL.g:12984:7: '<' '<'
        {
        match(input,40,FOLLOW_91); if (state.failed) return ;
        match(input,40,FOLLOW_2); if (state.failed) return ;

        }


        }
    }
441245
public final void synpred20_InternalXbase_fragment() throws RecognitionException {   
        // InternalXbase.g:2096:4: ( ( () 'for' '(' ( ( ruleJvmFormalParameter ) ) ':' ) )
        // InternalXbase.g:2096:5: ( () 'for' '(' ( ( ruleJvmFormalParameter ) ) ':' )
        {
        // InternalXbase.g:2096:5: ( () 'for' '(' ( ( ruleJvmFormalParameter ) ) ':' )
        // InternalXbase.g:2097:5: () 'for' '(' ( ( ruleJvmFormalParameter ) ) ':'
        {
        // InternalXbase.g:2097:5: ()
        // InternalXbase.g:2098:5: 
        {
        }

        match(input,64,FOLLOW_44); if (state.failed) return ;
        match(input,49,FOLLOW_13); if (state.failed) return ;
        // InternalXbase.g:2101:5: ( ( ruleJvmFormalParameter ) )
        // InternalXbase.g:2102:6: ( ruleJvmFormalParameter )
        {
        // InternalXbase.g:2102:6: ( ruleJvmFormalParameter )
        // InternalXbase.g:2103:7: ruleJvmFormalParameter
        {
        pushFollow(FOLLOW_47);
        ruleJvmFormalParameter();

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

        }


        }

        match(input,61,FOLLOW_2); if (state.failed) return ;

        }


        }
    }
834878
public final void synpred8_DSLMap_fragment() throws RecognitionException {
		ParserRuleReturnScope value3 =null;


		// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:134:11: (value3= keyword_key )
		// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:134:11: value3= keyword_key
		{
		pushFollow(FOLLOW_keyword_key_in_synpred8_DSLMap453);
		value3=keyword_key();
		state._fsp--;
		if (state.failed) return;

		}

	}
939524
public final void synpred228_Java_fragment() throws RecognitionException {
		// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1183:18: ( '>' '>' '>' )
		// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1183:18: '>' '>' '>'
		{
		match(input,56,FOLLOW_56_in_synpred228_Java5379); if (state.failed) return;
		match(input,56,FOLLOW_56_in_synpred228_Java5381); if (state.failed) return;
		match(input,56,FOLLOW_56_in_synpred228_Java5383); if (state.failed) return;
		}

	}
438447
public final void synpred28_DSLMap_fragment() throws RecognitionException {
		// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:224:13: ( LEFT_SQUARE pattern RIGHT_SQUARE )
		// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:224:13: LEFT_SQUARE pattern RIGHT_SQUARE
		{
		match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred28_DSLMap1350); if (state.failed) return;

		pushFollow(FOLLOW_pattern_in_synpred28_DSLMap1352);
		pattern();
		state._fsp--;
		if (state.failed) return;

		match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_synpred28_DSLMap1354); if (state.failed) return;

		}

	}
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('')
7241
public final void synpred7_InternalSARL_fragment() throws RecognitionException {   
        // InternalSARL.g:7866:4: ( ( () 'for' '(' ( ( ruleSarlXLoopFormalParameter ) ) ':' ) )
        // InternalSARL.g:7866:5: ( () 'for' '(' ( ( ruleSarlXLoopFormalParameter ) ) ':' )
        {
        // InternalSARL.g:7866:5: ( () 'for' '(' ( ( ruleSarlXLoopFormalParameter ) ) ':' )
        // InternalSARL.g:7867:5: () 'for' '(' ( ( ruleSarlXLoopFormalParameter ) ) ':'
        {
        // InternalSARL.g:7867:5: ()
        // InternalSARL.g:7868:5: 
        {
        }

        match(input,67,FOLLOW_80); if (state.failed) return ;
        match(input,49,FOLLOW_75); if (state.failed) return ;
        // InternalSARL.g:7871:5: ( ( ruleSarlXLoopFormalParameter ) )
        // InternalSARL.g:7872:6: ( ruleSarlXLoopFormalParameter )
        {
        // InternalSARL.g:7872:6: ( ruleSarlXLoopFormalParameter )
        // InternalSARL.g:7873:7: ruleSarlXLoopFormalParameter
        {
        pushFollow(FOLLOW_40);
        ruleSarlXLoopFormalParameter();

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

        }


        }

        match(input,46,FOLLOW_2); if (state.failed) return ;

        }


        }
    }
1339270
public final void creator() throws RecognitionException {
		try {
			// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:649:5: ( ( nonWildcardTypeArguments )? createdName ( arrayCreatorRest | classCreatorRest ) )
			// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:649:7: ( nonWildcardTypeArguments )? createdName ( arrayCreatorRest | classCreatorRest )
			{
			// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:649:7: ( nonWildcardTypeArguments )?
			int alt74=2;
			int LA74_0 = input.LA(1);
			if ( (LA74_0==LESS) ) {
				alt74=1;
			}
			switch (alt74) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:649:7: nonWildcardTypeArguments
					{
					pushFollow(FOLLOW_nonWildcardTypeArguments_in_creator3871);
					nonWildcardTypeArguments();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}

			pushFollow(FOLLOW_createdName_in_creator3874);
			createdName();
			state._fsp--;
			if (state.failed) return;
			// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:650:9: ( arrayCreatorRest | classCreatorRest )
			int alt75=2;
			int LA75_0 = input.LA(1);
			if ( (LA75_0==LEFT_SQUARE) ) {
				alt75=1;
			}
			else if ( (LA75_0==LEFT_PAREN) ) {
				alt75=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 75, 0, input);
				throw nvae;
			}

			switch (alt75) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:650:10: arrayCreatorRest
					{
					pushFollow(FOLLOW_arrayCreatorRest_in_creator3885);
					arrayCreatorRest();
					state._fsp--;
					if (state.failed) return;
					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:650:29: classCreatorRest
					{
					pushFollow(FOLLOW_classCreatorRest_in_creator3889);
					classCreatorRest();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}

			}

		}

		catch (RecognitionException re) {
		    throw re;
		}

		finally {
			// do for sure before leaving
		}
	}
681918
public void mTokens() throws RecognitionException {
        // /home/victor/srec/core/src/main/antlr/srec.g:1:8: ( T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | BOOLEAN | NULL | ID | NUMBER | STRING | WS | NEWLINE | COMMENT )
        int alt12=15;
        alt12 = dfa12.predict(input);
        switch (alt12) {
            case 1 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:10: T__28
                {
                mT__28(); 

                }
                break;
            case 2 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:16: T__29
                {
                mT__29(); 

                }
                break;
            case 3 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:22: T__30
                {
                mT__30(); 

                }
                break;
            case 4 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:28: T__31
                {
                mT__31(); 

                }
                break;
            case 5 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:34: T__32
                {
                mT__32(); 

                }
                break;
            case 6 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:40: T__33
                {
                mT__33(); 

                }
                break;
            case 7 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:46: T__34
                {
                mT__34(); 

                }
                break;
            case 8 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:52: BOOLEAN
                {
                mBOOLEAN(); 

                }
                break;
            case 9 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:60: NULL
                {
                mNULL(); 

                }
                break;
            case 10 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:65: ID
                {
                mID(); 

                }
                break;
            case 11 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:68: NUMBER
                {
                mNUMBER(); 

                }
                break;
            case 12 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:75: STRING
                {
                mSTRING(); 

                }
                break;
            case 13 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:82: WS
                {
                mWS(); 

                }
                break;
            case 14 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:85: NEWLINE
                {
                mNEWLINE(); 

                }
                break;
            case 15 :
                // /home/victor/srec/core/src/main/antlr/srec.g:1:93: COMMENT
                {
                mCOMMENT(); 

                }
                break;

        }

    }
105697
public final void synpred53_InternalSARL_fragment() throws RecognitionException {   
        // InternalSARL.g:15000:6: ( ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) ) )
        // InternalSARL.g:15000:7: ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) )
        {
        // InternalSARL.g:15000:7: ( () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) ) )
        // InternalSARL.g:15001:7: () ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )? ( ( '|' ) )
        {
        // InternalSARL.g:15001:7: ()
        // InternalSARL.g:15002:7: 
        {
        }

        // InternalSARL.g:15003:7: ( ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )* )?
        int alt406=2;
        int LA406_0 = input.LA(1);

        if ( (LA406_0==RULE_ID||(LA406_0>=44 && LA406_0<=45)||(LA406_0>=92 && LA406_0<=95)) ) {
            alt406=1;
        }
        switch (alt406) {
            case 1 :
                // InternalSARL.g:15004:8: ( ( ruleJvmFormalParameter ) ) ( ',' ( ( ruleJvmFormalParameter ) ) )*
                {
                // InternalSARL.g:15004:8: ( ( ruleJvmFormalParameter ) )
                // InternalSARL.g:15005:9: ( ruleJvmFormalParameter )
                {
                // InternalSARL.g:15005:9: ( ruleJvmFormalParameter )
                // InternalSARL.g:15006:10: ruleJvmFormalParameter
                {
                pushFollow(FOLLOW_134);
                ruleJvmFormalParameter();

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

                }


                }

                // InternalSARL.g:15009:8: ( ',' ( ( ruleJvmFormalParameter ) ) )*
                loop405:
                do {
                    int alt405=2;
                    int LA405_0 = input.LA(1);

                    if ( (LA405_0==32) ) {
                        alt405=1;
                    }


                    switch (alt405) {
                	case 1 :
                	    // InternalSARL.g:15010:9: ',' ( ( ruleJvmFormalParameter ) )
                	    {
                	    match(input,32,FOLLOW_75); if (state.failed) return ;
                	    // InternalSARL.g:15011:9: ( ( ruleJvmFormalParameter ) )
                	    // InternalSARL.g:15012:10: ( ruleJvmFormalParameter )
                	    {
                	    // InternalSARL.g:15012:10: ( ruleJvmFormalParameter )
                	    // InternalSARL.g:15013:11: ruleJvmFormalParameter
                	    {
                	    pushFollow(FOLLOW_134);
                	    ruleJvmFormalParameter();

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

                	    }


                	    }


                	    }
                	    break;

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


                }
                break;

        }

        // InternalSARL.g:15018:7: ( ( '|' ) )
        // InternalSARL.g:15019:8: ( '|' )
        {
        // InternalSARL.g:15019:8: ( '|' )
        // InternalSARL.g:15020:9: '|'
        {
        match(input,97,FOLLOW_2); if (state.failed) return ;

        }


        }


        }


        }
    }
1067194
public final void synpred29_InternalSARL_fragment() throws RecognitionException {   
        // InternalSARL.g:11886:5: ( ( () '#' '[' ) )
        // InternalSARL.g:11886:6: ( () '#' '[' )
        {
        // InternalSARL.g:11886:6: ( () '#' '[' )
        // InternalSARL.g:11887:6: () '#' '['
        {
        // InternalSARL.g:11887:6: ()
        // InternalSARL.g:11888:6: 
        {
        }

        match(input,106,FOLLOW_90); if (state.failed) return ;
        match(input,55,FOLLOW_2); if (state.failed) return ;

        }


        }
    }