#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2010
    Location
    ~
    Posts
    12
    Rep Power
    0

    Implementing variables in your own language


    I'm making a small programming language, and currently it only supports integers. The other problem is that to modify a variable, the assignment operator must have the name of the variable, not a variable AST node, which is very inconvenient.

    I wonder if there is a better way? It would also be nice to support closures and scope. Does anyone have some hints or links to good sites on the subject?
  2. #2
  3. Moderator Emeritus
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2002
    Location
    Austin, TX
    Posts
    7,183
    Rep Power
    2220
    I don't think you'll find a lot (or any) folks on DS that have written their own language. Kind of cool that you're trying to tackle something like this. Is it an academic project, or are you working on bringing something completely new to the world of programming?
    DrGroove, Devshed Moderator | New to Devshed? Read the User Guide | Connect with me on LinkedIn
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2010
    Location
    ~
    Posts
    12
    Rep Power
    0
    Originally Posted by drgroove
    I don't think you'll find a lot (or any) folks on DS that have written their own language. Kind of cool that you're trying to tackle something like this. Is it an academic project, or are you working on bringing something completely new to the world of programming?
    Mostly just for fun.

    Anyway, I got to a state where it should work, but doesn't compile due to errors I can't figure out. I have a thread on another forum about it.

IMN logo majestic logo threadwatch logo seochat tools logo