Home
last modified time | relevance | path

Searched refs:tokens (Results 1 – 25 of 1175) sorted by relevance

12345678910>>...47

/external/antlr/runtime/Python/tests/
Dt048rewrite.py25 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/runtime/Python3/tests/
Dt048rewrite.py25 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/tool/src/test/java/org/antlr/test/
DTestTokenRewriteStream.java53 TokenRewriteStream tokens = new TokenRewriteStream(lexEngine); in testInsertBeforeIndex0() local
54 tokens.insertBefore(0, "0"); in testInsertBeforeIndex0()
55 String result = tokens.toString(); in testInsertBeforeIndex0()
68 TokenRewriteStream tokens = new TokenRewriteStream(lexEngine); in testInsertAfterLastIndex() local
69 tokens.insertAfter(2, "x"); in testInsertAfterLastIndex()
70 String result = tokens.toString(); in testInsertAfterLastIndex()
83 TokenRewriteStream tokens = new TokenRewriteStream(lexEngine); in test2InsertBeforeAfterMiddleIndex() local
84 tokens.fill(); in test2InsertBeforeAfterMiddleIndex()
85 tokens.insertBefore(1, "x"); in test2InsertBeforeAfterMiddleIndex()
86 tokens.insertAfter(1, "x"); in test2InsertBeforeAfterMiddleIndex()
[all …]
DTestCommonTokenStream.java54 BufferedTokenStream tokens = new BufferedTokenStream(lexEngine); in testFirstToken() local
56 String result = tokens.LT(1).getText(); in testFirstToken()
75 BufferedTokenStream tokens = new BufferedTokenStream(lexEngine); in test2ndToken() local
77 String result = tokens.LT(2).getText(); in test2ndToken()
96 BufferedTokenStream tokens = new BufferedTokenStream(lexEngine); in testCompleteBuffer() local
99 Token t = tokens.LT(i); in testCompleteBuffer()
102 t = tokens.LT(i); in testCompleteBuffer()
104 tokens.LT(i++); // push it past end in testCompleteBuffer()
105 tokens.LT(i++); in testCompleteBuffer()
107 String result = tokens.toString(); in testCompleteBuffer()
[all …]
/external/minijail/tools/
Dparser.py128 tokens = []
150 tokens.append(
164 if tokens:
167 yield tokens[::]
168 tokens.clear()
256 def _parse_constant(self, tokens): argument
258 if tokens[0].type == 'BITWISE_COMPLEMENT':
260 tokens.pop(0)
261 if not tokens:
263 if tokens[0].type == 'BITWISE_COMPLEMENT':
[all …]
/external/antlr/runtime/Ruby/test/functional/ast-output/
Dtree-rewrite.rb1006 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/python/cpython2/Lib/plat-irix5/
Dpanelparser.py21 tokens = []
36 tokens.append(s[:i])
39 tokens.append(c)
47 tokens.append(s[:i])
49 return tokens
56 tokens = []
60 tokens = tokens + tokenize_string(line)
61 return tokens
76 def parse_expr(tokens): argument
77 if (not tokens) or tokens[0] != '(':
[all …]
/external/python/cpython2/Lib/plat-irix6/
Dpanelparser.py21 tokens = []
36 tokens.append(s[:i])
39 tokens.append(c)
47 tokens.append(s[:i])
49 return tokens
56 tokens = []
60 tokens = tokens + tokenize_string(line)
61 return tokens
76 def parse_expr(tokens): argument
77 if (not tokens) or tokens[0] != '(':
[all …]
/external/antlr/runtime/Ruby/test/functional/tree-parser/
Dbasic.rb33 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/mesa3d/src/gallium/drivers/r300/compiler/tests/
Drc_test_helpers.c141 struct src_tokens tokens; in init_rc_normal_src() local
152 tokens.Negate.String = src_str + matches[1].rm_so; in init_rc_normal_src()
153 tokens.Negate.Length = match_length(matches, 1); in init_rc_normal_src()
154 tokens.Abs.String = src_str + matches[2].rm_so; in init_rc_normal_src()
155 tokens.Abs.Length = match_length(matches, 2); in init_rc_normal_src()
156 tokens.File.String = src_str + matches[3].rm_so; in init_rc_normal_src()
157 tokens.File.Length = match_length(matches, 3); in init_rc_normal_src()
158 tokens.Index.String = src_str + matches[4].rm_so; in init_rc_normal_src()
159 tokens.Index.Length = match_length(matches, 4); in init_rc_normal_src()
160 tokens.Swizzle.String = src_str + matches[5].rm_so; in init_rc_normal_src()
[all …]
/external/libtextclassifier/annotator/
Dfeature-processor_test.cc87 std::vector<Token> tokens{Token("Hělló", 0, 5), in TEST_F() local
91 internal::SplitTokensOnSelectionBoundaries({9, 12}, &tokens); in TEST_F()
94 EXPECT_THAT(tokens, ElementsAreArray( in TEST_F()
104 std::vector<Token> tokens{Token("Hělló", 0, 5), in TEST_F() local
108 internal::SplitTokensOnSelectionBoundaries({6, 12}, &tokens); in TEST_F()
111 EXPECT_THAT(tokens, ElementsAreArray( in TEST_F()
120 std::vector<Token> tokens{Token("Hělló", 0, 5), in TEST_F() local
124 internal::SplitTokensOnSelectionBoundaries({9, 23}, &tokens); in TEST_F()
127 EXPECT_THAT(tokens, ElementsAreArray( in TEST_F()
136 std::vector<Token> tokens{Token("Hělló", 0, 5), in TEST_F() local
[all …]
/external/jsmn/
Djsmn.c7 jsmntok_t *tokens, size_t num_tokens) { in jsmn_alloc_token() argument
12 tok = &tokens[parser->toknext++]; in jsmn_alloc_token()
36 size_t len, jsmntok_t *tokens, size_t num_tokens) { in jsmn_parse_primitive() argument
64 if (tokens == NULL) { in jsmn_parse_primitive()
68 token = jsmn_alloc_token(parser, tokens, num_tokens); in jsmn_parse_primitive()
85 size_t len, jsmntok_t *tokens, size_t num_tokens) { in jsmn_parse_string() argument
98 if (tokens == NULL) { in jsmn_parse_string()
101 token = jsmn_alloc_token(parser, tokens, num_tokens); in jsmn_parse_string()
152 jsmntok_t *tokens, unsigned int num_tokens) { in jsmn_parse() argument
166 if (tokens == NULL) { in jsmn_parse()
[all …]
/external/snakeyaml/src/test/java/org/pyyaml/
DCanonicalScanner.java26 import org.yaml.snakeyaml.tokens.AliasToken;
27 import org.yaml.snakeyaml.tokens.AnchorToken;
28 import org.yaml.snakeyaml.tokens.DirectiveToken;
29 import org.yaml.snakeyaml.tokens.DocumentStartToken;
30 import org.yaml.snakeyaml.tokens.FlowEntryToken;
31 import org.yaml.snakeyaml.tokens.FlowMappingEndToken;
32 import org.yaml.snakeyaml.tokens.FlowMappingStartToken;
33 import org.yaml.snakeyaml.tokens.FlowSequenceEndToken;
34 import org.yaml.snakeyaml.tokens.FlowSequenceStartToken;
35 import org.yaml.snakeyaml.tokens.KeyToken;
[all …]
/external/webp/src/utils/
Dhuffman_encode_utils.c262 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/python/cpython3/Tools/scripts/
Dabitype.py16 for t,v in tokens:
40 if tokens[pos][1] == 'static':
45 name = tokens[pos][1]
47 while tokens[pos][1] != '{':
51 while tokens[pos][0] in ('ws', 'comment'):
53 if tokens[pos][1] != 'PyVarObject_HEAD_INIT':
55 while tokens[pos][1] != ')':
61 while tokens[pos][0] in ('ws', 'comment'):
64 while tokens[end][1] not in ',}':
65 if tokens[end][1] == '(':
[all …]
/external/antlr/runtime/Java/src/main/java/org/antlr/runtime/
DBufferedTokenStream.java57 protected List<Token> tokens = new ArrayList<Token>(100); field in BufferedTokenStream
117 public int size() { return tokens.size(); } in size()
135 int n = i - tokens.size() + 1; // how many more elements we need? in sync()
144 t.setTokenIndex(tokens.size()); in fetch()
146 tokens.add(t); in fetch()
153 if ( i < 0 || i >= tokens.size() ) { in get()
154 … throw new NoSuchElementException("token index "+i+" out of range 0.."+(tokens.size()-1)); in get()
156 return tokens.get(i); in get()
164 if ( stop>=tokens.size() ) stop = tokens.size()-1; in get()
166 Token t = tokens.get(i); in get()
[all …]
DLegacyCommonTokenStream.java45 protected List<Token> tokens; field in LegacyCommonTokenStream
70 tokens = new ArrayList<Token>(500); in LegacyCommonTokenStream()
86 tokens.clear(); in setTokenSource()
117 tokens.add(t); in fillBuffer()
136 if ( p<tokens.size() ) { in consume()
146 int n = tokens.size(); in skipOffTokenChannels()
147 while ( i<n && tokens.get(i).getChannel()!=channel ) { in skipOffTokenChannels()
154 while ( i>=0 && tokens.get(i).getChannel()!=channel ) { in skipOffTokenChannelsReverse()
188 return tokens; in getTokens()
203 if ( stop>=tokens.size() ) { in getTokens()
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/
Dstring_split_op_test.py37 tokens = string_ops.string_split(strings)
38 indices, values, shape = self.evaluate(tokens)
48 tokens = string_ops.string_split(strings, delimiter="")
49 indices, values, shape = self.evaluate(tokens)
66 tokens = string_ops.string_split(strings)
67 indices, values, shape = self.evaluate(tokens)
78 tokens = string_ops.string_split(strings, delimiter=" .")
79 indices, values, shape = self.evaluate(tokens)
97 tokens = string_ops.string_split(strings, delimiter="|")
98 indices, values, shape = self.evaluate(tokens)
[all …]
/external/chromium-trace/catapult/common/py_utils/py_utils/refactor/
Dsnippet.py39 def tokens(self): member in Snippet
48 return offset_token.Untokenize(self.tokens)
97 def __init__(self, token_type, tokens): argument
103 self._tokens = tokens
133 def tokens(self): member in TokenSnippet
142 if not self.tokens:
146 print >> stream, '%-4s' % self.type_name, repr(self.tokens[0].string)
147 for tok in self.tokens[1:]:
178 def tokens(self): member in Symbol
179 tokens = []
[all …]
/external/ply/ply/ply/
Dcpp.py26 tokens = ( variable
183 tokens = []
188 tokens.append(tok)
189 return tokens
314 def tokenstrip(self,tokens): argument
316 while i < len(tokens) and tokens[i].type in self.t_WS:
318 del tokens[:i]
319 i = len(tokens)-1
320 while i >= 0 and tokens[i].type in self.t_WS:
322 del tokens[i+1:]
[all …]
/external/antlr/runtime/CSharp3/Sources/Antlr3.Runtime/
DLegacyCommonTokenStream.cs60 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/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/
DLegacyCommonTokenStream.cs61 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/mesa3d/src/gallium/targets/graw-null/
Dgraw_util.c19 struct tgsi_token tokens[1024]; in graw_parse_geometry_shader() local
22 if (!tgsi_text_translate(text, tokens, ARRAY_SIZE(tokens))) in graw_parse_geometry_shader()
26 state.tokens = tokens; in graw_parse_geometry_shader()
34 struct tgsi_token tokens[1024]; in graw_parse_vertex_shader() local
37 if (!tgsi_text_translate(text, tokens, ARRAY_SIZE(tokens))) in graw_parse_vertex_shader()
41 state.tokens = tokens; in graw_parse_vertex_shader()
49 struct tgsi_token tokens[1024]; in graw_parse_fragment_shader() local
52 if (!tgsi_text_translate(text, tokens, ARRAY_SIZE(tokens))) in graw_parse_fragment_shader()
56 state.tokens = tokens; in graw_parse_fragment_shader()
/external/antlr/tool/src/main/java/org/antlr/tool/
DStrip.java43 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()
79 public void visit(Object t) { ACTION(tokens, (CommonTree)t); } in rewrite()
91 tokens.delete(a.getTokenStartIndex(), in rewrite()
93 killTrailingNewline(tokens, action.getTokenStopIndex()); in rewrite()
103 tokens.delete(a.token.getTokenIndex()); in rewrite()
104 killTrailingNewline(tokens, a.token.getTokenIndex()); in rewrite()
[all …]
/external/webp/src/enc/
Dtoken_enc.c114 VP8TBuffer* const tokens) { in VP8RecordCoeffTokens() argument
122 if (!AddToken(tokens, last >= 0, base_id + 0, s + 0)) { in VP8RecordCoeffTokens()
130 if (!AddToken(tokens, v != 0, base_id + 1, s + 1)) { in VP8RecordCoeffTokens()
135 if (!AddToken(tokens, v > 1, base_id + 2, s + 2)) { in VP8RecordCoeffTokens()
139 if (!AddToken(tokens, v > 4, base_id + 3, s + 3)) { in VP8RecordCoeffTokens()
140 if (AddToken(tokens, v != 2, base_id + 4, s + 4)) { in VP8RecordCoeffTokens()
141 AddToken(tokens, v == 4, base_id + 5, s + 5); in VP8RecordCoeffTokens()
143 } else if (!AddToken(tokens, v > 10, base_id + 6, s + 6)) { in VP8RecordCoeffTokens()
144 if (!AddToken(tokens, v > 6, base_id + 7, s + 7)) { in VP8RecordCoeffTokens()
145 AddConstantToken(tokens, v == 6, 159); in VP8RecordCoeffTokens()
[all …]

12345678910>>...47