47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
#ifndef FESA_IO_ABAQUS_INPUT_SYNTAX_H_
|
|
#define FESA_IO_ABAQUS_INPUT_SYNTAX_H_
|
|
|
|
#include <filesystem>
|
|
#include <optional>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "fesa/core/source_identity.h"
|
|
|
|
namespace fesa {
|
|
|
|
/// @brief Stores a canonical parameter name and its optional source value.
|
|
/// @note Parameter names are canonicalized for lookup while values remain
|
|
/// source text.
|
|
struct KeywordParameter {
|
|
std::string name;
|
|
std::optional<std::string> value;
|
|
};
|
|
|
|
/// @brief Stores one parsed data row with its source location.
|
|
struct DataLine {
|
|
std::vector<std::string> fields;
|
|
SourceLocation location;
|
|
};
|
|
|
|
/// @brief Stores one syntax-only keyword block and its following data rows.
|
|
struct KeywordBlock {
|
|
std::string canonical_name;
|
|
std::string original_line;
|
|
std::vector<KeywordParameter> parameters;
|
|
std::vector<DataLine> data;
|
|
SourceLocation location;
|
|
};
|
|
|
|
/// @brief Stores the parsed syntax and stable identity of one Abaqus input
|
|
/// file.
|
|
struct ParsedInput {
|
|
std::filesystem::path source_path;
|
|
std::string source_content_identity;
|
|
std::vector<KeywordBlock> blocks;
|
|
};
|
|
|
|
} // namespace fesa
|
|
|
|
#endif // FESA_IO_ABAQUS_INPUT_SYNTAX_H_
|