⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sqltokenmaker.java

📁 具有不同语法高亮的编辑器实例
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
    "\1\0\13\6\6\0\2\6\12\0\21\6\1\0\1\136"+
    "\12\6\6\0\2\6\12\0\5\6\1\206\13\6\1\0"+
    "\13\6\6\0\2\6\12\0\11\6\1\332\7\6\1\0"+
    "\13\6\6\0\2\6\12\0\1\6\1\333\17\6\1\0"+
    "\13\6\6\0\2\6\12\0\15\6\1\252\3\6\1\0"+
    "\13\6\6\0\2\6\12\0\1\6\1\334\17\6\1\0"+
    "\13\6\6\0\2\6\12\0\1\335\20\6\1\0\13\6"+
    "\6\0\2\6\12\0\1\336\20\6\1\0\13\6\6\0"+
    "\2\6\12\0\12\6\1\104\6\6\1\0\13\6\6\0"+
    "\2\6\12\0\4\6\1\337\14\6\1\0\13\6\6\0"+
    "\2\6\12\0\5\6\1\136\13\6\1\0\13\6\6\0"+
    "\2\6\12\0\14\6\1\340\4\6\1\0\13\6\6\0"+
    "\2\6\12\0\4\6\1\206\14\6\1\0\13\6\6\0"+
    "\2\6\12\0\4\6\1\341\14\6\1\0\13\6\6\0"+
    "\2\6\12\0\17\6\1\342\1\6\1\0\13\6\6\0"+
    "\2\6\12\0\3\6\1\206\15\6\1\0\13\6\6\0"+
    "\2\6\12\0\3\6\1\343\15\6\1\0\13\6\6\0"+
    "\2\6\12\0\14\6\1\344\4\6\1\0\13\6\6\0"+
    "\2\6\12\0\4\6\1\345\12\6\1\325\1\6\1\0"+
    "\13\6\6\0\2\6\12\0\11\6\1\346\7\6\1\0"+
    "\13\6\6\0\2\6\12\0\1\347\20\6\1\0\13\6"+
    "\6\0\2\6\12\0\10\6\1\350\10\6\1\0\13\6"+
    "\6\0\2\6\12\0\10\6\1\351\10\6\1\0\13\6"+
    "\6\0\2\6\12\0\5\6\1\352\13\6\1\0\13\6"+
    "\6\0\2\6\12\0\5\6\1\353\13\6\1\0\13\6"+
    "\6\0\2\6\12\0\11\6\1\111\7\6\1\0\13\6"+
    "\6\0\2\6\12\0\16\6\1\354\2\6\1\0\13\6"+
    "\6\0\2\6\12\0\6\6\1\355\12\6\1\0\13\6"+
    "\6\0\2\6\12\0\3\6\1\356\15\6\1\0\13\6"+
    "\6\0\2\6\12\0\1\357\20\6\1\0\13\6\6\0"+
    "\2\6\12\0\15\6\1\143\3\6\1\0\13\6\6\0"+
    "\2\6\12\0\4\6\1\360\14\6\1\0\13\6\6\0"+
    "\2\6\12\0\4\6\1\361\14\6\1\0\13\6\6\0"+
    "\2\6\12\0\1\6\1\362\17\6\1\0\13\6\6\0"+
    "\2\6\12\0\12\6\1\206\6\6\1\0\13\6\6\0"+
    "\2\6\12\0\17\6\1\363\1\6\1\0\13\6\36\0"+
    "\1\364\26\0\2\6\12\0\5\6\1\365\13\6\1\0"+
    "\13\6\6\0\2\6\12\0\13\6\1\366\5\6\1\0"+
    "\13\6\6\0\2\6\12\0\21\6\1\0\6\6\1\367"+
    "\4\6\6\0\2\6\12\0\1\370\20\6\1\0\13\6"+
    "\6\0\2\6\12\0\21\6\1\0\1\371\12\6\6\0"+
    "\2\6\12\0\14\6\1\372\4\6\1\0\13\6\6\0"+
    "\2\6\12\0\1\373\20\6\1\0\13\6\27\0\1\374"+
    "\35\0\2\6\12\0\1\375\20\6\1\0\13\6\6\0"+
    "\2\6\12\0\5\6\1\166\13\6\1\0\13\6\6\0"+
    "\2\6\12\0\1\376\20\6\1\0\13\6\6\0\2\6"+
    "\12\0\15\6\1\377\3\6\1\0\13\6\6\0\2\6"+
    "\12\0\4\6\1\u0100\14\6\1\0\13\6\6\0\2\6"+
    "\12\0\14\6\1\u0101\4\6\1\0\13\6\6\0\2\6"+
    "\12\0\5\6\1\346\13\6\1\0\13\6\6\0\2\6"+
    "\12\0\10\6\1\136\10\6\1\0\13\6\6\0\2\6"+
    "\12\0\6\6\1\u0102\12\6\1\0\13\6\6\0\2\6"+
    "\12\0\14\6\1\116\4\6\1\0\13\6\6\0\2\6"+
    "\12\0\1\6\1\u0103\17\6\1\0\13\6\6\0\2\6"+
    "\12\0\3\6\1\u0104\15\6\1\0\13\6\6\0\2\6"+
    "\12\0\6\6\1\u0105\12\6\1\0\13\6\6\0\2\6"+
    "\12\0\1\101\20\6\1\0\13\6\6\0\2\6\12\0"+
    "\1\6\1\212\17\6\1\0\13\6\6\0\2\6\12\0"+
    "\21\6\1\0\3\6\1\u0106\7\6\6\0\2\6\12\0"+
    "\4\6\1\u0107\14\6\1\0\13\6\6\0\2\6\12\0"+
    "\1\u0108\20\6\1\0\13\6\6\0\2\6\12\0\14\6"+
    "\1\177\4\6\1\0\13\6\6\0\2\6\12\0\21\6"+
    "\1\0\6\6\1\136\4\6\6\0\2\6\12\0\14\6"+
    "\1\376\4\6\1\0\13\6\6\0\2\6\12\0\6\6"+
    "\1\u0109\12\6\1\0\13\6\6\0\2\6\12\0\5\6"+
    "\1\u010a\13\6\1\0\13\6\6\0\2\6\12\0\11\6"+
    "\1\132\7\6\1\0\13\6\6\0\2\6\12\0\21\6"+
    "\1\0\10\6\1\217\2\6\40\0\1\u010b\24\0\2\6"+
    "\12\0\1\6\1\u010c\17\6\1\0\13\6\6\0\2\6"+
    "\12\0\6\6\1\u010d\12\6\1\0\13\6\6\0\2\6"+
    "\12\0\1\u010e\20\6\1\0\13\6\6\0\2\6\12\0"+
    "\1\6\1\265\17\6\1\0\13\6\6\0\2\6\12\0"+
    "\6\6\1\252\12\6\1\0\13\6\6\0\2\6\12\0"+
    "\1\143\20\6\1\0\13\6\22\0\1\u010f\42\0\2\6"+
    "\12\0\1\6\1\143\17\6\1\0\13\6\6\0\2\6"+
    "\12\0\6\6\1\111\12\6\1\0\13\6\6\0\2\6"+
    "\12\0\1\u0110\20\6\1\0\13\6\6\0\2\6\12\0"+
    "\21\6\1\0\4\6\2\136\5\6\6\0\2\6\12\0"+
    "\21\6\1\0\6\6\1\143\4\6\6\0\2\6\12\0"+
    "\11\6\1\u0111\7\6\1\0\13\6\6\0\2\6\12\0"+
    "\10\6\1\206\10\6\1\0\13\6\6\0\2\6\12\0"+
    "\13\6\1\u0112\5\6\1\0\13\6\6\0\2\6\12\0"+
    "\11\6\1\u0113\7\6\1\0\13\6\6\0\2\6\12\0"+
    "\13\6\1\u0114\5\6\1\0\13\6\6\0\2\6\12\0"+
    "\1\6\1\u0115\17\6\1\0\13\6\6\0\2\6\12\0"+
    "\6\6\1\u0116\12\6\1\0\13\6\6\0\2\6\12\0"+
    "\11\6\1\166\7\6\1\0\13\6\6\0\2\6\12\0"+
    "\1\6\1\356\17\6\1\0\13\6\35\0\1\u0117\27\0"+
    "\2\6\12\0\11\6\1\u0118\7\6\1\0\13\6\6\0"+
    "\2\6\12\0\21\6\1\u0119\13\6\6\0\2\6\12\0"+
    "\5\6\1\u011a\13\6\1\0\13\6\23\0\1\u011b\41\0"+
    "\2\6\12\0\4\6\1\u011c\14\6\1\0\13\6\6\0"+
    "\2\6\12\0\5\6\1\u011d\13\6\1\0\13\6\6\0"+
    "\2\6\12\0\20\6\1\136\1\0\13\6\6\0\2\6"+
    "\12\0\4\6\1\u011e\14\6\1\0\13\6\6\0\2\6"+
    "\12\0\5\6\1\115\13\6\1\0\13\6\6\0\2\6"+
    "\12\0\15\6\1\104\3\6\1\0\13\6\6\0\2\6"+
    "\12\0\11\6\1\u011f\7\6\1\0\13\6\26\0\1\u0120"+
    "\36\0\2\6\12\0\11\6\1\u0121\7\6\1\0\13\6"+
    "\45\0\1\u0122\17\0\2\6\12\0\21\6\1\0\4\6"+
    "\1\136\2\6\1\136\3\6\26\0\1\u0123\36\0\2\6"+
    "\12\0\1\u0124\20\6\1\0\13\6\6\0\2\6\12\0"+
    "\1\u0125\20\6\1\0\13\6\6\0\2\6\12\0\5\6"+
    "\1\u0104\13\6\1\0\13\6\6\0\2\6\12\0\1\337"+
    "\20\6\1\0\13\6\6\0\2\6\12\0\1\u0126\20\6"+
    "\1\0\13\6\27\0\1\u0127\51\0\1\u0120\42\0\2\6"+
    "\12\0\5\6\1\337\13\6\1\0\13\6\6\0\2\6"+
    "\12\0\15\6\1\332\3\6\1\0\13\6\6\0\2\6"+
    "\12\0\10\6\1\337\10\6\1\0\13\6\36\0\1\u0128"+
    "\57\0\1\u0129\42\0\1\u012a\62\0\1\u012b\60\0\1\u0120"+
    "\31\0";

  private static int [] zzUnpackTrans() {
    int [] result = new int[13254];
    int offset = 0;
    offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
    return result;
  }

  private static int zzUnpackTrans(String packed, int offset, int [] result) {
    int i = 0;       /* index in packed string  */
    int j = offset;  /* index in unpacked array */
    int l = packed.length();
    while (i < l) {
      int count = packed.charAt(i++);
      int value = packed.charAt(i++);
      value--;
      do result[j++] = value; while (--count > 0);
    }
    return j;
  }


  /* error codes */
  private static final int ZZ_UNKNOWN_ERROR = 0;
  private static final int ZZ_NO_MATCH = 1;
  private static final int ZZ_PUSHBACK_2BIG = 2;

  /* error messages for the codes above */
  private static final String ZZ_ERROR_MSG[] = {
    "Unkown internal scanner error",
    "Error: could not match input",
    "Error: pushback value was too large"
  };

  /**
   * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
   */
  private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();

  private static final String ZZ_ATTRIBUTE_PACKED_0 =
    "\3\0\2\11\4\1\1\11\2\1\1\11\31\1\2\11"+
    "\2\1\1\11\2\1\1\11\1\1\1\0\106\1\2\11"+
    "\1\1\1\0\42\1\1\0\12\1\1\0\46\1\1\0"+
    "\7\1\1\0\34\1\1\0\7\1\1\0\16\1\1\0"+
    "\3\1\1\0\7\1\1\0\1\1\1\0\1\1\1\0"+
    "\4\1\1\11\1\1\2\0\3\1\5\0";

  private static int [] zzUnpackAttribute() {
    int [] result = new int[299];
    int offset = 0;
    offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
    return result;
  }

  private static int zzUnpackAttribute(String packed, int offset, int [] result) {
    int i = 0;       /* index in packed string  */
    int j = offset;  /* index in unpacked array */
    int l = packed.length();
    while (i < l) {
      int count = packed.charAt(i++);
      int value = packed.charAt(i++);
      do result[j++] = value; while (--count > 0);
    }
    return j;
  }

  /** the input device */
  private java.io.Reader zzReader;

  /** the current state of the DFA */
  private int zzState;

  /** the current lexical state */
  private int zzLexicalState = YYINITIAL;

  /** this buffer contains the current text to be matched and is
      the source of the yytext() string */
  private char zzBuffer[];

  /** the textposition at the last accepting state */
  private int zzMarkedPos;

  /** the textposition at the last state to be included in yytext */
  private int zzPushbackPos;

  /** the current text position in the buffer */
  private int zzCurrentPos;

  /** startRead marks the beginning of the yytext() string in the buffer */
  private int zzStartRead;

  /** endRead marks the last character in the buffer, that has been read
      from input */
  private int zzEndRead;

  /** number of newlines encountered up to the start of the matched text */
  private int yyline;

  /** the number of characters up to the start of the matched text */
  private int yychar;

  /**
   * the number of characters from the last newline up to the start of the 
   * matched text
   */
  private int yycolumn;

  /** 
   * zzAtBOL == true <=> the scanner is currently at the beginning of a line
   */
  private boolean zzAtBOL = true;

  /** zzAtEOF == true <=> the scanner is at the EOF */
  private boolean zzAtEOF;

  /* user code: */


