parent
a5247bea82
commit
bd0d63468e
3 changed files with 8 additions and 6 deletions
|
|
@ -6,14 +6,14 @@
|
||||||
# By: wescande <wescande@student.42.fr> +#+ +:+ +#+ #
|
# By: wescande <wescande@student.42.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2016/08/29 21:32:58 by wescande #+# #+# #
|
# Created: 2016/08/29 21:32:58 by wescande #+# #+# #
|
||||||
# Updated: 2017/03/21 15:06:37 by gwojda ### ########.fr #
|
# Updated: 2017/03/21 15:47:55 by ariard ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
NAME = 42sh
|
NAME = 42sh
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
FLAGS = -Wall -Wextra -Werror #-fvisibility=hidden #-fsanitize=address
|
FLAGS = -Wall -Wextra -Werror -fvisibility=hidden -fsanitize=address
|
||||||
D_FLAGS = -g
|
D_FLAGS = -g
|
||||||
|
|
||||||
DELTA = $$(echo "$$(tput cols)-47"|bc)
|
DELTA = $$(echo "$$(tput cols)-47"|bc)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */
|
/* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/20 14:45:40 by gwojda #+# #+# */
|
/* Created: 2017/03/20 14:45:40 by gwojda #+# #+# */
|
||||||
/* Updated: 2017/03/21 14:04:33 by jhalford ### ########.fr */
|
/* Updated: 2017/03/21 16:12:37 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -43,8 +43,10 @@ static int handle_instruction(t_list **token, t_btree **ast)
|
||||||
return (ret);
|
return (ret);
|
||||||
if (do_lexer_routine(token, stream) > 0)
|
if (do_lexer_routine(token, stream) > 0)
|
||||||
continue ;
|
continue ;
|
||||||
if (do_parser_routine(token, ast) > 0)
|
if ((ret = do_parser_routine(token, ast)) > 1)
|
||||||
break ;
|
break ;
|
||||||
|
else if (ret == 1)
|
||||||
|
return (ret);
|
||||||
}
|
}
|
||||||
if (data->parser.state == SUCCESS && ft_exec(ast) < 0)
|
if (data->parser.state == SUCCESS && ft_exec(ast) < 0)
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: wescande <wescande@student.42.fr> +#+ +:+ +#+ */
|
/* By: wescande <wescande@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/03/19 14:24:14 by wescande #+# #+# */
|
/* Created: 2017/03/19 14:24:14 by wescande #+# #+# */
|
||||||
/* Updated: 2017/03/20 21:11:21 by jhalford ### ########.fr */
|
/* Updated: 2017/03/21 16:09:48 by ariard ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -31,6 +31,6 @@ int do_parser_routine(t_list **token, t_btree **ast)
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
else if (data->parser.state == SUCCESS)
|
else if (data->parser.state == SUCCESS)
|
||||||
return (1);
|
return (2);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue