-////
-//// Functions
-////
-
-/// uci_main_loop() is the only global function in this file. It is
-/// called immediately after the program has finished initializing.
-/// The program remains in this loop until it receives the "quit" UCI
-/// command. It waits for a command from the user, and passes this
-/// command to handle_command() and also intercepts EOF from stdin,
-/// by translating EOF to the "quit" command. This ensures that Stockfish
-/// exits gracefully if the GUI dies unexpectedly.
-
-void uci_main_loop() {
-
- Position pos(StartPositionFEN, 0); // The root position
- string command;
-
- do {
- // Wait for a command from stdin
- if (!getline(cin, command))
- command = "quit";
+/// execute_uci_command() takes a string as input, uses a UCIParser
+/// object to parse this text string as a UCI command, and calls
+/// the appropriate functions. In addition to the UCI commands,
+/// the function also supports a few debug commands.