Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Code Generation

by spurperl (Priest)
on Dec 16, 2005 at 09:36 UTC ( [id://517184]=note: print w/replies, xml ) Need Help??


in reply to Code Generation

I don't think you defined your problem well enough to get detailed advice.

Some points are quite unclear:

  • What is Esperanto ? (I assume you don't mean the spoken language)
  • Did you actually write code that parses Java ? Using a module ? A full parser or some partial regex-hack ?

Anyways, an intermediate representation for Java code, like for any code really, is a syntax tree. For XML, a good internal representation is the one used by Perl's modules - if your XML isn't too sophisticated, the HoAoH(...) approach of XML::Simple may be what you're looking for.

Replies are listed 'Best First'.
Re^2: Code Generation
by hackdaddy (Hermit) on Dec 16, 2005 at 09:54 UTC
    When I said Esperanto, I meant figuratively an intermediate class that can output both XML and Java.

    I am parsing the method signatures of a Java class and creating XML that describes the signature. I am also creating Java from the signatures to create Java code for another Java class.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://517184]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-03-28 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found