checkpoint
[sbp.git] / tests / meta.g
index be8e435..72e1665 100644 (file)
@@ -1,4 +1,10 @@
-s             =  ws grammar:Grammar ws
+
+// use 'a'-'z' or 'a-z' instead of [a-z]?
+// EOF token?
+// #include (with renaming?)
+// ANTLR uses ! and ^ suffixes
+
+s             =  !ws (grammar::Grammar) !ws
 Grammar       =  NonTerminal +/ ws
 NonTerminal   =  Word ^"=" RHS /ws
         
@@ -22,10 +28,11 @@ Range         = range:: ec
               |         ec ^"-" ec
 
 e             =                (Quoted|Word) ^":" e
-              > nonTerminal::          Word
+              > 
+              nonTerminal::          Word
               | literal::       Quoted
               |                  ^"()"
-              |                  ^"{" Sequence "}"       /ws
+              |                  ^"{" PreSequence "}"       /ws
               |                  ^"["  Range* "]"
               |                e ^"++"                   /ws -> ~[/]
               |                e ^"+"                    /ws -> ~[+]