/** * Creates a new tree field only constructor {@code ASeqEnumSeqExp TAG=seqEnum} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param members_ the {@link NodeList} node for the {@code members} child of this {@link ASeqEnumSeqExp} node */ public ASeqEnumSeqExp(ILexLocation location_, List<? extends PExp> members_) { super(null,location_); this.setMembers(members_); }
/** * Creates a new complete constructor {@code ASeqEnumSeqExp} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param members_ the {@link NodeList} node for the {@code members} child of this {@link ASeqEnumSeqExp} node * @param types_ the {@link GraphNodeList} <b>graph</a> node for the {@code types} child of this {@link ASeqEnumSeqExp} node. * <i>The parent of this {@code types } will not be changed by adding it to this node.</i> */ public ASeqEnumSeqExp(PType type_, ILexLocation location_, List<? extends PExp> members_, List<? extends PType> types_) { super(type_,location_); this.setMembers(members_); this.setTypes(types_); }
public static ASeqEnumSeqExp newASeqEnumSeqExp(ILexLocation start) { ASeqEnumSeqExp result = new ASeqEnumSeqExp(); initExpression(result, start); result.setMembers(new Vector<PExp>()); return result; }
public static ASeqEnumSeqExp newASeqEnumSeqExp(ILexLocation start, List<PExp> members) { ASeqEnumSeqExp result = new ASeqEnumSeqExp(); initExpression(result, start); result.setMembers(members); return result; }
public PExp caseASeqPattern(ASeqPattern node) throws AnalysisException { ASeqEnumSeqExp seq = new ASeqEnumSeqExp(); List<PExp> values = new Vector<PExp>(); for (PPattern p : node.getPlist()) { values.add(p.apply(this).clone()); } seq.setMembers(values); return addPossibleType(seq, node); }
public NonEmptySeqObligation(PExp exp, IPOContextStack ctxt, IPogAssistantFactory af) throws AnalysisException { super(exp, POType.NON_EMPTY_SEQ, ctxt, exp.getLocation(), af); // exp <> [] ASeqEnumSeqExp seqExp = new ASeqEnumSeqExp(); seqExp.setMembers(new LinkedList<PExp>()); // empty list seqExp.setType(AstFactory.newASeqSeqType(null, new AUnknownType())); ANotEqualBinaryExp notEqualsExp = AstExpressionFactory.newANotEqualBinaryExp(exp.clone(), seqExp); stitch = notEqualsExp; valuetree.setPredicate(ctxt.getPredWithContext(notEqualsExp)); } }
ne.setOp(new LexKeywordToken(VDMToken.NE, exp.getLocation())); ASeqEnumSeqExp empty = new ASeqEnumSeqExp(); empty.setMembers(new Vector<PExp>()); ne.setRight(empty);