public static Keyword computeSymbolEscapeCode(String name, boolean casesensitiveP) {
    { String table = (casesensitiveP ? Stella.$CASE_SENSITIVE_SYMBOL_ESCAPE_CODE_TABLE$ : Stella.$SYMBOL_ESCAPE_CODE_TABLE$);
      int escapecode = 0;
      int maxescapecode = 0;
      boolean firstcharP = true;
      boolean couldbenumberP = true;

      { char ch = Stella.NULL_CHARACTER;
        String vector000 = name;
        int index000 = 0;
        int length000 = vector000.length();

        for (;index000 < length000; index000 = index000 + 1) {
          ch = vector000.charAt(index000);
          escapecode = (int) (table.charAt(((int) ch)));
          if (escapecode == 0) {
            if (couldbenumberP &&
                ((!(ch == 'E')) &&
                 (!(ch == 'e')))) {
              couldbenumberP = false;
            }
          }
          else if (firstcharP) {
            maxescapecode = escapecode;
            couldbenumberP = escapecode == 1;
          }
          else {
            if ((escapecode > 1) &&
                (escapecode > maxescapecode)) {
              maxescapecode = escapecode;
            }
          }
          firstcharP = false;
        }
      }
      if (firstcharP) {
        return (Stella.KWD_ESCAPED);
      }
      else {
        switch (maxescapecode) {
          case 0: 
            return (Stella.KWD_UNESCAPED);
          case 1: 
            if (couldbenumberP) {
              { TokenizerTable tok_table_ = Stella.$STELLA_TOKENIZER_TABLE$;
                String tok_transitions_ = tok_table_.transitions;
                edu.isi.stella.Stella_Object[] tok_statenames_ = tok_table_.stateNames.theArray;
                int tok_tokenstart_ = -1;
                boolean tok_endoftokensP_ = false;
                TokenizerStreamState tok_streamstate_ = null;
                char[] tok_buffer_ = name.toCharArray();
                int tok_state_ = 1;
                int tok_nextstate_ = tok_state_;
                int tok_cursor_ = 0;
                int tok_size_ = name.length();
                int tok_end_ = tok_size_;

                {
                  tok_statenames_ = tok_statenames_;
                  tok_endoftokensP_ = tok_endoftokensP_;
                }
                tok_streamstate_ = tok_streamstate_;
                { edu.isi.stella.Stella_Object[] tok_stellalogicalstatenames_ = Stella.$STELLA_LOGICAL_STATE_NAMES$.theArray;
                  Keyword tok_stellalogicalstatename_ = null;

                  {
                    {
                      tok_tokenstart_ = -1;
                      loop001 : for (;;) {
                        if (tok_cursor_ == tok_end_) {
                          if (tok_nextstate_ == -1) {
                            tok_endoftokensP_ = true;
                          }
                          else if (BooleanWrapper.coerceWrappedBooleanToBoolean(((BooleanWrapper)((tok_table_.legalEofStates.theArray)[tok_state_])))) {
                            tok_nextstate_ = -1;
                            if (tok_tokenstart_ == -1) {
                              tok_endoftokensP_ = true;
                            }
                          }
                          else {
                            tok_state_ = 0;
                            tok_nextstate_ = -1;
                          }
                          break loop001;
                        }
                        tok_nextstate_ = (int) (tok_transitions_.charAt(((((tok_state_ << 8)) | ((int) (((char) (0x00ff & tok_buffer_[tok_cursor_]))))))));
                        if ((tok_nextstate_ & 128) == 0) {
                          tok_state_ = tok_nextstate_;
                          tok_cursor_ = tok_cursor_ + 1;
                        }
                        else if (tok_tokenstart_ == -1) {
                          if ((tok_nextstate_ & 64) == 0) {
                            tok_tokenstart_ = tok_cursor_;
                          }
                          tok_state_ = (tok_nextstate_ & 63);
                          tok_cursor_ = tok_cursor_ + 1;
                        }
                        else {
                          break loop001;
                        }
                      }
                      if (tok_streamstate_ != null) {
                        tok_streamstate_.cursor = tok_cursor_;
                        tok_streamstate_.table = tok_table_;
                        tok_streamstate_.state = tok_state_;
                      }
                    }
                    tok_stellalogicalstatename_ = ((Keyword)(tok_stellalogicalstatenames_[tok_state_]));
                  }
                  if (tok_stellalogicalstatename_ == Stella.KWD_SYMBOL) {
                    couldbenumberP = false;
                  }
                }
              }
            }
            if (couldbenumberP) {
              return (Stella.KWD_ESCAPED);
            }
            else {
              return (Stella.KWD_UNESCAPED);
            }
          case 2: 
            if ((name.charAt(0) == '/') &&
                Stella.stringEqlP(name, "/")) {
              return (Stella.KWD_UNESCAPED);
            }
            else {
              return (Stella.KWD_ESCAPED);
            }
          case 3: 
            return (Stella.KWD_COMPLEX_ESCAPED);
          default:
            { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

              stream000.nativeStream.print("`" + maxescapecode + "' is not a valid case option");
              throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
            }
        }
      }
    }
  }