/// <summary> /// Creates an instance of a SequenceParserException used by the SequenceParser, when the rule or sequence /// with the given name does not exist or input or output parameters do not match. /// </summary> /// <param name="paramBindings">The parameter bindings of the rule/sequence invocation.</param> /// <param name="errorKind">The kind of error.</param> /// <param name="badParamIndex">The index of a bad parameter or -1 if another error occurred.</param> public SequenceParserException(InvocationParameterBindingsWithReturns paramBindings, SequenceParserError errorKind, int badParamIndex) { Kind = errorKind; Name = paramBindings.Name; if (paramBindings is RuleInvocationParameterBindings) { Action = ((RuleInvocationParameterBindings)paramBindings).Action; } NumGivenInputs = paramBindings.Arguments.Length; NumGivenOutputs = paramBindings.ReturnVars.Length; BadParamIndex = badParamIndex; ClassifyDefinitionType(paramBindings); }
/// <summary> /// Creates an instance of a SequenceParserException used by the SequenceParser, when the rule or sequence /// with the given name does not exist or input or output parameters do not match. /// </summary> /// <param name="paramBindings">The parameter bindings of the rule/sequence invocation.</param> /// <param name="errorKind">The kind of error.</param> /// <param name="badParamIndex">The index of a bad parameter or -1 if another error occurred.</param> public SequenceParserException(InvocationParameterBindingsWithReturns paramBindings, SequenceParserError errorKind, int badParamIndex) { Kind = errorKind; Name = paramBindings.Name; if(paramBindings is RuleInvocationParameterBindings) Action = ((RuleInvocationParameterBindings)paramBindings).Action; NumGivenInputs = paramBindings.Arguments.Length; NumGivenOutputs = paramBindings.ReturnVars.Length; BadParamIndex = badParamIndex; ClassifyDefinitionType(paramBindings); }
/// <summary> /// Creates an instance of a SequenceParserException used by the SequenceParser, when the rule or sequence /// with the given name does not exist or input or output parameters do not match. /// </summary> /// <param name="paramBindings">The parameter bindings of the rule/sequence invocation.</param> /// <param name="errorKind">The kind of error.</param> public SequenceParserException(InvocationParameterBindingsWithReturns paramBindings, SequenceParserError errorKind) : this(paramBindings, errorKind, -1) { }
/// <summary> /// Creates an instance of a SequenceParserException used by the SequenceParser, when the rule or sequence /// with the given name does not exist or input or output parameters do not match. /// </summary> /// <param name="paramBindings">The parameter bindings of the rule/sequence invocation.</param> /// <param name="errorKind">The kind of error.</param> public SequenceParserException(InvocationParameterBindingsWithReturns paramBindings, SequenceParserError errorKind) : this(paramBindings, errorKind, -1) { }