diff options
| author | Kathy Gray | 2013-07-26 15:27:55 +0100 |
|---|---|---|
| committer | Kathy Gray | 2013-07-26 15:27:55 +0100 |
| commit | eac79b709135f35f5ff47cf0c3bb61d8f1b3676e (patch) | |
| tree | 4d8f1220e9f5276860156617ee27423c6eaee471 /language/l2_parse.ott | |
| parent | 37a4c2ebcfab7834c17fe44703a71da277cb285e (diff) | |
A parser without any conflicts.
The ott files have been adjusted to reflect some syntax changes in typquant specifications, and the type annotations are not optional for function definitions; we need additional syntax to help the parser if we want to allow functions without type annotations.
Diffstat (limited to 'language/l2_parse.ott')
| -rw-r--r-- | language/l2_parse.ott | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/language/l2_parse.ott b/language/l2_parse.ott index 74c154ba..18d68a54 100644 --- a/language/l2_parse.ott +++ b/language/l2_parse.ott @@ -405,17 +405,20 @@ kinded_id :: 'KOpt_' ::= {{ aux _ l }} | id :: :: none {{ com identifier }} | kind id :: :: kind {{ com kind-annotated variable }} - | ( kinded_id ) :: S :: paren {{ icho [[kinded_id]] }} + +quant_item :: 'QI_' ::= + {{ com Either a kinded identifier or a nexp constraint for a typquant }} + {{ aux _ l }} + | kinded_id :: :: id {{ com An optionally kinded identifier }} + | nexp_constraint :: :: const {{ com A constraint for this type }} typquant :: 'TypQ_' ::= {{ com type quantifiers and constraints}} % {{ aux _ annot }} {{ auxparam 'a }} {{ aux _ l }} - | forall kinded_id1 ... kinded_idn . nexp_constraint1 , ... , nexp_constrainti . :: :: tq {{ texlong }} + | forall quant_item1 , ... , quant_itemn . :: :: tq {{ texlong }} % WHY ARE CONSTRAINTS HERE AND NOT IN THE KIND LANGUAGE - - | forall kinded_id1 ... kinded_idn . :: :: no_constraint {{ com sugar, omitting constraints}} | :: :: no_forall {{ com sugar, omitting quantifier and constraints }} typschm :: 'TypSchm_' ::= |
