//----------------------------------------------------------------------------------- // 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); }
public ConstVariableRequiresInitializationException(NadirAST node, string name) : base(node) { this.name = name; }
public NadirParsingException(NadirAST node, Exception innerException=null) : base(InputStream(node.Token), innerException) { this.Node = node; this.Token = node.Token; }
public LocatedNotYetImplementedException(NadirAST node) : base(node) { }
public FunctionCallRequiredException(NadirAST node) : base(node) { }
public DuplicateDefinitionException(NadirAST node, string name) : base(node) { this.name = name; }
public MustBePropertyDefinitionException (NadirAST node) : base(node) { }
public IncompatibleDuplicateDefinitionException(NadirAST node, NadirAST prev) : base(node) { this.prev = prev; }
public FunctionNotFunctionException(NadirAST node, string functionName) : base(node, functionName) { }
public MismatchedArgumentCountException(NadirAST node) : base(node) { }
public MismatchedArgumentCountException(NadirAST node, string functionName) : base(node, functionName) { }
protected static string NameFromFuncCallNode(NadirAST node) { return node.GetNadirChild(0).GetNadirChild(0).Text; }
public FunctionCallException(NadirAST node) : this(node, NameFromFuncCallNode(node)) { }
public FunctionCallException(NadirAST node, string functionName) : base(node) { this.functionName = functionName; }
public UnexpectedConstExpressionException(NadirAST node) : base(node) { }
public IncorrectTypeException (NadirAST node, List<IType> expectedTypes) : base(node) { this.expectedTypes = expectedTypes; }
public IncompatibleTypesException(NadirAST node, List<IType> types) : base(node) { this.types = types; }
public FunctionNotFunctionException(NadirAST node) : base(node) { }
public InconsistentArgTypesException (NadirAST node) : base(node) { }
public OverloadNotFoundException(NadirAST node, string functionName) : base(node, functionName) { }
public TypedefException (NadirAST node, string typedefName, IType toType) : base(node) { this.typedefName = typedefName; this.destType = toType; }
public OverloadNotFoundException(NadirAST node) : base(node) { }
public VariableInitializedWithNullException(NadirAST node, string variableName) : base(node) { this.variableName = variableName; }
public IncompatibleTypeException (IType toType, NadirAST node) : base(node) { this.destType = toType; }
public LocatedInternalErrorException(NadirAST node, string message=null) : base(node) { this.message = message; }
public OutRequiredException (NadirAST node) : base(node) { }
public StrandOrientationException(NadirAST node) : base(node) { }
public OutNotNeededException (NadirAST node) : base(node) { }
public UnknownNodeToDistillException(NadirAST unknown) { this.unknown = unknown; }
public CastException (IType toType, NadirAST node) : base(node) { this.destType = toType; }