📄 assemblerx86tokenmaker.java
字号:
/* The following code was generated by JFlex 1.4.1 on 12/14/05 10:11 AM */
/*
* 12/06/2004
*
* AssemblerX86TokenMaker.java - An object that can take a chunk of text and
* return a linked list of tokens representing X86 assembler.
* Copyright (C) 2004 Robert Futrell
* email@address.com
* www.website.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package org.fife.ui.rsyntaxtextarea.modes;
import java.io.*;
import java.util.HashMap;
import javax.swing.text.Segment;
import org.fife.ui.rsyntaxtextarea.*;
/**
* This class takes plain text and returns tokens representing x86
* assembler.<p>
*
* This implementation was created using
* <a href="http://www.jflex.de/">JFlex</a> 1.4.1; however, the generated file
* was modified for performance. Memory allocation needs to be almost
* completely removed to be competitive with the handwritten lexers (subclasses
* of <code>AbstractTokenMaker</code>, so this class has been modified so that
* Strings are never allocated (via yytext()), and the scanner never has to
* worry about refilling its buffer (needlessly copying chars around).
* We can achieve this because RText always scans exactly 1 line of tokens at a
* time, and hands the scanner this line as an array of characters (a Segment
* really). Since tokens contain pointers to char arrays instead of Strings
* holding their contents, there is no need for allocating new memory for
* Strings.<p>
*
* The actual algorithm generated for scanning has, of course, not been
* modified.<p>
*
* If you wish to regenerate this file yourself, keep in mind the following:
* <ul>
* <li>The generated AssemblerX86TokenMaker.java</code> file will contain two
* definitions of both <code>zzRefill</code> and <code>yyreset</code>.
* You should hand-delete the second of each definition (the ones
* generated by the lexer), as these generated methods modify the input
* buffer, which we'll never have to do.</li>
* <li>You should also change the declaration/definition of zzBuffer to NOT
* be initialized. This is a needless memory allocation for us since we
* will be pointing the array somewhere else anyway.</li>
* <li>You should NOT call <code>yylex()</code> on the generated scanner
* directly; rather, you should use <code>getTokenList</code> as you would
* with any other <code>TokenMaker</code> instance.</li>
* </ul>
*
* @author Robert Futrell
* @version 0.2
*
*/
public class AssemblerX86TokenMaker extends AbstractJFlexTokenMaker implements TokenMaker {
/** 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 YYINITIAL = 0;
/**
* ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
* ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
* at the beginning of a line
* l is of the form l = 2*k, k a non negative integer
*/
private static final int ZZ_LEXSTATE[] = {
0, 1
};
/**
* Translates characters to character classes
*/
private static final String ZZ_CMAP_PACKED =
"\11\0\1\10\1\7\1\0\1\10\23\0\1\10\1\14\1\4\2\0"+
"\1\13\1\14\1\5\2\0\1\12\1\12\1\3\1\12\1\15\1\12"+
"\1\27\1\16\1\21\1\24\1\25\1\26\1\20\1\23\1\17\1\2"+
"\1\11\1\6\1\14\1\14\1\14\1\50\1\0\1\30\1\33\1\40"+
"\1\42\1\35\1\47\1\51\1\32\1\45\1\1\1\36\1\31\1\55"+
"\1\43\1\41\1\22\1\56\1\34\1\37\1\44\1\46\1\61\1\52"+
"\1\54\1\60\1\53\1\3\1\0\1\3\1\14\1\57\1\0\1\30"+
"\1\33\1\40\1\42\1\35\1\47\1\51\1\32\1\45\1\1\1\36"+
"\1\31\1\55\1\43\1\41\1\22\1\56\1\34\1\37\1\44\1\46"+
"\1\61\1\52\1\54\1\60\1\53\1\0\1\14\1\0\1\14\uff81\0";
/**
* Translates characters to character classes
*/
private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
/**
* Translates DFA states to action switch labels.
*/
private static final int [] ZZ_ACTION = zzUnpackAction();
private static final String ZZ_ACTION_PACKED_0 =
"\2\0\2\1\1\2\1\3\1\4\1\5\1\6\1\7"+
"\1\10\32\1\1\11\1\1\1\12\5\13\2\1\1\14"+
"\1\15\25\0\16\1\2\16\23\1\1\13\11\1\1\16"+
"\14\1\2\16\7\1\1\16\10\1\1\13\4\1\1\11"+
"\3\1\1\16\1\1\1\11\15\1\1\13\1\12\13\1"+
"\1\16\42\1\31\0\1\12\11\0\20\1\1\13\1\12"+
"\14\1\2\13\3\1\1\13\4\1\1\12\6\1\1\13"+
"\3\1\1\13\5\1\1\12\5\1\1\13\4\1\1\12"+
"\1\1\1\13\2\1\1\13\10\1\1\13\4\1\1\13"+
"\4\1\1\13\5\1\1\12\3\1\3\13\24\1\1\13"+
"\37\1\1\13\3\1\1\13\3\1\1\0\1\12\10\0"+
"\1\12\17\0\3\1\1\13\11\1\1\13\14\1\2\13"+
"\1\1\1\17\1\13\3\1\2\12\10\1\1\12\7\1"+
"\1\12\1\13\12\1\1\12\15\1\1\13\5\1\2\13"+
"\1\1\1\13\14\1\1\13\3\1\1\13\4\1\1\0"+
"\1\12\3\0\1\12\5\0\1\12\5\0\16\1\1\12"+
"\5\1\1\12\16\1\1\12\1\1\1\13\4\1\1\13"+
"\1\1\1\13\4\1\7\0\1\12\7\1\2\12\10\1"+
"\1\0\1\12\2\0\1\12\1\0\4\1\1\12\1\1"+
"\3\0\2\1\2\0\1\1\1\12\2\0";
private static int [] zzUnpackAction() {
int [] result = new int[668];
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\62\0\144\0\226\0\310\0\372\0\u012c\0\u015e"+
"\0\144\0\u0190\0\144\0\u01c2\0\u01f4\0\u0226\0\u0258\0\u028a"+
"\0\u02bc\0\u02ee\0\u0320\0\u0352\0\u0384\0\u03b6\0\u03e8\0\u041a"+
"\0\u044c\0\u047e\0\u04b0\0\u04e2\0\u0514\0\u0546\0\u0578\0\u05aa"+
"\0\u05dc\0\u060e\0\u0640\0\u0672\0\u06a4\0\u06d6\0\u0708\0\u0708"+
"\0\u073a\0\u076c\0\u079e\0\u0352\0\u07d0\0\u0802\0\u0834\0\144"+
"\0\144\0\u0866\0\u0898\0\u08ca\0\u08fc\0\u092e\0\u0960\0\u0992"+
"\0\u09c4\0\u09f6\0\u0a28\0\u0a5a\0\u0a8c\0\u0abe\0\u0af0\0\u0b22"+
"\0\u0b54\0\u0b86\0\u0bb8\0\u0bea\0\u0c1c\0\u0c4e\0\u0c80\0\u0cb2"+
"\0\u0ce4\0\u0d16\0\u0d48\0\u0d7a\0\u0dac\0\u0dde\0\u0e10\0\u0e42"+
"\0\u0e74\0\u0ea6\0\u0ed8\0\u0f0a\0\u0f3c\0\u0352\0\u0f6e\0\u0fa0"+
"\0\u0fd2\0\u1004\0\u1036\0\u1068\0\u109a\0\u10cc\0\u10fe\0\u1130"+
"\0\u1162\0\u1194\0\u11c6\0\u11f8\0\u122a\0\u125c\0\u128e\0\u12c0"+
"\0\u12f2\0\u1324\0\u1356\0\u1388\0\u13ba\0\u13ec\0\u141e\0\u1450"+
"\0\u1482\0\u14b4\0\u14e6\0\u1518\0\u154a\0\u157c\0\u15ae\0\u15e0"+
"\0\u1612\0\u1644\0\u1676\0\u16a8\0\u16da\0\u170c\0\u173e\0\u1770"+
"\0\u17a2\0\u17d4\0\u1806\0\u1838\0\u186a\0\u189c\0\u18ce\0\u1900"+
"\0\u1932\0\u1964\0\u1996\0\u19c8\0\u19fa\0\u1a2c\0\u1a5e\0\u1a90"+
"\0\u1ac2\0\u1af4\0\u1b26\0\u1b58\0\u1b8a\0\u1bbc\0\u1bee\0\u0352"+
"\0\u1c20\0\u1c52\0\u1c84\0\u1cb6\0\u1ce8\0\u186a\0\u1d1a\0\u1d4c"+
"\0\u1d7e\0\u1db0\0\u1de2\0\u1e14\0\u1e46\0\u1e78\0\u1eaa\0\u1edc"+
"\0\u1f0e\0\u1f40\0\u1f72\0\u1fa4\0\u1fd6\0\u2008\0\u203a\0\u206c"+
"\0\u209e\0\u20d0\0\u2102\0\u2134\0\u2166\0\u2198\0\u21ca\0\u21fc"+
"\0\u222e\0\u2260\0\u2292\0\u22c4\0\u22f6\0\u2328\0\u235a\0\u238c"+
"\0\u23be\0\u23f0\0\u2422\0\u2454\0\u2486\0\u24b8\0\u24ea\0\u251c"+
"\0\u254e\0\u2580\0\u25b2\0\u25e4\0\u2616\0\u2648\0\u267a\0\u26ac"+
"\0\u26de\0\u2710\0\u2742\0\u2774\0\u27a6\0\u27d8\0\u280a\0\u283c"+
"\0\u286e\0\u07d0\0\u28a0\0\u28d2\0\u2904\0\u2936\0\u2968\0\u299a"+
"\0\u29cc\0\u29fe\0\u2a30\0\u2a62\0\u2a94\0\u2ac6\0\u2af8\0\u2b2a"+
"\0\u2b5c\0\u2b8e\0\u2bc0\0\u2bf2\0\u2c24\0\u2c56\0\u2c88\0\u2cba"+
"\0\u2cec\0\u2d1e\0\u2d50\0\u2d82\0\144\0\u2db4\0\u2de6\0\u2e18"+
"\0\u2e4a\0\u2e7c\0\u2eae\0\u2ee0\0\u2f12\0\u2f44\0\u2f76\0\u2fa8"+
"\0\u2fda\0\u300c\0\u303e\0\u3070\0\u30a2\0\u30d4\0\u3106\0\u3138"+
"\0\u316a\0\u319c\0\u31ce\0\u3200\0\u3232\0\u3264\0\u3296\0\u0352"+
"\0\u32c8\0\u32fa\0\u332c\0\u335e\0\u3390\0\u33c2\0\u33f4\0\u3426"+
"\0\u3458\0\u348a\0\u34bc\0\u34ee\0\u3520\0\u3552\0\u3584\0\u35b6"+
"\0\u35e8\0\u361a\0\u364c\0\u367e\0\u36b0\0\u36e2\0\u3714\0\u3746"+
"\0\u3778\0\u37aa\0\u37dc\0\u380e\0\u3840\0\u3872\0\u38a4\0\u38d6"+
"\0\u3908\0\u393a\0\u396c\0\u399e\0\u39d0\0\u3a02\0\u3a34\0\u3a66"+
"\0\u3a98\0\u3aca\0\u3afc\0\u3b2e\0\u3b60\0\u3b92\0\u3bc4\0\u3bf6"+
"\0\u3c28\0\u3c5a\0\u3c8c\0\u3cbe\0\u3cf0\0\u3d22\0\u3d54\0\u3d86"+
"\0\u3db8\0\u3dea\0\u3e1c\0\u3e4e\0\u3e80\0\u3eb2\0\u3ee4\0\u3f16"+
"\0\u3f48\0\u3f7a\0\u3fac\0\u3fde\0\u4010\0\u36e2\0\u4042\0\u4074"+
"\0\u40a6\0\u40d8\0\u410a\0\u413c\0\u416e\0\u41a0\0\u41d2\0\u4204"+
"\0\u4236\0\u4268\0\u429a\0\u42cc\0\u42fe\0\u4330\0\u4362\0\u4394"+
"\0\u43c6\0\u43f8\0\u442a\0\u445c\0\u448e\0\u44c0\0\u44f2\0\u4524"+
"\0\u4556\0\u4588\0\u45ba\0\u45ec\0\u461e\0\u3b92\0\u4650\0\u4682"+
"\0\u46b4\0\u361a\0\u46e6\0\u4718\0\u474a\0\u477c\0\u47ae\0\u47e0"+
"\0\u4812\0\u4844\0\u4876\0\u48a8\0\u48da\0\u490c\0\u493e\0\u4970"+
"\0\u49a2\0\u49d4\0\u4a06\0\u4a38\0\u4a6a\0\u4a9c\0\u4ace\0\u4b00"+
"\0\u4b32\0\u4b64\0\u4b96\0\u4bc8\0\u4bfa\0\u4c2c\0\u4c5e\0\u4c90"+
"\0\u4cc2\0\u4cf4\0\u4d26\0\u4d58\0\u4d8a\0\u4dbc\0\u410a\0\u4dee"+
"\0\u4e20\0\u4e52\0\u4e84\0\u4eb6\0\u4ee8\0\u4f1a\0\u4f4c\0\u4f7e"+
"\0\u4fb0\0\u4fe2\0\u5014\0\u5046\0\u5078\0\u50aa\0\u50dc\0\u510e"+
"\0\u5140\0\u5172\0\u51a4\0\u51d6\0\u5208\0\u523a\0\u526c\0\u529e"+
"\0\u52d0\0\u5302\0\u5334\0\u5366\0\u5398\0\u53ca\0\u53fc\0\u542e"+
"\0\u5460\0\u5492\0\u54c4\0\u54f6\0\u5528\0\u555a\0\u558c\0\u55be"+
"\0\u55f0\0\u5622\0\u55f0\0\u5654\0\u5686\0\u56b8\0\u56ea\0\u571c"+
"\0\u574e\0\u5780\0\u57b2\0\u4d58\0\u57e4\0\u076c\0\u5816\0\u5848"+
"\0\u587a\0\u58ac\0\u0352\0\u58de\0\u5910\0\u5942\0\u5974\0\u59a6"+
"\0\u1f40\0\u59d8\0\u5a0a\0\u5a3c\0\u5a6e\0\u5aa0\0\u5ad2\0\u5b04"+
"\0\u5b36\0\u5b68\0\u5b9a\0\u5bcc\0\u5bfe\0\u5c30\0\u5c62\0\u5c94"+
"\0\u5cc6\0\u5cf8\0\u5d2a\0\u5d5c\0\u5d8e\0\u5dc0\0\u5df2\0\u5e24"+
"\0\u5e56\0\u5e88\0\u5eba\0\u5eec\0\u5f1e\0\u5f50\0\u5f82\0\u5fb4"+
"\0\u5fe6\0\u6018\0\u604a\0\u607c\0\u60ae\0\u60e0\0\u6112\0\u6144"+
"\0\u6176\0\u61a8\0\u5460\0\u0834\0\u61da\0\u620c\0\u623e\0\u6270"+
"\0\u62a2\0\u62d4\0\u6306\0\u6338\0\u636a\0\u639c\0\u63ce\0\u6400"+
"\0\u6432\0\u6464\0\u6496\0\u64c8\0\u64fa\0\u652c\0\u655e\0\u6590"+
"\0\u65c2\0\u65f4\0\u6626\0\u6658\0\u668a\0\u66bc\0\u66ee\0\u6720"+
"\0\u6752\0\u6784\0\u67b6\0\u67e8\0\u681a\0\u684c\0\u687e\0\u68b0"+
"\0\u68e2\0\u6914\0\u6946\0\u6978\0\u69aa\0\u69dc\0\u6a0e\0\u6a40"+
"\0\u6a72\0\u6aa4\0\u6ad6\0\u6b08\0\u6b3a\0\u6b6c\0\u6b9e\0\u6bd0"+
"\0\u6c02\0\u6c34\0\u6c66\0\u4236\0\u6c98\0\u6cca\0\u65f4\0\u6cfc"+
"\0\u6d2e\0\u6d60\0\u6d92\0\u6dc4\0\u6df6\0\u6e28\0\u6e5a\0\u5a6e"+
"\0\u6e8c\0\u6ebe\0\u6ef0\0\u6f22\0\u6f54\0\u6f86\0\u6fb8\0\u6fea"+
"\0\u701c\0\u704e\0\u7080\0\u70b2\0\u70e4\0\u7116\0\u7148\0\u717a"+
"\0\u61da\0\u71ac\0\u71de\0\u7210\0\u7242\0\u1194\0\u7274\0\u72a6"+
"\0\u72d8\0\u730a\0\u733c\0\u736e\0\u73a0\0\u73d2\0\u7404\0\u7436"+
"\0\u7468\0\u749a\0\u74cc\0\u74fe\0\u7530\0\u7562\0\u7594\0\u587a"+
"\0\u75c6\0\u75f8\0\u762a\0\u765c\0\u768e\0\u76c0\0\u76f2\0\u7724"+
"\0\u7756\0\u7788\0\u77ba\0\u77ec\0\u781e\0\u7850\0\u7882\0\u4ee8"+
"\0\u78b4\0\u78e6\0\u7918\0\u794a\0\u797c\0\u79ae\0\u79e0\0\u7a12"+
"\0\u7a44\0\u7a76\0\u7aa8\0\u7ada\0\u7b0c\0\u7b3e\0\u7b70\0\u7ba2"+
"\0\u6d60\0\u7bd4\0\u7c06\0\u7c38";
private static int [] zzUnpackRowMap() {
int [] result = new int[668];
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) {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -