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
46242aac
Commit
46242aac
authored
Sep 11, 2019
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix combined array declarations (resolves #34)
parent
a0068f60
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
src/Language/SystemVerilog/Parser/ParseDecl.hs
+4
-0
test/basic/multi_array_decl.sv
+19
-0
test/basic/multi_array_decl.v
+11
-0
No files found.
src/Language/SystemVerilog/Parser/ParseDecl.hs
View file @
46242aac
...
...
@@ -314,6 +314,10 @@ tripLookahead l0 =
-- know we must have a valid triplet ahead
else
if
null
l1
||
asgn
/=
Nothing
then
True
-- if there is an ident followed by some number of ranges, and that's it,
-- then there is a trailing declaration of an array ahead
else
if
(
not
$
null
l1
)
&&
(
null
l2
)
then
True
-- if there is a comma after the identifier (and optional ranges and
-- assignment) that we're looking at, then we know this identifier is not a
-- type name, as type names must be followed by a first identifier before a
...
...
test/basic/multi_array_decl.sv
0 → 100644
View file @
46242aac
module
top
;
typedef
struct
packed
{
logic
f1
;
logic
f2
;
}
T
;
T
a
[
1
:
0
]
;
T
b
[
1
:
0
]
;
T
c
[
1
:
0
]
,
d
[
1
:
0
]
;
T
e
[
1
:
0
]
,
f
[
1
:
0
]
,
g
;
T
h
,
i
[
1
:
0
]
;
T
j
;
struct
packed
{
logic
f1
;
logic
f2
;
}
k
;
endmodule
test/basic/multi_array_decl.v
0 → 100644
View file @
46242aac
module
top
;
reg
[
1
:
0
]
a
[
1
:
0
]
;
reg
[
1
:
0
]
b
[
1
:
0
]
;
reg
[
1
:
0
]
c
[
1
:
0
]
,
d
[
1
:
0
]
;
reg
[
1
:
0
]
e
[
1
:
0
]
,
f
[
1
:
0
]
,
g
;
reg
[
1
:
0
]
h
,
i
[
1
:
0
]
;
reg
[
1
:
0
]
j
;
reg
[
1
:
0
]
k
;
endmodule
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