2011-06-28 09:38:15 +08:00
|
|
|
import org.antlr.v4.runtime.*;
|
|
|
|
|
2011-06-15 08:29:02 +08:00
|
|
|
public class TestL {
|
|
|
|
public static void main(String[] args) throws Exception {
|
2011-10-30 05:59:17 +08:00
|
|
|
CharStream input = new ANTLRFileStream(args[0]);
|
2011-10-31 02:39:17 +08:00
|
|
|
input = new ANTLRStringStream("3 3");
|
2011-10-30 05:59:17 +08:00
|
|
|
L lexer = new L(input);
|
2011-06-28 09:38:15 +08:00
|
|
|
CommonTokenStream tokens = new CommonTokenStream(lexer);
|
|
|
|
tokens.fill();
|
2011-10-30 05:59:17 +08:00
|
|
|
// System.out.println(tokens.getTokens());
|
|
|
|
for (Object t : tokens.getTokens()) System.out.println(t);
|
2011-06-15 08:29:02 +08:00
|
|
|
}
|
|
|
|
}
|