diff options
| author | Prashanth Mundkur | 2019-02-07 14:30:41 -0800 |
|---|---|---|
| committer | Prashanth Mundkur | 2019-02-08 11:21:17 -0800 |
| commit | 88c956dc0ee2e4e22c04d7a841d070cca7cca2a0 (patch) | |
| tree | c25d6e7e9e9ddbfab51c63ab6a89b99a2ccbcf7e /src/parser.mly | |
| parent | ad868ef0ad22a78021a5de91073416f69e8163d3 (diff) | |
Add parameterization support for bitfields.
This supports the following syntax:
type xlen : Int = 64
type ylen : Int = 1
type xlenbits = bits(xlen)
bitfield Mstatus : xlenbits = {
SD : xlen - ylen,
SXL : xlen - ylen - 1 .. xlen - ylen - 3
}
Diffstat (limited to 'src/parser.mly')
| -rw-r--r-- | src/parser.mly | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser.mly b/src/parser.mly index cbbc41e3..bd832d28 100644 --- a/src/parser.mly +++ b/src/parser.mly @@ -1130,9 +1130,9 @@ funcl_typ: { mk_tannot mk_typqn $1 $startpos $endpos } index_range: - | Num + | typ { mk_ir (BF_single $1) $startpos $endpos } - | Num DotDot Num + | typ DotDot typ { mk_ir (BF_range ($1, $3)) $startpos $endpos } r_id_def: |
