public static void Print(string Str)
static public string Create_Token_List(string Src)
Src = Clear_Space_Pack(Src);
Service.Print("\n\n\n------------------\n\n\n");
int Str_Len = Src.Length;
for(int i = 0; i < Str_Len; i++)
string c = Src[i].ToString();
if(c == "(") c = "\n(\n";
if(c == ")") c = "\n)\n";
if(c == "{") c = "\n{\n";
if(c == "}") c = "\n}\n";
if(c == ";") c = "\n;\n";
Out_Text = Clear_NewLine_Pack(Out_Text);
string[] Lexems = Out_Text.Split('\n', StringSplitOptions.RemoveEmptyEntries);
int How_Lexems = Lexems.Length;
for(int i = 0; i < How_Lexems; i++)
string Lexem = Lexems[i];
if(Is_Punctuator (Lexem) == true) Token_List += "Punctuator " + Lexem;
if(Is_BuildInType (Lexem) == true) Token_List += "BuildInType " + Lexem;
if(Is_Identifier (Lexem) == true) Token_List += "Identifier " + Lexem;
if(Is_Number (Lexem) == true) Token_List += "Number " + Lexem;
if(Is_ControlKeyWord(Lexem) == true) Token_List += "ControlKeyWord " + Lexem;
if(Is_Operation (Lexem) == true) Token_List += "Operation " + Lexem;
if(Is_String (Lexem) == true) Token_List += "Literal_String " + Lexem;
static string Clear_Space_Pack(string Str)
int Str_Len = Str.Length;
char Prev_Symbol = (char)0;
for(int i = 0; i < Str_Len; i++)
static string Clear_NewLine_Pack(string Str)
int Str_Len = Str.Length;
char Prev_Symbol = (char)0;
for(int i = 0; i < Str_Len; i++)
static bool Is_Punctuator(string Str)
if(Str == "(") return true;
if(Str == ")") return true;
if(Str == "{") return true;
if(Str == "}") return true;
if(Str == ";") return true;
static bool Is_BuildInType(string Str)
if(Str == "int") return true;
if(Str == "float") return true;
if(Str == "double") return true;
if(Str == "char") return true;
if(Str == "void") return true;
static bool Is_ControlKeyWord(string Str)
if(Str == "if") return true;
if(Str == "else") return true;
if(Str == "while") return true;
if(Str == "for") return true;
if(Str == "do") return true;
static bool Is_Operation(string Str)
if(Str == "+") return true;
if(Str == "-") return true;
if(Str == "*") return true;
if(Str == "/") return true;
if(Str == "=") return true;
if(Str == "==") return true;
if(Str == "!=") return true;
if(Str == ">" ) return true;
if(Str == "<" ) return true;
if(Str == ">=") return true;
if(Str == "<=") return true;
static bool Is_Identifier(string Str)
int Str_Len = Str.Length;
for(int i = 0; i < Str_Len; i++)
if(c != '_' && Char.IsLetter(c) == false && Char.IsDigit(c) == false)
if(Is_BuildInType(Str) == true)
if(Is_ControlKeyWord(Str) == true)
static bool Is_Number(string Str)
static bool Is_String(string Str)
public static void Main()
string Token_List = T.Create_Token_List(Src);
Service.Print(Token_List);
string Src = "int main()" +
" Print(\"Hello world!\");"+