Thread: Creating my own scripting language

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 Creating my own scripting language 
    Blurite

    Corey's Avatar
    Join Date
    Feb 2012
    Age
    26
    Posts
    1,491
    Thanks given
    1,245
    Thanks received
    1,729
    Rep Power
    5000
    So I've never really gotten into scripting before, and I've been curious for a while with how they (and programming languages in general) work regarding compilation and execution (especially after asking Andrew how RuneScript works).
    Because of this, I did a little research into creating your own scripting language and started my own.

    It could evolve into something which is actually used for my server (Gielinor, as of yet unreleased), but that may never happen.
    At the moment it's just something to learn from and something to add to my portfolio to stand out from all the other applicants when looking for an internship in the future.

    My language uses a lexer/tokenizer and a parser in order to be interpreted in Java.


    Current features:

    • PRINT statements
    • Evaluate mathematical statements which can be printed
    • Basic variable implementation (can only store numbers)
    • Built in methods, i.e. "LIST_VARS" to print out all current variable names and values
    • Commenting



    Planned features:

    • Call variables, i.e. "PRINT var_name"
    • More work on variables: store strings, mathematical operations i.e. var_1 = var_2 + var_3
    • Boolean logic: if statements, boolean variables
    • User created methods (long-term goal)
    • Improve the code, currently it's all cobbled together
    • Throwing errors
    • Making it more robust and flexible (i.e. "PRINT" and "print" doing the same thing)



    Example script and output:
    Spoiler for Media:

    Input:


    Output:



    Snippets:
    Spoiler for Parser:




    This is all only 1 days work so far.

    Again, I'm by no stretch an expert and I don't really know what I'm doing, so constructive feedback is appreciated
    Attached image
    Reply With Quote  
     


  2. #2  
    Registered Member Andrew's Avatar
    Join Date
    Nov 2008
    Posts
    2,890
    Thanks given
    612
    Thanks received
    207
    Rep Power
    551
    Good luck!
    Reply With Quote  
     

  3. #3  
    Best Rat Donor

    Australisch's Avatar
    Join Date
    Nov 2015
    Posts
    2,049
    Thanks given
    968
    Thanks received
    481
    Rep Power
    4962
    Best of luck, interested to see how you go with this.
    Rsn: vEetswa
    Reply With Quote  
     

  4. #4  
    Vanishing Into Smok3

    sean kiesler's Avatar
    Join Date
    Mar 2014
    Posts
    429
    Thanks given
    250
    Thanks received
    135
    Rep Power
    1341
    best of luck, looks pretty interesting!
    Attached image

    Discord: storm#3920
    Reply With Quote  
     

  5. #5  
    Blurite

    Corey's Avatar
    Join Date
    Feb 2012
    Age
    26
    Posts
    1,491
    Thanks given
    1,245
    Thanks received
    1,729
    Rep Power
    5000
    Quote Originally Posted by Andrew View Post
    Good luck!
    Quote Originally Posted by Australisch View Post
    Best of luck, interested to see how you go with this.
    Quote Originally Posted by sean kiesler View Post
    best of luck, looks pretty interesting!
    Thanks all, I'll probably keep this thread updated as I progress.
    Attached image
    Reply With Quote  
     

  6. #6  
    So when I'm free, I'm free


    Jay Gatsby's Avatar
    Join Date
    Jun 2010
    Posts
    2,307
    Thanks given
    1,148
    Thanks received
    1,982
    Rep Power
    5000
    Yaaaaa boi! Insane how much you've progressed since I met you all those years ago Corey rofl, very much looking forward to where this goes
    Reply With Quote  
     

  7. Thankful user:


  8. #7  
    Registered Member

    Join Date
    Nov 2015
    Age
    27
    Posts
    632
    Thanks given
    114
    Thanks received
    138
    Rep Power
    426
    This is really interesting, honestly! I'm pumped to see how you get on with this, best of luck.
    Reply With Quote  
     

  9. Thankful user:


  10. #8  
    Registered Member
    24th's Avatar
    Join Date
    Oct 2016
    Posts
    250
    Thanks given
    35
    Thanks received
    85
    Rep Power
    189
    nice progress, good luck with your project.
    Reply With Quote  
     

  11. Thankful user:


  12. #9  
    Номер 1


    Leanbow's Avatar
    Join Date
    Feb 2008
    Posts
    5,895
    Thanks given
    1,564
    Thanks received
    2,624
    Rep Power
    5000
    lookup into AST
    Reply With Quote  
     

  13. #10  
    Blurite

    Corey's Avatar
    Join Date
    Feb 2012
    Age
    26
    Posts
    1,491
    Thanks given
    1,245
    Thanks received
    1,729
    Rep Power
    5000
    Quote Originally Posted by Leanbow View Post
    lookup into AST
    this?
    Attached image
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. My own bytecode language, what does this script do?
    By peterbjornx in forum Application Development
    Replies: 7
    Last Post: 01-13-2010, 11:32 PM
  2. [Help]Creating my own DNS Ip [Help]
    By CrazyPanda in forum Help
    Replies: 4
    Last Post: 01-06-2009, 06:12 AM
  3. Creating my own spell book.
    By CableBox in forum Graphics
    Replies: 3
    Last Post: 10-26-2008, 12:32 AM
  4. How to create my own cache?
    By alongu in forum RS2 Client
    Replies: 11
    Last Post: 01-16-2008, 05:53 PM
  5. How to create my own cache?
    By alongu in forum RS2 Server
    Replies: 0
    Last Post: 01-11-2008, 08:24 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •