Basically, I have the following code:
assert lexer != null;
CommonTokenStream commonTokenStream = new CommonTokenStream(lexer);commonTokenStream.fill();
List<Token> lst = commonTokenStream.getTokens();
FileWriter f = new FileWriter(output);
for (Token t : lst) {
f.write(t.toString());
System.out.println(t.getText());
}
f.close();
But, the file only gets the <EOF> token written to it, am I missing something? I'm certain there's more tokens in the file.