Ejemplo n.º 1
0
        public void SyntaxAnalyserDeclareFunctionIntWithParams()
        {
            const string clCode     = @"
int main(int a) {
    out a + 5;
}
";
            var          tokens     = new LexicalAnalyser().Convert(clCode);
            var          actualTree = new SyntaxAnalyser().Convert(tokens);

            var expectedTree = new Node(Nodes.Program, _tokenDefault,
                                        new Node(Nodes.DeclFunc, tokens[1],
                                                 new Node(Nodes.Block, _tokenDefault,
                                                          new Node(Nodes.Out, _tokenDefault,
                                                                   new Node(Nodes.Addition, _tokenDefault,
                                                                            new Node(Nodes.RefVar, tokens[8]),
                                                                            new Node(Nodes.Const, tokens[10])
                                                                            )
                                                                   )
                                                          )
                                                 )
            {
                Tokens = { tokens[4] }
            }
                                        );

            Assert.AreEqual(expectedTree, actualTree);
        }
Ejemplo n.º 2
0
        public NonTerninalExp CreateCommand(List <Token> tokens)
        {
            var closeParenthesisIndex = TokenHelper.GetIndexPairParanthesis(tokens, 1);
            var comma = tokens.IndexOf(tokens.First(token => token.TokenType == TokenType.Comma));

            var firstParam  = TerminalExpressionAnalyser.Analyse(tokens.GetRange(2, comma - 2));
            var secondParam = TerminalExpressionAnalyser.Analyse(tokens.GetRange(comma + 1,
                                                                                 closeParenthesisIndex - comma - 1));
            NonTerninalExp command;

            switch (tokens[0].TokenType)
            {
            case TokenType.CreateDir: command = new CreateDirCommand(firstParam, secondParam); break;

            case TokenType.CreateTxtFile: command = new CreateTxtFileCommand(firstParam, secondParam); break;

            case TokenType.Move: command = new MoveCommand(firstParam, secondParam); break;

            case TokenType.Copy: command = new CopyCommand(firstParam, secondParam); break;

            case TokenType.Find: command = new FindCommand(firstParam, secondParam); break;

            case TokenType.Rename: command = new RenameCommand(firstParam, secondParam); break;

            case TokenType.WriteToFile: command = new WriteToFileCommand(firstParam, secondParam); break;

            case TokenType.AppendToFile: command = new AppendToFileCommand(firstParam, secondParam); break;

            default: command = new CreateDirCommand(firstParam, secondParam); break;
            }
            command.SetNext(SyntaxAnalyser.Analyse(tokens.GetRange(closeParenthesisIndex + 1,
                                                                   tokens.Count - closeParenthesisIndex - 1)));
            return(command);
        }
Ejemplo n.º 3
0
        public NonTerninalExp CreateCommand(List <Token> tokens)
        {
            var closeParenthesisIndex = TokenHelper.GetIndexPairParanthesis(tokens, 1);
            var exp = TerminalExpressionAnalyser.Analyse(tokens.GetRange(2, closeParenthesisIndex - 2));

            NonTerninalExp command;

            switch (tokens[0].TokenType)
            {
            case TokenType.ConsoleLog: command = new ConsoleLogCommand(exp); break;

            case TokenType.Delete: command = new DeleteCommand(exp); break;

            case TokenType.LogAllItems: command = new LogAllItemsCommand(exp); break;

            case TokenType.ReadAndLog: command = new ReadAndLogCommand(exp); break;

            case TokenType.ClearFile: command = new ClearFileCommand(exp); break;

            default: command = new ConsoleLogCommand(exp); break;
            }

            command.SetNext(SyntaxAnalyser.Analyse(tokens.GetRange(closeParenthesisIndex + 1,
                                                                   tokens.Count - closeParenthesisIndex - 1)));
            return(command);
        }
Ejemplo n.º 4
0
        public void SyntaxAnalyserCall()
        {
            const string clCode = @"
int main() {
    toto(1, 2);
}
";

            var tokens     = new LexicalAnalyser().Convert(clCode);
            var actualTree = new SyntaxAnalyser().Convert(tokens);

            var expectedTree = new Node(Nodes.Program, _tokenDefault,
                                        new Node(Nodes.DeclFunc, tokens[1],
                                                 new Node(Nodes.Block, _tokenDefault,
                                                          new Node(Nodes.Drop, _tokenDefault,
                                                                   new Node(Nodes.Call, tokens[5],
                                                                            new Node(Nodes.Const, tokens[7]),
                                                                            new Node(Nodes.Const, tokens[9])
                                                                            )
                                                                   )
                                                          )
                                                 )
                                        );

            Assert.AreEqual(expectedTree, actualTree);
        }
