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