/*****************************************************************************/


	/**
	 * Constructor.  This must be here because JFlex does not generate a
	 * no-parameter constructor.
	 */
	public SQLTokenMaker() {
		super();
	}


/*****************************************************************************/


	/**
	 * Adds the token specified to the current linked list of tokens.
	 *
	 * @param tokenType The token's type.
	 */
	private void addToken(int tokenType) {
		addToken(zzStartRead, zzMarkedPos-1, tokenType);
	}


/*****************************************************************************/


	/**
	 * Adds the token specified to the current linked list of tokens.
	 *
	 * @param tokenType The token's type.
	 */
	private void addToken(int start, int end, int tokenType) {
		int so = start + offsetShift;
		addToken(zzBuffer, start,end, tokenType, so);
	}


/*****************************************************************************/


	/**
	 * Adds the token specified to the current linked list of tokens.
	 *
	 * @param array The character array.
	 * @param start The starting offset in the array.
	 * @param end The ending offset in the array.
	 * @param tokenType The token's type.
	 * @param startOffset The offset in the document at which this token
	 *                    occurs.
	 */
	public void addToken(char[] array, int start, int end, int tokenType, int startOffset) {
		super.addToken(array, start,end, tokenType, startOffset);
		zzStartRead = zzMarkedPos;
	}


