org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens Java Examples

The following examples show how to use org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
public final void entryRuleVariableOrDollar() throws RecognitionException {
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        // InternalSingleCodetemplateParser.g:227:1: ( ruleVariableOrDollar EOF )
        // InternalSingleCodetemplateParser.g:228:1: ruleVariableOrDollar EOF
        {
         before(grammarAccess.getVariableOrDollarRule()); 
        pushFollow(FOLLOW_1);
        ruleVariableOrDollar();

        state._fsp--;

         after(grammarAccess.getVariableOrDollarRule()); 
        match(input,EOF,FOLLOW_2); 

        }

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

        	myHiddenTokenState.restore();

    }
    return ;
}
 
Example #2
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
public final void entryRuleTemplateBodyWithQuotes() throws RecognitionException {
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        // InternalSingleCodetemplateParser.g:121:1: ( ruleTemplateBodyWithQuotes EOF )
        // InternalSingleCodetemplateParser.g:122:1: ruleTemplateBodyWithQuotes EOF
        {
         before(grammarAccess.getTemplateBodyWithQuotesRule()); 
        pushFollow(FOLLOW_1);
        ruleTemplateBodyWithQuotes();

        state._fsp--;

         after(grammarAccess.getTemplateBodyWithQuotesRule()); 
        match(input,EOF,FOLLOW_2); 

        }

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

        	myHiddenTokenState.restore();

    }
    return ;
}
 
Example #3
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
public final void entryRuleValidID() throws RecognitionException {
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        // InternalSingleCodetemplateParser.g:293:1: ( ruleValidID EOF )
        // InternalSingleCodetemplateParser.g:294:1: ruleValidID EOF
        {
         before(grammarAccess.getValidIDRule()); 
        pushFollow(FOLLOW_1);
        ruleValidID();

        state._fsp--;

         after(grammarAccess.getValidIDRule()); 
        match(input,EOF,FOLLOW_2); 

        }

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

        	myHiddenTokenState.restore();

    }
    return ;
}
 
Example #4
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
public final void entryRuleLiteralValue() throws RecognitionException {
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        // InternalSingleCodetemplateParser.g:154:1: ( ruleLiteralValue EOF )
        // InternalSingleCodetemplateParser.g:155:1: ruleLiteralValue EOF
        {
         before(grammarAccess.getLiteralValueRule()); 
        pushFollow(FOLLOW_1);
        ruleLiteralValue();

        state._fsp--;

         after(grammarAccess.getLiteralValueRule()); 
        match(input,EOF,FOLLOW_2); 

        }

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

        	myHiddenTokenState.restore();

    }
    return ;
}
 
Example #5
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
public final void entryRuleFQN() throws RecognitionException {
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        // InternalSingleCodetemplateParser.g:326:1: ( ruleFQN EOF )
        // InternalSingleCodetemplateParser.g:327:1: ruleFQN EOF
        {
         before(grammarAccess.getFQNRule()); 
        pushFollow(FOLLOW_1);
        ruleFQN();

        state._fsp--;

         after(grammarAccess.getFQNRule()); 
        match(input,EOF,FOLLOW_2); 

        }

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

        	myHiddenTokenState.restore();

    }
    return ;
}
 
Example #6
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
public final void entryRuleTemplateBody() throws RecognitionException {
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        // InternalSingleCodetemplateParser.g:194:1: ( ruleTemplateBody EOF )
        // InternalSingleCodetemplateParser.g:195:1: ruleTemplateBody EOF
        {
         before(grammarAccess.getTemplateBodyRule()); 
        pushFollow(FOLLOW_1);
        ruleTemplateBody();

        state._fsp--;

         after(grammarAccess.getTemplateBodyRule()); 
        match(input,EOF,FOLLOW_2); 

        }

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

        	myHiddenTokenState.restore();

    }
    return ;
}
 
Example #7
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
public final void entryRuleLiteral() throws RecognitionException {
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        // InternalSingleCodetemplateParser.g:359:1: ( ruleLiteral EOF )
        // InternalSingleCodetemplateParser.g:360:1: ruleLiteral EOF
        {
         before(grammarAccess.getLiteralRule()); 
        pushFollow(FOLLOW_1);
        ruleLiteral();

        state._fsp--;

         after(grammarAccess.getLiteralRule()); 
        match(input,EOF,FOLLOW_2); 

        }

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

        	myHiddenTokenState.restore();

    }
    return ;
}
 
