Expression reboot

- Implemented A3::extract_pattern.
- Implemented A3::infix, which inserts 'and' operators where necessary
  in expressions.
- Began implementation of A3::expand which converts old-style filters
  (pri:H) to the new algebraic style (priority = H).
This commit is contained in:
Paul Beckingham 2011-07-24 21:53:03 -04:00
parent 0962b66928
commit 5daabd2548
2 changed files with 92 additions and 25 deletions

View file

@ -104,6 +104,8 @@ public:
const std::vector <std::string> extract_words () const;
const A3 tokenize (const A3&) const;
const A3 infix (const A3&) const;
const A3 expand (const A3&) const;
static bool is_attr (Nibbler&, std::string&);
static bool is_attmod (Nibbler&, std::string&);
@ -117,6 +119,7 @@ public:
static bool is_uuid (Nibbler&, std::string&);
static bool is_tag (Nibbler&, std::string&);
static bool extract_pattern (const std::string&, std::string&);
/*
static bool is_operator (const std::string&, char&, int&, char&);
static bool is_symbol_operator (const std::string&);
@ -124,7 +127,6 @@ public:
static bool extract_attr (const std::string&, std::string&, std::string&);
static bool extract_attmod (const std::string&, std::string&, std::string&, std::string&, std::string&);
static bool extract_subst (const std::string&, std::string&, std::string&, bool&);
static bool extract_pattern (const std::string&, std::string&);
static bool extract_id (const std::string&, std::vector <int>&);
static bool extract_uuid (const std::string&, std::vector <std::string>&);
static bool extract_tag (const std::string&, char&, std::string&);