本文整理了Java中org.sonar.sslr.internal.vm.ZeroOrMoreExpression.<init>()
方法的一些代码示例,展示了ZeroOrMoreExpression.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZeroOrMoreExpression.<init>()
方法的具体详情如下:
包路径:org.sonar.sslr.internal.vm.ZeroOrMoreExpression
类名称:ZeroOrMoreExpression
方法名:<init>
暂无
代码示例来源:origin: SonarSource/sslr
/**
* @deprecated in 1.19, use {@link org.sonar.sslr.grammar.LexerlessGrammarBuilder#zeroOrMore(Object)} instead.
*/
@Deprecated
public static Object zeroOrMore(Object... e) {
return new ZeroOrMoreExpression(convertToSingleExpression(e));
}
代码示例来源:origin: org.sonarsource.sslr/sslr-core
/**
* @deprecated in 1.19, use {@link org.sonar.sslr.grammar.LexerfulGrammarBuilder#zeroOrMore(Object)} instead.
*/
@Deprecated
public static Matcher o2n(Object... e) {
return new ZeroOrMoreExpression(convertToSingleExpression(e));
}
代码示例来源:origin: org.codehaus.sonar.sslr/sslr-core
/**
* @deprecated in 1.19, use {@link org.sonar.sslr.grammar.LexerlessGrammarBuilder#zeroOrMore(Object)} instead.
*/
@Deprecated
public static Object zeroOrMore(Object... e) {
return new ZeroOrMoreExpression(convertToSingleExpression(e));
}
代码示例来源:origin: org.sonarsource.sslr/sslr-core
/**
* @deprecated in 1.19, use {@link org.sonar.sslr.grammar.LexerlessGrammarBuilder#zeroOrMore(Object)} instead.
*/
@Deprecated
public static Object zeroOrMore(Object... e) {
return new ZeroOrMoreExpression(convertToSingleExpression(e));
}
代码示例来源:origin: org.codehaus.sonar.sslr/sslr-core
/**
* @deprecated in 1.19, use {@link org.sonar.sslr.grammar.LexerfulGrammarBuilder#zeroOrMore(Object)} instead.
*/
@Deprecated
public static Matcher o2n(Object... e) {
return new ZeroOrMoreExpression(convertToSingleExpression(e));
}
代码示例来源:origin: SonarSource/sslr
/**
* @deprecated in 1.19, use {@link org.sonar.sslr.grammar.LexerfulGrammarBuilder#zeroOrMore(Object)} instead.
*/
@Deprecated
public static Matcher o2n(Object... e) {
return new ZeroOrMoreExpression(convertToSingleExpression(e));
}
代码示例来源:origin: SonarSource/sslr
@Setup
public void setup() {
int n = Integer.getInteger("n", 3);
input = Strings.repeat("t", n);
ParsingExpression subExpression = new StringExpression("t");
oneOrMore = compile(new OneOrMoreExpression(subExpression));
usingZeroOrMore = compile(new SequenceExpression(subExpression, new ZeroOrMoreExpression(subExpression)));
}
代码示例来源:origin: org.sonarsource.sslr/sslr-core
/**
* Creates parsing expression - "zero or more".
* Convenience method equivalent to calling {@code zeroOrMore(sequence(e1, rest))}.
*
* @param e1 sub-expression
* @param rest rest of sub-expressions
* @throws IllegalArgumentException if any of given arguments is not a parsing expression
* @see #zeroOrMore(Object)
* @see #sequence(Object, Object)
*/
public final Object zeroOrMore(Object e1, Object... rest) {
return new ZeroOrMoreExpression(new SequenceExpression(convertToExpressions(e1, rest)));
}
代码示例来源:origin: org.codehaus.sonar.sslr/sslr-core
/**
* @deprecated in 1.19, use {@link org.sonar.sslr.grammar.LexerfulGrammarBuilder#till(Object)} instead.
*/
@Deprecated
public static Matcher till(Object e) {
ParsingExpression expression = convertToExpression(e);
return new SequenceExpression(
new ZeroOrMoreExpression(
new SequenceExpression(
new NextNotExpression(expression),
AnyTokenExpression.INSTANCE)),
expression);
}
代码示例来源:origin: SonarSource/sslr
/**
* Creates parsing expression - "zero or more".
* Convenience method equivalent to calling {@code zeroOrMore(sequence(e1, rest))}.
*
* @param e1 sub-expression
* @param rest rest of sub-expressions
* @throws IllegalArgumentException if any of given arguments is not a parsing expression
* @see #zeroOrMore(Object)
* @see #sequence(Object, Object)
*/
public final Object zeroOrMore(Object e1, Object... rest) {
return new ZeroOrMoreExpression(new SequenceExpression(convertToExpressions(e1, rest)));
}
代码示例来源:origin: SonarSource/sslr
/**
* @deprecated in 1.19, use {@link org.sonar.sslr.grammar.LexerfulGrammarBuilder#till(Object)} instead.
*/
@Deprecated
public static Matcher till(Object e) {
ParsingExpression expression = convertToExpression(e);
return new SequenceExpression(
new ZeroOrMoreExpression(
new SequenceExpression(
new NextNotExpression(expression),
AnyTokenExpression.INSTANCE)),
expression);
}
代码示例来源:origin: org.sonarsource.sslr/sslr-core
/**
* @deprecated in 1.19, use {@link org.sonar.sslr.grammar.LexerfulGrammarBuilder#till(Object)} instead.
*/
@Deprecated
public static Matcher till(Object e) {
ParsingExpression expression = convertToExpression(e);
return new SequenceExpression(
new ZeroOrMoreExpression(
new SequenceExpression(
new NextNotExpression(expression),
AnyTokenExpression.INSTANCE)),
expression);
}
代码示例来源:origin: org.codehaus.sonar.sslr/sslr-core
/**
* Creates parsing expression - "zero or more".
* Convenience method equivalent to calling {@code zeroOrMore(sequence(e1, rest))}.
*
* @param e1 sub-expression
* @param rest rest of sub-expressions
* @throws IllegalArgumentException if any of given arguments is not a parsing expression
* @see #zeroOrMore(Object)
* @see #sequence(Object, Object)
*/
public final Object zeroOrMore(Object e1, Object... rest) {
return new ZeroOrMoreExpression(new SequenceExpression(convertToExpressions(Lists.asList(e1, rest))));
}
代码示例来源:origin: SonarSource/sslr
@Setup
public void setup() {
int n = Integer.getInteger("n", 3);
input = Strings.repeat("t", n);
ParsingExpression subExpression = new StringExpression("t");
zeroOrMore = compile(new ZeroOrMoreExpression(subExpression));
optionalOneOrMore = compile(new OptionalExpression(new OneOrMoreExpression(subExpression)));
}
代码示例来源:origin: org.sonarsource.sslr/sslr-core
/**
* @deprecated in 1.19, use {@link org.sonar.sslr.grammar.LexerfulGrammarBuilder#exclusiveTill(Object)} instead.
*/
@Deprecated
public static Matcher exclusiveTill(Object... e) {
ParsingExpression[] expressions = convertToExpressions(e);
ParsingExpression subExpression = expressions.length == 1 ? expressions[0] : new FirstOfExpression(expressions);
return new ZeroOrMoreExpression(
new SequenceExpression(
new NextNotExpression(
subExpression),
AnyTokenExpression.INSTANCE));
}
代码示例来源:origin: org.codehaus.sonar.sslr/sslr-core
/**
* @deprecated in 1.19, use {@link org.sonar.sslr.grammar.LexerfulGrammarBuilder#exclusiveTill(Object)} instead.
*/
@Deprecated
public static Matcher exclusiveTill(Object... e) {
ParsingExpression[] expressions = convertToExpressions(e);
ParsingExpression subExpression = expressions.length == 1 ? expressions[0] : new FirstOfExpression(expressions);
return new ZeroOrMoreExpression(
new SequenceExpression(
new NextNotExpression(
subExpression),
AnyTokenExpression.INSTANCE));
}
代码示例来源:origin: SonarSource/sslr
/**
* @deprecated in 1.19, use {@link org.sonar.sslr.grammar.LexerfulGrammarBuilder#exclusiveTill(Object)} instead.
*/
@Deprecated
public static Matcher exclusiveTill(Object... e) {
ParsingExpression[] expressions = convertToExpressions(e);
ParsingExpression subExpression = expressions.length == 1 ? expressions[0] : new FirstOfExpression(expressions);
return new ZeroOrMoreExpression(
new SequenceExpression(
new NextNotExpression(
subExpression),
AnyTokenExpression.INSTANCE));
}
代码示例来源:origin: SonarSource/sslr
/**
* Creates parsing expression - "exclusive till".
* Equivalent of expression {@code zeroOrMore(nextNot(e), anyToken())}.
* Do not overuse this method.
*
* @param e sub-expression
* @throws IllegalArgumentException if any of given arguments is not a parsing expression
*/
public Object exclusiveTill(Object e) {
return new ZeroOrMoreExpression(
new SequenceExpression(
new NextNotExpression(convertToExpression(e)),
AnyTokenExpression.INSTANCE));
}
代码示例来源:origin: org.sonarsource.sslr/sslr-core
/**
* Creates parsing expression - "exclusive till".
* Equivalent of expression {@code zeroOrMore(nextNot(e), anyToken())}.
* Do not overuse this method.
*
* @param e sub-expression
* @throws IllegalArgumentException if any of given arguments is not a parsing expression
*/
public Object exclusiveTill(Object e) {
return new ZeroOrMoreExpression(
new SequenceExpression(
new NextNotExpression(convertToExpression(e)),
AnyTokenExpression.INSTANCE));
}
代码示例来源:origin: org.codehaus.sonar.sslr/sslr-core
/**
* Creates parsing expression - "exclusive till".
* Equivalent of expression {@code zeroOrMore(nextNot(e), anyToken())}.
* Do not overuse this method.
*
* @param e sub-expression
* @throws IllegalArgumentException if any of given arguments is not a parsing expression
*/
public Object exclusiveTill(Object e) {
return new ZeroOrMoreExpression(
new SequenceExpression(
new NextNotExpression(convertToExpression(e)),
AnyTokenExpression.INSTANCE));
}
内容来源于网络,如有侵权,请联系作者删除!