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"
     '0'>>(1+2)

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?

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to