#include "grammar_advanced.h" #include #include "grammar_basic.h" struct ast *parse_redirection(struct lexer_context *ctx) { struct token *token = PEEK_TOKEN(); if (token->type == TOKEN_IONUMBER) { // TODO POP_TOKEN(); token = PEEK_TOKEN(); } if (token->type != TOKEN_REDIRECTION) { puts("Syntax error: expected a redirection token but got something " "else"); return NULL; } } struct ast *parse_prefix(struct lexer_context *ctx) { return parse_redirection(ctx); }