diff -r 91eb70983697 -r 14c75970840e src/lemon/lemon_reader.h --- a/src/lemon/lemon_reader.h Wed May 18 09:39:06 2005 +0000 +++ b/src/lemon/lemon_reader.h Wed May 18 13:02:47 2005 +0000 @@ -99,8 +99,8 @@ /// header line of the section. Each next lines belong to this section /// while it does not starts with \c \@ character. This line can start a /// new section or if it can close the file with the \c \@end line. - /// The file format ignore the empty lines and it may contain comments - /// started with a \c # character to the end of the line. + /// The file format ignore the empty and comment lines. The line is + /// comment line if it starts with a \c # character. /// /// The framework provides an abstract LemonReader::SectionReader class /// what defines the interface of a SectionReader. The SectionReader @@ -108,8 +108,8 @@ /// decides if it want to process the next section. Several SectionReaders /// can be attached to an LemonReader and the first attached what can /// process the section will be used. Its \c read() member will called - /// with a stream contains the section. From this stream the empty lines - /// and comments are filtered out. + /// with a stream contains the section. From this stream the empty and + /// comment lines are filtered out. /// /// \relates GraphReader /// \relates NodeSetReader @@ -133,9 +133,8 @@ enum skip_state_type { no_skip, - after_comment, after_endl, - empty_line + comment_line }; char_type small_buf[1]; @@ -180,20 +179,9 @@ case '\n': skip_state = after_endl; return true; - case '#': - skip_state = after_comment; - return false; default: return true; } - case after_comment: - switch (c) { - case '\n': - skip_state = after_endl; - return true; - default: - return false; - } case after_endl: switch (c) { case '@': @@ -201,7 +189,7 @@ case '\n': return false; case '#': - skip_state = empty_line; + skip_state = comment_line; return false; default: if (!isspace(c)) { @@ -212,7 +200,7 @@ } } break; - case empty_line: + case comment_line: switch (c) { case '\n': skip_state = after_endl;