• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/libxml2-2.7.2/

Lines Matching defs:to

37 #define INT_MAX 123456789 /* easy to flag and big enough for our needs */
58 * Need PREV to check on a '-' within a Character Group. May only be used
66 * macro to flag unimplemented blocks
213 int to;
227 /* knowing states ponting to us can speed things up */
290 int nextbranch; /* the next transition to explore in that state */
401 "failed to compile: %s\n", extra);
413 * @ctxt: the parser context used to build it
456 * Switch to a compact representation
545 * state corresponds to the state type.
563 if ((trans->to == -1) || (trans->atom == NULL))
577 targetno = stateRemap[trans->to];
579 * if the same atom can generate transitions to 2 different
588 printf("Indet: state %d trans %d, atom %d to %d : %d to %d\n",
589 i, j, trans->atom->no, trans->to, atomno, targetno);
590 printf(" previous to is %d\n", prev);
604 printf("State %d trans %d: atom %d to %d : %d to %d\n",
605 i, j, trans->atom->no, trans->to, atomno, targetno);
608 targetno + 1; /* to avoid 0 */
667 * @string: the string to parse
1110 if (trans->to < 0) {
1129 fprintf(output, "epsilon to %d\n", trans->to);
1134 fprintf(output, "atom %d, to %d\n", trans->atom->no, trans->to);
1360 (trans->to == target->no) &&
1364 printf("Ignoring duplicate transition from %d to %d\n",
1393 printf("Add trans from %d to %d ", state->no, target->no);
1407 state->trans[state->nbTrans].to = target->no;
1448 * @to: the target state or NULL for building a new one
1454 xmlRegStatePtr from, xmlRegStatePtr to,
1456 if (to == NULL) {
1457 to = xmlRegNewState(ctxt);
1458 xmlRegStatePush(ctxt, to);
1459 ctxt->state = to;
1462 xmlRegStateAddTrans(ctxt, from, NULL, to, -1, REGEXP_ALL_LAX_COUNTER);
1464 xmlRegStateAddTrans(ctxt, from, NULL, to, -1, REGEXP_ALL_COUNTER);
1471 * @to: the target state or NULL for building a new one
1476 xmlRegStatePtr from, xmlRegStatePtr to) {
1477 if (to == NULL) {
1478 to = xmlRegNewState(ctxt);
1479 xmlRegStatePush(ctxt, to);
1480 ctxt->state = to;
1482 xmlRegStateAddTrans(ctxt, from, NULL, to, -1, -1);
1489 * @to: the target state or NULL for building a new one
1495 xmlRegStatePtr from, xmlRegStatePtr to, int counter) {
1496 if (to == NULL) {
1497 to = xmlRegNewState(ctxt);
1498 xmlRegStatePush(ctxt, to);
1499 ctxt->state = to;
1501 xmlRegStateAddTrans(ctxt, from, NULL, to, counter, -1);
1508 * @to: the target state or NULL for building a new one
1514 xmlRegStatePtr from, xmlRegStatePtr to, int counter) {
1515 if (to == NULL) {
1516 to = xmlRegNewState(ctxt);
1517 xmlRegStatePush(ctxt, to);
1518 ctxt->state = to;
1520 xmlRegStateAddTrans(ctxt, from, NULL, to, -1, counter);
1527 * @to: the target state or NULL for building a new one
1534 xmlRegStatePtr to, xmlRegAtomPtr atom) {
1543 * this is a subexpression handling one should not need to
1549 if ((to != NULL) && (atom->stop != to) &&
1552 * Generate an epsilon transition to link to the target
1554 xmlFAGenerateEpsilonTransition(ctxt, atom->stop, to);
1556 } else if ((to == NULL) && (atom->quant != XML_REGEXP_QUANT_RANGE) &&
1558 to = xmlRegNewState(ctxt);
1559 xmlRegStatePush(ctxt, to);
1560 ctxt->state = to;
1561 xmlFAGenerateEpsilonTransition(ctxt, atom->stop, to);
1568 * transition done to the state after end of atom.
1569 * 1. set transition from atom start to new state
1570 * 2. set transition from atom end to this state.
1591 if (to != NULL) {
1592 newstate = to;
1599 * The principle here is to use counted transition
1600 * to avoid explosion in the number of states in the
1607 * duplicate a transition based on atom to count next
1608 * occurences after 1. We cannot loop to atom->start
1609 * directly because we need an epsilon transition to
1641 * is an atom->start0 allowing to easilly plug the
1674 if (to == NULL) {
1675 to = xmlRegNewState(ctxt);
1676 if (to != NULL)
1677 xmlRegStatePush(ctxt, to);
1682 xmlFAGenerateEpsilonTransition(ctxt, from, to);
1683 ctxt->state = to;
1687 if (to == NULL) {
1688 to = xmlRegNewState(ctxt);
1689 if (to != NULL)
1690 xmlRegStatePush(ctxt, to);
1695 end = to;
1700 * it as it is likely to be the shared target of multiple branches.
1711 xmlFAGenerateEpsilonTransition(ctxt, tmp, to);
1712 to = tmp;
1717 xmlRegStateAddTrans(ctxt, from, atom, to, -1, -1);
1722 xmlFAGenerateEpsilonTransition(ctxt, from, to);
1726 xmlFAGenerateEpsilonTransition(ctxt, from, to);
1727 xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1);
1731 xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1);
1736 xmlFAGenerateEpsilonTransition(ctxt, from, to);
1750 * @tonr: the to state
1751 * @counter: should that transition be associated to a counted
1759 xmlRegStatePtr to;
1767 to = ctxt->states[tonr];
1768 if (to == NULL)
1770 if ((to->mark == XML_REGEXP_MARK_START) ||
1771 (to->mark == XML_REGEXP_MARK_VISITED))
1774 to->mark = XML_REGEXP_MARK_VISITED;
1775 if (to->type == XML_REGEXP_FINAL_STATE) {
1781 for (transnr = 0;transnr < to->nbTrans;transnr++) {
1782 if (to->trans[transnr].to < 0)
1784 if (to->trans[transnr].atom == NULL) {
1789 if (to->trans[transnr].to != fromnr) {
1790 if (to->trans[transnr].count >= 0) {
1791 int newto = to->trans[transnr].to;
1795 -1, to->trans[transnr].count);
1798 printf("Found epsilon trans %d from %d to %d\n",
1799 transnr, tonr, to->trans[transnr].to);
1801 if (to->trans[transnr].counter >= 0) {
1803 to->trans[transnr].to,
1804 to->trans[transnr].counter);
1807 to->trans[transnr].to,
1813 int newto = to->trans[transnr].to;
1815 if (to->trans[transnr].counter >= 0) {
1816 xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom,
1818 to->trans[transnr].counter, -1);
1820 xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom,
1825 to->mark = XML_REGEXP_MARK_NORMAL;
1833 * algorithm due to the large amount of generated new transitions and
1835 * to separate building blocks when generating the automata this can be
1836 * reduced to state elimination:
1837 * - if there exists an epsilon from X to Y
1841 * target of all transitions to X by transitions to Y.
1858 (state->trans[0].to >= 0) &&
1859 (state->trans[0].to != statenr) &&
1862 newto = state->trans[0].to;
1866 printf("Found simple epsilon trans from start %d to %d\n",
1871 printf("Found simple epsilon trans from %d to %d\n",
1877 if (tmp->trans[j].to == statenr) {
1879 printf("Changed transition %d on %d to go to %d\n",
1882 tmp->trans[j].to = -1;
1935 * Use a marking algorithm to avoid loops
1937 * Process from the latests states backward to the start when
1951 (state->trans[transnr].to >= 0)) {
1952 if (state->trans[transnr].to == statenr) {
1953 state->trans[transnr].to = -1;
1959 int newto = state->trans[transnr].to;
1962 printf("Found epsilon trans %d from %d to %d\n",
1966 state->trans[transnr].to = -2;
1992 (trans->to >= 0)) {
1993 trans->to = -1;
2000 * Use this pass to detect unreachable states too
2017 if ((state->trans[transnr].to >= 0) &&
2020 int newto = state->trans[transnr].to;
2125 * memory too, so let's force the automata to save state
2148 /* same thing to limit complexity */
2226 * Compares two atoms type to check whether they intersect in some ways,
2427 * Compares two atoms to check whether they are the same exactly
2428 * this is used to remove equivalent transitions
2455 /* too hard to do in the general case */
2468 * Compares two atoms to check whether they intersect in some ways,
2520 * need to check that none of the ranges eventually matches
2559 int to, xmlRegAtomPtr atom) {
2578 if (t1->to < 0)
2580 res = xmlFARecurseDeterminism(ctxt, ctxt->states[t1->to],
2581 to, atom);
2588 if (t1->to != to)
2635 * will have to be handled separately
2641 if (t1->to == -1) /* eliminated */
2645 if (t2->to == -1) /* eliminated */
2648 if (t1->to == t2->to) {
2650 t2->to = -1; /* eliminated */
2672 * will have to be handled separately
2677 if (t1->to == -1) /* eliminated */
2681 if (t2->to == -1) /* eliminated */
2692 } else if (t1->to != -1) {
2697 ret = xmlFARecurseDeterminism(ctxt, ctxt->states[t1->to],
2698 t2->to, t2->atom);
2719 * from a state since there is no need to set-up rollback
2738 * Routines to check input against transition atoms *
3175 * we don't want to break.
3185 if (trans->to >=0) {
3197 if (trans->to < 0)
3231 xmlRegStatePtr to = comp->states[trans->to];
3238 * maximum limit in which case get to next transition
3264 * Try to progress as much as possible on the input
3285 exec->state = to;
3320 * says that's ok. Setting len to 0 inhibits stepping
3328 /* another spot to match when minOccurs is 0 */
3378 printf("entering state %d\n", trans->to);
3380 exec->state = comp->states[trans->to];
3394 * Failed to find a way out
3431 * Progressive interface to the verifier one atom at a time *
3443 * @data: the context data associated to the callback in this context
3480 * the second half is used to store the data in case of rollback
3508 * Free the structures associated to a regular expression evaulation context.
3578 * @expStr: the string to be evaluated
3631 * @data: data associated to the token to reuse in callbacks
3669 target--; /* to avoid 0 */
3691 * Failed to find an exit transition out from current state for the
3695 printf("failed to find a transition for %s on state %d\n", value, state);
3711 * @exec: a regexp execution context or NULL to indicate the end
3713 * @data: data associated to the token to reuse in callbacks
3751 * and get back to where we were left
3778 if (trans->to < 0)
3882 xmlRegStatePtr to = exec->comp->states[trans->to];
3896 * Try to progress as much as possible on the input
3923 exec->state = to;
3975 printf("entering state %d\n", trans->to);
3977 if ((exec->comp->states[trans->to] != NULL) &&
3978 (exec->comp->states[trans->to]->type ==
3991 exec->state = exec->comp->states[trans->to];
4041 * Failed to find a way out
4071 * @exec: a regexp execution context or NULL to indicate the end
4073 * @data: data associated to the token to reuse in callbacks
4088 * @exec: a regexp execution context or NULL to indicate the end
4091 * @data: data associated to the token to reuse in callbacks
4146 * @nbval: pointer to the number of accepted values IN/OUT
4148 * @values: pointer to the array of acceptable values
4151 * Extract informations from the regexp execution, internal routine to
4231 if (trans->to < 0)
4260 if ((exec->comp->states[trans->to] != NULL) &&
4261 (exec->comp->states[trans->to]->type !=
4275 if (trans->to < 0)
4287 if ((exec->comp->states[trans->to] != NULL) &&
4288 (exec->comp->states[trans->to]->type ==
4305 * @nbval: pointer to the number of accepted values IN/OUT
4307 * @values: pointer to the array of acceptable values
4311 * the parameter @values must point to an array of @nbval string pointers
4314 * returned will be freed with the @exec context and don't need to be
4329 * @nbval: pointer to the number of accepted values IN/OUT
4331 * @values: pointer to the array of acceptable values
4336 * the parameter @values must point to an array of @nbval string pointers
4339 * returned will be freed with the @exec context and don't need to be
4397 if (trans->to < 0)
4424 xmlRegStatePtr to = exec->comp->states[trans->to];
4435 * Try to progress as much as possible on the input
4456 exec->state = to;
4500 printf("entering state %d\n", trans->to);
4502 exec->state = exec->comp->states[trans->to];
4516 * Failed to find a way out
5261 * @to: optional target to the end of the branch
5263 * @to is used to optimize by removing duplicate path in automata
5269 xmlFAParseBranch(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr to) {
5277 (CUR=='|' || CUR==')') ? to : NULL, ctxt->atom) < 0)
5286 (CUR=='|' || CUR==')') ? to : NULL, ctxt->atom) < 0)
5380 * Parses a regular expression conforming to XML Schemas Part 2 Datatype
5429 * @content: the value to check against the regular expression
5607 * @to: the target point of the transition or NULL
5608 * @token: the input string associated to that transition
5609 * @data: data passed to the callback function if the transition is activated
5611 * If @to is NULL, this creates first a new target state in the automata
5612 * and then adds a transition from the @from state to the target state
5619 xmlAutomataStatePtr to, const xmlChar *token,
5633 if (xmlFAGenerateTransitions(am, from, to, atom) < 0) {
5637 if (to == NULL)
5639 return(to);
5646 * @to: the target point of the transition or NULL
5647 * @token: the first input string associated to that transition
5648 * @token2: the second input string associated to that transition
5649 * @data: data passed to the callback function if the transition is activated
5651 * If @to is NULL, this creates first a new target state in the automata
5652 * and then adds a transition from the @from state to the target state
5659 xmlAutomataStatePtr to, const xmlChar *token,
5691 if (xmlFAGenerateTransitions(am, from, to, atom) < 0) {
5695 if (to == NULL)
5697 return(to);
5704 * @to: the target point of the transition or NULL
5705 * @token: the first input string associated to that transition
5706 * @token2: the second input string associated to that transition
5707 * @data: data passed to the callback function if the transition is activated
5709 * If @to is NULL, this creates first a new target state in the automata
5710 * and then adds a transition from the @from state to the target state
5712 * Note that if @token2 is not NULL, then (X, NULL) won't match to follow
5719 xmlAutomataStatePtr to, const xmlChar *token,
5756 if (xmlFAGenerateTransitions(am, from, to, atom) < 0) {
5761 if (to == NULL)
5763 return(to);
5770 * @to: the target point of the transition or NULL
5771 * @token: the input string associated to that transition
5772 * @token2: the second input string associated to that transition
5775 * @data: data associated to the transition
5777 * If @to is NULL, this creates first a new target state in the automata
5778 * and then adds a transition from the @from state to the target state
5786 xmlAutomataStatePtr to, const xmlChar *token,
5830 * associate a counter to the transition.
5836 /* xmlFAGenerateTransitions(am, from, to, atom); */
5837 if (to == NULL) {
5838 to = xmlRegNewState(am);
5839 xmlRegStatePush(am, to);
5841 xmlRegStateAddTrans(am, from, atom, to, counter, -1);
5843 am->state = to;
5845 if (to == NULL)
5846 to = am->state;
5847 if (to == NULL)
5850 xmlFAGenerateEpsilonTransition(am, from, to);
5851 return(to);
5858 * @to: the target point of the transition or NULL
5859 * @token: the input string associated to that transition
5862 * @data: data associated to the transition
5864 * If @to is NULL, this creates first a new target state in the automata
5865 * and then adds a transition from the @from state to the target state
5873 xmlAutomataStatePtr to, const xmlChar *token,
5896 * associate a counter to the transition.
5902 /* xmlFAGenerateTransitions(am, from, to, atom); */
5903 if (to == NULL) {
5904 to = xmlRegNewState(am);
5905 xmlRegStatePush(am, to);
5907 xmlRegStateAddTrans(am, from, atom, to, counter, -1);
5909 am->state = to;
5911 if (to == NULL)
5912 to = am->state;
5913 if (to == NULL)
5916 xmlFAGenerateEpsilonTransition(am, from, to);
5917 return(to);
5924 * @to: the target point of the transition or NULL
5925 * @token: the input string associated to that transition
5926 * @token2: the second input string associated to that transition
5929 * @data: data associated to the transition
5931 * If @to is NULL, this creates first a new target state in the automata
5932 * and then adds a transition from the @from state to the target state
5941 xmlAutomataStatePtr to, const xmlChar *token,
5982 * associate a counter to the transition.
5988 /* xmlFAGenerateTransitions(am, from, to, atom); */
5989 if (to == NULL) {
5990 to = xmlRegNewState(am);
5991 xmlRegStatePush(am, to);
5993 xmlRegStateAddTrans(am, from, atom, to, counter, -1);
5995 am->state = to;
5996 return(to);
6005 * @to: the target point of the transition or NULL
6006 * @token: the input string associated to that transition
6009 * @data: data associated to the transition
6011 * If @to is NULL, this creates first a new target state in the automata
6012 * and then adds a transition from the @from state to the target state
6021 xmlAutomataStatePtr to, const xmlChar *token,
6041 * associate a counter to the transition.
6047 /* xmlFAGenerateTransitions(am, from, to, atom); */
6048 if (to == NULL) {
6049 to = xmlRegNewState(am);
6050 xmlRegStatePush(am, to);
6052 xmlRegStateAddTrans(am, from, atom, to, counter, -1);
6054 am->state = to;
6055 return(to);
6068 xmlAutomataStatePtr to;
6072 to = xmlRegNewState(am);
6073 xmlRegStatePush(am, to);
6074 return(to);
6081 * @to: the target point of the transition or NULL
6083 * If @to is NULL, this creates first a new target state in the automata
6084 * and then adds an epsilon transition from the @from state to the
6091 xmlAutomataStatePtr to) {
6094 xmlFAGenerateEpsilonTransition(am, from, to);
6095 if (to == NULL)
6097 return(to);
6104 * @to: the target point of the transition or NULL
6105 * @lax: allow to transition if not all all transitions have been activated
6107 * If @to is NULL, this creates first a new target state in the automata
6108 * and then adds a an ALL transition from the @from state to the
6116 xmlAutomataStatePtr to, int lax) {
6119 xmlFAGenerateAllTransition(am, from, to, lax);
6120 if (to == NULL)
6122 return(to);
6154 * @to: the target point of the transition or NULL
6155 * @counter: the counter associated to that transition
6157 * If @to is NULL, this creates first a new target state in the automata
6158 * and then adds an epsilon transition from the @from state to the target state
6165 xmlAutomataStatePtr to, int counter) {
6168 xmlFAGenerateCountedEpsilonTransition(am, from, to, counter);
6169 if (to == NULL)
6171 return(to);
6178 * @to: the target point of the transition or NULL
6179 * @counter: the counter associated to that transition
6181 * If @to is NULL, this creates first a new target state in the automata
6182 * and then adds an epsilon transition from the @from state to the target state
6189 xmlAutomataStatePtr to, int counter) {
6192 xmlFAGenerateCountedTransition(am, from, to, counter);
6193 if (to == NULL)
6195 return(to);
6266 * @dict: optional dictionnary to use internally
6324 * Structure associated to an expression node *
6521 /* a | a reduced to a */
6534 /* a | (a | b) and b | (a | b) are reduced to a | b */
6760 * Get the atom associated to this name from that context
6780 * Get the atom associated to the choice @left | @right
6781 * Note that @left and @right are consumed in the operation, to keep
6782 * an handle on them use xmlExpRef() and use xmlExpFree() to release them,
6805 * Get the atom associated to the sequence @left , @right
6806 * Note that @left and @right are consumed in the operation, to keep
6807 * an handle on them use xmlExpRef() and use xmlExpFree() to release them,
6827 * @subset: the expression to be repeated
6831 * Get the atom associated to the range (@subset){@min, @max}
6832 * Note that @subset is consumed in the operation, to keep
6833 * an handle on it use xmlExpRef() and use xmlExpFree() to release it,
6894 * @langList: where to store the tokens
6960 * @tokList: where to store the tokens
7089 printf("deriv count: match to empty => new count\n");
7111 * respect to the input string
7224 * Try to do a step of Brzozowski derivation but at a higher level
7337 /* try to get the sequence consumed only if possible */
7350 * i.e. we won't get to a nillable exp left
7364 /* Try instead to decompose */
7425 * Try to see if the loop is completely subsumed
7487 * TODO: loop here to try to grow if working on finite
7593 printf("Fallback to derivative\n");
7604 * we use the default token based derivation to force one more step
8024 * @buf: a buffer to receive the output
8027 * Serialize the expression as compiled to the buffer