当前位置: 首页>>代码示例>>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;未经允许,请勿转载。