1 #ifndef funtxt_data_nodeFlexLexer_HPP_INCLUDED
2 #define funtxt_data_nodeFlexLexer_HPP_INCLUDED 1
3 
4 
5 /**
6    funtxt_data_nodeFlexLexer is an auto-generated class and is NOT part of the
7    public s11n or s11n::io APIs. It is an implementation detail only,
8    but is installed along with the rest of the headers so that we can
9    build s11n on platforms where the 'flex' tool is not available to
10    generate this class' underlying code, provided thoses platforms can
11    build the code generated by flex on another platform (which should
12    work for most platforms, in theory).
13 
14    See the FlexLexer class for the interface documentation.
15 */
16 class funtxt_data_nodeFlexLexer : public FlexLexer {
17 public:
18         // arg_yyin and arg_yyout default to the cin and cout, but we
19         // only make that assignment when initializing in yylex().
20         funtxt_data_nodeFlexLexer( istream* arg_yyin = 0, ostream* arg_yyout = 0 );
21 
22         virtual ~funtxt_data_nodeFlexLexer();
23 
24         void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
25         struct yy_buffer_state* yy_create_buffer( istream* s, int size );
26         void yy_delete_buffer( struct yy_buffer_state* b );
27         void yyrestart( istream* s );
28 
29         virtual int yylex();
30         virtual void switch_streams( istream* new_in, ostream* new_out );
31 
yylex(istream * new_in,ostream * new_out=0)32         int yylex( istream* new_in, ostream* new_out = 0 ) {
33           // see Frank's notes in FlexLexer.hpp for why yylex() is implemented this way.
34           return FlexLexer::yylex(new_in, new_out);
35         }
36 
37 protected:
38         virtual int LexerInput( char* buf, int max_size );
39         virtual void LexerOutput( const char* buf, int size );
40         virtual void LexerError( const char* msg );
41 
42         // Function that can be used by subclasses during yylex()
actionHook(void * data=0)43         virtual int actionHook(void* data = 0) {
44           return data == 0;
45         }
46 
47         void yyunput( int c, char* buf_ptr );
48         int yyinput();
49 
50         void yy_load_buffer_state();
51         void yy_init_buffer( struct yy_buffer_state* b, istream* s );
52         void yy_flush_buffer( struct yy_buffer_state* b );
53 
54         int yy_start_stack_ptr;
55         int yy_start_stack_depth;
56         int* yy_start_stack;
57 
58         void yy_push_state( int new_state );
59         void yy_pop_state();
60         int yy_top_state();
61 
62         yy_state_type yy_get_previous_state();
63         yy_state_type yy_try_NUL_trans( yy_state_type current_state );
64         int yy_get_next_buffer();
65 
66         istream* yyin;  // input source for default LexerInput
67         ostream* yyout; // output sink for default LexerOutput
68 
69         struct yy_buffer_state* yy_current_buffer;
70 
71         // yy_hold_char holds the character lost when yytext is formed.
72         char yy_hold_char;
73 
74         // Number of characters read into yy_ch_buf.
75         int yy_n_chars;
76 
77         // Points to current character in buffer.
78         char* yy_c_buf_p;
79 
80         int yy_init;            // whether we need to initialize
81         int yy_start;           // start state number
82 
83         // Flag which is used to allow yywrap()'s to do buffer switches
84         // instead of setting up a fresh yyin.  A bit of a hack ...
85         int yy_did_buffer_switch_on_eof;
86 
87         // The following are not always needed, but may be depending
88         // on use of certain flex features (like REJECT or yymore()).
89 
90         yy_state_type yy_last_accepting_state;
91         char* yy_last_accepting_cpos;
92 
93         yy_state_type* yy_state_buf;
94         yy_state_type* yy_state_ptr;
95 
96         char* yy_full_match;
97         int* yy_full_state;
98         int yy_full_lp;
99 
100         int yy_lp;
101         int yy_looking_for_trail_begin;
102 
103         int yy_more_flag;
104         int yy_more_len;
105         int yy_more_offset;
106         int yy_prev_more_offset;
107 };
108 
109 #endif // funtxt_data_nodeFlexLexer_HPP_INCLUDED
110 
111