parser 1.1.3
UTF-8 CEL expression compilation and checked library extensions
Loading...
Searching...
No Matches
example.cpp

Compiles a scalar expression, prepares its result, and executes it on a caller-owned stack.

// SPDX-License-Identifier: BSL-1.0
#include <cel/parser.hpp>
int main() try {
auto program = compiler.parse_str("1.0f64").prepare<double>();
cel::raw_stack stack;
return program.call(stack) == 1.0 ? 0 : 1;
} catch (const std::exception&) {
return 1;
}
Owns exact registrations, nominal schemas, and LIFO scope callbacks. Owns copied names,...
Definition lookup.hpp:81
Owns lookup state and compiles CEL expressions into reusable checked programs. Each successful call r...
Definition compiler.hpp:37
compiled_segment parse_str(std::string_view source)
Compiles one complete decoded UTF-8 CEL source through an owned source copy. Selects grammar alternat...
Provides UTF-8 expression compilation, checked library extensions, and source diagnostics.