Home
last modified time | relevance | path

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

12345678910>>...13

/openbsd/src/lib/libedit/
Dtokenizer.c87 static void FUN(tok,finish)(TYPE(Tokenizer) *);
94 FUN(tok,finish)(TYPE(Tokenizer) *tok) in FUN() argument
97 *tok->wptr = '\0'; in FUN()
98 if ((tok->flags & TOK_KEEP) || tok->wptr != tok->wstart) { in FUN()
99 tok->argv[tok->argc++] = tok->wstart; in FUN()
100 tok->argv[tok->argc] = NULL; in FUN()
101 tok->wstart = ++tok->wptr; in FUN()
103 tok->flags &= ~TOK_KEEP; in FUN()
111 FUN(tok,init)(const Char *ifs) in TYPE()
113 TYPE(Tokenizer) *tok = malloc(sizeof(TYPE(Tokenizer))); in TYPE()
[all …]
/openbsd/src/gnu/llvm/clang/lib/Parse/
DParseTentative.cpp55 case tok::kw_asm: in isCXXDeclarationStatement()
57 case tok::kw_namespace: in isCXXDeclarationStatement()
60 case tok::kw_using: in isCXXDeclarationStatement()
62 case tok::kw_static_assert: in isCXXDeclarationStatement()
63 case tok::kw__Static_assert: in isCXXDeclarationStatement()
65 case tok::identifier: { in isCXXDeclarationStatement()
75 case tok::identifier: { in isCXXDeclarationStatement()
89 case tok::kw_operator: in isCXXDeclarationStatement()
91 case tok::annot_cxxscope: // Check if this is a dtor. in isCXXDeclarationStatement()
92 if (NextToken().is(tok::tilde)) in isCXXDeclarationStatement()
[all …]
DParseObjc.cpp29 void Parser::MaybeSkipAttributes(tok::ObjCKeywordKind Kind) { in MaybeSkipAttributes()
31 if (Tok.is(tok::kw___attribute)) { in MaybeSkipAttributes()
32 if (Kind == tok::objc_interface || Kind == tok::objc_protocol) in MaybeSkipAttributes()
34 << (Kind == tok::objc_protocol); in MaybeSkipAttributes()
56 if (Tok.is(tok::code_completion)) { in ParseObjCAtDirectives()
63 case tok::objc_interface: in ParseObjCAtDirectives()
64 case tok::objc_protocol: in ParseObjCAtDirectives()
65 case tok::objc_implementation: in ParseObjCAtDirectives()
76 case tok::objc_class: in ParseObjCAtDirectives()
78 case tok::objc_interface: in ParseObjCAtDirectives()
[all …]
DParseDecl.cpp164 assert(Tok.is(tok::kw___attribute) && "Not a GNU attribute list!"); in ParseGNUAttributes()
169 while (Tok.is(tok::kw___attribute)) { in ParseGNUAttributes()
174 if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after, in ParseGNUAttributes()
176 SkipUntil(tok::r_paren, StopAtSemi); // skip until ) or ; in ParseGNUAttributes()
179 if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after, "(")) { in ParseGNUAttributes()
180 SkipUntil(tok::r_paren, StopAtSemi); // skip until ) or ; in ParseGNUAttributes()
186 while (TryConsumeToken(tok::comma)) in ParseGNUAttributes()
192 if (Tok.is(tok::code_completion)) { in ParseGNUAttributes()
203 if (Tok.isNot(tok::l_paren)) { in ParseGNUAttributes()
231 ConsumeAndStoreUntil(tok::r_paren, LA->Toks, /*StopAtSemi=*/true); in ParseGNUAttributes()
[all …]
DParseExpr.cpp154 LHS = Actions.ActOnUnaryOp(getCurScope(), ExtLoc, tok::kw___extension__, in ParseExpressionWithLeadingExtension()
162 if (Tok.is(tok::code_completion)) { in ParseAssignmentExpression()
169 if (Tok.is(tok::kw_throw)) in ParseAssignmentExpression()
171 if (Tok.is(tok::kw_co_yield)) in ParseAssignmentExpression()
294 Tok.isOneOf(tok::period, tok::plusplus, tok::minusminus) || in ParseConstraintLogicalAndExpression()
295 (Tok.is(tok::l_square) && !NextToken().is(tok::l_square))) { in ParseConstraintLogicalAndExpression()
320 while (Tok.is(tok::ampamp)) { in ParseConstraintLogicalAndExpression()
328 tok::ampamp, LHS.get(), RHS.get()); in ParseConstraintLogicalAndExpression()
354 while (Tok.is(tok::pipepipe)) { in ParseConstraintLogicalOrExpression()
363 tok::pipepipe, LHS.get(), RHS.get()); in ParseConstraintLogicalOrExpression()
[all …]
DParseTemplate.cpp43 if (Tok.is(tok::kw_template) && NextToken().isNot(tok::less)) { in ParseDeclarationStartingWithTemplate()
78 assert(Tok.isOneOf(tok::kw_export, tok::kw_template) && in ParseTemplateDeclarationOrSpecialization()
117 TryConsumeToken(tok::kw_export, ExportLoc); in ParseTemplateDeclarationOrSpecialization()
121 if (!TryConsumeToken(tok::kw_template, TemplateLoc)) { in ParseTemplateDeclarationOrSpecialization()
133 SkipUntil(tok::r_brace, StopAtSemi | StopBeforeMatch); in ParseTemplateDeclarationOrSpecialization()
134 TryConsumeToken(tok::semi); in ParseTemplateDeclarationOrSpecialization()
143 if (TryConsumeToken(tok::kw_requires)) { in ParseTemplateDeclarationOrSpecialization()
149 SkipUntil(tok::r_brace, StopAtSemi | StopBeforeMatch); in ParseTemplateDeclarationOrSpecialization()
150 TryConsumeToken(tok::semi); in ParseTemplateDeclarationOrSpecialization()
161 } while (Tok.isOneOf(tok::kw_export, tok::kw_template)); in ParseTemplateDeclarationOrSpecialization()
[all …]
DParseCXXInlineMethods.cpp29 assert(Tok.isOneOf(tok::l_brace, tok::colon, tok::kw_try, tok::equal) && in ParseCXXInlineMethodDef()
57 if (TryConsumeToken(tok::equal)) { in ParseCXXInlineMethodDef()
59 SkipUntil(tok::semi); in ParseCXXInlineMethodDef()
66 if (TryConsumeToken(tok::kw_delete, KWLoc)) { in ParseCXXInlineMethodDef()
76 } else if (TryConsumeToken(tok::kw_default, KWLoc)) { in ParseCXXInlineMethodDef()
89 if (Tok.is(tok::comma)) { in ParseCXXInlineMethodDef()
92 SkipUntil(tok::semi); in ParseCXXInlineMethodDef()
93 } else if (ExpectAndConsume(tok::semi, diag::err_expected_after, in ParseCXXInlineMethodDef()
95 SkipUntil(tok::semi); in ParseCXXInlineMethodDef()
138 tok::TokenKind kind = Tok.getKind(); in ParseCXXInlineMethodDef()
[all …]
DParseDeclCXX.cpp64 assert(Tok.is(tok::kw_namespace) && "Not a namespace!"); in ParseNamespace()
68 if (Tok.is(tok::code_completion)) { in ParseNamespace()
85 if (Tok.is(tok::kw___attribute)) { in ParseNamespace()
102 if (Tok.is(tok::identifier)) { in ParseNamespace()
105 while (Tok.is(tok::coloncolon) && in ParseNamespace()
106 (NextToken().is(tok::identifier) || in ParseNamespace()
107 (NextToken().is(tok::kw_inline) && in ParseNamespace()
108 GetLookAheadToken(2).is(tok::identifier)))) { in ParseNamespace()
113 if (Tok.is(tok::kw_inline)) { in ParseNamespace()
134 if (Tok.is(tok::equal)) { in ParseNamespace()
[all …]
DParseExprCXX.cpp31 static int SelectDigraphErrorMessage(tok::TokenKind Kind) { in SelectDigraphErrorMessage()
34 case tok::unknown: return 0; in SelectDigraphErrorMessage()
36 case tok::kw_addrspace_cast: return 1; in SelectDigraphErrorMessage()
37 case tok::kw_const_cast: return 2; in SelectDigraphErrorMessage()
38 case tok::kw_dynamic_cast: return 3; in SelectDigraphErrorMessage()
39 case tok::kw_reinterpret_cast: return 4; in SelectDigraphErrorMessage()
40 case tok::kw_static_cast: return 5; in SelectDigraphErrorMessage()
56 Token &ColonToken, tok::TokenKind Kind, bool AtDigraph) { in FixDigraph()
70 ColonToken.setKind(tok::coloncolon); in FixDigraph()
73 DigraphToken.setKind(tok::less); in FixDigraph()
[all …]
DParser.cpp58 Tok.setKind(tok::eof); in Parser()
102 static bool IsCommonTypo(tok::TokenKind ExpectedTok, const Token &Tok) { in IsCommonTypo()
104 case tok::semi: in IsCommonTypo()
105 return Tok.is(tok::colon) || Tok.is(tok::comma); // : or , for ; in IsCommonTypo()
110 bool Parser::ExpectAndConsume(tok::TokenKind ExpectedTok, unsigned DiagID, in ExpectAndConsume()
112 if (Tok.is(ExpectedTok) || Tok.is(tok::code_completion)) { in ExpectAndConsume()
123 SourceRange(Loc), tok::getPunctuatorSpelling(ExpectedTok)); in ExpectAndConsume()
140 Spelling = tok::getPunctuatorSpelling(ExpectedTok); in ExpectAndConsume()
157 if (TryConsumeToken(tok::semi)) in ExpectAndConsumeSemi()
160 if (Tok.is(tok::code_completion)) { in ExpectAndConsumeSemi()
[all …]
DParseStmt.cpp138 WantTypeSpecifiers = nextTok.isOneOf(tok::l_paren, tok::less, tok::l_square, in StatementFilterCCC()
139 tok::identifier, tok::star, tok::amp); in StatementFilterCCC()
141 nextTok.isOneOf(tok::l_paren, tok::identifier, tok::arrow, tok::period); in StatementFilterCCC()
143 nextTok.isOneOf(tok::l_paren, tok::semi, tok::identifier, tok::l_brace); in StatementFilterCCC()
150 if (NextToken.is(tok::equal)) in ValidateCandidate()
152 if (NextToken.is(tok::period) && in ValidateCandidate()
179 tok::TokenKind Kind = Tok.getKind(); in ParseStatementOrDeclarationAfterAttributes()
182 case tok::at: // May be a @try or @throw statement in ParseStatementOrDeclarationAfterAttributes()
188 case tok::code_completion: in ParseStatementOrDeclarationAfterAttributes()
193 case tok::identifier: in ParseStatementOrDeclarationAfterAttributes()
[all …]
/openbsd/src/gnu/llvm/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 …]
/openbsd/src/usr.bin/rpcgen/
Drpc_parse.c67 token tok; in get_definition() local
70 get_token(&tok); in get_definition()
71 switch (tok.kind) { in get_definition()
96 scan(TOK_SEMICOLON, &tok); in get_definition()
112 token tok; local
119 scan(TOK_IDENT, &tok);
120 defp->def_name = tok.str;
121 scan(TOK_LBRACE, &tok);
129 scan(TOK_SEMICOLON, &tok);
130 peek(&tok);
[all …]
/openbsd/src/gnu/llvm/clang/lib/Format/
DTokenAnnotator.cpp32 return Line.startsWith(tok::kw_for) || Line.startsWith(tok::kw_if) || in startsWithInitStatement()
33 Line.startsWith(tok::kw_switch); in startsWithInitStatement()
55 if (Left->Previous && Left->Previous->is(tok::greater) && in isLambdaParameterList()
62 return Left->Previous && Left->Previous->is(tok::r_square) && in isLambdaParameterList()
70 return Tok.isOneOf(tok::kw_if, tok::kw_for, tok::kw_while, tok::kw_switch, in isKeywordWithCondition()
71 tok::kw_constexpr, tok::kw_catch); in isKeywordWithCondition()
76 if (!IsCpp || !Tok.startsSequence(tok::l_square, tok::l_square)) in isCppAttribute()
79 if (Tok.Previous && Tok.Previous->is(tok::at)) in isCppAttribute()
86 if (AttrTok->startsSequence(tok::kw_using, tok::identifier, tok::colon)) in isCppAttribute()
88 if (AttrTok->isNot(tok::identifier)) in isCppAttribute()
[all …]
DUnwrappedLineParser.cpp116 return FormatTok.is(tok::comment) && !FormatTok.TokenText.startswith("/*"); in isLineComment()
142 FakeEOF.Tok.setKind(tok::eof); in ScopedMacroState()
294 while (Tokens[Next]->is(tok::comment)) in peekNextToken()
303 bool isEOF() override { return Tokens[Position]->is(tok::eof); } in isEOF()
438 case tok::l_brace: in parseCSharpGenericTypeConstraint()
457 case tok::r_square: in parseCSharpAttribute()
465 case tok::l_square: in parseCSharpAttribute()
481 return Previous && Previous->is(tok::comment) && in precededByCommentOrPPDirective()
515 tok::TokenKind kind = FormatTok->Tok.getKind(); in parseLevel()
517 kind = tok::l_brace; in parseLevel()
[all …]
DFormatTokenLexer.cpp95 } while (Tokens.back()->isNot(tok::eof)); in lex()
112 static const tok::TokenKind NullishCoalescingOperator[] = {tok::question, in tryMergePreviousTokens()
113 tok::question}; in tryMergePreviousTokens()
114 static const tok::TokenKind NullPropagatingOperator[] = {tok::question, in tryMergePreviousTokens()
115 tok::period}; in tryMergePreviousTokens()
116 static const tok::TokenKind FatArrow[] = {tok::equal, tok::greater}; in tryMergePreviousTokens()
122 Tokens.back()->Tok.setKind(tok::pipepipe); in tryMergePreviousTokens()
127 Tokens.back()->Tok.setKind(tok::period); in tryMergePreviousTokens()
135 static const tok::TokenKind CSharpNullConditionalLSquare[] = { in tryMergePreviousTokens()
136 tok::question, tok::l_square}; in tryMergePreviousTokens()
[all …]
DFormatToken.h428 tok::TokenKind ParentBracket = tok::unknown;
535 bool is(tok::TokenKind Kind) const { return Tok.is(Kind); } in is()
540 bool is(tok::PPKeywordKind Kind) const { in is()
557 return is(tok::kw_if) || endsSequence(tok::kw_constexpr, tok::kw_if) ||
558 (endsSequence(tok::identifier, tok::kw_if) && AllowConstexprMacro);
587 bool isStringLiteral() const { return tok::isStringLiteral(Tok.getKind()); } in isStringLiteral()
589 bool isObjCAtKeyword(tok::ObjCKeywordKind Kind) const { in isObjCAtKeyword()
594 if (!isOneOf(tok::kw_public, tok::kw_protected, tok::kw_private))
599 return NextNonComment && NextNonComment->is(tok::colon);
603 return isOneOf(tok::kw_const, tok::kw_restrict, tok::kw_volatile, in canBePointerOrReferenceQualifier()
[all …]
/openbsd/src/gnu/llvm/clang/lib/Basic/
DOperatorPrecedence.cpp17 prec::Level getBinOpPrecedence(tok::TokenKind Kind, bool GreaterThanIsOperator, in getBinOpPrecedence()
20 case tok::greater: in getBinOpPrecedence()
29 case tok::greatergreater: in getBinOpPrecedence()
41 case tok::comma: return prec::Comma; in getBinOpPrecedence()
42 case tok::equal: in getBinOpPrecedence()
43 case tok::starequal: in getBinOpPrecedence()
44 case tok::slashequal: in getBinOpPrecedence()
45 case tok::percentequal: in getBinOpPrecedence()
46 case tok::plusequal: in getBinOpPrecedence()
47 case tok::minusequal: in getBinOpPrecedence()
[all …]
/openbsd/src/gnu/gcc/gcc/treelang/
Dparse.y87 (struct prod_token_parm_item *tok, struct prod_token_parm_item *op1,
182 struct prod_token_parm_item *tok; variable
184 tok = $3;
185 prod = make_production (PROD_VARIABLE_NAME, tok);
186 SYMBOL_TABLE_NAME (prod) = tok;
191 ensure_not_void (NUMERIC_TYPE (prod), tok);
206 &tok->tp.tok.location, tok->tp.tok.length, tok->tp.tok.chars);
215 ((struct prod_token_parm_item *)SYMBOL_TABLE_NAME (prod))->tp.tok.chars,
216 ((struct prod_token_parm_item *)SYMBOL_TABLE_NAME (prod))->tp.tok.length,
220 tok->tp.tok.location);
[all …]
/openbsd/src/gnu/llvm/lldb/source/Plugins/Language/ClangCommon/
DClangHighlighter.cpp55 if (token.is(tok::comment)) { in determineClangStyle()
59 } else if (in_pp_directive || token.getKind() == tok::hash) { in determineClangStyle()
64 } else if (tok::isStringLiteral(token.getKind())) in determineClangStyle()
66 else if (tok::isLiteral(token.getKind())) in determineClangStyle()
72 case tok::raw_identifier: in determineClangStyle()
73 case tok::identifier: in determineClangStyle()
75 case tok::l_brace: in determineClangStyle()
76 case tok::r_brace: in determineClangStyle()
78 case tok::l_square: in determineClangStyle()
79 case tok::r_square: in determineClangStyle()
[all …]
/openbsd/src/gnu/llvm/lldb/source/Plugins/Language/CPlusPlus/
DCPlusPlusNameParser.cpp21 namespace tok = clang::tok;
71 bool CPlusPlusNameParser::ConsumeToken(tok::TokenKind kind) { in ConsumeToken()
112 if (!ConsumeToken(tok::kw_auto) && !ConsumeTypename()) in ParseFunctionImpl()
166 if (!ConsumeToken(tok::l_paren)) in ParseFuncPtr()
180 if (ConsumeToken(tok::r_paren)) in ParseFuncPtr()
209 if (ConsumeToken(tok::r_paren)) in ParseFuncPtr()
220 return ConsumeBrackets(tok::l_paren, tok::r_paren); in ConsumeArguments()
225 if (!HasMoreTokens() || Peek().getKind() != tok::less) in ConsumeTemplateArgs()
240 tok::TokenKind kind = Peek().getKind(); in ConsumeTemplateArgs()
242 case tok::greatergreater: in ConsumeTemplateArgs()
[all …]
/openbsd/src/gnu/usr.bin/gcc/gcc/treelang/
Dparse.y177 struct prod_token_parm_item* tok; variable
179 tok = $3;
180 prod = make_production (PROD_VARIABLE_NAME, tok);
181 SYMBOL_TABLE_NAME (prod) = tok;
185 ensure_not_void (NUMERIC_TYPE (prod), tok);
200 tok->tp.tok.lineno, tok->tp.tok.charno);
201 print_token (stderr, 0, tok);
208 ((struct prod_token_parm_item*)SYMBOL_TABLE_NAME (prod))->tp.tok.chars,
209 ((struct prod_token_parm_item*)SYMBOL_TABLE_NAME (prod))->tp.tok.length,
213 tok->tp.tok.lineno);
[all …]
Dtree1.c262 struct prod_token_parm_item *tok; in lookup_tree_name() local
263 tok = SYMBOL_TABLE_NAME (prod); in lookup_tree_name()
267 if (tok->tp.tok.length != this_tok->tp.tok.length) in lookup_tree_name()
269 if (memcmp (tok->tp.tok.chars, this_tok->tp.tok.chars, this_tok->tp.tok.length)) in lookup_tree_name()
272 fprintf (stderr, "Found symbol %s (%i:%i) as %i \n", tok->tp.tok.chars, in lookup_tree_name()
273 tok->tp.tok.lineno, tok->tp.tok.charno, NUMERIC_TYPE (this)); in lookup_tree_name()
277 fprintf (stderr, "Not found symbol %s (%i:%i) as %i \n", tok->tp.tok.chars, in lookup_tree_name()
278 tok->tp.tok.lineno, tok->tp.tok.charno, tok->type); in lookup_tree_name()
287 struct prod_token_parm_item *tok; in insert_tree_name() local
288 tok = SYMBOL_TABLE_NAME (prod); in insert_tree_name()
[all …]
/openbsd/src/lib/libexpat/lib/
Dxmlrole.c122 typedef int PTRCALL PROLOG_HANDLER(PROLOG_STATE *state, int tok,
138 static int FASTCALL common(PROLOG_STATE *state, int tok);
141 prolog0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in prolog0() argument
143 switch (tok) { in prolog0()
168 return common(state, tok); in prolog0()
172 prolog1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in prolog1() argument
174 switch (tok) { in prolog1()
200 return common(state, tok); in prolog1()
204 prolog2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in prolog2() argument
209 switch (tok) { in prolog2()
[all …]
/openbsd/src/usr.bin/mandoc/
Dmdoc_macro.c206 mdoc_macro(enum roff_tok tok) in mdoc_macro() argument
208 assert(tok >= MDOC_Dd && tok < MDOC_MAX); in mdoc_macro()
209 return mdoc_macros + (tok - MDOC_Dd); in mdoc_macro()
229 mdoc_macro(n->tok)->flags & MDOC_EXPLICIT) in mdoc_endparse()
231 n->line, n->pos, "%s", roff_name[n->tok]); in mdoc_endparse()
296 n->tok); in rew_pending()
297 if (n->tok == MDOC_Ss) in rew_pending()
330 rew_alt(enum roff_tok tok) in rew_alt() argument
332 switch (tok) { in rew_alt()
366 return tok; in rew_alt()
[all …]

12345678910>>...13