Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
Hdlmake
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
15
Issues
15
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Hdlmake
Commits
5baf592b
Commit
5baf592b
authored
Jun 14, 2017
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue allowing to scan dependencies by instance on the VHDL parser
parent
a2956203
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
vhdl_parser.py
hdlmake/vhdl_parser.py
+8
-9
No files found.
hdlmake/vhdl_parser.py
View file @
5baf592b
...
...
@@ -171,10 +171,10 @@ class VHDLParser(DepParser):
matches as indexed plain strings. It doesn't add any relation
to the file"""
logging
.
debug
(
"found component declaration
%
s"
,
text
.
group
(
1
))
dep_file
.
add_relation
(
DepRelation
(
"
%
s.
%
s"
%
(
dep_file
.
library
,
text
.
group
(
1
)),
DepRelation
.
USE
,
DepRelation
.
ENTITY
))
#
dep_file.add_relation(
#
DepRelation("%s.%s" % (dep_file.library, text.group(1)),
#
DepRelation.USE,
#
DepRelation.ENTITY))
return
"<hdlmake component
%
s>"
%
text
.
group
(
1
)
buf
=
re
.
sub
(
component_pattern
,
do_component
,
buf
)
...
...
@@ -227,8 +227,7 @@ class VHDLParser(DepParser):
# function declaration
function_pattern
=
re
.
compile
(
r"^\s*function\s+(?P<name>\w+)"
r".*end\s*(|function\s*)(|(?P=name))\s*;"
,
r"^\s*function\s+(?P<name>\w+)"
,
re
.
DOTALL
|
re
.
MULTILINE
|
re
.
IGNORECASE
)
def
do_function
(
text
):
...
...
@@ -256,9 +255,9 @@ class VHDLParser(DepParser):
for
lib
in
libraries
:
logging
.
debug
(
"-> instantiates
%
s.
%
s as
%
s"
,
lib
,
text
.
group
(
2
),
text
.
group
(
1
))
#
dep_file.add_relation(DepRelation(
#
"%s.%s" % (lib, text.group(2)),
# DepRelation.USE, DepRelation.ARCHITECTURE
))
dep_file
.
add_relation
(
DepRelation
(
"
%
s.
%
s"
%
(
lib
,
text
.
group
(
2
)),
DepRelation
.
USE
,
DepRelation
.
ENTITY
))
return
"<hdlmake instance
%
s|
%
s>"
%
(
text
.
group
(
1
),
text
.
group
(
2
))
buf
=
re
.
sub
(
instance_pattern
,
do_instance
,
buf
)
...
...
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