private bool CanRestore(Stack <ShiftReduceParser <ValueType> .ParserState> parserstates) { if (parserstates.Count > 0) { ParserState s = parserstates.Peek(); Xacc.CodeModel.Location l = tokenstream[s.tokenpos].Location; if (lastpin == null) { return(true); } else { if (l > lastpin) { return(true); } else { parserstates.Clear(); reducestack.Clear(); AfterPinRestore(); pinrescue++; return(false); } } } return(false); }
protected Xacc.CodeModel.Location Pin(Xacc.CodeModel.Location loc) { return(lastpin = loc); }