Commit b45217ba by Zachary Snow

hacky support for 'part-select addressing'

parent abd7ccf4
......@@ -591,6 +591,9 @@ DeclAsgn :: { (Identifier, Expr) }
Range :: { Range }
: "[" Expr ":" Expr "]" { ($2, $4) }
-- TODO: This assumes the ranges are always [hi:lo]; See section 11.5.1!
| "[" Expr "+:" Expr "]" { (BinOp Sub (BinOp Add $2 $4) (Number "1"), $2) }
| "[" Expr "-:" Expr "]" { ($2, BinOp Add (BinOp Sub $2 $4) (Number "1")) }
LHS :: { LHS }
: Identifier { LHSIdent $1 }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment