This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch 1/2] Rewrite regex scanner


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 ;)


-- 
Tim Shen

Attachment: scanner.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]