use CharStream instead of ANTLRInputStream

This commit is contained in:
2019-10-28 22:08:39 +01:00
parent ce39b5cc02
commit 4e15cdb49e

View File

@@ -7,7 +7,7 @@ import org.antlr.v4.runtime.tree.*;
public class Klang { public class Klang {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
// create a CharStream that reads from standard input // create a CharStream that reads from standard input
ANTLRInputStream input = new ANTLRInputStream(System.in); CharStream input = CharStreams.fromStream(System.in);
// create a lexer that feeds off of input CharStream // create a lexer that feeds off of input CharStream
KlangLexer lexer = new KlangLexer(input); KlangLexer lexer = new KlangLexer(input);