use of priv.bajdcc.OP.syntax.token.Token in project jMiniLang by bajdcc.
the class TestSyntaxLexer method main.
public static void main(String[] args) {
try {
Scanner scanner = new Scanner(System.in);
String str = scanner.nextLine();
SyntaxLexer lexer = new SyntaxLexer();
lexer.setContext(str);
Token token;
for (; ; ) {
token = lexer.nextToken();
if (token.kToken == TokenType.EOF) {
break;
}
System.out.println(token.toString());
}
scanner.close();
} catch (RegexException e) {
System.err.println(e.getPosition() + "," + e.getMessage());
e.printStackTrace();
}
}
Aggregations