Skip to content
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

Parsing Error #59

Closed
amartinray opened this issue Jul 15, 2015 · 2 comments
Closed

Parsing Error #59

amartinray opened this issue Jul 15, 2015 · 2 comments

Comments

@amartinray
Copy link

When I try to compile my library, I get this error:

Traceback (most recent call last):
File "/home/user/path/scripts/vunit-master/vunit/project.py", line 379, in init
design_file = vhdl_parser.parse(code, name)
File "/home/user/path/scripts/vunit-master/vunit/vhdl_parser.py", line 60, in parse
design_file = VHDLDesignFile.parse(code)
File "/home/user/path/scripts/vunit-master/vunit/vhdl_parser.py", line 95, in parse
packages=list(VHDLPackage.find(code)),
File "/home/user/path/scripts/vunit-master/vunit/vhdl_parser.py", line 245, in find
yield cls.parse(sub_code[:match.end()])
File "/home/user/path/scripts/vunit-master/vunit/vhdl_parser.py", line 254, in parse
constant_declarations = cls._find_constant_declarations(code)
File "/home/user/path/scripts/vunit-master/vunit/vhdl_parser.py", line 280, in _find_constant_declarations
constant_declarations.append(VHDLConstantDeclaration.parse(sub_code))
File "/home/user/path/scripts/vunit-master/vunit/vhdl_parser.py", line 555, in parse
subtype_indication = VHDLSubtypeIndication.parse(sub_code[:expression_start].strip())
File "/home/user/path/scripts/vunit-master/vunit/vhdl_parser.py", line 511, in parse
type_mark = subtype_indication_declaration.group('type_mark')
AttributeError: 'NoneType' object has no attribute 'group'
ERROR - Failed to parse /path/to/package_file.vhd

I'm using the latest master build. I was able to isolate it to these lines of my vhdl package (names changed to protect the innocent):

type MyType is (MY_ONE, MY_TWO, MY_THREE, MY_FOUR);
type MyArrayType is array (MyType'left to
MyType'right) of natural;
constant My_STUFF : ---------------------------------------------------
MyArrayType := (MY_ONE => 1,
MY_TWO => 2,
MY_THREE => 3,
MY_FOUR => 4);

If those lines are included in my package, I get the error. If I comment them out, it is able to continue to the compile.

Any idea on what the problem is?

Thanks.

@kraigher
Copy link
Collaborator

Should be fixed in release v0.26.0

@kraigher
Copy link
Collaborator

Thank you for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants