
14 Mar
2011
14 Mar
'11
1:55 p.m.
Hi. I want to use parsers from haskell-src-exts as sub-parsers, which does not seem to work since they insist on consuming the input completely. I would need them to parse a maximal prefix, and return the (unconsumed) rest of input as well (cf. http://hackage.haskell.org/packages/archive/parsec/3.1.1/doc/html/Text-Parse... ) I figure that happy has the %partial directive for that, but the description http://www.haskell.org/happy/doc/html/sec-directives.html#sec-partial-parser... does not really tell me how to obtain the rest of the input. Any hints (or code samples) appreciated. Thanks - J.W.