On Sat, Feb 25, 2012 at 5:21 PM, Ian Lynagh <igloo@earth.li> wrote:
Hi all,
The code below defines a ReadP parser which can parse either a keyword
"wrapper" or an arbitrary identifier. I was hoping that it would give
the output
(CWrapper1,"")
(CWrapper2,"")
(CFunction "wrapper","")
but it actually gives
(CWrapper2,"")
(CFunction "wrapper","")
(CWrapper1,"")
i.e. completed parses are returned before the parse that needs to "look"
at the remaining input.
I can see the logic behind the current behaviour, but in this case at
least it's quite inconvenient.
What do you think?
Did I miss a better way to solve the problem?
Should the behaviour be changed?
If so, is changing it easy?