You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by David Penton <dj...@arrowsash.com> on 2003/01/04 18:56:41 UTC

antlr task - how do I control dependencies on vocabularies

I am using the antlr task in ant to build a special-purpose compiler.  I
am fairly new to ant.

It appears to me that the antlr task does not (and perhaps cannot)
understand dependencies that relate to imported and exported token
vocabularies.

For example, if I change a parser grammar in file p.g, then the related
antlr task will generate P.java, PTokenTypes.java, and PTokenTypes.txt.
The latter file is used by the lexer, contained in file l.g, to define
its input token vocabulary. As far as I can tell, the antlr task that
handles the lexer (i.e. with target 'l.g') does not know that a change
to PTokenTypes.txt should force antlr to run on l.g.

I spent a frustrating hour last night determining that the lexer and
parser were using mismatching token vocabularies.

Can anyone tell me how to set ant up to account for this?

TIA.

- Dave -



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>