X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Fmeta.g;h=02464c31e2e0261a606b409b6fd0b2e158cf88b8;hp=956711b881f136c5f0abbcc4abec875fc52aebf3;hb=df76fcb56242a90011500ab89092d2108350a8ab;hpb=1eea118232a2c1da8228033ed876bc0b3b49c592 diff --git a/tests/meta.g b/tests/meta.g index 956711b..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 @@ -51,7 +53,8 @@ NonTerminalReference = Word Literal = Quoted Word = [a-zA-Z0-9_]++ Quoted = "\"" ((~[\"\\] | escaped)+) "\"" - | "":: "\"\"" + | EmptyString + EmptyString = "\"\"" escaped = "\n":: "\\n" | "\r":: "\\r"