[Haskell-cafe] Re: Parsec question

Erik de Castro Lopo mle+cl at mega-nerd.com
Tue Dec 23 17:22:06 EST 2008


Benedikt Huber wrote:

> Using sepBy1, the above parser can be written as
> 
>      dot = T.dot lexer
>      qualifiedIdentifier = sepBy1 identifier dot

My next problem is matching things like:

   identifier  ('.' identifier)*   ('.' '*')?

I've had a look at lookAhead from Text.ParserCombinators.Parsec.Combinator
but I can't get it to work.

Clues?

Erik
-- 
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"That being done, all you have to do next is call free() slightly
less often than malloc(). You may want to examine the Solaris
system libraries for a particularly ambitious implementation of
this technique."
-- Eric O'Dell (comp.lang.dylan)


More information about the Haskell-Cafe mailing list