On 17/11/2007, Steve Bennett wrote:
> 1) Help implement the PHP target.
> 2) Compile to one of the other targets, then translate
> (possibly using an automated tool)
> 3) Translate the original grammar to Lex or whatever.
Mmm. Whichever of these is used, you'd need a note in parser.php that
"DO NOT PATCH DIRECTLY, THIS IS GENERATED CODE" and that parser
changes should be made to the ANTLR or lex grammar.
> 4) Compile to one of the other targets (eg, C) then link to that from the
> PHP code. Apparently that makes it harder for 3rd parties to run, but I
> can't really speak to why.
As I understand it, the issue is hosted copies of MediaWiki where the
user can only use PHP, not compile anything or run arbitrary binaries
or touch httpd.conf.
I expect where a user *does* have compiler access, a C implementation
would be the parser implementation of choice.