Fixed bug in tail-call optimization

This commit is contained in:
Dmitry Boulytchev 2020-04-10 03:15:18 +03:00
parent b7ec1c2e63
commit 7748144a8f
4 changed files with 19 additions and 3 deletions

View file

@ -0,0 +1 @@
Yes

View file

@ -0,0 +1,15 @@
import Ostap;
fun pure(v) {
empty @ lift(v)
}
local parse =
token(".") |> fun(e1) {
token(".") |> fun(e2) {
pure(Dot(e1, e2)) }};
case parseString(parse |> bypass(eof), "..") of
Succ(_) -> printf("Yes\n")
| Fail(_, _, _) -> printf("No\n")
esac