How to reason about it
- Integer:
-?(0|[1-9][0-9]*); rational: integer numerator over positive canonical denominator; real requires fraction or exponent. - Dotted-list placement, escape spelling, byte range, and delimiter closure are checked before normalization.
- Source spans use the reader input identity and deterministic positions.
Pinned token grammar
| Token | Accepted shape | Rejected boundary |
|---|---|---|
| integer | -?(0|[1-9][0-9]*) | leading zero, radix/exactness prefix |
| rational | <integer>/[1-9][0-9]*; reduced after read | zero/negative denominator spelling, leading-zero denominator |
| real | decimal with fraction and/or exponent | bare integer ambiguity, non-finite literal |
| character | #<scalar> or pinned named form | invalid scalar or incomplete escape |
| bytevector | #u8(<byte> ...) | element outside 0..255 |
A common mistake
Reader extensions not listed in the profile fail loudly.
Keep going
Use this page while writing code. For a guided explanation, return to the syntax map or the corresponding manual.