Re: [Boost-users] follow up on regex questions
OK, I think my earlier concern about greta dropping data was incorrect as it
was
the result of hastily adapting a piece of code for testing- that wouldn't
have
occured before. I went back to verify that boost still gives the same
results
as greta with simpler regexes and still have identical results.
Is there anything that "()" can do to the stack that could be causing flakey
results? This fails on some data ( program hangs or seg faults):
ATG(.)*?(TAG|TAA|TGA) >rule|2|DNA Euk ORF
This works on data I have ( although I thought I saw it failing earlier, I
have yet to see the 1000 other regex's fail in boost ):
ATG.*?(TAG|TAA|TGA) >rule|2|DNA Euk ORF
The working regex's do not have non-terminal "()"- while they may have
"()" these are only at begin or end and include two choices, one of which is
"^" or "|" )
My calling code looks something like this ( again, everything is char* )
while(regex_search(start, end, what, expression, flags))
{
if (which>=what.size())
{ es< From: "John Maddock" Mike Marchywka wrote: Hi,
Thanks for your help in the past. I would normally drop the issue at
this point
until I get my build environment cleaned up
(" My build is messed up, I haven't read the documentation. What is
wrong with YOUR library?" LOL).
but I do have one more question which I believe is related to boost
regex processing.
If someone has a known good regex test program or can point to an
obvious problem
it may be helpful. You mean libs/regex/test/regress/*.cpp ? It would be a good idea to build and run this to verify the sanity of your
setup at least: I still have a suspision that the binaries you are using
are
not compatible with your build options or regex headers, but I can't be
sure. Again, this code seems to work with Microsoft's
greta and boost gives identical results on a longer list of SIMPLER
regexes so I reasonably believe that the problem is due to handling
of more complicated expression ( One caveat, to be complete, is that
greta did seem to return some spurious
results but they are easily filter programmatically, things like
negative location,
but the plausible ones that I have checked manually are right).
However, on this sequence of regexes (regexi?) I get either an abort
OR the program hangs
later on non-sensical execution (I know, "Gee, you have a build
problem and the stack is messed up?"). myboost.cpp114 (GU.*?TACTAAC.{20,40}AG|^)(.*?)(GU.*?TACTAAC.{20,40}AG)
myboost.cpp114 ATG(...)*?(TAG|TAA|TGA)
myboost.cpp114 TATAA.*?ATAAA
myboost.cpp114 (GU.*?TACTAAC.{20,40}AG|^)(.*?)(GU.*?TACTAAC.{20,40}AG)
myboost.cpp114 ATG(...)*?(TAG|TAA|TGA) ( progam hangs in my code or had been core dumping in boost::regex ) What is the text you are matching against? If you can give me a concrete
example I can test it here, but "it hangs" isn't very useful I'm afraid ;-) John. _______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users _________________________________________________________________
Help yourself to FREE treats served up daily at the Messenger Café. Stop by
today!
http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGHM_OctHM...
participants (1)
-
Mike Marchywka