Mew is a simple language to aid in calculating interactions between entities in a game or simulation. It allows a programmer to specify the attributes of an entity as either numeric values or using the attributes of a different entity. These can then be compared to create queries which will determine when and in what way an interaction should take place. This allows an AI programmer to state when certain interactions should occur, without having to consider what processes these actions will involve.
A compiler from Mew to C++ was created in C using Yacc and Lex, producing headers and source files which could be included in a further project.
Using The Compiler
Download the executable and example script from below, and place them in the same directory. When you run the compiler, you will be asked to enter the name of the script (“test.mew”) and a name to use in the output files (without an extension – eg. “animals”). The compiler will then generate 3 files which can be edited and included in other projects.
Files
- Download the Mew compiler executable.
- View an example script in Mew.
- Download the source code to compile the compiler, including Yacc and Lex files.
