Hi Roman

You would need different behaviour for the /lexeme/ parser in
Parsec.Token at least - this is the combinator that promotes a parser
to also consume trailing whitespace.

I suspect you would have to recode most of Parsec.Token module - the
TokenParser is a parameterized module (in the sense of Sheard and
Pasalic [1]), unfortunately /lexeme/ is not one of the parameters and
other combintators are defined using it within the makeTokenParser
function which instantiates the parameterized module.


Alternative you could remake a set of token parsers - this is covered
in the Parsec manual [2] - section 2.11 "Advanced: Separate scanners".

[1] http://web.cecs.pdx.edu/~sheard/papers/JfpPearl.ps
[2] http://legacy.cs.uu.nl/daan/download/parsec/parsec.pdf

Best wishes

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

Reply via email to