Ejemplo n.º 1
0
        internal override BitSet Lastpos(int positions)
        {
            if (last == null)
            {
                if (contentType == Type.Sequence && !right.Nullable())
                {
                    last = right.Lastpos(positions);
                }
                else if (contentType == Type.Choice || contentType == Type.Sequence)
                {
                    last = (BitSet)left.Lastpos(positions).Clone();
                    last.Or(right.Lastpos(positions));
                }
                else   // Type.Qmark, Type.Star, or Type.Plus
                {
                    last = left.Lastpos(positions);
                }
            }

            return(last);
        }