12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667(**************************************************************************)(* *)(* OCaml *)(* *)(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)(* *)(* Copyright 1997 Institut National de Recherche en Informatique et *)(* en Automatique. *)(* *)(* All rights reserved. This file is distributed under the terms of *)(* the GNU Lesser General Public License version 2.1, with the *)(* special exception on linking described in the file LICENSE. *)(* *)(**************************************************************************)(* Auxiliary type for reporting syntax errors *)typeinvalid_package_type=|Parameterized_types|Constrained_types|Private_types|Not_with_type|Neither_identifier_nor_with_type|Misplaced_attributetypeerror=UnclosedofLocation.t*string*Location.t*string|ExpectingofLocation.t*string|Not_expectingofLocation.t*string|Applicative_pathofLocation.t|Variable_in_scopeofLocation.t*string|OtherofLocation.t|Ill_formed_astofLocation.t*string|Invalid_package_typeofLocation.t*invalid_package_type|Removed_string_setofLocation.t|Missing_unboxed_literal_suffixofLocation.t|Malformed_instance_identifierofLocation.t|UnspliceableofLocation.t|Let_mutable_not_allowed_at_structure_levelofLocation.t|Let_mutable_not_allowed_in_class_definitionofLocation.t|Let_mutable_not_allowed_with_function_bindingsofLocation.t|Block_access_bad_parenofLocation.texceptionErroroferrorexceptionEscape_errorletlocation_of_error=function|Unclosed(l,_,_,_)|Applicative_pathl|Variable_in_scope(l,_)|Otherl|Not_expecting(l,_)|Ill_formed_ast(l,_)|Invalid_package_type(l,_)|Expecting(l,_)|Removed_string_setl->l|Missing_unboxed_literal_suffixl->l|Malformed_instance_identifierl->l|Unspliceablel->l|Let_mutable_not_allowed_at_structure_levell->l|Let_mutable_not_allowed_in_class_definitionl->l|Let_mutable_not_allowed_with_function_bindingsl->l|Block_access_bad_parenl->lletill_formed_astlocs=raise(Error(Ill_formed_ast(loc,s)))