X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Fregression.tc;h=0d4b8d405e17e6b071beec1d48d00f87a2e82c58;hp=fbc8a4ad6f5cdcf82e91eb1853eef8b931648a8d;hb=50ff66e926f981a5b3716f218ad24603c2a12e3f;hpb=001ef4b0165df34e0ab12a2b9cc29959fe0f19e3 diff --git a/tests/regression.tc b/tests/regression.tc index fbc8a4a..0d4b8d4 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 { "there" "how" { "are" } } +} + testcase { input "ab c"; output "1:{{a b} {c}}"; @@ -267,15 +283,15 @@ testcase { indent !::= ww outdent !::= " " outdent " " - | " " [~]* "\n" + | " " ([~]*) "\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