當前位置: 首頁>>代碼示例>>Java>>正文


Java XtextTokenStream類代碼示例

本文整理匯總了Java中org.eclipse.xtext.parser.antlr.XtextTokenStream的典型用法代碼示例。如果您正苦於以下問題:Java XtextTokenStream類的具體用法?Java XtextTokenStream怎麽用?Java XtextTokenStream使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


XtextTokenStream類屬於org.eclipse.xtext.parser.antlr包,在下文中一共展示了XtextTokenStream類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setInitialHiddenTokens

import org.eclipse.xtext.parser.antlr.XtextTokenStream; //導入依賴的package包/類
private void setInitialHiddenTokens(XtextTokenStream tokenStream) {
	tokenStream.setInitialHiddenTokens(
			InternalN4JSParser.tokenNames[InternalN4JSParser.RULE_WS],
			InternalN4JSParser.tokenNames[InternalN4JSParser.RULE_ML_COMMENT],
			InternalN4JSParser.tokenNames[InternalN4JSParser.RULE_SL_COMMENT],
			InternalN4JSParser.tokenNames[InternalN4JSParser.RULE_EOL]);
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:8,代碼來源:HighlightingParser.java

示例2: createParser

import org.eclipse.xtext.parser.antlr.XtextTokenStream; //導入依賴的package包/類
/**
 * @param stream
 *            the given stream, must be a {@link LazyTokenStream}
 * @see #createTokenStream(TokenSource)
 */
@Override
protected InternalN4JSParser createParser(XtextTokenStream stream) {
	if (!(stream instanceof LazyTokenStream)) {
		throw new IllegalArgumentException("token stream must be an instance of LazyTokenStream");
	}
	return new InternalSemicolonInjectingParser(stream, getGrammarAccess());
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:13,代碼來源:N4JSSemicolonInjectingParser.java

示例3: entryRulePolicies

import org.eclipse.xtext.parser.antlr.XtextTokenStream; //導入依賴的package包/類
public final void entryRulePolicies() throws RecognitionException {
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");

    try {
        // InternalDSLPolicies.g:183:1: ( rulePolicies EOF )
        // InternalDSLPolicies.g:184:1: rulePolicies EOF
        {
        if ( state.backtracking==0 ) {
           before(grammarAccess.getPoliciesRule()); 
        }
        pushFollow(FOLLOW_1);
        rulePolicies();

        state._fsp--;
        if (state.failed) return ;
        if ( state.backtracking==0 ) {
           after(grammarAccess.getPoliciesRule()); 
        }
        match(input,EOF,FOLLOW_2); if (state.failed) return ;

        }

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

        	myHiddenTokenState.restore();

    }
    return ;
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:36,代碼來源:InternalDSLPoliciesParser.java

示例4: entryRulePathGeneratorStopCondition

import org.eclipse.xtext.parser.antlr.XtextTokenStream; //導入依賴的package包/類
public final void entryRulePathGeneratorStopCondition() throws RecognitionException {
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");

    try {
        // InternalDSLPolicies.g:216:1: ( rulePathGeneratorStopCondition EOF )
        // InternalDSLPolicies.g:217:1: rulePathGeneratorStopCondition EOF
        {
        if ( state.backtracking==0 ) {
           before(grammarAccess.getPathGeneratorStopConditionRule()); 
        }
        pushFollow(FOLLOW_1);
        rulePathGeneratorStopCondition();

        state._fsp--;
        if (state.failed) return ;
        if ( state.backtracking==0 ) {
           after(grammarAccess.getPathGeneratorStopConditionRule()); 
        }
        match(input,EOF,FOLLOW_2); if (state.failed) return ;

        }

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

        	myHiddenTokenState.restore();

    }
    return ;
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:36,代碼來源:InternalDSLPoliciesParser.java

示例5: entryRuleStringCondition

import org.eclipse.xtext.parser.antlr.XtextTokenStream; //導入依賴的package包/類
public final void entryRuleStringCondition() throws RecognitionException {
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");

    try {
        // InternalDSLPolicies.g:324:1: ( ruleStringCondition EOF )
        // InternalDSLPolicies.g:325:1: ruleStringCondition EOF
        {
        if ( state.backtracking==0 ) {
           before(grammarAccess.getStringConditionRule()); 
        }
        pushFollow(FOLLOW_1);
        ruleStringCondition();

        state._fsp--;
        if (state.failed) return ;
        if ( state.backtracking==0 ) {
           after(grammarAccess.getStringConditionRule()); 
        }
        match(input,EOF,FOLLOW_2); if (state.failed) return ;

        }

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

        	myHiddenTokenState.restore();

    }
    return ;
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:36,代碼來源:InternalDSLPoliciesParser.java

示例6: entryRuleNumber

import org.eclipse.xtext.parser.antlr.XtextTokenStream; //導入依賴的package包/類
public final void entryRuleNumber() throws RecognitionException {
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        // InternalDSLPolicies.g:1907:1: ( ruleNumber EOF )
        // InternalDSLPolicies.g:1908:1: ruleNumber EOF
        {
        if ( state.backtracking==0 ) {
           before(grammarAccess.getNumberRule()); 
        }
        pushFollow(FOLLOW_1);
        ruleNumber();

        state._fsp--;
        if (state.failed) return ;
        if ( state.backtracking==0 ) {
           after(grammarAccess.getNumberRule()); 
        }
        match(input,EOF,FOLLOW_2); if (state.failed) return ;

        }

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

        	myHiddenTokenState.restore();

    }
    return ;
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:36,代碼來源:InternalDSLPoliciesParser.java

示例7: entryRuleTK_REL_OP

import org.eclipse.xtext.parser.antlr.XtextTokenStream; //導入依賴的package包/類
public final void entryRuleTK_REL_OP() throws RecognitionException {
    int entryRuleTK_REL_OP_StartIndex = input.index();

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

    try {
        if ( state.backtracking>0 && alreadyParsedRule(input, 51) ) { return ; }
        // ../jasonide.xtext.asl.ui/src-gen/jasonide/xtext/asl/ui/contentassist/antlr/internal/InternalAsl.g:766:1: ( ruleTK_REL_OP EOF )
        // ../jasonide.xtext.asl.ui/src-gen/jasonide/xtext/asl/ui/contentassist/antlr/internal/InternalAsl.g:767:1: ruleTK_REL_OP EOF
        {
        if ( state.backtracking==0 ) {
           before(grammarAccess.getTK_REL_OPRule()); 
        }
        pushFollow(FOLLOW_ruleTK_REL_OP_in_entryRuleTK_REL_OP1579);
        ruleTK_REL_OP();

        state._fsp--;
        if (state.failed) return ;
        if ( state.backtracking==0 ) {
           after(grammarAccess.getTK_REL_OPRule()); 
        }
        match(input,EOF,FOLLOW_EOF_in_entryRuleTK_REL_OP1586); if (state.failed) return ;

        }

    }
    catch (RecognitionException re) {
        reportError(re);
        recover(input,re);
    }
    finally {
        if ( state.backtracking>0 ) { memoize(input, 51, entryRuleTK_REL_OP_StartIndex); }

        	myHiddenTokenState.restore();

    }
    return ;
}
 
開發者ID:jason-lang,項目名稱:jason-eclipse-plugin,代碼行數:39,代碼來源:InternalAslParser.java

示例8: entryRuleQID

import org.eclipse.xtext.parser.antlr.XtextTokenStream; //導入依賴的package包/類
public final void entryRuleQID() throws RecognitionException {
    int entryRuleQID_StartIndex = input.index();
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        if ( state.backtracking>0 && alreadyParsedRule(input, 113) ) { return ; }
        // InternalSimpleBeeLangTestLanguage.g:1467:1: ( ruleQID EOF )
        // InternalSimpleBeeLangTestLanguage.g:1468:1: ruleQID EOF
        {
        if ( state.backtracking==0 ) {
           before(grammarAccess.getQIDRule()); 
        }
        pushFollow(FollowSets000.FOLLOW_1);
        ruleQID();

        state._fsp--;
        if (state.failed) return ;
        if ( state.backtracking==0 ) {
           after(grammarAccess.getQIDRule()); 
        }
        match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return ;

        }

    }
    catch (RecognitionException re) {
        reportError(re);
        recover(input,re);
    }
    finally {
        if ( state.backtracking>0 ) { memoize(input, 113, entryRuleQID_StartIndex); }

        	myHiddenTokenState.restore();

    }
    return ;
}
 
開發者ID:eclipse,項目名稱:xtext-core,代碼行數:39,代碼來源:InternalSimpleBeeLangTestLanguageParser.java

示例9: entryRuleQID

import org.eclipse.xtext.parser.antlr.XtextTokenStream; //導入依賴的package包/類
public final void entryRuleQID() throws RecognitionException {
    int entryRuleQID_StartIndex = input.index();
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        if ( state.backtracking>0 && alreadyParsedRule(input, 111) ) { return ; }
        // InternalBeeLangTestLanguage.g:1442:1: ( ruleQID EOF )
        // InternalBeeLangTestLanguage.g:1443:1: ruleQID EOF
        {
        if ( state.backtracking==0 ) {
           before(grammarAccess.getQIDRule()); 
        }
        pushFollow(FOLLOW_1);
        ruleQID();

        state._fsp--;
        if (state.failed) return ;
        if ( state.backtracking==0 ) {
           after(grammarAccess.getQIDRule()); 
        }
        match(input,EOF,FOLLOW_2); if (state.failed) return ;

        }

    }
    catch (RecognitionException re) {
        reportError(re);
        recover(input,re);
    }
    finally {
        if ( state.backtracking>0 ) { memoize(input, 111, entryRuleQID_StartIndex); }

        	myHiddenTokenState.restore();

    }
    return ;
}
 
開發者ID:eclipse,項目名稱:xtext-core,代碼行數:39,代碼來源:InternalBeeLangTestLanguageParser.java

示例10: entryRuleNumber

import org.eclipse.xtext.parser.antlr.XtextTokenStream; //導入依賴的package包/類
public final void entryRuleNumber() throws RecognitionException {
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        // InternalXImportSectionTestLang.g:1583:1: ( ruleNumber EOF )
        // InternalXImportSectionTestLang.g:1584:1: ruleNumber EOF
        {
        if ( state.backtracking==0 ) {
           before(grammarAccess.getNumberRule()); 
        }
        pushFollow(FOLLOW_1);
        ruleNumber();

        state._fsp--;
        if (state.failed) return ;
        if ( state.backtracking==0 ) {
           after(grammarAccess.getNumberRule()); 
        }
        match(input,EOF,FOLLOW_2); if (state.failed) return ;

        }

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

        	myHiddenTokenState.restore();

    }
    return ;
}
 
開發者ID:eclipse,項目名稱:xtext-extras,代碼行數:36,代碼來源:InternalXImportSectionTestLangParser.java

示例11: entryRuleNumber

import org.eclipse.xtext.parser.antlr.XtextTokenStream; //導入依賴的package包/類
public final void entryRuleNumber() throws RecognitionException {
     
    	HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();

    try {
        // InternalPureXbase.g:1608:1: ( ruleNumber EOF )
        // InternalPureXbase.g:1609:1: ruleNumber EOF
        {
        if ( state.backtracking==0 ) {
           before(grammarAccess.getNumberRule()); 
        }
        pushFollow(FOLLOW_1);
        ruleNumber();

        state._fsp--;
        if (state.failed) return ;
        if ( state.backtracking==0 ) {
           after(grammarAccess.getNumberRule()); 
        }
        match(input,EOF,FOLLOW_2); if (state.failed) return ;

        }

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

        	myHiddenTokenState.restore();

    }
    return ;
}
 
開發者ID:eclipse,項目名稱:xtext-extras,代碼行數:36,代碼來源:InternalPureXbaseParser.java

示例12: setInitialHiddenTokens

import org.eclipse.xtext.parser.antlr.XtextTokenStream; //導入依賴的package包/類
@Override
protected void setInitialHiddenTokens(XtextTokenStream tokenStream) {
	tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
}
 
開發者ID:rehne93,項目名稱:pokemon-tcgo-deck-generator,代碼行數:5,代碼來源:PkmntcgoParser.java

示例13: createParser

import org.eclipse.xtext.parser.antlr.XtextTokenStream; //導入依賴的package包/類
@Override
protected InternalPkmntcgoParser createParser(XtextTokenStream stream) {
	return new InternalPkmntcgoParser(stream, getGrammarAccess());
}
 
開發者ID:rehne93,項目名稱:pokemon-tcgo-deck-generator,代碼行數:5,代碼來源:PkmntcgoParser.java

示例14: setInitialHiddenTokens

import org.eclipse.xtext.parser.antlr.XtextTokenStream; //導入依賴的package包/類
@Override
protected void setInitialHiddenTokens(XtextTokenStream tokenStream) {
	tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_EOL");
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:5,代碼來源:TypesParser.java

示例15: createParser

import org.eclipse.xtext.parser.antlr.XtextTokenStream; //導入依賴的package包/類
@Override
protected InternalTypesParser createParser(XtextTokenStream stream) {
	return new InternalTypesParser(stream, getGrammarAccess());
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:5,代碼來源:TypesParser.java


注:本文中的org.eclipse.xtext.parser.antlr.XtextTokenStream類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。