MiniDevil
As beautiful as a shell
Tokenizer helpers: detects operators, whitespace or word boundaries. More...
#include "token.h"
Include dependency graph for tokenizer_utils.c:Tokenizer helpers: detects operators, whitespace or word boundaries.
Definition in file tokenizer_utils.c.
Functions | |
| int | is_operator (char c) |
| Check if a character is a shell operator. More... | |
| int | is_whitespace (char c) |
| Check if a character is whitespace. More... | |
| int | is_word_end (char c) |
| Check if a character ends a word token. More... | |
| t_token_type | get_operator_token_type (char *str, int *len) |
| Determine operator token type and its length in characters. More... | |
| int is_operator | ( | char | c | ) |
Check if a character is a shell operator.
| c | Character to test |
Definition at line 21 of file tokenizer_utils.c.
Referenced by extract_unquoted(), is_word_end(), process_word_token(), and tokenize().
Here is the caller graph for this function:| int is_whitespace | ( | char | c | ) |
Check if a character is whitespace.
| c | Character to test |
Definition at line 32 of file tokenizer_utils.c.
Referenced by extract_unquoted(), is_word_end(), process_word_token(), and tokenize().
Here is the caller graph for this function:| int is_word_end | ( | char | c | ) |
Check if a character ends a word token.
| c | Character to test |
Definition at line 43 of file tokenizer_utils.c.
References is_operator(), and is_whitespace().
Here is the call graph for this function:| t_token_type get_operator_token_type | ( | char * | str, |
| int * | len | ||
| ) |
Determine operator token type and its length in characters.
| str | Input at the operator position |
| len | Operator length (1 or 2) |
Definition at line 63 of file tokenizer_utils.c.
References TOKEN_APPEND, TOKEN_HEREDOC, TOKEN_PIPE, TOKEN_REDIR_IN, TOKEN_REDIR_OUT, and TOKEN_WORD.
Referenced by process_operator_token().
Here is the caller graph for this function: