X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=tests%2Fmeta.g;h=f414867da2c83faf7a344d9353d24dc89932b750;hb=8129e3bcdf7df528a636daf66e0b35b1dceb153f;hp=eb793c5fe91d9ac0b42fd7d66dcb26b9b438f16f;hpb=d643fa7e95ca16571a8621ded500abf0215fd5ae;p=sbp.git diff --git a/tests/meta.g b/tests/meta.g index eb793c5..f414867 100644 --- a/tests/meta.g +++ b/tests/meta.g @@ -7,20 +7,20 @@ NonTerminal = Word "=" RHS /ws // use 'a'-'z' or 'a-z' instead of [a-z]? // EOF token? // #include (with renaming?) -// ANTLR uses ! and ^ suffixes RHS = (Sequence +/ (ws! "|" ws!)) +/ (ws! ">" ws!) Elements = e*/ws -PreSequence = ps:: Elements - | (Quoted|Word) ^"::" PreSequence /ws - > PreSequence ^"/" e /ws - | PreSequence ^"->" e /ws +PreSequence = PS + | (Quoted|Word) ^"::" PreSequence /ws + > PreSequence ^"/" e /ws + | PreSequence ^"->" e /ws +PS = Elements Sequence = psx:: PreSequence - | Sequence ^"&" Elements /ws - | Sequence ^"&~" Elements /ws + | Sequence ^"&" PS /ws + | Sequence ^"&~" PS /ws ec = ~[\-\]\\] | escaped @@ -45,7 +45,6 @@ e = (Quoted|Word) ^":" e | e ^"!" | e ^"?" /ws | ^"^" Quoted - | Quoted ^"^" > ^"(" RHS ")" /ws | ^"~" e