PrevTopNext

A more compact DSL

Knack #1: Eliminate "junk" words.

[when](?:and)? [Tt]here is an?=
[when]and( with)? a=

Knack #2: Use generic translation of negation.

[when](?i:and|but) no=not

Knack #3: Provide bindings for all properties.

[when](?i:operator order)=
      $order: OperatorOrder( $code: code,
                             $elId1: elId1,
                             $elId2: elId2,
                             $opId: opId )     
[when]matching operator=$operator: Operator( id == $opId )
[when]matching command code=$cc: CommandCode( code == $code )

PrevTopNext