本文整理匯總了Java中org.eclipse.xtext.AbstractElement.isFirstSetPredicated方法的典型用法代碼示例。如果您正苦於以下問題:Java AbstractElement.isFirstSetPredicated方法的具體用法?Java AbstractElement.isFirstSetPredicated怎麽用?Java AbstractElement.isFirstSetPredicated使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.xtext.AbstractElement
的用法示例。
在下文中一共展示了AbstractElement.isFirstSetPredicated方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ebnfPredicate
import org.eclipse.xtext.AbstractElement; //導入方法依賴的package包/類
protected String ebnfPredicate(final AbstractElement it, final AntlrOptions options) {
StringConcatenation _builder = new StringConcatenation();
{
if ((this._grammarAccessExtensions.predicated(it) || it.isFirstSetPredicated())) {
_builder.append("(");
{
boolean _predicated = this._grammarAccessExtensions.predicated(it);
if (_predicated) {
String _ebnf2 = this.ebnf2(this._grammarAccessExtensions.predicatedElement(it), options, false);
_builder.append(_ebnf2);
} else {
{
List<AbstractElement> _firstSet = AntlrGrammarGenUtil.getFirstSet(it);
boolean _hasElements = false;
for(final AbstractElement e : _firstSet) {
if (!_hasElements) {
_hasElements = true;
} else {
_builder.appendImmediate(" | ", "");
}
String _ebnf2_1 = this.ebnf2(e, options, false);
_builder.append(_ebnf2_1);
}
}
}
}
_builder.append(")=>");
}
}
_builder.newLineIfNotEmpty();
return _builder.toString();
}
示例2: dataTypeEbnfPredicate
import org.eclipse.xtext.AbstractElement; //導入方法依賴的package包/類
protected String dataTypeEbnfPredicate(final AbstractElement it) {
StringConcatenation _builder = new StringConcatenation();
{
if ((this._grammarAccessExtensions.predicated(it) || it.isFirstSetPredicated())) {
_builder.append("(");
{
boolean _predicated = this._grammarAccessExtensions.predicated(it);
if (_predicated) {
String _dataTypeEbnf2 = this.dataTypeEbnf2(this._grammarAccessExtensions.predicatedElement(it), false);
_builder.append(_dataTypeEbnf2);
} else {
{
List<AbstractElement> _firstSet = AntlrGrammarGenUtil.getFirstSet(it);
boolean _hasElements = false;
for(final AbstractElement e : _firstSet) {
if (!_hasElements) {
_hasElements = true;
} else {
_builder.appendImmediate(" | ", "");
}
String _dataTypeEbnf2_1 = this.dataTypeEbnf2(e, false);
_builder.append(_dataTypeEbnf2_1);
}
}
}
}
_builder.append(")=>");
}
}
_builder.newLineIfNotEmpty();
return _builder.toString();
}
示例3: _mustBeParenthesized
import org.eclipse.xtext.AbstractElement; //導入方法依賴的package包/類
protected boolean _mustBeParenthesized(final AbstractElement it) {
return (this._grammarAccessExtensions.predicated(it) || it.isFirstSetPredicated());
}