aboutsummaryrefslogtreecommitdiff
path: root/src/main/antlr4
diff options
context:
space:
mode:
authorAdam Izraelevitz2017-03-09 12:39:04 -0800
committerGitHub2017-03-09 12:39:04 -0800
commit664d5b33094b7158bb6f8a583a89d83ac69be83e (patch)
tree7a037c49ca64773430afdf2cdf264b8e5c40f1de /src/main/antlr4
parent132d7baa991501e8c07cac7f6f4efc52905a89e7 (diff)
Sint tests and change in serialization (#456)
SInt representation is no longer 2's complement, but instead a positive number (hex or base 10) that is optionally preceded by a sign (-+).
Diffstat (limited to 'src/main/antlr4')
-rw-r--r--src/main/antlr4/FIRRTL.g42
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/antlr4/FIRRTL.g4 b/src/main/antlr4/FIRRTL.g4
index cdec7260..e26aca2e 100644
--- a/src/main/antlr4/FIRRTL.g4
+++ b/src/main/antlr4/FIRRTL.g4
@@ -297,7 +297,7 @@ PosInt
;
HexLit
- : '"' 'h' ( HexDigit )+ '"'
+ : '"' 'h' ( '+' | '-' )? ( HexDigit )+ '"'
;
DoubleLit