Macro Generator Language
(MGL) Syntax
MGL language is used to create templates (macros) for NewGen generator
MGL template is a text file containing string literals, generator
variables, generator constants and generator commands.
- Generator commands are "active"
elements of MGL. They are used to contol the
process of generation.
- String literals are inserted into the generated
output as is.
- In place of variables generator
puts their values. Variables represents
properties of class model elements.
- In place of constants generator
puts their values. Constants, unlike variables,
represents special character codes and some information about generator
and generation time.
Syntax format convention used in this document
- Normal font is used for regular text
- Bold font is used for MGL
keywords, example - <for>
- Bold and
italic font is used for MGL constants and variables, example - %ver%
- Italic font is used to
show other elements of commands syntax, example - param1