[Haskell-cafe] Examples for the problem
fuzxxl at gmail.com
Wed Mar 2 14:14:02 CET 2011
Thank you all for the responses. Here's an example:
As I alrerady said, I tried to parse the MMIXAL assembly language.
Each instruction has up to three operands, looking like this:
@+4 (Jump for bytes forward)
"foo" (the string foo"
etc. A string literal may contain anything but a newline, (there are
no escape codes or similar). But when I add a check for a newline,
the parser just fails and the next one is tried. This is undesired, as
I want to return an error like "unexpected newline" instead. How is
this handled in other parsers?
More information about the Haskell-Cafe