/* (non-Javadoc)
@see org.antlr.v4.runtime.ANTLRErrorListener#reportAttemptingFullContext(org.antlr.v4.runtime.Parser, org.antlr.v4.runtime.dfa.DFA, int, int, java.util.BitSet, org.antlr.v4.runtime.atn.ATNConfigSet)
19371
@Override
	public void reportAttemptingFullContext(Parser recognizer, DFA dfa, int startIndex, int stopIndex,
			BitSet conflictingAlts, ATNConfigSet configs) {
		
	}
24920
protected final void readEndElem()
        throws XMLStreamException
    {
        mTokenState = TOKEN_FULL_COALESCED; // will be read completely

        if (mElementStack.isEmpty()) {
            // Let's just offline this for clarity
            reportExtraEndElem();
            return; // never gets here
        }

        char c = (mInputPtr < mInputEnd) ? mInputBuffer[mInputPtr++]
            : getNextCharFromCurrent(SUFFIX_IN_CLOSE_ELEMENT);
        // Quick check first; missing name?
        if  (!isNameStartChar(c) && c != ':') {
            if (c <= CHAR_SPACE) { // space
                throwUnexpectedChar(c, "; missing element name?");
            }
            throwUnexpectedChar(c, "; expected an element name.");
        }

        /* Ok, now; good thing is we know exactly what to compare
         * against...
         */
        String expPrefix = mElementStack.getPrefix();
        String expLocalName = mElementStack.getLocalName();

        // Prefix to match?
        if (expPrefix != null && expPrefix.length() > 0) {
            int len = expPrefix.length();
            int i = 0;

            while (true){
                if (c != expPrefix.charAt(i)) {
                    reportWrongEndPrefix(expPrefix, expLocalName, i);
                    return; // never gets here
                }
                if (++i >= len) {
                    break;
                }
                c = (mInputPtr < mInputEnd) ? mInputBuffer[mInputPtr++]
                    : getNextCharFromCurrent(SUFFIX_IN_CLOSE_ELEMENT);
            }
            // And then we should get a colon
            c = (mInputPtr < mInputEnd) ? mInputBuffer[mInputPtr++]
                : getNextCharFromCurrent(SUFFIX_IN_CLOSE_ELEMENT);
            if (c != ':') {
                reportWrongEndPrefix(expPrefix, expLocalName, i);
                return;
            }
            c = (mInputPtr < mInputEnd) ? mInputBuffer[mInputPtr++]
                : getNextCharFromCurrent(SUFFIX_IN_CLOSE_ELEMENT);
        }

        // Ok, then, does the local name match?
        int len = expLocalName.length();
        int i = 0;
        
        while (true){
            if (c != expLocalName.charAt(i)) {
                // Not a match...
                reportWrongEndElem(expPrefix, expLocalName, i);
                return; // never gets here
            }
            if (++i >= len) {
                break;
            }
            c = (mInputPtr < mInputEnd) ? mInputBuffer[mInputPtr++]
                : getNextCharFromCurrent(SUFFIX_IN_CLOSE_ELEMENT);
        }

        // Let's see if end element still continues, however?
        c = (mInputPtr < mInputEnd) ? mInputBuffer[mInputPtr++]
            : getNextCharFromCurrent(SUFFIX_IN_CLOSE_ELEMENT);
        if (c <= CHAR_SPACE) {
            c = getNextInCurrAfterWS(SUFFIX_IN_CLOSE_ELEMENT, c);
        } else if (c == '>') {
            ;
        } else if (c == ':' || isNameChar(c)) {
            reportWrongEndElem(expPrefix, expLocalName, len);
        }

        // Ok, fine, match ok; now we just need the closing gt char.
        if (c != '>') {
            throwUnexpectedChar(c, SUFFIX_IN_CLOSE_ELEMENT+" Expected '>'.");
        }

        // Finally, let's let validator detect if things are ok
        int vld = mElementStack.validateEndElement();
        mVldContent = vld;
        mValidateText = (vld == XMLValidator.CONTENT_ALLOW_VALIDATABLE_TEXT);

        // Plus verify WFC that start and end tags came from same entity
        /* 13-Feb-2006, TSa: Are we about to close an element that
         *    started within a parent element?
         *    That's a GE/element nesting WFC violation...
         */
        if (mCurrDepth == mInputTopDepth) {
            handleGreedyEntityProblem(mInput);
        }
        --mCurrDepth;
    }
