| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
#ifndef OPENTRYPARSER_H |
| 24 |
#define OPENTRYPARSER_H |
| 25 |
|
| 26 |
#include <QString> |
| 27 |
#include <QStringList> |
| 28 |
#include <QtXml> |
| 29 |
#include "node.h" |
| 30 |
#include "types.h" |
| 31 |
|
| 32 |
class OpEntryParser |
| 33 |
{ |
| 34 |
public: |
| 35 |
OpEntryParser(QString opcodeFile); |
| 36 |
|
| 37 |
~OpEntryParser(); |
| 38 |
|
| 39 |
void parseOpcodesXml(QString opcodeFile); |
| 40 |
void sortOpcodes(); |
| 41 |
void addExtraOpcodes(); |
| 42 |
QStringList opcodeNameList(bool includeDisabled=false); |
| 43 |
QString getSyntax(QString opcodeName); |
| 44 |
QVector<Opcode> getMatchingOpcodes(QString word, int maxsize = 0); |
| 45 |
QList< QPair<QString, QList<Opcode> > > getOpcodesByCategory(); |
| 46 |
int getCategoryCount(); |
| 47 |
QString getCategory(int index); |
| 48 |
QStringList getCategoryList(); |
| 49 |
QList<Opcode> getOpcodeList(int index); |
| 50 |
bool isOpcode(QString opcodeName); |
| 51 |
bool getOpcodeArgNames(Node &node); |
| 52 |
void setUdos(QHash<QString, Opcode>*udosMap) { m_udosMap = udosMap; } |
| 53 |
Opcode findOpcode(QString opcodeName); |
| 54 |
bool isKnownOpcode(QString name); |
| 55 |
QList<Opcode> opcodeList; |
| 56 |
|
| 57 |
private: |
| 58 |
QString m_opcodeFile; |
| 59 |
QHash<QString, Opcode> opcodeMap; |
| 60 |
QList< QPair<QString, QList<Opcode> > > opcodeCategoryList; |
| 61 |
QVector<QList<Opcode> > opcodeListCategory; |
| 62 |
QStringList categoryList; |
| 63 |
QStringList excludedOpcodes; |
| 64 |
QStringList m_opcodeNameListCache; |
| 65 |
|
| 66 |
void addOpcode(Opcode opcode); |
| 67 |
void addFlag(QString flag, QString description); |
| 68 |
|
| 69 |
QHash<QString, Opcode>*m_udosMap; |
| 70 |
|
| 71 |
}; |
| 72 |
|
| 73 |
#endif |