How to convert JavaScript code to a xml representation of the ast? -
i building xml serializer of javascript abstract syntax trees antlr. generator quite complete know if there conventions issues such as:
- how handle angle brackets in strings or regular expressions?
- how translate if-then-else (e.g. else node inside if 1 or not)?
more generally: such translator exist? there existing xsd xml-based language?
edit
i interested in free tools only.
parsers perform code generation xml , generate xml code readily available:
estools/esvalid: confirm spidermonkey format ast represents ecmascript program
jantimon/handlebars-to-ecmascript: convert handlebars ecmascript ast
estools/estemplate: proper (ast-based) javascript code templating source maps support.
you ask, "does such translator exist?". if question is, "does exist in antlr?" suspect you'll find answer @ antlr.org site. company has such translator issues resolved; if you'd see output sample answer here i'll produce 1 javascript.
here's link xml output java: what ast (abstract syntax tree) object-oriented programming language like?
references
Comments
Post a Comment