X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Fmeta.g;h=f06eb2f42010e4165a6b498eb7203b98d8645e84;hp=638fa71a19a21366e750b497ea9c13703e460d62;hb=61a0c83fd40b98292b2dfe1eaba237eb804b2cb4;hpb=78a166e98747ddeb79310ccba340f292fa8a6dca diff --git a/tests/meta.g b/tests/meta.g index 638fa71..f06eb2f 100644 --- a/tests/meta.g +++ b/tests/meta.g @@ -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"