1 Aug
2006
1 Aug
'06
2:38 a.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.)