Joel Reymont wrote:
My expression is x + 1 where x can be either "Close", or "Close[N]" or
"Close[N] of DataM where N and M are positive integers. What happens in
my case is that 1 + x parses fine but x + 1 doesn't. In fact, I would be
fine with parsing Close + such that it ignores the plus and returns the
parse.
Does "option" help? Like:
string "Close"
option () (bracketN >> option () ofDataM)
where bracketN parses [N], ofDataM parses " of DataM".
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe