Home
last modified time | relevance | path

Searched refs:tokens (Results 1 – 25 of 144) sorted by relevance

123456

/freebsd/contrib/ntp/libjsmn/
H A Djsmn.c9 jsmntok_t *tokens, size_t num_tokens) { in jsmn_alloc_token() argument
14 tok = &tokens[parser->toknext++]; in jsmn_alloc_token()
38 size_t len, jsmntok_t *tokens, size_t num_tokens) { in jsmn_parse_primitive() argument
66 if (tokens == NULL) { in jsmn_parse_primitive()
70 token = jsmn_alloc_token(parser, tokens, num_tokens); in jsmn_parse_primitive()
87 size_t len, jsmntok_t *tokens, size_t num_tokens) { in jsmn_parse_string() argument
100 if (tokens == NULL) { in jsmn_parse_string()
103 token = jsmn_alloc_token(parser, tokens, num_tokens); in jsmn_parse_string()
154 jsmntok_t *tokens, unsigned int num_tokens) { in jsmn_parse() argument
168 if (tokens == NULL) { in jsmn_parse()
[all …]
H A Djsmn_test.c86 jsmntok_t tokens[10]; in test_simple() local
91 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_simple()
93 check(TOKEN_EQ(tokens[0], 0, 8, JSMN_OBJECT)); in test_simple()
94 check(TOKEN_EQ(tokens[1], 2, 3, JSMN_STRING)); in test_simple()
95 check(TOKEN_EQ(tokens[2], 6, 7, JSMN_PRIMITIVE)); in test_simple()
97 check(TOKEN_STRING(js, tokens[0], js)); in test_simple()
98 check(TOKEN_STRING(js, tokens[1], "a")); in test_simple()
99 check(TOKEN_STRING(js, tokens[2], "0")); in test_simple()
103 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_simple()
108 r = jsmn_parse(&p, js, strlen(js), tokens, 10); in test_simple()
[all …]
H A DREADME.md51 It holds the following tokens:
57 In jsmn, tokens do not hold any data, but point to token boundaries in JSON
58 string instead. In the example above jsmn will create tokens like: Object
71 Besides start/end positions, jsmn tokens for complex types (like arrays
106 **Note:** Unlike JSON data types, primitive tokens are not divided into
120 int size; // Number of child (nested) tokens
123 **Note:** string tokens point to the first character after
130 jsmntok_t tokens[10];
135 // tokens - an array of tokens available
136 // 10 - number of tokens available
[all …]
/freebsd/crypto/openssl/test/recipes/
H A D02-test_ordinals.t30 my @tokens = split(/(?:\s+|\s*:\s*)/, $line);
32 if ($#tokens < 5 || $#tokens > 6) {
37 if ($tokens[3] eq "NOEXIST") {
42 $newqual = $tokens[4];
44 my $number = $tokens[1];
50 print STDERR "Invalid ordinal detected: ".$tokens[1]."\n";
54 $cnt = $tokens[1];
56 $lastfunc = $tokens[0];
/freebsd/lib/libpmc/pmu-events/
H A Djsmn.c34 jsmntok_t *tokens, size_t num_tokens) in jsmn_alloc_token() argument
40 tok = &tokens[parser->toknext++]; in jsmn_alloc_token()
63 jsmntok_t *tokens, size_t num_tokens) in jsmn_parse_primitive() argument
105 token = jsmn_alloc_token(parser, tokens, num_tokens); in jsmn_parse_primitive()
120 jsmntok_t *tokens, size_t num_tokens) in jsmn_parse_string() argument
133 token = jsmn_alloc_token(parser, tokens, num_tokens); in jsmn_parse_string()
176 jsmntok_t *tokens, unsigned int num_tokens) in jsmn_parse() argument
202 token = jsmn_alloc_token(parser, tokens, num_tokens); in jsmn_parse()
206 tokens[parser->toksuper].size++; in jsmn_parse()
219 token = &tokens[i]; in jsmn_parse()
[all …]
H A Djson.c86 jsmntok_t *tokens; in parse_json() local
95 tokens = malloc(sz); in parse_json()
96 if (!tokens) in parse_json()
99 res = jsmn_parse(&parser, *map, *size, tokens, in parse_json()
107 return tokens; in parse_json()
109 free(tokens); in parse_json()
115 void free_json(char *map, size_t size, jsmntok_t *tokens) in free_json() argument
117 free(tokens); in free_json()
/freebsd/contrib/llvm-project/lld/ELF/
H A DScriptLexer.cpp42 StringRef tok = tokens[pos - 1]; in getLine()
55 StringRef tok = tokens[pos - 1]; in getLineNumber()
79 StringRef tok = tokens[pos - 1]; in getColumnNumber()
159 tokens.insert(tokens.begin() + pos, vec.begin(), vec.end()); in tokenize()
189 bool ScriptLexer::atEOF() { return errorCount() || tokens.size() == pos; } in atEOF()
243 std::vector<StringRef> v = tokenizeExpr(tokens[pos]); in maybeSplitExpr()
246 tokens.erase(tokens.begin() + pos); in maybeSplitExpr()
247 tokens.insert(tokens.begin() + pos, v.begin(), v.end()); in maybeSplitExpr()
259 return tokens[pos++]; in next()
281 if (tokens.size() >= pos + 2 && tokens[pos] == tok && in consumeLabel()
[all …]
/freebsd/contrib/lib9p/pytest/
H A Dprotocol.py1499 tokens = collections.deque(_scan(string))
1501 def get_subscripted(tokens): argument
1507 if len(tokens) == 0 or tokens[0].ttype != 'word':
1509 if len(tokens) > 1 and tokens[1].ttype == 'type':
1510 word = tokens.popleft()
1511 return word, tokens.popleft()
1592 while tokens:
1593 token = tokens.popleft()
1601 if len(tokens) == 0:
1603 cond = tokens.popleft()
[all …]
/freebsd/contrib/mandoc/
H A Dcompat_getsubopt.c39 getsubopt(char **optionp, char * const *tokens, char **valuep) in getsubopt() argument
83 for (cnt = 0; *tokens; ++tokens, ++cnt) in getsubopt()
84 if (!strcmp(suboptarg, *tokens)) in getsubopt()
H A Dtest-getsubopt.c33 char *const tokens[] = { token0, NULL }; in main() local
35 return ! (getsubopt(&options, tokens, &value) == 0 in main()
/freebsd/lib/libc/stdlib/
H A Dgetsubopt.c44 getsubopt(char **optionp, char * const *tokens, char **valuep) in getsubopt() argument
87 for (cnt = 0; *tokens; ++tokens, ++cnt) in getsubopt()
88 if (!strcmp(suboptarg, *tokens)) in getsubopt()
/freebsd/sys/arm64/arm64/
H A Ddisassem.c137 struct arm64_insn_token tokens[ARM64_MAX_TOKEN_CNT]; member
329 memset(tab->tokens[token].name, 0, in arm64_disasm_generate_masks()
330 sizeof(tab->tokens[token].name)); in arm64_disasm_generate_masks()
333 tab->tokens[token].name[i] = *format; in arm64_disasm_generate_masks()
359 tab->tokens[token].pos = a + 1; in arm64_disasm_generate_masks()
360 tab->tokens[token].len = len; in arm64_disasm_generate_masks()
398 if (strcmp(insn->tokens[i].name, token) == 0) { in arm64_disasm_read_token()
399 *val = (opcode >> insn->tokens[i].pos & in arm64_disasm_read_token()
400 ((1 << insn->tokens[i].len) - 1)); in arm64_disasm_read_token()
416 if (strcmp(insn->tokens[i].name, token) == 0) { in arm64_disasm_read_token_sign_ext()
[all …]
/freebsd/contrib/libxo/xolint/
H A Dxolint.pl152 @tokens = parse_tokens();
153 print "token:\n '" . join("'\n '", @tokens) . "'\n"
155 check_format($tokens[0]);
164 my @tokens = ();
189 push @tokens, $current;
221 push @tokens, substr($current, 0, -1);
222 return @tokens;
/freebsd/libexec/nuageinit/
H A Dyaml.lua92 function Parser.new (self, tokens)
93 self.tokens = tokens
104 local tokens = {
158 for i in ipairs(tokens) do
160 if not inline or tokens[i].noinline == nil then
161 captures = {str:match(tokens[i][2])}
166 token = table_clone(tokens[i])
168 local str2 = str:gsub(tokens[i][2], "", 1)
248 return self.tokens[offset + self.current]
253 return self.tokens[self.current]
/freebsd/contrib/dialog/
H A Drc.c266 char *tokens[MAX_TOKEN + 1]; in str_to_attr() local
300 while (tok_count < TableSize(tokens)) { in str_to_attr()
302 tokens[tok_count++] = &tempstr[i]; in str_to_attr()
319 trim_token(&tokens[i]); in str_to_attr()
322 if (UNKNOWN_COLOR == (result->fg = from_color_name(tokens[0])) in str_to_attr()
323 || UNKNOWN_COLOR == (result->bg = from_color_name(tokens[1])) in str_to_attr()
324 || UNKNOWN_COLOR == (result->hilite = from_boolean(tokens[2])) in str_to_attr()
326 || (tok_count >= 4 && (result->ul = from_boolean(tokens[3])) == -1) in str_to_attr()
327 || (tok_count >= 5 && (result->rv = from_boolean(tokens[4])) == -1) in str_to_attr()
/freebsd/contrib/wpa/src/utils/
H A Djson.c209 static struct json_token * json_alloc_token(unsigned int *tokens) in json_alloc_token() argument
211 (*tokens)++; in json_alloc_token()
212 if (*tokens > JSON_MAX_TOKENS) { in json_alloc_token()
227 unsigned int tokens = 0; in json_parse() local
237 token = json_alloc_token(&tokens); in json_parse()
262 token->child = json_alloc_token(&tokens); in json_parse()
302 token = json_alloc_token(&tokens); in json_parse()
353 curr_token->sibling = json_alloc_token(&tokens); in json_parse()
374 token = json_alloc_token(&tokens); in json_parse()
426 token = json_alloc_token(&tokens); in json_parse()
/freebsd/crypto/heimdal/lib/krb5/
H A Dexpand_path.c345 } tokens[] = { variable
390 for (i = 0; i < sizeof(tokens)/sizeof(tokens[0]); i++) { in _expand_token()
391 if (!strncmp(token+2, tokens[i].tok, (token_end - token) - 2)) in _expand_token()
392 return tokens[i].exp_func(context, tokens[i].param, in _expand_token()
393 tokens[i].postfix, ret); in _expand_token()
/freebsd/contrib/openbsm/libbsm/
H A Dbsm_audit.c201 TAILQ_INSERT_TAIL(&rec->token_q, tok, tokens); in au_write()
286 TAILQ_INSERT_HEAD(&rec->token_q, header, tokens); in au_assemble()
287 TAILQ_INSERT_TAIL(&rec->token_q, trailer, tokens); in au_assemble()
292 TAILQ_FOREACH(tok, &rec->token_q, tokens) { in au_assemble()
311 TAILQ_REMOVE(&rec->token_q, tok, tokens); in au_teardown()
/freebsd/contrib/openbsm/bin/auditfilterd/
H A Dauditfilterd.c140 tokenstr_t tokens[MAX_TOKENS]; in present_tokens() local
146 if (au_fetch_tok(&tokens[tokencount], data + bytesread, in present_tokens()
149 bytesread += tokens[tokencount].len; in present_tokens()
155 (am->am_record)(am, ts, tokencount, tokens); in present_tokens()
/freebsd/contrib/ntp/ntpdc/
H A Dntpdc.c1166 char *tokens[1+MAXARGS+MOREARGS+2]; in docmd() local
1182 tokenize(cmdline, tokens, &ntok); in docmd()
1189 i = findcmd(tokens[0], builtins, opcmds, &xcmd); in docmd()
1192 tokens[0]); in docmd()
1196 tokens[0]); in docmd()
1204 pcmd.keyword = tokens[0]; in docmd()
1215 if ((xcmd->arg[i] & OPT) && (*tokens[i+ti] == '>')) in docmd()
1217 rval = getarg(tokens[i+ti], (int)xcmd->arg[i], &pcmd.argval[i]); in docmd()
1232 rval = getarg(tokens[i+ti], (int)(OPT|NTP_STR), &pcmd.argval[i]); in docmd()
1244 if (i < ntok && *tokens[i] == '>') { in docmd()
[all …]
/freebsd/sys/dev/wg/
H A Dwg_cookie.c422 uint64_t bucket, tokens; in ratelimit_allow()
450 * cap the tokens at TOKEN_MAX. If the endpoint has no tokens in ratelimit_allow()
451 * left (that is tokens <= INITIATION_COST) then we block the in ratelimit_allow()
458 tokens = r->r_tokens + diff; in ratelimit_allow()
460 if (tokens > TOKEN_MAX) in ratelimit_allow()
461 tokens = TOKEN_MAX; in ratelimit_allow()
463 if (tokens >= INITIATION_COST) { in ratelimit_allow()
464 r->r_tokens = tokens - INITIATION_COST; in ratelimit_allow()
467 r->r_tokens = tokens; in ratelimit_allow()
423 uint64_t bucket, tokens; ratelimit_allow() local
[all...]
/freebsd/sys/dev/qat/qat_common/
H A Dadf_cfg_section.c33 char **tokens = NULL; in adf_cfg_set_core_number_for_instance() local
46 tokens = malloc(sizeof(char *) * ADF_CFG_MAX_TOKENS, in adf_cfg_set_core_number_for_instance()
51 tokens[i] = in adf_cfg_set_core_number_for_instance()
67 strlcpy(tokens[token_index++], core_val, ADF_CFG_MAX_TOKEN_LEN); in adf_cfg_set_core_number_for_instance()
71 strlcpy(tokens[token_index++], in adf_cfg_set_core_number_for_instance()
78 strlcpy(tokens[token_index++], in adf_cfg_set_core_number_for_instance()
84 pos = strchr(tokens[i], '-'); in adf_cfg_set_core_number_for_instance()
87 ret = compat_strtoul(tokens[i], 10, &start); in adf_cfg_set_core_number_for_instance()
100 ret = compat_strtoul(tokens[i], 10, &core_num); in adf_cfg_set_core_number_for_instance()
119 if (tokens) { in adf_cfg_set_core_number_for_instance()
[all …]
/freebsd/contrib/openbsm/
H A DNEWS52 - Support for Solaris privilege and privilege set tokens.
86 - A bug, introduced in OpenBSM 1.1 alpha 4, in which AUT_RETURN32 tokens
110 - Fix error encoding AUT_IPC_PERM tokens.
123 should be used when generating and interpreting extended socket tokens.
165 errno(2) values for 32-bit and 64-bit return tokens. This is required as
169 size for the token. This bug resulted in "unknown" tokens being printed
170 after the exec args/env tokens.
171 - Support for AUT_SOCKET_EX extended socket tokens, which describe a socket
193 - Add support for extended header tokens, which contain space for information
196 used for setting host information in extended header tokens. The
[all …]
/freebsd/crypto/openssl/external/perl/Text-Template-1.56/lib/Text/
H A DTemplate.pm190 my @tokens;
199 @tokens = split /($DELIM|\n)/, $self->{SOURCE};
202 @tokens = split /(\\\\(?=\\*[{}])|\\[{}]|[{}\n])/, $self->{SOURCE};
212 while (@tokens) {
213 my $t = shift @tokens;
/freebsd/crypto/heimdal/doc/
H A Dapps.texi180 @manpage{afslog,1} will obtains AFS tokens for a number of cells. What cells to get
181 tokens for can either be specified as an explicit list, as file paths to
182 get tokens for, or be left unspecified, in which case will use whatever
187 specified in @manpage{kafs,3} and try to get tokens for these cells
194 local client machine should try to aquire tokens for. It must reside in
226 @section Using 2b tokens with AFS
247 uses a special kvno, 213 for 2b tokens and 255 for Kerberos 5 tokens.
252 @subsection Configuring a Heimdal kdc to use 2b tokens
254 Support for 2b tokens in the kdc are turned on for specific principals

123456