There are two parts to set up: the compiler, and the interpreter. The compiler is provided and does not require any modification. The interpreter depends on the software you wish to integrate Tonkadur to. Examples of interpreters are available, but expect some modifications to be required. This should not prove to be difficult however, as the whole approach is design with the idea of keeping the interpreter small and simple.
Dependencies:
Download the latest release of Tonkadur on this page.
The Tonkadur compiler is invoked using java -jar tonkadur.jar [option] <file>
.
java -jar tonkadur.jar
will yield the complete list of valid options.
<file>
corresponds to a Fate file. By default, the generated Wyrd file will
have the same name with a suffix.
It is recommended to look up existing interpreters. Not only might you be able to just use an existing one, but having examples of interpreters will help you create your own if you can’t find one that fits your needs.
Known open source Wyrd interpreters:
If you end up needing to create your own interpreter, here are some clues on how to proceed.
A Wyrd interpreter keeps track of:
TEXT
.Additionally, the following can be kept track of:
A few pitfalls:
(set_value a b)
does not make a
become b
,
but rather assigns a copy of the current value of b
to a
.address
computation can take an
address as its address
parameter. In other words, while in most cases an
address
computation is a string that must be put in a list to become an
actual address, it can also sometimes already be a list and must then stay
unchanged.A set of tests can found on this page, and will let you test your interpreter more easily. They have to be compiled to Wyrd first, however.