brucexs wrote:
>> Here's the error:
>> re.cpp: variable 'pcrecpp::no_arg' can't be auto-imported. Please 
> read
>> the documentation for ld's --enable-auto-import for details.
> 
> I don't understand this.  Does it have something to do with the fact 
> that null_arg is an extern in re.dll which is has it allocation in 
> prcecpp.dll?

Dunno. I don't understand this no_arg business (to be fair, I didn't
try). Anyway, it's a linker error. You would have to read the doc as the
error suggests.

> If it compiles, try a test case.

Doesn't seem to work unfortunately. In particular, this:
local hre = re.create("(\\w+):(\\d+)")
hre.FullMatch("ruby:1234", "s", "i")
seems to leave the variables empty.
Note that I didn't apply your errata... but if those modifications were
really needed, the replace services wouldn't work, right? But they do.

I can get your code to work with reduced functionality if I only use the
exact number of arguments required. For example, to get it to work with
the FullMatch call above I must use:
        (n>0?&s[0]:NULL_RE_ARG),
        (n>0?&s[0]:NULL_RE_ARG));
So there's apparently a problem with NULL after all. My suggestion (var
= new Arg) doesn't fare any better but, unless I'm missing something WRT
the point of these arguments, we have a solution right there... so it
would seem we either have to make a mess of the code (switch/case with
17 FullMatch calls for example) or study the Arg class in order to use
it properly. It's your call.

If you have any doubts about what's not clicking, I suggest you modify
your code to gather the relevant debugging information and dump that
into a PP variable before returning from FullMatch. But any other
practical debugging method is fine with me.

Reply via email to