Home
last modified time | relevance | path

Searched refs:tok (Results 1 – 25 of 272) sorted by relevance

1234567891011

/external/clang/lib/Parse/
DParseTentative.cpp53 case tok::kw_asm: in isCXXDeclarationStatement()
55 case tok::kw_namespace: in isCXXDeclarationStatement()
58 case tok::kw_using: in isCXXDeclarationStatement()
60 case tok::kw_static_assert: in isCXXDeclarationStatement()
61 case tok::kw__Static_assert: in isCXXDeclarationStatement()
147 if (Tok.is(tok::kw_typeof)) in TryParseSimpleDeclaration()
152 if (getLangOpts().ObjC1 && Tok.is(tok::less)) in TryParseSimpleDeclaration()
156 assert(Tok.is(tok::l_paren) && "Expected '('"); in TryParseSimpleDeclaration()
162 if (Tok.isNot(tok::semi) && (!AllowForRangeDecl || Tok.isNot(tok::colon))) in TryParseSimpleDeclaration()
193 if (Tok.is(tok::kw_asm) || Tok.is(tok::kw___attribute)) in TryParseInitDeclaratorList()
[all …]
DParseDecl.cpp110 assert(Tok.is(tok::kw___attribute) && "Not a GNU attribute list!"); in ParseGNUAttributes()
112 while (Tok.is(tok::kw___attribute)) { in ParseGNUAttributes()
114 if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after, in ParseGNUAttributes()
116 SkipUntil(tok::r_paren, true); // skip until ) or ; in ParseGNUAttributes()
119 if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after, "(")) { in ParseGNUAttributes()
120 SkipUntil(tok::r_paren, true); // skip until ) or ; in ParseGNUAttributes()
124 while (Tok.is(tok::identifier) || isDeclarationSpecifier() || in ParseGNUAttributes()
125 Tok.is(tok::comma)) { in ParseGNUAttributes()
126 if (Tok.is(tok::comma)) { in ParseGNUAttributes()
135 if (Tok.is(tok::l_paren)) { in ParseGNUAttributes()
[all …]
DParseExpr.cpp35 static prec::Level getBinOpPrecedence(tok::TokenKind Kind, in getBinOpPrecedence()
39 case tok::greater: in getBinOpPrecedence()
48 case tok::greatergreater: in getBinOpPrecedence()
60 case tok::comma: return prec::Comma; in getBinOpPrecedence()
61 case tok::equal: in getBinOpPrecedence()
62 case tok::starequal: in getBinOpPrecedence()
63 case tok::slashequal: in getBinOpPrecedence()
64 case tok::percentequal: in getBinOpPrecedence()
65 case tok::plusequal: in getBinOpPrecedence()
66 case tok::minusequal: in getBinOpPrecedence()
[all …]
DParseObjc.cpp35 if (Tok.is(tok::code_completion)) { in ParseObjCAtDirectives()
43 case tok::objc_class: in ParseObjCAtDirectives()
45 case tok::objc_interface: { in ParseObjCAtDirectives()
50 case tok::objc_protocol: { in ParseObjCAtDirectives()
54 case tok::objc_implementation: in ParseObjCAtDirectives()
56 case tok::objc_end: in ParseObjCAtDirectives()
58 case tok::objc_compatibility_alias: in ParseObjCAtDirectives()
61 case tok::objc_synthesize: in ParseObjCAtDirectives()
64 case tok::objc_dynamic: in ParseObjCAtDirectives()
67 case tok::objc___experimental_modules_import: in ParseObjCAtDirectives()
[all …]
DParseExprCXX.cpp26 static int SelectDigraphErrorMessage(tok::TokenKind Kind) { in SelectDigraphErrorMessage()
28 case tok::kw_template: return 0; in SelectDigraphErrorMessage()
29 case tok::kw_const_cast: return 1; in SelectDigraphErrorMessage()
30 case tok::kw_dynamic_cast: return 2; in SelectDigraphErrorMessage()
31 case tok::kw_reinterpret_cast: return 3; in SelectDigraphErrorMessage()
32 case tok::kw_static_cast: return 4; in SelectDigraphErrorMessage()
48 Token &ColonToken, tok::TokenKind Kind, bool AtDigraph) { in FixDigraph()
62 ColonToken.setKind(tok::coloncolon); in FixDigraph()
65 DigraphToken.setKind(tok::less); in FixDigraph()
79 if (!Next.is(tok::l_square) || Next.getLength() != 2) in CheckForTemplateAndDigraph()
[all …]
DParseTemplate.cpp33 if (Tok.is(tok::kw_template) && NextToken().isNot(tok::less)) { in ParseDeclarationStartingWithTemplate()
85 assert((Tok.is(tok::kw_export) || Tok.is(tok::kw_template)) && in ParseTemplateDeclarationOrSpecialization()
123 if (Tok.is(tok::kw_export)) { in ParseTemplateDeclarationOrSpecialization()
129 if (Tok.is(tok::kw_template)) { in ParseTemplateDeclarationOrSpecialization()
142 SkipUntil(tok::r_brace, true, true); in ParseTemplateDeclarationOrSpecialization()
143 if (Tok.is(tok::semi)) in ParseTemplateDeclarationOrSpecialization()
160 } while (Tok.is(tok::kw_export) || Tok.is(tok::kw_template)); in ParseTemplateDeclarationOrSpecialization()
212 if (Tok.is(tok::kw_using)) in ParseSingleDeclarationAfterTemplate()
225 if (Tok.is(tok::semi)) { in ParseSingleDeclarationAfterTemplate()
238 SkipUntil(tok::r_brace, true, true); in ParseSingleDeclarationAfterTemplate()
[all …]
DParseDeclCXX.cpp54 assert(Tok.is(tok::kw_namespace) && "Not a namespace!"); in ParseNamespace()
58 if (Tok.is(tok::code_completion)) { in ParseNamespace()
72 if (Tok.is(tok::identifier)) { in ParseNamespace()
75 while (Tok.is(tok::coloncolon) && NextToken().is(tok::identifier)) { in ParseNamespace()
84 if (Tok.is(tok::kw___attribute)) { in ParseNamespace()
89 if (Tok.is(tok::equal)) { in ParseNamespace()
99 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseNamespace()
118 SkipUntil(tok::r_brace, false); in ParseNamespace()
124 SkipUntil(tok::r_brace, /*StopAtSemi*/false, /*DontConsume*/true); in ParseNamespace()
128 if (!rBraceToken.is(tok::r_brace)) { in ParseNamespace()
[all …]
DParser.cpp39 Tok.setKind(tok::eof); in Parser()
89 if (Tok.is(tok::eof)) { in print()
137 static bool IsCommonTypo(tok::TokenKind ExpectedTok, const Token &Tok) { in IsCommonTypo()
139 case tok::semi: return Tok.is(tok::colon); // : for ; in IsCommonTypo()
150 bool Parser::ExpectAndConsume(tok::TokenKind ExpectedTok, unsigned DiagID, in ExpectAndConsume()
151 const char *Msg, tok::TokenKind SkipToTok) { in ExpectAndConsume()
152 if (Tok.is(ExpectedTok) || Tok.is(tok::code_completion)) { in ExpectAndConsume()
173 (Spelling = tok::getTokenSimpleSpelling(ExpectedTok))) { in ExpectAndConsume()
181 if (SkipToTok != tok::unknown) in ExpectAndConsume()
187 if (Tok.is(tok::semi) || Tok.is(tok::code_completion)) { in ExpectAndConsumeSemi()
[all …]
DParseInit.cpp32 case tok::period: // designator: '.' identifier in MayBeDesignationStart()
35 case tok::l_square: { // designator: array-designator in MayBeDesignationStart()
43 case tok::equal: in MayBeDesignationStart()
44 case tok::r_square: in MayBeDesignationStart()
48 case tok::amp: in MayBeDesignationStart()
49 case tok::kw_this: in MayBeDesignationStart()
50 case tok::identifier: in MayBeDesignationStart()
64 case tok::identifier: // designation: identifier ':' in MayBeDesignationStart()
65 return PP.LookAhead(0).is(tok::colon); in MayBeDesignationStart()
74 case tok::equal: in MayBeDesignationStart()
[all …]
DParseCXXInlineMethods.cpp32 assert((Tok.is(tok::l_brace) || Tok.is(tok::colon) || Tok.is(tok::kw_try) || in ParseCXXInlineMethodDef()
33 Tok.is(tok::equal)) && in ParseCXXInlineMethodDef()
66 if (Tok.is(tok::equal)) { in ParseCXXInlineMethodDef()
70 SkipUntil(tok::semi); in ParseCXXInlineMethodDef()
76 if (Tok.is(tok::kw_delete)) { in ParseCXXInlineMethodDef()
84 } else if (Tok.is(tok::kw_default)) { in ParseCXXInlineMethodDef()
95 if (Tok.is(tok::comma)) { in ParseCXXInlineMethodDef()
98 SkipUntil(tok::semi); in ParseCXXInlineMethodDef()
100 ExpectAndConsume(tok::semi, diag::err_expected_semi_after, in ParseCXXInlineMethodDef()
101 Delete ? "delete" : "default", tok::semi); in ParseCXXInlineMethodDef()
[all …]
DParseStmt.cpp110 tok::TokenKind Kind = Tok.getKind(); in ParseStatementOrDeclarationAfterAttributes()
113 case tok::at: // May be a @try or @throw statement in ParseStatementOrDeclarationAfterAttributes()
120 case tok::code_completion: in ParseStatementOrDeclarationAfterAttributes()
125 case tok::identifier: { in ParseStatementOrDeclarationAfterAttributes()
127 if (Next.is(tok::colon)) { // C99 6.8.1: labeled-statement in ParseStatementOrDeclarationAfterAttributes()
132 if (Next.isNot(tok::coloncolon)) { in ParseStatementOrDeclarationAfterAttributes()
147 if (Name->getTokenID() != tok::identifier) { in ParseStatementOrDeclarationAfterAttributes()
160 SkipUntil(tok::r_brace, /*StopAtSemi=*/true, /*DontConsume=*/true); in ParseStatementOrDeclarationAfterAttributes()
161 if (Tok.is(tok::semi)) in ParseStatementOrDeclarationAfterAttributes()
171 Tok.setKind(tok::annot_typename); in ParseStatementOrDeclarationAfterAttributes()
[all …]
DParsePragma.cpp26 assert(Tok.is(tok::annot_pragma_unused)); in HandlePragmaUnused()
33 assert(Tok.is(tok::annot_pragma_vis)); in HandlePragmaVisibility()
49 assert(Tok.is(tok::annot_pragma_pack)); in HandlePragmaPack()
75 if (Tok.isNot(tok::l_paren)) { in HandlePragma()
88 if (Tok.isNot(tok::r_paren)) { in HandlePragma()
99 if (Tok.isNot(tok::eod)) { in HandlePragma()
107 Toks[0].setKind(tok::annot_pragma_vis); in HandlePragma()
126 if (Tok.isNot(tok::l_paren)) { in HandlePragma()
136 if (Tok.is(tok::numeric_constant)) { in HandlePragma()
148 } else if (Tok.is(tok::identifier)) { in HandlePragma()
[all …]
/external/svox/pico/lib/
Dpicotok.c270 static void tok_treatMarkupAsSimpleToken (picodata_ProcessingUnit this, tok_subobj_t * tok);
271 static void tok_treatChar (picodata_ProcessingUnit this, tok_subobj_t * tok, picoos_uchar ch, picoo…
272 static void tok_treatMarkup (picodata_ProcessingUnit this, tok_subobj_t * tok);
273 static void tok_putToMarkup (picodata_ProcessingUnit this, tok_subobj_t * tok, picoos_uchar str[]);
274 static void tok_treatSimpleToken (picodata_ProcessingUnit this, tok_subobj_t * tok);
318 static void tok_startIgnore (tok_subobj_t * tok) in tok_startIgnore() argument
320 tok->ignLevel++; in tok_startIgnore()
324 static void tok_endIgnore (tok_subobj_t * tok) in tok_endIgnore() argument
326 if (tok->ignLevel > 0) { in tok_endIgnore()
327 tok->ignLevel--; in tok_endIgnore()
[all …]
/external/clang/lib/Lex/
DTokenConcatenation.cpp73 TokenInfo[tok::identifier ] |= aci_custom; in TokenConcatenation()
74 TokenInfo[tok::numeric_constant] |= aci_custom_firstchar; in TokenConcatenation()
75 TokenInfo[tok::period ] |= aci_custom_firstchar; in TokenConcatenation()
76 TokenInfo[tok::amp ] |= aci_custom_firstchar; in TokenConcatenation()
77 TokenInfo[tok::plus ] |= aci_custom_firstchar; in TokenConcatenation()
78 TokenInfo[tok::minus ] |= aci_custom_firstchar; in TokenConcatenation()
79 TokenInfo[tok::slash ] |= aci_custom_firstchar; in TokenConcatenation()
80 TokenInfo[tok::less ] |= aci_custom_firstchar; in TokenConcatenation()
81 TokenInfo[tok::greater ] |= aci_custom_firstchar; in TokenConcatenation()
82 TokenInfo[tok::pipe ] |= aci_custom_firstchar; in TokenConcatenation()
[all …]
DPPExpressions.cpp91 if (PeekTok.is(tok::l_paren)) { in EvaluateDefined()
97 if (PeekTok.is(tok::code_completion)) { in EvaluateDefined()
130 if (PeekTok.isNot(tok::r_paren)) { in EvaluateDefined()
162 if (PeekTok.is(tok::code_completion)) { in EvaluateValue()
183 Result.Val = II->getTokenID() == tok::kw_true; in EvaluateValue()
194 case tok::eod: in EvaluateValue()
195 case tok::r_paren: in EvaluateValue()
199 case tok::numeric_constant: { in EvaluateValue()
254 case tok::char_constant: // 'x' in EvaluateValue()
255 case tok::wide_char_constant: { // L'x' in EvaluateValue()
[all …]
DPPDirectives.cpp91 assert(Tmp.isNot(tok::eof) && "EOF seen while discarding directive tokens"); in DiscardUntilEndOfDirective()
92 } while (Tmp.isNot(tok::eod)); in DiscardUntilEndOfDirective()
104 if (MacroNameTok.is(tok::code_completion)) { in ReadMacroName()
112 if (MacroNameTok.is(tok::eod)) { in ReadMacroName()
139 } else if (isDefineUndef && II->getPPKeywordID() == tok::pp_defined) { in ReadMacroName()
156 MacroNameTok.setKind(tok::eod); in ReadMacroName()
175 while (Tmp.is(tok::comment)) // Skip comments in -C mode. in CheckEndOfDirective()
178 if (Tmp.isNot(tok::eod)) { in CheckEndOfDirective()
224 if (Tok.is(tok::code_completion)) { in SkipExcludedConditionalBlock()
232 if (Tok.is(tok::eof)) { in SkipExcludedConditionalBlock()
[all …]
DLexer.cpp46 bool Token::isObjCAtKeyword(tok::ObjCKeywordKind objcKey) const { in isObjCAtKeyword()
53 tok::ObjCKeywordKind Token::getObjCKeywordID() const { in getObjCKeywordID()
55 return specId ? specId->getObjCKeywordID() : tok::objc_not_keyword; in getObjCKeywordID()
337 if (Tok.is(tok::raw_identifier)) in getSpelling()
475 } while (TheTok.getKind() != tok::eof); in getBeginningOfFileToken()
546 if (TheTok.getKind() == tok::eof) { in ComputePreamble()
572 if (TheTok.getKind() == tok::comment) in ComputePreamble()
575 if (TheTok.isAtStartOfLine() && TheTok.getKind() == tok::hash) { in ComputePreamble()
584 if (TheTok.getKind() == tok::raw_identifier && !TheTok.needsCleaning()) { in ComputePreamble()
1277 tok::TokenKind TKind, in findLocationAfterToken()
[all …]
/external/expat/lib/
Dxmlrole.c102 int tok,
125 static int FASTCALL common(PROLOG_STATE *state, int tok);
129 int tok, in prolog0() argument
134 switch (tok) { in prolog0()
161 return common(state, tok); in prolog0()
166 int tok, in prolog1() argument
171 switch (tok) { in prolog1()
192 return common(state, tok); in prolog1()
197 int tok, in prolog2() argument
202 switch (tok) { in prolog2()
[all …]
/external/libxml2/
Dthreads.c190 xmlMutexPtr tok; in xmlNewMutex() local
192 if ((tok = malloc(sizeof(xmlMutex))) == NULL) in xmlNewMutex()
196 pthread_mutex_init(&tok->lock, NULL); in xmlNewMutex()
198 tok->mutex = CreateMutex(NULL, FALSE, NULL); in xmlNewMutex()
200 if ((tok->sem = create_sem(1, "xmlMutex")) < B_OK) { in xmlNewMutex()
201 free(tok); in xmlNewMutex()
204 tok->tid = -1; in xmlNewMutex()
206 return (tok); in xmlNewMutex()
217 xmlFreeMutex(xmlMutexPtr tok) in xmlFreeMutex() argument
219 if (tok == NULL) in xmlFreeMutex()
[all …]
/external/clang/include/clang/Lex/
DToken.h82 tok::TokenKind getKind() const { return (tok::TokenKind)Kind; } in getKind()
83 void setKind(tok::TokenKind K) { Kind = K; } in setKind()
87 bool is(tok::TokenKind K) const { return Kind == (unsigned) K; } in is()
88 bool isNot(tok::TokenKind K) const { return Kind != (unsigned) K; } in isNot()
93 return is(tok::identifier) || is(tok::raw_identifier); in isAnyIdentifier()
99 return is(tok::numeric_constant) || is(tok::char_constant) || in isLiteral()
100 is(tok::wide_char_constant) || is(tok::utf16_char_constant) || in isLiteral()
101 is(tok::utf32_char_constant) || is(tok::string_literal) || in isLiteral()
102 is(tok::wide_string_literal) || is(tok::utf8_string_literal) || in isLiteral()
103 is(tok::utf16_string_literal) || is(tok::utf32_string_literal) || in isLiteral()
[all …]
/external/clang/lib/ARCMigrate/
DTransforms.cpp99 Token tok; in findSemiAfterLocation() local
100 lexer.LexFromRawLexer(tok); in findSemiAfterLocation()
101 if (tok.isNot(tok::semi)) in findSemiAfterLocation()
104 return tok.getLocation(); in findSemiAfterLocation()
345 Token tok; in rewritePropertyAttribute() local
346 lexer.LexFromRawLexer(tok); in rewritePropertyAttribute()
347 if (tok.isNot(tok::at)) return false; in rewritePropertyAttribute()
348 lexer.LexFromRawLexer(tok); in rewritePropertyAttribute()
349 if (tok.isNot(tok::raw_identifier)) return false; in rewritePropertyAttribute()
350 if (StringRef(tok.getRawIdentifierData(), tok.getLength()) in rewritePropertyAttribute()
[all …]
/external/icu4c/i18n/
Ducol_bld.cpp327 UColToken *tok = lh->first; in ucol_inv_getGapPositions() local
328 uint32_t tokStrength = tok->strength; in ucol_inv_getGapPositions()
379 lh->fStrToken[tokStrength] = tok; in ucol_inv_getGapPositions()
386 while(tok != NULL && tok->strength >= tokStrength) { in ucol_inv_getGapPositions()
388 lh->lStrToken[tokStrength] = tok; in ucol_inv_getGapPositions()
390 tok = tok->next; in ucol_inv_getGapPositions()
401 if(tok != NULL) { in ucol_inv_getGapPositions()
402 tokStrength = tok->strength; in ucol_inv_getGapPositions()
448 static uint32_t ucol_getSimpleCEGenerator(ucolCEGenerator *g, UColToken *tok, uint32_t strength, UE… in ucol_getSimpleCEGenerator() argument
463 if(tok->next != NULL && tok->next->strength == strength) { in ucol_getSimpleCEGenerator()
[all …]
/external/tcpdump/
Dgmpls.h17 extern struct tok gmpls_link_prot_values[];
18 extern struct tok gmpls_switch_cap_values[];
19 extern struct tok gmpls_encoding_values[];
20 extern struct tok gmpls_payload_values[];
21 extern struct tok diffserv_te_bc_values[];
22 extern struct tok lmp_sd_service_config_cpsa_link_type_values[];
23 extern struct tok lmp_sd_service_config_cpsa_signal_type_sdh_values[];
24 extern struct tok lmp_sd_service_config_cpsa_signal_type_sonet_values[];
Dgmpls.c30 struct tok gmpls_link_prot_values[] = {
43 struct tok gmpls_switch_cap_values[] = {
56 struct tok gmpls_encoding_values[] = {
72 struct tok gmpls_payload_values[] = {
140 struct tok lmp_sd_service_config_cpsa_link_type_values[] = {
151 struct tok lmp_sd_service_config_cpsa_signal_type_sdh_values[] = {
168 struct tok lmp_sd_service_config_cpsa_signal_type_sonet_values[] = {
184 struct tok diffserv_te_bc_values[] = {
/external/nist-sip/java/gov/nist/javax/sip/parser/
DServerParser.java81 String tok; in parse() local
85 tok = this.lexer.getString('/'); in parse()
87 if (tok.charAt(tok.length() - 1) == '\n') in parse()
88 tok = tok.trim(); in parse()
89 server.addProductToken(tok); in parse()
92 tok = this.lexer.getRest().trim(); in parse()
93 server.addProductToken(tok); in parse()

1234567891011