X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Fregression.tc;h=9a7ef5062056e234ec8b4eca33ccef0325cf400e;hp=c807a7a0041f2833fce5387e4f4bfa280ad10708;hb=0a66237ec014b7e8a4c12efd03b72ce88fe278f3;hpb=6470b3188790f3461508a9f290d70c344c6fedf2 diff --git a/tests/regression.tc b/tests/regression.tc index c807a7a..9a7ef50 100644 --- a/tests/regression.tc +++ b/tests/regression.tc @@ -19,6 +19,22 @@ // s ::= () => s0 //} +tibcase { + input +" + hello + there + how + { are } +"; + output "yep"; + + s ::= { Hello } => "yep" + w ::= " " | "\n" + ws !::= w** + Hello ::= "hello" ws { ws "there" ws "how" ws { { "are" } ws } } +} + testcase { input "ab c"; output "1:{{a b} {c}}"; @@ -270,12 +286,12 @@ outdent !::= " " outdent " " | " " ([~]*) "\n" any !::= [~]* -s ::= !any "\n\n" !ww statement !ww "\n\n" !any => smt -ww ::= sp* +s ::= any "\n\n" ww statement ww "\n\n" any => smt +ww !::= sp* ws !::= sp** sp ::= " " -block ::= "\n" !indent blockBody +block ::= "\n" indent blockBody &~ "\n" outdent [~\ ] [~]* blockBody ::= statement