[EMAIL PROTECTED] wrote:
> 
> --
> 
> On Mon, 24 Jul 2000 13:19:51   Joshua Chamas wrote:
> >Until I write a VBScript to perl parser, yes you can only
> >use perl under Apache::ASP.
> 
> Ok, so are you actually going to write a VBScript to perl parser?  I was actually 
>thinking of undertaking this project myself, but I've never written a lexer or a 
>parser or anything like that.  If you _are_ going to do this I'd be glad to help.  If 
>not, I'm probably going to get started with it anyways.  I realized a huge need for 
>something like this since I've been working on a large site (high volume + large 
>codebase) converting from WinNT/ASP to Solaris/Perl/CGI (with mod_perl of course).  
>I've written a _really_ simple script that converts stuff like "For i = 1 To 10" to 
>"for (1..10) {" etc., but it's of course really flaky and unreliant (although it 
>knocks out about 90% of the manual code conversion).
> 
> Ok, so what was the point again??  Oh yeah, are you really going to do this?  :-)  
>Or is someone else already in the process?
> 

Like Matt suggested you can start with his simple vbscript to 
perlscript converter, but I would recommend to do a really 
complete job that you use a full on grammar and something 
like Parse::Yapp to do the parse tree.  I personally would
find this approach the most enjoyable, but it may be that
the parse times that result from this are too slow, and you
might need to take the approach that Matt did and brute
force your way through the code to render to perlscript.

I have not started on this, and likely would not for a while
yet so feel free to have at it.  If you decomped this 
functionality into a module like Parse::VBScript or
some such ( I don't know about this CPAN namespace ) and
presented an interface like:

  my $vbparser = Parse::VBScript->new($string_ref);
  my $perlscript_ref = $vbparser->perlscript();

this interface would allow me to use your code from
Apache::ASP easily by passing the VBScript code into
the parser, and get the equivalent perlscript.  The 
passing by ref would just save on some of the string 
copying that may be unnecessary otherwise.

There is a HUGE need for this vbscript emulation, and this 
would greatly add to the functionality of Apache::ASP, so 
many thanks ahead of time!

-- Joshua
_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks >> free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

Reply via email to