MiniDevil
As beautiful as a shell
Error reporting (maps syntax errors to user messages) More...
Include dependency graph for parser_grammar_error.c:Error reporting (maps syntax errors to user messages)
Definition in file parser_grammar_error.c.
Functions | |
| static const char * | get_error_msg (t_syntax_error err) |
| Convert an error code to the corresponding message. More... | |
| int | print_syntax_error (t_syntax_error err) |
| Print an error message to STDERR. More... | |
| int | is_redirection (t_token_type type) |
| Check if a token type is a redirection operator. More... | |
|
static |
Convert an error code to the corresponding message.
| err | Error code |
Definition at line 22 of file parser_grammar_error.c.
References ERR_EMPTY_INPUT, ERR_PIPE_DOUBLE, ERR_PIPE_END, ERR_PIPE_NO_CMD, ERR_PIPE_START, ERR_REDIR_AFTER_PIPE, and ERR_REDIR_NO_FILE.
Referenced by print_syntax_error().
Here is the caller graph for this function:| int print_syntax_error | ( | t_syntax_error | err | ) |
Print an error message to STDERR.
| err | Error code |
Definition at line 44 of file parser_grammar_error.c.
References ERR_NONE, and get_error_msg().
Referenced by validate_empty(), validate_pipe_position(), and validate_redir_syntax().
Here is the call graph for this function:
Here is the caller graph for this function:| int is_redirection | ( | t_token_type | type | ) |
Check if a token type is a redirection operator.
| type | Token type to check |
Definition at line 62 of file parser_grammar_error.c.
References TOKEN_APPEND, TOKEN_HEREDOC, TOKEN_REDIR_IN, and TOKEN_REDIR_OUT.
Referenced by parse_command(), and validate_redir_syntax().
Here is the caller graph for this function: