[antlr-interest] adding "version" option to ANTLR grammars

Johannes Luber JALuber at gmx.de
Tue Jan 20 03:41:37 PST 2009


> At 22:27 20/01/2009, Johannes Luber wrote:
>  >> > options {
>  >> > 	language = ...;
>  >> > 	version = "3.1.1";
>  >> > }
>  >
>  >I just thought about an improvement: ANTLR should warn the user, 
> if
>  >the version isn't identical to the one of the tool. That way 
> people
>  >not only see a potential issue, but are more inclined to update 
> the
>  >string.
> 
> I agree with both of those.

Another improvement would be to allow a comma-separated list. With it one can record all versions of ANTLR, with which the grammar works without any modifications. Once one does a backwards-incompatible upgrade (be it bugfix, changed ANTLR behaviour or the use of a new feature), the list is cleared. And if someone is unsure if a grammar change makes things incompatible, he has to check merely the latest given version.

Johannes
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger


More information about the antlr-interest mailing list