[antlr-interest] Lexer code missing @header info
David Smith
david.smith at cc.gatech.edu
Fri May 13 06:08:03 PDT 2011
I'm using ANTLRWorks to generate java code form a grammar with the
front-end listed below. The code generation works flawlessly
producing XXXLexer.java and XXXParser.java as expected with one minor
annoyance. The "package parser;" line makes it into XXXParser.java,
but not into XXXLexer.java. I therefore have to manually edit
XXXLexer.java. Not really a big issue, but is there an easy cure?
______________________
grammar XXX;
options {
output=AST;
ASTLabelType=CommonTree;
}
tokens{ STATLIST; }
@header {
package parser;
import java.util.HashMap;
}
David M. Smith http://www.cc.gatech.edu/fac/David.Smith
Georgia Institute of Technology, College of Computing
Sent from my ASR-33 Teletype
More information about the antlr-interest
mailing list