Exemplo n.º 1
0
		public ParsedElement(NotationFormIndex notationOccurenceIndex, ParseParsedIndex parsingIndex, LeafIndex start, LeafIndex end)
		{
			this.NotationIndex = notationOccurenceIndex;
			this.ParseIndex = parsingIndex;
			this.Start = start;
			this.End = end;
		}
Exemplo n.º 2
0
		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]);
		}
Exemplo n.º 3
0
		internal IEnumerable<ParseParsedIndex> GetStretchIndicesStartingAt(ParseParsedIndex elementStartindex)
		{
			return Repetition.GetStretchIndicesStartingAt(elementStartindex);
		}