From fb5428ce85127413da6cba184dda178352a82b3c Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 1 Feb 2009 22:10:32 -0400 Subject: Added support for metadata and tagging, and made regexs a first-class type. --- src/token.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/token.cc') diff --git a/src/token.cc b/src/token.cc index 0fd2c25a..a2046924 100644 --- a/src/token.cc +++ b/src/token.cc @@ -110,8 +110,7 @@ void expr_t::token_t::parse_ident(std::istream& in) length = 0; char c, buf[256]; - READ_INTO_(in, buf, 255, c, length, - std::isalnum(c) || c == '_' || c == '.' || c == '-'); + READ_INTO_(in, buf, 255, c, length, std::isalnum(c) || c == '_' || c == '-'); value.set_string(buf); } @@ -280,8 +279,8 @@ void expr_t::token_t::next(std::istream& in, const uint_least8_t pflags) in.get(c); length++; - kind = MASK; - value.set_string(buf); + kind = VALUE; + value.set_mask(buf); } break; } @@ -334,6 +333,11 @@ void expr_t::token_t::next(std::istream& in, const uint_least8_t pflags) kind = GREATER; break; + case '.': + in.get(c); + kind = DOT; + break; + case ',': in.get(c); kind = COMMA; -- cgit v1.2.3