• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/Libc-1044.1.2/regex/TRE/lib/

Lines Matching +refs:lm +refs:tree

73 static void print_last_matched_pre(tre_last_matched_pre_t *lm, int indent,
121 print_last_matched_pre(tre_last_matched_pre_t *lm, int indent, int num_tags)
123 tre_last_matched_branch_pre_t *b = lm->branches;
134 lm->tot_branches, lm->tot_last_matched, lm->tot_tags));
136 DPRINT(("..start_tag=%d n_branches=%d branches=%d\n", lm->start_tag,
137 lm->n_branches, n_branches));
138 if (lm->n_branches != n_branches)
141 b = lm->branches;
150 static void print_last_matched(tre_last_matched_t *lm, int indent);
182 print_last_matched(tre_last_matched_t *lm, int indent)
188 DPRINT(("LAST_MATCHED: n_branches=%d start_tag=%d\n", lm->n_branches,
189 lm->start_tag));
191 b = lm->branches;
193 for (i = lm->n_branches; i > 0; i--, b++)
273 /* Inserts a catenation node to the root of the tree given in `node'.
304 /* Inserts a catenation node to the root of the tree given in `node'.
388 /* Adds tags to appropriate locations in the parse tree in `tree', so that
391 tre_add_tags(tre_mem_t mem, tre_stack_t *stack, tre_ast_node_t *tree,
396 tre_ast_node_t *node = tree; /* Tree node we are currently looking at. */
750 /* For the top union, walk the tree of consecutive unions,
1433 STACK_PUSH(stack, voidptr, tree);
1486 if (tree->last_matched_branch)
1500 print_last_match_branch_pre(tree->last_matched_branch, 0, num_tags);
1503 tree->last_matched_branch->tot_branches
1505 tree->last_matched_branch->tot_last_matched
1507 tree->last_matched_branch->tot_tags *
1517 tree->last_matched_branch->tot_branches);
1518 t = (int *)(u + tree->last_matched_branch->tot_last_matched);
1525 STACK_PUSH(stack, voidptr, tree->last_matched_branch);
1606 if (b != _b + tree->last_matched_branch->tot_branches)
1607 DPRINT(("b/%p != _b + tree->last_matched_branch->tot_branches/%p\n",
1608 b, _b + tree->last_matched_branch->tot_branches));
1609 if (u != _u + tree->last_matched_branch->tot_last_matched)
1611 "tree->last_matched_branch->tot_last_matched/%p\n",
1612 u, _u + tree->last_matched_branch->tot_last_matched));
1613 if (t != _t + tree->last_matched_branch->tot_tags)
1614 DPRINT(("t/%p != _t + tree->last_matched_branch->tot_tags/%p\n",
1615 t, _t + tree->last_matched_branch->tot_tags));
1628 tre_ast_print(tree);
1630 DPRINT(("tre_add_tags: tree->num_tags=%d num_tags=%d\n", tree->num_tags,
1632 assert(tree->num_tags == num_tags);
2245 /* Walk through the tree recursively. */
2345 the nodes of the AST `tree'. */
2347 tre_compute_nfl(tre_mem_t mem, tre_stack_t *stack, tre_ast_node_t *tree)
2351 STACK_PUSHR(stack, voidptr, tree);
2878 /* Converts the syntax tree to a TNFA. All the transitions in the TNFA are
2954 tre_ast_node_t *tree, *tmp_ast_l, *tmp_ast_r;
3001 tree = parse_ctx.result;
3009 tre_ast_print(tree);
3035 errcode = tre_add_tags(NULL, stack, tree, tnfa);
3039 tre_ast_print(tree);
3069 errcode = tre_add_tags(mem, stack, tree, tnfa);
3083 errcode = tre_expand_ast(mem, stack, tree, &parse_ctx.position,
3092 tmp_ast_l = tree;
3097 tree = tre_ast_new_catenation(mem, tmp_ast_l, tmp_ast_r);
3098 if (tree == NULL)
3102 tre_ast_print(tree);
3113 errcode = tre_compute_nfl(mem, stack, tree);
3127 tre_ast_to_tnfa(tree, NULL, counts, NULL);
3143 errcode = tre_ast_to_tnfa(tree, transitions, counts, offs);
3159 for (p = tree->firstpos; p->position >= 0; p++)
3201 for (p = tree->firstpos; scanning && p->position >= 0; p++)
3226 p = tree->firstpos;
3268 for (p = tree->firstpos; p->position >= 0; p++)
3299 tnfa->final = transitions + offs[tree->lastpos[0].position];
3303 DPRINT(("final state %d (%p)\n", tree->lastpos[0].position,