11 #include <boost/tokenizer.hpp>
50 typedef boost::escaped_list_separator<char> Separator;
52 typedef boost::tokenizer<Separator> BT;
72 Tokenizer( std::istream &in);
79 void set_comment_pattern(
const std::string &pattern);
91 bool skip_to(
const std::string &pattern,
const std::string &end_search_pattern=
"");
104 bool next_line(
bool assert_for_remaining_tokens=
true);
114 inline BT::iterator & operator ++() {
115 if (! eol()) {position_++; ++tok_;}
117 while (! eol() && (*tok_).size()==0 ) {position_++; ++tok_;}
124 inline bool eol()
const
125 {
return tok_ == line_tokenizer_.end(); }
130 inline bool eof()
const
131 {
return in_->eof(); }
136 inline unsigned int pos()
const
143 inline unsigned int line_num()
const
144 {
return line_counter_;}
149 inline const std::string &f_name()
const
155 std::string position_msg()
const;
160 inline const std::string &
line()
const
170 void set_tokenizer();
175 std::ifstream *own_stream_;
181 std::string comment_pattern_;
184 unsigned int line_counter_;
185 unsigned int position_;
190 Separator separator_;