On 23 August 2013 10:15, Tim Shen wrote: > These two patches are not logically relative, but the next patch is > based on this one. > > This patch of the regex scanner(or lexer) supports all styles > specified by N3376. It shall build an abstract layer of regex token > sequence, so that, ideally, the parser and executor do not need to > care which style they are handling. > > Originally _Scanner is a class in regex_compiler.{h,tcc}. Since it > could be a standlone module, I move it to regex_scanner.{h,tcc}. > > I try my best to reduce duplicated code and make the logic > clear(_M_escape_map and _M_spec_char help a lot). However, I'm still > worrying about potential unexpected behaviors, because it's not about > correctness, but about reading standards. > > More testcases are welcome! > > Thanks! > > PS: For personal reasons, I probably cannot make a response in several > days, but I'll try my best ;)
If this bootstraps and passes tests then it's OK. I would rearrange the ChangeLog, to put * include/bits/regex_executor.tcc: Don't use reference for submatch. after regex_scanner.tcc, so that the files the _Scanner is moved from come immediately before the files it is moved to, otherwise it reads like "move _Scanner from ... don't use reference ... here" which doesn't make much sense :-) Thanks.