[Haskell-cafe] Overlaping Parsec rules

Christian Maeder Christian.Maeder at dfki.de
Wed Mar 9 14:44:47 CET 2011


Am 08.03.2011 13:50, schrieb Christian Maeder:
> Am 08.03.2011 13:35, schrieb Hauschild, Klaus (EXT):
>> Hi Christian,
>>
>> Thank you for your help. Now the current version of Parse.hs (http://code.google.com/p/hgmltracer/source/browse/trunk/hGmlTracer/src/Gml/Parse.hs) works well for the test file fact.gml.
> 
>                                    spaces
>                                    char end
> 
> The idea is to call spaces _after_ every token.

In other words "spaces" before "char end" is not needed.

> So the keyword parser
> should be extended by ">> spaces" and also the number, char, string,
> binder and identifier parsers.

This is not necessary since you skip spaces after parseGml'.

"skip (A <|> B)" is better than "skip A <|> skip B".

C.




More information about the Haskell-Cafe mailing list