A compiler, of course, needs a way to parse the input language, and so the XRuby team created their own Ruby parser using the popular ANTLR parser generator.
Start with the input to the generator. Listing 1 provides an example of a table definition for a simple book database.
首先从生成器的输入开始,清单1为一个简单的图书数据库提供了表定义的例子。
3
Using a test generator breaks this concept because the generator writes the test using the production code as input. The generated test is not a human restatement, it is an automatic translation.