Example #8
Source File: InternalBug377311TestLanguageParser.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
public final void entryRuleChild() throws RecognitionException {
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_WS", "RULE_ID");

    try {
        // InternalBug377311TestLanguage.g:82:1: ( ruleChild EOF )
        // InternalBug377311TestLanguage.g:83:1: ruleChild EOF
        {
         before(grammarAccess.getChildRule()); 
        pushFollow(FollowSets000.FOLLOW_1);
        ruleChild();

        state._fsp--;

         after(grammarAccess.getChildRule()); 
        match(input,EOF,FollowSets000.FOLLOW_2); 

        }

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

        	myHiddenTokenState.restore();

    }
    return ;
}
 
Example #9
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
public final void entryRuleVariable() throws RecognitionException {
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        // InternalSingleCodetemplateParser.g:260:1: ( ruleVariable EOF )
        // InternalSingleCodetemplateParser.g:261:1: ruleVariable EOF
        {
         before(grammarAccess.getVariableRule()); 
        pushFollow(FOLLOW_1);
        ruleVariable();

        state._fsp--;

         after(grammarAccess.getVariableRule()); 
        match(input,EOF,FOLLOW_2); 

        }

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

        	myHiddenTokenState.restore();

    }
    return ;
}
 
Example #10
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
public final void entryRuleDollar() throws RecognitionException {
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        // InternalSingleCodetemplateParser.g:392:1: ( ruleDollar EOF )
        // InternalSingleCodetemplateParser.g:393:1: ruleDollar EOF
        {
         before(grammarAccess.getDollarRule()); 
        pushFollow(FOLLOW_1);
        ruleDollar();

        state._fsp--;

         after(grammarAccess.getDollarRule()); 
        match(input,EOF,FOLLOW_2); 

        }

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

        	myHiddenTokenState.restore();

    }
    return ;
}
 
Example #11
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public final void ruleLiteral() throws RecognitionException {

        		HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
        		int stackSize = keepStackSize();
        	
        try {
            // InternalSingleCodetemplateParser.g:375:2: ( ( ( rule__Literal__ValueAssignment ) ) )
            // InternalSingleCodetemplateParser.g:376:2: ( ( rule__Literal__ValueAssignment ) )
            {
            // InternalSingleCodetemplateParser.g:376:2: ( ( rule__Literal__ValueAssignment ) )
            // InternalSingleCodetemplateParser.g:377:3: ( rule__Literal__ValueAssignment )
            {
             before(grammarAccess.getLiteralAccess().getValueAssignment()); 
            // InternalSingleCodetemplateParser.g:378:3: ( rule__Literal__ValueAssignment )
            // InternalSingleCodetemplateParser.g:378:4: rule__Literal__ValueAssignment
            {
            pushFollow(FOLLOW_2);
            rule__Literal__ValueAssignment();

            state._fsp--;


            }

             after(grammarAccess.getLiteralAccess().getValueAssignment()); 

            }


            }

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

            	restoreStackSize(stackSize);
            	myHiddenTokenState.restore();

        }
        return ;
    }
 
Example #12
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public final void ruleVariable() throws RecognitionException {

        		HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
        		int stackSize = keepStackSize();
        	
        try {
            // InternalSingleCodetemplateParser.g:276:2: ( ( ( rule__Variable__Group__0 ) ) )
            // InternalSingleCodetemplateParser.g:277:2: ( ( rule__Variable__Group__0 ) )
            {
            // InternalSingleCodetemplateParser.g:277:2: ( ( rule__Variable__Group__0 ) )
            // InternalSingleCodetemplateParser.g:278:3: ( rule__Variable__Group__0 )
            {
             before(grammarAccess.getVariableAccess().getGroup()); 
            // InternalSingleCodetemplateParser.g:279:3: ( rule__Variable__Group__0 )
            // InternalSingleCodetemplateParser.g:279:4: rule__Variable__Group__0
            {
            pushFollow(FOLLOW_2);
            rule__Variable__Group__0();

            state._fsp--;


            }

             after(grammarAccess.getVariableAccess().getGroup()); 

            }


            }

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

            	restoreStackSize(stackSize);
            	myHiddenTokenState.restore();

        }
        return ;
    }
 
Example #13
Source File: InternalCodetemplatesParser.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public final AntlrDatatypeRuleToken ruleValidID() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();

    Token this_ID_0=null;
    Token kw=null;


    	enterRule();
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        // InternalCodetemplatesParser.g:735:2: ( (this_ID_0= RULE_ID | kw= For | kw= Templates ) )
        // InternalCodetemplatesParser.g:736:2: (this_ID_0= RULE_ID | kw= For | kw= Templates )
        {
        // InternalCodetemplatesParser.g:736:2: (this_ID_0= RULE_ID | kw= For | kw= Templates )
        int alt24=3;
        switch ( input.LA(1) ) {
        case RULE_ID:
            {
            alt24=1;
            }
            break;
        case For:
            {
            alt24=2;
            }
            break;
        case Templates:
            {
            alt24=3;
            }
            break;
        default:
            NoViableAltException nvae =
                new NoViableAltException("", 24, 0, input);

            throw nvae;
        }

        switch (alt24) {
            case 1 :
                // InternalCodetemplatesParser.g:737:3: this_ID_0= RULE_ID
                {
                this_ID_0=(Token)match(input,RULE_ID,FOLLOW_2); 

                			current.merge(this_ID_0);
                		

                			newLeafNode(this_ID_0, grammarAccess.getValidIDAccess().getIDTerminalRuleCall_0());
                		

                }
                break;
            case 2 :
                // InternalCodetemplatesParser.g:745:3: kw= For
                {
                kw=(Token)match(input,For,FOLLOW_2); 

                			current.merge(kw);
                			newLeafNode(kw, grammarAccess.getValidIDAccess().getForKeyword_1());
                		

                }
                break;
            case 3 :
                // InternalCodetemplatesParser.g:751:3: kw= Templates
                {
                kw=(Token)match(input,Templates,FOLLOW_2); 

                			current.merge(kw);
                			newLeafNode(kw, grammarAccess.getValidIDAccess().getTemplatesKeyword_2());
                		

                }
                break;

        }


        }


        	leaveRule();

    }

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

        	myHiddenTokenState.restore();

    }
    return current;
}
 
Example #14
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public final void ruleFQN() throws RecognitionException {

        		HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
        		int stackSize = keepStackSize();
        	
        try {
            // InternalSingleCodetemplateParser.g:342:2: ( ( ( rule__FQN__Group__0 ) ) )
            // InternalSingleCodetemplateParser.g:343:2: ( ( rule__FQN__Group__0 ) )
            {
            // InternalSingleCodetemplateParser.g:343:2: ( ( rule__FQN__Group__0 ) )
            // InternalSingleCodetemplateParser.g:344:3: ( rule__FQN__Group__0 )
            {
             before(grammarAccess.getFQNAccess().getGroup()); 
            // InternalSingleCodetemplateParser.g:345:3: ( rule__FQN__Group__0 )
            // InternalSingleCodetemplateParser.g:345:4: rule__FQN__Group__0
            {
            pushFollow(FOLLOW_2);
            rule__FQN__Group__0();

            state._fsp--;


            }

             after(grammarAccess.getFQNAccess().getGroup()); 

            }


            }

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

            	restoreStackSize(stackSize);
            	myHiddenTokenState.restore();

        }
        return ;
    }
 
Example #15
Source File: InternalBug297105TestLanguageParser.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
public final String entryRuleReal() throws RecognitionException {
    String current = null;

    AntlrDatatypeRuleToken iv_ruleReal = null;



    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        // InternalBug297105TestLanguage.g:334:2: (iv_ruleReal= ruleReal EOF )
        // InternalBug297105TestLanguage.g:335:2: iv_ruleReal= ruleReal EOF
        {
        if ( state.backtracking==0 ) {
           newCompositeNode(grammarAccess.getRealRule()); 
        }
        pushFollow(FollowSets000.FOLLOW_1);
        iv_ruleReal=ruleReal();

        state._fsp--;
        if (state.failed) return current;
        if ( state.backtracking==0 ) {
           current =iv_ruleReal.getText(); 
        }
        match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current;

        }

    }

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

        	myHiddenTokenState.restore();

    }
    return current;
}
 
