libqasm
library for handling cQASM files
Classes | Typedefs | Functions
cqasm::v1::parser Namespace Reference

Detailed Description

Namespace for the parser functions and classes.

Classes

class  ParseHelper
 Internal helper class for parsing cQASM files. More...
 
class  ParseResult
 Parse result information. More...
 

Typedefs

using SourceLocation = annotations::SourceLocation
 

Functions

ParseResult parse_file (const std::string &filename)
 Parse the given file. More...
 
ParseResult parse_file (FILE *file, const std::string &filename)
 Parse using the given file pointer. More...
 
ParseResult parse_string (const std::string &data, const std::string &filename)
 Parse the given string. More...
 

Typedef Documentation

◆ SourceLocation

Definition at line 23 of file cqasm-v1-parse-helper.hpp.

Function Documentation

◆ parse_file() [1/2]

ParseResult cqasm::v1::parser::parse_file ( const std::string &  filename)

Parse the given file.

Definition at line 16 of file cqasm-v1-parse-helper.cpp.

◆ parse_file() [2/2]

ParseResult cqasm::v1::parser::parse_file ( FILE *  file,
const std::string &  filename 
)

Parse using the given file pointer.

Definition at line 23 of file cqasm-v1-parse-helper.cpp.

◆ parse_string()

ParseResult cqasm::v1::parser::parse_string ( const std::string &  data,
const std::string &  filename 
)

Parse the given string.

A filename may be given in addition for use within error messages.

Definition at line 31 of file cqasm-v1-parse-helper.cpp.