X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=tests%2Fregression.tc;h=2537fb9db0b51ff3e3f3da595d914e6404213dae;hb=e65c28bb965098cf2edab842afe5f231f860eb5b;hp=8fd9c65aa830b53e0eb9dd146ec45a96b1547ba6;hpb=bc38f4fcadf222dd5050ed327e1b7557e59855a0;p=sbp.git diff --git a/tests/regression.tc b/tests/regression.tc index 8fd9c65..2537fb9 100644 --- a/tests/regression.tc +++ b/tests/regression.tc @@ -60,8 +60,8 @@ testcase { 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 | () @@ -72,7 +72,7 @@ testcase { input "aabb"; output "xbx:{abab:{a b}}"; - x !::= ~[] + x ::= ~[] => () s ::= x* b x* => xbx b ::= [ab][ab] => abab &~ ( "aa" | "bb" ) @@ -222,22 +222,22 @@ testcase { 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"; @@ -328,17 +328,15 @@ testcase { testcase { input "abc "; - output ""; s ::= q " "* => s q ::= [a-z] [a-z] [a-z] => a3 -// &~ "a" ~[]* &~ ~[] "b" ~[]* } testcase { input "abc "; - output ""; + output "s:{a b c}"; - s ::= [b-z] [a-z] [a-z] " "* => s + s ::= [a-z] [a-z] [a-z] " "* => s }