Java Code Examples for org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens#restore()

The following examples show how to use org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens#restore() . 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 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 2
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 3
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 4
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 5
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 6
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 7
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 8
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 9
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 10
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 3 votes vote down vote up
public final EObject entryRuleTemplateBodyWithQuotes() throws RecognitionException {
    EObject current = null;

    EObject iv_ruleTemplateBodyWithQuotes = null;



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

    try {
        // InternalSingleCodetemplateParser.g:218:2: (iv_ruleTemplateBodyWithQuotes= ruleTemplateBodyWithQuotes EOF )
        // InternalSingleCodetemplateParser.g:219:2: iv_ruleTemplateBodyWithQuotes= ruleTemplateBodyWithQuotes EOF
        {
         newCompositeNode(grammarAccess.getTemplateBodyWithQuotesRule()); 
        pushFollow(FOLLOW_1);
        iv_ruleTemplateBodyWithQuotes=ruleTemplateBodyWithQuotes();

        state._fsp--;

         current =iv_ruleTemplateBodyWithQuotes; 
        match(input,EOF,FOLLOW_2); 

        }

    }

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

        	myHiddenTokenState.restore();

    }
    return current;
}
 
Example 11
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 3 votes vote down vote up
public final String entryRuleLiteralValue() throws RecognitionException {
    String current = null;

    AntlrDatatypeRuleToken iv_ruleLiteralValue = null;



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

    try {
        // InternalSingleCodetemplateParser.g:258:2: (iv_ruleLiteralValue= ruleLiteralValue EOF )
        // InternalSingleCodetemplateParser.g:259:2: iv_ruleLiteralValue= ruleLiteralValue EOF
        {
         newCompositeNode(grammarAccess.getLiteralValueRule()); 
        pushFollow(FOLLOW_1);
        iv_ruleLiteralValue=ruleLiteralValue();

        state._fsp--;

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

        }

    }

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

        	myHiddenTokenState.restore();

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

    EObject iv_ruleInheritingHiddens = null;



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

    try {
        // InternalHiddenTerminalsTestLanguage.g:397:2: (iv_ruleInheritingHiddens= ruleInheritingHiddens EOF )
        // InternalHiddenTerminalsTestLanguage.g:398:2: iv_ruleInheritingHiddens= ruleInheritingHiddens EOF
        {
         newCompositeNode(grammarAccess.getInheritingHiddensRule()); 
        pushFollow(FollowSets000.FOLLOW_1);
        iv_ruleInheritingHiddens=ruleInheritingHiddens();

        state._fsp--;

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

        }

    }

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

        	myHiddenTokenState.restore();

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

    AntlrDatatypeRuleToken iv_ruleFix = null;



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

    try {
        // InternalBug292245TestLanguage.g:223:2: (iv_ruleFix= ruleFix EOF )
        // InternalBug292245TestLanguage.g:224:2: iv_ruleFix= ruleFix EOF
        {
         newCompositeNode(grammarAccess.getFixRule()); 
        pushFollow(FollowSets000.FOLLOW_1);
        iv_ruleFix=ruleFix();

        state._fsp--;

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

        }

    }

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

        	myHiddenTokenState.restore();

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

    EObject iv_ruleModel = null;



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

    try {
        // InternalBug292245TestLanguage.g:66:2: (iv_ruleModel= ruleModel EOF )
        // InternalBug292245TestLanguage.g:67:2: iv_ruleModel= ruleModel EOF
        {
         newCompositeNode(grammarAccess.getModelRule()); 
        pushFollow(FollowSets000.FOLLOW_1);
        iv_ruleModel=ruleModel();

        state._fsp--;

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

        }

    }

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

        	myHiddenTokenState.restore();

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

    EObject iv_ruleWithHiddens = null;



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

    try {
        // InternalHiddenTerminalsTestLanguage.g:206:2: (iv_ruleWithHiddens= ruleWithHiddens EOF )
        // InternalHiddenTerminalsTestLanguage.g:207:2: iv_ruleWithHiddens= ruleWithHiddens EOF
        {
         newCompositeNode(grammarAccess.getWithHiddensRule()); 
        pushFollow(FollowSets000.FOLLOW_1);
        iv_ruleWithHiddens=ruleWithHiddens();

        state._fsp--;

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

        }

    }

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

        	myHiddenTokenState.restore();

    }
    return current;
}
 
