From 116c2909c2a37fbe29b1542df4f3f4481ea1d9d3 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 6 Jun 2016 16:34:23 -0700 Subject: [PATCH] factor: fix language syntax words. --- language/peg/ebnf/ebnf.factor | 2 +- language/slots/syntax/syntax.factor | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/language/peg/ebnf/ebnf.factor b/language/peg/ebnf/ebnf.factor index 70513c291d..85dd77f153 100644 --- a/language/peg/ebnf/ebnf.factor +++ b/language/peg/ebnf/ebnf.factor @@ -114,7 +114,7 @@ C: ebnf ; [ [ char: \ = ] satisfy [ "\"\\" member? ] satisfy 2seq , - [ char: " = not ] satisfy , + [ char: \" = not ] satisfy , ] choice* repeat1 "\"" "\"" surrounded-by , [ char: ' = not ] satisfy repeat1 "'" "'" surrounded-by , ] choice* [ "" flatten-as unescape-string ] action ; diff --git a/language/slots/syntax/syntax.factor b/language/slots/syntax/syntax.factor index 0ea5c5876b..27c33527e0 100755 --- a/language/slots/syntax/syntax.factor +++ b/language/slots/syntax/syntax.factor @@ -4,11 +4,11 @@ USING: combinators combinators.smart fry kernel lexer quotations sequences sequences.generalizations slots words ; in: slots.syntax -SYNTAX: slots[ +SYNTAX: \ slots[ "]" [ reader-word 1quotation ] map-tokens '[ _ cleave ] append! ; -SYNTAX: slots{ +SYNTAX: \ slots{ "}" [ reader-word 1quotation ] map-tokens '[ [ _ cleave ] output>array ] append! ; @@ -18,23 +18,23 @@ SYNTAX: slots{ : writer-word<< ( name -- word ) ">>" prepend "accessors" lookup-word ; -SYNTAX: set-slots[ +SYNTAX: \ set-slots[ "]" [ >>writer-word 1quotation ] map-tokens '[ _ spread ] append! ; -SYNTAX: set-slots{ +SYNTAX: \ set-slots{ "}" [ >>writer-word 1quotation ] map-tokens [ length ] [ ] bi '[ _ firstn _ spread ] append! ; -SYNTAX: copy-slots{ +SYNTAX: \ copy-slots{ "}" [ [ reader-word 1quotation ] [ writer-word<< 1quotation ] bi append ] map-tokens '[ swap _ cleave ] append! ; -SYNTAX: get[ postpone\ slots[ ; -SYNTAX: get{ postpone\ slots{ ; -SYNTAX: set[ postpone\ set-slots[ ; -SYNTAX: set{ postpone\ set-slots{ ; +SYNTAX: \ get[ postpone\ slots[ ; +SYNTAX: \ get{ postpone\ slots{ ; +SYNTAX: \ set[ postpone\ set-slots[ ; +SYNTAX: \ set{ postpone\ set-slots{ ;