| Optional = RegexExpression "?" precedence 30

Specifies an optional rule. If the RegexExpression parsing fails, the rule's result will be an empty span (i.e. NSpan where Length is zero).

For example:

"-"? Integer Fraction? Exponent?;

will parse:

-42
36.6
5

See also

RegexExpression