Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: parentheses for expression after choose


Code Block
<action>          ::= <simple action> | <compound action>
<compound action> ::= every { <action list> }
                    | choose <ID> { <choice list> }
                    | choose ( <STRING EXPR> ) { <choice list> }
                    | sample { <choice list> }
<actions list>    ::= <action> | <action list> ; <action> [;]
<choice list>     ::= <choice> | <choice list> ; <choice> [;]
<choice>          ::= <ID> => <action>
<simple action>   ::= noop()
                    | <SEND DIRECTIVE>
                    | <HTTP POST>
                    | <DEFINED ACTION>
                    | <BUILT-IN ACTION>


The expression in the choose compound action must evaluate to a string which follows the rules for a KRL identifier. The id in a choice is given as a bare word, and the choices are considered in the order in which they appear in the choice list. The first choice for which the id equals the string computed by the expression has its action taken and the choose expression compound action is complete. No further choices will be considered.

sample compound action

One of the actions will be chosen at random. See also the Compound Actions page.

noop() action

The grammar for the conditional action portion of a rule (repeated here for convenience>