jakarta-oro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff McNiel <JMcN...@datacrit.com>
Subject Possible bug with Perl5Matcher and PatternMatcherInput
Date Fri, 31 Aug 2001 19:44:35 GMT
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

Mime
View raw message