/* The following code was generated by JFlex 1.5.0-SNAPSHOT */
package edu.stanford.nlp.trees.international.pennchinese;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
/**
* A lexer for the Penn Chinese Treebank. Supports Chinese characters.
*
* @author Roger Levy
* @author Christopher Manning (redid to accept most stuff, add CTB 4-6 XML entities)
*/
class CHTBLexer {
/** 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;
public static final int DOCNO = 2;
public static final int DOCID = 4;
public static final int DOCTYPE = 6;
public static final int DATETIME = 8;
public static final int SRCID = 10;
public static final int HEADER = 12;
public static final int DATEINHEADER = 14;
public static final int PREAMBLE = 16;
/**
* 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, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7,
8, 8
};
/**
* Translates characters to character classes
*/
private static final String ZZ_CMAP_PACKED =
"\11\0\1\30\1\2\1\27\1\27\1\26\22\0\1\30\7\0\1\25"+
"\1\25\5\0\1\11\14\0\1\1\1\0\1\3\2\0\1\6\1\23"+
"\1\13\1\7\1\5\2\0\1\4\1\15\2\0\1\24\1\21\1\14"+
"\1\12\1\20\1\0\1\10\1\22\1\16\4\0\1\17\53\0\1\27"+
"\u1fa2\0\1\27\1\27\udfd6\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 =
"\11\0\2\1\1\2\1\1\3\2\7\3\6\1\11\0"+
"\1\4\6\1\1\4\11\0\5\1\11\0\7\1\10\0"+
"\1\1\1\5\5\1\5\0\1\6\4\0\2\1\1\7"+
"\1\1\1\10\1\1\2\0\1\11\4\0\1\12\2\0"+
"\1\13\2\1\1\0\2\1\1\14\2\0\1\15\4\0"+
"\2\1\1\0\1\1\1\0\1\1\3\0\1\16\2\0"+
"\2\1\1\0\2\17\1\20\1\21\4\0\1\1\3\0"+
"\1\22\1\1\1\0\1\1\1\0\2\1\2\0\1\1"+
"\1\0";
private static int [] zzUnpackAction() {
int [] result = new int[169];
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\31\0\62\0\113\0\144\0\175\0\226\0\257"+
"\0\310\0\341\0\372\0\62\0\62\0\u0113\0\u012c\0\u0145"+
"\0\u015e\0\u0177\0\u0190\0\u01a9\0\u01c2\0\u01db\0\u01f4\0\u020d"+
"\0\u0226\0\u023f\0\u0258\0\u0271\0\u028a\0\u02a3\0\u02bc\0\u02d5"+
"\0\u02ee\0\u0307\0\u0320\0\u0339\0\u0352\0\u036b\0\341\0\u0384"+
"\0\u039d\0\u03b6\0\u03cf\0\u03e8\0\u0401\0\62\0\u041a\0\u0433"+
"\0\u044c\0\u0465\0\u047e\0\u0497\0\u04b0\0\u04c9\0\u04e2\0\u04fb"+
"\0\u0514\0\u052d\0\u0546\0\u055f\0\u0578\0\u0591\0\u05aa\0\u05c3"+
"\0\u05dc\0\u05f5\0\u060e\0\u0627\0\u0640\0\u0659\0\u0672\0\u068b"+
"\0\u06a4\0\u06bd\0\u06d6\0\u06ef\0\u0708\0\u0721\0\u073a\0\u0753"+
"\0\u076c\0\u0785\0\u079e\0\u07b7\0\u07d0\0\341\0\u07e9\0\u0802"+
"\0\u081b\0\u0834\0\u084d\0\u0866\0\u087f\0\u0898\0\u08b1\0\u08ca"+
"\0\62\0\u08e3\0\u08fc\0\u0915\0\u092e\0\u0947\0\u0960\0\u0979"+
"\0\u0992\0\341\0\u09ab\0\u09c4\0\u09dd\0\62\0\u09f6\0\u0a0f"+
"\0\u0a28\0\u0a41\0\62\0\u0a5a\0\u0a73\0\341\0\u0a8c\0\u0aa5"+
"\0\u0abe\0\u0ad7\0\u0af0\0\62\0\u0b09\0\u0b22\0\62\0\u0b3b"+
"\0\u0b54\0\u0b6d\0\u0b86\0\u0b9f\0\u0bb8\0\u0bd1\0\u0bea\0\u0c03"+
"\0\u0c1c\0\u0c35\0\u0c4e\0\u0c67\0\62\0\u0c80\0\u0c99\0\u0cb2"+
"\0\u0ccb\0\u0ce4\0\341\0\62\0\341\0\62\0\u0cfd\0\u0d16"+
"\0\u0d2f\0\u0d48\0\u0d61\0\u0d7a\0\u0d93\0\u0dac\0\62\0\u0dc5"+
"\0\u0dde\0\u0df7\0\u0e10\0\u0e29\0\u0e42\0\u0e5b\0\u0e74\0\u0e8d"+
"\0\u0ea6";
private static int [] zzUnpackRowMap() {
int [] result = new int[169];
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\12\1\13\1\14\22\12\1\15\1\16\1\14\1\17"+
"\1\20\1\21\27\20\31\0\1\20\1\22\30\20\1\23"+
"\30\20\1\24\30\20\1\25\30\20\1\26\30\20\1\27"+
"\27\20\2\12\1\0\22\12\4\0\2\30\1\0\1\12"+
"\1\31\2\30\1\32\3\30\1\33\4\30\1\34\1\30"+
"\1\35\2\30\1\36\1\0\2\36\2\0\1\14\56\0"+
"\1\17\1\20\1\0\27\20\11\0\1\37\30\0\1\40"+
"\30\0\1\41\30\0\1\42\26\0\1\43\1\0\1\44"+
"\30\0\1\45\30\0\1\46\17\0\2\30\1\0\1\47"+
"\21\30\1\36\1\0\2\36\2\30\1\0\1\47\1\30"+
"\1\50\17\30\1\36\1\0\2\36\2\30\1\0\1\47"+
"\2\30\1\51\3\30\1\52\12\30\1\36\1\0\2\36"+
"\2\30\1\0\1\47\12\30\1\53\6\30\1\36\1\0"+
"\2\36\2\30\1\0\1\47\4\30\1\54\14\30\1\36"+
"\1\0\2\36\2\30\1\0\1\47\4\30\1\55\14\30"+
"\1\36\1\0\4\36\1\0\1\56\22\36\1\0\2\36"+
"\7\0\1\57\30\0\1\60\30\0\1\61\34\0\1\62"+
"\6\0\1\63\14\0\1\64\26\0\1\65\33\0\1\66"+
"\41\0\1\67\10\0\2\30\1\0\1\47\2\30\1\70"+
"\16\30\1\36\1\0\2\36\2\30\1\0\1\47\12\30"+
"\1\71\6\30\1\36\1\0\2\36\2\30\1\0\1\47"+
"\7\30\1\72\11\30\1\36\1\0\2\36\2\30\1\0"+
"\1\47\17\30\1\73\1\30\1\36\1\0\2\36\2\30"+
"\1\0\1\47\1\30\1\74\17\30\1\36\1\0\2\36"+
"\2\30\1\0\1\47\7\30\1\73\11\30\1\36\1\0"+
"\2\36\12\0\1\75\30\0\1\76\24\0\1\77\40\0"+
"\1\100\22\0\1\101\36\0\1\102\17\0\1\103\31\0"+
"\1\104\32\0\1\105\20\0\2\30\1\0\1\47\3\30"+
"\1\106\15\30\1\36\1\0\2\36\2\30\1\0\1\47"+
"\1\30\1\107\17\30\1\36\1\0\2\36\2\30\1\0"+
"\1\47\10\30\1\110\1\111\1\112\6\30\1\36\1\0"+
"\2\36\2\30\1\0\1\47\11\30\1\113\7\30\1\36"+
"\1\0\2\36\2\30\1\0\1\47\2\30\1\114\16\30"+
"\1\36\1\0\2\36\13\0\1\115\30\0\1\116\33\0"+
"\1\117\35\0\1\120\20\0\1\120\22\0\1\121\31\0"+
"\1\122\40\0\1\123\17\0\1\124\23\0\2\30\1\0"+
"\1\47\1\30\1\125\17\30\1\36\1\0\2\36\2\30"+
"\1\0\1\126\5\30\1\127\13\30\1\36\1\0\2\36"+
"\2\30\1\0\1\47\6\30\1\130\12\30\1\36\1\0"+
"\2\36\2\30\1\0\1\47\3\30\1\130\15\30\1\36"+
"\1\0\2\36\2\30\1\0\1\47\13\30\1\131\5\30"+
"\1\36\1\0\2\36\2\30\1\0\1\47\3\30\1\132"+
"\15\30\1\36\1\0\2\36\2\30\1\0\1\47\15\30"+
"\1\133\3\30\1\36\1\0\2\36\14\0\1\134\1\135"+
"\31\0\1\136\17\0\1\137\40\0\1\140\16\0\1\141"+
"\5\0\1\142\26\0\1\143\26\0\1\144\31\0\1\145"+
"\22\0\2\30\1\0\1\47\4\30\1\146\14\30\1\36"+
"\1\0\2\36\2\30\1\0\1\47\12\30\1\147\6\30"+
"\1\36\1\0\2\36\2\30\1\0\1\150\21\30\1\36"+
"\1\0\2\36\2\30\1\0\1\47\14\30\1\151\4\30"+
"\1\36\1\0\2\36\2\30\1\0\1\152\21\30\1\36"+
"\1\0\2\36\2\30\1\0\1\47\17\30\1\153\1\30"+
"\1\36\1\0\2\36\12\0\1\154\25\0\1\154\40\0"+
"\1\155\14\0\1\156\5\0\1\157\26\0\1\160\37\0"+
"\1\161\17\0\1\162\26\0\1\163\5\0\1\164\40\0"+
"\1\165\7\0\2\30\1\0\1\166\21\30\1\36\1\0"+
"\2\36\2\30\1\0\1\47\11\30\1\167\7\30\1\36"+
"\1\0\2\36\1\170\1\12\1\171\22\170\4\171\2\30"+
"\1\0\1\47\1\30\1\172\17\30\1\36\1\0\2\36"+
"\2\30\1\0\1\47\20\30\1\173\1\36\1\0\2\36"+
"\3\0\1\174\45\0\1\175\26\0\1\176\15\0\1\177"+
"\42\0\1\200\23\0\1\201\36\0\1\202\35\0\1\203"+
"\5\0\2\30\1\0\1\47\15\30\1\204\3\30\1\36"+
"\1\0\2\36\1\170\1\205\1\171\22\170\5\171\1\206"+
"\27\171\2\207\1\210\1\47\21\207\4\210\2\30\1\0"+
"\1\47\1\30\1\211\17\30\1\36\1\0\2\36\5\0"+
"\1\212\40\0\1\213\34\0\1\214\12\0\1\215\42\0"+
"\1\216\37\0\1\217\4\0\2\30\1\0\1\47\1\30"+
"\1\220\17\30\1\36\1\0\2\36\2\12\1\0\6\12"+
"\1\221\13\12\15\0\1\222\17\0\2\207\1\210\1\223"+
"\21\207\7\210\1\224\25\210\2\30\1\0\1\225\21\30"+
"\1\36\1\0\2\36\3\0\1\226\46\0\1\227\14\0"+
"\1\230\44\0\1\231\14\0\1\232\23\0\2\30\1\0"+
"\1\126\21\30\1\36\1\0\2\36\2\12\1\0\4\12"+
"\1\233\15\12\13\0\1\234\26\0\1\235\26\0\1\141"+
"\32\0\1\236\26\0\1\237\25\0\2\12\1\0\7\12"+
"\1\240\12\12\16\0\1\241\21\0\1\156\30\0\1\163"+
"\25\0\2\12\1\0\10\12\1\242\11\12\17\0\1\243"+
"\15\0\2\12\1\0\11\12\1\244\1\245\7\12\20\0"+
"\1\246\1\247\13\0\2\12\1\0\7\12\1\250\12\12"+
"\4\0\2\12\1\0\4\12\1\250\15\12\16\0\1\251"+
"\25\0\1\251\21\0\2\12\1\0\1\47\21\12\7\0"+
"\1\56\25\0";
private static int [] zzUnpackTrans() {
int [] result = new int[3775];
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 =
"\2\0\1\10\6\0\2\1\2\11\20\1\11\0\7\1"+
"\1\11\11\0\5\1\11\0\7\1\10\0\7\1\5\0"+
"\1\11\4\0\6\1\2\0\1\11\4\0\1\11\2\0"+
"\3\1\1\0\2\1\1\11\2\0\1\11\4\0\2\1"+
"\1\0\1\1\1\0\1\1\3\0\1\11\2\0\2\1"+
"\1\0\1\1\1\11\1\1\1\11\4\0\1\1\3\0"+
"\1\11\1\1\1\0\1\1\1\0\2\1\2\0\1\1"+
"\1\0";
private static int [] zzUnpackAttribute() {
int [] result = new int[169];
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[] = new char[ZZ_BUFFERSIZE];
/** the textposition at the last accepting state */
private int zzMarkedPos;
/** 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;
/** denotes if the user-EOF-code has already been executed */
private boolean zzEOFDone;
/* user code: */
private static final boolean DBG = false;
public static final int IGNORE = 0;
public static final int ACCEPT = 1;
public String match() {
return yytext();
}
private static void reportError(String yytext) {
try {
PrintWriter p = new PrintWriter(new OutputStreamWriter(System.err,
"GB18030"), true);
p.println("chtbl.flex tokenization error: \"" + yytext + "\"");
if (yytext.length() >= 1) {
p.println("First character is: " + yytext.charAt(0));
if (yytext.length() >= 2) {
p.println("Second character is: " + yytext.charAt(1));
}
}
} catch (UnsupportedEncodingException e) {
System.err.println("chtbl.flex tokenization and encoding present error");
}
}
/**
* 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.
*/
CHTBLexer(java.io.Reader in) {
this.zzReader = 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.
*/
CHTBLexer(java.io.InputStream in) {
this(new java.io.InputStreamReader
(in, java.nio.charset.Charset.forName("UTF-8")));
}
/**
* Unpacks the compressed character translation table.
*
* @param packed the packed character translation table
* @return the unpacked character translation table
*/
private static char [] zzUnpackCMap(String packed) {
char [] map = new char[0x10000];
int i = 0; /* index in packed string */
int j = 0; /* index in unpacked array */
while (i < 88) {
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 java.io.IOException if any I/O-Error occurs
*/
private boolean zzRefill() throws java.io.IOException {
/* first: make room (if you can) */
if (zzStartRead > 0) {
System.arraycopy(zzBuffer, zzStartRead,
zzBuffer, 0,
zzEndRead-zzStartRead);
/* translate stored positions */
zzEndRead-= zzStartRead;
zzCurrentPos-= zzStartRead;
zzMarkedPos-= zzStartRead;
zzStartRead = 0;
}
/* is the buffer big enough? */
if (zzCurrentPos >= zzBuffer.length) {
/* if not: blow it up */
char newBuffer[] = new char[zzCurrentPos*2];
System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
zzBuffer = newBuffer;
}
/* finally: fill the buffer with new input */
int numRead = zzReader.read(zzBuffer, zzEndRead,
zzBuffer.length-zzEndRead);
if (numRead > 0) {
zzEndRead+= numRead;
return false;
}
// unlikely but not impossible: read 0 characters, but not at end of stream
if (numRead == 0) {
int c = zzReader.read();
if (c == -1) {
return true;
} else {
zzBuffer[zzEndRead++] = (char) c;
return false;
}
}
// numRead < 0
return true;
}
/**
* Closes the input stream.
*/
public final void yyclose() throws java.io.IOException {
zzAtEOF = true; /* indicate end of file */
zzEndRead = zzStartRead; /* invalidate buffer */
if (zzReader != null)
zzReader.close();
}
/**
* 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>ZZ_INITIAL</tt>.
*
* Internal scan buffer is resized down to its initial length, if it has grown.
*
* @param reader the new input stream
*/
public final void yyreset(java.io.Reader reader) {
zzReader = reader;
zzAtBOL = true;
zzAtEOF = false;
zzEOFDone = false;
zzEndRead = zzStartRead = 0;
zzCurrentPos = zzMarkedPos = 0;
yyline = yychar = yycolumn = 0;
zzLexicalState = YYINITIAL;
if (zzBuffer.length > ZZ_BUFFERSIZE)
zzBuffer = new char[ZZ_BUFFERSIZE];
}
/**
* Returns the current lexical state.
*/
public final int yystate() {
return zzLexicalState;
}
/**
* Enters a new lexical state
*
* @param newState the new lexical state
*/
public final void yybegin(int newState) {
zzLexicalState = newState;
}
/**
* Returns the text matched by the current regular expression.
*/
public final String yytext() {
return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
}
/**
* Returns the character at position <tt>pos</tt> from the
* matched text.
*
* It is equivalent to yytext().charAt(pos), but faster
*
* @param pos the position of the character to fetch.
* A value from 0 to yylength()-1.
*
* @return the character at position pos
*/
public final char yycharat(int pos) {
return zzBuffer[zzStartRead+pos];
}
/**
* Returns the length of the matched text region.
*/
public final int yylength() {
return zzMarkedPos-zzStartRead;
}
/**
* 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
*/
private void zzScanError(int errorCode) {
String message;
try {
message = ZZ_ERROR_MSG[errorCode];
}
catch (ArrayIndexOutOfBoundsException e) {
message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
}
throw new Error(message);
}
/**
* 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()!
*/
public void yypushback(int number) {
if ( number > yylength() )
zzScanError(ZZ_PUSHBACK_2BIG);
zzMarkedPos -= number;
}
/**
* 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 java.io.IOException if any I/O-Error occurs
*/
public int yylex() throws java.io.IOException {
int zzInput;
int zzAction;
// cached fields:
int zzCurrentPosL;
int zzMarkedPosL;
int zzEndReadL = zzEndRead;
char [] zzBufferL = zzBuffer;
char [] zzCMapL = ZZ_CMAP;
int [] zzTransL = ZZ_TRANS;
int [] zzRowMapL = ZZ_ROWMAP;
int [] zzAttrL = ZZ_ATTRIBUTE;
while (true) {
zzMarkedPosL = zzMarkedPos;
zzAction = -1;
zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
zzState = ZZ_LEXSTATE[zzLexicalState];
// set up zzAction for empty match case:
int zzAttributes = zzAttrL[zzState];
if ( (zzAttributes & 1) == 1 ) {
zzAction = zzState;
}
zzForAction: {
while (true) {
if (zzCurrentPosL < zzEndReadL)
zzInput = zzBufferL[zzCurrentPosL++];
else if (zzAtEOF) {
zzInput = YYEOF;
break zzForAction;
}
else {
// store back cached positions
zzCurrentPos = zzCurrentPosL;
zzMarkedPos = zzMarkedPosL;
boolean eof = zzRefill();
// get translated positions and possibly new buffer
zzCurrentPosL = zzCurrentPos;
zzMarkedPosL = zzMarkedPos;
zzBufferL = zzBuffer;
zzEndReadL = zzEndRead;
if (eof) {
zzInput = YYEOF;
break zzForAction;
}
else {
zzInput = zzBufferL[zzCurrentPosL++];
}
}
int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
if (zzNext == -1) break zzForAction;
zzState = zzNext;
zzAttributes = zzAttrL[zzState];
if ( (zzAttributes & 1) == 1 ) {
zzAction = zzState;
zzMarkedPosL = zzCurrentPosL;
if ( (zzAttributes & 8) == 8 ) break zzForAction;
}
}
}
// store back cached position
zzMarkedPos = zzMarkedPosL;
switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
case 1:
{ if (DBG) System.err.printf("Accepting |%s|, staying in YYINITIAL%n", yytext());
return ACCEPT;
}
case 19: break;
case 2:
{ return IGNORE;
}
case 20: break;
case 3:
{ reportError(yytext());
}
case 21: break;
case 4:
{ if (DBG) System.err.printf("Ignoring |%s|, staying in YYINITIAL%n", yytext());
return IGNORE;
}
case 22: break;
case 5:
{ if (DBG) System.err.printf("Ignoring |%s|, moving to DATETIME%n", yytext());
yybegin(DATETIME); return IGNORE;
}
case 23: break;
case 6:
{ yybegin(DATEINHEADER); return IGNORE;
}
case 24: break;
case 7:
{ if (DBG) System.err.printf("Ignoring |%s|, moving to DOCNO%n", yytext());
yybegin(DOCNO); return IGNORE;
}
case 25: break;
case 8:
{ if (DBG) System.err.printf("Ignoring |%s|, moving to SRCID%n", yytext());
yybegin(SRCID); return IGNORE;
}
case 26: break;
case 9:
{ //System.err.println("Transitioning to YYINITIAL");
yybegin(YYINITIAL); return IGNORE;
}
case 27: break;
case 10:
{ yybegin(HEADER); return IGNORE;
}
case 28: break;
case 11:
{ if (DBG) System.err.printf("Ignoring |%s|, moving to HEADER%n", yytext());
yybegin(HEADER); return IGNORE;
}
case 29: break;
case 12:
{ // System.err.println("Transitioning to YYINITIAL");
yybegin(YYINITIAL); return IGNORE;
}
case 30: break;
case 13:
{ //System.err.println("In SRCID; Transitioning to YYINITIAL");
yybegin(YYINITIAL); return IGNORE;
}
case 31: break;
case 14:
{ //System.err.println("Transitioning to YYINITIAL");
yybegin(YYINITIAL); return IGNORE;
}
case 32: break;
case 15:
{ if (DBG) System.err.printf("Ignoring |%s|, moving to DOCTYPE%n", yytext());
yybegin(DOCTYPE); return IGNORE;
}
case 33: break;
case 16:
{ if (DBG) System.err.printf("Ignoring |%s|, moving to PREAMBLE%n", yytext());
yybegin(PREAMBLE); return IGNORE;
}
case 34: break;
case 17:
{ //System.err.println("Transitioning to YYINITIAL");
yybegin(YYINITIAL); return IGNORE;
}
case 35: break;
case 18:
{ yybegin(YYINITIAL); return IGNORE;
}
case 36: break;
default:
if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
zzAtEOF = true;
return YYEOF;
}
else {
zzScanError(ZZ_NO_MATCH);
}
}
}
}
}