1 /*
   2  * Permission is hereby granted, free of charge, to any person obtaining a copy of
   3  * this software and associated documentation files (the "Software"), to deal in
   4  * the Software without restriction, including without limitation the rights to
   5  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
   6  * of the Software, and to permit persons to whom the Software is furnished to do
   7  * so, subject to the following conditions:
   8  *
   9  * The above copyright notice and this permission notice shall be included in all
  10  * copies or substantial portions of the Software.
  11  *
  12  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  13  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  14  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  15  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  16  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  17  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  18  * SOFTWARE.
  19  */
  20 package jdk.nashorn.internal.runtime.regexp.joni.exception;
  21 
  22 @SuppressWarnings("javadoc")
  23 public interface ErrorMessages {
  24 
  25     /* from jcodings */
  26     final String ERR_INVALID_CODE_POINT_VALUE = "invalid code point value";
  27     final String ERR_TOO_BIG_WIDE_CHAR_VALUE = "too big wide-char value";
  28     final String ERR_TOO_LONG_WIDE_CHAR_VALUE = "too long wide-char value";
  29 
  30     /* internal error */
  31     final String ERR_PARSER_BUG = "internal parser error (bug)";
  32     final String ERR_UNDEFINED_BYTECODE = "undefined bytecode (bug)";
  33     final String ERR_UNEXPECTED_BYTECODE = "unexpected bytecode (bug)";
  34 
  35     /* syntax error */
  36     final String ERR_END_PATTERN_AT_LEFT_BRACE = "end pattern at left brace";
  37     final String ERR_END_PATTERN_AT_LEFT_BRACKET = "end pattern at left bracket";
  38     final String ERR_EMPTY_CHAR_CLASS = "empty char-class";
  39     final String ERR_PREMATURE_END_OF_CHAR_CLASS = "premature end of char-class";
  40     final String ERR_END_PATTERN_AT_ESCAPE = "end pattern at escape";
  41     final String ERR_END_PATTERN_AT_META = "end pattern at meta";
  42     final String ERR_END_PATTERN_AT_CONTROL = "end pattern at control";
  43     final String ERR_META_CODE_SYNTAX = "invalid meta-code syntax";
  44     final String ERR_CONTROL_CODE_SYNTAX = "invalid control-code syntax";
  45     final String ERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE = "char-class value at end of range";
  46     final String ERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS = "unmatched range specifier in char-class";
  47     final String ERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED = "target of repeat operator is not specified";
  48     final String ERR_TARGET_OF_REPEAT_OPERATOR_INVALID = "target of repeat operator is invalid";
  49     final String ERR_UNMATCHED_CLOSE_PARENTHESIS = "unmatched close parenthesis";
  50     final String ERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS = "end pattern with unmatched parenthesis";
  51     final String ERR_END_PATTERN_IN_GROUP = "end pattern in group";
  52     final String ERR_UNDEFINED_GROUP_OPTION = "undefined group option";
  53     final String ERR_INVALID_POSIX_BRACKET_TYPE = "invalid POSIX bracket type";
  54     final String ERR_INVALID_LOOK_BEHIND_PATTERN = "invalid pattern in look-behind";
  55     final String ERR_INVALID_REPEAT_RANGE_PATTERN = "invalid repeat range {lower,upper}";
  56 
  57     /* values error (syntax error) */
  58     final String ERR_TOO_BIG_NUMBER = "too big number";
  59     final String ERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE = "too big number for repeat range";
  60     final String ERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE = "upper is smaller than lower in repeat range";
  61     final String ERR_EMPTY_RANGE_IN_CHAR_CLASS = "empty range in char class";
  62     final String ERR_TOO_MANY_MULTI_BYTE_RANGES = "too many multibyte code ranges are specified";
  63     final String ERR_TOO_SHORT_MULTI_BYTE_STRING = "too short multibyte code string";
  64     final String ERR_INVALID_BACKREF = "invalid backref number";
  65     final String ERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED = "numbered backref/call is not allowed. (use name)";
  66     final String ERR_EMPTY_GROUP_NAME = "group name is empty";
  67     final String ERR_INVALID_GROUP_NAME = "invalid group name <%n>";
  68     final String ERR_INVALID_CHAR_IN_GROUP_NAME = "invalid char in group number <%n>";
  69     final String ERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY = "group number is too big for capture history";
  70     final String ERR_INVALID_COMBINATION_OF_OPTIONS = "invalid combination of options";
  71 
  72 }