open Datatype let inputparser = InputParser.buildParser [ ("Simple","~",(fun l -> Not(List.hd l)) ); ("One","&",(fun l -> And(List.hd l, List.hd(List.tl l))) ); ("One","v",(fun l -> Or(List.hd l, List.hd(List.tl l))) ); ] ;; let a = inputparser "a & ( c v ~ d)" in Datatype.print a