Package com.darkcollective.relix.parser


package com.darkcollective.relix.parser
Low-level relational algebra expression parser.

Overview

This package converts a relational algebra expression string into an immutable AST (RelNode) defined in the relix-ast module. It supports the full operator vocabulary including Unicode symbols (π σ ρ γ τ λ δ ⋈ ⨝ ⟕ ⟖ ⟗ ⋉ ▷ ∪ ⊎ − ∩ ÷ ×) and their ASCII keyword equivalents (PROJECT, SELECT, RENAME, …).

Entry points

RelAlgebraParser
Recursive-descent parser. Use the static parse or parseOperand factory methods. Overloads that accept a filePath, startLine, and startColumn embed precise SourceLocation information into every produced AST node.
Lexer
Tokenizer used internally by the parser.
ParseException
Thrown on syntax errors; carries line, column, and offending lexeme.

Source positions

When the parser is constructed with an explicit file path and start position (as done by the language-level parser for embedded RA bodies), every produced RelNode, Predicate, and Operand carries a SourceLocation that maps back to the original source file, enabling precise error diagnostics from the semantic analysis phase.

See Also:
  • Class
    Description
    Tokenizes a relational algebra expression string into a stream of Tokens consumed by RelAlgebraParser.
    Thrown by RelAlgebraParser when the input does not conform to the relational algebra grammar.
    Recursive-descent parser for relational algebra expressions.
    An immutable token produced by the Lexer.
    Syntactic categories recognised by the Lexer.