diff options
author | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2008-01-28 05:29:20 +0000 |
---|---|---|
committer | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2008-01-28 05:29:20 +0000 |
commit | 3f4a98da0fbf8a87c674d6737d8c6cec7e8567e5 (patch) | |
tree | f5aa13505824d708414ece1f00219b811315c44a /parsing/parser.mly | |
parent | 30f3fa2c5bc27f8c59930741aa1b6dd5a34a6b40 (diff) | |
download | ocaml-gcaml3090.tar.gz |
3.09.1 updategcaml3090
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gcaml3090@8792 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'parsing/parser.mly')
-rw-r--r-- | parsing/parser.mly | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/parsing/parser.mly b/parsing/parser.mly index 855dcc23d5..41cc0782cf 100644 --- a/parsing/parser.mly +++ b/parsing/parser.mly @@ -279,6 +279,7 @@ let bigarray_set arr arg newval = %token RBRACE %token RBRACKET %token REC +%token <string> REGEXP %token RPAREN %token SEMI %token SEMISEMI @@ -360,7 +361,7 @@ The precedences must be listed from low to high. /* Finally, the first tokens of simple_expr are above everything else. */ %nonassoc BACKQUOTE BEGIN CHAR FALSE FLOAT INT INT32 INT64 LBRACE LBRACELESS LBRACKET LBRACKETBAR LIDENT LPAREN - NEW NATIVEINT PREFIXOP STRING TRUE UIDENT + NEW NATIVEINT PREFIXOP REGEXP STRING TRUE UIDENT LBRACKETCOLON @@ -923,6 +924,9 @@ simple_expr: { unclosed "begin" 1 "end" 3 } | LPAREN seq_expr type_constraint RPAREN { let (t, t') = $3 in mkexp(Pexp_constraint($2, t, t')) } + + | REGEXP { mkexp(Pexp_regexp $1) } + | simple_expr DOT label_longident { mkexp(Pexp_field($1, $3)) } | simple_expr DOT LPAREN seq_expr RPAREN |