Is there any (E)BNF parser out there which is able to generate XML trees of the AST?
Rephrasing: what is the quickest way to compile an (E)BNF defined language into some sort of XML?
Bonus: Using Javascript :-)
Is there any (E)BNF parser out there which is able to generate XML trees of the AST?
Rephrasing: what is the quickest way to compile an (E)BNF defined language into some sort of XML?
Bonus: Using Javascript :-)
Not free, but generates XML: DMS Software Reengineering Toolkit. Available with a variety of predefined langauge defintions (C, C++, C#, Java, COBOL, Javascript, XML, ...).
The question is, what will you do with that? If you are processing some langauge seriously, you need much more than just the AST (almost always you need a symbol table).
It seems my best bet so far is to use AntLR and the StringTemplate Interface. It also supports a JavaScript target.