summaryrefslogtreecommitdiff
path: root/omegalib/omegacalc/include/omega_calc/myflex.h
diff options
context:
space:
mode:
Diffstat (limited to 'omegalib/omegacalc/include/omega_calc/myflex.h')
-rwxr-xr-xomegalib/omegacalc/include/omega_calc/myflex.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/omegalib/omegacalc/include/omega_calc/myflex.h b/omegalib/omegacalc/include/omega_calc/myflex.h
new file mode 100755
index 0000000..d472e51
--- /dev/null
+++ b/omegalib/omegacalc/include/omega_calc/myflex.h
@@ -0,0 +1,27 @@
+#ifndef _MYFLEX_H
+#define _MYFLEX_H
+
+#ifndef yyFlexLexerOnce
+#include <FlexLexer.h>
+#endif
+#include <iostream>
+#include <string>
+#include <vector>
+
+class myFlexLexer: public yyFlexLexer {
+protected:
+ std::string cur_line;
+ int cur_pos;
+ std::vector<std::string> history;
+ int first_history_pos;
+ int last_history_pos;
+ std::vector<std::string> key_seqs;
+
+public:
+ myFlexLexer(std::istream *arg_yyin = NULL, std::ostream *arg_yyout = NULL);
+ ~myFlexLexer() {}
+protected:
+ int LexerInput(char *buf, int max_size);
+};
+
+#endif