summaryrefslogtreecommitdiffstats
path: root/src/lib/eval/eval_context.h
diff options
context:
space:
mode:
authorTomek Mrugalski <tomasz@isc.org>2015-10-28 20:37:12 +0100
committerTomek Mrugalski <tomasz@isc.org>2015-10-30 14:20:11 +0100
commitfe5ec7722c8291286ea12a33a5df97330a571fd3 (patch)
tree91dc844af50571fd02b549f515ed2ed87484fa0f /src/lib/eval/eval_context.h
parent[4088] Bison example integrated. (diff)
downloadkea-fe5ec7722c8291286ea12a33a5df97330a571fd3.tar.xz
kea-fe5ec7722c8291286ea12a33a5df97330a571fd3.zip
[4088] Classes renamed to Kea nomenclature
Diffstat (limited to 'src/lib/eval/eval_context.h')
-rw-r--r--src/lib/eval/eval_context.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/lib/eval/eval_context.h b/src/lib/eval/eval_context.h
index 1d26f04faa..9960d77f95 100644
--- a/src/lib/eval/eval_context.h
+++ b/src/lib/eval/eval_context.h
@@ -1,22 +1,22 @@
-#ifndef CALCXX_DRIVER_HH
-# define CALCXX_DRIVER_HH
+#ifndef EVAL_CONTEXT_H
+#define EVAL_CONTEXT_H
# include <string>
# include <map>
# include "parser.h"
// Tell Flex the lexer's prototype ...
# define YY_DECL \
- yy::calcxx_parser::symbol_type yylex (calcxx_driver& driver)
+ yy::EvalParser::symbol_type yylex (EvalContext& driver)
// ... and declare it for the parser's sake.
YY_DECL;
// Conducting the whole scanning and parsing of Calc++.
-class calcxx_driver
+class EvalContext
{
public:
- calcxx_driver ();
- virtual ~calcxx_driver ();
+ EvalContext ();
+ virtual ~EvalContext ();
std::map<std::string, int> variables;
@@ -29,7 +29,9 @@ public:
// Run the parser on file F.
// Return 0 on success.
- int parse (const std::string& f);
+ int parseFile(const std::string& filename);
+
+ int parseString(const std::string& str);
// The name of the file being parsed.
// Used later to pass the file name to the location tracker.
@@ -42,4 +44,4 @@ public:
void error (const yy::location& l, const std::string& m);
void error (const std::string& m);
};
-#endif // ! CALCXX_DRIVER_HH
+#endif // ! EVALCONTEXT_HH