libqasm
library for handling cQASM files
Classes | Namespaces | Typedefs | Enumerations | Functions
cqasm-v1-ast-gen.hpp File Reference

Header file for the abstract syntax tree node classes. More...

Go to the source code of this file.

Classes

class  cqasm::v1::ast::Visitor< T >
 Base class for the visitor pattern for the tree. More...
 
class  cqasm::v1::ast::Node
 Main class for all nodes. More...
 
class  cqasm::v1::ast::Expression
 Any kind of expression. More...
 
class  cqasm::v1::ast::BinaryOp
 Any binary operator. More...
 
class  cqasm::v1::ast::ArithOp
 Arithmetic operators. More...
 
class  cqasm::v1::ast::Add
 Addition operator. More...
 
class  cqasm::v1::ast::Annotated
 Represents a node that carries annotation data. More...
 
class  cqasm::v1::ast::AnnotationData
 Represents an annotation. More...
 
class  cqasm::v1::ast::Assignment
 An assignment statement within a loop definition. More...
 
class  cqasm::v1::ast::BitwiseOp
 Bitwise operators. More...
 
class  cqasm::v1::ast::BitwiseAnd
 Bitwise AND operator. More...
 
class  cqasm::v1::ast::UnaryOp
 Any unary operator. More...
 
