summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2011-10-27 04:55:51 +0000
committerJon A. Cruz <jon@joncruz.org>2011-10-27 04:55:51 +0000
commit2633767789e4264b13ef91a684accf734fb4e94f (patch)
tree0f6bc8d758b8e4bcf01d2dd393166907906c156e /src/util
parentCleanup pass on documentation that was dumping garbage into doxygen output. (diff)
downloadinkscape-2633767789e4264b13ef91a684accf734fb4e94f.tar.gz
inkscape-2633767789e4264b13ef91a684accf734fb4e94f.zip
Fixing more broken and split doc comments.
(bzr r10697)
Diffstat (limited to 'src/util')
-rw-r--r--src/util/expression-evaluator.cpp40
-rw-r--r--src/util/expression-evaluator.h48
2 files changed, 45 insertions, 43 deletions
diff --git a/src/util/expression-evaluator.cpp b/src/util/expression-evaluator.cpp
index 87937be9a..37e9d6cc1 100644
--- a/src/util/expression-evaluator.cpp
+++ b/src/util/expression-evaluator.cpp
@@ -22,46 +22,6 @@
* <http://www.gnu.org/licenses/>.
*/
-/** Introducing eevl eva, the evaluator. A straightforward recursive
- * descent parser, no fuss, no new dependencies. The lexer is hand
- * coded, tedious, not extremely fast but works. It evaluates the
- * expression as it goes along, and does not create a parse tree or
- * anything, and will not optimize anything. It uses doubles for
- * precision, with the given use case, that's enough to combat any
- * rounding errors (as opposed to optimizing the evalutation).
- *
- * It relies on external unit resolving through a callback and does
- * elementary dimensionality constraint check (e.g. "2 mm + 3 px * 4
- * in" is an error, as L + L^2 is a missmatch). It uses g_strtod() for numeric
- * conversions and it's non-destructive in terms of the paramters, and
- * it's reentrant.
- *
- * EBNF:
- *
- * expression ::= term { ('+' | '-') term }* |
- * <empty string> ;
- *
- * term ::= signed factor { ( '*' | '/' ) signed factor }* ;
- *
- * signed factor ::= ( '+' | '-' )? factor ;
- *
- * unit factor ::= factor unit? ;
- *
- * factor ::= number | '(' expression ')' ;
- *
- * number ::= ? what g_strtod() consumes ? ;
- *
- * unit ::= ? what not g_strtod() consumes and not whitespace ? ;
- *
- * The code should match the EBNF rather closely (except for the
- * non-terminal unit factor, which is inlined into factor) for
- * maintainability reasons.
- *
- * It will allow 1++1 and 1+-1 (resulting in 2 and 0, respectively),
- * but I figured one might want that, and I don't think it's going to
- * throw anyone off.
- */
-
#include "config.h"
#include "util/expression-evaluator.h"
diff --git a/src/util/expression-evaluator.h b/src/util/expression-evaluator.h
index 90789a25f..4b1065268 100644
--- a/src/util/expression-evaluator.h
+++ b/src/util/expression-evaluator.h
@@ -22,8 +22,8 @@
* <http://www.gnu.org/licenses/>.
*/
-#ifndef __GIMP_EEVL_H__
-#define __GIMP_EEVL_H__
+#ifndef SEEN_GIMP_EEVL_H
+#define SEEN_GIMP_EEVL_H
#include "util/units.h"
@@ -31,6 +31,48 @@
#include <sstream>
#include <string>
+/**
+ * @file
+ * Introducing eevl eva, the evaluator. A straightforward recursive
+ * descent parser, no fuss, no new dependencies. The lexer is hand
+ * coded, tedious, not extremely fast but works. It evaluates the
+ * expression as it goes along, and does not create a parse tree or
+ * anything, and will not optimize anything. It uses doubles for
+ * precision, with the given use case, that's enough to combat any
+ * rounding errors (as opposed to optimizing the evalutation).
+ *
+ * It relies on external unit resolving through a callback and does
+ * elementary dimensionality constraint check (e.g. "2 mm + 3 px * 4
+ * in" is an error, as L + L^2 is a missmatch). It uses g_strtod() for numeric
+ * conversions and it's non-destructive in terms of the paramters, and
+ * it's reentrant.
+ *
+ * EBNF:
+ *
+ * expression ::= term { ('+' | '-') term }* |
+ * <empty string> ;
+ *
+ * term ::= signed factor { ( '*' | '/' ) signed factor }* ;
+ *
+ * signed factor ::= ( '+' | '-' )? factor ;
+ *
+ * unit factor ::= factor unit? ;
+ *
+ * factor ::= number | '(' expression ')' ;
+ *
+ * number ::= ? what g_strtod() consumes ? ;
+ *
+ * unit ::= ? what not g_strtod() consumes and not whitespace ? ;
+ *
+ * The code should match the EBNF rather closely (except for the
+ * non-terminal unit factor, which is inlined into factor) for
+ * maintainability reasons.
+ *
+ * It will allow 1++1 and 1+-1 (resulting in 2 and 0, respectively),
+ * but I figured one might want that, and I don't think it's going to
+ * throw anyone off.
+ */
+
namespace Inkscape {
namespace Util {
@@ -77,4 +119,4 @@ protected:
}
}
-#endif /* __GIMP_EEVL_H__ */
+#endif // SEEN_GIMP_EEVL_H