diff options
author | goodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2000-09-19 20:15:23 +0000 |
---|---|---|
committer | goodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2000-09-19 20:15:23 +0000 |
commit | 7bc89f775b9129148f1bc9e1d5197ee13f3faca6 (patch) | |
tree | 71d60adc7c155b59a81b613710dd035a0b7259c7 /src/http_Expression.h | |
parent | 859970bb6282bd3368bfe463ecd00862c1cb2b57 (diff) |
Adding a primitive expression parser. It will parse simple
expressions such as a + b/(c+(d+f)) correctly, but mucks up
things like a+ b/c/d as it doesn't look too hard for places
to put brackets in. A fully parenthesised expression should
be fine.
It also doesn't have good error checking.
All thing improve with time... (well most, anyway 8-)
Tom
git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@51 1faa4e14-9dd3-4be0-9f0e-ffe519881164
Diffstat (limited to 'src/http_Expression.h')
-rw-r--r-- | src/http_Expression.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/http_Expression.h b/src/http_Expression.h new file mode 100644 index 0000000..ccb3de3 --- /dev/null +++ b/src/http_Expression.h @@ -0,0 +1,27 @@ + /*@@ + @header http_Expression.h + @date Tue Sep 19 22:02:45 2000 + @author Tom Goodale + @desc + Header for expression stuff. + @enddesc + @version $Header$ + @@*/ + +#ifndef __HTTP_EXPRESSION_H__ +#define __HTTP_EXPRESSION_H__ 1 + +#ifdef __cplusplus +extern "C" +{ +#endif + +char *HTTP_ExpressionParse(const char *expression); + +double HTTP_ExpressionEvaluate(char *buffer, double (*eval)(const char *)); + +#ifdef __cplusplus +} +#endif + +#endif /* __HTTP_EXPRESSION_H__ */ |