import java.io.IOException;
@javax.annotation.Generated("JFlex")
-@SuppressWarnings("fallthrough")
%%
%public
%unicode
%char
%type void
-%switch
%{
openclose = [(){}\[\]]
-operator = [=;,.><!~?:+-*/%&|\^] | ">>" | "<<" | "and" | "and_eq" | "bitand" | "bitor" | "compl" | "not" | "not_eq" | "operator" | "or" | "or_eq" | "typeid" | "xor" | "xor_eq"
+operator = [!%&*+,-./:;<=>?~|\^] | ">>" | "<<" | "and" | "and_eq" | "bitand" | "bitor" | "compl" | "not" | "not_eq" | "operator" | "or" | "or_eq" | "typeid" | "xor" | "xor_eq"
%%
import java.io.StringReader;
@javax.annotation.Generated("JFlex")
-@SuppressWarnings("fallthrough")
%%
%public
%char
%type void
-%switch
-
%{
private static String currentName;
private static StringBuilder htmlBuffer = new StringBuilder(512);
import org.scilab.modules.helptools.c.AbstractCCodeHandler;
-@javax.annotation.Generated("JFlex")
-@SuppressWarnings("fallthrough")
+@javax.annotation.Generated("JFlex"))
%%
%public
openclose = [(){}\[\]]
-operator = [=;,.><!~?:+-*/%&|\^] | ">>" | "<<" | ">>>"
+operator = [!%&*+,-./:;<=>?~|\^] | ">>" | "<<" | ">>>"
%%
import java.io.IOException;
@javax.annotation.Generated("JFlex")
-@SuppressWarnings("fallthrough")
%%
%public
%unicode
%char
%type void
-%switch
%{
private static Set<String> commands;
import java.io.IOException;
@javax.annotation.Generated("JFlex")
-@SuppressWarnings("fallthrough")
%%
%public
%unicode
%char
%type void
-%switch
%{
-/* The following code was generated by JFlex 1.4.3 on 23/05/12 15:21 */
+// DO NOT EDIT
+// Generated by JFlex 1.8.2 http://jflex.de/
+// source: jflex/function.jflex
//CHECKSTYLE:OFF
import java.io.StringReader;
@javax.annotation.Generated("JFlex")
-@SuppressWarnings("fallthrough")
-
-/**
- * This class is a scanner generated by
- * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
- * on 23/05/12 15:21 from the specification file
- * <tt>./jflex/function.jflex</tt>
- */
+
+// See https://github.com/jflex-de/jflex/issues/222
+@SuppressWarnings("FallThrough")
public final class SynopsisLexer {
- /** 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, 0
- };
-
- /**
- * Translates characters to character classes
- */
- private static final String ZZ_CMAP_PACKED =
- "\11\0\1\1\1\3\2\0\1\2\22\0\1\1\1\6\1\12\1\6" +
- "\1\7\1\4\1\11\1\13\7\0\1\10\12\5\2\0\1\14\1\0" +
- "\1\15\1\6\1\0\32\6\4\0\1\6\1\0\32\6\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\1\1\1\2\2\3\1\4\2\1\1\5\1\6" +
- "\1\7\1\10\1\11\1\4\1\12";
-
- private static int [] zzUnpackAction() {
- int [] result = new int[15];
- int offset = 0;
- offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
- return result;
+ /** 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, 0
+ };
+
+ /**
+ * Top-level table for translating characters to character classes
+ */
+ private static final int [] ZZ_CMAP_TOP = zzUnpackcmap_top();
+
+ private static final String ZZ_CMAP_TOP_PACKED_0 =
+ "\1\0\u10ff\u0100";
+
+ private static int [] zzUnpackcmap_top() {
+ int [] result = new int[4352];
+ int offset = 0;
+ offset = zzUnpackcmap_top(ZZ_CMAP_TOP_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackcmap_top(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);
}
-
- 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;
+ return j;
+ }
+
+
+ /**
+ * Second-level tables for translating characters to character classes
+ */
+ private static final int [] ZZ_CMAP_BLOCKS = zzUnpackcmap_blocks();
+
+ private static final String ZZ_CMAP_BLOCKS_PACKED_0 =
+ "\11\0\1\1\1\2\2\0\1\3\22\0\1\1\1\4"+
+ "\1\5\1\4\1\6\1\7\1\10\1\11\7\0\1\12"+
+ "\12\13\2\0\1\14\1\0\1\15\1\4\1\0\32\4"+
+ "\4\0\1\4\1\0\32\4\u0185\0";
+
+ private static int [] zzUnpackcmap_blocks() {
+ int [] result = new int[512];
+ int offset = 0;
+ offset = zzUnpackcmap_blocks(ZZ_CMAP_BLOCKS_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackcmap_blocks(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 DFA states to action switch labels.
+ */
+ private static final int [] ZZ_ACTION = zzUnpackAction();
+
+ private static final String ZZ_ACTION_PACKED_0 =
+ "\1\0\1\1\1\2\2\3\1\4\1\5\1\1\1\6"+
+ "\1\7\1\1\1\10\1\11\1\4\1\12";
+
+ private static int [] zzUnpackAction() {
+ int [] result = new int[15];
+ 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\16\0\34\0\52\0\70\0\106\0\124\0\142"+
+ "\0\124\0\124\0\160\0\124\0\124\0\142\0\176";
+
+ private static int [] zzUnpackRowMap() {
+ int [] result = new int[15];
+ 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\2\1\3\1\4\1\5\1\6\1\7\1\10\1\6"+
+ "\1\11\1\12\1\13\1\2\1\14\1\15\2\2\4\0"+
+ "\1\2\4\0\1\2\2\0\1\2\1\3\4\0\1\2"+
+ "\4\0\1\2\3\0\1\4\15\0\2\4\17\0\1\6"+
+ "\1\0\1\6\4\0\1\6\20\0\2\2\2\0\1\6"+
+ "\1\0\1\16\4\0\1\16\14\0\1\17\3\0\2\17"+
+ "\2\0\12\17";
+
+ private static int [] zzUnpackTrans() {
+ int [] result = new int[140];
+ 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 code for "Unknown internal scanner error". */
+ private static final int ZZ_UNKNOWN_ERROR = 0;
+ /** Error code for "could not match input". */
+ private static final int ZZ_NO_MATCH = 1;
+ /** Error code for "pushback value was too large". */
+ private static final int ZZ_PUSHBACK_2BIG = 2;
+
+ /**
+ * Error messages for {@link #ZZ_UNKNOWN_ERROR}, {@link #ZZ_NO_MATCH}, and
+ * {@link #ZZ_PUSHBACK_2BIG} respectively.
+ */
+ private static final String ZZ_ERROR_MSG[] = {
+ "Unknown internal scanner error",
+ "Error: could not match input",
+ "Error: pushback value was too large"
+ };
+
+ /**
+ * ZZ_ATTRIBUTE[aState] contains the attributes of state {@code aState}
+ */
+ private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+ private static final String ZZ_ATTRIBUTE_PACKED_0 =
+ "\1\0\5\1\1\11\1\1\2\11\1\1\2\11\2\1";
+
+ private static int [] zzUnpackAttribute() {
+ int [] result = new int[15];
+ 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;
+ }
+ /** Input device. */
+ private java.io.Reader zzReader;
- /* 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"
- };
-
- /** the input device */
- private java.io.Reader zzReader;
+ /** Current state of the DFA. */
+ private int zzState;
- /** the current state of the DFA */
- private int zzState;
+ /** Current lexical state. */
+ private int zzLexicalState = YYINITIAL;
- /** the current lexical state */
- private int zzLexicalState = YYINITIAL;
+ /**
+ * This buffer contains the current text to be matched and is the source of the {@link #yytext()}
+ * string.
+ */
+ private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
- /** this buffer contains the current text to be matched and is
- the source of the yytext() string */
- private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+ /** Text position at the last accepting state. */
+ private int zzMarkedPos;
- /** the textposition at the last accepting state */
- private int zzMarkedPos;
+ /** Current text position in the buffer. */
+ private int zzCurrentPos;
- /** the current text position in the buffer */
- private int zzCurrentPos;
+ /** Marks the beginning of the {@link #yytext()} string in the buffer. */
+ private int zzStartRead;
- /** startRead marks the beginning of the yytext() string in the buffer */
- private int zzStartRead;
+ /** Marks the last character in the buffer, that has been read from input. */
+ private int zzEndRead;
- /** endRead marks the last character in the buffer, that has been read
- from input */
- private int zzEndRead;
+ /**
+ * Whether the scanner is at the end of file.
+ * @see #yyatEOF
+ */
+ private boolean zzAtEOF;
- /** number of newlines encountered up to the start of the matched text */
- private int yyline;
+ /**
+ * The number of occupied positions in {@link #zzBuffer} beyond {@link #zzEndRead}.
+ *
+ * <p>When a lead/high surrogate has been read from the input stream into the final
+ * {@link #zzBuffer} position, this will have a value of 1; otherwise, it will have a value of 0.
+ */
+ private int zzFinalHighSurrogate = 0;
- /** the number of characters up to the start of the matched text */
- private int yychar;
+ /** Number of newlines encountered up to the start of the matched text. */
+ @SuppressWarnings("unused")
+ private int yyline;
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- private int yycolumn;
+ /** Number of characters from the last newline up to the start of the matched text. */
+ @SuppressWarnings("unused")
+ private int yycolumn;
- /**
- * zzAtBOL == true <=> the scanner is currently at the beginning of a line
- */
- private boolean zzAtBOL = true;
+ /** Number of characters up to the start of the matched text. */
+ private long yychar;
- /** zzAtEOF == true <=> the scanner is at the EOF */
- private boolean zzAtEOF;
+ /** Whether the scanner is currently at the beginning of a line. */
+ @SuppressWarnings("unused")
+ private boolean zzAtBOL = true;
- /** denotes if the user-EOF-code has already been executed */
- private boolean zzEOFDone;
+ /** Whether the user-EOF-code has already been executed. */
+ @SuppressWarnings("unused")
+ private boolean zzEOFDone;
- /* user code: */
+ /* user code: */
private static String currentName;
private static StringBuilder htmlBuffer = new StringBuilder(512);
private static SynopsisLexer lexer = new SynopsisLexer();
currentName = name;
try {
lexer.yyreset(new StringReader(str.trim()));
- lexer.yybegin(YYINITIAL);
+ lexer.yybegin(YYINITIAL);
htmlBuffer.setLength(0);
- lexer.yylex();
-
- return htmlBuffer.toString();
+ lexer.yylex();
+
+ return htmlBuffer.toString();
} catch (IOException e) {
return null;
}
- /**
- * 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.
- */
- public SynopsisLexer(java.io.Reader in) {
- this.zzReader = in;
+ /**
+ * Creates a new scanner
+ *
+ * @param in the java.io.Reader to read input from.
+ */
+ public SynopsisLexer(java.io.Reader in) {
+ this.zzReader = in;
+ }
+
+ /**
+ * Translates raw input code points to DFA table row
+ */
+ private static int zzCMap(int input) {
+ int offset = input & 255;
+ return offset == input ? ZZ_CMAP_BLOCKS[offset] : ZZ_CMAP_BLOCKS[ZZ_CMAP_TOP[input >> 8] | offset];
+ }
+
+ /**
+ * Refills the input buffer.
+ *
+ * @return {@code false} 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) {
+ zzEndRead += zzFinalHighSurrogate;
+ zzFinalHighSurrogate = 0;
+ System.arraycopy(zzBuffer, zzStartRead,
+ zzBuffer, 0,
+ zzEndRead - zzStartRead);
+
+ /* translate stored positions */
+ zzEndRead -= zzStartRead;
+ zzCurrentPos -= zzStartRead;
+ zzMarkedPos -= zzStartRead;
+ zzStartRead = 0;
}
- /**
- * Creates a new scanner.
- * There is also java.io.Reader version of this constructor.
- *
- * @param in the java.io.Inputstream to read input from.
- */
- public SynopsisLexer(java.io.InputStream in) {
- this(new java.io.InputStreamReader(in));
- }
-
- /**
- * 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 < 58) {
- int count = packed.charAt(i++);
- char value = packed.charAt(i++);
- do {
- map[j++] = value;
- } while (--count > 0);
- }
- return map;
+ /* is the buffer big enough? */
+ if (zzCurrentPos >= zzBuffer.length - zzFinalHighSurrogate) {
+ /* if not: blow it up */
+ char newBuffer[] = new char[zzBuffer.length * 2];
+ System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+ zzBuffer = newBuffer;
+ zzEndRead += zzFinalHighSurrogate;
+ zzFinalHighSurrogate = 0;
}
+ /* fill the buffer with new input */
+ int requested = zzBuffer.length - zzEndRead;
+ int numRead = zzReader.read(zzBuffer, zzEndRead, requested);
- /**
- * 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;
+ /* not supposed to occur according to specification of java.io.Reader */
+ if (numRead == 0) {
+ throw new java.io.IOException(
+ "Reader returned 0 characters. See JFlex examples/zero-reader for a workaround.");
}
-
-
- /**
- * 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();
+ if (numRead > 0) {
+ zzEndRead += numRead;
+ if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
+ if (numRead == requested) { // We requested too few chars to encode a full Unicode character
+ --zzEndRead;
+ zzFinalHighSurrogate = 1;
+ } else { // There is room in the buffer for at least one more char
+ int c = zzReader.read(); // Expecting to read a paired low surrogate char
+ if (c == -1) {
+ return true;
+ } else {
+ zzBuffer[zzEndRead++] = (char)c;
+ }
}
+ }
+ /* potentially more input available */
+ return false;
}
+ /* numRead < 0 ==> end of stream */
+ return true;
+ }
- /**
- * 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>.
- *
- * @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;
- }
+ /**
+ * Closes the input reader.
+ *
+ * @throws java.io.IOException if the reader could not be closed.
+ */
+ public final void yyclose() throws java.io.IOException {
+ zzAtEOF = true; // indicate end of file
+ zzEndRead = zzStartRead; // invalidate buffer
- /**
- * Returns the current lexical state.
- */
- public final int yystate() {
- return zzLexicalState;
+ if (zzReader != null) {
+ zzReader.close();
}
-
-
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- public final void yybegin(int newState) {
- zzLexicalState = newState;
+ }
+
+
+ /**
+ * Resets the scanner to read from a new input stream.
+ *
+ * <p>Does not close the old reader.
+ *
+ * <p>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 {@code ZZ_INITIAL}.
+ *
+ * <p>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;
+ zzEOFDone = false;
+ yyResetPosition();
+ zzLexicalState = YYINITIAL;
+ if (zzBuffer.length > ZZ_BUFFERSIZE) {
+ zzBuffer = new char[ZZ_BUFFERSIZE];
+ }
+ }
+
+ /**
+ * Resets the input position.
+ */
+ private final void yyResetPosition() {
+ zzAtBOL = true;
+ zzAtEOF = false;
+ zzCurrentPos = 0;
+ zzMarkedPos = 0;
+ zzStartRead = 0;
+ zzEndRead = 0;
+ zzFinalHighSurrogate = 0;
+ yyline = 0;
+ yycolumn = 0;
+ yychar = 0L;
+ }
+
+
+ /**
+ * Returns whether the scanner has reached the end of the reader it reads from.
+ *
+ * @return whether the scanner has reached EOF.
+ */
+ public final boolean yyatEOF() {
+ return zzAtEOF;
+ }
+
+
+ /**
+ * Returns the current lexical state.
+ *
+ * @return 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.
+ *
+ * @return the matched text.
+ */
+ public final String yytext() {
+ return new String(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);
+ }
+
+
+ /**
+ * Returns the character at the given position from the matched text.
+ *
+ * <p>It is equivalent to {@code yytext().charAt(pos)}, but faster.
+ *
+ * @param position the position of the character to fetch. A value from 0 to {@code yylength()-1}.
+ *
+ * @return the character at {@code position}.
+ */
+ public final char yycharat(int position) {
+ return zzBuffer[zzStartRead + position];
+ }
+
+
+ /**
+ * How many characters were matched.
+ *
+ * @return the length of the matched text region.
+ */
+ public final int yylength() {
+ return zzMarkedPos-zzStartRead;
+ }
+
+
+ /**
+ * Reports an error that occurred while scanning.
+ *
+ * <p>In a well-formed scanner (no or only correct usage of {@code yypushback(int)} and a
+ * match-all fallback rule) this method will only be called with things that
+ * "Can't Possibly Happen".
+ *
+ * <p>If this method is called, something is seriously wrong (e.g. a JFlex bug producing a faulty
+ * scanner etc.).
+ *
+ * <p>Usual syntax/scanner level error handling should be done in error fallback rules.
+ *
+ * @param errorCode the code of the error message to display.
+ */
+ private static 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);
+ }
- /**
- * Returns the text matched by the current regular expression.
- */
- public final String yytext() {
- return new String( zzBuffer, zzStartRead, zzMarkedPos - zzStartRead );
- }
+ /**
+ * Pushes the specified amount of characters back into the input stream.
+ *
+ * <p>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
+ * {@link #yylength()}.
+ */
+ public void yypushback(int number) {
+ if ( number > yylength() )
+ zzScanError(ZZ_PUSHBACK_2BIG);
- /**
- * 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];
- }
+ zzMarkedPos -= number;
+ }
- /**
- * Returns the length of the matched text region.
- */
- public final int yylength() {
- return zzMarkedPos - zzStartRead;
- }
- /**
- * Reports an error that occurred 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];
- }
+ /**
+ * 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 void yylex() throws java.io.IOException {
+ int zzInput;
+ int zzAction;
- throw new Error(message);
- }
+ // cached fields:
+ int zzCurrentPosL;
+ int zzMarkedPosL;
+ int zzEndReadL = zzEndRead;
+ char[] zzBufferL = zzBuffer;
+ int [] zzTransL = ZZ_TRANS;
+ int [] zzRowMapL = ZZ_ROWMAP;
+ int [] zzAttrL = ZZ_ATTRIBUTE;
- /**
- * 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);
- }
+ while (true) {
+ zzMarkedPosL = zzMarkedPos;
- zzMarkedPos -= number;
- }
+ yychar+= zzMarkedPosL-zzStartRead;
+
+ zzAction = -1;
+ zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
- /**
- * 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 void yylex() throws java.io.IOException {
- int zzInput;
- int zzAction;
+ zzState = ZZ_LEXSTATE[zzLexicalState];
- // cached fields:
- int zzCurrentPosL;
- int zzMarkedPosL;
- int zzEndReadL = zzEndRead;
- char [] zzBufferL = zzBuffer;
- char [] zzCMapL = ZZ_CMAP;
+ // set up zzAction for empty match case:
+ int zzAttributes = zzAttrL[zzState];
+ if ( (zzAttributes & 1) == 1 ) {
+ zzAction = zzState;
+ }
+ zzForAction: {
while (true) {
- zzMarkedPosL = zzMarkedPos;
-
- yychar += zzMarkedPosL - zzStartRead;
-
- zzAction = -1;
-
- zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
-
- zzState = ZZ_LEXSTATE[zzLexicalState];
-
-
- 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++];
- }
- }
- zzInput = zzCMapL[zzInput];
-
- boolean zzIsFinal = false;
- boolean zzNoLookAhead = false;
-
- zzForNext: {
- switch (zzState) {
- case 0:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- zzState = 2;
- break zzForNext;
- case 2:
- zzIsFinal = true;
- zzState = 3;
- break zzForNext;
- case 3:
- zzIsFinal = true;
- zzState = 4;
- break zzForNext;
- case 4:
- case 6:
- zzIsFinal = true;
- zzState = 5;
- break zzForNext;
- case 7:
- zzIsFinal = true;
- zzState = 6;
- break zzForNext;
- case 8:
- zzIsFinal = true;
- zzState = 7;
- break zzForNext;
- case 9:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 8;
- break zzForNext;
- case 10:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 9;
- break zzForNext;
- case 11:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 10;
- break zzForNext;
- case 12:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 11;
- break zzForNext;
- case 13:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 12;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzState = 1;
- break zzForNext;
- }
-
- case 1:
- switch (zzInput) {
- case 0:
- case 1:
- case 5:
- case 7:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 2:
- switch (zzInput) {
- case 0:
- case 5:
- case 7:
- zzIsFinal = true;
- zzState = 1;
- break zzForNext;
- case 1:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 3:
- switch (zzInput) {
- case 1:
- case 3:
- zzIsFinal = true;
- zzState = 4;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 4:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 5:
- switch (zzInput) {
- case 5:
- case 6:
- case 7:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 6:
- switch (zzInput) {
- case 0:
- case 1:
- zzIsFinal = true;
- zzState = 1;
- break zzForNext;
- case 6:
- zzIsFinal = true;
- zzState = 5;
- break zzForNext;
- case 5:
- case 7:
- zzIsFinal = true;
- zzState = 13;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 7:
- switch (zzInput) {
- case 8:
- zzIsFinal = true;
- zzState = 14;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 13:
- switch (zzInput) {
- case 0:
- case 1:
- zzIsFinal = true;
- zzState = 1;
- break zzForNext;
- case 6:
- zzIsFinal = true;
- zzState = 5;
- break zzForNext;
- case 5:
- case 7:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 14:
- switch (zzInput) {
- case 2:
- case 3:
- break zzForAction;
- default:
- zzIsFinal = true;
- break zzForNext;
- }
-
- default:
- // if this is ever reached, there is a serious bug in JFlex
- zzScanError(ZZ_UNKNOWN_ERROR);
- break;
- }
- }
-
- if ( zzIsFinal ) {
- zzAction = zzState;
- zzMarkedPosL = zzCurrentPosL;
- if ( zzNoLookAhead ) {
- break zzForAction;
- }
- }
-
- }
+
+ if (zzCurrentPosL < zzEndReadL) {
+ zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
+ zzCurrentPosL += Character.charCount(zzInput);
+ }
+ 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 = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
+ zzCurrentPosL += Character.charCount(zzInput);
}
+ }
+ int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMap(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 10 : {
- htmlBuffer.append("<span class=\"comment\">");
- htmlBuffer.append(yytext());
- htmlBuffer.append("</span>");
- }
- case 11:
- break;
- case 9: {
- htmlBuffer.append(">");
- }
- case 12:
- break;
- case 2: {
- htmlBuffer.append(" ");
- }
- case 13:
- break;
- case 3: {
- htmlBuffer.append("\n");
- }
- case 14:
- break;
- case 6: {
- htmlBuffer.append(""");
- }
- case 15:
- break;
- case 5: {
- htmlBuffer.append("&");
- }
- case 16:
- break;
- case 4: {
- String str = yytext();
- if (str.equals(currentName)) {
- htmlBuffer.append("<span class=\"functionid\">");
- } else {
- htmlBuffer.append("<span class=\"default\">");
- }
- htmlBuffer.append(str);
- htmlBuffer.append("</span>");
- }
- case 17:
- break;
- case 8: {
- htmlBuffer.append("<");
- }
- case 18:
- break;
- case 1: {
- htmlBuffer.append("<span class=\"default\">");
- htmlBuffer.append(yytext());
- htmlBuffer.append("</span>");
- }
- case 19:
- break;
- case 7: {
- htmlBuffer.append("'");
- }
- case 20:
- break;
- default:
- if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
- zzAtEOF = true;
- {
- return;
- }
- } else {
- zzScanError(ZZ_NO_MATCH);
- }
+ }
+ }
+
+ // store back cached position
+ zzMarkedPos = zzMarkedPosL;
+
+ if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+ zzAtEOF = true;
+ { return;
+ }
+ }
+ else {
+ switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+ case 1:
+ { htmlBuffer.append("<span class=\"default\">");
+ htmlBuffer.append(yytext());
+ htmlBuffer.append("</span>");
+ }
+ // fall through
+ case 11: break;
+ case 2:
+ { htmlBuffer.append(" ");
+ }
+ // fall through
+ case 12: break;
+ case 3:
+ { htmlBuffer.append("\n");
+ }
+ // fall through
+ case 13: break;
+ case 4:
+ { String str = yytext();
+ if (str.equals(currentName)) {
+ htmlBuffer.append("<span class=\"functionid\">");
+ } else {
+ htmlBuffer.append("<span class=\"default\">");
+ }
+ htmlBuffer.append(str);
+ htmlBuffer.append("</span>");
+ }
+ // fall through
+ case 14: break;
+ case 5:
+ { htmlBuffer.append(""");
+ }
+ // fall through
+ case 15: break;
+ case 6:
+ { htmlBuffer.append("&");
+ }
+ // fall through
+ case 16: break;
+ case 7:
+ { htmlBuffer.append("'");
+ }
+ // fall through
+ case 17: break;
+ case 8:
+ { htmlBuffer.append("<");
+ }
+ // fall through
+ case 18: break;
+ case 9:
+ { htmlBuffer.append(">");
+ }
+ // fall through
+ case 19: break;
+ case 10:
+ { htmlBuffer.append("<span class=\"comment\">");
+ htmlBuffer.append(yytext());
+ htmlBuffer.append("</span>");
}
+ // fall through
+ case 20: break;
+ default:
+ zzScanError(ZZ_NO_MATCH);
}
+ }
}
+ }
}
-/* The following code was generated by JFlex 1.4.3 on 23/05/12 15:21 */
+// DO NOT EDIT
+// Generated by JFlex 1.8.2 http://jflex.de/
+// source: jflex/xml.jflex
//CHECKSTYLE:OFF
import java.io.IOException;
@javax.annotation.Generated("JFlex")
-@SuppressWarnings("fallthrough")
-
-/**
- * This class is a scanner generated by
- * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
- * on 23/05/12 15:21 from the specification file
- * <tt>./jflex/xml.jflex</tt>
- */
+
+// See https://github.com/jflex-de/jflex/issues/222
+@SuppressWarnings("FallThrough")
public final class XMLLexer {
- /** 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 CLEANFIRST = 12;
- public static final int CLEAN = 10;
- public static final int YYINITIAL = 0;
- public static final int COMMENT = 2;
- public static final int CDATA = 4;
- public static final int TAG = 6;
- public static final int PI = 8;
-
- /**
- * 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
- };
-
- /**
- * Translates characters to character classes
- */
- private static final String ZZ_CMAP_PACKED =
- "\11\0\1\1\1\15\2\0\1\15\22\0\1\1\1\13\1\27\1\3" +
- "\2\0\1\2\1\30\5\0\1\7\1\10\1\25\12\11\1\5\1\4" +
- "\1\12\1\26\1\14\1\24\1\0\1\21\1\6\1\17\1\20\1\6" +
- "\16\6\1\22\6\6\1\16\1\10\1\23\1\10\1\5\1\10\32\6" +
- "\74\10\1\10\10\10\27\5\1\10\37\5\1\10\u0208\5\160\10\16\5" +
- "\1\10\u1c81\5\14\10\2\5\63\10\57\0\u0120\5\u0a70\0\u03f0\5\21\0" +
- "\ua7ff\5\u2100\0\u04d0\5\40\0\u020e\5\2\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\1\1\2\1\3\4\0\2\1\1\0\1\4\1\2" +
- "\1\0\1\5\1\3\1\6\1\0\1\7\1\10\1\7" +
- "\1\11\1\12\3\7\1\13\1\7\1\14\1\15\1\16" +
- "\1\17\1\20\1\7\1\21\1\22\10\0\1\23\1\24" +
- "\1\0\1\25\1\0\1\26\2\0\1\27\2\0\1\30" +
- "\1\0\1\31\1\32\2\0\1\33\4\0\1\34";
-
- private static int [] zzUnpackAction() {
- int [] result = new int[66];
- int offset = 0;
- offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
- return result;
+ /** 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 COMMENT = 2;
+ public static final int CDATA = 4;
+ public static final int TAG = 6;
+ public static final int PI = 8;
+ public static final int CLEAN = 10;
+ public static final int CLEANFIRST = 12;
+
+ /**
+ * 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
+ };
+
+ /**
+ * Top-level table for translating characters to character classes
+ */
+ private static final int [] ZZ_CMAP_TOP = zzUnpackcmap_top();
+
+ private static final String ZZ_CMAP_TOP_PACKED_0 =
+ "\1\0\2\u0100\1\u0200\34\u0300\1\u0400\1\u0500\12\u0600\3\u0700"+
+ "\1\u0800\1\u0900\247\u0a00\10\u0b00\31\u0600\4\u0c00\1\u0d00\1\u0e00"+
+ "\1\u0f00\u1000\u0600";
+
+ private static int [] zzUnpackcmap_top() {
+ int [] result = new int[4352];
+ int offset = 0;
+ offset = zzUnpackcmap_top(ZZ_CMAP_TOP_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackcmap_top(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);
}
-
- 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;
+ return j;
+ }
+
+
+ /**
+ * Second-level tables for translating characters to character classes
+ */
+ private static final int [] ZZ_CMAP_BLOCKS = zzUnpackcmap_blocks();
+
+ private static final String ZZ_CMAP_BLOCKS_PACKED_0 =
+ "\11\0\1\1\1\2\2\3\1\2\22\0\1\1\1\4"+
+ "\1\5\1\6\2\0\1\7\1\10\5\0\1\11\1\12"+
+ "\1\13\12\14\1\15\1\16\1\17\1\20\1\21\1\22"+
+ "\1\0\1\23\1\24\1\25\1\26\17\24\1\27\6\24"+
+ "\1\30\1\12\1\31\1\12\1\15\1\12\32\24\12\12"+
+ "\1\32\72\12\27\15\1\12\37\15\1\12\u0108\15\160\12"+
+ "\16\15\1\12\u0181\15\14\12\2\15\32\12\2\32\27\12"+
+ "\57\0\u0120\15\u0170\0\u01f0\15\21\0\u01ff\15\u0100\3\u01d0\15"+
+ "\40\0\u020e\15\2\0";
+
+ private static int [] zzUnpackcmap_blocks() {
+ int [] result = new int[4096];
+ int offset = 0;
+ offset = zzUnpackcmap_blocks(ZZ_CMAP_BLOCKS_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackcmap_blocks(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 DFA states to action switch labels.
+ */
+ private static final int [] ZZ_ACTION = zzUnpackAction();
+
+ private static final String ZZ_ACTION_PACKED_0 =
+ "\1\1\1\2\1\3\4\0\1\1\1\4\1\1\1\0"+
+ "\1\2\1\5\1\0\1\3\1\6\1\0\1\7\1\10"+
+ "\1\11\4\7\1\12\1\13\1\7\1\14\1\15\1\16"+
+ "\1\17\1\20\1\7\1\21\2\0\1\22\6\0\1\23"+
+ "\1\0\1\24\1\0\1\25\1\26\3\0\1\27\1\0"+
+ "\1\30\1\0\1\31\1\32\2\0\1\33\4\0\1\34";
+
+ private static int [] zzUnpackAction() {
+ int [] result = new int[66];
+ 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\33\0\66\0\121\0\154\0\207\0\242\0\275"+
+ "\0\330\0\363\0\u010e\0\u0129\0\u0144\0\u015f\0\u017a\0\u0195"+
+ "\0\u01b0\0\u01cb\0\u01e6\0\u0201\0\u021c\0\u0237\0\u0252\0\u026d"+
+ "\0\u01cb\0\u0288\0\u02a3\0\u01cb\0\u02be\0\u02d9\0\u01cb\0\u02f4"+
+ "\0\u030f\0\275\0\u032a\0\u0345\0\u0360\0\u037b\0\u0396\0\u03b1"+
+ "\0\u03cc\0\u03e7\0\u021c\0\u01cb\0\u0237\0\u01cb\0\u026d\0\u01cb"+
+ "\0\u01cb\0\u0402\0\u041d\0\u0438\0\u0453\0\u046e\0\u01cb\0\u0489"+
+ "\0\u01cb\0\u01cb\0\u04a4\0\u04bf\0\u01cb\0\u04da\0\u04f5\0\u0510"+
+ "\0\u052b\0\u01cb";
+
+ private static int [] zzUnpackRowMap() {
+ int [] result = new int[66];
+ 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 =
+ "\2\10\1\11\4\10\1\12\7\10\1\13\13\10\2\14"+
+ "\1\15\6\14\1\16\21\14\2\17\1\20\26\17\1\21"+
+ "\1\17\1\22\1\23\1\24\1\0\1\22\1\25\2\22"+
+ "\1\26\2\22\1\27\1\22\1\30\3\22\1\31\1\22"+
+ "\5\30\2\22\1\0\1\22\1\23\1\32\1\0\1\22"+
+ "\1\25\2\22\1\26\4\22\1\30\4\22\1\33\5\30"+
+ "\2\22\1\0\1\34\1\35\1\36\1\0\26\34\1\0"+
+ "\1\37\1\40\1\41\1\0\26\37\1\0\2\10\1\0"+
+ "\14\10\1\0\13\10\2\0\1\11\30\0\2\10\1\0"+
+ "\3\10\1\12\5\10\1\12\1\10\1\42\1\0\3\10"+
+ "\5\12\3\10\4\0\1\43\6\0\1\44\1\0\1\45"+
+ "\4\0\1\46\5\45\3\0\2\14\1\0\6\14\1\47"+
+ "\21\14\2\0\1\15\30\0\2\14\1\0\6\14\1\50"+
+ "\21\14\2\17\1\0\26\17\1\51\1\17\2\0\1\20"+
+ "\30\0\2\17\1\0\26\17\1\52\1\17\34\0\1\23"+
+ "\33\0\1\24\30\0\2\53\1\0\2\53\1\54\25\53"+
+ "\2\55\1\0\5\55\1\54\22\55\21\0\1\56\22\0"+
+ "\2\57\1\0\2\57\2\0\1\60\2\0\10\57\2\0"+
+ "\1\32\51\0\1\61\12\0\1\35\33\0\1\36\31\0"+
+ "\1\40\1\41\32\0\1\41\41\0\1\62\16\0\1\63"+
+ "\17\0\1\64\5\0\5\64\14\0\2\45\1\0\2\45"+
+ "\5\0\10\45\15\0\1\65\5\0\5\65\3\0\2\14"+
+ "\1\0\6\14\1\66\23\14\1\0\16\14\1\67\11\14"+
+ "\2\17\1\0\26\17\1\70\3\17\1\0\16\17\1\71"+
+ "\11\17\11\0\1\72\46\0\1\73\6\0\1\74\7\0"+
+ "\2\64\1\0\2\64\3\0\1\75\1\0\10\64\11\0"+
+ "\2\65\1\0\2\65\5\0\10\65\2\14\1\0\16\14"+
+ "\1\0\11\14\2\17\1\0\16\17\1\0\11\17\26\0"+
+ "\1\76\5\0\1\74\17\0\1\75\34\0\1\77\36\0"+
+ "\1\100\26\0\1\101\37\0\1\102\2\0";
+
+ private static int [] zzUnpackTrans() {
+ int [] result = new int[1350];
+ 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 code for "Unknown internal scanner error". */
+ private static final int ZZ_UNKNOWN_ERROR = 0;
+ /** Error code for "could not match input". */
+ private static final int ZZ_NO_MATCH = 1;
+ /** Error code for "pushback value was too large". */
+ private static final int ZZ_PUSHBACK_2BIG = 2;
+
+ /**
+ * Error messages for {@link #ZZ_UNKNOWN_ERROR}, {@link #ZZ_NO_MATCH}, and
+ * {@link #ZZ_PUSHBACK_2BIG} respectively.
+ */
+ private static final String ZZ_ERROR_MSG[] = {
+ "Unknown internal scanner error",
+ "Error: could not match input",
+ "Error: pushback value was too large"
+ };
+
+ /**
+ * ZZ_ATTRIBUTE[aState] contains the attributes of state {@code aState}
+ */
+ private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+ private static final String ZZ_ATTRIBUTE_PACKED_0 =
+ "\3\1\4\0\3\1\1\0\2\1\1\0\2\1\1\0"+
+ "\1\11\6\1\1\11\2\1\1\11\2\1\1\11\3\1"+
+ "\2\0\1\1\6\0\1\11\1\0\1\11\1\0\2\11"+
+ "\3\0\1\1\1\0\1\11\1\0\2\11\2\0\1\11"+
+ "\4\0\1\11";
+
+ private static int [] zzUnpackAttribute() {
+ int [] result = new int[66];
+ 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;
+ }
+ /** Input device. */
+ private java.io.Reader zzReader;
- /* 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"
- };
-
- /** the input device */
- private java.io.Reader zzReader;
+ /** Current state of the DFA. */
+ private int zzState;
- /** the current state of the DFA */
- private int zzState;
+ /** Current lexical state. */
+ private int zzLexicalState = YYINITIAL;
- /** the current lexical state */
- private int zzLexicalState = YYINITIAL;
+ /**
+ * This buffer contains the current text to be matched and is the source of the {@link #yytext()}
+ * string.
+ */
+ private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
- /** this buffer contains the current text to be matched and is
- the source of the yytext() string */
- private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+ /** Text position at the last accepting state. */
+ private int zzMarkedPos;
- /** the textposition at the last accepting state */
- private int zzMarkedPos;
+ /** Current text position in the buffer. */
+ private int zzCurrentPos;
- /** the current text position in the buffer */
- private int zzCurrentPos;
+ /** Marks the beginning of the {@link #yytext()} string in the buffer. */
+ private int zzStartRead;
- /** startRead marks the beginning of the yytext() string in the buffer */
- private int zzStartRead;
+ /** Marks the last character in the buffer, that has been read from input. */
+ private int zzEndRead;
- /** endRead marks the last character in the buffer, that has been read
- from input */
- private int zzEndRead;
+ /**
+ * Whether the scanner is at the end of file.
+ * @see #yyatEOF
+ */
+ private boolean zzAtEOF;
- /** number of newlines encountered up to the start of the matched text */
- private int yyline;
+ /**
+ * The number of occupied positions in {@link #zzBuffer} beyond {@link #zzEndRead}.
+ *
+ * <p>When a lead/high surrogate has been read from the input stream into the final
+ * {@link #zzBuffer} position, this will have a value of 1; otherwise, it will have a value of 0.
+ */
+ private int zzFinalHighSurrogate = 0;
- /** the number of characters up to the start of the matched text */
- private int yychar;
+ /** Number of newlines encountered up to the start of the matched text. */
+ @SuppressWarnings("unused")
+ private int yyline;
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- private int yycolumn;
+ /** Number of characters from the last newline up to the start of the matched text. */
+ @SuppressWarnings("unused")
+ private int yycolumn;
- /**
- * zzAtBOL == true <=> the scanner is currently at the beginning of a line
- */
- private boolean zzAtBOL = true;
+ /** Number of characters up to the start of the matched text. */
+ private long yychar;
- /** zzAtEOF == true <=> the scanner is at the EOF */
- private boolean zzAtEOF;
+ /** Whether the scanner is currently at the beginning of a line. */
+ @SuppressWarnings("unused")
+ private boolean zzAtBOL = true;
- /** denotes if the user-EOF-code has already been executed */
- private boolean zzEOFDone;
+ /** Whether the user-EOF-code has already been executed. */
+ @SuppressWarnings("unused")
+ private boolean zzEOFDone;
- /* user code: */
+ /* user code: */
private int whitesOnFirstLine;
private int saveLexState;
int end = str.length() - 1;
int i = end;
for (; i >= 0; i--) {
- char c = str.charAt(i);
- if (c != ' ' && c != '\t' && c != '\r' && c != '\n') {
- break;
- }
+ char c = str.charAt(i);
+ if (c != ' ' && c != '\t' && c != '\r' && c != '\n') {
+ break;
+ }
}
if (i != end) {
- return str.substring(0, i + 1);
+ return str.substring(0, i + 1);
}
return str;
Reader reader = new StringReader(trimEnd(code));
String str = convert(h, reader, true);
try {
- reader.close();
+ reader.close();
} catch (IOException e) { }
return str;
public String convert(AbstractXMLCodeHandler h, Reader code, boolean ret) {
if (code == null) {
- return null;
+ return null;
} else {
- handler = h;
- whitesOnFirstLine = 0;
- yyreset(code);
- yybegin(CLEANFIRST);
- try {
- yylex();
- } catch (IOException e) {
- return null;
- }
- if (ret) {
- return h.toString();
- }
- return "";
+ handler = h;
+ whitesOnFirstLine = 0;
+ yyreset(code);
+ yybegin(CLEANFIRST);
+ try {
+ yylex();
+ } catch (IOException e) {
+ return null;
+ }
+ if (ret) {
+ return h.toString();
+ }
+ return "";
}
}
- /**
- * 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.
- */
- public XMLLexer(java.io.Reader in) {
- this.zzReader = in;
+ /**
+ * Creates a new scanner
+ *
+ * @param in the java.io.Reader to read input from.
+ */
+ public XMLLexer(java.io.Reader in) {
+ this.zzReader = in;
+ }
+
+ /**
+ * Translates raw input code points to DFA table row
+ */
+ private static int zzCMap(int input) {
+ int offset = input & 255;
+ return offset == input ? ZZ_CMAP_BLOCKS[offset] : ZZ_CMAP_BLOCKS[ZZ_CMAP_TOP[input >> 8] | offset];
+ }
+
+ /**
+ * Refills the input buffer.
+ *
+ * @return {@code false} 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) {
+ zzEndRead += zzFinalHighSurrogate;
+ zzFinalHighSurrogate = 0;
+ System.arraycopy(zzBuffer, zzStartRead,
+ zzBuffer, 0,
+ zzEndRead - zzStartRead);
+
+ /* translate stored positions */
+ zzEndRead -= zzStartRead;
+ zzCurrentPos -= zzStartRead;
+ zzMarkedPos -= zzStartRead;
+ zzStartRead = 0;
}
- /**
- * Creates a new scanner.
- * There is also java.io.Reader version of this constructor.
- *
- * @param in the java.io.Inputstream to read input from.
- */
- public XMLLexer(java.io.InputStream in) {
- this(new java.io.InputStreamReader(in));
+ /* is the buffer big enough? */
+ if (zzCurrentPos >= zzBuffer.length - zzFinalHighSurrogate) {
+ /* if not: blow it up */
+ char newBuffer[] = new char[zzBuffer.length * 2];
+ System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+ zzBuffer = newBuffer;
+ zzEndRead += zzFinalHighSurrogate;
+ zzFinalHighSurrogate = 0;
}
- /**
- * 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 < 132) {
- int count = packed.charAt(i++);
- char value = packed.charAt(i++);
- do {
- map[j++] = value;
- } while (--count > 0);
- }
- return map;
- }
+ /* fill the buffer with new input */
+ int requested = zzBuffer.length - zzEndRead;
+ int numRead = zzReader.read(zzBuffer, zzEndRead, requested);
-
- /**
- * 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;
+ /* not supposed to occur according to specification of java.io.Reader */
+ if (numRead == 0) {
+ throw new java.io.IOException(
+ "Reader returned 0 characters. See JFlex examples/zero-reader for a workaround.");
}
-
-
- /**
- * 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();
+ if (numRead > 0) {
+ zzEndRead += numRead;
+ if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
+ if (numRead == requested) { // We requested too few chars to encode a full Unicode character
+ --zzEndRead;
+ zzFinalHighSurrogate = 1;
+ } else { // There is room in the buffer for at least one more char
+ int c = zzReader.read(); // Expecting to read a paired low surrogate char
+ if (c == -1) {
+ return true;
+ } else {
+ zzBuffer[zzEndRead++] = (char)c;
+ }
}
+ }
+ /* potentially more input available */
+ return false;
}
+ /* numRead < 0 ==> end of stream */
+ return true;
+ }
- /**
- * 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>.
- *
- * @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;
- }
+ /**
+ * Closes the input reader.
+ *
+ * @throws java.io.IOException if the reader could not be closed.
+ */
+ public final void yyclose() throws java.io.IOException {
+ zzAtEOF = true; // indicate end of file
+ zzEndRead = zzStartRead; // invalidate buffer
- /**
- * Returns the current lexical state.
- */
- public final int yystate() {
- return zzLexicalState;
+ if (zzReader != null) {
+ zzReader.close();
}
-
-
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- public final void yybegin(int newState) {
- zzLexicalState = newState;
+ }
+
+
+ /**
+ * Resets the scanner to read from a new input stream.
+ *
+ * <p>Does not close the old reader.
+ *
+ * <p>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 {@code ZZ_INITIAL}.
+ *
+ * <p>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;
+ zzEOFDone = false;
+ yyResetPosition();
+ zzLexicalState = YYINITIAL;
+ if (zzBuffer.length > ZZ_BUFFERSIZE) {
+ zzBuffer = new char[ZZ_BUFFERSIZE];
+ }
+ }
+
+ /**
+ * Resets the input position.
+ */
+ private final void yyResetPosition() {
+ zzAtBOL = true;
+ zzAtEOF = false;
+ zzCurrentPos = 0;
+ zzMarkedPos = 0;
+ zzStartRead = 0;
+ zzEndRead = 0;
+ zzFinalHighSurrogate = 0;
+ yyline = 0;
+ yycolumn = 0;
+ yychar = 0L;
+ }
+
+
+ /**
+ * Returns whether the scanner has reached the end of the reader it reads from.
+ *
+ * @return whether the scanner has reached EOF.
+ */
+ public final boolean yyatEOF() {
+ return zzAtEOF;
+ }
+
+
+ /**
+ * Returns the current lexical state.
+ *
+ * @return 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.
+ *
+ * @return the matched text.
+ */
+ public final String yytext() {
+ return new String(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);
+ }
+
+
+ /**
+ * Returns the character at the given position from the matched text.
+ *
+ * <p>It is equivalent to {@code yytext().charAt(pos)}, but faster.
+ *
+ * @param position the position of the character to fetch. A value from 0 to {@code yylength()-1}.
+ *
+ * @return the character at {@code position}.
+ */
+ public final char yycharat(int position) {
+ return zzBuffer[zzStartRead + position];
+ }
+
+
+ /**
+ * How many characters were matched.
+ *
+ * @return the length of the matched text region.
+ */
+ public final int yylength() {
+ return zzMarkedPos-zzStartRead;
+ }
+
+
+ /**
+ * Reports an error that occurred while scanning.
+ *
+ * <p>In a well-formed scanner (no or only correct usage of {@code yypushback(int)} and a
+ * match-all fallback rule) this method will only be called with things that
+ * "Can't Possibly Happen".
+ *
+ * <p>If this method is called, something is seriously wrong (e.g. a JFlex bug producing a faulty
+ * scanner etc.).
+ *
+ * <p>Usual syntax/scanner level error handling should be done in error fallback rules.
+ *
+ * @param errorCode the code of the error message to display.
+ */
+ private static 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);
+ }
- /**
- * Returns the text matched by the current regular expression.
- */
- public final String yytext() {
- return new String( zzBuffer, zzStartRead, zzMarkedPos - zzStartRead );
- }
+ /**
+ * Pushes the specified amount of characters back into the input stream.
+ *
+ * <p>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
+ * {@link #yylength()}.
+ */
+ public void yypushback(int number) {
+ if ( number > yylength() )
+ zzScanError(ZZ_PUSHBACK_2BIG);
- /**
- * 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];
- }
+ zzMarkedPos -= number;
+ }
- /**
- * Returns the length of the matched text region.
- */
- public final int yylength() {
- return zzMarkedPos - zzStartRead;
- }
- /**
- * Reports an error that occurred 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];
- }
+ /**
+ * 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 void yylex() throws java.io.IOException {
+ int zzInput;
+ int zzAction;
- throw new Error(message);
- }
+ // cached fields:
+ int zzCurrentPosL;
+ int zzMarkedPosL;
+ int zzEndReadL = zzEndRead;
+ char[] zzBufferL = zzBuffer;
+ int [] zzTransL = ZZ_TRANS;
+ int [] zzRowMapL = ZZ_ROWMAP;
+ int [] zzAttrL = ZZ_ATTRIBUTE;
- /**
- * 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);
- }
+ while (true) {
+ zzMarkedPosL = zzMarkedPos;
- zzMarkedPos -= number;
- }
+ yychar+= zzMarkedPosL-zzStartRead;
+
+ zzAction = -1;
+ zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
- /**
- * 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 void yylex() throws java.io.IOException {
- int zzInput;
- int zzAction;
+ zzState = ZZ_LEXSTATE[zzLexicalState];
- // cached fields:
- int zzCurrentPosL;
- int zzMarkedPosL;
- int zzEndReadL = zzEndRead;
- char [] zzBufferL = zzBuffer;
- char [] zzCMapL = ZZ_CMAP;
+ // set up zzAction for empty match case:
+ int zzAttributes = zzAttrL[zzState];
+ if ( (zzAttributes & 1) == 1 ) {
+ zzAction = zzState;
+ }
+ zzForAction: {
while (true) {
- zzMarkedPosL = zzMarkedPos;
-
- yychar += zzMarkedPosL - zzStartRead;
-
- zzAction = -1;
-
- zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
-
- zzState = ZZ_LEXSTATE[zzLexicalState];
-
-
- 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++];
- }
- }
- zzInput = zzCMapL[zzInput];
-
- boolean zzIsFinal = false;
- boolean zzNoLookAhead = false;
-
- zzForNext: {
- switch (zzState) {
- case 0:
- switch (zzInput) {
- case 2:
- zzIsFinal = true;
- zzState = 8;
- break zzForNext;
- case 10:
- zzState = 9;
- break zzForNext;
- case 13:
- zzIsFinal = true;
- zzState = 10;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzState = 7;
- break zzForNext;
- }
-
- case 1:
- switch (zzInput) {
- case 7:
- zzState = 12;
- break zzForNext;
- case 13:
- zzIsFinal = true;
- zzState = 13;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzState = 11;
- break zzForNext;
- }
-
- case 2:
- switch (zzInput) {
- case 13:
- zzIsFinal = true;
- zzState = 15;
- break zzForNext;
- case 19:
- zzState = 16;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzState = 14;
- break zzForNext;
- }
-
- case 3:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- zzState = 18;
- break zzForNext;
- case 5:
- case 6:
- case 15:
- case 16:
- case 17:
- case 18:
- zzIsFinal = true;
- zzState = 19;
- break zzForNext;
- case 12:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 20;
- break zzForNext;
- case 13:
- zzIsFinal = true;
- zzState = 21;
- break zzForNext;
- case 21:
- zzIsFinal = true;
- zzState = 22;
- break zzForNext;
- case 23:
- zzIsFinal = true;
- zzState = 23;
- break zzForNext;
- case 24:
- zzIsFinal = true;
- zzState = 24;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 17;
- break zzForNext;
- }
-
- case 4:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- zzState = 18;
- break zzForNext;
- case 5:
- case 6:
- case 15:
- case 16:
- case 17:
- case 18:
- zzIsFinal = true;
- zzState = 19;
- break zzForNext;
- case 23:
- zzIsFinal = true;
- zzState = 23;
- break zzForNext;
- case 24:
- zzIsFinal = true;
- zzState = 24;
- break zzForNext;
- case 13:
- zzIsFinal = true;
- zzState = 25;
- break zzForNext;
- case 20:
- zzIsFinal = true;
- zzState = 26;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 17;
- break zzForNext;
- }
-
- case 5:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- zzState = 28;
- break zzForNext;
- case 13:
- zzIsFinal = true;
- zzState = 29;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 27;
- break zzForNext;
- }
-
- case 6:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- zzState = 31;
- break zzForNext;
- case 13:
- zzIsFinal = true;
- zzState = 32;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 30;
- break zzForNext;
- }
-
- case 7:
- switch (zzInput) {
- case 10:
- case 13:
- break zzForAction;
- default:
- zzIsFinal = true;
- break zzForNext;
- }
-
- case 8:
- switch (zzInput) {
- case 3:
- case 6:
- case 9:
- case 15:
- case 16:
- case 17:
- case 18:
- zzIsFinal = true;
- break zzForNext;
- case 4:
- zzIsFinal = true;
- zzState = 33;
- break zzForNext;
- case 10:
- case 13:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 7;
- break zzForNext;
- }
-
- case 9:
- switch (zzInput) {
- case 5:
- case 6:
- case 15:
- case 16:
- case 17:
- case 18:
- zzIsFinal = true;
- zzState = 34;
- break zzForNext;
- case 11:
- zzState = 35;
- break zzForNext;
- case 20:
- zzState = 36;
- break zzForNext;
- case 21:
- zzState = 37;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 10:
- switch (zzInput) {
- case 13:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 11:
- switch (zzInput) {
- case 7:
- zzState = 38;
- break zzForNext;
- case 13:
- break zzForAction;
- default:
- zzIsFinal = true;
- break zzForNext;
- }
-
- case 12:
- switch (zzInput) {
- case 7:
- zzState = 39;
- break zzForNext;
- case 13:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 11;
- break zzForNext;
- }
-
- case 13:
- switch (zzInput) {
- case 13:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 14:
- switch (zzInput) {
- case 19:
- zzState = 40;
- break zzForNext;
- case 13:
- break zzForAction;
- default:
- zzIsFinal = true;
- break zzForNext;
- }
-
- case 15:
- switch (zzInput) {
- case 13:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 16:
- switch (zzInput) {
- case 19:
- zzState = 41;
- break zzForNext;
- case 13:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 14;
- break zzForNext;
- }
-
- case 18:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 19:
- switch (zzInput) {
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- zzState = 42;
- break zzForNext;
- case 22:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 43;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 21:
- switch (zzInput) {
- case 13:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 22:
- switch (zzInput) {
- case 12:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 44;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 23:
- switch (zzInput) {
- case 23:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 46;
- break zzForNext;
- case 13:
- break zzForAction;
- default:
- zzState = 45;
- break zzForNext;
- }
-
- case 24:
- switch (zzInput) {
- case 24:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 46;
- break zzForNext;
- case 13:
- break zzForAction;
- default:
- zzState = 47;
- break zzForNext;
- }
-
- case 25:
- switch (zzInput) {
- case 13:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 26:
- switch (zzInput) {
- case 12:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 48;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 28:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 29:
- switch (zzInput) {
- case 13:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 31:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- break zzForNext;
- case 13:
- zzIsFinal = true;
- zzState = 32;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 32:
- switch (zzInput) {
- case 13:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 33:
- switch (zzInput) {
- case 10:
- case 13:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 7;
- break zzForNext;
- }
-
- case 34:
- switch (zzInput) {
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 35:
- switch (zzInput) {
- case 7:
- zzState = 49;
- break zzForNext;
- case 14:
- zzState = 50;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 36:
- switch (zzInput) {
- case 5:
- case 6:
- case 15:
- case 16:
- case 17:
- case 18:
- zzIsFinal = true;
- zzState = 51;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 37:
- switch (zzInput) {
- case 5:
- case 6:
- case 15:
- case 16:
- case 17:
- case 18:
- zzState = 52;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 38:
- switch (zzInput) {
- case 7:
- zzState = 53;
- break zzForNext;
- case 13:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 11;
- break zzForNext;
- }
-
- case 39:
- switch (zzInput) {
- case 12:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 54;
- break zzForNext;
- case 13:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 11;
- break zzForNext;
- }
-
- case 40:
- switch (zzInput) {
- case 19:
- zzState = 55;
- break zzForNext;
- case 13:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 14;
- break zzForNext;
- }
-
- case 41:
- switch (zzInput) {
- case 12:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 56;
- break zzForNext;
- case 13:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 14;
- break zzForNext;
- }
-
- case 42:
- switch (zzInput) {
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- break zzForNext;
- case 22:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 43;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 45:
- switch (zzInput) {
- case 23:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 46;
- break zzForNext;
- case 13:
- break zzForAction;
- default:
- break zzForNext;
- }
-
- case 47:
- switch (zzInput) {
- case 24:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 46;
- break zzForNext;
- case 13:
- break zzForAction;
- default:
- break zzForNext;
- }
-
- case 49:
- switch (zzInput) {
- case 7:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 57;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 50:
- switch (zzInput) {
- case 15:
- zzState = 58;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 51:
- switch (zzInput) {
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 52:
- switch (zzInput) {
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- break zzForNext;
- case 1:
- zzState = 59;
- break zzForNext;
- case 12:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 60;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 53:
- switch (zzInput) {
- case 12:
- case 13:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 11;
- break zzForNext;
- }
-
- case 55:
- switch (zzInput) {
- case 12:
- case 13:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 14;
- break zzForNext;
- }
-
- case 58:
- switch (zzInput) {
- case 16:
- zzState = 61;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 59:
- switch (zzInput) {
- case 1:
- break zzForNext;
- case 12:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 60;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 61:
- switch (zzInput) {
- case 17:
- zzState = 62;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 62:
- switch (zzInput) {
- case 18:
- zzState = 63;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 63:
- switch (zzInput) {
- case 17:
- zzState = 64;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 64:
- switch (zzInput) {
- case 14:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 65;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- default:
- // if this is ever reached, there is a serious bug in JFlex
- zzScanError(ZZ_UNKNOWN_ERROR);
- break;
- }
- }
-
- if ( zzIsFinal ) {
- zzAction = zzState;
- zzMarkedPosL = zzCurrentPosL;
- if ( zzNoLookAhead ) {
- break zzForAction;
- }
- }
-
- }
+
+ if (zzCurrentPosL < zzEndReadL) {
+ zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
+ zzCurrentPosL += Character.charCount(zzInput);
+ }
+ 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 = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
+ zzCurrentPosL += Character.charCount(zzInput);
}
+ }
+ int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMap(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 15 : {
- yypushback(1);
- yybegin(YYINITIAL);
- }
- case 29:
- break;
- case 27: {
- handler.handleLowClose("</");
- String str = yytext();
- handler.handleOpenTagName(str.substring(2, str.length() - 1).trim());
- handler.handleGreat(">");
- }
- case 30:
- break;
- case 5: {
- handler.handleNothing("\n");
- saveLexState = COMMENT;
- yybegin(CLEAN);
- }
- case 31:
- break;
- case 25: {
- yybegin(YYINITIAL);
- handler.handleCdataEnd("]]>");
- }
- case 32:
- break;
- case 28: {
- yybegin(CDATA);
- handler.handleOpenCdata("<![CDATA[");
- }
- case 33:
- break;
- case 14: {
- handler.handleNothing("\n");
- }
- case 34:
- break;
- case 23: {
- yybegin(PI);
- handler.handleOpenInstr("<?");
- handler.handleInstrName(yytext().substring(2));
- }
- case 35:
- break;
- case 2: {
- handler.handleComment(yytext());
- }
- case 36:
- break;
- case 18: {
- yybegin(TAG);
- handler.handleLow("<");
- handler.handleOpenTagName(yytext().substring(1));
- }
- case 37:
- break;
- case 4: {
- handler.handleNothing("\n");
- saveLexState = YYINITIAL;
- yybegin(CLEAN);
- }
- case 38:
- break;
- case 16: {
- whitesOnFirstLine = yylength();
- yybegin(YYINITIAL);
- }
- case 39:
- break;
- case 12: {
- yypushback(1);
- yybegin(saveLexState);
- }
- case 40:
- break;
- case 17: {
- handler.handleEntity("&" + yytext().substring(1));
- }
- case 41:
- break;
- case 6: {
- handler.handleNothing("\n");
- saveLexState = CDATA;
- yybegin(CLEAN);
- }
- case 42:
- break;
- case 22: {
- yybegin(YYINITIAL);
- handler.handleCloseInstr("?>");
- }
- case 43:
- break;
- case 11: {
- handler.handleNothing("\n");
- saveLexState = PI;
- yybegin(CLEAN);
- }
- case 44:
- break;
- case 8: {
- handler.handleNothing(" ");
- }
- case 45:
- break;
- case 24: {
- yybegin(YYINITIAL);
- handler.handleCommentEnd("-->");
- }
- case 46:
- break;
- case 21: {
- handler.handleAttributeValue(yytext());
- }
- case 47:
- break;
- case 1: {
- handler.handleDefault(yytext());
- }
- case 48:
- break;
- case 9: {
- yybegin(YYINITIAL);
- handler.handleGreat(">");
- }
- case 49:
- break;
- case 3: {
- handler.handleCdata(yytext());
- }
- case 50:
- break;
- case 13: {
- int len = yylength() - whitesOnFirstLine;
- if (len > 0) {
- yypushback(len);
- }
- yybegin(saveLexState);
- }
- case 51:
- break;
- case 20: {
- yybegin(YYINITIAL);
- handler.handleAutoClose("/>");
- }
- case 52:
- break;
- case 26: {
- yybegin(COMMENT);
- handler.handleOpenComment("<!--");
- }
- case 53:
- break;
- case 19: {
- String str = yytext();
- handler.handleAttributeName(str.substring(0, str.length() - 1));
- handler.handleEqual("=");
- }
- case 54:
- break;
- case 10: {
- handler.handleNothing("\n");
- saveLexState = TAG;
- yybegin(CLEAN);
- }
- case 55:
- break;
- case 7: {
- }
- case 56:
- break;
- default:
- if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
- zzAtEOF = true;
- {
- return;
- }
- } else {
- zzScanError(ZZ_NO_MATCH);
- }
+ }
+ }
+
+ // store back cached position
+ zzMarkedPos = zzMarkedPosL;
+
+ if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+ zzAtEOF = true;
+ {
+ return;
+ }
+ }
+ else {
+ switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+ case 1:
+ { handler.handleDefault(yytext());
+ }
+ // fall through
+ case 29: break;
+ case 2:
+ { handler.handleComment(yytext());
+ }
+ // fall through
+ case 30: break;
+ case 3:
+ { handler.handleCdata(yytext());
+ }
+ // fall through
+ case 31: break;
+ case 4:
+ { handler.handleNothing("\n");
+ saveLexState = YYINITIAL;
+ yybegin(CLEAN);
+ }
+ // fall through
+ case 32: break;
+ case 5:
+ { handler.handleNothing("\n");
+ saveLexState = COMMENT;
+ yybegin(CLEAN);
+ }
+ // fall through
+ case 33: break;
+ case 6:
+ { handler.handleNothing("\n");
+ saveLexState = CDATA;
+ yybegin(CLEAN);
+ }
+ // fall through
+ case 34: break;
+ case 7:
+ {
+ }
+ // fall through
+ case 35: break;
+ case 8:
+ { handler.handleNothing(" ");
+ }
+ // fall through
+ case 36: break;
+ case 9:
+ { handler.handleNothing("\n");
+ saveLexState = TAG;
+ yybegin(CLEAN);
+ }
+ // fall through
+ case 37: break;
+ case 10:
+ { yybegin(YYINITIAL);
+ handler.handleGreat(">");
+ }
+ // fall through
+ case 38: break;
+ case 11:
+ { handler.handleNothing("\n");
+ saveLexState = PI;
+ yybegin(CLEAN);
+ }
+ // fall through
+ case 39: break;
+ case 12:
+ { yypushback(1);
+ yybegin(saveLexState);
+ }
+ // fall through
+ case 40: break;
+ case 13:
+ { int len = yylength() - whitesOnFirstLine;
+ if (len > 0) {
+ yypushback(len);
+ }
+ yybegin(saveLexState);
+ }
+ // fall through
+ case 41: break;
+ case 14:
+ { handler.handleNothing("\n");
+ }
+ // fall through
+ case 42: break;
+ case 15:
+ { yypushback(1);
+ yybegin(YYINITIAL);
+ }
+ // fall through
+ case 43: break;
+ case 16:
+ { whitesOnFirstLine = yylength();
+ yybegin(YYINITIAL);
+ }
+ // fall through
+ case 44: break;
+ case 17:
+ { handler.handleEntity("&" + yytext().substring(1));
+ }
+ // fall through
+ case 45: break;
+ case 18:
+ { yybegin(TAG);
+ handler.handleLow("<");
+ handler.handleOpenTagName(yytext().substring(1));
+ }
+ // fall through
+ case 46: break;
+ case 19:
+ { handler.handleAttributeValue(yytext());
+ }
+ // fall through
+ case 47: break;
+ case 20:
+ { yybegin(YYINITIAL);
+ handler.handleAutoClose("/>");
+ }
+ // fall through
+ case 48: break;
+ case 21:
+ { String str = yytext();
+ handler.handleAttributeName(str.substring(0, str.length() - 1));
+ handler.handleEqual("=");
+ }
+ // fall through
+ case 49: break;
+ case 22:
+ { yybegin(YYINITIAL);
+ handler.handleCloseInstr("?>");
+ }
+ // fall through
+ case 50: break;
+ case 23:
+ { yybegin(PI);
+ handler.handleOpenInstr("<?");
+ handler.handleInstrName(yytext().substring(2));
+ }
+ // fall through
+ case 51: break;
+ case 24:
+ { yybegin(YYINITIAL);
+ handler.handleCommentEnd("-->");
+ }
+ // fall through
+ case 52: break;
+ case 25:
+ { yybegin(YYINITIAL);
+ handler.handleCdataEnd("]]>");
+ }
+ // fall through
+ case 53: break;
+ case 26:
+ { yybegin(COMMENT);
+ handler.handleOpenComment("<!--");
+ }
+ // fall through
+ case 54: break;
+ case 27:
+ { handler.handleLowClose("</");
+ String str = yytext();
+ handler.handleOpenTagName(str.substring(2, str.length() - 1).trim());
+ handler.handleGreat(">");
+ }
+ // fall through
+ case 55: break;
+ case 28:
+ { yybegin(CDATA);
+ handler.handleOpenCdata("<![CDATA[");
}
+ // fall through
+ case 56: break;
+ default:
+ zzScanError(ZZ_NO_MATCH);
}
+ }
}
+ }
}
-/* The following code was generated by JFlex 1.4.3 on 23/05/12 15:21 */
+// DO NOT EDIT
+// Generated by JFlex 1.8.2 http://jflex.de/
+// source: jflex/c.jflex
//CHECKSTYLE:OFF
import java.io.IOException;
@javax.annotation.Generated("JFlex")
-@SuppressWarnings("fallthrough")
-/**
- * This class is a scanner generated by
- * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
- * on 23/05/12 15:21 from the specification file
- * <tt>./jflex/c.jflex</tt>
- */
+// See https://github.com/jflex-de/jflex/issues/222
+@SuppressWarnings("FallThrough")
public final class CLexer {
- /** 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 = 4;
- public static final int CLEANFIRST = 8;
- public static final int CLEAN = 6;
- public static final int YYINITIAL = 0;
- public static final int COMMENT = 2;
-
- /**
- * 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
- };
-
- /**
- * Translates characters to character classes
- */
- private static final String ZZ_CMAP_PACKED =
- "\11\0\1\31\1\2\1\0\1\3\1\1\22\0\1\3\1\61\1\26" +
- "\1\57\1\0\2\61\1\30\2\60\1\5\1\21\1\61\1\21\1\24" +
- "\1\4\1\22\11\11\2\61\1\63\1\61\1\62\1\61\1\0\4\10" +
- "\1\20\1\17\5\6\1\15\1\6\1\25\6\6\1\13\2\6\1\23" +
- "\2\6\1\60\1\27\1\60\1\61\1\7\1\0\1\32\1\35\1\41" +
- "\1\46\1\37\1\16\1\51\1\43\1\44\1\6\1\40\1\14\1\50" +
- "\1\45\1\34\1\52\1\64\1\36\1\42\1\33\1\12\1\55\1\53" +
- "\1\56\1\47\1\54\1\60\1\61\1\60\1\61\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 =
- "\1\0\1\1\1\2\2\0\2\3\1\4\1\5\1\6" +
- "\1\7\3\6\1\7\1\5\1\6\1\10\1\3\21\6" +
- "\1\3\1\11\3\5\1\1\2\12\2\0\1\2\2\13" +
- "\1\14\1\0\1\15\1\16\1\17\1\20\1\21\1\22" +
- "\1\1\1\23\2\7\7\6\1\0\1\6\2\0\6\6" +
- "\1\5\20\6\1\24\4\6\1\24\11\6\7\0\1\1" +
- "\2\25\1\26\1\0\1\7\1\0\6\6\1\7\1\6" +
- "\2\2\34\6\1\27\16\6\6\0\1\30\4\0\1\7" +
- "\1\0\5\6\1\7\40\6\11\0\4\6\1\5\5\6" +
- "\1\31\15\6\1\0\1\30\4\0\1\31\11\6\3\0" +
- "\12\6";
-
- private static int [] zzUnpackAction() {
- int [] result = new int[290];
- int offset = 0;
- offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
- return result;
+ /** 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 COMMENT = 2;
+ public static final int STRING = 4;
+ public static final int CLEAN = 6;
+ public static final int CLEANFIRST = 8;
+
+ /**
+ * 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
+ };
+
+ /**
+ * Top-level table for translating characters to character classes
+ */
+ private static final int [] ZZ_CMAP_TOP = zzUnpackcmap_top();
+
+ private static final String ZZ_CMAP_TOP_PACKED_0 =
+ "\1\0\37\u0100\1\u0200\267\u0100\10\u0300\u1020\u0100";
+
+ private static int [] zzUnpackcmap_top() {
+ int [] result = new int[4352];
+ int offset = 0;
+ offset = zzUnpackcmap_top(ZZ_CMAP_TOP_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackcmap_top(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);
}
-
- 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;
+ return j;
+ }
+
+
+ /**
+ * Second-level tables for translating characters to character classes
+ */
+ private static final int [] ZZ_CMAP_BLOCKS = zzUnpackcmap_blocks();
+
+ private static final String ZZ_CMAP_BLOCKS_PACKED_0 =
+ "\11\0\1\1\1\2\1\3\1\4\1\5\22\0\1\6"+
+ "\1\7\1\10\1\11\1\0\2\7\1\12\2\13\1\14"+
+ "\1\15\1\7\1\15\1\16\1\17\1\20\11\21\2\7"+
+ "\1\22\1\7\1\23\1\7\1\0\4\24\1\25\1\26"+
+ "\5\27\1\30\1\27\1\31\6\27\1\32\2\27\1\33"+
+ "\2\27\1\13\1\34\1\13\1\7\1\35\1\0\1\36"+
+ "\1\37\1\40\1\41\1\42\1\43\1\44\1\45\1\46"+
+ "\1\27\1\47\1\50\1\51\1\52\1\53\1\54\1\55"+
+ "\1\56\1\57\1\60\1\61\1\62\1\63\1\64\1\65"+
+ "\1\66\1\13\1\7\1\13\1\7\6\0\1\3\u01a2\0"+
+ "\2\3\326\0\u0100\3";
+
+ private static int [] zzUnpackcmap_blocks() {
+ int [] result = new int[1024];
+ int offset = 0;
+ offset = zzUnpackcmap_blocks(ZZ_CMAP_BLOCKS_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackcmap_blocks(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 DFA states to action switch labels.
+ */
+ private static final int [] ZZ_ACTION = zzUnpackAction();
+
+ private static final String ZZ_ACTION_PACKED_0 =
+ "\1\0\1\1\1\2\2\0\1\3\2\4\1\5\1\6"+
+ "\2\3\1\7\2\5\2\10\2\5\26\11\1\1\2\12"+
+ "\2\0\1\2\2\13\1\14\1\0\1\15\1\16\1\17"+
+ "\1\20\1\21\1\22\10\0\1\10\1\23\1\1\1\10"+
+ "\1\0\13\11\1\24\10\11\1\24\7\11\1\5\21\11"+
+ "\1\0\1\1\2\25\1\0\1\26\4\0\1\27\6\0"+
+ "\2\2\1\0\2\10\24\11\1\30\35\11\12\0\2\10"+
+ "\45\11\1\27\5\0\1\11\1\5\1\31\25\11\3\0"+
+ "\3\11\1\31\20\11";
+
+ private static int [] zzUnpackAction() {
+ int [] result = new int[290];
+ 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\67\0\156\0\245\0\334\0\u0113\0\u0113\0\u014a"+
+ "\0\u0113\0\u0113\0\u0181\0\u01b8\0\u0113\0\u01ef\0\u0226\0\u025d"+
+ "\0\u0294\0\u02cb\0\u0302\0\u0339\0\u0370\0\u03a7\0\u03de\0\u0415"+
+ "\0\u044c\0\u0483\0\u04ba\0\u04f1\0\u0528\0\u055f\0\u0596\0\u05cd"+
+ "\0\u0604\0\u063b\0\u0672\0\u06a9\0\u06e0\0\u0717\0\u074e\0\u0785"+
+ "\0\u07bc\0\u07f3\0\u0113\0\u082a\0\u0861\0\u0898\0\u08cf\0\u0113"+
+ "\0\u0906\0\u0113\0\u093d\0\u0113\0\u0974\0\u09ab\0\u0113\0\u09e2"+
+ "\0\u0a19\0\u0a50\0\u0a87\0\u0abe\0\u0af5\0\u0b2c\0\u0b63\0\u0b9a"+
+ "\0\u0bd1\0\u0c08\0\u0c3f\0\u0c76\0\u0cad\0\u0ce4\0\u0d1b\0\u0d52"+
+ "\0\u0d89\0\u0dc0\0\u0df7\0\u0e2e\0\u0e65\0\u0e9c\0\u0ed3\0\u0f0a"+
+ "\0\u0f41\0\u0f78\0\u0faf\0\u0fe6\0\u101d\0\u1054\0\u108b\0\u10c2"+
+ "\0\u10f9\0\u1130\0\u0339\0\u1167\0\u119e\0\u11d5\0\u120c\0\u1243"+
+ "\0\u127a\0\u12b1\0\u12e8\0\u131f\0\u1356\0\u138d\0\u13c4\0\u13fb"+
+ "\0\u1432\0\u1469\0\u14a0\0\u14d7\0\u150e\0\u1545\0\u157c\0\u15b3"+
+ "\0\u15ea\0\u1621\0\u1658\0\u168f\0\u16c6\0\u16fd\0\u0113\0\u1734"+
+ "\0\u176b\0\u0113\0\u17a2\0\u17d9\0\u1810\0\u1847\0\u187e\0\u18b5"+
+ "\0\u18ec\0\u1923\0\u195a\0\u1991\0\u19c8\0\u0113\0\u0b9a\0\u19ff"+
+ "\0\u0113\0\u1a36\0\u1a6d\0\u1aa4\0\u1adb\0\u1b12\0\u1b49\0\u1b80"+
+ "\0\u1bb7\0\u1bee\0\u1c25\0\u1c5c\0\u1c93\0\u1cca\0\u1d01\0\u1d38"+
+ "\0\u1d6f\0\u1da6\0\u1ddd\0\u1e14\0\u1e4b\0\u1e82\0\u0339\0\u1eb9"+
+ "\0\u1ef0\0\u1f27\0\u1f5e\0\u1f95\0\u1fcc\0\u2003\0\u203a\0\u2071"+
+ "\0\u20a8\0\u20df\0\u2116\0\u214d\0\u2184\0\u21bb\0\u21f2\0\u2229"+
+ "\0\u2260\0\u2297\0\u22ce\0\u2305\0\u233c\0\u2373\0\u23aa\0\u23e1"+
+ "\0\u2418\0\u244f\0\u2486\0\u24bd\0\u24f4\0\u252b\0\u2562\0\u2599"+
+ "\0\u25d0\0\u2607\0\u263e\0\u2675\0\u26ac\0\u26e3\0\u271a\0\u0339"+
+ "\0\u2751\0\u2788\0\u27bf\0\u27f6\0\u282d\0\u2864\0\u289b\0\u28d2"+
+ "\0\u2909\0\u2940\0\u2977\0\u29ae\0\u29e5\0\u2a1c\0\u2a53\0\u2a8a"+
+ "\0\u2ac1\0\u2af8\0\u2b2f\0\u2b66\0\u2b9d\0\u2bd4\0\u2c0b\0\u2c42"+
+ "\0\u2c79\0\u2cb0\0\u2ce7\0\u2d1e\0\u2d55\0\u2d8c\0\u2dc3\0\u2dfa"+
+ "\0\u2e31\0\u2e68\0\u2e9f\0\u2ed6\0\u2f0d\0\u0113\0\u2f44\0\u2f7b"+
+ "\0\u2fb2\0\u2fe9\0\u3020\0\u3057\0\u0339\0\u308e\0\u30c5\0\u30fc"+
+ "\0\u3133\0\u316a\0\u31a1\0\u31d8\0\u320f\0\u3246\0\u327d\0\u32b4"+
+ "\0\u32eb\0\u3322\0\u3359\0\u3390\0\u33c7\0\u33fe\0\u3435\0\u346c"+
+ "\0\u34a3\0\u34da\0\u3511\0\u3548\0\u357f\0\u35b6\0\u35ed\0\u3624"+
+ "\0\u365b\0\u0339\0\u3692\0\u36c9\0\u3700\0\u3737\0\u376e\0\u37a5"+
+ "\0\u37dc\0\u308e\0\u3813\0\u384a\0\u3881\0\u38b8\0\u38ef\0\u3926"+
+ "\0\u395d\0\u3994";
+
+ private static int [] zzUnpackRowMap() {
+ int [] result = new int[290];
+ 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 =
+ "\2\6\1\7\2\0\1\10\1\6\1\11\1\12\1\13"+
+ "\1\14\1\15\2\11\1\16\1\17\1\20\1\21\1\22"+
+ "\1\23\5\24\1\25\2\24\2\6\1\26\1\27\1\30"+
+ "\1\31\1\32\1\33\1\34\1\24\1\35\1\24\1\36"+
+ "\1\37\1\40\1\41\1\42\1\24\1\43\1\44\1\45"+
+ "\1\46\1\47\1\50\1\51\2\24\2\52\1\53\2\52"+
+ "\1\54\6\52\1\55\2\52\1\56\47\52\2\57\1\60"+
+ "\2\57\1\61\2\57\1\62\23\57\1\63\32\57\1\64"+
+ "\1\65\1\66\1\0\1\65\1\66\1\65\60\64\1\67"+
+ "\1\70\1\71\1\0\1\70\1\71\1\70\60\67\71\0"+
+ "\1\7\125\0\1\72\1\73\3\0\1\74\1\0\1\75"+
+ "\3\0\1\76\4\0\1\77\5\0\1\100\2\0\2\100"+
+ "\1\0\26\100\1\101\32\100\20\0\2\102\61\0\1\103"+
+ "\2\0\1\104\65\0\1\102\1\0\2\21\6\0\1\105"+
+ "\1\0\1\105\1\106\14\0\1\105\10\0\1\105\2\0"+
+ "\1\106\20\0\1\102\1\0\2\21\6\0\1\105\1\0"+
+ "\1\105\15\0\1\105\10\0\1\105\27\0\1\11\67\0"+
+ "\1\11\63\0\2\24\2\0\10\24\1\0\32\24\20\0"+
+ "\2\24\2\0\6\24\1\107\1\24\1\0\32\24\20\0"+
+ "\2\24\2\0\10\24\1\0\15\24\1\110\6\24\1\111"+
+ "\5\24\20\0\2\24\2\0\10\24\1\0\11\24\1\112"+
+ "\4\24\1\113\2\24\1\114\10\24\20\0\2\24\2\0"+
+ "\10\24\1\0\1\24\1\115\6\24\1\116\1\117\4\24"+
+ "\1\120\13\24\20\0\2\24\2\0\10\24\1\0\5\24"+
+ "\1\121\10\24\1\122\11\24\1\123\1\24\20\0\2\24"+
+ "\2\0\10\24\1\0\13\24\1\124\1\24\1\125\11\24"+
+ "\1\126\2\24\20\0\2\24\2\0\10\24\1\0\1\24"+
+ "\1\127\11\24\1\130\2\24\1\131\2\24\1\132\10\24"+
+ "\20\0\2\24\2\0\10\24\1\0\16\24\1\111\13\24"+
+ "\20\0\2\24\2\0\10\24\1\0\6\24\1\133\6\24"+
+ "\1\134\14\24\20\0\2\24\2\0\10\24\1\0\16\24"+
+ "\1\135\13\24\20\0\2\24\2\0\10\24\1\0\24\24"+
+ "\1\136\5\24\20\0\2\24\2\0\10\24\1\0\1\24"+
+ "\1\137\3\24\1\140\10\24\1\141\13\24\20\0\2\24"+
+ "\2\0\10\24\1\0\17\24\1\142\1\24\1\143\10\24"+
+ "\20\0\2\24\2\0\10\24\1\0\21\24\1\144\2\24"+
+ "\1\145\5\24\20\0\2\24\2\0\10\24\1\0\5\24"+
+ "\1\146\24\24\20\0\2\24\2\0\10\24\1\0\10\24"+
+ "\1\147\1\150\11\24\1\151\2\24\1\152\3\24\20\0"+
+ "\2\24\2\0\10\24\1\0\5\24\1\153\2\24\1\154"+
+ "\10\24\1\155\6\24\1\156\1\24\20\0\2\24\2\0"+
+ "\10\24\1\0\15\24\1\157\4\24\1\160\7\24\20\0"+
+ "\2\24\2\0\10\24\1\0\11\24\1\161\4\24\1\162"+
+ "\13\24\20\0\2\24\2\0\10\24\1\0\10\24\1\163"+
+ "\21\24\20\0\2\24\2\0\10\24\1\0\16\24\1\164"+
+ "\13\24\2\52\1\0\2\52\1\0\6\52\1\165\52\52"+
+ "\2\0\1\53\64\0\2\166\1\167\2\166\1\170\6\166"+
+ "\1\171\2\166\1\172\47\166\17\0\1\166\47\0\2\57"+
+ "\1\0\2\57\1\0\2\57\1\0\23\57\1\63\32\57"+
+ "\2\0\1\60\64\0\2\57\1\0\2\57\1\0\61\57"+
+ "\1\0\1\65\2\0\1\65\1\0\1\65\62\0\1\66"+
+ "\2\0\1\66\62\0\1\70\1\71\1\0\1\70\1\71"+
+ "\1\70\62\0\1\71\2\0\1\71\123\0\1\173\74\0"+
+ "\1\174\1\0\1\175\3\0\1\176\53\0\1\177\5\0"+
+ "\1\200\1\201\62\0\1\202\76\0\1\203\62\0\1\204"+
+ "\4\0\1\205\21\0\1\206\54\0\1\100\2\0\2\100"+
+ "\1\0\4\100\1\207\54\100\20\0\2\102\3\0\1\210"+
+ "\1\211\1\0\1\211\11\0\1\210\1\211\4\0\1\211"+
+ "\32\0\1\103\52\0\2\104\1\0\2\104\1\0\61\104"+
+ "\30\0\1\105\1\0\1\105\15\0\1\105\10\0\1\105"+
+ "\25\0\2\212\2\0\3\212\7\0\6\212\43\0\2\24"+
+ "\2\0\4\24\1\213\3\24\1\0\32\24\20\0\2\24"+
+ "\2\0\10\24\1\0\4\24\1\143\25\24\20\0\2\24"+
+ "\2\0\10\24\1\0\23\24\1\214\6\24\20\0\2\24"+
+ "\2\0\10\24\1\0\23\24\1\215\6\24\20\0\2\24"+
+ "\2\0\10\24\1\0\16\24\1\216\13\24\20\0\2\24"+
+ "\2\0\10\24\1\0\5\24\1\217\24\24\20\0\2\24"+
+ "\2\0\10\24\1\0\22\24\1\220\1\221\6\24\20\0"+
+ "\2\24\2\0\10\24\1\0\1\24\1\222\30\24\20\0"+
+ "\2\24\2\0\10\24\1\0\15\24\1\133\14\24\20\0"+
+ "\2\24\2\0\10\24\1\0\14\24\1\223\1\224\6\24"+
+ "\1\225\5\24\20\0\2\24\2\0\10\24\1\0\6\24"+
+ "\1\226\4\24\1\227\16\24\20\0\2\24\2\0\10\24"+
+ "\1\0\24\24\1\230\5\24\20\0\2\24\2\0\10\24"+
+ "\1\0\15\24\1\231\14\24\20\0\2\24\2\0\10\24"+
+ "\1\0\22\24\1\220\7\24\20\0\2\24\2\0\10\24"+
+ "\1\0\24\24\1\232\5\24\20\0\2\24\2\0\10\24"+
+ "\1\0\23\24\1\233\6\24\20\0\2\24\2\0\10\24"+
+ "\1\0\13\24\1\124\16\24\20\0\2\24\2\0\10\24"+
+ "\1\0\16\24\1\234\13\24\20\0\2\24\2\0\10\24"+
+ "\1\0\21\24\1\133\10\24\20\0\2\24\2\0\10\24"+
+ "\1\0\11\24\1\235\20\24\20\0\2\24\2\0\10\24"+
+ "\1\0\13\24\1\236\7\24\1\237\6\24\20\0\2\24"+
+ "\2\0\10\24\1\0\15\24\1\240\14\24\20\0\2\24"+
+ "\2\0\10\24\1\0\23\24\1\241\6\24\20\0\2\24"+
+ "\2\0\10\24\1\0\14\24\1\242\15\24\20\0\2\24"+
+ "\2\0\10\24\1\0\26\24\1\133\3\24\20\0\2\24"+
+ "\2\0\10\24\1\0\11\24\1\243\11\24\1\143\6\24"+
+ "\20\0\2\24\2\0\10\24\1\0\5\24\1\244\24\24"+
+ "\20\0\2\24\2\0\10\24\1\0\1\245\31\24\20\0"+
+ "\2\24\2\0\10\24\1\0\11\24\1\246\4\24\1\247"+
+ "\13\24\20\0\2\24\2\0\10\24\1\0\2\24\1\250"+
+ "\27\24\20\0\2\24\2\0\10\24\1\0\7\24\1\251"+
+ "\1\24\1\252\11\24\1\253\6\24\20\0\2\24\2\0"+
+ "\10\24\1\0\16\24\1\254\13\24\20\0\2\24\2\0"+
+ "\10\24\1\0\7\24\1\255\21\24\1\256\20\0\2\24"+
+ "\2\0\10\24\1\0\1\24\1\257\17\24\1\260\10\24"+
+ "\20\0\2\24\2\0\10\24\1\0\11\24\1\261\20\24"+
+ "\20\0\2\24\2\0\10\24\1\0\14\24\1\262\15\24"+
+ "\20\0\2\24\2\0\10\24\1\0\11\24\1\263\7\24"+
+ "\1\264\10\24\20\0\2\24\2\0\10\24\1\0\24\24"+
+ "\1\220\3\24\1\133\1\24\20\0\2\24\2\0\10\24"+
+ "\1\0\17\24\1\265\12\24\20\0\2\24\2\0\10\24"+
+ "\1\0\11\24\1\266\10\24\1\267\7\24\20\0\2\24"+
+ "\2\0\10\24\1\0\11\24\1\270\20\24\20\0\2\24"+
+ "\2\0\10\24\1\0\21\24\1\271\10\24\20\0\2\24"+
+ "\2\0\10\24\1\0\11\24\1\272\1\24\1\273\16\24"+
+ "\20\0\2\24\2\0\10\24\1\0\11\24\1\274\20\24"+
+ "\20\0\2\24\2\0\10\24\1\0\21\24\1\143\10\24"+
+ "\2\166\1\0\2\166\1\0\6\166\1\165\2\166\1\0"+
+ "\47\166\2\52\1\0\2\52\1\0\6\52\1\165\2\52"+
+ "\1\56\47\52\2\0\1\167\64\0\2\166\1\0\2\166"+
+ "\1\0\6\166\1\171\2\166\1\172\47\166\43\0\1\75"+
+ "\71\0\1\275\10\0\1\276\50\0\1\277\103\0\1\300"+
+ "\51\0\1\301\10\0\1\204\70\0\1\302\52\0\1\303"+
+ "\100\0\1\276\52\0\1\304\71\0\1\301\73\0\1\305"+
+ "\35\0\1\306\2\0\2\307\65\0\2\212\2\0\3\212"+
+ "\1\0\1\105\1\0\1\105\3\0\6\212\4\0\1\105"+
+ "\10\0\1\105\25\0\2\24\2\0\4\24\1\310\3\24"+
+ "\1\0\32\24\20\0\2\24\2\0\10\24\1\0\16\24"+
+ "\1\133\13\24\20\0\2\24\2\0\10\24\1\0\1\24"+
+ "\1\311\14\24\1\312\13\24\20\0\2\24\2\0\10\24"+
+ "\1\0\13\24\1\237\16\24\20\0\2\24\2\0\10\24"+
+ "\1\0\1\24\1\313\30\24\20\0\2\24\2\0\10\24"+
+ "\1\0\5\24\1\133\24\24\20\0\2\24\2\0\10\24"+
+ "\1\0\3\24\1\314\26\24\20\0\2\24\2\0\10\24"+
+ "\1\0\21\24\1\237\10\24\20\0\2\24\2\0\10\24"+
+ "\1\0\17\24\1\315\12\24\20\0\2\24\2\0\10\24"+
+ "\1\0\22\24\1\316\1\317\6\24\20\0\2\24\2\0"+
+ "\10\24\1\0\23\24\1\133\6\24\20\0\2\24\2\0"+
+ "\10\24\1\0\1\24\1\320\30\24\20\0\2\24\2\0"+
+ "\10\24\1\0\5\24\1\321\24\24\20\0\2\24\2\0"+
+ "\10\24\1\0\2\24\1\322\27\24\20\0\2\24\2\0"+
+ "\10\24\1\0\1\24\1\323\30\24\20\0\2\24\2\0"+
+ "\10\24\1\0\14\24\1\133\15\24\20\0\2\24\2\0"+
+ "\10\24\1\0\5\24\1\324\24\24\20\0\2\24\2\0"+
+ "\10\24\1\0\1\24\1\325\30\24\20\0\2\24\2\0"+
+ "\10\24\1\0\5\24\1\326\24\24\20\0\2\24\2\0"+
+ "\10\24\1\0\11\24\1\327\20\24\20\0\2\24\2\0"+
+ "\10\24\1\0\7\24\1\237\22\24\20\0\2\24\2\0"+
+ "\10\24\1\0\1\24\1\330\30\24\20\0\2\24\2\0"+
+ "\10\24\1\0\5\24\1\331\24\24\20\0\2\24\2\0"+
+ "\10\24\1\0\15\24\1\332\14\24\20\0\2\24\2\0"+
+ "\10\24\1\0\21\24\1\333\10\24\20\0\2\24\2\0"+
+ "\10\24\1\0\5\24\1\334\24\24\20\0\2\24\2\0"+
+ "\10\24\1\0\25\24\1\335\4\24\20\0\2\24\2\0"+
+ "\10\24\1\0\23\24\1\336\6\24\20\0\2\24\2\0"+
+ "\10\24\1\0\13\24\1\337\16\24\20\0\2\24\2\0"+
+ "\10\24\1\0\11\24\1\340\20\24\20\0\2\24\2\0"+
+ "\10\24\1\0\15\24\1\341\14\24\20\0\2\24\2\0"+
+ "\10\24\1\0\24\24\1\342\5\24\20\0\2\24\2\0"+
+ "\10\24\1\0\21\24\1\325\10\24\20\0\2\24\2\0"+
+ "\10\24\1\0\15\24\1\343\14\24\20\0\2\24\2\0"+
+ "\10\24\1\0\5\24\1\344\24\24\20\0\2\24\2\0"+
+ "\10\24\1\0\23\24\1\345\6\24\20\0\2\24\2\0"+
+ "\10\24\1\0\24\24\1\346\5\24\20\0\2\24\2\0"+
+ "\10\24\1\0\23\24\1\221\6\24\20\0\2\24\2\0"+
+ "\10\24\1\0\17\24\1\347\12\24\20\0\2\24\2\0"+
+ "\10\24\1\0\22\24\1\133\7\24\20\0\2\24\2\0"+
+ "\10\24\1\0\16\24\1\140\13\24\20\0\2\24\2\0"+
+ "\10\24\1\0\5\24\1\350\24\24\20\0\2\24\2\0"+
+ "\10\24\1\0\16\24\1\351\13\24\20\0\2\24\2\0"+
+ "\10\24\1\0\11\24\1\352\20\24\20\0\2\24\2\0"+
+ "\10\24\1\0\15\24\1\353\14\24\20\0\2\24\2\0"+
+ "\10\24\1\0\23\24\1\354\6\24\20\0\2\24\2\0"+
+ "\10\24\1\0\4\24\1\237\25\24\20\0\2\24\2\0"+
+ "\10\24\1\0\1\24\1\355\30\24\20\0\2\24\2\0"+
+ "\10\24\1\0\13\24\1\220\16\24\43\0\1\356\65\0"+
+ "\1\356\72\0\1\275\73\0\1\357\55\0\1\275\77\0"+
+ "\1\360\63\0\1\361\62\0\1\362\74\0\1\363\34\0"+
+ "\2\307\65\0\2\307\4\0\1\211\1\0\1\211\12\0"+
+ "\1\211\4\0\1\211\36\0\2\24\2\0\10\24\1\0"+
+ "\15\24\1\364\14\24\20\0\2\24\2\0\10\24\1\0"+
+ "\21\24\1\365\10\24\20\0\2\24\2\0\10\24\1\0"+
+ "\12\24\1\133\17\24\20\0\2\24\2\0\10\24\1\0"+
+ "\10\24\1\133\21\24\20\0\2\24\2\0\10\24\1\0"+
+ "\13\24\1\365\16\24\20\0\2\24\2\0\10\24\1\0"+
+ "\23\24\1\366\6\24\20\0\2\24\2\0\10\24\1\0"+
+ "\11\24\1\367\20\24\20\0\2\24\2\0\10\24\1\0"+
+ "\24\24\1\370\5\24\20\0\2\24\2\0\10\24\1\0"+
+ "\23\24\1\220\6\24\20\0\2\24\2\0\10\24\1\0"+
+ "\13\24\1\371\16\24\20\0\2\24\2\0\10\24\1\0"+
+ "\14\24\1\372\15\24\20\0\2\24\2\0\10\24\1\0"+
+ "\21\24\1\373\10\24\20\0\2\24\2\0\10\24\1\0"+
+ "\23\24\1\237\6\24\20\0\2\24\2\0\10\24\1\0"+
+ "\15\24\1\374\14\24\20\0\2\24\2\0\10\24\1\0"+
+ "\15\24\1\375\14\24\20\0\2\24\2\0\10\24\1\0"+
+ "\2\24\1\376\27\24\20\0\2\24\2\0\10\24\1\0"+
+ "\22\24\1\377\7\24\20\0\2\24\2\0\10\24\1\0"+
+ "\13\24\1\236\16\24\20\0\2\24\2\0\10\24\1\0"+
+ "\1\24\1\u0100\30\24\20\0\2\24\2\0\10\24\1\0"+
+ "\20\24\1\365\11\24\20\0\2\24\2\0\10\24\1\0"+
+ "\1\24\1\u0101\30\24\20\0\2\24\2\0\10\24\1\0"+
+ "\5\24\1\u0102\24\24\20\0\2\24\2\0\10\24\1\0"+
+ "\11\24\1\u0103\20\24\20\0\2\24\2\0\10\24\1\0"+
+ "\22\24\1\u0104\7\24\20\0\2\24\2\0\10\24\1\0"+
+ "\23\24\1\u0105\6\24\20\0\2\24\2\0\10\24\1\0"+
+ "\21\24\1\117\10\24\20\0\2\24\2\0\10\24\1\0"+
+ "\5\24\1\272\24\24\20\0\2\24\2\0\10\24\1\0"+
+ "\16\24\1\u0106\13\24\20\0\2\24\2\0\10\24\1\0"+
+ "\11\24\1\u0107\20\24\20\0\2\24\2\0\10\24\1\0"+
+ "\3\24\1\325\26\24\20\0\2\24\2\0\10\24\1\0"+
+ "\13\24\1\u0108\16\24\20\0\2\24\2\0\10\24\1\0"+
+ "\4\24\1\u0109\4\24\1\364\20\24\20\0\2\24\2\0"+
+ "\10\24\1\0\15\24\1\237\14\24\20\0\2\24\2\0"+
+ "\10\24\1\0\7\24\1\255\22\24\20\0\2\24\2\0"+
+ "\10\24\1\0\7\24\1\133\22\24\20\0\2\24\2\0"+
+ "\10\24\1\0\24\24\1\u010a\5\24\20\0\2\24\2\0"+
+ "\10\24\1\0\23\24\1\u010b\6\24\56\0\1\356\66\0"+
+ "\1\u010c\71\0\1\u010d\56\0\1\u010e\61\0\1\356\42\0"+
+ "\2\24\2\0\10\24\1\0\4\24\1\365\25\24\20\0"+
+ "\2\24\2\0\10\24\1\0\1\u010f\31\24\20\0\2\24"+
+ "\2\0\10\24\1\0\15\24\1\u0110\14\24\20\0\2\24"+
+ "\2\0\10\24\1\0\13\24\1\225\16\24\20\0\2\24"+
+ "\2\0\10\24\1\0\5\24\1\237\24\24\20\0\2\24"+
+ "\2\0\10\24\1\0\11\24\1\u0111\20\24\20\0\2\24"+
+ "\2\0\10\24\1\0\15\24\1\u0112\14\24\20\0\2\24"+
+ "\2\0\10\24\1\0\4\24\1\u0112\25\24\20\0\2\24"+
+ "\2\0\10\24\1\0\5\24\1\u0112\24\24\20\0\2\24"+
+ "\2\0\10\24\1\0\13\24\1\375\16\24\20\0\2\24"+
+ "\2\0\10\24\1\0\17\24\1\u0113\12\24\20\0\2\24"+
+ "\2\0\10\24\1\0\23\24\1\u0114\6\24\20\0\2\24"+
+ "\2\0\10\24\1\0\23\24\1\375\6\24\20\0\2\24"+
+ "\2\0\10\24\1\0\3\24\1\u0115\26\24\20\0\2\24"+
+ "\2\0\10\24\1\0\3\24\1\u0112\26\24\20\0\2\24"+
+ "\2\0\10\24\1\0\23\24\1\u0116\6\24\20\0\2\24"+
+ "\2\0\10\24\1\0\5\24\1\u0117\24\24\20\0\2\24"+
+ "\2\0\10\24\1\0\6\24\1\133\23\24\20\0\2\24"+
+ "\2\0\10\24\1\0\3\24\1\366\26\24\20\0\2\24"+
+ "\2\0\10\24\1\0\1\24\1\321\30\24\20\0\2\24"+
+ "\2\0\10\24\1\0\5\24\1\u0106\24\24\20\0\2\24"+
+ "\2\0\10\24\1\0\1\24\1\u0118\30\24\20\0\2\24"+
+ "\2\0\10\24\1\0\11\24\1\376\20\24\60\0\1\356"+
+ "\47\0\1\276\63\0\1\356\50\0\2\24\2\0\10\24"+
+ "\1\0\3\24\1\u0119\26\24\20\0\2\24\2\0\10\24"+
+ "\1\0\24\24\1\220\5\24\20\0\2\24\2\0\10\24"+
+ "\1\0\3\24\1\u011a\26\24\20\0\2\24\2\0\10\24"+
+ "\1\0\1\24\1\u011b\30\24\20\0\2\24\2\0\10\24"+
+ "\1\0\16\24\1\312\13\24\20\0\2\24\2\0\10\24"+
+ "\1\0\23\24\1\u011c\6\24\20\0\2\24\2\0\10\24"+
+ "\1\0\5\24\1\u011d\24\24\20\0\2\24\2\0\10\24"+
+ "\1\0\21\24\1\u011e\10\24\20\0\2\24\2\0\10\24"+
+ "\1\0\13\24\1\u0112\16\24\20\0\2\24\2\0\10\24"+
+ "\1\0\1\24\1\u011f\30\24\20\0\2\24\2\0\10\24"+
+ "\1\0\3\24\1\220\26\24\20\0\2\24\2\0\10\24"+
+ "\1\0\5\24\1\374\24\24\20\0\2\24\2\0\10\24"+
+ "\1\0\21\24\1\u0112\10\24\20\0\2\24\2\0\10\24"+
+ "\1\0\17\24\1\u0120\12\24\20\0\2\24\2\0\10\24"+
+ "\1\0\22\24\1\225\7\24\20\0\2\24\2\0\10\24"+
+ "\1\0\21\24\1\u0121\10\24\20\0\2\24\2\0\10\24"+
+ "\1\0\5\24\1\u0122\24\24\20\0\2\24\2\0\10\24"+
+ "\1\0\23\24\1\u011a\6\24";
+
+ private static int [] zzUnpackTrans() {
+ int [] result = new int[14795];
+ 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 code for "Unknown internal scanner error". */
+ private static final int ZZ_UNKNOWN_ERROR = 0;
+ /** Error code for "could not match input". */
+ private static final int ZZ_NO_MATCH = 1;
+ /** Error code for "pushback value was too large". */
+ private static final int ZZ_PUSHBACK_2BIG = 2;
+
+ /**
+ * Error messages for {@link #ZZ_UNKNOWN_ERROR}, {@link #ZZ_NO_MATCH}, and
+ * {@link #ZZ_PUSHBACK_2BIG} respectively.
+ */
+ private static final String ZZ_ERROR_MSG[] = {
+ "Unknown internal scanner error",
+ "Error: could not match input",
+ "Error: pushback value was too large"
+ };
+
+ /**
+ * ZZ_ATTRIBUTE[aState] contains the attributes of state {@code aState}
+ */
+ private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+ private static final String ZZ_ATTRIBUTE_PACKED_0 =
+ "\1\0\2\1\2\0\2\11\1\1\2\11\2\1\1\11"+
+ "\35\1\1\11\1\1\2\0\1\1\1\11\1\1\1\11"+
+ "\1\0\1\11\2\1\1\11\2\1\10\0\4\1\1\0"+
+ "\56\1\1\0\1\1\1\11\1\1\1\0\1\11\4\0"+
+ "\1\1\6\0\1\11\1\1\1\0\1\11\63\1\12\0"+
+ "\47\1\1\11\5\0\30\1\3\0\24\1";
+
+ private static int [] zzUnpackAttribute() {
+ int [] result = new int[290];
+ 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;
+ }
+ /** Input device. */
+ private java.io.Reader zzReader;
- /* 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"
- };
-
- /** the input device */
- private java.io.Reader zzReader;
+ /** Current state of the DFA. */
+ private int zzState;
- /** the current state of the DFA */
- private int zzState;
+ /** Current lexical state. */
+ private int zzLexicalState = YYINITIAL;
- /** the current lexical state */
- private int zzLexicalState = YYINITIAL;
+ /**
+ * This buffer contains the current text to be matched and is the source of the {@link #yytext()}
+ * string.
+ */
+ private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
- /** this buffer contains the current text to be matched and is
- the source of the yytext() string */
- private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+ /** Text position at the last accepting state. */
+ private int zzMarkedPos;
- /** the textposition at the last accepting state */
- private int zzMarkedPos;
+ /** Current text position in the buffer. */
+ private int zzCurrentPos;
- /** the current text position in the buffer */
- private int zzCurrentPos;
+ /** Marks the beginning of the {@link #yytext()} string in the buffer. */
+ private int zzStartRead;
- /** startRead marks the beginning of the yytext() string in the buffer */
- private int zzStartRead;
+ /** Marks the last character in the buffer, that has been read from input. */
+ private int zzEndRead;
- /** endRead marks the last character in the buffer, that has been read
- from input */
- private int zzEndRead;
+ /**
+ * Whether the scanner is at the end of file.
+ * @see #yyatEOF
+ */
+ private boolean zzAtEOF;
- /** number of newlines encountered up to the start of the matched text */
- private int yyline;
+ /**
+ * The number of occupied positions in {@link #zzBuffer} beyond {@link #zzEndRead}.
+ *
+ * <p>When a lead/high surrogate has been read from the input stream into the final
+ * {@link #zzBuffer} position, this will have a value of 1; otherwise, it will have a value of 0.
+ */
+ private int zzFinalHighSurrogate = 0;
- /** the number of characters up to the start of the matched text */
- private int yychar;
+ /** Number of newlines encountered up to the start of the matched text. */
+ @SuppressWarnings("unused")
+ private int yyline;
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- private int yycolumn;
+ /** Number of characters from the last newline up to the start of the matched text. */
+ @SuppressWarnings("unused")
+ private int yycolumn;
- /**
- * zzAtBOL == true <=> the scanner is currently at the beginning of a line
- */
- private boolean zzAtBOL = true;
+ /** Number of characters up to the start of the matched text. */
+ private long yychar;
- /** zzAtEOF == true <=> the scanner is at the EOF */
- private boolean zzAtEOF;
+ /** Whether the scanner is currently at the beginning of a line. */
+ @SuppressWarnings("unused")
+ private boolean zzAtBOL = true;
- /** denotes if the user-EOF-code has already been executed */
- private boolean zzEOFDone;
+ /** Whether the user-EOF-code has already been executed. */
+ @SuppressWarnings("unused")
+ private boolean zzEOFDone;
- /* user code: */
+ /* user code: */
private int whitesOnFirstLine;
private int saveLexState;
int end = str.length() - 1;
int i = end;
for (; i >= 0; i--) {
- char c = str.charAt(i);
- if (c != ' ' && c != '\t' && c != '\r' && c != '\n') {
- break;
- }
+ char c = str.charAt(i);
+ if (c != ' ' && c != '\t' && c != '\r' && c != '\n') {
+ break;
+ }
}
if (i != end) {
- return str.substring(0, i + 1);
+ return str.substring(0, i + 1);
}
return str;
Reader reader = new StringReader(trimEnd(code));
String str = convert(h, reader, true);
try {
- reader.close();
+ reader.close();
} catch (IOException e) { }
return str;
public String convert(AbstractCCodeHandler h, Reader code, boolean ret) {
if (code == null) {
- return null;
+ return null;
} else {
- handler = h;
- whitesOnFirstLine = 0;
- yyreset(code);
- yybegin(CLEANFIRST);
- try {
- yylex();
- } catch (IOException e) {
- return null;
- }
- if (ret) {
- return h.toString();
- }
- return "";
+ handler = h;
+ whitesOnFirstLine = 0;
+ yyreset(code);
+ yybegin(CLEANFIRST);
+ try {
+ yylex();
+ } catch (IOException e) {
+ return null;
+ }
+ if (ret) {
+ return h.toString();
+ }
+ return "";
}
}
- /**
- * 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.
- */
- public CLexer(java.io.Reader in) {
- this.zzReader = in;
+ /**
+ * Creates a new scanner
+ *
+ * @param in the java.io.Reader to read input from.
+ */
+ public CLexer(java.io.Reader in) {
+ this.zzReader = in;
+ }
+
+ /**
+ * Translates raw input code points to DFA table row
+ */
+ private static int zzCMap(int input) {
+ int offset = input & 255;
+ return offset == input ? ZZ_CMAP_BLOCKS[offset] : ZZ_CMAP_BLOCKS[ZZ_CMAP_TOP[input >> 8] | offset];
+ }
+
+ /**
+ * Refills the input buffer.
+ *
+ * @return {@code false} 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) {
+ zzEndRead += zzFinalHighSurrogate;
+ zzFinalHighSurrogate = 0;
+ System.arraycopy(zzBuffer, zzStartRead,
+ zzBuffer, 0,
+ zzEndRead - zzStartRead);
+
+ /* translate stored positions */
+ zzEndRead -= zzStartRead;
+ zzCurrentPos -= zzStartRead;
+ zzMarkedPos -= zzStartRead;
+ zzStartRead = 0;
}
- /**
- * Creates a new scanner.
- * There is also java.io.Reader version of this constructor.
- *
- * @param in the java.io.Inputstream to read input from.
- */
- public CLexer(java.io.InputStream in) {
- this(new java.io.InputStreamReader(in));
+ /* is the buffer big enough? */
+ if (zzCurrentPos >= zzBuffer.length - zzFinalHighSurrogate) {
+ /* if not: blow it up */
+ char newBuffer[] = new char[zzBuffer.length * 2];
+ System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+ zzBuffer = newBuffer;
+ zzEndRead += zzFinalHighSurrogate;
+ zzFinalHighSurrogate = 0;
}
- /**
- * 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 < 156) {
- 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 {
+ /* fill the buffer with new input */
+ int requested = zzBuffer.length - zzEndRead;
+ int numRead = zzReader.read(zzBuffer, zzEndRead, requested);
- /* 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;
+ /* not supposed to occur according to specification of java.io.Reader */
+ if (numRead == 0) {
+ throw new java.io.IOException(
+ "Reader returned 0 characters. See JFlex examples/zero-reader for a workaround.");
}
-
-
- /**
- * 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();
+ if (numRead > 0) {
+ zzEndRead += numRead;
+ if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
+ if (numRead == requested) { // We requested too few chars to encode a full Unicode character
+ --zzEndRead;
+ zzFinalHighSurrogate = 1;
+ } else { // There is room in the buffer for at least one more char
+ int c = zzReader.read(); // Expecting to read a paired low surrogate char
+ if (c == -1) {
+ return true;
+ } else {
+ zzBuffer[zzEndRead++] = (char)c;
+ }
}
+ }
+ /* potentially more input available */
+ return false;
}
+ /* numRead < 0 ==> end of stream */
+ return true;
+ }
- /**
- * 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>.
- *
- * @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;
- }
-
-
- /**
- * 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 );
- }
+ /**
+ * Closes the input reader.
+ *
+ * @throws java.io.IOException if the reader could not be closed.
+ */
+ public final void yyclose() throws java.io.IOException {
+ zzAtEOF = true; // indicate end of file
+ zzEndRead = zzStartRead; // invalidate buffer
- /**
- * 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];
+ if (zzReader != null) {
+ zzReader.close();
}
-
-
- /**
- * Returns the length of the matched text region.
- */
- public final int yylength() {
- return zzMarkedPos - zzStartRead;
+ }
+
+
+ /**
+ * Resets the scanner to read from a new input stream.
+ *
+ * <p>Does not close the old reader.
+ *
+ * <p>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 {@code ZZ_INITIAL}.
+ *
+ * <p>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;
+ zzEOFDone = false;
+ yyResetPosition();
+ zzLexicalState = YYINITIAL;
+ if (zzBuffer.length > ZZ_BUFFERSIZE) {
+ zzBuffer = new char[ZZ_BUFFERSIZE];
}
-
-
- /**
- * Reports an error that occurred 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);
+ }
+
+ /**
+ * Resets the input position.
+ */
+ private final void yyResetPosition() {
+ zzAtBOL = true;
+ zzAtEOF = false;
+ zzCurrentPos = 0;
+ zzMarkedPos = 0;
+ zzStartRead = 0;
+ zzEndRead = 0;
+ zzFinalHighSurrogate = 0;
+ yyline = 0;
+ yycolumn = 0;
+ yychar = 0L;
+ }
+
+
+ /**
+ * Returns whether the scanner has reached the end of the reader it reads from.
+ *
+ * @return whether the scanner has reached EOF.
+ */
+ public final boolean yyatEOF() {
+ return zzAtEOF;
+ }
+
+
+ /**
+ * Returns the current lexical state.
+ *
+ * @return 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.
+ *
+ * @return the matched text.
+ */
+ public final String yytext() {
+ return new String(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);
+ }
+
+
+ /**
+ * Returns the character at the given position from the matched text.
+ *
+ * <p>It is equivalent to {@code yytext().charAt(pos)}, but faster.
+ *
+ * @param position the position of the character to fetch. A value from 0 to {@code yylength()-1}.
+ *
+ * @return the character at {@code position}.
+ */
+ public final char yycharat(int position) {
+ return zzBuffer[zzStartRead + position];
+ }
+
+
+ /**
+ * How many characters were matched.
+ *
+ * @return the length of the matched text region.
+ */
+ public final int yylength() {
+ return zzMarkedPos-zzStartRead;
+ }
+
+
+ /**
+ * Reports an error that occurred while scanning.
+ *
+ * <p>In a well-formed scanner (no or only correct usage of {@code yypushback(int)} and a
+ * match-all fallback rule) this method will only be called with things that
+ * "Can't Possibly Happen".
+ *
+ * <p>If this method is called, something is seriously wrong (e.g. a JFlex bug producing a faulty
+ * scanner etc.).
+ *
+ * <p>Usual syntax/scanner level error handling should be done in error fallback rules.
+ *
+ * @param errorCode the code of the error message to display.
+ */
+ private static 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 void 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;
-
-
- while (true) {
- zzMarkedPosL = zzMarkedPos;
-
- yychar += zzMarkedPosL - zzStartRead;
-
- zzAction = -1;
-
- zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
-
- zzState = ZZ_LEXSTATE[zzLexicalState];
-
-
- 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++];
- }
- }
- zzInput = zzCMapL[zzInput];
-
- boolean zzIsFinal = false;
- boolean zzNoLookAhead = false;
-
- zzForNext: {
- switch (zzState) {
- case 0:
- switch (zzInput) {
- case 0:
- case 3:
- case 5:
- case 7:
- case 17:
- case 23:
- case 25:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 5;
- break zzForNext;
- case 1:
- zzIsFinal = true;
- zzState = 6;
- break zzForNext;
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 7;
- break zzForNext;
- case 4:
- zzIsFinal = true;
- zzState = 8;
- break zzForNext;
- case 9:
- zzIsFinal = true;
- zzState = 10;
- break zzForNext;
- case 10:
- zzIsFinal = true;
- zzState = 11;
- break zzForNext;
- case 12:
- zzIsFinal = true;
- zzState = 12;
- break zzForNext;
- case 14:
- zzIsFinal = true;
- zzState = 13;
- break zzForNext;
- case 18:
- zzIsFinal = true;
- zzState = 14;
- break zzForNext;
- case 20:
- zzIsFinal = true;
- zzState = 15;
- break zzForNext;
- case 21:
- zzIsFinal = true;
- zzState = 16;
- break zzForNext;
- case 22:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 17;
- break zzForNext;
- case 24:
- zzIsFinal = true;
- zzState = 18;
- break zzForNext;
- case 26:
- zzIsFinal = true;
- zzState = 19;
- break zzForNext;
- case 27:
- zzIsFinal = true;
- zzState = 20;
- break zzForNext;
- case 28:
- zzIsFinal = true;
- zzState = 21;
- break zzForNext;
- case 29:
- zzIsFinal = true;
- zzState = 22;
- break zzForNext;
- case 30:
- zzIsFinal = true;
- zzState = 23;
- break zzForNext;
- case 31:
- zzIsFinal = true;
- zzState = 24;
- break zzForNext;
- case 33:
- zzIsFinal = true;
- zzState = 25;
- break zzForNext;
- case 34:
- zzIsFinal = true;
- zzState = 26;
- break zzForNext;
- case 36:
- zzIsFinal = true;
- zzState = 27;
- break zzForNext;
- case 37:
- zzIsFinal = true;
- zzState = 28;
- break zzForNext;
- case 38:
- zzIsFinal = true;
- zzState = 29;
- break zzForNext;
- case 40:
- zzIsFinal = true;
- zzState = 30;
- break zzForNext;
- case 41:
- zzIsFinal = true;
- zzState = 31;
- break zzForNext;
- case 42:
- zzIsFinal = true;
- zzState = 32;
- break zzForNext;
- case 43:
- zzIsFinal = true;
- zzState = 33;
- break zzForNext;
- case 45:
- zzIsFinal = true;
- zzState = 34;
- break zzForNext;
- case 46:
- zzIsFinal = true;
- zzState = 35;
- break zzForNext;
- case 47:
- zzIsFinal = true;
- zzState = 36;
- break zzForNext;
- case 48:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 37;
- break zzForNext;
- case 49:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 38;
- break zzForNext;
- case 50:
- zzIsFinal = true;
- zzState = 39;
- break zzForNext;
- case 51:
- zzIsFinal = true;
- zzState = 40;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 1:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- zzState = 42;
- break zzForNext;
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 43;
- break zzForNext;
- case 4:
- zzState = 44;
- break zzForNext;
- case 5:
- zzState = 45;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzState = 41;
- break zzForNext;
- }
-
- case 2:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- zzState = 47;
- break zzForNext;
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 48;
- break zzForNext;
- case 22:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 49;
- break zzForNext;
- case 23:
- zzState = 50;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzState = 46;
- break zzForNext;
- }
-
- case 3:
- switch (zzInput) {
- case 1:
- case 2:
- zzIsFinal = true;
- zzState = 52;
- break zzForNext;
- case 3:
- case 25:
- zzIsFinal = true;
- zzState = 53;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 51;
- break zzForNext;
- }
-
- case 4:
- switch (zzInput) {
- case 1:
- case 2:
- zzIsFinal = true;
- zzState = 55;
- break zzForNext;
- case 3:
- case 25:
- zzIsFinal = true;
- zzState = 56;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 54;
- break zzForNext;
- }
-
- case 6:
- switch (zzInput) {
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 7;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 8:
- switch (zzInput) {
- case 4:
- zzIsFinal = true;
- zzState = 57;
- break zzForNext;
- case 5:
- zzIsFinal = true;
- zzState = 58;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 9:
- switch (zzInput) {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- break zzForNext;
- }
-
- case 10:
- switch (zzInput) {
- case 9:
- case 18:
- zzIsFinal = true;
- break zzForNext;
- case 10:
- case 11:
- case 12:
- case 13:
- zzIsFinal = true;
- zzState = 59;
- break zzForNext;
- case 20:
- zzIsFinal = true;
- zzState = 60;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 11:
- switch (zzInput) {
- case 34:
- zzIsFinal = true;
- zzState = 61;
- break zzForNext;
- case 37:
- zzIsFinal = true;
- zzState = 62;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 12:
- switch (zzInput) {
- case 28:
- zzIsFinal = true;
- zzState = 63;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 13:
- switch (zzInput) {
- case 12:
- zzIsFinal = true;
- zzState = 64;
- break zzForNext;
- case 26:
- zzIsFinal = true;
- zzState = 65;
- break zzForNext;
- case 28:
- zzIsFinal = true;
- zzState = 66;
- break zzForNext;
- case 30:
- zzIsFinal = true;
- zzState = 67;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 14:
- switch (zzInput) {
- case 9:
- case 18:
- zzIsFinal = true;
- zzState = 10;
- break zzForNext;
- case 10:
- case 11:
- case 12:
- case 13:
- zzIsFinal = true;
- zzState = 59;
- break zzForNext;
- case 20:
- zzIsFinal = true;
- zzState = 60;
- break zzForNext;
- case 19:
- case 46:
- zzState = 68;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 15:
- switch (zzInput) {
- case 9:
- case 18:
- zzIsFinal = true;
- zzState = 60;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 16:
- switch (zzInput) {
- case 11:
- zzIsFinal = true;
- zzState = 69;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 18:
- switch (zzInput) {
- case 23:
- zzState = 71;
- break zzForNext;
- case 1:
- case 2:
- case 25:
- break zzForAction;
- default:
- zzState = 70;
- break zzForNext;
- }
-
- case 19:
- switch (zzInput) {
- case 10:
- zzIsFinal = true;
- zzState = 72;
- break zzForNext;
- case 37:
- zzIsFinal = true;
- zzState = 73;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 20:
- switch (zzInput) {
- case 30:
- zzIsFinal = true;
- zzState = 74;
- break zzForNext;
- case 31:
- zzIsFinal = true;
- zzState = 75;
- break zzForNext;
- case 35:
- zzIsFinal = true;
- zzState = 76;
- break zzForNext;
- case 39:
- zzIsFinal = true;
- zzState = 77;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 21:
- switch (zzInput) {
- case 30:
- zzIsFinal = true;
- zzState = 78;
- break zzForNext;
- case 42:
- zzIsFinal = true;
- zzState = 79;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 22:
- switch (zzInput) {
- case 28:
- zzIsFinal = true;
- zzState = 80;
- break zzForNext;
- case 30:
- zzIsFinal = true;
- zzState = 81;
- break zzForNext;
- case 36:
- zzIsFinal = true;
- zzState = 82;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 23:
- switch (zzInput) {
- case 31:
- zzIsFinal = true;
- zzState = 83;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 24:
- switch (zzInput) {
- case 12:
- zzIsFinal = true;
- zzState = 84;
- break zzForNext;
- case 37:
- zzIsFinal = true;
- zzState = 85;
- break zzForNext;
- case 46:
- zzIsFinal = true;
- zzState = 86;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 25:
- switch (zzInput) {
- case 26:
- zzIsFinal = true;
- zzState = 87;
- break zzForNext;
- case 28:
- zzIsFinal = true;
- zzState = 88;
- break zzForNext;
- case 35:
- zzIsFinal = true;
- zzState = 89;
- break zzForNext;
- case 36:
- zzIsFinal = true;
- zzState = 90;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 26:
- switch (zzInput) {
- case 27:
- zzIsFinal = true;
- zzState = 91;
- break zzForNext;
- case 35:
- zzIsFinal = true;
- zzState = 92;
- break zzForNext;
- case 36:
- zzIsFinal = true;
- zzState = 93;
- break zzForNext;
- case 43:
- zzIsFinal = true;
- zzState = 94;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 27:
- switch (zzInput) {
- case 14:
- zzIsFinal = true;
- zzState = 95;
- break zzForNext;
- case 37:
- zzIsFinal = true;
- zzState = 96;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 28:
- switch (zzInput) {
- case 26:
- zzIsFinal = true;
- zzState = 97;
- break zzForNext;
- case 28:
- zzIsFinal = true;
- zzState = 98;
- break zzForNext;
- case 31:
- zzIsFinal = true;
- zzState = 99;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 29:
- switch (zzInput) {
- case 28:
- zzIsFinal = true;
- zzState = 100;
- break zzForNext;
- case 31:
- zzIsFinal = true;
- zzState = 101;
- break zzForNext;
- case 39:
- zzIsFinal = true;
- zzState = 102;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 30:
- switch (zzInput) {
- case 10:
- zzIsFinal = true;
- zzState = 103;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 31:
- switch (zzInput) {
- case 28:
- zzIsFinal = true;
- zzState = 72;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 32:
- switch (zzInput) {
- case 10:
- zzIsFinal = true;
- zzState = 104;
- break zzForNext;
- case 30:
- zzIsFinal = true;
- zzState = 105;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 33:
- switch (zzInput) {
- case 35:
- zzIsFinal = true;
- zzState = 106;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 34:
- switch (zzInput) {
- case 28:
- zzIsFinal = true;
- zzState = 107;
- break zzForNext;
- case 36:
- zzIsFinal = true;
- zzState = 108;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 35:
- switch (zzInput) {
- case 28:
- zzIsFinal = true;
- zzState = 109;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 17:
- case 20:
- case 22:
- case 23:
- case 24:
- case 25:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 36:
- switch (zzInput) {
- case 10:
- zzState = 110;
- break zzForNext;
- case 12:
- zzState = 111;
- break zzForNext;
- case 31:
- zzState = 112;
- break zzForNext;
- case 36:
- zzState = 113;
- break zzForNext;
- case 38:
- zzState = 114;
- break zzForNext;
- case 42:
- zzState = 115;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 39:
- switch (zzInput) {
- case 50:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 38;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 40:
- switch (zzInput) {
- case 51:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 38;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 41:
- switch (zzInput) {
- case 5:
- zzState = 116;
- break zzForNext;
- case 1:
- case 2:
- break zzForAction;
- default:
- zzIsFinal = true;
- break zzForNext;
- }
-
- case 42:
- switch (zzInput) {
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 43;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 44:
- switch (zzInput) {
- case 4:
- zzIsFinal = true;
- zzState = 117;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 45:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- zzState = 118;
- break zzForNext;
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 119;
- break zzForNext;
- case 4:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 120;
- break zzForNext;
- case 5:
- zzState = 121;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzState = 117;
- break zzForNext;
- }
-
- case 46:
- switch (zzInput) {
- case 23:
- zzState = 50;
- break zzForNext;
- case 1:
- case 2:
- case 22:
- break zzForAction;
- default:
- zzIsFinal = true;
- break zzForNext;
- }
-
- case 47:
- switch (zzInput) {
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 48;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 50:
- switch (zzInput) {
- case 1:
- case 2:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 46;
- break zzForNext;
- }
-
- case 52:
- switch (zzInput) {
- case 1:
- case 2:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 53:
- switch (zzInput) {
- case 3:
- case 25:
- zzIsFinal = true;
- break zzForNext