Results 1 to 10 of 10

Thread: My Scripting Language

Threaded View

  1. #1

    Thread Starter
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    My Scripting Language

    Howdy all,

    I wasn't sure where to put this, so Moderators, please move it if required It IS written in VB6.

    I'm just posting this here, because I want a few of you to possibly come up with some more types.

    My Scripting language (at present) is called CScript. Right now, its pretty basic, but it has the following features:
    • 3 Default types. Byte, Long and String (no error reporting for their values yet, but there will be). Public and Private variables (to an extent). Variables declared within #DECL and #EDECL are public, usable anywhere. Variables declared within a function, are only usable in that function (error reporting for this still to come also).
    • Console
    • cout() function for output to console
    • cin() function for user input (not the best yet, will get better)
    • PHP style variable output. cout("$variablename") prints the value of a variable to the console
  2. Non-Console. The #EXEC 1 flag removes the console from startup.
  3. UDT's. This is what I want you guys to create. I'll give you an example of a script below, which shows an Information and OKOnly messagebox:
    Code:
    #EXEC 1
    
    #DECL
    typedef MessageBox_t
    {
    	long MB_OK=0,
    	long MB_OKCANCEL=1,
    	long MB_ABORTRETRYIGNORE=2,
    	long MB_YESNOCANCEL=3,
    	long MB_YESNO=4,
    	long MB_RETRYCANCEL=5,
    	long MB_NO=6,
    	long MB_INFORMATION=64,
    	long MB_CRITICAL=16,
    	long MB_EXCLAMATION=48
    }
    var MessageBox_t MessageBox;
    #EDECL
    
    void main()
    {
    	MessageBox("Basic MessageBox", MessageBox.MB_OK + MessageBox.MB_INFORMATION, "Title");
    	ExitProcess;
    }
    I want you guys to write some other types which can be in the basic include file, added to every script (so they are kinda global).
  4. Comments, both // 1 liners and /* */ comment blocks.
  5. Callable user made functions using the Call command. Return values are going to be implemented aswell.


  6. I plan on using the API to create controls (including windows) instead of using a control array and creating a new instance of an already existing form. I figure it'd be less of a drag on memory if I did it this way.

    I've attached the source to the parser. If you guys want to improve on it, give me suggestions, or compliments up to this point, please do

    chem
Attached Files Attached Files

Visual Studio 6, Visual Studio.NET 2005, MASM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width