summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Kerneis2014-05-15 09:30:10 +0100
committerGabriel Kerneis2014-05-15 09:30:10 +0100
commit3c544d74c5c97ab675f49b97de6cc3f46c88dc17 (patch)
tree40aeeb2b77348a817ab182edca478f81cb1c48b1 /src
parent98709fffe3a24e63fe245bd304e07440cfa0a898 (diff)
Missing cases in lexer and parser
Diffstat (limited to 'src')
-rw-r--r--src/lexer.mll1
-rw-r--r--src/parser.mly8
2 files changed, 9 insertions, 0 deletions
diff --git a/src/lexer.mll b/src/lexer.mll
index 988ddb7c..ad6ea0d9 100644
--- a/src/lexer.mll
+++ b/src/lexer.mll
@@ -218,6 +218,7 @@ rule token = parse
| "*_u" { (StarUnderU(r"*_u")) }
| "*_ui" { (StarUnderUi(r"*_ui")) }
| "2^" { (TwoCarrot(r"2^")) }
+ | "2**" { TwoStarStar }
| "(*" { comment (Lexing.lexeme_start_p lexbuf) 0 lexbuf; token lexbuf }
diff --git a/src/parser.mly b/src/parser.mly
index 52c8141f..4279239c 100644
--- a/src/parser.mly
+++ b/src/parser.mly
@@ -662,8 +662,12 @@ star_right_atomic_exp:
{ eloc (E_app_infix($1,Id_aux(Id("mod"), 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
+ { eloc (E_app_infix($1,Id_aux(Id($2), locn 2 2), $3)) }
| star_exp StarUnderU starstar_right_atomic_exp
{ eloc (E_app_infix($1,Id_aux(Id($2), locn 2 2), $3)) }
+ | star_exp StarUnderUi starstar_right_atomic_exp
+ { eloc (E_app_infix($1,Id_aux(Id($2), locn 2 2), $3)) }
plus_exp:
| star_exp
@@ -719,6 +723,8 @@ cons_right_atomic_exp:
{ $1 }
| shift_exp ColonColon cons_right_atomic_exp
{ eloc (E_cons($1,$3)) }
+ | shift_exp Colon cons_right_atomic_exp
+ { eloc (E_app_infix($1,Id_aux(Id(":"), locn 2 2), $3)) }
at_exp:
| cons_exp
@@ -741,6 +747,8 @@ at_right_atomic_exp:
{ eloc (E_app_infix($1,Id_aux(Id($2), locn 2 2), $3)) }
| cons_exp Carrot at_right_atomic_exp
{ eloc (E_app_infix($1,Id_aux(Id($2), locn 2 2), $3)) }
+ | cons_exp TildeCarrot at_right_atomic_exp
+ { eloc (E_app_infix($1,Id_aux(Id($2), locn 2 2), $3)) }
eq_exp:
| at_exp