git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6028 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 2003-12-18 13:16:22 +00:00
parent 5d342a4b2f
commit f981f63f80
2 changed files with 6 additions and 4 deletions

View File

@ -373,6 +373,7 @@ rule token = parse
| "[" { LBRACKET }
| "[|" { LBRACKETBAR }
| "[<" { LBRACKETLESS }
| "[>" { LBRACKETGREATER }
| "]" { RBRACKET }
| "{" { LBRACE }
| "{<" { LBRACELESS }

View File

@ -245,6 +245,7 @@ let bigarray_set arr arg newval =
%token LBRACKET
%token LBRACKETBAR
%token LBRACKETLESS
%token LBRACKETGREATER
%token LESS
%token LESSMINUS
%token LET
@ -1286,9 +1287,9 @@ simple_core_type2:
{ mktyp(Ptyp_variant(List.rev $3, true, None)) }
| LBRACKET row_field BAR row_field_list RBRACKET
{ mktyp(Ptyp_variant($2 :: List.rev $4, true, None)) }
| LBRACKET GREATER opt_bar row_field_list RBRACKET
{ mktyp(Ptyp_variant(List.rev $4, false, None)) }
| LBRACKET GREATER RBRACKET
| LBRACKETGREATER opt_bar row_field_list RBRACKET
{ mktyp(Ptyp_variant(List.rev $3, false, None)) }
| LBRACKETGREATER RBRACKET
{ mktyp(Ptyp_variant([], false, None)) }
| LBRACKETLESS opt_bar row_field_list RBRACKET
{ mktyp(Ptyp_variant(List.rev $3, true, Some [])) }
@ -1318,7 +1319,7 @@ amper_type_list:
| amper_type_list AMPERSAND core_type { $3 :: $1 }
;
opt_present:
LBRACKET GREATER name_tag_list RBRACKET { List.rev $3 }
LBRACKETGREATER name_tag_list RBRACKET { List.rev $2 }
| /* empty */ { [] }
;
name_tag_list: