diff options
| author | Alasdair Armstrong | 2017-10-24 17:18:01 +0100 |
|---|---|---|
| committer | Alasdair Armstrong | 2017-10-24 17:18:01 +0100 |
| commit | deb54723bdc04c7e381ffb84974d217cf961c676 (patch) | |
| tree | 9c28ce69cb66ed32504ac40762504d0655bdf50f /src | |
| parent | 761c9bda82472b39d64416b6d4e25d21081fa261 (diff) | |
More succinct syntax in new parser for externed valspecs which share
the same name between sail and the target
Diffstat (limited to 'src')
| -rw-r--r-- | src/parser2.mly | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parser2.mly b/src/parser2.mly index e6c63196..5a4ad667 100644 --- a/src/parser2.mly +++ b/src/parser2.mly @@ -1039,6 +1039,10 @@ val_spec_def: { mk_vs (VS_val_spec ($6, $2, Some $4, false)) $startpos $endpos } | Val Cast id Eq String Colon typschm { mk_vs (VS_val_spec ($7, $3, Some $5, true)) $startpos $endpos } + | Val String Colon typschm + { mk_vs (VS_val_spec ($4, mk_id (Id $2) $startpos($2) $endpos($2), Some $2, false)) $startpos $endpos } + | Val Cast String Colon typschm + { mk_vs (VS_val_spec ($5, mk_id (Id $3) $startpos($3) $endpos($3), Some $3, true)) $startpos $endpos } register_def: | Register id Colon typ |
