1.1 --- a/lemon/lgf_reader.h Wed Jul 09 07:57:09 2008 +0200
1.2 +++ b/lemon/lgf_reader.h Wed Jul 09 07:57:53 2008 +0200
1.3 @@ -195,44 +195,44 @@
1.4 }
1.5 };
1.6
1.7 - bool isWhiteSpace(char c) {
1.8 + inline bool isWhiteSpace(char c) {
1.9 return c == ' ' || c == '\t' || c == '\v' ||
1.10 c == '\n' || c == '\r' || c == '\f';
1.11 }
1.12
1.13 - bool isOct(char c) {
1.14 + inline bool isOct(char c) {
1.15 return '0' <= c && c <='7';
1.16 }
1.17
1.18 - int valueOct(char c) {
1.19 + inline int valueOct(char c) {
1.20 LEMON_ASSERT(isOct(c), "The character is not octal.");
1.21 return c - '0';
1.22 }
1.23
1.24 - bool isHex(char c) {
1.25 + inline bool isHex(char c) {
1.26 return ('0' <= c && c <= '9') ||
1.27 ('a' <= c && c <= 'z') ||
1.28 ('A' <= c && c <= 'Z');
1.29 }
1.30
1.31 - int valueHex(char c) {
1.32 + inline int valueHex(char c) {
1.33 LEMON_ASSERT(isHex(c), "The character is not hexadecimal.");
1.34 if ('0' <= c && c <= '9') return c - '0';
1.35 if ('a' <= c && c <= 'z') return c - 'a' + 10;
1.36 return c - 'A' + 10;
1.37 }
1.38
1.39 - bool isIdentifierFirstChar(char c) {
1.40 + inline bool isIdentifierFirstChar(char c) {
1.41 return ('a' <= c && c <= 'z') ||
1.42 ('A' <= c && c <= 'Z') || c == '_';
1.43 }
1.44
1.45 - bool isIdentifierChar(char c) {
1.46 + inline bool isIdentifierChar(char c) {
1.47 return isIdentifierFirstChar(c) ||
1.48 ('0' <= c && c <= '9');
1.49 }
1.50
1.51 - char readEscape(std::istream& is) {
1.52 + inline char readEscape(std::istream& is) {
1.53 char c;
1.54 if (!is.get(c))
1.55 throw DataFormatError("Escape format error");
1.56 @@ -284,7 +284,7 @@
1.57 }
1.58 }
1.59
1.60 - std::istream& readToken(std::istream& is, std::string& str) {
1.61 + inline std::istream& readToken(std::istream& is, std::string& str) {
1.62 std::ostringstream os;
1.63
1.64 char c;