private Token name ( ) throws ScanException { text = new StringBuilder ( ) ; while ( ! in ( c , "[ \t\r\n=<>!]" ) ) { text . append ( c ) ; nextChar ( ) ; } String val = text . toString ( ) . toLowerCase ( Locale . getDefault ( ) ) ; switch ( val ) { case "where" : return WHERE ; case "not" : return NOT ; case "and" : return AND ; case "or" : return OR ; case "return" : return RETURN ; } return TEXT ; }
process name tokens which could be key words or text