use of org.eclipse.xtext.ide.editor.contentassist.antlr.ObservableXtextTokenStream in project xtext-core by eclipse.
the class InternalParserTest method createParser.
protected InternalXtextGrammarTestLanguageParser createParser(String input) {
CharStream stream = new ANTLRStringStream(input);
InternalXtextGrammarTestLanguageLexer lexer = new InternalXtextGrammarTestLanguageLexer(stream);
InternalXtextGrammarTestLanguageParser result = new InternalXtextGrammarTestLanguageParser(null);
ObservableXtextTokenStream tokenStream = new ObservableXtextTokenStream(lexer, result);
tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
tokenStream.setListener(result);
result.setGrammarAccess(grammarAccess);
result.setTokenStream(tokenStream);
return result;
}
Aggregations