Java Code Examples for org.eclipse.xtext.xtext.generator.parser.antlr.AntlrGrammarGenUtil#getArgumentList()
The following examples show how to use
org.eclipse.xtext.xtext.generator.parser.antlr.AntlrGrammarGenUtil#getArgumentList() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AntlrGrammarGenerator.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
@Override protected String crossrefEbnf(final AbstractRule it, final RuleCall call, final CrossReference ref, final boolean supportActions) { String _xifexpression = null; if (supportActions) { String _switchResult = null; boolean _matched = false; if (it instanceof EnumRule) { _matched=true; } if (!_matched) { if (it instanceof ParserRule) { _matched=true; } } if (_matched) { StringConcatenation _builder = new StringConcatenation(); _builder.append("{"); _builder.newLine(); _builder.append("\t"); CharSequence _newCompositeNode = this.newCompositeNode(ref); _builder.append(_newCompositeNode, "\t"); _builder.newLineIfNotEmpty(); _builder.append("}"); _builder.newLine(); String _ruleName = this._grammarAccessExtensions.ruleName(it); _builder.append(_ruleName); String _argumentList = AntlrGrammarGenUtil.getArgumentList(call, this.isPassCurrentIntoFragment(), (!supportActions)); _builder.append(_argumentList); _builder.newLineIfNotEmpty(); _builder.append("{"); _builder.newLine(); _builder.append("\t"); _builder.append("afterParserOrEnumRuleCall();"); _builder.newLine(); _builder.append("}"); _builder.newLine(); _switchResult = _builder.toString(); } if (!_matched) { if (it instanceof TerminalRule) { _matched=true; StringConcatenation _builder_1 = new StringConcatenation(); String _localVar = this._grammarAccessExtensions.localVar(GrammarUtil.containingAssignment(ref)); _builder_1.append(_localVar); _builder_1.append("="); String _ruleName_1 = this._grammarAccessExtensions.ruleName(it); _builder_1.append(_ruleName_1); _builder_1.newLineIfNotEmpty(); _builder_1.append("{"); _builder_1.newLine(); _builder_1.append("\t"); CharSequence _newLeafNode = this.newLeafNode(ref, this._grammarAccessExtensions.localVar(GrammarUtil.containingAssignment(ref))); _builder_1.append(_newLeafNode, "\t"); _builder_1.newLineIfNotEmpty(); _builder_1.append("}"); _builder_1.newLine(); _switchResult = _builder_1.toString(); } } if (!_matched) { throw new IllegalStateException(("crossrefEbnf is not supported for " + it)); } _xifexpression = _switchResult; } else { _xifexpression = super.crossrefEbnf(it, call, ref, supportActions); } return _xifexpression; }
Example 2
Source File: AbstractAntlrGrammarWithActionsGenerator.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
@Override protected String _ebnf2(final RuleCall it, final AntlrOptions options, final boolean supportActions) { String __ebnf2 = super._ebnf2(it, options, supportActions); String _argumentList = AntlrGrammarGenUtil.getArgumentList(it, this.isPassCurrentIntoFragment(), (!supportActions)); return (__ebnf2 + _argumentList); }
Example 3
Source File: AbstractAntlrGrammarWithActionsGenerator.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
@Override protected String _dataTypeEbnf2(final RuleCall it, final boolean supportActions) { String __dataTypeEbnf2 = super._dataTypeEbnf2(it, supportActions); String _argumentList = AntlrGrammarGenUtil.getArgumentList(it, this.isPassCurrentIntoFragment(), (!supportActions)); return (__dataTypeEbnf2 + _argumentList); }
Example 4
Source File: AbstractAntlrGrammarWithActionsGenerator.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
@Override protected String crossrefEbnf(final AbstractRule it, final RuleCall call, final CrossReference ref, final boolean supportActions) { String _crossrefEbnf = super.crossrefEbnf(it, call, ref, supportActions); String _argumentList = AntlrGrammarGenUtil.getArgumentList(call, this.isPassCurrentIntoFragment(), (!supportActions)); return (_crossrefEbnf + _argumentList); }
Example 5
Source File: AbstractAntlrGrammarWithActionsGenerator.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
@Override protected String _assignmentEbnf(final RuleCall it, final Assignment assignment, final AntlrOptions options, final boolean supportActions) { String __assignmentEbnf = super._assignmentEbnf(it, assignment, options, supportActions); String _argumentList = AntlrGrammarGenUtil.getArgumentList(it, this.isPassCurrentIntoFragment(), (!supportActions)); return (__assignmentEbnf + _argumentList); }