Expand description
Lexer primitives and keywords for the Fiducia language.
This module provides shared tokenization utilities used by all Fiducia parsers: keywords, identifiers, numeric/string/boolean literals, file paths, whitespace, and comment handling.
Modules§
- keyword
- Reserved keyword constants shared across Fiducia parsers.
- symbol
- Operator and punctuation symbol constants.
Functions§
- binder
- Parse the name of
name :(a variable, parameter or carrier), committed at the:. - bool_
literal - Parse a boolean literal (
trueorfalse). - file_
path - Parse a file path, as written up to the closing quote: what it names is the front end’s to decide, not the grammar’s.
- hex
- Parse a hex literal:
0x[0-9a-fA-F][0-9a-fA-F_]*. - identifier
- Parse an identifier: a word that is not a keyword.
- offset
- Zero-consuming parser returning the current byte offset — used to record
a reference site’s offset (e.g. a channel’s
sender/receiver, a mapping’s region name) alongside its own span. - reserved
- Parse a reserved token (keyword or symbol) as an exact literal match.
- text
- Parse a text literal:
"..."of printable ASCII, with the escapes\\,\",\nand\t; committed after the opening quote. - upper_
identifier - Parse an identifier whose first character is ASCII uppercase:
UpperCamelCase. Used for process names in declaration position (proc Name(...)) and process references (Name(args)). - ws
- Skip whitespace and comments (zero or more).