guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PHP language translator for Guile?


From: Jon Herron
Subject: Re: PHP language translator for Guile?
Date: Thu, 25 Mar 2010 11:59:03 -0700 (PDT)

Thanks for the reply.  I agree PHP does have a big standard library, but was 
hoping to get the core semantics working first, then take it from there.  The 
pointers are much appreciated, I'll start to investigate Silex and dig through 
the manual.  I'm sure there will be questions along the way, can't wait to get 
started though.

Thanks again,

Jon

--- On Thu, 3/25/10, Andy Wingo <address@hidden> wrote:

> From: Andy Wingo <address@hidden>
> Subject: Re: PHP language translator for Guile?
> To: "Jon Herron" <address@hidden>
> Cc: address@hidden
> Date: Thursday, March 25, 2010, 11:20 AM
> Hi Jon,
> 
> On Thu 25 Mar 2010 02:58, Jon Herron <address@hidden>
> writes:
> 
> > I have an interest in writing a PHP interpreter in
> Scheme and have spent
> > the last couple of days evaluating various Scheme
> implementations to
> > use. After looking at Guile for a bit it appears there
> is a framework
> > for implementing languages besides scheme itself (I
> noticed ecmascript
> > and brainfuck are the in tree), then after checking
> out the website some
> > more I noticed PHP was mentioned as a desired language
> to be translated
> > to Guile. Is this still true? If so I would really
> like to take a crack
> > at adding this feature. I am very new to this type of
> development but
> > feel this would be a great dive to take.
> 
> Sounds interesting!
> 
> Creating a good PHP implementation would be a lot of work,
> because PHP
> users expect for there to be a big standard library. But if
> you just
> wanted to implement the core semantics, it shouldn't be
> that
> difficult -- a couple months' work, I would imagine.
> 
> I hand-wrote a lexer for ECMAScript, but you might want to
> investigate
> Silex, a lexer generator; then use the LALR-SCM library
> that the ES
> compiler uses to parse PHP. From there you compile to
> tree-il, then
> write whatever pieces of a runtime that you need.
> 
> The ES compiler is really the reference here, but it is not
> as clean as
> it could be. Apologies for that, and happy hacking!
> 
> Andy
> 
> ps. Check Guile out from git, build the manual, then look
> in the "Guile
> Implementation" chapter for how to implement another
> compiler.
> -- 
> http://wingolog.org/
> 


      




reply via email to

[Prev in Thread] Current Thread [Next in Thread]