Skip to content

Commit

Permalink
Use newer non-deprecated Antlr API
Browse files Browse the repository at this point in the history
  • Loading branch information
adamretter committed Nov 18, 2023
1 parent 92d4bc3 commit 6fe3b04
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/com/evolvedbinary/cql/parser/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
*/
package com.evolvedbinary.cql.parser;

import org.antlr.v4.runtime.ANTLRInputStream;
import org.antlr.v4.runtime.CharStreams;
import org.antlr.v4.runtime.CodePointCharStream;
import org.antlr.v4.runtime.CommonTokenStream;
import org.antlr.v4.runtime.tree.ParseTree;

Expand All @@ -50,9 +51,9 @@ public class Main {
* @throws IOException is an error occurs parsing the input
*/
public static void main(final String args[]) throws IOException {
final ANTLRInputStream is = new ANTLRInputStream(args[0]);
final CodePointCharStream charStream = CharStreams.fromString(args[0]);

final CorpusQLLexer lexer = new CorpusQLLexer(is);
final CorpusQLLexer lexer = new CorpusQLLexer(charStream);
final CommonTokenStream tokens = new CommonTokenStream(lexer);
final CorpusQLParser parser = new CorpusQLParser(tokens);

Expand Down

0 comments on commit 6fe3b04

Please sign in to comment.