예제 #1
0
 private Repeat(IExpression expression, RepeatKind kind, int?min = null, int?max = null)
 {
     Expression = expression;
     Kind       = kind;
     Min        = min;
     Max        = max;
 }
예제 #2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public RepeatSpecification
        (
            RepeatKind kind
        )
            : this()
        {
            Sure.Defined(kind, nameof(kind));

            Kind = kind;
        }
예제 #3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public RepeatSpecification
        (
            RepeatKind kind,
            int index
        )
            : this()
        {
            Sure.Defined(kind, nameof(kind));
            Sure.NonNegative(index, nameof(index));

            Kind  = kind;
            Index = index;
        }
예제 #4
0
        public TagElement(string tagName, RepeatKind repeat, bool isOptional)
        {
            TagName    = tagName;
            Repeat     = repeat;
            IsOptional = isOptional;

            if (Repeat == RepeatKind.Star)
            {
                IsOptional = true;
            }
            if (repeat == RepeatKind.Plus && IsOptional)
            {
                Repeat = RepeatKind.Star;
            }
        }
예제 #5
0
 public NonterminalSymbol(int id, string name, bool visible, RepeatKind repeat)
     : base(id, name, visible)
 {
     Repeat = repeat;
 }
예제 #6
0
 public TagElement(string tagName, RepeatKind repeat) : this(tagName, repeat, false)
 {
 }