📄 tablescanner.java
字号:
/* The following code was generated by JFlex 1.3.5 on 6/24/02 4:30 PM *//* * Scanner.jflex * * Lexer for the Table format * * See LICENSE file for license conditions. */package residue.tables;import java_cup.runtime.*;/** * This class is a scanner generated by * <a href="http://www.jflex.de/">JFlex</a> 1.3.5 * on 6/24/02 4:30 PM from the specification file * <tt>file:/home/chowells/work/Gretel/residue/tables/Scanner.jflex</tt> */class TableScanner implements java_cup.runtime.Scanner { /** This character denotes the end of file */ final public static int YYEOF = -1; /** initial size of the lookahead buffer */ final private static int YY_BUFFERSIZE = 16384; /** lexical states */ final public static int STRING = 1; final public static int YYINITIAL = 0; /** * Translates characters to character classes */ final private static String yycmap_packed = "\11\0\1\26\1\26\2\0\1\26\22\0\1\12\1\0\1\25\12\0"+ "\1\1\2\0\12\2\1\0\1\24\5\0\6\30\24\0\1\3\1\27"+ "\1\17\3\0\1\30\1\7\1\14\1\11\1\10\1\20\4\0\1\15"+ "\1\13\1\0\1\21\1\6\1\4\1\0\1\5\1\16\1\23\1\22"+ "\uff8a\0"; /** * Translates characters to character classes */ final private static char [] yycmap = yy_unpack_cmap(yycmap_packed); /** * Translates a state to a row index in the transition table */ final private static int yy_rowMap [] = { 0, 25, 50, 75, 75, 100, 125, 50, 50, 150, 50, 175, 200, 225, 250, 275, 50, 50, 300, 325, 350, 375, 400, 425, 450, 475, 500, 525, 550, 575, 600, 625, 650, 50, 675, 700, 725, 750, 775, 800, 825, 850, 875, 900, 925, 950, 975, 1000, 1025, 1050, 1075, 1100, 1125, 1150, 1175, 1200, 1225, 50, 50, 1250, 1275, 1300, 1325, 50 }; /** * The packed transition table of the DFA (part 0) */ final private static String yy_packed0 = "\1\3\1\4\1\5\1\6\6\3\1\7\11\3\1\10"+ "\1\11\1\7\2\3\25\12\1\13\1\12\1\14\1\12"+ "\33\0\1\5\32\0\1\15\1\16\10\0\1\17\24\0"+ "\1\7\13\0\1\7\2\0\25\12\1\0\1\12\1\0"+ "\1\12\22\0\1\20\2\0\1\21\1\0\1\22\6\0"+ "\1\23\33\0\1\24\26\0\1\25\24\0\1\26\4\0"+ "\3\26\2\0\1\26\3\0\1\26\7\0\1\26\6\0"+ "\1\27\42\0\1\30\32\0\1\31\10\0\1\32\4\0"+ "\3\32\2\0\1\32\3\0\1\32\7\0\1\32\7\0"+ "\1\33\31\0\1\34\25\0\1\35\25\0\1\36\4\0"+ "\3\36\2\0\1\36\3\0\1\36\7\0\1\36\10\0"+ "\1\37\25\0\1\40\37\0\1\41\16\0\1\42\4\0"+ "\3\42\2\0\1\42\3\0\1\42\7\0\1\42\11\0"+ "\1\43\27\0\1\44\30\0\1\45\32\0\1\46\37\0"+ "\1\47\21\0\1\50\25\0\1\51\35\0\1\52\21\0"+ "\1\53\36\0\1\54\25\0\1\55\26\0\1\56\30\0"+ "\1\57\33\0\1\60\25\0\1\61\36\0\1\62\26\0"+ "\1\63\41\0\1\64\22\0\1\65\22\0\1\66\37\0"+ "\1\67\30\0\1\70\25\0\1\71\34\0\1\72\30\0"+ "\1\73\17\0\1\74\36\0\1\75\31\0\1\76\31\0"+ "\1\77\31\0\1\100\11\0"; /** * The transition table of the DFA */ final private static int yytrans [] = yy_unpack(); /* error codes */ final private static int YY_UNKNOWN_ERROR = 0; final private static int YY_ILLEGAL_STATE = 1; final private static int YY_NO_MATCH = 2; final private static int YY_PUSHBACK_2BIG = 3; /* error messages for the codes above */ final private static String YY_ERROR_MSG[] = { "Unkown internal scanner error", "Internal error: unknown state", "Error: could not match input", "Error: pushback value was too large" }; /** * YY_ATTRIBUTE[aState] contains the attributes of state <code>aState</code> */ private final static byte YY_ATTRIBUTE[] = { 0, 0, 9, 1, 1, 1, 1, 9, 9, 1, 9, 1, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 9 }; /** 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; /** 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; /** * yy_atBOL == true <=> the scanner is currently at the beginning of a line */ private boolean yy_atBOL = true; /** yy_atEOF == true <=> the scanner is at the EOF */ private boolean yy_atEOF; /** denotes if the user-EOF-code has already been executed */ private boolean yy_eof_done; /* user code: */ private StringBuffer sb = new StringBuffer(); /** * 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. */ TableScanner(java.io.Reader in) { this.yy_reader = 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. */ TableScanner(java.io.InputStream in) { this(new java.io.InputStreamReader(in)); } /** * Unpacks the split, compressed DFA transition table. * * @return the unpacked transition table */ private static int [] yy_unpack() { int [] trans = new int[1350]; int offset = 0; offset = yy_unpack(yy_packed0, offset, trans); return trans; } /** * Unpacks the compressed DFA transition table. * * @param packed the packed transition table * @return the index of the last entry */ private static int yy_unpack(String packed, int offset, int [] trans) { 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 trans[j++] = value; while (--count > 0); } return j; } /** * Unpacks the compressed character translation table. * * @param packed the packed character translation table * @return the unpacked character translation table */ private static char [] yy_unpack_cmap(String packed) { char [] map = new char[0x10000]; int i = 0; /* index in packed string */ int j = 0; /* index in unpacked array */ while (i < 82) { int count = packed.charAt(i++); char value = packed.charAt(i++); do map[j++] = value; while (--count > 0); } return map; } /** * 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; } } /** * Closes the input stream. */ final public void yyclose() throws java.io.IOException { yy_atEOF = true; /* indicate end of file */ yy_endRead = yy_startRead; /* invalidate buffer */ if (yy_reader != null) yy_reader.close(); } /** * Closes the current stream, and resets the * scanner to read from a new input stream. * * All internal variables are reset, the old input stream * <b>cannot</b> be reused (internal buffer is discarded and lost). * Lexical state is set to <tt>YY_INITIAL</tt>. * * @param reader the new input stream */ final public void yyreset(java.io.Reader reader) throws java.io.IOException { yyclose(); yy_reader = reader; yy_atBOL = true; yy_atEOF = false; yy_endRead = yy_startRead = 0; yy_currentPos = yy_markedPos = yy_pushbackPos = 0; yyline = yychar = yycolumn = 0; yy_lexical_state = YYINITIAL;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -