X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Fmathml_editor%2Fsrc%2FITPushLexer.cc;fp=helm%2FDEVEL%2Fmathml_editor%2Fsrc%2FITPushLexer.cc;h=0000000000000000000000000000000000000000;hb=c7514aaa249a96c5fdd39b1123fbdb38d92f20b6;hp=b4d1b6c129da691c8fed9038a91f019cbe2059b9;hpb=1c7fb836e2af4f2f3d18afd0396701f2094265ff;p=helm.git diff --git a/helm/DEVEL/mathml_editor/src/ITPushLexer.cc b/helm/DEVEL/mathml_editor/src/ITPushLexer.cc deleted file mode 100644 index b4d1b6c12..000000000 --- a/helm/DEVEL/mathml_editor/src/ITPushLexer.cc +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include - -#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 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; -}