Section 8 of 51
62. Lexical Analyzer
Stable section ID: S05-CON-008-SECTION-8 · 21 content blocks
The Lexical Analyzer converts BDL character sequences into formally classified tokens.
Tokens may include:
keywords;
identifiers;
qualified names;
literals;
numbers;
quantities and units;
coordinates;
version expressions;
operators;
delimiters;
annotations;
comments;
unknown or incomplete-value markers.
The Lexical Analyzer shall apply the character encoding, identifier rules, numerical formats, reserved words, and normalization requirements established by the applicable BDL version.
Visually similar characters, hidden characters, inconsistent Unicode forms, and prohibited control characters shall be detected where they could create ambiguity, spoofing, or unsafe identity resolution.
Numeric tokens shall preserve the precision expressed by the source. Decimal values shall not be prematurely converted into representations that introduce uncontrolled rounding.
Quantities containing units shall remain distinguishable from dimensionless numbers. Version numbers, identifiers, dates, coordinates, and ordinary numerical values shall not be confused merely because they use similar character patterns.
Comments and documentation shall not modify engineering meaning unless the BDL specification explicitly defines a governed annotation mechanism.
The Lexical Analyzer shall report invalid tokens with exact source locations and should continue only where recovery cannot alter the interpretation of subsequent declarations.