本文整理汇总了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());
}