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
2dc0fb9
..
98a62a3
100644
(file)
--- a/
tests/meta.g
+++ b/
tests/meta.g
@@
-1,4
+1,4
@@
-s ::= ws grammar ws => "gram"
+s ::= grammar ws => "gram"
ws !::= w** | w** "//" (~[\n]*) "\n" ws
wp !::= w++
grammar ::= r +/ ws => "grammar"
ws !::= w** | w** "//" (~[\n]*) "\n" ws
wp !::= w++
grammar ::= r +/ ws => "grammar"
@@
-16,14
+16,15
@@
ps ::= e*/ws => "ps"
| (e+/ws ws)? "^" quoted (ws e+/ws)? => "ps2"
psy ::= ps
| ps wp ^"/" ws e
| (e+/ws ws)? "^" quoted (ws e+/ws)? => "ps2"
psy ::= ps
| ps wp ^"/" ws e
-psx ::= psy ^"?=>" e /ws
- | psy ^"!=>" e /ws
- > psy
+psx ::= psy => "psy"
+ | e "<-" psy /ws => "psyl"
+ | psy "->" e /ws => "psyr"
+ | e "<-" psy "->" e /ws => "psylr"
sequence ::= quoted => "qprod"
> psx
| psx ^"=>" (word|quoted) /ws
sequence ::= quoted => "qprod"
> psx
| psx ^"=>" (word|quoted) /ws
-ec ::= [~\-\]\\\~]
+ec ::= ~[\-\]\\]
| escaped
range ::= ec => "range"
| escaped
range ::= ec => "range"
@@
-34,7
+35,6
@@
e ::= word => "nonTerminal"
| ^"()"
| ^"{" sequence "}" /ws
| ^"[" range* "]"
| ^"()"
| ^"{" sequence "}" /ws
| ^"[" range* "]"
- | ^"[~" range* "]"
| (e ^"++" /ws > e ^"+" /ws)
| (e ^"++/" e /ws > e ^"+/" e /ws)
| (e ^"++" /ws > e ^"+" /ws)
| (e ^"++/" e /ws > e ^"+/" e /ws)
@@
-44,14
+44,16
@@
e ::= word => "nonTerminal"
| "(" word ^")" /ws
> ^"(" alternatives ")" /ws
| "(" word ^")" /ws
> ^"(" alternatives ")" /ws
+ | ^"~" e
+
w !::= " "
| "\n"
| "\r"
word ::= [a-zA-Z0-9_]++
w !::= " "
| "\n"
| "\r"
word ::= [a-zA-Z0-9_]++
-quoted ::= "\"" (([~\"\\] | escaped)+) "\""
+quoted ::= "\"" ((~[\"\\] | escaped)+) "\""
| "\"\"" => ""
escaped ::= "\\n" => "\n"
| "\\r" => "\r"
| "\"\"" => ""
escaped ::= "\\n" => "\n"
| "\\r" => "\r"
- | "\\" [~nr]
+ | "\\" ~[nr]