MiniDevil As beautiful as a shell
parser_pipeline.c File Reference

Pipeline parsing: builds left associative pipe tree. More...

#include "parser.h"
#include "ast.h"
#include <stddef.h>
+ Include dependency graph for parser_pipeline.c:

Detailed Description

Pipeline parsing: builds left associative pipe tree.

Definition in file parser_pipeline.c.

Functions

t_astparse_pipeline (t_token **tokens)
 Parse a pipeline of commands connected by pipes. More...
 

Function Documentation

◆ parse_pipeline()

t_ast* parse_pipeline ( t_token **  tokens)

Parse a pipeline of commands connected by pipes.

Left associative tree: "A | B | C" -> PIPE(PIPE(A, B), C)

Parameters
tokensPointer to current token pointer
Returns
Pipeline AST or NULL on failure

Definition at line 25 of file parser_pipeline.c.

References create_pipe_node(), free_ast(), t_token::next, parse_command(), TOKEN_PIPE, and t_token::type.

Referenced by parse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Go to the source code of this file.