michael@0: /* The following code was generated by JFlex 1.4.2 */
michael@0:
michael@0: package org.json.simple.parser;
michael@0:
michael@0: class Yylex {
michael@0:
michael@0: /** This character denotes the end of file */
michael@0: public static final int YYEOF = -1;
michael@0:
michael@0: /** initial size of the lookahead buffer */
michael@0: private static final int ZZ_BUFFERSIZE = 16384;
michael@0:
michael@0: /** lexical states */
michael@0: public static final int YYINITIAL = 0;
michael@0: public static final int STRING_BEGIN = 2;
michael@0:
michael@0: /**
michael@0: * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
michael@0: * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
michael@0: * at the beginning of a line
michael@0: * l is of the form l = 2*k, k a non negative integer
michael@0: */
michael@0: private static final int ZZ_LEXSTATE[] = {
michael@0: 0, 0, 1, 1
michael@0: };
michael@0:
michael@0: /**
michael@0: * Translates characters to character classes
michael@0: */
michael@0: private static final String ZZ_CMAP_PACKED =
michael@0: "\11\0\1\7\1\7\2\0\1\7\22\0\1\7\1\0\1\11\10\0"+
michael@0: "\1\6\1\31\1\2\1\4\1\12\12\3\1\32\6\0\4\1\1\5"+
michael@0: "\1\1\24\0\1\27\1\10\1\30\3\0\1\22\1\13\2\1\1\21"+
michael@0: "\1\14\5\0\1\23\1\0\1\15\3\0\1\16\1\24\1\17\1\20"+
michael@0: "\5\0\1\25\1\0\1\26\uff82\0";
michael@0:
michael@0: /**
michael@0: * Translates characters to character classes
michael@0: */
michael@0: private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
michael@0:
michael@0: /**
michael@0: * Translates DFA states to action switch labels.
michael@0: */
michael@0: private static final int [] ZZ_ACTION = zzUnpackAction();
michael@0:
michael@0: private static final String ZZ_ACTION_PACKED_0 =
michael@0: "\2\0\2\1\1\2\1\3\1\4\3\1\1\5\1\6"+
michael@0: "\1\7\1\10\1\11\1\12\1\13\1\14\1\15\5\0"+
michael@0: "\1\14\1\16\1\17\1\20\1\21\1\22\1\23\1\24"+
michael@0: "\1\0\1\25\1\0\1\25\4\0\1\26\1\27\2\0"+
michael@0: "\1\30";
michael@0:
michael@0: private static int [] zzUnpackAction() {
michael@0: int [] result = new int[45];
michael@0: int offset = 0;
michael@0: offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
michael@0: return result;
michael@0: }
michael@0:
michael@0: private static int zzUnpackAction(String packed, int offset, int [] result) {
michael@0: int i = 0; /* index in packed string */
michael@0: int j = offset; /* index in unpacked array */
michael@0: int l = packed.length();
michael@0: while (i < l) {
michael@0: int count = packed.charAt(i++);
michael@0: int value = packed.charAt(i++);
michael@0: do result[j++] = value; while (--count > 0);
michael@0: }
michael@0: return j;
michael@0: }
michael@0:
michael@0:
michael@0: /**
michael@0: * Translates a state to a row index in the transition table
michael@0: */
michael@0: private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
michael@0:
michael@0: private static final String ZZ_ROWMAP_PACKED_0 =
michael@0: "\0\0\0\33\0\66\0\121\0\154\0\207\0\66\0\242"+
michael@0: "\0\275\0\330\0\66\0\66\0\66\0\66\0\66\0\66"+
michael@0: "\0\363\0\u010e\0\66\0\u0129\0\u0144\0\u015f\0\u017a\0\u0195"+
michael@0: "\0\66\0\66\0\66\0\66\0\66\0\66\0\66\0\66"+
michael@0: "\0\u01b0\0\u01cb\0\u01e6\0\u01e6\0\u0201\0\u021c\0\u0237\0\u0252"+
michael@0: "\0\66\0\66\0\u026d\0\u0288\0\66";
michael@0:
michael@0: private static int [] zzUnpackRowMap() {
michael@0: int [] result = new int[45];
michael@0: int offset = 0;
michael@0: offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
michael@0: return result;
michael@0: }
michael@0:
michael@0: private static int zzUnpackRowMap(String packed, int offset, int [] result) {
michael@0: int i = 0; /* index in packed string */
michael@0: int j = offset; /* index in unpacked array */
michael@0: int l = packed.length();
michael@0: while (i < l) {
michael@0: int high = packed.charAt(i++) << 16;
michael@0: result[j++] = high | packed.charAt(i++);
michael@0: }
michael@0: return j;
michael@0: }
michael@0:
michael@0: /**
michael@0: * The transition table of the DFA
michael@0: */
michael@0: private static final int ZZ_TRANS [] = {
michael@0: 2, 2, 3, 4, 2, 2, 2, 5, 2, 6,
michael@0: 2, 2, 7, 8, 2, 9, 2, 2, 2, 2,
michael@0: 2, 10, 11, 12, 13, 14, 15, 16, 16, 16,
michael@0: 16, 16, 16, 16, 16, 17, 18, 16, 16, 16,
michael@0: 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
michael@0: 16, 16, 16, 16, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, 4, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, 4, 19, 20, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, 20, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, 5, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: 21, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, 22, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: 23, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, 16, 16, 16, 16, 16, 16, 16,
michael@0: 16, -1, -1, 16, 16, 16, 16, 16, 16, 16,
michael@0: 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, 24, 25,
michael@0: 26, 27, 28, 29, 30, 31, 32, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: 33, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, 34, 35, -1, -1,
michael@0: 34, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: 36, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, 37, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, 38, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, 39, -1, 39, -1, 39, -1, -1,
michael@0: -1, -1, -1, 39, 39, -1, -1, -1, -1, 39,
michael@0: 39, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, 33, -1, 20, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, 20, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, 35,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, 38, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, 40,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, 41, -1, -1, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1, 42, -1, 42, -1, 42,
michael@0: -1, -1, -1, -1, -1, 42, 42, -1, -1, -1,
michael@0: -1, 42, 42, -1, -1, -1, -1, -1, -1, -1,
michael@0: -1, -1, 43, -1, 43, -1, 43, -1, -1, -1,
michael@0: -1, -1, 43, 43, -1, -1, -1, -1, 43, 43,
michael@0: -1, -1, -1, -1, -1, -1, -1, -1, -1, 44,
michael@0: -1, 44, -1, 44, -1, -1, -1, -1, -1, 44,
michael@0: 44, -1, -1, -1, -1, 44, 44, -1, -1, -1,
michael@0: -1, -1, -1, -1, -1,
michael@0: };
michael@0:
michael@0: /* error codes */
michael@0: private static final int ZZ_UNKNOWN_ERROR = 0;
michael@0: private static final int ZZ_NO_MATCH = 1;
michael@0: private static final int ZZ_PUSHBACK_2BIG = 2;
michael@0:
michael@0: /* error messages for the codes above */
michael@0: private static final String ZZ_ERROR_MSG[] = {
michael@0: "Unkown internal scanner error",
michael@0: "Error: could not match input",
michael@0: "Error: pushback value was too large"
michael@0: };
michael@0:
michael@0: /**
michael@0: * ZZ_ATTRIBUTE[aState] contains the attributes of state aState
michael@0: */
michael@0: private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
michael@0:
michael@0: private static final String ZZ_ATTRIBUTE_PACKED_0 =
michael@0: "\2\0\1\11\3\1\1\11\3\1\6\11\2\1\1\11"+
michael@0: "\5\0\10\11\1\0\1\1\1\0\1\1\4\0\2\11"+
michael@0: "\2\0\1\11";
michael@0:
michael@0: private static int [] zzUnpackAttribute() {
michael@0: int [] result = new int[45];
michael@0: int offset = 0;
michael@0: offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
michael@0: return result;
michael@0: }
michael@0:
michael@0: private static int zzUnpackAttribute(String packed, int offset, int [] result) {
michael@0: int i = 0; /* index in packed string */
michael@0: int j = offset; /* index in unpacked array */
michael@0: int l = packed.length();
michael@0: while (i < l) {
michael@0: int count = packed.charAt(i++);
michael@0: int value = packed.charAt(i++);
michael@0: do result[j++] = value; while (--count > 0);
michael@0: }
michael@0: return j;
michael@0: }
michael@0:
michael@0: /** the input device */
michael@0: private java.io.Reader zzReader;
michael@0:
michael@0: /** the current state of the DFA */
michael@0: private int zzState;
michael@0:
michael@0: /** the current lexical state */
michael@0: private int zzLexicalState = YYINITIAL;
michael@0:
michael@0: /** this buffer contains the current text to be matched and is
michael@0: the source of the yytext() string */
michael@0: private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
michael@0:
michael@0: /** the textposition at the last accepting state */
michael@0: private int zzMarkedPos;
michael@0:
michael@0: /** the current text position in the buffer */
michael@0: private int zzCurrentPos;
michael@0:
michael@0: /** startRead marks the beginning of the yytext() string in the buffer */
michael@0: private int zzStartRead;
michael@0:
michael@0: /** endRead marks the last character in the buffer, that has been read
michael@0: from input */
michael@0: private int zzEndRead;
michael@0:
michael@0: /** number of newlines encountered up to the start of the matched text */
michael@0: private int yyline;
michael@0:
michael@0: /** the number of characters up to the start of the matched text */
michael@0: private int yychar;
michael@0:
michael@0: /**
michael@0: * the number of characters from the last newline up to the start of the
michael@0: * matched text
michael@0: */
michael@0: private int yycolumn;
michael@0:
michael@0: /**
michael@0: * zzAtBOL == true <=> the scanner is currently at the beginning of a line
michael@0: */
michael@0: private boolean zzAtBOL = true;
michael@0:
michael@0: /** zzAtEOF == true <=> the scanner is at the EOF */
michael@0: private boolean zzAtEOF;
michael@0:
michael@0: /* user code: */
michael@0: private StringBuffer sb=new StringBuffer();
michael@0:
michael@0: int getPosition(){
michael@0: return yychar;
michael@0: }
michael@0:
michael@0:
michael@0:
michael@0: /**
michael@0: * Creates a new scanner
michael@0: * There is also a java.io.InputStream version of this constructor.
michael@0: *
michael@0: * @param in the java.io.Reader to read input from.
michael@0: */
michael@0: Yylex(java.io.Reader in) {
michael@0: this.zzReader = in;
michael@0: }
michael@0:
michael@0: /**
michael@0: * Creates a new scanner.
michael@0: * There is also java.io.Reader version of this constructor.
michael@0: *
michael@0: * @param in the java.io.Inputstream to read input from.
michael@0: */
michael@0: Yylex(java.io.InputStream in) {
michael@0: this(new java.io.InputStreamReader(in));
michael@0: }
michael@0:
michael@0: /**
michael@0: * Unpacks the compressed character translation table.
michael@0: *
michael@0: * @param packed the packed character translation table
michael@0: * @return the unpacked character translation table
michael@0: */
michael@0: private static char [] zzUnpackCMap(String packed) {
michael@0: char [] map = new char[0x10000];
michael@0: int i = 0; /* index in packed string */
michael@0: int j = 0; /* index in unpacked array */
michael@0: while (i < 90) {
michael@0: int count = packed.charAt(i++);
michael@0: char value = packed.charAt(i++);
michael@0: do map[j++] = value; while (--count > 0);
michael@0: }
michael@0: return map;
michael@0: }
michael@0:
michael@0:
michael@0: /**
michael@0: * Refills the input buffer.
michael@0: *
michael@0: * @return false
, iff there was new input.
michael@0: *
michael@0: * @exception java.io.IOException if any I/O-Error occurs
michael@0: */
michael@0: private boolean zzRefill() throws java.io.IOException {
michael@0:
michael@0: /* first: make room (if you can) */
michael@0: if (zzStartRead > 0) {
michael@0: System.arraycopy(zzBuffer, zzStartRead,
michael@0: zzBuffer, 0,
michael@0: zzEndRead-zzStartRead);
michael@0:
michael@0: /* translate stored positions */
michael@0: zzEndRead-= zzStartRead;
michael@0: zzCurrentPos-= zzStartRead;
michael@0: zzMarkedPos-= zzStartRead;
michael@0: zzStartRead = 0;
michael@0: }
michael@0:
michael@0: /* is the buffer big enough? */
michael@0: if (zzCurrentPos >= zzBuffer.length) {
michael@0: /* if not: blow it up */
michael@0: char newBuffer[] = new char[zzCurrentPos*2];
michael@0: System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
michael@0: zzBuffer = newBuffer;
michael@0: }
michael@0:
michael@0: /* finally: fill the buffer with new input */
michael@0: int numRead = zzReader.read(zzBuffer, zzEndRead,
michael@0: zzBuffer.length-zzEndRead);
michael@0:
michael@0: if (numRead > 0) {
michael@0: zzEndRead+= numRead;
michael@0: return false;
michael@0: }
michael@0: // unlikely but not impossible: read 0 characters, but not at end of stream
michael@0: if (numRead == 0) {
michael@0: int c = zzReader.read();
michael@0: if (c == -1) {
michael@0: return true;
michael@0: } else {
michael@0: zzBuffer[zzEndRead++] = (char) c;
michael@0: return false;
michael@0: }
michael@0: }
michael@0:
michael@0: // numRead < 0
michael@0: return true;
michael@0: }
michael@0:
michael@0:
michael@0: /**
michael@0: * Closes the input stream.
michael@0: */
michael@0: public final void yyclose() throws java.io.IOException {
michael@0: zzAtEOF = true; /* indicate end of file */
michael@0: zzEndRead = zzStartRead; /* invalidate buffer */
michael@0:
michael@0: if (zzReader != null)
michael@0: zzReader.close();
michael@0: }
michael@0:
michael@0:
michael@0: /**
michael@0: * Resets the scanner to read from a new input stream.
michael@0: * Does not close the old reader.
michael@0: *
michael@0: * All internal variables are reset, the old input stream
michael@0: * cannot be reused (internal buffer is discarded and lost).
michael@0: * Lexical state is set to ZZ_INITIAL.
michael@0: *
michael@0: * @param reader the new input stream
michael@0: */
michael@0: public final void yyreset(java.io.Reader reader) {
michael@0: zzReader = reader;
michael@0: zzAtBOL = true;
michael@0: zzAtEOF = false;
michael@0: zzEndRead = zzStartRead = 0;
michael@0: zzCurrentPos = zzMarkedPos = 0;
michael@0: yyline = yychar = yycolumn = 0;
michael@0: zzLexicalState = YYINITIAL;
michael@0: }
michael@0:
michael@0:
michael@0: /**
michael@0: * Returns the current lexical state.
michael@0: */
michael@0: public final int yystate() {
michael@0: return zzLexicalState;
michael@0: }
michael@0:
michael@0:
michael@0: /**
michael@0: * Enters a new lexical state
michael@0: *
michael@0: * @param newState the new lexical state
michael@0: */
michael@0: public final void yybegin(int newState) {
michael@0: zzLexicalState = newState;
michael@0: }
michael@0:
michael@0:
michael@0: /**
michael@0: * Returns the text matched by the current regular expression.
michael@0: */
michael@0: public final String yytext() {
michael@0: return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
michael@0: }
michael@0:
michael@0:
michael@0: /**
michael@0: * Returns the character at position pos from the
michael@0: * matched text.
michael@0: *
michael@0: * It is equivalent to yytext().charAt(pos), but faster
michael@0: *
michael@0: * @param pos the position of the character to fetch.
michael@0: * A value from 0 to yylength()-1.
michael@0: *
michael@0: * @return the character at position pos
michael@0: */
michael@0: public final char yycharat(int pos) {
michael@0: return zzBuffer[zzStartRead+pos];
michael@0: }
michael@0:
michael@0:
michael@0: /**
michael@0: * Returns the length of the matched text region.
michael@0: */
michael@0: public final int yylength() {
michael@0: return zzMarkedPos-zzStartRead;
michael@0: }
michael@0:
michael@0:
michael@0: /**
michael@0: * Reports an error that occured while scanning.
michael@0: *
michael@0: * In a wellformed scanner (no or only correct usage of
michael@0: * yypushback(int) and a match-all fallback rule) this method
michael@0: * will only be called with things that "Can't Possibly Happen".
michael@0: * If this method is called, something is seriously wrong
michael@0: * (e.g. a JFlex bug producing a faulty scanner etc.).
michael@0: *
michael@0: * Usual syntax/scanner level error handling should be done
michael@0: * in error fallback rules.
michael@0: *
michael@0: * @param errorCode the code of the errormessage to display
michael@0: */
michael@0: private void zzScanError(int errorCode) {
michael@0: String message;
michael@0: try {
michael@0: message = ZZ_ERROR_MSG[errorCode];
michael@0: }
michael@0: catch (ArrayIndexOutOfBoundsException e) {
michael@0: message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
michael@0: }
michael@0:
michael@0: throw new Error(message);
michael@0: }
michael@0:
michael@0:
michael@0: /**
michael@0: * Pushes the specified amount of characters back into the input stream.
michael@0: *
michael@0: * They will be read again by then next call of the scanning method
michael@0: *
michael@0: * @param number the number of characters to be read again.
michael@0: * This number must not be greater than yylength()!
michael@0: */
michael@0: public void yypushback(int number) {
michael@0: if ( number > yylength() )
michael@0: zzScanError(ZZ_PUSHBACK_2BIG);
michael@0:
michael@0: zzMarkedPos -= number;
michael@0: }
michael@0:
michael@0:
michael@0: /**
michael@0: * Resumes scanning until the next regular expression is matched,
michael@0: * the end of input is encountered or an I/O-Error occurs.
michael@0: *
michael@0: * @return the next token
michael@0: * @exception java.io.IOException if any I/O-Error occurs
michael@0: */
michael@0: public Yytoken yylex() throws java.io.IOException, ParseException {
michael@0: int zzInput;
michael@0: int zzAction;
michael@0:
michael@0: // cached fields:
michael@0: int zzCurrentPosL;
michael@0: int zzMarkedPosL;
michael@0: int zzEndReadL = zzEndRead;
michael@0: char [] zzBufferL = zzBuffer;
michael@0: char [] zzCMapL = ZZ_CMAP;
michael@0:
michael@0: int [] zzTransL = ZZ_TRANS;
michael@0: int [] zzRowMapL = ZZ_ROWMAP;
michael@0: int [] zzAttrL = ZZ_ATTRIBUTE;
michael@0:
michael@0: while (true) {
michael@0: zzMarkedPosL = zzMarkedPos;
michael@0:
michael@0: yychar+= zzMarkedPosL-zzStartRead;
michael@0:
michael@0: zzAction = -1;
michael@0:
michael@0: zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
michael@0:
michael@0: zzState = ZZ_LEXSTATE[zzLexicalState];
michael@0:
michael@0:
michael@0: zzForAction: {
michael@0: while (true) {
michael@0:
michael@0: if (zzCurrentPosL < zzEndReadL)
michael@0: zzInput = zzBufferL[zzCurrentPosL++];
michael@0: else if (zzAtEOF) {
michael@0: zzInput = YYEOF;
michael@0: break zzForAction;
michael@0: }
michael@0: else {
michael@0: // store back cached positions
michael@0: zzCurrentPos = zzCurrentPosL;
michael@0: zzMarkedPos = zzMarkedPosL;
michael@0: boolean eof = zzRefill();
michael@0: // get translated positions and possibly new buffer
michael@0: zzCurrentPosL = zzCurrentPos;
michael@0: zzMarkedPosL = zzMarkedPos;
michael@0: zzBufferL = zzBuffer;
michael@0: zzEndReadL = zzEndRead;
michael@0: if (eof) {
michael@0: zzInput = YYEOF;
michael@0: break zzForAction;
michael@0: }
michael@0: else {
michael@0: zzInput = zzBufferL[zzCurrentPosL++];
michael@0: }
michael@0: }
michael@0: int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
michael@0: if (zzNext == -1) break zzForAction;
michael@0: zzState = zzNext;
michael@0:
michael@0: int zzAttributes = zzAttrL[zzState];
michael@0: if ( (zzAttributes & 1) == 1 ) {
michael@0: zzAction = zzState;
michael@0: zzMarkedPosL = zzCurrentPosL;
michael@0: if ( (zzAttributes & 8) == 8 ) break zzForAction;
michael@0: }
michael@0:
michael@0: }
michael@0: }
michael@0:
michael@0: // store back cached position
michael@0: zzMarkedPos = zzMarkedPosL;
michael@0:
michael@0: switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
michael@0: case 11:
michael@0: { sb.append(yytext());
michael@0: }
michael@0: case 25: break;
michael@0: case 4:
michael@0: { sb.delete(0, sb.length());yybegin(STRING_BEGIN);
michael@0: }
michael@0: case 26: break;
michael@0: case 16:
michael@0: { sb.append('\b');
michael@0: }
michael@0: case 27: break;
michael@0: case 6:
michael@0: { return new Yytoken(Yytoken.TYPE_RIGHT_BRACE,null);
michael@0: }
michael@0: case 28: break;
michael@0: case 23:
michael@0: { Boolean val=Boolean.valueOf(yytext()); return new Yytoken(Yytoken.TYPE_VALUE, val);
michael@0: }
michael@0: case 29: break;
michael@0: case 22:
michael@0: { return new Yytoken(Yytoken.TYPE_VALUE, null);
michael@0: }
michael@0: case 30: break;
michael@0: case 13:
michael@0: { yybegin(YYINITIAL);return new Yytoken(Yytoken.TYPE_VALUE, sb.toString());
michael@0: }
michael@0: case 31: break;
michael@0: case 12:
michael@0: { sb.append('\\');
michael@0: }
michael@0: case 32: break;
michael@0: case 21:
michael@0: { Double val=Double.valueOf(yytext()); return new Yytoken(Yytoken.TYPE_VALUE, val);
michael@0: }
michael@0: case 33: break;
michael@0: case 1:
michael@0: { throw new ParseException(yychar, ParseException.ERROR_UNEXPECTED_CHAR, new Character(yycharat(0)));
michael@0: }
michael@0: case 34: break;
michael@0: case 8:
michael@0: { return new Yytoken(Yytoken.TYPE_RIGHT_SQUARE,null);
michael@0: }
michael@0: case 35: break;
michael@0: case 19:
michael@0: { sb.append('\r');
michael@0: }
michael@0: case 36: break;
michael@0: case 15:
michael@0: { sb.append('/');
michael@0: }
michael@0: case 37: break;
michael@0: case 10:
michael@0: { return new Yytoken(Yytoken.TYPE_COLON,null);
michael@0: }
michael@0: case 38: break;
michael@0: case 14:
michael@0: { sb.append('"');
michael@0: }
michael@0: case 39: break;
michael@0: case 5:
michael@0: { return new Yytoken(Yytoken.TYPE_LEFT_BRACE,null);
michael@0: }
michael@0: case 40: break;
michael@0: case 17:
michael@0: { sb.append('\f');
michael@0: }
michael@0: case 41: break;
michael@0: case 24:
michael@0: { try{
michael@0: int ch=Integer.parseInt(yytext().substring(2),16);
michael@0: sb.append((char)ch);
michael@0: }
michael@0: catch(Exception e){
michael@0: throw new ParseException(yychar, ParseException.ERROR_UNEXPECTED_EXCEPTION, e);
michael@0: }
michael@0: }
michael@0: case 42: break;
michael@0: case 20:
michael@0: { sb.append('\t');
michael@0: }
michael@0: case 43: break;
michael@0: case 7:
michael@0: { return new Yytoken(Yytoken.TYPE_LEFT_SQUARE,null);
michael@0: }
michael@0: case 44: break;
michael@0: case 2:
michael@0: { Long val=Long.valueOf(yytext()); return new Yytoken(Yytoken.TYPE_VALUE, val);
michael@0: }
michael@0: case 45: break;
michael@0: case 18:
michael@0: { sb.append('\n');
michael@0: }
michael@0: case 46: break;
michael@0: case 9:
michael@0: { return new Yytoken(Yytoken.TYPE_COMMA,null);
michael@0: }
michael@0: case 47: break;
michael@0: case 3:
michael@0: {
michael@0: }
michael@0: case 48: break;
michael@0: default:
michael@0: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
michael@0: zzAtEOF = true;
michael@0: return null;
michael@0: }
michael@0: else {
michael@0: zzScanError(ZZ_NO_MATCH);
michael@0: }
michael@0: }
michael@0: }
michael@0: }
michael@0:
michael@0:
michael@0: }