Example #16
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public final void ruleValidID() throws RecognitionException {

        		HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
        		int stackSize = keepStackSize();
        	
        try {
            // InternalSingleCodetemplateParser.g:309:2: ( ( ( rule__ValidID__Alternatives ) ) )
            // InternalSingleCodetemplateParser.g:310:2: ( ( rule__ValidID__Alternatives ) )
            {
            // InternalSingleCodetemplateParser.g:310:2: ( ( rule__ValidID__Alternatives ) )
            // InternalSingleCodetemplateParser.g:311:3: ( rule__ValidID__Alternatives )
            {
             before(grammarAccess.getValidIDAccess().getAlternatives()); 
            // InternalSingleCodetemplateParser.g:312:3: ( rule__ValidID__Alternatives )
            // InternalSingleCodetemplateParser.g:312:4: rule__ValidID__Alternatives
            {
            pushFollow(FOLLOW_2);
            rule__ValidID__Alternatives();

            state._fsp--;


            }

             after(grammarAccess.getValidIDAccess().getAlternatives()); 

            }


            }

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

            	restoreStackSize(stackSize);
            	myHiddenTokenState.restore();

        }
        return ;
    }
 
Example #17
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public final void ruleDollar() throws RecognitionException {

        		HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
        		int stackSize = keepStackSize();
        	
        try {
            // InternalSingleCodetemplateParser.g:408:2: ( ( ( rule__Dollar__Group__0 ) ) )
            // InternalSingleCodetemplateParser.g:409:2: ( ( rule__Dollar__Group__0 ) )
            {
            // InternalSingleCodetemplateParser.g:409:2: ( ( rule__Dollar__Group__0 ) )
            // InternalSingleCodetemplateParser.g:410:3: ( rule__Dollar__Group__0 )
            {
             before(grammarAccess.getDollarAccess().getGroup()); 
            // InternalSingleCodetemplateParser.g:411:3: ( rule__Dollar__Group__0 )
            // InternalSingleCodetemplateParser.g:411:4: rule__Dollar__Group__0
            {
            pushFollow(FOLLOW_2);
            rule__Dollar__Group__0();

            state._fsp--;


            }

             after(grammarAccess.getDollarAccess().getGroup()); 

            }


            }

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

            	restoreStackSize(stackSize);
            	myHiddenTokenState.restore();

        }
        return ;
    }
 
Example #18
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public final AntlrDatatypeRuleToken ruleValidID() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();

    Token this_ID_0=null;
    Token kw=null;


    	enterRule();
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        // InternalSingleCodetemplateParser.g:723:2: ( (this_ID_0= RULE_ID | kw= For | kw= Templates ) )
        // InternalSingleCodetemplateParser.g:724:2: (this_ID_0= RULE_ID | kw= For | kw= Templates )
        {
        // InternalSingleCodetemplateParser.g:724:2: (this_ID_0= RULE_ID | kw= For | kw= Templates )
        int alt23=3;
        switch ( input.LA(1) ) {
        case RULE_ID:
            {
            alt23=1;
            }
            break;
        case For:
            {
            alt23=2;
            }
            break;
        case Templates:
            {
            alt23=3;
            }
            break;
        default:
            NoViableAltException nvae =
                new NoViableAltException("", 23, 0, input);

            throw nvae;
        }

        switch (alt23) {
            case 1 :
                // InternalSingleCodetemplateParser.g:725:3: this_ID_0= RULE_ID
                {
                this_ID_0=(Token)match(input,RULE_ID,FOLLOW_2); 

                			current.merge(this_ID_0);
                		

                			newLeafNode(this_ID_0, grammarAccess.getValidIDAccess().getIDTerminalRuleCall_0());
                		

                }
                break;
            case 2 :
                // InternalSingleCodetemplateParser.g:733:3: kw= For
                {
                kw=(Token)match(input,For,FOLLOW_2); 

                			current.merge(kw);
                			newLeafNode(kw, grammarAccess.getValidIDAccess().getForKeyword_1());
                		

                }
                break;
            case 3 :
                // InternalSingleCodetemplateParser.g:739:3: kw= Templates
                {
                kw=(Token)match(input,Templates,FOLLOW_2); 

                			current.merge(kw);
                			newLeafNode(kw, grammarAccess.getValidIDAccess().getTemplatesKeyword_2());
                		

                }
                break;

        }


        }


        	leaveRule();

    }

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

        	myHiddenTokenState.restore();

    }
    return current;
}
 
