Expand description
openEHR QUERY (AQL 1.1.0): a hand-written lexer, parser, and AST over the
canonical ANTLR4 grammar vendored at vendor/grammar/, with no ANTLR
runtime dependency. AQL has no BMM meta-model, so this crate is written by
hand against the grammar and tested against vendor/examples/.
The crate stops at the AST: lexer tokenizes AqlLexer.g4 with logos,
ast carries one type per AqlParser.g4 rule, and parser builds an
ast::SelectQuery with chumsky. visit walks and rewrites the tree,
bind substitutes ITS-REST query_parameters into it, and printer
renders it back to AQL text. Query execution lives in the application.
The federation feature adds federation, which separates the
federation-only FROM ENDPOINT / ORGANISATION directive from a query
before the strict AQL 1.1.0 parse.
Modules§
- ast
- AQL abstract syntax tree, transcribed from
AqlParser.g4(vendored atvendor/grammar/). - bind
- Binding ITS-REST
query_parametersinto a parsed query. - federation
- The federation-only
FROM ENDPOINT/ORGANISATIONdirective, separated from a query before the strict AQL 1.1.0 parse. - lexer
- AQL lexer — a
logostokenizer transcribed from the authoritativeAqlLexer.g4(vendored atvendor/grammar/). - parser
- AQL parser — a
chumskyparser transcribed fromAqlParser.g4, turning thecrate::lexertoken stream into ancrate::ast::SelectQuery. - printer
- Canonical AQL text rendering of the
crate::ast. - visit
- Traversal of the
crate::ast: a read-onlyVisitand a mutatingVisitMut, each exhaustive over every node type.
Constants§
- SPEC_
VERSION - The openEHR specification version this crate implements.