public bool Contains(StateType stateType, IDottedRule dottedRule, int origin) { if (stateType != StateType.Normal) { return(false); } var hashCode = NormalStateHashCodeAlgorithm.Compute(dottedRule, origin); if (dottedRule.IsComplete) { return(CompletionsContainsHash(hashCode)); } var currentSymbol = dottedRule.PostDotSymbol; if (currentSymbol.SymbolType == SymbolType.NonTerminal) { return(PredictionsContainsHash(hashCode)); } return(ScansContainsHash(hashCode)); }
private int ComputeHashCode() { return(NormalStateHashCodeAlgorithm.Compute( DottedRule, Origin)); }