2 using System.Collections.Generic;
4 using Antlr4.Runtime.Atn;
10 private readonly List<string> parameters =
new List<string>();
19 CommonTokenStream tokens =
new CommonTokenStream(
new PDDLGrammarLexer(CharStreams.fromstring(action)));
22 parser.Interpreter.PredictionMode = PredictionMode.SLL;
24 parser.RemoveErrorListeners();
26 parser.ErrorHandler =
new BailErrorStrategy();
30 visitor.Visit(parser.output());
32 catch (SystemException exception)
34 if (exception.GetBaseException() is RecognitionException)
37 parser.AddErrorListener(ConsoleErrorListener<object>.Instance);
39 parser.ErrorHandler =
new DefaultErrorStrategy();
40 parser.Interpreter.PredictionMode = PredictionMode.LL;
42 visitor.Visit(parser.output());
49 public string[] GetParameters()
51 return parameters.ToArray();
56 for (
int index = 1; index < context.IDENTIFIER().Length; index++)
57 parameters.Add(context.IDENTIFIER()[index].GetText());