Lines Matching defs:position
48 int position;
104 int position;
154 tre_ast_new_literal(tre_mem_t mem, int code_min, int code_max, int position)
165 lit->position = position;
408 /* Current position (number of literal). */
409 int position;
496 lit->position = -1;
597 lit->position = -1;
651 lit->position = -1;
663 lit->position = -1;
693 lit->position = ctx->position;
705 ctx->position++;
845 node = tre_ast_new_literal(ctx->mem, v, v, ctx->position++);
867 node = tre_ast_new_literal(ctx->mem, BACKREF, val, ctx->position++);
880 tmp1 = tre_ast_new_literal(ctx->mem, 0, '\n'-1, ctx->position++);
881 tmp2 = tre_ast_new_literal(ctx->mem, '\n'+1, TRE_CHAR_MAX, ctx->position++);
887 node = tre_ast_new_literal(ctx->mem, 0, TRE_CHAR_MAX, ctx->position++);
926 tmp1 = tre_ast_new_literal(ctx->mem, tre_toupper(wc), tre_toupper(wc), ctx->position);
927 tmp2 = tre_ast_new_literal(ctx->mem, tre_tolower(wc), tre_tolower(wc), ctx->position);
933 node = tre_ast_new_literal(ctx->mem, wc, wc, ctx->position);
935 ctx->position++;
1720 int pos = lit->position;
1725 /* XXX - e.g. [ab] has only one position but two
1836 int *position, tre_tag_direction_t *tag_directions)
1867 lit->position += pos_add;
1868 if (lit->position > max_pos)
1869 max_pos = lit->position;
2007 *position += pos_add_total;
2009 /* `max_pos' should never be larger than `*position' if the above
2011 `*position' is set large enough so enough memory will be
2013 if (max_pos > *position)
2014 *position = max_pos;
2028 new_set[0].position = -1;
2036 tre_set_one(tre_mem_t mem, int position, int code_min, int code_max,
2045 new_set[0].position = position;
2051 new_set[1].position = -1;
2068 for (s1 = 0; set1[s1].position >= 0; s1++);
2069 for (s2 = 0; set2[s2].position >= 0; s2++);
2074 for (s1 = 0; set1[s1].position >= 0; s1++)
2076 new_set[s1].position = set1[s1].position;
2101 for (s2 = 0; set2[s2].position >= 0; s2++)
2103 new_set[s1 + s2].position = set2[s2].position;
2125 new_set[s1 + s2].position = -1;
2271 node->firstpos = tre_set_one(mem, lit->position, 0,
2275 node->lastpos = tre_set_one(mem, lit->position, 0,
2295 /* Literal at position i: nullable = false, firstpos = {i},
2299 tre_set_one(mem, lit->position, (int)lit->code_min,
2303 node->lastpos = tre_set_one(mem, lit->position,
2468 /* Adds a transition from each position in `p1' to each position in `p2'. */
2479 while (p1->position >= 0)
2483 while (p2->position >= 0)
2485 /* Optimization: if this position was already handled, skip it. */
2486 if (p2->position == prev_p2_pos)
2491 prev_p2_pos = p2->position;
2493 position `p1->position'. */
2494 trans = transitions + offs[p1->position];
2498 /* If we find a previous transition from `p1->position' to
2499 `p2->position', it is overwritten. This can happen only
2505 /* XXX - The same position is used for all nodes in a bracket
2509 if (trans->state_id == p2->position)
2523 trans->state = transitions + offs[p2->position];
2524 trans->state_id = p2->position;
2606 while (p1->position >= 0)
2609 while (p2->position >= 0)
2611 counts[p1->position]++;
2647 /* Add a transition from each position in cat->left->lastpos
2648 to each position in cat->right->firstpos. */
2666 /* Add a transition from each last position in the iterated
2667 expression to each first position. */
2788 errcode = tre_expand_ast(mem, stack, tree, &parse_ctx.position,
2798 tmp_ast_r = tre_ast_new_literal(mem, 0, 0, parse_ctx.position++);
2810 counts = xmalloc(sizeof(int) * parse_ctx.position);
2814 offs = xmalloc(sizeof(int) * parse_ctx.position);
2818 for (i = 0; i < parse_ctx.position; i++)
2823 for (i = 0; i < parse_ctx.position; i++)
2843 while (p->position >= 0)
2855 for (p = tree->firstpos; p->position >= 0; p++)
2857 initial[i].state = transitions + offs[p->position];
2858 initial[i].state_id = p->position;
2877 tnfa->final = transitions + offs[tree->lastpos[0].position];
2878 tnfa->num_states = parse_ctx.position;