Crate oq3_semantics

source ·
Expand description

Abstract Semantic Graph (ASG) This crate implements an abstract semantic graph (ASG) for the OpenQASM 3 language. Currently the semantic information encoded in this ASG includes: All identifiers are resolved to (scoped) symbols. All expressions are annotated with a type.

This kind of structure is often refered to as something like an AST decorated with semantic information, even though it’s not really a tree, but rather a directed acyclic graph. We use the acronym ASG here not to be pedantic but rather to have an easy and succinct way to distinguish the output of syntactic analysis from output of semantic analysis.

Modules§

Macros§

Structs§

  • A range in text, represented as a pair of TextSize.
  • A measure of text length. Also, equivalently, an index into text.