input "aaabbbbccc";
s ::= ab & dc
- ab !::= a b => ab
- dc !::= d c => dc
+ ab ::= a b => ab
+ dc ::= d c => dc
a ::= "a" a | ()
b ::= "b" b "c" | ()
c ::= "c" c | ()
testcase {
input "aabb";
- output "xbx:{abab:{a b}}";
+ output "xbx:{{a} abab:{a b} {b}}";
- x !::= ~[]
+ x ::= ~[]
s ::= x* b x* => xbx
b ::= [ab][ab] => abab
&~ ( "aa" | "bb" )
idl ::= [a-d]
}
-testcase {
- input "a*b*c";
- output "times:{stringify:{{a}} times:{stringify:{{b}} stringify:{{c}}}}";
- w ::= " "
- l ::= id
- s ::= l "=" r => "assign"
- | r
- r ::= l
- | l "=" r => "assign"
- | r "+" r => "plus"
- | (r) "*" r => "times"
- | "(" r ")"
- | r r => "times"
- id ::= idl++ => "stringify"
- idl ::= [a-d]
-}
+//testcase {
+// input "a*b*c";
+// output "times:{stringify:{{a}} times:{stringify:{{b}} stringify:{{c}}}}";
+// w ::= " "
+// l ::= id
+// s ::= l "=" r => "assign"
+// | r
+// r ::= l
+// | l "=" r => "assign"
+// | r "+" r => "plus"
+// | (r) "*" r => "times"
+// | "(" r ")"
+// | r r => "times"
+// id ::= idl++ => "stringify"
+// idl ::= [a-d]
+//}
testcase {
input "a+b*c";
//}
//
+
+testcase {
+ input "abc ";
+
+ s ::= q " "* => s
+ q ::= [a-z] [a-z] [a-z] => a3
+ &~ ~[] "b" ~[]*
+}
+
+testcase {
+ input "abc ";
+ output "s:{a b c}";
+
+ s ::= [a-z] [a-z] [a-z] " "* => s
+}