//-----------------------------------------------------------------------------------
    // Construction
    //-----------------------------------------------------------------------------------

    public EnumeratedSequenceAllocator(EnumeratedNucleotideSequence seq, NadirAST nodeDefinition, SequenceDesigner designer)
        // We require that all our domains have the same enumerated sequence, but that 
        // doesn't mean that they all share the same id (why?). (eh?)
        {
        Trace.Assert(seq != null);
        this.enumeratedSequence = seq;
        this.nodeSequenceDefinition = nodeDefinition;
        this.designer = designer;
        //
        if (this.enumeratedSequence.Length != 0) 
            {
            if (this.HasLength && this.Length != this.enumeratedSequence.Length)
                throw new InconsistentLengthException(this.Length);
            }
        //
        AddAllocationPattern(this.enumeratedSequence.UndecoratedPattern);
        //
        // We always verify both the normal and the complement form, as that's 
        // easier than reliably keeping track of which of those two forms is 
        // actually used in an actual strand. We wish we could be more careful about
        // that, because if we could keep track, it'd be a big perf improvement.
        // 
        this.normalVerifier        = new EnumeratedSequenceVerifier(this, false, designer);
        this.complementaryVerifier = new EnumeratedSequenceVerifier(this, true,  designer);
        }
Esempio n. 2
0
 public ConstVariableRequiresInitializationException(NadirAST node, string name) : base(node) 
     {
     this.name = name;
     }
Esempio n. 3
0
 public NadirParsingException(NadirAST node, Exception innerException=null) : base(InputStream(node.Token), innerException)
     {
     this.Node  = node;
     this.Token = node.Token;
     }
Esempio n. 4
0
 public LocatedNotYetImplementedException(NadirAST node) : base(node)
     {
     }
Esempio n. 5
0
 public FunctionCallRequiredException(NadirAST node) : base(node)
     {
     }
Esempio n. 6
0
 public DuplicateDefinitionException(NadirAST node, string name) : base(node)
     {
     this.name = name;
     }
Esempio n. 7
0
 public MustBePropertyDefinitionException (NadirAST node) : base(node) 
     { 
     }
Esempio n. 8
0
 public IncompatibleDuplicateDefinitionException(NadirAST node, NadirAST prev) : base(node)
     {
     this.prev = prev;
     }
Esempio n. 9
0
 public FunctionNotFunctionException(NadirAST node, string functionName) : base(node, functionName) { }
Esempio n. 10
0
 public MismatchedArgumentCountException(NadirAST node) : base(node) { }
Esempio n. 11
0
 public MismatchedArgumentCountException(NadirAST node, string functionName) : base(node, functionName) { }
Esempio n. 12
0
 protected static string NameFromFuncCallNode(NadirAST node)
     {
     return node.GetNadirChild(0).GetNadirChild(0).Text;
     }
Esempio n. 13
0
 public FunctionCallException(NadirAST node) : this(node, NameFromFuncCallNode(node))
     { 
     }
Esempio n. 14
0
 public FunctionCallException(NadirAST node, string functionName) : base(node)
     { 
     this.functionName = functionName;
     }
Esempio n. 15
0
 public UnexpectedConstExpressionException(NadirAST node) : base(node) 
     {
     }
Esempio n. 16
0
 public IncorrectTypeException  (NadirAST node, List<IType> expectedTypes) : base(node) 
     { 
     this.expectedTypes = expectedTypes;
     }
Esempio n. 17
0
 public IncompatibleTypesException(NadirAST node, List<IType> types) : base(node) 
     { 
     this.types = types;
     }
Esempio n. 18
0
 public FunctionNotFunctionException(NadirAST node) : base(node) { }
Esempio n. 19
0
 public InconsistentArgTypesException (NadirAST node) : base(node) 
     { 
     }
Esempio n. 20
0
 public OverloadNotFoundException(NadirAST node, string functionName) : base(node, functionName) { }
Esempio n. 21
0
 public TypedefException (NadirAST node, string typedefName, IType toType) : base(node) 
     { 
     this.typedefName = typedefName;
     this.destType = toType;
     }
Esempio n. 22
0
 public OverloadNotFoundException(NadirAST node) : base(node) { }
Esempio n. 23
0
 public VariableInitializedWithNullException(NadirAST node, string variableName) : base(node)
     {
     this.variableName = variableName;
     }
Esempio n. 24
0
 public IncompatibleTypeException (IType toType, NadirAST node) : base(node) 
     { 
     this.destType = toType;
     }
Esempio n. 25
0
 public LocatedInternalErrorException(NadirAST node, string message=null) : base(node)
     {
     this.message = message;
     }
Esempio n. 26
0
 public OutRequiredException (NadirAST node) : base(node) 
     { 
     }
Esempio n. 27
0
 public StrandOrientationException(NadirAST node) : base(node)
     {
     }
Esempio n. 28
0
 public OutNotNeededException (NadirAST node) : base(node) 
     { 
     }
Esempio n. 29
0
 public UnknownNodeToDistillException(NadirAST unknown)
     {
     this.unknown = unknown;
     }
Esempio n. 30
0
 public CastException (IType toType, NadirAST node) : base(node)
     { 
     this.destType = toType;
     }