Closed GoogleCodeExporter closed 9 years ago
I would be happy to add a link to
http://code.google.com/p/re2/wiki/Install?tm=4
when the code is done.
Thanks!
Original comment by rsc@swtch.com
on 30 May 2011 at 9:02
Thank you very much for the reply! I'm still testing the wrapper, and intend
also to submit it to the Eiffel community for further scrutiny. When it's
ready, which shouldn't be long, I will post it on SourceForge and let you
know the location. I think the RE2 wrapper will be a very useful addition to
the Eiffel library. I also think the Eiffel implementation makes RE2 that
much better.
One of the advantages of Eiffel is its cross-platform portability. Is there
any news on the Windows port of RE2? Much as I prefer Linux, an Eiffel
wrapper for RE2 that also runs on Windows would be even more valuable.
David Jenkins
Original comment by kidlat.i...@gmail.com
on 1 Jun 2011 at 11:35
Hello! I am happy to report that an Eiffel wrapper for RE2 is available for
general use. There is a SourceForge project hosting the wrapper, located at
http://sourceforge.net/projects/eiffelre2/. To checkout the code from
SourceForge using Subversion, use this command:
svn co https://eiffelre2.svn.sourceforge.net/svnroot/eiffelre2/trunk
I've also attached an archive of the Eiffel files.
This is the first project I have created in SourceForge, so please let me
know if you find anything that should be corrected or improved.
Of course I would be very happy if the wrapper could be mentioned on the RE2
project home page.
I'd like to point out a few aspects of the Eiffel wrapper that you might
find interesting.
1. Within the past several years the Eiffel language has been enhanced to
include compile-time void safety checks. Code written using the new void
safety syntax, libraries and compiler options will not encounter run-time
null reference errors--the compiler will detect and flag those errors.
(Those of us who are fans of Eiffel believe this is a major accomplishment
and like to brag that it makes Eiffel the most reliable language suitable
for applications large and small.) Because there is still legacy code not
converted to void safety, I've included both a void safe and non-void safe
implementation of RE2. The differences are minor.
2. By convention, Eiffel applications follow the principle of
Command-Query Separation (CQS). Adhering to CQS means that only procedures
are allowed to change the state of an object or objects passed as
parameters. Functions (routines that return a value) can only reflect the
state of the object and not affect it. Although the compiler does not
enforce this convention, there are a number of good reasons for following
it, primary of which is avoiding side effects that could compromise the
software contracts written in the code. Implementing CQS in the Eiffel RE2
wrapper led to some interesting results. For example, RE2's "FullMatch" and
similar static member functions are implemented in the wrapper as procedure
calls without parameters or a return value. The text and pattern to be
matched are supplied when an Eiffel RE2 object is instantiated;
a Boolean attribute ("matched") is set to the result of the match; and any
subpatterns are automatically detected and added to a collection attribute
("matches"). I think this leads to a very clean and usable implementation.
Eiffel is designed and implemented to be platform independent. Much as I
prefer Linux, the Eiffel RE2 wrapper really needs a Windows implementation
to reach the widest audience. Could you let me know when RE2 is Windows
ready? I'll then revise the wrapper to include it.
Thank you for your interest.
Dave Jenkins
Original comment by kidlat.i...@gmail.com
on 15 Jun 2011 at 5:23
Original issue reported on code.google.com by
kidlat.i...@gmail.com
on 28 May 2011 at 12:11