diff options
| author | 2014-01-03 09:03:19 +0100 | |
|---|---|---|
| committer | 2014-01-03 09:03:19 +0100 | |
| commit | 4114232457cbc5739872f479ef5d7772e6b5f42f (patch) | |
| tree | 5d3de93d44c43a1580f1475cf9c5f0fcdc262459 | |
| parent | ce35330954ed54180cc16d4d774ba73577c98679 (diff) | |
| download | OneRoll-4114232457cbc5739872f479ef5d7772e6b5f42f.tar.gz OneRoll-4114232457cbc5739872f479ef5d7772e6b5f42f.zip | |
Adding new stuff and comment
| -rw-r--r-- | README.md | 9 | ||||
| -rw-r--r-- | diceParser.pro | 2 | ||||
| -rw-r--r-- | diceparser.h | 17 |
3 files changed, 28 insertions, 0 deletions
@@ -2,3 +2,12 @@ DiceParser ========== Rolisteam Dice Parser + +The grammar is something like this: + +Command =: Expression +Expression =: number | number Dice | ScalarOperator Expression +Dice =: DiceOperator Number(faces) +DiceOperator =: D +ScalarOperator =: [x,-,*,x,/] +number =: [0-9]+ diff --git a/diceParser.pro b/diceParser.pro index dcf1b5b..e585d74 100644 --- a/diceParser.pro +++ b/diceParser.pro @@ -25,3 +25,5 @@ SOURCES += main.cpp \ HEADERS += \ diceparser.h \ diceresult.h \ + +OTHER_FILES += README.md diff --git a/diceparser.h b/diceparser.h index 2905584..6833a92 100644 --- a/diceparser.h +++ b/diceparser.h @@ -5,6 +5,20 @@ #include <QMap> #include "node/executionnode.h" +/** + * @mainpage DiceParser + * + * the grammar is something like this: + * + * Command =: Expression | ScalarOperator Expression + * Expression =: number | number Dice | Command + * Dice =: DiceOperator Number(faces) + * DiceOperator =: D + * ScalarOperator =: [x,-,*,x,/] + * number =: [0-9]+ + * + */ + class Dice; /** * @brief The DiceParser class facade class, it receives a command and return a DiceResult class (not yet implemented). @@ -75,6 +89,9 @@ private: ExecutionNode* m_current; }; +/** + * @brief The Dice class is a basic class to store dice. (May not be required any more). + */ class Dice { public: |