-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add end markers for package and architecture #19
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Andrés Manelli <[email protected]>
hdlparse/vhdl_parser.py
Outdated
@@ -32,7 +32,8 @@ | |||
(r'subtype\s+(\w+)\s+is\s+(\w+)', 'subtype'), | |||
(r'constant\s+(\w+)\s+:\s+(\w+)', 'constant'), | |||
(r'type\s+(\w+)\s*is', 'type', 'type_decl'), | |||
(r'end\s+package', None, '#pop'), | |||
(r'end\s+\w+\s*;', None, '#pop'), | |||
(r'end\s+package\s+\w+\s*;', None, '#pop'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line has a slightly different matching than the one above. It is probably not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change that as it is for entity in #14 based on your comment.
hdlparse/vhdl_parser.py
Outdated
@@ -89,7 +90,8 @@ | |||
(r'--.*\n', None), | |||
], | |||
'architecture': [ | |||
(r'end\s+architecture\s*;', 'end_arch', '#pop'), | |||
(r'end\s+\w+\s*;', 'end_arch', '#pop'), | |||
(r'end\s+architecture\s+\w+\s*;', 'end_arch', '#pop'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment above for "package"
Ok, so I left only the \w+ matching (also for package body) |
Signed-off-by: Andrés Manelli [email protected]