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
8685b0e2
Commit
8685b0e2
authored
Nov 18, 2021
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vhdl_parser: do not try to remove function, that's not reliable
parent
9ba2b9f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
19 deletions
+0
-19
vhdl_parser.py
hdlmake/sourcefiles/vhdl_parser.py
+0
-19
No files found.
hdlmake/sourcefiles/vhdl_parser.py
View file @
8685b0e2
...
...
@@ -238,25 +238,6 @@ class VHDLParser(DepParser):
buf
=
re
.
sub
(
record_pattern
,
do_record
,
buf
)
# function declaration
function_pattern
=
re
.
compile
(
r"^\s*function\s+(?P<name>\w+)"
r".*?"
# gobble arguments if any.
r"return\s+\w+"
r"(\s+is.*?end\s+function.*?)?"
# gobble body if any.
r"\s*;"
,
re
.
DOTALL
|
re
.
MULTILINE
|
re
.
IGNORECASE
)
def
do_function
(
text
):
"""Function to be applied by re.sub to every match of the
funtion_pattern in the VHDL code -- group() returns positive
matches as indexed plain strings. It doesn't add the relations
to the file"""
logging
.
debug
(
"found function declaration
%
s"
,
text
.
group
(
1
))
return
"<hdlmake function
%
s>"
%
text
.
group
(
1
)
buf
=
re
.
sub
(
function_pattern
,
do_function
,
buf
)
# component instantiation
instance_component_pattern
=
re
.
compile
(
r"^\s*(?P<LABEL>\w+)\s*:"
...
...
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