As part of the modularization feature, XCHEME has two statements for exporting and importing directives from .xcm files, it will help you to split the source code into modules and better organize the project. See down below how to work with them.
Using the export statement is possible to share a token, node, alias token and/or alias node directive with other module making easier to split the source code and reusing it together with an import statement.
Syntax:
export DIRECTIVE;
Examples:
export token <100> T_FOO as 'foo';
Export the
T_FOO
token directive.
token <100> T_FOO as 'foo';
export T_FOO;
Export the previously declared
T_FOO
token directive.
Using the import statement is possible to copy all exported directives from another module into the current one sharing the same context.
Syntax:
import PATH;
Example:
import './path/to';
Copy all exported directives from
./path/to.xcm
into the current context.