Commit db2d1fff authored by Raphaël Cauderlier's avatar Raphaël Cauderlier
Browse files

Easier to read lexing error

parent 532b50f3
{
open Parser
exception Unexpected_char of char
exception Unexpected_char of string
}
let id = [ 'a'-'z' ] ['a'-'z' 'A'-'Z' '_' '0'-'9']*
......@@ -29,5 +29,5 @@ rule token = parse
| "norm" { NORM (Parsing.rhs_start_pos 1) }
| id as s { ID (s) }
| [ 'A'-'Z' ] ['a'-'z' 'A'-'Z' '_' '0'-'9']* as s { CID (s) }
| _ as c { raise (Unexpected_char c) }
| _ as c { raise (Unexpected_char (Printf.sprintf"'%c'" c)) }
| eof { raise End_of_file }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment