2021-02-25 09:51:28 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* @file DataParser.h
|
|
|
|
* A parser for the decompiled GOAL data format.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <string>
|
2022-06-22 23:37:46 -04:00
|
|
|
#include <vector>
|
|
|
|
|
2021-02-25 09:51:28 -05:00
|
|
|
#include "decompiler/Disasm/DecompilerLabel.h"
|
2022-06-22 23:37:46 -04:00
|
|
|
#include "decompiler/ObjectFile/LinkedWord.h"
|
2021-02-25 09:51:28 -05:00
|
|
|
|
|
|
|
namespace decompiler {
|
|
|
|
struct ParsedData {
|
|
|
|
std::vector<LinkedWord> words;
|
|
|
|
std::vector<DecompilerLabel> labels;
|
|
|
|
std::string print() const;
|
|
|
|
const DecompilerLabel& label(const std::string& name) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
ParsedData parse_data(const std::string& str);
|
|
|
|
|
|
|
|
} // namespace decompiler
|