Text cursor primitives for verification parsers #
ODE and PINN certificates both contain small mathematical expression languages. This module owns their shared byte-position cursor, fuel-bounded scanning, and decimal literal parsing. Grammar and AST decisions remain in the respective verifier modules.
A source string paired with the current raw byte position.
- source : String
Source text being scanned.
- position : String.Pos.Raw
Current raw byte position in
source.
Instances For
Inspect the current character without advancing the cursor.
Instances For
Advance by one character, preserving the source text.
Instances For
Remaining bytes plus one, suitable as a budget for a single linear scan.
Instances For
Whether the cursor has reached or passed the source's raw end position.
Instances For
ASCII whitespace accepted by the verification expression languages.
Instances For
Fold a string of decimal digits into a natural number; callers guarantee digit-only input.
This is deliberately not String.toNat?, whose grammar also accepts _ digit separators, which the
ODE/PDE literal languages do not.