Re: PHP compiler

From: Andreas Rueckert (a_rueckert_at_gmx.net)
Date: 03/09/04


Date: 9 Mar 2004 19:46:53 GMT

On Tue, 9 Mar 2004 10:15:31 +0000 (UTC),
Nikola Skoric <nick-news@net4u.hr> wrote:

--<snip>--

>Yes, I'm thinking about compiling to MSIL (.NET Framework language) because
>of all the built in methods that would minimize the effort of writing the
>built in functions. But, anyway, my compiler doesn't have to have more than
>15 built in functions, my aim is to show to my teacher that I understand the
>way compilers are dedigned, no to build a full scale compiler able to whash
>the dishes...

We were working on a Antlr parser for PHP, that is still incomplete yet.
But it does not actually contain any builtin PHP methods. It would just
parser to the point, where it's clear, that the current token is the name
of a builtin method. Then it should lookup the name in a list of methods,
that would reference the code to execute that method. So you could add
new methods dynamically without changing the parser.

Ciao,
Andreas



Relevant Pages

  • Re: PHP compiler
    ... >built in functions. ... But, anyway, my compiler doesn't have to have more than ... We were working on a Antlr parser for PHP, ... But it does not actually contain any builtin PHP methods. ...
    (alt.php)
  • Re: Some clarification on "Pre-Parsers" and other bits
    ... the "C" you are talking about is a language. ... would be confusing) that is a parser for the C language. ... A typical compiler ... the input is syntactically correct. ...
    (alt.lang.asm)
  • Re: Generating a simple hand-coded like recursive descent parser
    ... compiler is for an existing BASIC language. ... hand-coded recursive descent parser? ... I see no reason to use that to bootstrap a compiler. ... There's no specific algorith to build the AST. ...
    (comp.compilers)
  • Re: Has anyone hand-written a scanner/parser module?
    ... tools to create scanner/parser modules for their compiler projects. ... was wondering if anyone has developed a scanner or parser that they ... personally hand-wrote? ...
    (comp.compilers)
  • Re: What is the fastest method of parsing scheme?
    ... So slow that making the parser 10% faster ... reader for my compiler, I did not have efficiency in mind. ... wanted to write the most straight-forward code that takes the least ... a parser than to write it in Scheme and let your compiler do its ...
    (comp.lang.scheme)