{ open Parser exception Error of int } let blank = [' ' '\010' '\013' '\009' '\012'] rule token = parse blank + { token lexbuf } | "_" { UNDERSCORE } | '"' [ ^ '"'] * '"' (* '"' *) { let s = Lexing.lexeme lexbuf in STRING(String.sub s 1 (String.length s - 2)) } | '(' { LPAREN } | ')' { RPAREN } | '-'? ['0'-'9']+ { INTEGER(int_of_string(Lexing.lexeme lexbuf)) } | "IF" { IF } | "DECISION" { DECISION } | "CASE" { CASE } | "ELSEIF" { ELSEIF } | "ARM" { ARM } | "EQUALS" { EQUALS } | "AND" { AND } | "OR" { OR } | "VAR" { VAR } | _ { raise (Error(Lexing.lexeme_start lexbuf)) }