public ParsedElement(NotationFormIndex notationOccurenceIndex, ParseParsedIndex parsingIndex, LeafIndex start, LeafIndex end) { this.NotationIndex = notationOccurenceIndex; this.ParseIndex = parsingIndex; this.Start = start; this.End = end; }
public int RepetitionIndexOf(ParseParsedIndex i, IReadOnlyList<IReadOnlyList<LeafIndex>> usedLeaves) { //RepetitionConstruction repetitionContainingIndex = repetitionConstructions.FirstOrDefault(repetitionConstruction => repetitionConstruction.Repetition.Concat().Contains(index.Element)); var rfi = RepetitionFormIndex.TryCreate(i.Element, Repetition); if (rfi.Index == -1) return -1; return this.selectedLeavesPerParseElement[rfi].IndexOf(usedLeaves[(int)i]); }
internal IEnumerable<ParseParsedIndex> GetStretchIndicesStartingAt(ParseParsedIndex elementStartindex) { return Repetition.GetStretchIndicesStartingAt(elementStartindex); }