963518
protected void reportInvalidContent(int evtType)
        throws XMLStreamException
    {
        switch (mVldContent) {
        case XMLValidator.CONTENT_ALLOW_NONE:
            reportValidationProblem(ErrorConsts.ERR_VLD_EMPTY,
                                    getTopElementDesc(),
                                    ErrorConsts.tokenTypeDesc(evtType));
            break;
        case XMLValidator.CONTENT_ALLOW_WS:
            reportValidationProblem(ErrorConsts.ERR_VLD_NON_MIXED,
                                    getTopElementDesc());
            break;
        case XMLValidator.CONTENT_ALLOW_VALIDATABLE_TEXT:
        case XMLValidator.CONTENT_ALLOW_ANY_TEXT:
            /* Not 100% sure if this should ever happen... depends on
             * interpretation of 'any' content model?
             */
            reportValidationProblem(ErrorConsts.ERR_VLD_ANY,
                                    getTopElementDesc(),
                                    ErrorConsts.tokenTypeDesc(evtType));
            break;
        default: // should never occur:
            reportValidationProblem("Internal error: trying to report invalid content for "+evtType);
        }
    }
1267407
protected void Literal() throws javax.xml.transform.TransformerException
  {

    int last = m_token.length() - 1;
    char c0 = m_tokenChar;
    char cX = m_token.charAt(last);

    if (((c0 == '\"') && (cX == '\"')) || ((c0 == '\'') && (cX == '\'')))
    {

      // Mutate the token to remove the quotes and have the XString object
      // already made.
      int tokenQueuePos = m_queueMark - 1;

      m_ops.m_tokenQueue.setElementAt(null,tokenQueuePos);

      Object obj = new XString(m_token.substring(1, last));

      m_ops.m_tokenQueue.setElementAt(obj,tokenQueuePos);

      // lit = m_token.substring(1, last);
      m_ops.setOp(m_ops.getOp(OpMap.MAPINDEX_LENGTH), tokenQueuePos);
      m_ops.setOp(OpMap.MAPINDEX_LENGTH, m_ops.getOp(OpMap.MAPINDEX_LENGTH) + 1);

      nextToken();
    }
    else
    {
      error(XPATHErrorResources.ER_PATTERN_LITERAL_NEEDS_BE_QUOTED,
            new Object[]{ m_token });  //"Pattern literal ("+m_token+") needs to be quoted!");
    }
  }
511965
def __do_parse(self, pattern_str):
        
        in_ = antlr4.InputStream(pattern_str)
        lexer = STIXPatternLexer(in_)
        lexer.removeErrorListeners()  # remove the default "console" listener
        token_stream = antlr4.CommonTokenStream(lexer)

        parser = STIXPatternParser(token_stream)
        parser.removeErrorListeners()  # remove the default "console" listener
        error_listener = ParserErrorListener()
        parser.addErrorListener(error_listener)

        # I found no public API for this...
        # The default error handler tries to keep parsing, and I don't
        # think that's appropriate here.  (These error handlers are only for
        # handling the built-in RecognitionException errors.)
        parser._errHandler = antlr4.BailErrorStrategy()

        # To improve error messages, replace "<INVALID>" in the literal
        # names with symbolic names.  This is a hack, but seemed like
        # the simplest workaround.
        for i, lit_name in enumerate(parser.literalNames):
            if lit_name == u"<INVALID>":
                parser.literalNames[i] = parser.symbolicNames[i]

        # parser.setTrace(True)

        try:
            tree = parser.pattern()
            # print(tree.toStringTree(recog=parser))

            return tree
        except antlr4.error.Errors.ParseCancellationException as e:
            # The cancellation exception wraps the real RecognitionException
            # which caused the parser to bail.
            real_exc = e.args[0]

            # I want to bail when the first error is hit.  But I also want
            # a decent error message.  When an error is encountered in
            # Parser.match(), the BailErrorStrategy produces the
            # ParseCancellationException.  It is not a subclass of
            # RecognitionException, so none of the 'except' clauses which would
            # normally report an error are invoked.
            #
            # Error message creation is buried in the ErrorStrategy, and I can
            # (ab)use the API to get a message: register an error listener with
            # the parser, force an error report, then get the message out of the
            # listener.  Error listener registration is above; now we force its
            # invocation.  Wish this could be cleaner...
            parser._errHandler.reportError(parser, real_exc)

            # should probably chain exceptions if we can...
            # Should I report the cancellation or recognition exception as the
            # cause...?
            six.raise_from(ParseException(error_listener.error_message),
                           real_exc)
