Lines Matching refs:Index
83 /// The Lexer tracks line/col info as well as input index so its markers are
89 /// <see cref="IIntStream.Index"/>, or some other marker.</returns>
93 /// Return the current input symbol index 0..N where N indicates the
94 /// last symbol has been read. The index is the symbol about to be
97 function Index: Integer;
101 /// <see cref="IIntStream.Index"/> would return marker.
104 /// The marker will usually be <see cref="IIntStream.Index"/> but
142 /// Set the input cursor to the position indicated by index. This is
150 /// and in that its argument is strictly an input cursor (index).
162 /// The index is 0..N-1. A seek to position i means that LA(1) will return
166 procedure Seek(const Index: Integer);
222 /// The index of the character relative to the beginning of the
252 /// The index of the first character relative to the beginning of the line 0..N-1
260 /// An index from 0..N-1 of the token object in the input stream
327 /// Return null for LT(0) and any index that results in an absolute address
333 /// Get a token at an absolute index I; 0..N-1. This is really only
349 /// <summary>Because the user is not required to use a token with an index stored
365 /// need to record the state of the input stream (char index, line,
379 /// <summary>Index into the char stream of next lookahead char </summary>
541 /// The index into the input stream where the last error occurred.
570 /// the stop token index for each rule.
601 /// What character index in the stream did the current token start at?
855 /// Given a rule number and a start token index number, return
857 /// start index. If this rule has parsed input starting from the
858 /// start index before, then return where the rule stopped parsing.
859 /// It returns the index of the last token matched by the rule.
869 /// Has this rule already parsed input at the current index in the
870 /// input stream? Return the stop token index or MEMO_RULE_UNKNOWN.
889 /// Return how many rule/input-index pairs there are in total.
968 /// <summary>Given a start and stop index, return a List of all tokens in
1119 /// <summary>What is the index of the current character of lookahead? </summary>
1221 /// current index. If so, the operation is done and then normal String
1226 /// screw up the token index values. That is, an insert operation at token
1227 /// index I does not change the index values for tokens I+1..N-1.
1288 procedure InsertAfter(const Index: Integer; const Text: IANTLRInterface); overload;
1291 procedure InsertAfter(const ProgramName: String; const Index: Integer;
1294 procedure InsertAfter(const Index: Integer; const Text: String); overload;
1297 procedure InsertAfter(const ProgramName: String; const Index: Integer;
1301 procedure InsertBefore(const Index: Integer; const Text: IANTLRInterface); overload;
1304 procedure InsertBefore(const ProgramName: String; const Index: Integer;
1307 procedure InsertBefore(const Index: Integer; const Text: String); overload;
1310 procedure InsertBefore(const ProgramName: String; const Index: Integer;
1313 procedure Replace(const Index: Integer; const Text: IANTLRInterface); overload;
1321 procedure Replace(const Index: Integer; const Text: String); overload;
1330 procedure Delete(const Index: Integer); overload;
1373 /// state can change before the exception is reported so current token index
1387 /// What is index of token/char were we looking at when the error occurred?
1463 /// Returns the token/char index in the stream when the error occurred
1465 property Index: Integer read FIndex write FIndex;
1617 /// <summary>Index in our array for the next char (0..n-1)</summary>
1621 /// The index of the character relative to the beginning of the
1635 /// A null is kept @ index 0. Create upon first call to Mark().
1654 function Index: Integer;
1660 procedure Seek(const Index: Integer); virtual;
1848 /// <summary>What token number is this from 0..n-1 tokens; < 0 implies invalid index </summary>
2321 /// The index into the tokens list of the current token (next token
2335 /// <summary>Given a starting index, return the index of the first on-channel
2348 function Index: Integer; virtual;
2352 procedure Seek(const Index: Integer); virtual;
2557 /// Return the index of the next token to operate on.
2563 property Index: Integer read GetIndex write SetIndex;
2570 // What index into rewrites List are we?
2572 // Token buffer index
2592 property Index: Integer read FIndex write FIndex;
2660 /// <summary>Map String (program name) -> Integer index </summary>
2674 procedure InsertAfter(const Index: Integer; const Text: IANTLRInterface); overload; virtual;
2677 procedure InsertAfter(const ProgramName: String; const Index: Integer;
2680 procedure InsertAfter(const Index: Integer; const Text: String); overload;
2683 procedure InsertAfter(const ProgramName: String; const Index: Integer;
2687 procedure InsertBefore(const Index: Integer; const Text: IANTLRInterface); overload; virtual;
2690 procedure InsertBefore(const ProgramName: String; const Index: Integer;
2693 procedure InsertBefore(const Index: Integer; const Text: String); overload;
2696 procedure InsertBefore(const ProgramName: String; const Index: Integer;
2699 procedure Replace(const Index: Integer; const Text: IANTLRInterface); overload; virtual;
2707 procedure Replace(const Index: Integer; const Text: String); overload;
2716 procedure Delete(const Index: Integer); overload; virtual;
2744 /// Return a map from token index to operation.
2748 /// same index need to be combined etc... Here are the cases:
2764 /// I.i.u = insert u before op @ index i
2776 /// 1. for any inserts to same index, combine even if not adjacent.
2779 /// 3. throw exception if index in same range as previous replace
2782 /// Later we can throw as we add to index -> op map.
2795 /// Get all operations before an index of a particular kind
2849 FIndex := AInput.Index;
3213 function TANTLRStringStream.Index: Integer;
3309 procedure TANTLRStringStream.Seek(const Index: Integer);
3311 if (Index <= FP) then
3312 FP := Index // just jump; don't update stream state (line, ...)
3314 // seek forward, consume until p hits index
3315 while (FP < Index) do
4185 StopIndex := GetRuleMemoization(RuleIndex, Input.Index);
4528 StopTokenIndex := Input.Index - 1;
4609 if (FState.LastErrorIndex = Input.Index) then
4610 // uh oh, another error at same token index; must be a case
4615 FState.LastErrorIndex := Input.Index;
4786 Index: Integer;
4790 Index := 0;
4808 T.TokenIndex := Index;
4810 Inc(Index);
4886 function TCommonTokenStream.Index: Integer;
4966 FLastMarker := Index;
4991 procedure TCommonTokenStream.Seek(const Index: Integer);
4993 FP := Index;
5378 Result := FInput.Index;
5527 FState.TokenStartCharIndex := FInput.Index;
5840 procedure TTokenRewriteStream.Delete(const Index: Integer);
5842 Delete(DEFAULT_PROGRAM_NAME, Index, Index);
5930 const Index: Integer; const Text: IANTLRInterface);
5932 // to insert after, just insert before next index (even if past end)
5933 InsertBefore(ProgramName, Index + 1, Text);
5942 procedure TTokenRewriteStream.InsertAfter(const Index: Integer;
5945 InsertAfter(DEFAULT_PROGRAM_NAME, Index, Text);
5948 procedure TTokenRewriteStream.InsertBefore(const Index: Integer;
5951 InsertBefore(DEFAULT_PROGRAM_NAME, Index, Text);
5961 const Index: Integer; const Text: IANTLRInterface);
5965 Op := TInsertBeforeOp.Create(Index, Text, Self);
6028 if (IOp.Index >= ROp.Index) and (IOp.Index <= ROp.LastIndex) then
6040 if (PrevROp.Index >= ROp.Index) and (PrevROp.LastIndex <= ROp.LastIndex) then
6047 Disjoint := (PrevROp.LastIndex < ROp.Index) or (PrevROp.Index > ROp.LastIndex);
6048 Same := (PrevROp.Index = ROp.Index) and (PrevROp.LastIndex = ROp.LastIndex);
6064 // combine current insert with prior if any at same index
6069 if (PrevIOp.Index = IOp.Index) then
6080 // look for replaces where iop.index is in range; error
6085 if (IOp.Index = ROp.Index) then
6091 if (IOp.Index >= ROp.Index) and (IOp.Index <= ROp.LastIndex) then
6102 if (Result.ContainsKey(Op.Index)) then
6103 raise Exception.Create('should only be one op per index');
6104 Result.Add(Op.Index, Op);
6114 procedure TTokenRewriteStream.Replace(const Index: Integer;
6117 Replace(DEFAULT_PROGRAM_NAME, Index, Index, Text);
6236 IndexToOp.Remove(I); // remove so any left have index size-1
6240 // no operation at that index, just dump token
6248 // include stuff after end if it's last index in buffer
6257 if (Pair.Value.Index >= Tokens.Count - 1) then
6272 procedure TTokenRewriteStream.InsertBefore(const Index: Integer;
6278 InsertBefore(Index, S);
6290 const Index: Integer; const Text: String);
6295 InsertBefore(ProgramName, Index, S);
6307 procedure TTokenRewriteStream.InsertAfter(const Index: Integer;
6313 InsertAfter(Index,S);
6325 const Index: Integer; const Text: String);
6330 InsertAfter(ProgramName,Index,S);
6359 procedure TTokenRewriteStream.Replace(const Index: Integer; const Text: String);
6364 Replace(Index, S);
6486 Buf.Append(Parent.Get(Index).Text);
6487 Result := Index + 1;
6519 Result := '<ReplaceOp@' + IntToStr(Index) + '..' + IntToStr(FLastIndex)
6527 Result := '<DeleteOp@' + IntToStr(Index) + '..' + IntToStr(FLastIndex) + '>';