📄 fortrantokenmaker.java
字号:
"\1\315\23\12\4\0\1\12\1\0\2\12\7\0\5\12"+
"\1\316\25\12\4\0\1\12\1\0\2\12\7\0\6\12"+
"\1\257\24\12\4\0\1\12\1\0\2\12\7\0\21\12"+
"\1\317\11\12\4\0\1\12\1\0\2\12\7\0\5\12"+
"\1\317\25\12\4\0\1\12\1\0\2\12\7\0\11\12"+
"\1\320\21\12\4\0\1\224\1\0\2\12\7\0\1\224"+
"\32\12\4\0\1\12\1\0\2\12\7\0\6\12\1\202"+
"\1\321\23\12\4\0\1\12\1\0\2\12\7\0\6\12"+
"\1\322\10\12\1\275\13\12\4\0\1\12\1\0\1\12"+
"\1\323\7\0\15\12\1\323\15\12\4\0\1\12\1\0"+
"\2\12\7\0\3\12\1\324\27\12\4\0\1\12\1\0"+
"\2\12\7\0\10\12\1\325\22\12\4\0\1\12\1\0"+
"\2\12\7\0\5\12\1\202\11\12\1\224\13\12\4\0"+
"\1\12\1\0\2\12\7\0\6\12\1\321\24\12\4\0"+
"\1\12\1\0\2\12\7\0\3\12\1\255\27\12\4\0"+
"\1\12\1\0\2\12\7\0\1\326\32\12\4\0\1\12"+
"\1\0\2\12\7\0\3\12\1\327\27\12\4\0\1\12"+
"\1\0\2\12\7\0\11\12\1\330\21\12\4\0\1\12"+
"\1\0\2\12\7\0\21\12\1\224\11\12\4\0\1\12"+
"\1\0\2\12\7\0\2\12\1\113\30\12\4\0\1\12"+
"\1\0\2\12\7\0\2\12\1\224\30\12\4\0\1\12"+
"\1\0\2\12\7\0\6\12\1\331\24\12\4\0\1\12"+
"\1\0\1\12\1\332\7\0\15\12\1\332\15\12\4\0"+
"\1\12\1\0\2\12\7\0\2\12\1\333\30\12\4\0"+
"\1\12\1\0\2\12\7\0\26\12\1\224\2\12\1\224"+
"\1\12\4\0\1\12\1\0\2\12\7\0\11\12\1\334"+
"\21\12\4\0\1\12\1\0\2\12\7\0\23\12\1\335"+
"\7\12\4\0\1\12\1\0\2\12\7\0\1\12\1\135"+
"\31\12\4\0\1\12\1\0\2\12\7\0\10\12\1\135"+
"\22\12\4\0\1\12\1\0\2\12\7\0\31\12\1\307"+
"\1\12\4\0\1\12\1\0\2\12\7\0\1\336\32\12"+
"\4\0\1\12\1\0\2\12\7\0\11\12\1\337\21\12"+
"\4\0\1\12\1\0\2\12\7\0\6\12\1\202\24\12"+
"\4\0\1\12\1\0\2\12\7\0\5\12\1\340\25\12"+
"\4\0\1\12\1\0\2\12\7\0\31\12\1\224\1\12"+
"\4\0\1\12\1\0\2\12\7\0\14\12\1\341\16\12"+
"\4\0\1\12\1\0\2\12\7\0\6\12\1\342\5\12"+
"\1\343\16\12\4\0\1\12\1\0\2\12\7\0\1\251"+
"\32\12\4\0\1\12\1\0\2\12\7\0\6\12\1\344"+
"\24\12\22\0\1\345\61\0\1\304\23\0\1\12\1\0"+
"\1\12\1\200\7\0\15\12\1\200\15\12\4\0\1\12"+
"\1\0\2\12\7\0\26\12\1\224\4\12\4\0\1\12"+
"\1\0\2\12\7\0\13\12\1\346\17\12\4\0\1\12"+
"\1\0\2\12\7\0\14\12\1\313\10\12\1\347\5\12"+
"\4\0\1\12\1\0\2\12\7\0\14\12\1\71\16\12"+
"\4\0\1\12\1\0\2\12\7\0\12\12\1\224\20\12"+
"\4\0\1\12\1\0\2\12\7\0\14\12\1\350\16\12"+
"\4\0\1\12\1\0\1\12\1\351\7\0\15\12\1\351"+
"\15\12\4\0\1\12\1\0\2\12\7\0\32\12\1\224"+
"\4\0\1\12\1\0\2\12\7\0\10\12\1\113\22\12"+
"\4\0\1\12\1\0\2\12\7\0\10\12\1\224\22\12"+
"\4\0\1\12\1\0\2\12\7\0\1\212\32\12\4\0"+
"\1\12\1\0\2\12\7\0\1\12\1\352\31\12\4\0"+
"\1\12\1\0\1\12\1\202\7\0\15\12\1\202\15\12"+
"\4\0\1\12\1\0\2\12\7\0\7\12\1\353\23\12"+
"\4\0\1\12\1\0\2\12\7\0\11\12\1\354\21\12"+
"\4\0\1\12\1\0\2\12\7\0\2\12\1\355\30\12"+
"\4\0\1\12\1\0\2\12\7\0\14\12\1\270\16\12"+
"\4\0\1\12\1\0\2\12\7\0\17\12\1\356\13\12"+
"\4\0\1\12\1\0\2\12\7\0\14\12\1\340\16\12"+
"\4\0\1\12\1\0\2\12\7\0\10\12\1\357\22\12"+
"\4\0\1\12\1\0\2\12\7\0\1\360\32\12\4\0"+
"\1\12\1\0\2\12\7\0\13\12\1\361\17\12\4\0"+
"\1\12\1\0\2\12\7\0\7\12\1\362\23\12\4\0"+
"\1\12\1\0\2\12\7\0\1\202\32\12\4\0\1\12"+
"\1\0\2\12\7\0\13\12\1\352\17\12\4\0\1\12"+
"\1\0\2\12\7\0\5\12\1\257\25\12\4\0\1\12"+
"\1\0\2\12\7\0\14\12\1\363\16\12\4\0\1\12"+
"\1\0\2\12\7\0\5\12\1\364\25\12\4\0\1\12"+
"\1\0\1\12\1\365\7\0\15\12\1\365\15\12\16\0"+
"\1\366\37\0\1\12\1\0\2\12\7\0\12\12\1\355"+
"\20\12\4\0\1\12\1\0\2\12\7\0\22\12\1\367"+
"\10\12\4\0\1\12\1\0\1\12\1\370\7\0\15\12"+
"\1\370\15\12\4\0\1\12\1\0\2\12\7\0\6\12"+
"\1\371\24\12\4\0\1\12\1\0\2\12\7\0\14\12"+
"\1\372\16\12\4\0\1\12\1\0\2\12\7\0\11\12"+
"\1\373\21\12\4\0\1\135\1\0\2\12\7\0\33\12"+
"\4\0\1\12\1\0\2\12\7\0\3\12\1\321\27\12"+
"\4\0\1\12\1\0\2\12\7\0\3\12\1\365\27\12"+
"\4\0\1\12\1\0\2\12\7\0\6\12\1\170\24\12"+
"\4\0\1\12\1\0\2\12\7\0\3\12\1\224\3\12"+
"\1\224\23\12\4\0\1\12\1\0\2\12\7\0\16\12"+
"\1\374\14\12\4\0\1\12\1\0\1\12\1\375\7\0"+
"\15\12\1\375\15\12\4\0\1\12\1\0\2\12\7\0"+
"\5\12\1\133\25\12\4\0\1\12\1\0\2\12\7\0"+
"\11\12\1\135\21\12\4\0\1\12\1\0\2\12\7\0"+
"\1\12\1\355\31\12\4\0\1\12\1\0\2\12\7\0"+
"\3\12\1\270\27\12\4\0\1\12\1\0\2\12\7\0"+
"\14\12\1\202\16\12\4\0\1\12\1\0\2\12\7\0"+
"\1\12\1\376\31\12\4\0\1\12\1\0\2\12\7\0"+
"\7\12\1\113\23\12\4\0\1\12\1\0\2\12\7\0"+
"\1\12\1\377\31\12\4\0\1\12\1\0\2\12\7\0"+
"\6\12\1\u0100\24\12\4\0\1\12\1\0\2\12\7\0"+
"\6\12\1\267\24\12\4\0\1\12\1\0\2\12\7\0"+
"\3\12\1\u0101\2\12\1\177\24\12\4\0\1\12\1\0"+
"\2\12\7\0\14\12\1\124\16\12\4\0\1\12\1\0"+
"\1\12\1\135\7\0\15\12\1\135\15\12";
private static int [] zzUnpackTrans() {
int [] result = new int[10038];
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 =
"\1\0\2\1\2\11\1\1\1\11\1\1\1\11\2\1"+
"\2\11\2\1\1\11\25\1\2\11\1\1\2\11\30\1"+
"\7\0\106\1\4\0\60\1\2\0\37\1\1\0\20\1"+
"\1\11\13\1";
private static int [] zzUnpackAttribute() {
int [] result = new int[257];
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. We must have this here as there is no default,
* no-parameter constructor generated by JFlex.
*/
public FortranTokenMaker() {
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.
* Does not close the old reader.
*
* 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
*/
public final void yyreset(java.io.Reader reader) throws java.io.IOException {
// 's' has been updated.
zzBuffer = s.array;
/*
* We replaced the line below with the two below it because zzRefill
* no longer "refills" the buffer (since the way we do it, it's always
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -