/external/antlr/antlr-3.4/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.JavaExtensions/ |
StringTokenizer.cs | 39 string[] _tokens; field in class:Antlr.Runtime.JavaExtensions.StringTokenizer 48 _tokens = str.Split( separator.ToCharArray(), StringSplitOptions.None ); 52 _tokens = EnumerableExtensions.ToArray(EnumerableExtensions.SelectMany(_tokens, delegate(string token, int i) 54 if ( i == _tokens.Length - 1 ) 70 return new string[] { token, str[EnumerableExtensions.Sum(EnumerableExtensions.Select(EnumerableExtensions.Take(_tokens, i + 1), 79 return _current < _tokens.Length; 84 return _tokens[_current++];
|
/external/antlr/antlr-3.4/runtime/CSharp3/Sources/Antlr3.Runtime.JavaExtensions/ |
StringTokenizer.cs | 40 string[] _tokens; field in class:Antlr.Runtime.JavaExtensions.StringTokenizer 49 _tokens = str.Split( separator.ToCharArray(), StringSplitOptions.None ); 53 _tokens = _tokens.SelectMany( ( token, i ) => 55 if ( i == _tokens.Length - 1 ) 71 return new string[] { token, str[_tokens.Take( i + 1 ).Select( t => t.Length + 1 ).Sum() - 1].ToString() }; 79 return _current < _tokens.Length; 84 return _tokens[_current++];
|
/external/antlr/antlr-3.4/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/ |
BufferedTokenStream.cs | 63 protected List<IToken> _tokens = new List<IToken>(100); field in class:Antlr.Runtime.BufferedTokenStream 89 _tokens.Clear(); 110 return _tokens.Count; 189 int n = i - _tokens.Count + 1; // how many more elements we need? 198 t.TokenIndex = _tokens.Count; 199 _tokens.Add(t); 206 if (i < 0 || i >= _tokens.Count) { 207 throw new IndexOutOfRangeException("token index " + i + " out of range 0.." + (_tokens.Count - 1)); 209 return _tokens[i]; 222 if (start + count >= _tokens.Count [all...] |
CommonTokenStream.cs | 88 while (_tokens[_p].Channel != _channel) { 108 return _tokens[i]; 130 return _tokens[i]; 138 while (_tokens[i].Channel != _channel) { 147 while (i >= 0 && ((IToken)_tokens[i]).Channel != _channel) { 158 while (_tokens[i].Channel != _channel) {
|
TokenRewriteStream.cs | 139 if (stream._tokens[index].Type != CharStreamConstants.EndOfFile) 140 buf.Append(stream._tokens[index].Text); 292 if (from > to || from < 0 || to < 0 || to >= _tokens.Count) { 293 throw new ArgumentException("replace: range invalid: " + from + ".." + to + "(size=" + _tokens.Count + ")"); 369 for (int i = start; i >= MIN_TOKEN_INDEX && i <= end && i < _tokens.Count; i++) { 396 if (end > _tokens.Count - 1) 397 end = _tokens.Count - 1; 411 while (i <= end && i < _tokens.Count) { 421 IToken t = _tokens[i]; 434 if (end == _tokens.Count - 1) [all...] |
/external/antlr/antlr-3.4/runtime/CSharp3/Sources/Antlr3.Runtime/ |
BufferedTokenStream.cs | 65 protected List<IToken> _tokens = new List<IToken>(100); field in class:Antlr.Runtime.BufferedTokenStream 96 _tokens.Clear(); 122 return _tokens.Count; 218 int n = i - _tokens.Count + 1; // how many more elements we need? 229 t.TokenIndex = _tokens.Count; 230 _tokens.Add(t); 238 if (i < 0 || i >= _tokens.Count) 240 throw new IndexOutOfRangeException("token index " + i + " out of range 0.." + (_tokens.Count - 1)); 242 return _tokens[i]; 255 if (start + count >= _tokens.Count [all...] |
CommonTokenStream.cs | 117 return _tokens[i]; 141 return _tokens[i]; 150 while (_tokens[i].Channel != _channel) 161 while (i >= 0 && ((IToken)_tokens[i]).Channel != _channel)
|
TokenRewriteStream.cs | 144 return string.Format("<{0}@{1}:\"{2}\">", opName, stream._tokens[index], text); 158 if (stream._tokens[index].Type != CharStreamConstants.EndOfFile) 159 buf.Append(stream._tokens[index].Text); 191 return string.Format("<DeleteOp@{0}..{1}>", stream._tokens[index], stream._tokens[lastIndex]); 194 return string.Format("<ReplaceOp@{0}..{1}:\"{2}\">", stream._tokens[index], stream._tokens[lastIndex], text); 334 if ( from > to || from < 0 || to < 0 || to >= _tokens.Count ) 336 throw new ArgumentException( "replace: range invalid: " + from + ".." + to + "(size=" + _tokens.Count + ")" ); 427 for ( int i = start; i >= MIN_TOKEN_INDEX && i <= end && i < _tokens.Count; i++ [all...] |