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
parseorparseOperandfactory methods. Overloads that accept afilePath,startLine, andstartColumnembed preciseSourceLocationinformation 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:
-
ClassDescriptionTokenizes a relational algebra expression string into a stream of
Tokens consumed byRelAlgebraParser.Thrown byRelAlgebraParserwhen the input does not conform to the relational algebra grammar.Recursive-descent parser for relational algebra expressions.An immutable token produced by theLexer.Syntactic categories recognised by theLexer.