String base = file.substring(0, file.lastIndexOf("/"));
lex = new JavaLexer(new ANTLRFileStream(file, "UTF8"));
CommonTokenStream tokens = new CommonTokenStream(lex);
JavaParser g = new JavaParser(tokens);
try {
// parse
File f = g.run().result;
f.setFileName(file);
if(g.failed()) {
throw new CompilerException("Error parsing file.");
}
// always compile imports
for(String importName : f.getImports()) {