[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

cursor-0.6

Eric Mahurin

5/25/2005 4:42:00 PM

I just made another release of the package cursor:

http://cursor.ruby...

I made some slight interface changes to some methods (to
simplify), added a bunch more methods (now even more
Array-like), and added a several more classes (obsoleting one).




__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/...


1 Answer

Caleb Clausen

5/26/2005 5:14:00 AM

0

I am very interested in Cursor for use in Reg. It seems like the sort
of thing to allow Reg's Array-based backtracking pattern matcher to
operate on Strings or Files or whatever else.
(Did you know that I needed this by esp? :) Since you're got your own
lexer/parser/pattern matcher thing, (grammar?) maybe you don't want to
help the competition...

Anyway, cursor isn't quite functional enough for my purposes. Passing
patterns for the length parameter to #get and #set is great, but there
aren't enough pattern types. I think I need the equivalent of
Cursor#===(regexp), which is to say, the ability to compare a Regexp
to a position within a String. Or, if the backing store of the cursor
is a file, you get the ability to compare a Regexp to a File. Someone
was asking for that recently, it's not easy, but it would be great if
your lib did it.... just the ability to regexp against the middle of a
String would make me very happy, tho. I've hacked this up before, but
I think that a reasonably efficient version would require a bit of c
extension.

Ideally, of course, I want to see the ability to compare against a
Reg, particularly the Regs that match multiple array elements. If you
made it work with whatever the equivalent in your system is, that
would be almost as good.

How does Grammar work? I would appreciate if you could write a couple
of paragraphs of high-level overview of Cursor, Grammar, their design
and capabilites and how they're intended to work together.