/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* syntatics.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cchauvet ", str[i])) { y = 0; while (str[i] == str[i + y]) y++; if ((y > 2 && (str[i] == '>' || str[i] == '<')) || (y > 1 && str[i] == '|')) { ft_eprintf("minishell: too many %c in a row\n", str, str[i]); return (1); } i = i + y; } else i++; } return (0); } int ft_empty_verif(const char *str) { size_t i; i = 0; while (str[i] == ' ') i++; return (str[i] == '\0'); } int ft_syntatic_verif(const char *str) { return (ft_quote_verif(str) || ft_empty_verif(str) || ft_pipe_is_alone(str) || ft_special_char_dub(str)); }