Example #19
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public final void ruleTemplateBodyWithQuotes() throws RecognitionException {

        		HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
        		int stackSize = keepStackSize();
        	
        try {
            // InternalSingleCodetemplateParser.g:137:2: ( ( ( rule__TemplateBodyWithQuotes__Group__0 ) ) )
            // InternalSingleCodetemplateParser.g:138:2: ( ( rule__TemplateBodyWithQuotes__Group__0 ) )
            {
            // InternalSingleCodetemplateParser.g:138:2: ( ( rule__TemplateBodyWithQuotes__Group__0 ) )
            // InternalSingleCodetemplateParser.g:139:3: ( rule__TemplateBodyWithQuotes__Group__0 )
            {
             before(grammarAccess.getTemplateBodyWithQuotesAccess().getGroup()); 
            // InternalSingleCodetemplateParser.g:140:3: ( rule__TemplateBodyWithQuotes__Group__0 )
            // InternalSingleCodetemplateParser.g:140:4: rule__TemplateBodyWithQuotes__Group__0
            {
            pushFollow(FOLLOW_2);
            rule__TemplateBodyWithQuotes__Group__0();

            state._fsp--;


            }

             after(grammarAccess.getTemplateBodyWithQuotesAccess().getGroup()); 

            }


            }

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

            	restoreStackSize(stackSize);
            	myHiddenTokenState.restore();

        }
        return ;
    }
 
Example #20
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public final void ruleLiteralValue() throws RecognitionException {

        		HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
        		int stackSize = keepStackSize();
        	
        try {
            // InternalSingleCodetemplateParser.g:170:2: ( ( ( ( rule__LiteralValue__Alternatives ) ) ( ( rule__LiteralValue__Alternatives )* ) ) )
            // InternalSingleCodetemplateParser.g:171:2: ( ( ( rule__LiteralValue__Alternatives ) ) ( ( rule__LiteralValue__Alternatives )* ) )
            {
            // InternalSingleCodetemplateParser.g:171:2: ( ( ( rule__LiteralValue__Alternatives ) ) ( ( rule__LiteralValue__Alternatives )* ) )
            // InternalSingleCodetemplateParser.g:172:3: ( ( rule__LiteralValue__Alternatives ) ) ( ( rule__LiteralValue__Alternatives )* )
            {
            // InternalSingleCodetemplateParser.g:172:3: ( ( rule__LiteralValue__Alternatives ) )
            // InternalSingleCodetemplateParser.g:173:4: ( rule__LiteralValue__Alternatives )
            {
             before(grammarAccess.getLiteralValueAccess().getAlternatives()); 
            // InternalSingleCodetemplateParser.g:174:4: ( rule__LiteralValue__Alternatives )
            // InternalSingleCodetemplateParser.g:174:5: rule__LiteralValue__Alternatives
            {
            pushFollow(FOLLOW_3);
            rule__LiteralValue__Alternatives();

            state._fsp--;


            }

             after(grammarAccess.getLiteralValueAccess().getAlternatives()); 

            }

            // InternalSingleCodetemplateParser.g:177:3: ( ( rule__LiteralValue__Alternatives )* )
            // InternalSingleCodetemplateParser.g:178:4: ( rule__LiteralValue__Alternatives )*
            {
             before(grammarAccess.getLiteralValueAccess().getAlternatives()); 
            // InternalSingleCodetemplateParser.g:179:4: ( rule__LiteralValue__Alternatives )*
            loop1:
            do {
                int alt1=2;
                int LA1_0 = input.LA(1);

                if ( (LA1_0==RULE_ID||(LA1_0>=RULE_WS && LA1_0<=RULE_ANY_OTHER)) ) {
                    alt1=1;
                }


                switch (alt1) {
            	case 1 :
            	    // InternalSingleCodetemplateParser.g:179:5: rule__LiteralValue__Alternatives
            	    {
            	    pushFollow(FOLLOW_3);
            	    rule__LiteralValue__Alternatives();

            	    state._fsp--;


            	    }
            	    break;

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

             after(grammarAccess.getLiteralValueAccess().getAlternatives()); 

            }


            }


            }

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

            	restoreStackSize(stackSize);
            	myHiddenTokenState.restore();

        }
        return ;
    }
 
Example #21
Source File: InternalBug292245TestLanguageParser.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
public final AntlrDatatypeRuleToken ruleRehide() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();

    Token kw=null;


    	enterRule();
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_WS");

    try {
        // InternalBug292245TestLanguage.g:335:2: ( (kw= '^' )? )
        // InternalBug292245TestLanguage.g:336:2: (kw= '^' )?
        {
        // InternalBug292245TestLanguage.g:336:2: (kw= '^' )?
        int alt5=2;
        int LA5_0 = input.LA(1);

        if ( (LA5_0==10) ) {
            alt5=1;
        }
        switch (alt5) {
            case 1 :
                // InternalBug292245TestLanguage.g:337:3: kw= '^'
                {
                kw=(Token)match(input,10,FollowSets000.FOLLOW_2); 

                			current.merge(kw);
                			newLeafNode(kw, grammarAccess.getRehideAccess().getCircumflexAccentKeyword());
                		

                }
                break;

        }


        }


        	leaveRule();

    }

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

        	myHiddenTokenState.restore();

    }
    return current;
}
 
