[Haskell-cafe] An irritating Parsec problem

brian brianchina60221 at gmail.com
Wed Oct 15 15:30:33 EDT 2008


On Wed, Oct 15, 2008 at 2:22 PM, Andrew Coppin
<andrewcoppin at btinternet.com> wrote:
> So if "+" is not a valid token, but the user writes
>  x = 1; y = 2; z = 3 + z; w = 4;
> then what my program receives back is "x = 1; y = 2; z = 3"

You said you expect one or more 'expression'. It looks as if your
expression can optionally be terminated by semicolon? Can you demand
semicolons at the ends of your expressions? Then, "z = 3" would not
constitute a complete expression and an error would be raised.


More information about the Haskell-Cafe mailing list