Expand description
The SNOMED CT Compositional Grammar: the syntax of post-coordinated expressions.
A logos lexer and a winnow parser faithful to the normative ABNF
(https://docs.snomed.org/snomed-ct-specifications/snomed-ct-compositional-grammar-specification/design/5-syntax-specification),
a syntax tree named after the grammar’s rules, and a printer whose output
parses back to the same tree.
The crate is syntax only: it resolves no concept identifier, checks no concept model, and decides no subsumption.
Modules§
- ast
- The syntax tree, named after the rules of the normative ABNF (https://docs.snomed.org/snomed-ct-specifications/snomed-ct-compositional-grammar-specification/design/5-syntax-specification).
- front
- The front both SNOMED CT languages read through.
- lexer
- The token layer of the Compositional Grammar: the ABNF’s character rules
folded into the tokens the parser consumes (
ws,term,stringValue,digit, and each literal the grammar spells). - parser
- The parser: one function per rule of the normative ABNF, over the token
stream of
crate::lexer, withwinnow.
Functions§
- parse
- Parses an expression in Compositional Grammar.