summaryrefslogtreecommitdiff
path: root/language/l2.ott
diff options
context:
space:
mode:
authorKathy Gray2014-07-08 15:07:45 +0100
committerKathy Gray2014-07-08 15:07:45 +0100
commite482abd733622647f97b4ebecc6cefeb6b1fccee (patch)
treec4d1fbb605fb28a7f23522d4435423328c45328a /language/l2.ott
parent54bfa59acb4244e29bc9064f09fc800e252fea39 (diff)
Extend language to support register aliases and to support interrupts, traps and the like.
Diffstat (limited to 'language/l2.ott')
-rw-r--r--language/l2.ott14
1 files changed, 14 insertions, 0 deletions
diff --git a/language/l2.ott b/language/l2.ott
index 55bad070..1a4d2038 100644
--- a/language/l2.ott
+++ b/language/l2.ott
@@ -632,6 +632,9 @@ exp :: 'E_' ::=
| lexp := exp :: :: assign
{{ com imperative assignment }}
+ | exit exp :: :: exit
+ {{ com expression to halt all current execution, potentially calling a system, trap, or interrupt handler with exp }}
+
| ( exp ) :: S :: paren {{ ichlo [[exp]] }}
| ( annot ) exp :: :: internal_cast {{ com This is an internal cast, generated during type checking that will resolve into a syntactic cast after }}
| annot :: :: internal_exp {{ com This is an internal use of an nexp (in the annot) for passing length information after resolution of constraints }}
@@ -825,11 +828,22 @@ scattered_def :: 'SD_' ::=
| end id :: :: scattered_end
{{ com scattered definition end }}
+alias_spec :: 'AL_' ::=
+ {{ com Register alias expression forms. Other than where noted, each id must refer to an unaliased register of type vector }}
+ {{ aux _ annot }} {{ auxparam 'a }}
+ | id . id' :: :: subreg
+ {{ com id must refer to a register, id' to a declared subregister of id }}
+ | id [ exp ] :: :: bit
+ | id [ exp '..' exp' ] :: :: slice
+ | id : id' :: :: concat
+ {{ com both id and id' must refer to a register }}
dec_spec :: 'DEC_' ::=
{{ com Register declarations }}
{{ aux _ annot }} {{ auxparam 'a }}
| register typ id :: :: reg
+ | register alias id = alias_spec :: :: alias
+ | register alias typ id = alias_spec :: :: typ_alias
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Top-level definitions %