> Of course that is fine. But keep in mind that all parser combinator based
> libraries are based on a top-down parsing strategy which in most places,
> BUT NOT ALL, fits Haskell's syntax. Try to use the chaining combinators
> where-ever possible. In case of doubt you can always spy on how things
Dnia niedziela, 3 lutego 2013, Doaitse Swierstra napisał:
> Use the uu-parsinglib library, which provides error messages, repairs your
> errors and using its idioms definition you can even write:
>
> inParens c = iI '(' c ')' Ii
>
> I think you cannot get it shorter and with more functionality.
>
>
On Jan 31, 2013, at 10:47 , Jan Stolarek wrote:
> Thanks for replies guys. I indeed didn't notice that there are monads and
> applicatives used in
> this parser. My thought that monadic parsers are more verbose came from
> Hutton's paper where the
> code is definitely less readable than in e
On 1/30/13 7:21 AM, Jan Stolarek wrote:
I will be writing a parser in Haskell and I wonder how to approach the problem.
My first thought
was to use monadic parser, e.g. like the one described by Hutton and Meijer in
"Monadic Parsing
in Haskell" functional pearl. But then I stumbled upon this:
Dnia czwartek, 31 stycznia 2013, Ertugrul Söylemez napisał:
> Remember that 'Either e' is also a monad. =)
I remember - this makes the change from Maybe to Either very easy :) Still I
found that adding
error message to every combinator and function ads a lot of boilerplate. Also,
I experince
pr
On Wed, Jan 30, 2013 at 1:21 PM, Jan Stolarek wrote:
> I will be writing a parser in Haskell and I wonder how to approach the
> problem.
Utrecht University has a course that covers this, among other things. You
might find the slides and lecture notes useful:
http://www.cs.uu.nl/wiki/TC/CourseMa
Jan Stolarek wrote:
> Thanks for replies guys. I indeed didn't notice that there are monads
> and applicatives used in this parser. My thought that monadic parsers
> are more verbose came from Hutton's paper where the code is definitely
> less readable than in example I provided.
>
> There is one
Thanks for replies guys. I indeed didn't notice that there are monads and
applicatives used in
this parser. My thought that monadic parsers are more verbose came from
Hutton's paper where the
code is definitely less readable than in example I provided.
There is one more thing that bothers me.
On 30 January 2013 12:38, Ertugrul Söylemez wrote:
>
> A monadic parser /is/ a combinator parser. The code you linked just
> doesn't go as far as wrapping it up with a newtype and providing a monad
> instance.
Further, (+>) in the linked example is monadic bind and `result` is `return`.
The c
Jan Stolarek wrote:
> I will be writing a parser in Haskell and I wonder how to approach the
> problem. My first thought was to use monadic parser, e.g. like the one
> described by Hutton and Meijer in "Monadic Parsing in Haskell"
> functional pearl. But then I stumbled upon this:
>
> https://git
10 matches
Mail list logo