| OLD | NEW |
| 1 /* | 1 /* |
| 2 * regexp.c: generic and extensible Regular Expression engine | 2 * regexp.c: generic and extensible Regular Expression engine |
| 3 * | 3 * |
| 4 * Basically designed with the purpose of compiling regexps for | 4 * Basically designed with the purpose of compiling regexps for |
| 5 * the variety of validation/shemas mechanisms now available in | 5 * the variety of validation/shemas mechanisms now available in |
| 6 * XML related specifications these include: | 6 * XML related specifications these include: |
| 7 * - XML-1.0 DTD validation | 7 * - XML-1.0 DTD validation |
| 8 * - XML Schemas structure part 1 | 8 * - XML Schemas structure part 1 |
| 9 * - XML Schemas Datatypes part 2 especially Appendix F | 9 * - XML Schemas Datatypes part 2 especially Appendix F |
| 10 * - RELAX-NG/TREX i.e. the counter proposal | 10 * - RELAX-NG/TREX i.e. the counter proposal |
| (...skipping 5039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5050 ERROR("Invalid escape value"); | 5050 ERROR("Invalid escape value"); |
| 5051 return; | 5051 return; |
| 5052 } | 5052 } |
| 5053 len = 1; | 5053 len = 1; |
| 5054 } else if ((cur != 0x5B) && (cur != 0x5D)) { | 5054 } else if ((cur != 0x5B) && (cur != 0x5D)) { |
| 5055 end = CUR_SCHAR(ctxt->cur, len); | 5055 end = CUR_SCHAR(ctxt->cur, len); |
| 5056 } else { | 5056 } else { |
| 5057 ERROR("Expecting the end of a char range"); | 5057 ERROR("Expecting the end of a char range"); |
| 5058 return; | 5058 return; |
| 5059 } | 5059 } |
| 5060 NEXTL(len); | 5060 |
| 5061 /* TODO check that the values are acceptable character ranges for XML */ | 5061 /* TODO check that the values are acceptable character ranges for XML */ |
| 5062 if (end < start) { | 5062 if (end < start) { |
| 5063 ERROR("End of range is before start of range"); | 5063 ERROR("End of range is before start of range"); |
| 5064 } else { | 5064 } else { |
| 5065 NEXTL(len); |
| 5065 xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg, | 5066 xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg, |
| 5066 XML_REGEXP_CHARVAL, start, end, NULL); | 5067 XML_REGEXP_CHARVAL, start, end, NULL); |
| 5067 } | 5068 } |
| 5068 return; | 5069 return; |
| 5069 } | 5070 } |
| 5070 | 5071 |
| 5071 /** | 5072 /** |
| 5072 * xmlFAParsePosCharGroup: | 5073 * xmlFAParsePosCharGroup: |
| 5073 * @ctxt: a regexp parser context | 5074 * @ctxt: a regexp parser context |
| 5074 * | 5075 * |
| (...skipping 3088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8163 xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt) { | 8164 xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt) { |
| 8164 if (ctxt == NULL) | 8165 if (ctxt == NULL) |
| 8165 return(-1); | 8166 return(-1); |
| 8166 return(ctxt->nb_cons); | 8167 return(ctxt->nb_cons); |
| 8167 } | 8168 } |
| 8168 | 8169 |
| 8169 #endif /* LIBXML_EXPR_ENABLED */ | 8170 #endif /* LIBXML_EXPR_ENABLED */ |
| 8170 #define bottom_xmlregexp | 8171 #define bottom_xmlregexp |
| 8171 #include "elfgcchack.h" | 8172 #include "elfgcchack.h" |
| 8172 #endif /* LIBXML_REGEXP_ENABLED */ | 8173 #endif /* LIBXML_REGEXP_ENABLED */ |
| OLD | NEW |