Show in Frame No Frame
Up Previous Next Title Page Index Contents Search

5.1.1 Creating a simple generator
5.1.2 Executing and debugging generators

5.1 Getting started with generators

In MetaEdit+, generators are used for multiple purposes: code and documentation generation, generator-based text fields in symbols, identifier generators for non-property types, and to fetch subobjects and their subsymbols for template symbol elements. All these generators are written in the MetaEdit+ Reporting Language, MERL. The code and report generators associated with specific Graph types are edited and managed with the Generator Editor (see Section 5.3) and Generator Debugger (see 5.4).

A generator basically does three things: it navigates through the model structures, extracts information from design elements, and ouputs it to a window or a file. The commands for doing these things form the core of the MERL language. There are also a number of additional commands that enable things like output of diagrams to bitmap files, or execution of external programs.

We will first show how to create (5.1.1) and execute and debug (5.1.2) a simple generator. The primer to MERL in Section 5.2 will quickly bring you up to speed on the approach that MERL takes, and is worth reading even for those familiar with generation and other programming languages. The Generator Editor and Debugger are described in Sections 5.3 and 5.4. The individual MERL commands are explained in detail in Chapter 6, with a quick reference in Section 6.8.

Show in Frame No Frame
Up Previous Next Title Page Index Contents Search