lama_byterun/stdlib/regression/test27.lama

15 lines
264 B
Text
Raw Normal View History

2020-04-10 03:15:18 +03:00
import Ostap;
fun pure(v) {
empty @ lift(v)
}
var parse =
2020-04-10 03:15:18 +03:00
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