Example 16
Source File: InternalBug377311TestLanguageParser.java    From xtext-eclipse with Eclipse Public License 2.0 3 votes vote down vote up
public final EObject entryRuleChild() throws RecognitionException {
    EObject current = null;

    EObject iv_ruleChild = null;



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

    try {
        // InternalBug377311TestLanguage.g:102:2: (iv_ruleChild= ruleChild EOF )
        // InternalBug377311TestLanguage.g:103:2: iv_ruleChild= ruleChild EOF
        {
         newCompositeNode(grammarAccess.getChildRule()); 
        pushFollow(FollowSets000.FOLLOW_1);
        iv_ruleChild=ruleChild();

        state._fsp--;

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

        }

    }

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

        	myHiddenTokenState.restore();

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

    Token this_APOSTROPHE_CHAR_0=null;
    Token this_APOSTROPHE_CHAR_2=null;
    AntlrDatatypeRuleToken this_Graphical_1 = null;



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

    try {
        // InternalBug292245TestLanguage.g:188:2: ( (this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR ) )
        // InternalBug292245TestLanguage.g:189:2: (this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR )
        {
        // InternalBug292245TestLanguage.g:189:2: (this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR )
        // InternalBug292245TestLanguage.g:190:3: this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR
        {
        this_APOSTROPHE_CHAR_0=(Token)match(input,RULE_APOSTROPHE_CHAR,FollowSets000.FOLLOW_5); 

        			current.merge(this_APOSTROPHE_CHAR_0);
        		

        			newLeafNode(this_APOSTROPHE_CHAR_0, grammarAccess.getErrorAccess().getAPOSTROPHE_CHARTerminalRuleCall_0());
        		

        			newCompositeNode(grammarAccess.getErrorAccess().getGraphicalParserRuleCall_1());
        		
        pushFollow(FollowSets000.FOLLOW_3);
        this_Graphical_1=ruleGraphical();

        state._fsp--;


        			current.merge(this_Graphical_1);
        		

        			afterParserOrEnumRuleCall();
        		
        this_APOSTROPHE_CHAR_2=(Token)match(input,RULE_APOSTROPHE_CHAR,FollowSets000.FOLLOW_2); 

        			current.merge(this_APOSTROPHE_CHAR_2);
        		

        			newLeafNode(this_APOSTROPHE_CHAR_2, grammarAccess.getErrorAccess().getAPOSTROPHE_CHARTerminalRuleCall_2());
        		

        }


        }


        	leaveRule();

    }

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

        	myHiddenTokenState.restore();

    }
    return current;
}
 
