Can you define "fairly easy" and "grunt work" please?  :)

I did see both projects, but I was not able to find information
about what was complete versus what remained, for both the code
generation target and the runtime.  I guess my whole point is, if
all the grunt work can be avoided, why not spend our time where
it's needed?

Just to make sure we're all on the same page, the idea is: wrap
the existing runtime library into a PHP extension so that the
C or C++ API is available to native PHP code at runtime, just
like the mysql_* functions or the ZipArchive class.  Then add a
generation target that produces native PHP code that uses the API
exposed through said extension.

It should be faster even than cached PHP bytecode, and the work
that already goes into the maintenance of the C/C++ runtime
libraries would not need to be duplicated.

Unless, of course, it would take less time to finish what you
have started.  :)


On Wed, Oct 07, 2009 at 10:14:09PM +0530, Sidharth Kuruvila wrote:
> Hi,
> 
> It's fairly easy to port antlr to php, though it does involve lots of grunt
> work. I've already done some work on a php runtime if you are interested in
> looking at that.
> 
> http://code.google.com/p/antlrphpruntime
> 
> Yauhen Yakimovich was looking at this too, not sure how far he's gotten.
> 
> Regards Sidharth
> 
> On Wed, Oct 7, 2009 at 9:31 PM, Geoff Speicher
> <[email protected]>wrote:
> 
> > I see there is a native runtime for PHP in the works.
> >
> > Has there ever been any discussion as to whether it would make
> > sense, as an alternative to a native PHP runtime, to wrap the
> > existing C (or C++) ANTLR runtime into a PHP module?  In theory,
> > this should provide a fast PHP target, without the work of having
> > to write and maintain a separate PHP runtime.
> >
> > This is something that I am interested in doing in the near term
> > unless someone knows of a reason why it wouldn't work.
> >
> > Geoff
> >
> > _______________________________________________
> > antlr-dev mailing list
> > [email protected]
> > http://www.antlr.org/mailman/listinfo/antlr-dev
> >
> 
> 
> 
> -- 
> I am but a man.
_______________________________________________
antlr-dev mailing list
[email protected]
http://www.antlr.org/mailman/listinfo/antlr-dev

Reply via email to