komentarze od # do konca linii

stmt = 
  label ":"
  "if" "(" cond ")" "{" stmt* "}" "else" "{" stmt* "}"
  "goto" label
  "mark" int
  "unmark" int
  "pickup" "{" stmt* "}" "nofood" "{" stmt* "}"
  "drop"
  "turn" "left"
  "turn" "right"
  "move" "{" stmt* "}" blocked "{" stmt* "}"
  "ifrand" int "{" stmt* "}" "else" "{" stmt* "}"

ifrand 3 { s1 } else { s2 } wykona s1 z pbb 1/3.

cond =
  what where

what =
  "friend"
  "foe"
  "friend" ["with"] "food"
  "foe" ["with"] "food"
  "food"
  "rock"
  "marker" int
  "foe" "marker"
  "home"
  "foe" "home"

where =
  "here"
  "ahead"
  "left"
  "right"
