Skip to content
GitHub Actions edited this page Jan 2, 2026 · 1 revision

aql_parser.cpp

Stand: 5. Dezember 2025
Version: 1.0.0
Kategorie: Src


Path: src/query/aql_parser.cpp

Purpose: Parses AQL queries into AST. Should include grammar details and handling of FULLTEXT tokens.

Public functions / symbols:

  • ``
  • if (token.type != TokenType::INVALID) {
  • if (ch == ' ') {
  • if (ch == '"' || ch == '\'') {
  • if (quote != '"' && quote != '\'') {
  • switch (next) {
  • switch (ch) {
  • for (const auto& token : tokens_) {
  • if (token.type == TokenType::INVALID) {
  • if (lastTraversal_) {
  • while (true) {
  • if constexpr (std::is_same_v<T, std::nullptr_t>) {
  • switch (op) {
  • for (const auto& arg : arguments) {
  • for (const auto& elem : elements) {
  • for (const auto& [key, value] : fields) {
  • skipWhitespace();
  • advance();
  • return readString(start_line, start_column);
  • return readNumber(start_line, start_column);
  • return readIdentifierOrKeyword(start_line, start_column);
  • return readOperatorOrPunctuation(start_line, start_column);
  • advance(); // Skip opening quote
  • advance(); // Skip closing quote
  • advance(); advance();
  • return Token(TokenType::INVALID, "===", line, col);
  • return Token(TokenType::EQ, "==", line, col);
  • return Token(TokenType::NEQ, "!=", line, col);
  • return Token(TokenType::LTE, "<=", line, col);
  • return Token(TokenType::GTE, ">=", line, col);
  • expect(TokenType::END_OF_FILE, "Expected end of query");
  • expect(TokenType::FOR, "Expected FOR");
  • advance(); // first '.'
  • advance(); // second '.'
  • expect(TokenType::GRAPH, "Expected GRAPH keyword in traversal");
  • expect(TokenType::LET, "Expected LET");
  • expect(TokenType::ASSIGN, "Expected '=' after variable name in LET");
  • expect(TokenType::FILTER, "Expected FILTER");
  • expect(TokenType::SORT, "Expected SORT");
  • expect(TokenType::COMMA, "Expected comma");
  • expect(TokenType::LIMIT, "Expected LIMIT");
  • expect(TokenType::RETURN, "Expected RETURN");
  • expect(TokenType::COLLECT, "Expected COLLECT");
  • expect(TokenType::ASSIGN, "Expected '=' after group variable in COLLECT");
  • expect(TokenType::ASSIGN, "Expected '=' in aggregation assignment");
  • expect(TokenType::LPAREN, "Expected '(' after aggregation function");
  • return parseLogicalOr();
  • expect(TokenType::COLON, "Expected ':' after object key");
  • expect(TokenType::RBRACE, "Expected '}' at end of object");
  • advance(); // empty object {}

ThemisDB Dokumentation

Version: 1.3.0 | Stand: Dezember 2025


📋 Schnellstart


🏗️ Architektur


🗄️ Basismodell


💾 Storage & MVCC


📇 Indexe & Statistiken


🔍 Query & AQL


💰 Caching


📦 Content Pipeline


🔎 Suche


⚡ Performance & Benchmarks


🏢 Enterprise Features


✅ Qualitätssicherung


🧮 Vektor & GNN


🌍 Geo Features


🛡️ Sicherheit & Governance

Authentication

Schlüsselverwaltung

Verschlüsselung

TLS & Certificates

PKI & Signatures

PII Detection

Vault & HSM

Audit & Compliance

Security Audits

Gap Analysis


🚀 Deployment & Betrieb

Docker

Observability

Change Data Capture

Operations


💻 Entwicklung

API Implementations

Changefeed

Security Development

Development Overviews


📄 Publikation & Ablage


🔧 Admin-Tools


🔌 APIs


📚 Client SDKs


📊 Implementierungs-Zusammenfassungen


📅 Planung & Reports


📖 Dokumentation


📝 Release Notes


📖 Styleguide & Glossar


🗺️ Roadmap & Changelog


💾 Source Code Documentation

Main Programs

Source Code Module


🗄️ Archive


🤝 Community & Support


Vollständige Dokumentation: https://makr-code.github.io/ThemisDB/

Clone this wiki locally