[xml] xmlregexp progressive regexp evaluation usage.



        I'm using libxml2 (version 2.5.3) for a new program, and I'd like
to use xmlregexp for the tokenizer I'll need.
        xmlRegexpExec() works fine. GCC is 2.95.4. I'm not using any -O*.

        However, I can't get the progressive evaluation to work, even
after looking at all places where I found it in libxml2's source code.

        First, "exec" is a compiled regexp from "a+". (I've tried other
expressions, with the same results)

  xmlRegExecCtxtPtr exec = xmlRegNewExecCtxt(regexp, NULL, NULL);
  result = xmlRegExecPushString(exec, (xmlChar*)"a", NULL);

        "exec" is non-null.
        "result" is always -1.

        After these lines, doing xmlRegexpExec(regexp, (xmlChar*)"a")
returns 1.


        Could you tell me what I'm missing?

        Thanks,
--
        Alberto González Palomo
        Toledo, Spain.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]