[antlr-interest] Add Import to parser.java?

Andrés Mejía andmej at gmail.com
Sat May 10 15:15:09 PDT 2008


Hello, I'm trying to do a simple action on my parser using embedded Java in
my grammar.

I want to display the date when the parser is being run, and I need to
import some Java classes.

How can I tell AntLR to add some import lines at the beginning of the
myParser.java file?

I need to add:

    import java.util.Date;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;

Else, I won't be able to compile my grammar.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080510/faf5fd43/attachment.html 


More information about the antlr-interest mailing list