How would I go about making a scripting language...

This is a discussion on How would I go about making a scripting language... within the C++ Programming forums, part of the General Programming Boards category; I'm going to make a simple game editor with C++/Win32 API... But I need to make a scripting language..I'll start ...

  1. #1
    Rad gcn_zelda's Avatar
    Join Date
    Mar 2003
    Posts
    942

    How would I go about making a scripting language...

    I'm going to make a simple game editor with C++/Win32 API... But I need to make a scripting language..I'll start with only a few commands, though....

  2. #2
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    To start off, you need a well defined grammar for the language - how are variables declared, how are functions declared, how are functions invoked, what types of symbols can follow other types, and in what circumstances.

    Once the grammar is defined, you need a parser (Spirit from the Boost library is a pretty good one, if you don't feel like writing your own). The parser will break it down into structures, and then your program performs certain predefined tasks based on the content of those structures.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reviving my old scripting language.
    By suzakugaiden in forum Game Programming
    Replies: 4
    Last Post: 06-15-2006, 04:02 PM
  2. Scripting
    By loopshot in forum Game Programming
    Replies: 2
    Last Post: 03-24-2006, 06:29 PM
  3. Scripting Language
    By ~Kyo~ in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 12-12-2005, 10:10 AM
  4. Making a Regional Language..
    By Coder87C in forum Windows Programming
    Replies: 1
    Last Post: 04-28-2004, 10:51 PM
  5. Creating my own Scripting language in C++ for CGI
    By stovellpaul in forum C Programming
    Replies: 0
    Last Post: 10-01-2002, 04:41 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21