50 f_check_word = (1 << 0), // must be followed by whitespace |
50 f_check_word = (1 << 0), // must be followed by whitespace |
51 f_check_peek = (1 << 1), // don't advance cursor |
51 f_check_peek = (1 << 1), // don't advance cursor |
52 }; |
52 }; |
53 |
53 |
54 public: |
54 public: |
55 static inline bool is_symbol_char (char c) |
55 static inline bool is_symbol_char (char c, bool allow_numbers) |
56 { |
56 { |
|
57 if (allow_numbers && (c >= '0' && c <= '9')) |
|
58 return true; |
|
59 |
57 return (c >= 'a' && c <= 'z') || |
60 return (c >= 'a' && c <= 'z') || |
58 (c >= 'A' && c <= 'Z') || |
61 (c >= 'A' && c <= 'Z') || |
59 (c == '_'); |
62 (c == '_'); |
60 } |
63 } |
61 |
64 |
99 // Yields a copy of the current position information. |
102 // Yields a copy of the current position information. |
100 position_info get_position() const; |
103 position_info get_position() const; |
101 |
104 |
102 // Sets the current position based on given data. |
105 // Sets the current position based on given data. |
103 void set_position (const position_info& a); |
106 void set_position (const position_info& a); |
|
107 |
|
108 // Skips one character |
|
109 void skip(); |
|
110 |
|
111 // Skips many characters |
|
112 void skip (int chars); |
104 }; |
113 }; |
105 |
114 |
106 #endif // IRIS_SCANNER_H |
115 #endif // IRIS_SCANNER_H |
107 |
116 |