implement am26 support for constants
[fleet.git] / src / edu / berkeley / fleet / assembler / fleet.g
index d11d42e..4158d18 100644 (file)
@@ -33,27 +33,31 @@ Command         = Nop::      "nop"
                 | Discard::  "dismiss"
                 | Take::     ("take"|"receive")
                 | SendTo::   "sendto" ws! Port
+                | DataOutDest::   "send"
                 | Deliver::  "deliver"
                 | Ack::      "notify" ws! Port
 
 Source         = Port
                | ShipSpecific
 
-SSL            = ShipSpecificLiteral:: shiptype "." ShipSpecificLiteral
+SSL            = ShipSpecificLiteral:: shiptype "." portname "[" SSLSpec "]"
 Port           = Port::     shipname "." portname
                | SubPort::  shipname "." portname "." portname
                |           ^"()"
 
+SSLSpec::      = SSLElement +/ ","
+SSLElement     = "":: [a-zA-Z0-9=_]++
+
 CodeBagBody::  = Statement +/ ws
 CodeBag        = CodeBagRef:: CodeBagName
                | AnonymousCodeBag:: "{" CodeBagBody "}" /ws
 
 CodeBagName         = name
 shipname            = name
-shiptype            = Name:: [A-Z]    ("":: [A-Za-z0-9\[\]_]**)
-ShipSpecificLiteral = Name:: [A-Z]    ("":: [A-Z0-9\[\]_]**)
-portname            = Name:: [a-z]    ("":: [A-Za-z0-9\[\]_]**)
-name                = Name:: [A-Za-z] ("":: [A-Za-z0-9\[\]_]**)
+shiptype            = Name:: [A-Z]    ("":: [A-Za-z0-9_]**)
+ShipSpecificLiteral = Name:: [A-Z]    ("":: [A-Z0-9_]**)
+portname            = Name:: [a-z]    ("":: [A-Za-z0-9_]**)
+name                = Name:: [A-Za-z] ("":: [A-Za-z0-9_]**)
 index               = "[" ("":: [0-9]+) "]" | ("":: [0-9]+)
 int                 = "":: [\-0-9]++
 ShipSpecific        = ShipSpecific:: "\"" (~[\"])++ "\""
@@ -66,4 +70,5 @@ Directive      =           "#memory" "{" (Memory:: int +/ (ws! "," ws!)) "}" /ws
                | Include:: "#include" ws! "\"" ~[\"]+ "\""
                | Ship::    "#ship" shipname ":" ("":: [0-9A-Za-z_.]++) /ws
                | Expect::  "#expect" int /ws
+               | Skip::    "#skip"