Parser
-
namespace Parser
Functions to parse a VCAD file and return a tree structure.
The parser uses Boost Spirit X3 to parse the VCAD file.
Functions
-
std::shared_ptr<Node> ParseVCAD(const std::string &input, const std::string &material_config_path = std::string("configs/testing.json"))
Parses a VCAD file.
- Parameters:
input – The VCAD file
material_config_path – Path to the material configuration file, defaults to “configs/testing.json”
- Returns:
A pointer to root node of the tree
-
namespace Exceptions
-
struct InvalidInputDirectory : public Parser::Exceptions::ParserException
- #include <tree_parser.h>
Public Functions
-
inline InvalidInputDirectory(const std::string &message)
-
inline InvalidInputDirectory(const std::string &message)
-
struct InvalidInputFile : public Parser::Exceptions::ParserException
- #include <tree_parser.h>
Public Functions
-
inline InvalidInputFile(const std::string &message)
-
inline InvalidInputFile(const std::string &message)
-
struct InvalidSyntax : public Parser::Exceptions::ParserException
- #include <tree_parser.h>
Public Functions
-
inline InvalidSyntax(const std::string &message)
-
inline InvalidSyntax(const std::string &message)
-
struct MismatchedExpressionsFGrade : public Parser::Exceptions::ParserException
- #include <tree_parser.h>
Public Functions
-
inline MismatchedExpressionsFGrade(const std::string &message)
-
inline MismatchedExpressionsFGrade(const std::string &message)
-
struct ParserException
- #include <tree_parser.h>
Subclassed by Parser::Exceptions::InvalidInputDirectory, Parser::Exceptions::InvalidInputFile, Parser::Exceptions::InvalidSyntax, Parser::Exceptions::MismatchedExpressionsFGrade, Parser::Exceptions::UnspecifiedParsingError
Public Members
-
std::string m_message
-
std::string m_message
-
struct UnspecifiedParsingError : public Parser::Exceptions::ParserException
- #include <tree_parser.h>
Public Functions
-
inline UnspecifiedParsingError()
-
inline UnspecifiedParsingError()
-
struct InvalidInputDirectory : public Parser::Exceptions::ParserException
-
std::shared_ptr<Node> ParseVCAD(const std::string &input, const std::string &material_config_path = std::string("configs/testing.json"))