Example #1
0
        public LexInterval(LexBound min, LexBound max)
        {
            if (LexBound.IsVoid(min, max))
            {
                throw new ArgumentException($"Interval must be non-void. Interval {min}..{max} is void");
            }

            Min = min;
            Max = max;
        }
Example #2
0
 public static LexInterval To(LexBound max) => new LexInterval(LexBound.NegativeInfinity, max);
Example #3
0
 public static LexInterval From(LexBound min) => new LexInterval(min, LexBound.PositiveInfinity);