52 current = current->
next;
77 current = current->
next;
Parser entry point & sub parser prototypes.
static int validate_empty(t_token *tokens)
Validate that the token list isn't empty.
static int validate_pipe_position(t_token *tokens)
Validate pipe positions (not at start nor end and no consecutive pipe)
static int validate_redir_syntax(t_token *tokens)
Validate that every redirection is followed by a word token.
int validate_syntax(t_token *tokens)
Run all validation checks on a token list.
int print_syntax_error(t_syntax_error err)
Print an error message to STDERR.
int is_redirection(t_token_type type)
Check if a token type is a redirection operator.
Lexer token (singly linked list)
t_token_type type
Token type (word, pipe, redir)
struct s_token * next
Next token.