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

📄 csv.jflex.skel

📁 java操作excel的类
💻 SKEL
字号:
  /** This character denotes the end of file */  private static final int YYEOF = -1;  /** initial size of the lookahead buffer */--- private static final int YY_BUFFERSIZE = ...;  /** lexical states */---  lexical states, charmap  /**    * Per instance reference to the character map.   * This can be cloned and modified per instance if needed.   * It is initally set to the static value.   */  private char [] yycmap_instance = yycmap;  /* error codes */  private static final int YY_UNKNOWN_ERROR = 0;  private static final int YY_ILLEGAL_STATE = 1;  private static final int YY_NO_MATCH = 2;  private static final int YY_PUSHBACK_2BIG = 3;  /* error messages for the codes above */  private static final String YY_ERROR_MSG[] = {    "Unkown internal scanner error",    "Internal error: unknown state",    "Error: could not match input",    "Error: pushback value was too large"  };--- isFinal list  /** the input device */  private java.io.Reader yy_reader;  /** the current state of the DFA */  private int yy_state;  /** the current lexical state */  private int yy_lexical_state = YYINITIAL;  /** this buffer contains the current text to be matched and is      the source of the yytext() string */  private char yy_buffer[] = new char[YY_BUFFERSIZE];  /** the textposition at the last accepting state */  private int yy_markedPos;  /** the textposition at the last state to be included in yytext */  private int yy_pushbackPos;  /** the current text position in the buffer */  private int yy_currentPos;  /** startRead marks the beginning of the yytext() string in the buffer */  private int yy_startRead;  /** endRead marks the last character in the buffer, that has been read      from input */  private int yy_endRead;  /** yy_atEOF == true <=> the scanner is at the EOF */  private boolean yy_atEOF;--- user class code  /**   * 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.   */--- constructor declaration  /**   * Refills the input buffer.   *   * @return      <code>false</code>, iff there was new input.   *    * @exception   IOException  if any I/O-Error occurs   */  private boolean yy_refill() throws java.io.IOException {    /* first: make room (if you can) */    if (yy_startRead > 0) {      System.arraycopy(yy_buffer, yy_startRead,                        yy_buffer, 0,                        yy_endRead-yy_startRead);      /* translate stored positions */      yy_endRead-= yy_startRead;      yy_currentPos-= yy_startRead;      yy_markedPos-= yy_startRead;      yy_pushbackPos-= yy_startRead;      yy_startRead = 0;    }    /* is the buffer big enough? */    if (yy_currentPos >= yy_buffer.length) {      /* if not: blow it up */      char newBuffer[] = new char[yy_currentPos*2];      System.arraycopy(yy_buffer, 0, newBuffer, 0, yy_buffer.length);      yy_buffer = newBuffer;    }    /* finally: fill the buffer with new input */    int numRead = yy_reader.read(yy_buffer, yy_endRead,                                             yy_buffer.length-yy_endRead);    if (numRead < 0) {      return true;    }    else {      yy_endRead+= numRead;        return false;    }  }    /**   * Enters a new lexical state   *   * @param newState the new lexical state   */  private final void yybegin(int newState) {    yy_lexical_state = newState;  }  /**   * Returns the text matched by the current regular expression.   */  private final String yytext() {    return new String( yy_buffer, yy_startRead, yy_markedPos-yy_startRead );  }  /**   * Returns the length of the matched text region.   */  private final int yylength() {    return yy_markedPos-yy_startRead;  }  /**   * Reports an error that occured while scanning.   *   * In a wellformed scanner (no or only correct usage of    * yypushback(int) and a match-all fallback rule) this method    * will only be called with things that "Can't Possibly Happen".   * If this method is called, something is seriously wrong   * (e.g. a JFlex bug producing a faulty scanner etc.).   *   * Usual syntax/scanner level error handling should be done   * in error fallback rules.   *   * @param   errorCode  the code of the errormessage to display   */--- yy_ScanError declaration      String message;    try {      message = YY_ERROR_MSG[errorCode];    }    catch (ArrayIndexOutOfBoundsException e) {      message = YY_ERROR_MSG[YY_UNKNOWN_ERROR];    }--- throws clause  }   /**   * Pushes the specified amount of characters back into the input stream.   *   * They will be read again by then next call of the scanning method   *   * @param number  the number of characters to be read again.   *                This number must not be greater than yylength()!   */--- yypushback decl (contains yy_ScanError exception)    if ( number > yylength() )      yy_ScanError(YY_PUSHBACK_2BIG);    yy_markedPos -= number;  }--- yy_doEof  /**   * Resumes scanning until the next regular expression is matched,   * the end of input is encountered or an I/O-Error occurs.   *   * @return      the next token   * @exception   IOException  if any I/O-Error occurs   */--- yylex declaration    int yy_input;    int yy_action;    // cached fields:    int yy_currentPos_l;    int yy_startRead_l;    int yy_markedPos_l;    int yy_endRead_l = yy_endRead;    char [] yy_buffer_l = yy_buffer;    char [] yycmap_l = yycmap_instance;--- local declarations    while (true) {      yy_markedPos_l = yy_markedPos;--- start admin (line, char, col count)      yy_action = -1;      yy_startRead_l = yy_currentPos_l = yy_currentPos =                        yy_startRead = yy_markedPos_l;  --- start admin (lexstate etc)      yy_forAction: {        while (true) {    --- next input, line, col, char count, next transition, isFinal action            yy_action = yy_state;             yy_markedPos_l = yy_currentPos_l; --- line count update          }        }      }      // store back cached position      yy_markedPos = yy_markedPos_l;--- char count update      switch (yy_action) {--- actions        default:           if (yy_input == YYEOF && yy_startRead == yy_currentPos) {            yy_atEOF = true;--- eofvalue          }           else {--- no match          }      }    }  }--- main}

⌨️ 快捷键说明

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