All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.xtext.parser.antlr.XtextParser Maven / Gradle / Ivy

/*
* generated by Xtext
*/
package org.eclipse.xtext.parser.antlr;

import com.google.inject.Inject;

import org.eclipse.xtext.parser.antlr.XtextTokenStream;
import org.eclipse.xtext.services.XtextGrammarAccess;

public class XtextParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParser {
	
	@Inject
	private XtextGrammarAccess grammarAccess;
	
	@Override
	protected void setInitialHiddenTokens(XtextTokenStream tokenStream) {
		tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
	}
	
	@Override
	protected org.eclipse.xtext.parser.antlr.internal.InternalXtextParser createParser(XtextTokenStream stream) {
		return new org.eclipse.xtext.parser.antlr.internal.InternalXtextParser(stream, getGrammarAccess());
	}
	
	@Override 
	protected String getDefaultRuleName() {
		return "Grammar";
	}
	
	public XtextGrammarAccess getGrammarAccess() {
		return this.grammarAccess;
	}
	
	public void setGrammarAccess(XtextGrammarAccess grammarAccess) {
		this.grammarAccess = grammarAccess;
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy