| 158 | virtual ~LexemeP(){ } |
| 159 | |
| 160 | virtual bool Parse(char** str, SpaceRule space) |
| 161 | { |
| 162 | if(space) |
| 163 | space(str); |
| 164 | if(memcmp(*str, lex, length) != 0) |
| 165 | return false; |
| 166 | if(chartype_table[*(*str + length)] & ct_symbol) |
| 167 | return false; |
| 168 | (*str) += length; |
| 169 | if(space) |
| 170 | space(str); |
| 171 | return true; |
| 172 | } |
| 173 | protected: |
| 174 | const char *lex; |
| 175 | unsigned length; |