jdk/src/jdk.jdi/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java
author weijun
Thu, 11 Dec 2014 15:23:02 +0800
changeset 27957 24b4e6082f19
parent 25859 3317bb8137f4
permissions -rw-r--r--
8055723: Replace concat String to append in StringBuilder parameters (dev) Reviewed-by: redestad, ulfzibis, weijun, prappo, igerasim, alanb Contributed-by: Otavio Santana <otaviojava@java.net>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
     2
 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    26
/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    27
/* JavaCCOptions: */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
package com.sun.tools.example.debug.expr;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    30
/** Token Manager Error. */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
public class TokenMgrError extends Error
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    34
  /**
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    35
   * The version identifier for this Serializable class.
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    36
   * Increment only if the <i>serialized</i> form of the
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    37
   * class changes.
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    38
   */
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    39
  private static final long serialVersionUID = 1L;
9520
99d378796e54 7029383: Refresh of non-client demos
nloodin
parents: 5506
diff changeset
    40
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    41
  /*
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    42
   * Ordinals for various reasons why an Error of this type can be thrown.
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    43
   */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    45
  /**
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    46
   * Lexical error occurred.
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    47
   */
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    48
  static final int LEXICAL_ERROR = 0;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    50
  /**
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    51
   * An attempt was made to create a second instance of a static token manager.
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    52
   */
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    53
  static final int STATIC_LEXER_ERROR = 1;
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    54
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    55
  /**
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    56
   * Tried to change to an invalid lexical state.
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    57
   */
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    58
  static final int INVALID_LEXICAL_STATE = 2;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    60
  /**
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    61
   * Detected (and bailed out of) an infinite loop in the token manager.
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    62
   */
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    63
  static final int LOOP_DETECTED = 3;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    65
  /**
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    66
   * Indicates the reason why the exception is thrown. It will have
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    67
   * one of the above 4 values.
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    68
   */
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    69
  int errorCode;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    71
  /**
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    72
   * Replaces unprintable characters by their escaped (or unicode escaped)
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    73
   * equivalents in the given string
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    74
   */
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    75
  protected static final String addEscapes(String str) {
24969
afa6934dd8e8 8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents: 22050
diff changeset
    76
    StringBuilder retval = new StringBuilder();
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    77
    char ch;
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    78
    for (int i = 0; i < str.length(); i++) {
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    79
      switch (str.charAt(i))
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    80
      {
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    81
        case 0 :
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    82
          continue;
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    83
        case '\b':
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    84
          retval.append("\\b");
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    85
          continue;
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    86
        case '\t':
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    87
          retval.append("\\t");
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    88
          continue;
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    89
        case '\n':
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    90
          retval.append("\\n");
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    91
          continue;
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    92
        case '\f':
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    93
          retval.append("\\f");
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    94
          continue;
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    95
        case '\r':
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    96
          retval.append("\\r");
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    97
          continue;
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    98
        case '\"':
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
    99
          retval.append("\\\"");
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   100
          continue;
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   101
        case '\'':
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   102
          retval.append("\\\'");
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   103
          continue;
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   104
        case '\\':
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   105
          retval.append("\\\\");
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   106
          continue;
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   107
        default:
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   108
          if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   109
            String s = "0000" + Integer.toString(ch, 16);
27957
24b4e6082f19 8055723: Replace concat String to append in StringBuilder parameters (dev)
weijun
parents: 25859
diff changeset
   110
            retval.append("\\u").append(s.substring(s.length() - 4, s.length()));
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   111
          } else {
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   112
            retval.append(ch);
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   113
          }
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   114
          continue;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
      }
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   116
    }
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   117
    return retval.toString();
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   118
  }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   120
  /**
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   121
   * Returns a detailed message for the Error when it is thrown by the
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   122
   * token manager to indicate a lexical error.
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   123
   * Parameters :
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   124
   *    EOFSeen     : indicates if EOF caused the lexical error
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   125
   *    curLexState : lexical state in which this error occurred
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   126
   *    errorLine   : line number when the error occurred
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   127
   *    errorColumn : column number when the error occurred
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   128
   *    errorAfter  : prefix that was seen before this error occurred
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   129
   *    curchar     : the offending character
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   130
   * Note: You can customize the lexical error message by modifying this method.
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   131
   */
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   132
  protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   133
    return("Lexical error at line " +
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   134
          errorLine + ", column " +
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   135
          errorColumn + ".  Encountered: " +
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   136
          (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   137
          "after : \"" + addEscapes(errorAfter) + "\"");
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   138
  }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   140
  /**
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   141
   * You can also modify the body of this method to customize your error messages.
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   142
   * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   143
   * of end-users concern, so you can return something like :
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   144
   *
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   145
   *     "Internal Error : Please file a bug report .... "
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   146
   *
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   147
   * from this method for such cases in the release version of your parser.
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   148
   */
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   149
  public String getMessage() {
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   150
    return super.getMessage();
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   151
  }
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   152
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   153
  /*
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   154
   * Constructors of various flavors follow.
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   155
   */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   157
  /** No arg constructor. */
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   158
  public TokenMgrError() {
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   159
  }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   161
  /** Constructor with message and reason. */
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   162
  public TokenMgrError(String message, int reason) {
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   163
    super(message);
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   164
    errorCode = reason;
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   165
  }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   167
  /** Full Constructor. */
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   168
  public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   169
    this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   170
  }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
}
22050
72e7501ac569 4660158: TTY: NumberFormatException while trying to set values by 'set' command
sla
parents: 21278
diff changeset
   172
/* JavaCC - OriginalChecksum=9b5d040f247411cad7f77688386c48e7 (do not edit this line) */