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
c9306eea
Commit
c9306eea
authored
Nov 05, 2014
by
Adrian Fiergolski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug 1024 and 1025.
parent
aabe6c84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
vhdl_parser.py
hdlmake/vhdl_parser.py
+9
-3
No files found.
hdlmake/vhdl_parser.py
View file @
c9306eea
...
...
@@ -114,7 +114,8 @@ class VHDLParser(DepParser):
"package"
:
"^ *package +(
\
w+) +is"
,
"arch_begin"
:
"^ *architecture +(
\
w+) +of +(
\
w+) +is +"
,
"arch_end"
:
"^ *end +(
\
w+) +;"
,
"instance"
:
"^ *(
\
w+) *
\
: *(
\
w+) *(port|generic) *map"
"instance"
:
"^ *(
\
w+) *
\
: *(
\
w+) *(port|generic) *map"
,
"instance_from_work_library"
:
"^ *(
\
w+) *
\
: *entity *work *
\
. *(
\
w+) *(port|generic) *map"
}
compiled_patterns
=
map
(
lambda
p
:
(
p
,
re
.
compile
(
patterns
[
p
])),
patterns
)
...
...
@@ -122,7 +123,7 @@ class VHDLParser(DepParser):
within_architecture
=
False
for
l
in
lines
:
matches
=
filter
(
lambda
(
k
,
v
):
v
is
not
None
,
map
(
lambda
(
k
,
v
):
(
k
,
re
.
match
(
v
,
l
)),
compiled_patterns
))
matches
=
filter
(
lambda
(
k
,
v
):
v
is
not
None
,
map
(
lambda
(
k
,
v
):
(
k
,
re
.
match
(
v
,
l
.
lower
()
)),
compiled_patterns
))
if
(
not
len
(
matches
)):
continue
...
...
@@ -160,4 +161,9 @@ class VHDLParser(DepParser):
dep_file
.
add_relation
(
DepRelation
(
g
.
group
(
2
),
DepRelation
.
USE
,
DepRelation
.
ENTITY
))
dep_file
.
is_parsed
=
True
\ No newline at end of file
elif
(
what
==
"instance_from_work_library"
and
within_architecture
)
:
dep_file
.
add_relation
(
DepRelation
(
g
.
group
(
2
),
DepRelation
.
USE
,
DepRelation
.
ENTITY
))
dep_file
.
is_parsed
=
True
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