mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
parse-cmd: grammar.md
This commit is contained in:
parent
1da3cac89d
commit
7f509a50c9
1 changed files with 0 additions and 4 deletions
|
|
@ -6,7 +6,6 @@ and then || and && which share the same priority (priorization therefore
|
||||||
occurs because of left associativity).
|
occurs because of left associativity).
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
|
||||||
LINE -> CMDS eol
|
LINE -> CMDS eol
|
||||||
CMDS -> CMDS LIST_OP PIPELINE
|
CMDS -> CMDS LIST_OP PIPELINE
|
||||||
CMDS -> PIPELINE
|
CMDS -> PIPELINE
|
||||||
|
|
@ -24,7 +23,6 @@ REDIR -> << word REDIR
|
||||||
REDIR -> ε
|
REDIR -> ε
|
||||||
LIST_OP -> &&
|
LIST_OP -> &&
|
||||||
LIST_OP -> ||
|
LIST_OP -> ||
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -34,7 +32,6 @@ The same priorities as the previous version except it is now LL(1) and
|
||||||
therefore compatible with descending syntax analysisi (LL(1)).
|
therefore compatible with descending syntax analysisi (LL(1)).
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
|
||||||
LINE -> CMDS eol
|
LINE -> CMDS eol
|
||||||
CMDS -> PIPELINE OPT_CMDS
|
CMDS -> PIPELINE OPT_CMDS
|
||||||
OPT_CMDS -> LIST_OP PIPELINE OPT_CMDS
|
OPT_CMDS -> LIST_OP PIPELINE OPT_CMDS
|
||||||
|
|
@ -54,5 +51,4 @@ REDIR -> << word REDIR
|
||||||
REDIR -> ε
|
REDIR -> ε
|
||||||
LIST_OP -> &&
|
LIST_OP -> &&
|
||||||
LIST_OP -> ||
|
LIST_OP -> ||
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue