feat: redirection rules

This commit is contained in:
Gu://em_ 2026-01-24 15:34:10 +01:00
parent 18c1da6bdf
commit 32f56beb6b
8 changed files with 218 additions and 25 deletions

View file

@ -1,4 +1,27 @@
#ifndef GRAMMAR_ADVANCED_H
#define GRAMMAR_ADVANCED_H
#include "grammar.h"
// === Functions
/*
* @brief parses a redirection rule
*
* @code redirection = [IONUMBER] ( '>' | '<' | '>>' | '>&' | '<&' | '>|' | '<>' ) WORD ;
*
* @first TOKEN_IONUMBER, TOKEN_REDIRECTION
*/
struct ast *parse_redirection(struct lexer_context *ctx);
/*
* @brief parses a prefix rule
*
* @code prefix = redirection ;
*
* @first first(redirection)
*/
struct ast *parse_prefix(struct lexer_context *ctx);
#endif /* ! GRAMMAR_ADVANCED_H */