diff options
| author | Alasdair Armstrong | 2017-06-23 18:13:33 +0100 |
|---|---|---|
| committer | Alasdair Armstrong | 2017-06-23 18:13:33 +0100 |
| commit | 454084884c7a0bbe6c00ea46349962e8d5228118 (patch) | |
| tree | 99c63427f91092bcf0e37564526102247e4fedd8 /src/parser.mly | |
| parent | d06de80525aae4fe172c9105adf0e97b92c4227b (diff) | |
Support for more sail constructs
Added support for:
* Register type declarations
* Undefined literals
* Exit statement
* Toplevel let statements
* Vector literals i.e. [a, b, c]
* Binary bitvector literals
* Hex bitvector literals
Patched the parser so you can actually write 2**'n - 1 in a nexp. The
parser rules for nexps are a bit strange, and there didn't seem to be
anyway to write this before without it causing a parse error.
Can now typecheck up to line 332 of mips_prelude in mips/, but need to
add support for the implict passing of registers by names to go any
further, which should be fun...
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 bd68cfdc..f8ddf792 100644 --- a/src/parser.mly +++ b/src/parser.mly @@ -413,6 +413,8 @@ exp_typ: { $1 } | TwoStarStar atomic_typ { tloc (ATyp_exp($2)) } + | TwoStarStar atomic_typ Minus Num + { tloc (ATyp_minus (tloc (ATyp_exp $2), tloc (ATyp_constant $4))) } | TwoStarStar Num { tloc (ATyp_exp (tloc (ATyp_constant $2))) } |
