before pull
This commit is contained in:
parent
8e05bba1c6
commit
90457ec703
2 changed files with 22 additions and 0 deletions
|
|
@ -215,6 +215,16 @@ typedef struct s_stackmatch t_stackmatch;
|
||||||
|
|
||||||
extern t_stackmatch g_stackmatch[];
|
extern t_stackmatch g_stackmatch[];
|
||||||
|
|
||||||
|
struct s_treematch g_treemacth[];
|
||||||
|
{
|
||||||
|
t_type token;
|
||||||
|
void (*add)(t_btree **ast, t_type )
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct s_treematch t_treematch;
|
||||||
|
|
||||||
|
extern t_treematch g_treematch[];
|
||||||
|
|
||||||
int ft_parse(t_btree **ast, t_list **token);
|
int ft_parse(t_btree **ast, t_list **token);
|
||||||
int produce_sym(t_sym stack, t_sym *new_sym, t_list **lst);
|
int produce_sym(t_sym stack, t_sym *new_sym, t_list **lst);
|
||||||
int eval_sym(t_sym stack, t_sym new_sym);
|
int eval_sym(t_sym stack, t_sym new_sym);
|
||||||
|
|
|
||||||
12
42sh/src/parser/build_tree.c
Normal file
12
42sh/src/parser/build_tree.c
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
#include "parser.h"
|
||||||
|
|
||||||
|
t_treematch g_treematch[] =
|
||||||
|
{
|
||||||
|
TK_WORD,
|
||||||
|
|
||||||
|
int build_tree(t_btree **ast)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
i = 0;
|
||||||
|
while (g
|
||||||
Loading…
Reference in a new issue