Child pages
  • RuleExpression.ZeroOrManyWithSeparator
Skip to end of metadata
Go to start of metadata

RuleExpression.ZeroOrManyWithSeparator is a loop with a separator, that parses zero or more elements. Compared to ZeroOrMany, the elements of the parsed list are split by a separator specified in the Separator subrule.

For example:

This rule parses a text such as: «[ 1, a, "aaa" ]». And a field is formed for the «(Value; ",")*» loop:

which is a tuple that consists of two lists. The first list will contain elements of the parsed list, and the second – locations of the separators (because when literals are being parsed, their code entry locations are returned). 

See also

Separator
RuleExpression
RuleExpression.ZeroOrMany
RuleExpression.ZeroOrManyWithSeparator
RuleExpression.ZeroOrManyWithHangingSeparator
RuleExpression.OneOrManyWithSeparator
RuleExpression.OneOrManyWithHangingSeparator

  • No labels