On Fri, Apr 16, 2010 at 2:24 PM, Gil Barmwater <gbarmwa...@alum.rpi.edu> wrote:
> Mark Miesfeld wrote:
>> On Fri, Apr 16, 2010 at 7:30 AM, Gil Barmwater <gbarmwa...@alum.rpi.edu> 
>> wrote:
>>
>>
>>>OK, now that we're in the appropriate forum, here is the latest update
>>>and first question.
>>
>>
>> Hi Gil,
>>
>> Rick already answered your questions, but I just wanted to encourage
>> you to follow through with this.  At least to the point you have the
>> time or capability for.
>>
>> By that I mean, maybe you can't, for whatever reason, get regex.cls
>> 100% completed.  Don't let that discourage you from generating some
>> patches and incrementally improving what has been started. <grin>
>>
>
> Well, that is why I started where I did - fixing the existing syntax
> errors - since even if I wasn't sure what was meant to be there, at
> least I pointed out that something needed to change.
>
> As to completing it (!!), that will take lots of coaching from Rick as
> he is the only one who knows what else needs to be written.  I'm
> guessing that the design is based on the classes and methods in the JAVA
> implementation for this functionality so if it would be helpful for me
> to look at that code, just give me a link...

Here's a good start for learning about what these classes do:

http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/package-summary.html

My thoughts on implementing this is ooRexx are a little different.
The main actors involved here are:

-- the Pattern class, which loosely corresponds to the Java
equivalent.  Pattern instances are a composite matching engine that
implements a regular expression match.  A Pattern instance is separate
from the syntax that was used to compile the pattern.
-- The Pattern compiler.  The parser is largely written for a
Java-like compiler.  Any other language/syntax can be used to create a
compiler, so I'm planning on implementing this a separate class rather
than as a method on the Pattern class like Java does.
-- The MatchResult class which can be used to retrieve information
about a match attempt.
-- A Parser class similar to the parser I demonstrated at one of the
prior Rexx Symposium.  This will be a parsing context implemented as a
class that implements all of the existing parse operations as methods
and also supports regex matches using Pattern instances.
-- Eventually, an enhancement to the parse instruction to also allow
regular expressions.

Also, there's one additional extension I'm planning on implementing.
That extension will allow expressions to include references to
predefined patterns by name.  This would allow you to build libraries
of predefined matching patterns for commonly used types and use those
patterns within other patterns.  For example, you might create a
library of patterns for all of the Rexx language token types, which
would make it very easy to parse ooRexx programs.

Rick

>
>> --
>> Mark Miesfeld
>>
>> ------------------------------------------------------------------------------
>> Download Intel&#174; Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> Oorexx-devel mailing list
>> Oorexx-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>>
>
> --
> Gil Barmwater
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to