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

Johannes Luber JALuber at gmx.de
Tue Jan 20 01:27:44 PST 2009


> > That is an interesting idea. I am cc'ing the  interest list. sorry for  
> > the long delay.
> > 
> > I take it that you are suggesting the following
> > 
> > grammar T;
> > options {
> > 	language = ...;
> > 	version = "3.1.1";
> > }
> 
> I do.
> 
> Johannes

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.

Johannes
> > 
> > Ter
> > On Nov 29, 2008, at 1:42 PM, Johannes Luber wrote:
> > 
> > > Hi!
> > >
> > > Thinking about the upcoming dialects of ANTLR grammars (one for each
> > > version, which aren't totally upwardscompatible), I had this idea.  
> > > Would
> > > it make sense to make an option named "version" mandatory, which  
> > > simply
> > > records the used ANTLR version for writing. It's mandatory because
> > > people don't seem ever to write a comment explaining the requirements
> > > (myself included ;). It makes easier for people to diagnose problems
> > > with a third-party grammar.
> > >
> > > Johannes
> 
> -- 
> Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen:
> http://www.gmx.net/de/go/multimessenger
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
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