From 0c38e4b1dffc94280967b035325e86d7770ce939 Mon Sep 17 00:00:00 2001 From: Dmitry Boulytchev Date: Sun, 4 Oct 2020 17:58:26 +0300 Subject: [PATCH] Fixed Ostap::expr interface to comply the spec --- src/version.ml | 2 +- stdlib/Ostap.lama | 2 +- stdlib/regression/test11.lama | 2 +- stdlib/regression/test12.lama | 2 +- stdlib/regression/test13.lama | 2 +- stdlib/regression/test14.lama | 2 +- stdlib/regression/test15.lama | 2 +- stdlib/regression/test16.lama | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/version.ml b/src/version.ml index 55f648f02..152f17ff3 100644 --- a/src/version.ml +++ b/src/version.ml @@ -1 +1 @@ -let version = "Version 1.00, 2f640fdc6, Wed Sep 23 01:39:38 2020 +0300" +let version = "Version 1.00, 52281261c, Wed Sep 30 21:21:57 2020 +0300" diff --git a/stdlib/Ostap.lama b/stdlib/Ostap.lama index 28042ef8a..2e7d2bcf9 100644 --- a/stdlib/Ostap.lama +++ b/stdlib/Ostap.lama @@ -316,7 +316,7 @@ public fun expr (ops, opnd) { esac } - inner (ops) + inner (ops) (id) } initOstap () diff --git a/stdlib/regression/test11.lama b/stdlib/regression/test11.lama index 7cc97d7ab..707fc0606 100644 --- a/stdlib/regression/test11.lama +++ b/stdlib/regression/test11.lama @@ -6,7 +6,7 @@ local a = token ("a"), sub = [token ("-"), fun (l, _, r) {Sub (l, r)}], mul = [token ("*"), fun (l, _, r) {Mul (l, r)}], div = [token ("/"), fun (l, _, r) {Div (l, r)}], - exp = expr ({[Left, {add, sub}], [Left, {mul, div}]}, a) (id); + exp = expr ({[Left, {add, sub}], [Left, {mul, div}]}, a); printf ("%s\n", parseString (exp |> bypass (eof), "a").string); printf ("%s\n", parseString (exp |> bypass (eof), "a+a").string); diff --git a/stdlib/regression/test12.lama b/stdlib/regression/test12.lama index 74c474561..0e789cff6 100644 --- a/stdlib/regression/test12.lama +++ b/stdlib/regression/test12.lama @@ -13,7 +13,7 @@ local a = token ("a"), sub = [token ("-"), fun (l, _, r) {Sub (l, r)}], mul = [token ("*"), fun (l, _, r) {Mul (l, r)}], div = [token ("/"), fun (l, _, r) {Div (l, r)}], - exp = expr ({[Left, {add, sub}], [Left, {mul, div}]}, a) (id), + exp = expr ({[Left, {add, sub}], [Left, {mul, div}]}, a), i; printf ("%s\n", parseString (exp |> bypass (eof), gen (5)).string) diff --git a/stdlib/regression/test13.lama b/stdlib/regression/test13.lama index 57c6b9008..890f12ded 100644 --- a/stdlib/regression/test13.lama +++ b/stdlib/regression/test13.lama @@ -6,7 +6,7 @@ local a = token ("a"), sub = [token ("-"), fun (l, _, r) {Sub (l, r)}], mul = [token ("*"), fun (l, _, r) {Mul (l, r)}], div = [token ("/"), fun (l, _, r) {Div (l, r)}], - exp = expr ({[Right, {add, sub}], [Left, {mul, div}]}, a) (id); + exp = expr ({[Right, {add, sub}], [Left, {mul, div}]}, a); printf ("%s\n", parseString (exp |> bypass (eof), "a+a-a").string); printf ("%s\n", parseString (exp |> bypass (eof), "a*a/a*a").string); diff --git a/stdlib/regression/test14.lama b/stdlib/regression/test14.lama index 6cf1f7b12..9903fbd15 100644 --- a/stdlib/regression/test14.lama +++ b/stdlib/regression/test14.lama @@ -8,7 +8,7 @@ local a = token ("a"), sub = [token ("-"), fun (l, _, r) {Sub (l, r)}], mul = [token ("*"), fun (l, _, r) {Mul (l, r)}], div = [token ("/"), fun (l, _, r) {Div (l, r)}], - exp = expr ({[Nona, singleton (eq)], [Right, {add, sub}], [Left, {mul, div}]}, a) (id); + exp = expr ({[Nona, singleton (eq)], [Right, {add, sub}], [Left, {mul, div}]}, a); printf ("%s\n", parseString (exp |> bypass (eof), "a+a-a").string); printf ("%s\n", parseString (exp |> bypass (eof), "a*a/a*a").string); diff --git a/stdlib/regression/test15.lama b/stdlib/regression/test15.lama index 5f3224624..64216b229 100644 --- a/stdlib/regression/test15.lama +++ b/stdlib/regression/test15.lama @@ -8,7 +8,7 @@ local a = token ("a"), sub = [token ("-"), fun (l, _, r) {Sub (l, r)}], mul = [token ("*"), fun (l, _, r) {Mul (l, r)}], div = [token ("/"), fun (l, _, r) {Div (l, r)}], - exp = expr ({[Nona, singleton (eq)], [Right, {add, sub}], [Left, {mul, div}]}, a) (id); + exp = expr ({[Nona, singleton (eq)], [Right, {add, sub}], [Left, {mul, div}]}, a); printf ("%s\n", parseString (exp |> bypass (eof), "a=a").string); printf ("%s\n", parseString (exp |> bypass (eof), "a*a=a*a").string); diff --git a/stdlib/regression/test16.lama b/stdlib/regression/test16.lama index 4443c61d2..f582afa24 100644 --- a/stdlib/regression/test16.lama +++ b/stdlib/regression/test16.lama @@ -8,7 +8,7 @@ local a = token ("a") @ lift(fun (a) {if a then "a" else "b" fi}), sub = [token ("-"), fun (l, _, r) {fun (a) {Sub (l (a), r (a))}}], mul = [token ("*"), fun (l, _, r) {fun (a) {Mul (l (a), r (a))}}], div = [token ("/"), fun (l, _, r) {fun (a) {Div (l (a), r (a))}}], - exp = expr ({[Nona, singleton (eq)], [Right, {add, sub}], [Left, {mul, div}]}, a) (id); + exp = expr ({[Nona, singleton (eq)], [Right, {add, sub}], [Left, {mul, div}]}, a); fun unpack (x, y) { case x of