Child pages
  • RuleExpression.Not

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Code Block
| Not = "!" RuleExpression ^ 20

This Not syntactic predicate serves the same purpose as the And predicate, only it inverts the value. If parsing of the RuleExpression subrule fails, the rule in which the predicate is encountered will be parsed as if there were no predicate. If it’s successfully parsed, the entire rule that is being parsed will be rolled back.

Code Block
syntax IndentedEmbeddedStatement
  | Statement = !"{" EmbeddedStatement; // not a block statment
  | Block     = &"{" Stmt=Block;

In this example, the Block rule will be parsed only if the ‘{‘ character is not found in a current parsing position.

See also