diff --git a/src/CLI2.cpp b/src/CLI2.cpp index 1e765017d..358f9a870 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -371,7 +371,6 @@ void CLI2::lexArguments () std::string lexeme; Lexer::Type type; Lexer lex (_original_args[i]); - lex.ambiguity (false); while (lex.token (lexeme, type)) _args.push_back (A2 (lexeme, type)); @@ -451,7 +450,6 @@ void CLI2::addFilter (const std::string& arg) std::string lexeme; Lexer::Type type; Lexer lex (arg); - lex.ambiguity (false); while (lex.token (lexeme, type)) add (lexeme); @@ -1592,7 +1590,6 @@ void CLI2::defaultCommand () std::string lexeme; Lexer::Type type; Lexer lex (defaultCommand); - lex.ambiguity (false); while (lex.token (lexeme, type)) { diff --git a/src/Eval.cpp b/src/Eval.cpp index 113f4da22..4be6dfc9f 100644 --- a/src/Eval.cpp +++ b/src/Eval.cpp @@ -126,7 +126,6 @@ void Eval::evaluateInfixExpression (const std::string& e, Variant& v) const { // Reduce e to a vector of tokens. Lexer l (e); - l.ambiguity (_ambiguity); std::vector > tokens; std::string token; Lexer::Type type; @@ -154,7 +153,6 @@ void Eval::evaluatePostfixExpression (const std::string& e, Variant& v) const { // Reduce e to a vector of tokens. Lexer l (e); - l.ambiguity (_ambiguity); std::vector > tokens; std::string token; Lexer::Type type; @@ -173,7 +171,6 @@ void Eval::compileExpression (const std::string& e) { // Reduce e to a vector of tokens. Lexer l (e); - l.ambiguity (_ambiguity); std::string token; Lexer::Type type; while (l.token (token, type)) diff --git a/src/Lexer.cpp b/src/Lexer.cpp index 856218ecc..f386b784b 100644 --- a/src/Lexer.cpp +++ b/src/Lexer.cpp @@ -43,7 +43,6 @@ Lexer::Lexer (const std::string& text) : _text (text) , _cursor (0) , _eos (text.size ()) -, _ambiguity (false) { } @@ -52,12 +51,6 @@ Lexer::~Lexer () { } -//////////////////////////////////////////////////////////////////////////////// -void Lexer::ambiguity (bool value) -{ - _ambiguity = value; -} - //////////////////////////////////////////////////////////////////////////////// // When a Lexer object is constructed with a string, this method walks through // the stream of low-level tokens. @@ -455,7 +448,6 @@ bool Lexer::isDate (std::string& token, Lexer::Type& type) { std::size_t iso_i = 0; ISO8601d iso; - iso.ambiguity (_ambiguity); if (iso.parse (_text.substr (_cursor), iso_i)) { type = Lexer::Type::date; diff --git a/src/Lexer.h b/src/Lexer.h index bb83f461b..1178bbd98 100644 --- a/src/Lexer.h +++ b/src/Lexer.h @@ -53,7 +53,6 @@ public: Lexer (const std::string&); ~Lexer (); - void ambiguity (bool); bool token (std::string&, Lexer::Type&); static std::vector > tokens (const std::string&); static std::vector split (const std::string&); @@ -109,7 +108,6 @@ private: std::string _text; std::size_t _cursor; std::size_t _eos; - bool _ambiguity; }; #endif