{ open Parser exception SyntaxError of string } let white = [' ' '\t']+ let id = ['a'-'z' 'A'-'Z' '_'] ['a'-'z' 'A'-'Z' '0'-'9' '_']* rule read = parse | white { read lexbuf } | id as s { FLAG s } | '(' { LPAREN } | ')' { RPAREN } | '&' { AND } | '|' { OR } | '~' { NOT } | _ { raise (SyntaxError ("Unexpected char: " ^ Lexing.lexeme lexbuf)) } | eof { EOF }