/external/libedit/src/ |
D | tokenizer.c | 86 private void FUN(tok,finish)(TYPE(Tokenizer) *); 93 FUN(tok,finish)(TYPE(Tokenizer) *tok) in FUN() argument 96 *tok->wptr = '\0'; in FUN() 97 if ((tok->flags & TOK_KEEP) || tok->wptr != tok->wstart) { in FUN() 98 tok->argv[tok->argc++] = tok->wstart; in FUN() 99 tok->argv[tok->argc] = NULL; in FUN() 100 tok->wstart = ++tok->wptr; in FUN() 102 tok->flags &= ~TOK_KEEP; in FUN() 110 FUN(tok,init)(const Char *ifs) in TYPE() 112 TYPE(Tokenizer) *tok = tok_malloc(sizeof(*tok)); in TYPE() [all …]
|
/external/clang/lib/Parse/ |
D | ParseTentative.cpp | 53 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() 149 case tok::kw__Atomic: in TryConsumeDeclarationSpecifier() 150 if (NextToken().isNot(tok::l_paren)) { in TryConsumeDeclarationSpecifier() 155 case tok::kw_typeof: in TryConsumeDeclarationSpecifier() 156 case tok::kw___attribute: in TryConsumeDeclarationSpecifier() 157 case tok::kw___underlying_type: { in TryConsumeDeclarationSpecifier() [all …]
|
D | ParseDecl.cpp | 127 assert(Tok.is(tok::kw___attribute) && "Not a GNU attribute list!"); in ParseGNUAttributes() 129 while (Tok.is(tok::kw___attribute)) { in ParseGNUAttributes() 131 if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after, in ParseGNUAttributes() 133 SkipUntil(tok::r_paren, StopAtSemi); // skip until ) or ; in ParseGNUAttributes() 136 if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after, "(")) { in ParseGNUAttributes() 137 SkipUntil(tok::r_paren, StopAtSemi); // skip until ) or ; in ParseGNUAttributes() 143 if (TryConsumeToken(tok::comma)) in ParseGNUAttributes() 155 if (Tok.isNot(tok::l_paren)) { in ParseGNUAttributes() 179 ConsumeAndStoreUntil(tok::r_paren, LA->Toks, true, false); in ParseGNUAttributes() 187 if (ExpectAndConsume(tok::r_paren)) in ParseGNUAttributes() [all …]
|
D | ParseObjc.cpp | 27 void Parser::MaybeSkipAttributes(tok::ObjCKeywordKind Kind) { in MaybeSkipAttributes() 29 if (Tok.is(tok::kw___attribute)) { in MaybeSkipAttributes() 30 if (Kind == tok::objc_interface || Kind == tok::objc_protocol) in MaybeSkipAttributes() 32 << (Kind == tok::objc_protocol); in MaybeSkipAttributes() 50 if (Tok.is(tok::code_completion)) { in ParseObjCAtDirectives() 58 case tok::objc_class: in ParseObjCAtDirectives() 60 case tok::objc_interface: { in ParseObjCAtDirectives() 65 case tok::objc_protocol: { in ParseObjCAtDirectives() 69 case tok::objc_implementation: in ParseObjCAtDirectives() 71 case tok::objc_end: in ParseObjCAtDirectives() [all …]
|
D | ParseExpr.cpp | 150 LHS = Actions.ActOnUnaryOp(getCurScope(), ExtLoc, tok::kw___extension__, in ParseExpressionWithLeadingExtension() 158 if (Tok.is(tok::code_completion)) { in ParseAssignmentExpression() 164 if (Tok.is(tok::kw_throw)) in ParseAssignmentExpression() 166 if (Tok.is(tok::kw_co_yield)) in ParseAssignmentExpression() 229 tok::TokenKind K = Tok.getKind(); in isNotExpressionStart() 230 if (K == tok::l_brace || K == tok::r_brace || in isNotExpressionStart() 231 K == tok::kw_for || K == tok::kw_while || in isNotExpressionStart() 232 K == tok::kw_if || K == tok::kw_else || in isNotExpressionStart() 233 K == tok::kw_goto || K == tok::kw_try) in isNotExpressionStart() 242 static bool isFoldOperator(tok::TokenKind Kind) { in isFoldOperator() [all …]
|
D | ParseTemplate.cpp | 34 if (Tok.is(tok::kw_template) && NextToken().isNot(tok::less)) { in ParseDeclarationStartingWithTemplate() 65 assert(Tok.isOneOf(tok::kw_export, tok::kw_template) && in ParseTemplateDeclarationOrSpecialization() 105 TryConsumeToken(tok::kw_export, ExportLoc); in ParseTemplateDeclarationOrSpecialization() 109 if (!TryConsumeToken(tok::kw_template, TemplateLoc)) { in ParseTemplateDeclarationOrSpecialization() 120 SkipUntil(tok::r_brace, StopAtSemi | StopBeforeMatch); in ParseTemplateDeclarationOrSpecialization() 121 TryConsumeToken(tok::semi); in ParseTemplateDeclarationOrSpecialization() 136 if (TryConsumeToken(tok::kw_requires)) { in ParseTemplateDeclarationOrSpecialization() 141 SkipUntil(tok::r_brace, StopAtSemi | StopBeforeMatch); in ParseTemplateDeclarationOrSpecialization() 142 TryConsumeToken(tok::semi); in ParseTemplateDeclarationOrSpecialization() 149 } while (Tok.isOneOf(tok::kw_export, tok::kw_template)); in ParseTemplateDeclarationOrSpecialization() [all …]
|
D | ParseCXXInlineMethods.cpp | 32 assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try, tok::equal) && in ParseCXXInlineMethodDef() 59 if (TryConsumeToken(tok::equal)) { in ParseCXXInlineMethodDef() 61 SkipUntil(tok::semi); in ParseCXXInlineMethodDef() 68 if (TryConsumeToken(tok::kw_delete, KWLoc)) { in ParseCXXInlineMethodDef() 78 } else if (TryConsumeToken(tok::kw_default, KWLoc)) { in ParseCXXInlineMethodDef() 91 if (Tok.is(tok::comma)) { in ParseCXXInlineMethodDef() 94 SkipUntil(tok::semi); in ParseCXXInlineMethodDef() 95 } else if (ExpectAndConsume(tok::semi, diag::err_expected_after, in ParseCXXInlineMethodDef() 97 SkipUntil(tok::semi); in ParseCXXInlineMethodDef() 135 tok::TokenKind kind = Tok.getKind(); in ParseCXXInlineMethodDef() [all …]
|
D | ParseDeclCXX.cpp | 61 assert(Tok.is(tok::kw_namespace) && "Not a namespace!"); in ParseNamespace() 65 if (Tok.is(tok::code_completion)) { in ParseNamespace() 87 if (Tok.is(tok::identifier)) { in ParseNamespace() 90 while (Tok.is(tok::coloncolon) && NextToken().is(tok::identifier)) { in ParseNamespace() 102 if (Tok.is(tok::kw___attribute)) { in ParseNamespace() 107 if (Tok.is(tok::equal)) { in ParseNamespace() 109 Diag(Tok, diag::err_expected) << tok::identifier; in ParseNamespace() 111 SkipUntil(tok::semi); in ParseNamespace() 123 BalancedDelimiterTracker T(*this, tok::l_brace); in ParseNamespace() 126 Diag(Tok, diag::err_expected) << tok::l_brace; in ParseNamespace() [all …]
|
D | Parser.cpp | 78 Tok.setKind(tok::eof); in Parser() 123 static bool IsCommonTypo(tok::TokenKind ExpectedTok, const Token &Tok) { in IsCommonTypo() 125 case tok::semi: in IsCommonTypo() 126 return Tok.is(tok::colon) || Tok.is(tok::comma); // : or , for ; in IsCommonTypo() 131 bool Parser::ExpectAndConsume(tok::TokenKind ExpectedTok, unsigned DiagID, in ExpectAndConsume() 133 if (Tok.is(ExpectedTok) || Tok.is(tok::code_completion)) { in ExpectAndConsume() 144 SourceRange(Loc), tok::getPunctuatorSpelling(ExpectedTok)); in ExpectAndConsume() 161 Spelling = tok::getPunctuatorSpelling(ExpectedTok); in ExpectAndConsume() 178 if (TryConsumeToken(tok::semi)) in ExpectAndConsumeSemi() 181 if (Tok.is(tok::code_completion)) { in ExpectAndConsumeSemi() [all …]
|
D | ParseStmt.cpp | 122 WantTypeSpecifiers = nextTok.isOneOf(tok::l_paren, tok::less, tok::l_square, in StatementFilterCCC() 123 tok::identifier, tok::star, tok::amp); in StatementFilterCCC() 125 nextTok.isOneOf(tok::l_paren, tok::identifier, tok::arrow, tok::period); in StatementFilterCCC() 127 nextTok.isOneOf(tok::l_paren, tok::semi, tok::identifier, tok::l_brace); in StatementFilterCCC() 134 if (NextToken.is(tok::equal)) in ValidateCandidate() 136 if (NextToken.is(tok::period) && in ValidateCandidate() 158 tok::TokenKind Kind = Tok.getKind(); in ParseStatementOrDeclarationAfterAttributes() 161 case tok::at: // May be a @try or @throw statement in ParseStatementOrDeclarationAfterAttributes() 168 case tok::code_completion: in ParseStatementOrDeclarationAfterAttributes() 173 case tok::identifier: { in ParseStatementOrDeclarationAfterAttributes() [all …]
|
D | ParseExprCXX.cpp | 28 static int SelectDigraphErrorMessage(tok::TokenKind Kind) { in SelectDigraphErrorMessage() 31 case tok::unknown: return 0; in SelectDigraphErrorMessage() 33 case tok::kw_const_cast: return 1; in SelectDigraphErrorMessage() 34 case tok::kw_dynamic_cast: return 2; in SelectDigraphErrorMessage() 35 case tok::kw_reinterpret_cast: return 3; in SelectDigraphErrorMessage() 36 case tok::kw_static_cast: return 4; in SelectDigraphErrorMessage() 52 Token &ColonToken, tok::TokenKind Kind, bool AtDigraph) { in FixDigraph() 66 ColonToken.setKind(tok::coloncolon); in FixDigraph() 69 DigraphToken.setKind(tok::less); in FixDigraph() 83 if (!Next.is(tok::l_square) || Next.getLength() != 2) in CheckForTemplateAndDigraph() [all …]
|
D | ParseInit.cpp | 32 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() 87 tok::TokenKind Kind = Tok.getKind(); in MayBeDesignationStart() [all …]
|
D | ParseOpenMP.cpp | 90 assert(Tok.is(tok::annot_pragma_openmp) && "Not an OpenMP directive!"); in ParseOpenMPDeclarativeDirective() 103 if (Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclarativeDirective() 106 SkipUntil(tok::annot_pragma_openmp_end, StopBeforeMatch); in ParseOpenMPDeclarativeDirective() 148 SkipUntil(tok::annot_pragma_openmp_end); in ParseOpenMPDeclarativeDirective() 170 assert(Tok.is(tok::annot_pragma_openmp) && "Not an OpenMP directive!"); in ParseOpenMPDeclarativeOrExecutableDirective() 193 if (Tok.isNot(tok::annot_pragma_openmp_end)) { in ParseOpenMPDeclarativeOrExecutableDirective() 196 SkipUntil(tok::annot_pragma_openmp_end, StopBeforeMatch); in ParseOpenMPDeclarativeOrExecutableDirective() 202 SkipUntil(tok::annot_pragma_openmp_end); in ParseOpenMPDeclarativeOrExecutableDirective() 205 if (PP.LookAhead(0).is(tok::l_paren)) { in ParseOpenMPDeclarativeOrExecutableDirective() 247 BalancedDelimiterTracker T(*this, tok::l_paren, in ParseOpenMPDeclarativeOrExecutableDirective() [all …]
|
/external/svox/pico/lib/ |
D | picotok.c | 270 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/ |
D | TokenConcatenation.cpp | 74 TokenInfo[tok::identifier ] |= aci_custom; in TokenConcatenation() 75 TokenInfo[tok::numeric_constant] |= aci_custom_firstchar; in TokenConcatenation() 76 TokenInfo[tok::period ] |= aci_custom_firstchar; in TokenConcatenation() 77 TokenInfo[tok::amp ] |= aci_custom_firstchar; in TokenConcatenation() 78 TokenInfo[tok::plus ] |= aci_custom_firstchar; in TokenConcatenation() 79 TokenInfo[tok::minus ] |= aci_custom_firstchar; in TokenConcatenation() 80 TokenInfo[tok::slash ] |= aci_custom_firstchar; in TokenConcatenation() 81 TokenInfo[tok::less ] |= aci_custom_firstchar; in TokenConcatenation() 82 TokenInfo[tok::greater ] |= aci_custom_firstchar; in TokenConcatenation() 83 TokenInfo[tok::pipe ] |= aci_custom_firstchar; in TokenConcatenation() [all …]
|
D | PPExpressions.cpp | 92 if (PeekTok.is(tok::l_paren)) { in EvaluateDefined() 98 if (PeekTok.is(tok::code_completion)) { in EvaluateDefined() 128 if (PeekTok.isNot(tok::r_paren)) { in EvaluateDefined() 130 << "'defined'" << tok::r_paren; in EvaluateDefined() 131 PP.Diag(LParenLoc, diag::note_matching) << tok::l_paren; in EvaluateDefined() 167 if (PeekTok.is(tok::code_completion)) { in EvaluateValue() 187 II->getTokenID() != tok::kw_true && in EvaluateValue() 188 II->getTokenID() != tok::kw_false) in EvaluateValue() 190 Result.Val = II->getTokenID() == tok::kw_true; in EvaluateValue() 201 case tok::eod: in EvaluateValue() [all …]
|
/external/clang/lib/Format/ |
D | TokenAnnotator.cpp | 39 Contexts.push_back(Context(tok::unknown, 1, /*IsExpression=*/false)); in AnnotatingParser() 49 ScopedContextCreator ContextCreator(*this, tok::less, 10); in parseAngle() 59 Left->Previous && Left->Previous->Tok.isNot(tok::kw_template); in parseAngle() 62 CurrentToken->is(tok::question)) in parseAngle() 66 if (CurrentToken->is(tok::greater)) { in parseAngle() 73 if (CurrentToken->is(tok::question) && in parseAngle() 78 if (CurrentToken->isOneOf(tok::r_paren, tok::r_square, tok::r_brace) || in parseAngle() 79 (CurrentToken->isOneOf(tok::colon, tok::question) && InExprContext)) in parseAngle() 87 if (CurrentToken->Previous->isOneOf(tok::pipepipe, tok::ampamp) && in parseAngle() 90 !Line.startsWith(tok::kw_template)) in parseAngle() [all …]
|
D | UnwrappedLineParser.cpp | 102 FormatTok.Tok.setKind(tok::eof); in getFakeEOF() 270 tok::TokenKind kind = FormatTok->Tok.getKind(); in parseLevel() 272 kind = tok::l_brace; in parseLevel() 274 kind = tok::r_brace; in parseLevel() 278 case tok::comment: in parseLevel() 282 case tok::l_brace: in parseLevel() 290 case tok::r_brace: in parseLevel() 296 case tok::kw_default: in parseLevel() 297 case tok::kw_case: in parseLevel() 322 assert(Tok->Tok.is(tok::l_brace)); in calculateBraceTypes() [all …]
|
/external/clang/lib/Basic/ |
D | OperatorPrecedence.cpp | 18 prec::Level getBinOpPrecedence(tok::TokenKind Kind, bool GreaterThanIsOperator, in getBinOpPrecedence() 21 case tok::greater: in getBinOpPrecedence() 30 case tok::greatergreater: in getBinOpPrecedence() 42 case tok::comma: return prec::Comma; in getBinOpPrecedence() 43 case tok::equal: in getBinOpPrecedence() 44 case tok::starequal: in getBinOpPrecedence() 45 case tok::slashequal: in getBinOpPrecedence() 46 case tok::percentequal: in getBinOpPrecedence() 47 case tok::plusequal: in getBinOpPrecedence() 48 case tok::minusequal: in getBinOpPrecedence() [all …]
|
/external/clang/unittests/AST/ |
D | CommentLexer.cpp | 72 if (Tok.is(tok::eof)) in lexString() 102 ASSERT_EQ(tok::newline, Toks[0].getKind()); in TEST_F() 118 ASSERT_EQ(tok::newline, Toks[0].getKind()); in TEST_F() 119 ASSERT_EQ(tok::newline, Toks[1].getKind()); in TEST_F() 137 ASSERT_EQ(tok::text, Toks[0].getKind()); in TEST_F() 140 ASSERT_EQ(tok::newline, Toks[1].getKind()); in TEST_F() 157 ASSERT_EQ(tok::text, Toks[0].getKind()); in TEST_F() 160 ASSERT_EQ(tok::newline, Toks[1].getKind()); in TEST_F() 161 ASSERT_EQ(tok::newline, Toks[2].getKind()); in TEST_F() 180 ASSERT_EQ(tok::text, Toks[0].getKind()); in TEST_F() [all …]
|
/external/expat/lib/ |
D | xmlrole.c | 102 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/jsmn/ |
D | jsmn_test.c | 117 jsmntok_t tok[10]; in test_primitive() local 122 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_primitive() 123 check(r >= 0 && tok[0].type == JSMN_STRING in test_primitive() 124 && tok[1].type == JSMN_PRIMITIVE); in test_primitive() 125 check(TOKEN_STRING(js, tok[0], "boolVar")); in test_primitive() 126 check(TOKEN_STRING(js, tok[1], "true")); in test_primitive() 130 r = jsmn_parse(&p, js, strlen(js), tok, 10); in test_primitive() 131 check(r >= 0 && tok[0].type == JSMN_STRING in test_primitive() 132 && tok[1].type == JSMN_PRIMITIVE); in test_primitive() 133 check(TOKEN_STRING(js, tok[0], "boolVar")); in test_primitive() [all …]
|
/external/libxml2/ |
D | threads.c | 191 xmlMutexPtr tok; in xmlNewMutex() local 193 if ((tok = malloc(sizeof(xmlMutex))) == NULL) in xmlNewMutex() 197 pthread_mutex_init(&tok->lock, NULL); in xmlNewMutex() 199 tok->mutex = CreateMutex(NULL, FALSE, NULL); in xmlNewMutex() 201 if ((tok->sem = create_sem(1, "xmlMutex")) < B_OK) { in xmlNewMutex() 202 free(tok); in xmlNewMutex() 205 tok->tid = -1; in xmlNewMutex() 207 return (tok); in xmlNewMutex() 218 xmlFreeMutex(xmlMutexPtr tok) in xmlFreeMutex() argument 220 if (tok == NULL) in xmlFreeMutex() [all …]
|
/external/clang/unittests/Lex/ |
D | LexerTest.cpp | 63 ArrayRef<tok::TokenKind> ExpectedTokens) { in CheckLex() 78 Token tok; in CheckLex() local 79 PP.Lex(tok); in CheckLex() 80 if (tok.is(tok::eof)) in CheckLex() 82 toks.push_back(tok); in CheckLex() 115 std::vector<tok::TokenKind> ExpectedTokens; in TEST_F() 116 ExpectedTokens.push_back(tok::identifier); in TEST_F() 117 ExpectedTokens.push_back(tok::l_paren); in TEST_F() 118 ExpectedTokens.push_back(tok::identifier); in TEST_F() 119 ExpectedTokens.push_back(tok::r_paren); in TEST_F() [all …]
|
/external/clang/lib/AST/ |
D | CommentParser.cpp | 100 if (P.Tok.is(tok::newline)) { in addToken() 104 if (P.Tok.isNot(tok::text)) { in addToken() 110 if (P.Tok.isNot(tok::text)) { in addToken() 137 Result.setKind(tok::text); in formTokenWithChars() 312 assert(Tok.is(tok::backslash_command) || Tok.is(tok::at_command)); in parseBlockCommand() 319 Tok.is(tok::backslash_command) ? CMK_Backslash : CMK_At; in parseBlockCommand() 374 else if (Tok.is(tok::newline)) { in parseBlockCommand() 404 assert(Tok.is(tok::backslash_command) || Tok.is(tok::at_command)); in parseInlineCommand() 434 assert(Tok.is(tok::html_start_tag)); in parseHTMLStartTag() 443 case tok::html_ident: { in parseHTMLStartTag() [all …]
|