Ejemplo n.º 5
0
        public NonTerninalExp CreateCommand(List <Token> tokens)
        {
            var closeParenthesisIndex = TokenHelper.GetIndexPairParanthesis(tokens, 1);

            var exp     = TerminalExpressionAnalyser.Analyse(tokens.GetRange(2, closeParenthesisIndex - 2));
            var command = new ConditionCommand(exp);

            var closeBracketIndex = TokenHelper.GetIndexPairBracket(tokens, closeParenthesisIndex + 1);

            command.SetPositiveNext(SyntaxAnalyser.Analyse(tokens.GetRange(closeParenthesisIndex + 1,
                                                                           tokens.Count - closeParenthesisIndex - 1)));
            if (tokens[closeBracketIndex + 1].TokenType == TokenType.Else)
            {
                if (tokens[closeBracketIndex + 2].TokenType != TokenType.If)
                {
                    ConditionCommand com = new ConditionCommand(new StringConstExp("true"));
                    com.SetPositiveNext(SyntaxAnalyser.Analyse(tokens.GetRange(closeBracketIndex + 2,
                                                                               tokens.Count - closeBracketIndex - 2)));
                    com.SetNegativeNext(com.GetPositiveNext().GetNext());
                    command.SetNegativeNext(com);
                }
                else
                {
                    command.SetNegativeNext(SyntaxAnalyser.Analyse(tokens.GetRange(closeBracketIndex + 2,
                                                                                   tokens.Count - closeBracketIndex - 2)));
                }
            }
            else
            {
                command.SetNegativeNext(SyntaxAnalyser.Analyse(tokens.GetRange(closeBracketIndex + 1,
                                                                               tokens.Count - closeBracketIndex - 1)));
            }
            return(command);
        }
Ejemplo n.º 6
0
 public ModuleCommandManager(
     SyntaxAnalyser syntaxAnalyser,
     ModuleSet modules
     )
 {
     _syntaxAnalyzer = syntaxAnalyser;
     _modules        = modules;
 }
Ejemplo n.º 7
0
 public NonTerninalExp CreateCommand(List <Token> tokens)
 {
     if (tokens.Count == 1)
     {
         return(null);
     }
     return(SyntaxAnalyser.Analyse(tokens.GetRange(1, tokens.Count - 1)));
 }
Ejemplo n.º 8
0
        public NonTerninalExp CreateCommand(List <Token> tokens)
        {
            var semicolonIndex = tokens.FindIndex(a => a.TokenType == TokenType.Semicolon);
            var exp            = TerminalExpressionAnalyser.Analyse(tokens.GetRange(2, semicolonIndex - 1));
            var command        = new AssignmentCommand(tokens[0].Value, exp);

            command.SetNext(SyntaxAnalyser.Analyse(tokens.GetRange(semicolonIndex,
                                                                   tokens.Count - semicolonIndex)));
            return(command);
        }
Ejemplo n.º 9
0
        public void SyntaxAnalyserIfElse()
        {
            const string clCode = @"
int main() {
    int i;
    i = 0;
    if (i == 0)
        i = 1;
    else
    {
        int j;
        j = 1;
        i = i - j;
    }
}
";

            var tokens     = new LexicalAnalyser().Convert(clCode);
            var actualTree = new SyntaxAnalyser().Convert(tokens);

            var expectedTree =
                new Node(Nodes.Program, _tokenDefault,
                         new Node(Nodes.DeclFunc, tokens[1],
                                  new Node(Nodes.Block, _tokenDefault,
                                           new Node(Nodes.DeclVar, tokens[6]),
                                           new Node(Nodes.Assign, tokens[8],
                                                    new Node(Nodes.Const, tokens[10])
                                                    ),
                                           new Node(Nodes.Condition, _tokenDefault,
                                                    new Node(Nodes.AreEqual, _tokenDefault,
                                                             new Node(Nodes.RefVar, tokens[14]),
                                                             new Node(Nodes.Const, tokens[16])
                                                             ),
                                                    new Node(Nodes.Assign, tokens[18],
                                                             new Node(Nodes.Const, tokens[20])
                                                             ),
                                                    new Node(Nodes.Block, _tokenDefault,
                                                             new Node(Nodes.DeclVar, tokens[25]),
                                                             new Node(Nodes.Assign, tokens[27],
                                                                      new Node(Nodes.Const, tokens[29])
                                                                      ),
                                                             new Node(Nodes.Assign, tokens[31],
                                                                      new Node(Nodes.Substraction, _tokenDefault,
                                                                               new Node(Nodes.RefVar, tokens[33]),
                                                                               new Node(Nodes.RefVar, tokens[35])
                                                                               )
                                                                      )
                                                             )
                                                    )
                                           )));

            Assert.AreEqual(expectedTree, actualTree);
        }
