Debian Codegraph @

TODO

raw
1 # -*- mode: org -*-
2
3 * Use ExtUtils::CppGuess's C++11 support, rather than doing it ourselves
4 (Probably needs some fixes in CppGuess for some platforms I tried though)
5
6 * Fix UTF-8 support
7 This turns out to be harder than I was thinking. The first step is to compile
8 two versions of the regexp, one for matching UTF-8 and one for matching
9 Latin1 (maybe on demand).
10
11 RE2 won't accept \x{...} escapes that are greater than the current character
12 set. I was hoping it would be possible to give a string containing these to
13 RE2 then let RE2 realise part of it won't match (e.g. (?:foo|\x{1234}) will
14 still match foo, even if the input string isn't UTF-8).
15
16 (I'm only talking about \x{...}; this is the only case I have to
17 care about, \p{...} *are* accepted by RE2 regardless. Due to Perl's
18 behaviour we can't have raw UTF-8 in the string if the UTF-8 flag
19 isn't on.)
20
21 The approach for now will probably be to replace \x{nnn} in strings (where
22 nnn>0xFF) with something that won't match (maybe [^\x00-\xff]), but allows
23 the other branches to match.
24 ** Think about supporting perl 5.14's unicode regexp flags
25 At least at the top level, implementing within RE2 would be silly.
26
27 RE2 doesn't have all the behaviours perl does (i.e. /a is implied
28 for \d, etc.). Might just be a case of documenting what RE2 does,
29 once UTF-8 is working to some extent. An alternative could be to
30 make things explicit (e.g. you need to say "no feature
31 'unicode_strings'" if you happen to have enabled them to use RE2).
32 * Support more options
33 ** never_nl could be useful for cpangrep optimisations
34 * Support RE2::Set functionality
35 i.e. a Regexp::RE2::Set class that can have RE2 regexps added into it
36 then a match method.
37 * Improve tests
38 ** Improve performance comparisons
39 See maybe https://github.com/axiak/pyre2/blob/master/tests/performance.py
40 * Support /x (probably needs RE2 changes to do properly)
41 * Both Perl and RE2 store the stringification of the regexp, can we avoid this?