akbkhome

Status 07 Jan 2003

At the moment I'm running down the direction of writing it all in PHP, (although I'm referencing C# sources in mono alot).

The main codebase is based around simple compiling of C# code, which I did some quick tests, and changing the tokenizer/grammer to support most of PHP doesnt seem that difficult. (and hopefully means that PHP can inherit alot of cool stuff from C#)

so I currently have:
a) Tokenizer in PHP, (based on cslex) - which parses C# code
b) Parser in PHP (based on jay) - which parses C# code
c) The tree nodes in PHP (using treecc) - which again is building C# nodes (which are closely related to CIL from what I gather... (about 60% done)

At this point, the tree nodes, are baren, except for the definition structure (and a little bit of code to stuff in into a database, so I can build a simple navigator for the current mono code

It is feasible to modify the tokenizer and parser at this point to read PHP, rather than C#, and just change the tree objects, to output c# code, but since I dont believe the actual generation of CIL directly is going to be that difficult (Famous last words....).. I was attemping to go for that goal at the moment,
eg. when I can get the Parser to bulid a tree correctly  (or at least close) for C#, then I can fork the code to create a PHP# parser/tokenizer...

- obviously using the treecc tool, it is feasible to have 1 set of file for each output language (that just provide methods for the nodes) so the same parser  can output CIL, C#, Java bytecodes, or Parrot... (thats the cool thing about treecc)...

As far as I can see, the most complex issue in all this is still going to be variable variables... :).. which may have to be limited to $object->$var, rather than $$var ... (and only works on 'defined' variables...)

Hopefully this week I'll look at releasing the first lot of code (which may not do that much.... - other than generate the pretty web site :)

hi, how's the progress on the php-gtk project coming? Need some motivation? I wnt to build a compiled application in php-gtk to interface out hosting site to do support tickets, live chat, and other misc tasks on windows and linux. I would be willing to sponsor this php compiler project if you are willing to continue it. Do you accept USD?
#0 - ( Link ) on 12 Apr 2004, 17:18 Delete Comment

Add a comment (requires javascript!)

Name
Email
Homepage
Comment
 

Edit Document | Create Page:
Contact me at alan@akbkhome.com