]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/mathml_editor/src/ITPushLexer.cc
This commit was manufactured by cvs2svn to create branch 'moogle'.
[helm.git] / helm / DEVEL / mathml_editor / src / ITPushLexer.cc
diff --git a/helm/DEVEL/mathml_editor/src/ITPushLexer.cc b/helm/DEVEL/mathml_editor/src/ITPushLexer.cc
deleted file mode 100644 (file)
index b4d1b6c..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <list>
-#include <string>
-
-#include "ALogger.hh"
-#include "TToken.hh"
-#include "ITPushLexer.hh"
-#include "APushParser.hh"
-#include "TDictionary.hh"
-
-ITPushLexer::ITPushLexer(ALogger& l, APushParser& p, TDictionary& d) : TPushLexer(l, p), dictionary(d)
-{
-  state = ACCEPT;
-}
-
-bool
-ITPushLexer::complete()
-{
-  if (state == MACRO)
-    {
-      std::list<std::string> complete_list;
-      std::string new_buffer = dictionary.complete(buffer, complete_list);
-
-      if (!complete_list.size())
-        {
-          // no matching macro
-          logger.warning("wrong prefix: nothing to complete");
-        }
-      else if (complete_list.size() == 1)
-        {
-          // good! we have found the macro
-          buffer = new_buffer;
-        }
-      else
-        {
-          // we have more than one matching macro
-          logger.warning("prefix not sufficient");
-          buffer = new_buffer;
-        }
-
-      displayCursor();
-      return true;
-    }
-  else return false;
-}