Source

hello / sql / sql_lexer.mll

Full commit
Kota UENISHI 4d91c01 






















{

open Sql_parser
let debugprint = ref true;;
let print str =  if !debugprint then print_endline str;;

}

let digit = ['0'-'9']*
let literal = ['a'-'z']['A'-'Z' 'a'-'z' '_' '0'-'9']*

rule token = parse
  | "select" { SELECT }
  | "SELECT" { SELECT }
  | "from"   { FROM }
  | "FROM"   { FROM }
  | ","      { COMMA }
  | "*"      { ASTERISK }
  | literal as s { LITERAL(s) }
  | "\n"         { print "f"; token lexbuf }
(*  | eof	         { print "eof."; EOF } *)
  | _            { token lexbuf }