Ejemplo n.º 10
0
        public Form2()
        {
            InitializeComponent();
            SyntaxAnalyser SA   = new SyntaxAnalyser();
            Node           root = SA.Parse(TINY_Compiler.tiny_Scanner.Tokens);

            treeView1.Nodes.Add(SyntaxAnalyser.PrintParseTree(root));
            for (int i = 0; i < SA.Errors.Count; i++)
            {
                MessageBox.Show(SA.Errors[i]);
                richTextBox2.Text += (i + 1) + "- " + SA.Errors[i] + "\n";
            }
        }
Ejemplo n.º 11
0
        public NonTerninalExp CreateCommand(List <Token> tokens)
        {
            var          closeBracketIndex = TokenHelper.GetIndexPairBracket(tokens, 0);
            List <Token> tok = tokens.GetRange(1, closeBracketIndex - 1);

            tok.Add(new Token {
                TokenType = TokenType.EmptyEndCommand, Value = "end"
            });
            BracketsCommand com = new BracketsCommand(SyntaxAnalyser.Analyse(tok));

            com.SetNext(SyntaxAnalyser.Analyse(tokens.GetRange(
                                                   closeBracketIndex + 1, tokens.Count - closeBracketIndex - 1)));
            return(com);
        }
Ejemplo n.º 12
0
        public NonTerninalExp CreateCommand(List <Token> tokens)
        {
            List <String> variableNamesList = new List <String>();
            String        type = tokens[0].TokenType == TokenType.Int ? "int" : "string";

            variableNamesList.Add(tokens[1].Value);
            int indexEndVariables = 1;

            for (var i = 1; tokens[i + 1].TokenType == TokenType.Comma; i += 2)
            {
                variableNamesList.Add(tokens[i + 2].Value);
                indexEndVariables = i + 2;
            }

            TerminalExp exp;

            if (tokens[indexEndVariables + 1].TokenType == TokenType.Assignment)
            {
                exp = TerminalExpressionAnalyser.Analyse(tokens.GetRange(indexEndVariables + 2, 1));
            }
            else if (type == "int")
            {
                exp = new NumericConstExp(0);
            }
            else
            {
                exp = new StringConstExp("");
            }

            List <CreateVariableCommand> listCreatesCommand = new List <CreateVariableCommand>();

            foreach (var name in variableNamesList)
            {
                listCreatesCommand.Add(new CreateVariableCommand(type, name, exp));
            }

            for (int i = 0; i < listCreatesCommand.Count - 1; i++)
            {
                listCreatesCommand[i].SetNext(listCreatesCommand[i + 1]);
            }

            var semicolonIndex = tokens.FindIndex(a => a.TokenType == TokenType.Semicolon);

            listCreatesCommand[listCreatesCommand.Count - 1].SetNext(
                SyntaxAnalyser.Analyse(tokens.GetRange
                                           (semicolonIndex, tokens.Count - semicolonIndex)));

            return(listCreatesCommand[0]);
        }
Ejemplo n.º 13
0
        public void SyntaxAnalyserFor()
        {
            const string clCode = @"
int main() {
    int i;
    for (i = 0; i < 10; i = i + 1) {
        out i;
    }
}
";

            var tokens     = new LexicalAnalyser().Convert(clCode);
            var actualTree = new SyntaxAnalyser().Convert(tokens);

            var expectedTree = new Node(Nodes.Program, _tokenDefault,
                                        new Node(Nodes.DeclFunc, tokens[1],
                                                 new Node(Nodes.Block, _tokenDefault,
                                                          new Node(Nodes.DeclVar, tokens[6]),
                                                          new Node(Nodes.Block, _tokenDefault,
                                                                   new Node(Nodes.Assign, tokens[10], new Node(Nodes.Const, tokens[12])),
                                                                   new Node(Nodes.Loop, _tokenDefault,
                                                                            new Node(Nodes.Condition, _tokenDefault,
                                                                                     new Node(Nodes.LowerThan, _tokenDefault,
                                                                                              new Node(Nodes.RefVar, tokens[14]),
                                                                                              new Node(Nodes.Const, tokens[16])
                                                                                              ),
                                                                                     new Node(Nodes.Block, _tokenDefault,
                                                                                              new Node(Nodes.Block, _tokenDefault,
                                                                                                       new Node(Nodes.Out, _tokenDefault, new Node(Nodes.RefVar, tokens[26]))
                                                                                                       ),
                                                                                              new Node(Nodes.Assign, tokens[18],
                                                                                                       new Node(Nodes.Addition, _tokenDefault,
                                                                                                                new Node(Nodes.RefVar, tokens[20]),
                                                                                                                new Node(Nodes.Const, tokens[22])
                                                                                                                )
                                                                                                       )
                                                                                              ),
                                                                                     new Node(Nodes.Break, _tokenDefault)
                                                                                     )
                                                                            )
                                                                   )
                                                          )
                                                 )
                                        );

            Assert.AreEqual(expectedTree, actualTree);
        }
Ejemplo n.º 14
0
        public void SyntaxAnalyserArithmeticsAndLogic()
        {
            const string clCode = @"
int main() {
    a = !2 && 3 < 5 || 1 == (2 + 3 != 5);
}
";

            var tokens     = new LexicalAnalyser().Convert(clCode);
            var actualTree = new SyntaxAnalyser().Convert(tokens);

            var expectedTree =
                new Node(Nodes.Program, _tokenDefault,
                         new Node(Nodes.DeclFunc, tokens[1],
                                  new Node(Nodes.Block, _tokenDefault,
                                           new Node(Nodes.Assign, tokens[5],
                                                    new Node(Nodes.Or, _tokenDefault,
                                                             new Node(Nodes.And, _tokenDefault,
                                                                      new Node(Nodes.Not, _tokenDefault,
                                                                               new Node(Nodes.Const, tokens[8])
                                                                               ),
                                                                      new Node(Nodes.LowerThan, _tokenDefault,
                                                                               new Node(Nodes.Const, tokens[10]),
                                                                               new Node(Nodes.Const, tokens[12])
                                                                               )
                                                                      ),
                                                             new Node(Nodes.AreEqual, _tokenDefault,
                                                                      new Node(Nodes.Const, tokens[14]),
                                                                      new Node(Nodes.AreNotEqual, _tokenDefault,
                                                                               new Node(Nodes.Addition, _tokenDefault,
                                                                                        new Node(Nodes.Const, tokens[17]),
                                                                                        new Node(Nodes.Const, tokens[19])
                                                                                        ),
                                                                               new Node(Nodes.Const, tokens[21])
                                                                               )
                                                                      )
                                                             )
                                                    )
                                           )
                                  )
                         );

            Assert.AreEqual(expectedTree, actualTree);
        }
Ejemplo n.º 15
0
        public NonTerninalExp CreateCommand(List <Token> tokens)
        {
            var closeParenthesisIndex = TokenHelper.GetIndexPairParanthesis(tokens, 1);

            var exp     = TerminalExpressionAnalyser.Analyse(tokens.GetRange(2, closeParenthesisIndex - 2));
            var command = new ConditionCommand(exp);

            var             closeBracketsIndex = TokenHelper.GetIndexPairBracket(tokens, closeParenthesisIndex + 1);
            BracketsCommand insideCom          = (BracketsCommand)SyntaxAnalyser.Analyse(tokens.GetRange(
                                                                                             closeParenthesisIndex + 1, tokens.Count - closeParenthesisIndex - 1));

            insideCom.SetNext(command);

            command.SetPositiveNext(insideCom);
            command.SetNegativeNext(SyntaxAnalyser.Analyse(tokens.GetRange(
                                                               closeBracketsIndex + 1, tokens.Count - closeBracketsIndex - 1)));

            return(command);
        }
