|
parser 1.0.0
UTF-8 CEL expression compilation and checked library extensions
|
Provides owned type and operation registrations for extension libraries. Include <cel/parser/compiler.hpp> to compile expressions with a registry. More...
#include <array>#include <cel/parser/diagnostic.hpp>#include <cel/runtime.hpp>#include <functional>#include <memory>#include <optional>#include <span>#include <string>#include <tuple>#include <type_traits>#include <typeindex>#include <unordered_map>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| class | cel::op_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: More... | |
Namespaces | |
| namespace | cel |
| Provides checked CEL compilation, extension libraries, and owned results. | |
Typedefs | |
| using | cel::scope_callback |
| Owns a copyable resolver called with a borrowed name, builder, operand count, and source span. The name and builder are borrowed only for the call. Operands are older-first. Returning false must leave instructions and operands unchanged. Returning true must emit the resolved value or operation, consuming arity operands and adding one result. Exceptions propagate; after an emission failure, the builder need only be safely discardable. Captured references must outlive uses of the callback and any emitted code retaining them. Clients synchronize shared mutable captures. Example: [](std::string_view, dyn_segment&, std::size_t, source_span) { return false; }. | |
| using | cel::operation_emitter |
| Owns a checked emitter whose successful effect consumes its declared inputs and adds one result. The builder is borrowed only for the call; span locates the source operation. Emitted code must retain the values, descriptors, and captures it needs for execution. Callback exceptions propagate; an error need only leave the builder safely discardable. Example: [](dyn_segment& b, source_span) { b.project_tuple(0); }. | |
Provides owned type and operation registrations for extension libraries. Include <cel/parser/compiler.hpp> to compile expressions with a registry.