summaryrefslogtreecommitdiff
path: root/language/l2_parse.ott
diff options
context:
space:
mode:
Diffstat (limited to 'language/l2_parse.ott')
-rw-r--r--language/l2_parse.ott8
1 files changed, 7 insertions, 1 deletions
diff --git a/language/l2_parse.ott b/language/l2_parse.ott
index 1f365a3f..11b51f2a 100644
--- a/language/l2_parse.ott
+++ b/language/l2_parse.ott
@@ -452,7 +452,7 @@ exp :: 'E_' ::=
% here the expi are of type 'a and the result is a vector of 'a, whereas in exp1 : ... : expn
% the expi and the result are both of type vector of 'a
- | [ num1 = exp1 , ... , numn = expn ] :: :: vector_indexed {{ com vector (indexed consecutively) }}
+ | [ num1 = exp1 , ... , numn = expn , opt_default ] :: :: vector_indexed {{ com vector (indexed consecutively) }}
% num1 .. numn must be a consecutive list of naturals
% we pick [ ] not { } for vector literals for consistency with their
@@ -544,6 +544,12 @@ fexps :: 'FES_' ::=
% {{ aux _ annot }} {{ auxparam 'a }}
| fexp1 ; ... ; fexpn semi_opt :: :: Fexps
+opt_default :: 'Def_val_' ::=
+ {{ com Optional default value for indexed vectors, to define a defualt value for any unspecified positions in a sparse map }}
+ {{ aux _ l }}
+ | :: :: empty
+ | default = exp :: :: dec
+
pexp :: 'Pat_' ::=
{{ com Pattern match }}
{{ aux _ l }}