Ejemplo n.º 16
0
        // Übergebenen Sourcecode übersetzen.
        public bool Compile(string source, bool optionExplicit = true, bool allowExternal = true)
        {
            ErrorObject = new InterpreterError();


            StringInputStream sourceStream = new StringInputStream();
            // den Inputstream syntaktisch prüfen und Code erzeugen
            var parser = new SyntaxAnalyser(ErrorObject);


            code = new Collection <object>();

            parser.Parse(sourceStream.Connect(source), this, optionExplicit, allowExternal);

            if (ErrorObject.Number == 0)
            {
                return(true);
            }

            return(false);
        }
Ejemplo n.º 17
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            try
            {
                var lexicalAnalyzer = new LexicalAnalyzer();
                var lexems          = lexicalAnalyzer.Analyze(InputBox.Text);
                SyntaxBox.Text = lexicalAnalyzer.ToStr(lexems);


                NonTerninalExp com = SyntaxAnalyser.Analyse(lexems);
                List <String>  operatorsList;
                List <String>  consoleList;
                Interpreter.Interpret(com, out operatorsList, out consoleList);
                OperatorsBox.Lines = operatorsList.ToArray();
                ConsoleBox.Lines   = consoleList.ToArray();
            }
            catch (Exception msg)
            {
                MessageBox.Show(msg.ToString(), "Exception", MessageBoxButtons.OK);
            }
        }
Ejemplo n.º 18
0
 public NonTerninalExp CreateCommand(List <Token> tokens)
 {
     if (tokens[1].TokenType == TokenType.If)
     {
         NonTerninalExp com = new ConditionCommandPattern().CreateCommand(tokens.GetRange(
                                                                              1, tokens.Count - 1));
         while (com is ConditionCommand)
         {
             com = ((ConditionCommand)com).GetNegativeNext();
         }
         return(com);
     }
     else
     {
         ConditionCommand com = new ConditionCommand(new StringConstExp("false"));
         com.SetPositiveNext(SyntaxAnalyser.Analyse(tokens.GetRange(1,
                                                                    tokens.Count - 1)));
         com.SetNegativeNext(com.GetPositiveNext().GetNext());
         return(com);
     }
 }
Ejemplo n.º 19
0
        public void SyntaxAnalyserDeclarationAndAssignments()
        {
            const string clCode = @"
int main() {
    int i;
    i = 0;
}
";

            var tokens     = new LexicalAnalyser().Convert(clCode);
            var actualTree = new SyntaxAnalyser().Convert(tokens);

            var expectedTree =
                new Node(Nodes.Program, _tokenDefault,
                         new Node(Nodes.DeclFunc, tokens[1],
                                  new Node(Nodes.Block, _tokenDefault,
                                           new Node(Nodes.DeclVar, tokens[6]),
                                           new Node(Nodes.Assign, tokens[8],
                                                    new Node(Nodes.Const, tokens[10])
                                                    )
                                           )));

            Assert.AreEqual(expectedTree, actualTree);
        }
Ejemplo n.º 20
0
 public ModuleManager(SyntaxAnalyser syntaxAnalyser)
 {
     _syntaxAnalyzer      = syntaxAnalyser;
     ModuleCommandManager = new ModuleCommandManager(_syntaxAnalyzer, _modules);
     ModuleHookManager    = new ModuleHookManager(_modules);
 }
