Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv2v
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
sv2v
Commits
1fd72d87
Commit
1fd72d87
authored
Dec 04, 2020
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix double backtick handling in backtick string
parent
bf6ba338
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
src/Language/SystemVerilog/Parser/Preprocess.hs
+4
-0
test/lex/macro_string.sv
+15
-0
test/lex/macro_string.v
+1
-0
No files found.
src/Language/SystemVerilog/Parser/Preprocess.hs
View file @
1fd72d87
...
...
@@ -630,6 +630,10 @@ handleBacktickString = do
if
null
macroStack
then
lexicalError
"`
\\
`
\"
is not allowed outside of macros"
else
loop
'`'
:
'`'
:
_
->
do
'`'
<-
takeChar
'`'
<-
takeChar
loop
'`'
:
_
->
do
handleDirective
True
loop
...
...
test/lex/macro_string.sv
0 → 100644
View file @
1fd72d87
`define
PRINT
(
str
,
num
)
$
display
(
`
"StrIs``str NumIs``num`"
)
;
module
top
;
initial
begin
`PRINT
(
FOO
,
0
)
`PRINT
(
BAR
,
1
)
`PRINT
(
BAZ
,
2
)
`PRINT
(
A
,
1
)
`PRINT
(
B
,
2
)
`PRINT
(
C
,
3
)
end
endmodule
test/lex/macro_string.v
0 → 100644
View file @
1fd72d87
`include
"macro_string.sv"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment