use of priv.bajdcc.LL1.syntax.lexer.SyntaxLexer 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();
}
}
use of priv.bajdcc.LL1.syntax.lexer.SyntaxLexer 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