checkpoint
[sbp.git] / tests / meta.g
index 110964f..d11981b 100644 (file)
@@ -1,9 +1,10 @@
 s         ::=  Grammar ws                  => "gram"
-w       !::= " "
+w        ::= " "
            | "\n"
            | "\r"
-ws       !::=  w** | w** "//" (~[\n]*) "\n" !ws
-wp       !::=  w++
+ws        ::=  w** => ()
+            |  w** "//" (~[\n]*) "\n" ws => ()
+wp        ::=  w++
 Grammar   ::=  r +/ ws                        => "grammar"
 
 r         ::=  word  ^"::=" alternatives /ws
@@ -18,7 +19,7 @@ Conjuncts  ::=  Sequence
 ps         ::= e*/ws                              => "ps"
              | (e+/ws !ws)? "^" Quoted (!ws e+/ws)? => "ps2"
 psy        ::= ps
-             | ps wp ^"/" !ws e
+             | ps !wp ^"/" !ws e
 psx        ::= psy                   => "psy"
 //             | e "<-" psy        /ws => "psyl"
              |        psy "->" e /ws => "psyr"
@@ -26,7 +27,7 @@ psx        ::= psy                   => "psy"
 Sequence   ::= Quoted => "qprod"
              > psx => "psx"
              | psx  "=>" ^"[]"         /ws
-             | psx ^"=>" (word|Quoted) /ws
+             | psx ^"=>" ("()"|word|Quoted) /ws
 
 ec       ::= ~[\-\]\\]
            | escaped