mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 14:58:50 +00:00
15 lines
266 B
Text
15 lines
266 B
Text
|
|
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
|