Module Mlsem_app.PAst

exception SymbolError of string
exception LexicalError of Mlsem_common.Position.t * string
exception SyntaxError of Mlsem_common.Position.t * string
type 'typ lambda_annot = 'typ option
type 'typ vkind =
  1. | Immut
  2. | AnnotMut of 'typ
  3. | Mut
type ('typ, 'v) vdef = 'typ vkind * 'v
type ('a, 'typ, 'tag, 'v) pattern =
  1. | PatType of 'typ
  2. | PatVar of ('typ, 'v) vdef
  3. | PatLit of Mlsem_lang.Const.t
  4. | PatTag of 'tag * ('a, 'typ, 'tag, 'v) pattern
  5. | PatAnd of ('a, 'typ, 'tag, 'v) pattern * ('a, 'typ, 'tag, 'v) pattern
  6. | PatOr of ('a, 'typ, 'tag, 'v) pattern * ('a, 'typ, 'tag, 'v) pattern
  7. | PatTuple of ('a, 'typ, 'tag, 'v) pattern list
  8. | PatCons of ('a, 'typ, 'tag, 'v) pattern * ('a, 'typ, 'tag, 'v) pattern
  9. | PatRecord of (string * ('a, 'typ, 'tag, 'v) pattern) list * bool
  10. | PatAssign of ('typ, 'v) vdef * Mlsem_lang.Const.t
and ('a, 'typ, 'enu, 'tag, 'v) ast =
  1. | Magic of 'typ
  2. | Const of Mlsem_lang.Const.t
  3. | Var of 'v
  4. | Enum of 'enu
  5. | Tag of 'tag * ('a, 'typ, 'enu, 'tag, 'v) t
  6. | Suggest of 'v * 'typ list * ('a, 'typ, 'enu, 'tag, 'v) t
  7. | Lambda of 'v * 'typ lambda_annot * ('a, 'typ, 'enu, 'tag, 'v) t
  8. | LambdaRec of ('v * 'typ lambda_annot * ('a, 'typ, 'enu, 'tag, 'v) t) list
  9. | Ite of ('a, 'typ, 'enu, 'tag, 'v) t * 'typ * ('a, 'typ, 'enu, 'tag, 'v) t * ('a, 'typ, 'enu, 'tag, 'v) t
  10. | App of ('a, 'typ, 'enu, 'tag, 'v) t * ('a, 'typ, 'enu, 'tag, 'v) t
  11. | Let of ('typ, 'v) vdef * ('a, 'typ, 'enu, 'tag, 'v) t * ('a, 'typ, 'enu, 'tag, 'v) t
  12. | Declare of ('typ, 'v) vdef * ('a, 'typ, 'enu, 'tag, 'v) t
  13. | Tuple of ('a, 'typ, 'enu, 'tag, 'v) t list
  14. | Cons of ('a, 'typ, 'enu, 'tag, 'v) t * ('a, 'typ, 'enu, 'tag, 'v) t
  15. | Projection of Mlsem_system.Ast.projection * ('a, 'typ, 'enu, 'tag, 'v) t
  16. | Constructor of Mlsem_system.Ast.constructor * ('a, 'typ, 'enu, 'tag, 'v) t list
  17. | Operation of Mlsem_system.Ast.operation * ('a, 'typ, 'enu, 'tag, 'v) t
  18. | Record of (string * ('a, 'typ, 'enu, 'tag, 'v) t) list
  19. | RecordUpdate of ('a, 'typ, 'enu, 'tag, 'v) t * string * ('a, 'typ, 'enu, 'tag, 'v) t option
  20. | TypeCast of ('a, 'typ, 'enu, 'tag, 'v) t * 'typ option * Mlsem_system.Ast.check
  21. | TypeCoerce of ('a, 'typ, 'enu, 'tag, 'v) t * 'typ option * Mlsem_system.Ast.check
  22. | VarAssign of 'v * ('a, 'typ, 'enu, 'tag, 'v) t
  23. | PatMatch of ('a, 'typ, 'enu, 'tag, 'v) t * (('a, 'typ, 'tag, 'v) pattern * ('a, 'typ, 'enu, 'tag, 'v) t) list
  24. | Cond of ('a, 'typ, 'enu, 'tag, 'v) t * 'typ * ('a, 'typ, 'enu, 'tag, 'v) t * ('a, 'typ, 'enu, 'tag, 'v) t option
  25. | While of ('a, 'typ, 'enu, 'tag, 'v) t * 'typ * ('a, 'typ, 'enu, 'tag, 'v) t
  26. | Seq of ('a, 'typ, 'enu, 'tag, 'v) t * ('a, 'typ, 'enu, 'tag, 'v) t
  27. | Alt of ('a, 'typ, 'enu, 'tag, 'v) t * ('a, 'typ, 'enu, 'tag, 'v) t
  28. | Return of ('a, 'typ, 'enu, 'tag, 'v) t
  29. | Break
  30. | Continue
and ('a, 'typ, 'enu, 'tag, 'v) t = 'a * ('a, 'typ, 'enu, 'tag, 'v) ast
module type ParserExpr = sig ... end
module type ParserExt = sig ... end