Sure - the intent behind using a Parser/Compiler combo for our game logic comes from three desires:
1.
Reusability :: by creating a bunch of abstract logic, we are able to reuse it amongst multiple games or in multiple objects for the same game.
2.
Reliability :: by crunching your game logic through a parser, you eliminate all the typographical and lexical mistakes that can occur. By adding the compiler, you eliminate game logic errors (e.g. by checking ahead of time that your references exist).
3.
Efficiency :: by compiling your game logic into raw data that can be processed by the game engine, you get maximum efficiency. Our game engine is designed to know absolutely nothing about what it is doing. It's just a number cruncher. That way, it focuses on the things that it can do very well and is easier to debug.
The workflow advantages to having your designers work in a formal language are hugely beneficial as well. If you're interested in trying this approach yourself, download Gold Language Parser (
http://goldparser.org/) and start by writing a simple grammar that describes some data in your game. The beauty of Gold is that you don't have to actually write an IDE for your designers - you simply give them a copy of the .grm or .cgt files and they can use the test window to parse their code and check for errors. THIS IS HUGE! Now you can be sure that all the design files that you get from artists, level designers, etc. work without having to doublecheck them.
The way it ties back into MOAI is that you load your .cgt in MOAI and create your own traversal functions (the example for MOAIParser is flawless and is a great template for a compiler) to add flavor to the parse tree - meaning you keep track of all the stuff that is important (like whether or not a reference to some variables exists when it is called, etc.) depending on the tokens. But it isn't just reliability that you achieve, you also are able to create a very efficient, abstract representation of your parse tree that you can use in your game engine.
I hope this explains a little about the reasoning for creating a custom grammar for your game logic or data files. I'm happy to answer any other questions!