So I would like to write my own web compiler using either Java, JavaScript or PHP. What compiler should I use to write my new compiler and how do I go about doing this?

For example:
Rasmus Lerdof created PHP by Writting Perl, C, C++, Java, Tcl.

How do I get writing this in Java. Should I use C# for the programming or what?

Many Thanks, Robert Summers.