From 9cf3ee9e7e77c49b5e7c83e257abfc30e22063e9 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 4 Nov 2018 14:13:01 +0100 Subject: [PATCH] WIP > redir --- gash/peg.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gash/peg.scm b/gash/peg.scm index 413fa2b..c8e1cd0 100644 --- a/gash/peg.scm +++ b/gash/peg.scm @@ -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