/**
 * Expression Parser for Vorion DSL
 *
 * Recursive descent parser that converts tokens into an AST.
 *
 * Grammar (Syntactic):
 *   expression    := or_expr
 *   or_expr       := and_expr (OR and_expr)*
 *   and_expr      := not_expr (AND not_expr)*
 *   not_expr      := NOT not_expr | comparison
 *   comparison    := primary (OPERATOR primary)?
 *                  | primary IN array
 *                  | primary LIKE primary
 *   primary       := IDENTIFIER | STRING | NUMBER | TRUE | FALSE | NULL
 *                  | LPAREN expression RPAREN
 *                  | array
 *   array         := LBRACKET (primary (COMMA primary)*)? RBRACKET
 *
 * Operator Precedence (lowest to highest):
 *   1. OR
 *   2. AND
 *   3. NOT
 *   4. Comparison operators (==, !=, >, <, >=, <=, IN, LIKE)
 *
 * @packageDocumentation
 */
import { Token } from './lexer.js';
/**
 * AST Node types
 */
export type ASTNodeType = 'BinaryExpression' | 'UnaryExpression' | 'ComparisonExpression' | 'InExpression' | 'LikeExpression' | 'Identifier' | 'Literal' | 'ArrayExpression';
/**
 * Base AST node interface
 */
export interface BaseASTNode {
    type: ASTNodeType;
}
/**
 * Binary expression node (AND, OR)
 */
export interface BinaryExpressionNode extends BaseASTNode {
    type: 'BinaryExpression';
    operator: 'AND' | 'OR';
    left: ASTNode;
    right: ASTNode;
}
/**
 * Unary expression node (NOT)
 */
export interface UnaryExpressionNode extends BaseASTNode {
    type: 'UnaryExpression';
    operator: 'NOT';
    operand: ASTNode;
}
/**
 * Comparison expression node
 */
export interface ComparisonExpressionNode extends BaseASTNode {
    type: 'ComparisonExpression';
    operator: '==' | '!=' | '>' | '<' | '>=' | '<=';
    left: ASTNode;
    right: ASTNode;
}
/**
 * IN expression node
 */
export interface InExpressionNode extends BaseASTNode {
    type: 'InExpression';
    value: ASTNode;
    array: ArrayExpressionNode;
}
/**
 * LIKE expression node
 */
export interface LikeExpressionNode extends BaseASTNode {
    type: 'LikeExpression';
    value: ASTNode;
    pattern: ASTNode;
}
/**
 * Identifier node (e.g., intent.action)
 */
export interface IdentifierNode extends BaseASTNode {
    type: 'Identifier';
    name: string;
}
/**
 * Literal value types
 */
export type LiteralValue = string | number | boolean | null;
/**
 * Literal node (string, number, boolean, null)
 */
export interface LiteralNode extends BaseASTNode {
    type: 'Literal';
    value: LiteralValue;
    raw: string;
}
/**
 * Array expression node
 */
export interface ArrayExpressionNode extends BaseASTNode {
    type: 'ArrayExpression';
    elements: ASTNode[];
}
/**
 * Union type for all AST nodes
 */
export type ASTNode = BinaryExpressionNode | UnaryExpressionNode | ComparisonExpressionNode | InExpressionNode | LikeExpressionNode | IdentifierNode | LiteralNode | ArrayExpressionNode;
/**
 * Error thrown during parsing
 */
export declare class ParserError extends Error {
    token: Token;
    expected?: string;
    constructor(message: string, token: Token, expected?: string);
}
/**
 * Parse tokens into an AST
 *
 * @param tokens - Array of tokens from the lexer
 * @returns Root AST node
 * @throws ParserError if syntax is invalid
 *
 * @example
 * ```ts
 * const tokens = tokenize("intent.action == 'read' AND risk > 50");
 * const ast = parse(tokens);
 * // Returns BinaryExpression with AND operator
 * ```
 */
export declare function parse(tokens: Token[]): ASTNode;
//# sourceMappingURL=parser.d.ts.map