1 ! Copyright (C) 2008, 2010 Slava Pestov
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: peg.ebnf multiline strings ;
8 escaped-char = "\\" .:ch => [[ ch ]]
9 quoted = '"' (escaped-char | [^"])*:a '"' => [[ a ]]
10 unquoted = (escaped-char | [^ \t\n\r"])+
11 argument = (quoted | unquoted) => [[ >string ]]
12 command = space* (argument:a space* => [[ a ]])+:c !(.) => [[ c ]]