class  cqasm::v1::ast::BitwiseNot
 Bitwise NOT (one's complement). More...
 
class  cqasm::v1::ast::BitwiseOr
 Bitwise OR operator. More...
 
class  cqasm::v1::ast::BitwiseXor
 Bitwise XOR operator. More...
 
class  cqasm::v1::ast::Statement
 Any kind of statement. More...
 
class  cqasm::v1::ast::Structured
 Any version 1.2+ structured control-flow statement. More...
 
class  cqasm::v1::ast::BreakStatement
 A break statement. More...
 
class  cqasm::v1::ast::Bundle
 A list of parallel instructions. More...
 
class  cqasm::v1::ast::CmpOp
 Comparison operators. More...
 
class  cqasm::v1::ast::CmpEq
 Equality operator. More...
 
class  cqasm::v1::ast::CmpGe
 Greater-than-or-equal operator. More...
 
class  cqasm::v1::ast::CmpGt
 Greater-than operator. More...
 
class  cqasm::v1::ast::CmpLe
 Less-than-or-equal operator. More...
 
class  cqasm::v1::ast::CmpLt
 Less-than operator. More...
 
class  cqasm::v1::ast::CmpNe
 Inequality operator. More...
 
class  cqasm::v1::ast::ContinueStatement
 A continue statement. More...
 
class  cqasm::v1::ast::Divide
 True division operator. More...
 
class  cqasm::v1::ast::ErroneousExpression
 Placeholder for an expression with a parse error. More...
 
class  cqasm::v1::ast::Root
 Any root node for the AST. More...
 
class  cqasm::v1::ast::ErroneousProgram
 Placeholder for a program with a parse error. More...
 
class  cqasm::v1::ast::ErroneousStatement
 Placeholder for a statement with a parse error. More...
 
class  cqasm::v1::ast::ExpressionList
 Represents a comma-separated list of expressions. More...
 
class  cqasm::v1::ast::FloatLiteral
 A floating point literal. More...
 
class  cqasm::v1::ast::ForLoop
 A C-style for loop. More...
 
class  cqasm::v1::ast::ForeachLoop
 A foreach loop. More...
 
class  cqasm::v1::ast::FunctionCall
 A function call. More...
 
class  cqasm::v1::ast::Identifier
 An identifier. More...
 
class  cqasm::v1::ast::IfElse
 An if-else chain. More...
 
class  cqasm::v1::ast::IfElseBranch
 A single condition + block for use in an if-else chain. More...
 
class  cqasm::v1::ast::Index
 Indexation operator. More...
 
class  cqasm::v1::ast::IndexEntry
 An entry in an index list. More...
 
class  cqasm::v1::ast::IndexItem
 A single index in an index list. More...
 
class  cqasm::v1::ast::IndexList
 A list of one or more indices. More...
 
class  cqasm::v1::ast::IndexRange
 An inclusive range of indices in an index list. More...
 
class  cqasm::v1::ast::Instruction
 Any kind of instruction. More...
 
class  cqasm::v1::ast::IntDivide
 Integer division operator. More...
 
class  cqasm::v1::ast::IntegerLiteral
 An integer literal. More...
 
class  cqasm::v1::ast::JsonLiteral
 Represents a JSON literal. More...
 
class  cqasm::v1::ast::LogicalOp
 Logical operators. More...
 
class  cqasm::v1::ast::LogicalAnd
 Logical AND operator. More...
 
class  cqasm::v1::ast::LogicalNot
 Logical/boolean NOT. More...
 
class  cqasm::v1::ast::LogicalOr
 Logical OR operator. More...
 
class  cqasm::v1::ast::LogicalXor
 Logical XOR operator. More...
 
class  cqasm::v1::ast::Mapping
 A mapping (alias) for an expression. More...
 
class  cqasm::v1::ast::MatrixLiteral
 Represents a matrix literal. More...
 
class  cqasm::v1::ast::Modulo
 Modulo operator. More...
 
class  cqasm::v1::ast::Multiply
 Multiplication operator. More...
 
class  cqasm::v1::ast::Negate
 Negation operator (two's complement). More...
 
class  cqasm::v1::ast::Power
 Exponentiation operator. More...
 
class  cqasm::v1::ast::Program
 A complete program. More...
 
class  cqasm::v1::ast::RepeatUntilLoop
 A repeat-until loop. More...
 
class  cqasm::v1::ast::ShiftOp
 Shift operators. More...
 
class  cqasm::v1::ast::ShiftLeft
 Shift-left operator. More...
 
class  cqasm::v1::ast::ShiftRightArith
 Arithmetic/signed shift-right operator (shifts in sign). More...
 
class  cqasm::v1::ast::ShiftRightLogic
 Logical/unsigned shift-right operator (shifts in zero). More...
 
class  cqasm::v1::ast::StatementList
 A list of statements. More...
 
class  cqasm::v1::ast::StringLiteral
 Represents a string literal. More...
 
class  cqasm::v1::ast::Subcircuit
 A subcircuit header. More...
 
class  cqasm::v1::ast::Subtract
 Subtraction operator. More...
 
class  cqasm::v1::ast::TernaryCond
 Ternary conditional operator. More...
 
class  cqasm::v1::ast::Variables
 One or more variable declaration for some type. More...
 
class  cqasm::v1::ast::Version
 The file version identifier. More...
 
class  cqasm::v1::ast::WhileLoop
 A while loop. More...
 
class  cqasm::v1::ast::VisitorBase
 Internal class for implementing the visitor pattern. More...
 
class  cqasm::v1::ast::Visitor< T >
 Base class for the visitor pattern for the tree. More...
 
class  cqasm::v1::ast::RecursiveVisitor
 Visitor base class defaulting to DFS pre-order traversal. More...
 
class  cqasm::v1::ast::Dumper
 Visitor class that debug-dumps a tree to a stream. More...
 

Namespaces

 cqasm
 Toplevel namespace with entry points for the new API.
 
 cqasm::v1
 Namespace for the "new" cQASM 1.x API.
 
 cqasm::v1::ast
 Namespace for the abstract syntax tree node classes.
 

Typedefs

using cqasm::v1::ast::Base = cqasm::tree::Base
 
template<class T >
using cqasm::v1::ast::Maybe = cqasm::tree::Maybe< T >
 
template<class T >
using cqasm::v1::ast::One = cqasm::tree::One< T >
 
template<class T >
using cqasm::v1::ast::Any = cqasm::tree::Any< T >
 
template<class T >
using cqasm::v1::ast::Many = cqasm::tree::Many< T >
 
template<class T >
using cqasm::v1::ast::OptLink = cqasm::tree::OptLink< T >
 
template<class T >
using cqasm::v1::ast::Link = cqasm::tree::Link< T >
 

Enumerations

enum  cqasm::v1::ast::NodeType {
  cqasm::v1::ast::NodeType::Add, cqasm::v1::ast::NodeType::AnnotationData, cqasm::v1::ast::NodeType::Assignment, cqasm::v1::ast::NodeType::BitwiseAnd,
  cqasm::v1::ast::NodeType::BitwiseNot, cqasm::v1::ast::NodeType::BitwiseOr, cqasm::v1::ast::NodeType::BitwiseXor, cqasm::v1::ast::NodeType::BreakStatement,
  cqasm::v1::ast::NodeType::Bundle, cqasm::v1::ast::NodeType::CmpEq, cqasm::v1::ast::NodeType::CmpGe, cqasm::v1::ast::NodeType::CmpGt,
  cqasm::v1::ast::NodeType::CmpLe, cqasm::v1::ast::NodeType::CmpLt, cqasm::v1::ast::NodeType::CmpNe, cqasm::v1::ast::NodeType::ContinueStatement,
  cqasm::v1::ast::NodeType::Divide, cqasm::v1::ast::NodeType::ErroneousExpression, cqasm::v1::ast::NodeType::ErroneousProgram, cqasm::v1::ast::NodeType::ErroneousStatement,
  cqasm::v1::ast::NodeType::ExpressionList, cqasm::v1::ast::NodeType::FloatLiteral, cqasm::v1::ast::NodeType::ForLoop, cqasm::v1::ast::NodeType::ForeachLoop,
  cqasm::v1::ast::NodeType::FunctionCall, cqasm::v1::ast::NodeType::Identifier, cqasm::v1::ast::NodeType::IfElse, cqasm::v1::ast::NodeType::IfElseBranch,
  cqasm::v1::ast::NodeType::Index, cqasm::v1::ast::NodeType::IndexItem, cqasm::v1::ast::NodeType::IndexList, cqasm::v1::ast::NodeType::IndexRange,
  cqasm::v1::ast::NodeType::Instruction, cqasm::v1::ast::NodeType::IntDivide, cqasm::v1::ast::NodeType::IntegerLiteral, cqasm::v1::ast::NodeType::JsonLiteral,
  cqasm::v1::ast::NodeType::LogicalAnd, cqasm::v1::ast::NodeType::LogicalNot, cqasm::v1::ast::NodeType::LogicalOr, cqasm::v1::ast::NodeType::LogicalXor,
  cqasm::v1::ast::NodeType::Mapping, cqasm::v1::ast::NodeType::MatrixLiteral, cqasm::v1::ast::NodeType::Modulo, cqasm::v1::ast::NodeType::Multiply,
  cqasm::v1::ast::NodeType::Negate, cqasm::v1::ast::NodeType::Power, cqasm::v1::ast::NodeType::Program, cqasm::v1::ast::NodeType::RepeatUntilLoop,
  cqasm::v1::ast::NodeType::ShiftLeft, cqasm::v1::ast::NodeType::ShiftRightArith, cqasm::v1::ast::NodeType::ShiftRightLogic, cqasm::v1::ast::NodeType::StatementList,
  cqasm::v1::ast::NodeType::StringLiteral, cqasm::v1::ast::NodeType::Subcircuit, cqasm::v1::ast::NodeType::Subtract, cqasm::v1::ast::NodeType::TernaryCond,
  cqasm::v1::ast::NodeType::Variables, cqasm::v1::ast::NodeType::Version, cqasm::v1::ast::NodeType::WhileLoop
}
 Enumeration of all node types. More...
 

Functions

std::ostream & cqasm::v1::ast::operator<< (std::ostream &os, const Node &object)
 Stream << overload for tree nodes (writes debug dump). More...
 

Detailed Description

Header file for the abstract syntax tree node classes.

Definition in file cqasm-v1-ast-gen.hpp.

#include <iostream>
#include "cqasm-tree.hpp"
#include "cqasm-v1-primitives.hpp"
Include dependency graph for cqasm-v1-ast-gen.hpp:
This graph shows which files directly or indirectly include this file: