On 11/18/07, David Gerard dgerard@gmail.com wrote:
On 17/11/2007, Steve Bennett stevagewp@gmail.com wrote:
- Help implement the PHP target.
On second thoughts, definitely option 1.
http://www.antlr.org/wiki/display/ANTLR3/How+to+build+an+ANTLR+code+generati...
Supposedly "not that hard".
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.
Well yeah. But it wouldn't be parser.php, it would be its own module.
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.
Ah yes.
I expect where a user *does* have compiler access, a C implementation would be the parser implementation of choice.
I don't think it's easily possible to write both implementatinos in the one grammar, but there might be ways of doing it.
Steve