Example 18
Source File: InternalSingleCodetemplateParser.java    From xtext-eclipse with Eclipse Public License 2.0 2 votes vote down vote up
public final EObject ruleVariableOrDollar() throws RecognitionException {
    EObject current = null;

    EObject this_Variable_0 = null;

    EObject this_Dollar_1 = null;



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

    try {
        // InternalSingleCodetemplateParser.g:420:2: ( (this_Variable_0= ruleVariable | this_Dollar_1= ruleDollar ) )
        // InternalSingleCodetemplateParser.g:421:2: (this_Variable_0= ruleVariable | this_Dollar_1= ruleDollar )
        {
        // InternalSingleCodetemplateParser.g:421:2: (this_Variable_0= ruleVariable | this_Dollar_1= ruleDollar )
        int alt6=2;
        int LA6_0 = input.LA(1);

        if ( (LA6_0==DollarSignLeftCurlyBracket) ) {
            alt6=1;
        }
        else if ( (LA6_0==DollarSignDollarSign||LA6_0==DollarSign) ) {
            alt6=2;
        }
        else {
            NoViableAltException nvae =
                new NoViableAltException("", 6, 0, input);

            throw nvae;
        }
        switch (alt6) {
            case 1 :
                // InternalSingleCodetemplateParser.g:422:3: this_Variable_0= ruleVariable
                {

                			newCompositeNode(grammarAccess.getVariableOrDollarAccess().getVariableParserRuleCall_0());
                		
                pushFollow(FOLLOW_2);
                this_Variable_0=ruleVariable();

                state._fsp--;


                			current = this_Variable_0;
                			afterParserOrEnumRuleCall();
                		

                }
                break;
            case 2 :
                // InternalSingleCodetemplateParser.g:431:3: this_Dollar_1= ruleDollar
                {

                			newCompositeNode(grammarAccess.getVariableOrDollarAccess().getDollarParserRuleCall_1());
                		
                pushFollow(FOLLOW_2);
                this_Dollar_1=ruleDollar();

                state._fsp--;


                			current = this_Dollar_1;
                			afterParserOrEnumRuleCall();
                		

                }
                break;

        }


        }


        	leaveRule();

    }

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

        	myHiddenTokenState.restore();

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

    Token this_APOSTROPHE_CHAR_0=null;
    Token this_APOSTROPHE_CHAR_2=null;
    AntlrDatatypeRuleToken this_Graphical_1 = null;

    AntlrDatatypeRuleToken this_Rehide_3 = null;



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

    try {
        // InternalBug292245TestLanguage.g:240:2: ( (this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR this_Rehide_3= ruleRehide ) )
        // InternalBug292245TestLanguage.g:241:2: (this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR this_Rehide_3= ruleRehide )
        {
        // InternalBug292245TestLanguage.g:241:2: (this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR this_Rehide_3= ruleRehide )
        // InternalBug292245TestLanguage.g:242:3: this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR this_Rehide_3= ruleRehide
        {
        this_APOSTROPHE_CHAR_0=(Token)match(input,RULE_APOSTROPHE_CHAR,FollowSets000.FOLLOW_5); 

        			current.merge(this_APOSTROPHE_CHAR_0);
        		

        			newLeafNode(this_APOSTROPHE_CHAR_0, grammarAccess.getFixAccess().getAPOSTROPHE_CHARTerminalRuleCall_0());
        		

        			newCompositeNode(grammarAccess.getFixAccess().getGraphicalParserRuleCall_1());
        		
        pushFollow(FollowSets000.FOLLOW_3);
        this_Graphical_1=ruleGraphical();

        state._fsp--;


        			current.merge(this_Graphical_1);
        		

        			afterParserOrEnumRuleCall();
        		
        this_APOSTROPHE_CHAR_2=(Token)match(input,RULE_APOSTROPHE_CHAR,FollowSets000.FOLLOW_6); 

        			current.merge(this_APOSTROPHE_CHAR_2);
        		

        			newLeafNode(this_APOSTROPHE_CHAR_2, grammarAccess.getFixAccess().getAPOSTROPHE_CHARTerminalRuleCall_2());
        		

        			newCompositeNode(grammarAccess.getFixAccess().getRehideParserRuleCall_3());
        		
        pushFollow(FollowSets000.FOLLOW_2);
        this_Rehide_3=ruleRehide();

        state._fsp--;


        			current.merge(this_Rehide_3);
        		

        			afterParserOrEnumRuleCall();
        		

        }


        }


        	leaveRule();

    }

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

        	myHiddenTokenState.restore();

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

    Token kw=null;
    AntlrDatatypeRuleToken this_ValidID_0 = null;

    AntlrDatatypeRuleToken this_ValidID_2 = null;



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

    try {
        // InternalCodetemplatesParser.g:782:2: ( (this_ValidID_0= ruleValidID (kw= FullStop this_ValidID_2= ruleValidID )* ) )
        // InternalCodetemplatesParser.g:783:2: (this_ValidID_0= ruleValidID (kw= FullStop this_ValidID_2= ruleValidID )* )
        {
        // InternalCodetemplatesParser.g:783:2: (this_ValidID_0= ruleValidID (kw= FullStop this_ValidID_2= ruleValidID )* )
        // InternalCodetemplatesParser.g:784:3: this_ValidID_0= ruleValidID (kw= FullStop this_ValidID_2= ruleValidID )*
        {

        			newCompositeNode(grammarAccess.getFQNAccess().getValidIDParserRuleCall_0());
        		
        pushFollow(FOLLOW_30);
        this_ValidID_0=ruleValidID();

        state._fsp--;


        			current.merge(this_ValidID_0);
        		

        			afterParserOrEnumRuleCall();
        		
        // InternalCodetemplatesParser.g:794:3: (kw= FullStop this_ValidID_2= ruleValidID )*
        loop25:
        do {
            int alt25=2;
            int LA25_0 = input.LA(1);

            if ( (LA25_0==FullStop) ) {
                alt25=1;
            }


            switch (alt25) {
        	case 1 :
        	    // InternalCodetemplatesParser.g:795:4: kw= FullStop this_ValidID_2= ruleValidID
        	    {
        	    kw=(Token)match(input,FullStop,FOLLOW_4); 

        	    				current.merge(kw);
        	    				newLeafNode(kw, grammarAccess.getFQNAccess().getFullStopKeyword_1_0());
        	    			

        	    				newCompositeNode(grammarAccess.getFQNAccess().getValidIDParserRuleCall_1_1());
        	    			
        	    pushFollow(FOLLOW_30);
        	    this_ValidID_2=ruleValidID();

        	    state._fsp--;


        	    				current.merge(this_ValidID_2);
        	    			

        	    				afterParserOrEnumRuleCall();
        	    			

        	    }
        	    break;

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


        }


        }


        	leaveRule();

    }

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

        	myHiddenTokenState.restore();

    }
    return current;
}