use of org.eclipse.xtext.testlanguages.xtextgrammar.ide.contentassist.antlr.internal.InternalXtextGrammarTestLanguageParser in project xtext-core by eclipse.
the class InternalParserTest method testSetup.
@Test
public void testSetup() {
String input = "";
InternalXtextGrammarTestLanguageParser parser = createParser(input);
assertNotNull(parser);
}
use of org.eclipse.xtext.testlanguages.xtextgrammar.ide.contentassist.antlr.internal.InternalXtextGrammarTestLanguageParser 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;
}
use of org.eclipse.xtext.testlanguages.xtextgrammar.ide.contentassist.antlr.internal.InternalXtextGrammarTestLanguageParser in project xtext-core by eclipse.
the class XtextGrammarTestLanguageParser method createParser.
@Override
protected InternalXtextGrammarTestLanguageParser createParser() {
InternalXtextGrammarTestLanguageParser result = new InternalXtextGrammarTestLanguageParser(null);
result.setGrammarAccess(grammarAccess);
return result;
}
use of org.eclipse.xtext.testlanguages.xtextgrammar.ide.contentassist.antlr.internal.InternalXtextGrammarTestLanguageParser in project xtext-core by eclipse.
the class InternalParserTest method getFollowSet.
@Override
protected Set<FollowElement> getFollowSet(String input) throws RecognitionException {
InternalXtextGrammarTestLanguageParser parser = createParser(input);
parser.entryRuleGrammar();
return parser.getFollowElements();
}
Aggregations