void CMAny::calcLastPos(CMStateSet& toSet) const { // If we are an epsilon node, then the last pos is an empty set if (isNullable()) toSet.zeroBits(); // Otherwise, its just the one bit of our position else toSet.setBit(fPosition); }
// --------------------------------------------------------------------------- // Implementation of protected CMNode virtual interface // --------------------------------------------------------------------------- void CMAny::calcFirstPos(CMStateSet& toSet) const { // If we are an epsilon node, then the first pos is an empty set if (fPosition == -1) toSet.zeroBits(); else // Otherwise, its just the one bit of our position toSet.setBit(fPosition); return; }
inline void CMLeaf::calcLastPos(CMStateSet& toSet) const { // If we are an epsilon node, then the last pos is an empty set if (fPosition == -1) { toSet.zeroBits(); return; } // Otherwise, its just the one bit of our position toSet.setBit(fPosition); }