checkpoint
[sbp.git] / tests / meta.g
index 0920a7a..4c02201 100644 (file)
@@ -1,11 +1,12 @@
 s         ::=  w* Grammar w*                  => "gram"
 Grammar   ::=  R+ => "grammar"
-R         ::=  word  ^"::=" Class+/gt
-            |  word ^"!::=" Class+/gt
+R         ::=  word  ^"::=" Sequence
+            |  word ^"!::=" Sequence
 
 ec        ::=  [~\]\\\-\~] | escaped
 
-Class     ::=  Rewrite +/ bar                 => "alternatives"
+Sequence  ::=  Class   +/ ">"
+Class     ::=  Rewrite +/ "|"                 => "alternatives"
 
 Rewrite   ::=  Rewritex
             |  Rewritex ^"&"  E+
@@ -17,11 +18,9 @@ Rewritex  ::=  E+                             => "rewrite"
             |  E+  "=>" "()"                  => "wrap"
 
 range    ::= ec => "range0" | ec ^"-" ec      => "range0"
-gt   !::= ">"
-bar  !::= "|"
 E        ::= word                             => "nonTerminalY"
            |    [(][)] => "epsilon"
-           |    ^"{" Class+/gt "}"
+           |    ^"{" Sequence "}"
            |     "[" [\~]?  range* "]"        => "range"
            |  E ^"*/" E
            |  E ^"+/" E
@@ -40,7 +39,7 @@ E        ::= word                             => "nonTerminalY"
            |  (E ^"++" > E ^"+")
 
            |     "(" word ^")"
-           >    ^"(" Class+/gt ")"
+           >    ^"(" Sequence ")"
 
 w       !::= " "
            | "//" [~\n]* "\n"