summaryrefslogtreecommitdiff
path: root/omegalib/omegacalc/include/omega_calc/myflex.h
blob: d472e518a74ed0fdfad4f052c197baf9140f77c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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