Lines Matching defs:tokens
70 struct token *tokens;
124 /* tokens of a rule are sorted/handled in this order */
336 const char *tks_ptr = (char *)rules->tokens;
440 log_debug("dumping %u (%zu bytes) tokens, %u (%zu bytes) strings",
446 dump_token(rules, &rules->tokens[i]);
456 struct token *tokens;
464 tokens = realloc(rules->tokens, (rules->token_max + add ) * sizeof(struct token));
465 if (tokens == NULL)
467 rules->tokens = tokens;
470 memcpy(&rules->tokens[rules->token_cur], token, sizeof(struct token));
1546 /* add tokens to list, sorted by type */
1618 if (rules->tokens[i].type == TK_A_GOTO) {
1619 char *label = rules_str(rules, rules->tokens[i].key.value_off);
1623 if (rules->tokens[j].type != TK_RULE)
1625 if (rules->tokens[j].rule.label_off == 0)
1627 if (!streq(label, rules_str(rules, rules->tokens[j].rule.label_off)))
1629 rules->tokens[i].key.rule_goto = j;
1632 if (rules->tokens[i].key.rule_goto == 0)
1654 rules->tokens = malloc(PREALLOC_TOKEN * sizeof(struct token));
1655 if (rules->tokens == NULL)
1686 log_debug("rules contain %zu bytes tokens (%u * %zu bytes), %zu bytes strings",
1710 free(rules->tokens);
1862 if (rules->tokens == NULL)
1870 cur = &rules->tokens[0];
2546 cur = &rules->tokens[cur->key.rule_goto];
2579 if (rules->tokens == NULL)
2582 cur = &rules->tokens[0];
2620 /* we assure, that the permissions tokens are sorted before the static token */