826776
public boolean failedWithUnexpectedEOF() {
        // Implementation note - there are several ways for the Groovy compiler
        // to report an unexpected EOF. Perhaps this implementation misses some.
        // If you find another way, please add it.
        if (getErrorCollector().hasErrors()) {
            Message last = (Message) getErrorCollector().getLastError();
            Throwable cause = null;
            if (last instanceof SyntaxErrorMessage) {
                cause = ((SyntaxErrorMessage) last).getCause().getCause();
            }
            if (cause != null) {
                if (cause instanceof NoViableAltException) {
                    return isEofToken(((NoViableAltException) cause).token);
                } else if (cause instanceof NoViableAltForCharException) {
                    char badChar = ((NoViableAltForCharException) cause).foundChar;
                    return badChar == CharScanner.EOF_CHAR;
                } else if (cause instanceof MismatchedCharException) {
                    char badChar = (char) ((MismatchedCharException) cause).foundChar;
                    return badChar == CharScanner.EOF_CHAR;
                } else if (cause instanceof MismatchedTokenException) {
                    return isEofToken(((MismatchedTokenException) cause).token);
                }
            }
        }
        return false;
    }
1369359
public final void mSTRING() throws RecognitionException {
        try {
            int _type = STRING;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/victor/srec/core/src/main/antlr/srec.g:142:2: ( '\"' ( . )* '\"' | '\\'' ( . )* '\\'' )
            int alt6=2;
            int LA6_0 = input.LA(1);

            if ( (LA6_0=='\"') ) {
                alt6=1;
            }
            else if ( (LA6_0=='\'') ) {
                alt6=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 6, 0, input);

                throw nvae;
            }
            switch (alt6) {
                case 1 :
                    // /home/victor/srec/core/src/main/antlr/srec.g:142:4: '\"' ( . )* '\"'
                    {
                    match('\"'); 
                    // /home/victor/srec/core/src/main/antlr/srec.g:142:8: ( . )*
                    loop4:
                    do {
                        int alt4=2;
                        int LA4_0 = input.LA(1);

                        if ( (LA4_0=='\"') ) {
                            alt4=2;
                        }
                        else if ( ((LA4_0>='\u0000' && LA4_0<='!')||(LA4_0>='#' && LA4_0<='\uFFFF')) ) {
                            alt4=1;
                        }


                        switch (alt4) {
                    	case 1 :
                    	    // /home/victor/srec/core/src/main/antlr/srec.g:142:8: .
                    	    {
                    	    matchAny(); 

                    	    }
                    	    break;

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

                    match('\"'); 
                    setText(getText().substring(1, getText().length()-1));

                    }
                    break;
                case 2 :
                    // /home/victor/srec/core/src/main/antlr/srec.g:143:4: '\\'' ( . )* '\\''
                    {
                    match('\''); 
                    // /home/victor/srec/core/src/main/antlr/srec.g:143:9: ( . )*
                    loop5:
                    do {
                        int alt5=2;
                        int LA5_0 = input.LA(1);

                        if ( (LA5_0=='\'') ) {
                            alt5=2;
                        }
                        else if ( ((LA5_0>='\u0000' && LA5_0<='&')||(LA5_0>='(' && LA5_0<='\uFFFF')) ) {
                            alt5=1;
                        }


                        switch (alt5) {
                    	case 1 :
                    	    // /home/victor/srec/core/src/main/antlr/srec.g:143:9: .
                    	    {
                    	    matchAny(); 

                    	    }
                    	    break;

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

                    match('\''); 
                    setText(getText().substring(1, getText().length()-1));

                    }
                    break;

            }
            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
1373241
public final void ruleXAnnotationElementValue() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXbaseWithAnnotations.g:146:2: ( ( ( rule__XAnnotationElementValue__Alternatives ) ) )
            // InternalXbaseWithAnnotations.g:147:2: ( ( rule__XAnnotationElementValue__Alternatives ) )
            {
            // InternalXbaseWithAnnotations.g:147:2: ( ( rule__XAnnotationElementValue__Alternatives ) )
            // InternalXbaseWithAnnotations.g:148:3: ( rule__XAnnotationElementValue__Alternatives )
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getXAnnotationElementValueAccess().getAlternatives()); 
            }
            // InternalXbaseWithAnnotations.g:149:3: ( rule__XAnnotationElementValue__Alternatives )
            // InternalXbaseWithAnnotations.g:149:4: rule__XAnnotationElementValue__Alternatives
            {
            pushFollow(FOLLOW_2);
            rule__XAnnotationElementValue__Alternatives();

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

            }

            if ( state.backtracking==0 ) {
               after(grammarAccess.getXAnnotationElementValueAccess().getAlternatives()); 
            }

            }


            }

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

            	restoreStackSize(stackSize);

        }
        return ;
    }
