Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.compilers    |    Compiler construction, theory, etc. (Mod    |    2,753 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,351 of 2,753    |
|    Stefan Monnier to All    |
|    Re: Leftmost longest match with DFA sear    |
|    13 May 08 04:51:39    |
      From: monnier@iro.umontreal.ca              >> 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.       > [snip]       >> Stefan              > I've used the approach to compile a DFA for the reverse RE, say ER, and       > first match .*ER on the reverse text to find the leftmost anchor point.       > Then match RE from that point to find the longest span.              Interesting. But doesn't it basically force you to scan the complete text?       That can be impractical.                      Stefan              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca