content: /* The following code was generated by JFlex 1.4 on 7/13/04 3:52 PM */
  
  /* Lexical Analyzer for Datascope Schema definitions.
   *
   * Copyright (c) 2004 by the Regents of the University of California
   *
   * Written by Tobin Fricke <tobin@splorg.org> on 2004-07-09 at IGPP, UCSD
   *
   * Compile with JLex, http://www.cs.princeton.edu/~appel/modern/java/JLex/
   *
   * http://bmrc.berkeley.edu/courseware/cs164/fall99/assignment/a1/tutorial.html
   *
   * Based on $DSAP/src/lib/dataformat/db/dblex.l from DSAP 3.4 (public domain)
   *
   * Status:  Bare-bones beginning.  Not functional.
  */
  
  package com.brtt.antelope;
  
  import java.io.*;
  import java.util.*;
  
  
  
  /**
   * This class is a scanner generated by 
   * <a href="http://www.jflex.de/">JFlex</a> 1.4
   * on 7/13/04 3:52 PM from the specification file
   * <tt>DatabaseSchemaLexer.flex</tt>
   */
  class DatabaseSchemaLexer {
  
    /** 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 = 1;
    public static final int YYINITIAL = 0;
    public static final int CURLYSTRING = 2;
  
    /** 
     * Translates characters to character classes
     */
    private static final char [] ZZ_CMAP = {
       0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  3,  0,  0,  3,  0,  0, 
       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
       2,  0, 39,  0, 40, 40,  0,  0,  0,  0,  0,  0,  0,  0, 40,  0, 
      37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 40,  0,  0,  0,  0,  0, 
       0, 10, 27, 40, 25, 40, 35, 40, 40, 22, 40, 40, 31, 40, 34, 40, 
      36, 40, 16,  4, 20, 33, 40, 40, 40, 24, 40,  0,  1,  0,  0, 40, 
       0,  9, 14,  5, 21,  7, 28, 23,  6, 13, 40, 32, 17,  8, 19, 18, 
      30, 40, 12, 29, 11, 15, 40, 40, 40, 26, 40, 38,  0, 41,  0,  0
    };
  
    /** 
     * Translates DFA states to action switch labels.
     */
    private static final int [] ZZ_ACTION = zzUnpackAction();
  
    private static final String ZZ_ACTION_PACKED_0 =
      "\1\1\2\0\1\2\1\3\16\4\1\1\1\5\1\6"+
      "\1\7\1\0\1\10\1\7\1\11\27\4\1\12\1\13"+
      "\37\4\1\14\3\4\1\15\6\4\1\16\3\4\1\17"+
      "\1\4\1\20\12\4\1\21\7\4\1\22\3\4\1\23"+
      "\4\4\1\24\1\4\1\25\7\4\1\26\3\4\1\27"+
      "\1\30\1\31\1\4\1\32\7\4\1\33\1\34\1\35"+
      "\1\4\1\36\1\37\1\40\3\4\1\41\1\4\1\42"+
      "\1\4\1\43\1\44\1\45\1\46\2\4\1\47";
  
    private static int [] zzUnpackAction() {
      int [] result = new int[175];
      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\52\0\124\0\176\0\176\0\250\0\322\0\374"+
      "\0\u0126\0\u0150\0\u017a\0\u01a4\0\u01ce\0\u01f8\0\u0222\0\u024c"+
      "\0\u0276\0\u02a0\0\u02ca\0\u02f4\0\176\0\176\0\u031e\0\u0348"+
      "\0\176\0\u0372\0\176\0\u039c\0\u03c6\0\u03f0\0\u041a\0\u0444"+
      "\0\u046e\0\u0498\0\u04c2\0\u04ec\0\u0516\0\u0540\0\u056a\0\u0594"+
      "\0\u05be\0\u05e8\0\u0612\0\u063c\0\u0666\0\u0690\0\u06ba\0\u06e4"+
      "\0\u070e\0\u0738\0\176\0\176\0\u0762\0\u078c\0\u07b6\0\u07e0"+
      "\0\u080a\0\u0834\0\u085e\0\u0888\0\u08b2\0\u08dc\0\u0906\0\u0930"+
      "\0\u095a\0\u0984\0\u09ae\0\u09d8\0\u0a02\0\u0a2c\0\u0a56\0\u0a80"+
      "\0\u0aaa\0\u0ad4\0\u0afe\0\u0b28\0\u0b52\0\u0b7c\0\u0ba6\0\u0bd0"+
      "\0\u0bfa\0\u0c24\0\u0c4e\0\322\0\u0c78\0\u0ca2\0\u0ccc\0\u0cf6"+
      "\0\u0d20\0\u0d4a\0\u0d74\0\u0d9e\0\u0dc8\0\u0df2\0\322\0\u0e1c"+
      "\0\u0e46\0\u0e70\0\322\0\u0e9a\0\322\0\u0ec4\0\u0eee\0\u0f18"+
      "\0\u0f42\0\u0f6c\0\u0f96\0\u0fc0\0\u0fea\0\u1014\0\u103e\0\322"+
      "\0\u1068\0\u1092\0\u10bc\0\u10e6\0\u1110\0\u113a\0\u1164\0\322"+
      "\0\u118e\0\u11b8\0\u11e2\0\322\0\u120c\0\u1236\0\u1260\0\u128a"+
      "\0\322\0\u12b4\0\322\0\u12de\0\u1308\0\u1332\0\u135c\0\u1386"+
      "\0\u13b0\0\u13da\0\322\0\u1404\0\u142e\0\u1458\0\322\0\322"+
      "\0\322\0\u1482\0\322\0\u14ac\0\u14d6\0\u1500\0\u152a\0\u1554"+
      "\0\u157e\0\u15a8\0\322\0\322\0\322\0\u15d2\0\322\0\322"+
      "\0\322\0\u15fc\0\u1626\0\u1650\0\322\0\u167a\0\322\0\u16a4"+
      "\0\322\0\322\0\322\0\322\0\u16ce\0\u16f8\0\322";
  
    private static int [] zzUnpackRowMap() {
      int [] result = new int[175];
      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\4\2\5\1\6\5\7\1\10\5\7\1\11\3\7"+
      "\1\12\1\7\1\13\1\7\1\14\1\15\1\7\1\16"+
      "\3\7\1\17\1\7\1\20\1\21\1\22\1\23\1\24"+
      "\1\25\1\26\1\7\1\4\1\27\1\30\1\27\1\0"+
      "\43\27\1\31\2\27\51\32\1\33\56\0\1\7\1\34"+
      "\1\7\1\35\3\7\1\36\32\7\2\0\1\7\5\0"+
      "\42\7\2\0\1\7\5\0\7\7\1\37\5\7\1\40"+
      "\24\7\2\0\1\7\5\0\3\7\1\41\1\7\1\42"+
      "\34\7\2\0\1\7\5\0\10\7\1\43\1\44\30\7"+
      "\2\0\1\7\5\0\17\7\1\45\22\7\2\0\1\7"+
      "\5\0\3\7\1\46\36\7\2\0\1\7\5\0\3\7"+
      "\1\47\6\7\1\50\27\7\2\0\1\7\5\0\11\7"+
      "\1\51\7\7\1\52\6\7\1\53\1\54\10\7\2\0"+
      "\1\7\5\0\11\7\1\55\30\7\2\0\1\7\5\0"+
      "\17\7\1\56\22\7\2\0\1\7\5\0\13\7\1\57"+
      "\26\7\2\0\1\7\5\0\11\7\1\60\4\7\1\61"+
      "\23\7\2\0\1\7\5\0\10\7\1\62\31\7\2\0"+
      "\1\7\5\0\41\7\1\24\2\0\1\7\1\0\1\27"+
      "\1\0\1\27\1\0\43\27\1\0\2\27\1\0\1\63"+
      "\45\0\1\64\2\0\51\32\5\0\2\7\1\65\37\7"+
      "\2\0\1\7\5\0\32\7\1\66\7\7\2\0\1\7"+
      "\5\0\10\7\1\67\31\7\2\0\1\7\5\0\7\7"+
      "\1\70\32\7\2\0\1\7\5\0\7\7\1\71\32\7"+
      "\2\0\1\7\5\0\5\7\1\72\7\7\1\73\24\7"+
      "\2\0\1\7\5\0\17\7\1\74\22\7\2\0\1\7"+
      "\5\0\5\7\1\75\34\7\2\0\1\7\5\0\4\7"+
      "\1\76\35\7\2\0\1\7\5\0\7\7\1\77\32\7"+
      "\2\0\1\7\5\0\5\7\1\100\34\7\2\0\1\7"+
      "\5\0\7\7\1\101\20\7\1\102\1\103\10\7\2\0"+
      "\1\7\5\0\32\7\1\104\7\7\2\0\1\7\5\0"+
      "\17\7\1\105\22\7\2\0\1\7\5\0\16\7\1\106"+
      "\23\7\2\0\1\7\5\0\15\7\1\107\24\7\2\0"+
      "\1\7\5\0\2\7\1\110\37\7\2\0\1\7\5\0"+
      "\34\7\1\111\5\7\2\0\1\7\5\0\11\7\1\112"+
      "\30\7\2\0\1\7\5\0\15\7\1\113\24\7\2\0"+
      "\1\7\5\0\3\7\1\114\36\7\2\0\1\7\5\0"+
      "\10\7\1\115\31\7\2\0\1\7\5\0\11\7\1\116"+
      "\30\7\2\0\1\7\5\0\3\7\1\117\36\7\2\0"+
      "\1\7\5\0\5\7\1\120\34\7\2\0\1\7\5\0"+
      "\11\7\1\121\30\7\2\0\1\7\5\0\10\7\1\122"+
      "\31\7\2\0\1\7\5\0\3\7\1\123\36\7\2\0"+
      "\1\7\5\0\15\7\1\124\24\7\2\0\1\7\5\0"+
      "\5\7\1\125\34\7\2\0\1\7\5\0\23\7\1\126"+
      "\16\7\2\0\1\7\5\0\17\7\1\127\22\7\2\0"+
      "\1\7\5\0\3\7\1\130\36\7\2\0\1\7\5\0"+
      "\3\7\1\131\36\7\2\0\1\7\5\0\10\7\1\132"+
      "\31\7\2\0\1\7\5\0\5\7\1\133\34\7\2\0"+
      "\1\7\5\0\11\7\1\134\30\7\2\0\1\7\5\0"+
      "\1\7\1\135\40\7\2\0\1\7\5\0\7\7\1\136"+
      "\32\7\2\0\1\7\5\0\7\7\1\137\32\7\2\0"+
      "\1\7\5\0\13\7\1\140\26\7\2\0\1\7\5\0"+
      "\16\7\1\141\23\7\2\0\1\7\5\0\16\7\1\142"+
      "\23\7\2\0\1\7\5\0\3\7\1\143\36\7\2\0"+
      "\1\7\5\0\7\7\1\144\32\7\2\0\1\7\5\0"+
      "\15\7\1\145\24\7\2\0\1\7\5\0\15\7\1\146"+
      "\24\7\2\0\1\7\5\0\3\7\1\147\1\150\35\7"+
      "\2\0\1\7\5\0\4\7\1\151\35\7\2\0\1\7"+
      "\5\0\4\7\1\152\35\7\2\0\1\7\5\0\10\7"+
      "\1\153\31\7\2\0\1\7\5\0\17\7\1\154\22\7"+
      "\2\0\1\7\5\0\11\7\1\155\30\7\2\0\1\7"+
      "\5\0\10\7\1\156\31\7\2\0\1\7\5\0\7\7"+
      "\1\157\32\7\2\0\1\7\5\0\3\7\1\160\36\7"+
      "\2\0\1\7\5\0\31\7\1\161\10\7\2\0\1\7"+
      "\5\0\21\7\1\162\20\7\2\0\1\7\5\0\23\7"+
      "\1\163\16\7\2\0\1\7\5\0\25\7\1\164\14\7"+
      "\2\0\1\7\5\0\11\7\1\165\30\7\2\0\1\7"+
      "\5\0\17\7\1\166\22\7\2\0\1\7\5\0\10\7"+
      "\1\167\31\7\2\0\1\7\5\0\10\7\1\170\31\7"+
      "\2\0\1\7\5\0\12\7\1\171\27\7\2\0\1\7"+
      "\5\0\5\7\1\172\34\7\2\0\1\7\5\0\10\7"+
      "\1\173\31\7\2\0\1\7\5\0\31\7\1\174\10\7"+
      "\2\0\1\7\5\0\21\7\1\175\20\7\2\0\1\7"+
      "\5\0\11\7\1\176\30\7\2\0\1\7\5\0\5\7"+
      "\1\177\34\7\2\0\1\7\5\0\5\7\1\200\34\7"+
      "\2\0\1\7\5\0\5\7\1\201\34\7\2\0\1\7"+
      "\5\0\5\7\1\202\34\7\2\0\1\7\5\0\23\7"+
      "\1\203\16\7\2\0\1\7\5\0\12\7\1\204\27\7"+
      "\2\0\1\7\5\0\17\7\1\205\22\7\2\0\1\7"+
      "\5\0\11\7\1\206\30\7\2\0\1\7\5\0\11\7"+
      "\1\207\30\7\2\0\1\7\5\0\5\7\1\210\34\7"+
      "\2\0\1\7\5\0\3\7\1\211\36\7\2\0\1\7"+
      "\5\0\5\7\1\212\34\7\2\0\1\7\5\0\15\7"+
      "\1\213\24\7\2\0\1\7\5\0\3\7\1\214\36\7"+
      "\2\0\1\7\5\0\11\7\1\215\30\7\2\0\1\7"+
      "\5\0\15\7\1\216\24\7\2\0\1\7\5\0\7\7"+
      "\1\217\32\7\2\0\1\7\5\0\7\7\1\220\32\7"+
      "\2\0\1\7\5\0\31\7\1\221\10\7\2\0\1\7"+
      "\5\0\23\7\1\222\16\7\2\0\1\7\5\0\7\7"+
      "\1\223\32\7\2\0\1\7\5\0\10\7\1\224\31\7"+
      "\2\0\1\7\5\0\7\7\1\225\32\7\2\0\1\7"+
      "\5\0\13\7\1\226\26\7\2\0\1\7\5\0\5\7"+
      "\1\227\34\7\2\0\1\7\5\0\16\7\1\230\23\7"+
      "\2\0\1\7\5\0\3\7\1\231\36\7\2\0\1\7"+
      "\5\0\7\7\1\232\32\7\2\0\1\7\5\0\10\7"+
      "\1\233\31\7\2\0\1\7\5\0\26\7\1\234\13\7"+
      "\2\0\1\7\5\0\31\7\1\235\10\7\2\0\1\7"+
      "\5\0\32\7\1\236\7\7\2\0\1\7\5\0\3\7"+
      "\1\237\36\7\2\0\1\7\5\0\17\7\1\240\22\7"+
      "\2\0\1\7\5\0\26\7\1\241\13\7\2\0\1\7"+
      "\5\0\16\7\1\242\23\7\2\0\1\7\5\0\7\7"+
      "\1\243\32\7\2\0\1\7\5\0\7\7\1\244\32\7"+
      "\2\0\1\7\5\0\17\7\1\245\22\7\2\0\1\7"+
      "\5\0\17\7\1\246\22\7\2\0\1\7\5\0\3\7"+
      "\1\247\36\7\2\0\1\7\5\0\7\7\1\250\32\7"+
      "\2\0\1\7\5\0\10\7\1\251\31\7\2\0\1\7"+
      "\5\0\3\7\1\252\36\7\2\0\1\7\5\0\3\7"+
      "\1\253\36\7\2\0\1\7\5\0\7\7\1\254\32\7"+
      "\2\0\1\7\5\0\11\7\1\255\30\7\2\0\1\7"+
      "\5\0\16\7\1\256\23\7\2\0\1\7\5\0\17\7"+
      "\1\257\22\7\2\0\1\7\1\0";
  
    private static int [] zzUnpackTrans() {
      int [] result = new int[5922];
      int offset = 0;
      offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
      return result;
    }
  
    private static int zzUnpackTrans(String packed, int offset, int [] result) {
      int i = 0;       /* index in packed string  */
      int j = offset;  /* index in unpacked array */
      int l = packed.length();
      while (i < l) {
        int count = packed.charAt(i++);
        int value = packed.charAt(i++);
        value--;
        do result[j++] = value; while (--count > 0);
      }
      return j;
    }
  
  
    /* error codes */
    private static final int ZZ_UNKNOWN_ERROR = 0;
    private static final int ZZ_NO_MATCH = 1;
    private static final int ZZ_PUSHBACK_2BIG = 2;
  
    /* error messages for the codes above */
    private static final String ZZ_ERROR_MSG[] = {
      "Unkown internal scanner error",
      "Error: could not match input",
      "Error: pushback value was too large"
    };
  
    /**
     * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
     */
    private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
  
    private static final String ZZ_ATTRIBUTE_PACKED_0 =
      "\1\1\2\0\2\11\17\1\2\11\1\1\1\0\1\11"+
      "\1\1\1\11\27\1\2\11\173\1";
  
    private static int [] zzUnpackAttribute() {
      int [] result = new int[175];
      int offset = 0;
      offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
      return result;
    }
  
    private static int zzUnpackAttribute(String packed, int offset, int [] result) {
      int i = 0;       /* index in packed string  */
      int j = offset;  /* index in unpacked array */
      int l = packed.length();
      while (i < l) {
        int count = packed.charAt(i++);
        int value = packed.charAt(i++);
        do result[j++] = value; while (--count > 0);
      }
      return j;
    }
  
    /** the input device */
    private java.io.Reader zzReader;
  
    /** the current state of the DFA */
    private int zzState;
  
    /** the current lexical state */
    private int zzLexicalState = YYINITIAL;
  
    /** this buffer contains the current text to be matched and is
        the source of the yytext() string */
    private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
  
    /** the textposition at the last accepting state */
    private int zzMarkedPos;
  
    /** the textposition at the last state to be included in yytext */
    private int zzPushbackPos;
  
    /** the current text position in the buffer */
    private int zzCurrentPos;
  
    /** startRead marks the beginning of the yytext() string in the buffer */
    private int zzStartRead;
  
    /** endRead marks the last character in the buffer, that has been read
        from input */
    private int zzEndRead;
  
    /** number of newlines encountered up to the start of the matched text */
    private int yyline;
  
    /** the number of characters up to the start of the matched text */
    private int yychar;
  
    /**
     * the number of characters from the last newline up to the start of the 
     * matched text
     */
    private int yycolumn;
  
    /** 
     * zzAtBOL == true <=> the scanner is currently at the beginning of a line
     */
    private boolean zzAtBOL = true;
  
    /** zzAtEOF == true <=> the scanner is at the EOF */
    private boolean zzAtEOF;
  
    /* user code: */
  
      public static final int  IDENTIFIER_LITERAL = 16; 
      public static final int  CHARACTER_LITERAL = 17;
      public static final int  INCLUDE = 18;
  
  /* The following can be generated with the following command:
  
     cat $DSAP/src/lib/dataformat/db |
       awk ' $1=="#" && $2=="define" { print "public static final int ",$3," = ",$4,";" }' 
  */
      
      public static final int  STRING_LITERAL  =  257 ;
      public static final int  INTEGER_LITERAL  =  258 ;
      public static final int  SCHEMA  =  259 ;
      public static final int  ATTRIBUTE  =  260 ;
      public static final int  RELATION  =  261 ;
      public static final int  DESCRIPTION  =  262 ;
      public static final int  DETAIL  =  263 ;
      public static final int  LIKE  =  264 ;
      public static final int  TIMEDATE  =  265 ;
      public static final int  UNITS  =  266 ;
      public static final int  NULLVAL  =  267 ;
      public static final int  FORMAT  =  268 ;
      public static final int  RANGE  =  269 ;
      public static final int  SEPARATOR  =  270 ;
      public static final int  REAL  =  271 ;
      public static final int  INTEGER  =  272 ;
      public static final int  TIME  =  273 ;
      public static final int  YEARDAY  =  274 ;
      public static final int  ASCII  =  275 ;
      public static final int  WAVEFORM  =  276 ;
      public static final int  RESPONSE  =  277 ;
      public static final int  BFLOAT  =  278 ;
      public static final int  BDOUBLE  =  279 ;
      public static final int  BSHORT  =  280 ;
      public static final int  BINT  =  281 ;
      public static final int  DBPTR  =  282 ;
      public static final int  FIELDS  =  283 ;
      public static final int  PRIMARY  =  284 ;
      public static final int  ALTERNATE  =  285 ;
      public static final int  FOREIGN  =  286 ;
      public static final int  DEFINES  =  287 ;
      public static final int  TRANSIENT  =  288 ;
      
  
    /** a buffer into which we copy string literals */
  
    StringBuffer string = new StringBuffer();
    
    private DatabaseSchemaToken symbol(int type) {
      return new DatabaseSchemaToken(type, yyline+1, yycolumn+1);
    }
  
    private DatabaseSchemaToken symbol(int type, Object value) {
      return new DatabaseSchemaToken(type, yyline+1, yycolumn+1, value);
    }
  
  
      /* FIXME: It might be appropriate to move the following into a separate
         DatabaseSchemaParser class. */
  
      /** Require that the next token is the given character.  Throw it
  	away if it exists, throw a SyntaxException if it doesn't. */
  
      public void expectChar(String chr) throws SyntaxException, IOException {
  	DatabaseSchemaToken token = getToken();
  
  	if (token.type == CHARACTER_LITERAL && (chr.compareTo((String)(token.value)) == 0)) {
  	    /* Throw it away. */
  	} else {
  	    throw new SyntaxException("Expected character '"+chr+"'.", token);
  	}
      }
  
      public String expectString() throws SyntaxException, IOException { 
  	DatabaseSchemaToken token = getToken();
  	if (token.type == STRING_LITERAL) {
  	    return (String)(token.value);
  	} else {
  	    throw new SyntaxException("Expected STRING_LITERAL.", token);
  	}
      }
  
      public String expectIdentifier() throws SyntaxException, IOException { 
  	DatabaseSchemaToken token = getToken();
  	if (token.type == IDENTIFIER_LITERAL) {
  	    return (String)(token.value);
  	} else {
  	    throw new SyntaxException("Expected IDENTIFIER_LITERAL.", token);
  	}
      }
  
      public int expectNumber() throws SyntaxException, IOException { 
  	DatabaseSchemaToken token = getToken();
  	if (token.type == INTEGER_LITERAL) {
  	    return ((Integer)(token.value)).intValue();
  	} else {
  	    throw new SyntaxException("Expected INTEGER_LITERAL.", token);
  	}
      }
  
      /** Read a list of identifiers, enclosed in parentheis. Example: (foo bar
          baz)  If the argument is null, then a new list is created and
          returned; otherwise the list given in the argument is used.   */
  
      public List parseIdentifierList(List list) 
  	throws SyntaxException, IOException {
  	
  	expectChar("(");
  	
  	if (list == null) {
  	    list = new ArrayList();
  	}
  	
  	while (true) {
  	    DatabaseSchemaToken token = getToken();
  	 
  	    if (token.type == IDENTIFIER_LITERAL) {
  		list.add(token.value);
  	    } else if (token.type == CHARACTER_LITERAL && ((String)(token.value)).compareTo(")")==0) {
  		break;
  	    } else {
  		throw new SyntaxException("Expected IDENTIFIER or ')'.", token);
  	    }
  	}
  	return list;
      }
  
  
  
    /**
     * 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.
     */
    DatabaseSchemaLexer(java.io.Reader in) {
      this.zzReader = in;
    }
  
    /**
     * Creates a new scanner.
     * There is also java.io.Reader version of this constructor.
     *
     * @param   in  the java.io.Inputstream to read input from.
     */
    DatabaseSchemaLexer(java.io.InputStream in) {
      this(new java.io.InputStreamReader(in));
    }
  
  
    /**
     * 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;
        zzPushbackPos-= 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) {
        return true;
      }
      else {
        zzEndRead+= numRead;
        return false;
      }
    }
  
      
    /**
     * Closes the input stream.
     */
    public final void yyclose() throws java.io.IOException {
      zzAtEOF = true;            /* indicate end of file */
      zzEndRead = zzStartRead;  /* invalidate buffer    */
  
      if (zzReader != null)
        zzReader.close();
    }
  
  
    /**
     * Resets the scanner to read from a new input stream.
     * Does not close the old reader.
     *
     * All internal variables are reset, the old input stream 
     * <b>cannot</b> be reused (internal buffer is discarded and lost).
     * Lexical state is set to <tt>ZZ_INITIAL</tt>.
     *
     * @param reader   the new input stream 
     */
    public final void yyreset(java.io.Reader reader) {
      zzReader = reader;
      zzAtBOL  = true;
      zzAtEOF  = false;
      zzEndRead = zzStartRead = 0;
      zzCurrentPos = zzMarkedPos = zzPushbackPos = 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 );
    }
  
  
    /**
     * Returns the character at position <tt>pos</tt> from the 
     * matched text. 
     * 
     * It is equivalent to yytext().charAt(pos), but faster
     *
     * @param pos the position of the character to fetch. 
     *            A value from 0 to yylength()-1.
     *
     * @return the character at position pos
     */
    public final char yycharat(int pos) {
      return zzBuffer[zzStartRead+pos];
    }
  
  
    /**
     * Returns the length of the matched text region.
     */
    public final int yylength() {
      return zzMarkedPos-zzStartRead;
    }
  
  
    /**
     * Reports an error that occured while scanning.
     *
     * In a wellformed scanner (no or only correct usage of 
     * yypushback(int) and a match-all fallback rule) this method 
     * will only be called with things that "Can't Possibly Happen".
     * If this method is called, something is seriously wrong
     * (e.g. a JFlex bug producing a faulty scanner etc.).
     *
     * Usual syntax/scanner level error handling should be done
     * in error fallback rules.
     *
     * @param   errorCode  the code of the errormessage to display
     */
    private void zzScanError(int errorCode) {
      String message;
      try {
        message = ZZ_ERROR_MSG[errorCode];
      }
      catch (ArrayIndexOutOfBoundsException e) {
        message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
      }
  
      throw new Error(message);
    } 
  
  
    /**
     * Pushes the specified amount of characters back into the input stream.
     *
     * They will be read again by then next call of the scanning method
     *
     * @param number  the number of characters to be read again.
     *                This number must not be greater than yylength()!
     */
    public void yypushback(int number)  {
      if ( number > yylength() )
        zzScanError(ZZ_PUSHBACK_2BIG);
  
      zzMarkedPos -= number;
    }
  
  
    /**
     * Resumes scanning until the next regular expression is matched,
     * the end of input is encountered or an I/O-Error occurs.
     *
     * @return      the next token
     * @exception   java.io.IOException  if any I/O-Error occurs
     */
    public DatabaseSchemaToken getToken() throws java.io.IOException {
      int zzInput;
      int zzAction;
  
      // cached fields:
      int zzCurrentPosL;
      int zzMarkedPosL;
      int zzEndReadL = zzEndRead;
      char [] zzBufferL = zzBuffer;
      char [] zzCMapL = ZZ_CMAP;
  
      int [] zzTransL = ZZ_TRANS;
      int [] zzRowMapL = ZZ_ROWMAP;
      int [] zzAttrL = ZZ_ATTRIBUTE;
  
      while (true) {
        zzMarkedPosL = zzMarkedPos;
  
        boolean zzR = false;
        for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL;
                                                               zzCurrentPosL++) {
          switch (zzBufferL[zzCurrentPosL]) {
          case '\u000B':
          case '\u000C':
          case '\u0085':
          case '\u2028':
          case '\u2029':
            yyline++;
            yycolumn = 0;
            zzR = false;
            break;
          case '\r':
            yyline++;
            yycolumn = 0;
            zzR = true;
            break;
          case '\n':
            if (zzR)
              zzR = false;
            else {
              yyline++;
              yycolumn = 0;
            }
            break;
          default:
            zzR = false;
            yycolumn++;
          }
        }
  
        if (zzR) {
          // peek one character ahead if it is \n (if we have counted one line too much)
          boolean zzPeek;
          if (zzMarkedPosL < zzEndReadL)
            zzPeek = zzBufferL[zzMarkedPosL] == '\n';
          else if (zzAtEOF)
            zzPeek = false;
          else {
            boolean eof = zzRefill();
            zzMarkedPosL = zzMarkedPos;
            zzBufferL = zzBuffer;
            if (eof) 
              zzPeek = false;
            else 
              zzPeek = zzBufferL[zzMarkedPosL] == '\n';
          }
          if (zzPeek) yyline--;
        }
        zzAction = -1;
  
        zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
    
        zzState = 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++];
              }
            }
            int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
            if (zzNext == -1) break zzForAction;
            zzState = zzNext;
  
            int 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 29: 
            { return symbol(DEFINES);
            }
          case 40: break;
          case 35: 
            { return symbol(SEPARATOR);
            }
          case 41: break;
          case 5: 
            { yybegin(CURLYSTRING); 
  		  string.setLength(0); /* string */
            }
          case 42: break;
          case 34: 
            { return symbol(TIMEDATE);
            }
          case 43: break;
          case 16: 
            { return symbol(NULLVAL);
            }
          case 44: break;
          case 36: 
            { return symbol(ATTRIBUTE);
            }
          case 45: break;
          case 37: 
            { return symbol(ALTERNATE);
            }
          case 46: break;
          case 30: 
            { return symbol(BDOUBLE);
            }
          case 47: break;
          case 4: 
            { return symbol(IDENTIFIER_LITERAL, yytext());  /* string/identifier */
            }
          case 48: break;
          case 6: 
            { yybegin(STRING); 
  		  string.setLength(0); /* string */
            }
          case 49: break;
          case 2: 
            { return symbol(CHARACTER_LITERAL, yytext()); /* character */
            }
          case 50: break;
          case 8: 
            { yybegin(YYINITIAL);  return symbol(STRING_LITERAL, string.toString());
            }
          case 51: break;
          case 1: 
            { return symbol(INTEGER_LITERAL, new Integer(yytext())); /* number */
            }
          case 52: break;
          case 38: 
            { return symbol(TRANSIENT);
            }
          case 53: break;
          case 31: 
            { return symbol(FOREIGN);
            }
          case 54: break;
          case 13: 
            { return symbol(TIME);
            }
          case 55: break;
          case 21: 
            { return symbol(ASCII);
            }
          case 56: break;
          case 32: 
            { return symbol(PRIMARY);
            }
          case 57: break;
          case 15: 
            { return symbol(LIKE);
            }
          case 58: break;
          case 25: 
            { return symbol(FIELDS);
            }
          case 59: break;
          case 3: 
            { /* Discard whitespace. */
            }
          case 60: break;
          case 18: 
            { return symbol(DBPTR);
            }
          case 61: break;
          case 24: 
            { return symbol(BSHORT);
            }
          case 62: break;
          case 26: 
            { return symbol(FORMAT);
            }
          case 63: break;
          case 19: 
            { return symbol(UNITS);
            }
          case 64: break;
          case 23: 
            { return symbol(BFLOAT);
            }
          case 65: break;
          case 11: 
            { string.append( '\"' );
            }
          case 66: break;
          case 12: 
            { return symbol(REAL);
            }
          case 67: break;
          case 7: 
            { string.append(yytext());
            }
          case 68: break;
          case 20: 
            { return symbol(SCHEMA);
            }
          case 69: break;
          case 14: 
            { return symbol(BINT);
            }
          case 70: break;
          case 10: 
            { string.append( '\\' );
            }
          case 71: break;
          case 17: 
            { return symbol(RANGE);
            }
          case 72: break;
          case 33: 
            { return symbol(RELATION);
            }
          case 73: break;
          case 27: 
            { return symbol(INTEGER);
            }
          case 74: break;
          case 9: 
            { yybegin(YYINITIAL); return symbol(STRING_LITERAL, string.toString());
            }
          case 75: break;
          case 22: 
            { return symbol(DETAIL);
            }
          case 76: break;
          case 39: 
            { return symbol(DESCRIPTION);
            }
          case 77: break;
          case 28: 
            { return symbol(YEARDAY);
            }
          case 78: break;
          default: 
            if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
              zzAtEOF = true;
              return null;
            } 
            else {
              zzScanError(ZZ_NO_MATCH);
            }
        }
      }
    }
  
  
  }
  