Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you create a computer or scripting language for an application?

Duplicate of:

  • Learning to write a compiler
  • Documentation on creating a programming language
  • Learning Resources on Parsers, Interpreters, and Compilers
  • Suggestions for writing a programming language?
  • Compiler-Programming: What are the most fundamental ingredients?
  • Are there some online resources about compiler principle?

and others I'm too lazy to find right now.


I'm not asking how to make an incredibly complex language. I just wanted to understand the basics. I would use c# as the underlying language. I know it's vague. I was hoping for something very basic to direct me.

I think I'm mostly interested in creating scripting languages. For example, I see people that write programs but then they have a scripting language for their application. I do not want to rewrite a windows scripting language. Say I had a text file reader and for some reason wanted a scripting language to automate something. I'm not sure how to ask.

Thank you.

EDIT - Thank you for the answers. I was looking at it more for the learning not the doing at the moment. I would probably use LUA, but I am trying to learn more about the concept in general.

like image 509
johnny Avatar asked Jul 01 '26 00:07

johnny


1 Answers

You could take a look at LUA - I've used it to great success each time I asked myself the question "How would I automate insert task here in insert one of my apps here?"

Edit: Here are some examples (taken from the links page, admittedly, unwieldy Lua Wiki) on how you could embed Lua in your app:

  • Embedding Lua in C: Using Lua from inside C
  • Embedding a scripting language inside your C/C++ code
  • Embeddable scripting with Lua
like image 98
Mihai Limbășan Avatar answered Jul 03 '26 08:07

Mihai Limbășan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!