Varpulis Core
Foundational types and AST definitions for the VPL language.
This crate provides the core data structures used throughout the Varpulis streaming analytics engine, including:
- AST (Abstract Syntax Tree): Complete representation of VPL programs
- Type System: Type definitions for the language
- Values: Runtime value representation
- Source Spans: Location tracking for error reporting
Features
- Zero-copy parsing support via spans
- Serialization support via
serde - Comprehensive AST for all VPL constructs
Modules
- [
ast]: Program structure, statements, expressions, and SASE patterns - [
types]: Type system definitions (Int,Float,String, etc.) - [
value]: Runtime values with type coercion and operations - [
span]: Source location tracking for diagnostics
Quick Start
use ;
// Values are the runtime representation
let int_val = Int;
let float_val = Float;
let str_val = Str;
// Check value types
assert!;
assert!;
AST Structure
A VPL program consists of statements:
StreamDecl: Stream definitions with operationsEventDecl: Event type definitionsPatternDecl: SASE+ pattern definitionsFnDecl: User-defined functionsConfig: Configuration blocks
See Also
varpulis_parser: Parsing VPL source codevarpulis_runtime: Executing VPL programs