0

I was recently looking through a configuration file for a game I was playing, when it struck me how much the language used in the configuration file resembled a batch language with each line formulated as a command, how simple the syntax was and how immediately clear it was what every line in the file was doing without requiring any surrounding lines of context. Still, I know of no batch language that is frequently used as an extension language, to be embedded into another application.

Are there in fact no batch languages that are designed to be embedded into other programs (foremost, I would imagine, for configuration files), or is it just that I haven't heard about them? If there are, what such languages are there?

And if there are not, is it possible to in some way run a shell script or similar from a program in an isolated environment with custom-defined commands, and access the resulting environment variables from the program afterwards?

Edit: By batch language, I mean that it should be possible to give commands, i.e. formulate lines on the form <command> [<arg1> [<arg2> [...] ] ]

HelloGoodbye
  • 3,624
  • 8
  • 42
  • 57

1 Answers1

2

The canonical examples of this are probably Lua and Tcl, both of which were designed to be embedded into other programs.

Lua is more commonly used these days.

There is a list of Lua scriptable software on Wikipedia, and another list maintained on the Lua wiki.

larsks
  • 277,717
  • 41
  • 399
  • 399
  • 1
    Hm, Tcl looks interesting, and all operations are commands! +1 for that! :) – HelloGoodbye Aug 29 '15 at 02:23
  • On the other hand, it would also bee good if you could define variables using a more compact notation, like `var = value`, or `var: value`. Do you know if there is any interpreted language that supports operations that are commands, _and_ this type of notation? And that is cross-platform and not coupled to the operating system, i.e. suitable to be used to make configuration scripts (or similar) for applications? – HelloGoodbye Aug 29 '15 at 12:11