Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
RXPY 0.0.0
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
andrew cooke  
View profile  
 More options Jun 22 2010, 10:00 pm
From: andrew cooke <and...@acooke.org>
Date: Tue, 22 Jun 2010 19:00:21 -0700 (PDT)
Local: Tues, Jun 22 2010 10:00 pm
Subject: RXPY 0.0.0

I've just released the first (very much alpha) version of RXPY - a
regular expression library for Python.  http://www.acooke.org/rxpy/

This will eventually be used by Lepl (and will simplify the line aware
code, amongst other things).

You can ignore it for now; I just wanted to show why development of
Lepl itself has slowed a little...

Andrew


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jasper St. Pierre  
View profile  
 More options Jun 23 2010, 4:56 pm
From: "Jasper St. Pierre" <jstpie...@mecheye.net>
Date: Wed, 23 Jun 2010 16:56:35 -0400
Local: Wed, Jun 23 2010 4:56 pm
Subject: Re: [LEPL] RXPY 0.0.0
My friend had attempted to do something like this, he had some interesting
ideas, such as applying matching to other objects:

http://bitbucket.org/devin.jeanpierre/re0/src/tip/re0/test/test_patte...

Unfortunately, the hardest part of this sort of thing is backtracking.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrew cooke  
View profile  
 More options Jun 23 2010, 5:22 pm
From: andrew cooke <and...@acooke.org>
Date: Wed, 23 Jun 2010 17:22:04 -0400
Local: Wed, Jun 23 2010 5:22 pm
Subject: Re: [LEPL] RXPY 0.0.0

Oh, I didn't know about that (and I'm sorry that Lepl seems to have
discouraged further development!).  From the comments there it sounds very
similar.  My initial motivation was exactly the same - to process arbitrary
sequences.  It's silly that "re" doesn't (but understandable, I guess, since
it's written in C).

Incidentally, RXPY will match arbitrary objects and do backtracking.  For
example, these tests -
http://code.google.com/p/rxpy/source/browse/rxpy/src/rxpy/direct/_tes...
- show it matching a list of integers (not very exciting, I know, but you need
to define a new "alphabet" for teh objects, and for initial testing an
alphabet for 0-9 was easiest).

What made things easier was that (1) LEPL had something similar, so this is
the "second time round", which is a big help and (2) it turns out that the
Python re package has an amazing set of tests, which really helped make sure
it worked.  The hardest part this second time round was just getting all the
details right (the re package has a lot of little features I had never used
befire and RXPY reproduces them all).

Anyway, I should read more about re0 - I guess there are some good ideas I
haven't thought of that I should learn...

Thanks,
Andrew


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jasper St. Pierre  
View profile  
 More options Jun 23 2010, 5:31 pm
From: "Jasper St. Pierre" <jstpie...@mecheye.net>
Date: Wed, 23 Jun 2010 17:31:18 -0400
Local: Wed, Jun 23 2010 5:31 pm
Subject: Re: [LEPL] RXPY 0.0.0
Ah, his approach and your approach are a bit different.

Instead of parsing an expression as a string with an alphabet, he took
the longer route of wrapping the object and calling various methods
like so: Atom(23).star()


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Devin Jeanpierre  
View profile   Translate to Translated (View Original)
 More options Jun 23 2010, 11:56 pm
From: Devin Jeanpierre <jeanpierr...@gmail.com>
Date: Wed, 23 Jun 2010 20:56:02 -0700 (PDT)
Local: Wed, Jun 23 2010 11:56 pm
Subject: Re: RXPY 0.0.0
I am the friend that wrote re0. Truthfully re0 doesn't do anything
above and beyond what is described in the (great) Russ Cox article at
http://swtch.com/~rsc/regexp/regexp1.html , so if you want to learn
about it, there's the place to go. I did try to keep the Python source
readable and idiomatic, though.

re0 is completed to the level described in his first article, but no
further; this makes it somewhat of an experiment. Regular expressions
aren't useful without submatch extraction. Cox more recently wrote
http://swtch.com/~rsc/regexp/regexp2.html , which offers a revised
algorithm (previously described in the form of C source code), and
http://swtch.com/~rsc/regexp/regexp3.html . re0 was written before
these two articles, and is somewhat lacking.

I'm not sure to what degree you want to integrate NFA search into
RXPY, although I do see that it's on the page as a desirable goal. The
mismatch in features/performance of backtracking and automaton search
might present interesting architectural challenges/goals. An engine
that defaults to a relatively full-featured automaton algorithm and
falls back to backtracking search is presented by Cox as ideal.

Also, I think the PyPy project may be interested in later versions of
RXPY; provided it's fast and fully compatible with re (or can be
wrapped to be compatible, e.g. with a dummy module), it could easily
replace their current re module. It might be worth chatting to them
about this.

