October 2008
Beginner to intermediate
208 pages
3h 1m
English
An Mg module is a scope that contains declarations of languages (Chapter 12). Declarations exported by an imported module are made available in the importing module. Thus, modules override lexical scoping that otherwise governs Mg symbol resolution. Modules themselves do not nest.
Several modules may be contained within a CompilationUnit, typically a text file.
CompilationUnit:
ModuleDeclarations
ModuleDeclarations:
ModuleDeclaration
ModuleDeclarations ModuleDeclaration
A ModuleDeclaration is a named container/scope for language declarations.
ModuleDeclaration: module QualifiedIdentifer ModuleBody ;optQualifiedIdentifier: Identifier QualifiedIdentifier . IdentifierModuleBody: ...