diff options
| author | Peter Sewell | 2013-09-05 15:21:42 +0100 |
|---|---|---|
| committer | Peter Sewell | 2013-09-05 15:21:42 +0100 |
| commit | cf4c7c0fd5fb8a9851fa6ca325d1b106ff080fd5 (patch) | |
| tree | d2fee1e6801f498c8b84aff76503fde16db90eb7 /src/parse_ast.ml | |
| parent | 635a3619d41c4659005922a19210fe48e551f81a (diff) | |
workaround likely aux rule bug
Diffstat (limited to 'src/parse_ast.ml')
| -rw-r--r-- | src/parse_ast.ml | 138 |
1 files changed, 69 insertions, 69 deletions
diff --git a/src/parse_ast.ml b/src/parse_ast.ml index 23957118..e0c75495 100644 --- a/src/parse_ast.ml +++ b/src/parse_ast.ml @@ -25,6 +25,12 @@ base_kind_aux = (* base kind *) type +id_aux = (* Identifier *) + Id of x + | DeIid of x (* remove infix status *) + + +type efct_aux = (* effect *) Effect_rreg (* read register *) | Effect_wreg (* write register *) @@ -36,24 +42,18 @@ efct_aux = (* effect *) type -id_aux = (* Identifier *) - Id of x - | DeIid of x (* remove infix status *) - - -type base_kind = BK_aux of base_kind_aux * l type -efct = - Effect_aux of efct_aux * l +id = + Id_aux of id_aux * l type -id = - Id_aux of id_aux * l +efct = + Effect_aux of efct_aux * l type @@ -128,6 +128,11 @@ typquant_aux = (* type quantifiers and constraints *) type +typquant = + TypQ_aux of typquant_aux * l + + +type lit_aux = (* Literal constant *) L_unit (* $() : _$ *) | L_zero (* $_ : _$ *) @@ -141,8 +146,8 @@ lit_aux = (* Literal constant *) type -typquant = - TypQ_aux of typquant_aux * l +typschm_aux = (* type scheme *) + TypSchm_ts of typquant * atyp type @@ -151,8 +156,8 @@ lit = type -typschm_aux = (* type scheme *) - TypSchm_ts of typquant * atyp +typschm = + TypSchm_aux of typschm_aux * l type @@ -181,11 +186,6 @@ and fpat = type -typschm = - TypSchm_aux of typschm_aux * l - - -type exp_aux = (* Expression *) E_block of (exp) list (* block (parsing conflict with structs?) *) | E_id of id (* identifier *) @@ -253,20 +253,25 @@ tannot_opt_aux = (* Optional type annotation for functions *) type +rec_opt_aux = (* Optional recursive annotation for functions *) + Rec_nonrec (* non-recursive *) + | Rec_rec (* recursive *) + + +type effects_opt_aux = (* Optional effect annotation for functions *) Effects_opt_pure (* sugar for empty effect set *) | Effects_opt_effects of atyp type -rec_opt_aux = (* Optional recursive annotation for functions *) - Rec_nonrec (* non-recursive *) - | Rec_rec (* recursive *) +funcl_aux = (* Function clause *) + FCL_Funcl of id * pat * exp type -funcl_aux = (* Function clause *) - FCL_Funcl of id * pat * exp +naming_scheme_opt = + Name_sect_aux of naming_scheme_opt_aux * l type @@ -280,33 +285,23 @@ and index_range = type -naming_scheme_opt = - Name_sect_aux of naming_scheme_opt_aux * l - - -type tannot_opt = Typ_annot_opt_aux of tannot_opt_aux * l type -effects_opt = - Effects_opt_aux of effects_opt_aux * l - - -type rec_opt = Rec_aux of rec_opt_aux * l type -funcl = - FCL_aux of funcl_aux * l +effects_opt = + Effects_opt_aux of effects_opt_aux * l type -val_spec_aux = (* Value type specification *) - VS_val_spec of typschm * id +funcl = + FCL_aux of funcl_aux * l type @@ -319,19 +314,19 @@ type_def_aux = (* Type definition body *) type -default_typing_spec_aux = (* Default kinding or typing assumption *) - DT_kind of base_kind * id - | DT_typ of typschm * id +fundef_aux = (* Function definition *) + FD_function of rec_opt * tannot_opt * effects_opt * (funcl) list type -fundef_aux = (* Function definition *) - FD_function of rec_opt * tannot_opt * effects_opt * (funcl) list +val_spec_aux = (* Value type specification *) + VS_val_spec of typschm * id type -val_spec = - VS_aux of val_spec_aux * l +default_typing_spec_aux = (* Default kinding or typing assumption *) + DT_kind of base_kind * id + | DT_typ of typschm * id type @@ -340,13 +335,18 @@ type_def = type -default_typing_spec = - DT_aux of default_typing_spec_aux * l +fundef = + FD_aux of fundef_aux * l type -fundef = - FD_aux of fundef_aux * l +val_spec = + VS_aux of val_spec_aux * l + + +type +default_typing_spec = + DT_aux of default_typing_spec_aux * l type @@ -365,16 +365,6 @@ def_aux = (* Top-level definition *) type -def = - DEF_aux of def_aux * l - - -type -ctor_def_aux = (* Datatype constructor definition clause *) - CT_ct of id * typschm - - -type typ_lib_aux = (* library types and syntactic sugar for them *) Typ_lib_unit (* unit type with value $()$ *) | Typ_lib_bool (* booleans $_$ and $_$ *) @@ -393,6 +383,26 @@ typ_lib_aux = (* library types and syntactic sugar for them *) type +ctor_def_aux = (* Datatype constructor definition clause *) + CT_ct of id * typschm + + +type +def = + DEF_aux of def_aux * l + + +type +typ_lib = + Typ_lib_aux of typ_lib_aux * l + + +type +ctor_def = + CT_aux of ctor_def_aux * l + + +type lexp_aux = (* lvalue expression *) LEXP_id of id (* identifier *) | LEXP_vector of lexp * exp (* vector element *) @@ -408,14 +418,4 @@ defs = (* Definition sequence *) Defs of (def) list -type -ctor_def = - CT_aux of ctor_def_aux * l - - -type -typ_lib = - Typ_lib_aux of typ_lib_aux * l - - |
