
  /** This character denotes the end of file */
  final public static int YYEOF = -1;

  /** initial size of the lookahead buffer */
--- final private static int YY_BUFFERSIZE = ...;

  /** lexical states */
---  lexical states, charmap

  /* error codes */
  final private static int YY_UNKNOWN_ERROR = 0;
  final private static int YY_ILLEGAL_STATE = 1;
  final private static int YY_NO_MATCH = 2;
  final private static int YY_PUSHBACK_2BIG = 3;
  final private static int YY_SKIP_2BIG = 4;

  /* error messages for the codes above */
  final private static String YY_ERROR_MSG[] = {
    "Unkown internal scanner error",
    "Internal error: unknown state",
    "Error: could not match input",
    "Error: pushback value was too large",
    "Error: skip value was too large"
  };

--- isFinal list
  /** the input device */
  private java.io.Reader yy_reader;

  /** the current state of the DFA */
  private int yy_state;

  /** the current lexical state */
  private int yy_lexical_state = YYINITIAL;

  /** this buffer contains the current text to be matched and is
      the source of the yytext() string */
  private char yy_buffer[] = new char[YY_BUFFERSIZE];

  /** a pointer to the internal buffer, used to restore it when yyreset() changes
      the buffer to an externally created one. */
  private char yy_saved_buffer[] = null;

  /** the textposition at the last accepting state */
  private int yy_markedPos;

  /** the textposition at the last state to be included in yytext */
  private int yy_pushbackPos;

  /** the current text position in the buffer */
  private int yy_currentPos;

  /** startRead marks the beginning of the yytext() string in the buffer */
  private int yy_startRead;

  /** endRead marks the last character in the buffer, that has been read
      from input */
  private int yy_endRead;

  /** number of newlines encountered up to the start of the matched text */
  private int yyline;

  /** the number of characters up to the start of the matched text */
  private int yychar;

  /**
   * the number of characters from the last newline up to the start of the
   * matched text
   */
  private int yycolumn;

  /**
   * yy_atBOL == true <=> the scanner is currently at the beginning of a line
   */
  private boolean yy_atBOL = true;

  /** yy_atEOF == true <=> the scanner is at the EOF */
  private boolean yy_atEOF;



--- user class code

  /**
   * 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.
   */
