diff options
| author | Kathy Gray | 2014-06-23 15:57:26 +0100 |
|---|---|---|
| committer | Kathy Gray | 2014-06-23 15:58:37 +0100 |
| commit | edad894f962a4aa07036d6435364b6919add8085 (patch) | |
| tree | b690e4792baf3d97b1081fc26ac447b64b915497 /src/parser.mly | |
| parent | f4d86db24045315c87cbe3509485e3524b725a7c (diff) | |
Get indexed vectors, particularly with default values, working
Diffstat (limited to 'src/parser.mly')
| -rw-r--r-- | src/parser.mly | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parser.mly b/src/parser.mly index aa088994..2679c2ca 100644 --- a/src/parser.mly +++ b/src/parser.mly @@ -547,6 +547,8 @@ atomic_exp: { eloc (E_vector([$2])) } | Lsquare comma_exps Rsquare { eloc (E_vector($2)) } + | Lsquare comma_exps Semi Default Eq exp Rsquare + { eloc (E_vector_indexed($2,(Def_val_aux(Def_val_dec $6, locn 3 6)))) } | Lsquare exp With atomic_exp Eq exp Rsquare { eloc (E_vector_update($2,$4,$6)) } | Lsquare exp With atomic_exp Colon atomic_exp Eq exp Rsquare |
