This commit is contained in:
Jack Halford 2017-03-22 17:17:08 +01:00
parent ee82674e93
commit e126dc0fc1
3 changed files with 8 additions and 7 deletions

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/03 17:37:15 by jhalford #+# #+# */
/* Updated: 2017/03/08 12:14:09 by jhalford ### ########.fr */
/* Updated: 2017/03/22 17:16:17 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
@ -24,10 +24,11 @@ int lexer_paren(t_list **alst, t_lexer *lexer)
token->type = TK_PAREN_OPEN;
push(&lexer->stack, PAREN);
}
else if (get_lexer_stack(*lexer))
else
{
token->type = TK_PAREN_CLOSE;
pop(&lexer->stack);
if (get_lexer_stack(*lexer) == PAREN)
pop(&lexer->stack);
}
lexer->pos++;
lexer->state = DEFAULT;

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/28 14:39:01 by jhalford #+# #+# */
/* Updated: 2017/03/21 20:37:47 by ariard ### ########.fr */
/* Updated: 2017/03/22 17:13:31 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
@ -18,7 +18,6 @@ void token_print(t_list *lst)
while (lst)
{
DG("in token print");
if (lst->content)
token = lst->content;
if (token->type)

View file

@ -6,7 +6,7 @@
/* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/20 14:45:40 by gwojda #+# #+# */
/* Updated: 2017/03/22 15:54:01 by jhalford ### ########.fr */
/* Updated: 2017/03/22 17:13:06 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
@ -43,7 +43,8 @@ static int handle_instruction(t_list **token, t_btree **ast)
return (ret);
if (do_lexer_routine(token, stream) > 0)
continue ;
/* token_print(*token); */
token_print(*token);
exit(1);
if ((ret = do_parser_routine(token, ast)) == 1
&& SH_NO_INTERACTIVE(data->opts))
return (ret);