parse-cmd: fix typo and grammar.md appearance

This commit is contained in:
Jerome 2025-04-06 14:25:52 +02:00
parent 807a93fc49
commit 1da3cac89d
2 changed files with 10 additions and 1 deletions

View file

@ -5,6 +5,8 @@ and priority of operators to wit () is of highest priority followed by |
and then || and && which share the same priority (priorization therefore
occurs because of left associativity).
```
{
LINE -> CMDS eol
CMDS -> CMDS LIST_OP PIPELINE
CMDS -> PIPELINE
@ -22,12 +24,17 @@ REDIR -> << word REDIR
REDIR -> ε
LIST_OP -> &&
LIST_OP -> ||
}
```
## Grammar after removal of left recursivity
The same priorities as the previous version except it is now LL(1) and
therefore compatible with descending syntax analysisi (LL(1)).
```
{
LINE -> CMDS eol
CMDS -> PIPELINE OPT_CMDS
OPT_CMDS -> LIST_OP PIPELINE OPT_CMDS
@ -47,3 +54,5 @@ REDIR -> << word REDIR
REDIR -> ε
LIST_OP -> &&
LIST_OP -> ||
}
```

View file

@ -13,7 +13,7 @@
#include "cmd_parsing.h"
/*
** NOTE: Tjis file will temporarily include way more fucntions than allowed.
** NOTE: This file will temporarily include way more fucntions than allowed.
*/
void parse_error(t_minishell *app, t_worddesc *token)