Beispiel #1
0
        /// <summary>
        /// selection = elements, {'|', elements} ;
        /// </summary>
        /// <param name="elements">elements</param>
        /// <param name="repetition">{'|', elements}</param>
        protected override ElementsElement ReturnElements(ElementElement element, FixedList <GeneratorLexElement, ElementElement>[] repetition)
        {
            List <ElementElement> list = new List <ElementElement>();

            list.Add(element);
            list.AddRange(repetition.Select(p => p.Element2));
            return(new ElementsElement(list));
        }
        protected ElementsElement ParseElements()
        {
            ElementElement var1 = this.ParseElement();
            List <FixedList <GeneratorLexElement, ElementElement> > var2 = new List <FixedList <GeneratorLexElement, ElementElement> >();

            for (Optional <GeneratorLexElement> var3 = _Reader.Peek(); var3.HasValue && (var3.Value.Type == GeneratorLexType.Comma); var3 = _Reader.Peek())
            {
                FixedList <GeneratorLexElement, ElementElement> var4 = default(FixedList <GeneratorLexElement, ElementElement>);
                GeneratorLexElement var5 = _Reader.ReadOrThrow("elements", GeneratorLexType.Comma);
                ElementElement      var6 = this.ParseElement();
                FixedList <GeneratorLexElement, ElementElement> var7 = new FixedList <GeneratorLexElement, ElementElement>(var5, var6);
                var4 = var7;
                var2.Add(var4);
            }
            FixedList <GeneratorLexElement, ElementElement>[] var8;
            var8 = var2.ToArray();
            return(this.ReturnElements(var1, var8));
        }
 /// <summary>
 /// elements = element, {',', element} ;
 /// </summary>
 /// <param name="element">element</param>
 /// <param name="repetition">{',', element}</param>
 protected abstract ElementsElement ReturnElements(ElementElement element, FixedList <GeneratorLexElement, ElementElement>[] repetition);