Parsing input script commands by input.cpp
In this section, the parsing of input script commands is described as handled by the execute_command()
method in input.cpp
, along with the steps followed after each command.
The execute_command()
method in input.cpp
is responsible for parsing the first word of each line of the input script. This method contains a list of permitted commands that are compared with the first word of each line. An error is returned if there is no match, and pre-defined methods in input.cpp
are called for each match. This method is called within the file()
method and the one()
method in input.cpp
to facilitate parsing and execution.
The following screenshot shows the execute_command()
method:
As you can see, in the preceding screenshot, the command
variable represents the first word of the line being parsed, and it is...