Reserved Keywords
Declarations
| Keyword | Description |
|---|---|
stream | Declares a stream |
event | Declares an event type |
type | Declares a type alias |
let | Declares an immutable variable |
var | Declares a mutable variable |
const | Declares a global constant |
fn | Declares a function |
context | Declares an execution context for multi-threaded parallelism |
config | Configuration block |
Control Flow
| Keyword | Description |
|---|---|
if | Condition |
else | Alternative branch |
elif | Alternative condition (else if) |
match | Pattern matching |
for | Loop over iterable |
while | Conditional loop |
break | Exit loop |
continue | Skip to next iteration |
return | Return a value |
Stream Operators
| Keyword | Description |
|---|---|
from | Connector source binding (.from()) |
where | Filtering |
select | Projection |
join | Inner stream join |
left_join | Left outer join (all left events, null-fill right) |
right_join | Right outer join (null-fill left, all right events) |
full_join | Full outer join (all events from both sides) |
merge | Stream merge |
window | Time window |
aggregate | Aggregation |
partition_by | Partitioning |
order_by | Sorting |
limit | Limitation |
distinct | Deduplication |
emit | Emit output events |
forecast | PST-based pattern forecasting |
Forecast Built-in Variables
| Variable | Description |
|---|---|
forecast_probability | Pattern completion probability (0.0–1.0) |
forecast_time | Expected time to completion (nanoseconds) |
forecast_state | Current NFA state label |
forecast_context_depth | PST context depth used for prediction |
Patterns
| Keyword | Description |
|---|---|
pattern | Defines a detection pattern |
Types and Values
| Keyword | Description |
|---|---|
true | Boolean true |
false | Boolean false |
null | Absence of value |
int | Integer type |
float | Floating point type |
bool | Boolean type |
str | String type |
timestamp | Timestamp type |
duration | Duration type |
Logical Operators
| Keyword | Description |
|---|---|
and | Logical AND |
or | Logical OR |
not | Logical NOT |
in | Membership |
is | Type/identity test |
Error Handling
| Keyword | Description |
|---|---|
try | Try block |
catch | Exception capture |
finally | Final block |
raise | Raise an exception |
Other
| Keyword | Description |
|---|---|
as | Alias/cast |
extends | Event inheritance |
import | Module import |
export | Symbol export |
Keywords Reserved for Future Use
The following words are reserved for potential extensions:
async,awaitclass,trait,implpub,privmod,useyielddefergo,spawn