I'm using Antlr4 to build a parser and I'm using Netbeans as an IDE and ant as a build system. Ant runs Antlr which generates a parser.java and lexer.java in the project's src/ directory.
They both need a package directive, and so I have to add it by hand.
Is there a way to prepend a line of text to all source files in a directory with Ant? Or are there any other solutions to this? (Maybe with Antlr?)