--- constructor declaration


  /**
   * Refills the input buffer.
   *
   * @return      <code>false</code>, iff there was new input.
   *
   * @exception   IOException  if any I/O-Error occurs
   */
  private boolean yy_refill() throws java.io.IOException {

    /* first: make room (if you can) */
    if (yy_startRead > 0) {
      System.arraycopy(yy_buffer, yy_startRead,
                       yy_buffer, 0,
                       yy_endRead-yy_startRead);

      /* translate stored positions */
      yy_endRead-= yy_startRead;
      yy_currentPos-= yy_startRead;
      yy_markedPos-= yy_startRead;
      yy_pushbackPos-= yy_startRead;
      yy_startRead = 0;
    }

    /* is the buffer big enough? */
    if (yy_currentPos >= yy_buffer.length) {
      /* if not: blow it up */
      char newBuffer[] = new char[yy_currentPos*2];
      System.arraycopy(yy_buffer, 0, newBuffer, 0, yy_buffer.length);
      yy_buffer = newBuffer;
    }

    /* finally: fill the buffer with new input */
    int numRead = yy_reader.read(yy_buffer, yy_endRead,
                                            yy_buffer.length-yy_endRead);

    if (numRead < 0) {
      return true;
    }
    else {
      yy_endRead+= numRead;
      return false;
    }
  }

  /**
   * Closes the input stream.
   */
  final public void yyclose() throws java.io.IOException {
    yy_atEOF = true;            /* indicate end of file */
    yy_endRead = yy_startRead;  /* invalidate buffer    */

    if (yy_reader != null)
      yy_reader.close();
  }

  /**
   * Closes the current stream, and resets the
   * scanner to read from a new input stream.
   *
   * 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>YY_INITIAL</tt>.
   *
   * @param reader   the new input stream
   *
   * @see #yypushStream(java.io.Reader)
   * @see #yypopStream()
   */
  final public void yyreset(java.io.Reader reader) throws java.io.IOException {
    yyclose();

    if (yy_saved_buffer != null) {
      yy_buffer = yy_saved_buffer;
      yy_saved_buffer = null;
    }

    yy_reader = reader;
    yy_atBOL  = true;
    yy_atEOF  = false;
    yy_endRead = yy_startRead = 0;
    yy_currentPos = yy_markedPos = yy_pushbackPos = 0;
    yyline = yychar = yycolumn = 0;
    yy_lexical_state = YYINITIAL;
    yy_sawCR = false;
    yyline_next = yycolumn_next = 0;
  }


  final public void yyreset(char[] buffer, int off, int len) throws java.io.IOException {
    yyclose();
    if (yy_saved_buffer == null)
      yy_saved_buffer = yy_buffer;
    yy_buffer = buffer;
    yy_reader = null;
    yy_atBOL  = true;
    yy_atEOF  = true;
    yy_currentPos = yy_markedPos = yy_pushbackPos = yy_startRead = off;
    yy_endRead = off + len;
    yyline = yychar = yycolumn = 0;
    yy_lexical_state = YYINITIAL;
    yy_sawCR = false;
    yyline_next = yycolumn_next = 0;

    yy_endRead_l = yy_endRead;
    yy_buffer_l = yy_buffer;
  }


  /**
   * Returns the current lexical state.
   */
  final public int yystate() {
    return yy_lexical_state;
  }


  /**
   * Enters a new lexical state
   *
   * @param newState the new lexical state
   */
  final public void yybegin(int newState) {
    yy_lexical_state = newState;
  }


  /**
   * Returns the text matched by the current regular expression.
   */
  final public String yytext() {
    return new String( yy_buffer, yy_startRead, yy_markedPos-yy_startRead );
  }

  /**
   * Returns the text matched by the current regular expression.
   *
   * @param start starting offset from the beginning of the current expression.
   * @param length number of characters to include in the string.
   */
  final public String yytext(int offset, int length) {
    return new String(yy_buffer,yy_startRead+offset,length);
  }


  /**
   * Accept the current action as completed and update line, column and
   * character counters accordingly. Used in conjunction with
   * yynextChar().
   *
   * @see #yynextChar()
   */
  final public void yynextAction() {
    yyline = yyline_next;
    yycolumn = yycolumn_next;
    // Uncomment for %char directive: yychar += (yy_markedPos - yy_startRead);
    yy_currentPos = yy_startRead = yy_markedPos;
  }


  /**
   * Extends the matched text by one character and returns it.
   *
   * @returns the next character, or YYEOF
   */
  final public int yynextChar() throws IOException {
    int yy_input;
    if (yy_markedPos < yy_endRead)
        yy_input = yy_buffer[yy_markedPos++];
    else if (yy_atEOF) {
        return YYEOF;
    }
    else {
        boolean eof  = yy_refill();
        yy_buffer_l  = yy_buffer;
        yy_endRead_l = yy_endRead;
        if (eof)
            return YYEOF;
        else
            yy_input = yy_buffer[yy_markedPos++];
    }

    yy_doCount(yy_input);
    return yy_input;
  }


  /**
   * Extends the matched text by one character and returns it.
   * Similar to yynextChar(), but the caller guarantees [by using
   * yybufferLeft()] that there is at least one more character in the
   * buffer.
   *
   *
   * @returns the next character, or YYEOF
   */
  final public int yynextBufferChar() throws IOException {
    int yy_input = yy_buffer[yy_markedPos++];
    yy_doCount(yy_input);
    return yy_input;
  }

  final private int yy_doCount(int yy_input) {
        switch (yy_input) {

            case '\r':
                yyline_next++;
                yycolumn_next = 0;
                yy_sawCR = true;
                break;

            case '\n':
                if (yy_sawCR)
                    yy_sawCR = false;
                else {
                    yyline_next++;
                    yycolumn_next = 0;
                }
                break;

            default:
                yy_sawCR = false;
                yycolumn_next++;
                break;
        }
    return yy_input;
  }


  /**
   * 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
   */
  final public char yycharat(int pos) {
    return yy_buffer[yy_startRead+pos];
  }

  /**
   * Returns the number of characters remaining in the buffer,
   * not including the matched text, before more
   * characters must be read from the input Reader.
   *
   */
  final public int yybufferLeft() {
    return yy_endRead - yy_markedPos;
  }

  /**
   * Skips past the specified number of characters.
   * These characters will be included in line, column, and character
   * counting, but they will not be used for matching.
   *
   * @param n the number of characters to skip
   */
   final public void yyskip(int n) {
     yy_markedPos += n;
     yy_markedPos_l = yy_markedPos;
     if (yy_markedPos > yy_endRead)
       yy_ScanError(YY_SKIP_2BIG);
   }


  /**
   * Returns the length of the matched text region.
   */
  final public int yylength() {
    return yy_markedPos-yy_startRead;
  }


  /**
   * Reports an error that occured while scanning.
   *
   * In a wellformed scanner (no or only correct usage of
   * yypushback(int) and a match-all fallback rule) this method
   * will only be called with things that "Can't Possibly Happen".
   * If this method is called, something is seriously wrong
   * (e.g. a JFlex bug producing a faulty scanner etc.).
   *
   * Usual syntax/scanner level error handling should be done
   * in error fallback rules.
   *
   * @param   errorCode  the code of the errormessage to display
   */
