From 24c35cc5d9a9c7aff217b3a7e6ec101a690c43f3 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 15 Jul 2018 21:44:15 +0200 Subject: [PATCH] checkpoint --- gash/peg.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gash/peg.scm b/gash/peg.scm index 13d9048..56fdda4 100644 --- a/gash/peg.scm +++ b/gash/peg.scm @@ -142,7 +142,8 @@ filename <-- word name <-- identifier identifier <- [_a-zA-Z][_a-zA-Z0-9]* - word <- substitution / assignment / number / variable / delim / literal + oldword <- substitution / assignment / number / variable / delim / literal + word <-- assignment / delim / (substitution / number / variable / literal)+ number <-- [0-9]+ lsubst < '$(' rsubst < ')' @@ -258,4 +259,6 @@ (('if-clause expr then else) `(if-clause ,(transform expr) ,(transform then) ,(transform else))) (('then-part o ...) `(begin ,@(map transform o))) (('else-part o ...) `(begin ,@(map transform o))) + (('word o) (transform o)) + (('word o ...) `(string-append ,@(map transform o))) (_ ast)))