Version: jakarta-oro-2.0.4
problem: using a PatternMatcherInput with a different pattern
on successive calls to
Perl5Matcher.contains(<PatternMatcherInput>, pattern1)
results in the PatternMatcherInput offsets being incorrect (I think)
so that subsequent calls such as
Perl5Matcher.contains(<PatternMatcherInput>, pattern2)
fail when I think they should succeed.
This can be reproduced by changing the file:
jakarta-oro-2.0.4/src/java/examples/prefixExample.java
to use contains() instead of matchesPrefix() in the "first" approach.
I've looked at the code and can't determine the problem
(if there really is one :-)
There seems to have been a relativly big change between 2.0
and 2.0.4 in re the __initInterpreterGlobals business and the
use of [__]currentOffset vs. [__]beginOffset - I suspect something
wrong here - trying to understand the parser code is interesting :-)
Note that it seems to work if you use the same pattern for successive
contains() calls.
Thanks for the great package - Jeff