let parse c =
    let lb = from_channel c in
    try
      Ltlparser.ltl token lb
    with
        Parsing.Parse_error
      | Invalid_argument _  -> raise_located (loc lb) "Syntax error"