2003/02/03 by Stijn Vansummeren, Vansummeren, Stijn
Computer Science · #Algorithms and Data Compression #D.3.3 #Databases (cs.DB) #F.1.1 #FOS: Computer and information sciences #H.2.3 #H.2.4 #H.3.3 #I.5.5 #Logic, programming, and type systems #Natural Language Processing Techniques #Programming Languages (cs.PL) #cs.DB #cs.PL
paper · pdf · doi:10.48550/arxiv.cs/0302004
22 pages
arxiv created 2003/02/03 · openalex publication_date 2003/02/03 · arxiv updated 2009/11/30 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28
Regular expression patterns are a key feature of document processing languages like Perl and XDuce. It is in this context that the first and longest match policies have been proposed to disambiguate the pattern matching process. We formally define a matching semantics with these policies and show that the generally accepted method of simulating longest match by first match and recursion is incorrect. We continue by solving the associated type inference problem, which consists in calculating for every subexpression the set of words the subexpression can still match when these policies are in effect, and show how this algorithm can be used to efficiently implement the matching process.