Home | History | Annotate | Download | only in libxml2

Lines Matching refs:am

364 void xmlAutomataSetFlags(xmlAutomataPtr am, int flags);
5524 xmlAutomataPtr am;
5532 am = xmlNewAutomata();
5533 if (am->states != NULL) {
5536 for (i = 0;i < am->nbStates;i++)
5537 xmlRegFreeState(am->states[i]);
5538 xmlFree(am->states);
5540 am->nbAtoms = comp->nbAtoms;
5541 am->atoms = comp->atoms;
5542 am->nbStates = comp->nbStates;
5543 am->states = comp->states;
5544 am->determinist = -1;
5545 am->flags = comp->flags;
5546 ret = xmlFAComputesDeterminism(am);
5547 am->atoms = NULL;
5548 am->states = NULL;
5549 xmlFreeAutomata(am);
5635 * @am: an automata
5640 xmlFreeAutomata(xmlAutomataPtr am) {
5641 if (am == NULL)
5643 xmlRegFreeParserCtxt(am);
5648 * @am: an automata
5654 xmlAutomataSetFlags(xmlAutomataPtr am, int flags) {
5655 if (am == NULL)
5657 am->flags |= flags;
5662 * @am: an automata
5669 xmlAutomataGetInitState(xmlAutomataPtr am) {
5670 if (am == NULL)
5672 return(am->start);
5677 * @am: an automata
5685 xmlAutomataSetFinalState(xmlAutomataPtr am, xmlAutomataStatePtr state) {
5686 if ((am == NULL) || (state == NULL))
5694 * @am: an automata
5707 xmlAutomataNewTransition(xmlAutomataPtr am, xmlAutomataStatePtr from,
5712 if ((am == NULL) || (from == NULL) || (token == NULL))
5714 atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
5720 if (xmlFAGenerateTransitions(am, from, to, atom) < 0) {
5725 return(am->state);
5731 * @am: an automata
5745 xmlAutomataNewTransition2(xmlAutomataPtr am, xmlAutomataStatePtr from,
5750 if ((am == NULL) || (from == NULL) || (token == NULL))
5752 atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
5778 if (xmlFAGenerateTransitions(am, from, to, atom) < 0) {
5783 return(am->state);
5789 * @am: an automata
5805 xmlAutomataNewNegTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
5811 if ((am == NULL) || (from == NULL) || (token == NULL))
5813 atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
5843 if (xmlFAGenerateTransitions(am, from, to, atom) < 0) {
5847 am->negs++;
5849 return(am->state);
5855 * @am: an automata
5872 xmlAutomataNewCountTrans2(xmlAutomataPtr am, xmlAutomataStatePtr from,
5879 if ((am == NULL) || (from == NULL) || (token == NULL))
5885 atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
5919 counter = xmlRegGetCounter(am);
5920 am->counters[counter].min = min;
5921 am->counters[counter].max = max;
5923 /* xmlFAGenerateTransitions(am, from, to, atom); */
5925 to = xmlRegNewState(am);
5926 xmlRegStatePush(am, to);
5928 xmlRegStateAddTrans(am, from, atom, to, counter, -1);
5929 xmlRegAtomPush(am, atom);
5930 am->state = to;
5933 to = am->state;
5937 xmlFAGenerateEpsilonTransition(am, from, to);
5943 * @am: an automata
5959 xmlAutomataNewCountTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
5965 if ((am == NULL) || (from == NULL) || (token == NULL))
5971 atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
5985 counter = xmlRegGetCounter(am);
5986 am->counters[counter].min = min;
5987 am->counters[counter].max = max;
5989 /* xmlFAGenerateTransitions(am, from, to, atom); */
5991 to = xmlRegNewState(am);
5992 xmlRegStatePush(am, to);
5994 xmlRegStateAddTrans(am, from, atom, to, counter, -1);
5995 xmlRegAtomPush(am, atom);
5996 am->state = to;
5999 to = am->state;
6003 xmlFAGenerateEpsilonTransition(am, from, to);
6009 * @am: an automata
6027 xmlAutomataNewOnceTrans2(xmlAutomataPtr am, xmlAutomataStatePtr from,
6034 if ((am == NULL) || (from == NULL) || (token == NULL))
6040 atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
6071 counter = xmlRegGetCounter(am);
6072 am->counters[counter].min = 1;
6073 am->counters[counter].max = 1;
6075 /* xmlFAGenerateTransitions(am, from, to, atom); */
6077 to = xmlRegNewState(am);
6078 xmlRegStatePush(am, to);
6080 xmlRegStateAddTrans(am, from, atom, to, counter, -1);
6081 xmlRegAtomPush(am, atom);
6082 am->state = to;
6090 * @am: an automata
6107 xmlAutomataNewOnceTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
6113 if ((am == NULL) || (from == NULL) || (token == NULL))
6119 atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
6130 counter = xmlRegGetCounter(am);
6131 am->counters[counter].min = 1;
6132 am->counters[counter].max = 1;
6134 /* xmlFAGenerateTransitions(am, from, to, atom); */
6136 to = xmlRegNewState(am);
6137 xmlRegStatePush(am, to);
6139 xmlRegStateAddTrans(am, from, atom, to, counter, -1);
6140 xmlRegAtomPush(am, atom);
6141 am->state = to;
6147 * @am: an automata
6154 xmlAutomataNewState(xmlAutomataPtr am) {
6157 if (am == NULL)
6159 to = xmlRegNewState(am);
6160 xmlRegStatePush(am, to);
6166 * @am: an automata
6177 xmlAutomataNewEpsilon(xmlAutomataPtr am, xmlAutomataStatePtr from,
6179 if ((am == NULL) || (from == NULL))
6181 xmlFAGenerateEpsilonTransition(am, from, to);
6183 return(am->state);
6189 * @am: an automata
6202 xmlAutomataNewAllTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
6204 if ((am == NULL) || (from == NULL))
6206 xmlFAGenerateAllTransition(am, from, to, lax);
6208 return(am->state);
6214 * @am: an automata
6223 xmlAutomataNewCounter(xmlAutomataPtr am, int min, int max) {
6226 if (am == NULL)
6229 ret = xmlRegGetCounter(am);
6232 am->counters[ret].min = min;
6233 am->counters[ret].max = max;
6239 * @am: an automata
6251 xmlAutomataNewCountedTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
6253 if ((am == NULL) || (from == NULL) || (counter < 0))
6255 xmlFAGenerateCountedEpsilonTransition(am, from, to, counter);
6257 return(am->state);
6263 * @am: an automata
6275 xmlAutomataNewCounterTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
6277 if ((am == NULL) || (from == NULL) || (counter < 0))
6279 xmlFAGenerateCountedTransition(am, from, to, counter);
6281 return(am->state);
6287 * @am: an automata
6295 xmlAutomataCompile(xmlAutomataPtr am) {
6298 if ((am == NULL) || (am->error != 0)) return(NULL);
6299 xmlFAEliminateEpsilonTransitions(am);
6300 /* xmlFAComputesDeterminism(am); */
6301 ret = xmlRegEpxFromParse(am);
6308 * @am: an automata
6315 xmlAutomataIsDeterminist(xmlAutomataPtr am) {
6318 if (am == NULL)
6321 ret = xmlFAComputesDeterminism(am);