Sign in to follow this  

[.net] How do you build this?

This topic is 3459 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do you build a program that lets the user write scripts to interact with the items in your program? You are essentially creating your own scripting language and the user is using that scripting language to interact with stuff within your program. It's kind of like the user is using your custom built IDE and your custom scripting language. I hope I am describing this clearly. Can someone point me in the right direction in terms of how to get this project started and what I need to do? Thanks.

Share this post


Link to post
Share on other sites
Here are some tutorials I found useful:
Writing an Interpreter with Lex, Yacc, and Memphis
Implementing a scripting language with Antlr
(Antlr can also be used from c# if I remember correctly.)
You can find more tutorials online by googling.

But there are good reasons why shouldn't create your own scripting language:
1)Its hard and time consuming
2)Finding bugs in an interpreter is a challenge. Thousands of scripts may run without a problem until a script show you that there is a bug.
3)The user needs to learn a new language.

So maybe you should consider using a preexisting embeddable scripting language like Python, Lua or Ruby. You can also use a .net language like c# as a scripting language (via CodeDom).

[Edited by - Kambiz on June 25, 2008 6:09:53 AM]

Share this post


Link to post
Share on other sites

This topic is 3459 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this