Skip to content

Commit

Permalink
feat: add struct structures for lexer and parser
Browse files Browse the repository at this point in the history
  • Loading branch information
facetint authored Apr 4, 2024
1 parent 2f0e518 commit 1b82622
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,16 @@ This minishell project uses these tokens:
▶︎ For example, it takes the command "ls -l" and converts it into a delimited array like [ "ls", "-l" ].


``` typedef struct s_token
{
char *value;
t_token_type type;
struct s_token *next;
} t_token;
```


### PARSER

▶︎ Parses symbols and tokens from the lexer to understand the structure of commands.
Expand All @@ -175,6 +185,20 @@ This minishell project uses these tokens:
▶︎ For example, it converts the command "ls -l" into a tree structure.


``` typedef struct s_command
{
char **args;
int output;
int input;
int pid;
t_redirection *redirections;
struct s_command *next;
struct s_command *prev;
} t_command;
```


### EXPANDER

▶︎ Evaluates variables, wildcards and other special characters within the command.
Expand Down

0 comments on commit 1b82622

Please sign in to comment.