Changeset 1427:14c75970840e in lemon-0.x for src/lemon/lemon_reader.h
- Timestamp:
- 05/18/05 15:02:47 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1899
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/lemon/lemon_reader.h
r1424 r1427 100 100 /// while it does not starts with \c \@ character. This line can start a 101 101 /// new section or if it can close the file with the \c \@end line. 102 /// The file format ignore the empty lines and it may contain comments103 /// started with a \c # character to the end of the line.102 /// The file format ignore the empty and comment lines. The line is 103 /// comment line if it starts with a \c # character. 104 104 /// 105 105 /// The framework provides an abstract LemonReader::SectionReader class … … 109 109 /// can be attached to an LemonReader and the first attached what can 110 110 /// process the section will be used. Its \c read() member will called 111 /// with a stream contains the section. From this stream the empty lines112 /// and comments are filtered out.111 /// with a stream contains the section. From this stream the empty and 112 /// comment lines are filtered out. 113 113 /// 114 114 /// \relates GraphReader … … 134 134 enum skip_state_type { 135 135 no_skip, 136 after_comment,137 136 after_endl, 138 empty_line137 comment_line 139 138 }; 140 139 … … 181 180 skip_state = after_endl; 182 181 return true; 183 case '#':184 skip_state = after_comment;185 return false;186 182 default: 187 183 return true; 188 184 } 189 case after_comment:190 switch (c) {191 case '\n':192 skip_state = after_endl;193 return true;194 default:195 return false;196 }197 185 case after_endl: 198 186 switch (c) { … … 202 190 return false; 203 191 case '#': 204 skip_state = empty_line;192 skip_state = comment_line; 205 193 return false; 206 194 default: … … 213 201 } 214 202 break; 215 case empty_line:203 case comment_line: 216 204 switch (c) { 217 205 case '\n':
Note: See TracChangeset
for help on using the changeset viewer.