fix of includes
[fw/sdcc] / sim / ucsim / cmd.src / cmdlexcl.h
1 #ifndef CMDLEXCL_HEADER
2 #define CMDLEXCL_HEADER
3
4 #include <stdlib.h>
5 //#ifndef __FLEX_LEXER_H
6 //#include <FlexLexer.h>
7 //#endif
8 #include "flex_lexer.h"
9 #include "i_string.h"
10
11 #include "pobjcl.h"
12
13
14 class cl_ucsim_lexer: public yyFlexLexer
15 {
16 protected:
17   char *string_to_parse;
18   char *string_ptr;
19 public:
20   cl_ucsim_lexer(void): yyFlexLexer()
21   {
22     string_to_parse= string_ptr= 0;
23   }
24   cl_ucsim_lexer(char *str): yyFlexLexer()
25   {
26     string_to_parse= string_ptr= strdup(str);
27   }
28   virtual ~cl_ucsim_lexer(void)
29   {
30     if (string_to_parse)
31       {
32         free(string_to_parse);
33         string_to_parse= 0;
34       }
35   }
36   void activate_lexer_to_parse_into(void *yylv);
37 protected:
38   int LexerInput(char *buf, int max_size);
39 public:
40   int check_id(char *token);
41 };
42
43
44 #endif