/external/antlr/antlr-3.4/runtime/Python/tests/ |
D | t048rewrite.py | 25 tokens = self._parse("abc") 26 tokens.insertBefore(0, "0") 28 result = tokens.toString() 34 tokens = self._parse("abc") 35 tokens.insertAfter(2, "x") 37 result = tokens.toString() 43 tokens = self._parse("abc") 44 tokens.insertBefore(1, "x") 45 tokens.insertAfter(1, "x") 47 result = tokens.toString() [all …]
|
/external/antlr/antlr-3.4/tool/src/test/java/org/antlr/test/ |
D | TestTokenRewriteStream.java | 51 TokenRewriteStream tokens = new TokenRewriteStream(lexEngine); in testInsertBeforeIndex0() local 52 tokens.insertBefore(0, "0"); in testInsertBeforeIndex0() 53 String result = tokens.toString(); in testInsertBeforeIndex0() 66 TokenRewriteStream tokens = new TokenRewriteStream(lexEngine); in testInsertAfterLastIndex() local 67 tokens.insertAfter(2, "x"); in testInsertAfterLastIndex() 68 String result = tokens.toString(); in testInsertAfterLastIndex() 81 TokenRewriteStream tokens = new TokenRewriteStream(lexEngine); in test2InsertBeforeAfterMiddleIndex() local 82 tokens.fill(); in test2InsertBeforeAfterMiddleIndex() 83 tokens.insertBefore(1, "x"); in test2InsertBeforeAfterMiddleIndex() 84 tokens.insertAfter(1, "x"); in test2InsertBeforeAfterMiddleIndex() [all …]
|
D | TestCommonTokenStream.java | 52 BufferedTokenStream tokens = new BufferedTokenStream(lexEngine); in testFirstToken() local 54 String result = tokens.LT(1).getText(); in testFirstToken() 73 BufferedTokenStream tokens = new BufferedTokenStream(lexEngine); in test2ndToken() local 75 String result = tokens.LT(2).getText(); in test2ndToken() 94 BufferedTokenStream tokens = new BufferedTokenStream(lexEngine); in testCompleteBuffer() local 97 Token t = tokens.LT(i); in testCompleteBuffer() 100 t = tokens.LT(i); in testCompleteBuffer() 102 tokens.LT(i++); // push it past end in testCompleteBuffer() 103 tokens.LT(i++); in testCompleteBuffer() 105 String result = tokens.toString(); in testCompleteBuffer() [all …]
|
/external/antlr/antlr-3.4/runtime/Ruby/test/functional/ast-output/ |
D | tree-rewrite.rb | 1006 tokens = ANTLR3::CommonTokenStream.new( lexer ) 1007 parser = FlatList::Parser.new( tokens ) 1011 nodes.token_stream = tokens 1020 tokens = ANTLR3::CommonTokenStream.new( lexer ) 1021 parser = SimpleTree::Parser.new( tokens ) 1025 nodes.token_stream = tokens 1034 tokens = ANTLR3::CommonTokenStream.new( lexer ) 1035 parser = CombinedRewriteAndAuto::Parser.new( tokens ) 1039 nodes.token_stream = tokens 1044 tokens = ANTLR3::CommonTokenStream.new( lexer ) [all …]
|
/external/mesa3d/src/gallium/drivers/r300/compiler/tests/ |
D | rc_test_helpers.c | 95 struct src_tokens tokens; in init_rc_normal_src() local 106 tokens.Negate.String = src_str + matches[1].rm_so; in init_rc_normal_src() 107 tokens.Negate.Length = match_length(matches, 1); in init_rc_normal_src() 108 tokens.Abs.String = src_str + matches[2].rm_so; in init_rc_normal_src() 109 tokens.Abs.Length = match_length(matches, 2); in init_rc_normal_src() 110 tokens.File.String = src_str + matches[3].rm_so; in init_rc_normal_src() 111 tokens.File.Length = match_length(matches, 3); in init_rc_normal_src() 112 tokens.Index.String = src_str + matches[4].rm_so; in init_rc_normal_src() 113 tokens.Index.Length = match_length(matches, 4); in init_rc_normal_src() 114 tokens.Swizzle.String = src_str + matches[5].rm_so; in init_rc_normal_src() [all …]
|
/external/skia/experimental/LightSymbolsUtil/Callstacker/Callstacker/ |
D | Callstacker.cpp | 272 if (tokens.size() == 0) { in enteredFunction() 276 if (tokens[tokens.size() - 1] != "{") { in enteredFunction() 280 int i = tokens.size() - 2; in enteredFunction() 288 string t_i = tokens[i]; // debugging sucks! in enteredFunction() 290 if (!foundCloseBraket && (tokens[i] == "enum" in enteredFunction() 291 || tokens[i] == "struct" in enteredFunction() 292 || tokens[i] == "class" in enteredFunction() 293 || tokens[i] == "namespace" in enteredFunction() 294 || tokens[i] == "public" in enteredFunction() 295 || tokens[i] == "private" in enteredFunction() [all …]
|
/external/antlr/antlr-3.4/runtime/Ruby/test/functional/tree-parser/ |
D | basic.rb | 33 tokens = ANTLR3::CommonTokenStream.new( lexer ) 34 parser = FlatList::Parser.new( tokens ) 38 nodes.token_stream = tokens 69 tokens = ANTLR3::CommonTokenStream.new( lexer ) 70 parser = SimpleTree::Parser.new( tokens ) 74 nodes.token_stream = tokens 108 tokens = ANTLR3::CommonTokenStream.new( lexer ) 109 parser = FlatVsTreeDecision::Parser.new( tokens ) 113 nodes.token_stream = tokens 146 tokens = ANTLR3::CommonTokenStream.new( lexer ) [all …]
|
/external/jmonkeyengine/engine/src/core-plugins/com/jme3/font/plugins/ |
D | BitmapFontLoader.java | 64 String[] tokens = line.split(regex); in load() local 65 if (tokens[0].equals("info")){ in load() 67 for (int i = 1; i < tokens.length; i++){ in load() 68 if (tokens[i].equals("size")){ in load() 69 charSet.setRenderedSize(Integer.parseInt(tokens[i + 1])); in load() 72 }else if (tokens[0].equals("common")){ in load() 74 for (int i = 1; i < tokens.length; i++){ in load() 75 String token = tokens[i]; in load() 77 charSet.setLineHeight(Integer.parseInt(tokens[i + 1])); in load() 79 charSet.setBase(Integer.parseInt(tokens[i + 1])); in load() [all …]
|
/external/webp/src/utils/ |
D | huffman_encode.c | 262 HuffmanTreeToken* tokens, in CodeRepeatedValues() argument 266 tokens->code = value; in CodeRepeatedValues() 267 tokens->extra_bits = 0; in CodeRepeatedValues() 268 ++tokens; in CodeRepeatedValues() 275 tokens->code = value; in CodeRepeatedValues() 276 tokens->extra_bits = 0; in CodeRepeatedValues() 277 ++tokens; in CodeRepeatedValues() 281 tokens->code = 16; in CodeRepeatedValues() 282 tokens->extra_bits = repetitions - 3; in CodeRepeatedValues() 283 ++tokens; in CodeRepeatedValues() [all …]
|
/external/antlr/antlr-3.4/runtime/Java/src/main/java/org/antlr/runtime/ |
D | BufferedTokenStream.java | 57 protected List<Token> tokens = new ArrayList<Token>(100); field in BufferedTokenStream 108 public int size() { return tokens.size(); } in size() 125 int n = i - tokens.size() + 1; // how many more elements we need? in sync() 134 t.setTokenIndex(tokens.size()); in fetch() 136 tokens.add(t); in fetch() 142 if ( i < 0 || i >= tokens.size() ) { in get() 143 … throw new NoSuchElementException("token index "+i+" out of range 0.."+(tokens.size()-1)); in get() 145 return tokens.get(i); in get() 153 if ( stop>=tokens.size() ) stop = tokens.size()-1; in get() 155 Token t = tokens.get(i); in get() [all …]
|
D | LegacyCommonTokenStream.java | 45 protected List tokens; field in LegacyCommonTokenStream 70 tokens = new ArrayList(500); in LegacyCommonTokenStream() 86 tokens.clear(); in setTokenSource() 118 tokens.add(t); in fillBuffer() 136 if ( p<tokens.size() ) { in consume() 146 int n = tokens.size(); in skipOffTokenChannels() 147 while ( i<n && ((Token)tokens.get(i)).getChannel()!=channel ) { in skipOffTokenChannels() 154 while ( i>=0 && ((Token)tokens.get(i)).getChannel()!=channel ) { in skipOffTokenChannelsReverse() 188 return tokens; in getTokens() 203 if ( stop>=tokens.size() ) { in getTokens() [all …]
|
/external/mesa3d/src/gallium/targets/graw-null/ |
D | graw_util.c | 18 struct tgsi_token tokens[1024]; in graw_parse_geometry_shader() local 21 if (!tgsi_text_translate(text, tokens, Elements(tokens))) in graw_parse_geometry_shader() 24 state.tokens = tokens; in graw_parse_geometry_shader() 32 struct tgsi_token tokens[1024]; in graw_parse_vertex_shader() local 35 if (!tgsi_text_translate(text, tokens, Elements(tokens))) in graw_parse_vertex_shader() 38 state.tokens = tokens; in graw_parse_vertex_shader() 46 struct tgsi_token tokens[1024]; in graw_parse_fragment_shader() local 49 if (!tgsi_text_translate(text, tokens, Elements(tokens))) in graw_parse_fragment_shader() 52 state.tokens = tokens; in graw_parse_fragment_shader()
|
/external/chromium-trace/trace-viewer/third_party/Paste/paste/auth/ |
D | auth_tkt.py | 95 def __init__(self, secret, userid, ip, tokens=(), user_data='', argument 101 if not isinstance(tokens, basestring): 102 tokens = ','.join(tokens) 103 self.tokens = tokens 119 self.ip, self.time, self.secret, self.userid, self.tokens, 124 if self.tokens: 125 v += self.tokens + '!' 173 tokens, user_data = data.split('!', 1) 176 tokens = '' 180 userid, tokens, user_data, [all …]
|
/external/antlr/antlr-3.4/runtime/CSharp3/Sources/Antlr3.Runtime/ |
D | LegacyCommonTokenStream.cs | 60 protected List<IToken> tokens; field in Antlr.Runtime.LegacyCommonTokenStream 86 tokens = new List<IToken>( 500 ); in LegacyCommonTokenStream() 122 tokens.Clear(); in SetTokenSource() 169 tokens.Add( t ); in FillBuffer() 192 if ( p < tokens.Count ) in Consume() 202 int n = tokens.Count; in SkipOffTokenChannels() 203 while ( i < n && ( (IToken)tokens[i] ).Channel != channel ) in SkipOffTokenChannels() 212 while ( i >= 0 && ( (IToken)tokens[i] ).Channel != channel ) in SkipOffTokenChannelsReverse() 256 return tokens; in GetTokens() 276 if ( stop >= tokens.Count ) in GetTokens() [all …]
|
/external/antlr/antlr-3.4/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/ |
D | LegacyCommonTokenStream.cs | 61 protected List<IToken> tokens; field in Antlr.Runtime.LegacyCommonTokenStream 86 tokens = new List<IToken>(500); in LegacyCommonTokenStream() 116 tokens.Clear(); in SetTokenSource() 157 tokens.Add(t); in FillBuffer() 179 if (p < tokens.Count) { in Consume() 187 int n = tokens.Count; in SkipOffTokenChannels() 188 while (i < n && ((IToken)tokens[i]).Channel != channel) { in SkipOffTokenChannels() 195 while (i >= 0 && ((IToken)tokens[i]).Channel != channel) { in SkipOffTokenChannelsReverse() 231 return tokens; in GetTokens() 248 if (stop >= tokens.Count) { in GetTokens() [all …]
|
/external/webp/src/enc/ |
D | token.c | 113 VP8TBuffer* const tokens) { in VP8RecordCoeffTokens() argument 116 if (!AddToken(tokens, last >= 0, base_id + 0)) { in VP8RecordCoeffTokens() 124 if (!AddToken(tokens, v != 0, base_id + 1)) { in VP8RecordCoeffTokens() 129 if (!AddToken(tokens, v > 1, base_id + 2)) { in VP8RecordCoeffTokens() 132 if (!AddToken(tokens, v > 4, base_id + 3)) { in VP8RecordCoeffTokens() 133 if (AddToken(tokens, v != 2, base_id + 4)) in VP8RecordCoeffTokens() 134 AddToken(tokens, v == 4, base_id + 5); in VP8RecordCoeffTokens() 135 } else if (!AddToken(tokens, v > 10, base_id + 6)) { in VP8RecordCoeffTokens() 136 if (!AddToken(tokens, v > 6, base_id + 7)) { in VP8RecordCoeffTokens() 137 AddConstantToken(tokens, v == 6, 159); in VP8RecordCoeffTokens() [all …]
|
/external/chromium-trace/trace-viewer/third_party/Paste/paste/util/ |
D | template.py | 438 def trim_lex(tokens): argument 449 for i in range(len(tokens)): 450 current = tokens[i] 451 if isinstance(tokens[i], six.string_types): 460 prev = tokens[i-1] 461 if i+1 >= len(tokens): 464 next = tokens[i+1] 474 tokens[i-1] = prev 478 tokens[i+1] = next 479 return tokens [all …]
|
/external/jsmn/ |
D | jsmn.c | 9 jsmntok_t *tokens, size_t num_tokens) { in jsmn_alloc_token() argument 14 tok = &tokens[parser->toknext++]; in jsmn_alloc_token() 38 size_t len, jsmntok_t *tokens, size_t num_tokens) { in jsmn_parse_primitive() argument 66 if (tokens == NULL) { in jsmn_parse_primitive() 70 token = jsmn_alloc_token(parser, tokens, num_tokens); in jsmn_parse_primitive() 87 size_t len, jsmntok_t *tokens, size_t num_tokens) { in jsmn_parse_string() argument 100 if (tokens == NULL) { in jsmn_parse_string() 103 token = jsmn_alloc_token(parser, tokens, num_tokens); in jsmn_parse_string() 154 jsmntok_t *tokens, unsigned int num_tokens) { in jsmn_parse() argument 168 if (tokens == NULL) { in jsmn_parse() [all …]
|
D | jsmn_test.c | 86 jsmntok_t tokens[10]; in test_simple() local 91 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_simple() 93 check(TOKEN_EQ(tokens[0], 0, 8, JSMN_OBJECT)); in test_simple() 94 check(TOKEN_EQ(tokens[1], 2, 3, JSMN_STRING)); in test_simple() 95 check(TOKEN_EQ(tokens[2], 6, 7, JSMN_PRIMITIVE)); in test_simple() 97 check(TOKEN_STRING(js, tokens[0], js)); in test_simple() 98 check(TOKEN_STRING(js, tokens[1], "a")); in test_simple() 99 check(TOKEN_STRING(js, tokens[2], "0")); in test_simple() 103 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_simple() 108 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_simple() [all …]
|
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/tool/ |
D | Strip.java | 43 protected TokenRewriteStream tokens; field in Strip 50 System.out.println(s.tokens); in main() 55 public TokenRewriteStream getTokenStream() { return tokens; } in getTokenStream() 64 tokens = new TokenRewriteStream(lex); in parseAndRewrite() 65 ANTLRv3Parser g = new ANTLRv3Parser(tokens); in parseAndRewrite() 78 public void visit(Object t) { ACTION(tokens, (CommonTree)t); } in rewrite() 89 tokens.delete(a.getTokenStartIndex(), in rewrite() 91 killTrailingNewline(tokens, action.getTokenStopIndex()); in rewrite() 100 tokens.delete(a.token.getTokenIndex()); in rewrite() 101 killTrailingNewline(tokens, a.token.getTokenIndex()); in rewrite() [all …]
|
/external/chromium-trace/trace-viewer/tracing/third_party/tvcm/tvcm/ |
D | strip_js_comments_unittest.py | 29 tokens = list(strip_js_comments._TokenizeJS('')) 30 self.assertEquals([], tokens) 33 tokens = list(strip_js_comments._TokenizeJS('\n')) 34 self.assertEquals(['\n'], tokens) 37 tokens = list(strip_js_comments._TokenizeJS('A // foo')) 38 self.assertEquals(['A ', '//', ' foo'], tokens) 41 tokens = list(strip_js_comments._TokenizeJS('A // foo\nbar')) 42 self.assertEquals(['A ', '//', ' foo', '\n', 'bar'], tokens) 45 tokens = list(strip_js_comments._TokenizeJS('A /* foo */')) 46 self.assertEquals(['A ', '/*', ' foo ', '*/'], tokens) [all …]
|
/external/antlr/antlr-3.4/runtime/CSharp3/Sources/Antlr3.Runtime.Test/SlimParsing/ |
D | SlimTokenStream.cs | 57 protected List<SlimToken> tokens; field in Antlr.Runtime.FastTokenStream 74 tokens = new List<SlimToken>( 500 ); in FastTokenStream() 101 tokens.Clear(); in SetTokenSource() 123 tokens.Add( t ); in FillBuffer() 146 if ( p < tokens.Count ) in Consume() 156 int n = tokens.Count; in SkipOffTokenChannels() 157 while ( i < n && tokens[i].Channel != channel ) in SkipOffTokenChannels() 166 while ( i >= 0 && tokens[i].Channel != channel ) in SkipOffTokenChannelsReverse() 179 return tokens; in GetTokens() 199 if ( stop >= tokens.Count ) in GetTokens() [all …]
|
/external/clang/bindings/python/tests/cindex/ |
D | test_tokens.py | 15 tokens = list(tu.get_tokens(extent=r)) 17 assert len(tokens) == 5 18 assert tokens[1].spelling == 'i' 19 assert tokens[1].kind == TokenKind.IDENTIFIER 21 cursor = tokens[1].cursor 23 assert tokens[1].cursor == tokens[2].cursor 31 tokens = list(tu.get_tokens(extent=r)) 32 eq_(len(tokens), 4) 34 loc = tokens[1].location 45 tokens = list(tu.get_tokens(extent=r)) [all …]
|
/external/antlr/antlr-3.4/runtime/JavaScript/src/org/antlr/runtime/ |
D | CommonTokenStream.js | 13 this.tokens = []; property in org.antlr.runtime.CommonTokenStream 28 this.tokens = []; property 64 this.tokens.push(t); 82 if ( this.p<this.tokens.length ) { 92 var n = this.tokens.length; 93 while ( i<n && (this.tokens[i]).getChannel()!=this.channel ) { 100 while ( i>=0 && (this.tokens[i]).getChannel()!=this.channel ) { 140 return this.tokens; 149 if ( stop>=this.tokens.length ) { 150 stop=this.tokens.length-1; [all …]
|
/external/antlr/antlr-3.4/runtime/ObjC/Framework/ |
D | ANTLRBufferedTokenStream.m | 37 @synthesize tokens; 57 tokens = [[AMutableArray arrayWithCapacity:1000] retain]; 69 tokens = [[AMutableArray arrayWithCapacity:1000] retain]; 82 if ( self.tokens ) 83 copy.tokens = [tokens copyWithZone:aZone]; 95 if ( tokens ) [tokens release]; 102 return ((ANTLRCommonToken *)[tokens objectAtIndex:index]).line; 107 return ((ANTLRCommonToken *)[tokens objectAtIndex:index]).charPositionInLine; 163 return [tokens count]; 183 /** Make sure index i in tokens has a token. */ [all …]
|