📄 fortrantokenmaker.java
字号:
/* The following code was generated by JFlex 1.4.1 on 12/15/05 1:43 PM */
/*
* 03/23/2005
*
* FortranTokenMaker.java - Scanner for the Fortran programming language.
* Copyright (C) 2005 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 javax.swing.text.Segment;
import org.fife.ui.rsyntaxtextarea.*;
/**
* Scanner for the Fortran programming language.
*
* 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 FortranTokenMaker.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.4
*
*/
public class FortranTokenMaker 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 STRING = 1;
public static final int YYINITIAL = 0;
public static final int CHAR = 2;
/**
* Translates characters to character classes
*/
private static final String ZZ_CMAP_PACKED =
"\11\0\1\2\1\1\1\0\1\2\23\0\1\2\1\5\1\10\1\0"+
"\1\6\1\0\1\14\1\11\2\0\1\3\3\0\1\16\1\15\1\45"+
"\1\50\1\51\7\6\2\0\1\12\1\13\1\12\2\0\1\25\1\37"+
"\1\7\1\4\1\22\1\31\1\21\1\41\1\33\1\46\1\42\1\17"+
"\1\36\1\24\1\26\1\35\1\23\1\27\1\32\1\20\1\30\1\6"+
"\1\44\1\40\1\43\1\47\4\0\1\6\1\0\1\25\1\37\1\34"+
"\1\4\1\22\1\31\1\21\1\41\1\33\1\46\1\42\1\17\1\36"+
"\1\24\1\26\1\35\1\23\1\27\1\32\1\20\1\30\1\6\1\44"+
"\1\40\1\43\1\47\uff85\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 =
"\1\0\2\1\1\2\1\3\1\4\1\5\1\6\1\7"+
"\1\2\1\5\1\10\1\11\1\12\1\2\1\12\24\2"+
"\1\1\1\13\1\14\1\1\1\15\1\16\7\2\1\17"+
"\20\2\7\0\41\2\1\17\27\2\1\17\10\2\1\17"+
"\3\2\4\0\2\17\3\2\2\17\20\2\1\17\10\2"+
"\2\17\3\2\1\17\2\2\1\17\6\2\1\17\2\0"+
"\3\2\1\17\4\2\1\17\26\2\1\0\20\2\1\20"+
"\12\2\1\17";
private static int [] zzUnpackAction() {
int [] result = new int[257];
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\52\0\124\0\176\0\176\0\250\0\176\0\322"+
"\0\176\0\374\0\u0126\0\176\0\176\0\u0150\0\u0150\0\176"+
"\0\u017a\0\u01a4\0\u01ce\0\u01f8\0\u0222\0\u024c\0\u0276\0\u02a0"+
"\0\u02ca\0\u02f4\0\u031e\0\u0348\0\u0372\0\u0126\0\u039c\0\u03c6"+
"\0\u03f0\0\u041a\0\u0444\0\u046e\0\u0498\0\176\0\176\0\u04c2"+
"\0\176\0\176\0\u04ec\0\u0516\0\u0540\0\u056a\0\u0594\0\u05be"+
"\0\u05e8\0\u0612\0\u063c\0\u0666\0\u0690\0\u06ba\0\u06e4\0\u070e"+
"\0\u0738\0\u0762\0\u078c\0\u07b6\0\u07e0\0\u080a\0\u0834\0\u085e"+
"\0\u0888\0\u08b2\0\u08dc\0\u0906\0\u0930\0\u095a\0\u0984\0\u09ae"+
"\0\u09d8\0\u0a02\0\u0a2c\0\u0a56\0\u0a80\0\u0aaa\0\u0ad4\0\u0afe"+
"\0\u0b28\0\u0b52\0\u0b7c\0\u0ba6\0\u0bd0\0\u0bfa\0\u0c24\0\u0c4e"+
"\0\u0c78\0\u0ca2\0\u0ccc\0\u0cf6\0\u0d20\0\u0d4a\0\u0d74\0\u0d9e"+
"\0\u0dc8\0\u0df2\0\u0e1c\0\u0e46\0\u0e70\0\u0e9a\0\u0ec4\0\u0eee"+
"\0\u0f18\0\u0f42\0\u0f6c\0\u0f96\0\u0fc0\0\u0fea\0\u1014\0\u103e"+
"\0\u1068\0\u1092\0\u10bc\0\u10e6\0\u1110\0\u113a\0\u1164\0\u118e"+
"\0\u11b8\0\u11e2\0\u120c\0\u1236\0\u1260\0\u128a\0\u12b4\0\u12de"+
"\0\u1308\0\u1332\0\u135c\0\u1386\0\u13b0\0\u13da\0\u1404\0\u142e"+
"\0\u1458\0\u1482\0\u14ac\0\u14d6\0\u1500\0\u152a\0\u1554\0\u157e"+
"\0\u15a8\0\u15d2\0\u15fc\0\374\0\u1626\0\u1650\0\u167a\0\u16a4"+
"\0\u16ce\0\u16f8\0\u1722\0\u174c\0\u1776\0\u17a0\0\u17ca\0\u17f4"+
"\0\u181e\0\u1848\0\u1872\0\u189c\0\u18c6\0\u18f0\0\u191a\0\u1944"+
"\0\u196e\0\u1998\0\u19c2\0\u19ec\0\u1a16\0\u1a40\0\u1a6a\0\u16f8"+
"\0\u1a94\0\u1abe\0\u1ae8\0\u1b12\0\u1b3c\0\u1b66\0\u1b90\0\u1bba"+
"\0\u1be4\0\u1c0e\0\u1c38\0\u174c\0\u1c62\0\u1c8c\0\u1cb6\0\u1ce0"+
"\0\u1d0a\0\u1d34\0\u1d5e\0\u1d88\0\u1db2\0\u1ddc\0\u1e06\0\u1e30"+
"\0\u1e5a\0\u1e84\0\u1eae\0\u1ed8\0\u1f02\0\u1f2c\0\u1b12\0\u1f56"+
"\0\u1f80\0\u1faa\0\u1fd4\0\u1ffe\0\u2028\0\u2052\0\u207c\0\u20a6"+
"\0\u20d0\0\u20fa\0\u2124\0\u214e\0\u2178\0\u21a2\0\u21cc\0\u21f6"+
"\0\u2220\0\u224a\0\u2274\0\u229e\0\u22c8\0\u22f2\0\u231c\0\u2346"+
"\0\u2370\0\u239a\0\u23c4\0\u23ee\0\u2418\0\u2442\0\u246c\0\u2496"+
"\0\u24c0\0\u24ea\0\u2514\0\u253e\0\u2568\0\176\0\u2592\0\u25bc"+
"\0\u25e6\0\u2610\0\u263a\0\u2664\0\u268e\0\u26b8\0\u26e2\0\u270c"+
"\0\u13da";
private static int [] zzUnpackRowMap() {
int [] result = new int[257];
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\4\1\5\1\6\1\7\1\10\1\11\1\12\1\13"+
"\1\14\1\15\1\16\1\17\1\20\1\17\1\21\1\22"+
"\1\23\1\24\1\25\1\12\1\26\1\27\1\30\1\31"+
"\1\32\1\33\1\34\1\35\1\36\1\37\1\40\1\41"+
"\2\12\1\42\1\12\1\43\2\12\1\44\2\12\1\45"+
"\1\46\6\45\1\47\41\45\1\50\1\51\7\50\1\52"+
"\40\50\54\0\1\6\53\0\1\53\1\0\1\12\1\54"+
"\7\0\1\55\1\56\1\12\1\57\1\12\1\60\1\61"+
"\1\62\1\63\1\12\1\64\1\65\1\66\1\54\1\67"+
"\1\70\1\71\12\12\4\0\1\12\1\0\2\12\7\0"+
"\33\12\4\0\1\12\1\0\1\12\1\72\7\0\1\73"+
"\2\12\1\74\2\12\1\75\1\76\3\12\1\77\1\12"+
"\1\72\1\12\1\100\2\12\1\101\1\12\1\102\6\12"+
"\13\0\1\20\55\0\1\103\1\104\1\103\1\105\1\0"+
"\1\106\1\107\1\110\2\0\1\111\24\0\1\12\1\0"+
"\2\12\7\0\1\112\1\12\1\112\1\113\3\12\1\114"+
"\23\12\4\0\1\12\1\0\2\12\7\0\6\12\1\115"+
"\1\12\1\116\11\12\1\117\10\12\4\0\1\12\1\0"+
"\2\12\7\0\7\12\1\120\23\12\4\0\1\12\1\0"+
"\2\12\7\0\1\121\4\12\1\122\13\12\1\123\11\12"+
"\4\0\1\12\1\0\2\12\7\0\7\12\1\124\4\12"+
"\1\125\16\12\4\0\1\12\1\0\1\12\1\72\7\0"+
"\1\126\1\127\3\12\1\60\5\12\1\130\1\131\1\72"+
"\1\12\1\132\1\133\12\12\4\0\1\12\1\0\2\12"+
"\7\0\16\12\1\117\14\12\4\0\1\12\1\0\2\12"+
"\7\0\3\12\1\134\27\12\4\0\1\12\1\0\2\12"+
"\7\0\13\12\1\135\17\12\4\0\1\12\1\0\2\12"+
"\7\0\1\136\6\12\1\137\1\12\1\140\21\12\4\0"+
"\1\12\1\0\2\12\7\0\1\12\1\141\1\12\1\142"+
"\1\143\1\144\3\12\1\145\2\12\1\146\16\12\4\0"+
"\1\147\1\0\1\12\1\150\7\0\5\12\1\151\1\152"+
"\3\12\1\153\1\154\1\12\1\150\1\12\1\155\13\12"+
"\4\0\1\12\1\0\2\12\7\0\6\12\1\156\1\12"+
"\1\157\22\12\4\0\1\12\1\0\2\12\7\0\6\12"+
"\1\160\1\161\4\12\1\162\16\12\4\0\1\12\1\0"+
"\2\12\7\0\6\12\1\163\24\12\4\0\1\12\1\0"+
"\2\12\7\0\14\12\1\164\16\12\4\0\1\12\1\0"+
"\2\12\7\0\10\12\1\165\11\12\1\166\10\12\4\0"+
"\1\12\1\0\2\12\7\0\3\12\1\167\27\12\1\45"+
"\1\0\6\45\1\0\41\45\1\50\1\0\7\50\1\0"+
"\40\50\4\0\1\12\1\0\2\12\7\0\14\12\1\170"+
"\16\12\4\0\1\12\1\0\2\12\7\0\7\12\1\171"+
"\7\12\1\100\13\12\4\0\1\12\1\0\2\12\7\0"+
"\7\12\1\172\23\12\4\0\1\12\1\0\2\12\7\0"+
"\6\12\1\115\24\12\4\0\1\12\1\0\2\12\7\0"+
"\6\12\1\173\3\12\1\174\6\12\1\175\11\12\4\0"+
"\1\12\1\0\2\12\7\0\14\12\1\125\16\12\4\0"+
"\1\12\1\0\1\12\1\72\7\0\1\12\1\176\11\12"+
"\1\130\1\12\1\72\2\12\1\133\12\12\4\0\1\12"+
"\1\0\2\12\7\0\11\12\1\177\21\12\4\0\1\12"+
"\1\0\2\12\7\0\3\12\1\200\27\12\4\0\1\12"+
"\1\0\2\12\7\0\1\201\32\12\4\0\1\12\1\0"+
"\2\12\7\0\4\12\1\143\7\12\1\146\16\12\4\0"+
"\1\12\1\0\2\12\7\0\5\12\1\202\11\12\1\203"+
"\13\12\4\0\1\12\1\0\2\12\7\0\10\12\1\204"+
"\22\12\4\0\1\12\1\0\2\12\7\0\6\12\1\205"+
"\1\206\4\12\1\207\16\12\4\0\1\12\1\0\2\12"+
"\7\0\1\135\32\12\4\0\1\12\1\0\2\12\7\0"+
"\7\12\1\133\23\12\4\0\1\12\1\0\2\12\7\0"+
"\7\12\1\210\23\12\4\0\1\12\1\0\2\12\7\0"+
"\14\12\1\211\16\12\4\0\1\12\1\0\2\12\7\0"+
"\1\212\12\12\1\135\4\12\1\133\12\12\4\0\1\12"+
"\1\0\2\12\7\0\5\12\1\213\5\12\1\214\3\12"+
"\1\215\13\12\4\0\1\12\1\0\2\12\7\0\4\12"+
"\1\143\7\12\1\113\16\12\4\0\1\12\1\0\2\12"+
"\7\0\16\12\1\216\14\12\4\0\1\12\1\0\2\12"+
"\7\0\6\12\1\217\24\12\4\0\1\12\1\0\1\12"+
"\1\71\7\0\15\12\1\71\15\12\20\0\1\220\1\0"+
"\1\220\56\0\1\221\45\0\1\220\50\0\1\220\53\0"+
"\1\222\54\0\1\220\47\0\1\223\30\0\1\12\1\0"+
"\2\12\7\0\1\12\1\224\1\12\1\224\27\12\4\0"+
"\1\12\1\0\2\12\7\0\5\12\1\224\25\12\4\0"+
"\1\12\1\0\2\12\7\0\2\12\1\225\30\12\4\0"+
"\1\12\1\0\2\12\7\0\5\12\1\214\25\12\4\0"+
"\1\12\1\0\2\12\7\0\6\12\1\226\24\12\4\0"+
"\1\12\1\0\2\12\7\0\3\12\1\113\27\12\4\0"+
"\1\12\1\0\2\12\7\0\1\12\1\227\31\12\4\0"+
"\1\12\1\0\2\12\7\0\13\12\1\230\17\12\4\0"+
"\1\231\1\0\2\12\7\0\33\12\4\0\1\12\1\0"+
"\2\12\7\0\14\12\1\202\1\12\1\232\14\12\4\0"+
"\1\12\1\0\2\12\7\0\5\12\1\135\25\12\4\0"+
"\1\12\1\0\2\12\7\0\5\12\1\202\25\12\4\0"+
"\1\12\1\0\2\12\7\0\1\233\6\12\1\172\23\12"+
"\4\0\1\12\1\0\2\12\7\0\6\12\1\234\24\12"+
"\4\0\1\12\1\0\2\12\7\0\14\12\1\113\16\12"+
"\4\0\1\12\1\0\2\12\7\0\5\12\1\202\11\12"+
"\1\235\13\12\4\0\1\12\1\0\2\12\7\0\6\12"+
"\1\236\1\206\4\12\1\237\16\12\4\0\1\12\1\0"+
"\2\12\7\0\13\12\1\224\17\12\4\0\1\12\1\0"+
"\2\12\7\0\1\12\1\240\4\12\1\241\16\12\1\42"+
"\5\12\4\0\1\12\1\0\2\12\7\0\3\12\1\224"+
"\27\12\4\0\1\12\1\0\2\12\7\0\7\12\1\242"+
"\23\12\4\0\1\12\1\0\2\12\7\0\10\12\1\243"+
"\22\12\4\0\1\12\1\0\2\12\7\0\5\12\1\244"+
"\25\12\4\0\1\12\1\0\2\12\7\0\7\12\1\175"+
"\23\12\4\0\1\12\1\0\2\12\7\0\1\245\32\12"+
"\4\0\1\12\1\0\2\12\7\0\10\12\1\202\22\12"+
"\4\0\1\12\1\0\2\12\7\0\2\12\1\212\30\12"+
"\4\0\1\12\1\0\2\12\7\0\20\12\1\246\12\12"+
"\4\0\1\12\1\0\2\12\7\0\2\12\1\113\2\12"+
"\1\214\25\12\4\0\1\12\1\0\2\12\7\0\5\12"+
"\1\60\6\12\1\247\16\12\4\0\1\12\1\0\2\12"+
"\7\0\22\12\1\250\10\12\4\0\1\251\1\0\1\12"+
"\1\252\7\0\1\12\1\253\2\12\1\254\10\12\1\252"+
"\15\12\4\0\1\12\1\0\2\12\7\0\20\12\1\133"+
"\12\12\4\0\1\12\1\0\2\12\7\0\14\12\1\255"+
"\16\12\4\0\1\12\1\0\2\12\7\0\14\12\1\256"+
"\16\12\4\0\1\12\1\0\2\12\7\0\6\12\1\257"+
"\7\12\1\260\14\12\4\0\1\12\1\0\2\12\7\0"+
"\10\12\1\261\1\32\21\12\4\0\1\12\1\0\2\12"+
"\7\0\3\12\1\262\3\12\1\263\4\12\1\125\16\12"+
"\4\0\1\12\1\0\2\12\7\0\21\12\1\264\11\12"+
"\4\0\1\265\1\0\2\12\7\0\33\12\4\0\1\12"+
"\1\0\2\12\7\0\5\12\1\264\25\12\4\0\1\12"+
"\1\0\1\12\1\266\7\0\15\12\1\266\15\12\4\0"+
"\1\12\1\0\2\12\7\0\5\12\1\206\25\12\4\0"+
"\1\12\1\0\2\12\7\0\14\12\1\267\16\12\4\0"+
"\1\12\1\0\2\12\7\0\3\12\1\270\10\12\1\71"+
"\16\12\4\0\1\12\1\0\2\12\7\0\21\12\1\202"+
"\11\12\4\0\1\12\1\0\2\12\7\0\17\12\1\224"+
"\13\12\4\0\1\12\1\0\2\12\7\0\13\12\1\214"+
"\17\12\4\0\1\12\1\0\2\12\7\0\2\12\1\271"+
"\30\12\4\0\1\12\1\0\2\12\7\0\1\272\32\12"+
"\4\0\1\12\1\0\2\12\7\0\6\12\1\273\24\12"+
"\4\0\1\12\1\0\2\12\7\0\16\12\1\224\14\12"+
"\4\0\1\12\1\0\2\12\7\0\6\12\1\274\24\12"+
"\4\0\1\12\1\0\2\12\7\0\20\12\1\71\12\12"+
"\4\0\1\12\1\0\2\12\7\0\6\12\1\212\24\12"+
"\4\0\1\12\1\0\2\12\7\0\7\12\1\275\23\12"+
"\4\0\1\12\1\0\2\12\7\0\1\12\1\224\31\12"+
"\4\0\1\12\1\0\2\12\7\0\3\12\1\276\27\12"+
"\4\0\1\12\1\0\2\12\7\0\7\12\1\206\23\12"+
"\4\0\1\12\1\0\2\12\7\0\21\12\1\277\11\12"+
"\4\0\1\224\1\0\2\12\7\0\33\12\4\0\1\12"+
"\1\0\2\12\7\0\5\12\1\277\25\12\4\0\1\12"+
"\1\0\2\12\7\0\2\12\1\224\10\12\1\135\17\12"+
"\4\0\1\12\1\0\2\12\7\0\1\300\32\12\4\0"+
"\1\12\1\0\2\12\7\0\1\224\32\12\4\0\1\12"+
"\1\0\2\12\7\0\1\12\1\301\25\12\1\257\3\12"+
"\4\0\1\12\1\0\2\12\7\0\22\12\1\224\10\12"+
"\4\0\1\12\1\0\2\12\7\0\16\12\1\302\14\12"+
"\4\0\1\12\1\0\2\12\7\0\1\255\32\12\4\0"+
"\1\12\1\0\2\12\7\0\10\12\1\303\22\12\16\0"+
"\1\20\63\0\1\304\25\0\1\220\64\0\1\305\36\0"+
"\1\12\1\0\2\12\7\0\14\12\1\306\14\12\1\307"+
"\1\12\4\0\1\12\1\0\2\12\7\0\5\12\1\310"+
"\25\12\4\0\1\12\1\0\2\12\7\0\7\12\1\224"+
"\23\12\4\0\1\12\1\0\2\12\7\0\3\12\1\311"+
"\27\12\4\0\1\227\1\0\2\12\7\0\12\12\1\312"+
"\1\12\1\313\16\12\4\0\1\12\1\0\2\12\7\0"+
"\1\314\32\12\4\0\1\12\1\0\2\12\7\0\7\12"+
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -