Home
last modified time | relevance | path

Searched refs:_tokens (Results 1 – 9 of 9) sorted by relevance

/external/antlr/antlr-3.4/runtime/CSharp3/Sources/Antlr3.Runtime/
DBufferedTokenStream.cs65 protected List<IToken> _tokens = new List<IToken>(100); field in Antlr.Runtime.BufferedTokenStream
96 _tokens.Clear();
122 return _tokens.Count;
218 int n = i - _tokens.Count + 1; // how many more elements we need? in Sync()
229 t.TokenIndex = _tokens.Count; in Fetch()
230 _tokens.Add(t); in Fetch()
238 if (i < 0 || i >= _tokens.Count) in Get()
240 …throw new IndexOutOfRangeException("token index " + i + " out of range 0.." + (_tokens.Count - 1)); in Get()
242 return _tokens[i]; in Get()
255 if (start + count >= _tokens.Count) in Get()
[all …]
DTokenRewriteStream.cs144 return string.Format("<{0}@{1}:\"{2}\">", opName, stream._tokens[index], text); in ToString()
158 if (stream._tokens[index].Type != CharStreamConstants.EndOfFile) in Execute()
159 buf.Append(stream._tokens[index].Text); in Execute()
191 … return string.Format("<DeleteOp@{0}..{1}>", stream._tokens[index], stream._tokens[lastIndex]); in ToString()
194 …return string.Format("<ReplaceOp@{0}..{1}:\"{2}\">", stream._tokens[index], stream._tokens[lastInd… in ToString()
334 if ( from > to || from < 0 || to < 0 || to >= _tokens.Count ) in Replace()
336 …rgumentException( "replace: range invalid: " + from + ".." + to + "(size=" + _tokens.Count + ")" ); in Replace()
427 for ( int i = start; i >= MIN_TOKEN_INDEX && i <= end && i < _tokens.Count; i++ ) in ToOriginalString()
459 if ( end > _tokens.Count - 1 ) in ToString()
460 end = _tokens.Count - 1; in ToString()
[all …]
DCommonTokenStream.cs117 return _tokens[i]; in LB()
141 return _tokens[i]; in LT()
150 while (_tokens[i].Channel != _channel) in SkipOffTokenChannels()
161 while (i >= 0 && ((IToken)_tokens[i]).Channel != _channel) in SkipOffTokenChannelsReverse()
/external/antlr/antlr-3.4/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/
DBufferedTokenStream.cs63 protected List<IToken> _tokens = new List<IToken>(100); field in Antlr.Runtime.BufferedTokenStream
89 _tokens.Clear();
110 return _tokens.Count;
189 int n = i - _tokens.Count + 1; // how many more elements we need? in Sync()
198 t.TokenIndex = _tokens.Count; in Fetch()
199 _tokens.Add(t); in Fetch()
206 if (i < 0 || i >= _tokens.Count) { in Get()
207 …throw new IndexOutOfRangeException("token index " + i + " out of range 0.." + (_tokens.Count - 1)); in Get()
209 return _tokens[i]; in Get()
222 if (start + count >= _tokens.Count) in Get()
[all …]
DCommonTokenStream.cs88 while (_tokens[_p].Channel != _channel) { in Consume()
108 return _tokens[i]; in LB()
130 return _tokens[i]; in LT()
138 while (_tokens[i].Channel != _channel) { in SkipOffTokenChannels()
147 while (i >= 0 && ((IToken)_tokens[i]).Channel != _channel) { in SkipOffTokenChannelsReverse()
158 while (_tokens[i].Channel != _channel) { in Setup()
DTokenRewriteStream.cs139 if (stream._tokens[index].Type != CharStreamConstants.EndOfFile) in Execute()
140 buf.Append(stream._tokens[index].Text); in Execute()
292 if (from > to || from < 0 || to < 0 || to >= _tokens.Count) { in Replace()
293 … ArgumentException("replace: range invalid: " + from + ".." + to + "(size=" + _tokens.Count + ")"); in Replace()
369 for (int i = start; i >= MIN_TOKEN_INDEX && i <= end && i < _tokens.Count; i++) { in ToOriginalString()
396 if (end > _tokens.Count - 1) in ToString()
397 end = _tokens.Count - 1; in ToString()
411 while (i <= end && i < _tokens.Count) { in ToString()
421 IToken t = _tokens[i]; in ToString()
434 if (end == _tokens.Count - 1) { in ToString()
[all …]
/external/antlr/antlr-3.4/runtime/CSharp3/Sources/Antlr3.Runtime.JavaExtensions/
DStringTokenizer.cs40 string[] _tokens; field in Antlr.Runtime.JavaExtensions.StringTokenizer
49 _tokens = str.Split( separator.ToCharArray(), StringSplitOptions.None ); in StringTokenizer()
53 _tokens = _tokens.SelectMany( ( token, i ) => in StringTokenizer()
55 if ( i == _tokens.Length - 1 ) in StringTokenizer()
71 …return new string[] { token, str[_tokens.Take( i + 1 ).Select( t => t.Length + 1 ).Sum() - 1].ToSt… in StringTokenizer()
79 return _current < _tokens.Length; in hasMoreTokens()
84 return _tokens[_current++]; in nextToken()
/external/antlr/antlr-3.4/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.JavaExtensions/
DStringTokenizer.cs39 string[] _tokens; field in Antlr.Runtime.JavaExtensions.StringTokenizer
48 _tokens = str.Split( separator.ToCharArray(), StringSplitOptions.None ); in StringTokenizer()
52_tokens = EnumerableExtensions.ToArray(EnumerableExtensions.SelectMany(_tokens, delegate(string to… in StringTokenizer()
54 if ( i == _tokens.Length - 1 ) in StringTokenizer()
70 …str[EnumerableExtensions.Sum(EnumerableExtensions.Select(EnumerableExtensions.Take(_tokens, i + 1), in StringTokenizer()
79 return _current < _tokens.Length; in hasMoreTokens()
84 return _tokens[_current++]; in nextToken()
/external/chromium-trace/catapult/common/py_utils/py_utils/refactor/
Dsnippet.py103 self._tokens = tokens
121 return self._tokens[-1].string
125 self._tokens[-1].string = value
134 return tuple(self._tokens)