Ejemplo n.º 21
0
        private async void CompileButton_Click(object sender, RoutedEventArgs e)
        {
            var str = EditField.Text;
            var inp = new StringAsFileBuffer(str);

            _lexer = new LexAn();

            try {
                _lexer.Scan(inp);
            }
            catch (FormatException ex)
            {
                MessageBox.Show(ex.Message, "Lexical error");
                Log = "Error: " + ex.Message;
                return;
            }
            catch (ArgumentException ex)
            {
                MessageBox.Show(ex.Message, "Compilation error");
                Log = "Error: " + ex.Message;
                return;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Inner compiler error");
                Log = "Please contact the developer " + ex.ToString();
                return;
            }

            var result = "";

            foreach (var s in _lexer.Output)
            {
                result += s + " ";
            }

            Log = "Lexical output: " + result;

            Binding b = new Binding();

            b.Source = Identifiers;
            b.Mode   = BindingMode.OneWay;
            BindingOperations.ClearBinding(IdentifiersTable, DataGrid.ItemsSourceProperty);
            IdentifiersTable.SetBinding(DataGrid.ItemsSourceProperty, b);

            Binding bs = new Binding();

            bs.Source = Constants;
            bs.Mode   = BindingMode.OneWay;
            BindingOperations.ClearBinding(ConstTable, DataGrid.ItemsSourceProperty);
            ConstTable.SetBinding(DataGrid.ItemsSourceProperty, bs);

            var syntax  = new SyntaxAnalyser(_lexer);
            var loading = new Loading();

            loading.Show();
            loading.progress.Maximum = _lexer.Output.Count - 1;
            syntax.LexIndexChanged  += (i) => ProgressUpdate(loading, i);
            await Task.Run(() => syntax.BuildAST());

            loading.Close();
            Log = syntax.IsValid ? "Valid" : "Invalid";
            if (!syntax.IsValid)
            {
                Log = syntax.ErrorMessage;
            }
            else
            {
                var root = treeView.Items[0];
                DrawTree((TreeViewItem)root, syntax.Tree.Root);

                tabs.SelectedIndex = 1;
            }
        }
Ejemplo n.º 22
0
 /// <summary>
 /// Нарисовать дерево разбора
 /// </summary>
 private void ShowParseTree()
 {
     txtTree.Text = "No errors.\nThe parse tree is: \n\n";
     SyntaxAnalyser mySyntaxAnalyser = new SyntaxAnalyser();
     txtTree.Text += mySyntaxAnalyser.DrawReductionTree(_root);
 }
Ejemplo n.º 23
0
        //test every tokens to get the match one
        public void Find_Match_Token(string Lex)
        {
            TINY_Token_Class TC;


            List <string> rev        = new List <string>();
            List <string> operatorsl = new List <string>();
            int           counter    = 0;
            string        lex_con    = "";

            size = Lex.Length;


            if (!isreversed_keyword(Lex))
            {
                for (int i = 0; i < ReservedWords.Count; i++)
                {
                    if (Lex == ReservedWords.ElementAt(i).Key)
                    {
                        TINY_Token Tok = new TINY_Token();
                        Tok.lex        = Lex;
                        Tok.token_type = ReservedWords.ElementAt(i).Value;
                        Tokens.Add(Tok);
                        break;
                    }
                }
            }



            else if (!isoperator(Lex))
            {
                for (int i = 0; i < Operators.Count; i++)
                {
                    if (Lex == Operators.ElementAt(i).Key)
                    {
                        TINY_Token Tok = new TINY_Token();
                        Tok.lex        = Lex;
                        Tok.token_type = Operators.ElementAt(i).Value;
                        Tokens.Add(Tok);
                        break;
                    }
                }

                SyntaxAnalyser SA = new SyntaxAnalyser();
                SA.Parse(Tokens);
            }

            else if (isIdentifier(Lex))
            {
                TINY_Token Tok = new TINY_Token();
                Tok.lex        = Lex;
                Tok.token_type = TINY_Token_Class.Identifier;
                Tokens.Add(Tok);
            }


            else if (Lex == ";")
            {
                TINY_Token Tok = new TINY_Token();
                Tok.lex        = Lex;
                Tok.token_type = TINY_Token_Class.Semicolon;
                Tokens.Add(Tok);
            }

            else if (isstring(Lex))
            {
                TINY_Token Tok = new TINY_Token();
                Tok.lex        = Lex;
                Tok.token_type = TINY_Token_Class.Stringstat;
                Tokens.Add(Tok);
            }


            else if (iscomment(Lex))
            {
                TINY_Token Tok = new TINY_Token();
                Tok.lex        = Lex;
                Tok.token_type = TINY_Token_Class.Comment;
                Tokens.Add(Tok);
            }

            else if (isnumber(Lex))
            {
                TINY_Token Tok = new TINY_Token();
                Tok.lex        = Lex;
                Tok.token_type = TINY_Token_Class.Number;
                Tokens.Add(Tok);
            }


            else
            {
                TINY_Token Tok = new TINY_Token();
                Tok.lex = Lex;
                Errors.Error_List.Add(Tok.lex);
            }
        }