summaryrefslogtreecommitdiff
path: root/src/parser.mly
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.mly')
-rw-r--r--src/parser.mly16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/parser.mly b/src/parser.mly
index 7bd0a72f..3261551b 100644
--- a/src/parser.mly
+++ b/src/parser.mly
@@ -142,7 +142,7 @@ let make_vector_sugar order_set is_inc typ typ1 =
%nonassoc Then
%nonassoc Else
-%token Div_ Mod Quot Rem QuotUnderS
+%token Div_ Mod ModUnderS Quot Rem QuotUnderS
%token Bar Comma Dot Eof Minus Semi Under
%token Lcurly Rcurly Lparen Rparen Lsquare Rsquare
@@ -156,7 +156,7 @@ let make_vector_sugar order_set is_inc typ typ1 =
%token <string> String Bin Hex
%token <string> Amp At Carrot Div Eq Excl Gt Lt Plus Star Tilde
-%token <string> AmpAmp CarrotCarrot Colon ColonColon EqDivEq EqEq ExclEq ExclExcl
+%token <string> AmpAmp CarrotCarrot Colon ColonColon EqEq ExclEq ExclExcl
%token <string> GtEq GtEqPlus GtGt GtGtGt GtPlus HashGtGt HashLtLt
%token <string> LtEq LtEqPlus LtGt LtLt LtLtLt LtPlus StarStar TildeCarrot
@@ -166,7 +166,7 @@ let make_vector_sugar order_set is_inc typ typ1 =
%token <string> StarUnderSi StarUnderU StarUnderUi TwoCarrot PlusUnderS MinusUnderS
%token <string> AmpI AtI CarrotI DivI EqI ExclI GtI LtI PlusI StarI TildeI
-%token <string> AmpAmpI CarrotCarrotI ColonColonI EqDivEqI EqEqI ExclEqI ExclExclI
+%token <string> AmpAmpI CarrotCarrotI ColonColonI EqEqI ExclEqI ExclExclI
%token <string> GtEqI GtEqPlusI GtGtI GtGtGtI GtPlusI HashGtGtI HashLtLtI
%token <string> LtEqI LtEqPlusI LtGtI LtLtI LtLtLtI LtPlusI StarStarI TildeCarrotI
@@ -238,8 +238,6 @@ id:
{ idl (DeIid($3)) }
| Lparen Deinfix ColonColon Rparen
{ idl (DeIid($3)) }
- | Lparen Deinfix EqDivEq Rparen
- { idl (DeIid($3)) }
| Lparen Deinfix EqEq Rparen
{ idl (DeIid($3)) }
| Lparen Deinfix ExclEq Rparen
@@ -433,7 +431,7 @@ nexp_typ:
| Num Minus nexp_typ
{ tloc (ATyp_minus((tlocl (ATyp_constant $1) 1 1),$3)) }
| Lparen Num Minus nexp_typ Rparen
- { tloc (ATyp_minus((tlocl (ATyp_constant $2) 2 2),$4)) }
+ { tloc (ATyp_minus((tlocl (ATyp_constant $2) 2 2),$4)) }
tup_typ_list:
@@ -686,7 +684,9 @@ star_exp:
| star_exp Rem starstar_exp
{ eloc (E_app_infix($1,Id_aux(Id("rem"), locn 2 2), $3)) }
| star_exp Mod starstar_exp
- { eloc (E_app_infix($1,Id_aux(Id("mod"), locn 2 2), $3)) }
+ { eloc (E_app_infix($1,Id_aux(Id("mod"), locn 2 2), $3)) }
+ | star_exp ModUnderS starstar_exp
+ { eloc (E_app_infix($1,Id_aux(Id("mod_s"), locn 2 2), $3)) }
| star_exp StarUnderS starstar_exp
{ eloc (E_app_infix($1,Id_aux(Id($2), locn 2 2), $3)) }
| star_exp StarUnderSi starstar_exp
@@ -713,6 +713,8 @@ star_right_atomic_exp:
{ eloc (E_app_infix($1,Id_aux(Id("rem"), locn 2 2), $3)) }
| star_exp Mod starstar_right_atomic_exp
{ eloc (E_app_infix($1,Id_aux(Id("mod"), locn 2 2), $3)) }
+ | star_exp ModUnderS starstar_right_atomic_exp
+ { eloc (E_app_infix($1,Id_aux(Id("mod_s"), locn 2 2), $3)) }
| star_exp StarUnderS starstar_right_atomic_exp
{ eloc (E_app_infix($1,Id_aux(Id($2), locn 2 2), $3)) }
| star_exp StarUnderSi starstar_right_atomic_exp