Docs / Lexicography
2.6 Native Directives and Lexical Disambiguation
The `#` character serves two purposes in Dryad. It is used exclusively to indicate Native Directives (when immediately followed by '<' and '>' characters or in the simplified #module format without spaces). In other inappropriate contexts, the lexer reports a Syntax Error (1000-1999 Lexer Errors).
Syntactic Analysis of the # Symbol
1 #io // OK: NativeDirective("io") 2 #// LEXER ERROR (space after # symbol) 3 //#io // Comment discarded by parser 4 "#io" // Normal string literal
The lexer disambiguates deterministically using the mathematical principle of Non-Ambiguity.
Found an error in the spec? Open a PR.
Official Version: 1.0 · May 2026