Example #22
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public final void ruleTemplateBody() throws RecognitionException {

        		HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
        		int stackSize = keepStackSize();
        	
        try {
            // InternalSingleCodetemplateParser.g:210:2: ( ( ( rule__TemplateBody__Group__0 ) ) )
            // InternalSingleCodetemplateParser.g:211:2: ( ( rule__TemplateBody__Group__0 ) )
            {
            // InternalSingleCodetemplateParser.g:211:2: ( ( rule__TemplateBody__Group__0 ) )
            // InternalSingleCodetemplateParser.g:212:3: ( rule__TemplateBody__Group__0 )
            {
             before(grammarAccess.getTemplateBodyAccess().getGroup()); 
            // InternalSingleCodetemplateParser.g:213:3: ( rule__TemplateBody__Group__0 )
            // InternalSingleCodetemplateParser.g:213:4: rule__TemplateBody__Group__0
            {
            pushFollow(FOLLOW_2);
            rule__TemplateBody__Group__0();

            state._fsp--;


            }

             after(grammarAccess.getTemplateBodyAccess().getGroup()); 

            }


            }

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

            	restoreStackSize(stackSize);
            	myHiddenTokenState.restore();

        }
        return ;
    }
 
Example #23
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public final void ruleVariableOrDollar() throws RecognitionException {

        		HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
        		int stackSize = keepStackSize();
        	
        try {
            // InternalSingleCodetemplateParser.g:243:2: ( ( ( rule__VariableOrDollar__Alternatives ) ) )
            // InternalSingleCodetemplateParser.g:244:2: ( ( rule__VariableOrDollar__Alternatives ) )
            {
            // InternalSingleCodetemplateParser.g:244:2: ( ( rule__VariableOrDollar__Alternatives ) )
            // InternalSingleCodetemplateParser.g:245:3: ( rule__VariableOrDollar__Alternatives )
            {
             before(grammarAccess.getVariableOrDollarAccess().getAlternatives()); 
            // InternalSingleCodetemplateParser.g:246:3: ( rule__VariableOrDollar__Alternatives )
            // InternalSingleCodetemplateParser.g:246:4: rule__VariableOrDollar__Alternatives
            {
            pushFollow(FOLLOW_2);
            rule__VariableOrDollar__Alternatives();

            state._fsp--;


            }

             after(grammarAccess.getVariableOrDollarAccess().getAlternatives()); 

            }


            }

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

            	restoreStackSize(stackSize);
            	myHiddenTokenState.restore();

        }
        return ;
    }
 
