- Implemented Lexer::word, which is just like ::token, but does not
  understand dates, durations or operators.
- Implemented Lexer::split, which uses Lexer::word.
- Added unit tests.
This commit is contained in:
Paul Beckingham 2014-04-23 23:19:41 -04:00
parent d099a4edfd
commit 611812007a
3 changed files with 314 additions and 3 deletions

View file

@ -58,10 +58,12 @@ public:
Lexer& operator= (const Lexer&); // Not implemented.
bool operator== (const Lexer&); // Not implemented.
bool token (std::string&, Type&);
bool word (std::string&, Type&);
void ambiguity (bool);
static const std::string type_name (const Type&);
static bool is_ws (int);
static void split (std::vector <std::string>&, const std::string&);
private:
bool is_punct (int) const;