X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Fmeta.g;h=02464c31e2e0261a606b409b6fd0b2e158cf88b8;hp=60e3d800d3e1c5893916a17f0091ea1993c4a53f;hb=df76fcb56242a90011500ab89092d2108350a8ab;hpb=f56263f0f1cf0c01dfbd8ea7bd1ba8a9c6bd8042 diff --git a/tests/meta.g b/tests/meta.g index 60e3d80..02464c3 100644 --- a/tests/meta.g +++ b/tests/meta.g @@ -1,13 +1,15 @@ +// use 'a'-'z' or 'a-z' instead of [a-z]? +// EOF token? +// #include (with renaming?) + s = ws! Grammar ws! Grammar = NonTerminal +/ ws -NonTerminal = Word "=" RHS /ws - -// use 'a'-'z' or 'a-z' instead of [a-z]? -// EOF token? -// #include (with renaming?) - +NonTerminal = Word "=" RHS /ws + | Word "*" ws! ^"=" ws! RHS + | Word "*/" Word ws! ^"=" ws! RHS + RHS = (Sequence +/ (ws! "|" ws!)) +/ (ws! ">" ws!) Elements = e*/ws @@ -52,7 +54,7 @@ Literal = Quoted Word = [a-zA-Z0-9_]++ Quoted = "\"" ((~[\"\\] | escaped)+) "\"" | EmptyString -EmptyString = "\"\"" + EmptyString = "\"\"" escaped = "\n":: "\\n" | "\r":: "\\r"