On Sat, Aug 25, 2007 at 08:18:29PM +0100, Andrew Coppin wrote:
> But hang on a minute...
>
> "many" parses 0 or more occurrances of an item.
>
> "sepBy" parses 0 or more occurrances of an item, seperated by another item.
>
> "endBy" parses 0 or more occurrances of an item, terminated by another 
> item.
>
> "sepEndBy" parses 0 or more occurrances of an item, seperated *and* 
> terminated by another item.
>
> ...except that "endBy" doesn't seem to be working right. :-S

There is one other little bit of documented behavior.  Parsec's normal
combinators only parse LL(1) grammars.  Consult any work on formal
languages for the exact meaning and all the consequences, however for
this example it serves to note that after seeing abc, the single
character of lookahead '#' is not sufficient to determine the correct
parse.

Stefan

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to