|
parser 1.0.0
UTF-8 CEL expression compilation and checked library extensions
|
| Ncel | Provides checked CEL compilation, extension libraries, and owned results |
| Cop_lookup | Owns exact registrations, nominal schemas, and LIFO scope callbacks. Owns copied names, retained descriptors, and stored callbacks, not references inside captures. register_op retains its runtime callback in emitted code after this lookup dies. Custom scope callbacks and operation emitters must retain state in the code they emit. Client-captured references must outlive every execution that uses them. Mutable callbacks are not made thread-safe by registry ownership. Registration matches complete compatible input descriptors, including nominal identity and ownership representation; equal layouts or display names do not establish a match. Copies are unavailable; moves transfer registry ownership. Register a receiver operation before transferring the lookup into a parser: |
| Cparse_error | Owns a source-located diagnostic; copied diagnostics own independent messages. Example: parse_error(error_category::malformed_input, {0, 1}, "invalid input") |
| Cparser | Owns lookup state and compiles CEL expressions into reusable checked programs. Each successful call returns a program owning its values, descriptors, and emitted runtime callbacks; the source and parser need not survive the program. References inside client captures remain client-owned and must outlive their uses. Custom scope callbacks and emitters follow their own code-retention contracts. Precondition: clients provide exclusive access across threads, including during emitters. Recursive entry throws std::logic_error before changing cursor or lookup state. Failed parsing retires temporary scopes; subsequent parses may reuse the parser. A selected client emitter's own failure leaves its lookup state subject to its contract. Compilation invokes lookup scopes and emitters, not the emitted runtime operations. Copying and moving are unavailable. Compile and execute a program independently of its parser: |
| Csource_span | Identifies a half-open UTF-8 byte interval; begin never exceeds end. Example: source_span{0, 4} covers all bytes of "true" |