39 lines
849 B
C++
39 lines
849 B
C++
//
|
|
// Created by black on 12.06.25.
|
|
//
|
|
|
|
#ifndef COMMANDPARSER_H
|
|
#define COMMANDPARSER_H
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
|
|
class CommandParser {
|
|
|
|
private:
|
|
CommandParser() = default;
|
|
|
|
public:
|
|
/// Singleton Logik
|
|
CommandParser(const CommandParser&) = delete;
|
|
CommandParser(const CommandParser&&) = delete;
|
|
CommandParser& operator=(const CommandParser&) = delete;
|
|
CommandParser& operator=(const CommandParser&&) = delete;
|
|
~CommandParser() = default;
|
|
|
|
static CommandParser& getInstance();
|
|
|
|
/**
|
|
* Parst eine Zeile des Assembly Codes und gibt diese als sortierten Vektor zurück
|
|
*
|
|
* @param input Eine Zeile aus dem Assembly Code
|
|
* @return Ein Vektor mit Befehl und dessen Argumenten
|
|
*/
|
|
static std::vector<std::string> parseLine(const std::string& input);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //COMMANDPARSER_H
|