Changeset 197:5893bacaa720 in lemon-1.2 for lemon/lgf_reader.h
- Timestamp:
- 07/08/08 14:57:44 (17 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/lgf_reader.h
r192 r197 196 196 }; 197 197 198 bool isWhiteSpace(char c) {198 inline bool isWhiteSpace(char c) { 199 199 return c == ' ' || c == '\t' || c == '\v' || 200 200 c == '\n' || c == '\r' || c == '\f'; 201 201 } 202 202 203 bool isOct(char c) {203 inline bool isOct(char c) { 204 204 return '0' <= c && c <='7'; 205 205 } 206 206 207 in t valueOct(char c) {207 inline int valueOct(char c) { 208 208 LEMON_ASSERT(isOct(c), "The character is not octal."); 209 209 return c - '0'; 210 210 } 211 211 212 bool isHex(char c) {212 inline bool isHex(char c) { 213 213 return ('0' <= c && c <= '9') || 214 214 ('a' <= c && c <= 'z') || … … 216 216 } 217 217 218 in t valueHex(char c) {218 inline int valueHex(char c) { 219 219 LEMON_ASSERT(isHex(c), "The character is not hexadecimal."); 220 220 if ('0' <= c && c <= '9') return c - '0'; … … 223 223 } 224 224 225 bool isIdentifierFirstChar(char c) {225 inline bool isIdentifierFirstChar(char c) { 226 226 return ('a' <= c && c <= 'z') || 227 227 ('A' <= c && c <= 'Z') || c == '_'; 228 228 } 229 229 230 bool isIdentifierChar(char c) {230 inline bool isIdentifierChar(char c) { 231 231 return isIdentifierFirstChar(c) || 232 232 ('0' <= c && c <= '9'); 233 233 } 234 234 235 char readEscape(std::istream& is) {235 inline char readEscape(std::istream& is) { 236 236 char c; 237 237 if (!is.get(c)) … … 285 285 } 286 286 287 std::istream& readToken(std::istream& is, std::string& str) {287 inline std::istream& readToken(std::istream& is, std::string& str) { 288 288 std::ostringstream os; 289 289
Note: See TracChangeset
for help on using the changeset viewer.