pith. sign in

arxiv: cs/0302004 · v1 · submitted 2003-02-03 · 💻 cs.PL · cs.DB

Unique Pattern Matching in Strings

classification 💻 cs.PL cs.DB
keywords matchmatchingpoliciesfirstlongestpatternprocesssubexpression
0
0 comments X
read the original abstract

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.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.