Home
last modified time | relevance | path

Searched refs:token (Results 1 – 25 of 1411) sorted by relevance

12345678910>>...57

/external/antlr/antlr-3.4/runtime/Ruby/test/functional/lexer/
Dbasic.rb20 token = lexer.next_token
21 token.name.should == 'ZERO'
23 token = lexer.next_token
24 token.name.should == '<EOF>'
30 token_types = lexer.map { |token| token.name }
38 token = lexer.next_token
62 token = lexer.next_token
63 token.name.should == 'ZERO'
65 token = lexer.next_token
66 token.name.should == 'ONE'
[all …]
/external/antlr/antlr-3.4/runtime/C/src/
Dantlr3commontoken.c40 static pANTLR3_STRING getText (pANTLR3_COMMON_TOKEN token);
41 static void setText (pANTLR3_COMMON_TOKEN token, pANTLR3_STRING text);
42 static void setText8 (pANTLR3_COMMON_TOKEN token, pANTLR3_UINT8 text);
43 static ANTLR3_UINT32 getType (pANTLR3_COMMON_TOKEN token);
44 static void setType (pANTLR3_COMMON_TOKEN token, ANTLR3_UINT32 type);
45 static ANTLR3_UINT32 getLine (pANTLR3_COMMON_TOKEN token);
46 static void setLine (pANTLR3_COMMON_TOKEN token, ANTLR3_UINT32 line);
47 static ANTLR3_INT32 getCharPositionInLine (pANTLR3_COMMON_TOKEN token);
48 static void setCharPositionInLine (pANTLR3_COMMON_TOKEN token, ANTLR3_INT32 pos);
49 static ANTLR3_UINT32 getChannel (pANTLR3_COMMON_TOKEN token);
[all …]
/external/chromium-trace/catapult/third_party/closure_linter/closure_linter/
Dtokenutil.py33 def GetFirstTokenInSameLine(token): argument
42 while not token.IsFirstInLine():
43 token = token.previous
44 return token
47 def GetFirstTokenInPreviousLine(token): argument
57 first_in_line = GetFirstTokenInSameLine(token)
64 def GetLastTokenInSameLine(token): argument
73 while not token.IsLastInLine():
74 token = token.next
75 return token
[all …]
Dindentation.py81 def __init__(self, token, is_block=False): argument
88 self.token = token
92 self.is_transient = not is_block and token.type not in (
94 self.line_number = token.line_number
97 result = '\n %s' % self.token
100 result, self.overridden_by.token.string)
127 def CheckToken(self, token, state): argument
139 token_type = token.type
142 is_first = self._IsFirstNonWhitespaceTokenInLine(token)
158 goog_scope = tokenutil.GoogScopeOrNoneFromStartBlock(start_token.token)
[all …]
Decmalintrules.py113 def HandleMissingParameterDoc(self, token, param_name): argument
127 token = last_token
132 while token and token.line_number == line_number:
133 if state.IsTypeToken(token):
134 line.insert(0, 'x' * len(token.string))
135 elif token.type in (Type.IDENTIFIER, Type.OPERATOR):
137 line.insert(0, token.string.replace('.', ' '))
139 line.insert(0, token.string)
140 token = token.previous
179 def _CheckJsDocType(self, token, js_type): argument
[all …]
Derror_fixer.py103 for token in tokens:
104 self._file_changed_lines.add(token.line_number)
138 for token in js_type.tokens:
139 if (token and isinstance(token, Token) and
140 token.type == Type.DOC_TYPE_MODIFIER and token.string == '|'):
141 tokenutil.DeleteToken(token)
142 js_type.tokens.remove(token)
143 self._AddFix(token)
153 token = error.token
159 self._FixJsDocPipeNull(token.attached_object.jstype)
[all …]
Djavascriptlintrules.py60 def HandleMissingParameterDoc(self, token, param_name): argument
63 'Missing docs for parameter: "%s"' % param_name, token)
66 def CheckToken(self, token, state): argument
75 super(JavaScriptLintRules, self).CheckToken(token, state)
81 self._CheckUnusedLocalVariables(token, state)
85 if token.type == Type.SIMPLE_LVALUE:
86 identifier = token.string
105 self._declared_private_member_tokens[variable] = token
114 if token.type == Type.IDENTIFIER:
115 for piece in token.string.split('.'):
[all …]
Drequireprovidesorter.py46 def CheckProvides(self, token): argument
61 provide_tokens = self._GetRequireOrProvideTokens(token, 'goog.provide')
68 def CheckRequires(self, token): argument
83 require_tokens = self._GetRequireOrProvideTokens(token, 'goog.require')
90 def FixProvides(self, token): argument
97 self._GetRequireOrProvideTokens(token, 'goog.provide'))
99 def FixRequires(self, token): argument
106 self._GetRequireOrProvideTokens(token, 'goog.require'))
153 def _GetRequireOrProvideTokens(self, token, token_string): argument
166 while token:
[all …]
/external/libxml2/doc/
Dapibuild.py405 def push(self, token): argument
406 self.tokens.insert(0, token);
413 def token(self): member in CLexer
632 def error(self, msg, token=-1): argument
637 if token != -1:
638 print("Got token ", token)
642 def debug(self, msg, token=-1): argument
644 if token != -1:
645 print("Got token ", token)
676 def parseComment(self, token): argument
[all …]
/external/libxml2/
Drngparser.c59 const xmlChar *token; member
92 tokenPtr token; member
252 tokenPtr token; in xmlCRNGNextToken() local
256 token = &(ctxt->tokens[(ctxt->firstToken + ctxt->nbTokens) % MAX_TOKEN]); in xmlCRNGNextToken()
257 token->toktype = CRNG_NONE; in xmlCRNGNextToken()
291 token->toklen = cur - ctxt->cur; in xmlCRNGNextToken()
292 token->token = xmlDictLookup(ctxt->dict, ctxt->cur, token->toklen); in xmlCRNGNextToken()
293 token->toktype = CRNG_LITERAL_SEGMENT; in xmlCRNGNextToken()
294 token->prefix = NULL; in xmlCRNGNextToken()
308 token->toklen = 2; in xmlCRNGNextToken()
[all …]
/external/doclava/src/com/google/doclava/apicheck/
DApiFile.java73 String token = tokenizer.getToken(); in parseApi() local
74 if (token == null) { in parseApi()
77 if ("package".equals(token)) { in parseApi()
80 throw new ApiParseException("expected package got " + token, tokenizer.getLine()); in parseApi()
92 String token; in parsePackage() local
96 token = tokenizer.requireToken(); in parsePackage()
97 assertIdent(tokenizer, token); in parsePackage()
98 name = token; in parsePackage()
100 token = tokenizer.requireToken(); in parsePackage()
101 if (!"{".equals(token)) { in parsePackage()
[all …]
/external/antlr/antlr-3.4/runtime/Python/tests/
Dt010lexer.py27 token = lexer.nextToken()
28 assert token.type == self.lexerModule.IDENTIFIER
29 assert token.start == 0, token.start
30 assert token.stop == 5, token.stop
31 assert token.text == 'foobar', token.text
33 token = lexer.nextToken()
34 assert token.type == self.lexerModule.WS
35 assert token.start == 6, token.start
36 assert token.stop == 6, token.stop
37 assert token.text == ' ', token.text
[all …]
Dt011lexer.py27 token = lexer.nextToken()
28 assert token.type == self.lexerModule.IDENTIFIER
29 assert token.start == 0, token.start
30 assert token.stop == 5, token.stop
31 assert token.text == 'foobar', token.text
33 token = lexer.nextToken()
34 assert token.type == self.lexerModule.WS
35 assert token.start == 6, token.start
36 assert token.stop == 6, token.stop
37 assert token.text == ' ', token.text
[all …]
Dt004lexer.py27 token = lexer.nextToken()
28 assert token.type == self.lexerModule.FOO
29 assert token.start == 0, token.start
30 assert token.stop == 0, token.stop
31 assert token.text == 'f', token.text
33 token = lexer.nextToken()
34 assert token.type == self.lexerModule.FOO
35 assert token.start == 1, token.start
36 assert token.stop == 2, token.stop
37 assert token.text == 'fo', token.text
[all …]
Dt008lexer.py27 token = lexer.nextToken()
28 assert token.type == self.lexerModule.FOO
29 assert token.start == 0, token.start
30 assert token.stop == 0, token.stop
31 assert token.text == 'f', token.text
33 token = lexer.nextToken()
34 assert token.type == self.lexerModule.FOO
35 assert token.start == 1, token.start
36 assert token.stop == 2, token.stop
37 assert token.text == 'fa', token.text
[all …]
Dt009lexer.py27 token = lexer.nextToken()
28 assert token.type == self.lexerModule.DIGIT
29 assert token.start == 0, token.start
30 assert token.stop == 0, token.stop
31 assert token.text == '0', token.text
33 token = lexer.nextToken()
34 assert token.type == self.lexerModule.DIGIT
35 assert token.start == 1, token.start
36 assert token.stop == 1, token.stop
37 assert token.text == '8', token.text
[all …]
Dt005lexer.py27 token = lexer.nextToken()
28 assert token.type == self.lexerModule.FOO
29 assert token.start == 0, token.start
30 assert token.stop == 1, token.stop
31 assert token.text == 'fo', token.text
33 token = lexer.nextToken()
34 assert token.type == self.lexerModule.FOO
35 assert token.start == 2, token.start
36 assert token.stop == 4, token.stop
37 assert token.text == 'foo', token.text
[all …]
/external/chromium-trace/catapult/third_party/html5lib-python/html5lib/
Dhtml5parser.py166 for token in self.normalizedTokens():
167 new_token = token
183 token["name"] not in frozenset(["mglyph", "malignmark"])) or
187 token["name"] == "svg") or
207 if (type == StartTagToken and token["selfClosing"]
208 and not token["selfClosingAcknowledged"]):
210 {"name": token["name"]})
222 for token in self.tokenizer:
223 yield self.normalizeToken(token)
262 def normalizeToken(self, token): argument
[all …]
/external/chromium-trace/catapult/third_party/html5lib-python/html5lib/tests/
Dtest_tokenizer.py31 for token in tokenizer:
32 getattr(self, 'process%s' % types[token["type"]])(token)
36 def processDoctype(self, token): argument
37 self.outputTokens.append(["DOCTYPE", token["name"], token["publicId"],
38 token["systemId"], token["correct"]])
40 def processStartTag(self, token): argument
41 self.outputTokens.append(["StartTag", token["name"],
42 dict(token["data"][::-1]), token["selfClosing"]])
44 def processEmptyTag(self, token): argument
45 if token["name"] not in constants.voidElements:
[all …]
/external/chromium-trace/catapult/third_party/vinn/third_party/parse5/lib/tree_construction/
Dparser.js431 var token = this.tokenizer.getNextToken();
436 if (token.type === Tokenizer.WHITESPACE_CHARACTER_TOKEN && token.chars[0] === '\n') {
437 if (token.chars.length === 1)
440 token.chars = token.chars.substr(1);
444 if (this._shouldProcessTokenInForeignContent(token))
445 this._processTokenInForeignContent(token);
448 this._processToken(token);
512 Parser.prototype._setDocumentType = function (token) { argument
513 this.treeAdapter.setDocumentType(this.document, token.name, token.publicId, token.systemId);
527 Parser.prototype._appendElement = function (token, namespaceURI) { argument
[all …]
/external/apache-xml/src/main/java/org/apache/xml/utils/
DStylesheetPIHandler.java156 String token = ""; in processingInstruction() local
160 token = tokenizer.nextToken(); in processingInstruction()
164 (token.equals(" ") || token.equals("\t") || token.equals("="))) in processingInstruction()
167 String name = token; in processingInstruction()
170 token = tokenizer.nextToken(); in processingInstruction()
172 (token.equals(" " ) || token.equals("\t") || token.equals("="))) in processingInstruction()
173 token = tokenizer.nextToken(); in processingInstruction()
174 type = token.substring(1, token.length() - 1); in processingInstruction()
179 token = tokenizer.nextToken(); in processingInstruction()
181 (token.equals(" " ) || token.equals("\t") || token.equals("="))) in processingInstruction()
[all …]
/external/vulkan-validation-layers/tests/
Dvktestframework.cpp376 const char *token = strtok(config, delims); in ProcessConfigFile() local
377 while (token) { in ProcessConfigFile()
389 if (strcmp(token, "MaxLights") == 0) in ProcessConfigFile()
391 else if (strcmp(token, "MaxClipPlanes") == 0) in ProcessConfigFile()
393 else if (strcmp(token, "MaxTextureUnits") == 0) in ProcessConfigFile()
395 else if (strcmp(token, "MaxTextureCoords") == 0) in ProcessConfigFile()
397 else if (strcmp(token, "MaxVertexAttribs") == 0) in ProcessConfigFile()
399 else if (strcmp(token, "MaxVertexUniformComponents") == 0) in ProcessConfigFile()
401 else if (strcmp(token, "MaxVaryingFloats") == 0) in ProcessConfigFile()
403 else if (strcmp(token, "MaxVertexTextureImageUnits") == 0) in ProcessConfigFile()
[all …]
/external/antlr/antlr-3.4/runtime/ObjC/Framework/test/runtime/token/
DANTLRCommonTokenTest.m17 ANTLRCommonToken *token = [[ANTLRCommonToken newToken] retain];
18 STAssertNotNil(token, @"Token was nil");
19 [token release];
24 ANTLRCommonToken *token = [[ANTLRCommonToken eofToken] retain];
25 STAssertNotNil(token, @"Token was nil");
26 …STAssertEquals(token.type, (NSInteger)ANTLRTokenTypeEOF, @"Token was not of type ANTLRTokenTypeEOF…
27 [token release];
32 ANTLRCommonToken *token = [[ANTLRCommonToken newToken:ANTLRTokenTypeUP] retain];
33 token.text = @"<UP>";
34 STAssertNotNil(token, @"Token was nil");
[all …]
/external/jsoncpp/src/lib_json/
Djson_reader.cpp131 Token token; in parse() local
132 skipCommentTokens(token); in parse()
139 token.type_ = tokenError; in parse()
140 token.start_ = beginDoc; in parse()
141 token.end_ = endDoc; in parse()
144 token); in parse()
152 Token token; in readValue() local
153 skipCommentTokens(token); in readValue()
169 switch (token.type_) { in readValue()
171 successful = readObject(token); in readValue()
[all …]
/external/autotest/client/site_tests/platform_Pkcs11Events/
Dplatform_Pkcs11Events.py18 for token in token_list:
19 shutil.rmtree(token, ignore_errors=True)
20 pkcs11.copytree_with_ownership(pkcs11.TMP_CHAPS_DIR, token)
23 for token in token_list:
25 (token, token))
27 utils.system('chaps_client --unload --path=%s' % token)
30 for token in token_list:
32 (token, token))
33 for token in token_list:
34 utils.system('chaps_client --unload --path=%s' % token)
[all …]

12345678910>>...57