aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/diceparserhelper.h
diff options
context:
space:
mode:
authorrenaud guezennec <renaud@rolisteam.org>2019-07-29 20:35:52 +0000
committerrenaud guezennec <renaud@rolisteam.org>2019-07-29 20:35:52 +0000
commit1a902d383eef1e042d4462cd07b9384fcdf4d118 (patch)
tree766b8ab720fa5da11730d2fc2388f51b9d14de49 /include/diceparserhelper.h
parentf5906125576a8323a731c9456ce3dfc53b67ef59 (diff)
parent0d4b68221bda594cc695d216dfa21306ddb69c85 (diff)
downloadOneRoll-1a902d383eef1e042d4462cd07b9384fcdf4d118.tar.gz
OneRoll-1a902d383eef1e042d4462cd07b9384fcdf4d118.zip
Merge branch 'liberation' into 'master'
Add fuzzer on the DiceParser See merge request kde/rolisteam-diceparser!2
Diffstat (limited to 'include/diceparserhelper.h')
-rw-r--r--include/diceparserhelper.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/diceparserhelper.h b/include/diceparserhelper.h
new file mode 100644
index 0000000..00b9362
--- /dev/null
+++ b/include/diceparserhelper.h
@@ -0,0 +1,43 @@
+#ifndef DICEPARSERHELPER_H
+#define DICEPARSERHELPER_H
+
+namespace Dice
+{
+
+enum class CONDITION_STATE : int
+{
+ ERROR,
+ ALWAYSTRUE,
+ UNREACHABLE,
+ REACHABLE
+};
+
+enum class ERROR_CODE : int
+{
+ NO_DICE_ERROR,
+ DIE_RESULT_EXPECTED,
+ BAD_SYNTAXE,
+ ENDLESS_LOOP_ERROR,
+ DIVIDE_BY_ZERO,
+ NOTHING_UNDERSTOOD,
+ NO_DICE_TO_ROLL,
+ TOO_MANY_DICE,
+ NO_VARIBALE,
+ INVALID_INDEX,
+ UNEXPECTED_CHARACTER,
+ NO_PREVIOUS_ERROR,
+ NO_VALID_RESULT
+};
+
+/**
+ * @brief The RESULT_TYPE enum or combinaison
+ */
+enum class RESULT_TYPE : int
+{
+ NONE= 0,
+ SCALAR= 1,
+ STRING= 2,
+ DICE_LIST= 4
+};
+}
+#endif // DICEPARSERHELPER_H