Example #24
Source File: InternalBug377311TestLanguageParser.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public final void ruleChild() throws RecognitionException {

        		HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_WS", "RULE_ID");
        		int stackSize = keepStackSize();
        	
        try {
            // InternalBug377311TestLanguage.g:98:2: ( ( ( rule__Child__Group__0 ) ) )
            // InternalBug377311TestLanguage.g:99:2: ( ( rule__Child__Group__0 ) )
            {
            // InternalBug377311TestLanguage.g:99:2: ( ( rule__Child__Group__0 ) )
            // InternalBug377311TestLanguage.g:100:3: ( rule__Child__Group__0 )
            {
             before(grammarAccess.getChildAccess().getGroup()); 
            // InternalBug377311TestLanguage.g:101:3: ( rule__Child__Group__0 )
            // InternalBug377311TestLanguage.g:101:4: rule__Child__Group__0
            {
            pushFollow(FollowSets000.FOLLOW_2);
            rule__Child__Group__0();

            state._fsp--;


            }

             after(grammarAccess.getChildAccess().getGroup()); 

            }


            }

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

            	restoreStackSize(stackSize);
            	myHiddenTokenState.restore();

        }
        return ;
    }
 
Example #25
Source File: InternalFormatterTestLanguageParser.java    From dsl-devkit with Eclipse Public License 1.0 4 votes vote down vote up
public final EObject ruleSuppressedHiddenSubSub() throws RecognitionException {
    EObject current = null;

    Token otherlv_0=null;
    Token lv_idval_1_0=null;
    Token otherlv_2=null;

     enterRule(); 
    		HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_WS");
        
    try {
        // InternalFormatterTestLanguage.g:1390:28: ( (otherlv_0= '<' ( (lv_idval_1_0= RULE_ID ) ) otherlv_2= '>' ) )
        // InternalFormatterTestLanguage.g:1391:1: (otherlv_0= '<' ( (lv_idval_1_0= RULE_ID ) ) otherlv_2= '>' )
        {
        // InternalFormatterTestLanguage.g:1391:1: (otherlv_0= '<' ( (lv_idval_1_0= RULE_ID ) ) otherlv_2= '>' )
        // InternalFormatterTestLanguage.g:1391:3: otherlv_0= '<' ( (lv_idval_1_0= RULE_ID ) ) otherlv_2= '>'
        {
        otherlv_0=(Token)match(input,41,FOLLOW_6); 

            	newLeafNode(otherlv_0, grammarAccess.getSuppressedHiddenSubSubAccess().getLessThanSignKeyword_0());
            
        // InternalFormatterTestLanguage.g:1395:1: ( (lv_idval_1_0= RULE_ID ) )
        // InternalFormatterTestLanguage.g:1396:1: (lv_idval_1_0= RULE_ID )
        {
        // InternalFormatterTestLanguage.g:1396:1: (lv_idval_1_0= RULE_ID )
        // InternalFormatterTestLanguage.g:1397:3: lv_idval_1_0= RULE_ID
        {
        lv_idval_1_0=(Token)match(input,RULE_ID,FOLLOW_32); 

        			newLeafNode(lv_idval_1_0, grammarAccess.getSuppressedHiddenSubSubAccess().getIdvalIDTerminalRuleCall_1_0()); 
        		

        	        if (current==null) {
        	            current = createModelElement(grammarAccess.getSuppressedHiddenSubSubRule());
        	        }
               		setWithLastConsumed(
               			current, 
               			"idval",
                		lv_idval_1_0, 
                		"org.eclipse.xtext.common.Terminals.ID");
        	    

        }


        }

        otherlv_2=(Token)match(input,42,FOLLOW_2); 

            	newLeafNode(otherlv_2, grammarAccess.getSuppressedHiddenSubSubAccess().getGreaterThanSignKeyword_2());
            

        }


        }

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

        	myHiddenTokenState.restore();

    }
    return current;
}
 
Example #26
Source File: InternalXmlParser.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public final void ruleTag() throws RecognitionException {

        		HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_WS");
        		int stackSize = keepStackSize();
        	
        try {
            // InternalXmlParser.g:125:2: ( ( ( rule__Tag__Group__0 ) ) )
            // InternalXmlParser.g:126:2: ( ( rule__Tag__Group__0 ) )
            {
            // InternalXmlParser.g:126:2: ( ( rule__Tag__Group__0 ) )
            // InternalXmlParser.g:127:3: ( rule__Tag__Group__0 )
            {
             before(grammarAccess.getTagAccess().getGroup()); 
            // InternalXmlParser.g:128:3: ( rule__Tag__Group__0 )
            // InternalXmlParser.g:128:4: rule__Tag__Group__0
            {
            pushFollow(FOLLOW_2);
            rule__Tag__Group__0();

            state._fsp--;


            }

             after(grammarAccess.getTagAccess().getGroup()); 

            }


            }

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

            	restoreStackSize(stackSize);
            	myHiddenTokenState.restore();

        }
        return ;
    }
 
