4.3.4. Random Rule

[Tip]Description

The random ruleis a rule-container; it executes a non-deterministically chosen rule from the rules listed inside.

[Important]Syntax
RandomRuleAST ::= random { AsmRulesAST } OptSemicolonAST 

A random rule contains an arbitrary number of other ASM rules.

[Note]Semantics

The random rule executes exactly one rule from the nested rules.

The random rule fails if the executed rule fails. No backtracking is provided upon failure, i.e. no other rules are selected if the previous rule fails. The previous state of local variables are not restored after failure.

Defined In:  compound rule

See Also:  sequential rule, parallel rule