# making of a language

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

## Recommended Posts

I am currently making a language with xml but sometimes I wan't to make commands in other languages.Is there any way I could do this?If you know a web page I could visit then please link. Thank you

##### Share on other sites
Why XML? It is terribly verbose for such a task.

If by "make commands in other languages" you mean use types or functions defined by other languages, then it is possible. How is pretty much up to you, after all you are writing the language.

##### Share on other sites
You can do this pretty easily. For instance, I could do like XSLT does and use:
<xsl:value-of select="php:frobnicate(@content)"/>
This calls the "frobnicate" PHP function.

Of course, the hard part is getting your compiler or interpreter to actually handle this. For instance, when running XSLT from PHP, you can register PHP functions to be run from XSLT. In the general case, you can use any technique available to the interpreter (or compiler target) for calling external functions.

But there are so many possible interpreters or compiler targets that I'm not going to give you a complete list of how to do it, nor will you find a complete list online. However, if you told us your interpreter technology or compiler target technology, we would be able to help.

• 10
• 19
• 14
• 19
• 15