diff --git a/collections/sequences/parser/parser-tests.factor b/collections/sequences/parser/parser-tests.factor index bd62da8962..61fadd8ad4 100644 --- a/collections/sequences/parser/parser-tests.factor +++ b/collections/sequences/parser/parser-tests.factor @@ -13,7 +13,7 @@ in: sequences.parser.tests { "foo" ";bar" } [ "foo;bar" [ - [ char: ; take-until-object ] [ take-rest ] bi + [ char: \; take-until-object ] [ take-rest ] bi ] parse-sequence ] unit-test diff --git a/core/strings/parser/parser.factor b/core/strings/parser/parser.factor index 11ac31057f..4a68d57225 100644 --- a/core/strings/parser/parser.factor +++ b/core/strings/parser/parser.factor @@ -50,6 +50,7 @@ ERROR: bad-escape char ; { char: \- char: \- } { char: \+ char: \+ } { char: \= char: \= } + { char: \. char: \. } { char: \, char: \, } } ?at [ bad-escape ] unless ; diff --git a/demos/morse/morse.factor b/demos/morse/morse.factor index 79cf5899f6..d320114aa9 100755 --- a/demos/morse/morse.factor +++ b/demos/morse/morse.factor @@ -56,24 +56,24 @@ CONSTANT: morse-code-table $[ { char: 8 "---.." } { char: 9 "----." } { char: 0 "-----" } - { char: . ".-.-.-" } - { char: , "--..--" } - { char: ? "..--.." } - { char: ' ".----." } + { char: \. ".-.-.-" } + { char: \, "--..--" } + { char: \? "..--.." } + { char: \' ".----." } { char: \! "-.-.--" } - { char: / "-..-." } + { char: \/ "-..-." } { char: \( "-.--." } - { char: ) "-.--.-" } - { char: & ".-..." } + { char: \) "-.--.-" } + { char: \& ".-..." } { char: \: "---..." } - { char: ; "-.-.-." } - { char: = "-...- " } - { char: + ".-.-." } - { char: - "-....-" } - { char: _ "..--.-" } + { char: \; "-.-.-." } + { char: \= "-...- " } + { char: \+ ".-.-." } + { char: \- "-....-" } + { char: \_ "..--.-" } { char: \" ".-..-." } - { char: $ "...-..-" } - { char: @ ".--.-." } + { char: \$ "...-..-" } + { char: \@ ".--.-." } { char: \s "/" } } >biassoc ] ; diff --git a/libs/cuesheet/cuesheet.factor b/libs/cuesheet/cuesheet.factor index a7b3bf5ed4..6451a7e922 100644 --- a/libs/cuesheet/cuesheet.factor +++ b/libs/cuesheet/cuesheet.factor @@ -55,7 +55,7 @@ ERROR: unknown-syntax syntax ; PRIVATE< : trim-comments ( str -- str' ) - dup [ char: ; = ] find drop [ head ] when* ; + dup [ char: \; = ] find drop [ head ] when* ; : trim-quotes ( str -- str' ) [ char: \" = ] trim ; diff --git a/libs/fjsc/fjsc.factor b/libs/fjsc/fjsc.factor index d2105a0d84..4059b88035 100644 --- a/libs/fjsc/fjsc.factor +++ b/libs/fjsc/fjsc.factor @@ -33,7 +33,7 @@ TUPLE: ast-hashtable elements ; { [ blank? not ] [ char: \" = not ] - [ char: ; = not ] + [ char: \; = not ] [ LETTER? not ] [ letter? not ] [ identifier-middle? not ] diff --git a/libs/flip-text/flip-text.factor b/libs/flip-text/flip-text.factor index 5d010bdb64..2fd9b026b6 100644 --- a/libs/flip-text/flip-text.factor +++ b/libs/flip-text/flip-text.factor @@ -69,19 +69,19 @@ CONSTANT: CHARS H{ { char: 7 0x2C62 } ! { char: 8 char: 8 } { char: 9 char: 6 } - { char: & 0x214B } + { char: \& 0x214B } { char: \! 0x00A1 } { char: \" 0x201E } - { char: . 0x02D9 } - { char: ; 0x061B } + { char: \. 0x02D9 } + { char: \; 0x061B } { char: \[ char: ] } { char: \( char: ) } { char: \{ char: } } - { char: ? 0x00BF } + { char: \? 0x00BF } { char: \! 0x00A1 } - { char: ' char: , } - { char: < char: > } - { char: _ 0x203E } + { char: \' char: , } + { char: \< char: > } + { char: \_ 0x203E } { 0x203F 0x2040 } { 0x2045 0x2046 } { 0x2234 0x2235 } diff --git a/libs/ini-file/ini-file.factor b/libs/ini-file/ini-file.factor index a8c5442ca8..37938bf1e9 100644 --- a/libs/ini-file/ini-file.factor +++ b/libs/ini-file/ini-file.factor @@ -18,14 +18,14 @@ PRIVATE< { char: r char: \r } { char: t char: \t } { char: v char: \v } - { char: ' char: ' } + { char: \' char: \' } { char: \" char: \" } - { char: \\ char: \\ } - { char: ? char: ? } - { char: ; char: ; } + { char: \\ char: \\ } + { char: \? char: \? } + { char: \; char: \; } { char: \[ char: \[ } - { char: ] char: ] } - { char: = char: = } + { char: \] char: \] } + { char: \= char: \= } } ?at [ bad-escape ] unless ; : (unescape-string) ( str -- ) @@ -49,14 +49,14 @@ use: xml.entities { char: \r "\\r" } { char: \t "\\t" } { 0x0b "\\v" } - { char: ' "\\'" } - { char: " "\\\"" } + { char: \' "\\'" } + { char: \" "\\\"" } { char: \\ "\\\\" } - { char: ? "\\?" } - { char: ; "\\;" } + { char: \? "\\?" } + { char: \; "\\;" } { char: \[ "\\[" } { char: \] "\\]" } - { char: = "\\=" } + { char: \= "\\=" } } escape-string-by ; : space? ( ch -- ? ) diff --git a/libs/metar/metar.factor b/libs/metar/metar.factor index 709d1d2f1e..8f65f23a96 100644 --- a/libs/metar/metar.factor +++ b/libs/metar/metar.factor @@ -41,7 +41,7 @@ ERROR: bad-location str ; : stations-data ( -- seq ) URL" http://weather.noaa.gov/data/nsd_cccc.txt" - http-get nip char: ; [ string>csv ] with-delimiter ; + http-get nip char: \; [ string>csv ] with-delimiter ; PRIVATE> diff --git a/libs/xml/tests/state-parser-tests.factor b/libs/xml/tests/state-parser-tests.factor index a857eb143d..9b5639dd12 100644 --- a/libs/xml/tests/state-parser-tests.factor +++ b/libs/xml/tests/state-parser-tests.factor @@ -13,6 +13,6 @@ in: xml.test.state [ "hello" ] [ "hello" [ take-rest ] string-parse ] unit-test [ 2 3 ] [ "12\n123" [ take-rest drop get-line get-column ] string-parse ] unit-test [ "hi" " how are you?" ] [ "hi how are you?" [ [ blank? ] take-until take-rest ] string-parse ] unit-test -[ "foo" ";bar" ] [ "foo;bar" [ char: ; take-char take-rest ] string-parse ] unit-test +[ "foo" ";bar" ] [ "foo;bar" [ char: \; take-char take-rest ] string-parse ] unit-test [ "foo " " bar" ] [ "foo and bar" [ "and" take-string take-rest ] string-parse ] unit-test [ "baz" ] [ " \n\t baz" [ pass-blank take-rest ] string-parse ] unit-test