public static void Main()
string Src = "int main(){f1(); f3(25); Print(\"Hello world!\");}; void f1(void) { if(a == 2) b = 3;};";
Src = Clear_Space_Pack(Src);
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(IsPunctuator (Lexem) == true) Print("Punctuator " + Lexem);
if(Is_BuildInType (Lexem) == true) Print("BuildInType " + Lexem);
if(Is_Identifier (Lexem) == true) Print("Identifier " + Lexem);
if(Is_Number (Lexem) == true) Print("Number " + Lexem);
if(Is_ControlKeyWord(Lexem) == true) Print("ControlKeyWord " + Lexem);
if(Is_Operation (Lexem) == true) Print("Operation " + Lexem);
static void Print(string Str)
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 IsPunctuator(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)