"macabstract" <ma*********@yahoo.co.uk> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
does anyone know of a "reasonably practical" yacc-type parser for
JavaScript?
in the absence of one, i will endevour to write my own starting from
the BNF specification:
http://www.ecma-international.org/pu...T/Ecma-262.pdf
any help/pointers gratefully received...
The DMS Software Reengineering Toolkit has excellent parsers for
Javascript. It is frankly a lot of work to get the details for the
various
Javascript dialects right. DMS also provides considerable
support for custom analysis or transformation on the parsed
code.
We use DMS + these grammars to provide JavaScript source formatting tools,
obfuscation tools (which some folks in this group just can't
get over) and other tools that require deep, detailed access to the
JavaScript
(and/or the HTML page in which it is often embedded),
such as clone detection. An example next tool on which we are
working would be test coverage for JavaScript;
we've already delivered test coverage tools for half a dozen
other languages using DMS.
See
http://www.semanticdesigns.com/Produ...MSToolkit.html
--
Ira Baxter, CTO
www.semanticdesigns.com