X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=tests%2Floop.tc;h=d29cb2f9a3303c1e44a1754c73c33bf036f77131;hp=c7b659010eb5a69360d9ff3559016fcac1c99732;hb=22a2ca7685dcf29e9ddcc6e26443ea0277385fca;hpb=e5cfb136bf7fd1352eff1bd87a458aa4ff748537 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