From ccedf7d57f6cc42553f1d80189bf1491df6680e2 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 22 Jan 2009 16:25:51 -0400 Subject: Parse != as !(==) and !~ as !(=~), for simplicity's sake. --- src/token.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/token.cc') diff --git a/src/token.cc b/src/token.cc index 5c950d6d..66125b93 100644 --- a/src/token.cc +++ b/src/token.cc @@ -172,6 +172,14 @@ void expr_t::token_t::next(std::istream& in, const uint_least8_t pflags) length = 2; break; } + else if (c == '~') { + in.get(c); + symbol[1] = c; + symbol[2] = '\0'; + kind = NMATCH; + length = 2; + break; + } kind = EXCLAM; break; -- cgit v1.2.3