aboutsummaryrefslogtreecommitdiff
path: root/src/main/antlr4/FIRRTL.g4
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/antlr4/FIRRTL.g4')
-rw-r--r--src/main/antlr4/FIRRTL.g412
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main/antlr4/FIRRTL.g4 b/src/main/antlr4/FIRRTL.g4
index f4d9d3f8..70716c94 100644
--- a/src/main/antlr4/FIRRTL.g4
+++ b/src/main/antlr4/FIRRTL.g4
@@ -97,6 +97,7 @@ parameter
: 'parameter' id '=' IntLit NEWLINE
| 'parameter' id '=' StringLit NEWLINE
| 'parameter' id '=' DoubleLit NEWLINE
+ | 'parameter' id '=' RawString NEWLINE
;
moduleBlock
@@ -321,7 +322,16 @@ HexDigit
;
StringLit
- : '"' ('\\"'|.)*? '"'
+ : '"' UnquotedString? '"'
+ ;
+
+RawString
+ : '\'' UnquotedString? '\''
+ ;
+
+fragment
+UnquotedString
+ : ('\\"'|~[\r\n])+?
;
FileInfo