diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2005-02-16 14:38:02 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2005-02-16 14:38:02 +0000 |
commit | 669b82bba49c54213a08e724f29eace9709168d4 (patch) | |
tree | c3ab1d9c5c7d85e21e03183bee5adf83ac08e6fa | |
parent | 9f6b826e53034851f542345ae75c14b6ca32df58 (diff) |
alias (::)(a,b) pour (a::b) (suggestion Monniaux)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6786 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | parsing/parser.mly | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/parsing/parser.mly b/parsing/parser.mly index 5907561b7..fd7f56f76 100644 --- a/parsing/parser.mly +++ b/parsing/parser.mly @@ -828,6 +828,10 @@ expr: { mkexp(Pexp_construct(Lident "::", Some(ghexp(Pexp_tuple[$1;$3])), false)) } + | LPAREN COLONCOLON RPAREN LPAREN expr COMMA expr RPAREN + { mkexp(Pexp_construct(Lident "::", + Some(ghexp(Pexp_tuple[$5;$7])), + false)) } | expr INFIXOP0 expr { mkinfix $1 $2 $3 } | expr INFIXOP1 expr @@ -1057,6 +1061,9 @@ pattern: | pattern COLONCOLON pattern { mkpat(Ppat_construct(Lident "::", Some(ghpat(Ppat_tuple[$1;$3])), false)) } + | LPAREN COLONCOLON RPAREN LPAREN pattern COMMA pattern RPAREN + { mkpat(Ppat_construct(Lident "::", Some(ghpat(Ppat_tuple[$5;$7])), + false)) } | pattern BAR pattern { mkpat(Ppat_or($1, $3)) } ; @@ -1410,6 +1417,7 @@ constr_ident: /* | LBRACKET RBRACKET { "[]" } */ | LPAREN RPAREN { "()" } | COLONCOLON { "::" } +/* | LPAREN COLONCOLON RPAREN { "::" } */ | FALSE { "false" } | TRUE { "true" } ; |