|
myshell 2.0.0
|
Parser related utilities. More...
Functions | |
| tokens_t | lexer (const std::string &input) |
| Perform lexical analysis on the given input string, breaking it down into a vector of tokens. | |
| command | parse_input (std::string input) |
| Parse the input string to prepare it for command execution. | |
Parser related utilities.
| tokens_t lexer | ( | const std::string & | input | ) |
Perform lexical analysis on the given input string, breaking it down into a vector of tokens.
| input | The input string to be analyzed. |
| msh_exception | If the input is invalid. |
| command parse_input | ( | std::string | input | ) |
Parse the input string to prepare it for command execution.
Performs lexical analysis to tokenize the input, and checks for validity. If the input is valid, it prepares a command object using split_commands() function.
On empty input, the default-constructed command object is returned.
| input | The input string to be parsed. |
command object.| msh_exception | If the syntax of the input is invalid or errors occur during parsing. |