Search in sources :

Example 1 with KeywordHelper

use of org.eclipse.xtext.xtext.generator.parser.antlr.KeywordHelper in project xtext-core by eclipse.

the class XtextAntlrGeneratorFragment2 method doGenerate.

@Override
protected void doGenerate() {
    Grammar _grammar = this.getGrammar();
    boolean _isIgnoreCase = this.getOptions().isIgnoreCase();
    new KeywordHelper(_grammar, _isIgnoreCase, this.grammarUtil);
    boolean _isCombinedGrammar = this.isCombinedGrammar();
    new CombinedGrammarMarker(_isCombinedGrammar).attachToEmfObject(this.getGrammar());
    if (this.debugGrammar) {
        this.generateDebugGrammar();
    }
    this.generateProductionGrammar();
    IXtextGeneratorFileSystemAccess _srcGen = this.getProjectConfig().getGenericIde().getSrcGen();
    boolean _tripleNotEquals = (_srcGen != null);
    if (_tripleNotEquals) {
        this.generateContentAssistGrammar();
        this.addIdeBindingsAndImports();
    }
    this.generateProductionParser().writeTo(this.getProjectConfig().getRuntime().getSrcGen());
    this.generateAntlrTokenFileProvider().writeTo(this.getProjectConfig().getRuntime().getSrcGen());
    this.generateContentAssistParser().writeTo(this.getProjectConfig().getGenericIde().getSrcGen());
    boolean _hasSyntheticTerminalRule = this.hasSyntheticTerminalRule();
    if (_hasSyntheticTerminalRule) {
        this.generateProductionTokenSource().writeTo(this.getProjectConfig().getRuntime().getSrc());
        this.generateContentAssistTokenSource().writeTo(this.getProjectConfig().getGenericIde().getSrc());
    }
    this.addRuntimeBindingsAndImports();
    this.addIdeBindingsAndImports();
    this.addUiBindingsAndImports();
}
Also used : KeywordHelper(org.eclipse.xtext.xtext.generator.parser.antlr.KeywordHelper) IXtextGeneratorFileSystemAccess(org.eclipse.xtext.xtext.generator.model.IXtextGeneratorFileSystemAccess) Grammar(org.eclipse.xtext.Grammar) AntlrGrammar(org.eclipse.xtext.xtext.generator.parser.antlr.AntlrGrammar) CombinedGrammarMarker(org.eclipse.xtext.xtext.generator.parser.antlr.CombinedGrammarMarker)

Aggregations

Grammar (org.eclipse.xtext.Grammar)1 IXtextGeneratorFileSystemAccess (org.eclipse.xtext.xtext.generator.model.IXtextGeneratorFileSystemAccess)1 AntlrGrammar (org.eclipse.xtext.xtext.generator.parser.antlr.AntlrGrammar)1 CombinedGrammarMarker (org.eclipse.xtext.xtext.generator.parser.antlr.CombinedGrammarMarker)1 KeywordHelper (org.eclipse.xtext.xtext.generator.parser.antlr.KeywordHelper)1