Child pages
  • RegexRule
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

These are named rules that parse regular grammar (regular expressions). They don’t support recursion of any kind, however the (*and+) loops are supported.

Examples:

Such rules do not produce AST. Instead, a text span is calculated for them. NSpan type values correspond to them in materialized AST.

During error recovery, no internal recovery of RegexRule is performed, since they are considered solid values.

Do not apply these rules for defining complicated tokens, such as strings and comments. This will result in incorrect auto-recovery from detected errors. Describe strings and comments as token rules which content can be described with regex rules.

RegexRuleBody may contain nested token rules:

See also

RuleAttributes
Name
RegexExpression
RegexRuleBody
token vs. regex

  • No labels