
31 Jul
2006
31 Jul
'06
5:08 p.m.
On Mon, Jul 31, 2006 at 06:51:27PM +0100,
Chris Kuklewicz
minilang = do char 'a' optional (try (do {comma ; char 'b'})) optional (do {comma ; char 'c'}) eof return "OK"
I now have a new problem which was hidden beneath. If the language authorizes "a,bb" and "a,bbc", "a,bbc" is not accepted by my parser since it already accepted "a,bb" and the "c" which is left triggers a syntax error. This time, "try" believes it succeeded but should not. I need more look-ahead but I'm not sure how? (Again, I do not control the language so I cannot make it more deterministic.)