APM: parsing javascript

Sam Foster austin.pm at sam-i-am.com
Wed Oct 18 07:25:18 PDT 2006


hi all,
I'm looking for a way to parse - but not execute - some javascript.
I'm building up a dependency chain - my javascripts use a pair of 
functions "provides" and "requires" to ensure pre-requisites are loaded 
(these is using the dojo toolkit fwiw). I want to have perl follow this 
chain, and in this case build a custom js library that concatenates all 
the right files in the right order.
I'm looking at the JavaScript.pm module, which I think uses the 
SpiderMonkey interpreter. Mark I think mentioned a way to use jars from 
within a perl program - that might let me use the Rhino interpreter - 
what was that Mark?

As I'm not trying to parse all possible javascript  but just a couple 
statements, I could just do this myself I suppose. Does this kind of 
thing exist elsewhere though. Seems like it might.

thanks,
Sam



More information about the Austin mailing list