Command parsing and execution in the elxsdkutil is table driven. The elxu_commands.h file contains an array (cmd_table[]), which describes the available commands. Each entry in this table has the name of the command, a pointer to a command handler function, and help text that describes the function.
Command Handlers are located in elxu_commands.c. Each of these functions parses additional options as needed, validates the options given, then calls the appropriate function to execute the command.
The main() function simply compares the first command line argument to each of the commands in the command table. If a match is found, then the corresponding handler function is called. If no match is found, then an error message is displayed.