All pastes #224845 Raw Edit

julian

public c v1 · immutable
#224845 ·published 2006-10-27 16:37 UTC
rendered paste body
struct s_ast                    *parse(struct s_token_list      *lex,                                       struct s_ast             *left,                                       struct s_ast             *right){  struct s_ast                  *node;  struct s_ast                  *father;  if (!lex)    return (NULL);  node = make_node(lex, left, right);  if (lex->token_type == T_COMMAND)  {    if (!(father = parse(lex->next, node, NULL)))      return (node);    return (father);  }  if (priority(next_op(lex)) <= priority(lex))  {    node->right = make_node(lex->next, NULL, NULL);    if (!(father = parse(lex->next->next, node, NULL)))      return (node);    return (father);  }  node->right = parse(lex->next, NULL, NULL);  return (node);}