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

📄 sql92scanner.java

📁 java开源的企业总线.xmlBlaster
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/* The following code was generated by JFlex 1.4 on 5/25/04 8:43 PM *//*------------------------------------------------------------------------------Name:      Sql92Scanner.flexProject:   xmlBlaster.orgCopyright: xmlBlaster.org, see xmlBlaster-LICENSE file------------------------------------------------------------------------------*//*  To manually create it (without ant): > jflex Sql92Scanner.flex  and then after the CUP parser has been created   > javac Sql92Scanner.java*/   /* ----------------------------- Usercode Section ---------------------------- */   package org.xmlBlaster.util.lexical;import java_cup.runtime.*;import java_cup.sym;import org.xmlBlaster.util.qos.ClientProperty;import org.xmlBlaster.util.Global;import java.util.logging.Logger;import java.util.logging.Level;      /** * This class is a scanner generated by  * <a href="http://www.jflex.de/">JFlex</a> 1.4 * on 5/25/04 8:43 PM from the specification file * <tt>./src/java/org/xmlBlaster/util/lexical/Sql92Scanner.flex</tt> */class Sql92Scanner implements java_cup.runtime.Scanner {  /** This character denotes the end of file */  public static final int YYEOF = -1;  /** initial size of the lookahead buffer */  private static final int ZZ_BUFFERSIZE = 16384;  /** lexical states */  public static final int CONST_STRING = 1;  public static final int YYINITIAL = 0;  /**    * Translates characters to character classes   */  private static final char [] ZZ_CMAP = {     0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  2,  0,  3,  1,  0,  0,      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,      3, 24,  0,  0,  0,  0,  0,  6, 13, 14, 11, 10, 15,  9,  7, 12,      5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  0, 38, 22, 21, 23,  0,      0, 16, 26, 33, 18, 27,  4, 36,  4, 29,  4, 32, 31,  4, 17, 19,     34,  4, 20, 30, 25, 35,  4, 28, 37,  4,  4,  0,  0,  0, 24,  4,      0,  4,  4,  4,  4,  8,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,      4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  0,  0,  0,  0,  0  };  /**    * Translates DFA states to action switch labels.   */  private static final int [] ZZ_ACTION = zzUnpackAction();  private static final String ZZ_ACTION_PACKED_0 =    "\2\0\1\1\2\2\1\3\1\4\1\5\1\1\1\6"+    "\1\7\1\10\1\11\1\12\1\13\1\14\4\3\1\15"+    "\1\16\1\17\1\1\4\3\1\20\1\21\1\22\1\4"+    "\1\0\3\3\1\23\1\3\1\24\1\25\1\26\2\3"+    "\1\27\1\30\1\3\1\4\1\0\1\31\1\32\5\3"+    "\1\33\3\3\1\34\1\35\3\3\1\36\1\37";  private static int [] zzUnpackAction() {    int [] result = new int[66];    int offset = 0;    offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);    return result;  }  private static int zzUnpackAction(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;  }  /**    * Translates a state to a row index in the transition table   */  private static final int [] ZZ_ROWMAP = zzUnpackRowMap();  private static final String ZZ_ROWMAP_PACKED_0 =    "\0\0\0\47\0\116\0\165\0\116\0\234\0\303\0\116"+    "\0\352\0\116\0\116\0\116\0\116\0\116\0\116\0\116"+    "\0\u0111\0\u0138\0\u015f\0\u0186\0\u01ad\0\u01d4\0\116\0\u01fb"+    "\0\u0222\0\u0249\0\u0270\0\u0297\0\116\0\u02be\0\116\0\u02e5"+    "\0\u030c\0\u0333\0\u035a\0\u0381\0\234\0\u03a8\0\116\0\116"+    "\0\116\0\u03cf\0\u03f6\0\234\0\234\0\u041d\0\u0444\0\u0444"+    "\0\234\0\234\0\u046b\0\u0492\0\u04b9\0\u04e0\0\u0507\0\234"+    "\0\u052e\0\u0555\0\u057c\0\234\0\234\0\u05a3\0\u05ca\0\u05f1"+    "\0\234\0\234";  private static int [] zzUnpackRowMap() {    int [] result = new int[66];    int offset = 0;    offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);    return result;  }  private static int zzUnpackRowMap(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 high = packed.charAt(i++) << 16;      result[j++] = high | packed.charAt(i++);    }    return j;  }  /**    * The transition table of the DFA   */  private static final int [] ZZ_TRANS = zzUnpackTrans();  private static final String ZZ_TRANS_PACKED_0 =    "\1\3\1\4\2\5\1\6\1\7\1\10\1\11\1\6"+    "\1\12\1\13\1\14\1\15\1\16\1\17\1\20\1\21"+    "\1\22\1\6\1\23\1\24\1\25\1\26\1\27\1\30"+    "\1\6\1\31\1\32\1\6\1\33\1\6\1\34\6\6"+    "\1\35\1\36\2\3\3\36\1\37\40\36\51\0\1\5"+    "\50\0\2\6\2\0\1\6\7\0\5\6\4\0\15\6"+    "\6\0\1\7\1\0\1\40\1\41\22\0\1\41\20\0"+    "\1\40\45\0\2\6\2\0\1\6\7\0\1\6\1\42"+    "\3\6\4\0\15\6\5\0\2\6\2\0\1\6\7\0"+    "\3\6\1\43\1\6\4\0\12\6\1\44\2\6\5\0"+    "\2\6\2\0\1\6\7\0\4\6\1\45\4\0\15\6"+    "\5\0\2\6\2\0\1\6\7\0\5\6\4\0\2\6"+    "\1\46\12\6\30\0\1\47\44\0\1\50\1\0\1\51"+    "\44\0\1\51\25\0\2\6\2\0\1\6\7\0\5\6"+    "\4\0\2\6\1\52\12\6\5\0\2\6\2\0\1\6"+    "\7\0\5\6\4\0\5\6\1\53\7\6\5\0\2\6"+    "\2\0\1\6\7\0\1\6\1\54\3\6\4\0\5\6"+    "\1\55\7\6\5\0\2\6\2\0\1\6\7\0\5\6"+    "\4\0\4\6\1\56\10\6\1\0\1\36\2\0\3\36"+    "\1\0\40\36\5\0\1\40\2\0\1\41\22\0\1\41"+    "\20\0\1\57\3\0\2\60\40\0\2\6\2\0\1\6"+    "\7\0\2\6\1\61\2\6\4\0\15\6\5\0\2\6"+    "\2\0\1\6\7\0\5\6\4\0\1\62\14\6\5\0"+    "\2\6\2\0\1\6\7\0\5\6\4\0\6\6\1\63"+    "\6\6\5\0\2\6\2\0\1\6\7\0\5\6\4\0"+    "\13\6\1\64\1\6\5\0\2\6\2\0\1\6\7\0"+    "\5\6\4\0\1\65\14\6\5\0\2\6\2\0\1\6"+    "\7\0\5\6\4\0\10\6\1\66\4\6\5\0\2\6"+    "\2\0\1\6\7\0\5\6\4\0\7\6\1\67\5\6"+    "\6\0\1\57\45\0\2\6\2\0\1\6\7\0\5\6"+    "\4\0\6\6\1\70\6\6\5\0\2\6\2\0\1\6"+    "\7\0\5\6\4\0\2\6\1\71\12\6\5\0\2\6"+    "\2\0\1\6\7\0\5\6\4\0\3\6\1\72\11\6"+    "\5\0\2\6\2\0\1\6\7\0\1\73\4\6\4\0"+    "\15\6\5\0\2\6\2\0\1\6\7\0\5\6\4\0"+    "\2\6\1\74\12\6\5\0\2\6\2\0\1\6\7\0"+    "\5\6\4\0\14\6\1\75\5\0\2\6\2\0\1\6"+    "\7\0\5\6\4\0\2\6\1\76\12\6\5\0\2\6"+    "\2\0\1\6\7\0\5\6\4\0\11\6\1\77\3\6"+    "\5\0\2\6\2\0\1\6\7\0\5\6\4\0\2\6"+    "\1\100\12\6\5\0\2\6\2\0\1\6\7\0\5\6"+    "\4\0\2\6\1\101\12\6\5\0\2\6\2\0\1\6"+    "\7\0\1\6\1\102\3\6\4\0\15\6\1\0";  private static int [] zzUnpackTrans() {    int [] result = new int[1560];    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 =    "\2\0\1\11\1\1\1\11\2\1\1\11\1\1\7\11"+    "\6\1\1\11\5\1\1\11\1\1\1\11\1\1\1\0"+    "\5\1\3\11\6\1\1\0\22\1";  private static int [] zzUnpackAttribute() {    int [] result = new int[66];    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[] = new char[ZZ_BUFFERSIZE];  /** 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;  /** denotes if the user-EOF-code has already been executed */  private boolean zzEOFDone;  /* user code: */    /**     * This must be filled to be determined     */    private final static String ME = "Sql92Scanner";        /** The client properties on which to do the query. These are set on each query */    private java.util.Map properties;    /** A placeholder for the string constants */    private StringBuffer stringBf = new StringBuffer();    private Global global;   private static Logger log = Logger.getLogger(Sql92Scanner.class.getName());        /** A buffer used only for logging purposes (active only when TRACE is on) */    private StringBuffer logBuffer = new StringBuffer();    /**     * This is the constructor which we need to use in xmlBlaster.     */     public Sql92Scanner(Global global) {        super();        this.global = global;        if (log.isLoggable(Level.FINER)) this.log.finer("Constructor");     }     /**      * Sets the client properties for a querty. Note that the code is not threadsafe.       * The invoker must ensure threadsafety.      */     public void setClientPropertyMap(java.util.Map clientProperties) {        this.properties = clientProperties;     }    /* To create a new java_cup.runtime.Symbol with information about       the current token, the token will have no value in this       case. */    private Symbol symbol(int type) {        return new Symbol(type, yyline, yycolumn);    }        /* Also creates a new java_cup.runtime.Symbol with information       about the current token, but this object has a value. */    private Symbol symbol(int type, Object value) {        return new Symbol(type, yyline, yycolumn, value);    }    /**     * Helper method to retrieve a particular client property. If the property has not     * been found in the map, then a NULL_OBJECT symbol is returned. The type of this     * object is not determined here. It is handled syntactically in the parser.     */    private Symbol symbolFromProperty(String propertyName) {       ClientProperty clientProperty = null;       if (properties != null) clientProperty = (ClientProperty)properties.get(propertyName);       if (clientProperty == null) {          return symbol(Sql92Symbols.NULL_OBJECT, null);       }          String str = clientProperty.getStringValue();       if (log.isLoggable(Level.FINE)) this.logBuffer.append(propertyName).append("(").append(str).append(")");       if (clientProperty.isStringType()) {          return symbol(Sql92Symbols.STRING, str);       }       return symbol(Sql92Symbols.NUMBER, new Double(str));    }  /**   * Creates a new scanner   * There is also a java.io.InputStream version of this constructor.   *   * @param   in  the java.io.Reader to read input from.   */  Sql92Scanner(java.io.Reader in) {    this.zzReader = in;  }  /**   * Creates a new scanner.   * There is also java.io.Reader version of this constructor.   *   * @param   in  the java.io.Inputstream to read input from.   */  Sql92Scanner(java.io.InputStream in) {    this(new java.io.InputStreamReader(in));  }  /**   * Refills the input buffer.   *   * @return      <code>false</code>, iff there was new input.   *    * @exception   java.io.IOException  if any I/O-Error occurs   */  private boolean zzRefill() throws java.io.IOException {    /* first: make room (if you can) */    if (zzStartRead > 0) {      System.arraycopy(zzBuffer, zzStartRead,                       zzBuffer, 0,                       zzEndRead-zzStartRead);      /* translate stored positions */      zzEndRead-= zzStartRead;      zzCurrentPos-= zzStartRead;      zzMarkedPos-= zzStartRead;      zzPushbackPos-= zzStartRead;      zzStartRead = 0;    }    /* is the buffer big enough? */    if (zzCurrentPos >= zzBuffer.length) {      /* if not: blow it up */      char newBuffer[] = new char[zzCurrentPos*2];      System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);      zzBuffer = newBuffer;    }    /* finally: fill the buffer with new input */    int numRead = zzReader.read(zzBuffer, zzEndRead,                                            zzBuffer.length-zzEndRead);    if (numRead < 0) {

⌨️ 快捷键说明

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