/third_party/python/Parser/ |
D | tokenizer.c | 40 static int tok_nextc(struct tok_state *tok); 41 static void tok_backup(struct tok_state *tok, int c); 53 struct tok_state *tok = (struct tok_state *)PyMem_Malloc( in tok_new() local 55 if (tok == NULL) in tok_new() 57 tok->buf = tok->cur = tok->inp = NULL; in tok_new() 58 tok->fp_interactive = 0; in tok_new() 59 tok->interactive_src_start = NULL; in tok_new() 60 tok->interactive_src_end = NULL; in tok_new() 61 tok->start = NULL; in tok_new() 62 tok->end = NULL; in tok_new() [all …]
|
D | pegen_errors.c | 51 int error_lineno = p->tok->parenlinenostack[p->tok->level-1]; in raise_unclosed_parentheses_error() 52 int error_col = p->tok->parencolstack[p->tok->level-1]; in raise_unclosed_parentheses_error() 56 p->tok->parenstack[p->tok->level-1]); in raise_unclosed_parentheses_error() 69 switch (p->tok->done) { in _Pypegen_tokenizer_error() 74 if (p->tok->level) { in _Pypegen_tokenizer_error() 100 col_offset = p->tok->cur - p->tok->buf - 1; in _Pypegen_tokenizer_error() 108 RAISE_ERROR_KNOWN_LOCATION(p, errtype, p->tok->lineno, in _Pypegen_tokenizer_error() 110 p->tok->lineno, -1, msg); in _Pypegen_tokenizer_error() 156 if (p->tok->prompt != NULL) { in _PyPegen_tokenize_full_source_to_check_for_errors() 171 switch (_PyTokenizer_Get(p->tok, &start, &end)) { in _PyPegen_tokenize_full_source_to_check_for_errors() [all …]
|
D | pegen.c | 289 int error_lineno = p->tok->parenlinenostack[p->tok->level-1]; in raise_unclosed_parentheses_error() 290 int error_col = p->tok->parencolstack[p->tok->level-1]; in raise_unclosed_parentheses_error() 294 p->tok->parenstack[p->tok->level-1]); in raise_unclosed_parentheses_error() 347 switch (p->tok->done) { in tokenizer_error() 352 if (p->tok->level) { in tokenizer_error() 378 col_offset = p->tok->cur - p->tok->buf - 1; in tokenizer_error() 386 RAISE_ERROR_KNOWN_LOCATION(p, errtype, p->tok->lineno, in tokenizer_error() 388 p->tok->lineno, -1, msg); in tokenizer_error() 407 if (p->tok->cur == p->tok->buf) { in _PyPegen_raise_error() 410 const char* start = p->tok->buf ? p->tok->line_start : p->tok->buf; in _PyPegen_raise_error() [all …]
|
/third_party/skia/third_party/externals/tint/tools/src/cmd/intrinsic-gen/lexer/ |
D | lexer_test.go | 28 expect tok.Token 32 loc := func(l, c, r int) tok.Location { 33 return tok.Location{Line: l, Column: c, Rune: r, Filepath: filepath} 37 {"ident", tok.Token{Kind: tok.Identifier, Runes: []rune("ident"), Source: tok.Source{ 40 {"ident_123", tok.Token{Kind: tok.Identifier, Runes: []rune("ident_123"), Source: tok.Source{ 43 {"_ident_", tok.Token{Kind: tok.Identifier, Runes: []rune("_ident_"), Source: tok.Source{ 46 {"123456789", tok.Token{Kind: tok.Integer, Runes: []rune("123456789"), Source: tok.Source{ 49 {"match", tok.Token{Kind: tok.Match, Runes: []rune("match"), Source: tok.Source{ 52 {"fn", tok.Token{Kind: tok.Function, Runes: []rune("fn"), Source: tok.Source{ 55 {"type", tok.Token{Kind: tok.Type, Runes: []rune("type"), Source: tok.Source{ [all …]
|
D | lexer.go | 27 func Lex(src []rune, filepath string) ([]tok.Token, error) { 29 tok.Location{Line: 1, Column: 1, Rune: 0, Filepath: filepath}, 31 []tok.Token{}, 40 loc tok.Location 42 tokens []tok.Token 56 l.tok(1, tok.Lt) 58 l.tok(1, tok.Gt) 60 l.tok(1, tok.Lparen) 62 l.tok(1, tok.Rparen) 64 l.tok(1, tok.Lbrace) [all …]
|
/third_party/mesa3d/src/freedreno/ir3/ |
D | ir3_parser.y | 294 int tok; member 326 %token <tok> T_A_LOCALSIZE 327 %token <tok> T_A_CONST 328 %token <tok> T_A_BUF 329 %token <tok> T_A_INVOCATIONID 330 %token <tok> T_A_WGID 331 %token <tok> T_A_NUMWG 332 %token <tok> T_A_BRANCHSTACK 333 %token <tok> T_A_IN 334 %token <tok> T_A_OUT [all …]
|
/third_party/python/Modules/expat/ |
D | xmlrole.c | 121 typedef int PTRCALL PROLOG_HANDLER(PROLOG_STATE *state, int tok, 137 static int FASTCALL common(PROLOG_STATE *state, int tok); 140 prolog0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in prolog0() argument 142 switch (tok) { in prolog0() 167 return common(state, tok); in prolog0() 171 prolog1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in prolog1() argument 173 switch (tok) { in prolog1() 199 return common(state, tok); in prolog1() 203 prolog2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in prolog2() argument 208 switch (tok) { in prolog2() [all …]
|
/third_party/skia/third_party/externals/expat/expat/lib/ |
D | xmlrole.c | 121 typedef int PTRCALL PROLOG_HANDLER(PROLOG_STATE *state, int tok, 137 static int FASTCALL common(PROLOG_STATE *state, int tok); 140 prolog0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in prolog0() argument 142 switch (tok) { in prolog0() 167 return common(state, tok); in prolog0() 171 prolog1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in prolog1() argument 173 switch (tok) { in prolog1() 199 return common(state, tok); in prolog1() 203 prolog2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, in prolog2() argument 208 switch (tok) { in prolog2() [all …]
|
/third_party/skia/third_party/externals/tint/tools/src/cmd/intrinsic-gen/parser/ |
D | parser.go | 40 tokens []tok.Token 53 case tok.Ldeco: 55 case tok.Enum: 60 case tok.Match: 65 case tok.Type: 68 case tok.Function: 82 p.expect(tok.Enum, "enum declaration") 83 name := p.expect(tok.Identifier, "enum name") 85 p.expect(tok.Lbrace, "enum declaration") 86 for p.err == nil && p.match(tok.Rbrace) == nil { [all …]
|
/third_party/selinux/libsepol/cil/src/ |
D | cil_parser.c | 100 struct token tok; in add_hll_linemark() local 103 cil_lexer_next(&tok); in add_hll_linemark() 104 if (tok.type != SYMBOL) { in add_hll_linemark() 108 hll_type = cil_strpool_add(tok.value); in add_hll_linemark() 139 create_node(&node, *current, tok.line, *hll_offset, NULL); in add_hll_linemark() 143 create_node(&node, *current, tok.line, *hll_offset, CIL_KEY_SRC_INFO); in add_hll_linemark() 146 create_node(&node, *current, tok.line, *hll_offset, hll_type); in add_hll_linemark() 149 cil_lexer_next(&tok); in add_hll_linemark() 150 if (tok.type != SYMBOL) { in add_hll_linemark() 155 create_node(&node, *current, tok.line, *hll_offset, cil_strpool_add(tok.value)); in add_hll_linemark() [all …]
|
/third_party/mesa3d/src/freedreno/afuc/ |
D | parser.y | 56 new_instr(int tok) in new_instr() argument 58 instr = next_instr(tok); in new_instr() 116 int tok; member 130 %token <tok> T_OP_NOP 131 %token <tok> T_OP_ADD 132 %token <tok> T_OP_ADDHI 133 %token <tok> T_OP_SUB 134 %token <tok> T_OP_SUBHI 135 %token <tok> T_OP_AND 136 %token <tok> T_OP_OR [all …]
|
D | asm.c | 52 next_instr(int tok) in next_instr() argument 56 ai->tok = tok; in next_instr() 89 tok2alu(int tok) in tok2alu() argument 91 switch (tok) { in tok2alu() 162 switch (ai->tok) { in emit_instructions() 187 assert(ai->tok != T_OP_MSB); in emit_instructions() 193 opc = tok2alu(ai->tok); in emit_instructions() 203 instr.alu.alu = tok2alu(ai->tok); in emit_instructions() 243 if (ai->tok == T_OP_CWRITE) { in emit_instructions() 245 } else if (ai->tok == T_OP_CREAD) { in emit_instructions() [all …]
|
/third_party/skia/third_party/externals/harfbuzz/src/ |
D | hb-buffer-deserialize-text.hh | 422 const char *eof = pe, *tok = nullptr; in _hb_buffer_deserialize_text() local 467 tok = p; in _hb_buffer_deserialize_text() 483 tok, p - tok, in _hb_buffer_deserialize_text() 490 {if (!parse_hex (tok, p, &info.codepoint )) return false; } in _hb_buffer_deserialize_text() 494 { if (!parse_uint (tok, p, &info.cluster )) return false; } in _hb_buffer_deserialize_text() 498 { if (!parse_int (tok, p, &pos.x_offset )) return false; } in _hb_buffer_deserialize_text() 502 { if (!parse_int (tok, p, &pos.y_offset )) return false; } in _hb_buffer_deserialize_text() 506 { if (!parse_int (tok, p, &pos.x_advance)) return false; } in _hb_buffer_deserialize_text() 516 tok = p; in _hb_buffer_deserialize_text() 522 tok = p; in _hb_buffer_deserialize_text() [all …]
|
D | hb-buffer-deserialize-json.hh | 506 const char *tok = nullptr; in _hb_buffer_deserialize_json() local 561 tok = p; in _hb_buffer_deserialize_json() 577 tok, p - tok, in _hb_buffer_deserialize_json() 584 { if (!parse_uint (tok, p, &info.codepoint)) return false; } in _hb_buffer_deserialize_json() 588 { if (!parse_uint (tok, p, &info.cluster )) return false; } in _hb_buffer_deserialize_json() 592 { if (!parse_int (tok, p, &pos.x_offset )) return false; } in _hb_buffer_deserialize_json() 596 { if (!parse_int (tok, p, &pos.y_offset )) return false; } in _hb_buffer_deserialize_json() 600 { if (!parse_int (tok, p, &pos.x_advance)) return false; } in _hb_buffer_deserialize_json() 604 { if (!parse_int (tok, p, &pos.y_advance)) return false; } in _hb_buffer_deserialize_json() 609 tok = p; in _hb_buffer_deserialize_json() [all …]
|
D | hb-buffer-deserialize-text.rl | 51 action tok { 52 tok = p; 61 tok, p - tok, 66 action parse_hexdigits {if (!parse_hex (tok, p, &info.codepoint )) return false; } 68 action parse_cluster { if (!parse_uint (tok, p, &info.cluster )) return false; } 69 action parse_x_offset { if (!parse_int (tok, p, &pos.x_offset )) return false; } 70 action parse_y_offset { if (!parse_int (tok, p, &pos.y_offset )) return false; } 71 action parse_x_advance { if (!parse_int (tok, p, &pos.x_advance)) return false; } 72 action parse_y_advance { if (!parse_int (tok, p, &pos.y_advance)) return false; } 80 glyph = (glyph_id | glyph_name) >tok %parse_glyph; [all …]
|
D | hb-buffer-deserialize-json.rl | 51 action tok { 52 tok = p; 61 tok, p - tok, 66 action parse_codepoint { if (!parse_uint (tok, p, &info.codepoint)) return false; } 67 action parse_cluster { if (!parse_uint (tok, p, &info.cluster )) return false; } 68 action parse_x_offset { if (!parse_int (tok, p, &pos.x_offset )) return false; } 69 action parse_y_offset { if (!parse_int (tok, p, &pos.y_offset )) return false; } 70 action parse_x_advance { if (!parse_int (tok, p, &pos.x_advance)) return false; } 71 action parse_y_advance { if (!parse_int (tok, p, &pos.y_advance)) return false; } 82 parse_glyph_name = (glyph_name >tok %parse_glyph_name); [all …]
|
/third_party/cups-filters/filter/ |
D | banner.c | 64 char *tok; in parse_show() local 66 for (tok = strtok(s, " \t"); tok; tok = strtok(NULL, " \t")) { in parse_show() 67 if (!strcasecmp(tok, "imageable-area")) in parse_show() 69 else if (!strcasecmp(tok, "job-billing")) in parse_show() 71 else if (!strcasecmp(tok, "job-id")) in parse_show() 73 else if (!strcasecmp(tok, "job-name")) in parse_show() 75 else if (!strcasecmp(tok, "job-originating-host-name")) in parse_show() 77 else if (!strcasecmp(tok, "job-originating-user-name")) in parse_show() 79 else if (!strcasecmp(tok, "job-uuid")) in parse_show() 81 else if (!strcasecmp(tok, "options")) in parse_show() [all …]
|
/third_party/curl/lib/ |
D | netrc.c | 87 char *tok; in parsenetrc() local 96 tok = netrcbuffer; in parsenetrc() 97 while(tok) { in parsenetrc() 98 while(ISBLANK(*tok)) in parsenetrc() 99 tok++; in parsenetrc() 101 if(!*tok || (*tok == '#')) in parsenetrc() 106 quoted = (*tok == '\"'); in parsenetrc() 108 tok_end = tok; in parsenetrc() 117 char *store = tok; in parsenetrc() 163 if(strcasecompare("macdef", tok)) { in parsenetrc() [all …]
|
/third_party/vk-gl-cts/external/amber/src/src/ |
D | tokenizer.cc | 93 auto tok = MakeUnique<Token>(TokenType::kString); in NextToken() local 94 tok->SetStringValue(tok_str); in NextToken() 95 return tok; in NextToken() 152 auto tok = MakeUnique<Token>(TokenType::kString); in NextToken() local 153 tok->SetStringValue(tok_str); in NextToken() 154 return tok; in NextToken() 161 auto tok = MakeUnique<Token>(TokenType::kIdentifier); in NextToken() local 163 tok->SetStringValue(str); in NextToken() 165 return tok; in NextToken() 208 auto tok = MakeUnique<Token>(TokenType::kIdentifier); in NextToken() local [all …]
|
/third_party/skia/third_party/externals/spirv-tools/utils/vscode/src/parser/ |
D | parser.go | 178 func (l *lexer) err(tok *Token, msg string, args ...interface{}) { 180 if tok != nil { 181 rng = tok.Range 225 tok := &Token{Type: PIdent, Range: Range{Start: l.pos, End: l.pos}} 238 tok.Range.End = l.pos 239 l.toks = append(l.toks, tok) 246 tok := &Token{Type: Unknown, Range: Range{Start: l.pos, End: l.pos}} 255 switch tok.Type { 257 tok.Type = Ident 259 l.err(tok, "invalid number") [all …]
|
/third_party/spirv-tools/utils/vscode/src/parser/ |
D | parser.go | 178 func (l *lexer) err(tok *Token, msg string, args ...interface{}) { 180 if tok != nil { 181 rng = tok.Range 225 tok := &Token{Type: PIdent, Range: Range{Start: l.pos, End: l.pos}} 238 tok.Range.End = l.pos 239 l.toks = append(l.toks, tok) 246 tok := &Token{Type: Unknown, Range: Range{Start: l.pos, End: l.pos}} 255 switch tok.Type { 257 tok.Type = Ident 259 l.err(tok, "invalid number") [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Tools/utils/vscode/src/parser/ |
D | parser.go | 178 func (l *lexer) err(tok *Token, msg string, args ...interface{}) { 180 if tok != nil { 181 rng = tok.Range 225 tok := &Token{Type: PIdent, Range: Range{Start: l.pos, End: l.pos}} 238 tok.Range.End = l.pos 239 l.toks = append(l.toks, tok) 246 tok := &Token{Type: Unknown, Range: Range{Start: l.pos, End: l.pos}} 255 switch tok.Type { 257 tok.Type = Ident 259 l.err(tok, "invalid number") [all …]
|
/third_party/python/Tools/peg_generator/pegen/ |
D | tokenizer.py | 10 def shorttok(tok: tokenize.TokenInfo) -> str: 34 tok = next(self._tokengen) 35 if tok.type in (tokenize.NL, tokenize.COMMENT): 37 if tok.type == token.ERRORTOKEN and tok.string.isspace(): 39 self._tokens.append(tok) 41 tok = self._tokens[self._index] 45 return tok 50 tok = next(self._tokengen) 51 if tok.type in (tokenize.NL, tokenize.COMMENT): 53 if tok.type == token.ERRORTOKEN and tok.string.isspace(): [all …]
|
D | parser.py | 176 tok = self._tokenizer.peek() 181 tok = self._tokenizer.peek() 182 if tok.type == token.NAME: 188 tok = self._tokenizer.peek() 189 if tok.type == token.NUMBER: 195 tok = self._tokenizer.peek() 196 if tok.type == token.STRING: 202 tok = self._tokenizer.peek() 203 if tok.type == token.OP: 209 tok = self._tokenizer.peek() [all …]
|
/third_party/toybox/toys/pending/ |
D | expr.c | 60 char **tok; // current token, not on the stack since recursive calls mutate it 136 char *tok; member 215 if (!*TT.tok) error_exit("Unexpected end of input"); in eval_expr() 218 if (!strcmp(*TT.tok, "(")) { // parenthesized expression in eval_expr() 219 TT.tok++; // consume ( in eval_expr() 223 if (!*TT.tok) error_exit("Expected )"); in eval_expr() 224 if (strcmp(*TT.tok, ")")) error_exit("Expected ) but got %s", *TT.tok); in eval_expr() 225 } else ret->s = *TT.tok; // simple literal, all values start as strings in eval_expr() 226 TT.tok++; in eval_expr() 230 while (*TT.tok) { in eval_expr() [all …]
|