org.eclipse.xtext.generator.parser.antlr
Class AbstractAntlrGeneratorFragment
java.lang.Object
org.eclipse.xtext.generator.DefaultGeneratorFragment
org.eclipse.xtext.generator.AbstractGeneratorFragment
org.eclipse.xtext.generator.parser.antlr.AbstractAntlrGeneratorFragment
- All Implemented Interfaces:
- IGeneratorFragment, NamingAware
- Direct Known Subclasses:
- AbstractAntlrGeneratorFragmentEx, DebugAntlrGeneratorFragment, XtextAntlrGeneratorFragment, XtextAntlrUiGeneratorFragment
public abstract class AbstractAntlrGeneratorFragment
- extends AbstractGeneratorFragment
- Author:
- Sebastian Zarnekow - Initial contribution and API
Methods inherited from class org.eclipse.xtext.generator.AbstractGeneratorFragment |
addToPluginXmlRt, addToPluginXmlTests, addToPluginXmlUi, addToStandaloneSetup, getExportedPackagesRt, getExportedPackagesUi, getGuiceBindingsRt, getGuiceBindingsUi, getNaming, getRequiredBundlesRt, getRequiredBundlesUi, getTemplate, registerNaming |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractAntlrGeneratorFragment
public AbstractAntlrGeneratorFragment()
checkConfiguration
public void checkConfiguration(org.eclipse.emf.mwe.core.issues.Issues issues)
- Description copied from interface:
IGeneratorFragment
- Called by the container after configuration so the component can validate
the configuration before invocation.
- Specified by:
checkConfiguration
in interface IGeneratorFragment
- Overrides:
checkConfiguration
in class DefaultGeneratorFragment
- Parameters:
issues
- implementors should report configuration issues to this.
setAntlrTool
public void setAntlrTool(AntlrToolFacade facade)
getAntlrTool
public AntlrToolFacade getAntlrTool()
setOptions
public void setOptions(AntlrOptions options)
getOptions
public AntlrOptions getOptions()
addAntlrParam
public void addAntlrParam(java.lang.String param)
getAntlrParams
public java.lang.String[] getAntlrParams()
getParameters
protected java.util.List<java.lang.Object> getParameters(Grammar grammar)
- Overrides:
getParameters
in class AbstractGeneratorFragment
generate
public void generate(Grammar grammar,
org.eclipse.xpand2.XpandExecutionContext ctx)
- Description copied from interface:
IGeneratorFragment
- can be used to generate whatever necessary
- Specified by:
generate
in interface IGeneratorFragment
- Overrides:
generate
in class AbstractGeneratorFragment
ctx
- - the execution context to use
splitLexerClassFile
protected void splitLexerClassFile(java.lang.String filename)
throws java.io.IOException
- Throws:
java.io.IOException
splitParserClassFile
protected void splitParserClassFile(java.lang.String filename)
throws java.io.IOException
- Throws:
java.io.IOException
simplifyUnorderedGroupPredicatesIfRequired
protected void simplifyUnorderedGroupPredicatesIfRequired(Grammar grammar,
java.lang.String absoluteParserFileName)
getParserFileNameSuffix
protected java.lang.String getParserFileNameSuffix()
simplifyUnorderedGroupPredicates
protected void simplifyUnorderedGroupPredicates(java.lang.String javaFile)
throws java.io.IOException
- Throws:
java.io.IOException
suppressWarnings
protected void suppressWarnings(java.lang.String grammarFileName)
suppressWarnings
protected void suppressWarnings(java.lang.String absoluteLexerGrammarFileName,
java.lang.String absoluteParserGrammarFileName)
getLexerFileNameSuffix
protected java.lang.String getLexerFileNameSuffix()
splitParserAndLexerIfEnabled
protected void splitParserAndLexerIfEnabled(java.lang.String absoluteLexerGrammarFileName,
java.lang.String absoluteParserGrammarFileName)
splitParserAndLexerIfEnabled
protected void splitParserAndLexerIfEnabled(java.lang.String absoluteGrammarFileName)
containsUnorderedGroup
protected boolean containsUnorderedGroup(Grammar grammar)