[Haskell-cafe] Error recovery in Happy

Tom tom.ppc at gmail.com
Tue Mar 8 14:37:02 CET 2011

Hey guys,

I was wondering if there were possiblities to ignore certain errors during
parsing. I tried using the error token, but that didn't seem to work. I
looked at the following topic

For my parser I need to be able to parse a certain token at any place, but
only in some places it is part of a rule. In other cases this token should
be ignored after which the parser just procedes to the next token. Is this
possible with Happy? Should I use the monadic parser to achieve this?

More concretely, I have tokenized some sourcecode which contains comments,
these should be ignored except when they are located above a function, in
which case I want them to parse.

Any ideas about this issue are greatly appreciated!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110308/d48d22fc/attachment.htm>

More information about the Haskell-Cafe mailing list