How to make a new scripting language in C++ ?...I need: parser,scanner,grammar,included functions,syntax.Where I can start?. I think I use JavaScript/PHP syntax.

I know you like ambitious projects:

I am going to make OS. And I need help with GUI...how to make an GUI ?...I am not on Windows so CreateWindowEx() doesn't exist.

But I suggest starting of with the easy stuff, hehe. :D

:-)...yes...:-)...I have ideas so I need to ask to you ;-)

This is a C++ forum, ask questions about C++. If you want to talk about software design in general (for instance, what merits your script will have compared to the other scripts already available), go to the Computer Science forum.. I guess.

Anyway, first define your script on paper. How will scripters create variables? How will scripters add them together?

Then write an interpreter that picks a file (or lines anyway) and parses them.

For instance, if you decided that people create integers with "int <name> = <val>;", you can decide to create a map<string, int> which will hold the users and then add one int when such a line is read.

How to make a new scripting language in C++ ?...I need: parser,scanner,grammar,included functions,syntax.Where I can start?. I think I use JavaScript/PHP syntax.

Just before you start to design grammars (the language grammar is the same thing as the language syntax ;)), scanners, parsers, libraries etc - it's a good idea to design A NEW scripting (or what else) LANGUAGE per se. Design before implement...

It's especially valued proposal if "make a new scripting language in C++" means "implement new scripting language interpreter (or JIT compiler, or both) in C++"... or in C... or in Java... or in NEW SCRIPTING LANGUAGE...

Now it looks like I don't know what is it but I want to implement this The Great Nothing in C++!
Probably, the only reasonable reaction is:
Good luck! ( return 0; in C and C++)...

This article has been dead for over six months. Start a new discussion instead.