Module Cduce_lib_js.Ast

module U = Encodings.Utf8
exception Parsing_error of string
type ns_expr = [
| `Uri of Ns.Uri.t
| `Path of U.t list
]
type pprog = pmodule_item list
and pmodule_item = pmodule_item' Cduce_core.Cduce_loc.located
and pmodule_item' =
| TypeDecl of Cduce_core.Cduce_loc.loc * U.t * U.t list * ppat
| SchemaDecl of U.t * string
| LetDecl of ppat * pexpr
| FunDecl of pexpr
| Namespace of U.t * ns_expr
| KeepNs of bool
| Using of U.t * U.t
| Open of U.t list
| EvalStatement of pexpr
| Directive of toplevel_directive
and debug_directive = [
| `Filter of ppat * ppat
| `Sample of ppat
| `Accept of ppat
| `Compile of ppat * ppat list
| `Subtype of ppat * ppat
| `Single of ppat
| `Tallying of U.t list * (ppat * ppat) list
]
and toplevel_directive = [
| `Quit
| `Env
| `Reinit_ns
| `Help
| `Dump of pexpr
| `Print_type of ppat
| `Debug of debug_directive
| `Verbose
| `Silent
| `Builtins
]
and pexpr =
| LocatedExpr of Cduce_core.Cduce_loc.loc * pexpr
| Var of U.t
| Apply of pexpr * pexpr
| Abstraction of abstr
| Const of Cduce_types.Types.Const.t
| Integer of Cduce_types.Intervals.V.t
| Char of Cduce_types.CharSet.V.t
| Pair of pexpr * pexpr
| Atom of U.t
| Xml of pexpr * pexpr
| RecordLitt of (label * pexpr) list
| String of U.uindex * U.uindex * U.t * pexpr
| Abstract of Cduce_types.AbstractSet.V.t
| Match of pexpr * branches
| Map of pexpr * branches
| Transform of pexpr * branches
| Xtrans of pexpr * branches
| Validate of pexpr * U.t list
| Dot of pexpr * label
| TyArgs of pexpr * ppat list
| RemoveField of pexpr * label
| Try of pexpr * branches
| NamespaceIn of U.t * ns_expr * pexpr
| KeepNsIn of bool * pexpr
| Forget of pexpr * ppat
| Check of pexpr * ppat
| Ref of pexpr * ppat
| SelectFW of pexpr * (ppat * pexpr) list * pexpr list
and label = U.t
and abstr = {
fun_name : (Cduce_core.Cduce_loc.loc * U.t) option;
fun_poly : U.t list;
fun_iface : (ppat * ppat) list;
fun_body : branches;
}
and branches = (ppat * pexpr) list
and ppat = ppat' Cduce_core.Cduce_loc.located
and ppat' =
| Poly of U.t
| PatVar of U.t list * ppat list
| Cst of pexpr
| NsT of U.t
| Recurs of ppat * (Cduce_core.Cduce_loc.loc * U.t * ppat) list
| Internal of Cduce_types.Types.descr
| Or of ppat * ppat
| And of ppat * ppat
| Diff of ppat * ppat
| Prod of ppat * ppat
| XmlT of ppat * ppat
| Arrow of ppat * ppat
| Optional of ppat
| Record of bool * (label * (ppat * ppat option)) list
| Constant of U.t * pexpr
| Regexp of regexp
| Concat of ppat * ppat
| Merge of ppat * ppat
and regexp =
| Epsilon
| Elem of ppat
| Guard of ppat
| Seq of regexp * regexp
| Alt of regexp * regexp
| Star of regexp
| WeakStar of regexp
| SeqCapture of Cduce_core.Cduce_loc.loc * U.t * regexp
val pat_true : ppat' Cduce_core.Cduce_loc.located
val pat_false : ppat' Cduce_core.Cduce_loc.located
val cst_true : pexpr
val cst_false : pexpr
val cst_nil : pexpr
val pat_nil : ppat' Cduce_core.Cduce_loc.located
val if_then_else : pexpr -> pexpr -> pexpr -> pexpr
val logical_and : pexpr -> pexpr -> pexpr
val logical_or : pexpr -> pexpr -> pexpr
val logical_not : pexpr -> pexpr
val pat_fold : ('a -> ppat' Cduce_core.Cduce_loc.located -> 'a) -> 'a -> ppat' Cduce_core.Cduce_loc.located -> 'a
val re_fold : ('a -> regexp -> 'a) -> 'a -> regexp -> 'a
val pat_iter : (ppat' Cduce_core.Cduce_loc.located -> unit) -> ppat' Cduce_core.Cduce_loc.located -> unit
val re_iter : (regexp -> unit) -> regexp -> unit