After nearly two years I’ve finally gotten around to releasing my PHP JavaScript parser, although documentation is still thin on the ground.
The library has been split in two:
- jTokenizer – A JavaScript tokenizer designed to mimic the PHP tokenizer.
- jParser – The fully blown JavaScript syntactical parser which generates a parse tree.
Continue reading…
I’ve been asked how I generate the JavaScript parse table for jParser, so I’m posting the grammar file here for anyone else who’s interested.
↓ JavaScript grammar file for jParser
Continue reading…
I’ve received quite a few emails recently asking me where the code is for jParser.
I’ve had to disappoint so far, because it’s not currently available for download. My web analytics also tells me that a lot of people are finding this blog by Googling “php javascript parser“. There’s clearly a need out there, so I’d better do something about it.
I know why I want a JavaScript parser, but what kind of things might you need it for? What API features/functions would you like to see? Please post a comment and let me know. Watch this space for a release, and in the mean time here’s some food for thought …
Continue reading…
Tim Whitlock's personal site and blog