00001 #ifndef parens_data_nodeFlexLexer_HPP_INCLUDED 00002 #define parens_data_nodeFlexLexer_HPP_INCLUDED 1 00003 00004 00005 /** 00006 parens_data_nodeFlexLexer is an auto-generated class and is NOT part of the 00007 public s11n or s11n::io APIs. It is an implementation detail only, 00008 but is installed along with the rest of the headers so that we can 00009 build s11n on platforms where the 'flex' tool is not available to 00010 generate this class' underlying code, provided thoses platforms can 00011 build the code generated by flex on another platform (which should 00012 work for most platforms, in theory). 00013 00014 See the FlexLexer class for the interface documentation. 00015 */ 00016 class parens_data_nodeFlexLexer : public FlexLexer { 00017 public: 00018 // arg_yyin and arg_yyout default to the cin and cout, but we 00019 // only make that assignment when initializing in yylex(). 00020 parens_data_nodeFlexLexer( istream* arg_yyin = 0, ostream* arg_yyout = 0 ); 00021 00022 virtual ~parens_data_nodeFlexLexer(); 00023 00024 void yy_switch_to_buffer( struct yy_buffer_state* new_buffer ); 00025 struct yy_buffer_state* yy_create_buffer( istream* s, int size ); 00026 void yy_delete_buffer( struct yy_buffer_state* b ); 00027 void yyrestart( istream* s ); 00028 00029 virtual int yylex(); 00030 virtual void switch_streams( istream* new_in, ostream* new_out ); 00031 00032 int yylex( istream* new_in, ostream* new_out = 0 ) { 00033 // see Frank's notes in FlexLexer.hpp for why yylex() is implemented this way. 00034 return FlexLexer::yylex(new_in, new_out); 00035 } 00036 00037 protected: 00038 virtual int LexerInput( char* buf, int max_size ); 00039 virtual void LexerOutput( const char* buf, int size ); 00040 virtual void LexerError( const char* msg ); 00041 00042 // Function that can be used by subclasses during yylex() 00043 virtual int actionHook(void* data = 0) { 00044 return data == 0; 00045 } 00046 00047 void yyunput( int c, char* buf_ptr ); 00048 int yyinput(); 00049 00050 void yy_load_buffer_state(); 00051 void yy_init_buffer( struct yy_buffer_state* b, istream* s ); 00052 void yy_flush_buffer( struct yy_buffer_state* b ); 00053 00054 int yy_start_stack_ptr; 00055 int yy_start_stack_depth; 00056 int* yy_start_stack; 00057 00058 void yy_push_state( int new_state ); 00059 void yy_pop_state(); 00060 int yy_top_state(); 00061 00062 yy_state_type yy_get_previous_state(); 00063 yy_state_type yy_try_NUL_trans( yy_state_type current_state ); 00064 int yy_get_next_buffer(); 00065 00066 istream* yyin; // input source for default LexerInput 00067 ostream* yyout; // output sink for default LexerOutput 00068 00069 struct yy_buffer_state* yy_current_buffer; 00070 00071 // yy_hold_char holds the character lost when yytext is formed. 00072 char yy_hold_char; 00073 00074 // Number of characters read into yy_ch_buf. 00075 int yy_n_chars; 00076 00077 // Points to current character in buffer. 00078 char* yy_c_buf_p; 00079 00080 int yy_init; // whether we need to initialize 00081 int yy_start; // start state number 00082 00083 // Flag which is used to allow yywrap()'s to do buffer switches 00084 // instead of setting up a fresh yyin. A bit of a hack ... 00085 int yy_did_buffer_switch_on_eof; 00086 00087 // The following are not always needed, but may be depending 00088 // on use of certain flex features (like REJECT or yymore()). 00089 00090 yy_state_type yy_last_accepting_state; 00091 char* yy_last_accepting_cpos; 00092 00093 yy_state_type* yy_state_buf; 00094 yy_state_type* yy_state_ptr; 00095 00096 char* yy_full_match; 00097 int* yy_full_state; 00098 int yy_full_lp; 00099 00100 int yy_lp; 00101 int yy_looking_for_trail_begin; 00102 00103 int yy_more_flag; 00104 int yy_more_len; 00105 int yy_more_offset; 00106 int yy_prev_more_offset; 00107 }; 00108 00109 #endif // parens_data_nodeFlexLexer_HPP_INCLUDED 00110