CharlesS
CharlesS

Reputation: 1591

Is there a scripting language or parser which has been ported to multiple languages?

For a research project i'm looking for an interpreter or even a parser for a programming language (doesn't matter what programming language) that has been ported to a number of languages. This probably means the code is small enough to do so.

I know Lisp-ish languages have been ported to a lot of environments, because Lisp is so easy to parse, however I haven't found a single implementation that has been multi targetted. For instance; it is very hard to find a version which works in PHP where the same code (the Lisp which runs on top / is parsed that is) would also work in Python.

Hope someone here can help...

What do I want to do with it? For a tool I'm making, the user group will write tiny pieces of logic; however the system underneath differs while the logic is the same. We don't want to force our users to learn Java, PHP, C#, etc just to write that logic.

Upvotes: 0

Views: 242

Answers (1)

Ponkadoodle
Ponkadoodle

Reputation: 5957

The Lua (www.lua.org) scripting language can run from within C and has bindings to Python, php, Java, C#, probably some other languages too. It's a very small interpreter (something like 200k when compiled) because it comes "without batteries" - no builtin functions for some common operations like copying arrays. It should be pretty trivial to add support for embedding in another language, compared to other scripting languages, if need be.

Upvotes: 2

Related Questions