v0.6.0
- Allow range parsers to have an open upper or lower bound. For example
0..
is a parser for integers greater than or equal to zero. - Range parsers may be used in patterns. For example
int -> 0..
fails if the parsed integer is not greater than or equal to zero. - Add meta function
@Crash(Message)
to immediately halt the program with a custom error message. - Add stdlib parsers
repeat(p, N)
,repeat_between(p, N, M)
,tuple(elem, N)
, andtuple_sep(elem, sep, N)
for repeating a parser a fixed number of times.
In addition to enabling the new standard library parsers, with range patterns we can write a naive nth-digit Fibonacci function as a suitably feral one-liner
$ possum -p '0.. -> N $ Fib(N) ; Fib(N) = N -> ..1 | (Fib(N - 1) + Fib(N - 2))' -i 11
89
~~(##)'>