Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 11th, 2012  |  syntax: None  |  size: 19.96 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /* The following code was generated by JFlex 1.4.3 on 20.4.2011 04:16 */
  2.  
  3. /**
  4.   Lesgreinir fyrir einfaldaða útgáfu af Scheme.
  5.   Höfundur: Þórarinn Sigurðsson
  6.  */
  7. package lexer;
  8. import lexer.Yytoken;
  9.  
  10. /**
  11.  * This class is a scanner generated by
  12.  * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
  13.  * on 20.4.2011 04:16 from the specification file
  14.  * <tt>scheme.jflex</tt>
  15.  */
  16. public class SchemeLexer {
  17.  
  18.   /** This character denotes the end of file */
  19.   public static final int YYEOF = -1;
  20.  
  21.   /** initial size of the lookahead buffer */
  22.   private static final int ZZ_BUFFERSIZE = 16384;
  23.  
  24.   /** lexical states */
  25.   public static final int YYINITIAL = 0;
  26.  
  27.   /**
  28.    * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
  29.    * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
  30.    *                  at the beginning of a line
  31.    * l is of the form l = 2*k, k a non negative integer
  32.    */
  33.   private static final int ZZ_LEXSTATE[] = {
  34.      0, 0
  35.   };
  36.  
  37.   /**
  38.    * Translates characters to character classes
  39.    */
  40.   private static final String ZZ_CMAP_PACKED =
  41.     "\10\0\2\31\1\27\1\30\1\30\1\26\22\0\1\31\1\17\1\36"+
  42.     "\1\34\3\24\1\23\1\33\1\33\1\22\1\24\1\0\1\24\1\37"+
  43.     "\1\24\12\25\1\24\1\32\5\24\32\24\1\0\1\35\1\0\2\24"+
  44.     "\1\0\1\7\1\11\1\24\1\12\1\5\1\13\1\20\1\24\1\14"+
  45.     "\2\24\1\6\1\10\1\15\1\3\1\24\1\1\1\21\1\16\1\4"+
  46.     "\1\2\5\24\3\0\1\24\6\0\1\30\u1fa2\0\1\30\1\30\udfd6\0";
  47.  
  48.   /**
  49.    * Translates characters to character classes
  50.    */
  51.   private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
  52.  
  53.   /**
  54.    * Translates DFA states to action switch labels.
  55.    */
  56.   private static final int [] ZZ_ACTION = zzUnpackAction();
  57.  
  58.   private static final String ZZ_ACTION_PACKED_0 =
  59.     "\1\0\1\1\13\2\1\3\1\4\2\5\1\1\1\6"+
  60.     "\2\1\1\2\1\7\10\2\4\0\1\10\2\2\1\7"+
  61.     "\5\2\1\11\1\12\1\2\1\13\4\2";
  62.  
  63.   private static int [] zzUnpackAction() {
  64.     int [] result = new int[52];
  65.     int offset = 0;
  66.     offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
  67.     return result;
  68.   }
  69.  
  70.   private static int zzUnpackAction(String packed, int offset, int [] result) {
  71.     int i = 0;       /* index in packed string  */
  72.     int j = offset;  /* index in unpacked array */
  73.     int l = packed.length();
  74.     while (i < l) {
  75.       int count = packed.charAt(i++);
  76.       int value = packed.charAt(i++);
  77.       do result[j++] = value; while (--count > 0);
  78.     }
  79.     return j;
  80.   }
  81.  
  82.  
  83.   /**
  84.    * Translates a state to a row index in the transition table
  85.    */
  86.   private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
  87.  
  88.   private static final String ZZ_ROWMAP_PACKED_0 =
  89.     "\0\0\0\40\0\100\0\140\0\200\0\240\0\300\0\340"+
  90.     "\0\u0100\0\u0120\0\u0140\0\u0160\0\u0180\0\40\0\u01a0\0\u01c0"+
  91.     "\0\40\0\u01e0\0\40\0\u0200\0\u0220\0\u0240\0\140\0\u0260"+
  92.     "\0\u0280\0\u02a0\0\u02c0\0\u02e0\0\u0300\0\u0320\0\u0340\0\u0360"+
  93.     "\0\u01e0\0\u0380\0\u0220\0\40\0\u03a0\0\u03c0\0\u03e0\0\u0400"+
  94.     "\0\u0420\0\u0440\0\u0460\0\u0480\0\u0360\0\40\0\u04a0\0\140"+
  95.     "\0\u04c0\0\u04e0\0\u0500\0\u0520";
  96.  
  97.   private static int [] zzUnpackRowMap() {
  98.     int [] result = new int[52];
  99.     int offset = 0;
  100.     offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
  101.     return result;
  102.   }
  103.  
  104.   private static int zzUnpackRowMap(String packed, int offset, int [] result) {
  105.     int i = 0;  /* index in packed string  */
  106.     int j = offset;  /* index in unpacked array */
  107.     int l = packed.length();
  108.     while (i < l) {
  109.       int high = packed.charAt(i++) << 16;
  110.       result[j++] = high | packed.charAt(i++);
  111.     }
  112.     return j;
  113.   }
  114.  
  115.   /**
  116.    * The transition table of the DFA
  117.    */
  118.   private static final int [] ZZ_TRANS = zzUnpackTrans();
  119.  
  120.   private static final String ZZ_TRANS_PACKED_0 =
  121.     "\1\2\1\3\1\4\1\5\1\6\1\4\1\7\1\10"+
  122.     "\1\4\1\11\1\12\1\13\1\14\1\4\1\15\4\4"+
  123.     "\1\16\1\4\1\17\1\20\3\21\1\22\1\23\1\24"+
  124.     "\1\2\1\25\1\4\41\0\1\4\1\26\20\4\1\0"+
  125.     "\2\4\11\0\1\4\1\0\22\4\1\0\2\4\11\0"+
  126.     "\1\4\1\0\20\4\1\27\1\4\1\0\2\4\11\0"+
  127.     "\1\4\1\0\20\4\1\30\1\4\1\0\2\4\11\0"+
  128.     "\1\4\1\0\4\4\1\31\1\4\1\32\13\4\1\0"+
  129.     "\2\4\11\0\1\4\1\0\14\4\1\33\5\4\1\0"+
  130.     "\2\4\11\0\1\4\1\0\4\4\1\34\15\4\1\0"+
  131.     "\2\4\11\0\1\4\1\0\2\4\1\27\1\4\1\35"+
  132.     "\15\4\1\0\2\4\11\0\1\4\1\0\6\4\1\36"+
  133.     "\13\4\1\0\2\4\11\0\1\4\1\0\12\4\1\27"+
  134.     "\7\4\1\0\2\4\11\0\1\4\1\0\4\4\1\37"+
  135.     "\15\4\1\0\2\4\11\0\1\4\25\0\1\17\11\0"+
  136.     "\1\40\27\0\1\21\10\0\26\41\1\20\2\21\7\41"+
  137.     "\35\0\1\42\3\0\22\43\1\0\2\43\10\0\1\44"+
  138.     "\1\43\1\0\2\4\1\45\17\4\1\0\2\4\11\0"+
  139.     "\1\4\1\0\1\4\1\46\20\4\1\0\2\4\11\0"+
  140.     "\1\4\1\0\3\4\1\47\16\4\1\0\2\4\11\0"+
  141.     "\1\4\1\0\7\4\1\50\12\4\1\0\2\4\11\0"+
  142.     "\1\4\1\0\11\4\1\27\10\4\1\0\2\4\11\0"+
  143.     "\1\4\1\0\17\4\1\51\2\4\1\0\2\4\11\0"+
  144.     "\1\4\1\0\12\4\1\52\7\4\1\0\2\4\11\0"+
  145.     "\1\4\1\0\5\4\1\53\14\4\1\0\2\4\11\0"+
  146.     "\1\4\1\0\3\4\1\54\16\4\1\0\2\4\11\0"+
  147.     "\1\4\25\0\1\55\13\0\22\56\1\0\2\56\11\0"+
  148.     "\1\56\1\0\3\4\1\57\16\4\1\0\2\4\11\0"+
  149.     "\1\4\1\0\4\4\1\60\15\4\1\0\2\4\11\0"+
  150.     "\1\4\1\0\21\4\1\27\1\0\2\4\11\0\1\4"+
  151.     "\1\0\10\4\1\61\11\4\1\0\2\4\11\0\1\4"+
  152.     "\1\0\13\4\1\62\6\4\1\0\2\4\11\0\1\4"+
  153.     "\1\0\13\4\1\63\6\4\1\0\2\4\11\0\1\4"+
  154.     "\1\0\15\4\1\46\4\4\1\0\2\4\11\0\1\4"+
  155.     "\1\0\16\4\1\27\3\4\1\0\2\4\11\0\1\4"+
  156.     "\1\0\4\4\1\27\15\4\1\0\2\4\11\0\1\4"+
  157.     "\1\0\11\4\1\64\10\4\1\0\2\4\11\0\1\4"+
  158.     "\1\0\14\4\1\27\5\4\1\0\2\4\11\0\1\4"+
  159.     "\1\0\14\4\1\57\5\4\1\0\2\4\11\0\1\4"+
  160.     "\1\0\6\4\1\27\13\4\1\0\2\4\11\0\1\4";
  161.  
  162.   private static int [] zzUnpackTrans() {
  163.     int [] result = new int[1344];
  164.     int offset = 0;
  165.     offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
  166.     return result;
  167.   }
  168.  
  169.   private static int zzUnpackTrans(String packed, int offset, int [] result) {
  170.     int i = 0;       /* index in packed string  */
  171.     int j = offset;  /* index in unpacked array */
  172.     int l = packed.length();
  173.     while (i < l) {
  174.       int count = packed.charAt(i++);
  175.       int value = packed.charAt(i++);
  176.       value--;
  177.       do result[j++] = value; while (--count > 0);
  178.     }
  179.     return j;
  180.   }
  181.  
  182.  
  183.   /* error codes */
  184.   private static final int ZZ_UNKNOWN_ERROR = 0;
  185.   private static final int ZZ_NO_MATCH = 1;
  186.   private static final int ZZ_PUSHBACK_2BIG = 2;
  187.  
  188.   /* error messages for the codes above */
  189.   private static final String ZZ_ERROR_MSG[] = {
  190.     "Unkown internal scanner error",
  191.     "Error: could not match input",
  192.     "Error: pushback value was too large"
  193.   };
  194.  
  195.   /**
  196.    * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
  197.    */
  198.   private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
  199.  
  200.   private static final String ZZ_ATTRIBUTE_PACKED_0 =
  201.     "\1\0\1\11\13\1\1\11\2\1\1\11\1\1\1\11"+
  202.     "\14\1\4\0\1\11\11\1\1\11\6\1";
  203.  
  204.   private static int [] zzUnpackAttribute() {
  205.     int [] result = new int[52];
  206.     int offset = 0;
  207.     offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
  208.     return result;
  209.   }
  210.  
  211.   private static int zzUnpackAttribute(String packed, int offset, int [] result) {
  212.     int i = 0;       /* index in packed string  */
  213.     int j = offset;  /* index in unpacked array */
  214.     int l = packed.length();
  215.     while (i < l) {
  216.       int count = packed.charAt(i++);
  217.       int value = packed.charAt(i++);
  218.       do result[j++] = value; while (--count > 0);
  219.     }
  220.     return j;
  221.   }
  222.  
  223.   /** the input device */
  224.   private java.io.Reader zzReader;
  225.  
  226.   /** the current state of the DFA */
  227.   private int zzState;
  228.  
  229.   /** the current lexical state */
  230.   private int zzLexicalState = YYINITIAL;
  231.  
  232.   /** this buffer contains the current text to be matched and is
  233.       the source of the yytext() string */
  234.   private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
  235.  
  236.   /** the textposition at the last accepting state */
  237.   private int zzMarkedPos;
  238.  
  239.   /** the current text position in the buffer */
  240.   private int zzCurrentPos;
  241.  
  242.   /** startRead marks the beginning of the yytext() string in the buffer */
  243.   private int zzStartRead;
  244.  
  245.   /** endRead marks the last character in the buffer, that has been read
  246.       from input */
  247.   private int zzEndRead;
  248.  
  249.   /** number of newlines encountered up to the start of the matched text */
  250.   private int yyline;
  251.  
  252.   /** the number of characters up to the start of the matched text */
  253.   private int yychar;
  254.  
  255.   /**
  256.    * the number of characters from the last newline up to the start of the
  257.    * matched text
  258.    */
  259.   private int yycolumn;
  260.  
  261.   /**
  262.    * zzAtBOL == true <=> the scanner is currently at the beginning of a line
  263.    */
  264.   private boolean zzAtBOL = true;
  265.  
  266.   /** zzAtEOF == true <=> the scanner is at the EOF */
  267.   private boolean zzAtEOF;
  268.  
  269.   /** denotes if the user-EOF-code has already been executed */
  270.   private boolean zzEOFDone;
  271.  
  272.   /* user code: */
  273. private int line = 1;
  274.  
  275. /* Flokkanúmer lesanna */
  276. static public final int ERR   = -1;
  277. static public final int EOF   = 0;
  278. static public final int KEYWD = 1;
  279. static public final int DELIM = 2;
  280. static public final int ID    = 3;
  281. static public final int QUOTE = 4;
  282. static public final int BOOL  = 5;
  283. static public final int CHAR  = 6;
  284. static public final int STR   = 7;
  285. static public final int INT   = 8;
  286. static public final int FLOAT = 9;
  287. static public final int NEWL  = 10;
  288. static public final int WSP   = 11;
  289.  
  290.  
  291.   /**
  292.    * Creates a new scanner
  293.    * There is also a java.io.InputStream version of this constructor.
  294.    *
  295.    * @param   in  the java.io.Reader to read input from.
  296.    */
  297.   public SchemeLexer(java.io.Reader in) {
  298.     this.zzReader = in;
  299.   }
  300.  
  301.   /**
  302.    * Creates a new scanner.
  303.    * There is also java.io.Reader version of this constructor.
  304.    *
  305.    * @param   in  the java.io.Inputstream to read input from.
  306.    */
  307.   public SchemeLexer(java.io.InputStream in) {
  308.     this(new java.io.InputStreamReader(in));
  309.   }
  310.  
  311.   /**
  312.    * Unpacks the compressed character translation table.
  313.    *
  314.    * @param packed   the packed character translation table
  315.    * @return         the unpacked character translation table
  316.    */
  317.   private static char [] zzUnpackCMap(String packed) {
  318.     char [] map = new char[0x10000];
  319.     int i = 0;  /* index in packed string  */
  320.     int j = 0;  /* index in unpacked array */
  321.     while (i < 120) {
  322.       int  count = packed.charAt(i++);
  323.       char value = packed.charAt(i++);
  324.       do map[j++] = value; while (--count > 0);
  325.     }
  326.     return map;
  327.   }
  328.  
  329.  
  330.   /**
  331.    * Refills the input buffer.
  332.    *
  333.    * @return      <code>false</code>, iff there was new input.
  334.    *
  335.    * @exception   java.io.IOException  if any I/O-Error occurs
  336.    */
  337.   private boolean zzRefill() throws java.io.IOException {
  338.  
  339.     /* first: make room (if you can) */
  340.     if (zzStartRead > 0) {
  341.       System.arraycopy(zzBuffer, zzStartRead,
  342.                        zzBuffer, 0,
  343.                        zzEndRead-zzStartRead);
  344.  
  345.       /* translate stored positions */
  346.       zzEndRead-= zzStartRead;
  347.       zzCurrentPos-= zzStartRead;
  348.       zzMarkedPos-= zzStartRead;
  349.       zzStartRead = 0;
  350.     }
  351.  
  352.     /* is the buffer big enough? */
  353.     if (zzCurrentPos >= zzBuffer.length) {
  354.       /* if not: blow it up */
  355.       char newBuffer[] = new char[zzCurrentPos*2];
  356.       System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
  357.       zzBuffer = newBuffer;
  358.     }
  359.  
  360.     /* finally: fill the buffer with new input */
  361.     int numRead = zzReader.read(zzBuffer, zzEndRead,
  362.                                             zzBuffer.length-zzEndRead);
  363.  
  364.     if (numRead > 0) {
  365.       zzEndRead+= numRead;
  366.       return false;
  367.     }
  368.     // unlikely but not impossible: read 0 characters, but not at end of stream    
  369.     if (numRead == 0) {
  370.       int c = zzReader.read();
  371.       if (c == -1) {
  372.         return true;
  373.       } else {
  374.         zzBuffer[zzEndRead++] = (char) c;
  375.         return false;
  376.       }    
  377.     }
  378.  
  379.         // numRead < 0
  380.     return true;
  381.   }
  382.  
  383.    
  384.   /**
  385.    * Closes the input stream.
  386.    */
  387.   public final void yyclose() throws java.io.IOException {
  388.     zzAtEOF = true;            /* indicate end of file */
  389.     zzEndRead = zzStartRead;  /* invalidate buffer    */
  390.  
  391.     if (zzReader != null)
  392.       zzReader.close();
  393.   }
  394.  
  395.  
  396.   /**
  397.    * Resets the scanner to read from a new input stream.
  398.    * Does not close the old reader.
  399.    *
  400.    * All internal variables are reset, the old input stream
  401.    * <b>cannot</b> be reused (internal buffer is discarded and lost).
  402.    * Lexical state is set to <tt>ZZ_INITIAL</tt>.
  403.    *
  404.    * @param reader   the new input stream
  405.    */
  406.   public final void yyreset(java.io.Reader reader) {
  407.     zzReader = reader;
  408.     zzAtBOL  = true;
  409.     zzAtEOF  = false;
  410.     zzEOFDone = false;
  411.     zzEndRead = zzStartRead = 0;
  412.     zzCurrentPos = zzMarkedPos = 0;
  413.     yyline = yychar = yycolumn = 0;
  414.     zzLexicalState = YYINITIAL;
  415.   }
  416.  
  417.  
  418.   /**
  419.    * Returns the current lexical state.
  420.    */
  421.   public final int yystate() {
  422.     return zzLexicalState;
  423.   }
  424.  
  425.  
  426.   /**
  427.    * Enters a new lexical state
  428.    *
  429.    * @param newState the new lexical state
  430.    */
  431.   public final void yybegin(int newState) {
  432.     zzLexicalState = newState;
  433.   }
  434.  
  435.  
  436.   /**
  437.    * Returns the text matched by the current regular expression.
  438.    */
  439.   public final String yytext() {
  440.     return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
  441.   }
  442.  
  443.  
  444.   /**
  445.    * Returns the character at position <tt>pos</tt> from the
  446.    * matched text.
  447.    *
  448.    * It is equivalent to yytext().charAt(pos), but faster
  449.    *
  450.    * @param pos the position of the character to fetch.
  451.    *            A value from 0 to yylength()-1.
  452.    *
  453.    * @return the character at position pos
  454.    */
  455.   public final char yycharat(int pos) {
  456.     return zzBuffer[zzStartRead+pos];
  457.   }
  458.  
  459.  
  460.   /**
  461.    * Returns the length of the matched text region.
  462.    */
  463.   public final int yylength() {
  464.     return zzMarkedPos-zzStartRead;
  465.   }
  466.  
  467.  
  468.   /**
  469.    * Reports an error that occured while scanning.
  470.    *
  471.    * In a wellformed scanner (no or only correct usage of
  472.    * yypushback(int) and a match-all fallback rule) this method
  473.    * will only be called with things that "Can't Possibly Happen".
  474.    * If this method is called, something is seriously wrong
  475.    * (e.g. a JFlex bug producing a faulty scanner etc.).
  476.    *
  477.    * Usual syntax/scanner level error handling should be done
  478.    * in error fallback rules.
  479.    *
  480.    * @param   errorCode  the code of the errormessage to display
  481.    */
  482.   private void zzScanError(int errorCode) {
  483.     String message;
  484.     try {
  485.       message = ZZ_ERROR_MSG[errorCode];
  486.     }
  487.     catch (ArrayIndexOutOfBoundsException e) {
  488.       message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
  489.     }
  490.  
  491.     throw new Error(message);
  492.   }
  493.  
  494.  
  495.   /**
  496.    * Pushes the specified amount of characters back into the input stream.
  497.    *
  498.    * They will be read again by then next call of the scanning method
  499.    *
  500.    * @param number  the number of characters to be read again.
  501.    *                This number must not be greater than yylength()!
  502.    */
  503.   public void yypushback(int number)  {
  504.     if ( number > yylength() )
  505.       zzScanError(ZZ_PUSHBACK_2BIG);
  506.  
  507.     zzMarkedPos -= number;
  508.   }
  509.  
  510.  
  511.   /**
  512.    * Resumes scanning until the next regular expression is matched,
  513.    * the end of input is encountered or an I/O-Error occurs.
  514.    *
  515.    * @return      the next token
  516.    * @exception   java.io.IOException  if any I/O-Error occurs
  517.    */
  518.   public Yytoken yylex() throws java.io.IOException {
  519.     int zzInput;
  520.     int zzAction;
  521.  
  522.     // cached fields:
  523.     int zzCurrentPosL;
  524.     int zzMarkedPosL;
  525.     int zzEndReadL = zzEndRead;
  526.     char [] zzBufferL = zzBuffer;
  527.     char [] zzCMapL = ZZ_CMAP;
  528.  
  529.     int [] zzTransL = ZZ_TRANS;
  530.     int [] zzRowMapL = ZZ_ROWMAP;
  531.     int [] zzAttrL = ZZ_ATTRIBUTE;
  532.  
  533.     while (true) {
  534.       zzMarkedPosL = zzMarkedPos;
  535.  
  536.       boolean zzR = false;
  537.       for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL;
  538.                                                              zzCurrentPosL++) {
  539.         switch (zzBufferL[zzCurrentPosL]) {
  540.         case '\u000B':
  541.         case '\u000C':
  542.         case '\u0085':
  543.         case '\u2028':
  544.         case '\u2029':
  545.           yyline++;
  546.           yycolumn = 0;
  547.           zzR = false;
  548.           break;
  549.         case '\r':
  550.           yyline++;
  551.           yycolumn = 0;
  552.           zzR = true;
  553.           break;
  554.         case '\n':
  555.           if (zzR)
  556.             zzR = false;
  557.           else {
  558.             yyline++;
  559.             yycolumn = 0;
  560.           }
  561.           break;
  562.         default:
  563.           zzR = false;
  564.           yycolumn++;
  565.         }
  566.       }
  567.  
  568.       if (zzR) {
  569.         // peek one character ahead if it is \n (if we have counted one line too much)
  570.         boolean zzPeek;
  571.         if (zzMarkedPosL < zzEndReadL)
  572.           zzPeek = zzBufferL[zzMarkedPosL] == '\n';
  573.         else if (zzAtEOF)
  574.           zzPeek = false;
  575.         else {
  576.           boolean eof = zzRefill();
  577.           zzEndReadL = zzEndRead;
  578.           zzMarkedPosL = zzMarkedPos;
  579.           zzBufferL = zzBuffer;
  580.           if (eof)
  581.             zzPeek = false;
  582.           else
  583.             zzPeek = zzBufferL[zzMarkedPosL] == '\n';
  584.         }
  585.         if (zzPeek) yyline--;
  586.       }
  587.       zzAction = -1;
  588.  
  589.       zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
  590.  
  591.       zzState = ZZ_LEXSTATE[zzLexicalState];
  592.  
  593.  
  594.       zzForAction: {
  595.         while (true) {
  596.    
  597.           if (zzCurrentPosL < zzEndReadL)
  598.             zzInput = zzBufferL[zzCurrentPosL++];
  599.           else if (zzAtEOF) {
  600.             zzInput = YYEOF;
  601.             break zzForAction;
  602.           }
  603.           else {
  604.             // store back cached positions
  605.             zzCurrentPos  = zzCurrentPosL;
  606.             zzMarkedPos   = zzMarkedPosL;
  607.             boolean eof = zzRefill();
  608.             // get translated positions and possibly new buffer
  609.             zzCurrentPosL  = zzCurrentPos;
  610.             zzMarkedPosL   = zzMarkedPos;
  611.             zzBufferL      = zzBuffer;
  612.             zzEndReadL     = zzEndRead;
  613.             if (eof) {
  614.               zzInput = YYEOF;
  615.               break zzForAction;
  616.             }
  617.             else {
  618.               zzInput = zzBufferL[zzCurrentPosL++];
  619.             }
  620.           }
  621.           int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
  622.           if (zzNext == -1) break zzForAction;
  623.           zzState = zzNext;
  624.  
  625.           int zzAttributes = zzAttrL[zzState];
  626.           if ( (zzAttributes & 1) == 1 ) {
  627.             zzAction = zzState;
  628.             zzMarkedPosL = zzCurrentPosL;
  629.             if ( (zzAttributes & 8) == 8 ) break zzForAction;
  630.           }
  631.  
  632.         }
  633.       }
  634.  
  635.       // store back cached position
  636.       zzMarkedPos = zzMarkedPosL;
  637.  
  638.       switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
  639.         case 4:
  640.           { return new Yytoken(INT,yytext());
  641.           }
  642.         case 12: break;
  643.         case 1:
  644.           { System.out.println("ERROR: "+yytext()+" in line "+line);
  645.           }
  646.         case 13: break;
  647.         case 8:
  648.           { return new Yytoken(STR,yytext());
  649.           }
  650.         case 14: break;
  651.         case 11:
  652.           { return new Yytoken(BOOL,yytext());
  653.           }
  654.         case 15: break;
  655.         case 9:
  656.           { return new Yytoken(FLOAT,yytext());
  657.           }
  658.         case 16: break;
  659.         case 3:
  660.           { return new Yytoken(QUOTE,yytext());
  661.           }
  662.         case 17: break;
  663.         case 6:
  664.           { return new Yytoken(DELIM,yytext());
  665.           }
  666.         case 18: break;
  667.         case 2:
  668.           { return new Yytoken(ID,yytext());
  669.           }
  670.         case 19: break;
  671.         case 7:
  672.           { return new Yytoken(KEYWD,yytext());
  673.           }
  674.         case 20: break;
  675.         case 10:
  676.           { return new Yytoken(CHAR,yytext());
  677.           }
  678.         case 21: break;
  679.         case 5:
  680.           {
  681.           }
  682.         case 22: break;
  683.         default:
  684.           if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
  685.             zzAtEOF = true;
  686.             return null;
  687.           }
  688.           else {
  689.             zzScanError(ZZ_NO_MATCH);
  690.           }
  691.       }
  692.     }
  693.   }
  694.  
  695.  
  696. }