I'll be looking at RXPY in detail tonight; I'd be very interested in
contributing.

Devin Jeanpierre

On Jun 23, 5:31 pm, "Jasper St. Pierre" <jstpie...@mecheye.net> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrew cooke  
View profile  
 More options Jun 24 2010, 7:06 am
From: andrew cooke <and...@acooke.org>
Date: Thu, 24 Jun 2010 04:06:42 -0700 (PDT)
Local: Thurs, Jun 24 2010 7:06 am
Subject: Re: RXPY 0.0.0

Ah!  The "final" Russ Cox article is my main target :o)

I'm working on documentation at the moment (particularly code comments
for main classes), so things should be easier to understand over the
next few days.  But the hope is that if you (or anyone else!) wants to
work on an engine (to implement, say, one of the Russ Cox approaches)
then you should be able to add that without needing to write a new
parser or all the extra little methods that are neccessary to get full
compliance with the re API.

Basically, you should only need to write the very core - something
that takes a graph of opcodes and an input string, and returns a
match.

However, I'm not quite there yet.  In particular, there's only one
engine (a simple direct implementation, that does backtracking with a
stack, doesn't use a state machine, etc etc) the support for the re
API and the engine are still mixed together.

Andrew
On Jun 23, 11:56 pm, Devin Jeanpierre <jeanpierr...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrew cooke  
View profile  
 More options Jun 24 2010, 7:09 am
From: andrew cooke <and...@acooke.org>
Date: Thu, 24 Jun 2010 04:09:02 -0700 (PDT)
Local: Thurs, Jun 24 2010 7:09 am
Subject: Re: RXPY 0.0.0

PS Yes, Pypy is also a target :o)  There was some recent work,
implementing a simple matcher in RPythin, but it was very incomplete.
This work is complete (full re API) but is not in RPython.  Luckily,
again, only the engine needs to be in RPython for speed, so only a
small amount of code will need to be modified.

On Jun 23, 11:56 pm, Devin Jeanpierre <jeanpierr...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
andrew cooke  
View profile  
 More options Jun 24 2010, 8:14 am
From: andrew cooke <and...@acooke.org>
Date: Thu, 24 Jun 2010 08:14:07 -0400
Local: Thurs, Jun 24 2010 8:14 am
Subject: Re: [LEPL] Re: RXPY 0.0.0

Also, I will try to refresh the documentation periodically.  I've just updated
the website (Overview has more text, API is starting to be a bit more
readable).

Andrew


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "RXPY 0.0.1" by andrew cooke
andrew cooke  
View profile  
 More options Jun 26 2010, 9:59 pm
From: andrew cooke <and...@acooke.org>
Date: Sat, 26 Jun 2010 21:59:59 -0400
Local: Sat, Jun 26 2010 9:59 pm
Subject: RXPY 0.0.1

I've just released 0.0.1 of RXPY.  This has been refactored, deocumented and
generally cleaned up so that it might be possible for someone to write a new
engine without too much trouble.  See
http://www.acooke.org/rxpy/new-engine.html

Andrew


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »