Postfix shortcut for zeroOrMore(...).separatedBy(...)
.
Postfix shortcut for zeroOrMore(...).separatedBy(...)
.
Postfix shortcut for zeroOrMore
.
Postfix shortcut for zeroOrMore
.
Postfix shortcut for oneOrMore(...).separatedBy(...)
.
Postfix shortcut for oneOrMore(...).separatedBy(...)
.
Postfix shortcut for oneOrMore
.
Postfix shortcut for oneOrMore
.
Postfix shortcut for optional
.
Postfix shortcut for optional
.
Attaches the given explicit name to this rule.
Attaches the given explicit name to this rule.
Creates a "negative syntactic predicate", i.e.
Creates a "negative syntactic predicate", i.e. a rule that matches only if this rule mismatches and vice versa. The resulting rule doesn't cause the parser to make any progress (i.e. match any input) and also clears out all effects that the underlying rule might have had on the value stack.
Combines this rule with the given other one in a way that the resulting rule matches if this rule matches or the other one matches.
Combines this rule with the given other one in a way that the resulting rule matches if this rule matches or the other one matches. If this rule doesn't match the parser is reset and the given alternative tried. This operators therefore implements the "ordered choice' PEG combinator.
Concatenates this rule with the given other one.
Concatenates this rule with the given other one. The resulting rule type is computed on a type-level. Here is an illustration (using an abbreviated HList notation): Rule[, A] ~ Rule[, B] = Rule[, A:B] Rule[A:B:C, D:E:F] ~ Rule[F, G:H] = Rule[A:B:C, D:E:G:H] Rule[A, B:C] ~ Rule[D:B:C, E:F] = Rule[D:A, E:F]
Same as ~
but with "cut" semantics, meaning that the parser will never backtrack across this boundary.
Same as ~
but with "cut" semantics, meaning that the parser will never backtrack across this boundary.
If the rule being concatenated doesn't match a parse error will be triggered immediately.
THIS IS NOT PUBLIC API and might become hidden in future. Use only if you know what you are doing!