WIP > redir

This commit is contained in:
Jan Nieuwenhuizen 2018-11-04 14:13:01 +01:00
parent f2fb1bedc9
commit 9cf3ee9e7e
1 changed files with 2 additions and 2 deletions

View File

@ -160,7 +160,7 @@
pipeline-head <- sp* command
pipeline-tail <- sp* pipe ws* command
negate <-- '!'
command <-- (compound-command (sp+ io-redirect)*) / simple-command / function-def
command <-- (compound-command (sp+ io-redirect)*) / simple-command (sp+ io-redirect)* / function-def
compound-command <- brace-group / subshell / for-clause / case-clause / if-clause / while-clause / until-clause
simple-command <- (sp* (io-redirect sp+)* nonreserved)+
nonreserved <- &(reserved word) word / !reserved word
@ -223,7 +223,7 @@
rhs <- (substitution / word)*
assign < '='
dollar < '$'
literal <-- backslash? (!ws !amp !tick !dollar !pipe !semi !par !nl !sp !rbrace .)+
literal <-- backslash? (!ws !amp !tick !dollar !pipe !semi !par !nl !sp !rbrace !io-op .)+
variable <-- dollar ('$' / '*' / '?' / '@' / [0-9] / identifier / lbrace identifier rbrace)
variable-and-or <- dollar lbrace (variable-or / variable-and ) rbrace
variable-and <-- identifier plus rhs