libqasm
library for handling cQASM files
|
Internal helper class for parsing cQASM file versions. More...
Public Member Functions | |
virtual | ~ParseHelper () |
Destroys the parse helper. More... | |
Static Public Member Functions | |
static void | push_error (const std::string &error) |
Pushes an error. More... | |
Public Attributes | |
FILE * | fptr = nullptr |
File pointer being scanned, if no data was specified. More... | |
void * | buf = nullptr |
Flex data buffer, if data was specified. More... | |
void * | scanner = nullptr |
Flex reentrant scanner data. More... | |
std::string | filename |
Name of the file being parsed. More... | |
Version | version |
The parse result. More... | |
Friends | |
Version | parse_file (const std::string &filename) |
Parse the given file. More... | |
Version | parse_file (FILE *file, const std::string &filename) |
Parse using the given file pointer. More... | |
Version | parse_string (const std::string &data, const std::string &filename) |
Parse the given string. More... | |
Internal helper class for parsing cQASM file versions.
Definition at line 78 of file cqasm-version.hpp.
#include <cqasm-version.hpp>
|
virtual |
|
static |
Pushes an error.
Definition at line 218 of file cqasm-version.cpp.
|
friend |
Parse the given file.
Parse the given file.
Throws an AnalysisError if this fails.
Definition at line 16 of file cqasm-v1-parse-helper.cpp.
|
friend |
Parse using the given file pointer.
Parse using the given file pointer.
Throws an AnalysisError if this fails. The file is rewound back to the start when parsing completes.
Definition at line 23 of file cqasm-v1-parse-helper.cpp.
|
friend |
Parse the given string.
A filename may be given in addition for use within error messages.
Parse the given string.
A filename may be given in addition for use within the AnalysisError thrown when version parsing fails.
Definition at line 31 of file cqasm-v1-parse-helper.cpp.
FILE* cqasm::version::ParseHelper::fptr = nullptr |
File pointer being scanned, if no data was specified.
Definition at line 84 of file cqasm-version.hpp.
void* cqasm::version::ParseHelper::buf = nullptr |
Flex data buffer, if data was specified.
Definition at line 89 of file cqasm-version.hpp.
void* cqasm::version::ParseHelper::scanner = nullptr |
Flex reentrant scanner data.
Definition at line 94 of file cqasm-version.hpp.
std::string cqasm::version::ParseHelper::filename |
Name of the file being parsed.
Definition at line 99 of file cqasm-version.hpp.
Version cqasm::version::ParseHelper::version |
The parse result.
Definition at line 104 of file cqasm-version.hpp.