ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bogdan Mitu <bogdan...@yahoo.com>
Subject [PATCH] ANTLR task improvements
Date Wed, 15 May 2002 13:52:28 GMT
Hi Erik,

Following your advice, I send my patch for the ANTLR task. It uses a "real"
parser to find dependencies between ANTLR files. Attached is a zip
containing new sources for ANTLR task, extended test set (that makes the
current task fail) and diffs against 1.5.1beta.

If there are any problems, I am ready to fix them.

Best regards,
Bogdan Mitu

--- Erik Meade <emeade@geekfarm.org> wrote:
> Glad to hear more people are beefing up the ANTLR task, I wrote it to do
> what I needed a year or so ago, since then a few people have added
> functionality to it that they have needed.
> 
> I'd encourage you to post your source, but only after you have read
> Contribute Code or Documentation Patches
> http://jakarta.apache.org/site/getinvolved.html
> 
> Erik Meade
> http://junit.org
> 
> 
> > -----Original Message-----
> > From: Bogdan Mitu [mailto:bogdan_mt@yahoo.com]
> > Sent: Tuesday, April 23, 2002 6:36 AM
> > To: ant-dev@jakarta.apache.org
> > Subject: ANTLR task improvements
> >
> >
> > Hello,
> >
> > I am new to this list, but I am using Ant for a while. Thanks for
> > your great
> > job. Working with the ANTLR task I saw that it (the ANTLR task) is
> somehow
> > limited when it tries to determine if the source grammar is
> > "dirty" or not:
> >
> > - It considers the output of ANTLR to be one file per grammar,
> > while in fact
> > there are 2 (or even 3): XxxParser.java, XxxParserTokenTypes.java and
> > possibly XxxParserTokenTypes.txt. If any of one is missing, the grammar
> > should be recompiled, which currently happens only for XxxParser.java.
> >
> > - An ANTLR file can contain more than one grammar (any
> > combination of lexer,
> > parser and tree parser grammars). Once again, multiple output files, and
> > each of them missing should trigger the recompilation of the grammar.
> >
> > - ANTLR grammars can export/import token lists through
> > "vocabulary files" -
> > XxxTokenTypes.txt. If the imported file is newer than the grammar
> > file, the
> > grammar should be recompiled to include the correct tokens in generated
> > code.
> >
> > The main problem lays in the method getGeneratedFile(), which returns
> only
> > one file, while in fact we need two lists of files, ones that are
> > results of
> > the grammar, and should be *older* than the grammar, and a list
> > of imported
> > files, which should be *younger* than the grammar file.
> >
> > To extract all this information, I wrote a lexer/parser (using
> > ANTLR and, of
> > course, ANT :-) Now all works fine for me, and if you are interested I
> can
> > post my sources. Unfortunately, they are not based on the latest version
> > from CVS, but shouldn't be difficult to merge them. Please
> > instruct me what
> > to do next. Should I try to contact the maintainers of ANTLR directly?
> Or
> > just post my sources here?
> >
> > Thanks,
> > Bogdan
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Games - play chess, backgammon, pool and more
> > http://games.yahoo.com/
> >
> > --
> > To unsubscribe, e-mail:  
> <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:ant-dev-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
Mime
View raw message