Skip to main content

Module parser

Module parser 

Source

Modules§

ast
AST types produced by the HirnQL parser.

Structs§

CorrectStmt
CounterfactualStmt
COUNTERFACTUAL "antecedent" THEN "consequent" [IN <ns>] — reason about alternative histories.
CreateRealmStmt
DropRealmStmt
ExpandClause
ExplainCausesStmt
EXPLAIN CAUSES "event" [IN <ns>] [DEPTH N] — find causal chains backward.
ExplainPolicyStmt
ExplainStmt
GrantStmt
GroupByClause
GROUP BY clause with aggregation function.
HistoryStmt
InspectStmt
MergeMemoryStmt
ParseError
Parse error with location and context.
QueryLimits
Configurable limits for query parsing.
RecallEventsStmt
RecallStmt
RetractStmt
RevokeStmt
SetAssignment
A SET assignment in semantic mutation SET clauses.
SetTierPolicyStmt
SET TIER_POLICY <field> = <value>
ShowPoliciesStmt
Subquery
An inner RECALL subquery (used in WHERE … IN (…)).
SubqueryFilter
A WHERE … IN (subquery) filter.
SupersedeStmt
ThinkStmt
TraceStmt
TraverseStmt
WhatIfStmt
WHAT_IF "intervention" THEN "outcome" [IN <ns>] — simulate do-calculus.
WhereCondition

Enums§

ActivationModeAst
AggFunction
Aggregation function.
ComparisonOp
ConditionValue
ConsistencyLevel
DepthModeAst
Depth scheduling mode.
ForgetMode
GrantTarget
Target of a GRANT/REVOKE: either a namespace or a realm.
ModalContent
Multi-modal content parsed from HirnQL CONTENT IMAGE/CODE/AUDIO/VIDEO/DOCUMENT/STRUCTURED.
OutputFormat
PrincipalRef
Principal reference: either an agent or a team.
RecallSnapshotAst
RetrievalMode
Retrieval mode for THINK statements.
SemanticTargetRef
SetValue
Value for a SET assignment.
Statement
A parsed HirnQL statement.
TemporalClause
TierPolicyValue
A value in a SET TIER_POLICY assignment.

Functions§

collect_parameters
Extract all parameter placeholders from a statement.
is_param
Returns true if the string is a parameter placeholder ($1, $name).
parse
Parse a HirnQL query string into a Statement.
parse_edge_relation
Parse a case-insensitive edge relation name (e.g. "related_to", "causes") into an EdgeRelation.
parse_with_limits
Parse a HirnQL query string with configurable limits.