]> gitweb.factorcode.org Git - factor.git/commit
regexp: try again to fix the issue with backslashes.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 21 Mar 2019 20:29:15 +0000 (13:29 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 21 Mar 2019 20:29:15 +0000 (13:29 -0700)
commit26abdf4a23def8a62513d60d96dade8554ef9c0e
tree407a113fec16b6e299d785f44c595b92f2ae9d4f
parentca9f74e9935a585422d90025b8c40a422694880f
regexp: try again to fix the issue with backslashes.

the new simple rule is inside R/ syntax all backslashes should be
escaped to allow easy regexp literal tokenization:

R/ [\/]/

but in the constructor <regexp> they shouldn't be:

"[/]" <regexp>

When the regexp is prettyprinted we make sure to visually escape the
backslashes in the raw regexp.
basis/globs/globs.factor
basis/regexp/parser/parser.factor
basis/regexp/prettyprint/prettyprint.factor
basis/regexp/regexp-tests.factor
basis/regexp/regexp.factor
basis/validators/validators.factor
extra/metar/metar.factor
extra/xkcd/xkcd.factor