• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/gettext-0.17/gnulib-local/lib/libxml/

Lines Matching defs:atom

205     xmlRegAtomPtr atom;
240 xmlRegAtomPtr atom;
343 static void xmlRegFreeAtom(xmlRegAtomPtr atom);
345 static int xmlRegCheckCharacter(xmlRegAtomPtr atom, int codepoint);
453 * 3/ build a table state x atom for the transitions
556 if ((trans->to == -1) || (trans->atom == NULL))
558 atomno = stringRemap[trans->atom->no];
559 if ((trans->atom->data != NULL) && (transdata == NULL)) {
572 * if the same atom can generate transitions to 2 different
581 printf("Indet: state %d trans %d, atom %d to %d : %d to %d\n",
582 i, j, trans->atom->no, trans->to, atomno, targetno);
597 printf("State %d trans %d: atom %d to %d : %d to %d\n",
598 i, j, trans->atom->no, trans->to, atomno, targetno);
604 trans->atom->data;
732 * @type: the type of atom
736 * Returns the new atom or NULL in case of error
744 xmlRegexpErrMemory(ctxt, "allocating atom");
757 * @atom: the regexp atom
759 * Free a regexp atom
762 xmlRegFreeAtom(xmlRegAtomPtr atom) {
765 if (atom == NULL)
768 for (i = 0;i < atom->nbRanges;i++)
769 xmlRegFreeRange(atom->ranges[i]);
770 if (atom->ranges != NULL)
771 xmlFree(atom->ranges);
772 if ((atom->type == XML_REGEXP_STRING) && (atom->valuep != NULL))
773 xmlFree(atom->valuep);
774 if ((atom->type == XML_REGEXP_STRING) && (atom->valuep2 != NULL))
775 xmlFree(atom->valuep2);
776 if ((atom->type == XML_REGEXP_BLOCK_NAME) && (atom->valuep != NULL))
777 xmlFree(atom->valuep);
778 xmlFree(atom);
992 xmlRegPrintAtom(FILE *output, xmlRegAtomPtr atom) {
993 fprintf(output, " atom: ");
994 if (atom == NULL) {
998 if (atom->neg)
1000 xmlRegPrintAtomType(output, atom->type);
1001 xmlRegPrintQuantType(output, atom->quant);
1002 if (atom->quant == XML_REGEXP_QUANT_RANGE)
1003 fprintf(output, "%d-%d ", atom->min, atom->max);
1004 if (atom->type == XML_REGEXP_STRING)
1005 fprintf(output, "'%s' ", (char *) atom->valuep);
1006 if (atom->type == XML_REGEXP_CHARVAL)
1007 fprintf(output, "char %c\n", atom->codepoint);
1008 else if (atom->type == XML_REGEXP_RANGES) {
1010 fprintf(output, "%d entries\n", atom->nbRanges);
1011 for (i = 0; i < atom->nbRanges;i++)
1012 xmlRegPrintRange(output, atom->ranges[i]);
1013 } else if (atom->type == XML_REGEXP_SUBREG) {
1014 fprintf(output, "start %d end %d\n", atom->start->no, atom->stop->no);
1045 if (trans->atom == NULL) {
1049 if (trans->atom->type == XML_REGEXP_CHARVAL)
1050 fprintf(output, "char %c ", trans->atom->codepoint);
1051 fprintf(output, "atom %d, to %d\n", trans->atom->no, trans->to);
1095 if (ctxt->atom != NULL) {
1096 fprintf(output, "current atom:\n");
1097 xmlRegPrintAtom(output, ctxt->atom);
1123 xmlRegAtomAddRange(xmlRegParserCtxtPtr ctxt, xmlRegAtomPtr atom,
1128 if (atom == NULL) {
1129 ERROR("add range: atom is NULL");
1132 if (atom->type != XML_REGEXP_RANGES) {
1133 ERROR("add range: atom is not ranges");
1136 if (atom->maxRanges == 0) {
1137 atom->maxRanges = 4;
1138 atom->ranges = (xmlRegRangePtr *) xmlMalloc(atom->maxRanges *
1140 if (atom->ranges == NULL) {
1142 atom->maxRanges = 0;
1145 } else if (atom->nbRanges >= atom->maxRanges) {
1147 atom->maxRanges *= 2;
1148 tmp = (xmlRegRangePtr *) xmlRealloc(atom->ranges, atom->maxRanges *
1152 atom->maxRanges /= 2;
1155 atom->ranges = tmp;
1161 atom->ranges[atom->nbRanges++] = range;
1194 xmlRegAtomPush(xmlRegParserCtxtPtr ctxt, xmlRegAtomPtr atom) {
1195 if (atom == NULL) {
1196 ERROR("atom push: atom is NULL");
1204 xmlRegexpErrMemory(ctxt, "pushing atom");
1220 atom->no = ctxt->nbAtoms;
1221 ctxt->atoms[ctxt->nbAtoms++] = atom;
1255 xmlRegAtomPtr atom, xmlRegStatePtr target,
1276 if ((trans->atom == atom) &&
1317 else if (atom == NULL)
1319 else if (atom != NULL)
1320 xmlRegPrintAtom(stdout, atom);
1323 state->trans[state->nbTrans].atom = atom;
1445 * @atom: the atom generating the transition
1451 xmlRegStatePtr to, xmlRegAtomPtr atom) {
1452 if (atom == NULL) {
1453 ERROR("genrate transition: atom == NULL");
1456 if (atom->type == XML_REGEXP_SUBREG) {
1461 if (xmlRegAtomPush(ctxt, atom) < 0) {
1464 if ((to != NULL) && (atom->stop != to) &&
1465 (atom->quant != XML_REGEXP_QUANT_RANGE)) {
1469 xmlFAGenerateEpsilonTransition(ctxt, atom->stop, to);
1471 } else if ((to == NULL) && (atom->quant != XML_REGEXP_QUANT_RANGE) &&
1472 (atom->quant != XML_REGEXP_QUANT_ONCE)) {
1476 xmlFAGenerateEpsilonTransition(ctxt, atom->stop, to);
1479 switch (atom->quant) {
1481 atom->quant = XML_REGEXP_QUANT_ONCE;
1483 * transition done to the state after end of atom.
1484 * 1. set transition from atom start to new state
1485 * 2. set transition from atom end to this state.
1487 xmlFAGenerateEpsilonTransition(ctxt, atom->start, 0);
1488 xmlFAGenerateEpsilonTransition(ctxt, atom->stop, ctxt->state);
1491 atom->quant = XML_REGEXP_QUANT_ONCE;
1492 xmlFAGenerateEpsilonTransition(ctxt, atom->start, atom->stop);
1493 xmlFAGenerateEpsilonTransition(ctxt, atom->stop, atom->start);
1496 atom->quant = XML_REGEXP_QUANT_ONCE;
1497 xmlFAGenerateEpsilonTransition(ctxt, atom->stop, atom->start);
1506 * and create epsilon transitions from atom->start
1507 * to atom->stop, as well as atom->start to the new
1511 * this counter going from atom->stop to atom->start
1513 * 5/ generate a counted transition from atom->stop to
1516 if (atom->min == 0) {
1517 xmlFAGenerateEpsilonTransition(ctxt, atom->start,
1518 atom->stop);
1522 xmlFAGenerateEpsilonTransition(ctxt, atom->start,
1526 ctxt->counters[counter].min = atom->min - 1;
1527 ctxt->counters[counter].max = atom->max - 1;
1528 atom->min = 0;
1529 atom->max = 0;
1530 atom->quant = XML_REGEXP_QUANT_ONCE;
1538 xmlFAGenerateCountedTransition(ctxt, atom->stop,
1545 xmlFAGenerateCountedEpsilonTransition(ctxt, atom->stop,
1546 atom->start, counter);
1553 if ((atom->min == 0) && (atom->max == 0) &&
1554 (atom->quant == XML_REGEXP_QUANT_RANGE)) {
1556 * we can discard the atom and generate an epsilon transition instead
1568 xmlRegFreeAtom(atom);
1579 if (xmlRegAtomPush(ctxt, atom) < 0) {
1582 xmlRegStateAddTrans(ctxt, from, atom, to, -1, -1);
1584 switch (atom->quant) {
1586 atom->quant = XML_REGEXP_QUANT_ONCE;
1590 atom->quant = XML_REGEXP_QUANT_ONCE;
1592 xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1);
1595 atom->quant = XML_REGEXP_QUANT_ONCE;
1596 xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1);
1642 if (to->trans[transnr].atom == NULL) {
1674 xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom,
1678 xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom,
1713 if ((state->trans[0].atom == NULL) &&
1800 if ((state->trans[transnr].atom == NULL) &&
1839 if ((trans->atom == NULL) &&
1867 ((state->trans[transnr].atom != NULL) ||
2072 * @type1: an atom type
2073 * @type2: an atom type
2273 * @atom1: an atom
2274 * @atom2: an atom
2314 * @atom1: an atom
2315 * @atom2: an atom
2408 int to, xmlRegAtomPtr atom) {
2426 if (t1->atom == NULL) {
2430 to, atom);
2439 if (xmlFACompareAtoms(t1->atom, atom)) {
2486 if (t1->atom == NULL) {
2496 if (t2->atom != NULL) {
2498 if (xmlFAEqualAtoms(t1->atom, t2->atom))
2508 * with the same atom and a different target.
2523 if (t1->atom == NULL) {
2532 if (t2->atom != NULL) {
2534 if (xmlFACompareAtoms(t1->atom, t2->atom)) {
2547 t2->to, t2->atom);
2762 xmlRegCheckCharacter(xmlRegAtomPtr atom, int codepoint) {
2766 if ((atom == NULL) || (!IS_CHAR(codepoint)))
2769 switch (atom->type) {
2774 return(codepoint == atom->codepoint);
2778 for (i = 0;i < atom->nbRanges;i++) {
2779 range = atom->ranges[i];
2855 ret = xmlRegCheckCharacterRange(atom->type, codepoint, 0, 0, 0,
2856 (const xmlChar *)atom->valuep);
2857 if (atom->neg)
3015 xmlRegAtomPtr atom;
3028 * atom allows minOccurs of 0
3033 atom = trans->atom;
3034 if (!((atom->min == 0) && (atom->max > 0)))
3046 atom = trans->atom;
3070 } else if (atom == NULL) {
3076 ret = xmlRegCheckCharacter(atom, codepoint);
3077 if ((ret == 1) && (atom->min >= 0) && (atom->max > 0)) {
3103 if (exec->transcount == atom->max) {
3114 if (exec->transcount >= atom->min) {
3129 ret = xmlRegCheckCharacter(atom, codepoint);
3132 if (exec->transcount < atom->min)
3154 } else if ((ret == 0) && (atom->min == 0) && (atom->max > 0)) {
3164 } else if ((atom->min == 0) && (atom->max > 0)) {
3176 printf("Saving on nd transition atom %d for %c at %d\n",
3177 trans->atom->no, codepoint, exec->index);
3211 if (trans->atom != NULL) {
3260 * Progressive interface to the verifier one atom at a time *
3554 xmlRegAtomPtr atom;
3609 atom = trans->atom;
3635 (t->atom != NULL) &&
3636 (xmlStrEqual(value, t->atom->valuep))) {
3642 (t->atom != NULL) &&
3643 (xmlStrEqual(value, t->atom->valuep))) {
3689 } else if (atom == NULL) {
3694 ret = xmlRegStrEqualWildcard(atom->valuep, value);
3695 if (atom->neg) {
3710 if ((ret == 1) && (atom->min > 0) && (atom->max > 0)) {
3727 if (exec->transcount == atom->max) {
3744 if (exec->transcount >= atom->min) {
3760 ret = xmlStrEqual(value, atom->valuep);
3763 if (exec->transcount < atom->min)
3778 if ((exec->callback != NULL) && (atom != NULL) &&
3780 exec->callback(exec->data, atom->valuep,
3781 atom->data, data);
3822 if (trans->atom != NULL) {
4039 xmlRegAtomPtr atom;
4062 atom = trans->atom;
4063 if ((atom == NULL) || (atom->valuep == NULL))
4082 if (atom->neg)
4083 values[nb++] = (xmlChar *) atom->valuep2;
4085 values[nb++] = (xmlChar *) atom->valuep;
4092 if (atom->neg)
4093 values[nb++] = (xmlChar *) atom->valuep2;
4095 values[nb++] = (xmlChar *) atom->valuep;
4106 atom = trans->atom;
4107 if ((atom == NULL) || (atom->valuep == NULL))
4119 if (atom->neg)
4120 values[nb++] = (xmlChar *) atom->valuep2;
4122 values[nb++] = (xmlChar *) atom->valuep;
4202 xmlRegAtomPtr atom;
4228 atom = trans->atom;
4245 } else if (atom == NULL) {
4251 ret = xmlRegCheckCharacter(atom, codepoint);
4252 if ((ret == 1) && (atom->min > 0) && (atom->max > 0)) {
4266 if (exec->transcount == atom->max) {
4277 if (exec->transcount >= atom->min) {
4292 ret = xmlRegCheckCharacter(atom, codepoint);
4295 if (exec->transcount < atom->min)
4333 if (trans->atom != NULL) {
4595 if (ctxt->atom == NULL) {
4596 ctxt->atom = xmlRegNewAtom(ctxt, type);
4597 if (ctxt->atom != NULL)
4598 ctxt->atom->valuep = blockName;
4599 } else if (ctxt->atom->type == XML_REGEXP_RANGES) {
4600 xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
4620 if (ctxt->atom == NULL) {
4621 ctxt->atom = xmlRegNewAtom(ctxt, XML_REGEXP_ANYCHAR);
4622 } else if (ctxt->atom->type == XML_REGEXP_RANGES) {
4623 xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
4656 ctxt->atom->neg = 1;
4667 if (ctxt->atom == NULL) {
4668 ctxt->atom = xmlRegNewAtom(ctxt, XML_REGEXP_CHARVAL);
4669 if (ctxt->atom != NULL) {
4672 ctxt->atom->codepoint = '\n';
4675 ctxt->atom->codepoint = '\r';
4678 ctxt->atom->codepoint = '\t';
4681 ctxt->atom->codepoint = cur;
4684 } else if (ctxt->atom->type == XML_REGEXP_RANGES) {
4685 xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
4727 if (ctxt->atom == NULL) {
4728 ctxt->atom = xmlRegNewAtom(ctxt, type);
4729 } else if (ctxt->atom->type == XML_REGEXP_RANGES) {
4730 xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
4817 xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
4851 xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
4884 xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
4960 ctxt->atom = xmlRegNewAtom(ctxt, XML_REGEXP_RANGES);
4961 if (ctxt->atom == NULL)
5014 if (ctxt->atom != NULL) {
5016 ctxt->atom->quant = XML_REGEXP_QUANT_OPT;
5018 ctxt->atom->quant = XML_REGEXP_QUANT_MULT;
5020 ctxt->atom->quant = XML_REGEXP_QUANT_PLUS;
5052 if (ctxt->atom != NULL) {
5053 ctxt->atom->quant = XML_REGEXP_QUANT_RANGE;
5054 ctxt->atom->min = min;
5055 ctxt->atom->max = max;
5066 * [9] atom ::= Char | charClass | ( '(' regExp ')' )
5074 ctxt->atom = xmlRegNewAtom(ctxt, XML_REGEXP_CHARVAL);
5075 if (ctxt->atom == NULL)
5078 ctxt->atom->codepoint = codepoint;
5095 ctxt->atom = NULL;
5102 ctxt->atom = xmlRegNewAtom(ctxt, XML_REGEXP_SUBREG);
5103 if (ctxt->atom == NULL)
5105 ctxt->atom->start = start;
5106 ctxt->atom->stop = ctxt->state;
5120 * [3] piece ::= atom quantifier?
5126 ctxt->atom = NULL;
5130 if (ctxt->atom == NULL) {
5131 ERROR("internal: no atom generated");
5156 (CUR=='|' || CUR==')') ? to : NULL, ctxt->atom) < 0)
5159 ctxt->atom = NULL;
5165 (CUR=='|' || CUR==')') ? to : NULL, ctxt->atom) < 0)
5168 ctxt->atom = NULL;
5496 xmlRegAtomPtr atom;
5500 atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
5501 if (atom == NULL)
5503 atom->data = data;
5504 if (atom == NULL)
5506 atom->valuep = xmlStrdup(token);
5508 if (xmlFAGenerateTransitions(am, from, to, atom) < 0) {
5509 xmlRegFreeAtom(atom);
5536 xmlRegAtomPtr atom;
5540 atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
5541 if (atom == NULL)
5543 atom->data = data;
5545 atom->valuep = xmlStrdup(token);
5555 xmlRegFreeAtom(atom);
5563 atom->valuep = str;
5566 if (xmlFAGenerateTransitions(am, from, to, atom) < 0) {
5567 xmlRegFreeAtom(atom);
5596 xmlRegAtomPtr atom;
5601 atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
5602 if (atom == NULL)
5604 atom->data = data;
5605 atom->neg = 1;
5607 atom->valuep = xmlStrdup(token);
5617 xmlRegFreeAtom(atom);
5625 atom->valuep = str;
5627 snprintf((char *) err_msg, 199, "not %s", (const char *) atom->valuep);
5629 atom->valuep2 = xmlStrdup(err_msg);
5631 if (xmlFAGenerateTransitions(am, from, to, atom) < 0) {
5632 xmlRegFreeAtom(atom);
5664 xmlRegAtomPtr atom;
5673 atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
5674 if (atom == NULL)
5677 atom->valuep = xmlStrdup(token);
5687 xmlRegFreeAtom(atom);
5695 atom->valuep = str;
5697 atom->data = data;
5699 atom->min = 1;
5701 atom->min = min;
5702 atom->max = max;
5711 /* xmlFAGenerateTransitions(am, from, to, atom); */
5716 xmlRegStateAddTrans(am, from, atom, to, counter, -1);
5717 xmlRegAtomPush(am, atom);
5750 xmlRegAtomPtr atom;
5759 atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
5760 if (atom == NULL)
5762 atom->valuep = xmlStrdup(token);
5763 atom->data = data;
5765 atom->min = 1;
5767 atom->min = min;
5768 atom->max = max;
5777 /* xmlFAGenerateTransitions(am, from, to, atom); */
5782 xmlRegStateAddTrans(am, from, atom, to, counter, -1);
5783 xmlRegAtomPush(am, atom);
5819 xmlRegAtomPtr atom;
5828 atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
5829 if (atom == NULL)
5832 atom->valuep = xmlStrdup(token);
5842 xmlRegFreeAtom(atom);
5850 atom->valuep = str;
5852 atom->data = data;
5853 atom->quant = XML_REGEXP_QUANT_ONCEONLY;
5854 atom->min = min;
5855 atom->max = max;
5863 /* xmlFAGenerateTransitions(am, from, to, atom); */
5868 xmlRegStateAddTrans(am, from, atom, to, counter, -1);
5869 xmlRegAtomPush(am, atom);
5898 xmlRegAtomPtr atom;
5907 atom = xmlRegNewAtom(am, XML_REGEXP_STRING);
5908 if (atom == NULL)
5910 atom->valuep = xmlStrdup(token);
5911 atom->data = data;
5912 atom->quant = XML_REGEXP_QUANT_ONCEONLY;
5913 atom->min = min;
5914 atom->max = max;
5922 /* xmlFAGenerateTransitions(am, from, to, atom); */
5927 xmlRegStateAddTrans(am, from, atom, to, counter, -1);
5928 xmlRegAtomPush(am, atom);
6632 * @name: the atom name
6633 * @len: the atom name lenght in byte (or -1);
6635 * Get the atom associated to this name from that context
6655 * Get the atom associated to the choice @left | @right
6680 * Get the atom associated to the sequence @left , @right
6706 * Get the atom associated to the range (@subset){@min, @max}
6881 printf("deriv atom: equal => Empty\n");
6886 printf("deriv atom: mismatch => forbid\n");