X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Fmeta.g;fp=tests%2Fmeta.g;h=e6f27358557367dc817d41910a06a3ec873213b5;hp=60e3d800d3e1c5893916a17f0091ea1993c4a53f;hb=87bf9df44b553d0e5fb1465983b0dc9f90b699b0;hpb=f56263f0f1cf0c01dfbd8ea7bd1ba8a9c6bd8042 diff --git a/tests/meta.g b/tests/meta.g index 60e3d80..e6f2735 100644 --- a/tests/meta.g +++ b/tests/meta.g @@ -1,13 +1,14 @@ +// 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 + RHS = (Sequence +/ (ws! "|" ws!)) +/ (ws! ">" ws!) Elements = e*/ws @@ -52,7 +53,7 @@ Literal = Quoted Word = [a-zA-Z0-9_]++ Quoted = "\"" ((~[\"\\] | escaped)+) "\"" | EmptyString -EmptyString = "\"\"" + EmptyString = "\"\"" escaped = "\n":: "\\n" | "\r":: "\\r"