Suitable libraries for implementing a "push"-type matching engine?

A

Andrew Warkentin

I am trying to write a matching engine for a matching language for a
filtering proxy compatible with that of The Proxomitron. The matching
language is basically an extended superset of shell-style globs, with
functionality comparable to regexps (see
http://www.proxomitron.info/45/help/Matching Rules.html). Can anyone
recommend any Python libraries that would be suitable for my purposes? I
think that I can implement a parser for the patterns themselves with
pyparsing, but I'm not sure if anything suitable for finding matches in
an input stream of text exists. I don't want to reinvent the wheel if I
don't have to.

A matching engine for a filtering proxy has to be able to handle partial
input and "hold" data until enough is received to determine whether
there is a match (or else the entire document would have to be held
until the end is reached, filtered, and then sent all at once to the
remote client, and that would make it appear much less responsive and
possibly break some applications). I also need to be able to associate
specific patterns (matching commands and certain backslash-escapes) with
functions that are called to determine if they match.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top