ArgumentParserResult(string optionsText) { ArgumentsLexer lexer = new ArgumentsLexer(new Antlr4.Runtime.AntlrInputStream(optionsText)); CommonTokenStream tokens = new CommonTokenStream(lexer); ArgumentsParser parser = new ArgumentsParser(tokens); parser.RemoveErrorListeners(); parser.AddErrorListener(new TraceErrorListener()); ParseTreeWalker walker = new ParseTreeWalker(); listener = new ArgumentsDictionaryListener(); walker.Walk(listener, parser.init()); }