Created by orbitzN 2017-04-19 View revision File lexer.ml Added Side-by-side diff More Ignore whitespace Hide word diff +let rec token buf = + let open Token in + match%sedlex buf with + | "@@" -> Escaped_at::token buf + | "@" -> At::token buf + | Star (Sub (any, "@")) -> + Printf.printf "length = %d\n" (Sedlexing.lexeme_length buf); + Printf.printf "array length = %d\n" (Array.length (Sedlexing.lexeme buf)); + String (Sedlexing.Utf8.lexeme buf)::token buf + | eof -> [] + | _ -> failwith "nyi"