diff --git a/lexer(useless).h b/lexer(useless).h deleted file mode 100644 index d5cb091..0000000 --- a/lexer(useless).h +++ /dev/null @@ -1,183 +0,0 @@ -#ifndef __LEXER_H__ -#define __LEXER_H__ - - -#include -#include -#include -#include "nasal.h" -#include "process_stack.h" - -using namespace nasal; - -std::string text; -process_stack _test; -process_stack_unit _unit; - -void PrintProcess(std::string content) -{ - std::string Sentence=""; - int len=(int)content.length(); - for(int i=0;i> "; - std::getline(std::cin,text); - int len=(int)text.length(); - - int sharpDetected=0; - for(int i=len-1;i>=0;--i) - { - if(text[i]=='#') - { - //ignore sharp - len=i; - sharpDetected=i; - } - if(text[i]==';') - { - len=i+1; - //find the real end of the sentence - if(sharpDetected) - { - for(int j=sharpDetected-1;j>=len;--j) - if(text[j]!=' ') - { - len=j+1; - break; - } - } - else - { - for(int j=(int)text.length()-1;j>=len;--j) - if(text[j]!=' ') - { - len=j+1; - break; - } - } - break; - } - } - - if(text[len-1]==';') - { - for(int i=0;i=0;--j) - if(text[j]!=' ') - { - string_end=j; - break; - } - if(text[string_end]!=')') - { - std::cout<