/[svn]/parser/ast.ml
ViewVC logotype

Diff of /parser/ast.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 374 by abate, Tue Jul 10 17:29:46 2007 UTC revision 785 by abate, Tue Jul 10 18:03:02 2007 UTC
# Line 7  Line 7 
7    
8  and pmodule_item = pmodule_item' located  and pmodule_item = pmodule_item' located
9  and pmodule_item' =  and pmodule_item' =
10    | TypeDecl of string * ppat    | TypeDecl of id * ppat
11    | PatDecl of string * ppat    | SchemaDecl of string * Schema_types.schema  (* name, schema *)
   | FunDecl of abstr  
12    | LetDecl of ppat * pexpr    | LetDecl of ppat * pexpr
13      | FunDecl of pexpr
14      | Namespace of U.t * Ns.t
15      | Using of U.t * Types.CompUnit.t
16    | EvalStatement of pexpr    | EvalStatement of pexpr
17    | Debug of debug_directive    | Debug of debug_directive
18      | Directive of toplevel_directive
19  and debug_directive =  and debug_directive =
20    [ `Filter of ppat * ppat    [ `Filter of ppat * ppat
21      | `Sample of ppat
22    | `Accept of ppat    | `Accept of ppat
23    | `Compile of ppat * ppat list    | `Compile of ppat * ppat list
   | `Normal_record of ppat  
   | `Compile2 of ppat * ppat list  
24    | `Subtype of ppat * ppat    | `Subtype of ppat * ppat
25      | `Explain of ppat * pexpr
26      ]
27    and toplevel_directive =
28      [ `Quit
29      | `Env
30      | `Reinit_ns
31      | `Help
32      | `Dump of pexpr
33      | `Print_schema of string
34      | `Print_schema_type of Schema_types.component_kind * string * string
35      | `Print_type of string
36    ]    ]
37    
38    
39  and pexpr =  and pexpr =
40    | LocatedExpr of loc * pexpr    | LocatedExpr of loc * pexpr
41    
   | Forget of pexpr * ppat  
   
42    (* CDuce is a Lambda-calculus ... *)    (* CDuce is a Lambda-calculus ... *)
43    | Var of id    | Var of U.t
44    | Apply of pexpr * pexpr    | Apply of pexpr * pexpr
45    | Abstraction of abstr    | Abstraction of abstr
46    
47    (* Data constructors *)    (* Data constructors *)
48    | Cst of Types.const    | Const of Types.Const.t
49      | Integer of Intervals.V.t
50      | Char of Chars.V.t
51    | Pair of pexpr * pexpr    | Pair of pexpr * pexpr
52      | Atom of U.t
53    | Xml of pexpr * pexpr    | Xml of pexpr * pexpr
54    | RecordLitt of pexpr label_map    | RecordLitt of (label * pexpr) list
55      | String of U.uindex * U.uindex * U.t * pexpr
56    
57    (* Data destructors *)    (* Data destructors *)
   | Op of string * pexpr list  
58    | Match of pexpr * branches    | Match of pexpr * branches
59    | Map of bool * pexpr * branches    | Map of pexpr * branches
60      | Transform of pexpr * branches
61    | Xtrans of pexpr * branches    | Xtrans of pexpr * branches
62      | Validate of pexpr * Schema_types.component_kind * string * string
63          (* exp, schema component kind, schema name, element name *)
64    | Dot of pexpr* label    | Dot of pexpr* label
65    | RemoveField of pexpr * label    | RemoveField of pexpr * label
66    
67    (* Exceptions *)    (* Exceptions *)
68    | Try of pexpr * branches    | Try of pexpr * branches
69    
70      (* Other *)
71      | NamespaceIn of U.t * Ns.t * pexpr
72      | Forget of pexpr * ppat
73      | Op of string * pexpr list
74      | Ref of pexpr * ppat
75    
76    
77    
78    and label = U.t
79    
80  and abstr = {  and abstr = {
81    fun_name : id option;    fun_name : id option;
82    fun_iface : (ppat * ppat) list;    fun_iface : (ppat * ppat) list;
# Line 62  Line 89 
89    
90  and ppat = ppat' located  and ppat = ppat' located
91  and ppat' =  and ppat' =
92    | PatVar of string    | PatVar of U.t
93    | Recurs of ppat * (string * ppat) list    | SchemaVar of  (* type/pattern schema variable *)
94          Schema_types.component_kind * string * string (* kind, schema, name *)
95      | Cst of pexpr
96      | NsT of U.t
97      | Recurs of ppat * (id * ppat) list
98    | Internal of Types.descr    | Internal of Types.descr
99    | Or of ppat * ppat    | Or of ppat * ppat
100    | And of ppat * ppat    | And of ppat * ppat
# Line 72  Line 103 
103    | XmlT of ppat * ppat    | XmlT of ppat * ppat
104    | Arrow of ppat * ppat    | Arrow of ppat * ppat
105    | Optional of ppat    | Optional of ppat
106    | Record of bool * ppat label_map    | Record of bool * (label * ppat) list
107    | Capture of id    | Constant of id * pexpr
   | Constant of id * Types.const  
108    | Regexp of regexp * ppat    | Regexp of regexp * ppat
109          (* regular expression, continuation: [ re ; cont ], e.g: [ re ; nil ] *)
110    
111  and regexp =  and regexp =
112    | Epsilon    | Epsilon
# Line 85  Line 116 
116    | Star of regexp    | Star of regexp
117    | WeakStar of regexp    | WeakStar of regexp
118    | SeqCapture of id * regexp    | SeqCapture of id * regexp
119    
120    

Legend:
Removed from v.374  
changed lines
  Added in v.785

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5