checkpoint
[sbp.git] / tests / meta.g
index f414867..60e3d80 100644 (file)
@@ -12,15 +12,14 @@ RHS           =  (Sequence +/ (ws! "|" ws!)) +/ (ws! ">" ws!)
 
 Elements      =  e*/ws
 
-PreSequence   =  PS
+PreSequence   =  Elements
               |  (Quoted|Word)   ^"::" PreSequence /ws
               >  PreSequence     ^"/"      e       /ws
               |  PreSequence     ^"->"     e       /ws
-PS            = Elements
 
 Sequence      = psx:: PreSequence
-              |       Sequence ^"&"  PS /ws
-              |       Sequence ^"&~" PS /ws
+              |       Sequence ^"&"  Elements /ws
+              |       Sequence ^"&~" Elements /ws
 
 ec            = ~[\-\]\\]
               | escaped
@@ -52,7 +51,8 @@ NonTerminalReference = Word
 Literal              = Quoted
 Word                 = [a-zA-Z0-9_]++
 Quoted               = "\"" ((~[\"\\] | escaped)+) "\""
-                     | ""::   "\"\""
+                     | EmptyString
+EmptyString = "\"\""
 
 escaped    = "\n":: "\\n"
            | "\r":: "\\r"