/*****************************************************************************/


	/**
	 * Returns the first token in the linked list of tokens generated
	 * from <code>text</code>.  This method must be implemented by
	 * subclasses so they can correctly implement syntax highlighting.
	 *
	 * @param text The text from which to get tokens.
	 * @param initialTokenType The token type we should start with.
	 * @param startOffset The offset into the document at which
	 *        <code>text</code> starts.
	 * @return The first <code>Token</code> in a linked list representing
	 *         the syntax highlighted text.
	 */
	public Token getTokenList(Segment text, int initialTokenType, int startOffset) {

		resetTokenList();
		this.offsetShift = -text.offset + startOffset;

		// Start off in the proper state.
		int state = Token.NULL;
		switch (initialTokenType) {
			case Token.LITERAL_STRING_DOUBLE_QUOTE:
				state = STRING;
				start = text.offset;
				break;
			case Token.LITERAL_CHAR:
				state = CHAR;
				start = text.offset;
				break;
			default:
				state = Token.NULL;
		}

		s = text;
		try {
			yyreset(zzReader);
			yybegin(state);
			return yylex();
		} catch (IOException ioe) {
			ioe.printStackTrace();
			return new DefaultToken();
		}

	}


/*****************************************************************************/


	/**
	 * Refills the input buffer.
	 *
	 * @return      <code>true</code> if EOF was reached, otherwise
	 *              <code>false</code>.
	 * @exception   IOException  if any I/O-Error occurs.
	 */
	private boolean zzRefill() throws java.io.IOException {
		return zzCurrentPos>=s.offset+s.count;
	}


/*****************************************************************************/


	/**
	 * Resets the scanner to read from a new input stream.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -