Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compilers > Leftmost longes...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 8 Topic 2416 of 2474
Post > Topic >>

Leftmost longest match with DFA search

by Stefan Monnier <monnier@[EMAIL PROTECTED] > May 10, 2008 at 04:36 AM

Can someone point me to articles that discuss various ways to get the
leftmost longest match when implementing regexp search using a DFA?

The "obvious" solution of turning the problem "search for RE" into the
problem "match .*RE" (where I use "match" here to mean "anchored
search") only gives you the leftmost shortest match.

I've already seen http://compilers.iecc.com/comparch/article/07-10-026
where Tcl's approach to the problem is described, which is sadly O(N^2).

I'm also interested in similar approaches using non-backtracking NFAs
(I'm familiar for example with the algorithm used in Plan9's regexp
library).

        Stefan
 




 8 Posts in Topic:
Leftmost longest match with DFA search
Stefan Monnier <monnie  2008-05-10 04:36:57 
Re: Leftmost longest match with DFA search
Daniel Villeneuve <dan  2008-05-11 11:42:22 
Re: Leftmost longest match with DFA search
Stefan Monnier <monnie  2008-05-13 04:51:39 
Re: Leftmost longest match with DFA search
Danny.Dube@[EMAIL PROTECT  2008-05-15 11:58:45 
Re: Leftmost longest match with DFA search
"Russ Cox" <  2008-05-12 08:09:04 
Re: Leftmost longest match with DFA search
Stefan Monnier <monnie  2008-05-13 05:02:56 
Re: Leftmost longest match with DFA search
Danny.Dube@[EMAIL PROTECT  2008-05-13 13:58:56 
Re: Leftmost longest match with DFA search
"Russ Cox" <  2008-05-14 16:30:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 1:14:49 CDT 2008.