moar grammmar

This commit is contained in:
Antoine Riard 2017-03-07 19:41:25 +01:00
parent 86fcb41c2f
commit 02286b88bf
72 changed files with 695 additions and 39 deletions

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */ /* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/27 20:29:56 by jhalford #+# #+# */ /* Created: 2016/11/27 20:29:56 by jhalford #+# #+# */
/* Updated: 2017/03/07 15:07:59 by jhalford ### ########.fr */ /* Updated: 2017/03/07 16:36:47 by ariard ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */ /* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/13 17:11:48 by jhalford #+# #+# */ /* Created: 2016/12/13 17:11:48 by jhalford #+# #+# */
/* Updated: 2017/03/07 15:08:17 by jhalford ### ########.fr */ /* Updated: 2017/03/07 16:37:18 by ariard ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

@ -1 +1 @@
Subproject commit 6a2672a19268c6481525d9aaee5bd35722bbd75a Subproject commit 6a6a23b2839a5ec7322bdc6adbb2d3dad3d1023c

View file

@ -0,0 +1,10 @@
objs/builtin/bt_read_get.o: src/builtin/bt_read_get.c \
includes/builtin_read.h includes/types.h includes/builtin.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/minishell.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/glob.h \
includes/completion.h includes/hash.h

View file

@ -0,0 +1,10 @@
objs/builtin/bt_read_parse.o: src/builtin/bt_read_parse.c \
includes/builtin_read.h includes/types.h includes/builtin.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/minishell.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/glob.h \
includes/completion.h includes/hash.h

View file

@ -0,0 +1,10 @@
objs/builtin/bt_read_term.o: src/builtin/bt_read_term.c \
includes/builtin.h includes/types.h libft/includes/libft.h \
libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \
libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \
libft/includes/mytime.h libft/includes/get_next_line.h \
libft/includes/color.h libft/includes/ft_sys.h includes/builtin_read.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/exec.h \
includes/job_control.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,9 @@
objs/builtin/builtin_cd.o: src/builtin/builtin_cd.c includes/builtin.h \
includes/types.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/builtin_read.h includes/minishell.h \
includes/lexer.h includes/parser.h includes/ft_readline.h \
includes/ft_input.h includes/exec.h includes/job_control.h \
includes/glob.h includes/completion.h includes/hash.h

View file

@ -0,0 +1,10 @@
objs/builtin/builtin_echo.o: src/builtin/builtin_echo.c \
includes/builtin.h includes/types.h libft/includes/libft.h \
libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \
libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \
libft/includes/mytime.h libft/includes/get_next_line.h \
libft/includes/color.h libft/includes/ft_sys.h includes/builtin_read.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/exec.h \
includes/job_control.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/builtin/builtin_env.o: src/builtin/builtin_env.c \
includes/minishell.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/builtin/builtin_exit.o: src/builtin/builtin_exit.c \
includes/minishell.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/builtin/builtin_export.o: src/builtin/builtin_export.c \
includes/minishell.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/builtin/builtin_hash.o: src/builtin/builtin_hash.c \
includes/minishell.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/builtin/builtin_history.o: src/builtin/builtin_history.c \
includes/minishell.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/builtin/builtin_read.o: src/builtin/builtin_read.c \
includes/builtin_read.h includes/types.h includes/builtin.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/minishell.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/glob.h \
includes/completion.h includes/hash.h

View file

@ -0,0 +1,10 @@
objs/builtin/builtin_setenv.o: src/builtin/builtin_setenv.c \
includes/minishell.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/builtin/builtin_unset.o: src/builtin/builtin_unset.c \
includes/minishell.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/builtin/builtin_unsetenv.o: src/builtin/builtin_unsetenv.c \
includes/minishell.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/builtin/is_builtin.o: src/builtin/is_builtin.c includes/minishell.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/completion/c_binary.o: src/completion/c_binary.c \
includes/completion.h includes/minishell.h libft/includes/libft.h \
libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \
libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \
libft/includes/mytime.h libft/includes/get_next_line.h \
libft/includes/color.h libft/includes/ft_sys.h includes/types.h \
includes/lexer.h includes/parser.h includes/ft_readline.h \
includes/ft_input.h includes/exec.h includes/job_control.h \
includes/builtin.h includes/builtin_read.h includes/glob.h \
includes/hash.h

View file

@ -0,0 +1,9 @@
objs/completion/c_clear.o: src/completion/c_clear.c includes/completion.h \
includes/minishell.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/hash.h

View file

@ -0,0 +1,9 @@
objs/completion/c_files.o: src/completion/c_files.c includes/completion.h \
includes/minishell.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/hash.h

View file

@ -0,0 +1,9 @@
objs/completion/c_init.o: src/completion/c_init.c includes/completion.h \
includes/minishell.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/hash.h

View file

@ -0,0 +1,10 @@
objs/completion/c_matching.o: src/completion/c_matching.c \
includes/completion.h includes/minishell.h libft/includes/libft.h \
libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \
libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \
libft/includes/mytime.h libft/includes/get_next_line.h \
libft/includes/color.h libft/includes/ft_sys.h includes/types.h \
includes/lexer.h includes/parser.h includes/ft_readline.h \
includes/ft_input.h includes/exec.h includes/job_control.h \
includes/builtin.h includes/builtin_read.h includes/glob.h \
includes/hash.h

View file

@ -0,0 +1,9 @@
objs/completion/c_misc.o: src/completion/c_misc.c includes/completion.h \
includes/minishell.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/hash.h

View file

@ -0,0 +1,10 @@
objs/completion/c_output.o: src/completion/c_output.c \
includes/completion.h includes/minishell.h libft/includes/libft.h \
libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \
libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \
libft/includes/mytime.h libft/includes/get_next_line.h \
libft/includes/color.h libft/includes/ft_sys.h includes/types.h \
includes/lexer.h includes/parser.h includes/ft_readline.h \
includes/ft_input.h includes/exec.h includes/job_control.h \
includes/builtin.h includes/builtin_read.h includes/glob.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/completion/c_parser.o: src/completion/c_parser.c \
includes/completion.h includes/minishell.h libft/includes/libft.h \
libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \
libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \
libft/includes/mytime.h libft/includes/get_next_line.h \
libft/includes/color.h libft/includes/ft_sys.h includes/types.h \
includes/lexer.h includes/parser.h includes/ft_readline.h \
includes/ft_input.h includes/exec.h includes/job_control.h \
includes/builtin.h includes/builtin_read.h includes/glob.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/completion/c_pathsolver.o: src/completion/c_pathsolver.c \
includes/completion.h includes/minishell.h libft/includes/libft.h \
libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \
libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \
libft/includes/mytime.h libft/includes/get_next_line.h \
libft/includes/color.h libft/includes/ft_sys.h includes/types.h \
includes/lexer.h includes/parser.h includes/ft_readline.h \
includes/ft_input.h includes/exec.h includes/job_control.h \
includes/builtin.h includes/builtin_read.h includes/glob.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/completion/c_printer.o: src/completion/c_printer.c \
includes/completion.h includes/minishell.h libft/includes/libft.h \
libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \
libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \
libft/includes/mytime.h libft/includes/get_next_line.h \
libft/includes/color.h libft/includes/ft_sys.h includes/types.h \
includes/lexer.h includes/parser.h includes/ft_readline.h \
includes/ft_input.h includes/exec.h includes/job_control.h \
includes/builtin.h includes/builtin_read.h includes/glob.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/completion/c_rematch.o: src/completion/c_rematch.c \
includes/completion.h includes/minishell.h libft/includes/libft.h \
libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \
libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \
libft/includes/mytime.h libft/includes/get_next_line.h \
libft/includes/color.h libft/includes/ft_sys.h includes/types.h \
includes/lexer.h includes/parser.h includes/ft_readline.h \
includes/ft_input.h includes/exec.h includes/job_control.h \
includes/builtin.h includes/builtin_read.h includes/glob.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/completion/c_sizing.o: src/completion/c_sizing.c \
includes/completion.h includes/minishell.h libft/includes/libft.h \
libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \
libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \
libft/includes/mytime.h libft/includes/get_next_line.h \
libft/includes/color.h libft/includes/ft_sys.h includes/types.h \
includes/lexer.h includes/parser.h includes/ft_readline.h \
includes/ft_input.h includes/exec.h includes/job_control.h \
includes/builtin.h includes/builtin_read.h includes/glob.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/completion/c_terminal.o: src/completion/c_terminal.c \
includes/completion.h includes/minishell.h libft/includes/libft.h \
libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \
libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \
libft/includes/mytime.h libft/includes/get_next_line.h \
libft/includes/color.h libft/includes/ft_sys.h includes/types.h \
includes/lexer.h includes/parser.h includes/ft_readline.h \
includes/ft_input.h includes/exec.h includes/job_control.h \
includes/builtin.h includes/builtin_read.h includes/glob.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/completion/completion.o: src/completion/completion.c \
includes/completion.h includes/minishell.h libft/includes/libft.h \
libft/includes/lst.h libft/includes/dlst.h libft/includes/str.h \
libft/includes/sstr.h libft/includes/math.h libft/includes/btree.h \
libft/includes/mytime.h libft/includes/get_next_line.h \
libft/includes/color.h libft/includes/ft_sys.h includes/types.h \
includes/lexer.h includes/parser.h includes/ft_readline.h \
includes/ft_input.h includes/exec.h includes/job_control.h \
includes/builtin.h includes/builtin_read.h includes/glob.h \
includes/hash.h

10
42sh/objs/exec/ast_free.d Normal file
View file

@ -0,0 +1,10 @@
objs/exec/ast_free.o: src/exec/ast_free.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

10
42sh/objs/exec/bad_fd.d Normal file
View file

@ -0,0 +1,10 @@
objs/exec/bad_fd.o: src/exec/bad_fd.c includes/minishell.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/error_badidentifier.o: src/exec/error_badidentifier.c \
includes/exec.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/exec_ampersand.o: src/exec/exec_ampersand.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/exec_and_if.o: src/exec/exec_and_if.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/exec_case.o: src/exec/exec_case.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/exec_case_branch.o: src/exec/exec_case_branch.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/exec_command.o: src/exec/exec_command.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/exec_default.o: src/exec/exec_default.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/exec_elif.o: src/exec/exec_elif.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/exec_else.o: src/exec/exec_else.c includes/minishell.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

10
42sh/objs/exec/exec_for.d Normal file
View file

@ -0,0 +1,10 @@
objs/exec/exec_for.o: src/exec/exec_for.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/exec_func.o: src/exec/exec_func.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

10
42sh/objs/exec/exec_if.d Normal file
View file

@ -0,0 +1,10 @@
objs/exec/exec_if.o: src/exec/exec_if.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/exec_math.o: src/exec/exec_math.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/exec_or_if.o: src/exec/exec_or_if.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/exec_pipe.o: src/exec/exec_pipe.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/exec_semi.o: src/exec/exec_semi.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/exec_until.o: src/exec/exec_until.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

10
42sh/objs/exec/exec_var.d Normal file
View file

@ -0,0 +1,10 @@
objs/exec/exec_var.o: src/exec/exec_var.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/exec_while.o: src/exec/exec_while.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/fd_is_valid.o: src/exec/fd_is_valid.c includes/minishell.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

10
42sh/objs/exec/ft_exec.d Normal file
View file

@ -0,0 +1,10 @@
objs/exec/ft_exec.o: src/exec/ft_exec.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/ft_findexec.o: src/exec/ft_findexec.c includes/minishell.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/launch_process.o: src/exec/launch_process.c \
includes/minishell.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/mark_process_status.o: src/exec/mark_process_status.c \
includes/job_control.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/exec.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/process_redirect.o: src/exec/process_redirect.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/process_reset.o: src/exec/process_reset.c includes/exec.h \
libft/includes/libft.h libft/includes/lst.h libft/includes/dlst.h \
libft/includes/str.h libft/includes/sstr.h libft/includes/math.h \
libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/job_control.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/process_setexec.o: src/exec/process_setexec.c \
includes/minishell.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/lexer.h \
includes/parser.h includes/ft_readline.h includes/ft_input.h \
includes/exec.h includes/job_control.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -0,0 +1,10 @@
objs/exec/process_setgroup.o: src/exec/process_setgroup.c \
includes/job_control.h libft/includes/libft.h libft/includes/lst.h \
libft/includes/dlst.h libft/includes/str.h libft/includes/sstr.h \
libft/includes/math.h libft/includes/btree.h libft/includes/mytime.h \
libft/includes/get_next_line.h libft/includes/color.h \
libft/includes/ft_sys.h includes/types.h includes/exec.h \
includes/minishell.h includes/lexer.h includes/parser.h \
includes/ft_readline.h includes/ft_input.h includes/builtin.h \
includes/builtin_read.h includes/glob.h includes/completion.h \
includes/hash.h

View file

@ -6,7 +6,7 @@
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */ /* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/13 13:09:57 by jhalford #+# #+# */ /* Created: 2016/12/13 13:09:57 by jhalford #+# #+# */
/* Updated: 2017/03/07 15:08:45 by jhalford ### ########.fr */ /* Updated: 2017/03/07 16:05:47 by ariard ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */ /* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/01/30 17:33:53 by ariard #+# #+# */ /* Created: 2017/01/30 17:33:53 by ariard #+# #+# */
/* Updated: 2017/03/06 12:27:23 by wescande ### ########.fr */ /* Updated: 2017/03/07 16:34:30 by ariard ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */ /* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/03 17:39:45 by jhalford #+# #+# */ /* Created: 2017/03/03 17:39:45 by jhalford #+# #+# */
/* Updated: 2017/03/05 16:27:04 by jhalford ### ########.fr */ /* Updated: 2017/03/07 19:33:30 by ariard ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */ /* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/09 20:39:06 by jhalford #+# #+# */ /* Created: 2017/02/09 20:39:06 by jhalford #+# #+# */
/* Updated: 2017/03/05 17:29:24 by jhalford ### ########.fr */ /* Updated: 2017/03/07 19:33:58 by ariard ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -19,7 +19,7 @@ t_lexstate get_state_global(t_lexer *lexer)
c = lexer->str[lexer->pos]; c = lexer->str[lexer->pos];
if (ft_is_delim(c)) if (ft_is_delim(c))
return (DELIM); return (DELIM);
else if (c == '&' || c == ';' || c == '|') else if (c == '&' || c == ';' || c == '|' || c == '!')
return (SEP); return (SEP);
else if (c == '\\') else if (c == '\\')
return (BACKSLASH); return (BACKSLASH);

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */ /* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/30 16:29:57 by jhalford #+# #+# */ /* Created: 2016/11/30 16:29:57 by jhalford #+# #+# */
/* Updated: 2017/02/24 19:14:57 by ariard ### ########.fr */ /* Updated: 2017/03/07 19:40:52 by ariard ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -37,8 +37,11 @@ int lexer_sep(t_list **alst, t_lexer *lexer)
token->type = cn == '&' ? TK_AND_IF : TK_AMP; token->type = cn == '&' ? TK_AND_IF : TK_AMP;
else if (c == '|') else if (c == '|')
token->type = cn == '|' ? TK_OR_IF : TK_PIPE; token->type = cn == '|' ? TK_OR_IF : TK_PIPE;
else if (c == '!')
token->type = TK_BANG;
token->type = (c == ';') ? TK_SEMI : token->type; token->type = (c == ';') ? TK_SEMI : token->type;
token->type = (c == ';') && (cn == ';') ? TK_DSEMI : token->type; token->type = (c == ';') && (cn == ';') ? TK_DSEMI : token->type;
// c est ici que ca bug, ca marche plus les bitwise sur des enums
lexer->pos += 1 + (token->type & (TK_AND_IF | TK_OR_IF | TK_DSEMI) ? 1 : 0); lexer->pos += 1 + (token->type & (TK_AND_IF | TK_OR_IF | TK_DSEMI) ? 1 : 0);
return (lexer_lex(&(*alst)->next, lexer)); return (lexer_lex(&(*alst)->next, lexer));
} }

View file

@ -6,7 +6,7 @@
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */ /* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/04 20:42:13 by ariard #+# #+# */ /* Created: 2017/03/04 20:42:13 by ariard #+# #+# */
/* Updated: 2017/03/07 11:52:45 by ariard ### ########.fr */ /* Updated: 2017/03/07 19:32:45 by ariard ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View file

@ -45,6 +45,9 @@ t_aggrematch g_aggrematch[] =
{TK_PAREN_CLOSE, COMPOUND_LIST, SUBSHELL, TK_PAREN_OPEN}, {TK_PAREN_CLOSE, COMPOUND_LIST, SUBSHELL, TK_PAREN_OPEN},
{TK_PAREN_CLOSE, CMD_SUPERIOR, SUBSHELL, TK_PAREN_OPEN}, {TK_PAREN_CLOSE, CMD_SUPERIOR, SUBSHELL, TK_PAREN_OPEN},
{TK_PAREN_CLOSE, PIPE_SEMI_SEQUENCE, SUBSHELL, TK_PAREN_OPEN}, {TK_PAREN_CLOSE, PIPE_SEMI_SEQUENCE, SUBSHELL, TK_PAREN_OPEN},
{TK_RBRACE, COMPOUND_LIST, BRACE_CLAUSE, TK_LBRACE},
{TK_RBRACE, CMD_SUPERIOR, BRACE_CLAUSE, TK_LBRACE},
{TK_RBRACE, PIPE_SEMI_SEQUENCE, BRACE_CLAUSE, TK_LBRACE},
{TK_RBRACE, COMPOUND_LIST, BRACE_CLAUSE, TK_LBRACE}, {TK_RBRACE, COMPOUND_LIST, BRACE_CLAUSE, TK_LBRACE},
{TK_RBRACE, CMD_SUPERIOR, BRACE_CLAUSE, TK_LBRACE}, {TK_RBRACE, CMD_SUPERIOR, BRACE_CLAUSE, TK_LBRACE},
@ -73,13 +76,14 @@ t_aggrematch g_aggrematch[] =
{LINEBREAK, PIPE_SEMI_SEQUENCE, PIPE_SEQUENCE, PIPE_SEMI_SEQUENCE}, {LINEBREAK, PIPE_SEMI_SEQUENCE, PIPE_SEQUENCE, PIPE_SEMI_SEQUENCE},
{LINEBREAK, COMPOUND_LIST, COMPOUND_LIST, COMPOUND_LIST}, {LINEBREAK, COMPOUND_LIST, COMPOUND_LIST, COMPOUND_LIST},
{LINEBREAK, CASE_LIST_NS, CASE_LIST_NS, CASE_LIST_NS}, {LINEBREAK, CASE_LIST_NS, CASE_LIST_NS, CASE_LIST_NS},
{LINEBREAK, COMPLETE_COMMANDS, PROGRAM, LINEBREAK},
{NEWLINE_LIST, MATH_SUP, CMD_SUPERIOR, MATH_SUP}, {NEWLINE_LIST, MATH_SUP, CMD_SUPERIOR, MATH_SUP},
{NEWLINE_LIST, CMD_NAME, CMD_SUPERIOR, CMD_NAME}, {NEWLINE_LIST, CMD_NAME, CMD_SUPERIOR, CMD_NAME},
{NEWLINE_LIST, SEQUENTIAL_SEP, SEQUENTIAL_SEP, SEQUENTIAL_SEP}, {NEWLINE_LIST, SEQUENTIAL_SEP, SEQUENTIAL_SEP, SEQUENTIAL_SEP},
{NEWLINE_LIST, TK_DO, TK_DO, TK_DO}, {NEWLINE_LIST, TK_DO, TK_DO, TK_DO},
{NEWLINE_LIST, TK_PAREN_CLOSE, TK_PAREN_CLOSE, TK_PAREN_CLOSE}, {NEWLINE_LIST, TK_PAREN_CLOSE, TK_PAREN_CLOSE, TK_PAREN_CLOSE},
{NEWLINE_LIST, TK_PAREN_OPEN, TK_PAREN_OPEN, TK_PAREN_OPEN}, {NEWLINE_LIST, TK_PAREN_OPEN, TK_PAREN_OPEN, TK_PAREN_OPEN},
{NEWLINE_LIST, TK_RBRACE, TK_RBRACE, TK_RBRACE},
{NEWLINE_LIST, TK_LBRACE, TK_LBRACE, TK_LBRACE},
{NEWLINE_LIST, TK_IN, TK_IN, TK_IN}, {NEWLINE_LIST, TK_IN, TK_IN, TK_IN},
{NEWLINE_LIST, TK_THEN, TK_THEN, TK_THEN}, {NEWLINE_LIST, TK_THEN, TK_THEN, TK_THEN},
{NEWLINE_LIST, TK_IF, TK_IF, TK_IF}, {NEWLINE_LIST, TK_IF, TK_IF, TK_IF},
@ -208,6 +212,7 @@ t_aggrematch g_aggrematch[] =
{AND_OR_MINOR, TK_LBRACE, AND_OR_MAJOR, 0}, {AND_OR_MINOR, TK_LBRACE, AND_OR_MAJOR, 0},
{AND_OR_MINOR, COMPLETE_COMMANDS, AND_OR_MAJOR, 0}, {AND_OR_MINOR, COMPLETE_COMMANDS, AND_OR_MAJOR, 0},
{AND_OR_MINOR, AND_OR_MAJOR, AND_OR_MAJOR, 0}, {AND_OR_MINOR, AND_OR_MAJOR, AND_OR_MAJOR, 0},
{AND_OR_MINOR, TK_BANG, AND_OR_MAJOR, 0},
{COMMAND, SEQUENCE, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, SEQUENCE, PIPE_SEMI_SEQUENCE, 0},
// {COMMAND, PIPE_SEMI_SEQUENCE, PIPE_SEMI_SEQUENCE, PIPE_SEMI_SEQUENCE}, // {COMMAND, PIPE_SEMI_SEQUENCE, PIPE_SEMI_SEQUENCE, PIPE_SEMI_SEQUENCE},
// watch // watch
@ -225,6 +230,7 @@ t_aggrematch g_aggrematch[] =
{COMMAND, SEPARATOR_OP, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, SEPARATOR_OP, PIPE_SEMI_SEQUENCE, 0},
{COMMAND, NEWLINE_LIST, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, NEWLINE_LIST, PIPE_SEMI_SEQUENCE, 0},
{COMMAND, LINEBREAK, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, LINEBREAK, PIPE_SEMI_SEQUENCE, 0},
{COMMAND, TK_BANG, PIPE_SEMI_SEQUENCE, 0},
{COMMAND, TK_PAREN_OPEN, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, TK_PAREN_OPEN, PIPE_SEMI_SEQUENCE, 0},
{COMMAND, TK_LBRACE, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, TK_LBRACE, PIPE_SEMI_SEQUENCE, 0},
{COMMAND, COMPLETE_COMMANDS, PIPE_SEMI_SEQUENCE, 0}, {COMMAND, COMPLETE_COMMANDS, PIPE_SEMI_SEQUENCE, 0},
@ -237,6 +243,7 @@ t_aggrematch g_aggrematch[] =
{END_COMMAND, TK_WHILE, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_WHILE, PIPE_SEQUENCE, 0},
{END_COMMAND, TK_UNTIL, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_UNTIL, PIPE_SEQUENCE, 0},
{END_COMMAND, LINEBREAK, PIPE_SEQUENCE, 0}, {END_COMMAND, LINEBREAK, PIPE_SEQUENCE, 0},
{END_COMMAND, TK_BANG, PIPE_SEQUENCE, 0},
{END_COMMAND, TK_PAREN_OPEN, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_PAREN_OPEN, PIPE_SEQUENCE, 0},
{END_COMMAND, TK_LBRACE, PIPE_SEQUENCE, 0}, {END_COMMAND, TK_LBRACE, PIPE_SEQUENCE, 0},
{END_COMMAND, COMPLETE_COMMANDS, PIPE_SEQUENCE, 0}, {END_COMMAND, COMPLETE_COMMANDS, PIPE_SEQUENCE, 0},
@ -281,6 +288,7 @@ t_aggrematch g_aggrematch[] =
{PIPELINE, COMPOUND_LIST, AND_OR, 0}, {PIPELINE, COMPOUND_LIST, AND_OR, 0},
{PIPELINE, CASE_LIST_NS, AND_OR, 0}, {PIPELINE, CASE_LIST_NS, AND_OR, 0},
{PIPELINE, LINEBREAK, AND_OR, 0}, {PIPELINE, LINEBREAK, AND_OR, 0},
{PIPELINE, TK_BANG, AND_OR, 0},
{PIPELINE, TK_PAREN_OPEN, AND_OR, 0}, {PIPELINE, TK_PAREN_OPEN, AND_OR, 0},
{PIPELINE, TK_LBRACE, AND_OR, 0}, {PIPELINE, TK_LBRACE, AND_OR, 0},
{PIPELINE, COMPLETE_COMMANDS, AND_OR, 0}, {PIPELINE, COMPLETE_COMMANDS, AND_OR, 0},
@ -305,6 +313,7 @@ t_aggrematch g_aggrematch[] =
{AND_OR, SEPARATOR_OP, LIST, LIST}, {AND_OR, SEPARATOR_OP, LIST, LIST},
{AND_OR, NEWLINE_LIST, LIST, 0}, {AND_OR, NEWLINE_LIST, LIST, 0},
{AND_OR, LINEBREAK, LIST, 0}, {AND_OR, LINEBREAK, LIST, 0},
{AND_OR, TK_BANG, LIST, 0},
{AND_OR, TK_LBRACE, LIST, 0}, {AND_OR, TK_LBRACE, LIST, 0},
{AND_OR, COMPLETE_COMMANDS, LIST, 0}, {AND_OR, COMPLETE_COMMANDS, LIST, 0},
{LIST, NEWLINE_LIST, COMPLETE_COMMAND, 0}, {LIST, NEWLINE_LIST, COMPLETE_COMMAND, 0},

View file

@ -6,7 +6,7 @@
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */ /* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/15 18:32:59 by ariard #+# #+# */ /* Created: 2017/02/15 18:32:59 by ariard #+# #+# */
/* Updated: 2017/03/06 15:55:07 by ariard ### ########.fr */ /* Updated: 2017/03/07 19:32:15 by ariard ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -16,6 +16,7 @@ t_treematch g_treematch[] =
{ {
{TK_WORD, &add_cmd}, {TK_WORD, &add_cmd},
{TK_PIPE, &add_sep}, {TK_PIPE, &add_sep},
{TK_BANG, &add_sep},
{TK_SEMI, &add_sep}, {TK_SEMI, &add_sep},
{TK_GREAT, &add_cmd}, {TK_GREAT, &add_cmd},
{TK_LESS, &add_cmd}, {TK_LESS, &add_cmd},

View file

@ -18,6 +18,7 @@ t_stackmatch g_stackmatch[] =
{TK_WORD, TK_CASE}, {TK_WORD, TK_CASE},
{TK_WORD, WORDLIST}, {TK_WORD, WORDLIST},
{TK_WORD, LINEBREAK}, {TK_WORD, LINEBREAK},
{TK_WORD, TK_BANG},
{TK_WORD, TK_PAREN_OPEN}, {TK_WORD, TK_PAREN_OPEN},
{TK_WORD, TK_LBRACE}, {TK_WORD, TK_LBRACE},
{TK_WORD, COMPLETE_COMMANDS}, {TK_WORD, COMPLETE_COMMANDS},
@ -31,6 +32,7 @@ t_stackmatch g_stackmatch[] =
{TK_IO_NUMBER, CMD_NAME}, {TK_IO_NUMBER, CMD_NAME},
{TK_IO_NUMBER, CMD_WORD}, {TK_IO_NUMBER, CMD_WORD},
{TK_IO_NUMBER, LINEBREAK}, {TK_IO_NUMBER, LINEBREAK},
{TK_IO_NUMBER, TK_BANG},
{TK_IO_NUMBER, TK_PAREN_OPEN}, {TK_IO_NUMBER, TK_PAREN_OPEN},
{TK_IO_NUMBER, TK_LBRACE}, {TK_IO_NUMBER, TK_LBRACE},
{TK_IO_NUMBER, COMPLETE_COMMANDS}, {TK_IO_NUMBER, COMPLETE_COMMANDS},
@ -48,6 +50,7 @@ t_stackmatch g_stackmatch[] =
{TK_OR_IF, CMD_SUPERIOR}, {TK_OR_IF, CMD_SUPERIOR},
{TK_OR_IF, AND_OR}, {TK_OR_IF, AND_OR},
{TK_DSEMI, LINEBREAK}, {TK_DSEMI, LINEBREAK},
{TK_DSEMI, TK_BANG},
{TK_DSEMI, COMPLETE_COMMANDS}, {TK_DSEMI, COMPLETE_COMMANDS},
{TK_DSEMI, COMPOUND_LIST}, {TK_DSEMI, COMPOUND_LIST},
{TK_DSEMI, CASE_LIST_NS}, {TK_DSEMI, CASE_LIST_NS},
@ -62,6 +65,7 @@ t_stackmatch g_stackmatch[] =
{TK_LESS, CMD_WORD}, {TK_LESS, CMD_WORD},
{TK_LESS, CMD_NAME}, {TK_LESS, CMD_NAME},
{TK_LESS, LINEBREAK}, {TK_LESS, LINEBREAK},
{TK_LESS, TK_BANG},
{TK_LESS, TK_PAREN_OPEN}, {TK_LESS, TK_PAREN_OPEN},
{TK_LESS, TK_LBRACE}, {TK_LESS, TK_LBRACE},
{TK_LESS, COMPLETE_COMMANDS}, {TK_LESS, COMPLETE_COMMANDS},
@ -80,6 +84,7 @@ t_stackmatch g_stackmatch[] =
{TK_GREAT, CMD_WORD}, {TK_GREAT, CMD_WORD},
{TK_GREAT, CMD_NAME}, {TK_GREAT, CMD_NAME},
{TK_GREAT, LINEBREAK}, {TK_GREAT, LINEBREAK},
{TK_GREAT, TK_BANG},
{TK_GREAT, TK_PAREN_OPEN}, {TK_GREAT, TK_PAREN_OPEN},
{TK_GREAT, TK_LBRACE}, {TK_GREAT, TK_LBRACE},
{TK_GREAT, COMPLETE_COMMANDS}, {TK_GREAT, COMPLETE_COMMANDS},
@ -100,6 +105,7 @@ t_stackmatch g_stackmatch[] =
{TK_DLESS, CMD_WORD}, {TK_DLESS, CMD_WORD},
{TK_DLESS, CMD_NAME}, {TK_DLESS, CMD_NAME},
{TK_DLESS, LINEBREAK}, {TK_DLESS, LINEBREAK},
{TK_DLESS, TK_BANG},
{TK_DLESS, TK_PAREN_OPEN}, {TK_DLESS, TK_PAREN_OPEN},
{TK_DLESS, TK_LBRACE}, {TK_DLESS, TK_LBRACE},
{TK_DLESS, COMPLETE_COMMANDS}, {TK_DLESS, COMPLETE_COMMANDS},
@ -119,6 +125,7 @@ t_stackmatch g_stackmatch[] =
{TK_DLESSDASH, CMD_WORD}, {TK_DLESSDASH, CMD_WORD},
{TK_DLESSDASH, CMD_NAME}, {TK_DLESSDASH, CMD_NAME},
{TK_DLESSDASH, LINEBREAK}, {TK_DLESSDASH, LINEBREAK},
{TK_DLESSDASH, TK_BANG},
{TK_DLESSDASH, TK_PAREN_OPEN}, {TK_DLESSDASH, TK_PAREN_OPEN},
{TK_DLESSDASH, TK_LBRACE}, {TK_DLESSDASH, TK_LBRACE},
{TK_DLESSDASH, COMPLETE_COMMANDS}, {TK_DLESSDASH, COMPLETE_COMMANDS},
@ -139,6 +146,7 @@ t_stackmatch g_stackmatch[] =
{TK_DGREAT, CMD_WORD}, {TK_DGREAT, CMD_WORD},
{TK_DGREAT, CMD_NAME}, {TK_DGREAT, CMD_NAME},
{TK_DGREAT, LINEBREAK}, {TK_DGREAT, LINEBREAK},
{TK_DGREAT, TK_BANG},
{TK_DGREAT, TK_PAREN_OPEN}, {TK_DGREAT, TK_PAREN_OPEN},
{TK_DGREAT, TK_LBRACE}, {TK_DGREAT, TK_LBRACE},
{TK_DGREAT, COMPLETE_COMMANDS}, {TK_DGREAT, COMPLETE_COMMANDS},
@ -159,6 +167,7 @@ t_stackmatch g_stackmatch[] =
{TK_LESSAND, CMD_WORD}, {TK_LESSAND, CMD_WORD},
{TK_LESSAND, CMD_NAME}, {TK_LESSAND, CMD_NAME},
{TK_LESSAND, LINEBREAK}, {TK_LESSAND, LINEBREAK},
{TK_LESSAND, TK_BANG},
{TK_LESSAND, TK_PAREN_OPEN}, {TK_LESSAND, TK_PAREN_OPEN},
{TK_LESSAND, TK_LBRACE}, {TK_LESSAND, TK_LBRACE},
{TK_LESSAND, COMPLETE_COMMANDS}, {TK_LESSAND, COMPLETE_COMMANDS},
@ -179,6 +188,7 @@ t_stackmatch g_stackmatch[] =
{TK_GREATAND, CMD_WORD}, {TK_GREATAND, CMD_WORD},
{TK_GREATAND, CMD_NAME}, {TK_GREATAND, CMD_NAME},
{TK_GREATAND, LINEBREAK}, {TK_GREATAND, LINEBREAK},
{TK_GREATAND, TK_BANG},
{TK_GREATAND, TK_PAREN_OPEN}, {TK_GREATAND, TK_PAREN_OPEN},
{TK_GREATAND, TK_LBRACE}, {TK_GREATAND, TK_LBRACE},
{TK_GREATAND, COMPLETE_COMMANDS}, {TK_GREATAND, COMPLETE_COMMANDS},
@ -194,9 +204,9 @@ t_stackmatch g_stackmatch[] =
{TK_IF, LINEBREAK}, {TK_IF, LINEBREAK},
{TK_IF, TK_BANG},
{TK_IF, TK_PAREN_OPEN}, {TK_IF, TK_PAREN_OPEN},
{TK_IF, TK_LBRACE}, {TK_IF, TK_LBRACE},
{TK_IF, TK_PAREN_CLOSE},
{TK_IF, COMPLETE_COMMANDS}, {TK_IF, COMPLETE_COMMANDS},
{TK_IF, TK_BANG}, {TK_IF, TK_BANG},
{TK_IF, SEPARATOR_OP}, {TK_IF, SEPARATOR_OP},
@ -236,6 +246,7 @@ t_stackmatch g_stackmatch[] =
{TK_DONE, COMPOUND_LIST}, {TK_DONE, COMPOUND_LIST},
{TK_DONE, END_COMMAND}, {TK_DONE, END_COMMAND},
{TK_CASE, LINEBREAK}, {TK_CASE, LINEBREAK},
{TK_CASE, TK_BANG},
{TK_CASE, TK_PAREN_OPEN}, {TK_CASE, TK_PAREN_OPEN},
{TK_CASE, TK_LBRACE}, {TK_CASE, TK_LBRACE},
{TK_CASE, COMPLETE_COMMANDS}, {TK_CASE, COMPLETE_COMMANDS},
@ -259,8 +270,10 @@ t_stackmatch g_stackmatch[] =
{TK_IN, NAME}, {TK_IN, NAME},
{TK_ESAC, CASE_LIST_NS}, {TK_ESAC, CASE_LIST_NS},
{TK_ESAC, LINEBREAK}, {TK_ESAC, LINEBREAK},
{TK_ESAC, TK_BANG},
{TK_ESAC, TK_IN}, {TK_ESAC, TK_IN},
{TK_WHILE, LINEBREAK}, {TK_WHILE, LINEBREAK},
{TK_WHILE, TK_BANG},
{TK_WHILE, TK_PAREN_OPEN}, {TK_WHILE, TK_PAREN_OPEN},
{TK_WHILE, TK_LBRACE}, {TK_WHILE, TK_LBRACE},
{TK_WHILE, COMPLETE_COMMANDS}, {TK_WHILE, COMPLETE_COMMANDS},
@ -281,6 +294,7 @@ t_stackmatch g_stackmatch[] =
{TK_WHILE, TK_THEN}, {TK_WHILE, TK_THEN},
{TK_WHILE, COMPLETE_CONDITION}, {TK_WHILE, COMPLETE_CONDITION},
{TK_UNTIL, LINEBREAK}, {TK_UNTIL, LINEBREAK},
{TK_UNTIL, TK_BANG},
{TK_UNTIL, TK_PAREN_OPEN}, {TK_UNTIL, TK_PAREN_OPEN},
{TK_UNTIL, TK_LBRACE}, {TK_UNTIL, TK_LBRACE},
{TK_UNTIL, COMPLETE_COMMANDS}, {TK_UNTIL, COMPLETE_COMMANDS},
@ -301,6 +315,7 @@ t_stackmatch g_stackmatch[] =
{TK_UNTIL, TK_PAREN_CLOSE}, {TK_UNTIL, TK_PAREN_CLOSE},
{TK_UNTIL, COMPLETE_CONDITION}, {TK_UNTIL, COMPLETE_CONDITION},
{TK_FOR, LINEBREAK}, {TK_FOR, LINEBREAK},
{TK_FOR, TK_BANG},
{TK_FOR, TK_PAREN_OPEN}, {TK_FOR, TK_PAREN_OPEN},
{TK_FOR, TK_LBRACE}, {TK_FOR, TK_LBRACE},
{TK_FOR, COMPLETE_COMMANDS}, {TK_FOR, COMPLETE_COMMANDS},
@ -323,6 +338,7 @@ t_stackmatch g_stackmatch[] =
{TK_FOR, COMPLETE_CONDITION}, {TK_FOR, COMPLETE_CONDITION},
{TK_LBRACE, COMPLETE_COMMANDS}, {TK_LBRACE, COMPLETE_COMMANDS},
{TK_LBRACE, LINEBREAK}, {TK_LBRACE, LINEBREAK},
{TK_LBRACE, TK_BANG},
{TK_LBRACE, TK_LBRACE}, {TK_LBRACE, TK_LBRACE},
{TK_LBRACE, TK_BANG}, {TK_LBRACE, TK_BANG},
{TK_LBRACE, SEPARATOR_OP}, {TK_LBRACE, SEPARATOR_OP},
@ -368,7 +384,6 @@ t_stackmatch g_stackmatch[] =
{TK_BANG, TK_LBRACE}, {TK_BANG, TK_LBRACE},
{TK_BANG, COMPLETE_COMMANDS}, {TK_BANG, COMPLETE_COMMANDS},
{TK_BANG, SEPARATOR_OP}, {TK_BANG, SEPARATOR_OP},
{TK_BANG, SEPARATOR_OP},
{TK_BANG, NEWLINE_LIST}, {TK_BANG, NEWLINE_LIST},
{TK_IN, LINEBREAK}, {TK_IN, LINEBREAK},
{TK_SEMI, NAME}, {TK_SEMI, NAME},
@ -388,8 +403,8 @@ t_stackmatch g_stackmatch[] =
{PATTERN_CASE, CASE_LIST_NS}, {PATTERN_CASE, CASE_LIST_NS},
{TK_PAREN_OPEN, COMPLETE_COMMANDS}, {TK_PAREN_OPEN, COMPLETE_COMMANDS},
{TK_PAREN_OPEN, LINEBREAK}, {TK_PAREN_OPEN, LINEBREAK},
{TK_PAREN_OPEN, TK_PAREN_OPEN},
{TK_PAREN_OPEN, TK_BANG}, {TK_PAREN_OPEN, TK_BANG},
{TK_PAREN_OPEN, TK_PAREN_OPEN},
{TK_PAREN_OPEN, SEPARATOR_OP}, {TK_PAREN_OPEN, SEPARATOR_OP},
{TK_PAREN_OPEN, NEWLINE_LIST}, {TK_PAREN_OPEN, NEWLINE_LIST},
{TK_PAREN_OPEN, SEQUENCE}, {TK_PAREN_OPEN, SEQUENCE},
@ -425,6 +440,7 @@ t_stackmatch g_stackmatch[] =
{END_COMMAND, TK_ELIF}, {END_COMMAND, TK_ELIF},
{END_COMMAND, TK_ELSE}, {END_COMMAND, TK_ELSE},
{END_COMMAND, LINEBREAK}, {END_COMMAND, LINEBREAK},
{END_COMMAND, TK_BANG},
{END_COMMAND, TK_PAREN_OPEN}, {END_COMMAND, TK_PAREN_OPEN},
{END_COMMAND, TK_LBRACE}, {END_COMMAND, TK_LBRACE},
{END_COMMAND, COMPLETE_COMMANDS}, {END_COMMAND, COMPLETE_COMMANDS},
@ -455,6 +471,7 @@ t_stackmatch g_stackmatch[] =
{LINEBREAK, TK_OR_IF}, {LINEBREAK, TK_OR_IF},
{LINEBREAK, TK_PIPE}, {LINEBREAK, TK_PIPE},
{LINEBREAK, LINEBREAK}, {LINEBREAK, LINEBREAK},
{LINEBREAK, TK_BANG},
{LINEBREAK, COMPLETE_COMMANDS}, {LINEBREAK, COMPLETE_COMMANDS},
{LINEBREAK, CMD_SUPERIOR}, {LINEBREAK, CMD_SUPERIOR},
{LINEBREAK, PIPE_SEMI_SEQUENCE}, {LINEBREAK, PIPE_SEMI_SEQUENCE},
@ -484,10 +501,32 @@ t_stackmatch g_stackmatch[] =
{TK_PAREN_CLOSE, PATTERN}, {TK_PAREN_CLOSE, PATTERN},
{TK_PAREN_CLOSE, COMPOUND_LIST}, {TK_PAREN_CLOSE, COMPOUND_LIST},
{TK_PAREN_CLOSE, FUNC_NAME}, {TK_PAREN_CLOSE, FUNC_NAME},
{TK_RBRACE, MATH},
{TK_RBRACE, MATH_PLUS},
{TK_RBRACE, TK_SEMI},
{TK_RBRACE, END_COMMAND},
{TK_RBRACE, SEPARATOR_OP},
{TK_RBRACE, WORD},
{TK_RBRACE, IN},
{TK_RBRACE, TK_AND_IF},
{TK_RBRACE, TK_OR_IF},
{TK_RBRACE, TK_PIPE},
{TK_RBRACE, TK_RBRACE},
{TK_RBRACE, COMPLETE_COMMANDS},
{TK_RBRACE, CMD_SUPERIOR},
{TK_RBRACE, PIPE_SEMI_SEQUENCE},
{TK_RBRACE, CASE_LIST_NS},
{TK_RBRACE, PROGRAM},
{TK_RBRACE, TK_LBRACE},
{TK_RBRACE, PATTERN_CASE},
{TK_RBRACE, PATTERN},
{TK_RBRACE, COMPOUND_LIST},
{TK_RBRACE, FUNC_NAME},
{NEWLINE_LIST, MATH_SUP}, {NEWLINE_LIST, MATH_SUP},
{NEWLINE_LIST, TK_DO}, {NEWLINE_LIST, TK_DO},
{NEWLINE_LIST, CASE_LIST_NS}, {NEWLINE_LIST, CASE_LIST_NS},
{NEWLINE_LIST, TK_PAREN_CLOSE}, {NEWLINE_LIST, TK_PAREN_CLOSE},
{NEWLINE_LIST, TK_RBRACE},
{NEWLINE_LIST, SEQUENTIAL_SEP}, {NEWLINE_LIST, SEQUENTIAL_SEP},
{NEWLINE_LIST, FOR_WORDLIST}, {NEWLINE_LIST, FOR_WORDLIST},
{NEWLINE_LIST, TK_IN}, {NEWLINE_LIST, TK_IN},
@ -509,6 +548,7 @@ t_stackmatch g_stackmatch[] =
{NEWLINE_LIST, COMPLETE_CONDITION}, {NEWLINE_LIST, COMPLETE_CONDITION},
{NEWLINE_LIST, CONDITION}, {NEWLINE_LIST, CONDITION},
{NEWLINE_LIST, LINEBREAK}, {NEWLINE_LIST, LINEBREAK},
{NEWLINE_LIST, TK_BANG},
{NEWLINE_LIST, TK_PAREN_OPEN}, {NEWLINE_LIST, TK_PAREN_OPEN},
{NEWLINE_LIST, TK_LBRACE}, {NEWLINE_LIST, TK_LBRACE},
{HERE_END, TK_DLESS}, {HERE_END, TK_DLESS},
@ -522,11 +562,10 @@ t_stackmatch g_stackmatch[] =
{IO_HERE, CMD_WORD}, {IO_HERE, CMD_WORD},
{IO_HERE, CMD_NAME}, {IO_HERE, CMD_NAME},
{IO_HERE, LINEBREAK}, {IO_HERE, LINEBREAK},
{IO_HERE, TK_BANG},
{IO_HERE, TK_PAREN_OPEN}, {IO_HERE, TK_PAREN_OPEN},
{IO_HERE, TK_LBRACE}, {IO_HERE, TK_LBRACE},
{IO_HERE, COMPLETE_COMMANDS}, {IO_HERE, COMPLETE_COMMANDS},
{IO_HERE, TK_BANG},
{IO_HERE, TK_BANG},
{IO_HERE, SEPARATOR_OP}, {IO_HERE, SEPARATOR_OP},
{IO_HERE, NEWLINE_LIST}, {IO_HERE, NEWLINE_LIST},
{IO_HERE, PIPE_SEMI_SEQUENCE}, {IO_HERE, PIPE_SEMI_SEQUENCE},
@ -547,9 +586,8 @@ t_stackmatch g_stackmatch[] =
{IO_FILE, CMD_WORD}, {IO_FILE, CMD_WORD},
{IO_FILE, CMD_NAME}, {IO_FILE, CMD_NAME},
{IO_FILE, LINEBREAK}, {IO_FILE, LINEBREAK},
{IO_FILE, TK_BANG},
{IO_FILE, COMPLETE_COMMANDS}, {IO_FILE, COMPLETE_COMMANDS},
{IO_FILE, TK_BANG},
{IO_FILE, TK_BANG},
{IO_FILE, SEPARATOR_OP}, {IO_FILE, SEPARATOR_OP},
{IO_FILE, NEWLINE_LIST}, {IO_FILE, NEWLINE_LIST},
{IO_FILE, PIPE_SEMI_SEQUENCE}, {IO_FILE, PIPE_SEMI_SEQUENCE},
@ -562,11 +600,10 @@ t_stackmatch g_stackmatch[] =
{IO_REDIRECT, CMD_WORD}, {IO_REDIRECT, CMD_WORD},
{IO_REDIRECT, CMD_NAME}, {IO_REDIRECT, CMD_NAME},
{IO_REDIRECT, LINEBREAK}, {IO_REDIRECT, LINEBREAK},
{IO_REDIRECT, TK_BANG},
{IO_REDIRECT, TK_PAREN_OPEN}, {IO_REDIRECT, TK_PAREN_OPEN},
{IO_REDIRECT, TK_LBRACE}, {IO_REDIRECT, TK_LBRACE},
{IO_REDIRECT, COMPLETE_COMMANDS}, {IO_REDIRECT, COMPLETE_COMMANDS},
{IO_REDIRECT, TK_BANG},
{IO_REDIRECT, TK_BANG},
{IO_REDIRECT, SEPARATOR_OP}, {IO_REDIRECT, SEPARATOR_OP},
{IO_REDIRECT, NEWLINE_LIST}, {IO_REDIRECT, NEWLINE_LIST},
{IO_REDIRECT, PIPE_SEMI_SEQUENCE}, {IO_REDIRECT, PIPE_SEMI_SEQUENCE},
@ -582,7 +619,6 @@ t_stackmatch g_stackmatch[] =
{CMD_PREFIX, TK_LBRACE}, {CMD_PREFIX, TK_LBRACE},
{CMD_PREFIX, COMPLETE_COMMANDS}, {CMD_PREFIX, COMPLETE_COMMANDS},
{CMD_PREFIX, TK_BANG}, {CMD_PREFIX, TK_BANG},
{CMD_PREFIX, TK_BANG},
{CMD_PREFIX, SEPARATOR_OP}, {CMD_PREFIX, SEPARATOR_OP},
{CMD_PREFIX, NEWLINE_LIST}, {CMD_PREFIX, NEWLINE_LIST},
{CMD_PREFIX, SEQUENCE}, {CMD_PREFIX, SEQUENCE},
@ -593,7 +629,6 @@ t_stackmatch g_stackmatch[] =
{CMD_NAME, TK_PAREN_OPEN}, {CMD_NAME, TK_PAREN_OPEN},
{CMD_NAME, TK_LBRACE}, {CMD_NAME, TK_LBRACE},
{CMD_NAME, TK_BANG}, {CMD_NAME, TK_BANG},
{CMD_NAME, TK_BANG},
{CMD_NAME, SEPARATOR_OP}, {CMD_NAME, SEPARATOR_OP},
{CMD_NAME, NEWLINE_LIST}, {CMD_NAME, NEWLINE_LIST},
{CMD_NAME, SEQUENCE}, {CMD_NAME, SEQUENCE},
@ -627,7 +662,6 @@ t_stackmatch g_stackmatch[] =
{CMD_SUPERIOR, TK_LBRACE}, {CMD_SUPERIOR, TK_LBRACE},
{CMD_SUPERIOR, COMPLETE_COMMANDS}, {CMD_SUPERIOR, COMPLETE_COMMANDS},
{CMD_SUPERIOR, TK_BANG}, {CMD_SUPERIOR, TK_BANG},
{CMD_SUPERIOR, TK_BANG},
{CMD_SUPERIOR, SEPARATOR_OP}, {CMD_SUPERIOR, SEPARATOR_OP},
{CMD_SUPERIOR, NEWLINE_LIST}, {CMD_SUPERIOR, NEWLINE_LIST},
{CMD_SUPERIOR, TK_PIPE}, {CMD_SUPERIOR, TK_PIPE},
@ -664,7 +698,6 @@ t_stackmatch g_stackmatch[] =
{SIMPLE_COMMAND, TK_LBRACE}, {SIMPLE_COMMAND, TK_LBRACE},
{SIMPLE_COMMAND, COMPLETE_COMMANDS}, {SIMPLE_COMMAND, COMPLETE_COMMANDS},
{SIMPLE_COMMAND, TK_BANG}, {SIMPLE_COMMAND, TK_BANG},
{SIMPLE_COMMAND, TK_BANG},
{SIMPLE_COMMAND, SEPARATOR_OP}, {SIMPLE_COMMAND, SEPARATOR_OP},
{SIMPLE_COMMAND, NEWLINE_LIST}, {SIMPLE_COMMAND, NEWLINE_LIST},
{SIMPLE_COMMAND, SEQUENCE}, {SIMPLE_COMMAND, SEQUENCE},
@ -694,7 +727,6 @@ t_stackmatch g_stackmatch[] =
{BRACE_GROUP, TK_LBRACE}, {BRACE_GROUP, TK_LBRACE},
{BRACE_GROUP, COMPLETE_COMMANDS}, {BRACE_GROUP, COMPLETE_COMMANDS},
{BRACE_GROUP, TK_BANG}, {BRACE_GROUP, TK_BANG},
{BRACE_GROUP, TK_BANG},
{BRACE_GROUP, SEPARATOR_OP}, {BRACE_GROUP, SEPARATOR_OP},
{BRACE_GROUP, NEWLINE_LIST}, {BRACE_GROUP, NEWLINE_LIST},
{BRACE_GROUP, SEQUENCE}, {BRACE_GROUP, SEQUENCE},
@ -704,7 +736,6 @@ t_stackmatch g_stackmatch[] =
{FNAME, TK_LBRACE}, {FNAME, TK_LBRACE},
{FNAME, COMPLETE_COMMANDS}, {FNAME, COMPLETE_COMMANDS},
{FNAME, TK_BANG}, {FNAME, TK_BANG},
{FNAME, TK_BANG},
{FNAME, SEPARATOR_OP}, {FNAME, SEPARATOR_OP},
{FNAME, NEWLINE_LIST}, {FNAME, NEWLINE_LIST},
{FNAME, SEQUENCE}, {FNAME, SEQUENCE},
@ -715,7 +746,6 @@ t_stackmatch g_stackmatch[] =
{FUNCTION_DEFINITION, TK_LBRACE}, {FUNCTION_DEFINITION, TK_LBRACE},
{FUNCTION_DEFINITION, COMPLETE_COMMANDS}, {FUNCTION_DEFINITION, COMPLETE_COMMANDS},
{FUNCTION_DEFINITION, TK_BANG}, {FUNCTION_DEFINITION, TK_BANG},
{FUNCTION_DEFINITION, TK_BANG},
{FUNCTION_DEFINITION, SEPARATOR_OP}, {FUNCTION_DEFINITION, SEPARATOR_OP},
{FUNCTION_DEFINITION, NEWLINE_LIST}, {FUNCTION_DEFINITION, NEWLINE_LIST},
{FUNCTION_DEFINITION, SEQUENCE}, {FUNCTION_DEFINITION, SEQUENCE},
@ -728,7 +758,6 @@ t_stackmatch g_stackmatch[] =
{UNTIL_CLAUSE, SEPARATOR_OP}, {UNTIL_CLAUSE, SEPARATOR_OP},
{UNTIL_CLAUSE, NEWLINE_LIST}, {UNTIL_CLAUSE, NEWLINE_LIST},
{UNTIL_CLAUSE, SEQUENCE}, {UNTIL_CLAUSE, SEQUENCE},
// watch !
{UNTIL_CLAUSE, TK_DO}, {UNTIL_CLAUSE, TK_DO},
{UNTIL_CLAUSE, TK_PAREN_CLOSE}, {UNTIL_CLAUSE, TK_PAREN_CLOSE},
{UNTIL_CLAUSE, TK_WHILE}, {UNTIL_CLAUSE, TK_WHILE},
@ -763,6 +792,7 @@ t_stackmatch g_stackmatch[] =
// {ELSE_PART, COMPOUND_LIST}, // {ELSE_PART, COMPOUND_LIST},
// {ELSE_PART, COMPLETE_CONDITION}, // {ELSE_PART, COMPLETE_CONDITION},
{IF_CLAUSE, LINEBREAK}, {IF_CLAUSE, LINEBREAK},
{IF_CLAUSE, TK_BANG},
{IF_CLAUSE, TK_PAREN_OPEN}, {IF_CLAUSE, TK_PAREN_OPEN},
{IF_CLAUSE, TK_LBRACE}, {IF_CLAUSE, TK_LBRACE},
{IF_CLAUSE, COMPLETE_COMMANDS}, {IF_CLAUSE, COMPLETE_COMMANDS},
@ -785,6 +815,7 @@ t_stackmatch g_stackmatch[] =
{IF_CLAUSE, COMPLETE_CONDITION}, {IF_CLAUSE, COMPLETE_CONDITION},
{IF_CLAUSE, AND_OR_MAJOR}, {IF_CLAUSE, AND_OR_MAJOR},
{BRACE_CLAUSE, LINEBREAK}, {BRACE_CLAUSE, LINEBREAK},
{BRACE_CLAUSE, TK_BANG},
{BRACE_CLAUSE, TK_PAREN_OPEN}, {BRACE_CLAUSE, TK_PAREN_OPEN},
{BRACE_CLAUSE, TK_LBRACE}, {BRACE_CLAUSE, TK_LBRACE},
{BRACE_CLAUSE, COMPLETE_COMMANDS}, {BRACE_CLAUSE, COMPLETE_COMMANDS},
@ -812,6 +843,7 @@ t_stackmatch g_stackmatch[] =
{CASE_LIST_NS, LINEBREAK}, {CASE_LIST_NS, LINEBREAK},
{CASE_LIST_NS, TK_IN}, {CASE_LIST_NS, TK_IN},
{CASE_CLAUSE, LINEBREAK}, {CASE_CLAUSE, LINEBREAK},
{CASE_CLAUSE, TK_BANG},
{CASE_CLAUSE, TK_PAREN_OPEN}, {CASE_CLAUSE, TK_PAREN_OPEN},
{CASE_CLAUSE, TK_LBRACE}, {CASE_CLAUSE, TK_LBRACE},
{CASE_CLAUSE, COMPLETE_COMMANDS}, {CASE_CLAUSE, COMPLETE_COMMANDS},
@ -839,11 +871,10 @@ t_stackmatch g_stackmatch[] =
{NAME, TK_FOR}, {NAME, TK_FOR},
{FOR_WORDLIST, NAME}, {FOR_WORDLIST, NAME},
{FOR_CLAUSE, LINEBREAK}, {FOR_CLAUSE, LINEBREAK},
{FOR_CLAUSE, TK_BANG},
{FOR_CLAUSE, TK_PAREN_OPEN}, {FOR_CLAUSE, TK_PAREN_OPEN},
{FOR_CLAUSE, TK_LBRACE}, {FOR_CLAUSE, TK_LBRACE},
{FOR_CLAUSE, COMPLETE_COMMANDS}, {FOR_CLAUSE, COMPLETE_COMMANDS},
{FOR_CLAUSE, TK_BANG},
{FOR_CLAUSE, TK_BANG},
{FOR_CLAUSE, SEPARATOR_OP}, {FOR_CLAUSE, SEPARATOR_OP},
{FOR_CLAUSE, NEWLINE_LIST}, {FOR_CLAUSE, NEWLINE_LIST},
{FOR_CLAUSE, SEQUENCE}, {FOR_CLAUSE, SEQUENCE},
@ -860,8 +891,6 @@ t_stackmatch g_stackmatch[] =
{FOR_CLAUSE, CASE_LIST_NS}, {FOR_CLAUSE, CASE_LIST_NS},
{FOR_CLAUSE, COMPLETE_CONDITION}, {FOR_CLAUSE, COMPLETE_CONDITION},
{FOR_CLAUSE, AND_OR_MAJOR}, {FOR_CLAUSE, AND_OR_MAJOR},
{TERM, LINEBREAK},
{TERM, COMPLETE_COMMANDS},
{COMPOUND_LIST, TK_DO}, {COMPOUND_LIST, TK_DO},
{COMPOUND_LIST, TK_PAREN_CLOSE}, {COMPOUND_LIST, TK_PAREN_CLOSE},
{COMPOUND_LIST, TK_LBRACE}, {COMPOUND_LIST, TK_LBRACE},
@ -902,7 +931,6 @@ t_stackmatch g_stackmatch[] =
{COMPOUND_COMMAND, TK_LBRACE}, {COMPOUND_COMMAND, TK_LBRACE},
{COMPOUND_COMMAND, COMPLETE_COMMANDS}, {COMPOUND_COMMAND, COMPLETE_COMMANDS},
{COMPOUND_COMMAND, TK_BANG}, {COMPOUND_COMMAND, TK_BANG},
{COMPOUND_COMMAND, TK_BANG},
{COMPOUND_COMMAND, SEPARATOR_OP}, {COMPOUND_COMMAND, SEPARATOR_OP},
{COMPOUND_COMMAND, NEWLINE_LIST}, {COMPOUND_COMMAND, NEWLINE_LIST},
{COMPOUND_COMMAND, SEQUENCE}, {COMPOUND_COMMAND, SEQUENCE},
@ -923,6 +951,7 @@ t_stackmatch g_stackmatch[] =
{COMMAND, TK_WHILE}, {COMMAND, TK_WHILE},
{COMMAND, TK_UNTIL}, {COMMAND, TK_UNTIL},
{COMMAND, LINEBREAK}, {COMMAND, LINEBREAK},
{COMMAND, TK_BANG},
{COMMAND, TK_PAREN_OPEN}, {COMMAND, TK_PAREN_OPEN},
{COMMAND, TK_LBRACE}, {COMMAND, TK_LBRACE},
{COMMAND, COMPLETE_COMMANDS}, {COMMAND, COMPLETE_COMMANDS},
@ -943,6 +972,7 @@ t_stackmatch g_stackmatch[] =
{AND_OR_MINOR, SEQUENCE}, {AND_OR_MINOR, SEQUENCE},
// watch ! // watch !
{AND_OR_MINOR, LINEBREAK}, {AND_OR_MINOR, LINEBREAK},
{AND_OR_MINOR, TK_BANG},
{AND_OR_MINOR, TK_PAREN_OPEN}, {AND_OR_MINOR, TK_PAREN_OPEN},
{AND_OR_MINOR, TK_LBRACE}, {AND_OR_MINOR, TK_LBRACE},
{AND_OR_MINOR, COMPLETE_COMMANDS}, {AND_OR_MINOR, COMPLETE_COMMANDS},
@ -959,6 +989,7 @@ t_stackmatch g_stackmatch[] =
{PIPE_SEQUENCE, CASE_LIST_NS}, {PIPE_SEQUENCE, CASE_LIST_NS},
{PIPE_SEQUENCE, COMPLETE_CONDITION}, {PIPE_SEQUENCE, COMPLETE_CONDITION},
{PIPE_SEQUENCE, LINEBREAK}, {PIPE_SEQUENCE, LINEBREAK},
{PIPE_SEQUENCE, TK_BANG},
{PIPE_SEQUENCE, TK_PAREN_OPEN}, {PIPE_SEQUENCE, TK_PAREN_OPEN},
{PIPE_SEQUENCE, TK_LBRACE}, {PIPE_SEQUENCE, TK_LBRACE},
{PIPE_SEQUENCE, COMPLETE_COMMANDS}, {PIPE_SEQUENCE, COMPLETE_COMMANDS},
@ -967,6 +998,26 @@ t_stackmatch g_stackmatch[] =
{PIPE_SEQUENCE, SEPARATOR_OP}, {PIPE_SEQUENCE, SEPARATOR_OP},
{PIPE_SEQUENCE, NEWLINE_LIST}, {PIPE_SEQUENCE, NEWLINE_LIST},
{PIPE_SEQUENCE, AND_OR_MAJOR}, {PIPE_SEQUENCE, AND_OR_MAJOR},
{TK_BANG, TK_WHILE},
{TK_BANG, TK_UNTIL},
{TK_BANG, TK_DO},
{TK_BANG, TK_PAREN_CLOSE},
{TK_BANG, TK_IF},
{TK_BANG, TK_ELIF},
{TK_BANG, TK_THEN},
{TK_BANG, TK_ELSE},
{TK_BANG, COMPOUND_LIST},
{TK_BANG, CASE_LIST_NS},
{TK_BANG, COMPLETE_CONDITION},
{TK_BANG, LINEBREAK},
{TK_BANG, TK_PAREN_OPEN},
{TK_BANG, TK_LBRACE},
{TK_BANG, COMPLETE_COMMANDS},
{TK_BANG, TK_BANG},
{TK_BANG, TK_BANG},
{TK_BANG, SEPARATOR_OP},
{TK_BANG, NEWLINE_LIST},
{TK_BANG, AND_OR_MAJOR},
{PIPE_SEMI_SEQUENCE, TK_WHILE}, {PIPE_SEMI_SEQUENCE, TK_WHILE},
{PIPE_SEMI_SEQUENCE, TK_UNTIL}, {PIPE_SEMI_SEQUENCE, TK_UNTIL},
{PIPE_SEMI_SEQUENCE, TK_DO}, {PIPE_SEMI_SEQUENCE, TK_DO},
@ -979,11 +1030,10 @@ t_stackmatch g_stackmatch[] =
{PIPE_SEMI_SEQUENCE, CASE_LIST_NS}, {PIPE_SEMI_SEQUENCE, CASE_LIST_NS},
{PIPE_SEMI_SEQUENCE, COMPLETE_CONDITION}, {PIPE_SEMI_SEQUENCE, COMPLETE_CONDITION},
{PIPE_SEMI_SEQUENCE, LINEBREAK}, {PIPE_SEMI_SEQUENCE, LINEBREAK},
{PIPE_SEMI_SEQUENCE, TK_BANG},
{PIPE_SEMI_SEQUENCE, TK_PAREN_OPEN}, {PIPE_SEMI_SEQUENCE, TK_PAREN_OPEN},
{PIPE_SEMI_SEQUENCE, TK_LBRACE}, {PIPE_SEMI_SEQUENCE, TK_LBRACE},
{PIPE_SEMI_SEQUENCE, COMPLETE_COMMANDS}, {PIPE_SEMI_SEQUENCE, COMPLETE_COMMANDS},
{PIPE_SEMI_SEQUENCE, TK_BANG},
{PIPE_SEMI_SEQUENCE, TK_BANG},
{PIPE_SEMI_SEQUENCE, SEPARATOR_OP}, {PIPE_SEMI_SEQUENCE, SEPARATOR_OP},
{PIPE_SEMI_SEQUENCE, NEWLINE_LIST}, {PIPE_SEMI_SEQUENCE, NEWLINE_LIST},
{PIPE_SEMI_SEQUENCE, AND_OR_MAJOR}, {PIPE_SEMI_SEQUENCE, AND_OR_MAJOR},
@ -1004,7 +1054,6 @@ t_stackmatch g_stackmatch[] =
{SEQUENCE, TK_LBRACE}, {SEQUENCE, TK_LBRACE},
{SEQUENCE, COMPLETE_COMMANDS}, {SEQUENCE, COMPLETE_COMMANDS},
{SEQUENCE, TK_BANG}, {SEQUENCE, TK_BANG},
{SEQUENCE, TK_BANG},
{SEQUENCE, SEPARATOR_OP}, {SEQUENCE, SEPARATOR_OP},
{SEQUENCE, NEWLINE_LIST}, {SEQUENCE, NEWLINE_LIST},
{SEQUENCE, AND_OR_MAJOR}, {SEQUENCE, AND_OR_MAJOR},
@ -1021,6 +1070,7 @@ t_stackmatch g_stackmatch[] =
{PIPELINE, CASE_LIST_NS}, {PIPELINE, CASE_LIST_NS},
{PIPELINE, COMPLETE_CONDITION}, {PIPELINE, COMPLETE_CONDITION},
{PIPELINE, LINEBREAK}, {PIPELINE, LINEBREAK},
{PIPELINE, TK_BANG},
{PIPELINE, TK_PAREN_OPEN}, {PIPELINE, TK_PAREN_OPEN},
{PIPELINE, TK_LBRACE}, {PIPELINE, TK_LBRACE},
{PIPELINE, COMPLETE_COMMANDS}, {PIPELINE, COMPLETE_COMMANDS},
@ -1029,6 +1079,7 @@ t_stackmatch g_stackmatch[] =
{PIPELINE, NEWLINE_LIST}, {PIPELINE, NEWLINE_LIST},
{PIPELINE, AND_OR_MAJOR}, {PIPELINE, AND_OR_MAJOR},
{AND_OR_MAJOR, LINEBREAK}, {AND_OR_MAJOR, LINEBREAK},
{AND_OR_MAJOR, TK_BANG},
{AND_OR_MAJOR, TK_PAREN_OPEN}, {AND_OR_MAJOR, TK_PAREN_OPEN},
{AND_OR_MAJOR, TK_LBRACE}, {AND_OR_MAJOR, TK_LBRACE},
{AND_OR_MAJOR, COMPLETE_COMMANDS}, {AND_OR_MAJOR, COMPLETE_COMMANDS},
@ -1046,6 +1097,7 @@ t_stackmatch g_stackmatch[] =
{AND_OR, CASE_LIST_NS}, {AND_OR, CASE_LIST_NS},
{AND_OR, COMPLETE_CONDITION}, {AND_OR, COMPLETE_CONDITION},
{AND_OR, LINEBREAK}, {AND_OR, LINEBREAK},
{AND_OR, TK_BANG},
{AND_OR, TK_PAREN_OPEN}, {AND_OR, TK_PAREN_OPEN},
{AND_OR, TK_LBRACE}, {AND_OR, TK_LBRACE},
{AND_OR, COMPLETE_COMMANDS}, {AND_OR, COMPLETE_COMMANDS},

View file

@ -6,7 +6,7 @@
/* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */ /* By: ariard <ariard@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/02/09 17:58:34 by ariard #+# #+# */ /* Created: 2017/02/09 17:58:34 by ariard #+# #+# */
/* Updated: 2017/03/07 15:53:23 by ariard ### ########.fr */ /* Updated: 2017/03/07 18:47:55 by ariard ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -28,6 +28,7 @@ t_prodmatch g_prodmatch[] =
{TK_WORD, CMD_SUPERIOR, CMD_SUFFIX}, {TK_WORD, CMD_SUPERIOR, CMD_SUFFIX},
{TK_WORD, PIPE_SEMI_SEQUENCE, CMD_SUFFIX}, {TK_WORD, PIPE_SEMI_SEQUENCE, CMD_SUFFIX},
{TK_WORD, LINEBREAK, CMD_NAME}, {TK_WORD, LINEBREAK, CMD_NAME},
{TK_WORD, TK_BANG, CMD_NAME},
{TK_WORD, TK_PIPE, CMD_NAME}, {TK_WORD, TK_PIPE, CMD_NAME},
{TK_WORD, AND_OR, CMD_NAME}, {TK_WORD, AND_OR, CMD_NAME},
{TK_WORD, AND_OR_MAJOR, CMD_NAME}, {TK_WORD, AND_OR_MAJOR, CMD_NAME},
@ -35,6 +36,7 @@ t_prodmatch g_prodmatch[] =
{TK_WORD, TK_UNTIL, CMD_NAME}, {TK_WORD, TK_UNTIL, CMD_NAME},
{TK_WORD, TK_DO, CMD_NAME}, {TK_WORD, TK_DO, CMD_NAME},
{TK_WORD, TK_PAREN_CLOSE, CMD_NAME}, {TK_WORD, TK_PAREN_CLOSE, CMD_NAME},
{TK_WORD, TK_RBRACE, CMD_NAME},
{TK_WORD, TK_IF, CMD_NAME}, {TK_WORD, TK_IF, CMD_NAME},
{TK_WORD, TK_THEN, CMD_NAME}, {TK_WORD, TK_THEN, CMD_NAME},
{TK_WORD, TK_ELIF, CMD_NAME}, {TK_WORD, TK_ELIF, CMD_NAME},
@ -51,12 +53,14 @@ t_prodmatch g_prodmatch[] =
{TK_WORD, CASE_LIST, PATTERN}, {TK_WORD, CASE_LIST, PATTERN},
{TK_WORD, PATTERN_CASE, PATTERN}, {TK_WORD, PATTERN_CASE, PATTERN},
{TK_WORD, COMPLETE_COMMANDS, CMD_NAME}, {TK_WORD, COMPLETE_COMMANDS, CMD_NAME},
{TK_ASSIGNEMENT_WORD, TK_BANG, CMD_PREFIX},
{TK_ASSIGNEMENT_WORD, LINEBREAK, CMD_PREFIX}, {TK_ASSIGNEMENT_WORD, LINEBREAK, CMD_PREFIX},
{TK_ASSIGNEMENT_WORD, TK_PAREN_OPEN, CMD_PREFIX}, {TK_ASSIGNEMENT_WORD, TK_PAREN_OPEN, CMD_PREFIX},
{TK_ASSIGNEMENT_WORD, TK_LBRACE, CMD_PREFIX}, {TK_ASSIGNEMENT_WORD, TK_LBRACE, CMD_PREFIX},
{TK_ASSIGNEMENT_WORD, TK_BANG, CMD_PREFIX}, {TK_ASSIGNEMENT_WORD, TK_BANG, CMD_PREFIX},
{TK_ASSIGNEMENT_WORD, SEPARATOR_OP, CMD_PREFIX}, {TK_ASSIGNEMENT_WORD, SEPARATOR_OP, CMD_PREFIX},
{TK_ASSIGNEMENT_WORD, NEWLINE_LIST, CMD_PREFIX}, {TK_ASSIGNEMENT_WORD, NEWLINE_LIST, CMD_PREFIX},
{TK_NAME, TK_BAMG, FNAME},
{TK_NAME, LINEBREAK, FNAME}, {TK_NAME, LINEBREAK, FNAME},
{TK_NAME, TK_PAREN_OPEN, FNAME}, {TK_NAME, TK_PAREN_OPEN, FNAME},
{TK_NAME, TK_LBRACE, FNAME}, {TK_NAME, TK_LBRACE, FNAME},
@ -68,6 +72,7 @@ t_prodmatch g_prodmatch[] =
{TK_NEWLINE, CASE_LIST_NS, NEWLINE_LIST}, {TK_NEWLINE, CASE_LIST_NS, NEWLINE_LIST},
{TK_NEWLINE, TK_DO, NEWLINE_LIST}, {TK_NEWLINE, TK_DO, NEWLINE_LIST},
{TK_NEWLINE, TK_PAREN_CLOSE, NEWLINE_LIST}, {TK_NEWLINE, TK_PAREN_CLOSE, NEWLINE_LIST},
{TK_NEWLINE, TK_RBRACE, CMD_NAME},
{TK_NEWLINE, TK_IN, NEWLINE_LIST}, {TK_NEWLINE, TK_IN, NEWLINE_LIST},
{TK_NEWLINE, TK_WHILE, NEWLINE_LIST}, {TK_NEWLINE, TK_WHILE, NEWLINE_LIST},
{TK_NEWLINE, TK_UNTIL, NEWLINE_LIST}, {TK_NEWLINE, TK_UNTIL, NEWLINE_LIST},
@ -79,6 +84,7 @@ t_prodmatch g_prodmatch[] =
{TK_NEWLINE, CMD_NAME, NEWLINE_LIST}, {TK_NEWLINE, CMD_NAME, NEWLINE_LIST},
{TK_NEWLINE, COMPLETE_COMMANDS, NEWLINE_LIST}, {TK_NEWLINE, COMPLETE_COMMANDS, NEWLINE_LIST},
{TK_NEWLINE, LINEBREAK, NEWLINE_LIST}, {TK_NEWLINE, LINEBREAK, NEWLINE_LIST},
{TK_NEWLINE, TK_BANG, NEWLINE_LIST},
{TK_NEWLINE, TK_PAREN_OPEN, NEWLINE_LIST}, {TK_NEWLINE, TK_PAREN_OPEN, NEWLINE_LIST},
{TK_NEWLINE, TK_LBRACE, NEWLINE_LIST}, {TK_NEWLINE, TK_LBRACE, NEWLINE_LIST},
{TK_NEWLINE, CMD_SUPERIOR, LINEBREAK}, {TK_NEWLINE, CMD_SUPERIOR, LINEBREAK},