Paste: I"
Author: | erg |
Mode: | factor |
Date: | Sun, 28 Sep 2008 19:33:09 |
Plain Text |
USING: arrays kernel peg.ebnf sequences urls strings
combinators accessors prettyprint sequences.deep lexer parser
quotations io.streams.string strings.parser ;
IN: jeah
EBNF: embedded-quotations
embedded-quotation = '[[' (!(']]').)* ']]' => [[ second "[ " " ]" swapd 3append ]]
string = (!(embedded-quotation).)+ => [[ >string unparse ]]
foo = (string embedded-quotation string)* => [[ flatten ]]
;EBNF
: I" parse-string embedded-quotations parse-lines parsed ; parsing
Author: | erg |
Mode: | factor |
Date: | Sun, 28 Sep 2008 19:40:09 |
Plain Text |
USING: arrays kernel peg.ebnf sequences urls strings
combinators accessors prettyprint sequences.deep lexer parser
quotations io.streams.string strings.parser ;
IN: jeah
EBNF: embedded-quotations
embedded-quotation = '[[' (!(']]').)* ']]'
=> [[ second "[ " " ]" swapd 3append ]]
string = (!(embedded-quotation).)* => [[ >string unparse ]]
foo = (string|embedded-quotation)* => [[ flatten ]]
;EBNF
: I" parse-string embedded-quotations parse-lines parsed ; parsing
New Annotation