parse-cmd: Various fixes and a rotation of the parsing tree

This commit is contained in:
Jérôme Guélen 2025-04-08 12:14:38 +02:00
parent 90d213bf98
commit 10a3c9c411
No known key found for this signature in database
12 changed files with 155 additions and 48 deletions

View file

@ -29,7 +29,7 @@ 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)).
therefore compatible with descending syntax analysis (LL(1)).
```
LINE -> CMDS eol
@ -41,7 +41,7 @@ OPT_PIPELINE -> | GROUP_OR_SIMPLE OPT_PIPELINE
OPT_PIPELINE -> ε
GROUP_OR_SIMPLE -> (CMDS) REDIR
GROUP_OR_SIMPLE -> SIMPLE
SIMPLE -> REDIR word REDIR SIMPLE_LST
SIMPLE -> REDIR word REDIR SIMPLST
SIMPLE_LST -> word REDIR SIMPLE_LST
SIMPLE_LST -> ε
REDIR -> > word REDIR