Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: binding allowed in postlude

...

Code Block
<action>          ::= <simple action> | <compound action>
<compound action> ::= every { <action list> }
| choose <STRING EXPR>                    | 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> 

...

Code Block
linenumberstrue
<postlude item>          ::= <postlude operation> [ <guard> ]
<guard>                  ::= if <BOOL EXPR>
                           | on final
<postlude operation>     ::= <postlude assignment>
                           | <postlude raise event>
                           | <binding>
<postlude assignment>    ::= ent:<ID> := <EXPR>
                           | clear ent:<ID>
<postlude raise event>   ::= raise <postlude event spec> [ for <STRING EXPR> ] [ attributes <MAP EXPR> ]
                           | last
<postlude event spec>    ::= <ID> event <STRING EXPR>
                           | event <STRING EXPR>

...