diff options
author | Howard Hinnant <hhinnant@apple.com> | 2010-06-24 21:28:00 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2010-06-24 21:28:00 +0000 |
commit | 24e98486a3b6076bfa1b5fac5c2be0ec264d10c9 (patch) | |
tree | 3bab4b034474b5f1b8073e45e22b6a95483c3082 /libcxx/src | |
parent | 2b87d44c5de111da0389f832e7311101f61e6a55 (diff) | |
download | bcm5719-llvm-24e98486a3b6076bfa1b5fac5c2be0ec264d10c9.tar.gz bcm5719-llvm-24e98486a3b6076bfa1b5fac5c2be0ec264d10c9.zip |
Continuing to work through regex, and updated libcxx_by_chapter.pdf with weekly test results
llvm-svn: 106790
Diffstat (limited to 'libcxx/src')
-rw-r--r-- | libcxx/src/regex.cpp | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/libcxx/src/regex.cpp b/libcxx/src/regex.cpp index abb1b66853c..9cc6eb543b2 100644 --- a/libcxx/src/regex.cpp +++ b/libcxx/src/regex.cpp @@ -20,33 +20,40 @@ make_error_type_string(regex_constants::error_type ecode) switch (ecode) { case regex_constants::error_collate: - return "error_collate"; + return "The expression contained an invalid collating element name."; case regex_constants::error_ctype: - return "error_ctype"; + return "The expression contained an invalid character class name."; case regex_constants::error_escape: - return "error_escape"; + return "The expression contained an invalid escaped character, or a " + "trailing escape."; case regex_constants::error_backref: - return "error_backref"; + return "The expression contained an invalid back reference."; case regex_constants::error_brack: - return "error_brack"; + return "The expression contained mismatched [ and ]."; case regex_constants::error_paren: - return "error_paren"; + return "The expression contained mismatched ( and )."; case regex_constants::error_brace: - return "error_brace"; + return "The expression contained mismatched { and }."; case regex_constants::error_badbrace: - return "error_badbrace"; + return "The expression contained an invalid range in a {} expression."; case regex_constants::error_range: - return "error_range"; + return "The expression contained an invalid character range, " + "such as [b-a] in most encodings."; case regex_constants::error_space: - return "error_space"; + return "There was insufficient memory to convert the expression into " + "a finite state machine."; case regex_constants::error_badrepeat: - return "error_badrepeat"; + return "One of *?+{ was not preceded by a valid regular expression."; case regex_constants::error_complexity: - return "error_complexity"; + return "The complexity of an attempted match against a regular " + "expression exceeded a pre-set level."; case regex_constants::error_stack: - return "error_stack"; + return "There was insufficient memory to determine whether the regular " + "expression could match the specified character sequence."; + default: + break; } - return "unknown error_type"; + return "Unknown error type"; } regex_error::regex_error(regex_constants::error_type ecode) |