715995
public final AntlrDatatypeRuleToken ruleQualifiedNameInStaticImport() throws RecognitionException {
        AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();

        Token kw=null;
        AntlrDatatypeRuleToken this_ValidID_0 = null;



        	enterRule();

        try {
            // InternalXtype.g:1034:2: ( (this_ValidID_0= ruleValidID kw= '.' )+ )
            // InternalXtype.g:1035:2: (this_ValidID_0= ruleValidID kw= '.' )+
            {
            // InternalXtype.g:1035:2: (this_ValidID_0= ruleValidID kw= '.' )+
            int cnt20=0;
            loop20:
            do {
                int alt20=2;
                int LA20_0 = input.LA(1);

                if ( (LA20_0==RULE_ID) ) {
                    int LA20_2 = input.LA(2);

                    if ( (LA20_2==18) ) {
                        alt20=1;
                    }


                }


                switch (alt20) {
            	case 1 :
            	    // InternalXtype.g:1036:3: this_ValidID_0= ruleValidID kw= '.'
            	    {
            	    if ( state.backtracking==0 ) {

            	      			newCompositeNode(grammarAccess.getQualifiedNameInStaticImportAccess().getValidIDParserRuleCall_0());
            	      		
            	    }
            	    pushFollow(FOLLOW_17);
            	    this_ValidID_0=ruleValidID();

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

            	      			current.merge(this_ValidID_0);
            	      		
            	    }
            	    if ( state.backtracking==0 ) {

            	      			afterParserOrEnumRuleCall();
            	      		
            	    }
            	    kw=(Token)match(input,18,FOLLOW_23); if (state.failed) return current;
            	    if ( state.backtracking==0 ) {

            	      			current.merge(kw);
            	      			newLeafNode(kw, grammarAccess.getQualifiedNameInStaticImportAccess().getFullStopKeyword_1());
            	      		
            	    }

            	    }
            	    break;

            	default :
            	    if ( cnt20 >= 1 ) break loop20;
            	    if (state.backtracking>0) {state.failed=true; return current;}
                        EarlyExitException eee =
                            new EarlyExitException(20, input);
                        throw eee;
                }
                cnt20++;
            } while (true);


            }

            if ( state.backtracking==0 ) {

              	leaveRule();

            }
        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
686011
public final AntlrDatatypeRuleToken ruleQualifiedNameInStaticImport() throws RecognitionException {
        AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();

        Token kw=null;
        AntlrDatatypeRuleToken this_ValidID_0 = null;



        	enterRule();

        try {
            // InternalXbase.g:6329:2: ( (this_ValidID_0= ruleValidID kw= '.' )+ )
            // InternalXbase.g:6330:2: (this_ValidID_0= ruleValidID kw= '.' )+
            {
            // InternalXbase.g:6330:2: (this_ValidID_0= ruleValidID kw= '.' )+
            int cnt110=0;
            loop110:
            do {
                int alt110=2;
                int LA110_0 = input.LA(1);

                if ( (LA110_0==RULE_ID) ) {
                    int LA110_2 = input.LA(2);

                    if ( (LA110_2==45) ) {
                        alt110=1;
                    }


                }


                switch (alt110) {
            	case 1 :
            	    // InternalXbase.g:6331:3: this_ValidID_0= ruleValidID kw= '.'
            	    {
            	    if ( state.backtracking==0 ) {

            	      			newCompositeNode(grammarAccess.getQualifiedNameInStaticImportAccess().getValidIDParserRuleCall_0());
            	      		
            	    }
            	    pushFollow(FOLLOW_78);
            	    this_ValidID_0=ruleValidID();

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

            	      			current.merge(this_ValidID_0);
            	      		
            	    }
            	    if ( state.backtracking==0 ) {

            	      			afterParserOrEnumRuleCall();
            	      		
            	    }
            	    kw=(Token)match(input,45,FOLLOW_84); if (state.failed) return current;
            	    if ( state.backtracking==0 ) {

            	      			current.merge(kw);
            	      			newLeafNode(kw, grammarAccess.getQualifiedNameInStaticImportAccess().getFullStopKeyword_1());
            	      		
            	    }

            	    }
            	    break;

            	default :
            	    if ( cnt110 >= 1 ) break loop110;
            	    if (state.backtracking>0) {state.failed=true; return current;}
                        EarlyExitException eee =
                            new EarlyExitException(110, input);
                        throw eee;
                }
                cnt110++;
            } while (true);


            }

            if ( state.backtracking==0 ) {

              	leaveRule();

            }
        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
118548
public final void conditionalAndExpression() throws RecognitionException {
		int conditionalAndExpression_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 112) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1146:5: ( inclusiveOrExpression ( '&&' inclusiveOrExpression )* )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1146:9: inclusiveOrExpression ( '&&' inclusiveOrExpression )*
			{
			pushFollow(FOLLOW_inclusiveOrExpression_in_conditionalAndExpression5102);
			inclusiveOrExpression();
			state._fsp--;
			if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1146:31: ( '&&' inclusiveOrExpression )*
			loop144:
			while (true) {
				int alt144=2;
				int LA144_0 = input.LA(1);
				if ( (LA144_0==33) ) {
					alt144=1;
				}

				switch (alt144) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1146:33: '&&' inclusiveOrExpression
					{
					match(input,33,FOLLOW_33_in_conditionalAndExpression5106); if (state.failed) return;
					pushFollow(FOLLOW_inclusiveOrExpression_in_conditionalAndExpression5108);
					inclusiveOrExpression();
					state._fsp--;
					if (state.failed) return;
					}
					break;

				default :
					break loop144;
				}
			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 112, conditionalAndExpression_StartIndex); }

		}
	}
