|
C-Shell
A simple shell written in C.
|
The parser. More...
#include <ctype.h>#include <stdlib.h>#include <stdio.h>#include <string.h>#include <unistd.h>#include "parse.h"#include "shelltypes.h"Functions | |
| bool | is_blank (const char *str) |
| struct command * | parse_command (char *command, size_t command_len) |
| Parse a command string into a command struct. | |
| struct job * | parse_job (char *job_str) |
| Parse a command string containing pipes into a job struct. The string should not have any semicolons. | |
| struct job * | parse_line_to_jobs (char *line) |
| Parse a line into a list of jobs. | |
The parser.
| bool is_blank | ( | const char * | str | ) |
| struct command * parse_command | ( | char * | command, |
| size_t | command_len ) |
Parse a command string into a command struct.
| command | The command string |
| command_len | The length of the command string |
| struct job * parse_job | ( | char * | job_str | ) |
Parse a command string containing pipes into a job struct. The string should not have any semicolons.
| job_str | The command string |
Using '\0' instead of ' ' will cause a segfault with strlen.
| struct job * parse_line_to_jobs | ( | char * | line | ) |
Parse a line into a list of jobs.
| line | The line to parse |