
5 Dec
2004
5 Dec
'04
1:36 p.m.
Mark Carroll writes:
Is there a way in Parsec to, within a parser, throw an error generated by another parser?
How about wrapping the ParseError into your result type? Like this: data Foo = Bar String | ... | BadLuck ParseError Then you could run any number of parsers (with 'runParser') inside another parser and return their results and errors without needing any special support from the Parsec library. Peter