1334954
public void mTokens() throws RecognitionException {
        // InternalXtext.g:1:8: ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | T__39 | T__40 | T__41 | T__42 | T__43 | T__44 | T__45 | T__46 | T__47 | T__48 | T__49 | T__50 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
        int alt12=47;
        alt12 = dfa12.predict(input);
        switch (alt12) {
            case 1 :
                // InternalXtext.g:1:10: T__11
                {
                mT__11(); 

                }
                break;
            case 2 :
                // InternalXtext.g:1:16: T__12
                {
                mT__12(); 

                }
                break;
            case 3 :
                // InternalXtext.g:1:22: T__13
                {
                mT__13(); 

                }
                break;
            case 4 :
                // InternalXtext.g:1:28: T__14
                {
                mT__14(); 

                }
                break;
            case 5 :
                // InternalXtext.g:1:34: T__15
                {
                mT__15(); 

                }
                break;
            case 6 :
                // InternalXtext.g:1:40: T__16
                {
                mT__16(); 

                }
                break;
            case 7 :
                // InternalXtext.g:1:46: T__17
                {
                mT__17(); 

                }
                break;
            case 8 :
                // InternalXtext.g:1:52: T__18
                {
                mT__18(); 

                }
                break;
            case 9 :
                // InternalXtext.g:1:58: T__19
                {
                mT__19(); 

                }
                break;
            case 10 :
                // InternalXtext.g:1:64: T__20
                {
                mT__20(); 

                }
                break;
            case 11 :
                // InternalXtext.g:1:70: T__21
                {
                mT__21(); 

                }
                break;
            case 12 :
                // InternalXtext.g:1:76: T__22
                {
                mT__22(); 

                }
                break;
            case 13 :
                // InternalXtext.g:1:82: T__23
                {
                mT__23(); 

                }
                break;
            case 14 :
                // InternalXtext.g:1:88: T__24
                {
                mT__24(); 

                }
                break;
            case 15 :
                // InternalXtext.g:1:94: T__25
                {
                mT__25(); 

                }
                break;
            case 16 :
                // InternalXtext.g:1:100: T__26
                {
                mT__26(); 

                }
                break;
            case 17 :
                // InternalXtext.g:1:106: T__27
                {
                mT__27(); 

                }
                break;
            case 18 :
                // InternalXtext.g:1:112: T__28
                {
                mT__28(); 

                }
                break;
            case 19 :
                // InternalXtext.g:1:118: T__29
                {
                mT__29(); 

                }
                break;
            case 20 :
                // InternalXtext.g:1:124: T__30
                {
                mT__30(); 

                }
                break;
            case 21 :
                // InternalXtext.g:1:130: T__31
                {
                mT__31(); 

                }
                break;
            case 22 :
                // InternalXtext.g:1:136: T__32
                {
                mT__32(); 

                }
                break;
            case 23 :
                // InternalXtext.g:1:142: T__33
                {
                mT__33(); 

                }
                break;
            case 24 :
                // InternalXtext.g:1:148: T__34
                {
                mT__34(); 

                }
                break;
            case 25 :
                // InternalXtext.g:1:154: T__35
                {
                mT__35(); 

                }
                break;
            case 26 :
                // InternalXtext.g:1:160: T__36
                {
                mT__36(); 

                }
                break;
            case 27 :
                // InternalXtext.g:1:166: T__37
                {
                mT__37(); 

                }
                break;
            case 28 :
                // InternalXtext.g:1:172: T__38
                {
                mT__38(); 

                }
                break;
            case 29 :
                // InternalXtext.g:1:178: T__39
                {
                mT__39(); 

                }
                break;
            case 30 :
                // InternalXtext.g:1:184: T__40
                {
                mT__40(); 

                }
                break;
            case 31 :
                // InternalXtext.g:1:190: T__41
                {
                mT__41(); 

                }
                break;
            case 32 :
                // InternalXtext.g:1:196: T__42
                {
                mT__42(); 

                }
                break;
            case 33 :
                // InternalXtext.g:1:202: T__43
                {
                mT__43(); 

                }
                break;
            case 34 :
                // InternalXtext.g:1:208: T__44
                {
                mT__44(); 

                }
                break;
            case 35 :
                // InternalXtext.g:1:214: T__45
                {
                mT__45(); 

                }
                break;
            case 36 :
                // InternalXtext.g:1:220: T__46
                {
                mT__46(); 

                }
                break;
            case 37 :
                // InternalXtext.g:1:226: T__47
                {
                mT__47(); 

                }
                break;
            case 38 :
                // InternalXtext.g:1:232: T__48
                {
                mT__48(); 

                }
                break;
            case 39 :
                // InternalXtext.g:1:238: T__49
                {
                mT__49(); 

                }
                break;
            case 40 :
                // InternalXtext.g:1:244: T__50
                {
                mT__50(); 

                }
                break;
            case 41 :
                // InternalXtext.g:1:250: RULE_ID
                {
                mRULE_ID(); 

                }
                break;
            case 42 :
                // InternalXtext.g:1:258: RULE_INT
                {
                mRULE_INT(); 

                }
                break;
            case 43 :
                // InternalXtext.g:1:267: RULE_STRING
                {
                mRULE_STRING(); 

                }
                break;
            case 44 :
                // InternalXtext.g:1:279: RULE_ML_COMMENT
                {
                mRULE_ML_COMMENT(); 

                }
                break;
            case 45 :
                // InternalXtext.g:1:295: RULE_SL_COMMENT
                {
                mRULE_SL_COMMENT(); 

                }
                break;
            case 46 :
                // InternalXtext.g:1:311: RULE_WS
                {
                mRULE_WS(); 

                }
                break;
            case 47 :
                // InternalXtext.g:1:319: RULE_ANY_OTHER
                {
                mRULE_ANY_OTHER(); 

                }
                break;

        }

    }
