X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Fmeta.g;h=eb793c5fe91d9ac0b42fd7d66dcb26b9b438f16f;hp=571b26c97f97e298a0ee7aedace44f233c4d7ec5;hb=d643fa7e95ca16571a8621ded500abf0215fd5ae;hpb=db888e59c3b40da15ad996ec84d1595bc44e042e diff --git a/tests/meta.g b/tests/meta.g index 571b26c..eb793c5 100644 --- a/tests/meta.g +++ b/tests/meta.g @@ -1,4 +1,4 @@ -s = !ws Grammar !ws +s = ws! Grammar ws! Grammar = NonTerminal +/ ws @@ -9,7 +9,7 @@ NonTerminal = Word "=" RHS /ws // #include (with renaming?) // ANTLR uses ! and ^ suffixes -RHS = (Sequence +/ (!ws "|" !ws)) +/ (!ws ">" !ws) +RHS = (Sequence +/ (ws! "|" ws!)) +/ (ws! ">" ws!) Elements = e*/ws @@ -42,9 +42,10 @@ e = (Quoted|Word) ^":" e | e ^"*" /ws -> ~[*] | e ^"**/" e /ws | e ^"*/" e /ws - | ^"!" e /ws + | e ^"!" | e ^"?" /ws | ^"^" Quoted + | Quoted ^"^" > ^"(" RHS ")" /ws | ^"~" e