cucapra/dahlia

Parse error in let expression for bitwidth 32 and above

Closed this issue · 0 comments

Parsing the following will fail because EInt uses Int type

let x: ubit<32> = 0xffffffff;

Error message:

For input string: "ffffffff"

case class EInt(v: Int, base: Int = 10) extends Expr

Suggestion:

Changing EInt to use BigInt will fix the parse error. Subsequently TStaticInt will also have to use BigInt

case class TStaticInt(v: Int) extends Type with IntType