http://www.tizag.com/javascriptT/jav...ng-replace.php
I used that magic thing called Google.
Anyway, this program sounds a little useless, and by that I mean totally useless. Why not write in JavaScript in the first place? And what twisted excuse for syntax is [?echo <<? Besides, a series of replace statements != a compiler.
ninja9578: I used JavaCC and JJTree last time I wrote a compiler in Java, never heard of JTB though.
 Originally Posted by ninja9578
I thought you were trying to convert to Javascript  You could do that with java. As far as I know there is no grammars for javascript.
Why would JavaScript/ECMAScript/JScript etc. (they are all slightly different things) not have grammars? That would be unfair on the browser writer, would it not? Almost every major language since Algol has had an (E)BNF grammar, with a few notable exceptions such as, I think, pre-ANSI C. As such the Java grammar which name you cannot recall is likely called the "Grammar of the Java Programming Language". They don't give these things fancy names, you know.
AFAIK he's writing it in JavaScript and the output will be in JavaScript. For what it is (a long series of replace statements), JS is a reasonable choice, a good one even given it's mature regex support, given that it is a Web application.
|
|
Bookmarks