Hey, I am trying to create something like Lua but c++. What I want to do is create an Engine that calls a txt file and then outputs it in c++ so that I do not have to compile it every time and I can edit my source in notepad if I do not have a complier on me.

Is this possible and how? Thank you :)

Recommended Answers

All 10 Replies

If you are a C++ developer as your signature states that should not pose that much of a problem, or am I misunderstandng what you ar asking?
Please refrase, so I can understand what you are trying to say.

What I want to do is display the actual codes rather than the line of text.
For example:

cout << variable ;

and it to actually print the variable rather than it print

"cout << variable;"

if that makes sense lol?

Thanks :)

From what im reading it sounds like you would like to create a compiler?

Yeah, like that :P

So I can just write in a text file and run a application called "Engine" and it complies :) Thanks

At first it sounds like you want a script interpreter, then a code generator; then a paradox almost or just weirdly written statements.

Interpreter = easy enough.
Code Generator = bit of challenge.
Compiler = lot of experience, or maybe get a degree in CS.

mm, I dunno.. It's what lua uses?

If it's Lua you like, why not stick to Lua?

Want to create my own. So if c++ is
cout << "Hi";
Mine would be:
Say ("Hiya");

It works and everything, just want to be able to code it in notepad and then it be executed using c++

So a script interpreter?

I think what he wants is somthing like g++ that will read a notpad document and compile it. Rather than having to use a whole C++ compiler. This way you will be able to make a program that programs other programs. Am i right? If so i dont know how to do that. But from what they were recomending, you might want to just make your own compiler, based off of C++ and maybe made in c++.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.