Lines Matching defs:tokens
68 struct token *tokens;
122 /* tokens of a rule are sorted/handled in this order */
334 const char *tks_ptr = (char *)rules->tokens;
438 log_debug("dumping %u (%zu bytes) tokens, %u (%zu bytes) strings",
444 dump_token(rules, &rules->tokens[i]);
454 struct token *tokens;
462 tokens = realloc(rules->tokens, (rules->token_max + add ) * sizeof(struct token));
463 if (tokens == NULL)
465 rules->tokens = tokens;
468 memcpy(&rules->tokens[rules->token_cur], token, sizeof(struct token));
1589 /* add tokens to list, sorted by type */
1661 if (rules->tokens[i].type == TK_A_GOTO) {
1662 char *label = rules_str(rules, rules->tokens[i].key.value_off);
1666 if (rules->tokens[j].type != TK_RULE)
1668 if (rules->tokens[j].rule.label_off == 0)
1670 if (!streq(label, rules_str(rules, rules->tokens[j].rule.label_off)))
1672 rules->tokens[i].key.rule_goto = j;
1675 if (rules->tokens[i].key.rule_goto == 0)
1697 rules->tokens = malloc(PREALLOC_TOKEN * sizeof(struct token));
1698 if (rules->tokens == NULL)
1729 log_debug("rules contain %zu bytes tokens (%u * %zu bytes), %zu bytes strings",
1755 free(rules->tokens);
1908 if (rules->tokens == NULL)
1916 cur = &rules->tokens[0];
2605 cur = &rules->tokens[cur->key.rule_goto];
2638 if (rules->tokens == NULL)
2641 cur = &rules->tokens[0];
2680 /* we assure, that the permissions tokens are sorted before the static token */
2780 if (rules->tokens == NULL)
2784 cur = &rules->tokens[0];