--- yy_ScanError declaration
    String message;
    try {
      message = YY_ERROR_MSG[errorCode];
    }
    catch (ArrayIndexOutOfBoundsException e) {
      message = YY_ERROR_MSG[YY_UNKNOWN_ERROR];
    }

--- throws clause
  }


  /**
   * 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()!
   */
--- yypushback decl (contains yy_ScanError exception)
    if ( number > yylength() )
      yy_ScanError(YY_PUSHBACK_2BIG);

    yy_markedPos -= number;

    // Recount the lines and columns
    yyline_next = yyline;
    yycolumn_next = yycolumn;
    yy_sawCR = yy_prev_sawCR;
    for (int pos=yy_startRead; pos < yy_markedPos; pos++)
        yy_doCount(yy_buffer[pos]);
  }


--- yy_doEof

    // Yuval moved cached fields to class level so yypushStream() can set them.
    private int yy_currentPos_l;
    private int yy_startRead_l;
    private int yy_markedPos_l;
    private int yy_endRead_l;
    private char [] yy_buffer_l;
    private char [] yycmap_l;

    // Line and column counting variables.
    private boolean yy_sawCR = false; // Was the last character a CR?
    private boolean yy_prev_sawCR = false; // value of yy_sawCR before this action was parsed
    private int yyline_next = 0; // What yyline should be after matched text
    private int yycolumn_next = 0; // What yycolumn should be after matched text

  /**
   * 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   IOException  if any I/O-Error occurs
   */

--- yylex declaration
    int yy_input;
    int yy_action;

    // Set cached fields:
    yy_endRead_l = yy_endRead;
    yy_buffer_l = yy_buffer;
    yycmap_l = yycmap;


--- local declarations
    int yyline_next_l,yycolumn_next_l;

    while (true) {
      yy_markedPos_l = yy_markedPos;

--- start admin (line, char, col count)
      // Add the lines and columns found in the last matching text
//      yyline = yyline_next_l = yyline_next;
//      yycolumn = yycolumn_next_l = yycolumn_next;
//      yy_prev_sawCR = yy_sawCR;


      yy_action = -1;

      yy_startRead_l = yy_currentPos_l = yy_currentPos =
                       yy_startRead = yy_markedPos_l;

--- start admin (lexstate etc)

      yy_forAction: {
        while (true) {

--- next input
/*
            switch (yy_input) {
                case '\r':
                    yyline_next_l++;
                    yycolumn_next_l = 0;
                    yy_sawCR = true;
                    break;
                case '\n':
                    if (yy_sawCR)
                          yy_sawCR = false;
                    else {
                        yyline_next_l++;
                        yycolumn_next_l = 0;
                    }
                    break;

                default:
                    yy_sawCR = false;
                    yycolumn_next_l++;
                    break;
            }
*/
--- line, col, char count, next transition, isFinal action
            yy_action = yy_state;
            yy_markedPos_l = yy_currentPos_l;
 //           yyline_next = yyline_next_l;
//            yycolumn_next = yycolumn_next_l;


--- line count update
          }

        }
      }

      // store back cached position
      yy_markedPos = yy_markedPos_l;

--- char count update

      switch (yy_action) {

--- actions
        default:
          if (yy_input == YYEOF && yy_startRead == yy_currentPos) {
            yy_atEOF = true;
--- eofvalue
          }
          else {
--- no match
          }
      }
    }
  }

--- main

}
