I\'d like to get started with ANTLR, but after spending a few hours reviewing the examples at the antlr.org site, I still can\'t get a clear understanding of the grammar to
version 4.7.1 was slightly different : for import:
import org.antlr.v4.runtime.*;
for the main segment - note the CharStreams:
CharStream in = CharStreams.fromString("12*(5-6)");
ExpLexer lexer = new ExpLexer(in);
CommonTokenStream tokens = new CommonTokenStream(lexer);
ExpParser parser = new ExpParser(tokens);