R
rnbrady
Hi folks
New around here. This post may be a duplicate, I think I bungled the
previous one.
I've recently started out with XML and XSL and I'm very impressed with
both. My use is non-web in nature. In fact, I'm writing a compiler of
sorts, from high-level spec in XML, with eventual generation of VHDL.
I've made the following observations:
1. Given pure source code (Eg:Java,C++), one could generate an abstract
syntax tree in XML.
2. XML is also apposite for symbol tables and intermediate froms.
3. XSLT can do powerful transformations of said internediate forms.
4. XSL can generate plain text.
I'm wondering wondering what it would take to implement a compiler for
a given language in XML/XSL. More specifically, are there any XSL or
XML based systems that assist in scanning pure source into XML so that
the transformations can begin? Grammar could be provided in marked-up
EBNF. This is probably over-optimistic could the process would need
knowledge of LL/LALR etc.
The alternative approach is to use your standard scanner/parser
generator with it's own (non-interchangable) EBNF and have the action
code generate tagged tokens, giving you an AST in XML.
My questions:
1. Are there any decent XML shema's for EBNF?
2. Are there any tools / XSL extensions to do the above?
3. What are your thoughts on the whole idea?
Best regards,
Richard Brady
New around here. This post may be a duplicate, I think I bungled the
previous one.
I've recently started out with XML and XSL and I'm very impressed with
both. My use is non-web in nature. In fact, I'm writing a compiler of
sorts, from high-level spec in XML, with eventual generation of VHDL.
I've made the following observations:
1. Given pure source code (Eg:Java,C++), one could generate an abstract
syntax tree in XML.
2. XML is also apposite for symbol tables and intermediate froms.
3. XSLT can do powerful transformations of said internediate forms.
4. XSL can generate plain text.
I'm wondering wondering what it would take to implement a compiler for
a given language in XML/XSL. More specifically, are there any XSL or
XML based systems that assist in scanning pure source into XML so that
the transformations can begin? Grammar could be provided in marked-up
EBNF. This is probably over-optimistic could the process would need
knowledge of LL/LALR etc.
The alternative approach is to use your standard scanner/parser
generator with it's own (non-interchangable) EBNF and have the action
code generate tagged tokens, giving you an AST in XML.
My questions:
1. Are there any decent XML shema's for EBNF?
2. Are there any tools / XSL extensions to do the above?
3. What are your thoughts on the whole idea?
Best regards,
Richard Brady