mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
parse-cmd: fix typo and grammar.md appearance
This commit is contained in:
parent
807a93fc49
commit
1da3cac89d
2 changed files with 10 additions and 1 deletions
|
|
@ -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 -> ||
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue