Expression reboot
- A3 now tracks whether a command is read-only, and builds filters accordingly. - Implemented extract_filter, extract_modfications and extract_words stubs. - Removed all E9 implementation details - this is going to be written from scratch.
This commit is contained in:
32
src/E9.h
32
src/E9.h
@@ -29,44 +29,22 @@
|
||||
#define L10N // Localization complete.
|
||||
|
||||
#include <string>
|
||||
#include <stack>
|
||||
#include <Arguments.h>
|
||||
#include <A3.h>
|
||||
#include <Task.h>
|
||||
#include <RX.h>
|
||||
#include <Variant.h>
|
||||
|
||||
class E9
|
||||
{
|
||||
public:
|
||||
E9 (Arguments&);
|
||||
E9 (A3&);
|
||||
~E9 ();
|
||||
bool eval (const Task&);
|
||||
|
||||
bool evalFilter (const Task&);
|
||||
std::string evalE9 (const Task&);
|
||||
void eval (const Task&, std::vector <Variant>&);
|
||||
std::string evalExpression (const Task&);
|
||||
|
||||
private:
|
||||
void expand_sequence ();
|
||||
void implicit_and ();
|
||||
void expand_tag ();
|
||||
void expand_pattern ();
|
||||
void expand_attr ();
|
||||
void expand_attmod ();
|
||||
void expand_word ();
|
||||
void expand_tokens ();
|
||||
void postfix ();
|
||||
|
||||
void tokenize (const std::string&, const std::string&, std::vector <std::string>&, Arguments&);
|
||||
void create_variant (Variant&, const std::string&, const std::string&);
|
||||
bool is_new_style ();
|
||||
|
||||
private:
|
||||
bool eval_match (Variant&, Variant&, bool);
|
||||
|
||||
private:
|
||||
Arguments _args;
|
||||
A3 _args;
|
||||
std::map <std::string, RX> _regexes;
|
||||
bool _prepared;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user