An import declaration starts with the keyword import followed by a module name and terminated with a semicolon:
import basics.lexical;
The module name is a relative file path with dots used as separators, rather than front- or backslashes.
These file paths have to be relative to the include path, which can be specified with the -I command line option.
The current directory is always part of the include path.
The order in which the imports appear affects the order of the Declaration blocks in the generated code as well as the order of the lexemes. The latter has to be dealt with carefully, since it may change the behaviour of the parser. The order of the imported declarations and lexeme blocks is the same as if the import declaration was substituted with the imported module, but prolog and non-terminal declarations are separated. That means, that all lexemes from lexeme blocks will still appear before any implicitly collected lexeme.
The following is also possible:
APDLexemes {
"asdf"
}
import other;
APDLexemes {
"qwer"
}
Assuming, that the module other has a lexeme block, too, the order of the lexemes will be:
"asdf"
other
"qwer"
other