diff options
| author | jackkoenig | 2016-09-23 13:44:57 -0700 |
|---|---|---|
| committer | Jack Koenig | 2016-10-26 15:15:37 -0700 |
| commit | 4c3b4f4dc10c380a101df75cb561e3f79f1a6abe (patch) | |
| tree | feb382146fff5d5496079b6d7c4d3d530bd65cda /src/main/antlr4 | |
| parent | 4b8a0d2af52ceeb3ff5d05082af53bac76744361 (diff) | |
Add RawString ExtModule parameter support
While unsafe, this supports Verilog parameter types.
Tests now require Verilator 3.884+ to pass.
Diffstat (limited to 'src/main/antlr4')
| -rw-r--r-- | src/main/antlr4/FIRRTL.g4 | 12 |
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 |
