On 04.05.2010, at 05:39, David Barksdale wrote:
> I tried to define "n-times" using the pattern of none-or-more and came
> to the realization that the state-m-until does not handle a parser
> that fails. So here is m-until for the parser monad and my n-times
> using it:
That looks like a good app
On May 2, 10:59 pm, David Barksdale wrote:
> On Dec 28 2009, 7:03 am, Konrad Hinsen
> wrote:
>
>
>
> > On 27.12.2009, at 01:47, samppi wrote:
>
> > > creates a new rule that repeats a given subrule. The problem with rep+
> > > right now is that it increases the stack for every token it consumes
On Dec 28 2009, 7:03 am, Konrad Hinsen
wrote:
> On 27.12.2009, at 01:47, samppi wrote:
>
> > creates a new rule that repeats a given subrule. The problem with rep+
> > right now is that it increases the stack for every token it consumes,
> > which overflows the stack with large amounts of tokens.
On 27.12.2009, at 01:47, samppi wrote:
> creates a new rule that repeats a given subrule. The problem with rep+
> right now is that it increases the stack for every token it consumes,
> which overflows the stack with large amounts of tokens.
>
> Is there, then, a way to rewrite rep+ so that it doe
For those of you who are familiar with Clojure monads, please consider
the following problem. In the REPL log below, I define a monad parser-
m whose monadic values are parser functions (in fact, it's the same as
state-m, only with nil indicating failure) and a function rep+ that
creates a new rule