188863
@Override
    public void handleXmlDeclaration(
            final char[] buffer,
            final int keywordOffset, final int keywordLen, final int keywordLine, final int keywordCol,
            final int versionOffset, final int versionLen, final int versionLine, final int versionCol,
            final int encodingOffset, final int encodingLen, final int encodingLine, final int encodingCol,
            final int standaloneOffset, final int standaloneLen, final int standaloneLine, final int standaloneCol,
            final int outerOffset, final int outerLen, final int line, final int col) throws ParseException {

        if (!this.insideAllSelectorMatchingBlock) {

            this.someSelectorsMatch = false;
            for (int i = 0; i < this.selectorsLen; i++) {

                if (this.matchingMarkupLevelsPerSelector[i] > this.markupLevel) {
                    this.selectorMatches[i] =
                            this.selectorFilters[i].matchXmlDeclaration(true, this.markupLevel, this.markupBlocks[this.markupLevel]);
                    if (this.selectorMatches[i]) {
                        this.someSelectorsMatch = true;
                    }
                } else {
                    this.selectorMatches[i] = true;
                    this.someSelectorsMatch = true;
                }

            }

            if (this.someSelectorsMatch) {
                markCurrentSelection();
                this.selectedHandler.handleXmlDeclaration(
                        buffer, keywordOffset, keywordLen, keywordLine, keywordCol,
                        versionOffset, versionLen, versionLine, versionCol,
                        encodingOffset, encodingLen, encodingLine, encodingCol,
                        standaloneOffset, standaloneLen, standaloneLine, standaloneCol,
                        outerOffset, outerLen, line, col);
                unmarkCurrentSelection();
                return;
            }

            unmarkCurrentSelection();
            this.nonSelectedHandler.handleXmlDeclaration(
                    buffer, keywordOffset, keywordLen, keywordLine, keywordCol,
                    versionOffset, versionLen, versionLine, versionCol,
                    encodingOffset, encodingLen, encodingLine, encodingCol,
                    standaloneOffset, standaloneLen, standaloneLine, standaloneCol,
                    outerOffset, outerLen, line, col);
            return;

        }

        markCurrentSelection();
        this.selectedHandler.handleXmlDeclaration(
                buffer, keywordOffset, keywordLen, keywordLine, keywordCol,
                versionOffset, versionLen, versionLine, versionCol,
                encodingOffset, encodingLen, encodingLine, encodingCol,
                standaloneOffset, standaloneLen, standaloneLine, standaloneCol,
                outerOffset, outerLen, line, col);
        unmarkCurrentSelection();

    }
