syntax fixes
authoradam <adam@megacz.com>
Mon, 29 Jan 2007 08:33:33 +0000 (09:33 +0100)
committeradam <adam@megacz.com>
Mon, 29 Jan 2007 08:33:33 +0000 (09:33 +0100)
src/edu/berkeley/fleet/assembler/fleet.g

index 2e6578a..cf1f9ef 100644 (file)
@@ -13,9 +13,9 @@ s               = ws! Program ws!
 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"
@@ -25,7 +25,7 @@ Command         = Nop::     "nop"
                 | Take::    "take"
                 | SendTo::  "sendto" ws! Port
                 | Deliver:: "deliver"
-                | Ack::     "ack" ws! Port
+                | Ack::     "ack"    ws! Port
 
 Source         = Port
                | CodeBag
@@ -34,7 +34,7 @@ Source         = Port
 Port           = Port::     shipname "." portname
                |           ^"()"
 
-CodeBagBody    = Statement +/ (ws (";" ws)?!)
+CodeBagBody    = Statement +/ ws
 CodeBag        = CodeBagRef:: CodeBagName
                | AnonymousCodeBag:: "{" CodeBagBody "}" /ws