Changeset 197:5893bacaa720 in lemon-1.0 for lemon/lgf_writer.h
- Timestamp:
- 07/08/08 14:57:44 (17 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/lgf_writer.h
r192 r197 226 226 }; 227 227 228 bool isWhiteSpace(char c) {228 inline bool isWhiteSpace(char c) { 229 229 return c == ' ' || c == '\t' || c == '\v' || 230 230 c == '\n' || c == '\r' || c == '\f'; 231 231 } 232 232 233 bool isEscaped(char c) {233 inline bool isEscaped(char c) { 234 234 return c == '\\' || c == '\"' || c == '\'' || 235 235 c == '\a' || c == '\b'; 236 236 } 237 237 238 static void writeEscape(std::ostream& os, char c) {238 inline static void writeEscape(std::ostream& os, char c) { 239 239 switch (c) { 240 240 case '\\': … … 277 277 } 278 278 279 bool requireEscape(const std::string& str) {279 inline bool requireEscape(const std::string& str) { 280 280 if (str.empty() || str[0] == '@') return true; 281 281 std::istringstream is(str); … … 289 289 } 290 290 291 std::ostream& writeToken(std::ostream& os, const std::string& str) {291 inline std::ostream& writeToken(std::ostream& os, const std::string& str) { 292 292 293 293 if (requireEscape(str)) {
Note: See TracChangeset
for help on using the changeset viewer.