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
359a3de9
Commit
359a3de9
authored
Jul 22, 2020
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parser rejects errant declarations
parent
8537a9ef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
src/Language/SystemVerilog/Parser/ParseDecl.hs
+7
-3
test/error/dangling_stmt.sv
+4
-0
test/error/run.sh
+1
-0
No files found.
src/Language/SystemVerilog/Parser/ParseDecl.hs
View file @
359a3de9
...
...
@@ -343,9 +343,13 @@ parseDTsAsComponents tokens =
parseDTsAsComponent
::
[
DeclToken
]
->
(
Position
,
Component
,
[
DeclToken
])
parseDTsAsComponent
[]
=
error
"parseDTsAsComponent unexpected end of tokens"
parseDTsAsComponent
l0
=
if
l
/=
Nothing
&&
l
/=
Just
Automatic
then
error
$
"unexpected non-automatic lifetime: "
++
show
l0
else
(
position
,
component
,
l5
)
if
l
/=
Nothing
&&
l
/=
Just
Automatic
then
error
$
"unexpected non-automatic lifetime: "
++
show
l0
else
if
dir
==
Local
&&
tf
rs
==
Implicit
Unspecified
[]
then
error
$
"declaration(s) missing type information: "
++
show
(
position
,
tps
)
else
(
position
,
component
,
l5
)
where
(
dir
,
l1
)
=
takeDir
l0
(
l
,
l2
)
=
takeLifetime
l1
...
...
test/error/dangling_stmt.sv
0 → 100644
View file @
359a3de9
module
top
;
logic
y
;
y
=
1
;
endmodule
test/error/run.sh
View file @
359a3de9
...
...
@@ -9,6 +9,7 @@ addTest() {
suite_addTest test_
$test
}
source
../lib/functions.sh
source
../lib/discover.sh
.
shunit2
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