-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
Description
I am trying to run the example from the docs https://pyvhdlparser.readthedocs.io/en/latest/BlockStream/Usage.html
And I get an NoneType is not iterable error.
here is my code
from pyVHDLParser.Token.Parser import Tokenizer
from pyVHDLParser.Blocks import TokenToBlockParser
from pyVHDLParser.Base import ParserException
# Open a source file
with open('strobe_analyzer.vhd', 'r') as fileHandle:
content = fileHandle.read()
# get a token generator
tokenStream = Tokenizer.GetVHDLTokenizer(content)
# get a block generator
blockStream = TokenToBlockParser.Transform(tokenStream)
try:
for block in blockStream:
print("{block!s}".format(block=block))
for token in block:
print(" {token!s}".format(token=token))
except ParserException as ex:
print("ERROR: {0!s}".format(ex))
except NotImplementedError as ex:
print("NotImplementedError: {0!s}".format(ex))
and you can see the vhdl file I am using to test this attetched (just change the extension to vhd, stupid github issue woudltn let me upload .vhd files.....)
strobe_analyzer.txt