79 lines
2.5 KiB
Python
79 lines
2.5 KiB
Python
|
|
|
|
class line():
|
|
|
|
def __init__(self, line):
|
|
self.line = line
|
|
self.lineLower = line.lower()
|
|
self.indentLevel = None
|
|
## Misc attributes
|
|
self.isBlank = False
|
|
## Comment attributes
|
|
self.isComment = False
|
|
self.hasComment = False
|
|
self.commentColumn = None
|
|
## Library attributes
|
|
self.isLibrary = False
|
|
self.isLibraryUse = False
|
|
## Entity attributes
|
|
self.insideEntity = False
|
|
self.isEntityDeclaration = False
|
|
self.isEndEntityDeclaration = False
|
|
## Port attributes
|
|
self.insidePortMap = False
|
|
self.isPortDeclaration = False
|
|
self.isPortKeyword = False
|
|
self.isEndPortMap = False
|
|
## Generic attributes
|
|
self.insideGenericMap = False
|
|
self.isGenericDeclaration = False
|
|
self.isGenericKeyword = False
|
|
self.isEndGenericMap = False
|
|
## Architecture attributes
|
|
self.insideArchitecture = False
|
|
self.isArchitectureBegin = False
|
|
self.isArchitectureKeyword = False
|
|
self.isEndArchitecture = False
|
|
## Signal attributes
|
|
self.isSignal = False
|
|
## Constant attributes
|
|
self.isConstant = False
|
|
## Process attributes
|
|
self.insideProcess = False
|
|
self.isProcessBegin = False
|
|
self.isProcessKeyword = False
|
|
self.isProcessDeclarative = False
|
|
self.isEndProcess = False
|
|
self.insideSensitivityList = False
|
|
self.isSensitivityListBegin = False
|
|
self.isSensitivityListEnd = False
|
|
## Concurrent attributes
|
|
self.insideConcurrent = False
|
|
self.isConcurrentBegin = False
|
|
self.isEndConcurrent = False
|
|
## If attributes
|
|
self.insideIf = False
|
|
self.isElseKeyword = False
|
|
self.isElseIfKeyword = False
|
|
self.isEndIfKeyword = False
|
|
self.isIfEnd = False
|
|
self.isIfKeyword = False
|
|
self.isThenKeyword = False
|
|
## Case attributes
|
|
self.insideCaseWhen = False
|
|
self.isCaseIsKeyword = False
|
|
self.isCaseKeyword = False
|
|
self.isCaseWhenEnd = False
|
|
self.isCaseWhenKeyword = False
|
|
self.isEndCaseKeyword = False
|
|
## Sequential attributes
|
|
self.insideSequential = False
|
|
self.isSequentialEnd = False
|
|
self.isSequential = False
|
|
self.sequentialAlignmentColumn = None
|
|
## Component attributes
|
|
self.insideComponent = False
|
|
self.isComponentDeclaration = False
|
|
self.isComponentEnd = False
|
|
|