public static string GetFullName(PlanningParser.AtomicFormulaTermContext context) { string name = context.predicate().GetText(); List <string> termList = new List <string>(); foreach (var termContext in context.term()) { termList.Add(termContext.GetText()); } return(GetFullName(name, termList)); }
private AbstractPredicate CreateAbstractPredicate(PlanningParser.AtomicFormulaTermContext context, IReadOnlyDictionary <string, Predicate> predDict) { List <string> constantList = new List <string>(); for (int i = 0; i < context.term().Count; i++) { constantList.Add(context.term()[i].GetText()); } AbstractPredicate abstractPredicate = new AbstractPredicate(constantList); abstractPredicate.Predicate = predDict[context.predicate().GetText()]; return(abstractPredicate); }