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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to