Program = Program:: Directive+/ws
| Program:: (Directive+/ws) ws! CodeBagBody
-Statement = Fiber:: Source ws! ":" ws! (Instruction +/ ws)
- | Literal:: int ":" "sendto" Port /ws
- | NamedCodeBag:: name ":" "{" CodeBagBody "}" /ws
+Statement = Fiber:: Source ":" (Instruction +/ ws) /ws
+ | Literal:: int ":" "sendto" Port ";" /ws
+ | NamedCodeBag:: name ":" "{" CodeBagBody "}" /ws
Instruction = Instruction:: (Brack:: "[" (int|(Star::"*"))? ("r")? "]" ws!)? (Command +/ (ws! "," ws!) ws! ";"!)
Command = Nop:: "nop"
| Take:: "take"
| SendTo:: "sendto" ws! Port
| Deliver:: "deliver"
- | Ack:: "ack" ws! Port
+ | Ack:: "ack" ws! Port
Source = Port
| CodeBag
Port = Port:: shipname "." portname
| ^"()"
-CodeBagBody = Statement +/ (ws (";" ws)?!)
+CodeBagBody = Statement +/ ws
CodeBag = CodeBagRef:: CodeBagName
| AnonymousCodeBag:: "{" CodeBagBody "}" /ws