Example #27
Source File: InternalHiddenTerminalsTestLanguageParser.java    From xtext-core with Eclipse Public License 2.0 3 votes vote down vote up
public final EObject entryRuleOverridingHiddens() throws RecognitionException {
    EObject current = null;

    EObject iv_ruleOverridingHiddens = null;



    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");

    try {
        // InternalHiddenTerminalsTestLanguage.g:256:2: (iv_ruleOverridingHiddens= ruleOverridingHiddens EOF )
        // InternalHiddenTerminalsTestLanguage.g:257:2: iv_ruleOverridingHiddens= ruleOverridingHiddens EOF
        {
         newCompositeNode(grammarAccess.getOverridingHiddensRule()); 
        pushFollow(FollowSets000.FOLLOW_1);
        iv_ruleOverridingHiddens=ruleOverridingHiddens();

        state._fsp--;

         current =iv_ruleOverridingHiddens; 
        match(input,EOF,FollowSets000.FOLLOW_2); 

        }

    }

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

        	myHiddenTokenState.restore();

    }
    return current;
}
 
Example #28
Source File: InternalBug292245TestLanguageParser.java    From xtext-core with Eclipse Public License 2.0 3 votes vote down vote up
public final AntlrDatatypeRuleToken ruleApostrophe() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();

    Token this_APOSTROPHE_CHAR_0=null;


    	enterRule();
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_WS");

    try {
        // InternalBug292245TestLanguage.g:302:2: (this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR )
        // InternalBug292245TestLanguage.g:303:2: this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR
        {
        this_APOSTROPHE_CHAR_0=(Token)match(input,RULE_APOSTROPHE_CHAR,FollowSets000.FOLLOW_2); 

        		current.merge(this_APOSTROPHE_CHAR_0);
        	

        		newLeafNode(this_APOSTROPHE_CHAR_0, grammarAccess.getApostropheAccess().getAPOSTROPHE_CHARTerminalRuleCall());
        	

        }


        	leaveRule();

    }

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

        	myHiddenTokenState.restore();

    }
    return current;
}
 
Example #29
Source File: InternalFormatterTestLanguageParser.java    From xtext-core with Eclipse Public License 2.0 3 votes vote down vote up
public final EObject entryRuleSuppressedHidden() throws RecognitionException {
    EObject current = null;

    EObject iv_ruleSuppressedHidden = null;



    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        // InternalFormatterTestLanguage.g:979:2: (iv_ruleSuppressedHidden= ruleSuppressedHidden EOF )
        // InternalFormatterTestLanguage.g:980:2: iv_ruleSuppressedHidden= ruleSuppressedHidden EOF
        {
         newCompositeNode(grammarAccess.getSuppressedHiddenRule()); 
        pushFollow(FollowSets000.FOLLOW_1);
        iv_ruleSuppressedHidden=ruleSuppressedHidden();

        state._fsp--;

         current =iv_ruleSuppressedHidden; 
        match(input,EOF,FollowSets000.FOLLOW_2); 

        }

    }

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

        	myHiddenTokenState.restore();

    }
    return current;
}
 
Example #30
Source File: InternalBug292245TestLanguageParser.java    From xtext-core with Eclipse Public License 2.0 3 votes vote down vote up
public final String entryRuleRehide() throws RecognitionException {
    String current = null;

    AntlrDatatypeRuleToken iv_ruleRehide = null;



    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_WS");

    try {
        // InternalBug292245TestLanguage.g:318:2: (iv_ruleRehide= ruleRehide EOF )
        // InternalBug292245TestLanguage.g:319:2: iv_ruleRehide= ruleRehide EOF
        {
         newCompositeNode(grammarAccess.getRehideRule()); 
        pushFollow(FollowSets000.FOLLOW_1);
        iv_ruleRehide=ruleRehide();

        state._fsp--;

         current =iv_ruleRehide.getText(); 
        match(input,EOF,FollowSets000.FOLLOW_2); 

        }

    }

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

        	myHiddenTokenState.restore();

    }
    return current;
}