本文整理汇总了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]);
}
示例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());
}
示例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 ;
}
示例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 ;
}
示例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 ;
}
示例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 ;
}
示例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 ;
}
示例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 ;
}
示例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 ;
}
示例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 ;
}
示例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 ;
}
示例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");
}
示例13: createParser
import org.eclipse.xtext.parser.antlr.XtextTokenStream; //导入依赖的package包/类
@Override
protected InternalPkmntcgoParser createParser(XtextTokenStream stream) {
return new InternalPkmntcgoParser(stream, getGrammarAccess());
}
示例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");
}
示例15: createParser
import org.eclipse.xtext.parser.antlr.XtextTokenStream; //导入依赖的package包/类
@Override
protected InternalTypesParser createParser(XtextTokenStream stream) {
return new InternalTypesParser(stream, getGrammarAccess());
}