X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Floop.tc;h=d29cb2f9a3303c1e44a1754c73c33bf036f77131;hp=c7b659010eb5a69360d9ff3559016fcac1c99732;hb=acfe58223b9a0f78e64a14a1ca5d5998626ee3fe;hpb=b205c5ee125119b0372328b70e8a66164df18fd0 diff --git a/tests/loop.tc b/tests/loop.tc index c7b6590..d29cb2f 100644 --- a/tests/loop.tc +++ b/tests/loop.tc @@ -1,23 +1,20 @@ testcase { - input "if (bar!) baz!;"; - output "IfThen:{id:{x:{b x:{a r}}} id:{x:{b x:{a z}}}}"; + input "if (bar) if (bop) baz"; + output ""; - s = Expr ";" + s = Expr Expr = IfThen | IfThenElse - | id:: id "!" - id = [a-z] | x:: [a-z] id + | id:: [a-z]++ IfThen = IfThen:: "if" "(" Expr ")" Expr /ws IfThenElse = IfThenElse:: "if" "(" Expr ")" - NotIfThenExpr - "else" - Expr + ((thenelse:: Expr + "else" + Expr /ws)) /ws /ws - NotIfThenExpr = (Expr & [a-z]+) - SpaceIfThen = (~[])*// !IfThen ws = [\n ]** } \ No newline at end of file