libqasm
library for handling cQASM files
cqasm-v1.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
9 #include "cqasm-v1-analyzer.hpp"
10 
14 namespace cqasm {
15 
20 namespace v1 {
21 
26 tree::One<semantic::Program> analyze(
27  const std::string &filename,
28  const std::string &api_version = "1.0"
29 );
30 
36 tree::One<semantic::Program> analyze(
37  FILE *file,
38  const std::string &filename = "<unknown>",
39  const std::string &api_version = "1.0"
40 );
41 
47 tree::One<semantic::Program> analyze_string(
48  const std::string &data,
49  const std::string &filename = "<unknown>",
50  const std::string &api_version = "1.0"
51 );
52 
57 analyzer::Analyzer default_analyzer(
58  const std::string &api_version = "1.0"
59 );
60 
61 } // namespace v1
62 } // namespace cqasm
tree::One< semantic::Program > analyze_string(const std::string &data, const std::string &filename, const std::string &api_version)
Parses and analyzes the given string with the default analyzer, dumping error messages to stderr and ...
Definition: cqasm-v1.cpp:43
analyzer::Analyzer default_analyzer(const std::string &api_version)
Constructs an Analyzer object with the defaults for cQASM 1.0 already loaded into it...
Definition: cqasm-v1.cpp:55
This file contains the Analyzer class and support classes, used to manage semantic analysis...
Toplevel namespace with entry points for the new API.
tree::One< semantic::Program > analyze(const std::string &filename, const std::string &api_version)
Parses and analyzes the given file with the default analyzer, dumping error messages to stderr and th...
Definition: cqasm-v1.cpp:18
Contains helper classes and objects for the lexer and parser generated by flex/bison, as well as the entry points for invoking the parser directly, in case you don&#39;t need semantic analysis.
Namespace for the "new" cQASM 1.x API.