361391
public final void ruleXTryCatchFinallyExpression() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXbase.g:1471:2: ( ( ( rule__XTryCatchFinallyExpression__Group__0 ) ) )
            // InternalXbase.g:1472:2: ( ( rule__XTryCatchFinallyExpression__Group__0 ) )
            {
            // InternalXbase.g:1472:2: ( ( rule__XTryCatchFinallyExpression__Group__0 ) )
            // InternalXbase.g:1473:3: ( rule__XTryCatchFinallyExpression__Group__0 )
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getXTryCatchFinallyExpressionAccess().getGroup()); 
            }
            // InternalXbase.g:1474:3: ( rule__XTryCatchFinallyExpression__Group__0 )
            // InternalXbase.g:1474:4: rule__XTryCatchFinallyExpression__Group__0
            {
            pushFollow(FOLLOW_2);
            rule__XTryCatchFinallyExpression__Group__0();

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

            }

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

            }


            }

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

            	restoreStackSize(stackSize);

        }
        return ;
    }
361252
function onParsingComplete ()
  {
    // Validate defaultParam's value.
    $def = isset($this->props->defaultParam) ? $this->props->defaultParam : null;
    if (!empty($def)) {
      if (!$this->props->defines ($def))
        throw new ComponentException($this,
          "Invalid value for <kbd>defaultParam</kbd> on <b>&lt;{$this->getTagName()}></b>; parameter <kbd>$def</kbd> does not exist");

      // Move children to default parameter.
      if ($this->hasChildren ()) {
        $type = $this->props->getTypeOf ($def);
        if ($type != type::content && $type != type::metadata)
          throw new ComponentException($this, sprintf (
            "The macro's default parameter <kbd>$def</kbd> can't hold content because its type is <kbd>%s</kbd>.",
            type::getNameOf ($type)));

        $param = new Metadata($this->context, ucfirst ($def), $type);
        $this->props->set ($def, $param);
        $param->attachTo ($this);
        $param->setChildren ($this->getChildren ());
      }
    }
    elseif ($this->hasChildren ())
      throw new ComponentException ($this,
        'You may not specify content for this tag because it has no default property');
  }
1372389
public final void mSTRING() throws RecognitionException {
		try {
			int _type = STRING;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:5: ( ( '\"' ( EscapeSequence |~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence |~ ( '\\\\' | '\\'' ) )* '\\'' ) )
			int alt22=2;
			int LA22_0 = input.LA(1);
			if ( (LA22_0=='\"') ) {
				alt22=1;
			}
			else if ( (LA22_0=='\'') ) {
				alt22=2;
			}

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

			switch (alt22) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:8: ( '\"' ( EscapeSequence |~ ( '\\\\' | '\"' ) )* '\"' )
					{
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:8: ( '\"' ( EscapeSequence |~ ( '\\\\' | '\"' ) )* '\"' )
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:9: '\"' ( EscapeSequence |~ ( '\\\\' | '\"' ) )* '\"'
					{
					match('\"'); if (state.failed) return;
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:13: ( EscapeSequence |~ ( '\\\\' | '\"' ) )*
					loop20:
					while (true) {
						int alt20=3;
						int LA20_0 = input.LA(1);
						if ( (LA20_0=='\\') ) {
							alt20=1;
						}
						else if ( ((LA20_0 >= '\u0000' && LA20_0 <= '!')||(LA20_0 >= '#' && LA20_0 <= '[')||(LA20_0 >= ']' && LA20_0 <= '\uFFFF')) ) {
							alt20=2;
						}

						switch (alt20) {
						case 1 :
							// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:15: EscapeSequence
							{
							mEscapeSequence(); if (state.failed) return;

							}
							break;
						case 2 :
							// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:32: ~ ( '\\\\' | '\"' )
							{
							if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '!')||(input.LA(1) >= '#' && input.LA(1) <= '[')||(input.LA(1) >= ']' && input.LA(1) <= '\uFFFF') ) {
								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 :
							break loop20;
						}
					}

					match('\"'); if (state.failed) return;
					}

					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:8: ( '\\'' ( EscapeSequence |~ ( '\\\\' | '\\'' ) )* '\\'' )
					{
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:8: ( '\\'' ( EscapeSequence |~ ( '\\\\' | '\\'' ) )* '\\'' )
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:9: '\\'' ( EscapeSequence |~ ( '\\\\' | '\\'' ) )* '\\''
					{
					match('\''); if (state.failed) return;
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:14: ( EscapeSequence |~ ( '\\\\' | '\\'' ) )*
					loop21:
					while (true) {
						int alt21=3;
						int LA21_0 = input.LA(1);
						if ( (LA21_0=='\\') ) {
							alt21=1;
						}
						else if ( ((LA21_0 >= '\u0000' && LA21_0 <= '&')||(LA21_0 >= '(' && LA21_0 <= '[')||(LA21_0 >= ']' && LA21_0 <= '\uFFFF')) ) {
							alt21=2;
						}

						switch (alt21) {
						case 1 :
							// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:16: EscapeSequence
							{
							mEscapeSequence(); if (state.failed) return;

							}
							break;
						case 2 :
							// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:33: ~ ( '\\\\' | '\\'' )
							{
							if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '&')||(input.LA(1) >= '(' && input.LA(1) <= '[')||(input.LA(1) >= ']' && input.LA(1) <= '\uFFFF') ) {
								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 :
							break loop21;
						}
					}

					match('\''); if (state.failed) return;
					}

					if ( state.backtracking==0 ) { setText( normalizeString( getText() ) ); }
					}
					break;

			}
			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
1289980
public final void annotation() throws RecognitionException {
		int annotation_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 65) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:613:5: ( '@' annotationName ( '(' ( elementValuePairs )? ')' )? )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:613:7: '@' annotationName ( '(' ( elementValuePairs )? ')' )?
			{
			match(input,58,FOLLOW_58_in_annotation2305); if (state.failed) return;
			pushFollow(FOLLOW_annotationName_in_annotation2307);
			annotationName();
			state._fsp--;
			if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:613:26: ( '(' ( elementValuePairs )? ')' )?
			int alt87=2;
			int LA87_0 = input.LA(1);
			if ( (LA87_0==36) ) {
				alt87=1;
			}
			switch (alt87) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:613:27: '(' ( elementValuePairs )? ')'
					{
					match(input,36,FOLLOW_36_in_annotation2310); if (state.failed) return;
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:613:31: ( elementValuePairs )?
					int alt86=2;
					int LA86_0 = input.LA(1);
					if ( ((LA86_0 >= CharacterLiteral && LA86_0 <= DecimalLiteral)||LA86_0==FloatingPointLiteral||(LA86_0 >= HexLiteral && LA86_0 <= Identifier)||(LA86_0 >= OctalLiteral && LA86_0 <= StringLiteral)||LA86_0==29||LA86_0==36||(LA86_0 >= 40 && LA86_0 <= 41)||(LA86_0 >= 44 && LA86_0 <= 45)||LA86_0==53||LA86_0==58||LA86_0==65||LA86_0==67||(LA86_0 >= 70 && LA86_0 <= 71)||LA86_0==77||(LA86_0 >= 79 && LA86_0 <= 80)||LA86_0==82||LA86_0==85||LA86_0==92||LA86_0==94||(LA86_0 >= 97 && LA86_0 <= 98)||LA86_0==105||LA86_0==108||LA86_0==111||LA86_0==115||LA86_0==118||LA86_0==121||LA86_0==126) ) {
						alt86=1;
					}
					switch (alt86) {
						case 1 :
							// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:613:31: elementValuePairs
							{
							pushFollow(FOLLOW_elementValuePairs_in_annotation2312);
							elementValuePairs();
							state._fsp--;
							if (state.failed) return;
							}
							break;

					}

					match(input,37,FOLLOW_37_in_annotation2315); if (state.failed) return;
					}
					break;

			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 65, annotation_StartIndex); }

		}
	}