Jonas Maebe wrote:
On 03 Aug 2010, at 11:40, Frank Heckenbach wrote:
To the FPC people who are reading this, how do you verify your grammar?
We don't. And yes, we have had to break backwards compatibility a few times in order to fix ambiguities that had crept in (e.g. http://wiki.freepascal.org/User_Changes_2.4.0#Order_of_field_and_method.2Fpr... ).
Indeed, a typical example. We've had some similar cases (including some we had to support for compatiblity with this or that dialect).
Without trying it out, I suppose this case would have produced a S/R conflict in Bison, though it would have been possible to parse it perhaps with some tricks, or otherwise with GLR. (Not saying that you should have -- near-ambiguous grammar is generally not nice, and if there were no major backward-compatibility problems, it was probably better to get rid of it.)
Frank