From: Stefan Matthias Aust Date: 2001-05-27T06:40:06+09:00 Subject: [ruby-talk:15776] Re: java based interpreter and regexes Glen Starchman wrote: >[assumption how java's regex is implemented] >For example: > >class RubyString extends String implements RubyRegex ... Don't think so as it's not possible to extend class String in Java ;-) The pattern matcher class (called java.util.regex.Pattern) is actually an Object subclass and is created using factory methods from java.util.regex.Matcher. I recommend to check out the source (I haven't), a 150 KB file. >Unless we would be seeking 100% Java certification, there is nothing >stopping us from using JNI and creating native regex libraries for each >supported platform. It's very, very ugly, but certainly could be done. Sure, it could be done. But my dream would be an easy-to-deploy single jar distribution which could be droped on any platform we like... >Nor is there anything stopping us from a virtual translation of the >Ruby source tree (except for the YACC ickyness) into pure Java. Well, I spend two hours this afternoon to study what you call YACC ickyness... Currently, I'm in favor to write it from scratch than to try to port that code to Java :-) bye -- Stefan Matthias Aust \/ Truth Until Paradox