The dialect (commons lang-sql 0001-sql-langFR-016, 0002-sql-ast-parserFR-013): a name, the dialect it extends, its Lexical and its Grammar, resolved once. A dialect says only what differs from its parent: it is given a function from its parent's lexical to its own, so that it can add, remove and replace what it inherits, and a chain of dialects (Redshift on PostgreSQL) is one lexical by the time the lexer reads it.
This is the lexical layer of a dialect; the grammar it will contribute to the parser is a later specification of the same folder, and a dialect value will gain it without changing how one is made.
Makes a dialect that a module declares at its top level from data of its own: where that data is wrong, it throws the error's sentence when the module is loaded, which the module's test catches; a dialect made at run time from data that arrives is made with defineDialect, which returns the error.