Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I've searched the internet but find limited information on writing programs that build other unique programs. Any links
would be appreciated. I mean I want to build actual code with a program such as JavaScript writes other JavaScript. I have been able to do this with a limited success using php and JavaScript but I rarely get code that compiles and runs Thanks for your time.

What I have tried:

I've Google searched the internet.
Posted
Updated 16-Aug-18 13:44pm
v2
Comments
OriginalGriff 29-Jul-18 3:30am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with. And we have no idea what you are trying to achieve!

And if you really mean to do this in Javascript, think again ... you have no direct access to the client file system in JS.

Use the "Improve question" widget to edit your question and provide better information.

Programs that create other programs are usually called compilers. So you need to Google for the components required to convert source code to object code. Start with lex and yacc, which are used in the parsing of source statements, Apache Ant - Welcome[^] etc.
 
Share this answer
 
Quote:
I've searched the internet but find limited information on writing programs that build other unique programs.

The name for those programs is 'compiler'.
Writing a compiler is not for beginners, it is advanced topic.
if you want to learn about compilers, I recommend the dragon book:
Dragon Book - Wikipedia[^]
Compilers: Principles, Techniques, and Tools - Wikipedia[^]
 
Share this answer
 
I think you will have better luck with "code generation" using C# or Java; versus "JavaScript".

Java Code Generation (Metaprogramming, Reflection, wtv) - Stack Overflow[^]

Using the CodeDOM | Microsoft Docs[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900