So I want to parse JavaScript source code to automatically generate Fantom code that binds to it. Any ideas?
andyFri 2 Jul 2010
Not sure I followed that - you want to generate the js that the Fantom compiler would have generated - but from your own js code?
dfreireFri 2 Jul 2010
It's not that :-)
I have an existent js library that exposes an enormous amount of public accessible objects and functions. I want to generate fantom code that encapsulates each callable point, meaning that the fantom implementation will call the appropriate js equivalent, and return the results. Like a proxy.
The benefit is that I can then write fantom applications that use the encapsulated js lib.
So, essentially I'm looking for parsers (like antlrfor ecmascript) which I can use to interpret the js lib code and generate the fantom code. But, as I haven't tried anything of this sort with javascript, maybe someone with experience can provide some hints.
dfreire Thu 1 Jul 2010
So I want to parse JavaScript source code to automatically generate Fantom code that binds to it. Any ideas?
andy Fri 2 Jul 2010
Not sure I followed that - you want to generate the js that the Fantom compiler would have generated - but from your own js code?
dfreire Fri 2 Jul 2010
It's not that :-)
I have an existent js library that exposes an enormous amount of public accessible objects and functions. I want to generate fantom code that encapsulates each callable point, meaning that the fantom implementation will call the appropriate js equivalent, and return the results. Like a proxy.
The benefit is that I can then write fantom applications that use the encapsulated js lib.
So, essentially I'm looking for parsers (like antlr for ecmascript) which I can use to interpret the js lib code and generate the fantom code. But, as I haven't tried anything of this sort with javascript, maybe someone with experience can provide some hints.