# this isn't quite BNF, should fix that.

file: <defines> <tests>

defines: nodecount

nodecount: nodecount <number>

tests: test tests
     | test

test: test <action> <reactions> end

reactions: noreaction
         | <reaction> <reactions>
         | <reaction>

reaction: lrpl
        | arpl
        | drop

action: lock
      | act
      | cancel
      | dropexp

lock: lock <nodeidx> <subid> <keyname> <state> <flags> <lvb>
lock: lock <nodeidx> <subid> <keyname> [<start> <stop>] <state> <flags> <lvb>

act: action <nodeidx> <subid> <keyname> <actname> <lvb>

cancel: cancel <nodeidx> <subid> <keyname>

dropexp: dropexp <nodeidx> <string> <keyname>

lrpl: lrpl <nodeidx> <subid> <keyname> <state> <flags> <error> <lvb>
lrpl: lrpl <nodeidx> <subid> <keyname> [<start> <stop>] <state> <flags> <error> <lvb>

arpl: arpl <nodeidx> <subid> <keyname> <actname> <error>

drop: drop <nodeidx> <subid> <keyname> <state>

nodeidx: <number>

subid: <number>

keyname: <string>

lvb: nolvb
   |<string>

state: exclusive
     | shared
     | deferred
     | unlock

actname: holdlvb
       | unholdlvb
       | synclvb

flags: noflags
     | <iflg>

iflg: <flag>|<iflg>
    | <flag>

flag: docb
    | try
    | any
    | ignoreexp
    | cachable
    | piority

error: ok
     | tryfailed
     | badstate
     | canceled
     | alreadypending
# ?others?
