use >> and << for indent/dedent
[sbp.git] / tests / meta.g
index 638fa71..f06eb2f 100644 (file)
@@ -15,7 +15,7 @@ NonTerminal   = NonTerminal:: Word            ws  "=" ws RHS
               |               Word  "*"       ws ^"=" ws RHS
               |               Word  "*/" Word ws ^"=" ws RHS
        
-RHS::         = ("|":: Sequence +/ (ws "|" ws)) +/ (ws ">" ws)
+RHS::         = ("|":: Sequence +/ (ws "|" ws)) +/ (ws (">" -> ~">") ws)
 
 Elements::    = e*/ws
 
@@ -53,6 +53,8 @@ e             =                                   e ^"!"
               |                 "~":: ("~" -> ~"~")!  e
               |                  ^"\\{"
               |                  ^"\\}"
+              |                  ^">>"
+              |                  ^"<<"
 
 Word::        = [.a-zA-Z0-9_]++ &~ "."+
 Quoted::      = "\"" (~[\"\\] | escaped)+ "\""
@@ -60,8 +62,12 @@ Quoted::      = "\"" (~[\"\\] | escaped)+ "\""
 
 Range::       = ec
               | ec "-" ec
+              | "<<":: [<][<]
+              | ">>":: [>][>]
 
-ec            = ~[\-\]\\]
+ec            = ~[\-\]\\<>]
+              | [>] -> ~[>]
+              | [<] -> ~[<]
               | escaped
 escaped       = "\n"::  "\\n"
               | "\r"::  "\\r"