BCD XML 2 D (Hi Gregor)
Gregor Richards
Richards at codu.org
Fri Jun 2 10:42:07 PDT 2006
BLS wrote:
> Hi ,
> A few month ago I am playing with the idea to create an Java2XML Tool in
> order to use XML as intermediate language to translate Java into D. I found
> an allready existing tool, but it only supports Java 1.3 and the generated
> XML was not well formed. Anyway, Using ANTLR and the existing Java 1.5
> Grammar I should be able to create a full working Java 1.5Parser . This
> Parser will further enable me to create adequate XML representations....
> XML to D ! At this point I am a little bit helpless and unexperienced, so I
> would like to ask you, or somebody else of course , for advice, hints,links,
> in other words help.
>
> Bjoern
>
>
Honestly, I don't think I could help you much from a high-level view.
With specifics, maybe, but since you're making a porter and I'm making a
binder, they're actually quite different. You won't have to mess with
gobetween functions and the ilk, but I don't have to mess with any real
code.
Most features of Java are supported by D in a somewhat direct fashion,
so I suspect that many parts of the XML->D translation will be somewhat
trivial. Just write parser functions for each type of XML node that
outputs the appropriate D code, and since the structure is fairly
similar, much of it will probably work.
But like I said, our projects, while they seem similar, are actually
fundamentally different (porting vs binding), so I'm not sure how much
help I can be.
- Gregor Richards
PS: Best advice: Just dive in and do it ^^
More information about the Digitalmars-d
mailing list