Expand description
DDS-WEB Sample Selector BNF Parser — Spec §7.4.8.
Implements §7.4.8 fully.
Spec source: OMG DDS-WEB 1.0 §7.4.8 (pp. 51-53) — DataReader::read
with the SampleSelector BNF grammar:
SampleSelector ::= FilterExpression ( ',' MetadataExpression )?
FilterExpression ::= Term ( ('AND' | 'OR') Term )*
Term ::= Atom | '(' FilterExpression ')'
Atom ::= FieldRef CompOp Literal
MetadataExpression ::= 'sample_state=' SampleState
| 'view_state=' ViewState
| 'instance_state='InstanceStateThe parser returns an AST SampleSelector that the caller can
translate into a DDS [QueryCondition]
(crates/dcps/src/query_condition.rs).
Structs§
- Sample
Selector - Top-level AST of the sample-selector expression.
Enums§
- BoolOp
- Boolean operator.
- Compare
Op - Comparison operator (Spec §7.4.8).
- Filter
Expression - Filter expression — boolean expression over field references.
- Instance
State Match - Spec §7.4.8 — instance-state match.
- Literal
- Literal value on the right-hand side of a comparison.
- Metadata
Expression - Metadata expression from Spec §7.4.8.
- Parse
Error - Parser error.
- Sample
State Match - Spec §7.4.8 — sample-state match (DDS DCPS §2.2.2.5).
- View
State Match - Spec §7.4.8 — view-state match.
Functions§
- parse_
sample_ selector - Parses a sample-selector string per Spec §7.4.8 BNF.