From: Eric Mahurin Date: 2005-05-31T00:24:58+09:00 Subject: Re: cursor-0.6 --- Simon Strandgaard wrote: > On 5/30/05, Eric Mahurin wrote: > > --- Simon Strandgaard wrote: > [snip] > > > I have made a regexp lib where you can supply your own > > > iterators if you have string like classes. > > > > > > > > > http://rubyforge.org/frs/download.php/1311/regexp-engine-0.12.zip > > > > > > Maybe it has interest? > > > > Possibly. From what I could tell this is pure ruby. So it > > offers a lot more flexibility than the C Regexp. But, you > > lose all of the speed advantage, right? > > Yes, its far from the same speed as C. > > > > For my purposes, that > > was the only reason I wanted to incorporate Regexp - > because > > Grammar will be able to do Regexp like stuff - and more. > > A grammar class sounds interesting.. > Any examples of usage ? I still don't have a first release of grammar. But, you can look at the predecessor: http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/138450 I changed the name from syntax to grammar because there is already a syntax package for syntax hilighting. The usage for the Grammar classes will be very similar. Each type of Grammar is a derived class - Sequence, Alternation, Repeat, etc. === is used to match a Grammar against a Cursor. And I also put stuff in String and Range to make creating a Grammar even easier. __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new Resources site http://smallbusiness.yahoo.com/resources/