projects
/
sbp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
checkpoint
[sbp.git]
/
tests
/
meta.g
diff --git
a/tests/meta.g
b/tests/meta.g
index
60e3d80
..
e6f2735
100644
(file)
--- 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
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
RHS = (Sequence +/ (ws! "|" ws!)) +/ (ws! ">" ws!)
Elements = e*/ws
@@
-52,7
+53,7
@@
Literal = Quoted
Word = [a-zA-Z0-9_]++
Quoted = "\"" ((~[\"\\] | escaped)+) "\""
| EmptyString
Word = [a-zA-Z0-9_]++
Quoted = "\"" ((~[\"\\] | escaped)+) "\""
| EmptyString
-EmptyString = "\"\""
+ EmptyString = "\"\""
escaped = "\n":: "\\n"
| "\r":: "\\r"
escaped = "\n":: "\\n"
| "\r":: "\\r"