protected boolean match(ATerm pattern, List<Object> list) { if (equals(pattern)) { return true; } if (pattern.getType() == ATerm.PLACEHOLDER) { ATerm type = ((ATermPlaceholder) pattern).getPlaceholder(); if (type.getType() == ATerm.APPL) { ATermAppl appl = (ATermAppl) type; AFun afun = appl.getAFun(); if (afun.getName().equals("real") && afun.getArity() == 0 && !afun.isQuoted()) { list.add(new Double(value)); return true; } } } return super.match(pattern, list); }
private boolean isColon(ATerm atm) { return atm.getType() == ATerm.APPL && (((ATermAppl) atm).getName().equals("Colon") || ((ATermAppl) atm).getName().equals("QuestionMark")); }