Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct s_list t_list;
- typedef struct s_token t_token;
- struct s_list
- {
- void *data;
- t_list *prev;
- t_list *next;
- };
- typedef enum e_token_type
- {
- TOKEN_NEWLINE,
- TOKEN_EOF,
- TOKEN_PAR_OPEN,
- TOKEN_PAR_CLOSE,
- TOKEN_IF_AND,
- TOKEN_IF_OR,
- TOKEN_SEMICOLON,
- TOKEN_PIPE
- } t_token_type;
- struct s_token
- {
- t_token_type type;
- char *data;
- };
- const t_token operators[] =
- {
- { TOKEN_NEWLINE, "\n" },
- { TOKEN_EOF, "\0" },
- { TOKEN_PAR_OPEN, "(" },
- { TOKEN_PAR_CLOSE, ")" },
- { TOKEN_IF_AND, "&&" },
- { TOKEN_IF_OR, "||" },
- { TOKEN_SEMICOLON, ";" },
- { TOKEN_PIPE , "|" },
- { 0, NULL }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement